import { useCssVars as Ee, computed as m, ref as T, watch as Ue, onMounted as De, openBlock as a, createElementBlock as o, normalizeClass as k, normalizeStyle as h, createBlock as K, createCommentVNode as f, unref as n, createSlots as Ye, withCtx as X, renderSlot as I, normalizeProps as se, guardReactiveProps as ue, createVNode as me, toDisplayString as c, createElementVNode as s, Fragment as g, renderList as _, createTextVNode as J, withKeys as qe, nextTick as ke } from "vue";
import { u as He, c as We, t as Ke, a as Je, p as P, b as Qe, g as ne, e as Q, d as re, o as Ze, X as et, s as S, w as we, i as G, f as z, G as $e, m as Ce, j as tt, k as V, n as H, q as lt, r as at } from "./index-Cm2_6s9o.js";
import { u as ot, U as st } from "./usePrinter-Cx8U1e30.js";
import ut from "./vue-ui-skeleton-BUS6A44x.js";
import nt from "./BaseIcon-DpLJi6ci.js";
import rt from "./vue-ui-accordion-CxrNF8BI.js";
import { u as Te } from "./useNestedProp-BYPZJNhi.js";
import { _ as it } from "./PackageVersion-CTMY4zeY.js";
import { P as ct } from "./PenAndPaper-DJ_d10S-.js";
import { _ as dt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const vt = ["id"], yt = {
  key: 1,
  ref: "noTitle",
  class: "vue-data-ui-no-title-space",
  style: "height:36px; width: 100%;background:transparent"
}, ht = ["xmlns", "viewBox"], ft = { key: 0 }, bt = ["fill", "font-weight", "font-size", "x", "y"], pt = ["fill", "font-weight", "font-size", "x", "y"], gt = ["id"], _t = ["stop-color"], xt = ["stop-color"], mt = ["id"], kt = ["stop-color"], wt = ["stop-color"], $t = ["id"], Ct = ["stop-color"], Tt = ["stop-color"], zt = ["stop-color"], Nt = ["id"], St = ["stop-color"], Ft = ["stop-color"], Lt = ["stop-color"], It = ["id"], Pt = ["stop-color"], Vt = ["stop-color"], Rt = ["stop-color"], Bt = { key: 1 }, Mt = ["x", "y", "font-size", "font-weight", "fill"], Ot = ["x", "y", "font-size", "font-weight", "fill"], jt = ["d", "stroke"], At = ["cx", "cy", "r", "fill"], Xt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick"], Gt = { key: 2 }, Et = ["x", "y", "font-size", "fill", "onClick"], Ut = { key: 0 }, Dt = ["x", "y", "fill", "font-size", "font-weight"], Yt = ["x", "y", "height", "width", "fill", "rx", "onClick"], qt = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width", "onClick"], Ht = { key: 3 }, Wt = ["x", "y", "fill", "font-size", "onClick"], Kt = ["d", "stroke"], Jt = ["fill", "cx", "cy", "r", "onClick"], Qt = { key: 4 }, Zt = ["x", "y", "font-size", "font-weight", "fill"], el = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], tl = ["y", "height", "width"], ll = { style: { width: "100%", height: "100%", display: "flex", "align-items": "center", "justify-content": "center", "flex-direction": "column" } }, al = { style: { display: "flex", "align-items": "center", "justify-content": "center", gap: "12px", "flex-wrap": "wrap", "flex-direction": "row" } }, ol = {
  viewBox: "0 0 20 20",
  height: "16",
  width: "16"
}, sl = ["fill"], ul = { key: 6 }, nl = ["y", "height", "width"], rl = { style: { width: "100%", height: "100%", display: "flex", "align-items": "center", "justify-content": "center", "flex-direction": "column" } }, il = { style: { display: "flex", "align-items": "center", "justify-content": "center", gap: "12px", "flex-wrap": "wrap", "flex-direction": "row" } }, cl = {
  viewBox: "0 0 20 20",
  height: "16",
  width: "16"
}, dl = ["fill"], vl = ["cx", "cy", "fill"], yl = ["d", "stroke"], hl = ["cx", "cy", "fill"], fl = ["d", "stroke"], bl = ["cx", "cy", "fill"], pl = ["cx", "cy", "fill"], gl = ["x", "y", "fill", "font-size", "font-weight"], _l = ["x", "y", "fill", "font-size", "font-weight"], xl = ["x", "text-anchor", "y", "fill", "font-size"], ml = ["x", "text-anchor", "y", "fill", "font-size"], kl = ["x", "text-anchor", "y", "fill", "font-size"], wl = ["x", "text-anchor", "y", "fill", "font-size"], $l = ["x", "text-anchor", "y", "fill", "font-size"], Cl = ["x", "y", "font-size", "fill"], Tl = ["x", "y", "font-size", "fill"], zl = ["x", "y", "font-size", "fill"], Nl = {
  key: 4,
  class: "vue-data-ui-watermark"
}, Sl = {
  key: 6,
  ref: "source",
  dir: "auto"
}, Fl = { style: { "padding-top": "36px", position: "relative" } }, Ll = { class: "vue-ui-data-table" }, Il = { key: 0 }, Pl = ["data-cell"], Vl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Rl = { key: 0 }, Bl = { key: 1 }, Ml = ["data-cell"], Ol = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, jl = { key: 0 }, Al = { key: 1 }, Xl = ["data-cell"], Gl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, El = { key: 0 }, Ul = { key: 1 }, Dl = ["data-cell"], Yl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, ql = { key: 0 }, Hl = { key: 1 }, Wl = ["data-cell"], Kl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Jl = { key: 0 }, Ql = { key: 1 }, Zl = ["data-cell"], ea = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, ta = { key: 0 }, la = { key: 1 }, aa = ["data-cell"], oa = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, sa = { key: 0 }, ua = { key: 1 }, na = ["data-cell"], ra = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, ia = ["data-cell"], ca = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, da = ["data-cell"], va = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, ya = ["data-cell"], ha = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, fa = ["data-cell"], ba = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, pa = {
  __name: "vue-ui-chestnut",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  emits: ["selectRoot", "selectBranch", "selectNut"],
  setup(ze, { expose: Ne, emit: E }) {
    const R = ze;
    Ee((l) => ({
      e1bbb6a4: l.tdo
    }));
    const { vue_ui_chestnut: Se } = He(), D = m(() => !!R.dataset && R.dataset.length), w = T(We()), Z = T(null), Fe = T(null), ie = T(0), e = m({
      get: () => ce(),
      set: (l) => l
    });
    function ce() {
      const l = Te({
        userConfig: R.config,
        defaultConfig: Se
      });
      return l.theme ? {
        ...Te({
          userConfig: Ke.vue_ui_chestnut[l.theme] || R.config,
          defaultConfig: l
        }),
        customPalette: Je[l.theme] || P
      } : l;
    }
    Ue(() => R.config, (l) => {
      e.value = ce(), ge();
    }, { deep: !0 });
    const { isPrinting: de, isImaging: ve, generatePdf: ye, generateImage: he } = ot({
      elementId: `vue-ui-chestnut_${w.value}`,
      fileName: e.value.style.chart.layout.title.text || "vue-ui-chestnut"
    }), Le = m(() => e.value.userOptions.show), ee = m(() => Qe(e.value.customPalette)), Y = T({
      showTable: e.value.table.show
    }), te = T(null), fe = T(!1), Ie = m(() => e.value.table.responsiveBreakpoint), r = T({
      gap: 6,
      padding: {
        top: 102,
        left: 12,
        right: 12,
        bottom: 96
      },
      width: 1024,
      height: 0,
      branchSize: 32,
      branchStart: 128
    }), C = m(() => ({
      left: r.value.padding.left,
      top: r.value.padding.top,
      right: r.value.width - r.value.padding.right,
      bottom: r.value.height - r.value.padding.bottom,
      width: r.value.width - (r.value.padding.left + r.value.padding.right),
      height: r.value.height - (r.value.padding.top + r.value.padding.bottom),
      seedX: r.value.padding.left + 64
    })), B = m(() => D.value ? R.dataset.flatMap((l) => (l.branches || []).map((i) => i.value || 0)).reduce((l, i) => l + i, 0) : 0), N = m(() => (R.dataset.forEach((l, i) => {
      ne({
        datasetObject: l,
        requiredAttributes: ["name", "branches"]
      }).forEach((t) => {
        Q({
          componentName: "VueUiChestnut",
          type: "datasetSerieAttribute",
          property: t,
          index: i
        });
      }), l.branches && l.branches.forEach((t, u) => {
        ne({
          datasetObject: t,
          requiredAttributes: ["name", "value"]
        }).forEach((b) => {
          Q({
            componentName: "VueUiChestnut",
            type: "datasetSerieAttribute",
            property: b,
            index: `${i} - ${u}`
          });
        }), t.breakdown && t.breakdown.forEach((b, y) => {
          ne({
            datasetObject: b,
            requiredAttributes: ["name", "value"]
          }).forEach((p) => {
            Q({
              componentName: "VueUiChestnut",
              type: "datasetSerieAttribute",
              property: p,
              index: `${i} - ${u} - ${y}`
            });
          });
        });
      });
    }), R.dataset.map((l, i) => {
      const t = (l.branches || []).map((u) => u.value || 0).reduce((u, b) => u + b, 0);
      return {
        ...l,
        color: re(l.color) || ee.value[i] || P[i] || P[i % P.length],
        id: l.id || `root_${i}_${w.value}`,
        type: "root",
        total: t,
        rootIndex: i,
        branches: (l.branches || []).map((u, b) => ({
          ...u,
          rootName: l.name,
          rootIndex: i,
          color: re(l.color) || ee.value[i] || P[i] || P[i % P.length],
          value: u.value >= 0 ? u.value : 0,
          id: u.id || `branch_${i}_${b}_${w.value}`,
          proportionToRoot: u.value / t,
          type: "branch",
          breakdown: (u.breakdown || []).map((y, p) => ({
            table: {
              rootName: l.name,
              rootValue: t,
              rootToTotal: t / B.value,
              branchName: u.name,
              branchValue: u.value,
              branchToTotal: u.value / B.value,
              branchToRoot: u.value / t,
              nutName: y.name,
              nutValue: y.value,
              nutToTotal: y.value / B.value,
              nutToRoot: y.value / t,
              nutToBranch: y.value / u.value
            },
            ...y,
            type: "nut",
            branchName: u.name,
            rootName: l.name,
            branchTotal: u.value >= 0 ? u.value : 0,
            proportionToBranch: y.value / u.value,
            proportionToRoot: y.value / t,
            proportionToTree: y.value / B.value,
            rootIndex: i,
            id: y.id || `nut_${i}_${b}_${p}_${w.value}`,
            color: re(y.color) || ee.value[p] || P[p] || P[p % P.length],
            value: y.value >= 0 ? y.value : 0
          }))
        }))
      };
    })));
    function Pe() {
      return N.value;
    }
    const Ve = m(() => N.value.flatMap((l) => l.branches).length), Re = m(() => Math.max(...N.value.map((l) => l.branches.map((i) => i.value).reduce((i, t) => i + t, 0)))), Be = m(() => Math.max(...N.value.flatMap((l) => l.branches.map((i) => i.value)))), be = m(() => 256 + r.value.padding.left), O = m(() => N.value.sort((l, i) => i.total - l.total).map((l, i) => {
      const t = C.value.height / N.value.length / 2, u = l.total / Re.value * (t > 64 ? 64 : t);
      return {
        ...l,
        x: C.value.seedX,
        y: C.value.top + C.value.height / N.value.length * (i + 1) - (C.value.height / N.value.length / 2 + r.value.gap / 2),
        r: u < r.value.branchSize / 2 ? r.value.branchSize / 2 : u
      };
    })), Me = m(() => e.value.style.chart.layout.branches.widthRatio <= 0 ? 0.1 : e.value.style.chart.layout.branches.widthRatio > 1.8 ? 1.8 : e.value.style.chart.layout.branches.widthRatio), Oe = m(() => O.value.flatMap((l) => l.branches)), j = m(() => Oe.value.sort((l, i) => i.value - l.value).map((l, i) => ({
      ...l,
      y1: i * r.value.branchSize + C.value.top + i * r.value.gap,
      y2: i * r.value.branchSize + r.value.branchSize,
      x1: be.value,
      x2: 384 * l.value / Be.value * Me.value + be.value
    })));
    function le(l) {
      const i = O.value.find((t) => t.rootIndex === l.rootIndex);
      return { x: i.x, y: i.y, r: i.r };
    }
    const d = T(null), M = T(null), x = T(null), F = T(null);
    function $() {
      d.value = null, x.value = null, F.value = null;
    }
    function L(l) {
      return F.value ? F.value === null ? !0 : l.type === "root" ? l.id === F.value.id : l.rootIndex === F.value.rootIndex : d.value === null && x.value === null ? !0 : l.type === "nut" ? d.value.id === l.id : l.type === "branch" ? x.value.id === l.id : l.type === "root" ? x.value && x.value.rootIndex === l.rootIndex || d.value && d.value.rootIndex === l.rootIndex : !1;
    }
    function je(l) {
      $(), ke(() => {
        d.value = l, x.value = l, M.value = Ce(
          { series: l.breakdown, base: 1 },
          l.x2 + 24 + e.value.style.chart.layout.nuts.offsetX,
          l.y1 + r.value.branchSize / 2,
          80,
          80
        ), E("selectNut", l.breakdown);
      });
    }
    function A() {
      d.value = null, M.value = null, E("selectNut", null);
    }
    function ae(l) {
      x.value && x.value.id === l.id ? (x.value = null, $(), E("selectBranch", null)) : ($(), x.value = l, E("selectBranch", l));
    }
    function pe(l) {
      F.value && F.value.id === l.id ? ($(), E("selectRoot", null)) : ($(), F.value = l, E("selectRoot", l));
    }
    function Ae() {
      return C.value.bottom - (d.value.y1 + 180) < 0 ? 0 : C.value.bottom;
    }
    function U(l) {
      return l.proportion * 100 > e.value.style.chart.layout.nuts.selected.labels.dataLabels.hideUnderValue;
    }
    function Xe() {
      const l = new ResizeObserver((i) => {
        i.forEach((t) => {
          fe.value = t.contentRect.width < Ie.value;
        });
      });
      te.value && l.observe(te.value);
    }
    De(() => {
      ge();
    });
    function ge() {
      Ze(R.dataset) && Q({
        componentName: "VueUiChestnut",
        type: "dataset"
      });
      const l = Ve.value * (r.value.branchSize + r.value.gap) + r.value.padding.top + r.value.padding.bottom;
      r.value.height = l, Xe();
    }
    const v = m(() => {
      const l = [
        e.value.table.th.translations.rootName,
        e.value.table.th.translations.rootValue,
        e.value.table.th.translations.rootToTotal,
        e.value.table.th.translations.branchName,
        e.value.table.th.translations.branchValue,
        e.value.table.th.translations.branchToRoot,
        e.value.table.th.translations.branchToTotal,
        e.value.table.th.translations.nutName,
        e.value.table.th.translations.nutValue,
        e.value.table.th.translations.nutToBranch,
        e.value.table.th.translations.nutToRoot,
        e.value.table.th.translations.nutToTotal
      ], i = N.value.flatMap((t, u) => t.branches.flatMap((b, y) => b.breakdown.flatMap((p, ga) => p.table)));
      return { head: l, body: i };
    });
    function _e() {
      ke(() => {
        const l = [[e.value.style.chart.layout.title.text], [e.value.style.chart.layout.title.subtitle.text], [""], ["Grand total", B.value], [""]], i = v.value.head, t = v.value.body.map((y, p) => [
          v.value.body[p - 1] && v.value.body[p - 1].rootName === y.rootName ? "" : y.rootName,
          v.value.body[p - 1] && v.value.body[p - 1].rootName === y.rootName ? "" : y.rootValue,
          v.value.body[p - 1] && v.value.body[p - 1].rootName === y.rootName ? "" : y.rootToTotal,
          v.value.body[p - 1] && v.value.body[p - 1].branchName === y.branchName ? "" : y.branchName,
          v.value.body[p - 1] && v.value.body[p - 1].branchName === y.branchName ? "" : y.branchValue,
          v.value.body[p - 1] && v.value.body[p - 1].branchName === y.branchName ? "" : y.branchToRoot,
          v.value.body[p - 1] && v.value.body[p - 1].branchName === y.branchName ? "" : y.branchToTotal,
          y.nutName,
          y.nutValue,
          y.nutToBranch,
          y.nutToRoot,
          y.nutToTotal
        ]), u = l.concat([i]).concat(t), b = lt(u);
        at({ csvContent: b, title: e.value.style.chart.layout.title.text || "vue-ui-chestnut" });
      });
    }
    const q = T(!1);
    function Ge(l) {
      q.value = l, ie.value += 1;
    }
    function xe() {
      Y.value.showTable = !Y.value.showTable;
    }
    const W = T(!1);
    function oe() {
      W.value = !W.value;
    }
    return Ne({
      getData: Pe,
      generatePdf: ye,
      generateCsv: _e,
      generateImage: he,
      toggleTable: xe,
      toggleAnnotator: oe
    }), (l, i) => (a(), o("div", {
      class: k(`vue-ui-chestnut ${q.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
      ref_key: "chestnutChart",
      ref: Z,
      id: `vue-ui-chestnut_${w.value}`,
      style: h(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`)
    }, [
      e.value.userOptions.buttons.annotator ? (a(), K(ct, {
        key: 0,
        parent: Z.value,
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        active: W.value,
        onClose: oe
      }, null, 8, ["parent", "backgroundColor", "color", "active"])) : f("", !0),
      Le.value ? (a(), o("div", yt, null, 512)) : f("", !0),
      e.value.userOptions.show && D.value ? (a(), K(st, {
        ref_key: "details",
        ref: Fe,
        key: `user_options_${ie.value}`,
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        isImaging: n(ve),
        isPrinting: n(de),
        uid: w.value,
        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: q.value,
        titles: { ...e.value.userOptions.buttonTitles },
        chartElement: Z.value,
        position: e.value.userOptions.position,
        hasAnnotator: e.value.userOptions.buttons.annotator,
        isAnnotation: W.value,
        onToggleFullscreen: Ge,
        onGeneratePdf: n(ye),
        onGenerateCsv: _e,
        onGenerateImage: n(he),
        onToggleTable: xe,
        onToggleAnnotator: oe
      }, Ye({ _: 2 }, [
        l.$slots.optionPdf ? {
          name: "optionPdf",
          fn: X(() => [
            I(l.$slots, "optionPdf", {}, void 0, !0)
          ]),
          key: "0"
        } : void 0,
        l.$slots.optionCsv ? {
          name: "optionCsv",
          fn: X(() => [
            I(l.$slots, "optionCsv", {}, void 0, !0)
          ]),
          key: "1"
        } : void 0,
        l.$slots.optionImg ? {
          name: "optionImg",
          fn: X(() => [
            I(l.$slots, "optionImg", {}, void 0, !0)
          ]),
          key: "2"
        } : void 0,
        l.$slots.optionTable ? {
          name: "optionTable",
          fn: X(() => [
            I(l.$slots, "optionTable", {}, void 0, !0)
          ]),
          key: "3"
        } : void 0,
        l.$slots.optionFullscreen ? {
          name: "optionFullscreen",
          fn: X(({ toggleFullscreen: t, isFullscreen: u }) => [
            I(l.$slots, "optionFullscreen", se(ue({ toggleFullscreen: t, isFullscreen: u })), void 0, !0)
          ]),
          key: "4"
        } : void 0,
        l.$slots.optionAnnotator ? {
          name: "optionAnnotator",
          fn: X(({ toggleAnnotator: t, isAnnotator: u }) => [
            I(l.$slots, "optionAnnotator", se(ue({ toggleAnnotator: t, isAnnotator: u })), void 0, !0)
          ]),
          key: "5"
        } : void 0
      ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage"])) : f("", !0),
      r.value.height > 0 && D.value ? (a(), o("svg", {
        key: 3,
        xmlns: n(et),
        class: k({ "vue-data-ui-fullscreen--on": q.value, "vue-data-ui-fulscreen--off": !q.value }),
        viewBox: `0 0 ${r.value.width} ${r.value.height}`,
        style: h(`overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
      }, [
        me(it),
        d.value ? f("", !0) : (a(), o("g", ft, [
          e.value.style.chart.layout.title.text ? (a(), o("text", {
            key: 0,
            "text-anchor": "middle",
            fill: e.value.style.chart.layout.title.color,
            "font-weight": e.value.style.chart.layout.title.bold ? "bold" : "normal",
            "font-size": e.value.style.chart.layout.title.fontSize,
            x: r.value.width / 2,
            y: 12 + e.value.style.chart.layout.title.fontSize + e.value.style.chart.layout.title.offsetY,
            onClick: $
          }, c(e.value.style.chart.layout.title.text), 9, bt)) : f("", !0),
          e.value.style.chart.layout.title.subtitle.text ? (a(), o("text", {
            key: 1,
            "text-anchor": "middle",
            fill: e.value.style.chart.layout.title.subtitle.color,
            "font-weight": e.value.style.chart.layout.title.subtitle.bold ? "bold" : "normal",
            "font-size": e.value.style.chart.layout.title.subtitle.fontSize,
            x: r.value.width / 2,
            y: 48 + e.value.style.chart.layout.title.subtitle.fontSize + e.value.style.chart.layout.title.subtitle.offsetY,
            onClick: $
          }, c(e.value.style.chart.layout.title.subtitle.text), 9, pt)) : f("", !0)
        ])),
        s("defs", null, [
          (a(!0), o(g, null, _(N.value, (t, u) => (a(), o("radialGradient", {
            cx: "50%",
            cy: "50%",
            r: "50%",
            fx: "50%",
            fy: "50%",
            id: `root_gradient_${w.value}_${t.rootIndex}`
          }, [
            s("stop", {
              offset: "0%",
              "stop-color": n(S)(n(we)(t.color, 0.05), 100 - e.value.style.chart.layout.roots.gradientIntensity)
            }, null, 8, _t),
            s("stop", {
              offset: "100%",
              "stop-color": t.color
            }, null, 8, xt)
          ], 8, gt))), 256)),
          (a(!0), o(g, null, _(N.value, (t) => (a(), o("linearGradient", {
            x1: "0%",
            y1: "0%",
            x2: "100%",
            y2: "0%",
            id: `branch_gradient_${w.value}_${t.rootIndex}`
          }, [
            s("stop", {
              offset: "0%",
              "stop-color": t.color
            }, null, 8, kt),
            s("stop", {
              offset: "100%",
              "stop-color": n(S)(n(we)(t.color, 0.02), 100 - e.value.style.chart.layout.branches.gradientIntensity)
            }, null, 8, wt)
          ], 8, mt))), 256)),
          s("radialGradient", {
            cx: "50%",
            cy: "50%",
            r: "50%",
            fx: "50%",
            fy: "50%",
            id: `nutpick_${w.value}`
          }, [
            s("stop", {
              offset: "0%",
              "stop-color": n(S)("#FFFFFF", 0)
            }, null, 8, Ct),
            s("stop", {
              offset: "80%",
              "stop-color": n(S)("#FFFFFF", e.value.style.chart.layout.nuts.selected.gradientIntensity)
            }, null, 8, Tt),
            s("stop", {
              offset: "100%",
              "stop-color": n(S)("#FFFFFF", 0)
            }, null, 8, zt)
          ], 8, $t),
          s("radialGradient", {
            cx: "50%",
            cy: "50%",
            r: "50%",
            fx: "50%",
            fy: "50%",
            id: `nut_${w.value}`
          }, [
            s("stop", {
              offset: "0%",
              "stop-color": n(S)("#FFFFFF", 0)
            }, null, 8, St),
            s("stop", {
              offset: "80%",
              "stop-color": n(S)("#FFFFFF", e.value.style.chart.layout.nuts.gradientIntensity)
            }, null, 8, Ft),
            s("stop", {
              offset: "100%",
              "stop-color": n(S)("#FFFFFF", 0)
            }, null, 8, Lt)
          ], 8, Nt),
          s("radialGradient", {
            cx: "50%",
            cy: "50%",
            r: "50%",
            fx: "50%",
            fy: "50%",
            id: `nut_underlayer_${w.value}`
          }, [
            s("stop", {
              offset: "0%",
              "stop-color": n(S)(e.value.style.chart.backgroundColor, 100)
            }, null, 8, Pt),
            s("stop", {
              offset: "80%",
              "stop-color": n(S)(e.value.style.chart.backgroundColor, 60)
            }, null, 8, Vt),
            s("stop", {
              offset: "100%",
              "stop-color": n(S)(e.value.style.chart.backgroundColor, 0)
            }, null, 8, Rt)
          ], 8, It)
        ]),
        e.value.style.chart.layout.grandTotal.show ? (a(), o("g", Bt, [
          s("text", {
            x: C.value.seedX,
            y: 32 + e.value.style.chart.layout.grandTotal.offsetY,
            "font-size": e.value.style.chart.layout.grandTotal.fontSize,
            "font-weight": e.value.style.chart.layout.grandTotal.bold ? "bold" : "normal",
            fill: e.value.style.chart.layout.grandTotal.color,
            "text-anchor": "middle",
            onClick: $
          }, c(e.value.style.chart.layout.grandTotal.text), 9, Mt),
          s("text", {
            x: C.value.seedX,
            y: 38 + e.value.style.chart.layout.grandTotal.fontSize + e.value.style.chart.layout.grandTotal.offsetY,
            "font-size": e.value.style.chart.layout.grandTotal.fontSize,
            "font-weight": e.value.style.chart.layout.grandTotal.bold ? "bold" : "normal",
            fill: e.value.style.chart.layout.grandTotal.color,
            "text-anchor": "middle",
            onClick: $
          }, c(n(G)(
            e.value.style.chart.layout.grandTotal.formatter,
            B.value,
            n(z)({
              p: e.value.style.chart.layout.grandTotal.prefix,
              v: B.value,
              s: e.value.style.chart.layout.grandTotal.suffix,
              r: e.value.style.chart.layout.grandTotal.roundingValue
            })
          )), 9, Ot)
        ])) : f("", !0),
        (a(!0), o(g, null, _(j.value, (t) => (a(), o("g", null, [
          (a(!0), o(g, null, _(r.value.branchSize, (u, b) => (a(), o("path", {
            d: `M
                    ${t.x1},${t.y1 + b}
                    C${t.x1 - 20},${t.y1 + b} 
                    ${t.x1 - 80},${t.y1 + b} 
                    ${le(t).x + le(t).r / 2}, ${le(t).y}
                `,
            stroke: n(S)(t.color, e.value.style.chart.layout.links.opacity),
            fill: "none",
            "stroke-width": "2",
            "shape-rendering": "cirspEdges",
            style: h(`opacity:${L(t) ? 1 : 0}`),
            onClick: $
          }, null, 12, jt))), 256))
        ]))), 256)),
        (a(!0), o(g, null, _(O.value, (t) => (a(), o("circle", {
          cx: t.x,
          cy: t.y,
          r: t.r,
          fill: e.value.style.chart.layout.roots.underlayerColor,
          stroke: "none",
          style: h(`cursor:pointer; opacity:${L(t) ? 1 : 0.05}`)
        }, null, 12, At))), 256)),
        (a(!0), o(g, null, _(O.value, (t, u) => (a(), o("circle", {
          cx: t.x,
          cy: t.y,
          r: t.r,
          fill: e.value.style.chart.layout.roots.useGradient ? `url(#root_gradient_${w.value}_${t.rootIndex})` : t.color,
          stroke: e.value.style.chart.layout.roots.stroke,
          "stroke-width": e.value.style.chart.layout.roots.strokeWidth,
          style: h(`cursor:pointer; opacity:${L(t) ? 1 : 0.05}`),
          onClick: (b) => pe(t)
        }, null, 12, Xt))), 256)),
        e.value.style.chart.layout.roots.labels.show ? (a(), o("g", Gt, [
          (a(!0), o(g, null, _(O.value, (t, u) => (a(), o("text", {
            x: t.x,
            y: t.y + e.value.style.chart.layout.roots.labels.fontSize / 2.6,
            "text-anchor": "middle",
            "font-size": e.value.style.chart.layout.roots.labels.fontSize,
            fill: e.value.style.chart.layout.roots.labels.adaptColorToBackground ? n($e)(t.color) : e.value.style.chart.layout.roots.labels.color,
            "font-weight": "bold",
            style: h(`cursor:pointer; opacity:${L(t) ? 1 : 0.05}`),
            onClick: (b) => pe(t)
          }, c(n(G)(
            e.value.style.chart.layout.roots.labels.formatter,
            t.total,
            n(z)({
              p: e.value.style.chart.layout.roots.labels.prefix,
              v: t.total,
              s: e.value.style.chart.layout.roots.labels.suffix,
              r: e.value.style.chart.layout.roots.labels.roundingValue
            }),
            { datapoint: t }
          )), 13, Et))), 256)),
          (a(!0), o(g, null, _(O.value, (t) => (a(), o("g", null, [
            d.value && t.rootIndex === d.value.rootIndex || x.value && t.rootIndex === x.value.rootIndex || F.value && t.rootIndex === F.value.rootIndex ? (a(), o("g", Ut, [
              s("text", {
                x: t.x,
                y: t.y + t.r + 24,
                "text-anchor": "middle",
                fill: e.value.style.chart.layout.roots.labels.name.color,
                "font-size": e.value.style.chart.layout.roots.labels.name.fontSize,
                "font-weight": e.value.style.chart.layout.roots.labels.name.bold ? "bold" : "normal",
                onClick: $
              }, c(t.name), 9, Dt)
            ])) : f("", !0)
          ]))), 256))
        ])) : f("", !0),
        (a(!0), o(g, null, _(j.value, (t) => (a(), o("rect", {
          x: t.x1,
          y: t.y1,
          height: r.value.branchSize,
          width: t.x2 - t.x1,
          fill: e.value.style.chart.layout.branches.underlayerColor,
          rx: e.value.style.chart.layout.branches.borderRadius,
          stroke: "none",
          style: h(`opacity:${L(t) ? 1 : 0.05}`),
          onClick: (u) => ae(t)
        }, null, 12, Yt))), 256)),
        (a(!0), o(g, null, _(j.value, (t, u) => (a(), o("rect", {
          x: t.x1,
          y: t.y1,
          height: r.value.branchSize,
          width: t.x2 - t.x1,
          fill: e.value.style.chart.layout.branches.useGradient ? `url(#branch_gradient_${w.value}_${t.rootIndex})` : t.color,
          rx: e.value.style.chart.layout.branches.borderRadius,
          stroke: e.value.style.chart.layout.branches.stroke,
          "stroke-width": e.value.style.chart.layout.branches.strokeWidth,
          style: h(`cursor:pointer; opacity:${L(t) ? 1 : 0.05}`),
          onClick: (b) => ae(t)
        }, null, 12, qt))), 256)),
        e.value.style.chart.layout.branches.labels.dataLabels.show ? (a(), o("g", Ht, [
          (a(!0), o(g, null, _(j.value, (t) => (a(), o("g", null, [
            t.proportionToRoot * 100 > e.value.style.chart.layout.branches.labels.dataLabels.hideUnderValue ? (a(), o("text", {
              key: 0,
              x: t.x1 + 6,
              y: t.y1 + r.value.branchSize / 1.5,
              "text-anchor": "start",
              fill: n($e)(t.color),
              "font-size": e.value.style.chart.layout.branches.labels.dataLabels.fontSize,
              "font-weight": "bold",
              style: h(`cursor:pointer; opacity:${L(t) ? 1 : 0.05}`),
              onClick: (u) => ae(t)
            }, c(n(G)(
              e.value.style.chart.layout.branches.labels.dataLabels.formatter,
              t.value,
              n(z)({
                p: e.value.style.chart.layout.branches.labels.dataLabels.prefix,
                v: t.value,
                s: e.value.style.chart.layout.branches.labels.dataLabels.suffix,
                r: e.value.style.chart.layout.branches.labels.dataLabels.roundingValue
              }),
              { datapoint: t }
            )), 13, Wt)) : f("", !0)
          ]))), 256))
        ])) : f("", !0),
        (a(!0), o(g, null, _(j.value, (t, u) => (a(), o("g", null, [
          (a(!0), o(g, null, _(n(Ce)(
            { series: t.breakdown, base: 1 },
            t.x2 + 24 + e.value.style.chart.layout.nuts.offsetX,
            t.y1 + r.value.branchSize / 2,
            r.value.branchSize / 3,
            r.value.branchSize / 3
          ), (b, y) => (a(), o("path", {
            d: b.path,
            stroke: b.color,
            "stroke-width": 10,
            fill: "none",
            style: h(`opacity:${L(t) ? 1 : 0.1}`)
          }, null, 12, Kt))), 256)),
          s("circle", {
            fill: e.value.style.chart.layout.nuts.useGradient ? `url(#nut_${w.value})` : "transparent",
            cx: t.x2 + 24 + e.value.style.chart.layout.nuts.offsetX,
            cy: t.y1 + r.value.branchSize / 2,
            r: r.value.branchSize / 2 + 2,
            onClick: (b) => je(t),
            style: h(`cursor:pointer;opacity:${L(t) ? 1 : 0.1}`)
          }, null, 12, Jt)
        ]))), 256)),
        e.value.style.chart.layout.branches.labels.show && !x.value ? (a(), o("g", Qt, [
          (a(!0), o(g, null, _(j.value, (t) => (a(), o("text", {
            x: t.x2 + r.value.branchSize + 24 + e.value.style.chart.layout.nuts.offsetX,
            y: t.y1 + r.value.branchSize / 2 + 5,
            "font-size": e.value.style.chart.layout.branches.labels.fontSize,
            "font-weight": e.value.style.chart.layout.branches.labels.bold ? "bold" : "normal",
            fill: e.value.style.chart.layout.branches.labels.color,
            "text-anchor": "start",
            style: h(`opacity:${L(t) ? 1 : 0.1}`)
          }, c(t.name), 13, Zt))), 256))
        ])) : f("", !0),
        s("line", {
          x1: 256 + r.value.padding.left,
          x2: 256 + r.value.padding.left,
          y1: C.value.top,
          y2: C.value.bottom,
          stroke: e.value.style.chart.layout.verticalSeparator.stroke,
          "stroke-width": e.value.style.chart.layout.verticalSeparator.strokeWidth
        }, null, 8, el),
        !d.value && !x.value ? (a(), o("foreignObject", {
          key: 5,
          x: 0,
          y: C.value.bottom,
          height: r.value.height - C.value.bottom,
          width: r.value.width,
          style: { overflow: "visible" },
          onClick: $
        }, [
          s("div", ll, [
            s("div", al, [
              (a(!0), o(g, null, _(O.value, (t) => (a(), o("div", {
                style: h(`display:flex;align-items:center;gap:3px;flex-direction:row;font-size:${e.value.style.chart.layout.legend.fontSize}px;`)
              }, [
                (a(), o("svg", ol, [
                  s("circle", {
                    cx: "10",
                    cy: "10",
                    r: "10",
                    fill: t.color,
                    stroke: "none"
                  }, null, 8, sl)
                ])),
                s("span", null, c(t.name) + ":", 1),
                s("b", null, c(n(G)(
                  e.value.style.chart.layout.roots.labels.formatter,
                  t.total,
                  n(z)({
                    p: e.value.style.chart.layout.legend.prefix,
                    v: t.total,
                    s: e.value.style.chart.layout.legend.suffix,
                    r: e.value.style.chart.layout.legend.roundingValue
                  }),
                  { datapoint: t }
                )), 1),
                J(" (" + c(n(z)({
                  v: t.total / B.value * 100,
                  s: "%",
                  r: e.value.style.chart.layout.legend.roundingPercentage
                })) + ") ", 1)
              ], 4))), 256))
            ])
          ])
        ], 8, tl)) : f("", !0),
        d.value && M.value ? (a(), o("g", ul, [
          (a(), o("foreignObject", {
            x: 0,
            y: Ae(),
            height: r.value.height - C.value.bottom,
            width: r.value.width,
            style: { overflow: "visible" },
            onClick: $
          }, [
            s("div", rl, [
              s("b", null, c(d.value.name), 1),
              s("div", il, [
                (a(!0), o(g, null, _(d.value.breakdown, (t, u) => (a(), o("div", {
                  style: h(`display:flex;align-items:center;gap:6px;flex-direction:row;font-size:${e.value.style.chart.layout.legend.fontSize}px;`)
                }, [
                  (a(), o("svg", cl, [
                    s("circle", {
                      cx: "10",
                      cy: "10",
                      r: "10",
                      fill: t.color,
                      stroke: "none"
                    }, null, 8, dl)
                  ])),
                  s("span", null, [
                    J(c(t.name) + ": ", 1),
                    s("b", null, c(e.value.style.chart.layout.legend.prefix) + " " + c(t.value.toFixed(e.value.style.chart.layout.nuts.selected.labels.roundingValue)) + " " + c(e.value.style.chart.layout.legend.suffix), 1),
                    J(" (" + c((t.proportionToBranch * 100).toFixed(e.value.style.chart.layout.nuts.selected.labels.roundingPercentage)) + "%)", 1)
                  ])
                ], 4))), 256))
              ])
            ])
          ], 8, nl)),
          s("circle", {
            cx: d.value.x2 + 24 + e.value.style.chart.layout.nuts.offsetX,
            cy: d.value.y1 + r.value.branchSize / 2,
            r: 256,
            fill: `url(#nut_underlayer_${w.value})`,
            onClick: A,
            class: k(e.value.style.chart.layout.nuts.selected.useMotion ? "vue-ui-chestnut-animated" : "")
          }, null, 10, vl),
          (a(!0), o(g, null, _(M.value, (t) => (a(), o("g", null, [
            U(t) ? (a(), o("path", {
              key: 0,
              d: n(tt)(
                t,
                {
                  x: d.value.x2 + 24 + e.value.style.chart.layout.nuts.offsetX,
                  y: d.value.y1 + r.value.branchSize / 2
                },
                16,
                16,
                !1,
                !1,
                64
              ),
              stroke: t.color,
              "stroke-width": "1",
              "stroke-linecap": "round",
              "stroke-linejoin": "round",
              fill: "none",
              class: k(e.value.style.chart.layout.nuts.selected.useMotion ? "vue-ui-chestnut-animated" : "")
            }, null, 10, yl)) : f("", !0)
          ]))), 256)),
          s("circle", {
            cx: d.value.x2 + 24 + e.value.style.chart.layout.nuts.offsetX,
            cy: d.value.y1 + r.value.branchSize / 2,
            r: 118,
            fill: e.value.style.chart.backgroundColor,
            onClick: A,
            class: k(e.value.style.chart.layout.nuts.selected.useMotion ? "vue-ui-chestnut-animated" : "")
          }, null, 10, hl),
          (a(!0), o(g, null, _(M.value, (t) => (a(), o("path", {
            d: t.path,
            stroke: t.color,
            "stroke-width": 64,
            fill: "none",
            onClick: A,
            class: k(e.value.style.chart.layout.nuts.selected.useMotion ? "vue-ui-chestnut-animated" : "")
          }, null, 10, fl))), 256)),
          s("circle", {
            cx: d.value.x2 + 24 + e.value.style.chart.layout.nuts.offsetX,
            cy: d.value.y1 + r.value.branchSize / 2,
            r: 100,
            fill: `url(#nutpick_${w.value})`,
            onClick: A,
            class: k(e.value.style.chart.layout.nuts.selected.useMotion ? "vue-ui-chestnut-animated" : "")
          }, null, 10, bl),
          s("circle", {
            cx: d.value.x2 + 24 + e.value.style.chart.layout.nuts.offsetX,
            cy: d.value.y1 + r.value.branchSize / 2,
            r: 48,
            fill: e.value.style.chart.backgroundColor,
            onClick: A,
            class: k(e.value.style.chart.layout.nuts.selected.useMotion ? "vue-ui-chestnut-animated" : "")
          }, null, 10, pl),
          s("text", {
            x: d.value.x2 + 24 + e.value.style.chart.layout.nuts.offsetX,
            y: d.value.y1 + 8,
            fill: e.value.style.chart.layout.nuts.selected.labels.core.total.color,
            "font-size": e.value.style.chart.layout.nuts.selected.labels.core.total.fontSize,
            "font-weight": e.value.style.chart.layout.nuts.selected.labels.core.total.bold ? "bold" : "normal",
            "text-anchor": "middle",
            onClick: A,
            class: k(e.value.style.chart.layout.nuts.selected.useMotion ? "vue-ui-chestnut-animated" : "")
          }, c(e.value.translations.total), 11, gl),
          s("text", {
            x: d.value.x2 + 24 + e.value.style.chart.layout.nuts.offsetX,
            y: d.value.y1 + 36,
            fill: e.value.style.chart.layout.nuts.selected.labels.core.value.color,
            "font-size": e.value.style.chart.layout.nuts.selected.labels.core.value.fontSize,
            "font-weight": e.value.style.chart.layout.nuts.selected.labels.core.value.bold ? "bold" : "normal",
            "text-anchor": "middle",
            onClick: A,
            class: k(e.value.style.chart.layout.nuts.selected.useMotion ? "vue-ui-chestnut-animated" : "")
          }, c(n(G)(
            e.value.style.chart.layout.nuts.selected.labels.dataLabels.formatter,
            d.value.value,
            n(z)({
              p: e.value.style.chart.layout.nuts.selected.labels.core.value.prefix,
              v: d.value.value,
              s: e.value.style.chart.layout.nuts.selected.labels.core.value.suffix,
              r: e.value.style.chart.layout.nuts.selected.roundingValue
            }),
            { datapoint: d.value }
          )), 11, _l),
          (a(!0), o(g, null, _(M.value, (t, u) => (a(), o("g", null, [
            U(t) ? (a(), o("text", {
              key: 0,
              x: n(V)(t).x,
              "text-anchor": n(V)(t).anchor,
              y: n(H)(t),
              fill: t.color,
              "font-size": e.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,
              style: h(`font-weight:${e.value.style.chart.layout.nuts.selected.labels.dataLabels.bold ? "bold" : ""}`),
              class: k(e.value.style.chart.layout.nuts.selected.useMotion ? "vue-ui-chestnut-animated" : "")
            }, " ⬤ ", 14, xl)) : f("", !0),
            U(t) ? (a(), o("text", {
              key: 1,
              x: n(V)(t, !0).x,
              "text-anchor": n(V)(t, !0).anchor,
              y: n(H)(t),
              fill: e.value.style.chart.layout.nuts.selected.labels.dataLabels.color,
              "font-size": e.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,
              style: h(`font-weight:${e.value.style.chart.layout.nuts.selected.labels.dataLabels.bold ? "bold" : ""}`),
              class: k(e.value.style.chart.layout.nuts.selected.useMotion ? "vue-ui-chestnut-animated" : "")
            }, c(d.value.breakdown[u].name), 15, ml)) : f("", !0)
          ]))), 256)),
          (a(!0), o(g, null, _(M.value, (t, u) => (a(), o("g", null, [
            U(t) ? (a(), o("text", {
              key: 0,
              x: n(V)(t, !0).x,
              "text-anchor": n(V)(t).anchor,
              y: n(H)(t) + e.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,
              fill: e.value.style.chart.layout.nuts.selected.labels.dataLabels.color,
              "font-size": e.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,
              style: h(`font-weight:${e.value.style.chart.layout.nuts.selected.labels.dataLabels.bold ? "bold" : ""}`),
              class: k(e.value.style.chart.layout.nuts.selected.useMotion ? "vue-ui-chestnut-animated" : "")
            }, c(n(z)({
              v: d.value.breakdown[u].value / d.value.value * 100,
              s: "%",
              r: e.value.style.chart.layout.nuts.selected.labels.roundingPercentage
            })) + " " + c(e.value.translations.of) + " " + c(d.value.breakdown[u].branchName) + " " + c(n(G)(
              e.value.style.chart.layout.nuts.selected.labels.dataLabels.formatter,
              d.value.breakdown[u].value,
              n(z)({
                p: e.value.style.chart.layout.nuts.selected.labels.dataLabels.prefix,
                v: d.value.breakdown[u].value,
                s: e.value.style.chart.layout.nuts.selected.labels.dataLabels.suffix,
                r: e.value.style.chart.layout.nuts.selected.roundingValue
              }),
              { datapoint: M.value, seriesIndex: u }
            )), 15, kl)) : f("", !0),
            U(t) ? (a(), o("text", {
              key: 1,
              x: n(V)(t, !0).x,
              "text-anchor": n(V)(t).anchor,
              y: n(H)(t) + e.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize * 2,
              fill: e.value.style.chart.layout.nuts.selected.labels.dataLabels.color,
              "font-size": e.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,
              style: h(`font-weight:${e.value.style.chart.layout.nuts.selected.labels.dataLabels.bold ? "bold" : ""}`),
              class: k(e.value.style.chart.layout.nuts.selected.useMotion ? "vue-ui-chestnut-animated" : "")
            }, c(n(z)({
              v: d.value.breakdown[u].proportionToRoot * 100,
              s: "%",
              r: e.value.style.chart.layout.nuts.selected.labels.roundingPercentage
            })) + " " + c(e.value.translations.of) + " " + c(d.value.breakdown[u].rootName), 15, wl)) : f("", !0),
            U(t) ? (a(), o("text", {
              key: 2,
              x: n(V)(t, !0).x,
              "text-anchor": n(V)(t).anchor,
              y: n(H)(t) + e.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize * 3,
              fill: e.value.style.chart.layout.nuts.selected.labels.dataLabels.color,
              "font-size": e.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,
              style: h(`font-weight:${e.value.style.chart.layout.nuts.selected.labels.dataLabels.bold ? "bold" : ""}`),
              class: k(e.value.style.chart.layout.nuts.selected.useMotion ? "vue-ui-chestnut-animated" : "")
            }, c(n(z)({
              v: d.value.breakdown[u].proportionToTree * 100,
              s: "%",
              r: e.value.style.chart.layout.nuts.selected.labels.roundingPercentage
            })) + " " + c(e.value.translations.proportionToTree), 15, $l)) : f("", !0)
          ]))), 256))
        ])) : f("", !0),
        (a(!0), o(g, null, _(j.value, (t) => (a(), o("g", null, [
          x.value && x.value.id === t.id && !d.value ? (a(), o("text", {
            key: 0,
            x: t.x1 + 6,
            y: t.y1 + r.value.branchSize + 24,
            "font-weight": "bold",
            "text-anchor": "start",
            "font-size": e.value.style.chart.layout.branches.labels.dataLabels.fontSize,
            fill: e.value.style.chart.layout.branches.labels.color,
            onClick: $
          }, c(t.name) + ": " + c(n(G)(
            e.value.style.chart.layout.branches.labels.dataLabels.formatter,
            t.value,
            n(z)({
              p: e.value.style.chart.layout.branches.labels.dataLabels.prefix,
              v: t.value,
              s: e.value.style.chart.layout.branches.labels.dataLabels.suffix,
              r: e.value.style.chart.layout.branches.labels.dataLabels.roundingValue
            }),
            { datapoint: t }
          )), 9, Cl)) : f("", !0),
          x.value && x.value.id === t.id && !d.value ? (a(), o("text", {
            key: 1,
            x: t.x1 + 6,
            y: t.y1 + r.value.branchSize + 48,
            "text-anchor": "start",
            "font-size": e.value.style.chart.layout.branches.labels.dataLabels.fontSize,
            fill: e.value.style.chart.layout.branches.labels.color,
            onClick: $
          }, c(n(z)({
            v: t.proportionToRoot * 100,
            s: "%",
            r: e.value.style.chart.layout.branches.labels.dataLabels.roundingPercentage
          })) + " " + c(e.value.translations.of) + " " + c(t.rootName), 9, Tl)) : f("", !0),
          x.value && x.value.id === t.id && !d.value ? (a(), o("text", {
            key: 2,
            x: t.x1 + 6,
            y: t.y1 + r.value.branchSize + 72,
            "text-anchor": "start",
            "font-size": e.value.style.chart.layout.branches.labels.dataLabels.fontSize,
            fill: e.value.style.chart.layout.branches.labels.color,
            onClick: $
          }, c(n(z)({
            v: t.value / B.value * 100,
            s: "%",
            r: e.value.style.chart.layout.branches.labels.dataLabels.roundingPercentage
          })) + " " + c(e.value.translations.proportionToTree), 9, zl)) : f("", !0)
        ]))), 256)),
        I(l.$slots, "svg", { svg: r.value }, void 0, !0)
      ], 14, ht)) : f("", !0),
      l.$slots.watermark ? (a(), o("div", Nl, [
        I(l.$slots, "watermark", se(ue({ isPrinting: n(de) || n(ve) })), void 0, !0)
      ])) : f("", !0),
      D.value ? f("", !0) : (a(), K(ut, {
        key: 5,
        config: {
          type: "chestnut",
          style: {
            backgroundColor: e.value.style.chart.backgroundColor,
            chestnut: {
              color: "#CCCCCC"
            }
          }
        }
      }, null, 8, ["config"])),
      I(l.$slots, "legend", { legend: N.value }, void 0, !0),
      l.$slots.source ? (a(), o("div", Sl, [
        I(l.$slots, "source", {}, void 0, !0)
      ], 512)) : f("", !0),
      D.value ? (a(), K(rt, {
        key: 7,
        hideDetails: "",
        config: {
          open: Y.value.showTable,
          maxHeight: 1e4,
          body: {
            backgroundColor: e.value.style.chart.backgroundColor,
            color: e.value.style.chart.color
          },
          head: {
            backgroundColor: e.value.style.chart.backgroundColor,
            color: e.value.style.chart.color
          }
        }
      }, {
        content: X(() => [
          s("div", {
            ref_key: "tableContainer",
            ref: te,
            class: "vue-ui-chestnut-table"
          }, [
            s("div", Fl, [
              s("div", {
                role: "button",
                tabindex: "0",
                style: h(`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: i[0] || (i[0] = (t) => Y.value.showTable = !1),
                onKeypress: i[1] || (i[1] = qe((t) => Y.value.showTable = !1, ["enter"]))
              }, [
                me(nt, {
                  name: "close",
                  stroke: e.value.table.th.color,
                  "stroke-width": 2
                }, null, 8, ["stroke"])
              ], 36),
              s("div", {
                style: { width: "100%" },
                class: k({ "vue-ui-responsive": fe.value })
              }, [
                s("table", Ll, [
                  s("caption", {
                    style: h({ backgroundColor: e.value.table.th.backgroundColor, color: e.value.table.th.color, outline: e.value.table.th.outline }),
                    class: "vue-ui-data-table__caption"
                  }, [
                    J(c(e.value.style.chart.layout.title.text) + " ", 1),
                    e.value.style.chart.layout.title.subtitle.text ? (a(), o("span", Il, c(e.value.style.chart.layout.title.subtitle.text), 1)) : f("", !0)
                  ], 4),
                  s("thead", null, [
                    s("tr", {
                      role: "row",
                      style: h(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color}`)
                    }, [
                      (a(!0), o(g, null, _(v.value.head, (t) => (a(), o("th", {
                        style: h(`outline:${e.value.table.th.outline}`)
                      }, c(t), 5))), 256))
                    ], 4)
                  ]),
                  s("tbody", null, [
                    (a(!0), o(g, null, _(v.value.body, (t, u) => (a(), o("tr", {
                      class: k({ "vue-ui-data-table__tbody__row": !0, "vue-ui-data-table__tbody__row-even": u % 2 === 0, "vue-ui-data-table__tbody__row-odd": u % 2 !== 0 }),
                      style: h(`background:${e.value.table.td.backgroundColor};color:${e.value.table.td.color}`)
                    }, [
                      s("td", {
                        class: "vue-ui-data-table__tbody__td",
                        style: h(`outline:${e.value.table.td.outline}`),
                        "data-cell": v.value.head[0]
                      }, [
                        s("div", Vl, [
                          v.value.body[u - 1] && v.value.body[u - 1].rootName === t.rootName ? (a(), o("span", Rl)) : (a(), o("span", Bl, c(t.rootName), 1))
                        ])
                      ], 12, Pl),
                      s("td", {
                        class: "vue-ui-data-table__tbody__td",
                        style: h(`outline:${e.value.table.td.outline}`),
                        "data-cell": v.value.head[1]
                      }, [
                        s("div", Ol, [
                          v.value.body[u - 1] && v.value.body[u - 1].rootName === t.rootName ? (a(), o("span", jl)) : (a(), o("span", Al, c(t.rootValue.toFixed(e.value.table.td.roundingValue)), 1))
                        ])
                      ], 12, Ml),
                      s("td", {
                        class: "vue-ui-data-table__tbody__td",
                        style: h(`outline:${e.value.table.td.outline}`),
                        "data-cell": v.value.head[2]
                      }, [
                        s("div", Gl, [
                          v.value.body[u - 1] && v.value.body[u - 1].rootName === t.rootName ? (a(), o("span", El)) : (a(), o("span", Ul, c((t.rootToTotal * 100).toFixed(e.value.table.td.roundingPercentage)) + "% ", 1))
                        ])
                      ], 12, Xl),
                      s("td", {
                        class: "vue-ui-data-table__tbody__td",
                        style: h(`outline:${e.value.table.td.outline}`),
                        "data-cell": v.value.head[3]
                      }, [
                        s("div", Yl, [
                          v.value.body[u - 1] && v.value.body[u - 1].branchName === t.branchName ? (a(), o("span", ql)) : (a(), o("span", Hl, c(t.branchName), 1))
                        ])
                      ], 12, Dl),
                      s("td", {
                        class: "vue-ui-data-table__tbody__td",
                        style: h(`outline:${e.value.table.td.outline}`),
                        "data-cell": v.value.head[4]
                      }, [
                        s("div", Kl, [
                          v.value.body[u - 1] && v.value.body[u - 1].branchName === t.branchName ? (a(), o("span", Jl)) : (a(), o("span", Ql, c(t.branchValue.toFixed(e.value.table.td.roundingValue)), 1))
                        ])
                      ], 12, Wl),
                      s("td", {
                        class: "vue-ui-data-table__tbody__td",
                        style: h(`outline:${e.value.table.td.outline}`),
                        "data-cell": v.value.head[5]
                      }, [
                        s("div", ea, [
                          v.value.body[u - 1] && v.value.body[u - 1].branchName === t.branchName ? (a(), o("span", ta)) : (a(), o("span", la, c((t.branchToRoot * 100).toFixed(e.value.table.td.roundingPercentage)) + "% ", 1))
                        ])
                      ], 12, Zl),
                      s("td", {
                        class: "vue-ui-data-table__tbody__td",
                        style: h(`outline:${e.value.table.td.outline}`),
                        "data-cell": v.value.head[6]
                      }, [
                        s("div", oa, [
                          v.value.body[u - 1] && v.value.body[u - 1].branchName === t.branchName ? (a(), o("span", sa)) : (a(), o("span", ua, c((t.branchToTotal * 100).toFixed(e.value.table.td.roundingPercentage)) + "% ", 1))
                        ])
                      ], 12, aa),
                      s("td", {
                        class: "vue-ui-data-table__tbody__td",
                        style: h(`outline:${e.value.table.td.outline}`),
                        "data-cell": v.value.head[7]
                      }, [
                        s("div", ra, c(t.nutName), 1)
                      ], 12, na),
                      s("td", {
                        class: "vue-ui-data-table__tbody__td",
                        style: h(`outline:${e.value.table.td.outline}`),
                        "data-cell": v.value.head[8]
                      }, [
                        s("div", ca, c(t.nutValue.toFixed(e.value.table.td.roundingValue)), 1)
                      ], 12, ia),
                      s("td", {
                        class: "vue-ui-data-table__tbody__td",
                        style: h(`outline:${e.value.table.td.outline}`),
                        "data-cell": v.value.head[9]
                      }, [
                        s("div", va, c((t.nutToBranch * 100).toFixed(e.value.table.td.roundingPercentage)) + "% ", 1)
                      ], 12, da),
                      s("td", {
                        class: "vue-ui-data-table__tbody__td",
                        style: h(`outline:${e.value.table.td.outline}`),
                        "data-cell": v.value.head[10]
                      }, [
                        s("div", ha, c((t.nutToRoot * 100).toFixed(e.value.table.td.roundingPercentage)) + "% ", 1)
                      ], 12, ya),
                      s("td", {
                        class: "vue-ui-data-table__tbody__td",
                        style: h(`outline:${e.value.table.td.outline}`),
                        "data-cell": v.value.head[11]
                      }, [
                        s("div", ba, c((t.nutToTotal * 100).toFixed(e.value.table.td.roundingPercentage)) + "% ", 1)
                      ], 12, fa)
                    ], 6))), 256))
                  ])
                ])
              ], 2)
            ])
          ], 512)
        ]),
        _: 1
      }, 8, ["config"])) : f("", !0)
    ], 14, vt));
  }
}, Sa = /* @__PURE__ */ dt(pa, [["__scopeId", "data-v-d77250e7"]]);
export {
  Sa as default
};
