import { jsx as m, jsxs as pe } from "react/jsx-runtime";
import { useState as V, useRef as ja, useEffect as he } from "react";
import { Container as fe } from "semantic-ui-react";
import er from "../data/DataProvider.js";
import tr from "../data/DataConsumer.js";
import ar from "../../utils/deviceType.js";
import rr from "./Pie.js";
import "immutable";
import or from "./Radar.js";
import nr from "./Bar.js";
import ir from "./Line.js";
import { PostContent as sr } from "@devgateway/wp-react-lib";
import j from "./data/index.js";
import dr from "./CSVDataFrame.js";
import lr from "./colors/ColorProvider.js";
import st from "./Messages.js";
import { connect as cr } from "react-redux";
import { injectIntl as ur } from "react-intl";
const mr = (P) => {
  let {
    parent: ge,
    editing: s = !1,
    unique: ee,
    childContent: L,
    categories: U,
    injectedMeasures: d,
    "data-app": r = "csv",
    "data-dvz-proxy-dataset-id": be,
    "data-group": we = "default",
    "data-height": S = 500,
    "data-type": E = "bar",
    //'data-source': source = 'gender/smoke',f
    "data-dimension1": N,
    "data-dimension2": xe,
    "data-dimension3": fr,
    "data-color-by": z = "index",
    "data-scheme": te = "system",
    "data-group-mode": dt = "grouped",
    "data-left-legend": lt = "Left Legend",
    "data-legend-label": ct = "",
    "data-bottom-legend": ut = "Bottom Legend",
    "data-dualmode": mt,
    "data-legend-position": ve = "right",
    "data-show-legends": ye = "true",
    "data-data-source-label": gr = "Source",
    "data-chart-data-source": br = "Data Source",
    "data-toggle-info-label": wr = "Info Graphic",
    "data-toggle-chart-label": xr = "Chart",
    //'data-number-format': format = '{"style":"percent", "minimumFractionDigits": 1, "maximumFractionDigits": 1}',
    "data-tick-rotation": u = 0,
    "data-tick-color": pt = "rgb(92,93,99)",
    "data-measures": ht = "{}",
    "data-format": vr = "{}",
    "data-csv": ft = "",
    "data-margin-left": gt = 50,
    "data-margin-top": bt = 25,
    "data-margin-right": wt = 25,
    "data-margin-bottom": xt = 25,
    "data-start-angle": vt = 0,
    "data-end-angle": yt = 360,
    "data-view-mode": Le = "info",
    "data-filters": Lt = "[]",
    //filters
    "data-tooltip-html": kt = "",
    "data-layout": ae = "vertical",
    "data-reverse": ke = "false",
    "data-offset-y": Tt = "-40",
    "data-line-layer-enabled": Te = "false",
    //"data-csv-line-layer-data": csvLineLayerData = "",
    //"data-csv-line-color": lineColor = "#000000",
    //"data-csv-line-tooltip": lineTooltip = "",
    //"data-csv-line-title": lineTitle = "",
    "data-overlays": Ct = "[]",
    "data-max-value": It = "auto",
    "data-value-scale": Mt = "linear",
    "data-swap": $ = "false",
    "data-no-data-message": At = "No data matches your selection",
    "data-bar-color": Dt = "rgb(0,0,0)",
    "data-override-tick-color": Ce = "false",
    "data-fixed-min-value": Rt = 0,
    "data-fixed-max-value": Ft = 0,
    "data-bar-padding": Bt = 0.15,
    "data-bar-label-position": Pt = "middle",
    "data-line-label-position": Et = "none",
    "data-show-grid": Ie = "true",
    "data-include-overall": Me = "false",
    "data-bar-inner-padding": Nt = 0.7,
    "data-x-label-color": zt = "#000",
    "data-bar-label-color": Xt = "#000",
    "data-legend-label-color": Gt = "#000",
    "data-tooltip-enabled": Ae = "true",
    "data-use-check-box-background": De = "false",
    "data-use-label-background": Re = "true",
    "data-highlight-xaxis-line": Fe = "false",
    "data-show-tick-line": Be = "true",
    "data-show-right-axis": Pe = "true",
    "data-manual-colors": Vt = "{}",
    "data-right-legend": Ut = "",
    "data-offset-right": St = "40",
    "data-offset-bottom": $t = "40",
    "data-hidden-bars": Ht = [],
    "data-confidence-intervals": Wt = "[]",
    "data-enable-area": Ee = "false",
    "data-area-shading-criteria": Yt = "DEFAULT",
    "data-area-lower-bound": qt = "",
    "data-area-upper-bound": Jt = "",
    "data-show-points": Ne = "true",
    "data-center-label": _t = "",
    "data-show-arc-labels": ze = "true",
    "data-show-arc-link-labels": Xe = "true",
    "data-slice-padding": Kt = 1,
    "data-center-label-font-weight": Qt = "normal",
    "data-center-label-font-size": Zt = "12",
    "data-center-label-xoffset": Ot = 0,
    "data-center-label-yoffset": jt = 0,
    "data-group-total-measure": ea = "",
    "data-show-group-total": Ge = "true",
    "data-group-total-label": ta = "",
    "data-group-total-format": aa = "{}",
    "data-group-total-label-offset": ra,
    "data-group-total-fixed-position": Ve = "false",
    "data-tooltip-enable-markdown": H = "false",
    "data-y-axis-tick-values": Ue = "10",
    "data-x-axis-tick-values": Se = "10",
    "data-enable-grid-y": k = "true",
    "data-enable-grid-x": T = "false",
    "data-offset-text": oa = 0,
    "data-overall-label": re = "Overall",
    "data-min-max-clamp": na = "false",
    "data-reverse-legend": $e = "false",
    "data-sort": He = "default",
    "data-sort-reverse": W = "false",
    "data-sort-second-dimension": We = "default",
    "data-sort-reverse-second-dimension": Y = "false",
    "data-radar-curve": ia = "linearClosed",
    "data-radar-fill-opacity": sa = 0.25,
    "data-radar-border-width": da = 2,
    "data-radar-grid-levels": la = 3,
    "data-radar-grid-shape": ca = "circular",
    "data-radar-grid-label-offset": ua = 36,
    "data-radar-enable-dots": Ye = "true",
    "data-radar-dot-size": ma = 8,
    "data-radar-enable-dot-label": qe = "true",
    "data-radar-dot-label-offset": pa = -12,
    "data-mobile-customization": Je = "{}",
    "data-show-percentage": _e = "false",
    "data-preview-mode": h = "Desktop",
    "data-wait-for-filters": ha = "false",
    "data-line-curve": fa = "linear",
    "data-show-legends-in-columns": Ke = "false",
    "data-number-of-legend-columns": ga = 4,
    "data-line-x-axis-tick-mode": ba = "none",
    "data-line-x-axis-tick-count": wa = 10,
    "data-line-x-axis-tick-every": xa = 1,
    pageModuleProps: f
  } = P;
  const va = s, t = JSON.parse(
    decodeURIComponent(Je)
  ), [oe, ya] = V(
    window.innerWidth <= 1250
  ), w = oe && ((t == null ? void 0 : t.showCustomization) ?? !1);
  f != null && f.previewMode && (f != null && f.editing) && (h = f.previewMode, s = f.editing);
  const La = ["Tablet"].includes(h) && s, ka = ["Mobile"].includes(h) && s, Ta = ["Desktop"].includes(h) && s, l = w && h !== "Desktop", c = w && !s, ne = () => {
    const e = window.matchMedia(
      "(min-width: 768px) and (max-width: 1250px)"
    ).matches, n = window.matchMedia("(max-width: 767px)").matches;
    switch (!0) {
      case Ta:
        return u;
      case La:
        return w ? (t == null ? void 0 : t.tabletXAxisTextRotation) ?? u : u;
      case ka:
        return w ? (t == null ? void 0 : t.mobileXAxisTextRotation) ?? u : u;
      case e:
        return w ? (t == null ? void 0 : t.tabletXAxisTextRotation) ?? u : u;
      case n:
        return w ? (t == null ? void 0 : t.mobileXAxisTextRotation) ?? u : u;
      default:
        return u;
    }
  }, Ca = ne(), [Ia, Qe] = V(Ca), Ze = P.intl.locale, q = ja(null), Oe = (e) => {
    try {
      return va ? e : decodeURIComponent(e);
    } catch {
      return console.error(`error decoding value:${e}`), e;
    }
  }, C = (e) => {
    try {
      return JSON.parse(Oe(e));
    } catch {
      console.error(`error parsing value:${e}`);
    }
    return null;
  }, Ma = () => {
    const e = C(Vt);
    if (!e) return null;
    const n = e[r];
    if (r === "csv" && n && te === "manual") {
      const o = {}, p = {};
      Object.keys(n).forEach((G) => {
        const b = n[G];
        typeof b == "string" ? o[G] = b : typeof b == "object" && b !== null && (p[G] = b);
      });
      const v = p[z] || {};
      return { [z]: { ...o, ...v } };
    }
    return n;
  }, Aa = () => C(ht), je = () => {
    var e;
    if (a != null && a[r]) {
      let n = (e = a == null ? void 0 : a[r]) == null ? void 0 : e.format;
      if (!n) {
        const o = Object.keys(a == null ? void 0 : a[r]);
        for (let p = 0; p < o.length; p++)
          if (a != null && a[r][o[p]].selected && (a != null && a[r][o[p]].format)) {
            n = a == null ? void 0 : a[r][o[p]].format;
            break;
          }
      }
      return n;
    }
    return a != null && a.csv ? a.csv.format : null;
  }, Da = () => {
    let e = null;
    return a != null && a[r] ? a[r].useCustomAxisFormat && a[r].customFormat && (e = a[r].customFormat) : a != null && a.csv && a.csv.useCustomAxisFormat && a.csv.customFormat && (e = a.csv.customFormat), e;
  }, Ra = () => a != null && a[r] ? Object.keys(a[r]).map((e) => ({ value: e, ...a[r][e] })).filter((e) => e.selected).map((e) => e.value) : [], et = () => {
    const e = {};
    return a != null && a[r] && Object.keys(a[r]).map((o) => ({ value: o, ...a[r][o] })).filter((o) => o.selected && o.hasCustomLabel).forEach((o) => {
      e[o.value] = o.customLabel;
    }), e;
  }, Fa = () => a != null && a[r] ? Object.keys(a[r]).filter(
    (e) => a[r][e].allowSelection
  ) : [];
  let a = Aa(), x = Ra(), g = je();
  const Ba = Fa();
  let ie = lt, se = Ut, de = Oe(kt);
  if (d != null && d[r]) {
    const e = Object.keys(d[r].measures).map((n) => ({ value: n, ...d[r].measures[n] })).filter((n) => n.selected).map((n) => n.value);
    a = d, x = e, g = je(), ie = d.leftTitle, se = d.rightTitle, d.customTooltip && (de = d.customTooltip);
  }
  const Pa = g ? {
    style: g.style === "compacted" ? "decimal" : g.style,
    notation: g.style === "compacted" ? "compact" : "standard",
    currency: g.currency,
    minimumFractionDigits: parseInt(g.minimumFractionDigits),
    maximumFractionDigits: parseInt(g.maximumFractionDigits)
  } : {
    notation: "standard",
    currency: "USD",
    minimumFractionDigits: 2,
    maximumFractionDigits: 2
  }, Ea = Da(), i = C(aa), Na = {
    style: (i == null ? void 0 : i.style) === "compacted" ? "decimal" : i == null ? void 0 : i.style,
    notation: (i == null ? void 0 : i.style) === "compacted" ? "compact" : "standard",
    currency: i == null ? void 0 : i.currency,
    minimumFractionDigits: parseInt(
      i == null ? void 0 : i.minimumFractionDigits
    ),
    maximumFractionDigits: parseInt(
      i == null ? void 0 : i.maximumFractionDigits
    )
  }, [za, yr] = V(Le), Xa = s ? Le : za, Ga = {
    scheme: te,
    colorBy: z
  }, J = s ? S - 80 : S, Va = () => (l || c) && !(t != null && t.showXAxisTitle) ? "" : ut, Ua = () => l || c ? t != null && t.showYAxisTitle ? ie : "" : ie, Sa = () => l || c ? t != null && t.showRightAxisTitle ? se : "" : se, $a = {
    left: Ua(),
    bottom: Va(),
    right: Sa()
  }, _ = (e) => {
    if (e === "true" || e === !0)
      return !0;
    if (e === "false" || e === !1)
      return !1;
  }, tt = () => {
    _(T) && !_(k) ? (T = !1, k = !0) : !_(T) && _(k) && (T = !0, k = !1);
  }, Ha = () => ae === "horizontal" ? (tt(), "vertical") : (tt(), "horizontal"), Wa = () => t != null && t.chartLayoutOverride ? Ha() : ae, K = (e, n, o) => e ? Number.parseInt(n) ?? o : o, at = (e, n, o) => e ? n ?? o : o;
  he(() => {
    const e = () => {
      ya(window.innerWidth <= 1250);
      const n = ne();
      Qe(n);
    };
    return window.addEventListener("resize", e), Qe(ne()), () => {
      window.removeEventListener("resize", e);
    };
  }, [
    s,
    h,
    w,
    u,
    t == null ? void 0 : t.tabletXAxisTextRotation,
    t == null ? void 0 : t.mobileXAxisTextRotation
  ]);
  const Ya = () => {
    const e = ["tablet", "mobile", "midTablet"].includes(
      ar()
    );
    return s && h === "Desktop" ? ve : e ? "bottom" : ve;
  }, rt = {
    app: r,
    editing: s,
    tickColor: decodeURIComponent(pt),
    tickRotation: Ia,
    layout: l || c ? Wa() : ae,
    reverse: ke == !0 || ke == "true",
    showLegends: ye == !0 || ye == "true",
    legendLabel: ct,
    swap: $ == !0 || $ == "true",
    showGrid: Ie == !0 || Ie == "true",
    showPercentage: _e == !0 || _e == "true",
    marginLeft: K(
      l || c,
      Number.parseInt(t == null ? void 0 : t.marginLeft),
      parseInt(gt)
    ),
    marginTop: K(
      l || c,
      Number.parseInt(t == null ? void 0 : t.marginTop),
      parseInt(bt)
    ),
    marginRight: K(
      l || c,
      Number.parseInt(t == null ? void 0 : t.marginRight),
      Number.parseInt(wt)
    ),
    marginBottom: K(
      l || c,
      Number.parseInt(t == null ? void 0 : t.marginBottom),
      Number.parseInt(xt)
    ),
    height: `${J}px`,
    legendPosition: Ya(),
    legends: $a,
    tooltip: H == !0 || H == "true" ? de : de.replace(/\r\n/g, "<hr/>").replace(/[\r\n]/g, "<hr/>"),
    colors: Ga,
    groupMode: dt,
    format: Pa,
    startAngle: vt,
    endAngle: yt,
    offsetY: Tt,
    // csvLineLayerData,
    // lineColor: decodeURIComponent(lineColor),
    // lineTooltip,
    // lineTitle,
    maxValue: It,
    valueScale: Mt,
    categories: U,
    lineLayerEnabled: Te == !0 || Te == "true",
    overlays: C(Ct) || [],
    barColor: decodeURIComponent(Dt),
    overrideTickColor: Ce == !0 || Ce == "true",
    fixedMinValue: Rt,
    fixedMaxValue: Ft,
    barPadding: at(
      l || c,
      t == null ? void 0 : t.barPadding,
      Bt
    ),
    barLabelPosition: Pt,
    lineLabelPosition: Et,
    barInnerPadding: at(
      l || c,
      t == null ? void 0 : t.barInnerPadding,
      Nt
    ),
    xLabelColor: decodeURIComponent(zt),
    barLabelColor: decodeURIComponent(Xt),
    legendLabelColor: decodeURIComponent(Gt),
    tooltipEnabled: Ae == !0 || Ae == "true",
    legendLabelBack: Re == !0 || Re == "true",
    legendCheckBack: De == !0 || De == "true",
    highlightXAxisLine: Fe == !0 || Fe == "true",
    showTickLine: Be == !0 || Be == "true",
    showRightAxis: Pe == !0 || Pe == "true",
    offsetRight: St,
    offsetBottom: $t,
    confidenceIntervals: C(Wt) || [],
    showPoints: Ne == !0 || Ne == "true",
    enableArea: Ee == !0 || Ee == "true",
    areaShadingCriteria: Yt,
    areaLowerBound: qt,
    areaUpperBound: Jt,
    showGroupTotal: Ge == !0 || Ge == "true",
    groupTotalMeasure: ea,
    groupTotalLabel: ta,
    groupTotalFormat: Na,
    groupTotalOffset: ra,
    groupTotalFixedPosition: Ve == !0 || Ve == "true",
    centerLabel: _t,
    showArcLabels: ze == !0 || ze == "true",
    showArcLinkLabels: Xe == !0 || Xe == "true",
    slicePadding: Kt,
    centerLabelFontWeight: Qt,
    centerLabelFontSize: Zt,
    centerLabelXOffset: Ot,
    centerLabelYOffset: jt,
    userMeasures: Ba,
    tooltipEnableMarkdown: H == !0 || H == "true",
    yAxisTickValues: l || c ? t.yAxisTickValues ?? Ue : Ue,
    xAxisTickValues: l || c ? t.xAxisTickValues ?? Se : Se,
    lineXAxisTickMode: ba,
    lineXAxisTickCount: parseInt(wa) || 10,
    lineXAxisTickEvery: parseInt(xa) || 1,
    enableGridY: k == !0 || k == "true",
    enableGridX: T == !0 || T == "true",
    offsetText: oa,
    selectedMeasures: x,
    overallLabel: re,
    minMaxClamp: na,
    reverseLegend: $e == !0 || $e == "true",
    customAxisFormat: Ea,
    sort: He,
    sortReverse: W == !0 || W == "true",
    sortReverseSecondDimension: Y == !0 || Y == "true",
    radarCurve: ia,
    radarFillOpacity: sa,
    radarBorderWidth: da,
    radarGridLevels: la,
    radarGridShape: ca,
    radarGridLabelOffset: ua,
    radarEnableDots: Ye == !0 || Ye == "true",
    radarDotSize: ma,
    radarEnableDotLabel: qe == !0 || qe == "true",
    radarDotLabelOffset: pa,
    sortSecondDimension: We,
    mobileCustomization: Je,
    dimension1: N,
    previewMode: h,
    lineCurve: fa,
    showLegendsInColumns: Ke == !0 || Ke == "true",
    numberOfLegendColumns: parseInt(ga) || 4
  }, le = {}, ce = C(Lt) || {};
  ce && ce.forEach && ce.forEach((e) => {
    e.value != null && e.value.filter((n) => n != null && n.toString().trim() != "").length > 0 && (le[e.param] = e.value);
  }), be && (le.dvzProxyDatasetId = be);
  let I = null, M = null;
  if (r === "csv")
    I = dr;
  else
    switch (E) {
      case "line":
        I = j.LineDataFrame;
        break;
      case "pie":
        I = j.PieDataFrame;
        break;
      case "radar":
        I = j.BarDataFrame;
        break;
      default:
        I = j.BarDataFrame;
        break;
    }
  let A = !1;
  switch (E) {
    case "bar":
      M = nr, A = r != "csv" && N == "none" && x.length == 0;
      break;
    case "line":
      M = ir, A = r !== "csv" && (x.length === 0 || N === "none");
      break;
    case "pie":
      A = r != "csv" && x.length == 0, M = rr;
      break;
    case "radar":
      A = r != "csv" && x.length == 0, M = or;
      break;
    default:
      M = /* @__PURE__ */ m("div", { children: "No Chart" });
      break;
  }
  const qa = mt === "true", X = [];
  N != "none" && X.push(N), xe != "none" && X.push(xe);
  const [ot, Ja] = V(0), [Lr, _a] = V(nt());
  function nt() {
    var e;
    return ((e = window.screen.orientation) == null ? void 0 : e.type) || (window.innerWidth > window.innerHeight ? "landscape-primary" : "portrait-primary");
  }
  return he(() => {
    const e = setTimeout(() => {
      oe && (() => {
        const o = q.current.querySelector(
          ".legends.container.has-standard-12-font-size.bottom"
        ) || q.current.querySelector(
          ".legends.container.items-section:not(.legends.container.top .items-section)"
        );
        if (!o || o.closest(".legends.container.top")) return;
        const { clientHeight: p } = o, v = window.getComputedStyle(o), G = parseInt(v.marginTop), b = parseInt(v.marginBottom), Ka = parseInt(v.paddingTop), Qa = parseInt(v.paddingBottom), Za = p + G + b + Ka + Qa, it = o.closest(
          ".ui.fluid.container.content"
        );
        if (it) {
          const y = it.querySelector(".data-source");
          if (y) {
            const D = y.getBoundingClientRect(), R = o.getBoundingClientRect();
            if (R.bottom !== 0 && D.top !== 0) {
              if (o.textContent.trim() === "") return;
              const Q = b, Z = R.bottom + Q, me = window.getComputedStyle(y), O = parseFloat(me.marginTop) || 0, F = D.top - O;
              if (Z > F) {
                let B = Z - F;
                B < 5 && (B += 1), y.style.marginTop = `${B + 1}px`;
              }
            } else
              setTimeout(() => {
                D.top < R.bottom && (y.style.marginTop = `${R.bottom - D.top + 1}px`);
              }, 1e3);
          }
        }
        const ue = o.closest(".chart.container");
        if (ue) {
          const y = ue.getBoundingClientRect(), D = window.getComputedStyle(ue), R = Number.parseFloat(D.marginBottom) || 0, Q = y.bottom + R, Z = o.getBoundingClientRect(), me = Number.parseFloat(v.marginTop) || 0, O = Z.top - me;
          if (O < Q) {
            const F = Q - O, B = 200, Oa = Math.min(F + 1, B);
            F > 0 && F < B && (o.style.marginTop = `${Oa}px`);
          }
        }
        Ja(Za);
      })();
    }, 100);
    return () => {
      clearTimeout(e);
    };
  }, [oe, q]), he(() => {
    const e = () => {
      setTimeout(() => {
        _a(nt());
      }, 100);
    };
    return window.screen.orientation ? window.screen.orientation.addEventListener("change", e) : window.addEventListener("resize", e), () => {
      window.screen.orientation ? window.screen.orientation.removeEventListener("change", e) : window.removeEventListener("resize", e);
    };
  }, []), /* @__PURE__ */ m("div", { ref: q, children: /* @__PURE__ */ pe(
    fe,
    {
      className: "chart container",
      style: {
        minHeight: E === "pie" && window.innerWidth <= 480 ? `${parseInt(S) + parseInt(ot) * 0.5}px` : `${parseInt(S) + parseInt(ot)}px`
      },
      fluid: !0,
      children: [
        /* @__PURE__ */ m(
          er,
          {
            editing: s,
            style: { height: `${J}px` },
            params: le,
            waitForFilters: ha === "true",
            app: r,
            group: we,
            csv: ft,
            store: [r, ee, ...X],
            source: X.join("/"),
            children: /* @__PURE__ */ pe(
              fe,
              {
                style: { height: `${J}px` },
                className: "body",
                fluid: !0,
                children: [
                  A && /* @__PURE__ */ m(st, { editing: s }),
                  !A && /* @__PURE__ */ pe(tr, { children: [
                    /* @__PURE__ */ m(st, { app: r, group: we, noDataMsg: At, children: " " }),
                    /* @__PURE__ */ m(
                      I,
                      {
                        locale: Ze,
                        colorBy: z,
                        hiddenBars: Ht,
                        swap: $ === "true" || $ === !0,
                        type: E,
                        includeTotal: !0,
                        includeOverall: Me === !0 || Me === "true",
                        overallLabel: re,
                        measures: x,
                        dimensions: [...X],
                        sort: He,
                        sortReverse: W === !0 || W === "true",
                        sortSecondDimension: We,
                        sortReverseSecondDimension: Y === !0 || Y === "true",
                        customLabels: et(),
                        children: /* @__PURE__ */ m(
                          lr,
                          {
                            type: E,
                            app: r,
                            locale: Ze,
                            overallLabel: re,
                            customLabels: et(),
                            manualColors: Ma(),
                            colorBy: z,
                            scheme: te,
                            barColor: rt.barColor,
                            children: /* @__PURE__ */ m(M, { ...rt })
                          }
                        )
                      }
                    )
                  ] })
                ]
              }
            )
          }
        ),
        /* @__PURE__ */ m("br", {}),
        qa && L && Xa === "info" && /* @__PURE__ */ m(
          fe,
          {
            fluid: !0,
            style: { height: J + "px" },
            className: "body",
            children: /* @__PURE__ */ m(sr, { post: { content: { rendered: L } } })
          }
        )
      ]
    }
  ) });
}, pr = (P, ge) => {
  const { "data-app": s, "data-group": ee } = ge, L = P.getIn(["data", "measures", s, ee]), U = P.getIn(["data", "pageModuleProps"]), d = {};
  return L && Object.keys(L).length > 0 && (d.injectedMeasures = L ?? {}), U && (d.pageModuleProps = U), d;
}, hr = {}, Sr = cr(pr, hr)(ur(mr));
export {
  Sr as default
};
