import { useCssVars as Le, computed as h, ref as p, onMounted as Ae, openBlock as s, createElementBlock as n, normalizeClass as U, normalizeStyle as m, createVNode as ee, createCommentVNode as c, createBlock as le, unref as i, createSlots as ze, withCtx as k, renderSlot as x, normalizeProps as Y, guardReactiveProps as j, Fragment as A, renderList as S, createElementVNode as u, toDisplayString as f, withKeys as Te, createTextVNode as Me, nextTick as Se } from "vue";
import { u as Ne, o as Oe, e as pe, c as te, t as Fe, K as Ve, g as Pe, L as ae, X as Ie, E as oe, i as F, f as N, s as z, x as Be, y as Re, q as Ee, r as Ge } from "./index-CguVaFlt.js";
import { _ as Xe } from "./Title-DbTGPg4G.js";
import { u as He, U as De } from "./usePrinter-ClsMRVJG.js";
import { _ as Ue } from "./Tooltip-u79R5W5y.js";
import Ye from "./vue-ui-skeleton-ChHLL5Hw.js";
import je from "./BaseIcon-BNFf4B_v.js";
import We from "./vue-ui-accordion-w15FGKRN.js";
import { u as fe } from "./useNestedProp-BbEbJmgv.js";
import { _ as Ke } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const qe = ["id"], Je = ["xmlns", "viewBox"], Qe = ["x", "y", "width", "height", "fill", "stroke", "stroke-width"], Ze = ["x", "y", "width", "height", "fill", "stroke", "stroke-width"], el = ["font-size", "font-weight", "fill", "x", "y"], ll = ["x", "y", "width", "height", "onMouseover"], tl = { key: 0 }, al = ["font-size", "fill", "x", "y", "font-weight"], ol = { key: 0 }, sl = ["text-anchor", "font-size", "fill", "font-weight", "transform"], ul = { key: 1 }, nl = ["x", "y", "width", "height", "stroke", "stroke-width"], il = { key: 2 }, rl = ["id"], vl = ["stop-color"], dl = ["stop-color"], yl = ["x", "y", "font-size", "fill"], cl = ["x", "y", "height", "rx", "fill"], hl = ["x", "y", "font-size", "fill"], gl = ["stroke", "x1", "x2", "y1", "y2"], pl = ["fill", "d"], fl = { key: 3 }, bl = {
  id: "colorScaleHorizontal",
  x1: "0%",
  x2: "100%",
  y1: "0%",
  y2: "0%"
}, ml = ["stop-color"], xl = ["stop-color"], wl = ["x", "y", "width", "height", "rx"], _l = ["x", "y", "font-size", "fill"], kl = ["x", "y", "font-size", "fill"], $l = ["stroke", "x1", "x2", "y1", "y2"], Cl = ["fill", "d"], Ll = {
  key: 3,
  class: "vue-data-ui-watermark"
}, Al = { class: "vue-ui-data-table" }, zl = { key: 0 }, Tl = ["data-cell"], Ml = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Sl = ["data-cell"], Nl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ol = {
  __name: "vue-ui-heatmap",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  setup(G, { expose: be }) {
    const r = G;
    Le((l) => ({
      "711e6638": l.tdo
    }));
    const { vue_ui_heatmap: me } = Ne(), X = h(() => !!r.dataset && r.dataset.length);
    Oe(r.dataset) && pe({
      componentName: "VueUiHeatmap",
      type: "dataset"
    });
    const V = p(te()), W = p(null), xe = p(null), K = p(!1), q = p(""), se = p(void 0), P = p(null), ue = p(0), ne = p(null), ie = p(!1), e = h(() => {
      const l = fe({
        userConfig: r.config,
        defaultConfig: me
      });
      let a = {};
      return l.theme ? a = {
        ...fe({
          userConfig: Fe.vue_ui_heatmap[l.theme] || r.config,
          defaultConfig: l
        })
      } : a = l, r.config && Ve(r.config, "style.layout.dataLabels.xAxis.showOnlyAtModulo") ? a.style.layout.dataLabels.xAxis.showOnlyAtModulo = r.config.style.layout.dataLabels.xAxis.showOnlyAtModulo : a.style.layout.dataLabels.xAxis.showOnlyAtModulo = null, a;
    }), { isPrinting: re, isImaging: ve, generatePdf: de, generateImage: ye } = He({
      elementId: `heatmap__${V.value}`,
      fileName: e.value.style.title.text || "vue-ui-heatmap"
    }), w = p({
      showTable: e.value.table.show,
      showTooltip: e.value.style.tooltip.show
    }), we = h(() => e.value.table.responsiveBreakpoint);
    function _e() {
      new ResizeObserver((a) => {
        a.forEach((o) => {
          ie.value = o.contentRect.width < we.value;
        });
      }).observe(ne.value);
    }
    Ae(_e);
    const O = h(() => Math.max(...r.dataset.flatMap((l) => (l.values || []).length))), _ = h(() => {
      const l = e.value.style.layout.padding.top + e.value.style.layout.padding.bottom + r.dataset.length * e.value.style.layout.cells.height, a = e.value.style.layout.padding.left + e.value.style.layout.padding.right + (O.value < r.dataset.length ? r.dataset.length : O.value) * e.value.style.layout.cells.height, o = l + (e.value.style.legend.show ? e.value.style.legend.position === "right" ? 0 : e.value.style.layout.cells.height * 2 : 0);
      return {
        height: l,
        heightWithLegend: o,
        width: a
      };
    }), H = h(() => e.value.style.legend.position), t = h(() => ({
      top: e.value.style.layout.padding.top,
      left: e.value.style.layout.padding.left,
      right: _.value.width - e.value.style.layout.padding.right - (H.value === "right" && e.value.style.legend.show ? 92 : 0),
      bottom: _.value.height - e.value.style.layout.padding.bottom,
      height: _.value.height - e.value.style.layout.padding.top - e.value.style.layout.padding.bottom,
      width: _.value.width - e.value.style.layout.padding.right - e.value.style.layout.padding.left - (H.value === "right" && e.value.style.legend.show ? 92 : 0)
    })), J = h(() => d.value.height * r.dataset.length), b = h(() => Math.max(...r.dataset.flatMap((l) => l.values))), T = h(() => Math.min(...r.dataset.flatMap((l) => l.values))), M = h(() => {
      const l = r.dataset.flatMap((o) => o.values);
      return l.reduce((o, v) => o + v, 0) / l.length;
    }), d = h(() => ({
      width: t.value.width / O.value,
      height: t.value.width / (O.value < r.dataset.length ? r.dataset.length : O.value)
    })), $ = h(() => {
      const l = e.value.style.layout.dataLabels.yAxis.values.length ? e.value.style.layout.dataLabels.yAxis.values : r.dataset.map((o) => o.name), a = e.value.style.layout.dataLabels.xAxis.values;
      return {
        yLabels: l,
        xLabels: a.slice(0, O.value)
      };
    }), D = h(() => (r.dataset.forEach((l, a) => {
      Pe({
        datasetObject: l,
        requiredAttributes: ["values"]
      }).forEach((o) => {
        pe({
          componentName: "VueUiHeatmap",
          type: "datasetSerieAttribute",
          property: "values",
          index: a
        });
      });
    }), r.dataset.map((l) => ({
      ...l,
      temperatures: (l.values || []).map((a, o) => a >= M.value ? {
        side: "up",
        color: ae(e.value.style.layout.cells.colors.cold, e.value.style.layout.cells.colors.hot, T.value, b.value, a),
        ratio: Math.abs(Math.abs(a - M.value) / Math.abs(b.value - M.value)) > 1 ? 1 : Math.abs(Math.abs(a - M.value) / Math.abs(b.value - M.value)),
        value: a,
        yAxisName: l.name,
        xAxisName: $.value.xLabels[o],
        id: `vue-data-ui-heatmap-cell-${te()}`
      } : {
        side: "down",
        ratio: Math.abs(1 - Math.abs(a) / Math.abs(M.value)) > 1 ? 1 : Math.abs(1 - Math.abs(a) / Math.abs(M.value)),
        color: ae(e.value.style.layout.cells.colors.cold, e.value.style.layout.cells.colors.hot, T.value, b.value, a),
        value: a,
        yAxisName: l.name,
        xAxisName: $.value.xLabels[o],
        id: `vue-data-ui-heatmap-cell-${te()}`
      })
    })))), C = p(null), I = p(null);
    function ke(l, a, o, v) {
      P.value = { x: o, y: v };
      const { value: y, yAxisName: g, xAxisName: L, id: Ce } = l;
      se.value = Ce, C.value = y, I.value = {
        datapoint: l,
        seriesIndex: a,
        series: D.value,
        config: e.value
      }, K.value = !0;
      let Q = "";
      const Z = e.value.style.tooltip.customFormat;
      Be(Z) && Re(() => Z({
        datapoint: l,
        seriesIndex: a,
        series: D.value,
        config: e.value
      })) ? q.value = Z({
        datapoint: l,
        seriesIndex: a,
        series: D.value,
        config: e.value
      }) : (Q += `<div>${g} ${L ? `${L}` : ""}</div>`, Q += `<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${e.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${ae(e.value.style.layout.cells.colors.cold, e.value.style.layout.cells.colors.hot, T.value, b.value, y)}">⬤</span><span>${isNaN(y) ? "-" : F(
        e.value.style.layout.cells.value.formatter,
        y,
        N({
          p: e.value.style.layout.dataLabels.prefix,
          v: y,
          s: e.value.style.layout.dataLabels.suffix,
          r: e.value.style.tooltip.roundingValue
        }),
        { datapoint: l, seriesIndex: a }
      )}</span></div>`, q.value = `<div style="font-size:${e.value.style.tooltip.fontSize}px">${Q}</div>`);
    }
    const B = h(() => t.value.top + J.value * (1 - C.value / b.value)), R = h(() => t.value.left + (_.value.width - t.value.left - e.value.style.layout.padding.right) * (C.value / b.value));
    h(() => {
      const l = r.dataset.map((o) => ({
        name: o.name
      })), a = r.dataset.map((o) => o.values);
      return { head: l, body: a };
    });
    function ce() {
      Se(() => {
        const l = ["", ...r.dataset.map((y, g) => y.name)], a = [];
        for (let y = 0; y < $.value.xLabels.length; y += 1) {
          const g = [$.value.xLabels[y]];
          for (let L = 0; L < r.dataset.length; L += 1)
            g.push([r.dataset[L].values[y]]);
          a.push(g);
        }
        const o = [[e.value.style.title.text], [e.value.style.title.subtitle.text], [[""], [""], [""]]].concat([l]).concat(a), v = Ee(o);
        Ge({ csvContent: v, title: e.value.style.title.text || "vue-ui-heatmap" });
      });
    }
    const E = p(!1);
    function $e(l) {
      E.value = l, ue.value += 1;
    }
    function he() {
      w.value.showTable = !w.value.showTable;
    }
    function ge() {
      w.value.showTooltip = !w.value.showTooltip;
    }
    return be({
      generatePdf: de,
      generateCsv: ce,
      generateImage: ye,
      toggleTable: he,
      toggleTooltip: ge
    }), (l, a) => (s(), n("div", {
      ref_key: "heatmapChart",
      ref: W,
      class: U(`vue-ui-heatmap ${E.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
      style: m(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;${e.value.style.title.text ? "" : "padding-top:36px"};background:${e.value.style.backgroundColor}`),
      id: `heatmap__${V.value}`
    }, [
      e.value.style.title.text ? (s(), n("div", {
        key: 0,
        style: m(`width:100%;background:${e.value.style.backgroundColor}`)
      }, [
        ee(Xe, {
          config: {
            title: {
              cy: "heatmap-div-title",
              ...e.value.style.title
            },
            subtitle: {
              cy: "heatmap-div-subtitle",
              ...e.value.style.title.subtitle
            }
          }
        }, null, 8, ["config"])
      ], 4)) : c("", !0),
      e.value.userOptions.show && X.value ? (s(), le(De, {
        ref_key: "details",
        ref: xe,
        key: `user_options_${ue.value}`,
        backgroundColor: e.value.style.backgroundColor,
        color: e.value.style.color,
        isImaging: i(ve),
        isPrinting: i(re),
        uid: V.value,
        hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.tooltip.show,
        hasPdf: e.value.userOptions.buttons.pdf,
        hasImg: e.value.userOptions.buttons.img,
        hasXls: e.value.userOptions.buttons.csv,
        hasTable: e.value.userOptions.buttons.table,
        hasFullscreen: e.value.userOptions.buttons.fullscreen,
        isFullscreen: E.value,
        isTooltip: w.value.showTooltip,
        titles: { ...e.value.userOptions.buttonTitles },
        chartElement: W.value,
        onToggleFullscreen: $e,
        onGeneratePdf: i(de),
        onGenerateCsv: ce,
        onGenerateImage: i(ye),
        onToggleTable: he,
        onToggleTooltip: ge
      }, ze({ _: 2 }, [
        l.$slots.optionTooltip ? {
          name: "optionTooltip",
          fn: k(() => [
            x(l.$slots, "optionTooltip", {}, void 0, !0)
          ]),
          key: "0"
        } : void 0,
        l.$slots.optionPdf ? {
          name: "optionPdf",
          fn: k(() => [
            x(l.$slots, "optionPdf", {}, void 0, !0)
          ]),
          key: "1"
        } : void 0,
        l.$slots.optionCsv ? {
          name: "optionCsv",
          fn: k(() => [
            x(l.$slots, "optionCsv", {}, void 0, !0)
          ]),
          key: "2"
        } : void 0,
        l.$slots.optionImg ? {
          name: "optionImg",
          fn: k(() => [
            x(l.$slots, "optionImg", {}, void 0, !0)
          ]),
          key: "3"
        } : void 0,
        l.$slots.optionTable ? {
          name: "optionTable",
          fn: k(() => [
            x(l.$slots, "optionTable", {}, void 0, !0)
          ]),
          key: "4"
        } : void 0,
        l.$slots.optionFullscreen ? {
          name: "optionFullscreen",
          fn: k(({ toggleFullscreen: o, isFullscreen: v }) => [
            x(l.$slots, "optionFullscreen", Y(j({ toggleFullscreen: o, isFullscreen: v })), void 0, !0)
          ]),
          key: "5"
        } : void 0
      ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : c("", !0),
      X.value ? (s(), n("svg", {
        key: 2,
        xmlns: i(Ie),
        class: U({ "vue-data-ui-fullscreen--on": E.value, "vue-data-ui-fulscreen--off": !E.value }),
        viewBox: `0 0 ${_.value.width} ${_.value.heightWithLegend}`,
        style: m(`max-width:100%;overflow:visible;background:${e.value.style.backgroundColor};color:${e.value.style.color}`)
      }, [
        (s(!0), n(A, null, S(D.value, (o, v) => (s(), n("g", null, [
          (s(!0), n(A, null, S(o.temperatures, (y, g) => (s(), n("g", null, [
            u("rect", {
              x: t.value.left + d.value.width * g + e.value.style.layout.cells.spacing / 2,
              y: t.value.top + d.value.height * v + e.value.style.layout.cells.spacing / 2,
              width: d.value.width - e.value.style.layout.cells.spacing,
              height: d.value.height - e.value.style.layout.cells.spacing,
              fill: e.value.style.layout.cells.colors.underlayer,
              stroke: e.value.style.backgroundColor,
              "stroke-width": e.value.style.layout.cells.spacing
            }, null, 8, Qe),
            u("rect", {
              x: t.value.left + d.value.width * g + e.value.style.layout.cells.spacing / 2,
              y: t.value.top + d.value.height * v + e.value.style.layout.cells.spacing / 2,
              width: d.value.width - e.value.style.layout.cells.spacing,
              height: d.value.height - e.value.style.layout.cells.spacing,
              fill: y.color,
              stroke: e.value.style.backgroundColor,
              "stroke-width": e.value.style.layout.cells.spacing
            }, null, 8, Ze),
            e.value.style.layout.cells.value.show ? (s(), n("text", {
              key: 0,
              "text-anchor": "middle",
              "font-size": e.value.style.layout.cells.value.fontSize,
              "font-weight": e.value.style.layout.cells.value.bold ? "bold" : "normal",
              fill: i(oe)(y.color),
              x: t.value.left + d.value.width * g + d.value.width / 2,
              y: t.value.top + d.value.height * v + d.value.height / 2 + e.value.style.layout.cells.value.fontSize / 3
            }, f(i(F)(
              e.value.style.layout.cells.value.formatter,
              y.value,
              i(N)({
                p: e.value.style.layout.dataLabels.prefix,
                v: y.value,
                s: e.value.style.layout.dataLabels.suffix,
                r: e.value.style.layout.cells.value.roundingValue
              }),
              { datapoint: y }
            )), 9, el)) : c("", !0)
          ]))), 256)),
          (s(!0), n(A, null, S(o.temperatures, (y, g) => (s(), n("g", null, [
            u("rect", {
              x: t.value.left + d.value.width * g,
              y: t.value.top + d.value.height * v,
              width: d.value.width,
              height: d.value.height,
              fill: "transparent",
              stroke: "none",
              onMouseover: (L) => ke(y, v, t.value.left + d.value.width * g, t.value.top + d.value.height * v),
              onMouseout: a[0] || (a[0] = (L) => {
                K.value = !1, se.value = void 0, C.value = null, P.value = null;
              })
            }, null, 40, ll)
          ]))), 256)),
          e.value.style.layout.dataLabels.yAxis.show ? (s(), n("g", tl, [
            u("text", {
              "font-size": e.value.style.layout.dataLabels.yAxis.fontSize,
              fill: e.value.style.layout.dataLabels.yAxis.color,
              x: t.value.left + e.value.style.layout.dataLabels.yAxis.offsetX - 6,
              y: t.value.top + d.value.height * v + d.value.height / 2 + e.value.style.layout.dataLabels.yAxis.fontSize / 3 + e.value.style.layout.dataLabels.yAxis.offsetY,
              "text-anchor": "end",
              "font-weight": e.value.style.layout.dataLabels.yAxis.bold ? "bold" : "normal"
            }, f($.value.yLabels[v]), 9, al)
          ])) : c("", !0)
        ]))), 256)),
        e.value.style.layout.dataLabels.xAxis.show ? (s(), n("g", ol, [
          (s(!0), n(A, null, S($.value.xLabels, (o, v) => (s(), n(A, null, [
            !e.value.style.layout.dataLabels.xAxis.showOnlyAtModulo || e.value.style.layout.dataLabels.xAxis.showOnlyAtModulo && v % e.value.style.layout.dataLabels.xAxis.showOnlyAtModulo === 0 ? (s(), n("text", {
              key: 0,
              "text-anchor": e.value.style.layout.dataLabels.xAxis.rotation === 0 ? "middle" : e.value.style.layout.dataLabels.xAxis.rotation < 0 ? "start" : "end",
              "font-size": e.value.style.layout.dataLabels.xAxis.fontSize,
              fill: e.value.style.layout.dataLabels.xAxis.color,
              "font-weight": e.value.style.layout.dataLabels.xAxis.bold ? "bold" : "normal",
              transform: `translate(${t.value.left + d.value.width / 2 + t.value.width / $.value.xLabels.length * v + e.value.style.layout.dataLabels.xAxis.offsetX}, ${t.value.top + e.value.style.layout.dataLabels.xAxis.offsetY - 6}), rotate(${e.value.style.layout.dataLabels.xAxis.rotation})`
            }, f(o), 9, sl)) : c("", !0)
          ], 64))), 256))
        ])) : c("", !0),
        P.value ? (s(), n("g", ul, [
          u("rect", {
            style: { "pointer-events": "none" },
            x: P.value.x - e.value.style.layout.cells.selected.border / 2 + e.value.style.layout.cells.spacing,
            y: P.value.y - e.value.style.layout.cells.selected.border / 2 + e.value.style.layout.cells.spacing,
            width: d.value.width - e.value.style.layout.cells.spacing + e.value.style.layout.cells.selected.border - e.value.style.layout.cells.spacing,
            height: d.value.height - e.value.style.layout.cells.spacing + e.value.style.layout.cells.selected.border - e.value.style.layout.cells.spacing,
            fill: "transparent",
            stroke: e.value.style.layout.cells.selected.color,
            "stroke-width": e.value.style.layout.cells.selected.border,
            rx: 1
          }, null, 8, nl)
        ])) : c("", !0),
        e.value.style.legend.show && H.value === "right" ? (s(), n("g", il, [
          u("defs", null, [
            u("linearGradient", {
              id: `colorScaleVertical_${V.value}`,
              x2: "0%",
              y2: "100%"
            }, [
              u("stop", {
                offset: "0%",
                "stop-color": e.value.style.layout.cells.colors.hot
              }, null, 8, vl),
              u("stop", {
                offset: "100%",
                "stop-color": e.value.style.layout.cells.colors.cold
              }, null, 8, dl)
            ], 8, rl)
          ]),
          u("text", {
            x: t.value.right + 36 + 18,
            y: t.value.top - e.value.style.legend.fontSize * 1.5,
            "text-anchor": "middle",
            "font-size": e.value.style.legend.fontSize * 2,
            fill: e.value.style.legend.color
          }, f(i(F)(
            e.value.style.layout.cells.value.formatter,
            i(z)(b.value),
            i(N)({
              p: e.value.style.layout.dataLabels.prefix,
              v: i(z)(b.value),
              s: e.value.style.layout.dataLabels.suffix,
              r: e.value.style.legend.roundingValue
            })
          )), 9, yl),
          u("rect", {
            x: t.value.right + 36,
            y: t.value.top,
            width: 36,
            height: J.value,
            rx: e.value.style.legend.scaleBorderRadius,
            fill: `url(#colorScaleVertical_${V.value})`
          }, null, 8, cl),
          u("text", {
            x: t.value.right + 36 + 18,
            y: t.value.top + J.value + e.value.style.legend.fontSize * 2.5,
            "text-anchor": "middle",
            "font-size": e.value.style.legend.fontSize * 2,
            fill: e.value.style.legend.color
          }, f(i(F)(
            e.value.style.layout.cells.value.formatter,
            i(z)(T.value),
            i(N)({
              p: e.value.style.layout.dataLabels.prefix,
              v: i(z)(T.value),
              s: e.value.style.layout.dataLabels.suffix,
              r: e.value.style.legend.roundingValue
            })
          )), 9, hl),
          C.value !== null ? (s(), n("line", {
            key: 0,
            stroke: i(oe)(I.value.datapoint.color),
            "stroke-width": "2",
            x1: t.value.right + 36,
            x2: t.value.right + 72,
            y1: B.value,
            y2: B.value
          }, null, 8, gl)) : c("", !0),
          C.value !== null ? (s(), n("path", {
            key: 1,
            fill: e.value.style.color,
            stroke: "none",
            d: `M ${t.value.right + 36},${B.value} ${t.value.right + 26},${B.value - 8} ${t.value.right + 26},${B.value + 8}z`
          }, null, 8, pl)) : c("", !0)
        ])) : c("", !0),
        e.value.style.legend.show && H.value === "bottom" ? (s(), n("g", fl, [
          u("defs", null, [
            u("linearGradient", bl, [
              u("stop", {
                offset: "0%",
                "stop-color": e.value.style.layout.cells.colors.cold
              }, null, 8, ml),
              u("stop", {
                offset: "100%",
                "stop-color": e.value.style.layout.cells.colors.hot
              }, null, 8, xl)
            ])
          ]),
          u("rect", {
            x: t.value.left,
            y: t.value.bottom + e.value.style.layout.cells.height,
            width: _.value.width - t.value.left - e.value.style.layout.padding.right,
            height: e.value.style.layout.cells.height,
            rx: e.value.style.legend.scaleBorderRadius > e.value.style.layout.cells.height / 2 ? e.value.style.layout.cells.height / 2 : e.value.style.legend.scaleBorderRadius,
            fill: "url(#colorScaleHorizontal)"
          }, null, 8, wl),
          u("text", {
            x: t.value.left,
            y: t.value.bottom + e.value.style.layout.cells.height * 2 + e.value.style.legend.fontSize * 2,
            "text-anchor": "start",
            "font-size": e.value.style.legend.fontSize * 2,
            fill: e.value.style.legend.color
          }, f(i(F)(
            e.value.style.layout.cells.value.formatter,
            i(z)(T.value),
            i(N)({
              p: e.value.style.layout.dataLabels.prefix,
              v: i(z)(T.value),
              s: e.value.style.layout.dataLabels.suffix,
              r: e.value.style.legend.roundingValue
            })
          )), 9, _l),
          u("text", {
            x: t.value.right,
            y: t.value.bottom + e.value.style.layout.cells.height * 2 + e.value.style.legend.fontSize * 2,
            "text-anchor": "end",
            "font-size": e.value.style.legend.fontSize * 2,
            fill: e.value.style.legend.color
          }, f(i(F)(
            e.value.style.layout.cells.value.formatter,
            i(z)(b.value),
            i(N)({
              p: e.value.style.layout.dataLabels.prefix,
              v: i(z)(b.value),
              s: e.value.style.layout.dataLabels.suffix,
              r: e.value.style.legend.roundingValue
            })
          )), 9, kl),
          C.value !== null ? (s(), n("line", {
            key: 0,
            stroke: i(oe)(I.value.datapoint.color),
            "stroke-width": "2",
            x1: R.value,
            x2: R.value,
            y1: t.value.bottom + e.value.style.layout.cells.height,
            y2: t.value.bottom + e.value.style.layout.cells.height * 2
          }, null, 8, $l)) : c("", !0),
          C.value !== null ? (s(), n("path", {
            key: 1,
            fill: e.value.style.color,
            stroke: "none",
            d: `M ${R.value},${t.value.bottom + e.value.style.layout.cells.height} ${R.value - 12},${t.value.bottom + e.value.style.layout.cells.height - 20} ${R.value + 12},${t.value.bottom + e.value.style.layout.cells.height - 20}z`
          }, null, 8, Cl)) : c("", !0)
        ])) : c("", !0),
        x(l.$slots, "svg", { svg: _.value }, void 0, !0)
      ], 14, Je)) : c("", !0),
      l.$slots.watermark ? (s(), n("div", Ll, [
        x(l.$slots, "watermark", Y(j({ isPrinting: i(re) || i(ve) })), void 0, !0)
      ])) : c("", !0),
      X.value ? c("", !0) : (s(), le(Ye, {
        key: 4,
        config: {
          type: "heatmap",
          style: {
            backgroundColor: e.value.style.backgroundColor,
            heatmap: {
              color: "#CCCCCC"
            }
          }
        }
      }, null, 8, ["config"])),
      ee(Ue, {
        show: w.value.showTooltip && K.value,
        backgroundColor: e.value.style.tooltip.backgroundColor,
        color: e.value.style.tooltip.color,
        borderRadius: e.value.style.tooltip.borderRadius,
        borderColor: e.value.style.tooltip.borderColor,
        borderWidth: e.value.style.tooltip.borderWidth,
        fontSize: e.value.style.tooltip.fontSize,
        backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
        position: e.value.style.tooltip.position,
        offsetY: e.value.style.tooltip.offsetY,
        parent: W.value,
        content: q.value,
        isCustom: e.value.style.tooltip.customFormat && typeof e.value.style.tooltip.customFormat == "function"
      }, {
        "tooltip-before": k(() => [
          x(l.$slots, "tooltip-before", Y(j({ ...I.value })), void 0, !0)
        ]),
        "tooltip-after": k(() => [
          x(l.$slots, "tooltip-after", Y(j({ ...I.value })), void 0, !0)
        ]),
        _: 3
      }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom"]),
      X.value ? (s(), le(We, {
        key: 5,
        hideDetails: "",
        config: {
          open: w.value.showTable,
          maxHeight: 1e4,
          body: {
            backgroundColor: e.value.style.backgroundColor,
            color: e.value.style.color
          },
          head: {
            backgroundColor: e.value.style.backgroundColor,
            color: e.value.style.color
          }
        }
      }, {
        content: k(() => [
          u("div", {
            ref_key: "tableContainer",
            ref: ne,
            class: "vue-ui-heatmap-table"
          }, [
            u("div", {
              style: "width:100%;overflow-x:auto;padding-top:36px;position:relative",
              class: U({ "vue-ui-responsive": ie.value })
            }, [
              u("div", {
                role: "button",
                tabindex: "0",
                style: m(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${e.value.table.th.backgroundColor};`),
                onClick: a[1] || (a[1] = (o) => w.value.showTable = !1),
                onKeypress: a[2] || (a[2] = Te((o) => w.value.showTable = !1, ["enter"]))
              }, [
                ee(je, {
                  name: "close",
                  stroke: e.value.table.th.color,
                  "stroke-width": 2
                }, null, 8, ["stroke"])
              ], 36),
              u("table", Al, [
                u("caption", {
                  style: m(`backgroundColor:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
                }, [
                  Me(f(e.value.style.title.text) + " ", 1),
                  e.value.style.title.subtitle.text ? (s(), n("span", zl, f(e.value.style.title.subtitle.text), 1)) : c("", !0)
                ], 4),
                u("thead", null, [
                  u("tr", {
                    role: "row",
                    style: m(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color}`)
                  }, [
                    u("th", {
                      style: m(`outline:${e.value.table.th.outline};padding-right:6px`)
                    }, null, 4),
                    (s(!0), n(A, null, S(G.dataset, (o, v) => (s(), n("th", {
                      align: "right",
                      style: m(`outline:${e.value.table.th.outline};padding-right:6px`)
                    }, f(o.name), 5))), 256))
                  ], 4)
                ]),
                u("tbody", null, [
                  (s(!0), n(A, null, S($.value.xLabels, (o, v) => (s(), n("tr", {
                    role: "row",
                    class: U({ "vue-ui-data-table__tbody__row": !0, "vue-ui-data-table__tbody__row-even": v % 2 === 0, "vue-ui-data-table__tbody__row-odd": v % 2 !== 0 }),
                    style: m(`background:${e.value.table.td.backgroundColor};color:${e.value.table.td.color}`)
                  }, [
                    u("td", {
                      "data-cell": e.value.table.colNames.xAxis,
                      class: "vue-ui-data-table__tbody__td",
                      style: m(`outline:${e.value.table.td.outline}`)
                    }, [
                      u("div", Ml, f(o), 1)
                    ], 12, Tl),
                    (s(!0), n(A, null, S(G.dataset, (y, g) => (s(), n("td", {
                      class: "vue-ui-data-table__tbody__td",
                      "data-cell": G.dataset[g].name,
                      style: m(`outline:${e.value.table.td.outline}`)
                    }, [
                      u("div", Nl, f(isNaN(y.values[v]) ? "-" : i(N)({ p: e.value.style.layout.dataLabels.prefix, v: y.values[v], s: e.value.style.layout.dataLabels.suffix, r: e.value.table.td.roundingValue })), 1)
                    ], 12, Sl))), 256))
                  ], 6))), 256))
                ])
              ])
            ], 2)
          ], 512)
        ]),
        _: 1
      }, 8, ["config"])) : c("", !0)
    ], 14, qe));
  }
}, Dl = /* @__PURE__ */ Ke(Ol, [["__scopeId", "data-v-6ff4d854"]]);
export {
  Dl as default
};
