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