import { computed as g, ref as h, watch as Oe, onMounted as Ke, onBeforeUnmount as et, openBlock as o, createElementBlock as n, normalizeClass as T, normalizeStyle as q, createBlock as N, createCommentVNode as c, unref as y, createSlots as tt, withCtx as x, renderSlot as L, normalizeProps as G, guardReactiveProps as Q, createVNode as ie, createElementVNode as v, Fragment as C, renderList as Y, toDisplayString as $, createTextVNode as lt, nextTick as at } from "vue";
import { u as ut, c as Be, t as ot, a as st, p as ve, o as rt, e as H, b as nt, T as it, d as vt, i as P, f as O, X as dt, s as ae, w as ct, U as ht, G as yt, x as bt, y as ft, q as pt, r as gt } from "./index-Cm2_6s9o.js";
import { t as mt, u as xt } from "./useResponsive-CoxXLe23.js";
import { _ as $t } from "./Title-Coit3NcT.js";
import { u as kt, U as Lt } from "./usePrinter-Cx8U1e30.js";
import { _ as wt } from "./Tooltip-BBgfUr4a.js";
import { _ as Ve } from "./Shape-C-sY_hlc.js";
import { L as _t } from "./Legend-DRozxv9L.js";
import { D as qt } from "./DataTable-NGi-FgLM.js";
import Ct from "./vue-ui-skeleton-BUS6A44x.js";
import St from "./vue-ui-accordion-CxrNF8BI.js";
import { u as Fe } from "./useNestedProp-BYPZJNhi.js";
import { _ as zt } from "./PackageVersion-CTMY4zeY.js";
import { P as Tt } from "./PenAndPaper-DJ_d10S-.js";
import { _ as Wt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const Xt = ["id"], Yt = ["xmlns", "viewBox", "id"], At = ["id"], Mt = ["stop-color"], Nt = ["stop-color"], Pt = { key: 0 }, Ot = ["fill", "x", "y", "height", "width", "stroke-width", "stroke", "rx"], Bt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Vt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Ft = { key: 1 }, Rt = ["points", "fill"], Ht = ["points", "fill"], It = ["points", "fill"], Dt = ["points", "fill"], Ut = { key: 2 }, Et = ["y", "fill", "font-size"], Gt = ["x", "y", "fill", "font-size"], Qt = ["x", "y", "fill", "font-size"], Jt = ["y", "fill", "font-size"], jt = { key: 3 }, Zt = ["x", "y", "font-size", "fill"], Kt = ["x", "y", "font-size", "fill"], el = ["x", "y", "font-size", "fill"], tl = ["id", "font-size", "transform", "fill"], ll = ["id", "font-size", "transform", "fill"], al = ["id", "font-size", "transform", "fill"], ul = { key: 4 }, ol = ["fill", "points"], sl = ["x", "y", "width", "height"], rl = ["x", "y", "width", "height"], nl = ["x", "y", "width", "height"], il = ["x", "y", "width", "height"], vl = {
  key: 0,
  style: { "pointer-events": "none" }
}, dl = ["x", "y", "font-size", "fill"], cl = { key: 0 }, hl = ["x", "y", "onMouseover", "onClick"], yl = {
  key: 7,
  class: "vue-ui-dna"
}, bl = ["points", "fill"], fl = ["points", "fill"], pl = ["points", "fill"], gl = ["points", "fill"], ml = { key: 8 }, xl = ["x", "y", "font-size", "fill", "font-weight"], $l = { key: 9 }, kl = ["x", "y", "fill"], Ll = ["x", "y", "fill"], wl = ["x", "y", "fill"], _l = ["x", "y", "fill"], ql = ["stroke", "d"], Cl = ["stroke", "d"], Sl = {
  key: 5,
  class: "vue-data-ui-watermark"
}, zl = ["onClick"], Tl = {
  key: 0,
  height: "14",
  width: "14",
  viewBox: "0 0 20 20"
}, Wl = ["innerHTML"], Xl = {
  __name: "vue-ui-quadrant",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  emits: ["selectPlot", "selectSide", "selectLegend"],
  setup(Re, { expose: He, emit: ue }) {
    const W = Re, { vue_ui_quadrant: Ie } = ut(), J = g(() => !!W.dataset && W.dataset.length), z = h(Be()), De = h(null), j = h(!1), oe = h(""), de = h(0), p = h(!1), V = h(null), ce = h(null), he = h(null), ye = h(null), be = h(null), fe = h(0), pe = h(0), ge = h(0), t = g({
      get: () => me(),
      set: (l) => l
    });
    function me() {
      const l = Fe({
        userConfig: W.config,
        defaultConfig: Ie
      });
      return l.theme ? {
        ...Fe({
          userConfig: ot.vue_ui_quadrant[l.theme] || W.config,
          defaultConfig: l
        }),
        customPalette: st[l.theme] || ve
      } : l;
    }
    Oe(() => W.config, (l) => {
      t.value = me(), xe(), fe.value += 1, pe.value += 1, ge.value += 1;
    }, { deep: !0 });
    const Z = h(null);
    function xe() {
      if (rt(W.dataset) ? H({
        componentName: "VueUiQuadrant",
        type: "dataset"
      }) : W.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 = mt(() => {
          const { width: u, height: a } = xt({
            chart: V.value,
            title: t.value.style.chart.title.text ? ce.value : null,
            legend: t.value.style.chart.legend.show ? he.value : null,
            source: ye.value,
            noTitle: be.value
          });
          m.value = 48, e.value.height = a, e.value.usableHeight = a - m.value * 2, e.value.width = u, e.value.usableWidth = u - m.value * 2, e.value.top = m.value, e.value.left = m.value, e.value.right = u - m.value, e.value.bottom = a - m.value, e.value.centerX = u / 2, e.value.centerY = a - a / 2, e.value.padding = m.value;
        });
        Z.value = new ResizeObserver(l), Z.value.observe(V.value.parentNode);
      }
    }
    Ke(() => {
      xe();
    }), et(() => {
      Z.value && Z.value.disconnect();
    });
    const { isPrinting: $e, isImaging: ke, generatePdf: Le, generateImage: we } = kt({
      elementId: `vue-ui-quadrant_${z.value}`,
      fileName: t.value.style.chart.title.text || "vue-ui-quadrant"
    }), Ue = g(() => t.value.userOptions.show && !t.value.style.chart.title.text), _e = g(() => nt(t.value.customPalette)), w = h({
      plotLabels: {
        show: t.value.style.chart.layout.labels.plotLabels.show
      },
      showTable: t.value.table.show,
      showTooltip: t.value.style.chart.tooltip.show
    }), m = h(48), e = h({
      height: t.value.style.chart.height,
      usableHeight: t.value.style.chart.height - m.value * 2,
      width: t.value.style.chart.width,
      usableWidth: t.value.style.chart.width - m.value * 2,
      top: m.value,
      left: m.value,
      right: t.value.style.chart.width - m.value,
      bottom: t.value.style.chart.height - m.value,
      centerX: t.value.style.chart.width / 2,
      centerY: t.value.style.chart.height - t.value.style.chart.height / 2,
      padding: m.value
    }), d = h({
      ...JSON.parse(JSON.stringify(e.value)),
      startX: 0,
      startY: 0
    });
    Oe(() => e.value, (l) => {
      l && (d.value = {
        ...JSON.parse(JSON.stringify(e.value)),
        startX: 0,
        startY: 0
      });
    }, { deep: !0 });
    const i = h(null), B = g(() => {
      switch (i.value) {
        case "TL":
          return {
            x: d.value.startX + d.value.width / 2,
            y: d.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: d.value.startX + d.value.width / 2,
            y: d.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: d.value.startX + d.value.width / 2,
            y: d.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: d.value.startX + d.value.width / 2,
            y: d.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 };
      }
    }), Ee = h(null), K = h(!1);
    function I({ targetX: l, targetY: u, targetW: a, targetH: s, side: r }) {
      i.value && E(r);
      const b = {
        x: l - d.value.startX,
        y: u - d.value.startY,
        w: a - d.value.width,
        h: s - d.value.height
      }, f = t.value.zoomAnimationFrames;
      let X = 0;
      function Pe() {
        K.value = !0, d.value.startX += b.x / f, d.value.startY += b.y / f, d.value.width += b.w / f, d.value.height += b.h / f, X += 1, X < f ? Ee.value = requestAnimationFrame(Pe) : K.value = !1;
      }
      Pe();
    }
    function A(l) {
      if (!K.value)
        if (p.value && i.value === l)
          I({
            targetX: 0,
            targetY: 0,
            targetW: e.value.width,
            targetH: e.value.height
          }), i.value = null, p.value = !1;
        else {
          switch (i.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:
              d.value.startX = 0, d.value.startY = 0, d.value.width = e.value.width, d.value.height = e.value.height;
              break;
          }
          p.value = !0;
        }
    }
    const Ge = 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(() => W.dataset.map((l, u) => ({
      ...l,
      series: it({
        data: l.series,
        threshold: t.value.downsample.threshold
      }),
      id: `cat_${u}_${z.value}`,
      color: vt(l.color) || _e.value[u] || ve[u]
    }))), Qe = g(() => F.value.filter((l) => !M.value.includes(l.id))), Je = g(() => F.value.map((l, u) => ({
      ...l,
      shape: l.shape || "circle",
      series: l.series.map((a) => ({
        ...a,
        x: qe(a.x),
        y: Ce(a.y),
        xValue: a.x,
        yValue: a.y,
        quadrantSide: ze({ x: a.x, y: a.y }),
        categoryName: l.name,
        shape: l.shape,
        color: l.color
      }))
    }))), S = g(() => (W.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
        });
      });
    }), Qe.value.map((l, u) => ({
      ...l,
      shape: l.shape || "circle",
      color: l.color || _e.value[u] || ve[u],
      series: l.series.map((a) => ({
        ...a,
        x: qe(a.x),
        y: Ce(a.y),
        xValue: a.x,
        yValue: a.y,
        quadrantSide: ze({ x: a.x, y: a.y }),
        categoryName: l.name,
        shape: l.shape,
        color: l.color,
        uid: Be()
      }))
    }))));
    function qe(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 Ce(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 = S.value.flatMap((f) => f.series.map((X) => ({
        x: X.xValue,
        y: X.yValue,
        name: X.name,
        category: X.categoryName,
        quadrantSide: X.quadrantSide,
        sideName: t.value.style.chart.layout.labels.quadrantLabels[X.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,
        P(
          t.value.style.chart.layout.labels.plotLabels.x.formatter,
          s.x,
          O({
            v: s.x,
            r: t.value.style.chart.layout.labels.plotLabels.rounding
          })
        ),
        P(
          t.value.style.chart.layout.labels.plotLabels.y.formatter,
          s.y,
          O({
            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 se(l) {
      M.value.includes(l) ? M.value = M.value.filter((a) => a !== l) : M.value.push(l);
      const u = Xe();
      ue("selectLegend", u);
    }
    const Se = g(() => Je.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: () => se(l.id),
      isSegregated: M.value.includes(l.id)
    }))), je = 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 ze(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 D = h(null), U = h(null), re = h(null);
    function Te(l, u, a) {
      D.value = u.uid, U.value = {
        color: l.color,
        shape: l.shape
      }, re.value = {
        datapoint: u,
        seriesIndex: a,
        series: S.value,
        config: t.value
      }, j.value = !0;
      const s = t.value.style.chart.tooltip.customFormat;
      if (bt(s) && ft(() => s({
        seriesIndex: a,
        datapoint: u,
        series: S.value,
        config: t.value
      })))
        oe.value = s({
          seriesIndex: a,
          datapoint: u,
          series: S.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>${P(
          t.value.style.chart.layout.labels.plotLabels.x.formatter,
          u.xValue,
          O({
            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>${P(
          t.value.style.chart.layout.labels.plotLabels.y.formatter,
          u.yValue,
          O({
            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 We(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 = S.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 k = 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 Xe() {
      return S.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 Ye() {
      at(() => {
        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 = pt(s);
        gt({ csvContent: r, title: t.value.style.chart.title.text || "vue-ui-quadrant" });
      });
    }
    const R = h(!1);
    function Ze(l) {
      R.value = l, de.value += 1;
    }
    function Ae() {
      w.value.showTable = !w.value.showTable;
    }
    function Me() {
      w.value.plotLabels.show = !w.value.plotLabels.show;
    }
    function Ne() {
      w.value.showTooltip = !w.value.showTooltip;
    }
    const le = h(!1);
    function ne() {
      le.value = !le.value;
    }
    return He({
      getData: Xe,
      generatePdf: Le,
      generateCsv: Ye,
      generateImage: we,
      toggleTable: Ae,
      toggleLabels: Me,
      toggleTooltip: Ne,
      toggleAnnotator: ne
    }), (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: V,
      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%" : ""}`)
    }, [
      t.value.userOptions.buttons.annotator ? (o(), N(Tt, {
        key: 0,
        parent: V.value,
        backgroundColor: t.value.style.chart.backgroundColor,
        color: t.value.style.chart.color,
        active: le.value,
        onClose: ne
      }, null, 8, ["parent", "backgroundColor", "color", "active"])) : c("", !0),
      Ue.value ? (o(), n("div", {
        key: 1,
        ref_key: "noTitle",
        ref: be,
        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: ce,
        style: "width:100%;background:transparent;padding-bottom:12px"
      }, [
        (o(), N($t, {
          key: `table_${fe.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 ? (o(), N(Lt, {
        ref_key: "details",
        ref: De,
        key: `user_options_${de.value}`,
        backgroundColor: t.value.style.chart.backgroundColor,
        color: t.value.style.chart.color,
        isImaging: y(ke),
        isPrinting: y($e),
        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: w.value.showTooltip,
        titles: { ...t.value.userOptions.buttonTitles },
        chartElement: V.value,
        position: t.value.userOptions.position,
        hasAnnotator: t.value.userOptions.buttons.annotator,
        isAnnotation: le.value,
        onToggleFullscreen: Ze,
        onGeneratePdf: y(Le),
        onGenerateCsv: Ye,
        onGenerateImage: y(we),
        onToggleTable: Ae,
        onToggleLabels: Me,
        onToggleTooltip: Ne,
        onToggleAnnotator: ne
      }, tt({ _: 2 }, [
        l.$slots.optionTooltip ? {
          name: "optionTooltip",
          fn: x(() => [
            L(l.$slots, "optionTooltip", {}, void 0, !0)
          ]),
          key: "0"
        } : void 0,
        l.$slots.optionPdf ? {
          name: "optionPdf",
          fn: x(() => [
            L(l.$slots, "optionPdf", {}, void 0, !0)
          ]),
          key: "1"
        } : void 0,
        l.$slots.optionCsv ? {
          name: "optionCsv",
          fn: x(() => [
            L(l.$slots, "optionCsv", {}, void 0, !0)
          ]),
          key: "2"
        } : void 0,
        l.$slots.optionImg ? {
          name: "optionImg",
          fn: x(() => [
            L(l.$slots, "optionImg", {}, void 0, !0)
          ]),
          key: "3"
        } : void 0,
        l.$slots.optionTable ? {
          name: "optionTable",
          fn: x(() => [
            L(l.$slots, "optionTable", {}, void 0, !0)
          ]),
          key: "4"
        } : void 0,
        l.$slots.optionLabels ? {
          name: "optionLabels",
          fn: x(() => [
            L(l.$slots, "optionLabels", {}, void 0, !0)
          ]),
          key: "5"
        } : void 0,
        l.$slots.optionFullscreen ? {
          name: "optionFullscreen",
          fn: x(({ toggleFullscreen: a, isFullscreen: s }) => [
            L(l.$slots, "optionFullscreen", G(Q({ toggleFullscreen: a, isFullscreen: s })), void 0, !0)
          ]),
          key: "6"
        } : void 0,
        l.$slots.optionAnnotator ? {
          name: "optionAnnotator",
          fn: x(({ toggleAnnotator: a, isAnnotator: s }) => [
            L(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"])) : c("", !0),
      J.value ? (o(), n("svg", {
        key: 4,
        xmlns: y(dt),
        class: T({ "vue-data-ui-fullscreen--on": R.value, "vue-data-ui-fulscreen--off": !R.value }),
        viewBox: `${d.value.startX} ${d.value.startY} ${d.value.width} ${d.value.height}`,
        style: q(`max-width:100%;overflow:${p.value ? "hidden" : "visible"};background:transparent;color:${t.value.style.chart.color}`),
        id: `svg_${z.value}`
      }, [
        ie(zt),
        v("defs", null, [
          (o(!0), n(C, null, Y(S.value, (a, s) => (o(), n("radialGradient", {
            cx: "50%",
            cy: "50%",
            r: "50%",
            fx: "50%",
            fy: "50%",
            id: `quadrant_gradient_${z.value}_${s}`
          }, [
            v("stop", {
              offset: "0%",
              "stop-color": y(ae)(y(ct)(a.color, 0.05), t.value.style.chart.layout.areas.opacity)
            }, null, 8, Mt),
            v("stop", {
              offset: "100%",
              "stop-color": y(ae)(a.color, t.value.style.chart.layout.areas.opacity)
            }, null, 8, Nt)
          ], 8, At))), 256))
        ]),
        t.value.style.chart.layout.grid.graduations.show ? (o(), n("g", Pt, [
          (o(!0), n(C, null, Y(Ge.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, Ot))), 256))
        ])) : c("", !0),
        v("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, Bt),
        v("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, Vt),
        t.value.style.chart.layout.grid.showArrows ? (o(), n("g", Ft, [
          v("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, Rt),
          v("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, Ht),
          v("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, It),
          v("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, Dt)
        ])) : c("", !0),
        t.value.style.chart.layout.labels.quadrantLabels.show && !p.value ? (o(), n("g", Ut, [
          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"))
          }, $(t.value.style.chart.layout.labels.quadrantLabels.tl.text), 13, Et)) : 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"))
          }, $(t.value.style.chart.layout.labels.quadrantLabels.tr.text), 13, Gt)) : 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"))
          }, $(t.value.style.chart.layout.labels.quadrantLabels.br.text), 13, Qt)) : 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"))
          }, $(t.value.style.chart.layout.labels.quadrantLabels.bl.text), 13, Jt)) : c("", !0)
        ])) : c("", !0),
        t.value.style.chart.layout.labels.axisLabels.show ? (o(), n("g", jt, [
          v("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
          }, $(y(P)(
            t.value.style.chart.layout.labels.plotLabels.y.formatter,
            _.value.y.max,
            y(O)({
              v: _.value.y.max,
              r: t.value.style.chart.layout.labels.plotLabels.rounding
            })
          )), 9, Zt),
          v("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
          }, $(t.value.style.chart.layout.grid.yAxis.name), 9, Kt),
          v("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
          }, $(y(P)(
            t.value.style.chart.layout.labels.plotLabels.y.formatter,
            _.value.y.min,
            y(O)({
              v: _.value.y.min,
              r: t.value.style.chart.layout.labels.plotLabels.rounding
            })
          )), 9, el),
          v("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
          }, $(y(P)(
            t.value.style.chart.layout.labels.plotLabels.x.formatter,
            _.value.x.min,
            y(O)({
              v: _.value.x.min,
              r: t.value.style.chart.layout.labels.plotLabels.rounding
            })
          )), 9, tl),
          v("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
          }, $(y(P)(
            t.value.style.chart.layout.labels.plotLabels.x.formatter,
            _.value.x.max,
            y(O)({
              v: _.value.x.max,
              r: t.value.style.chart.layout.labels.plotLabels.rounding
            })
          )), 9, ll),
          v("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
          }, $(t.value.style.chart.layout.grid.xAxis.name), 9, al)
        ])) : c("", !0),
        t.value.style.chart.layout.areas.show ? (o(), n("g", ul, [
          (o(!0), n(C, null, Y(S.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(ht)(a)
            }, null, 8, ol)) : c("", !0)
          ]))), 256))
        ])) : c("", !0),
        v("g", null, [
          v("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, sl),
          v("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, rl),
          v("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, nl),
          v("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, il)
        ]),
        t.value.style.chart.layout.labels.plotLabels.showAsTag ? (o(), n(C, { key: 6 }, [
          w.value.plotLabels.show ? (o(), n("g", cl, [
            (o(!0), n(C, null, Y(S.value, (a, s) => (o(), n(C, null, [
              (o(!0), n(C, 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) => Te(a, r, s),
                onMouseleave: u[9] || (u[9] = (b) => {
                  j.value = !1, D.value = null, U.value = null;
                }),
                onClick: (b) => We(a, r)
              }, [
                v("div", {
                  style: q(`color:${y(yt)(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`)
                }, $(r.name), 5)
              ], 40, hl))), 256))
            ], 64))), 256))
          ])) : c("", !0)
        ], 64)) : (o(), n(C, { key: 5 }, [
          (o(!0), n(C, null, Y(S.value, (a, s) => (o(), n("g", null, [
            (o(!0), n(C, null, Y(a.series, (r) => (o(), N(Ve, {
              color: a.color,
              isSelected: D.value && r.uid === D.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) => Te(a, r, s),
              onMouseleave: u[8] || (u[8] = (b) => {
                j.value = !1, D.value = null, U.value = null;
              }),
              onClick: (b) => We(a, r)
            }, null, 8, ["color", "isSelected", "plot", "radius", "shape", "stroke", "strokeWidth", "onMouseover", "onClick"]))), 256))
          ]))), 256)),
          w.value.plotLabels.show ? (o(), n("g", vl, [
            (o(!0), n(C, null, Y(S.value, (a) => (o(), n("g", null, [
              (o(!0), n(C, 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
              }, $(s.name), 9, dl))), 256))
            ]))), 256))
          ])) : c("", !0)
        ], 64)),
        p.value ? (o(), n("g", yl, [
          i.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, bl)) : c("", !0),
          i.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, fl)) : c("", !0),
          i.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, pl)) : c("", !0),
          i.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, gl)) : c("", !0)
        ])) : c("", !0),
        i.value && !K.value ? (o(), n("g", ml, [
          v("text", {
            x: B.value.x,
            y: B.value.y - B.value.fontSize / 1.5,
            "font-size": B.value.fontSize / 1.5,
            fill: B.value.fill,
            "text-anchor": "middle",
            "font-weight": B.value.bold ? "bold" : "normal"
          }, $(B.value.text), 9, xl)
        ])) : c("", !0),
        p.value && i.value ? (o(), n("g", $l, [
          v("rect", {
            x: k.value[i.value].tl.x,
            y: k.value[i.value].tl.y,
            height: "20",
            width: "20",
            fill: k.value[i.value].tl.fill,
            style: q(`cursor: pointer; opacity: ${i.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": i.value !== "TL" })
          }, null, 14, kl),
          v("rect", {
            x: k.value[i.value].tr.x,
            y: k.value[i.value].tr.y,
            height: "20",
            width: "20",
            fill: k.value[i.value].tr.fill,
            style: q(`cursor: pointer; opacity: ${i.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": i.value !== "TR" })
          }, null, 14, Ll),
          v("rect", {
            x: k.value[i.value].br.x,
            y: k.value[i.value].br.y,
            height: "20",
            width: "20",
            fill: k.value[i.value].br.fill,
            style: q(`cursor: pointer; opacity: ${i.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": i.value !== "BR" })
          }, null, 14, wl),
          v("rect", {
            x: k.value[i.value].bl.x,
            y: k.value[i.value].bl.y,
            height: "20",
            width: "20",
            fill: k.value[i.value].bl.fill,
            style: q(`cursor: pointer; opacity: ${i.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": i.value !== "BL" })
          }, null, 14, _l),
          v("path", {
            class: "vue-ui-quadrant-minimap-crosshairs",
            stroke: t.value.style.chart.backgroundColor,
            "stroke-width": 1,
            d: k.value[i.value].crosshairs.horizontal
          }, null, 8, ql),
          v("path", {
            class: "vue-ui-quadrant-minimap-crosshairs",
            stroke: t.value.style.chart.backgroundColor,
            "stroke-width": 1,
            d: k.value[i.value].crosshairs.vertical
          }, null, 8, Cl)
        ])) : c("", !0),
        L(l.$slots, "svg", { svg: e.value }, void 0, !0)
      ], 14, Yt)) : c("", !0),
      l.$slots.watermark ? (o(), n("div", Sl, [
        L(l.$slots, "watermark", G(Q({ isPrinting: y($e) || y(ke) })), void 0, !0)
      ])) : c("", !0),
      J.value ? c("", !0) : (o(), N(Ct, {
        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"])),
      v("div", {
        ref_key: "chartLegend",
        ref: he
      }, [
        t.value.style.chart.legend.show ? (o(), N(_t, {
          key: `legend_${ge.value}`,
          legendSet: Se.value,
          config: je.value,
          onClickMarker: u[14] || (u[14] = ({ legend: a }) => se(a.id))
        }, {
          item: x(({ legend: a }) => [
            v("div", {
              "data-cy-legend-item": "",
              onClick: (s) => se(a.id),
              style: q(`opacity:${M.value.includes(a.id) ? 0.5 : 1}`)
            }, $(a.name), 13, zl)
          ]),
          _: 1
        }, 8, ["legendSet", "config"])) : L(l.$slots, "legend", {
          key: 1,
          legend: Se.value
        }, void 0, !0)
      ], 512),
      l.$slots.source ? (o(), n("div", {
        key: 7,
        ref_key: "source",
        ref: ye,
        dir: "auto"
      }, [
        L(l.$slots, "source", {}, void 0, !0)
      ], 512)) : c("", !0),
      ie(wt, {
        show: w.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: V.value,
        content: oe.value,
        isFullscreen: R.value,
        isCustom: t.value.style.chart.tooltip.customFormat && typeof t.value.style.chart.tooltip.customFormat == "function"
      }, {
        "tooltip-before": x(() => [
          L(l.$slots, "tooltip-before", G(Q({ ...re.value })), void 0, !0)
        ]),
        "tooltip-after": x(() => [
          L(l.$slots, "tooltip-after", G(Q({ ...re.value })), void 0, !0)
        ]),
        default: x(() => [
          t.value.style.chart.tooltip.showShape ? (o(), n("svg", Tl, [
            ie(Ve, {
              plot: { x: 10, y: 10 },
              shape: U.value.shape,
              color: U.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(St, {
        key: 8,
        hideDetails: "",
        config: {
          open: w.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: x(() => [
          (o(), N(qt, {
            key: `table_${pe.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) => w.value.showTable = !1)
          }, {
            th: x(({ th: a }) => [
              lt($(a), 1)
            ]),
            td: x(({ td: a }) => [
              v("div", {
                innerHTML: a.name || a
              }, null, 8, Wl)
            ]),
            _: 1
          }, 8, ["colNames", "head", "body", "config", "title"]))
        ]),
        _: 1
      }, 8, ["config"])) : c("", !0)
    ], 14, Xt));
  }
}, Gl = /* @__PURE__ */ Wt(Xl, [["__scopeId", "data-v-a690d55c"]]);
export {
  Gl as default
};
