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