import { ref as n, computed as v, watch as Re, onMounted as Ve, onBeforeUnmount as Be, openBlock as r, createElementBlock as f, normalizeClass as W, normalizeStyle as O, createBlock as _, createCommentVNode as k, unref as i, createSlots as De, withCtx as p, renderSlot as h, normalizeProps as I, guardReactiveProps as M, createVNode as fe, createElementVNode as C, Fragment as ye, renderList as me, createTextVNode as be, toDisplayString as E, nextTick as Ue } from "vue";
import { u as We, c as ke, t as Ee, a as Ge, p as x, o as He, e as Y, g as Xe, b as je, J as Ye, d as Ce, f as N, X as qe, s as Je, w as Ke, v as q, i as we, x as Qe, y as Ze, q as et, r as tt } from "./index-Cm2_6s9o.js";
import { t as lt, u as ot } from "./useResponsive-CoxXLe23.js";
import { _ as at } from "./Title-Coit3NcT.js";
import { u as st, U as nt } from "./usePrinter-Cx8U1e30.js";
import { _ as rt } from "./Tooltip-BBgfUr4a.js";
import { D as ut } from "./DataTable-NGi-FgLM.js";
import { L as it } from "./Legend-DRozxv9L.js";
import vt from "./vue-ui-skeleton-BUS6A44x.js";
import ct from "./vue-ui-accordion-CxrNF8BI.js";
import { u as $e } from "./useNestedProp-BYPZJNhi.js";
import { _ as dt } from "./PackageVersion-CTMY4zeY.js";
import { P as pt } from "./PenAndPaper-DJ_d10S-.js";
import { _ as ht } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const gt = ["id"], ft = ["xmlns", "viewBox"], yt = ["id"], mt = ["stop-color"], bt = ["stop-color"], kt = ["stroke", "cx", "cy", "r", "fill"], Ct = ["stroke", "stroke-width", "cx", "cy", "r", "fill"], wt = ["cx", "cy", "r", "onMouseenter"], $t = {
  key: 5,
  class: "vue-data-ui-watermark"
}, Tt = ["onClick"], _t = { key: 0 }, xt = { key: 1 }, Nt = ["innerHTML"], Pt = {
  __name: "vue-ui-rings",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  emits: ["selectLegend"],
  setup(Te, { expose: _e, emit: xe }) {
    const y = Te, { vue_ui_rings: Ne } = We(), S = n(!1), z = v(() => !!y.dataset && y.dataset.length), A = n(ke()), Pe = n(null), R = n(!1), G = n(""), T = n(null), J = n(0), P = n(null), K = n(null), Q = n(null), Z = n(null), ee = n(null), te = n(0), le = n(0), oe = n(0), e = v({
      get: () => ae(),
      set: (t) => t
    });
    function ae() {
      const t = $e({
        userConfig: y.config,
        defaultConfig: Ne
      });
      return t.theme ? {
        ...$e({
          userConfig: Ee.vue_ui_rings[t.theme] || y.config,
          defaultConfig: t
        }),
        customPalette: Ge[t.theme] || x
      } : t;
    }
    Re(() => y.config, (t) => {
      e.value = ae(), se(), te.value += 1, le.value += 1, oe.value += 1;
    }, { deep: !0 });
    const V = n(null);
    Ve(() => {
      se();
    });
    function se() {
      if (He(y.dataset) ? Y({
        componentName: "VueUiRings",
        type: "dataset"
      }) : y.dataset.forEach((t, o) => {
        t.values.length || Y({
          componentName: "VueUiRings",
          type: "dataset"
        }), Xe({
          datasetObject: t,
          requiredAttributes: ["name", "values"]
        }).forEach((l) => {
          Y({
            componentName: "VueUiRings",
            type: "datasetSerieAttribute",
            property: l,
            index: o
          });
        });
      }), e.value.responsive) {
        const t = lt(() => {
          const { width: o, height: l } = ot({
            chart: P.value,
            title: e.value.style.chart.title.text ? K.value : null,
            legend: e.value.style.chart.legend.show ? Q.value : null,
            source: Z.value,
            noTitle: ee.value
          });
          u.value.width = o, u.value.height = l;
        });
        V.value = new ResizeObserver(t), V.value.observe(P.value.parentNode);
      }
      setTimeout(() => {
        S.value = !0;
      }, 600);
    }
    Be(() => {
      V.value && V.value.disconnect();
    });
    const { isPrinting: ne, isImaging: re, generatePdf: ue, generateImage: ie } = st({
      elementId: `rings_${A.value}`,
      fileName: e.value.style.chart.title.text || "vue-ui-rings"
    }), Le = v(() => e.value.userOptions.show && !e.value.style.chart.title.text), ve = v(() => je(e.value.customPalette)), w = n({
      showTable: e.value.table.show,
      showTooltip: e.value.style.chart.tooltip.show
    }), u = n({
      height: 360,
      width: 360
    }), Se = v(() => Math.min(u.value.height, u.value.width)), c = n([]);
    function H(t) {
      c.value.includes(t) ? c.value = c.value.filter((o) => o !== t) : c.value.push(t), xe("selectLegend", d.value.map((o) => ({
        name: o.name,
        color: o.color,
        value: o.value
      })));
    }
    const Ae = v(() => Math.max(
      ...B.value.filter((t) => !c.value.includes(t.uid)).map(({ value: t }) => t)
    ));
    function ce(t) {
      return t / Ae.value;
    }
    const B = v(() => y.dataset.map(({ values: t, name: o, color: l = null }, a) => {
      const s = Ye(t).reduce((b, F) => b + F, 0);
      return {
        name: o,
        color: l || Ce(l) || ve.value[a] || x[a] || x[a % x.length],
        value: s,
        proportion: s / y.dataset.map((b) => (b.values || []).reduce((F, ze) => F + ze, 0)).reduce((b, F) => b + F, 0),
        uid: ke()
      };
    })), de = v(() => B.value.map((t) => ({
      ...t,
      shape: "circle",
      opacity: c.value.includes(t.uid) ? 0.5 : 1,
      segregate: () => H(t.uid),
      isSegregated: c.value.includes(t.uid)
    })).toSorted((t, o) => o.value - t.value)), Fe = v(() => ({
      cy: "rings-div-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" : ""
    })), m = v(() => B.value.filter((t) => !c.value.includes(t.uid)).map(({ value: t }) => t).reduce((t, o) => t + o, 0)), d = v(() => B.value.filter((t) => !c.value.includes(t.uid)).map(({ name: t, value: o, color: l = null, uid: a }, s) => ({
      uid: a,
      name: t,
      color: l || Ce(l) || ve.value[s] || x[s] || x[s % x.length],
      value: o,
      proportion: ce(o),
      percentage: o / m.value * 100,
      strokeWidth: e.value.style.chart.layout.rings.strokeWidth * ce(o)
    })).toSorted((t, o) => o.value - t.value));
    function Oe() {
      return d.value.map(
        ({ name: t, color: o, value: l, absoluteValues: a, percentage: s }) => ({
          name: t,
          color: o,
          value: l,
          absoluteValues: a,
          percentage: s
        })
      );
    }
    const g = v(() => Se.value - e.value.style.chart.layout.rings.strokeWidth * 2), X = n(null);
    function Ie(t, o) {
      if (c.value.length === y.dataset.length) return;
      X.value = {
        datapoint: o,
        seriesIndex: t,
        series: d.value,
        config: e.value
      }, T.value = t;
      const l = d.value[t], a = e.value.style.chart.tooltip.customFormat;
      if (Qe(a) && Ze(() => a({
        seriesIndex: t,
        datapoint: o,
        series: d.value,
        config: e.value
      })))
        G.value = a({
          seriesIndex: t,
          datapoint: o,
          series: d.value,
          config: e.value
        });
      else {
        let s = "";
        s += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`, s += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}" /></svg>`, e.value.style.chart.tooltip.showValue && (s += `<b>${we(
          e.value.style.chart.layout.labels.dataLabels.formatter,
          l.value,
          N({
            p: e.value.style.chart.layout.labels.dataLabels.prefix,
            v: l.value,
            s: e.value.style.chart.layout.labels.dataLabels.suffix,
            r: e.value.style.chart.tooltip.roundingValue
          }),
          { datapoint: o, seriesIndex: t }
        )}
      </b>`), e.value.style.chart.tooltip.showPercentage && (e.value.style.chart.tooltip.showValue ? s += `<span>(${N({
          v: l.value / m.value * 100,
          s: "%",
          r: e.value.style.chart.tooltip.roundingPercentage
        })})</span></div>` : s += `<b>${N({
          v: l.value / m.value * 100,
          s: "%",
          r: e.value.style.chart.tooltip.roundingPercentage
        })}</b></div>`), G.value = s;
      }
      R.value = !0;
    }
    const $ = v(() => {
      const t = d.value.map((l) => ({
        name: l.name,
        color: l.color
      })), o = d.value.map((l) => l.value);
      return { head: t, body: o };
    }), D = v(() => {
      const t = [
        ' <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>',
        N({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: m.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
        "100%"
      ], o = $.value.head.map((s, b) => [
        {
          color: s.color,
          name: s.name
        },
        N({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: $.value.body[b], s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
        isNaN($.value.body[b] / m.value) ? "-" : ($.value.body[b] / m.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
      ]), l = {
        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
      }, a = [
        e.value.table.columnNames.series,
        e.value.table.columnNames.value,
        e.value.table.columnNames.percentage
      ];
      return {
        head: t,
        body: o,
        config: l,
        colNames: a
      };
    });
    function pe() {
      Ue(() => {
        const t = $.value.head.map((a, s) => [[
          a.name
        ], [$.value.body[s]], [isNaN($.value.body[s] / m.value) ? "-" : $.value.body[s] / m.value * 100]]), o = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(t), l = et(o);
        tt({ csvContent: l, title: e.value.style.chart.title.text || "vue-ui-rings" });
      });
    }
    const L = n(!1);
    function Me(t) {
      L.value = t, J.value += 1;
    }
    function he() {
      w.value.showTable = !w.value.showTable;
    }
    function ge() {
      w.value.showTooltip = !w.value.showTooltip;
    }
    const U = n(!1);
    function j() {
      U.value = !U.value;
    }
    return _e({
      getData: Oe,
      generatePdf: ue,
      generateCsv: pe,
      generateImage: ie,
      toggleTable: he,
      toggleTooltip: ge,
      toggleAnnotator: j
    }), (t, o) => (r(), f("div", {
      ref_key: "ringsChart",
      ref: P,
      class: W(`vue-ui-rings ${L.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
      style: O(`font-family:${e.value.style.fontFamily};text-align:center;width:100%;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`),
      id: `rings_${A.value}`,
      onMouseleave: o[3] || (o[3] = (l) => {
        T.value = null, R.value = !1;
      })
    }, [
      e.value.userOptions.buttons.annotator ? (r(), _(pt, {
        key: 0,
        parent: P.value,
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        active: U.value,
        onClose: j
      }, null, 8, ["parent", "backgroundColor", "color", "active"])) : k("", !0),
      Le.value ? (r(), f("div", {
        key: 1,
        ref_key: "noTitle",
        ref: ee,
        class: "vue-data-ui-no-title-space",
        style: "height:36px; width: 100%;background:transparent"
      }, null, 512)) : k("", !0),
      e.value.style.chart.title.text ? (r(), f("div", {
        key: 2,
        ref_key: "chartTitle",
        ref: K,
        style: "width:100%;background:transparent"
      }, [
        (r(), _(at, {
          key: `title_${te.value}`,
          config: {
            title: {
              cy: "rings-div-title",
              ...e.value.style.chart.title
            },
            subtitle: {
              cy: "rings-div-subtitle",
              ...e.value.style.chart.title.subtitle
            }
          }
        }, null, 8, ["config"]))
      ], 512)) : k("", !0),
      e.value.userOptions.show && z.value ? (r(), _(nt, {
        ref_key: "details",
        ref: Pe,
        key: `user_options_${J.value}`,
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        isPrinting: i(ne),
        isImaging: i(re),
        uid: A.value,
        hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
        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,
        isTooltip: w.value.showTooltip,
        isFullscreen: L.value,
        titles: { ...e.value.userOptions.buttonTitles },
        chartElement: P.value,
        position: e.value.userOptions.position,
        hasAnnotator: e.value.userOptions.buttons.annotator,
        isAnnotation: U.value,
        onToggleFullscreen: Me,
        onGeneratePdf: i(ue),
        onGenerateCsv: pe,
        onGenerateImage: i(ie),
        onToggleTable: he,
        onToggleTooltip: ge,
        onToggleAnnotator: j
      }, De({ _: 2 }, [
        t.$slots.optionTooltip ? {
          name: "optionTooltip",
          fn: p(() => [
            h(t.$slots, "optionTooltip", {}, void 0, !0)
          ]),
          key: "0"
        } : void 0,
        t.$slots.optionPdf ? {
          name: "optionPdf",
          fn: p(() => [
            h(t.$slots, "optionPdf", {}, void 0, !0)
          ]),
          key: "1"
        } : void 0,
        t.$slots.optionCsv ? {
          name: "optionCsv",
          fn: p(() => [
            h(t.$slots, "optionCsv", {}, void 0, !0)
          ]),
          key: "2"
        } : void 0,
        t.$slots.optionImg ? {
          name: "optionImg",
          fn: p(() => [
            h(t.$slots, "optionImg", {}, void 0, !0)
          ]),
          key: "3"
        } : void 0,
        t.$slots.optionTable ? {
          name: "optionTable",
          fn: p(() => [
            h(t.$slots, "optionTable", {}, void 0, !0)
          ]),
          key: "4"
        } : void 0,
        t.$slots.optionFullscreen ? {
          name: "optionFullscreen",
          fn: p(({ toggleFullscreen: l, isFullscreen: a }) => [
            h(t.$slots, "optionFullscreen", I(M({ toggleFullscreen: l, isFullscreen: a })), void 0, !0)
          ]),
          key: "5"
        } : void 0,
        t.$slots.optionAnnotator ? {
          name: "optionAnnotator",
          fn: p(({ toggleAnnotator: l, isAnnotator: a }) => [
            h(t.$slots, "optionAnnotator", I(M({ toggleAnnotator: l, isAnnotator: a })), void 0, !0)
          ]),
          key: "6"
        } : void 0
      ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isTooltip", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage"])) : k("", !0),
      z.value ? (r(), f("svg", {
        key: 4,
        xmlns: i(qe),
        class: W({ "vue-data-ui-fullscreen--on": L.value, "vue-data-ui-fulscreen--off": !L.value }),
        viewBox: `0 0 ${u.value.width <= 0 ? 10 : u.value.width} ${u.value.height <= 0 ? 10 : u.value.height}`,
        style: O(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
      }, [
        fe(dt),
        C("defs", null, [
          (r(!0), f(ye, null, me(d.value, (l, a) => (r(), f("radialGradient", {
            cx: "50%",
            cy: "30%",
            r: "50%",
            fx: "50%",
            fy: "50%",
            id: `gradient_${A.value}_${a}`
          }, [
            C("stop", {
              offset: "0%",
              "stop-color": i(Je)(i(Ke)(l.color, 0.05), 100 - e.value.style.chart.layout.rings.gradient.intensity)
            }, null, 8, mt),
            C("stop", {
              offset: "100%",
              "stop-color": l.color
            }, null, 8, bt)
          ], 8, yt))), 256))
        ]),
        (r(!0), f(ye, null, me(d.value, (l, a) => (r(), f("g", null, [
          C("circle", {
            class: W({
              "vue-ui-rings-item": S.value && e.value.useCssAnimation,
              "vue-rings-item-onload": !S.value && e.value.useCssAnimation,
              "vue-ui-rings-opacity": T.value !== null && T.value !== a
            }),
            style: O(`animation-delay:${a * 100}ms`),
            stroke: e.value.style.chart.layout.rings.stroke,
            cx: u.value.width / 2,
            cy: a === 0 ? u.value.height / 2 : u.value.height / 2 + g.value * d.value[0].proportion / 2 - g.value * l.proportion / 2 - 2 * (a + 1),
            r: i(q)(g.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : g.value * l.proportion / 2 * 0.9),
            fill: e.value.style.chart.layout.rings.gradient.underlayerColor
          }, null, 14, kt),
          C("circle", {
            class: W({
              "vue-ui-rings-item": S.value && e.value.useCssAnimation,
              "vue-rings-item-onload": !S.value && e.value.useCssAnimation,
              "vue-ui-rings-shadow": e.value.style.chart.layout.rings.useShadow,
              "vue-ui-rings-blur": T.value !== null && T.value !== a
            }),
            style: O(`animation-delay:${a * 100}ms`),
            stroke: e.value.style.chart.layout.rings.stroke,
            "stroke-width": l.strokeWidth < 0.5 ? 0.5 : l.strokeWidth,
            cx: u.value.width / 2,
            cy: a === 0 ? u.value.height / 2 : u.value.height / 2 + g.value * d.value[0].proportion / 2 - g.value * l.proportion / 2 - 2 * (a + 1),
            r: i(q)(g.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : g.value * l.proportion / 2 * 0.9),
            fill: e.value.style.chart.layout.rings.gradient.show ? `url(#gradient_${A.value}_${a})` : l.color
          }, null, 14, Ct),
          C("circle", {
            "data-cy-trap": "",
            stroke: "none",
            cx: u.value.width / 2,
            cy: a === 0 ? u.value.height / 2 : u.value.height / 2 + g.value * d.value[0].proportion / 2 - g.value * l.proportion / 2 - 2 * (a + 1),
            r: i(q)(g.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : g.value * l.proportion / 2 * 0.9),
            fill: "transparent",
            onMouseenter: (s) => Ie(a, l),
            onMouseleave: o[0] || (o[0] = (s) => {
              T.value = null, R.value = !1;
            })
          }, null, 40, wt)
        ]))), 256)),
        h(t.$slots, "svg", { svg: u.value }, void 0, !0)
      ], 14, ft)) : k("", !0),
      t.$slots.watermark ? (r(), f("div", $t, [
        h(t.$slots, "watermark", I(M({ isPrinting: i(ne) || i(re) })), void 0, !0)
      ])) : k("", !0),
      z.value ? k("", !0) : (r(), _(vt, {
        key: 6,
        config: {
          type: "rings",
          style: {
            backgroundColor: e.value.style.chart.backgroundColor,
            rings: {
              color: "#CCCCCC"
            }
          }
        }
      }, null, 8, ["config"])),
      C("div", {
        ref_key: "chartLegend",
        ref: Q
      }, [
        e.value.style.chart.legend.show ? (r(), _(it, {
          key: `legend_${oe.value}`,
          legendSet: de.value,
          config: Fe.value,
          onClickMarker: o[1] || (o[1] = ({ legend: l }) => H(l.uid))
        }, {
          item: p(({ legend: l, index: a }) => [
            C("div", {
              "data-cy-legend-item": "",
              onClick: (s) => H(l.uid),
              style: O(`opacity:${c.value.includes(l.uid) ? 0.5 : 1}`)
            }, [
              be(E(l.name) + ": " + E(i(we)(
                e.value.style.chart.layout.labels.dataLabels.formatter,
                l.value,
                i(N)({
                  p: e.value.style.chart.layout.labels.dataLabels.prefix,
                  v: l.value,
                  s: e.value.style.chart.layout.labels.dataLabels.suffix,
                  r: e.value.style.chart.legend.roundingValue
                }),
                { datapoint: l, seriesIndex: a }
              )) + " ", 1),
              c.value.includes(l.uid) ? (r(), f("span", xt, " ( - % ) ")) : (r(), f("span", _t, " (" + E(isNaN(l.value / m.value) ? "-" : i(N)({
                v: l.value / m.value * 100,
                s: "%",
                r: e.value.style.chart.legend.roundingPercentage
              })) + ") ", 1))
            ], 12, Tt)
          ]),
          _: 1
        }, 8, ["legendSet", "config"])) : h(t.$slots, "legend", {
          key: 1,
          legend: de.value
        }, void 0, !0)
      ], 512),
      t.$slots.source ? (r(), f("div", {
        key: 7,
        ref_key: "source",
        ref: Z,
        dir: "auto"
      }, [
        h(t.$slots, "source", {}, void 0, !0)
      ], 512)) : k("", !0),
      fe(rt, {
        show: w.value.showTooltip && R.value && c.value.length < y.dataset.length,
        backgroundColor: e.value.style.chart.tooltip.backgroundColor,
        color: e.value.style.chart.tooltip.color,
        borderRadius: e.value.style.chart.tooltip.borderRadius,
        borderColor: e.value.style.chart.tooltip.borderColor,
        borderWidth: e.value.style.chart.tooltip.borderWidth,
        fontSize: e.value.style.chart.tooltip.fontSize,
        backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
        position: e.value.style.chart.tooltip.position,
        offsetY: e.value.style.chart.tooltip.offsetY,
        parent: P.value,
        content: G.value,
        isFullscreen: L.value,
        isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function"
      }, {
        "tooltip-before": p(() => [
          h(t.$slots, "tooltip-before", I(M({ ...X.value })), void 0, !0)
        ]),
        "tooltip-after": p(() => [
          h(t.$slots, "tooltip-after", I(M({ ...X.value })), void 0, !0)
        ]),
        _: 3
      }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
      z.value ? (r(), _(ct, {
        key: 8,
        hideDetails: "",
        config: {
          open: w.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: p(() => [
          (r(), _(ut, {
            key: `table_${le.value}`,
            colNames: D.value.colNames,
            head: D.value.head,
            body: D.value.body,
            config: D.value.config,
            title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
            onClose: o[2] || (o[2] = (l) => w.value.showTable = !1)
          }, {
            th: p(({ th: l }) => [
              C("div", {
                innerHTML: l,
                style: { display: "flex", "align-items": "center" }
              }, null, 8, Nt)
            ]),
            td: p(({ td: l }) => [
              be(E(l.name || l), 1)
            ]),
            _: 1
          }, 8, ["colNames", "head", "body", "config", "title"]))
        ]),
        _: 1
      }, 8, ["config"])) : k("", !0)
    ], 46, gt));
  }
}, Et = /* @__PURE__ */ ht(Pt, [["__scopeId", "data-v-55a9dc26"]]);
export {
  Et as default
};
