import { computed as g, ref as h, watch as Fe, onMounted as lt, onBeforeUnmount as at, openBlock as o, createElementBlock as n, normalizeClass as T, normalizeStyle as q, unref as y, createBlock as N, createCommentVNode as c, createSlots as ut, withCtx as $, renderSlot as k, normalizeProps as G, guardReactiveProps as Q, createVNode as ve, createElementVNode as d, Fragment as S, renderList as Y, toDisplayString as L, createTextVNode as ot, nextTick as st } from "vue";
import { u as rt, c as Re, t as nt, a as it, p as de, o as vt, e as H, b as dt, U as ct, d as ht, i as O, f as V, X as yt, s as ae, w as bt, V as ft, G as pt, x as gt, y as mt, q as xt, r as $t } from "./index-CxkSLqkR.js";
import { t as kt, u as Lt } from "./useResponsive-CoxXLe23.js";
import { _ as wt } from "./Title-DlWf9Ddn.js";
import { u as qt, U as _t } from "./usePrinter-C6iBjau1.js";
import { _ as St } from "./Tooltip-CvkadVaG.js";
import { _ as He } from "./Shape-Ci6tClcc.js";
import { L as Ct } from "./Legend-1PzxSsgB.js";
import { D as zt } from "./DataTable-BE81z-1L.js";
import Tt from "./vue-ui-skeleton-BNcyfNtG.js";
import Xt from "./vue-ui-accordion-ElsMWD7y.js";
import { u as Ie } from "./useNestedProp-Cl0RLl8U.js";
import { _ as Wt } from "./PackageVersion-CZWTAkjP.js";
import { P as Yt } from "./PenAndPaper-B-Xy37LR.js";
import { u as At } from "./useUserOptionState-BIvW1Kz7.js";
import { _ as Mt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const Nt = ["id"], Ot = ["xmlns", "viewBox", "id"], Vt = ["x", "y", "width", "height"], Pt = ["id"], Bt = ["stop-color"], Ft = ["stop-color"], Rt = { key: 1 }, Ht = ["fill", "x", "y", "height", "width", "stroke-width", "stroke", "rx"], It = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Ut = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Dt = { key: 2 }, Et = ["points", "fill"], Gt = ["points", "fill"], Qt = ["points", "fill"], Jt = ["points", "fill"], jt = { key: 3 }, Zt = ["y", "fill", "font-size"], Kt = ["x", "y", "fill", "font-size"], el = ["x", "y", "fill", "font-size"], tl = ["y", "fill", "font-size"], ll = { key: 4 }, al = ["x", "y", "font-size", "fill"], ul = ["x", "y", "font-size", "fill"], ol = ["x", "y", "font-size", "fill"], sl = ["id", "font-size", "transform", "fill"], rl = ["id", "font-size", "transform", "fill"], nl = ["id", "font-size", "transform", "fill"], il = { key: 5 }, vl = ["fill", "points"], dl = ["x", "y", "width", "height"], cl = ["x", "y", "width", "height"], hl = ["x", "y", "width", "height"], yl = ["x", "y", "width", "height"], bl = {
  key: 0,
  style: { "pointer-events": "none" }
}, fl = ["x", "y", "font-size", "fill"], pl = { key: 0 }, gl = ["x", "y", "onMouseover", "onClick"], ml = {
  key: 8,
  class: "vue-ui-dna"
}, xl = ["points", "fill"], $l = ["points", "fill"], kl = ["points", "fill"], Ll = ["points", "fill"], wl = { key: 9 }, ql = ["x", "y", "font-size", "fill", "font-weight"], _l = { key: 10 }, Sl = ["x", "y", "fill"], Cl = ["x", "y", "fill"], zl = ["x", "y", "fill"], Tl = ["x", "y", "fill"], Xl = ["stroke", "d"], Wl = ["stroke", "d"], Yl = {
  key: 5,
  class: "vue-data-ui-watermark"
}, Al = ["onClick"], Ml = {
  key: 0,
  height: "14",
  width: "14",
  viewBox: "0 0 20 20"
}, Nl = ["innerHTML"], Ol = {
  __name: "vue-ui-quadrant",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  emits: ["selectPlot", "selectSide", "selectLegend"],
  setup(Ue, { expose: De, emit: ue }) {
    const X = Ue, { vue_ui_quadrant: Ee } = rt(), J = g(() => !!X.dataset && X.dataset.length), z = h(Re()), Ge = h(null), j = h(!1), oe = h(""), ce = h(0), p = h(!1), B = h(null), he = h(null), ye = h(null), be = h(null), fe = h(null), pe = h(0), ge = h(0), me = h(0), t = g({
      get: () => ke(),
      set: (l) => l
    }), { userOptionsVisible: se, setUserOptionsVisibility: xe, keepUserOptionState: $e } = At({ config: t.value });
    function ke() {
      const l = Ie({
        userConfig: X.config,
        defaultConfig: Ee
      });
      return l.theme ? {
        ...Ie({
          userConfig: nt.vue_ui_quadrant[l.theme] || X.config,
          defaultConfig: l
        }),
        customPalette: it[l.theme] || de
      } : l;
    }
    Fe(() => X.config, (l) => {
      t.value = ke(), se.value = !t.value.userOptions.showOnChartHover, Le(), pe.value += 1, ge.value += 1, me.value += 1, m.value.plotLabels.show = t.value.style.chart.layout.labels.plotLabels.show, m.value.showTable = t.value.table.show, m.value.showTooltip = t.value.style.chart.tooltip.show;
    }, { deep: !0 });
    const Z = h(null);
    function Le() {
      if (vt(X.dataset) ? H({
        componentName: "VueUiQuadrant",
        type: "dataset"
      }) : X.dataset.forEach((l, u) => {
        [null, void 0].includes(l.name) && H({
          componentName: "VueUiQuadrant",
          type: "datasetSerieAttribute",
          property: "name",
          index: u
        }), [null, void 0].includes(l.series) ? H({
          componentName: "VueUiQuadrant",
          type: "datasetSerieAttribute",
          property: "series",
          index: u
        }) : l.series.forEach((a, s) => {
          [null, void 0].includes(a.name) && H({
            componentName: "VueUiQuadrant",
            type: "datasetSerieAttribute",
            property: "name",
            key: "series",
            index: s
          });
        });
      }), t.value.responsive) {
        const l = kt(() => {
          const { width: u, height: a } = Lt({
            chart: B.value,
            title: t.value.style.chart.title.text ? he.value : null,
            legend: t.value.style.chart.legend.show ? ye.value : null,
            source: be.value,
            noTitle: fe.value
          });
          x.value = 48, requestAnimationFrame(() => {
            e.value.height = a, e.value.usableHeight = a - x.value * 2, e.value.width = u, e.value.usableWidth = u - x.value * 2, e.value.top = x.value, e.value.left = x.value, e.value.right = u - x.value, e.value.bottom = a - x.value, e.value.centerX = u / 2, e.value.centerY = a - a / 2, e.value.padding = x.value;
          });
        });
        Z.value = new ResizeObserver(l), Z.value.observe(B.value.parentNode);
      }
    }
    lt(() => {
      Le();
    }), at(() => {
      Z.value && Z.value.disconnect();
    });
    const { isPrinting: we, isImaging: qe, generatePdf: _e, generateImage: Se } = qt({
      elementId: `vue-ui-quadrant_${z.value}`,
      fileName: t.value.style.chart.title.text || "vue-ui-quadrant"
    }), Qe = g(() => t.value.userOptions.show && !t.value.style.chart.title.text), Ce = g(() => dt(t.value.customPalette)), m = h({
      plotLabels: {
        show: t.value.style.chart.layout.labels.plotLabels.show
      },
      showTable: t.value.table.show,
      showTooltip: t.value.style.chart.tooltip.show
    }), x = h(48), e = h({
      height: t.value.style.chart.height,
      usableHeight: t.value.style.chart.height - x.value * 2,
      width: t.value.style.chart.width,
      usableWidth: t.value.style.chart.width - x.value * 2,
      top: x.value,
      left: x.value,
      right: t.value.style.chart.width - x.value,
      bottom: t.value.style.chart.height - x.value,
      centerX: t.value.style.chart.width / 2,
      centerY: t.value.style.chart.height - t.value.style.chart.height / 2,
      padding: x.value
    }), i = h({
      ...JSON.parse(JSON.stringify(e.value)),
      startX: 0,
      startY: 0
    });
    Fe(() => e.value, (l) => {
      l && (i.value = {
        ...JSON.parse(JSON.stringify(e.value)),
        startX: 0,
        startY: 0
      });
    }, { deep: !0 });
    const v = h(null), P = g(() => {
      switch (v.value) {
        case "TL":
          return {
            x: i.value.startX + i.value.width / 2,
            y: i.value.height,
            text: t.value.style.chart.layout.labels.quadrantLabels.tl.text || "Top Left",
            fontSize: t.value.style.chart.layout.labels.quadrantLabels.tl.fontSize,
            fill: t.value.style.chart.layout.labels.quadrantLabels.tl.color,
            bold: t.value.style.chart.layout.labels.quadrantLabels.tl.bold
          };
        case "TR":
          return {
            x: i.value.startX + i.value.width / 2,
            y: i.value.height,
            text: t.value.style.chart.layout.labels.quadrantLabels.tr.text || "Top Right",
            fontSize: t.value.style.chart.layout.labels.quadrantLabels.tr.fontSize,
            fill: t.value.style.chart.layout.labels.quadrantLabels.tr.color,
            bold: t.value.style.chart.layout.labels.quadrantLabels.tr.bold
          };
        case "BR":
          return {
            x: i.value.startX + i.value.width / 2,
            y: i.value.height * 1.678,
            text: t.value.style.chart.layout.labels.quadrantLabels.br.text || "Bottom Right",
            fontSize: t.value.style.chart.layout.labels.quadrantLabels.br.fontSize,
            fill: t.value.style.chart.layout.labels.quadrantLabels.br.color,
            bold: t.value.style.chart.layout.labels.quadrantLabels.br.bold
          };
        case "BL":
          return {
            x: i.value.startX + i.value.width / 2,
            y: i.value.height * 1.678,
            text: t.value.style.chart.layout.labels.quadrantLabels.bl.text || "Bottom Left",
            fontSize: t.value.style.chart.layout.labels.quadrantLabels.bl.fontSize,
            fill: t.value.style.chart.layout.labels.quadrantLabels.bl.color,
            bold: t.value.style.chart.layout.labels.quadrantLabels.bl.bold
          };
        default:
          return { x: 0, y: 0, text: "", fontSize: 0, fill: "none", bold: !1 };
      }
    }), Je = h(null), K = h(!1);
    function I({ targetX: l, targetY: u, targetW: a, targetH: s, side: r }) {
      v.value && E(r);
      const b = {
        x: l - i.value.startX,
        y: u - i.value.startY,
        w: a - i.value.width,
        h: s - i.value.height
      }, f = t.value.zoomAnimationFrames;
      let W = 0;
      function Be() {
        K.value = !0, i.value.startX += b.x / f, i.value.startY += b.y / f, i.value.width += b.w / f, i.value.height += b.h / f, W += 1, W < f ? Je.value = requestAnimationFrame(Be) : K.value = !1;
      }
      Be();
    }
    function A(l) {
      if (!K.value)
        if (p.value && v.value === l)
          I({
            targetX: 0,
            targetY: 0,
            targetW: e.value.width,
            targetH: e.value.height
          }), v.value = null, p.value = !1;
        else {
          switch (v.value = l, l) {
            case "TL":
              I({
                targetX: 0,
                targetY: 0,
                targetW: e.value.width / 2 + e.value.left,
                targetH: e.value.height / 2 + e.value.top,
                side: "tl"
              });
              break;
            case "TR":
              I({
                targetX: e.value.width / 2 - e.value.left,
                targetY: 0,
                targetW: e.value.width / 2 + e.value.left,
                targetH: e.value.height / 2 + e.value.top,
                side: "tr"
              });
              break;
            case "BR":
              I({
                targetX: e.value.width / 2 - e.value.left,
                targetY: e.value.height / 2 - e.value.top,
                targetW: e.value.width / 2 + e.value.left,
                targetH: e.value.height / 2 + e.value.top,
                side: "br"
              });
              break;
            case "BL":
              I({
                targetX: 0,
                targetY: e.value.height / 2 - e.value.top,
                targetW: e.value.width / 2 + e.value.left,
                targetH: e.value.height / 2 + e.value.top,
                side: "bl"
              });
              break;
            default:
              i.value.startX = 0, i.value.startY = 0, i.value.width = e.value.width, i.value.height = e.value.height;
              break;
          }
          p.value = !0;
        }
    }
    const je = g(() => {
      const l = t.value.style.chart.layout.grid.graduations.steps, u = e.value.usableWidth / (l * 2), a = e.value.top, s = [];
      for (let r = 0; r < l; r += 1)
        s.push({
          x: e.value.padding + u * r,
          y: a + e.value.usableHeight * (r / l / 2),
          height: e.value.usableHeight * (1 - r / l),
          width: e.value.usableWidth * (1 - r / l),
          opacity: Math.round((r + 1) / l * 20)
        });
      return s;
    }), _ = g(() => {
      let l = t.value.style.chart.layout.grid.xAxis.max, u = t.value.style.chart.layout.grid.xAxis.min, a = t.value.style.chart.layout.grid.yAxis.max, s = t.value.style.chart.layout.grid.yAxis.min;
      return t.value.style.chart.layout.grid.xAxis.auto && (l = Math.max(...F.value.flatMap((r) => r.series.map((b) => b.x))), u = Math.min(...F.value.flatMap((r) => r.series.map((b) => b.x)))), t.value.style.chart.layout.grid.yAxis.auto && (a = Math.max(...F.value.flatMap((r) => r.series.map((b) => b.y))), s = Math.min(...F.value.flatMap((r) => r.series.map((b) => b.y)))), {
        x: {
          max: l,
          min: u
        },
        y: {
          max: a,
          min: s
        }
      };
    }), M = h([]), F = g(() => X.dataset.map((l, u) => ({
      ...l,
      series: ct({
        data: l.series,
        threshold: t.value.downsample.threshold
      }),
      id: `cat_${u}_${z.value}`,
      color: ht(l.color) || Ce.value[u] || de[u]
    }))), Ze = g(() => F.value.filter((l) => !M.value.includes(l.id))), Ke = g(() => F.value.map((l, u) => ({
      ...l,
      shape: l.shape || "circle",
      series: l.series.map((a) => ({
        ...a,
        x: ze(a.x),
        y: Te(a.y),
        xValue: a.x,
        yValue: a.y,
        quadrantSide: We({ x: a.x, y: a.y }),
        categoryName: l.name,
        shape: l.shape,
        color: l.color
      }))
    }))), C = g(() => (X.dataset.forEach((l, u) => {
      l.series.forEach((a, s) => {
        [null, void 0].includes(a.x) && H({
          componentName: "VueUiQuadrant",
          type: "datasetSerieAttribute",
          property: "x",
          key: "series",
          index: s
        }), [null, void 0].includes(a.y) && H({
          componentName: "VueUiQuadrant",
          type: "datasetSerieAttribute",
          property: "y",
          key: "series",
          index: s
        });
      });
    }), Ze.value.map((l, u) => ({
      ...l,
      shape: l.shape || "circle",
      color: l.color || Ce.value[u] || de[u],
      series: l.series.map((a) => ({
        ...a,
        x: ze(a.x),
        y: Te(a.y),
        xValue: a.x,
        yValue: a.y,
        quadrantSide: We({ x: a.x, y: a.y }),
        categoryName: l.name,
        shape: l.shape,
        color: l.color,
        uid: Re()
      }))
    }))));
    function ze(l) {
      if (l >= 0) {
        const u = l / _.value.x.max;
        return e.value.centerX + e.value.usableWidth / 2 * u;
      } else {
        const u = Math.abs(l) / Math.abs(_.value.x.min);
        return e.value.centerX - e.value.usableWidth / 2 * u;
      }
    }
    function Te(l) {
      if (l >= 0) {
        const u = l / _.value.y.max;
        return e.value.centerY + (1 - e.value.usableHeight / 2 * u);
      } else {
        const u = Math.abs(l) / Math.abs(_.value.y.min);
        return e.value.centerY - (1 - e.value.usableHeight / 2 * u);
      }
    }
    const ee = g(() => {
      const l = C.value.flatMap((f) => f.series.map((W) => ({
        x: W.xValue,
        y: W.yValue,
        name: W.name,
        category: W.categoryName,
        quadrantSide: W.quadrantSide,
        sideName: t.value.style.chart.layout.labels.quadrantLabels[W.quadrantSide].text,
        color: f.color,
        shape: f.shape
      }))), u = t.value.style.chart.layout.grid.xAxis.name || "x", a = t.value.style.chart.layout.grid.yAxis.name || "y", s = [t.value.translations.category, t.value.translations.item, u, a, t.value.translations.side], r = l.map((f) => [f.category, f.name, f.x, f.y, f.sideName || f.quadrantSide]), b = l.map((f) => ({
        shape: f.shape,
        color: f.color
      }));
      return { head: s, body: r, itsShapes: b, tableData: l };
    }), te = g(() => {
      const l = ee.value.head, u = ee.value.tableData.map((s) => [
        {
          shape: s.shape,
          color: s.color,
          name: s.category
        },
        s.name,
        O(
          t.value.style.chart.layout.labels.plotLabels.x.formatter,
          s.x,
          V({
            v: s.x,
            r: t.value.style.chart.layout.labels.plotLabels.rounding
          })
        ),
        O(
          t.value.style.chart.layout.labels.plotLabels.y.formatter,
          s.y,
          V({
            v: s.y,
            r: t.value.style.chart.layout.labels.plotLabels.rounding
          })
        ),
        s.sideName || s.quadrantSide
      ]), a = {
        th: {
          backgroundColor: t.value.table.th.backgroundColor,
          color: t.value.table.th.color,
          outline: t.value.table.th.outline
        },
        td: {
          backgroundColor: t.value.table.td.backgroundColor,
          color: t.value.table.td.color,
          outline: t.value.table.td.outline
        },
        breakpoint: t.value.table.responsiveBreakpoint
      };
      return { head: l, body: u, config: a, colNames: l };
    });
    function re(l) {
      M.value.includes(l) ? M.value = M.value.filter((a) => a !== l) : M.value.push(l);
      const u = Me();
      ue("selectLegend", u);
    }
    const Xe = g(() => Ke.value.map((l) => ({
      name: l.name,
      shape: l.shape,
      color: l.color,
      id: l.id,
      opacity: M.value.includes(l.id) ? 0.5 : 1,
      segregate: () => re(l.id),
      isSegregated: M.value.includes(l.id)
    }))), et = g(() => ({
      cy: "quadrant-div-legend",
      backgroundColor: t.value.style.chart.legend.backgroundColor,
      color: t.value.style.chart.legend.color,
      fontSize: t.value.style.chart.legend.fontSize,
      paddingBottom: 12,
      fontWeight: t.value.style.chart.legend.bold ? "bold" : ""
    }));
    function We(l) {
      switch (!0) {
        case (l.x >= 0 && l.y >= 0):
          return "tr";
        case (l.x >= 0 && l.y < 0):
          return "br";
        case (l.x < 0 && l.y < 0):
          return "bl";
        case (l.x < 0 && l.y >= 0):
          return "tl";
        default:
          return "";
      }
    }
    const U = h(null), D = h(null), ne = h(null);
    function Ye(l, u, a) {
      U.value = u.uid, D.value = {
        color: l.color,
        shape: l.shape
      }, ne.value = {
        datapoint: u,
        seriesIndex: a,
        series: C.value,
        config: t.value
      }, j.value = !0;
      const s = t.value.style.chart.tooltip.customFormat;
      if (gt(s) && mt(() => s({
        seriesIndex: a,
        datapoint: u,
        series: C.value,
        config: t.value
      })))
        oe.value = s({
          seriesIndex: a,
          datapoint: u,
          series: C.value,
          config: t.value
        });
      else {
        let r = "";
        u.quadrantSide && (r += `<div style="color:${t.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].color};font-weight:${t.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].bold ? "bold" : "400"}">${t.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text}</div>`), r += `<div>${l.name}</div>`, r += `<div style="padding-bottom:6px;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};margin-bottom:3px">${u.name}</div>`, r += `<div>${t.value.style.chart.layout.grid.xAxis.name ? t.value.style.chart.layout.grid.xAxis.name : "x"}: <b>${O(
          t.value.style.chart.layout.labels.plotLabels.x.formatter,
          u.xValue,
          V({
            v: u.xValue,
            r: t.value.style.chart.tooltip.roundingValue
          }),
          { datapoint: u, category: l, categoryIndex: a }
        )}</b></div>`, r += `<div>${t.value.style.chart.layout.grid.yAxis.name ? t.value.style.chart.layout.grid.yAxis.name : "y"}: <b>${O(
          t.value.style.chart.layout.labels.plotLabels.y.formatter,
          u.yValue,
          V({
            v: u.yValue,
            r: t.value.style.chart.tooltip.roundingValue
          }),
          { datapoint: u, category: l, categoryIndex: a }
        )}</b></div>`, oe.value = `<div style="text-align:left;font-size:${t.value.style.chart.tooltip.fontSize}px">${r}</div>`;
      }
    }
    function Ae(l, u) {
      const a = {
        category: l.name,
        shape: l.shape,
        itemName: u.name,
        x: u.xValue,
        y: u.yValue,
        quadrantSide: u.quadrantSide,
        sideName: t.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text
      };
      ue("selectPlot", a);
    }
    function E(l) {
      if (!l) return;
      const u = C.value.flatMap((s) => s.series.filter((r) => r.quadrantSide === l).map((r) => ({
        category: r.categoryName,
        itemName: r.name,
        x: r.xValue,
        y: r.yValue
      }))), a = {
        quadrantSide: l,
        sideName: t.value.style.chart.layout.labels.quadrantLabels[l].text,
        items: [...u]
      };
      ue("selectSide", a);
    }
    const w = g(() => ({
      TL: {
        tl: {
          x: e.value.left + e.value.usableWidth / 4 - 20,
          y: 0,
          fill: t.value.style.chart.layout.labels.quadrantLabels.tl.color
        },
        tr: {
          x: e.value.left + e.value.usableWidth / 4,
          y: 0,
          fill: t.value.style.chart.layout.labels.quadrantLabels.tr.color
        },
        br: {
          x: e.value.left + e.value.usableWidth / 4,
          y: 20,
          fill: t.value.style.chart.layout.labels.quadrantLabels.br.color
        },
        bl: {
          x: e.value.left + e.value.usableWidth / 4 - 20,
          y: 20,
          fill: t.value.style.chart.layout.labels.quadrantLabels.bl.color
        },
        crosshairs: {
          horizontal: `M ${e.value.left + e.value.usableWidth / 4 - 20},20 ${e.value.left + e.value.usableWidth / 4 + 20},20`,
          vertical: `M ${e.value.left + e.value.usableWidth / 4},0 ${e.value.left + e.value.usableWidth / 4},40`
        }
      },
      TR: {
        tl: {
          x: e.value.centerX + e.value.usableWidth / 4 - 20,
          y: 0,
          fill: t.value.style.chart.layout.labels.quadrantLabels.tl.color
        },
        tr: {
          x: e.value.centerX + e.value.usableWidth / 4,
          y: 0,
          fill: t.value.style.chart.layout.labels.quadrantLabels.tr.color
        },
        br: {
          x: e.value.centerX + e.value.usableWidth / 4,
          y: 20,
          fill: t.value.style.chart.layout.labels.quadrantLabels.br.color
        },
        bl: {
          x: e.value.centerX + e.value.usableWidth / 4 - 20,
          y: 20,
          fill: t.value.style.chart.layout.labels.quadrantLabels.bl.color
        },
        crosshairs: {
          horizontal: `M ${e.value.centerX + e.value.usableWidth / 4 - 20},20 ${e.value.centerX + e.value.usableWidth / 4 + 20},20`,
          vertical: `M ${e.value.centerX + e.value.usableWidth / 4},0 ${e.value.centerX + e.value.usableWidth / 4},40`
        }
      },
      BR: {
        tl: {
          x: e.value.centerX + e.value.usableWidth / 4 - 20,
          y: e.value.centerY - 48,
          fill: t.value.style.chart.layout.labels.quadrantLabels.tl.color
        },
        tr: {
          x: e.value.centerX + e.value.usableWidth / 4,
          y: e.value.centerY - 48,
          fill: t.value.style.chart.layout.labels.quadrantLabels.tr.color
        },
        br: {
          x: e.value.centerX + e.value.usableWidth / 4,
          y: e.value.centerY - 28,
          fill: t.value.style.chart.layout.labels.quadrantLabels.br.color
        },
        bl: {
          x: e.value.centerX + e.value.usableWidth / 4 - 20,
          y: e.value.centerY - 28,
          fill: t.value.style.chart.layout.labels.quadrantLabels.bl.color
        },
        crosshairs: {
          horizontal: `M ${e.value.centerX + e.value.usableWidth / 4 - 20},${e.value.centerY - 28} ${e.value.centerX + e.value.usableWidth / 4 + 20},${e.value.centerY - 28}`,
          vertical: `M ${e.value.centerX + e.value.usableWidth / 4},${e.value.centerY - 48} ${e.value.centerX + e.value.usableWidth / 4},${e.value.centerY - 8}`
        }
      },
      BL: {
        tl: {
          x: e.value.left + e.value.usableWidth / 4 - 20,
          y: e.value.centerY - 48,
          fill: t.value.style.chart.layout.labels.quadrantLabels.tl.color
        },
        tr: {
          x: e.value.left + e.value.usableWidth / 4,
          y: e.value.centerY - 48,
          fill: t.value.style.chart.layout.labels.quadrantLabels.tr.color
        },
        br: {
          x: e.value.left + e.value.usableWidth / 4,
          y: e.value.centerY - 28,
          fill: t.value.style.chart.layout.labels.quadrantLabels.br.color
        },
        bl: {
          x: e.value.left + e.value.usableWidth / 4 - 20,
          y: e.value.centerY - 28,
          fill: t.value.style.chart.layout.labels.quadrantLabels.bl.color
        },
        crosshairs: {
          horizontal: `M ${e.value.left + e.value.usableWidth / 4 - 20},${e.value.centerY - 28} ${e.value.left + e.value.usableWidth / 4 + 20},${e.value.centerY - 28}`,
          vertical: `M ${e.value.left + e.value.usableWidth / 4},${e.value.centerY - 48} ${e.value.left + e.value.usableWidth / 4},${e.value.centerY - 8}`
        }
      }
    }));
    function Me() {
      return C.value.map((l) => ({
        color: l.color,
        name: l.name,
        shape: l.shape,
        series: l.series.map((u) => ({
          name: u.name,
          x: u.xValue,
          y: u.yValue,
          quadrantSide: u.quadrantSide,
          sideName: t.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text
        }))
      }));
    }
    function Ne() {
      st(() => {
        const l = [[t.value.style.chart.title.text], [t.value.style.chart.title.subtitle.text], [""]], u = ee.value.head, a = ee.value.body, s = l.concat([u]).concat(a), r = xt(s);
        $t({ csvContent: r, title: t.value.style.chart.title.text || "vue-ui-quadrant" });
      });
    }
    const R = h(!1);
    function tt(l) {
      R.value = l, ce.value += 1;
    }
    function Oe() {
      m.value.showTable = !m.value.showTable;
    }
    function Ve() {
      m.value.plotLabels.show = !m.value.plotLabels.show;
    }
    function Pe() {
      m.value.showTooltip = !m.value.showTooltip;
    }
    const le = h(!1);
    function ie() {
      le.value = !le.value;
    }
    return De({
      getData: Me,
      generatePdf: _e,
      generateCsv: Ne,
      generateImage: Se,
      toggleTable: Oe,
      toggleLabels: Ve,
      toggleTooltip: Pe,
      toggleAnnotator: ie
    }), (l, u) => (o(), n("div", {
      class: T(`vue-ui-quadrant ${R.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${t.value.useCssAnimation ? "" : "vue-ui-dna"}`),
      ref_key: "quadrantChart",
      ref: B,
      id: `vue-ui-quadrant_${z.value}`,
      style: q(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive ? "height: 100%" : ""}`),
      onMouseenter: u[16] || (u[16] = () => y(xe)(!0)),
      onMouseleave: u[17] || (u[17] = () => y(xe)(!1))
    }, [
      t.value.userOptions.buttons.annotator ? (o(), N(Yt, {
        key: 0,
        parent: B.value,
        backgroundColor: t.value.style.chart.backgroundColor,
        color: t.value.style.chart.color,
        active: le.value,
        onClose: ie
      }, null, 8, ["parent", "backgroundColor", "color", "active"])) : c("", !0),
      Qe.value ? (o(), n("div", {
        key: 1,
        ref_key: "noTitle",
        ref: fe,
        class: "vue-data-ui-no-title-space",
        style: "height:36px; width: 100%;background:transparent"
      }, null, 512)) : c("", !0),
      t.value.style.chart.title.text ? (o(), n("div", {
        key: 2,
        ref_key: "chartTitle",
        ref: he,
        style: "width:100%;background:transparent;padding-bottom:12px"
      }, [
        (o(), N(wt, {
          key: `table_${pe.value}`,
          config: {
            title: {
              cy: "quadrant-title",
              ...t.value.style.chart.title
            },
            subtitle: {
              cy: "quadrant-subtitle",
              ...t.value.style.chart.title.subtitle
            }
          }
        }, null, 8, ["config"]))
      ], 512)) : c("", !0),
      t.value.userOptions.show && J.value && (y($e) || y(se)) ? (o(), N(_t, {
        ref_key: "details",
        ref: Ge,
        key: `user_options_${ce.value}`,
        backgroundColor: t.value.style.chart.backgroundColor,
        color: t.value.style.chart.color,
        isImaging: y(qe),
        isPrinting: y(we),
        uid: z.value,
        hasTooltip: t.value.userOptions.buttons.tooltip && t.value.style.chart.tooltip.show,
        hasPdf: t.value.userOptions.buttons.pdf,
        hasImg: t.value.userOptions.buttons.img,
        hasXls: t.value.userOptions.buttons.csv,
        hasTable: t.value.userOptions.buttons.table,
        hasLabel: t.value.userOptions.buttons.labels,
        hasFullscreen: t.value.userOptions.buttons.fullscreen,
        isFullscreen: R.value,
        isTooltip: m.value.showTooltip,
        titles: { ...t.value.userOptions.buttonTitles },
        chartElement: B.value,
        position: t.value.userOptions.position,
        hasAnnotator: t.value.userOptions.buttons.annotator,
        isAnnotation: le.value,
        onToggleFullscreen: tt,
        onGeneratePdf: y(_e),
        onGenerateCsv: Ne,
        onGenerateImage: y(Se),
        onToggleTable: Oe,
        onToggleLabels: Ve,
        onToggleTooltip: Pe,
        onToggleAnnotator: ie,
        style: q({
          visibility: y($e) ? y(se) ? "visible" : "hidden" : "visible"
        })
      }, ut({ _: 2 }, [
        l.$slots.optionTooltip ? {
          name: "optionTooltip",
          fn: $(() => [
            k(l.$slots, "optionTooltip", {}, void 0, !0)
          ]),
          key: "0"
        } : void 0,
        l.$slots.optionPdf ? {
          name: "optionPdf",
          fn: $(() => [
            k(l.$slots, "optionPdf", {}, void 0, !0)
          ]),
          key: "1"
        } : void 0,
        l.$slots.optionCsv ? {
          name: "optionCsv",
          fn: $(() => [
            k(l.$slots, "optionCsv", {}, void 0, !0)
          ]),
          key: "2"
        } : void 0,
        l.$slots.optionImg ? {
          name: "optionImg",
          fn: $(() => [
            k(l.$slots, "optionImg", {}, void 0, !0)
          ]),
          key: "3"
        } : void 0,
        l.$slots.optionTable ? {
          name: "optionTable",
          fn: $(() => [
            k(l.$slots, "optionTable", {}, void 0, !0)
          ]),
          key: "4"
        } : void 0,
        l.$slots.optionLabels ? {
          name: "optionLabels",
          fn: $(() => [
            k(l.$slots, "optionLabels", {}, void 0, !0)
          ]),
          key: "5"
        } : void 0,
        l.$slots.optionFullscreen ? {
          name: "optionFullscreen",
          fn: $(({ toggleFullscreen: a, isFullscreen: s }) => [
            k(l.$slots, "optionFullscreen", G(Q({ toggleFullscreen: a, isFullscreen: s })), void 0, !0)
          ]),
          key: "6"
        } : void 0,
        l.$slots.optionAnnotator ? {
          name: "optionAnnotator",
          fn: $(({ toggleAnnotator: a, isAnnotator: s }) => [
            k(l.$slots, "optionAnnotator", G(Q({ toggleAnnotator: a, isAnnotator: s })), void 0, !0)
          ]),
          key: "7"
        } : void 0
      ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : c("", !0),
      J.value ? (o(), n("svg", {
        key: 4,
        xmlns: y(yt),
        class: T({ "vue-data-ui-fullscreen--on": R.value, "vue-data-ui-fulscreen--off": !R.value }),
        viewBox: `${i.value.startX} ${i.value.startY} ${i.value.width} ${i.value.height}`,
        style: q(`max-width:100%;overflow:${p.value ? "hidden" : "visible"};background:transparent;color:${t.value.style.chart.color}`),
        id: `svg_${z.value}`
      }, [
        ve(Wt),
        l.$slots["chart-background"] ? (o(), n("foreignObject", {
          key: 0,
          x: i.value.startX,
          y: i.value.startY,
          width: i.value.width,
          height: i.value.height,
          style: {
            pointerEvents: "none"
          }
        }, [
          k(l.$slots, "chart-background", {}, void 0, !0)
        ], 8, Vt)) : c("", !0),
        d("defs", null, [
          (o(!0), n(S, null, Y(C.value, (a, s) => (o(), n("radialGradient", {
            cx: "50%",
            cy: "50%",
            r: "50%",
            fx: "50%",
            fy: "50%",
            id: `quadrant_gradient_${z.value}_${s}`
          }, [
            d("stop", {
              offset: "0%",
              "stop-color": y(ae)(y(bt)(a.color, 0.05), t.value.style.chart.layout.areas.opacity)
            }, null, 8, Bt),
            d("stop", {
              offset: "100%",
              "stop-color": y(ae)(a.color, t.value.style.chart.layout.areas.opacity)
            }, null, 8, Ft)
          ], 8, Pt))), 256))
        ]),
        t.value.style.chart.layout.grid.graduations.show ? (o(), n("g", Rt, [
          (o(!0), n(S, null, Y(je.value, (a) => (o(), n("rect", {
            fill: t.value.style.chart.layout.grid.graduations.fill ? y(ae)(t.value.style.chart.layout.grid.graduations.color, a.opacity) : "none",
            x: a.x,
            y: a.y,
            height: a.height <= 0 ? 1e-3 : a.height,
            width: a.width <= 0 ? 1e-3 : a.width,
            "stroke-width": t.value.style.chart.layout.grid.graduations.strokeWidth,
            stroke: t.value.style.chart.layout.grid.graduations.stroke,
            rx: t.value.style.chart.layout.grid.graduations.roundingForce
          }, null, 8, Ht))), 256))
        ])) : c("", !0),
        d("line", {
          x1: e.value.left,
          y1: e.value.centerY,
          x2: e.value.right,
          y2: e.value.centerY,
          stroke: t.value.style.chart.layout.grid.stroke,
          "stroke-width": t.value.style.chart.layout.grid.strokeWidth
        }, null, 8, It),
        d("line", {
          x1: e.value.centerX,
          y1: e.value.top,
          x2: e.value.centerX,
          y2: e.value.bottom,
          stroke: t.value.style.chart.layout.grid.stroke,
          "stroke-width": t.value.style.chart.layout.grid.strokeWidth
        }, null, 8, Ut),
        t.value.style.chart.layout.grid.showArrows ? (o(), n("g", Dt, [
          d("polygon", {
            points: `${e.value.right - 8},${e.value.centerY - 6} ${e.value.right},${e.value.centerY} ${e.value.right - 8},${e.value.centerY + 6}`,
            fill: t.value.style.chart.layout.grid.stroke,
            stroke: "none"
          }, null, 8, Et),
          d("polygon", {
            points: `${e.value.left + 8},${e.value.centerY - 6} ${e.value.left},${e.value.centerY} ${e.value.left + 8},${e.value.centerY + 6}`,
            fill: t.value.style.chart.layout.grid.stroke,
            stroke: "none"
          }, null, 8, Gt),
          d("polygon", {
            points: `${e.value.centerX - 6},${e.value.top + 8} ${e.value.centerX},${e.value.top} ${e.value.centerX + 6},${e.value.top + 8}`,
            fill: t.value.style.chart.layout.grid.stroke,
            stroke: "none"
          }, null, 8, Qt),
          d("polygon", {
            points: `${e.value.centerX - 6},${e.value.bottom - 8} ${e.value.centerX},${e.value.bottom} ${e.value.centerX + 6},${e.value.bottom - 8}`,
            fill: t.value.style.chart.layout.grid.stroke,
            stroke: "none"
          }, null, 8, Jt)
        ])) : c("", !0),
        t.value.style.chart.layout.labels.quadrantLabels.show && !p.value ? (o(), n("g", jt, [
          t.value.style.chart.layout.labels.quadrantLabels.tl.text ? (o(), n("text", {
            key: 0,
            x: 0,
            y: e.value.top - e.value.padding / 2,
            "text-anchor": "start",
            fill: t.value.style.chart.layout.labels.quadrantLabels.tl.color,
            "font-size": t.value.style.chart.layout.labels.quadrantLabels.tl.fontSize,
            style: q(`font-weight:${t.value.style.chart.layout.labels.quadrantLabels.tl.bold ? "bold" : ""}`),
            onClick: u[0] || (u[0] = (a) => E("tl"))
          }, L(t.value.style.chart.layout.labels.quadrantLabels.tl.text), 13, Zt)) : c("", !0),
          t.value.style.chart.layout.labels.quadrantLabels.tr.text ? (o(), n("text", {
            key: 1,
            x: e.value.width,
            y: e.value.top - e.value.padding / 2,
            "text-anchor": "end",
            fill: t.value.style.chart.layout.labels.quadrantLabels.tr.color,
            "font-size": t.value.style.chart.layout.labels.quadrantLabels.tr.fontSize,
            style: q(`font-weight:${t.value.style.chart.layout.labels.quadrantLabels.tr.bold ? "bold" : ""}`),
            onClick: u[1] || (u[1] = (a) => E("tr"))
          }, L(t.value.style.chart.layout.labels.quadrantLabels.tr.text), 13, Kt)) : c("", !0),
          t.value.style.chart.layout.labels.quadrantLabels.br.text ? (o(), n("text", {
            key: 2,
            x: e.value.width,
            y: e.value.bottom + e.value.padding * 0.7,
            "text-anchor": "end",
            fill: t.value.style.chart.layout.labels.quadrantLabels.br.color,
            "font-size": t.value.style.chart.layout.labels.quadrantLabels.br.fontSize,
            style: q(`font-weight:${t.value.style.chart.layout.labels.quadrantLabels.br.bold ? "bold" : ""}`),
            onClick: u[2] || (u[2] = (a) => E("br"))
          }, L(t.value.style.chart.layout.labels.quadrantLabels.br.text), 13, el)) : c("", !0),
          t.value.style.chart.layout.labels.quadrantLabels.bl.text ? (o(), n("text", {
            key: 3,
            x: 0,
            y: e.value.bottom + e.value.padding * 0.7,
            "text-anchor": "start",
            fill: t.value.style.chart.layout.labels.quadrantLabels.bl.color,
            "font-size": t.value.style.chart.layout.labels.quadrantLabels.bl.fontSize,
            style: q(`font-weight:${t.value.style.chart.layout.labels.quadrantLabels.bl.bold ? "bold" : ""}`),
            onClick: u[3] || (u[3] = (a) => E("bl"))
          }, L(t.value.style.chart.layout.labels.quadrantLabels.bl.text), 13, tl)) : c("", !0)
        ])) : c("", !0),
        t.value.style.chart.layout.labels.axisLabels.show ? (o(), n("g", ll, [
          d("text", {
            x: e.value.centerX,
            y: e.value.top - e.value.padding / 6,
            "text-anchor": "middle",
            "font-size": t.value.style.chart.layout.labels.axisLabels.fontSize,
            fill: t.value.style.chart.layout.labels.axisLabels.color.positive
          }, L(y(O)(
            t.value.style.chart.layout.labels.plotLabels.y.formatter,
            _.value.y.max,
            y(V)({
              v: _.value.y.max,
              r: t.value.style.chart.layout.labels.plotLabels.rounding
            })
          )), 9, al),
          d("text", {
            x: e.value.centerX,
            y: e.value.top - e.value.padding / 2,
            "text-anchor": "middle",
            "font-size": t.value.style.chart.layout.labels.axisLabels.fontSize,
            fill: t.value.style.chart.layout.labels.axisLabels.color.positive
          }, L(t.value.style.chart.layout.grid.yAxis.name), 9, ul),
          d("text", {
            x: e.value.centerX,
            y: e.value.bottom + e.value.padding * 0.35,
            "text-anchor": "middle",
            "font-size": t.value.style.chart.layout.labels.axisLabels.fontSize,
            fill: t.value.style.chart.layout.labels.axisLabels.color.negative
          }, L(y(O)(
            t.value.style.chart.layout.labels.plotLabels.y.formatter,
            _.value.y.min,
            y(V)({
              v: _.value.y.min,
              r: t.value.style.chart.layout.labels.plotLabels.rounding
            })
          )), 9, ol),
          d("text", {
            id: `xLabelMin_${z.value}`,
            "text-anchor": "middle",
            "font-size": t.value.style.chart.layout.labels.axisLabels.fontSize,
            transform: `translate(${e.value.padding - t.value.style.chart.layout.labels.axisLabels.fontSize}, ${e.value.height / 2}), rotate(-90)`,
            fill: t.value.style.chart.layout.labels.axisLabels.color.negative
          }, L(y(O)(
            t.value.style.chart.layout.labels.plotLabels.x.formatter,
            _.value.x.min,
            y(V)({
              v: _.value.x.min,
              r: t.value.style.chart.layout.labels.plotLabels.rounding
            })
          )), 9, sl),
          d("text", {
            id: `xLabelMax_${z.value}`,
            "text-anchor": "middle",
            "font-size": t.value.style.chart.layout.labels.axisLabels.fontSize,
            transform: `translate(${e.value.width - e.value.padding + t.value.style.chart.layout.labels.axisLabels.fontSize}, ${e.value.height / 2}), rotate(90)`,
            fill: t.value.style.chart.layout.labels.axisLabels.color.positive
          }, L(y(O)(
            t.value.style.chart.layout.labels.plotLabels.x.formatter,
            _.value.x.max,
            y(V)({
              v: _.value.x.max,
              r: t.value.style.chart.layout.labels.plotLabels.rounding
            })
          )), 9, rl),
          d("text", {
            id: `xLabelMaxName_${z.value}`,
            "text-anchor": "middle",
            "font-size": t.value.style.chart.layout.labels.axisLabels.fontSize,
            transform: `translate(${e.value.width - t.value.style.chart.layout.labels.axisLabels.fontSize}, ${e.value.height / 2}), rotate(90)`,
            fill: t.value.style.chart.layout.labels.axisLabels.color.positive
          }, L(t.value.style.chart.layout.grid.xAxis.name), 9, nl)
        ])) : c("", !0),
        t.value.style.chart.layout.areas.show ? (o(), n("g", il, [
          (o(!0), n(S, null, Y(C.value, (a, s) => (o(), n("g", null, [
            a.series.length > 2 ? (o(), n("polygon", {
              key: 0,
              "data-cy-quadrant-area": "",
              fill: t.value.style.chart.layout.areas.useGradient ? `url(#quadrant_gradient_${z.value}_${s})` : y(ae)(a.color, t.value.style.chart.layout.areas.opacity),
              points: y(ft)(a)
            }, null, 8, vl)) : c("", !0)
          ]))), 256))
        ])) : c("", !0),
        d("g", null, [
          d("rect", {
            onClick: u[4] || (u[4] = (a) => A("TL")),
            x: e.value.left,
            y: e.value.top,
            width: e.value.usableWidth / 2 <= 0 ? 1e-3 : e.value.usableWidth / 2,
            height: e.value.usableHeight / 2 <= 0 ? 1e-3 : e.value.usableHeight / 2,
            fill: "transparent",
            class: T({ "vue-data-ui-zoom-plus": !p.value, "vue-data-ui-zoom-minus": p.value })
          }, null, 10, dl),
          d("rect", {
            onClick: u[5] || (u[5] = (a) => A("TR")),
            x: e.value.centerX,
            y: e.value.top,
            width: e.value.usableWidth / 2 <= 0 ? 1e-3 : e.value.usableWidth / 2,
            height: e.value.usableHeight / 2 <= 0 ? 1e-3 : e.value.usableHeight / 2,
            fill: "transparent",
            class: T({ "vue-data-ui-zoom-plus": !p.value, "vue-data-ui-zoom-minus": p.value })
          }, null, 10, cl),
          d("rect", {
            onClick: u[6] || (u[6] = (a) => A("BR")),
            x: e.value.centerX,
            y: e.value.centerY,
            width: e.value.usableWidth / 2 <= 0 ? 1e-3 : e.value.usableWidth / 2,
            height: e.value.usableHeight / 2 <= 0 ? 1e-3 : e.value.usableHeight / 2,
            fill: "transparent",
            class: T({ "vue-data-ui-zoom-plus": !p.value, "vue-data-ui-zoom-minus": p.value })
          }, null, 10, hl),
          d("rect", {
            onClick: u[7] || (u[7] = (a) => A("BL")),
            x: e.value.left,
            y: e.value.centerY,
            width: e.value.usableWidth / 2 <= 0 ? 1e-3 : e.value.usableWidth / 2,
            height: e.value.usableHeight / 2 <= 0 ? 1e-3 : e.value.usableHeight / 2,
            fill: "transparent",
            class: T({ "vue-data-ui-zoom-plus": !p.value, "vue-data-ui-zoom-minus": p.value })
          }, null, 10, yl)
        ]),
        t.value.style.chart.layout.labels.plotLabels.showAsTag ? (o(), n(S, { key: 7 }, [
          m.value.plotLabels.show ? (o(), n("g", pl, [
            (o(!0), n(S, null, Y(C.value, (a, s) => (o(), n(S, null, [
              (o(!0), n(S, null, Y(a.series, (r) => (o(), n("foreignObject", {
                style: { overflow: "visible" },
                height: "10",
                width: "100",
                x: r.x - 50,
                y: r.y - t.value.style.chart.layout.labels.plotLabels.fontSize,
                onMouseover: (b) => Ye(a, r, s),
                onMouseleave: u[9] || (u[9] = (b) => {
                  j.value = !1, U.value = null, D.value = null;
                }),
                onClick: (b) => Ae(a, r)
              }, [
                d("div", {
                  style: q(`color:${y(pt)(a.color)};margin: 0 auto; font-size:${t.value.style.chart.layout.labels.plotLabels.fontSize}px; text-align:center;background:${a.color}; padding: 2px 4px; border-radius: 12px; height: ${t.value.style.chart.layout.labels.plotLabels.fontSize * 1.5}px`)
                }, L(r.name), 5)
              ], 40, gl))), 256))
            ], 64))), 256))
          ])) : c("", !0)
        ], 64)) : (o(), n(S, { key: 6 }, [
          (o(!0), n(S, null, Y(C.value, (a, s) => (o(), n("g", null, [
            (o(!0), n(S, null, Y(a.series, (r) => (o(), N(He, {
              color: a.color,
              isSelected: U.value && r.uid === U.value,
              plot: r,
              radius: t.value.style.chart.layout.plots.radius / (p.value ? 1.5 : 1),
              shape: a.shape,
              stroke: t.value.style.chart.layout.plots.outline ? t.value.style.chart.layout.plots.outlineColor : "none",
              strokeWidth: t.value.style.chart.layout.plots.outlineWidth,
              onMouseover: (b) => Ye(a, r, s),
              onMouseleave: u[8] || (u[8] = (b) => {
                j.value = !1, U.value = null, D.value = null;
              }),
              onClick: (b) => Ae(a, r)
            }, null, 8, ["color", "isSelected", "plot", "radius", "shape", "stroke", "strokeWidth", "onMouseover", "onClick"]))), 256))
          ]))), 256)),
          m.value.plotLabels.show ? (o(), n("g", bl, [
            (o(!0), n(S, null, Y(C.value, (a) => (o(), n("g", null, [
              (o(!0), n(S, null, Y(a.series, (s) => (o(), n("text", {
                x: s.x,
                y: s.y + t.value.style.chart.layout.labels.plotLabels.offsetY + t.value.style.chart.layout.plots.radius,
                "text-anchor": "middle",
                "font-size": t.value.style.chart.layout.labels.plotLabels.fontSize / (p.value ? 1.5 : 1),
                fill: t.value.style.chart.layout.labels.plotLabels.color
              }, L(s.name), 9, fl))), 256))
            ]))), 256))
          ])) : c("", !0)
        ], 64)),
        p.value ? (o(), n("g", ml, [
          v.value === "TL" ? (o(), n("polygon", {
            key: 0,
            points: `${e.value.left - 1},${e.value.centerY} ${e.value.centerX},${e.value.centerY} ${e.value.centerX},${e.value.top - 1} ${e.value.right},${e.value.top - 1} ${e.value.right},${e.value.bottom} ${e.value.left - 1},${e.value.bottom} ${e.value.left - 1},${e.value.centerY}`,
            fill: t.value.style.chart.backgroundColor,
            style: { opacity: "1" }
          }, null, 8, xl)) : c("", !0),
          v.value === "TR" ? (o(), n("polygon", {
            key: 1,
            points: `${e.value.left},${e.value.top - 1} ${e.value.centerX},${e.value.top - 1} ${e.value.centerX},${e.value.centerY} ${e.value.right + 1},${e.value.centerY} ${e.value.right + 1},${e.value.bottom} ${e.value.left},${e.value.bottom} ${e.value.left},${e.value.top - 1}`,
            fill: t.value.style.chart.backgroundColor,
            style: { opacity: "1" }
          }, null, 8, $l)) : c("", !0),
          v.value === "BR" ? (o(), n("polygon", {
            key: 2,
            points: `${e.value.left},${e.value.top} ${e.value.right + 1},${e.value.top} ${e.value.right + 1},${e.value.centerY} ${e.value.centerX},${e.value.centerY} ${e.value.centerX},${e.value.bottom + 1} ${e.value.left},${e.value.bottom + 1} ${e.value.left},${e.value.top}`,
            fill: t.value.style.chart.backgroundColor,
            style: { opacity: "1" }
          }, null, 8, kl)) : c("", !0),
          v.value === "BL" ? (o(), n("polygon", {
            key: 3,
            points: `${e.value.left - 1},${e.value.top} ${e.value.right},${e.value.top} ${e.value.right},${e.value.bottom + 1} ${e.value.centerX},${e.value.bottom + 1} ${e.value.centerX},${e.value.centerY} ${e.value.left - 1},${e.value.centerY} ${e.value.left - 1},${e.value.top}`,
            fill: t.value.style.chart.backgroundColor,
            style: { opacity: "1" }
          }, null, 8, Ll)) : c("", !0)
        ])) : c("", !0),
        v.value && !K.value ? (o(), n("g", wl, [
          d("text", {
            x: P.value.x,
            y: P.value.y - P.value.fontSize / 1.5,
            "font-size": P.value.fontSize / 1.5,
            fill: P.value.fill,
            "text-anchor": "middle",
            "font-weight": P.value.bold ? "bold" : "normal"
          }, L(P.value.text), 9, ql)
        ])) : c("", !0),
        p.value && v.value ? (o(), n("g", _l, [
          d("rect", {
            x: w.value[v.value].tl.x,
            y: w.value[v.value].tl.y,
            height: "20",
            width: "20",
            fill: w.value[v.value].tl.fill,
            style: q(`cursor: pointer; opacity: ${v.value === "TL" ? 1 : 0.2}`),
            onClick: u[10] || (u[10] = (a) => A("TL")),
            class: T({ "vue-ui-quadrant-mini-map-cell": !0, "vue-ui-quadrant-mini-map-cell-selectable": v.value !== "TL" })
          }, null, 14, Sl),
          d("rect", {
            x: w.value[v.value].tr.x,
            y: w.value[v.value].tr.y,
            height: "20",
            width: "20",
            fill: w.value[v.value].tr.fill,
            style: q(`cursor: pointer; opacity: ${v.value === "TR" ? 1 : 0.2}`),
            onClick: u[11] || (u[11] = (a) => A("TR")),
            class: T({ "vue-ui-quadrant-mini-map-cell": !0, "vue-ui-quadrant-mini-map-cell-selectable": v.value !== "TR" })
          }, null, 14, Cl),
          d("rect", {
            x: w.value[v.value].br.x,
            y: w.value[v.value].br.y,
            height: "20",
            width: "20",
            fill: w.value[v.value].br.fill,
            style: q(`cursor: pointer; opacity: ${v.value === "BR" ? 1 : 0.2}`),
            onClick: u[12] || (u[12] = (a) => A("BR")),
            class: T({ "vue-ui-quadrant-mini-map-cell": !0, "vue-ui-quadrant-mini-map-cell-selectable": v.value !== "BR" })
          }, null, 14, zl),
          d("rect", {
            x: w.value[v.value].bl.x,
            y: w.value[v.value].bl.y,
            height: "20",
            width: "20",
            fill: w.value[v.value].bl.fill,
            style: q(`cursor: pointer; opacity: ${v.value === "BL" ? 1 : 0.2}`),
            onClick: u[13] || (u[13] = (a) => A("BL")),
            class: T({ "vue-ui-quadrant-mini-map-cell": !0, "vue-ui-quadrant-mini-map-cell-selectable": v.value !== "BL" })
          }, null, 14, Tl),
          d("path", {
            class: "vue-ui-quadrant-minimap-crosshairs",
            stroke: t.value.style.chart.backgroundColor,
            "stroke-width": 1,
            d: w.value[v.value].crosshairs.horizontal
          }, null, 8, Xl),
          d("path", {
            class: "vue-ui-quadrant-minimap-crosshairs",
            stroke: t.value.style.chart.backgroundColor,
            "stroke-width": 1,
            d: w.value[v.value].crosshairs.vertical
          }, null, 8, Wl)
        ])) : c("", !0),
        k(l.$slots, "svg", { svg: e.value }, void 0, !0)
      ], 14, Ot)) : c("", !0),
      l.$slots.watermark ? (o(), n("div", Yl, [
        k(l.$slots, "watermark", G(Q({ isPrinting: y(we) || y(qe) })), void 0, !0)
      ])) : c("", !0),
      J.value ? c("", !0) : (o(), N(Tt, {
        key: 6,
        config: {
          type: "quadrant",
          style: {
            backgroundColor: t.value.style.chart.backgroundColor,
            quadrant: {
              grid: {
                color: t.value.style.chart.layout.grid.stroke
              },
              plots: {
                color: t.value.style.chart.layout.grid.stroke,
                radius: 1
              }
            }
          }
        }
      }, null, 8, ["config"])),
      d("div", {
        ref_key: "chartLegend",
        ref: ye
      }, [
        t.value.style.chart.legend.show ? (o(), N(Ct, {
          key: `legend_${me.value}`,
          legendSet: Xe.value,
          config: et.value,
          onClickMarker: u[14] || (u[14] = ({ legend: a }) => re(a.id))
        }, {
          item: $(({ legend: a }) => [
            d("div", {
              "data-cy-legend-item": "",
              onClick: (s) => re(a.id),
              style: q(`opacity:${M.value.includes(a.id) ? 0.5 : 1}`)
            }, L(a.name), 13, Al)
          ]),
          _: 1
        }, 8, ["legendSet", "config"])) : k(l.$slots, "legend", {
          key: 1,
          legend: Xe.value
        }, void 0, !0)
      ], 512),
      l.$slots.source ? (o(), n("div", {
        key: 7,
        ref_key: "source",
        ref: be,
        dir: "auto"
      }, [
        k(l.$slots, "source", {}, void 0, !0)
      ], 512)) : c("", !0),
      ve(St, {
        show: m.value.showTooltip && j.value,
        backgroundColor: t.value.style.chart.tooltip.backgroundColor,
        color: t.value.style.chart.tooltip.color,
        borderRadius: t.value.style.chart.tooltip.borderRadius,
        borderColor: t.value.style.chart.tooltip.borderColor,
        borderWidth: t.value.style.chart.tooltip.borderWidth,
        fontSize: t.value.style.chart.tooltip.fontSize,
        backgroundOpacity: t.value.style.chart.tooltip.backgroundOpacity,
        position: t.value.style.chart.tooltip.position,
        offsetY: t.value.style.chart.tooltip.offsetY,
        parent: B.value,
        content: oe.value,
        isFullscreen: R.value,
        isCustom: t.value.style.chart.tooltip.customFormat && typeof t.value.style.chart.tooltip.customFormat == "function"
      }, {
        "tooltip-before": $(() => [
          k(l.$slots, "tooltip-before", G(Q({ ...ne.value })), void 0, !0)
        ]),
        "tooltip-after": $(() => [
          k(l.$slots, "tooltip-after", G(Q({ ...ne.value })), void 0, !0)
        ]),
        default: $(() => [
          t.value.style.chart.tooltip.showShape ? (o(), n("svg", Ml, [
            ve(He, {
              plot: { x: 10, y: 10 },
              shape: D.value.shape,
              color: D.value.color,
              radius: 8,
              stroke: t.value.style.chart.layout.plots.outline ? t.value.style.chart.layout.plots.outlineColor : "none",
              "stroke-width": t.value.style.chart.layout.plots.outlineWidth
            }, null, 8, ["shape", "color", "stroke", "stroke-width"])
          ])) : c("", !0)
        ]),
        _: 3
      }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
      J.value ? (o(), N(Xt, {
        key: 8,
        hideDetails: "",
        config: {
          open: m.value.showTable,
          maxHeight: 1e4,
          body: {
            backgroundColor: t.value.style.chart.backgroundColor,
            color: t.value.style.chart.color
          },
          head: {
            backgroundColor: t.value.style.chart.backgroundColor,
            color: t.value.style.chart.color
          }
        }
      }, {
        content: $(() => [
          (o(), N(zt, {
            key: `table_${ge.value}`,
            colNames: te.value.colNames,
            head: te.value.head,
            body: te.value.body,
            config: te.value.config,
            title: `${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text ? ` : ${t.value.style.chart.title.subtitle.text}` : ""}`,
            onClose: u[15] || (u[15] = (a) => m.value.showTable = !1)
          }, {
            th: $(({ th: a }) => [
              ot(L(a), 1)
            ]),
            td: $(({ td: a }) => [
              d("div", {
                innerHTML: a.name || a
              }, null, 8, Nl)
            ]),
            _: 1
          }, 8, ["colNames", "head", "body", "config", "title"]))
        ]),
        _: 1
      }, 8, ["config"])) : c("", !0)
    ], 46, Nt));
  }
}, ea = /* @__PURE__ */ Mt(Ol, [["__scopeId", "data-v-e33b0c6f"]]);
export {
  ea as default
};
