import { g as it } from "./index-KdycyCO9.js";
function lt(O, B) {
  for (var m = 0; m < B.length; m++) {
    const x = B[m];
    if (typeof x != "string" && !Array.isArray(x)) {
      for (const v in x)
        if (v !== "default" && !(v in O)) {
          const E = Object.getOwnPropertyDescriptor(x, v);
          E && Object.defineProperty(O, v, E.get ? E : {
            enumerable: !0,
            get: () => x[v]
          });
        }
    }
  }
  return Object.freeze(Object.defineProperty(O, Symbol.toStringTag, { value: "Module" }));
}
var R = { exports: {} }, st = R.exports, T;
function ft() {
  return T || (T = 1, function(O, B) {
    /**
    * Highcharts JS v12.3.0 (2025-06-21)
    * @module highcharts/modules/offline-exporting
    * @requires highcharts
    * @requires highcharts/modules/exporting
    *
    * Client side exporting module
    *
    * (c) 2015-2025 Torstein Honsi / Oystein Moseng
    *
    * License: www.highcharts.com/license
    */
    (function(m, x) {
      O.exports = x(m._Highcharts, m._Highcharts.AST, m._Highcharts.Chart);
    })(typeof window > "u" ? st : window, (m, x, v) => (() => {
      var E, G = { 660: (t) => {
        t.exports = x;
      }, 944: (t) => {
        t.exports = m;
      }, 960: (t) => {
        t.exports = v;
      } }, P = {};
      function f(t) {
        var o = P[t];
        if (o !== void 0) return o.exports;
        var n = P[t] = { exports: {} };
        return G[t](n, n.exports, f), n.exports;
      }
      f.n = (t) => {
        var o = t && t.__esModule ? () => t.default : () => t;
        return f.d(o, { a: o }), o;
      }, f.d = (t, o) => {
        for (var n in o) f.o(o, n) && !f.o(t, n) && Object.defineProperty(t, n, { enumerable: !0, get: o[n] });
      }, f.o = (t, o) => Object.prototype.hasOwnProperty.call(t, o);
      var _ = {};
      f.d(_, { default: () => at });
      var V = f(944), b = f.n(V);
      let { isSafari: I, win: d, win: { document: L } } = b(), { error: z } = b(), H = d.URL || d.webkitURL || d;
      function $(t) {
        let o = t.replace(/filename=.*;/, "").match(/data:([^;]*)(;base64)?,([A-Z+\d\/]+)/i);
        if (o && o.length > 3 && d.atob && d.ArrayBuffer && d.Uint8Array && d.Blob && H.createObjectURL) {
          let n = d.atob(o[3]), u = new d.ArrayBuffer(n.length), e = new d.Uint8Array(u);
          for (let a = 0; a < e.length; ++a) e[a] = n.charCodeAt(a);
          return H.createObjectURL(new d.Blob([e], { type: o[1] }));
        }
      }
      let C = { dataURLtoBlob: $, downloadURL: function(t, o) {
        let n = d.navigator, u = L.createElement("a");
        if (typeof t != "string" && !(t instanceof String) && n.msSaveOrOpenBlob) return void n.msSaveOrOpenBlob(t, o);
        if (t = "" + t, n.userAgent.length > 1e3) throw Error("Input too long");
        let e = /Edge\/\d+/.test(n.userAgent);
        if ((I && typeof t == "string" && t.indexOf("data:application/pdf") === 0 || e || t.length > 2e6) && !(t = $(t) || "")) throw Error("Failed to convert to blob");
        if (u.download !== void 0) u.href = t, u.download = o, L.body.appendChild(u), u.click(), L.body.removeChild(u);
        else try {
          if (!d.open(t, "chart")) throw Error("Failed to open window");
        } catch {
          d.location.href = t;
        }
      }, getScript: function(t) {
        return new Promise((o, n) => {
          let u = L.getElementsByTagName("head")[0], e = L.createElement("script");
          e.type = "text/javascript", e.src = t, e.onload = () => {
            o();
          }, e.onerror = () => {
            n(z(`Error loading script ${t}`));
          }, u.appendChild(e);
        });
      } };
      var M = f(660), Z = f.n(M), J = f(960), K = f.n(J);
      let Q = { exporting: {} }, { getOptions: W, setOptions: X } = b(), { downloadURL: Y, getScript: q } = C, { composed: tt, doc: et, win: j } = b(), { addEvent: ot, extend: rt, pushUnique: nt } = b();
      (function(t) {
        async function o(e, a, g, p) {
          let l = function(s, h) {
            let r, y, i = et.createElement("div");
            Z().setElementHTML(i, s);
            let F = i.getElementsByTagName("text"), N = function(c, w) {
              let A = c;
              for (; A && A !== i; ) {
                if (A.style[w]) {
                  let U = A.style[w];
                  w === "fontSize" && /em$/.test(U) && (U = Math.round(16 * parseFloat(U)) + "px"), c.style[w] = U;
                  break;
                }
                A = A.parentNode;
              }
            };
            return [].forEach.call(F, function(c) {
              for (["fontFamily", "fontSize"].forEach((w) => {
                N(c, w);
              }), c.style.fontFamily = h?.normal ? "HighchartsFont" : String(c.style.fontFamily && c.style.fontFamily.split(" ").splice(-1)), r = c.getElementsByTagName("title"), [].forEach.call(r, function(w) {
                c.removeChild(w);
              }), y = c.getElementsByClassName("highcharts-text-outline"); y.length > 0; ) {
                let w = y[0];
                w.parentNode && w.parentNode.removeChild(w);
              }
            }), i.querySelector("svg");
          }(e, p);
          l && (await n(l, p), Y(await u(l, 0, a), g));
        }
        async function n(e, a) {
          let g, p, l = (s, h) => {
            j.jspdf.jsPDF.API.events.push(["initialized", function() {
              this.addFileToVFS(s, h), this.addFont(s, "HighchartsFont", s), this.getFontList()?.HighchartsFont || this.setFont("HighchartsFont");
            }]);
          };
          for (let s of (a && (p = e.textContent || "", !/[^\u0000-\u007F\u200B]+/.test(p)) && (a = void 0), ["normal", "italic", "bold", "bolditalic"])) {
            let h = a?.[s];
            if (h) try {
              let r = await j.fetch(h);
              if (!r.ok) throw Error(`Failed to fetch font: ${h}`);
              let y = await r.blob(), i = new FileReader(), F = await new Promise((N, c) => {
                i.onloadend = () => {
                  typeof i.result == "string" ? N(i.result.split(",")[1]) : c(Error("Failed to read font as base64"));
                }, i.onerror = c, i.readAsDataURL(y);
              });
              l(s, F), s === "normal" && (g = F);
            } catch {
            }
            else g && l(s, g);
          }
        }
        async function u(e, a, g) {
          let p = (Number(e.getAttribute("width")) + 2 * a) * g, l = (Number(e.getAttribute("height")) + 2 * a) * g, s = new j.jspdf.jsPDF(l > p ? "p" : "l", "pt", [p, l]);
          [].forEach.call(e.querySelectorAll('*[visibility="hidden"]'), function(r) {
            r.parentNode.removeChild(r);
          });
          let h = e.querySelectorAll("linearGradient");
          for (let r = 0; r < h.length; r++) {
            let y = h[r].querySelectorAll("stop"), i = 0;
            for (; i < y.length && y[i].getAttribute("offset") === "0" && y[i + 1].getAttribute("offset") === "0"; ) y[i].remove(), i++;
          }
          return [].forEach.call(e.querySelectorAll("tspan"), (r) => {
            r.textContent === "​" && (r.textContent = " ", r.setAttribute("dx", -5));
          }), await s.svg(e, { x: 0, y: 0, width: p, height: l, removeInvalid: !0 }), s.output("datauristring");
        }
        t.compose = function(e) {
          if (ot(e, "downloadSVG", async function(g) {
            let { svg: p, exportingOptions: l, exporting: s, preventDefault: h } = g;
            if (l?.type === "application/pdf") {
              h?.();
              try {
                let { type: r, filename: y, scale: i, libURL: F } = b().Exporting.prepareImageOptions(l);
                r === "application/pdf" && (j.jspdf?.jsPDF || (await q(`${F}jspdf.js`), await q(`${F}svg2pdf.js`)), await o(p, i, y, l?.pdfFont));
              } catch (r) {
                await s?.fallbackToServer(l, r);
              }
            }
          }), !nt(tt, "OfflineExporting")) return;
          rt(K().prototype, { exportChartLocal: async function(g, p) {
            await this.exporting?.exportChart(g, p);
          } }), X(Q);
          let a = W().exporting?.buttons?.contextButton?.menuItems;
          a && a.push("downloadPDF");
        }, t.downloadSVGLocal = async function(e, a) {
          await b().Exporting.prototype.downloadSVG.call(void 0, e, a);
        };
      })(E || (E = {}));
      let D = E, S = b();
      S.dataURLtoBlob = S.dataURLtoBlob || C.dataURLtoBlob, S.downloadSVGLocal = D.downloadSVGLocal, S.downloadURL = S.downloadURL || C.downloadURL, D.compose(S.Exporting);
      let at = b();
      return _.default;
    })());
  }(R)), R.exports;
}
var k = ft();
const dt = /* @__PURE__ */ it(k), ct = /* @__PURE__ */ lt({
  __proto__: null,
  default: dt
}, [k]);
export {
  ct as o
};
