import { toRef as ne, resolveComponent as re, openBlock as s, createElementBlock as r, Fragment as y, renderList as N, withModifiers as M, createBlock as U, createCommentVNode as m, createElementVNode as x, toDisplayString as Te, normalizeStyle as K, createVNode as R, computed as B, onMounted as Ve, ref as g, normalizeClass as Ce, unref as I, createSlots as Ye, withCtx as $, renderSlot as P, normalizeProps as Z, guardReactiveProps as J, createTextVNode as We, nextTick as $e } from "vue";
import { u as qe, o as Ze, e as Je, c as xe, t as Ke, a as Qe, p as we, b as _e, X as et, l as tt, M as ot, q as lt, r as at, x as st, y as nt } from "./index-CguVaFlt.js";
import { _ as rt } from "./Title-DbTGPg4G.js";
import { u as it, U as ut } from "./usePrinter-ClsMRVJG.js";
import { D as ct } from "./DataTable-BwHWRlRZ.js";
import { _ as dt } from "./Tooltip-u79R5W5y.js";
import W from "./BaseIcon-BNFf4B_v.js";
import vt from "./vue-ui-skeleton-ChHLL5Hw.js";
import ft from "./vue-ui-accordion-w15FGKRN.js";
import { u as Pe } from "./useNestedProp-BbEbJmgv.js";
import { _ as ht } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMouseover"], gt = {
  __name: "RecursiveCircles",
  props: {
    color: {
      type: String,
      default: "#000000"
    },
    dataset: {
      type: Array,
      default: () => []
    },
    hoveredUid: {
      type: String,
      default: null
    },
    linkColor: {
      type: String,
      default: "#CCCCCC"
    },
    stroke: {
      type: String,
      default: "#FFFFFF"
    },
    strokeHovered: {
      type: String,
      default: "#000000"
    }
  },
  emits: ["zoom", "hover"],
  setup(a, { emit: k }) {
    const C = a;
    function c(n) {
      k("zoom", n);
    }
    function d(n) {
      k("hover", n);
    }
    return ne(C, "dataset").value.forEach((n) => {
      n.nodes && n.nodes.length > 0 && n.nodes.forEach((u) => {
        u.ancestor = n;
      });
    }), (n, u) => {
      const T = re("RecursiveCircles", !0);
      return s(!0), r(y, null, N(a.dataset, (f) => (s(), r(y, null, [
        f.polygonPath && f.polygonPath.coordinates ? (s(), r(y, { key: 0 }, [
          (s(!0), r(y, null, N(f.polygonPath.coordinates, (O, H) => (s(), r("circle", {
            cx: O.x,
            cy: O.y,
            r: f.circleRadius,
            fill: `url(#gradient_${f.color})`,
            stroke: a.hoveredUid && a.hoveredUid === f.uid ? a.strokeHovered : a.stroke,
            "stroke-width": a.hoveredUid && a.hoveredUid === f.uid ? f.circleRadius / 6 : f.circleRadius / 12,
            style: { cursor: "pointer" },
            onClick: M((b) => c(f), ["stop"]),
            onMouseover: (b) => d(f),
            onMouseleave: u[0] || (u[0] = (b) => d(null))
          }, null, 40, pt))), 256)),
          f.nodes && f.nodes.length > 0 ? (s(), U(T, {
            key: 0,
            dataset: f.nodes,
            color: a.color,
            stroke: a.stroke,
            strokeHovered: a.strokeHovered,
            hoveredUid: a.hoveredUid,
            onZoom: c,
            onHover: d
          }, null, 8, ["dataset", "color", "stroke", "strokeHovered", "hoveredUid"])) : m("", !0)
        ], 64)) : m("", !0)
      ], 64))), 256);
    };
  }
}, yt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], mt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], bt = {
  __name: "RecursiveLinks",
  props: {
    dataset: {
      type: Array,
      default: () => []
    },
    color: {
      type: String,
      default: "#DDDDDD"
    },
    backgroundColor: {
      type: String,
      default: "#FFFFFF"
    }
  },
  setup(a) {
    return ne(a, "dataset").value.forEach((c) => {
      c.nodes && c.nodes.length > 0 && c.nodes.forEach((d) => {
        d.ancestor = c;
      });
    }), (c, d) => {
      const S = re("RecursiveLinks", !0);
      return s(), r(y, null, [
        (s(!0), r(y, null, N(a.dataset, (n) => (s(), r(y, null, [
          n.polygonPath && n.polygonPath.coordinates ? (s(!0), r(y, { key: 0 }, N(n.polygonPath.coordinates, (u, T) => (s(), r(y, null, [
            n.ancestor && n.ancestor.polygonPath ? (s(), r(y, { key: 0 }, [
              x("line", {
                x1: u.x,
                y1: u.y,
                x2: n.ancestor.polygonPath.coordinates[0].x,
                y2: n.ancestor.polygonPath.coordinates[0].y,
                stroke: a.backgroundColor,
                "stroke-width": n.circleRadius / 1.5
              }, null, 8, yt),
              x("line", {
                x1: u.x,
                y1: u.y,
                x2: n.ancestor.polygonPath.coordinates[0].x,
                y2: n.ancestor.polygonPath.coordinates[0].y,
                stroke: a.color,
                "stroke-width": n.circleRadius / 2
              }, null, 8, mt)
            ], 64)) : m("", !0)
          ], 64))), 256)) : m("", !0)
        ], 64))), 256)),
        (s(!0), r(y, null, N(a.dataset, (n) => (s(), r(y, null, [
          n.polygonPath && n.polygonPath.coordinates ? (s(), r(y, { key: 0 }, [
            n.nodes && n.nodes.length > 0 ? (s(), U(S, {
              key: 0,
              dataset: n.nodes,
              color: a.color,
              backgroundColor: a.backgroundColor
            }, null, 8, ["dataset", "color", "backgroundColor"])) : m("", !0)
          ], 64)) : m("", !0)
        ], 64))), 256))
      ], 64);
    };
  }
}, kt = ["x", "y", "fill", "font-size"], Ct = {
  __name: "RecursiveLabels",
  props: {
    color: {
      type: String,
      default: "#000000"
    },
    dataset: {
      type: Array,
      default: () => []
    },
    hoveredUid: {
      type: String,
      default: null
    }
  },
  emits: ["zoom", "hover"],
  setup(a, { emit: k }) {
    return ne(a, "dataset").value.forEach((d) => {
      d.nodes && d.nodes.length > 0 && d.nodes.forEach((S) => {
        S.ancestor = d;
      });
    }), (d, S) => {
      const n = re("RecursiveLabels", !0);
      return s(!0), r(y, null, N(a.dataset, (u) => (s(), r(y, null, [
        u.polygonPath && u.polygonPath.coordinates ? (s(), r(y, { key: 0 }, [
          (s(!0), r(y, null, N(u.polygonPath.coordinates, (T) => (s(), r("text", {
            x: T.x,
            y: T.y + u.circleRadius * 2,
            fill: a.color,
            "font-size": u.circleRadius,
            "text-anchor": "middle",
            style: { opacity: "0.8", "pointer-events": "none" }
          }, Te(u.name), 9, kt))), 256)),
          u.nodes && u.nodes.length > 0 ? (s(), U(n, {
            key: 0,
            dataset: u.nodes,
            color: a.color,
            hoveredUid: a.hoveredUid
          }, null, 8, ["dataset", "color", "hoveredUid"])) : m("", !0)
        ], 64)) : m("", !0)
      ], 64))), 256);
    };
  }
}, $t = { style: { position: "relative", height: "100%", width: "100%" } }, xt = {
  __name: "BaseDirectionPad",
  props: {
    color: {
      type: String,
      default: "#FF0000"
    },
    isFullscreen: {
      type: Boolean,
      default: !1
    }
  },
  emits: ["moveLeft", "moveTop", "moveRight", "moveBottom", "reset"],
  setup(a, { emit: k }) {
    return (C, c) => (s(), r("div", {
      style: K(`position: ${a.isFullscreen ? "fixed" : "absolute"};bottom:0;right:${a.isFullscreen ? "12px" : "0"};width:80px;height:80px`),
      "data-html2canvas-ignore": ""
    }, [
      x("div", $t, [
        x("button", {
          onClick: c[0] || (c[0] = M((d) => k("moveLeft"), ["stop"])),
          style: { position: "absolute", left: "0", top: "50%", transform: "translateY(-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
        }, [
          R(W, {
            stroke: a.color,
            name: "arrowLeft",
            style: { cursor: "pointer" }
          }, null, 8, ["stroke"])
        ]),
        x("button", {
          onClick: c[1] || (c[1] = M((d) => k("moveTop"), ["stop"])),
          style: { position: "absolute", top: "0", left: "50%", transform: "translateX(-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
        }, [
          R(W, {
            stroke: a.color,
            name: "arrowTop",
            style: { cursor: "pointer" }
          }, null, 8, ["stroke"])
        ]),
        x("button", {
          onClick: c[2] || (c[2] = M((d) => k("moveRight"), ["stop"])),
          style: { position: "absolute", right: "0", top: "50%", transform: "translateY(-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
        }, [
          R(W, {
            stroke: a.color,
            name: "arrowRight",
            style: { cursor: "pointer" }
          }, null, 8, ["stroke"])
        ]),
        x("button", {
          onClick: c[3] || (c[3] = M((d) => k("moveBottom"), ["stop"])),
          style: { position: "absolute", bottom: "0", left: "50%", transform: "translateX(-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
        }, [
          R(W, {
            stroke: a.color,
            name: "arrowBottom",
            style: { cursor: "pointer" }
          }, null, 8, ["stroke"])
        ]),
        x("button", {
          onClick: c[4] || (c[4] = M((d) => k("reset"), ["stop"])),
          style: { position: "absolute", top: "50%", left: "50%", transform: "translate(-50%,-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
        }, [
          R(W, {
            stroke: a.color,
            name: "close",
            style: { cursor: "pointer" },
            strokeWidth: 2
          }, null, 8, ["stroke"])
        ])
      ])
    ], 4));
  }
}, wt = ["id"], Pt = ["xmlns", "viewBox"], Tt = ["id"], Ft = ["stop-color"], Rt = ["stop-color"], St = {
  key: 4,
  class: "vue-data-ui-watermark"
}, Lt = ["innerHTML"], Dt = {
  __name: "vue-ui-molecule",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  setup(a, { expose: k }) {
    const C = a, { vue_ui_molecule: c } = qe(), d = B(() => !!C.dataset && C.dataset.length);
    Ve(() => {
      Ze(C.dataset) && Je({
        componentName: "VueUiMolecule",
        type: "dataset"
      });
    });
    const S = g(xe()), n = g(null), u = g(!1), T = g(""), f = g(null), O = g(null), H = g(!1), b = g(null), ie = g(null), Q = g(0), t = B(() => {
      const e = Pe({
        userConfig: C.config,
        defaultConfig: c
      });
      return e.theme ? {
        ...Pe({
          userConfig: Ke.vue_ui_molecule[e.theme] || C.config,
          defaultConfig: e
        }),
        customPalette: Qe[e.theme] || we
      } : e;
    }), { isPrinting: ue, isImaging: ce, generatePdf: de, generateImage: ve } = it({
      elementId: `cluster_${S.value}`,
      fileName: t.value.style.chart.title.text || "vue-ui-molecule"
    }), Fe = B(() => _e(t.value.customPalette)), w = g({
      showTable: t.value.table.show,
      showDataLabels: !0,
      showTooltip: t.value.style.chart.tooltip.show
    });
    function fe(e, o = 0) {
      return Array.isArray(e) && e.length > 0 && e[0].nodes ? fe(e[0].nodes, o + 1) : o;
    }
    function Re() {
      const e = fe(C.dataset);
      let o = 100, l = o;
      for (let v = 0; v < e; v += 1)
        o /= 1, l += o;
      return {
        height: l,
        width: l
      };
    }
    const L = g(Re()), _ = g(`0 0 ${L.value.width} ${L.value.height}`);
    function he(e, o = { x: -L.value.width / 2.43, y: L.value.height / 2 }, l = L.value.width / 1.1, v = 24, i = 0, h = 0, j = "#BBBBBB") {
      if (e && e.length > 0) {
        const ae = ot({
          plot: o,
          radius: l,
          sides: e.length,
          rotation: i
        });
        e.forEach((p, z) => {
          const V = ae.coordinates[z];
          let D;
          if (p.ancestor ? p.ancestor.ancestor ? D = p.ancestor.color || j : (D = Fe.value[h] || we[h] || j, h += 1) : D = j, p.polygonPath = {
            coordinates: [V]
          }, p.circleRadius = v, p.color = D, p.uid = xe(), p.nodes && p.nodes.length > 0) {
            const se = !p.ancestor || !p.ancestor.ancestor ? h : 0;
            p.nodes = he(
              p.nodes,
              V,
              l / 2.9,
              v / 2.2,
              i + Math.PI * z / p.nodes.length,
              se,
              D
            );
          }
        });
      }
      return e;
    }
    function Se(e) {
      const o = /* @__PURE__ */ new Set();
      function l(i) {
        i.forEach((h) => {
          h.color && !o.has(h.color) && o.add(h.color), h.nodes && h.nodes.length > 0 && l(h.nodes);
        });
      }
      l(e);
      const v = {};
      return Array.from(o).forEach((i, h) => {
        v[i] = `gradient_${h}`;
      }), v;
    }
    const Le = B(() => Se(F.value)), F = B(() => he(C.dataset));
    function ee() {
      H.value = !1, O.value = null, ie.value = null, b.value = null, oe({
        polygonPath: {
          coordinates: [{ x: L.value.width / 2, y: L.value.height / 2 }]
        },
        circleRadius: 24
      });
    }
    const te = g(null);
    function oe(e) {
      f.value.focus(), $e(() => {
        te.value && cancelAnimationFrame(te.value);
        const o = _.value.split(" "), l = parseFloat(o[0]), v = parseFloat(o[1]), i = parseFloat(o[2]), h = parseFloat(o[3]), { x: j, y: ae } = e.polygonPath.coordinates[0], { circleRadius: p } = e, z = 8.34, V = j - p * z, D = ae - p * z, se = p * z * 2, He = p * z * 2, Ee = Math.sqrt((V - l) ** 2 + (D - v) ** 2), Y = Math.min(1200, Math.max(20, Math.floor(Ee / 10))), Ae = (V - l) / Y, Xe = (D - v) / Y, Ge = (se - i) / Y, je = (He - h) / Y;
        let A = 0;
        function ke() {
          _.value = `${l + Ae * A} ${v + Xe * A} ${i + Ge * A} ${h + je * A}`, A += t.value.style.chart.zoom.speed, A <= Y && (te.value = requestAnimationFrame(ke));
        }
        ke();
      });
    }
    function De(e) {
      O.value === e.uid ? ee() : (O.value = e.uid, ie.value = e, b.value = {
        circleRadius: e.circleRadius,
        polygonPath: {
          coordinates: [{ x: e.polygonPath.coordinates[0].x, y: e.polygonPath.coordinates[0].y }]
        }
      }, oe(e), H.value = e.uid !== F.value[0].uid);
    }
    function Ie(e) {
      if (e.target.nodeName !== "circle")
        ee(), H.value = !1;
      else
        return;
    }
    const le = g(null);
    function Ue(e) {
      le.value = {
        datapoint: e,
        seriesIndex: -1,
        series: F.value,
        config: t.value
      };
      const o = t.value.style.chart.tooltip.customFormat;
      if (st(o) && nt(() => o({
        seriesIndex: -1,
        datapoint: e,
        series: F.value,
        config: t.value
      })))
        T.value = o({
          seriesIndex: -1,
          // well, ok
          datapoint: e,
          series: F.value,
          config: t.value
        });
      else {
        let l = "";
        l += `<div style="display:flex;align-items:center;gap:3px"><div style="color:${e.color}">⬤</div><div>${e.name}</div></div>`, e.details && (l += `<div style="width:100%;border-top:1px solid ${t.value.style.chart.tooltip.borderColor};margin-top: 2px">${e.details}</div>`), T.value = `<div style="font-family:inherit">${l}</div>`;
      }
    }
    const pe = g(null), X = g(null);
    function Ne(e) {
      pe.value = e, e ? (u.value = !0, Ue(e), X.value = e.uid) : (u.value = !1, T.value = "", X.value = null);
    }
    function q(e) {
      e === "right" && (b.value.polygonPath.coordinates[0].x += b.value.circleRadius), e === "left" && (b.value.polygonPath.coordinates[0].x -= b.value.circleRadius), e === "top" && (b.value.polygonPath.coordinates[0].y -= b.value.circleRadius), e === "bottom" && (b.value.polygonPath.coordinates[0].y += b.value.circleRadius), oe(b.value);
    }
    function ze(e) {
      const o = [];
      function l(v) {
        v.forEach((i) => {
          const h = {
            name: i.name,
            details: i.details || "-",
            ancestor: i.ancestor && i.ancestor.name || "-",
            color: i.color || ""
          };
          o.push(h), i.nodes && i.nodes.length > 0 && l(i.nodes, i.name);
        });
      }
      return l(e), o;
    }
    const Be = B(() => ze(F.value)), E = B(() => {
      const e = [
        t.value.table.translations.nodeName,
        t.value.table.translations.details,
        t.value.table.translations.ancestor
      ], o = Be.value.map((i, h) => [
        {
          color: i.color,
          name: i.name
        },
        i.details,
        i.ancestor || ""
      ]), l = {
        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
      }, v = [
        t.value.table.translations.nodeName,
        t.value.table.translations.details,
        t.value.table.translations.ancestor
      ];
      return {
        head: e,
        body: o,
        config: l,
        colNames: v
      };
    });
    function ge() {
      $e(() => {
        const e = E.value.body.map((v, i) => [[v[0].name], [v[1]], [v[2]]]), o = [[t.value.style.chart.title.text], [t.value.style.chart.title.subtitle.text], [[...E.value.head]]].concat(e), l = lt(o);
        at({ csvContent: l, title: t.value.style.chart.title.text || "vue-ui-molecule" });
      });
    }
    function Me() {
      return F.value;
    }
    const G = g(!1);
    function Oe(e) {
      G.value = e, Q.value += 1;
    }
    function ye() {
      w.value.showTable = !w.value.showTable;
    }
    function me() {
      w.value.showDataLabels = !w.value.showDataLabels;
    }
    function be() {
      w.value.showTooltip = !w.value.showTooltip;
    }
    return k({
      getData: Me,
      generatePdf: de,
      generateCsv: ge,
      generateImage: ve,
      toggleTable: ye,
      toggleLabels: me,
      toggleTooltip: be
    }), (e, o) => (s(), r("div", {
      onMouseleave: o[7] || (o[7] = (l) => {
        pe.value = null, X.value = null;
      }),
      ref_key: "moleculeChart",
      ref: f,
      class: Ce(`vue-ui-molecule ${G.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
      style: K(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),
      id: `cluster_${S.value}`
    }, [
      t.value.style.chart.title.text ? (s(), r("div", {
        key: 0,
        style: K(`width:100%;background:${t.value.style.chart.backgroundColor};`)
      }, [
        R(rt, {
          config: {
            title: {
              cy: "molecule-div-title",
              ...t.value.style.chart.title
            },
            subtitle: {
              cy: "molecule-div-subtitle",
              ...t.value.style.chart.title.subtitle
            }
          }
        }, null, 8, ["config"])
      ], 4)) : m("", !0),
      t.value.userOptions.show && d.value ? (s(), U(ut, {
        ref_key: "details",
        ref: n,
        key: `user_options_${Q.value}`,
        backgroundColor: t.value.style.chart.backgroundColor,
        color: t.value.style.chart.color,
        isPrinting: I(ue),
        isImaging: I(ce),
        uid: S.value,
        hasTooltip: t.value.userOptions.buttons.tooltip && t.value.style.chart.tooltip.show,
        hasPdf: t.value.userOptions.buttons.pdf,
        hasXls: t.value.userOptions.buttons.csv,
        hasImg: t.value.userOptions.buttons.img,
        hasTable: t.value.userOptions.buttons.table,
        hasLabel: t.value.userOptions.buttons.labels,
        hasFullscreen: t.value.userOptions.buttons.fullscreen,
        isTooltip: w.value.showTooltip,
        titles: { ...t.value.userOptions.buttonTitles },
        chartElement: f.value,
        onToggleFullscreen: Oe,
        onGeneratePdf: I(de),
        onGenerateCsv: ge,
        onGenerateImage: I(ve),
        onToggleTable: ye,
        onToggleLabels: me,
        onToggleTooltip: be
      }, Ye({ _: 2 }, [
        e.$slots.optionTooltip ? {
          name: "optionTooltip",
          fn: $(() => [
            P(e.$slots, "optionTooltip", {}, void 0, !0)
          ]),
          key: "0"
        } : void 0,
        e.$slots.optionPdf ? {
          name: "optionPdf",
          fn: $(() => [
            P(e.$slots, "optionPdf", {}, void 0, !0)
          ]),
          key: "1"
        } : void 0,
        e.$slots.optionCsv ? {
          name: "optionCsv",
          fn: $(() => [
            P(e.$slots, "optionCsv", {}, void 0, !0)
          ]),
          key: "2"
        } : void 0,
        e.$slots.optionImg ? {
          name: "optionImg",
          fn: $(() => [
            P(e.$slots, "optionImg", {}, void 0, !0)
          ]),
          key: "3"
        } : void 0,
        e.$slots.optionTable ? {
          name: "optionTable",
          fn: $(() => [
            P(e.$slots, "optionTable", {}, void 0, !0)
          ]),
          key: "4"
        } : void 0,
        e.$slots.optionLabels ? {
          name: "optionLabels",
          fn: $(() => [
            P(e.$slots, "optionLabels", {}, void 0, !0)
          ]),
          key: "5"
        } : void 0,
        e.$slots.optionFullscreen ? {
          name: "optionFullscreen",
          fn: $(({ toggleFullscreen: l, isFullscreen: v }) => [
            P(e.$slots, "optionFullscreen", Z(J({ toggleFullscreen: l, isFullscreen: v })), void 0, !0)
          ]),
          key: "6"
        } : void 0
      ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasLabel", "hasFullscreen", "isTooltip", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : m("", !0),
      d.value ? (s(), r("svg", {
        key: 2,
        xmlns: I(et),
        viewBox: _.value,
        class: Ce({ "vue-data-ui-fullscreen--on": G.value, "vue-data-ui-fulscreen--off": !G.value }),
        style: K(`overflow: hidden; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`),
        onClick: o[0] || (o[0] = M((l) => Ie(l), ["stop"]))
      }, [
        x("defs", null, [
          (s(!0), r(y, null, N(Object.keys(Le.value), (l) => (s(), r("radialGradient", {
            id: `gradient_${l}`,
            cx: "50%",
            cy: "30%",
            r: "50%",
            fx: "50%",
            fy: "50%"
          }, [
            x("stop", {
              offset: "0%",
              "stop-color": I(tt)(l, 0.5)
            }, null, 8, Ft),
            x("stop", {
              offset: "100%",
              "stop-color": l
            }, null, 8, Rt)
          ], 8, Tt))), 256))
        ]),
        R(bt, {
          dataset: F.value,
          color: t.value.style.chart.links.stroke,
          backgroundColor: t.value.style.chart.backgroundColor
        }, null, 8, ["dataset", "color", "backgroundColor"]),
        R(gt, {
          dataset: F.value,
          hoveredUid: X.value,
          stroke: t.value.style.chart.nodes.stroke,
          strokeHovered: t.value.style.chart.nodes.strokeHovered,
          onZoom: De,
          onHover: Ne
        }, null, 8, ["dataset", "hoveredUid", "stroke", "strokeHovered"]),
        w.value.showDataLabels ? (s(), U(Ct, {
          key: 0,
          dataset: F.value,
          color: t.value.style.chart.color,
          hoveredUid: X.value
        }, null, 8, ["dataset", "color", "hoveredUid"])) : m("", !0),
        P(e.$slots, "svg", { svg: L.value }, void 0, !0)
      ], 14, Pt)) : m("", !0),
      H.value ? (s(), U(xt, {
        key: `direction_pad_${Q.value}`,
        color: t.value.style.chart.color,
        isFullscreen: G.value,
        onMoveLeft: o[1] || (o[1] = (l) => q("left")),
        onMoveRight: o[2] || (o[2] = (l) => q("right")),
        onMoveTop: o[3] || (o[3] = (l) => q("top")),
        onMoveBottom: o[4] || (o[4] = (l) => q("bottom")),
        onReset: o[5] || (o[5] = (l) => {
          ee(), H.value = !1;
        })
      }, null, 8, ["color", "isFullscreen"])) : m("", !0),
      e.$slots.watermark ? (s(), r("div", St, [
        P(e.$slots, "watermark", Z(J({ isPrinting: I(ue) || I(ce) })), void 0, !0)
      ])) : m("", !0),
      d.value ? m("", !0) : (s(), U(vt, {
        key: 5,
        config: {
          type: "molecule",
          style: {
            backgroundColor: t.value.style.chart.backgroundColor,
            molecule: {
              color: "#CCCCCC"
            }
          }
        }
      }, null, 8, ["config"])),
      R(dt, {
        show: w.value.showTooltip && u.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: f.value,
        content: T.value,
        isCustom: t.value.style.chart.tooltip.customFormat && typeof t.value.style.chart.tooltip.customFormat == "function"
      }, {
        "tooltip-before": $(() => [
          P(e.$slots, "tooltip-before", Z(J({ ...le.value })), void 0, !0)
        ]),
        "tooltip-after": $(() => [
          P(e.$slots, "tooltip-after", Z(J({ ...le.value })), void 0, !0)
        ]),
        _: 3
      }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom"]),
      d.value ? (s(), U(ft, {
        key: 6,
        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: $(() => [
          R(ct, {
            colNames: E.value.colNames,
            head: E.value.head,
            body: E.value.body,
            config: E.value.config,
            title: `${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text ? ` : ${t.value.style.chart.title.subtitle.text}` : ""}`,
            onClose: o[6] || (o[6] = (l) => w.value.showTable = !1)
          }, {
            th: $(({ th: l }) => [
              x("div", {
                innerHTML: l,
                style: { display: "flex", "align-items": "center" }
              }, null, 8, Lt)
            ]),
            td: $(({ td: l }) => [
              We(Te(l.name || l), 1)
            ]),
            _: 1
          }, 8, ["colNames", "head", "body", "config", "title"])
        ]),
        _: 1
      }, 8, ["config"])) : m("", !0)
    ], 46, wt));
  }
}, Gt = /* @__PURE__ */ ht(Dt, [["__scopeId", "data-v-a8f784eb"]]);
export {
  Gt as default
};
