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