import { computed as p, ref as c, onMounted as Le, onBeforeUnmount as Pe, openBlock as r, createElementBlock as i, normalizeClass as O, normalizeStyle as V, createVNode as K, createCommentVNode as v, createBlock as B, unref as h, createSlots as Se, withCtx as f, renderSlot as m, normalizeProps as H, guardReactiveProps as R, Fragment as g, renderList as C, createElementVNode as x, toDisplayString as T, mergeProps as ze, createTextVNode as Ne, nextTick as Ae } from "vue";
import { u as Oe, c as Q, t as Fe, a as We, p as L, o as Ie, e as Z, g as pe, b as Me, d as ye, s as De, B as Ge, f as U, X as Ee, i as ee, l as Ve, h as Be, x as fe, y as He, q as Re, r as Ue, D as Xe } from "./index-CguVaFlt.js";
import { t as je, u as Ye } from "./useResponsive-NZB-WLRF.js";
import { _ as Je } from "./Title-DbTGPg4G.js";
import { u as qe, U as Ke } from "./usePrinter-ClsMRVJG.js";
import { _ as Qe } from "./Tooltip-u79R5W5y.js";
import { D as Ze } from "./DataTable-BwHWRlRZ.js";
import et from "./vue-ui-skeleton-ChHLL5Hw.js";
import { _ as tt } from "./Shape-D3yIJobN.js";
import lt from "./vue-ui-accordion-w15FGKRN.js";
import { u as be } from "./useNestedProp-BbEbJmgv.js";
import { _ as at } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const ot = ["id"], st = ["xmlns", "viewBox"], rt = { key: 0 }, ut = { key: 0 }, it = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], nt = { key: 1 }, ct = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], vt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ht = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], dt = ["x", "y", "fill", "font-size"], pt = ["x", "y", "font-size", "fill"], yt = ["fill", "font-size", "transform"], ft = ["fill", "font-size", "x", "y"], bt = ["x1", "x2", "y1", "y2", "stroke"], mt = ["cx", "cy", "fill"], gt = ["cx", "cy", "fill"], xt = ["id"], kt = ["stop-color"], Ct = ["stop-color"], wt = ["stop-color"], _t = { key: 0 }, $t = ["x", "y", "font-size", "fill"], Tt = {
  key: 3,
  class: "vue-data-ui-watermark"
}, Lt = ["innerHTML"], Pt = {
  __name: "vue-ui-strip-plot",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  emits: ["selectDatapoint"],
  setup(me, { expose: ge, emit: xe }) {
    const b = me, { vue_ui_strip_plot: ke } = Oe(), w = p({
      get() {
        return !!b.dataset && b.dataset.length;
      },
      set(t) {
        return t;
      }
    }), X = c(Q()), te = c(0), j = c(!1), Y = c(""), S = c(null), le = c(null), ae = c(!1), e = p(() => {
      const t = be({
        userConfig: b.config,
        defaultConfig: ke
      });
      return t.theme ? {
        ...be({
          userConfig: Fe.vue_ui_strip_plot[t.theme] || b.config,
          defaultConfig: t
        }),
        customPalette: We[t.theme] || L
      } : t;
    }), F = c(null);
    Le(() => {
      if (Ie(b.dataset) ? Z({
        componentName: "VueUiStripPlot",
        type: "dataset"
      }) : b.dataset.forEach((t, o) => {
        pe({
          datasetObject: t,
          requiredAttributes: ["name", "plots"]
        }).forEach((l) => {
          w.value = !1, Z({
            componentName: "VueUiStripPlot",
            type: "datasetSerieAttribute",
            property: l,
            index: o
          });
        }), t.plots && t.plots.forEach((l, s) => {
          pe({
            datasetObject: l,
            requiredAttributes: ["name", "value"]
          }).forEach((u) => {
            w.value = !1, Z({
              componentName: "VueUiStripPlot",
              type: "datasetSerieAttribute",
              property: u,
              index: `${o},${s}`
            });
          });
        });
      }), e.value.responsive) {
        const t = je(() => {
          const { width: o, height: l } = Ye({
            chart: S.value,
            title: e.value.style.chart.title.text ? le.value : null
          });
          W.value = l, P.value.width = o, P.value.height = l, N.value = (o - y.value.left - y.value.right) / b.dataset.length, I.value = Xe({
            relator: Math.min(l, o),
            adjuster: 600,
            source: e.value.style.chart.plots.radius,
            threshold: 6,
            fallback: 6
          });
        });
        F.value = new ResizeObserver(t), F.value.observe(S.value.parentNode);
      }
      ae.value = !0, setTimeout(() => {
        z.value = !1;
      }, Ce.value * 50);
    }), Pe(() => {
      F.value && F.value.disconnect();
    });
    const { isPrinting: oe, isImaging: se, generatePdf: re, generateImage: ue } = qe({
      elementId: `strip-plot_${X.value}`,
      fileName: e.value.style.chart.title.text || "vue-ui-strip-plot"
    }), ie = p(() => Me(e.value.customPalette)), z = c(e.value.useCssAnimation), d = c({
      showTable: e.value.table.show,
      dataLabels: {
        show: e.value.style.chart.labels.bestPlotLabel.show
      },
      showTooltip: e.value.style.chart.tooltip.show
    }), y = c({
      top: e.value.style.chart.padding.top,
      bottom: e.value.style.chart.padding.bottom,
      left: e.value.style.chart.padding.left,
      right: e.value.style.chart.padding.right
    }), N = c(e.value.style.chart.stripWidth), W = c(e.value.style.chart.height), I = c(e.value.style.chart.plots.radius), P = c({
      width: N.value * b.dataset.length + y.value.left + y.value.right,
      height: e.value.style.chart.height
    }), a = p(() => {
      const t = N.value * b.dataset.length + y.value.left + y.value.right;
      return {
        left: y.value.left,
        right: t - y.value.right,
        top: y.value.top,
        bottom: W.value - y.value.bottom,
        width: N.value * b.dataset.length,
        height: W.value - y.value.top - y.value.bottom,
        stripWidth: N.value,
        absoluteHeight: W.value,
        absoluteWidth: t
      };
    }), M = p(() => w.value ? b.dataset.map((t, o) => {
      const l = Q();
      return {
        ...t,
        id: l,
        color: t.color ? ye(t.color) : ie.value[o] || L[o] || L[o % L.length],
        plots: t.plots.map((s) => ({
          ...s,
          value: De(s.value),
          parentId: l,
          color: t.color ? ye(t.color) : ie.value[o] || L[o] || L[o % L.length],
          id: Q()
        })).sort((s, u) => s.value - u.value)
      };
    }) : null), k = p(() => (M.value || []).map((t, o) => ({
      ...t,
      plots: t.plots.map((l) => ({
        ...l,
        x: a.value.left + (o + 1) * a.value.stripWidth - a.value.stripWidth / 2
      }))
    }))), Ce = p(() => Math.max(...k.value.map((t) => t.plots.length))), J = p(() => {
      const t = k.value.flatMap((o) => o.plots.map((l) => l.value));
      return {
        max: Math.max(...t),
        min: Math.min(...t)
      };
    }), _ = p(() => Ge(J.value.min < 0 ? J.value.min : 0, J.value.max, e.value.style.chart.grid.scaleSteps)), we = p(() => (k.value || []).map((t, o) => ({
      ...t,
      plots: t.plots.map((l) => ({
        ...l,
        y: a.value.bottom - (l.value + Math.abs(_.value.min)) / (_.value.max + Math.abs(_.value.min)) * a.value.height
      }))
    }))), ne = p(() => _.value.ticks.map((t) => ({
      y: a.value.bottom - a.value.height * ((t + Math.abs(_.value.min)) / (_.value.max + Math.abs(_.value.min))),
      x1: a.value.left,
      x2: a.value.right,
      value: t
    }))), q = c(null), n = c(null);
    function _e({ datapoint: t, seriesIndex: o }) {
      q.value = { datapoint: t, seriesIndex: o, config: e.value, series: M.value }, j.value = !0, n.value = t;
      const l = e.value.style.chart.tooltip.customFormat;
      if (fe(l) && He(() => l({
        seriesIndex: o,
        datapoint: t,
        series: M.value,
        config: e.value
      })))
        Y.value = l({
          seriesIndex: o,
          datapoint: t,
          series: M.value,
          config: e.value
        });
      else {
        let s = "";
        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="${e.value.style.chart.plots.gradient.show ? `url(#${t.parentId})` : t.color}"/></svg>${t.name}</div>`, s += `<div>${ee(
          e.value.style.chart.labels.formatter,
          t.value,
          U({
            p: e.value.style.chart.labels.prefix,
            v: t.value,
            s: e.value.style.chart.labels.suffix,
            r: e.value.style.chart.tooltip.roundingValue
          }),
          { datapoint: t, seriesIndex: o }
        )}</div>`, Y.value = `<div>${s}</div>`;
      }
    }
    const D = p(() => {
      const t = k.value.flatMap((l) => JSON.parse(JSON.stringify(l.plots)).sort((s, u) => u.value - s.value).map((s) => ({
        name: `${l.name} - ${s.name}`,
        color: s.color
      }))), o = k.value.flatMap((l) => JSON.parse(JSON.stringify(l.plots)).sort((s, u) => u.value - s.value).map((s) => s.value));
      return { head: t, body: o };
    });
    function ce() {
      Ae(() => {
        const t = D.value.head.map((s, u) => [[
          s.name
        ], [D.value.body[u]]]), o = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[e.value.table.columnNames.series], [e.value.table.columnNames.value]]].concat(t), l = Re(o);
        Ue({ csvContent: l, title: e.value.style.chart.title.text || "vue-ui-strip-plot" });
      });
    }
    const G = p(() => {
      const t = [
        e.value.table.columnNames.series,
        e.value.table.columnNames.value
      ], o = D.value.head.map((u, $) => {
        const E = U({
          p: e.value.style.chart.labels.prefix,
          v: D.value.body[$],
          s: e.value.style.chart.labels.suffix,
          r: e.value.table.td.roundingValue
        });
        return [
          {
            color: u.color,
            name: u.name
          },
          E
        ];
      }), 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
      };
      return {
        colNames: [
          e.value.table.columnNames.series,
          e.value.table.columnNames.value
        ],
        head: t,
        body: o,
        config: l
      };
    }), A = c(!1);
    function $e(t) {
      A.value = t, te.value += 1;
    }
    function Te() {
      return k.value;
    }
    function ve() {
      d.value.showTable = !d.value.showTable;
    }
    function he() {
      d.value.dataLabels.show = !d.value.dataLabels.show;
    }
    function de() {
      d.value.showTooltip = !d.value.showTooltip;
    }
    return ge({
      getData: Te,
      generatePdf: re,
      generateCsv: ce,
      generateImage: ue,
      toggleTable: ve,
      toggleLabels: he,
      toggleTooltip: de
    }), (t, o) => (r(), i("div", {
      ref_key: "stripPlotChart",
      ref: S,
      class: O(`vue-ui-strip-plot ${A.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
      style: V(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;${e.value.style.chart.title.text ? "" : "padding-top:36px"};background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height:100%" : ""}`),
      id: `strip-plot_${X.value}`
    }, [
      e.value.style.chart.title.text ? (r(), i("div", {
        key: 0,
        ref_key: "chartTitle",
        ref: le,
        style: V(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:24px`)
      }, [
        K(Je, {
          config: {
            title: {
              cy: "donut-div-title",
              ...e.value.style.chart.title
            },
            subtitle: {
              cy: "donut-div-subtitle",
              ...e.value.style.chart.title.subtitle
            }
          }
        }, null, 8, ["config"])
      ], 4)) : v("", !0),
      e.value.userOptions.show && w.value ? (r(), B(Ke, {
        ref: "details",
        key: `user_option_${te.value}`,
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        isPrinting: h(oe),
        isImaging: h(se),
        uid: X.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,
        hasLabel: e.value.userOptions.buttons.labels,
        hasFullscreen: e.value.userOptions.buttons.fullscreen,
        isTooltip: d.value.showTooltip,
        isFullscreen: A.value,
        titles: { ...e.value.userOptions.buttonTitles },
        chartElement: S.value,
        onToggleFullscreen: $e,
        onGeneratePdf: h(re),
        onGenerateCsv: ce,
        onGenerateImage: h(ue),
        onToggleTable: ve,
        onToggleLabels: he,
        onToggleTooltip: de
      }, Se({ _: 2 }, [
        t.$slots.optionTooltip ? {
          name: "optionTooltip",
          fn: f(() => [
            m(t.$slots, "optionTooltip", {}, void 0, !0)
          ]),
          key: "0"
        } : void 0,
        t.$slots.optionPdf ? {
          name: "optionPdf",
          fn: f(() => [
            m(t.$slots, "optionPdf", {}, void 0, !0)
          ]),
          key: "1"
        } : void 0,
        t.$slots.optionCsv ? {
          name: "optionCsv",
          fn: f(() => [
            m(t.$slots, "optionCsv", {}, void 0, !0)
          ]),
          key: "2"
        } : void 0,
        t.$slots.optionImg ? {
          name: "optionImg",
          fn: f(() => [
            m(t.$slots, "optionImg", {}, void 0, !0)
          ]),
          key: "3"
        } : void 0,
        t.$slots.optionTable ? {
          name: "optionTable",
          fn: f(() => [
            m(t.$slots, "optionTable", {}, void 0, !0)
          ]),
          key: "4"
        } : void 0,
        t.$slots.optionLabels ? {
          name: "optionLabels",
          fn: f(() => [
            m(t.$slots, "optionLabels", {}, void 0, !0)
          ]),
          key: "5"
        } : void 0,
        t.$slots.optionFullscreen ? {
          name: "optionFullscreen",
          fn: f(({ toggleFullscreen: l, isFullscreen: s }) => [
            m(t.$slots, "optionFullscreen", H(R({ toggleFullscreen: l, isFullscreen: s })), void 0, !0)
          ]),
          key: "6"
        } : void 0
      ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasLabel", "hasFullscreen", "isTooltip", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : v("", !0),
      w.value ? (r(), i("svg", {
        key: 2,
        xmlns: h(Ee),
        class: O({ "vue-data-ui-fullscreen--on": A.value, "vue-data-ui-fulscreen--off": !A.value }),
        viewBox: `0 0 ${P.value.width <= 0 ? 10 : P.value.width} ${P.value.height <= 0 ? 10 : P.value.height}`,
        style: V(`max-width:100%; overflow: visible; background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color};`)
      }, [
        e.value.style.chart.grid.show ? (r(), i("g", rt, [
          e.value.style.chart.grid.horizontalGrid.show ? (r(), i("g", ut, [
            (r(!0), i(g, null, C(ne.value, (l) => (r(), i("line", {
              x1: l.x1,
              x2: l.x2,
              y1: l.y,
              y2: l.y,
              stroke: e.value.style.chart.grid.horizontalGrid.stroke,
              "stroke-width": e.value.style.chart.grid.horizontalGrid.strokeWidth,
              "stroke-dasharray": e.value.style.chart.grid.horizontalGrid.strokeDasharray,
              "stroke-linecap": "round"
            }, null, 8, it))), 256))
          ])) : v("", !0),
          e.value.style.chart.grid.verticalGrid.show ? (r(), i("g", nt, [
            (r(!0), i(g, null, C(k.value, (l, s) => (r(), i("line", {
              x1: a.value.left + (s + 1) * a.value.stripWidth,
              x2: a.value.left + (s + 1) * a.value.stripWidth,
              y1: a.value.top,
              y2: a.value.bottom,
              stroke: e.value.style.chart.grid.verticalGrid.stroke,
              "stroke-width": e.value.style.chart.grid.verticalGrid.strokeWidth,
              "stroke-dasharray": e.value.style.chart.grid.verticalGrid.strokeDasharray,
              "stroke-linecap": "round"
            }, null, 8, ct))), 256))
          ])) : v("", !0),
          x("line", {
            x1: a.value.left,
            x2: a.value.left,
            y1: a.value.top,
            y2: a.value.bottom,
            stroke: e.value.style.chart.grid.stroke,
            "stroke-width": e.value.style.chart.grid.strokeWidth,
            "stroke-linecap": "round"
          }, null, 8, vt),
          x("line", {
            x1: a.value.left,
            x2: a.value.right,
            y1: a.value.bottom,
            y2: a.value.bottom,
            stroke: e.value.style.chart.grid.stroke,
            "stroke-width": e.value.style.chart.grid.strokeWidth,
            "stroke-linecap": "round"
          }, null, 8, ht)
        ])) : v("", !0),
        e.value.style.chart.labels.yAxisLabels.show ? (r(!0), i(g, { key: 1 }, C(ne.value, (l, s) => (r(), i("text", {
          x: l.x1 - e.value.style.chart.labels.yAxisLabels.fontSize / 2 + e.value.style.chart.labels.yAxisLabels.offsetX,
          y: l.y + e.value.style.chart.labels.yAxisLabels.fontSize / 3,
          fill: e.value.style.chart.labels.yAxisLabels.color,
          "font-size": e.value.style.chart.labels.yAxisLabels.fontSize,
          "text-anchor": "end"
        }, T(h(ee)(
          e.value.style.chart.labels.formatter,
          l.value,
          h(U)({
            p: e.value.style.chart.labels.prefix,
            v: l.value,
            s: e.value.style.chart.labels.suffix,
            r: e.value.style.chart.labels.yAxisLabels.rounding
          }),
          { datapoint: l, seriesIndex: s }
        )), 9, dt))), 256)) : v("", !0),
        e.value.style.chart.labels.xAxisLabels.show ? (r(!0), i(g, { key: 2 }, C(k.value, (l, s) => (r(), i("text", {
          x: a.value.left + (s + 1) * a.value.stripWidth - a.value.stripWidth / 2,
          y: a.value.bottom + e.value.style.chart.labels.xAxisLabels.fontSize * 2 + e.value.style.chart.labels.xAxisLabels.offsetY,
          "font-size": e.value.style.chart.labels.xAxisLabels.fontSize,
          fill: e.value.style.chart.labels.xAxisLabels.color,
          "text-anchor": "middle"
        }, T(l.name), 9, pt))), 256)) : v("", !0),
        e.value.style.chart.labels.axis.yLabel ? (r(), i("text", {
          key: 3,
          fill: e.value.style.chart.labels.axis.color,
          "font-size": e.value.style.chart.labels.axis.fontSize,
          transform: `translate(${e.value.style.chart.labels.axis.fontSize + e.value.style.chart.labels.axis.yLabelOffsetX}, ${a.value.top + a.value.height / 2}) rotate(-90)`,
          "text-anchor": "middle"
        }, T(e.value.style.chart.labels.axis.yLabel), 9, yt)) : v("", !0),
        e.value.style.chart.labels.axis.xLabel ? (r(), i("text", {
          key: 4,
          fill: e.value.style.chart.labels.axis.color,
          "font-size": e.value.style.chart.labels.axis.fontSize,
          x: a.value.left + a.value.width / 2,
          y: a.value.absoluteHeight,
          "text-anchor": "middle"
        }, T(e.value.style.chart.labels.axis.xLabel), 9, ft)) : v("", !0),
        n.value ? (r(), i(g, { key: 5 }, [
          x("line", {
            x1: a.value.left,
            x2: a.value.right,
            y1: n.value.y,
            y2: n.value.y,
            stroke: n.value.color,
            "stroke-width": 1,
            class: O({ "select-circle": e.value.useCssAnimation })
          }, null, 10, bt),
          x("circle", {
            cx: a.value.left,
            cy: n.value.y,
            r: 3,
            fill: n.value.color,
            class: O({ "select-circle": e.value.useCssAnimation })
          }, null, 10, mt),
          x("circle", {
            cx: a.value.right,
            cy: n.value.y,
            r: 3,
            fill: n.value.color,
            class: O({ "select-circle": e.value.useCssAnimation })
          }, null, 10, gt)
        ], 64)) : v("", !0),
        x("defs", null, [
          (r(!0), i(g, null, C(k.value, (l) => (r(), i("radialGradient", {
            id: l.id,
            fy: "30%"
          }, [
            x("stop", {
              offset: "10%",
              "stop-color": h(Ve)(l.color, e.value.style.chart.plots.gradient.intensity / 100)
            }, null, 8, kt),
            x("stop", {
              offset: "90%",
              "stop-color": h(Be)(l.color, 0.1)
            }, null, 8, Ct),
            x("stop", {
              offset: "100%",
              "stop-color": l.color
            }, null, 8, wt)
          ], 8, xt))), 256))
        ]),
        (r(!0), i(g, null, C(we.value, (l, s) => (r(), i(g, null, [
          (r(!0), i(g, null, C(l.plots, (u, $) => (r(), B(tt, ze({
            plot: { x: u.x, y: ae.value ? u.y : a.value.top },
            radius: n.value && n.value.id === u.id ? I.value * 1.5 : I.value,
            shape: e.value.style.chart.plots.shape,
            stroke: e.value.style.chart.plots.stroke,
            strokeWidth: e.value.style.chart.plots.strokeWidth,
            color: e.value.style.chart.plots.gradient.show ? `url(#${l.id})` : l.color,
            onMouseenter: (E) => _e({ datapoint: u, seriesIndex: $ }),
            onMouseleave: o[0] || (o[0] = (E) => {
              j.value = !1, n.value = null;
            }),
            onClick: (E) => xe("selectDatapoint", u),
            style: `transition: all 0.2s ease-in-out; opacity:${n.value ? n.value.id === u.id ? 1 : 0.2 : e.value.style.chart.plots.opacity};${z.value ? `transition-delay:${$ * 50}ms` : ""}`,
            class: { "vue-ui-strip-plot-animated": e.value.useCssAnimation && z.value, "vue-ui-strip-plot-select-circle": e.value.useCssAnimation && !z.value }
          }, t.$attrs), null, 16, ["plot", "radius", "shape", "stroke", "strokeWidth", "color", "onMouseenter", "onClick", "style", "class"]))), 256)),
          d.value.dataLabels.show ? (r(), i("g", _t, [
            (r(!0), i(g, null, C(l.plots, (u, $) => (r(), i(g, null, [
              $ === l.plots.length - 1 || n.value && n.value.id === u.id && !d.value.showTooltip ? (r(), i("text", {
                key: 0,
                x: u.x,
                y: u.y + e.value.style.chart.labels.bestPlotLabel.offsetY - I.value * (n.value && n.value.id === u.id && !d.value.showTooltip ? 2 : 1.5),
                "font-size": e.value.style.chart.labels.bestPlotLabel.fontSize,
                fill: e.value.style.chart.labels.bestPlotLabel.color,
                "text-anchor": "middle",
                style: V(`opacity:${e.value.useCssAnimation && z.value ? 0 : 1};transition:opacity 0.2s ease-in;`)
              }, T(u.name) + " " + T(e.value.style.chart.labels.bestPlotLabel.showValue ? h(ee)(
                e.value.style.chart.labels.formatter,
                u.value,
                h(U)({
                  p: `(${e.value.style.chart.labels.prefix}`,
                  v: u.value,
                  s: `${e.value.style.chart.labels.suffix})`,
                  r: e.value.style.chart.labels.bestPlotLabel.rounding
                }),
                { datapoint: u, seriesIndex: $ }
              ) : ""), 13, $t)) : v("", !0)
            ], 64))), 256))
          ])) : v("", !0)
        ], 64))), 256)),
        m(t.$slots, "svg", { svg: a.value }, void 0, !0)
      ], 14, st)) : v("", !0),
      t.$slots.watermark ? (r(), i("div", Tt, [
        m(t.$slots, "watermark", H(R({ isPrinting: h(oe) || h(se) })), void 0, !0)
      ])) : v("", !0),
      w.value ? v("", !0) : (r(), B(et, {
        key: 4,
        config: {
          type: "stripPlot",
          style: {
            backgroundColor: e.value.style.chart.backgroundColor,
            stripPlot: {
              color: "#CCCCCC"
            }
          }
        }
      }, null, 8, ["config"])),
      K(Qe, {
        show: d.value.showTooltip && j.value,
        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: S.value,
        content: Y.value,
        isCustom: h(fe)(e.value.style.chart.tooltip.customFormat)
      }, {
        "tooltip-before": f(() => [
          m(t.$slots, "tooltip-before", H(R({ ...q.value })), void 0, !0)
        ]),
        "tooltip-after": f(() => [
          m(t.$slots, "tooltip-after", H(R({ ...q.value })), void 0, !0)
        ]),
        _: 3
      }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom"]),
      w.value ? (r(), B(lt, {
        key: 5,
        hideDetails: "",
        config: {
          open: d.value.showTable,
          maxHeight: 1e4,
          body: {
            backgroundColor: e.value.style.chart.backgroundColor,
            color: e.value.style.chart.color
          },
          head: {
            backgroundColor: e.value.style.chart.backgroundColor,
            color: e.value.style.chart.color
          }
        }
      }, {
        content: f(() => [
          K(Ze, {
            colNames: G.value.colNames,
            head: G.value.head,
            body: G.value.body,
            config: G.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[1] || (o[1] = (l) => d.value.showTable = !1)
          }, {
            th: f(({ th: l }) => [
              x("div", {
                innerHTML: l,
                style: { display: "flex", "align-items": "center" }
              }, null, 8, Lt)
            ]),
            td: f(({ td: l }) => [
              Ne(T(l.name || l), 1)
            ]),
            _: 1
          }, 8, ["colNames", "head", "body", "config", "title"])
        ]),
        _: 1
      }, 8, ["config"])) : v("", !0)
    ], 14, ot));
  }
}, Vt = /* @__PURE__ */ at(Pt, [["__scopeId", "data-v-e265b064"]]);
export {
  Vt as default
};
