import { computed as c, onMounted as Ce, ref as v, watch as xe, openBlock as r, createElementBlock as y, normalizeClass as Z, normalizeStyle as L, unref as a, createBlock as h, createCommentVNode as u, createVNode as j, createSlots as we, withCtx as f, renderSlot as p, normalizeProps as U, guardReactiveProps as B, createElementVNode as s, Fragment as ee, renderList as te, toDisplayString as M, createTextVNode as oe, nextTick as _e } from "vue";
import { u as $e, o as Me, e as le, c as Pe, t as Ne, O as Ae, X as Oe, s as C, w as Te, P as Le, i as ae, f as I, q as Ie, r as Fe } from "./index-BbPeL8Gp.js";
import { _ as Se } from "./Title-aSAft5dl.js";
import { u as Ve, U as je } from "./usePrinter-DaybDVqP.js";
import { L as Ue } from "./Legend-BLaZxMge.js";
import P from "./BaseIcon-CmiukQBl.js";
import { D as Be } from "./DataTable-DGf6RrOJ.js";
import De from "./vue-ui-skeleton-Bniq21d9.js";
import We from "./vue-ui-accordion-5d5iVpr7.js";
import { u as se } from "./useNestedProp-BN8claGG.js";
import { _ as ze } from "./PackageVersion-CxJghxYD.js";
import { P as Ge } from "./PenAndPaper-ZdZEumki.js";
import { u as Ee } from "./useUserOptionState-BIvW1Kz7.js";
import { _ as He } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const Re = ["id"], Xe = {
  key: 2,
  style: "width:100%;background:transparent"
}, Ke = ["xmlns", "viewBox"], qe = ["id"], Ye = ["stop-color"], Je = ["stop-color"], Qe = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Ze = ["d", "stroke", "stroke-width"], et = ["stroke"], tt = ["fill"], ot = ["stroke"], lt = ["fill"], at = ["stroke"], st = ["fill"], rt = ["stroke"], nt = ["fill"], ut = ["stroke"], it = ["fill"], dt = ["d", "stroke", "stroke-width", "fill"], ct = ["x1", "y1", "stroke"], vt = ["cx", "cy", "fill", "stroke"], yt = ["fill", "stroke"], ht = ["y", "fill", "font-weight"], ft = ["y", "fill"], pt = {
  key: 5,
  class: "vue-data-ui-watermark"
}, mt = ["onClick"], gt = { style: { "font-weight": "bold" } }, kt = {
  key: 8,
  ref: "source",
  dir: "auto"
}, bt = ["innerHTML"], Ct = {
  __name: "vue-ui-mood-radar",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Object,
      default() {
        return {};
      }
    }
  },
  setup(re, { expose: ne }) {
    const i = re, { vue_ui_mood_radar: ue } = $e(), w = c(() => !!i.dataset && Object.keys(i.dataset).length);
    Ce(() => {
      D();
    });
    function D() {
      Me(i.dataset) && le({
        componentName: "VueUiMoodRadar",
        type: "dataset"
      });
    }
    const _ = v(Pe()), F = v(null), ie = v(null), n = v(null), de = v(null), ce = v(0), ve = v(0), W = v(0), e = c({
      get: () => H(),
      set: (o) => o
    }), { userOptionsVisible: z, setUserOptionsVisibility: G, keepUserOptionState: E } = Ee({ config: e.value });
    function H() {
      const o = se({
        userConfig: i.config,
        defaultConfig: ue
      });
      return o.theme ? {
        ...se({
          userConfig: Ne.vue_ui_mood_radar[o.theme] || i.config,
          defaultConfig: o
        })
      } : o;
    }
    xe(() => i.config, (o) => {
      e.value = H(), D(), ce.value += 1, ve.value += 1, W.value += 1;
    }, { deep: !0 });
    const { isPrinting: R, isImaging: X, generatePdf: K, generateImage: q } = Ve({
      elementId: _.value,
      fileName: e.value.style.chart.title.text || "vue-ui-mood-radar"
    }), ye = c(() => e.value.userOptions.show && !e.value.style.chart.title.text), N = v({
      showTable: e.value.table.show
    }), k = c(() => ({
      height: 256,
      width: 256
    })), S = c(() => Ae({
      plot: { x: 128, y: k.value.height / 2 },
      radius: 90,
      sides: 5,
      rotation: 11
    }));
    function he({ centerX: o, centerY: l, apexX: t, apexY: d, proportion: g, key: $, value: be }) {
      return {
        x: o + (t - o) * g,
        y: l + (d - l) * g,
        key: $,
        value: be
      };
    }
    const fe = c(() => Math.max(...Object.values(i.dataset).map((o) => isNaN(o) ? 0 : o))), x = c(() => Object.values(i.dataset).reduce((o, l) => (isNaN(o) ? 0 : o) + (isNaN(l) ? 0 : l), 0)), m = c(() => Object.keys(i.dataset).map((o, l) => {
      const t = typeof i.dataset[o] != "number" || isNaN(i.dataset[o]) ? 0 : i.dataset[o];
      return {
        index: l,
        key: o,
        value: t,
        proportion: t / x.value,
        color: e.value.style.chart.layout.smileys.colors[o]
      };
    }).sort((o, l) => l.key - o.key)), Y = c(() => w.value ? (["1", "2", "3", "4", "5"].forEach((o) => {
      [null, void 0].includes(i.dataset[o]) && le({
        componentName: "VueUiMoodRadar",
        type: "datasetAttribute",
        property: o
      });
    }), S.value.coordinates.map((o, l) => {
      const t = he({
        centerX: k.value.width / 2,
        centerY: k.value.height / 2,
        apexX: o.x,
        apexY: o.y,
        proportion: m.value[l].value / fe.value,
        key: m.value[l].key,
        value: m.value[l].value
      });
      return {
        ...o,
        plots: t,
        key: m.value[l].key
      };
    })) : []), pe = c(() => ({
      cy: "mood-radar-legend",
      backgroundColor: e.value.style.chart.legend.backgroundColor,
      color: e.value.style.chart.legend.color,
      fontSize: e.value.style.chart.legend.fontSize,
      paddingBottom: 12,
      fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
    }));
    function me(o) {
      o === n.value ? n.value = null : n.value = o;
    }
    const b = c(() => {
      const o = m.value.map((t) => ({
        name: t.key,
        color: t.color
      })), l = m.value.map((t) => isNaN(t.value) ? 0 : t.value);
      return { head: o, body: l };
    });
    function J() {
      _e(() => {
        const o = b.value.head.map((d, g) => [[
          d.name
        ], [b.value.body[g]], [isNaN(b.value.body[g] / x.value) ? "-" : b.value.body[g] / x.value * 100]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(o), t = Ie(l);
        Fe({ csvContent: t, title: e.value.style.chart.title.text || "vue-ui-mood-radar" });
      });
    }
    const A = c(() => {
      const o = [
        ' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',
        Number(x.value.toFixed(e.value.table.td.roundingValue)).toLocaleString(),
        "100%"
      ], l = b.value.head.map((g, $) => [
        {
          color: g.color,
          name: g.name
        },
        b.value.body[$].toFixed(e.value.table.td.roundingValue),
        isNaN(b.value.body[$] / x.value) ? "-" : (b.value.body[$] / x.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
      ]), t = {
        th: {
          backgroundColor: e.value.table.th.backgroundColor,
          color: e.value.table.th.color,
          outline: e.value.table.th.outline
        },
        td: {
          backgroundColor: e.value.table.td.backgroundColor,
          color: e.value.table.td.color,
          outline: e.value.table.td.outline
        },
        breakpoint: e.value.table.responsiveBreakpoint
      }, d = [
        e.value.table.columnNames.series,
        e.value.table.columnNames.value,
        e.value.table.columnNames.percentage
      ];
      return {
        head: o,
        body: l,
        config: t,
        colNames: d
      };
    });
    function ge() {
      return m.value;
    }
    function Q() {
      N.value.showTable = !N.value.showTable;
    }
    const O = v(!1);
    function ke(o) {
      O.value = o;
    }
    const T = v(!1);
    function V() {
      T.value = !T.value;
    }
    return ne({
      getData: ge,
      generatePdf: K,
      generateCsv: J,
      generateImage: q,
      toggleTable: Q,
      toggleAnnotator: V
    }), (o, l) => (r(), y("div", {
      class: Z(`vue-ui-mood-radar ${O.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
      ref_key: "moodRadarChart",
      ref: F,
      id: `${_.value}`,
      style: L(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
      onMouseenter: l[11] || (l[11] = () => a(G)(!0)),
      onMouseleave: l[12] || (l[12] = () => a(G)(!1))
    }, [
      e.value.userOptions.buttons.annotator ? (r(), h(Ge, {
        key: 0,
        parent: F.value,
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        active: T.value,
        onClose: V
      }, null, 8, ["parent", "backgroundColor", "color", "active"])) : u("", !0),
      ye.value ? (r(), y("div", {
        key: 1,
        ref_key: "noTitle",
        ref: de,
        class: "vue-data-ui-no-title-space",
        style: "height:36px; width: 100%;background:transparent"
      }, null, 512)) : u("", !0),
      e.value.style.chart.title.text ? (r(), y("div", Xe, [
        j(Se, {
          config: {
            title: {
              cy: "mood-radar-title",
              ...e.value.style.chart.title
            },
            subtitle: {
              cy: "mood-radar-subtitle",
              ...e.value.style.chart.title.subtitle
            }
          }
        }, null, 8, ["config"])
      ])) : u("", !0),
      e.value.userOptions.show && w.value && (a(E) || a(z)) ? (r(), h(je, {
        key: 3,
        ref_key: "details",
        ref: ie,
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        isPrinting: a(R),
        isImaging: a(X),
        uid: _.value,
        hasPdf: e.value.userOptions.buttons.pdf,
        hasXls: e.value.userOptions.buttons.csv,
        hasImg: e.value.userOptions.buttons.img,
        hasTable: e.value.userOptions.buttons.table,
        hasFullscreen: e.value.userOptions.buttons.fullscreen,
        titles: { ...e.value.userOptions.buttonTitles },
        chartElement: F.value,
        position: e.value.userOptions.position,
        hasAnnotator: e.value.userOptions.buttons.annotator,
        isAnnotation: T.value,
        onToggleFullscreen: ke,
        onGeneratePdf: a(K),
        onGenerateCsv: J,
        onGenerateImage: a(q),
        onToggleTable: Q,
        onToggleAnnotator: V,
        style: L({
          visibility: a(E) ? a(z) ? "visible" : "hidden" : "visible"
        })
      }, we({ _: 2 }, [
        o.$slots.optionPdf ? {
          name: "optionPdf",
          fn: f(() => [
            p(o.$slots, "optionPdf", {}, void 0, !0)
          ]),
          key: "0"
        } : void 0,
        o.$slots.optionCsv ? {
          name: "optionCsv",
          fn: f(() => [
            p(o.$slots, "optionCsv", {}, void 0, !0)
          ]),
          key: "1"
        } : void 0,
        o.$slots.optionImg ? {
          name: "optionImg",
          fn: f(() => [
            p(o.$slots, "optionImg", {}, void 0, !0)
          ]),
          key: "2"
        } : void 0,
        o.$slots.optionTable ? {
          name: "optionTable",
          fn: f(() => [
            p(o.$slots, "optionTable", {}, void 0, !0)
          ]),
          key: "3"
        } : void 0,
        o.$slots.optionFullscreen ? {
          name: "optionFullscreen",
          fn: f(({ toggleFullscreen: t, isFullscreen: d }) => [
            p(o.$slots, "optionFullscreen", U(B({ toggleFullscreen: t, isFullscreen: d })), void 0, !0)
          ]),
          key: "4"
        } : void 0,
        o.$slots.optionAnnotator ? {
          name: "optionAnnotator",
          fn: f(({ toggleAnnotator: t, isAnnotator: d }) => [
            p(o.$slots, "optionAnnotator", U(B({ toggleAnnotator: t, isAnnotator: d })), void 0, !0)
          ]),
          key: "5"
        } : void 0
      ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : u("", !0),
      w.value ? (r(), y("svg", {
        key: 4,
        xmlns: a(Oe),
        viewBox: `0 0 ${k.value.width} ${k.value.height}`,
        class: Z({ "vue-data-ui-fullscreen--on": O.value, "vue-data-ui-fulscreen--off": !O.value }),
        style: L(`overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
      }, [
        j(ze),
        s("defs", null, [
          s("radialGradient", {
            cx: "50%",
            cy: "50%",
            r: "50%",
            fx: "50%",
            fy: "50%",
            id: `mood_radar_gradient_${_.value}`
          }, [
            s("stop", {
              offset: "0%",
              "stop-color": a(C)(e.value.style.chart.layout.dataPolygon.color, e.value.style.chart.layout.dataPolygon.opacity)
            }, null, 8, Ye),
            s("stop", {
              offset: "100%",
              "stop-color": a(C)(a(Te)(e.value.style.chart.layout.dataPolygon.color, e.value.style.chart.layout.dataPolygon.gradient.intensity / 100), e.value.style.chart.layout.dataPolygon.opacity)
            }, null, 8, Je)
          ], 8, qe)
        ]),
        (r(!0), y(ee, null, te(S.value.coordinates, (t) => (r(), y("line", {
          x1: k.value.width / 2,
          y1: k.value.height / 2,
          x2: t.x,
          y2: t.y,
          stroke: e.value.style.chart.layout.grid.stroke,
          "stroke-width": e.value.style.chart.layout.grid.strokeWidth
        }, null, 8, Qe))), 256)),
        s("path", {
          d: S.value.path,
          fill: "none",
          stroke: e.value.style.chart.layout.outerPolygon.stroke,
          "stroke-width": e.value.style.chart.layout.outerPolygon.strokeWidth,
          "stroke-linejoin": "round",
          "stroke-linecap": "round"
        }, null, 8, Ze),
        s("path", {
          fill: "none",
          stroke: e.value.style.chart.layout.smileys.colors[5],
          "stroke-width": "1",
          "stroke-linecap": "round",
          d: "M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22"
        }, null, 8, et),
        s("circle", {
          class: "vue-ui-mood-radar-trap",
          onMouseenter: l[0] || (l[0] = (t) => n.value = 5),
          onMouseleave: l[1] || (l[1] = (t) => n.value = null),
          cx: "128",
          cy: "25",
          r: "20",
          fill: n.value === 5 ? a(C)(e.value.style.chart.layout.smileys.colors[5], 20) : "transparent"
        }, null, 40, tt),
        s("path", {
          fill: "none",
          stroke: e.value.style.chart.layout.smileys.colors[4],
          "stroke-width": "1",
          "stroke-linecap": "round",
          d: "M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92"
        }, null, 8, ot),
        s("circle", {
          class: "vue-ui-mood-radar-trap",
          onMouseenter: l[2] || (l[2] = (t) => n.value = 4),
          onMouseleave: l[3] || (l[3] = (t) => n.value = null),
          cx: "227",
          cy: "95.5",
          r: "20",
          fill: n.value === 4 ? a(C)(e.value.style.chart.layout.smileys.colors[4], 20) : "transparent"
        }, null, 40, lt),
        s("path", {
          fill: "none",
          stroke: e.value.style.chart.layout.smileys.colors[3],
          "stroke-width": "1",
          "stroke-linecap": "round",
          d: "M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215"
        }, null, 8, at),
        s("circle", {
          class: "vue-ui-mood-radar-trap",
          onMouseenter: l[4] || (l[4] = (t) => n.value = 3),
          onMouseleave: l[5] || (l[5] = (t) => n.value = null),
          cx: "190",
          cy: "213.5",
          r: "20",
          fill: n.value === 3 ? a(C)(e.value.style.chart.layout.smileys.colors[3], 20) : "transparent"
        }, null, 40, st),
        s("path", {
          fill: "none",
          stroke: e.value.style.chart.layout.smileys.colors[2],
          "stroke-width": "1",
          "stroke-linecap": "round",
          d: "M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210"
        }, null, 8, rt),
        s("circle", {
          class: "vue-ui-mood-radar-trap",
          onMouseenter: l[6] || (l[6] = (t) => n.value = 2),
          onMouseleave: l[7] || (l[7] = (t) => n.value = null),
          cx: "65",
          cy: "213.5",
          r: "20",
          fill: n.value === 2 ? a(C)(e.value.style.chart.layout.smileys.colors[2], 20) : "transparent"
        }, null, 40, nt),
        s("path", {
          fill: "none",
          stroke: e.value.style.chart.layout.smileys.colors[1],
          "stroke-width": "1",
          "stroke-linecap": "round",
          d: "M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93"
        }, null, 8, ut),
        s("circle", {
          class: "vue-ui-mood-radar-trap",
          onMouseenter: l[8] || (l[8] = (t) => n.value = 1),
          onMouseleave: l[9] || (l[9] = (t) => n.value = null),
          cx: "29",
          cy: "95.5",
          r: "20",
          fill: n.value === 1 ? a(C)(e.value.style.chart.layout.smileys.colors[1], 20) : "transparent"
        }, null, 40, it),
        s("path", {
          d: a(Le)(Y.value.map((t) => t.plots)),
          stroke: e.value.style.chart.layout.dataPolygon.stroke,
          "stroke-width": e.value.style.chart.layout.dataPolygon.strokeWidth,
          "stroke-linecap": "round",
          "stroke-linejoin": "round",
          fill: e.value.style.chart.layout.dataPolygon.gradient.show ? `url(#mood_radar_gradient_${_.value})` : a(C)(e.value.style.chart.layout.dataPolygon.color, e.value.style.chart.layout.dataPolygon.opacity)
        }, null, 8, dt),
        (r(!0), y(ee, null, te(Y.value.map((t) => t.plots), (t, d) => (r(), y("g", {
          class: "vue-ui-mood-radar-trap",
          style: L(`opacity:${n.value == t.key ? "1" : "0"}`)
        }, [
          s("line", {
            x1: t.x,
            y1: t.y,
            x2: 128,
            y2: 128,
            stroke: e.value.style.chart.layout.smileys.colors[t.key]
          }, null, 8, ct),
          s("circle", {
            cx: t.x,
            cy: t.y,
            fill: e.value.style.chart.layout.smileys.colors[t.key],
            r: "3",
            stroke: e.value.style.chart.backgroundColor,
            "stroke-width": 0.5
          }, null, 8, vt),
          s("circle", {
            cx: 128,
            cy: 128,
            fill: e.value.style.chart.layout.smileys.colors[t.key],
            r: "3",
            stroke: e.value.style.chart.backgroundColor,
            "stroke-width": 0.5
          }, null, 8, yt),
          s("text", {
            x: 128,
            y: ["5", 5].includes(t.key) ? 145 : 120,
            fill: e.value.style.chart.layout.dataLabel.color,
            "font-size": "12",
            "text-anchor": "middle",
            "font-weight": e.value.style.chart.layout.dataLabel.bold ? "bold" : "normal"
          }, M(a(ae)(
            e.value.style.chart.layout.dataLabel.formatter,
            t.value,
            a(I)({
              p: e.value.style.chart.layout.dataLabel.prefix,
              v: t.value,
              s: e.value.style.chart.layout.dataLabel.suffix,
              r: e.value.style.chart.layout.dataLabel.roundingValue
            }),
            { datapoint: t, seriesIndex: d }
          )), 9, ht),
          s("text", {
            x: 128,
            y: ["5", 5].includes(t.key) ? 163 : 102,
            fill: e.value.style.chart.layout.dataLabel.color,
            "font-size": "12",
            "text-anchor": "middle"
          }, " (" + M(a(I)({
            v: t.value / x.value * 100,
            s: "%",
            r: e.value.style.chart.layout.dataLabel.roundingPercentage
          })) + ") ", 9, ft)
        ], 4))), 256)),
        p(o.$slots, "svg", { svg: k.value }, void 0, !0)
      ], 14, Ke)) : u("", !0),
      o.$slots.watermark ? (r(), y("div", pt, [
        p(o.$slots, "watermark", U(B({ isPrinting: a(R) || a(X) })), void 0, !0)
      ])) : u("", !0),
      w.value ? u("", !0) : (r(), h(De, {
        key: 6,
        config: {
          type: "radar",
          style: {
            backgroundColor: e.value.style.chart.backgroundColor,
            radar: {
              grid: {
                color: "#CCCCCC"
              },
              shapes: {
                color: "#CCCCCC"
              }
            }
          }
        }
      }, null, 8, ["config"])),
      e.value.style.chart.legend.show ? (r(), h(Ue, {
        legendSet: m.value,
        config: pe.value,
        key: `legend_${W.value}`,
        style: { display: "flex", "row-gap": "6px" }
      }, {
        item: f(({ legend: t, index: d }) => [
          s("div", {
            onClick: () => me(t.key),
            style: { display: "flex", "flex-direction": "row", gap: "3px", "align-items": "center", margin: "3px 0" }
          }, [
            t.key == 1 ? (r(), h(P, {
              key: 0,
              strokeWidth: 1,
              name: "moodSad",
              stroke: e.value.style.chart.layout.smileys.colors[t.key]
            }, null, 8, ["stroke"])) : u("", !0),
            t.key == 2 ? (r(), h(P, {
              key: 1,
              strokeWidth: 1,
              name: "moodFlat",
              stroke: e.value.style.chart.layout.smileys.colors[t.key]
            }, null, 8, ["stroke"])) : u("", !0),
            t.key == 3 ? (r(), h(P, {
              key: 2,
              strokeWidth: 1,
              name: "moodNeutral",
              stroke: e.value.style.chart.layout.smileys.colors[t.key]
            }, null, 8, ["stroke"])) : u("", !0),
            t.key == 4 ? (r(), h(P, {
              key: 3,
              strokeWidth: 1,
              name: "smiley",
              stroke: e.value.style.chart.layout.smileys.colors[t.key]
            }, null, 8, ["stroke"])) : u("", !0),
            t.key == 5 ? (r(), h(P, {
              key: 4,
              strokeWidth: 1,
              name: "moodHappy",
              stroke: e.value.style.chart.layout.smileys.colors[t.key]
            }, null, 8, ["stroke"])) : u("", !0),
            s("span", gt, M(a(ae)(
              e.value.style.chart.layout.dataLabel.formatter,
              t.value,
              a(I)({
                p: e.value.style.chart.layout.dataLabel.prefix,
                v: t.value,
                s: e.value.style.chart.layout.dataLabel.suffix,
                r: e.value.style.chart.layout.dataLabel.roundingValue
              }),
              { datapoint: t, seriesIndex: d }
            )), 1),
            oe(" (" + M(a(I)({
              v: t.proportion * 100,
              s: "%",
              r: e.value.style.chart.legend.roundingPercentage
            })) + ") ", 1)
          ], 8, mt)
        ]),
        _: 1
      }, 8, ["legendSet", "config"])) : u("", !0),
      p(o.$slots, "legend", { legend: m.value }, void 0, !0),
      o.$slots.source ? (r(), y("div", kt, [
        p(o.$slots, "source", {}, void 0, !0)
      ], 512)) : u("", !0),
      w.value ? (r(), h(We, {
        key: 9,
        hideDetails: "",
        config: {
          open: N.value.showTable,
          maxHeight: 1e4,
          body: {
            backgroundColor: e.value.style.chart.backgroundColor,
            color: e.value.style.chart.color
          },
          head: {
            backgroundColor: e.value.style.chart.backgroundColor,
            color: e.value.style.chart.color
          }
        }
      }, {
        content: f(() => [
          j(Be, {
            colNames: A.value.colNames,
            head: A.value.head,
            body: A.value.body,
            config: A.value.config,
            title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
            onClose: l[10] || (l[10] = (t) => N.value.showTable = !1)
          }, {
            th: f(({ th: t }) => [
              s("div", {
                innerHTML: t,
                style: { display: "flex", "align-items": "center" }
              }, null, 8, bt)
            ]),
            td: f(({ td: t }) => [
              oe(M(t.name || t), 1)
            ]),
            _: 1
          }, 8, ["colNames", "head", "body", "config", "title"])
        ]),
        _: 1
      }, 8, ["config"])) : u("", !0)
    ], 46, Re));
  }
}, Vt = /* @__PURE__ */ He(Ct, [["__scopeId", "data-v-9890430c"]]);
export {
  Vt as default
};
