import { computed as f, ref as y, watch as me, onMounted as Ae, onBeforeUnmount as Re, openBlock as s, createElementBlock as u, normalizeClass as pe, normalizeStyle as B, unref as i, createBlock as R, createCommentVNode as c, withCtx as X, toDisplayString as C, createSlots as Ge, renderSlot as w, normalizeProps as G, guardReactiveProps as E, createVNode as Ee, createElementVNode as p, Fragment as k, renderList as S, mergeProps as U } from "vue";
import { u as Ue, c as We, t as je, a as Te, p as ge, b as Le, o as ke, d as De, e as W, g as be, m as V, I as $, X as Be, s as q, k as Ve, i as H, f as Z, F as J } from "./index-BVNcFEqn.js";
import { t as qe, u as He } from "./useResponsive-CoxXLe23.js";
import { u as Ze, U as Je } from "./usePrinter-Bcfs_I6G.js";
import Ke from "./vue-ui-skeleton-Bgf16k10.js";
import { _ as Qe } from "./Title-DyUTj8GI.js";
import { u as _e } from "./useNestedProp-D79dWdel.js";
import { _ as et } from "./PackageVersion-B9_Ed72C.js";
import { P as tt } from "./PenAndPaper-CzjoEhsO.js";
import { u as at } from "./useUserOptionState-BIvW1Kz7.js";
import { _ as lt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const rt = ["id"], st = { key: 0 }, ot = ["xmlns", "viewBox"], ut = ["width", "height"], nt = ["id"], it = ["stop-color"], ct = ["stop-color"], vt = ["stop-color"], ht = ["id"], dt = ["stdDeviation"], yt = { key: 1 }, ft = ["d", "fill", "stroke"], mt = ["d", "fill", "stroke"], pt = ["id", "d"], gt = ["fill", "font-size", "font-weight"], kt = ["href", "startOffset"], bt = ["x", "y", "text-anchor", "fill", "font-size", "font-weight"], _t = ["d", "filter"], xt = ["stroke", "stroke-width"], wt = ["stroke", "stroke-width"], St = ["stroke", "stroke-width"], $t = ["stroke", "stroke-width"], zt = { key: 7 }, Ft = ["x", "y", "text-anchor", "font-size", "font-weight", "fill"], Ct = ["x", "y", "font-size", "font-weight", "fill"], Ot = { key: 9 }, Mt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Pt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Nt = ["x1", "y1", "x2", "y2", "stroke-width", "filter"], Xt = { key: 10 }, It = ["d", "fill", "stroke", "stroke-width"], Yt = ["cx", "cy", "fill", "r", "stroke-width", "stroke"], At = ["x", "y", "font-size", "fill"], Rt = {
  key: 5,
  class: "vue-data-ui-watermark"
}, Gt = {
  __name: "vue-ui-gauge",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Object,
      default() {
        return {};
      }
    }
  },
  setup(j, { expose: xe }) {
    const h = j, { vue_ui_gauge: we } = Ue(), I = f(() => !!h.dataset && Object.keys(h.dataset).length > 0 && h.dataset.series && h.dataset.series.length), b = y(We()), Se = y(null), K = y(0), O = y(null), Q = y(null), ee = y(null), te = y(null), ae = y(null), le = y(0), e = f({
      get: () => oe(),
      set: (t) => t
    }), { userOptionsVisible: T, setUserOptionsVisibility: re, keepUserOptionState: se } = at({ config: e.value });
    me(() => h.config, (t) => {
      e.value = oe(), T.value = !e.value.showOnChartHover, he(), le.value += 1;
    }, { deep: !0 });
    function oe() {
      const t = _e({
        userConfig: h.config,
        defaultConfig: we
      });
      return t.theme ? {
        ..._e({
          userConfig: je.vue_ui_gauge[t.theme] || h.config,
          defaultConfig: t
        }),
        customPalette: Te[t.theme] || ge
      } : t;
    }
    const { isPrinting: ue, isImaging: ne, generatePdf: ie, generateImage: ce } = Ze({
      elementId: `vue-ui-gauge_${b.value}`,
      fileName: e.value.style.chart.title.text || "vue-ui-gauge"
    }), $e = f(() => e.value.userOptions.show && !e.value.style.chart.title.text), ze = f(() => Le(e.value.customPalette)), z = f(() => {
      if (!I.value || ke(h.dataset.series || {}))
        return {
          value: 0,
          series: [
            {
              from: 0,
              to: 0
            }
          ]
        };
      const t = [];
      (h.dataset.series || []).forEach((a) => {
        t.push(a.from || 1e-7), t.push(a.to || 1e-7);
      });
      const o = Math.max(...t);
      return {
        ...h.dataset,
        series: (h.dataset.series || []).map((a, r) => ({
          ...a,
          color: De(a.color) || ze.value[r] || ge[r],
          value: ((a.to || 0) - (a.from || 0)) / o * 100
        }))
      };
    }), g = y(512), l = y({
      height: 358.4,
      width: g.value,
      top: 0,
      bottom: 358.4,
      centerX: 179.2,
      centerY: g.value / 2,
      labelFontSize: 18,
      legendFontSize: e.value.style.chart.legend.fontSize,
      pointerRadius: e.value.style.chart.layout.pointer.circle.radius,
      trackSize: e.value.style.chart.layout.track.size,
      pointerSize: e.value.style.chart.layout.pointer.size,
      pointerStrokeWidth: e.value.style.chart.layout.pointer.strokeWidth,
      markerOffset: e.value.style.chart.layout.markers.offsetY + 3,
      segmentFontSize: e.value.style.chart.layout.segmentNames.fontSize
    }), M = y(0), P = y(0), m = y(
      e.value.style.chart.animation.use ? Math.min(...h.dataset.series.map((t) => t.from)) : h.dataset.value
    );
    me(() => h.dataset.value, () => {
      de(h.dataset.value);
    });
    const n = f(() => {
      const t = l.value.width / 2, o = v.value.base, a = Math.PI * ((m.value + 0 - P.value) / (M.value - P.value)) + Math.PI;
      return {
        x1: t,
        y1: o,
        x2: t + v.value.pointerSize * l.value.pointerSize * 0.9 * Math.cos(a),
        y2: o + v.value.pointerSize * l.value.pointerSize * 0.9 * Math.sin(a)
      };
    }), ve = f(() => {
      const t = l.value.width / 2, o = v.value.base, a = Math.PI * ((m.value + 0 - P.value) / (M.value - P.value)) + Math.PI, r = t + v.value.pointerSize * l.value.pointerSize * 0.9 * Math.cos(a), _ = o + v.value.pointerSize * l.value.pointerSize * 0.9 * Math.sin(a), x = l.value.pointerRadius, Ne = t + x * Math.cos(a + Math.PI / 2), Xe = o + x * Math.sin(a + Math.PI / 2), Ie = t + x * Math.cos(a - Math.PI / 2), Ye = o + x * Math.sin(a - Math.PI / 2);
      return isNaN(r) ? null : `M ${r},${_} ${Ne},${Xe} ${Ie},${Ye} Z`;
    }), L = f(() => {
      for (let t = 0; t < z.value.series.length; t += 1) {
        const { color: o, from: a, to: r } = z.value.series[t];
        if (m.value >= a && m.value <= r)
          return o;
      }
      return "#2D353C";
    }), Y = y(null);
    function he() {
      if (ke(h.dataset) ? W({
        componentName: "VueUiGauge",
        type: "dataset"
      }) : (be({
        datasetObject: h.dataset,
        requiredAttributes: ["value", "series"]
      }).forEach((t) => {
        W({
          componentName: "VueUiGauge",
          type: "datasetAttribute",
          property: t
        });
      }), Object.hasOwn(h.dataset, "series") && (h.dataset.series.length ? h.dataset.series.forEach((t, o) => {
        be({
          datasetObject: t,
          requiredAttributes: ["from", "to"]
        }).forEach((a) => {
          W({
            componentName: "VueUiGauge",
            type: "datasetSerieAttribute",
            property: a,
            index: o
          });
        });
      }) : W({
        componentName: "VueUiGauge",
        type: "datasetAttributeEmpty",
        property: "series"
      }))), de(h.dataset.value || 0), e.value.responsive) {
        const t = qe(() => {
          const { width: o, height: a } = He({
            chart: O.value,
            title: e.value.style.chart.title.text ? Q.value : null,
            legend: ee.value,
            source: te.value,
            noTitle: ae.value
          });
          l.value.width = o, l.value.height = a, l.value.centerX = o / 2, l.value.centerY = g.value / 2 / 358.4 * a, l.value.bottom = a, l.value.labelFontSize = 18 / g.value * Math.min(a, o) < 10 ? 10 : 18 / g.value * Math.min(a, o), l.value.legendFontSize = e.value.style.chart.legend.fontSize / g.value * Math.min(a, o) < 14 ? 14 : e.value.style.chart.legend.fontSize / g.value * Math.min(a, o), l.value.pointerRadius = e.value.style.chart.layout.pointer.circle.radius / g.value * Math.min(a, o), l.value.trackSize = e.value.style.chart.layout.track.size / g.value * Math.min(a, o), l.value.pointerStrokeWidth = J({
            relator: Math.min(o, a),
            adjuster: g.value,
            source: e.value.style.chart.layout.pointer.strokeWidth,
            threshold: 2,
            fallback: 2
          }), l.value.markerOffset = J({
            relator: Math.max(o, a),
            adjuster: g.value,
            source: e.value.style.chart.layout.markers.offsetY + 3,
            threshold: 2,
            fallback: 2
          }), l.value.segmentFontSize = J({
            relator: Math.min(o, a),
            adjuster: g.value,
            source: e.value.style.chart.layout.segmentNames.fontSize,
            threshold: 8,
            fallback: 8
          });
        });
        Y.value = new ResizeObserver(t), Y.value.observe(O.value.parentNode);
      }
    }
    Ae(() => {
      he();
    }), Re(() => {
      Y.value && Y.value.disconnect();
    });
    function de(t) {
      const o = [];
      (z.value.series || []).forEach((x) => {
        o.push(x.from || 0), o.push(x.to || 0);
      }), M.value = Math.max(...o), P.value = Math.min(...o);
      let a = e.value.style.chart.animation.speed;
      const r = Math.abs(t - m.value) / (a * 60);
      function _() {
        m.value < t ? m.value = Math.min(m.value + r, t) : m.value > t && (m.value = Math.max(m.value - r, t)), m.value !== t && requestAnimationFrame(_);
      }
      _();
    }
    const v = f(() => {
      const t = e.value.responsive ? Math.min(l.value.width, l.value.height) : l.value.width, o = 2.5 / e.value.style.chart.layout.radiusRatio;
      return {
        arcs: t / o,
        gradients: t / (o * 1.1),
        base: e.value.responsive ? l.value.height / 2 : l.value.height * 0.7,
        ratingBase: e.value.responsive ? l.value.height / 2 + l.value.height / 4 : l.value.height * 0.9,
        pointerSize: e.value.responsive ? Math.min(l.value.width, l.value.height) / 3 : l.value.width / 3.2
      };
    }), d = f(() => V(
      { series: z.value.series },
      l.value.width / 2,
      v.value.base,
      v.value.arcs,
      v.value.arcs,
      1,
      1,
      1,
      180,
      109.9495,
      40 * l.value.trackSize
    )), Fe = f(() => V(
      { series: z.value.series },
      l.value.width / 2,
      v.value.base,
      v.value.arcs * e.value.style.chart.layout.segmentNames.offsetRatio,
      v.value.arcs * e.value.style.chart.layout.segmentNames.offsetRatio,
      1,
      1,
      1,
      180,
      109.9495,
      40 * l.value.trackSize
    )), F = f(() => d.value.map((t) => v.value.arcs * e.value.style.chart.layout.segmentNames.offsetRatio * (t.nameOffsetRatio || 1))), ye = f(() => {
      const { x: t, y: o } = $({
        initX: d.value[0].firstSeparator.x,
        initY: d.value[0].firstSeparator.y,
        centerX: n.value.x1,
        centerY: n.value.y1,
        offset: -e.value.style.chart.layout.segmentSeparators.offsetIn
      }), { x: a, y: r } = $({
        initX: d.value[0].startX,
        initY: d.value[0].startY,
        centerX: n.value.x1,
        centerY: n.value.y1,
        offset: e.value.style.chart.layout.segmentSeparators.offsetOut
      });
      return { x1: t, y1: o, x2: a, y2: r };
    }), fe = f(() => d.value.map((t) => {
      const { x: o, y: a } = $({
        initX: t.separator.x,
        initY: t.separator.y,
        centerX: n.value.x1,
        centerY: n.value.y1,
        offset: -e.value.style.chart.layout.segmentSeparators.offsetIn
      }), { x: r, y: _ } = $({
        initX: t.endX,
        initY: t.endY,
        centerX: n.value.x1,
        centerY: n.value.y1,
        offset: e.value.style.chart.layout.segmentSeparators.offsetOut
      });
      return { x1: o, y1: a, x2: r, y2: _ };
    }));
    function Ce(t) {
      if (t.reduce((_, x) => _ + x, 0) > 100)
        throw new Error("Total % must not exceed 100");
      const a = 50;
      let r = 0;
      return t.map((_) => (r += _, `${r / 100 * a - _ / 4}%`));
    }
    const Oe = f(() => Ce(d.value.map((t) => t.proportion * 100))), Me = f(() => V(
      { series: z.value.series },
      l.value.width / 2,
      v.value.base,
      v.value.gradients,
      v.value.gradients,
      0.95,
      1,
      1,
      180,
      110.02,
      2 * l.value.trackSize
    )), N = y(!1);
    function Pe(t) {
      N.value = t, K.value += 1;
    }
    const A = y(!1);
    function D() {
      A.value = !A.value;
    }
    return xe({
      generatePdf: ie,
      generateImage: ce,
      toggleAnnotator: D
    }), (t, o) => (s(), u("div", {
      class: pe(`vue-ui-gauge ${N.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
      ref_key: "gaugeChart",
      ref: O,
      id: `vue-ui-gauge_${b.value}`,
      style: B(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`),
      onMouseenter: o[0] || (o[0] = () => i(re)(!0)),
      onMouseleave: o[1] || (o[1] = () => i(re)(!1))
    }, [
      e.value.userOptions.buttons.annotator ? (s(), R(tt, {
        key: 0,
        parent: O.value,
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        active: A.value,
        onClose: D
      }, null, 8, ["parent", "backgroundColor", "color", "active"])) : c("", !0),
      $e.value ? (s(), u("div", {
        key: 1,
        ref_key: "noTitle",
        ref: ae,
        class: "vue-data-ui-no-title-space",
        style: "height:36px; width: 100%;background:transparent"
      }, null, 512)) : c("", !0),
      e.value.style.chart.title.text ? (s(), u("div", {
        key: 2,
        ref_key: "chartTitle",
        ref: Q,
        style: "width:100%;background:transparent;padding-bottom:12px"
      }, [
        (s(), R(Qe, {
          key: `title_${le.value}`,
          config: {
            title: {
              cy: "gauge-div-title",
              ...e.value.style.chart.title
            },
            subtitle: {
              cy: "gauge-div-subtitle",
              ...e.value.style.chart.title.subtitle
            }
          }
        }, {
          default: X(() => [
            e.value.translations.base && j.dataset.base ? (s(), u("span", st, C(e.value.translations.base) + ": " + C(j.dataset.base), 1)) : c("", !0)
          ]),
          _: 1
        }, 8, ["config"]))
      ], 512)) : c("", !0),
      e.value.userOptions.show && I.value && (i(se) || i(T)) ? (s(), R(Je, {
        ref_key: "details",
        ref: Se,
        key: `user_options_${K.value}`,
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        isImaging: i(ne),
        isPrinting: i(ue),
        uid: b.value,
        hasXls: !1,
        hasPdf: e.value.userOptions.buttons.pdf,
        hasImg: e.value.userOptions.buttons.img,
        hasFullscreen: e.value.userOptions.buttons.fullscreen,
        isFullscreen: N.value,
        titles: { ...e.value.userOptions.buttonTitles },
        chartElement: O.value,
        position: e.value.userOptions.position,
        hasAnnotator: e.value.userOptions.buttons.annotator,
        isAnnotation: A.value,
        onToggleFullscreen: Pe,
        onGeneratePdf: i(ie),
        onGenerateImage: i(ce),
        onToggleAnnotator: D,
        style: B({
          visibility: i(se) ? i(T) ? "visible" : "hidden" : "visible"
        })
      }, Ge({ _: 2 }, [
        t.$slots.optionPdf ? {
          name: "optionPdf",
          fn: X(() => [
            w(t.$slots, "optionPdf", {}, void 0, !0)
          ]),
          key: "0"
        } : void 0,
        t.$slots.optionImg ? {
          name: "optionImg",
          fn: X(() => [
            w(t.$slots, "optionImg", {}, void 0, !0)
          ]),
          key: "1"
        } : void 0,
        t.$slots.optionFullscreen ? {
          name: "optionFullscreen",
          fn: X(({ toggleFullscreen: a, isFullscreen: r }) => [
            w(t.$slots, "optionFullscreen", G(E({ toggleFullscreen: a, isFullscreen: r })), void 0, !0)
          ]),
          key: "2"
        } : void 0,
        t.$slots.optionAnnotator ? {
          name: "optionAnnotator",
          fn: X(({ toggleAnnotator: a, isAnnotator: r }) => [
            w(t.$slots, "optionAnnotator", G(E({ toggleAnnotator: a, isAnnotator: r })), void 0, !0)
          ]),
          key: "3"
        } : void 0
      ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : c("", !0),
      I.value ? (s(), u("svg", {
        key: 4,
        xmlns: i(Be),
        class: pe({ "vue-data-ui-fullscreen--on": N.value, "vue-data-ui-fulscreen--off": !N.value }),
        viewBox: `0 0 ${l.value.width <= 0 ? 10 : l.value.width} ${l.value.height <= 0 ? 10 : l.value.height}`,
        style: B(`max-width:100%;overflow:hidden !important;background:transparent;color:${e.value.style.chart.color}`)
      }, [
        Ee(et),
        t.$slots["chart-background"] ? (s(), u("foreignObject", {
          key: 0,
          x: 0,
          y: 0,
          width: l.value.width <= 0 ? 10 : l.value.width,
          height: l.value.height <= 0 ? 10 : l.value.height,
          style: {
            pointerEvents: "none"
          }
        }, [
          w(t.$slots, "chart-background", {}, void 0, !0)
        ], 8, ut)) : c("", !0),
        p("defs", null, [
          p("radialGradient", {
            id: `gradient_${b.value}`,
            cx: "50%",
            cy: "50%",
            r: "50%",
            fx: "50%",
            fy: "50%"
          }, [
            p("stop", {
              offset: "0%",
              "stop-color": i(q)("#FFFFFF", 1)
            }, null, 8, it),
            p("stop", {
              offset: "80%",
              "stop-color": i(q)("#FFFFFF", e.value.style.chart.layout.track.gradientIntensity)
            }, null, 8, ct),
            p("stop", {
              offset: "100%",
              "stop-color": i(q)("#FFFFFF", 1)
            }, null, 8, vt)
          ], 8, nt)
        ]),
        p("defs", null, [
          p("filter", {
            id: `blur_${b.value}`,
            x: "-50%",
            y: "-50%",
            width: "200%",
            height: "200%"
          }, [
            p("feGaussianBlur", {
              in: "SourceGraphic",
              stdDeviation: 100 / e.value.style.chart.layout.track.gradientIntensity
            }, null, 8, dt)
          ], 8, ht)
        ]),
        t.$slots.pattern ? (s(), u("g", yt, [
          (s(!0), u(k, null, S(d.value, (a, r) => (s(), u("defs", null, [
            w(t.$slots, "pattern", G(E({ seriesIndex: r, patternId: `pattern_${b.value}_${r}` })), void 0, !0)
          ]))), 256))
        ])) : c("", !0),
        (s(!0), u(k, null, S(d.value, (a, r) => (s(), u("path", {
          key: `arc_${r}`,
          d: a.arcSlice,
          fill: a.color,
          stroke: e.value.style.chart.backgroundColor,
          "stroke-linecap": "round"
        }, null, 8, ft))), 128)),
        t.$slots.pattern ? (s(!0), u(k, { key: 2 }, S(d.value, (a, r) => (s(), u("path", {
          key: `arc_${r}`,
          d: a.arcSlice,
          fill: `url(#pattern_${b.value}_${r})`,
          stroke: e.value.style.chart.backgroundColor,
          "stroke-linecap": "round"
        }, null, 8, mt))), 128)) : c("", !0),
        e.value.style.chart.layout.segmentNames.show && e.value.style.chart.layout.segmentNames.curved ? (s(), u(k, { key: 3 }, [
          (s(!0), u(k, null, S(d.value, (a, r) => (s(), u("path", {
            id: `curve_${b.value}_${r}`,
            d: `M ${n.value.x1},${n.value.y1} m -${F.value[r]},0 a ${F.value[r]},${F.value[r]} 0 1,1 ${2 * F.value[r]},0 a ${F.value[r]},${F.value[r]} 0 1,1 -${2 * F.value[r]},0`,
            fill: "transparent"
          }, null, 8, pt))), 256)),
          (s(!0), u(k, null, S(d.value, (a, r) => (s(), u("text", {
            fill: e.value.style.chart.layout.segmentNames.useSerieColor ? a.color : e.value.style.chart.layout.segmentNames.color,
            "font-size": l.value.segmentFontSize,
            "font-weight": e.value.style.chart.layout.segmentNames.bold ? "bold" : "normal",
            "text-anchor": "middle"
          }, [
            p("textPath", {
              href: `#curve_${b.value}_${r}`,
              startOffset: Oe.value[r]
            }, C(a.name || ""), 9, kt)
          ], 8, gt))), 256))
        ], 64)) : c("", !0),
        e.value.style.chart.layout.segmentNames.show && !e.value.style.chart.layout.segmentNames.curved ? (s(!0), u(k, { key: 4 }, S(Fe.value, (a, r) => (s(), u("text", {
          x: a.center.endX,
          y: a.center.endY,
          "text-anchor": i(Ve)(a, !1, 12).anchor,
          fill: e.value.style.chart.layout.segmentNames.useSerieColor ? a.color : e.value.style.chart.layout.segmentNames.color,
          "font-size": l.value.segmentFontSize,
          "font-weight": e.value.style.chart.layout.segmentNames.bold ? "bold" : "normal"
        }, C(a.name || ""), 9, bt))), 256)) : c("", !0),
        e.value.style.chart.layout.track.useGradient ? (s(!0), u(k, { key: 5 }, S(Me.value, (a, r) => (s(), u("path", {
          key: `arc_${r}`,
          d: a.arcSlice,
          fill: "#FFFFFF",
          stroke: "none",
          "stroke-linecap": "round",
          filter: `url(#blur_${b.value})`
        }, null, 8, _t))), 128)) : c("", !0),
        e.value.style.chart.layout.segmentSeparators.show ? (s(), u(k, { key: 6 }, [
          p("line", U(ye.value, {
            stroke: e.value.style.chart.backgroundColor,
            "stroke-width": e.value.style.chart.layout.segmentSeparators.strokeWidth + 2,
            "stroke-linecap": "round"
          }), null, 16, xt),
          p("line", U(ye.value, {
            stroke: e.value.style.chart.layout.segmentSeparators.stroke,
            "stroke-width": e.value.style.chart.layout.segmentSeparators.strokeWidth,
            "stroke-linecap": "round"
          }), null, 16, wt),
          (s(!0), u(k, null, S(fe.value, (a) => (s(), u("line", U(a, {
            stroke: e.value.style.chart.backgroundColor,
            "stroke-width": e.value.style.chart.layout.segmentSeparators.strokeWidth + 2,
            "stroke-linecap": "round"
          }), null, 16, St))), 256)),
          (s(!0), u(k, null, S(fe.value, (a) => (s(), u("line", U(a, {
            stroke: e.value.style.chart.layout.segmentSeparators.stroke,
            "stroke-width": e.value.style.chart.layout.segmentSeparators.strokeWidth,
            "stroke-linecap": "round"
          }), null, 16, $t))), 256))
        ], 64)) : c("", !0),
        e.value.style.chart.layout.markers.show ? (s(), u("g", zt, [
          (s(!0), u(k, null, S(d.value, (a, r) => (s(), u("text", {
            x: i($)({
              centerX: n.value.x1,
              centerY: v.value.base,
              initX: a.center.startX,
              initY: a.center.startY,
              offset: l.value.markerOffset
            }).x,
            y: i($)({
              centerX: n.value.x1,
              centerY: v.value.base,
              initX: a.center.startX,
              initY: a.center.startY,
              offset: l.value.markerOffset
            }).y,
            "text-anchor": a.center.startX < n.value.x1 - 5 ? "end" : a.center.startX > n.value.x1 + 5 ? "start" : "middle",
            "font-size": l.value.labelFontSize * e.value.style.chart.layout.markers.fontSizeRatio,
            "font-weight": `${e.value.style.chart.layout.markers.bold ? "bold" : "normal"}`,
            fill: e.value.style.chart.layout.markers.color
          }, C(i(H)(
            e.value.style.chart.layout.markers.formatter,
            a.from,
            i(Z)({
              p: e.value.style.chart.layout.markers.prefix,
              v: a.from,
              s: e.value.style.chart.layout.markers.suffix,
              r: e.value.style.chart.layout.markers.roundingValue
            })
          )), 9, Ft))), 256))
        ])) : c("", !0),
        e.value.style.chart.layout.markers.show ? (s(), u("text", {
          key: 8,
          x: i($)({
            centerX: l.value.width / 2,
            centerY: v.value.base,
            initX: d.value.at(-1).endX,
            initY: d.value.at(-1).endY,
            offset: l.value.markerOffset
          }).x,
          y: i($)({
            centerX: l.value.width / 2,
            centerY: v.value.base,
            initX: d.value.at(-1).endX,
            initY: d.value.at(-1).endY,
            offset: l.value.markerOffset
          }).y,
          "text-anchor": "start",
          "font-size": l.value.labelFontSize * e.value.style.chart.layout.markers.fontSizeRatio,
          "font-weight": `${e.value.style.chart.layout.markers.bold ? "bold" : "normal"}`,
          fill: e.value.style.chart.layout.markers.color
        }, C(i(H)(
          e.value.style.chart.layout.markers.formatter,
          M.value,
          i(Z)({
            p: e.value.style.chart.layout.markers.prefix,
            v: M.value,
            s: e.value.style.chart.layout.markers.suffix,
            r: e.value.style.chart.layout.markers.roundingValue
          })
        )), 9, Ct)) : c("", !0),
        e.value.style.chart.layout.pointer.type === "rounded" ? (s(), u("g", Ot, [
          isNaN(n.value.x2) ? c("", !0) : (s(), u("line", {
            key: 0,
            x1: n.value.x1,
            y1: n.value.y1,
            x2: n.value.x2,
            y2: n.value.y2,
            stroke: e.value.style.chart.layout.pointer.stroke,
            "stroke-width": l.value.pointerStrokeWidth,
            "stroke-linecap": "round"
          }, null, 8, Mt)),
          isNaN(n.value.x2) ? c("", !0) : (s(), u("line", {
            key: 1,
            x1: n.value.x1,
            y1: n.value.y1,
            x2: n.value.x2,
            y2: n.value.y2,
            stroke: e.value.style.chart.layout.pointer.useRatingColor ? L.value : e.value.style.chart.layout.pointer.color,
            "stroke-linecap": "round",
            "stroke-width": l.value.pointerStrokeWidth * 0.7
          }, null, 8, Pt)),
          !isNaN(n.value.x2) && e.value.style.chart.layout.track.useGradient ? (s(), u("line", {
            key: 2,
            x1: n.value.x1,
            y1: n.value.y1,
            x2: n.value.x2,
            y2: n.value.y2,
            stroke: "white",
            "stroke-linecap": "round",
            "stroke-width": l.value.pointerStrokeWidth * 0.3,
            filter: `url(#blur_${b.value})`
          }, null, 8, Nt)) : c("", !0)
        ])) : (s(), u("g", Xt, [
          ve.value ? (s(), u("path", {
            key: 0,
            d: ve.value,
            fill: e.value.style.chart.layout.pointer.useRatingColor ? L.value : e.value.style.chart.layout.pointer.color,
            stroke: e.value.style.chart.layout.pointer.stroke,
            "stroke-width": e.value.style.chart.layout.pointer.circle.strokeWidth,
            "stroke-linejoin": "round"
          }, null, 8, It)) : c("", !0)
        ])),
        p("circle", {
          cx: l.value.width / 2,
          cy: v.value.base,
          fill: e.value.style.chart.layout.pointer.circle.color,
          r: l.value.pointerRadius <= 0 ? 1e-4 : l.value.pointerRadius,
          "stroke-width": e.value.style.chart.layout.pointer.circle.strokeWidth,
          stroke: e.value.style.chart.layout.pointer.circle.stroke
        }, null, 8, Yt),
        e.value.style.chart.legend.show ? (s(), u("text", {
          key: 11,
          x: l.value.width / 2,
          y: v.value.ratingBase,
          "text-anchor": "middle",
          "font-size": l.value.legendFontSize,
          "font-weight": "bold",
          fill: e.value.style.chart.legend.useRatingColor ? L.value : e.value.style.chart.legend.color
        }, C(i(H)(
          e.value.style.chart.legend.formatter,
          m.value,
          i(Z)({
            p: e.value.style.chart.legend.prefix + (e.value.style.chart.legend.showPlusSymbol && m.value > 0 ? "+" : ""),
            v: m.value,
            s: e.value.style.chart.legend.suffix,
            r: e.value.style.chart.legend.roundingValue
          })
        )), 9, At)) : c("", !0),
        w(t.$slots, "svg", { svg: l.value }, void 0, !0)
      ], 14, ot)) : c("", !0),
      t.$slots.watermark ? (s(), u("div", Rt, [
        w(t.$slots, "watermark", G(E({ isPrinting: i(ue) || i(ne) })), void 0, !0)
      ])) : c("", !0),
      I.value ? c("", !0) : (s(), R(Ke, {
        key: 6,
        config: {
          type: "gauge",
          style: {
            backgroundColor: e.value.style.chart.backgroundColor,
            gauge: {
              color: "#CCCCCC"
            }
          }
        }
      }, null, 8, ["config"])),
      p("div", {
        ref_key: "chartLegend",
        ref: ee
      }, [
        w(t.$slots, "legend", { legend: z.value }, void 0, !0)
      ], 512),
      t.$slots.source ? (s(), u("div", {
        key: 7,
        ref_key: "source",
        ref: te,
        dir: "auto"
      }, [
        w(t.$slots, "source", {}, void 0, !0)
      ], 512)) : c("", !0)
    ], 46, rt));
  }
}, Zt = /* @__PURE__ */ lt(Gt, [["__scopeId", "data-v-42d2e011"]]);
export {
  Zt as default
};
