import { computed as p, ref as b, onMounted as He, watch as Be, openBlock as s, createElementBlock as u, normalizeClass as he, normalizeStyle as B, renderSlot as _, createVNode as oe, createCommentVNode as v, createBlock as Q, unref as C, createSlots as ft, withCtx as z, normalizeProps as W, guardReactiveProps as X, Fragment as h, renderList as f, createElementVNode as D, toDisplayString as S, createTextVNode as mt } from "vue";
import { u as pt, c as We, t as xt, a as kt, p as se, M as Xe, b as wt, o as _t, e as Ue, g as Ct, d as zt, a3 as ie, $ as Ye, C as Ge, X as Lt, l as St, F as Je, f as E, x as qe, i as Ze, y as $t, q as Mt, r as Tt } from "./index-DK7qqHGP.js";
import { u as Ke } from "./useNestedProp-0nRX_rTi.js";
import { t as Nt, u as Ot } from "./useResponsive-NZB-WLRF.js";
import { u as Pt, U as Rt } from "./usePrinter-Cza87yNE.js";
import { S as It } from "./Slicer-Bk9LTQad.js";
import { _ as Ft } from "./Tooltip-Bt9pHzBM.js";
import { _ as Vt } from "./Title-Cxlu3Etv.js";
import { L as At } from "./Legend-D4PxDNTf.js";
import Dt from "./vue-ui-accordion-5C4CP3gA.js";
import { D as Et } from "./DataTable-B9SSwFM2.js";
import Ht from "./vue-ui-skeleton-CQnYuosp.js";
import { _ as Bt } from "./PackageVersion-I1_4jcn_.js";
import { _ as Wt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const Xt = ["id"], Ut = ["xmlns", "viewBox"], Yt = { key: 0 }, Gt = ["id"], Jt = ["stop-color"], qt = ["stop-color"], Zt = ["stop-color"], Kt = ["x1", "x2", "y1", "y2", "stroke"], Qt = ["x1", "x2", "y1", "y2", "stroke"], jt = ["x1", "x2", "y1", "y2", "stroke"], ea = ["x1", "x2", "y1", "y2", "stroke"], ta = ["x", "y", "height", "rx", "width", "fill", "stroke", "stroke-width"], aa = ["x", "y", "width", "rx", "height", "fill", "stroke", "stroke-width"], la = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ra = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], oa = ["x", "y", "font-size", "fill", "font-weight"], sa = ["transform", "font-size", "fill", "font-weight"], ia = ["x", "y", "font-size", "fill", "font-weight"], ua = { key: 0 }, na = ["x", "y", "font-size", "font-weight", "fill"], ca = ["x", "y", "font-size", "fill", "font-weight"], va = { key: 0 }, ha = ["x", "y", "font-size", "font-weight", "fill"], da = ["x1", "x2", "y1", "y2", "stroke"], ya = ["x", "y", "font-size", "font-weight", "fill"], ga = ["x1", "x2", "y1", "y2", "stroke"], ba = ["font-size", "font-weight", "fill", "text-anchor", "transform"], fa = ["text-anchor", "font-size", "font-weight", "fill", "transform"], ma = ["font-size", "font-weight", "fill", "x", "y"], pa = ["x", "y", "width", "height", "onClick", "onMouseenter", "fill"], xa = ["x", "y", "width", "height", "onClick", "onMouseenter", "fill"], ka = {
  key: 3,
  class: "vue-data-ui-watermark"
}, wa = ["onClick"], _a = ["innerHTML"], Ca = {
  __name: "vue-ui-stackbar",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  emits: ["selectDatapoint", "selectLegend"],
  setup(de, { expose: Qe, emit: ye }) {
    const x = de, { vue_ui_stackbar: je } = pt(), H = p({
      get() {
        return !!x.dataset && x.dataset.length;
      },
      set(a) {
        return a;
      }
    }), U = b(null), ue = b(We()), j = b(!1), ge = b(null), ne = b(""), L = b([]), be = b(0), fe = b(null), me = b(null), pe = b(null), xe = b(0), ce = b(!1), Y = b(null), G = b(!1), et = b(0), tt = b(0), at = b(0);
    He(() => {
      ve();
    });
    const e = p({
      get: () => ke(),
      set: (a) => a
    });
    function ke() {
      const a = Ke({
        userConfig: x.config,
        defaultConfig: je
      });
      let r = {};
      return a.theme ? r = {
        ...Ke({
          userConfig: xt.vue_ui_stackbar[a.theme] || x.config,
          defaultConfig: a
        }),
        customPalette: kt[a.theme] || se
      } : r = a, x.config && Xe(x.config, "style.chart.grid.scale.scaleMin") ? r.style.chart.grid.scale.scaleMin = x.config.style.chart.grid.scale.scaleMin : r.style.chart.grid.scale.scaleMin = null, x.config && Xe(x.config, "style.chart.grid.scale.scaleMax") ? r.style.chart.grid.scale.scaleMax = x.config.style.chart.grid.scale.scaleMax : r.style.chart.grid.scale.scaleMax = null, r;
    }
    Be(() => x.config, (a) => {
      e.value = ke(), ve(), et.value += 1, tt.value += 1, at.value += 1;
    }, { deep: !0 }), Be(() => x.dataset, (a) => {
      $e();
    }, { deep: !0 });
    const w = b({
      dataLabels: {
        show: e.value.style.chart.bars.dataLabels.show
      },
      showTable: e.value.table.show,
      showTooltip: e.value.style.chart.tooltip.show
    }), { isPrinting: we, isImaging: _e, generatePdf: Ce, generateImage: ze } = Pt({
      elementId: `stackbar_${ue.value}`,
      fileName: e.value.style.chart.title.text || "vue-ui-stackbar"
    }), ee = b({
      width: e.value.style.chart.width,
      height: e.value.style.chart.height,
      paddingRatio: {
        top: e.value.style.chart.padding.top / e.value.style.chart.height,
        right: e.value.style.chart.padding.right / e.value.style.chart.width,
        bottom: e.value.style.chart.padding.bottom / e.value.style.chart.height,
        left: e.value.style.chart.padding.left / e.value.style.chart.width
      }
    }), lt = p(() => wt(e.value.customPalette)), Le = b(null), Se = b(null);
    He(() => {
      ve();
    });
    function ve() {
      if (_t(x.dataset) ? Ue({
        componentName: "VueUiStackbar",
        type: "dataset"
      }) : x.dataset.forEach((a, r) => {
        Ct({
          datasetObject: a,
          requiredAttributes: ["name", "series"]
        }).forEach((t) => {
          H.value = !1, Ue({
            componentName: "VueUiStackbar",
            type: "datasetSerieAttribute",
            property: t,
            index: r
          });
        });
      }), setTimeout(() => {
        G.value = !0;
      }, 10), e.value.responsive) {
        const a = Nt(() => {
          G.value = !1;
          const { width: r, height: t } = Ot({
            chart: U.value,
            title: e.value.style.chart.title.text ? fe.value : null,
            legend: e.value.style.chart.legend.show ? me.value : null,
            slicer: e.value.style.chart.zoom.show && R.value > 1 ? pe.value : null
          });
          ee.value.width = r, ee.value.height = t, clearTimeout(Se.value), Se.value = setTimeout(() => {
            G.value = !0;
          }, 10);
        });
        Le.value = new ResizeObserver(a), Le.value.observe(U.value.parentNode);
      }
    }
    const o = p(() => {
      const { height: a, width: r } = ee.value, { right: t } = ee.value.paddingRatio, l = e.value.style.chart.padding.top, i = r - r * t, n = a - e.value.style.chart.padding.bottom, k = e.value.style.chart.padding.left, I = r - k - r * t, F = a - l - e.value.style.chart.padding.bottom;
      return {
        chartHeight: a,
        chartWidth: r,
        top: l,
        right: i,
        bottom: n,
        left: k,
        width: I,
        height: F < 0 ? 0 : F
      };
    }), P = p(() => x.dataset.map((a, r) => {
      const t = zt(a.color) || lt.value[r] || se[r] || se[r % se.length];
      return {
        ...a,
        // In distributed mode, all values are converted to positive
        series: JSON.parse(JSON.stringify(a.series)).map((l) => e.value.style.chart.bars.distributed ? Math.abs(l) : l),
        // Store signs to manage display of neg values in distributed mode
        signedSeries: a.series.map((l) => l >= 0 ? 1 : -1),
        absoluteIndex: r,
        id: We(),
        color: t
      };
    })), R = p(() => Math.max(...P.value.filter((a) => !L.value.includes(a.id)).map((a) => a.series.length))), c = b({
      start: 0,
      end: Math.max(...x.dataset.map((a) => a.series.length))
    });
    function $e() {
      c.value = {
        start: 0,
        end: Math.max(...x.dataset.map((a) => a.series.length))
      }, xe.value += 1;
    }
    const d = p(() => {
      let a;
      return e.value.orientation === "vertical" ? a = o.value.width / (c.value.end - c.value.start) : a = o.value.height / (c.value.end - c.value.start), a <= 0 ? 0 : a;
    }), J = p(() => ie(P.value.filter((a) => !L.value.includes(a.id))).slice(c.value.start, c.value.end)), rt = p(() => ie(P.value.filter((a) => !L.value.includes(a.id)).map((a) => ({
      ...a,
      series: a.series.map((r, t) => a.signedSeries[t] === -1 && r >= 0 ? -r : r)
    }))).slice(c.value.start, c.value.end)), te = p(() => {
      const a = P.value.filter((r) => !L.value.includes(r.id));
      return {
        positive: ie(a.map((r) => ({
          ...r,
          series: r.series.slice(c.value.start, c.value.end).map((t) => t >= 0 ? t : 0)
        }))),
        negative: ie(a.map((r) => ({
          ...r,
          series: r.series.slice(c.value.start, c.value.end).map((t) => t < 0 ? t : 0)
        })))
      };
    }), N = p(() => {
      const a = e.value.style.chart.grid.scale.scaleMax !== null && !e.value.style.chart.bars.distributed ? e.value.style.chart.grid.scale.scaleMax : Math.max(...te.value.positive), r = Math.min(...te.value.negative), t = e.value.style.chart.grid.scale.scaleMin !== null && !e.value.style.chart.bars.distributed ? e.value.style.chart.grid.scale.scaleMin : [-1 / 0, 1 / 0, NaN, void 0, null].includes(r) ? 0 : r, l = !e.value.style.chart.bars.distributed && (e.value.style.chart.grid.scale.scaleMax !== null || e.value.style.chart.grid.scale.scaleMin !== null) ? Ye(t > 0 ? 0 : t, a < 0 ? 0 : a, e.value.style.chart.grid.scale.ticks) : Ge(t > 0 ? 0 : t, a < 0 ? 0 : a, e.value.style.chart.grid.scale.ticks);
      return l.ticks.map((i) => ({
        zero: o.value.bottom - o.value.height * (Math.abs(l.min) / (l.max + Math.abs(l.min))),
        y: o.value.bottom - o.value.height * ((i + Math.abs(l.min)) / (l.max + Math.abs(l.min))),
        x: o.value.left - 8,
        horizontal_zero: o.value.left + o.value.width * (Math.abs(l.min) / (l.max + Math.abs(l.min))),
        horizontal_x: o.value.left + o.value.width * ((i + Math.abs(l.min)) / (l.max + Math.abs(l.min))),
        horizontal_y: o.value.bottom - 8,
        value: i
      }));
    }), q = p(() => e.value.style.chart.grid.x.timeLabels.values.slice(c.value.start, c.value.end)), m = p(() => {
      if (!H.value) return [];
      let a = Array(R.value).fill(0), r = Array(R.value).fill(0), t = Array(R.value).fill(0), l = Array(R.value).fill(0);
      const i = Math.max(...te.value.positive) || 0, n = Math.min(...te.value.negative), k = [-1 / 0, 1 / 0, NaN, void 0, null].includes(n) ? 0 : n, I = !e.value.style.chart.bars.distributed && (e.value.style.chart.grid.scale.scaleMax !== null || e.value.style.chart.grid.scale.scaleMin !== null) ? Ye(e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : k > 0 ? 0 : k, e.value.style.chart.grid.scale.scaleMax !== null ? e.value.style.chart.grid.scale.scaleMax : i < 0 ? 0 : i, e.value.style.chart.grid.scale.ticks) : Ge(e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : k > 0 ? 0 : k, e.value.style.chart.grid.scale.scaleMax !== null ? e.value.style.chart.grid.scale.scaleMax : i < 0 ? 0 : i, e.value.style.chart.grid.scale.ticks), { min: F, max: Z } = I, V = Z + (F >= 0 ? 0 : Math.abs(F)) || 1, $ = o.value.height, re = o.value.width, De = N.value[0] ? N.value[0].zero : o.value.bottom, Ee = N.value[0] ? N.value[0].horizontal_zero : o.value.left;
      return P.value.filter((K) => !L.value.includes(K.id)).map((K) => {
        const O = K.series.slice(c.value.start, c.value.end), nt = K.signedSeries.slice(c.value.start, c.value.end), ct = O.map((y, g) => o.value.left + d.value * g + d.value * e.value.style.chart.bars.gapRatio / 4), vt = O.map((y, g) => o.value.top + d.value * g + d.value * e.value.style.chart.bars.gapRatio / 4), ht = O.map((y, g) => {
          const M = e.value.style.chart.bars.distributed ? (y || 0) / J.value[g] : (y || 0) / V;
          let A, T;
          return y > 0 ? (T = $ * M, A = De - T - a[g], a[g] += T) : (T = $ * M, A = De + t[g], t[g] += Math.abs(T)), A;
        }), dt = O.map((y, g) => {
          const M = e.value.style.chart.bars.distributed ? (y || 0) / J.value[g] : (y || 0) / V;
          let A, T;
          return y > 0 ? (T = re * M, A = Ee + r[g], r[g] += T) : (T = re * M, A = Ee - Math.abs(T) - l[g], l[g] += Math.abs(T)), A;
        }), yt = O.map((y, g) => {
          const M = e.value.style.chart.bars.distributed ? (y || 0) / J.value[g] : (y || 0) / V;
          return y > 0 ? $ * M : $ * Math.abs(M);
        }), gt = O.map((y, g) => {
          const M = e.value.style.chart.bars.distributed ? (y || 0) / J.value[g] : (y || 0) / V;
          return y > 0 ? re * M : re * Math.abs(M);
        }), bt = O.map((y) => Math.abs(y)).reduce((y, g) => y + g, 0);
        return {
          ...K,
          proportions: O.map((y, g) => e.value.style.chart.bars.distributed ? (y || 0) / J.value[g] : (y || 0) / bt),
          series: O,
          signedSeries: nt,
          x: ct,
          y: ht,
          height: yt,
          horizontal_width: gt,
          horizontal_y: vt,
          horizontal_x: dt
        };
      });
    }), Me = p(() => rt.value.map((a, r) => ({
      value: a,
      sign: a >= 0 ? 1 : -1
    })));
    function ae(a, r, t, l, i) {
      const n = i === -1 && a >= 0 ? -a : a;
      return Ze(
        e.value.style.chart.bars.dataLabels.formatter,
        n,
        E({
          p: e.value.style.chart.bars.dataLabels.prefix,
          v: n,
          s: e.value.style.chart.bars.dataLabels.suffix,
          r: e.value.style.chart.bars.dataLabels.rounding
        }),
        { datapoint: r, seriesIndex: t, datapointIndex: l }
      );
    }
    function Te(a, r, t, l) {
      return Ze(
        e.value.style.chart.bars.dataLabels.formatter,
        a,
        E({
          v: a,
          s: "%",
          r: e.value.style.chart.bars.dataLabels.rounding
        }),
        { datapoint: r, seriesIndex: t, datapointIndex: l }
      );
    }
    function Ne(a) {
      const r = JSON.parse(JSON.stringify(m.value)).map((t) => ({
        name: t.name,
        value: t.series[a] === 0 ? 0 : t.series[a] || null,
        proportion: t.proportions[a] || null,
        color: t.color,
        id: t.id
      }));
      ye("selectDatapoint", { datapoint: r, period: q.value[a] });
    }
    function Oe(a) {
      Y.value = a, j.value = !0;
      const r = e.value.style.chart.tooltip.customFormat, t = JSON.parse(JSON.stringify(m.value)).map((i) => ({
        name: i.name,
        value: i.series[a] === 0 ? 0 : (i.signedSeries[a] === -1 && i.series[a] >= 0 ? -i.series[a] : i.series[a]) || null,
        proportion: i.proportions[a] || null,
        color: i.color,
        id: i.id
      })), l = t.map((i) => Math.abs(i.value)).reduce((i, n) => i + n, 0);
      if (qe(r) && $t(() => r({
        seriesIndex: a,
        datapoint: t,
        series: m.value,
        config: e.value
      })))
        ne.value = r({
          seriesIndex: a,
          datapoint: t,
          series: m.value,
          config: e.value
        });
      else {
        const {
          showValue: i,
          showPercentage: n,
          borderColor: k,
          roundingValue: I,
          roundingPercentage: F
        } = e.value.style.chart.tooltip;
        let Z = "";
        q.value[a] && (Z += `<div style="width:100%;text-align:center;border-bottom:1px solid ${k};padding-bottom:6px;margin-bottom:3px;">${q.value[a]}</div>`);
        const V = [
          i && n ? "(" : "",
          i && n ? ")" : ""
        ];
        t.reverse().forEach(($) => {
          Z += `
                <div style="display:flex;flex-direction:row;align-items:center;gap:4px">
                    <svg viewBox="0 0 12 12" height="14" width="14"><rect rx="1" x="0" y="0" height="12" width="12" stroke="none" fill="${e.value.style.chart.bars.gradient.show ? `url(#gradient_${$.id})` : $.color}"/></svg>
                    ${$.name}${i || n ? ":" : ""} ${i ? E({
            p: e.value.style.chart.bars.dataLabels.prefix,
            v: $.value,
            s: e.value.style.chart.bars.dataLabels.suffix,
            r: I
          }) : ""} ${V[0]}${n ? E({
            v: isNaN($.value / l) ? 0 : Math.abs($.value) / l * 100,
            // Negs are absed to show relative proportion to absolute total. It's opinionated.
            s: "%",
            r: F
          }) : ""}${V[1]}
                </div>
            `;
        }), ne.value = `<div>${Z}</div>`;
      }
    }
    function ot(a) {
      ce.value = a, be.value += 1;
    }
    function Pe() {
      w.value.showTable = !w.value.showTable;
    }
    function Re() {
      w.value.dataLabels.show = !w.value.dataLabels.show;
    }
    function Ie() {
      w.value.showTooltip = !w.value.showTooltip;
    }
    function st() {
      return m.value;
    }
    const Fe = p(() => {
      if (m.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
      const a = m.value.map(({ name: t, color: l }) => ({
        label: t,
        color: l
      })), r = [];
      for (let t = c.value.start; t < c.value.end; t += 1) {
        const l = [e.value.style.chart.grid.x.timeLabels.values[t] || t + 1];
        P.value.forEach((i) => {
          l.push(Number((i.series[t] || 0).toFixed(e.value.table.td.roundingValue)));
        }), r.push(l);
      }
      return { head: a, body: r };
    });
    function Ve() {
      const a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], r = ["", ...Fe.value.head.map((n) => n.label)], t = Fe.value.body, l = a.concat([r]).concat(t), i = Mt(l);
      Tt({ csvContent: i, title: e.value.style.chart.title.text || "vue-ui-stackbar" });
    }
    const le = p(() => {
      const a = [""].concat(m.value.map((i) => i.name)).concat(' <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>');
      let r = [];
      for (let i = 0; i < R.value; i += 1) {
        const n = m.value.map((k) => k.series[i] ?? 0).reduce((k, I) => k + I, 0);
        r.push([e.value.style.chart.grid.x.timeLabels.values.slice(c.value.start, c.value.end)[i] ?? i + 1].concat(m.value.map((k) => (k.series[i] ?? 0).toFixed(e.value.table.td.roundingValue))).concat((n ?? 0).toFixed(e.value.table.td.roundingValue)));
      }
      const 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
      }, l = [e.value.table.columnNames.period].concat(m.value.map((i) => i.name)).concat(e.value.table.columnNames.total);
      return { head: a, body: r.slice(0, c.value.end - c.value.start), config: t, colNames: l };
    });
    function it(a, r) {
      if (ye("selectLegend", m.value.find((t) => t.absoluteIndex === a)), L.value.includes(r.id))
        L.value = L.value.filter((t) => t !== r.id);
      else {
        if (L.value.length === P.value.length - 1) return;
        L.value.push(r.id);
      }
    }
    const Ae = p(() => P.value.map((a, r) => ({
      ...a,
      shape: "square"
    })).map((a) => ({
      ...a,
      opacity: L.value.includes(a.id) ? 0.5 : 1,
      segregate: () => it(a.absoluteIndex, a),
      isSegregated: L.value.includes(a.id)
    }))), ut = p(() => ({
      cy: "stackbar-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" : ""
    }));
    return Qe({
      getData: st,
      generatePdf: Ce,
      generateCsv: Ve,
      generateImage: ze,
      toggleTable: Pe,
      toggleLabels: Re,
      toggleTooltip: Ie
    }), (a, r) => (s(), u("div", {
      id: `stackbar_${ue.value}`,
      ref_key: "stackbarChart",
      ref: U,
      class: he({ "vue-ui-stackbar": !0, "vue-data-ui-wrapper-fullscreen": ce.value }),
      style: B(`background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color};font-family:${e.value.style.fontFamily}; position: relative; ${e.value.responsive ? "height: 100%" : ""}`)
    }, [
      _(a.$slots, "userConfig", {}, void 0, !0),
      e.value.style.chart.title.text ? (s(), u("div", {
        key: 0,
        ref_key: "chartTitle",
        ref: fe,
        style: "width:100%;background:transparent;padding-bottom:24px"
      }, [
        oe(Vt, {
          config: {
            title: {
              cy: "stackbar-title",
              ...e.value.style.chart.title
            },
            subtitle: {
              cy: "stackbar-subtitle",
              ...e.value.style.chart.title.subtitle
            }
          }
        }, null, 8, ["config"])
      ], 512)) : v("", !0),
      e.value.userOptions.show && H.value ? (s(), Q(Rt, {
        ref: "details",
        key: `user_option_${be.value}`,
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        isPrinting: C(we),
        isImaging: C(_e),
        uid: ue.value,
        hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
        hasPdf: e.value.userOptions.buttons.pdf,
        hasImg: e.value.userOptions.buttons.img,
        hasXls: e.value.userOptions.buttons.csv,
        hasTable: e.value.userOptions.buttons.table,
        hasLabel: e.value.userOptions.buttons.labels,
        hasFullscreen: e.value.userOptions.buttons.fullscreen,
        isFullscreen: ce.value,
        chartElement: U.value,
        position: e.value.userOptions.position,
        isTooltip: w.value.showTooltip,
        titles: { ...e.value.userOptions.buttonTitles },
        onToggleFullscreen: ot,
        onGeneratePdf: C(Ce),
        onGenerateCsv: Ve,
        onGenerateImage: C(ze),
        onToggleTable: Pe,
        onToggleLabels: Re,
        onToggleTooltip: Ie
      }, ft({ _: 2 }, [
        a.$slots.optionTooltip ? {
          name: "optionTooltip",
          fn: z(() => [
            _(a.$slots, "optionTooltip", {}, void 0, !0)
          ]),
          key: "0"
        } : void 0,
        a.$slots.optionPdf ? {
          name: "optionPdf",
          fn: z(() => [
            _(a.$slots, "optionPdf", {}, void 0, !0)
          ]),
          key: "1"
        } : void 0,
        a.$slots.optionCsv ? {
          name: "optionCsv",
          fn: z(() => [
            _(a.$slots, "optionCsv", {}, void 0, !0)
          ]),
          key: "2"
        } : void 0,
        a.$slots.optionImg ? {
          name: "optionImg",
          fn: z(() => [
            _(a.$slots, "optionImg", {}, void 0, !0)
          ]),
          key: "3"
        } : void 0,
        a.$slots.optionTable ? {
          name: "optionTable",
          fn: z(() => [
            _(a.$slots, "optionTable", {}, void 0, !0)
          ]),
          key: "4"
        } : void 0,
        a.$slots.optionLabels ? {
          name: "optionLabels",
          fn: z(() => [
            _(a.$slots, "optionLabels", {}, void 0, !0)
          ]),
          key: "5"
        } : void 0,
        a.$slots.optionFullscreen ? {
          name: "optionFullscreen",
          fn: z(({ toggleFullscreen: t, isFullscreen: l }) => [
            _(a.$slots, "optionFullscreen", W(X({ toggleFullscreen: t, isFullscreen: l })), void 0, !0)
          ]),
          key: "6"
        } : void 0
      ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "chartElement", "position", "isTooltip", "titles", "onGeneratePdf", "onGenerateImage"])) : v("", !0),
      H.value ? (s(), u("svg", {
        key: 2,
        xmlns: C(Lt),
        viewBox: `0 0 ${o.value.chartWidth <= 0 ? 10 : o.value.chartWidth} ${o.value.chartHeight <= 0 ? 10 : o.value.chartHeight}`,
        style: B(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
      }, [
        oe(Bt),
        e.value.style.chart.bars.gradient.show ? (s(), u("defs", Yt, [
          (s(!0), u(h, null, f(m.value, (t, l) => (s(), u("linearGradient", {
            id: `gradient_${t.id}`,
            x1: "0%",
            y1: "0%",
            x2: "0%",
            y2: "100%"
          }, [
            D("stop", {
              offset: "0%",
              "stop-color": t.color
            }, null, 8, Jt),
            D("stop", {
              offset: "61.8%",
              "stop-color": C(St)(t.color, e.value.style.chart.bars.gradient.intensity / 100)
            }, null, 8, qt),
            D("stop", {
              offset: "100%",
              "stop-color": t.color
            }, null, 8, Zt)
          ], 8, Gt))), 256))
        ])) : v("", !0),
        e.value.style.chart.grid.x.showHorizontalLines && e.value.orientation === "vertical" ? (s(!0), u(h, { key: 1 }, f(N.value, (t, l) => (s(), u("line", {
          x1: o.value.left,
          x2: o.value.right,
          y1: t.y,
          y2: t.y,
          stroke: e.value.style.chart.grid.x.axisColor,
          "stroke-width": 1,
          "stroke-linecap": "round"
        }, null, 8, Kt))), 256)) : v("", !0),
        e.value.style.chart.grid.x.showHorizontalLines && e.value.orientation === "horizontal" ? (s(!0), u(h, { key: 2 }, f(c.value.end - c.value.start + 1, (t, l) => (s(), u("line", {
          x1: o.value.left,
          x2: o.value.right,
          y1: o.value.top + d.value * l,
          y2: o.value.top + d.value * l,
          stroke: e.value.style.chart.grid.y.axisColor,
          "stroke-width": 1,
          "stroke-linecap": "round"
        }, null, 8, Qt))), 256)) : v("", !0),
        e.value.style.chart.grid.y.showVerticalLines && e.value.orientation === "vertical" ? (s(!0), u(h, { key: 3 }, f(c.value.end - c.value.start + 1, (t, l) => (s(), u("line", {
          x1: o.value.left + d.value * l,
          x2: o.value.left + d.value * l,
          y1: o.value.top,
          y2: o.value.bottom,
          stroke: e.value.style.chart.grid.y.axisColor,
          "stroke-width": 1,
          "stroke-linecap": "round"
        }, null, 8, jt))), 256)) : v("", !0),
        e.value.style.chart.grid.x.showHorizontalLines && e.value.orientation === "horizontal" ? (s(!0), u(h, { key: 4 }, f(N.value, (t, l) => (s(), u("line", {
          x1: t.horizontal_x,
          x2: t.horizontal_x,
          y1: o.value.top,
          y2: o.value.bottom,
          stroke: e.value.style.chart.grid.x.axisColor,
          "stroke-width": 1,
          "stroke-linecap": "round"
        }, null, 8, ea))), 256)) : v("", !0),
        (s(!0), u(h, null, f(m.value, (t, l) => (s(), u("g", null, [
          e.value.orientation === "vertical" ? (s(!0), u(h, { key: 0 }, f(t.x, (i, n) => (s(), u("rect", {
            x: i,
            y: t.y[n] < 0 ? 0 : t.y[n],
            height: t.height[n] < 0 ? 1e-4 : t.height[n],
            rx: e.value.style.chart.bars.borderRadius > t.height[n] / 2 ? (t.height[n] < 0 ? 0 : t.height[n]) / 2 : e.value.style.chart.bars.borderRadius,
            width: d.value * (1 - e.value.style.chart.bars.gapRatio / 2),
            fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${t.id})` : t.color,
            stroke: e.value.style.chart.backgroundColor,
            "stroke-width": e.value.style.chart.bars.strokeWidth,
            "stroke-linecap": "round",
            "stroke-linejoin": "round",
            class: he({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": G.value })
          }, null, 10, ta))), 256)) : (s(!0), u(h, { key: 1 }, f(t.horizontal_x, (i, n) => (s(), u("rect", {
            x: i,
            y: t.horizontal_y[n] < 0 ? 0 : t.horizontal_y[n],
            width: t.horizontal_width[n] < 0 ? 1e-4 : t.horizontal_width[n],
            rx: e.value.style.chart.bars.borderRadius > t.height[n] / 2 ? (t.height[n] < 0 ? 0 : t.height[n]) / 2 : e.value.style.chart.bars.borderRadius,
            height: d.value * (1 - e.value.style.chart.bars.gapRatio / 2),
            fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${t.id})` : t.color,
            stroke: e.value.style.chart.backgroundColor,
            "stroke-width": e.value.style.chart.bars.strokeWidth,
            "stroke-linecap": "round",
            "stroke-linejoin": "round",
            class: he({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": G.value })
          }, null, 10, aa))), 256))
        ]))), 256)),
        e.value.style.chart.grid.x.showAxis ? (s(), u("line", {
          key: 5,
          x1: o.value.left,
          x2: o.value.right,
          y1: o.value.bottom,
          y2: o.value.bottom,
          stroke: e.value.style.chart.grid.x.axisColor,
          "stroke-width": e.value.style.chart.grid.x.axisThickness,
          "stroke-linecap": "round",
          "stroke-linejoin": "round"
        }, null, 8, la)) : v("", !0),
        e.value.style.chart.grid.y.showAxis && !e.value.style.chart.bars.distributed ? (s(), u("line", {
          key: 6,
          x1: o.value.left,
          x2: o.value.left,
          y1: o.value.top,
          y2: o.value.bottom,
          stroke: e.value.style.chart.grid.y.axisColor,
          "stroke-width": e.value.style.chart.grid.y.axisThickness,
          "stroke-linecap": "round",
          "stroke-linejoin": "round"
        }, null, 8, ra)) : v("", !0),
        e.value.style.chart.grid.x.axisName.show && e.value.style.chart.grid.x.axisName.text ? (s(), u("text", {
          key: 7,
          x: o.value.left + o.value.width / 2,
          y: o.value.chartHeight + e.value.style.chart.grid.x.axisName.offsetY,
          "font-size": e.value.style.chart.grid.x.axisName.fontSize,
          fill: e.value.style.chart.grid.x.axisName.color,
          "font-weight": e.value.style.chart.grid.x.axisName.bold ? "bold" : "normal",
          "text-anchor": "middle"
        }, S(e.value.style.chart.grid.x.axisName.text), 9, oa)) : v("", !0),
        e.value.style.chart.grid.y.axisName.show && e.value.style.chart.grid.y.axisName.text ? (s(), u("text", {
          key: 8,
          transform: `translate(${e.value.style.chart.grid.y.axisName.fontSize + e.value.style.chart.grid.y.axisName.offsetX}, ${o.value.top + o.value.height / 2}) rotate(-90)`,
          "font-size": e.value.style.chart.grid.y.axisName.fontSize,
          fill: e.value.style.chart.grid.y.axisName.color,
          "font-weight": e.value.style.chart.grid.y.axisName.bold ? "bold" : "normal",
          "text-anchor": "middle"
        }, S(e.value.style.chart.grid.y.axisName.text), 9, sa)) : v("", !0),
        w.value.dataLabels.show && e.value.orientation === "vertical" ? (s(), u(h, { key: 9 }, [
          (s(!0), u(h, null, f(m.value, (t, l) => (s(), u("g", null, [
            (s(!0), u(h, null, f(t.x, (i, n) => (s(), u("text", {
              x: i + d.value * (1 - e.value.style.chart.bars.gapRatio / 2) / 2,
              y: t.y[n] + t.height[n] / 2 + e.value.style.chart.bars.dataLabels.fontSize / 3,
              "font-size": e.value.style.chart.bars.dataLabels.fontSize,
              fill: e.value.style.chart.bars.dataLabels.adaptColorToBackground ? C(Je)(t.color) : e.value.style.chart.bars.dataLabels.color,
              "font-weight": e.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
              "text-anchor": "middle"
            }, S(e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? Te(t.proportions[n] * 100, t, l, n) : ae(t.series[n], t, l, n, t.signedSeries[n])), 9, ia))), 256))
          ]))), 256)),
          e.value.style.chart.bars.totalValues.show && m.value.length > 1 ? (s(), u("g", ua, [
            (s(!0), u(h, null, f(Me.value, (t, l) => (s(), u("text", {
              x: o.value.left + d.value * l + d.value / 2,
              y: o.value.top - e.value.style.chart.bars.totalValues.fontSize / 3,
              "text-anchor": "middle",
              "font-size": e.value.style.chart.bars.totalValues.fontSize,
              "font-weight": e.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
              fill: e.value.style.chart.bars.totalValues.color
            }, S(ae(t.value, t, l, t.sign)), 9, na))), 256))
          ])) : v("", !0)
        ], 64)) : v("", !0),
        w.value.dataLabels.show && e.value.orientation === "horizontal" ? (s(), u(h, { key: 10 }, [
          (s(!0), u(h, null, f(m.value, (t, l) => (s(), u("g", null, [
            (s(!0), u(h, null, f(t.horizontal_x, (i, n) => (s(), u("text", {
              x: i + (t.horizontal_width[n] < 0 ? 1e-4 : t.horizontal_width[n]) / 2,
              y: t.horizontal_y[n] + d.value * (1 - e.value.style.chart.bars.gapRatio / 2) / 2 + e.value.style.chart.bars.dataLabels.fontSize / 3,
              "font-size": e.value.style.chart.bars.dataLabels.fontSize,
              fill: e.value.style.chart.bars.dataLabels.adaptColorToBackground ? C(Je)(t.color) : e.value.style.chart.bars.dataLabels.color,
              "font-weight": e.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
              "text-anchor": "middle"
            }, S(e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? Te(t.proportions[n] * 100, t, l, n) : ae(t.series[n], t, l, n, t.signedSeries[n])), 9, ca))), 256))
          ]))), 256)),
          e.value.style.chart.bars.totalValues.show && m.value.length > 1 ? (s(), u("g", va, [
            (s(!0), u(h, null, f(Me.value, (t, l) => (s(), u("text", {
              x: o.value.right + e.value.style.chart.bars.totalValues.fontSize / 3,
              y: o.value.top + d.value * l + d.value / 2,
              "text-anchor": "start",
              "font-size": e.value.style.chart.bars.totalValues.fontSize,
              "font-weight": e.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
              fill: e.value.style.chart.bars.totalValues.color
            }, S(ae(t.value, t, l, t.sign)), 9, ha))), 256))
          ])) : v("", !0)
        ], 64)) : v("", !0),
        e.value.style.chart.grid.y.axisLabels.show && !e.value.style.chart.bars.distributed && e.value.orientation === "vertical" ? (s(), u(h, { key: 11 }, [
          (s(!0), u(h, null, f(N.value, (t, l) => (s(), u("line", {
            x1: o.value.left,
            x2: o.value.left - 6,
            y1: t.y,
            y2: t.y,
            stroke: e.value.style.chart.grid.x.axisColor,
            "stroke-width": 1
          }, null, 8, da))), 256)),
          (s(!0), u(h, null, f(N.value, (t, l) => (s(), u("text", {
            x: t.x,
            y: t.y + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
            "font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
            "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
            fill: e.value.style.chart.grid.y.axisLabels.color,
            "text-anchor": "end"
          }, S(C(E)({
            p: e.value.style.chart.bars.dataLabels.prefix,
            v: t.value,
            s: e.value.style.chart.bars.dataLabels.suffix,
            r: e.value.style.chart.grid.y.axisLabels.rounding
          })), 9, ya))), 256))
        ], 64)) : v("", !0),
        e.value.style.chart.grid.y.axisLabels.show && !e.value.style.chart.bars.distributed && e.value.orientation === "horizontal" ? (s(), u(h, { key: 12 }, [
          (s(!0), u(h, null, f(N.value, (t, l) => (s(), u("line", {
            x1: t.horizontal_x,
            x2: t.horizontal_x,
            y1: o.value.bottom,
            y2: o.value.bottom + 6,
            stroke: e.value.style.chart.grid.x.axisColor,
            "stroke-width": 1,
            "stroke-linecap": "round"
          }, null, 8, ga))), 256)),
          (s(!0), u(h, null, f(N.value, (t, l) => (s(), u("text", {
            "font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
            "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
            fill: e.value.style.chart.grid.y.axisLabels.color,
            "text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
            transform: `translate(${t.horizontal_x}, ${o.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`
          }, S(C(E)({
            p: e.value.style.chart.bars.dataLabels.prefix,
            v: t.value,
            s: e.value.style.chart.bars.dataLabels.suffix,
            r: e.value.style.chart.grid.y.axisLabels.rounding
          })), 9, ba))), 256))
        ], 64)) : v("", !0),
        e.value.style.chart.grid.x.timeLabels.show && e.value.orientation === "vertical" ? (s(!0), u(h, { key: 13 }, f(q.value, (t, l) => (s(), u("text", {
          "text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
          "font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
          "font-weight": e.value.style.chart.grid.x.timeLabels.bold ? "bold" : "normal",
          fill: e.value.style.chart.grid.x.timeLabels.color,
          transform: `translate(${o.value.left + d.value * l + d.value / 2}, ${o.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`
        }, S(t), 9, fa))), 256)) : v("", !0),
        e.value.style.chart.grid.x.timeLabels.show && e.value.orientation === "horizontal" ? (s(!0), u(h, { key: 14 }, f(q.value, (t, l) => (s(), u("text", {
          "text-anchor": "end",
          "font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
          "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
          fill: e.value.style.chart.grid.y.axisLabels.color,
          x: o.value.left - 8,
          y: o.value.top + d.value * l + d.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3
        }, S(t), 9, ma))), 256)) : v("", !0),
        w.value.showTooltip && e.value.orientation === "vertical" ? (s(!0), u(h, { key: 15 }, f(c.value.end - c.value.start, (t, l) => (s(), u("rect", {
          x: o.value.left + l * d.value,
          y: o.value.top,
          width: d.value,
          height: o.value.height < 0 ? 0 : o.value.height,
          onClick: (i) => Ne(l),
          onMouseenter: (i) => Oe(l),
          onMouseleave: r[0] || (r[0] = (i) => {
            Y.value = null, j.value = !1;
          }),
          fill: l === Y.value ? e.value.style.chart.highlighter.color : "transparent",
          style: B({ opacity: e.value.style.chart.highlighter.opacity / 100 })
        }, null, 44, pa))), 256)) : v("", !0),
        w.value.showTooltip && e.value.orientation === "horizontal" ? (s(!0), u(h, { key: 16 }, f(c.value.end - c.value.start, (t, l) => (s(), u("rect", {
          x: o.value.left,
          y: o.value.top + l * d.value,
          width: o.value.width < 0 ? 0 : o.value.width,
          height: d.value,
          onClick: (i) => Ne(l),
          onMouseenter: (i) => Oe(l),
          onMouseleave: r[1] || (r[1] = (i) => {
            Y.value = null, j.value = !1;
          }),
          fill: l === Y.value ? e.value.style.chart.highlighter.color : "transparent",
          style: B({ opacity: e.value.style.chart.highlighter.opacity / 100 })
        }, null, 44, xa))), 256)) : v("", !0),
        _(a.$slots, "svg", W(X({ ...o.value })), void 0, !0)
      ], 12, Ut)) : v("", !0),
      a.$slots.watermark ? (s(), u("div", ka, [
        _(a.$slots, "watermark", W(X({ isPrinting: C(we) || C(_e) })), void 0, !0)
      ])) : v("", !0),
      H.value ? v("", !0) : (s(), Q(Ht, {
        key: 4,
        config: {
          type: "bar",
          style: {
            backgroundColor: e.value.style.chart.backgroundColor,
            bar: {
              axis: {
                color: "#CCCCCC"
              },
              color: "#CCCCCC"
            }
          }
        }
      }, null, 8, ["config"])),
      D("div", {
        ref_key: "chartSlicer",
        ref: pe,
        style: B(`width:100%;background:${e.value.style.chart.backgroundColor}`),
        "data-html2canvas-ignore": ""
      }, [
        e.value.style.chart.zoom.show && R.value > 1 ? (s(), Q(It, {
          key: `slicer_${xe.value}`,
          background: e.value.style.chart.zoom.color,
          borderColor: e.value.style.chart.backgroundColor,
          fontSize: e.value.style.chart.zoom.fontSize,
          useResetSlot: e.value.style.chart.zoom.useResetSlot,
          labelLeft: e.value.style.chart.grid.x.timeLabels.values[c.value.start] ? e.value.style.chart.grid.x.timeLabels.values[c.value.start] : "",
          labelRight: e.value.style.chart.grid.x.timeLabels.values[c.value.end - 1] ? e.value.style.chart.grid.x.timeLabels.values[c.value.end - 1] : "",
          textColor: e.value.style.chart.color,
          inputColor: e.value.style.chart.zoom.color,
          selectColor: e.value.style.chart.zoom.highlightColor,
          max: Math.max(...de.dataset.map((t) => t.series.length)),
          min: 0,
          valueStart: c.value.start,
          valueEnd: c.value.end,
          start: c.value.start,
          "onUpdate:start": r[2] || (r[2] = (t) => c.value.start = t),
          end: c.value.end,
          "onUpdate:end": r[3] || (r[3] = (t) => c.value.end = t),
          onReset: $e
        }, {
          "reset-action": z(({ reset: t }) => [
            _(a.$slots, "reset-action", W(X({ reset: t })), void 0, !0)
          ]),
          _: 3
        }, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end"])) : v("", !0)
      ], 4),
      oe(Ft, {
        show: w.value.showTooltip && j.value,
        backgroundColor: e.value.style.chart.tooltip.backgroundColor,
        color: e.value.style.chart.tooltip.color,
        fontSize: e.value.style.chart.tooltip.fontSize,
        borderRadius: e.value.style.chart.tooltip.borderRadius,
        borderColor: e.value.style.chart.tooltip.borderColor,
        borderWidth: e.value.style.chart.tooltip.borderWidth,
        backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
        position: e.value.style.chart.tooltip.position,
        offsetY: e.value.style.chart.tooltip.offsetY,
        parent: U.value,
        content: ne.value,
        isCustom: C(qe)(e.value.style.chart.tooltip.customFormat)
      }, {
        "tooltip-before": z(() => [
          _(a.$slots, "tooltip-before", W(X({ ...ge.value })), void 0, !0)
        ]),
        "tooltip-after": z(() => [
          _(a.$slots, "tooltip-after", W(X({ ...ge.value })), void 0, !0)
        ]),
        _: 3
      }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom"]),
      D("div", {
        ref_key: "chartLegend",
        ref: me
      }, [
        e.value.style.chart.legend.show && H.value ? (s(), Q(At, {
          key: 0,
          legendSet: Ae.value,
          config: ut.value,
          onClickMarker: r[4] || (r[4] = ({ legend: t }) => t.segregate())
        }, {
          item: z(({ legend: t }) => [
            D("div", {
              onClick: (l) => t.segregate(),
              style: B(`opacity:${L.value.includes(t.id) ? 0.5 : 1}`)
            }, S(t.name), 13, wa)
          ]),
          _: 1
        }, 8, ["legendSet", "config"])) : _(a.$slots, "legend", {
          key: 1,
          legend: Ae.value
        }, void 0, !0)
      ], 512),
      c.value.end - c.value.start < 200 ? (s(), Q(Dt, {
        key: 5,
        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: z(() => [
          oe(Et, {
            colNames: le.value.colNames,
            head: le.value.head,
            body: le.value.body,
            config: le.value.config,
            title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
            onClose: r[5] || (r[5] = (t) => w.value.showTable = !1)
          }, {
            th: z(({ th: t }) => [
              D("div", { innerHTML: t }, null, 8, _a)
            ]),
            td: z(({ td: t }) => [
              mt(S(isNaN(Number(t)) ? t : C(E)({
                p: e.value.style.chart.bars.dataLabels.prefix,
                v: t,
                s: e.value.style.chart.bars.dataLabels.suffix,
                r: e.value.table.td.roundingValue
              })), 1)
            ]),
            _: 1
          }, 8, ["colNames", "head", "body", "config", "title"])
        ]),
        _: 1
      }, 8, ["config"])) : v("", !0)
    ], 14, Xt));
  }
}, Da = /* @__PURE__ */ Wt(Ca, [["__scopeId", "data-v-a4f47dd7"]]);
export {
  Da as default
};
