import { computed as c, onMounted as Ce, ref as y, watch as we, openBlock as r, createElementBlock as h, normalizeClass as Z, unref as e, normalizeStyle as L, createBlock as p, createCommentVNode as i, createVNode as U, createSlots as xe, withCtx as m, renderSlot as f, normalizeProps as B, guardReactiveProps as D, 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-WrV3SAID.js";
import { _ as Se } from "./Title-BR-xoRp4.js";
import { u as Ve, U as je } from "./usePrinter-kVpf1iV8.js";
import { L as Ue } from "./Legend-7H4oi6Sq.js";
import P from "./BaseIcon-MqKW8Nkx.js";
import { D as Be } from "./DataTable-DNPvKWC0.js";
import De from "./vue-ui-skeleton-Qec_XSRf.js";
import We from "./vue-ui-accordion-BQCDXXDs.js";
import { u as se } from "./useNestedProp-Cj0kHD7k.js";
import { _ as ze } from "./PackageVersion-1NslmM8M.js";
import { P as Ee } from "./PenAndPaper-BF1ZRVm3.js";
import { u as Ge } 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 = ["width", "height"], Ye = ["id"], Je = ["stop-color"], Qe = ["stop-color"], Ze = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], et = ["d", "stroke", "stroke-width"], tt = ["stroke"], ot = ["fill"], lt = ["stroke"], at = ["fill"], st = ["stroke"], rt = ["fill"], nt = ["stroke"], it = ["fill"], ut = ["stroke"], dt = ["fill"], ct = ["d", "stroke", "stroke-width", "fill"], yt = ["x1", "y1", "stroke"], ht = ["cx", "cy", "fill", "stroke"], ft = ["fill", "stroke"], vt = ["y", "fill", "font-weight"], pt = ["y", "fill"], mt = {
  key: 5,
  class: "vue-data-ui-watermark"
}, gt = ["onClick"], kt = { style: { "font-weight": "bold" } }, bt = {
  key: 8,
  ref: "source",
  dir: "auto"
}, Ct = ["innerHTML"], wt = {
  __name: "vue-ui-mood-radar",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Object,
      default() {
        return {};
      }
    }
  },
  setup(re, { expose: ne }) {
    const { vue_ui_mood_radar: ie } = $e(), u = re, x = c(() => !!u.dataset && Object.keys(u.dataset).length);
    Ce(() => {
      W();
    });
    function W() {
      Me(u.dataset) && le({
        componentName: "VueUiMoodRadar",
        type: "dataset"
      });
    }
    const _ = y(Pe()), F = y(null), ue = y(null), n = y(null), de = y(null), ce = y(0), ye = y(0), z = y(0), t = c({
      get: () => H(),
      set: (l) => l
    }), { userOptionsVisible: S, setUserOptionsVisibility: E, keepUserOptionState: G } = Ge({ config: t.value });
    function H() {
      const l = se({
        userConfig: u.config,
        defaultConfig: ie
      });
      return l.theme ? {
        ...se({
          userConfig: Ne.vue_ui_mood_radar[l.theme] || u.config,
          defaultConfig: l
        })
      } : l;
    }
    we(() => u.config, (l) => {
      t.value = H(), S.value = !t.value.showOnChartHover, W(), ce.value += 1, ye.value += 1, z.value += 1;
    }, { deep: !0 });
    const { isPrinting: R, isImaging: X, generatePdf: K, generateImage: q } = Ve({
      elementId: _.value,
      fileName: t.value.style.chart.title.text || "vue-ui-mood-radar"
    }), he = c(() => t.value.userOptions.show && !t.value.style.chart.title.text), N = y({
      showTable: t.value.table.show
    }), v = c(() => ({
      height: 256,
      width: 256
    })), V = c(() => Ae({
      plot: { x: 128, y: v.value.height / 2 },
      radius: 90,
      sides: 5,
      rotation: 11
    }));
    function fe({ centerX: l, centerY: a, apexX: o, apexY: d, proportion: k, key: $, value: be }) {
      return {
        x: l + (o - l) * k,
        y: a + (d - a) * k,
        key: $,
        value: be
      };
    }
    const ve = c(() => Math.max(...Object.values(u.dataset).map((l) => isNaN(l) ? 0 : l))), w = c(() => Object.values(u.dataset).reduce((l, a) => (isNaN(l) ? 0 : l) + (isNaN(a) ? 0 : a), 0)), g = c(() => Object.keys(u.dataset).map((l, a) => {
      const o = typeof u.dataset[l] != "number" || isNaN(u.dataset[l]) ? 0 : u.dataset[l];
      return {
        index: a,
        key: l,
        value: o,
        proportion: o / w.value,
        color: t.value.style.chart.layout.smileys.colors[l]
      };
    }).sort((l, a) => a.key - l.key)), Y = c(() => x.value ? (["1", "2", "3", "4", "5"].forEach((l) => {
      [null, void 0].includes(u.dataset[l]) && le({
        componentName: "VueUiMoodRadar",
        type: "datasetAttribute",
        property: l
      });
    }), V.value.coordinates.map((l, a) => {
      const o = fe({
        centerX: v.value.width / 2,
        centerY: v.value.height / 2,
        apexX: l.x,
        apexY: l.y,
        proportion: g.value[a].value / ve.value,
        key: g.value[a].key,
        value: g.value[a].value
      });
      return {
        ...l,
        plots: o,
        key: g.value[a].key
      };
    })) : []), pe = c(() => ({
      cy: "mood-radar-legend",
      backgroundColor: t.value.style.chart.legend.backgroundColor,
      color: t.value.style.chart.legend.color,
      fontSize: t.value.style.chart.legend.fontSize,
      paddingBottom: 12,
      fontWeight: t.value.style.chart.legend.bold ? "bold" : ""
    }));
    function me(l) {
      l === n.value ? n.value = null : n.value = l;
    }
    const b = c(() => {
      const l = g.value.map((o) => ({
        name: o.key,
        color: o.color
      })), a = g.value.map((o) => isNaN(o.value) ? 0 : o.value);
      return { head: l, body: a };
    });
    function J() {
      _e(() => {
        const l = b.value.head.map((d, k) => [[
          d.name
        ], [b.value.body[k]], [isNaN(b.value.body[k] / w.value) ? "-" : b.value.body[k] / w.value * 100]]), a = [[t.value.style.chart.title.text], [t.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(l), o = Ie(a);
        Fe({ csvContent: o, title: t.value.style.chart.title.text || "vue-ui-mood-radar" });
      });
    }
    const A = c(() => {
      const l = [
        ' <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(w.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),
        "100%"
      ], a = b.value.head.map((k, $) => [
        {
          color: k.color,
          name: k.name
        },
        b.value.body[$].toFixed(t.value.table.td.roundingValue),
        isNaN(b.value.body[$] / w.value) ? "-" : (b.value.body[$] / w.value * 100).toFixed(t.value.table.td.roundingPercentage) + "%"
      ]), o = {
        th: {
          backgroundColor: t.value.table.th.backgroundColor,
          color: t.value.table.th.color,
          outline: t.value.table.th.outline
        },
        td: {
          backgroundColor: t.value.table.td.backgroundColor,
          color: t.value.table.td.color,
          outline: t.value.table.td.outline
        },
        breakpoint: t.value.table.responsiveBreakpoint
      }, d = [
        t.value.table.columnNames.series,
        t.value.table.columnNames.value,
        t.value.table.columnNames.percentage
      ];
      return {
        head: l,
        body: a,
        config: o,
        colNames: d
      };
    });
    function ge() {
      return g.value;
    }
    function Q() {
      N.value.showTable = !N.value.showTable;
    }
    const O = y(!1);
    function ke(l) {
      O.value = l;
    }
    const T = y(!1);
    function j() {
      T.value = !T.value;
    }
    return ne({
      getData: ge,
      generatePdf: K,
      generateCsv: J,
      generateImage: q,
      toggleTable: Q,
      toggleAnnotator: j
    }), (l, a) => (r(), h("div", {
      class: Z(`vue-ui-mood-radar ${e(O) ? "vue-data-ui-wrapper-fullscreen" : ""} ${e(t).useCssAnimation ? "" : "vue-ui-dna"}`),
      ref_key: "moodRadarChart",
      ref: F,
      id: `${e(_)}`,
      style: L(`font-family:${e(t).style.fontFamily};width:100%; text-align:center;background:${e(t).style.chart.backgroundColor}`),
      onMouseenter: a[11] || (a[11] = () => e(E)(!0)),
      onMouseleave: a[12] || (a[12] = () => e(E)(!1))
    }, [
      e(t).userOptions.buttons.annotator ? (r(), p(Ee, {
        key: 0,
        parent: e(F),
        backgroundColor: e(t).style.chart.backgroundColor,
        color: e(t).style.chart.color,
        active: e(T),
        onClose: j
      }, null, 8, ["parent", "backgroundColor", "color", "active"])) : i("", !0),
      e(he) ? (r(), h("div", {
        key: 1,
        ref_key: "noTitle",
        ref: de,
        class: "vue-data-ui-no-title-space",
        style: "height:36px; width: 100%;background:transparent"
      }, null, 512)) : i("", !0),
      e(t).style.chart.title.text ? (r(), h("div", Xe, [
        U(Se, {
          config: {
            title: {
              cy: "mood-radar-title",
              ...e(t).style.chart.title
            },
            subtitle: {
              cy: "mood-radar-subtitle",
              ...e(t).style.chart.title.subtitle
            }
          }
        }, null, 8, ["config"])
      ])) : i("", !0),
      e(t).userOptions.show && e(x) && (e(G) || e(S)) ? (r(), p(je, {
        key: 3,
        ref_key: "details",
        ref: ue,
        backgroundColor: e(t).style.chart.backgroundColor,
        color: e(t).style.chart.color,
        isPrinting: e(R),
        isImaging: e(X),
        uid: e(_),
        hasPdf: e(t).userOptions.buttons.pdf,
        hasXls: e(t).userOptions.buttons.csv,
        hasImg: e(t).userOptions.buttons.img,
        hasTable: e(t).userOptions.buttons.table,
        hasFullscreen: e(t).userOptions.buttons.fullscreen,
        titles: { ...e(t).userOptions.buttonTitles },
        chartElement: e(F),
        position: e(t).userOptions.position,
        hasAnnotator: e(t).userOptions.buttons.annotator,
        isAnnotation: e(T),
        onToggleFullscreen: ke,
        onGeneratePdf: e(K),
        onGenerateCsv: J,
        onGenerateImage: e(q),
        onToggleTable: Q,
        onToggleAnnotator: j,
        style: L({
          visibility: e(G) ? e(S) ? "visible" : "hidden" : "visible"
        })
      }, xe({ _: 2 }, [
        l.$slots.optionPdf ? {
          name: "optionPdf",
          fn: m(() => [
            f(l.$slots, "optionPdf", {}, void 0, !0)
          ]),
          key: "0"
        } : void 0,
        l.$slots.optionCsv ? {
          name: "optionCsv",
          fn: m(() => [
            f(l.$slots, "optionCsv", {}, void 0, !0)
          ]),
          key: "1"
        } : void 0,
        l.$slots.optionImg ? {
          name: "optionImg",
          fn: m(() => [
            f(l.$slots, "optionImg", {}, void 0, !0)
          ]),
          key: "2"
        } : void 0,
        l.$slots.optionTable ? {
          name: "optionTable",
          fn: m(() => [
            f(l.$slots, "optionTable", {}, void 0, !0)
          ]),
          key: "3"
        } : void 0,
        l.$slots.optionFullscreen ? {
          name: "optionFullscreen",
          fn: m(({ toggleFullscreen: o, isFullscreen: d }) => [
            f(l.$slots, "optionFullscreen", B(D({ toggleFullscreen: o, isFullscreen: d })), void 0, !0)
          ]),
          key: "4"
        } : void 0,
        l.$slots.optionAnnotator ? {
          name: "optionAnnotator",
          fn: m(({ toggleAnnotator: o, isAnnotator: d }) => [
            f(l.$slots, "optionAnnotator", B(D({ toggleAnnotator: o, 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"])) : i("", !0),
      e(x) ? (r(), h("svg", {
        key: 4,
        xmlns: e(Oe),
        viewBox: `0 0 ${e(v).width} ${e(v).height}`,
        class: Z({ "vue-data-ui-fullscreen--on": e(O), "vue-data-ui-fulscreen--off": !e(O) }),
        style: L(`overflow:visible;background:transparent;color:${e(t).style.chart.color}`)
      }, [
        U(ze),
        l.$slots["chart-background"] ? (r(), h("foreignObject", {
          key: 0,
          x: 0,
          y: 0,
          width: e(v).width,
          height: e(v).height,
          style: {
            pointerEvents: "none"
          }
        }, [
          f(l.$slots, "chart-background", {}, void 0, !0)
        ], 8, qe)) : i("", !0),
        s("defs", null, [
          s("radialGradient", {
            cx: "50%",
            cy: "50%",
            r: "50%",
            fx: "50%",
            fy: "50%",
            id: `mood_radar_gradient_${e(_)}`
          }, [
            s("stop", {
              offset: "0%",
              "stop-color": e(C)(e(t).style.chart.layout.dataPolygon.color, e(t).style.chart.layout.dataPolygon.opacity)
            }, null, 8, Je),
            s("stop", {
              offset: "100%",
              "stop-color": e(C)(e(Te)(e(t).style.chart.layout.dataPolygon.color, e(t).style.chart.layout.dataPolygon.gradient.intensity / 100), e(t).style.chart.layout.dataPolygon.opacity)
            }, null, 8, Qe)
          ], 8, Ye)
        ]),
        (r(!0), h(ee, null, te(e(V).coordinates, (o) => (r(), h("line", {
          x1: e(v).width / 2,
          y1: e(v).height / 2,
          x2: o.x,
          y2: o.y,
          stroke: e(t).style.chart.layout.grid.stroke,
          "stroke-width": e(t).style.chart.layout.grid.strokeWidth
        }, null, 8, Ze))), 256)),
        s("path", {
          d: e(V).path,
          fill: "none",
          stroke: e(t).style.chart.layout.outerPolygon.stroke,
          "stroke-width": e(t).style.chart.layout.outerPolygon.strokeWidth,
          "stroke-linejoin": "round",
          "stroke-linecap": "round"
        }, null, 8, et),
        s("path", {
          fill: "none",
          stroke: e(t).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, tt),
        s("circle", {
          class: "vue-ui-mood-radar-trap",
          onMouseenter: a[0] || (a[0] = (o) => n.value = 5),
          onMouseleave: a[1] || (a[1] = (o) => n.value = null),
          cx: "128",
          cy: "25",
          r: "20",
          fill: e(n) === 5 ? e(C)(e(t).style.chart.layout.smileys.colors[5], 20) : "transparent"
        }, null, 40, ot),
        s("path", {
          fill: "none",
          stroke: e(t).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, lt),
        s("circle", {
          class: "vue-ui-mood-radar-trap",
          onMouseenter: a[2] || (a[2] = (o) => n.value = 4),
          onMouseleave: a[3] || (a[3] = (o) => n.value = null),
          cx: "227",
          cy: "95.5",
          r: "20",
          fill: e(n) === 4 ? e(C)(e(t).style.chart.layout.smileys.colors[4], 20) : "transparent"
        }, null, 40, at),
        s("path", {
          fill: "none",
          stroke: e(t).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, st),
        s("circle", {
          class: "vue-ui-mood-radar-trap",
          onMouseenter: a[4] || (a[4] = (o) => n.value = 3),
          onMouseleave: a[5] || (a[5] = (o) => n.value = null),
          cx: "190",
          cy: "213.5",
          r: "20",
          fill: e(n) === 3 ? e(C)(e(t).style.chart.layout.smileys.colors[3], 20) : "transparent"
        }, null, 40, rt),
        s("path", {
          fill: "none",
          stroke: e(t).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, nt),
        s("circle", {
          class: "vue-ui-mood-radar-trap",
          onMouseenter: a[6] || (a[6] = (o) => n.value = 2),
          onMouseleave: a[7] || (a[7] = (o) => n.value = null),
          cx: "65",
          cy: "213.5",
          r: "20",
          fill: e(n) === 2 ? e(C)(e(t).style.chart.layout.smileys.colors[2], 20) : "transparent"
        }, null, 40, it),
        s("path", {
          fill: "none",
          stroke: e(t).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: a[8] || (a[8] = (o) => n.value = 1),
          onMouseleave: a[9] || (a[9] = (o) => n.value = null),
          cx: "29",
          cy: "95.5",
          r: "20",
          fill: e(n) === 1 ? e(C)(e(t).style.chart.layout.smileys.colors[1], 20) : "transparent"
        }, null, 40, dt),
        s("path", {
          d: e(Le)(e(Y).map((o) => o.plots)),
          stroke: e(t).style.chart.layout.dataPolygon.stroke,
          "stroke-width": e(t).style.chart.layout.dataPolygon.strokeWidth,
          "stroke-linecap": "round",
          "stroke-linejoin": "round",
          fill: e(t).style.chart.layout.dataPolygon.gradient.show ? `url(#mood_radar_gradient_${e(_)})` : e(C)(e(t).style.chart.layout.dataPolygon.color, e(t).style.chart.layout.dataPolygon.opacity)
        }, null, 8, ct),
        (r(!0), h(ee, null, te(e(Y).map((o) => o.plots), (o, d) => (r(), h("g", {
          class: "vue-ui-mood-radar-trap",
          style: L(`opacity:${e(n) == o.key ? "1" : "0"}`)
        }, [
          s("line", {
            x1: o.x,
            y1: o.y,
            x2: 128,
            y2: 128,
            stroke: e(t).style.chart.layout.smileys.colors[o.key]
          }, null, 8, yt),
          s("circle", {
            cx: o.x,
            cy: o.y,
            fill: e(t).style.chart.layout.smileys.colors[o.key],
            r: "3",
            stroke: e(t).style.chart.backgroundColor,
            "stroke-width": 0.5
          }, null, 8, ht),
          s("circle", {
            cx: 128,
            cy: 128,
            fill: e(t).style.chart.layout.smileys.colors[o.key],
            r: "3",
            stroke: e(t).style.chart.backgroundColor,
            "stroke-width": 0.5
          }, null, 8, ft),
          s("text", {
            x: 128,
            y: ["5", 5].includes(o.key) ? 145 : 120,
            fill: e(t).style.chart.layout.dataLabel.color,
            "font-size": "12",
            "text-anchor": "middle",
            "font-weight": e(t).style.chart.layout.dataLabel.bold ? "bold" : "normal"
          }, M(e(ae)(
            e(t).style.chart.layout.dataLabel.formatter,
            o.value,
            e(I)({
              p: e(t).style.chart.layout.dataLabel.prefix,
              v: o.value,
              s: e(t).style.chart.layout.dataLabel.suffix,
              r: e(t).style.chart.layout.dataLabel.roundingValue
            }),
            { datapoint: o, seriesIndex: d }
          )), 9, vt),
          s("text", {
            x: 128,
            y: ["5", 5].includes(o.key) ? 163 : 102,
            fill: e(t).style.chart.layout.dataLabel.color,
            "font-size": "12",
            "text-anchor": "middle"
          }, " (" + M(e(I)({
            v: o.value / e(w) * 100,
            s: "%",
            r: e(t).style.chart.layout.dataLabel.roundingPercentage
          })) + ") ", 9, pt)
        ], 4))), 256)),
        f(l.$slots, "svg", { svg: e(v) }, void 0, !0)
      ], 14, Ke)) : i("", !0),
      l.$slots.watermark ? (r(), h("div", mt, [
        f(l.$slots, "watermark", B(D({ isPrinting: e(R) || e(X) })), void 0, !0)
      ])) : i("", !0),
      e(x) ? i("", !0) : (r(), p(De, {
        key: 6,
        config: {
          type: "radar",
          style: {
            backgroundColor: e(t).style.chart.backgroundColor,
            radar: {
              grid: {
                color: "#CCCCCC"
              },
              shapes: {
                color: "#CCCCCC"
              }
            }
          }
        }
      }, null, 8, ["config"])),
      e(t).style.chart.legend.show ? (r(), p(Ue, {
        legendSet: e(g),
        config: e(pe),
        key: `legend_${e(z)}`,
        style: { display: "flex", "row-gap": "6px" }
      }, {
        item: m(({ legend: o, index: d }) => [
          s("div", {
            onClick: () => me(o.key),
            style: { display: "flex", "flex-direction": "row", gap: "3px", "align-items": "center", margin: "3px 0" }
          }, [
            o.key == 1 ? (r(), p(P, {
              key: 0,
              strokeWidth: 1,
              name: "moodSad",
              stroke: e(t).style.chart.layout.smileys.colors[o.key]
            }, null, 8, ["stroke"])) : i("", !0),
            o.key == 2 ? (r(), p(P, {
              key: 1,
              strokeWidth: 1,
              name: "moodFlat",
              stroke: e(t).style.chart.layout.smileys.colors[o.key]
            }, null, 8, ["stroke"])) : i("", !0),
            o.key == 3 ? (r(), p(P, {
              key: 2,
              strokeWidth: 1,
              name: "moodNeutral",
              stroke: e(t).style.chart.layout.smileys.colors[o.key]
            }, null, 8, ["stroke"])) : i("", !0),
            o.key == 4 ? (r(), p(P, {
              key: 3,
              strokeWidth: 1,
              name: "smiley",
              stroke: e(t).style.chart.layout.smileys.colors[o.key]
            }, null, 8, ["stroke"])) : i("", !0),
            o.key == 5 ? (r(), p(P, {
              key: 4,
              strokeWidth: 1,
              name: "moodHappy",
              stroke: e(t).style.chart.layout.smileys.colors[o.key]
            }, null, 8, ["stroke"])) : i("", !0),
            s("span", kt, M(e(ae)(
              e(t).style.chart.layout.dataLabel.formatter,
              o.value,
              e(I)({
                p: e(t).style.chart.layout.dataLabel.prefix,
                v: o.value,
                s: e(t).style.chart.layout.dataLabel.suffix,
                r: e(t).style.chart.layout.dataLabel.roundingValue
              }),
              { datapoint: o, seriesIndex: d }
            )), 1),
            oe(" (" + M(e(I)({
              v: o.proportion * 100,
              s: "%",
              r: e(t).style.chart.legend.roundingPercentage
            })) + ") ", 1)
          ], 8, gt)
        ]),
        _: 1
      }, 8, ["legendSet", "config"])) : i("", !0),
      f(l.$slots, "legend", { legend: e(g) }, void 0, !0),
      l.$slots.source ? (r(), h("div", bt, [
        f(l.$slots, "source", {}, void 0, !0)
      ], 512)) : i("", !0),
      e(x) ? (r(), p(We, {
        key: 9,
        hideDetails: "",
        config: {
          open: e(N).showTable,
          maxHeight: 1e4,
          body: {
            backgroundColor: e(t).style.chart.backgroundColor,
            color: e(t).style.chart.color
          },
          head: {
            backgroundColor: e(t).style.chart.backgroundColor,
            color: e(t).style.chart.color
          }
        }
      }, {
        content: m(() => [
          U(Be, {
            colNames: e(A).colNames,
            head: e(A).head,
            body: e(A).body,
            config: e(A).config,
            title: `${e(t).style.chart.title.text}${e(t).style.chart.title.subtitle.text ? ` : ${e(t).style.chart.title.subtitle.text}` : ""}`,
            onClose: a[10] || (a[10] = (o) => e(N).showTable = !1)
          }, {
            th: m(({ th: o }) => [
              s("div", {
                innerHTML: o,
                style: { display: "flex", "align-items": "center" }
              }, null, 8, Ct)
            ]),
            td: m(({ td: o }) => [
              oe(M(o.name || o), 1)
            ]),
            _: 1
          }, 8, ["colNames", "head", "body", "config", "title"])
        ]),
        _: 1
      }, 8, ["config"])) : i("", !0)
    ], 46, Re));
  }
}, jt = /* @__PURE__ */ He(wt, [["__scopeId", "data-v-6ecc504b"]]);
export {
  jt as default
};
