@metaboliccode-dev/widget 0.2.18 → 0.2.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -193,7 +193,7 @@ function un() {
193
193
  };
194
194
  }
195
195
  function bn(e) {
196
- var g, v, u, h, f, p, y, C, N, w, P, A, S, T, z, G, B, q, $;
196
+ var g, v, u, h, f, p, y, C, N, w, P, A, S, T, R, G, B, q, $;
197
197
  if (!e)
198
198
  return un();
199
199
  const r = {
@@ -221,7 +221,7 @@ function bn(e) {
221
221
  badgeValueText: ((A = e.colors) == null ? void 0 : A.badgeValueText) ?? i.textPrimary,
222
222
  badgeValueBorder: ((S = e.colors) == null ? void 0 : S.badgeValueBorder) ?? i.badgeValueBorder,
223
223
  cardInlineButtonBackground: ((T = e.colors) == null ? void 0 : T.cardInlineButtonBackground) ?? i.cardBackground,
224
- cardInlineButtonBorder: ((z = e.colors) == null ? void 0 : z.cardInlineButtonBorder) ?? i.cardBorder,
224
+ cardInlineButtonBorder: ((R = e.colors) == null ? void 0 : R.cardInlineButtonBorder) ?? i.cardBorder,
225
225
  cardInlineButtonText: ((G = e.colors) == null ? void 0 : G.cardInlineButtonText) ?? i.textPrimary,
226
226
  cardInlineButtonHoverBackground: ((B = e.colors) == null ? void 0 : B.cardInlineButtonHoverBackground) ?? i.navHoverBackground
227
227
  }, m = {
@@ -1181,7 +1181,7 @@ function St({ rows: e = [] }) {
1181
1181
  `${r.left}-${n}`
1182
1182
  )) });
1183
1183
  }
1184
- function Ps(e) {
1184
+ function Ms(e) {
1185
1185
  const {
1186
1186
  metricTitle: r,
1187
1187
  statusText: n,
@@ -1808,7 +1808,7 @@ function Ht({ label: e, value: r }) {
1808
1808
  /* @__PURE__ */ t("span", { className: fa, children: r })
1809
1809
  ] });
1810
1810
  }
1811
- function Ss({
1811
+ function ks({
1812
1812
  title: e,
1813
1813
  valueDisplay: r,
1814
1814
  indicatorPercent: n,
@@ -2064,7 +2064,7 @@ function Be(e) {
2064
2064
  )
2065
2065
  ] });
2066
2066
  }
2067
- function Ms({ children: e }) {
2067
+ function Hs({ children: e }) {
2068
2068
  return /* @__PURE__ */ l(L, { className: "flex h-full min-h-0 min-w-0 flex-col", children: [
2069
2069
  /* @__PURE__ */ t(it, { title: "Metabolic Triad", className: "!mb-3 shrink-0" }),
2070
2070
  /* @__PURE__ */ t("div", { className: "min-h-0 flex-1 space-y-3 text-sm leading-relaxed text-[color:var(--mb-color-text-muted)]", children: e })
@@ -2291,7 +2291,7 @@ function Pa({ title: e, items: r = [] }) {
2291
2291
  /* @__PURE__ */ t("div", { className: "w-full overflow-hidden", children: r.map((n, a) => /* @__PURE__ */ t(Yn, { text: n, isFirst: a === 0 }, n)) })
2292
2292
  ] });
2293
2293
  }
2294
- function ks({
2294
+ function js({
2295
2295
  heading: e,
2296
2296
  initials: r,
2297
2297
  rows: n = []
@@ -2354,7 +2354,7 @@ function Sa({
2354
2354
  ] })
2355
2355
  ] });
2356
2356
  }
2357
- function Hs({
2357
+ function Bs({
2358
2358
  title: e,
2359
2359
  infoAriaLabel: r,
2360
2360
  infoTooltip: n,
@@ -2400,7 +2400,7 @@ function Hs({
2400
2400
  ] })
2401
2401
  ] });
2402
2402
  }
2403
- function js({ title: e, children: r, actions: n }) {
2403
+ function Is({ title: e, children: r, actions: n }) {
2404
2404
  return /* @__PURE__ */ l(L, { className: "min-w-0 flex flex-col", children: [
2405
2405
  /* @__PURE__ */ t("h2", { className: "text-xl font-bold text-[color:var(--mb-color-text)]", children: e }),
2406
2406
  r,
@@ -2426,7 +2426,7 @@ function Ve(e) {
2426
2426
  function ja(e, r) {
2427
2427
  return e <= r.low.max ? "low" : e <= r.moderate.max ? "moderate" : "high";
2428
2428
  }
2429
- function Bs({
2429
+ function Ds({
2430
2430
  title: e,
2431
2431
  score: r,
2432
2432
  infoAriaLabel: n,
@@ -2618,7 +2618,7 @@ function Fa({
2618
2618
  const g = at(), [v, u] = k(!1), [h, f] = k(e), [p, y] = k(!1), C = Ea(), N = m && b ? b[m] : void 0, w = s != null ? {
2619
2619
  ...s,
2620
2620
  currentDateLabel: ((ie = s.currentDateLabel) == null ? void 0 : ie.trim()) || (c == null ? void 0 : c.trim()) || void 0
2621
- } : void 0, P = ((ge = w == null ? void 0 : w.name) == null ? void 0 : ge.trim()) || n.trim() || "Category", A = Da(a, P), S = d != null && ((pe = w == null ? void 0 : w.name) != null && pe.trim()) ? `Triad ${d}: ${w.name.trim()}` : d != null ? `Triad ${d}` : n, T = (xe = w == null ? void 0 : w.previousSymptomScore) == null ? void 0 : xe.trim(), z = (ve = w == null ? void 0 : w.previousLabScore) == null ? void 0 : ve.trim(), G = (se = w == null ? void 0 : w.previousTotalScore) == null ? void 0 : se.trim(), B = !!(T && T !== "—" && T !== "-" && T !== "–") || !!(z && z !== "—" && z !== "-" && z !== "–") || !!(G && G !== "—" && G !== "-" && G !== "–"), q = ((J = w == null ? void 0 : w.previousDateLabel) == null ? void 0 : J.trim()) || "Previous", $ = ((xt = w == null ? void 0 : w.currentDateLabel) == null ? void 0 : xt.trim()) || "Current", ze = w != null && !!((vt = w.currentDateLabel) != null && vt.trim()) && !!((wt = w.previousDateLabel) != null && wt.trim()) && B;
2621
+ } : void 0, P = ((ge = w == null ? void 0 : w.name) == null ? void 0 : ge.trim()) || n.trim() || "Category", A = Da(a, P), S = d != null && ((pe = w == null ? void 0 : w.name) != null && pe.trim()) ? `Triad ${d}: ${w.name.trim()}` : d != null ? `Triad ${d}` : n, T = (xe = w == null ? void 0 : w.previousSymptomScore) == null ? void 0 : xe.trim(), R = (ve = w == null ? void 0 : w.previousLabScore) == null ? void 0 : ve.trim(), G = (se = w == null ? void 0 : w.previousTotalScore) == null ? void 0 : se.trim(), B = !!(T && T !== "—" && T !== "-" && T !== "–") || !!(R && R !== "—" && R !== "-" && R !== "–") || !!(G && G !== "—" && G !== "-" && G !== "–"), q = ((J = w == null ? void 0 : w.previousDateLabel) == null ? void 0 : J.trim()) || "Previous", $ = ((xt = w == null ? void 0 : w.currentDateLabel) == null ? void 0 : xt.trim()) || "Current", ze = w != null && !!((vt = w.currentDateLabel) != null && vt.trim()) && !!((wt = w.previousDateLabel) != null && wt.trim()) && B;
2622
2622
  return V(() => {
2623
2623
  y(!0);
2624
2624
  }, []), V(() => {
@@ -2901,8 +2901,8 @@ function le({
2901
2901
  layoutBreakpoint: c,
2902
2902
  rowSize: d
2903
2903
  }) {
2904
- const m = e.infoTooltip ?? e.infoAriaLabel, b = e.status === "optimal", g = e.status === "high", v = e.status === "low", u = b ? "border-[#3a9e6a]" : g || v ? "border-[#d94040]" : "border-[#e09a1a]", h = b ? "bg-[#e8f6ee]" : g || v ? "bg-[#fdecec]" : "bg-[#fff8eb]", f = b ? "OPTIMAL" : g ? "HIGH" : v ? "LOW" : "TRENDING", p = b ? "trendRowStatusOptimal" : g ? "trendRowStatusHigh" : v ? "trendRowStatusLow" : "trendRowStatusTrending", y = s === 2, C = d ? d === "wellness" : y, N = c ?? (y ? "2xl" : "xl"), w = N === "2xl" ? "2xl:flex-row 2xl:items-stretch" : "xl:flex-row xl:items-stretch", P = C ? N === "2xl" ? "2xl:shrink-0 2xl:w-[20rem]" : "xl:shrink-0 xl:w-[20rem]" : N === "2xl" ? "2xl:shrink-0 2xl:w-[14rem]" : "xl:shrink-0 xl:w-[14rem]", A = y ? N === "2xl" ? "sm:grid-cols-2 2xl:mx-auto 2xl:w-full 2xl:max-w-[50rem] 2xl:border-t-0 2xl:px-8 2xl:py-1" : "sm:grid-cols-2 xl:mx-auto xl:w-full xl:max-w-[50rem] xl:border-t-0 xl:px-8 xl:py-1" : N === "2xl" ? "sm:grid-cols-3 2xl:border-t-0 2xl:px-16 2xl:py-1" : "sm:grid-cols-3 xl:border-t-0 xl:px-16 xl:py-1", S = y || C ? N === "2xl" ? "2xl:shrink-0 2xl:w-[9rem]" : "xl:shrink-0 xl:w-[9rem]" : N === "2xl" ? "2xl:shrink-0 2xl:w-[7rem]" : "xl:shrink-0 xl:w-[7rem]", T = (z, G, B) => /* @__PURE__ */ l("span", { className: "flex min-w-0 max-w-full items-center gap-1.5", children: [
2905
- /* @__PURE__ */ t("span", { className: "shrink-0 text-xs text-[color:var(--mb-color-text-muted)] sm:text-sm", children: z }),
2904
+ const m = e.infoTooltip ?? e.infoAriaLabel, b = e.status === "optimal", g = e.status === "high", v = e.status === "low", u = b ? "border-[#3a9e6a]" : g || v ? "border-[#d94040]" : "border-[#e09a1a]", h = b ? "bg-[#e8f6ee]" : g || v ? "bg-[#fdecec]" : "bg-[#fff8eb]", f = b ? "OPTIMAL" : g ? "HIGH" : v ? "LOW" : "TRENDING", p = b ? "trendRowStatusOptimal" : g ? "trendRowStatusHigh" : v ? "trendRowStatusLow" : "trendRowStatusTrending", y = s === 2, C = d ? d === "wellness" : y, N = c ?? (y ? "2xl" : "xl"), w = N === "2xl" ? "2xl:flex-row 2xl:items-stretch" : "xl:flex-row xl:items-stretch", P = C ? N === "2xl" ? "2xl:shrink-0 2xl:w-[20rem]" : "xl:shrink-0 xl:w-[20rem]" : N === "2xl" ? "2xl:shrink-0 2xl:w-[14rem]" : "xl:shrink-0 xl:w-[14rem]", A = y ? N === "2xl" ? "sm:grid-cols-2 2xl:mx-auto 2xl:w-full 2xl:max-w-[50rem] 2xl:border-t-0 2xl:px-8 2xl:py-1" : "sm:grid-cols-2 xl:mx-auto xl:w-full xl:max-w-[50rem] xl:border-t-0 xl:px-8 xl:py-1" : N === "2xl" ? "sm:grid-cols-3 2xl:border-t-0 2xl:px-16 2xl:py-1" : "sm:grid-cols-3 xl:border-t-0 xl:px-16 xl:py-1", S = y || C ? N === "2xl" ? "2xl:shrink-0 2xl:w-[9rem]" : "xl:shrink-0 xl:w-[9rem]" : N === "2xl" ? "2xl:shrink-0 2xl:w-[7rem]" : "xl:shrink-0 xl:w-[7rem]", T = (R, G, B) => /* @__PURE__ */ l("span", { className: "flex min-w-0 max-w-full items-center gap-1.5", children: [
2905
+ /* @__PURE__ */ t("span", { className: "shrink-0 text-xs text-[color:var(--mb-color-text-muted)] sm:text-sm", children: R }),
2906
2906
  /* @__PURE__ */ t(
2907
2907
  _,
2908
2908
  {
@@ -2977,17 +2977,21 @@ function D({ title: e, subtitle: r, className: n = "" }) {
2977
2977
  r ? /* @__PURE__ */ t("p", { className: "max-w-3xl text-sm leading-relaxed text-[color:var(--mb-color-text-muted)] m-0 p-0", children: r }) : null
2978
2978
  ] });
2979
2979
  }
2980
- const Xa = ["Normal Range", "Current Range", "Indicator"], Ot = ["high", "low", "normal"], Va = {
2980
+ const Xa = ["Normal Range", "Current Range", "Indicator"], Ot = ["high", "low", "lowNormal", "highNormal"], Va = {
2981
2981
  high: "Alert High",
2982
2982
  low: "Alert Low",
2983
- normal: "High Normal"
2983
+ lowNormal: "Low Normal",
2984
+ highNormal: "High Normal"
2984
2985
  };
2985
2986
  function Za(e) {
2987
+ return e.status === "high" ? "high" : e.status === "low" ? "low" : (e.indicatorPercent ?? (Number.isFinite(Number(e.totalScore)) ? Number(e.totalScore) : 50)) < 50 ? "lowNormal" : "highNormal";
2988
+ }
2989
+ function Wa(e) {
2986
2990
  const r = /* @__PURE__ */ new Map();
2987
2991
  for (const n of Ot)
2988
2992
  r.set(n, []);
2989
2993
  for (const n of e) {
2990
- const a = n.status === "high" ? "high" : n.status === "low" ? "low" : "normal", o = r.get(a);
2994
+ const a = Za(n), o = r.get(a);
2991
2995
  o && o.push(n);
2992
2996
  }
2993
2997
  return Ot.map((n) => ({
@@ -2996,8 +3000,8 @@ function Za(e) {
2996
3000
  rows: r.get(n) ?? []
2997
3001
  })).filter((n) => n.rows.length > 0);
2998
3002
  }
2999
- function Is({ content: e }) {
3000
- const { pageHeader: r, indicators: n } = e, o = Za(n ?? []);
3003
+ function Rs({ content: e }) {
3004
+ const { pageHeader: r, indicators: n } = e, o = Wa(n ?? []);
3001
3005
  return /* @__PURE__ */ l("div", { className: "mx-auto w-full min-w-0 space-y-6", children: [
3002
3006
  /* @__PURE__ */ t(D, { title: r.title, subtitle: r.subtitle }),
3003
3007
  /* @__PURE__ */ t("div", { className: "flex min-w-0 flex-col gap-6", children: o.map(({ category: i, title: s, rows: c }) => /* @__PURE__ */ l(L, { className: "min-w-0", children: [
@@ -3015,7 +3019,7 @@ function Is({ content: e }) {
3015
3019
  ] }, i)) })
3016
3020
  ] });
3017
3021
  }
3018
- function Wa() {
3022
+ function Ua() {
3019
3023
  return /* @__PURE__ */ l("div", { className: "flex min-w-0 flex-col overflow-hidden rounded-[length:var(--mb-radius-button)] border border-solid border-[color:var(--mb-color-card-border)] bg-[color:var(--mb-color-card-bg)] [border-width:1px] 2xl:flex-row 2xl:items-stretch", children: [
3020
3024
  /* @__PURE__ */ l("div", { className: "flex min-w-0 items-center gap-2 bg-[#ebebeb]/40 px-3 py-2.5 2xl:w-[20rem] 2xl:shrink-0", children: [
3021
3025
  /* @__PURE__ */ t(x, { className: "size-4 shrink-0 rounded" }),
@@ -3029,19 +3033,19 @@ function Wa() {
3029
3033
  /* @__PURE__ */ t(x, { className: "min-h-[3.25rem] w-full shrink-0 rounded-none rounded-br-[length:var(--mb-radius-button)] rounded-tr-[length:var(--mb-radius-button)] 2xl:w-[9rem] 2xl:min-h-0 2xl:self-stretch" })
3030
3034
  ] });
3031
3035
  }
3032
- const Ua = [
3036
+ const Qa = [
3033
3037
  { title: "Alert High", rowKeys: ["alert-high-1", "alert-high-2", "alert-high-3"] },
3034
3038
  { title: "Alert Low", rowKeys: ["alert-low-1", "alert-low-2"] },
3035
3039
  { title: "High Normal", rowKeys: ["high-normal-1", "high-normal-2"] }
3036
3040
  ];
3037
- function Qa({
3041
+ function Ka({
3038
3042
  pageHeader: e
3039
3043
  }) {
3040
3044
  return /* @__PURE__ */ l(K, { children: [
3041
3045
  /* @__PURE__ */ t(D, { title: e.title, subtitle: e.subtitle }),
3042
- /* @__PURE__ */ t("div", { className: "flex min-w-0 flex-col gap-6", children: Ua.map((r) => /* @__PURE__ */ l(L, { className: "min-w-0", children: [
3046
+ /* @__PURE__ */ t("div", { className: "flex min-w-0 flex-col gap-6", children: Qa.map((r) => /* @__PURE__ */ l(L, { className: "min-w-0", children: [
3043
3047
  /* @__PURE__ */ t("h2", { className: "mb-4 m-0 text-lg font-bold text-[color:var(--mb-color-text)]", children: r.title }),
3044
- /* @__PURE__ */ t("div", { className: "space-y-2", children: r.rowKeys.map((n) => /* @__PURE__ */ t(Wa, {}, n)) })
3048
+ /* @__PURE__ */ t("div", { className: "space-y-2", children: r.rowKeys.map((n) => /* @__PURE__ */ t(Ua, {}, n)) })
3045
3049
  ] }, r.title)) })
3046
3050
  ] });
3047
3051
  }
@@ -3049,7 +3053,7 @@ const xr = qt({});
3049
3053
  function Ie() {
3050
3054
  return ot(xr);
3051
3055
  }
3052
- const Ka = xr.Provider;
3056
+ const qa = xr.Provider;
3053
3057
  function mt({
3054
3058
  sectionTitle: e,
3055
3059
  infoTooltip: r,
@@ -3105,8 +3109,8 @@ function mt({
3105
3109
  ] })
3106
3110
  ] }) });
3107
3111
  }
3108
- const qa = "lab-results";
3109
- function Ja({
3112
+ const Ja = "lab-results";
3113
+ function _a({
3110
3114
  data: e,
3111
3115
  organContent: r
3112
3116
  }) {
@@ -3122,7 +3126,7 @@ function Ja({
3122
3126
  lastLabsLabel: e.lastLabsLabel,
3123
3127
  viewAllLabel: e.viewAllLabel,
3124
3128
  viewAllLabelCompact: e.viewAllLabelCompact,
3125
- onViewAllClick: n ? () => n(qa) : void 0
3129
+ onViewAllClick: n ? () => n(Ja) : void 0
3126
3130
  }
3127
3131
  ),
3128
3132
  /* @__PURE__ */ t("div", { className: "space-y-2", children: e.rows.map((o) => /* @__PURE__ */ t(
@@ -3137,7 +3141,7 @@ function Ja({
3137
3141
  )) })
3138
3142
  ] });
3139
3143
  }
3140
- function R(e, r, n, a, o, i) {
3144
+ function z(e, r, n, a, o, i) {
3141
3145
  return {
3142
3146
  name: e,
3143
3147
  infoAriaLabel: `${e} category information`,
@@ -3148,7 +3152,7 @@ function R(e, r, n, a, o, i) {
3148
3152
  ...i ? { statusExplanationPanel: i } : {}
3149
3153
  };
3150
3154
  }
3151
- const _a = {
3155
+ const $a = {
3152
3156
  sectionTitle: "Total Predictive Trend Snapshot",
3153
3157
  infoAriaLabel: "Total predictive trend snapshot information",
3154
3158
  lastLabsCaption: "Last Labs",
@@ -3164,44 +3168,44 @@ const _a = {
3164
3168
  ],
3165
3169
  categoriesByTriadIndex: [
3166
3170
  [
3167
- R("Adrenal", "145", "35", "180", "high", {
3171
+ z("Adrenal", "145", "35", "180", "high", {
3168
3172
  panelTitle: "HIGH",
3169
3173
  bodyParagraphs: [
3170
3174
  "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
3171
3175
  ]
3172
3176
  }),
3173
- R("Pancreas", "130", "185", "315", "high"),
3174
- R("Thyroid", "55", "55", "110", "optimal")
3177
+ z("Pancreas", "130", "185", "315", "high"),
3178
+ z("Thyroid", "55", "55", "110", "optimal")
3175
3179
  ],
3176
3180
  [
3177
- R("Gut", "115", "10", "125", "trending"),
3178
- R("Brain", "135", "55", "190", "trending"),
3179
- R("Immune", "55", "125", "180", "optimal")
3181
+ z("Gut", "115", "10", "125", "trending"),
3182
+ z("Brain", "135", "55", "190", "trending"),
3183
+ z("Immune", "55", "125", "180", "optimal")
3180
3184
  ],
3181
3185
  [
3182
- R("Testosterone", "50", "250", "300", "trending"),
3183
- R("Estrogen", "15", "140", "155", "trending"),
3184
- R("Progesterone", "5", "0", "5", "optimal")
3186
+ z("Testosterone", "50", "250", "300", "trending"),
3187
+ z("Estrogen", "15", "140", "155", "trending"),
3188
+ z("Progesterone", "5", "0", "5", "optimal")
3185
3189
  ],
3186
3190
  [
3187
- R("Cardio", "45", "130", "175", "optimal"),
3188
- R("Pulmonary", "5", "25", "30", "optimal"),
3189
- R("Neurovascular", "50", "15", "65", "optimal")
3191
+ z("Cardio", "45", "130", "175", "optimal"),
3192
+ z("Pulmonary", "5", "25", "30", "optimal"),
3193
+ z("Neurovascular", "50", "15", "65", "optimal")
3190
3194
  ],
3191
3195
  [
3192
- R("Liver", "65", "45", "110", "optimal"),
3193
- R("Lymph", "25", "30", "55", "optimal"),
3194
- R("Kidney", "30", "55", "85", "optimal")
3196
+ z("Liver", "65", "45", "110", "optimal"),
3197
+ z("Lymph", "25", "30", "55", "optimal"),
3198
+ z("Kidney", "30", "55", "85", "optimal")
3195
3199
  ]
3196
3200
  ]
3197
- }, $a = {
3201
+ }, eo = {
3198
3202
  1: "text-[#E49B67]",
3199
3203
  2: "text-[#7ABFE4]",
3200
3204
  3: "text-[#7FC99C]",
3201
3205
  4: "text-[#E86C7F]",
3202
3206
  5: "text-[#7D7DBB]"
3203
- }, eo = "total-predictive-index";
3204
- function to({
3207
+ }, to = "total-predictive-index";
3208
+ function ro({
3205
3209
  data: e,
3206
3210
  organContent: r
3207
3211
  }) {
@@ -3217,11 +3221,11 @@ function to({
3217
3221
  lastLabsLabel: e.lastLabsLabel,
3218
3222
  viewAllLabel: e.viewAllLabel,
3219
3223
  viewAllLabelCompact: e.viewAllLabelCompact,
3220
- onViewAllClick: n ? () => n(eo) : void 0
3224
+ onViewAllClick: n ? () => n(to) : void 0
3221
3225
  }
3222
3226
  ),
3223
3227
  /* @__PURE__ */ t("div", { className: "mt-1 overflow-hidden rounded-[var(--mb-radius-card)] border border-[color:var(--mb-color-card-border)] [border-width:var(--mb-card-border-width)]", children: e.triads.map((o, i) => {
3224
- const s = e.categoriesByTriadIndex[i] ?? [], c = $a[o.triadNumber] ?? "text-sky-400";
3228
+ const s = e.categoriesByTriadIndex[i] ?? [], c = eo[o.triadNumber] ?? "text-sky-400";
3225
3229
  return /* @__PURE__ */ l(
3226
3230
  "div",
3227
3231
  {
@@ -3267,7 +3271,7 @@ function to({
3267
3271
  }) })
3268
3272
  ] });
3269
3273
  }
3270
- const ro = {
3274
+ const no = {
3271
3275
  1: "text-[#E49B67]",
3272
3276
  2: "text-[#7ABFE4]",
3273
3277
  3: "text-[#7FC99C]",
@@ -3286,7 +3290,7 @@ function ut({
3286
3290
  role: "tablist",
3287
3291
  "aria-label": "Triad trends",
3288
3292
  children: e.map((a, o) => {
3289
- const i = o === r, s = ro[a.triadNumber] ?? "text-sky-400";
3293
+ const i = o === r, s = no[a.triadNumber] ?? "text-sky-400";
3290
3294
  return /* @__PURE__ */ l(
3291
3295
  "button",
3292
3296
  {
@@ -3337,14 +3341,14 @@ function ut({
3337
3341
  }
3338
3342
  );
3339
3343
  }
3340
- const vr = "Triad 1 is your body's Energy hub. The adrenals manage stress, the thyroid drives metabolism, and the pancreas regulates blood sugar. When in sync, you feel steady energy, focus, and balanced moods all day. Out of balance, you may wake up tired, crash mid-afternoon, crave sugar or caffeine, and find weight harder to control. Stress feels heavier, and motivation dips. Balancing Triad 1 restores your natural rhythm — smoother energy, sharper focus, calmer moods, and stronger resilience. It's the foundation for feeling refreshed in the morning and powered through the day.", no = [
3344
+ const vr = "Triad 1 is your body's Energy hub. The adrenals manage stress, the thyroid drives metabolism, and the pancreas regulates blood sugar. When in sync, you feel steady energy, focus, and balanced moods all day. Out of balance, you may wake up tired, crash mid-afternoon, crave sugar or caffeine, and find weight harder to control. Stress feels heavier, and motivation dips. Balancing Triad 1 restores your natural rhythm — smoother energy, sharper focus, calmer moods, and stronger resilience. It's the foundation for feeling refreshed in the morning and powered through the day.", ao = [
3341
3345
  vr
3342
- ], ao = "total-predictive-index";
3343
- function oo({
3346
+ ], oo = "total-predictive-index";
3347
+ function lo({
3344
3348
  data: e,
3345
3349
  organContent: r
3346
3350
  }) {
3347
- const { onNavigateToNavItem: n } = Ie(), [a, o] = k(0), i = Math.min(a, Math.max(0, e.triads.length - 1)), s = e.categoriesByTriadIndex[i] ?? [], c = e.infoTooltip ?? e.infoAriaLabel, d = e.triads[i], m = (d == null ? void 0 : d.triadNumber) === 1 ? no : void 0;
3351
+ const { onNavigateToNavItem: n } = Ie(), [a, o] = k(0), i = Math.min(a, Math.max(0, e.triads.length - 1)), s = e.categoriesByTriadIndex[i] ?? [], c = e.infoTooltip ?? e.infoAriaLabel, d = e.triads[i], m = (d == null ? void 0 : d.triadNumber) === 1 ? ao : void 0;
3348
3352
  return /* @__PURE__ */ l(L, { className: "min-w-0", children: [
3349
3353
  /* @__PURE__ */ t(
3350
3354
  mt,
@@ -3356,7 +3360,7 @@ function oo({
3356
3360
  lastLabsLabel: e.lastLabsLabel,
3357
3361
  viewAllLabel: e.viewAllLabel,
3358
3362
  viewAllLabelCompact: e.viewAllLabelCompact,
3359
- onViewAllClick: n ? () => n(ao) : void 0
3363
+ onViewAllClick: n ? () => n(oo) : void 0
3360
3364
  }
3361
3365
  ),
3362
3366
  /* @__PURE__ */ t(
@@ -3384,11 +3388,11 @@ function oo({
3384
3388
  ] })
3385
3389
  ] });
3386
3390
  }
3387
- const lo = {
3391
+ const io = {
3388
3392
  "schedule-labs": ct,
3389
3393
  "export-reports": dt
3390
3394
  };
3391
- function Ds({ content: e }) {
3395
+ function zs({ content: e }) {
3392
3396
  const { onExportReports: r } = Ie(), [n, a] = k(!1);
3393
3397
  if (!e) return null;
3394
3398
  const {
@@ -3399,7 +3403,7 @@ function Ds({ content: e }) {
3399
3403
  totalPredictiveTrends: d,
3400
3404
  alertLabSummaryTable: m,
3401
3405
  organContent: b
3402
- } = e, g = d ?? _a, v = i == null ? void 0 : i.actions.find((y) => y.id === "export-reports"), u = v ? lo[v.id] : null, h = !!(s || c), f = !!(v && u && r), p = async () => {
3406
+ } = e, g = d ?? $a, v = i == null ? void 0 : i.actions.find((y) => y.id === "export-reports"), u = v ? io[v.id] : null, h = !!(s || c), f = !!(v && u && r), p = async () => {
3403
3407
  if (!(!r || n))
3404
3408
  try {
3405
3409
  a(!0), await r();
@@ -3443,14 +3447,14 @@ function Ds({ content: e }) {
3443
3447
  }
3444
3448
  ) : null,
3445
3449
  /* @__PURE__ */ t("div", { className: "xl:hidden", children: /* @__PURE__ */ t(
3446
- to,
3450
+ ro,
3447
3451
  {
3448
3452
  data: g,
3449
3453
  organContent: b
3450
3454
  }
3451
3455
  ) }),
3452
- /* @__PURE__ */ t("div", { className: "hidden xl:block", children: /* @__PURE__ */ t(oo, { data: g, organContent: b }) }),
3453
- m ? /* @__PURE__ */ t(Ja, { data: m, organContent: b }) : null
3456
+ /* @__PURE__ */ t("div", { className: "hidden xl:block", children: /* @__PURE__ */ t(lo, { data: g, organContent: b }) }),
3457
+ m ? /* @__PURE__ */ t(_a, { data: m, organContent: b }) : null
3454
3458
  ] });
3455
3459
  }
3456
3460
  const Ze = "flex min-h-10 items-center justify-between gap-4 py-3.5 text-sm leading-5 text-[color:var(--mb-color-text)]", Ft = "border-t border-[color:var(--mb-color-card-border)]", We = "flex min-w-0 flex-1 items-center gap-3", Ue = "flex size-5 shrink-0 items-center justify-center text-[color:var(--mb-color-text-muted)]", Qe = "size-[18px] shrink-0";
@@ -3483,7 +3487,7 @@ function Gt() {
3483
3487
  /* @__PURE__ */ t(x, { className: "h-11 w-full shrink-0 rounded-none border-t border-[color:var(--mb-color-card-border)] xl:h-auto xl:w-[8.5rem] xl:border-l xl:border-t-0 xl:border-[color:var(--mb-color-card-border)]" })
3484
3488
  ] }) });
3485
3489
  }
3486
- function io() {
3490
+ function so() {
3487
3491
  return /* @__PURE__ */ l("div", { className: "flex min-w-0 flex-col overflow-hidden rounded-[length:var(--mb-radius-button)] border border-solid border-[#e09a1a] bg-[color:var(--mb-color-card-bg)] [border-width:1px] xl:flex-row xl:items-stretch", children: [
3488
3492
  /* @__PURE__ */ l("div", { className: "flex min-w-0 items-center gap-2 bg-[#fff8eb]/60 px-3 py-2 xl:w-[10rem] xl:shrink-0", children: [
3489
3493
  /* @__PURE__ */ t(x, { className: "size-4 shrink-0 rounded" }),
@@ -3497,7 +3501,7 @@ function io() {
3497
3501
  /* @__PURE__ */ t(x, { className: "h-11 w-full shrink-0 rounded-none border-t border-[color:var(--mb-color-card-border)] xl:h-auto xl:w-[7rem] xl:rounded-br-[length:var(--mb-radius-button)] xl:rounded-tr-[length:var(--mb-radius-button)] xl:border-l xl:border-t-0 xl:border-[color:var(--mb-color-card-border)]" })
3498
3502
  ] });
3499
3503
  }
3500
- function so({
3504
+ function co({
3501
3505
  pageHeader: e
3502
3506
  }) {
3503
3507
  return /* @__PURE__ */ l(K, { className: "mx-auto w-full min-w-0 max-w-full space-y-4 lg:space-y-6", children: [
@@ -3613,7 +3617,7 @@ function so({
3613
3617
  /* @__PURE__ */ t(x, { className: "h-3 w-24" }),
3614
3618
  /* @__PURE__ */ t(x, { className: "h-8 w-14" })
3615
3619
  ] }),
3616
- /* @__PURE__ */ t("div", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [0, 1, 2].map((n) => /* @__PURE__ */ t(io, {}, n)) })
3620
+ /* @__PURE__ */ t("div", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [0, 1, 2].map((n) => /* @__PURE__ */ t(so, {}, n)) })
3617
3621
  ]
3618
3622
  },
3619
3623
  r
@@ -3623,14 +3627,14 @@ function so({
3623
3627
  ] })
3624
3628
  ] });
3625
3629
  }
3626
- function Rs({ content: e }) {
3630
+ function Os({ content: e }) {
3627
3631
  const { pageHeader: r, sections: n } = e, a = n ?? [];
3628
3632
  return /* @__PURE__ */ l("div", { className: "mx-auto w-full max-w-full min-w-0 space-y-6", children: [
3629
3633
  /* @__PURE__ */ t(D, { title: r.title, subtitle: r.subtitle }),
3630
3634
  /* @__PURE__ */ t("div", { className: "space-y-6", children: a.map((o) => /* @__PURE__ */ t(ua, { ...o }, `${o.triadNumber}-${o.heading}`)) })
3631
3635
  ] });
3632
3636
  }
3633
- function co({
3637
+ function mo({
3634
3638
  pageHeader: e
3635
3639
  }) {
3636
3640
  return /* @__PURE__ */ l(K, { children: [
@@ -3652,14 +3656,14 @@ function co({
3652
3656
  ] }, r)) })
3653
3657
  ] });
3654
3658
  }
3655
- const mo = ["Normal Range", "Current Range", ""], uo = [];
3656
- function bo(e, r) {
3657
- const n = /T(\d+)/i.exec(e);
3658
- if (!n) return r + 1;
3659
- const a = Number(n[1]);
3660
- return Number.isFinite(a) ? a : r + 1;
3659
+ const uo = ["Normal Range", "Current Range", ""], bo = [], ho = 0;
3660
+ function fo(e) {
3661
+ const r = /T(\d+)/i.exec(e);
3662
+ if (!r) return null;
3663
+ const n = Number(r[1]);
3664
+ return Number.isFinite(n) ? n : null;
3661
3665
  }
3662
- function ho(e) {
3666
+ function go(e) {
3663
3667
  return {
3664
3668
  name: e.title,
3665
3669
  infoAriaLabel: e.infoAriaLabel,
@@ -3670,24 +3674,27 @@ function ho(e) {
3670
3674
  status: e.status
3671
3675
  };
3672
3676
  }
3673
- function fo(e) {
3677
+ function po(e) {
3674
3678
  const r = /* @__PURE__ */ new Map();
3675
- return e.forEach((n, a) => {
3676
- const o = bo(n.subtitle, a), i = r.get(o) ?? [];
3677
- i.push(n), r.set(o, i);
3678
- }), Array.from(r.entries()).sort((n, a) => n[0] - a[0]).map(([n, a]) => ({
3679
+ return e.forEach((n) => {
3680
+ var s;
3681
+ const a = n.triadNumber ?? fo(n.subtitle), o = a == null ? "additional-lab-results" : `triad-${a}`, i = ((s = r.get(o)) == null ? void 0 : s.groups) ?? [];
3682
+ i.push(n), r.set(o, { triadNumber: a, groups: i });
3683
+ }), Array.from(r.values()).sort((n, a) => n.triadNumber == null && a.triadNumber == null ? 0 : n.triadNumber == null ? 1 : a.triadNumber == null ? -1 : n.triadNumber - a.triadNumber).map(({ triadNumber: n, groups: a }) => ({
3679
3684
  triadNumber: n,
3680
- groups: a
3685
+ groups: a,
3686
+ tabName: n == null ? "Additional Lab Results" : `Triad ${n}`,
3687
+ tabDisplay: n == null ? "Labs" : String(n)
3681
3688
  }));
3682
3689
  }
3683
- function zs({ content: e }) {
3690
+ function Es({ content: e }) {
3684
3691
  var f, p;
3685
- const r = (e == null ? void 0 : e.groups) ?? uo, n = j(() => fo(r ?? []), [r]), [a, o] = k(0);
3692
+ const r = (e == null ? void 0 : e.groups) ?? bo, n = j(() => po(r ?? []), [r]), [a, o] = k(0);
3686
3693
  if (!e) return null;
3687
- const { pageHeader: i, intro: s } = e, c = r.length > 0, d = Math.min(a, Math.max(0, n.length - 1)), m = n[d], b = (m == null ? void 0 : m.groups) ?? [], g = ((f = e.intros) == null ? void 0 : f.find((y) => y.triadNumber === (m == null ? void 0 : m.triadNumber))) ?? s, v = !!(g && (g.heading || (p = g.paragraphs) != null && p.length)), u = n.map((y) => ({
3688
- triadNumber: y.triadNumber,
3689
- name: `Triad ${y.triadNumber}`,
3690
- aggregateScoreDisplay: String(y.triadNumber)
3694
+ const { pageHeader: i, intro: s } = e, c = r.length > 0, d = Math.min(a, Math.max(0, n.length - 1)), m = n[d], b = (m == null ? void 0 : m.groups) ?? [], g = m == null ? s : m.triadNumber == null ? void 0 : ((f = e.intros) == null ? void 0 : f.find((y) => y.triadNumber === m.triadNumber)) ?? s, v = !!(g && (g.heading || (p = g.paragraphs) != null && p.length)), u = n.map((y) => ({
3695
+ triadNumber: y.triadNumber ?? ho,
3696
+ name: y.tabName,
3697
+ aggregateScoreDisplay: y.tabDisplay
3691
3698
  })), h = v || c;
3692
3699
  return /* @__PURE__ */ l("div", { className: "mx-auto w-full min-w-0 space-y-6", children: [
3693
3700
  /* @__PURE__ */ t(D, { title: i.title, subtitle: i.subtitle }),
@@ -3714,8 +3721,8 @@ function zs({ content: e }) {
3714
3721
  /* @__PURE__ */ t("div", { className: "space-y-2", children: (y.metrics ?? []).map((C) => /* @__PURE__ */ t(
3715
3722
  le,
3716
3723
  {
3717
- row: ho(C),
3718
- metricLabels: mo,
3724
+ row: go(C),
3725
+ metricLabels: uo,
3719
3726
  metricSlots: 2
3720
3727
  },
3721
3728
  C.title
@@ -3727,8 +3734,8 @@ function zs({ content: e }) {
3727
3734
  ] }) }) : null
3728
3735
  ] });
3729
3736
  }
3730
- const go = 5;
3731
- function po() {
3737
+ const xo = 5;
3738
+ function vo() {
3732
3739
  return /* @__PURE__ */ l("div", { className: "flex min-w-0 flex-col overflow-hidden rounded-[length:var(--mb-radius-button)] border border-solid border-[color:var(--mb-color-card-border)] bg-[color:var(--mb-color-card-bg)] [border-width:1px] 2xl:flex-row 2xl:items-stretch", children: [
3733
3740
  /* @__PURE__ */ l("div", { className: "flex min-w-0 items-center gap-2 bg-[#ebebeb]/40 px-3 py-2.5 2xl:w-[20rem] 2xl:shrink-0", children: [
3734
3741
  /* @__PURE__ */ t(x, { className: "size-4 shrink-0 rounded" }),
@@ -3741,12 +3748,12 @@ function po() {
3741
3748
  /* @__PURE__ */ t(x, { className: "min-h-[3.25rem] w-full shrink-0 rounded-none rounded-br-[length:var(--mb-radius-button)] rounded-tr-[length:var(--mb-radius-button)] 2xl:w-[9rem] 2xl:min-h-0 2xl:self-stretch" })
3742
3749
  ] });
3743
3750
  }
3744
- function xo({
3751
+ function wo({
3745
3752
  pageHeader: e
3746
3753
  }) {
3747
3754
  return /* @__PURE__ */ l(K, { children: [
3748
3755
  /* @__PURE__ */ t(D, { title: e.title, subtitle: e.subtitle }),
3749
- /* @__PURE__ */ t("div", { className: "flex gap-3 overflow-x-auto", role: "presentation", "aria-hidden": !0, children: Array.from({ length: go }, (r, n) => /* @__PURE__ */ l(
3756
+ /* @__PURE__ */ t("div", { className: "flex gap-3 overflow-x-auto", role: "presentation", "aria-hidden": !0, children: Array.from({ length: xo }, (r, n) => /* @__PURE__ */ l(
3750
3757
  "div",
3751
3758
  {
3752
3759
  className: "flex min-w-[9rem] flex-1 flex-col items-center gap-3 px-5 py-4",
@@ -3783,7 +3790,7 @@ function xo({
3783
3790
  /* @__PURE__ */ t(x, { className: "h-7 w-[min(100%,12rem)]" }),
3784
3791
  /* @__PURE__ */ t(x, { className: "h-5 w-24 sm:h-6" })
3785
3792
  ] }),
3786
- /* @__PURE__ */ t("div", { className: "space-y-2", children: (r === 0 ? [0, 1, 2, 3] : [0, 1, 2]).map((n) => /* @__PURE__ */ t(po, {}, n)) })
3793
+ /* @__PURE__ */ t("div", { className: "space-y-2", children: (r === 0 ? [0, 1, 2, 3] : [0, 1, 2]).map((n) => /* @__PURE__ */ t(vo, {}, n)) })
3787
3794
  ]
3788
3795
  },
3789
3796
  r
@@ -3791,16 +3798,16 @@ function xo({
3791
3798
  ] }) })
3792
3799
  ] });
3793
3800
  }
3794
- function vo(e) {
3801
+ function yo(e) {
3795
3802
  return typeof e == "object" && e !== null && "children" in e;
3796
3803
  }
3797
- function wo({ items: e }) {
3798
- return /* @__PURE__ */ t("ul", { className: "m-0 list-disc space-y-1 pl-5 text-[14px] leading-relaxed text-[color:var(--mb-color-text-muted)]", children: e.map((r, n) => vo(r) ? /* @__PURE__ */ l("li", { children: [
3804
+ function No({ items: e }) {
3805
+ return /* @__PURE__ */ t("ul", { className: "m-0 list-disc space-y-1 pl-5 text-[14px] leading-relaxed text-[color:var(--mb-color-text-muted)]", children: e.map((r, n) => yo(r) ? /* @__PURE__ */ l("li", { children: [
3799
3806
  r.text,
3800
3807
  /* @__PURE__ */ t("ul", { className: "mt-1 list-[circle] space-y-1 pl-5", children: r.children.map((a, o) => /* @__PURE__ */ t("li", { children: a }, `nc-${n}-${o}`)) })
3801
3808
  ] }, `n-${n}`) : /* @__PURE__ */ t("li", { children: r }, `i-${n}`)) });
3802
3809
  }
3803
- function yo({ rows: e }) {
3810
+ function Co({ rows: e }) {
3804
3811
  return /* @__PURE__ */ t("div", { className: "overflow-x-auto", children: /* @__PURE__ */ t("table", { className: "w-full border-collapse text-[14px] leading-relaxed text-[color:var(--mb-color-text-muted)]", children: /* @__PURE__ */ t("tbody", { children: e.map((r, n) => /* @__PURE__ */ t("tr", { className: "align-top", children: r.map((a, o) => /* @__PURE__ */ t(
3805
3812
  "td",
3806
3813
  {
@@ -3827,32 +3834,32 @@ function wr({ blocks: e }) {
3827
3834
  children: r.text
3828
3835
  },
3829
3836
  a
3830
- ) : r.type === "list" ? /* @__PURE__ */ t(wo, { items: r.items }, a) : r.type === "table" ? /* @__PURE__ */ t(yo, { rows: r.rows }, a) : null;
3837
+ ) : r.type === "list" ? /* @__PURE__ */ t(No, { items: r.items }, a) : r.type === "table" ? /* @__PURE__ */ t(Co, { rows: r.rows }, a) : null;
3831
3838
  }) });
3832
3839
  }
3833
3840
  const qe = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_AG_CHARTS_LICENSE_KEY: "Using_this_{AG_Charts}_Enterprise_key_{AG-125036}_in_excess_of_the_licence_granted_is_not_permitted___Please_report_misuse_to_legal@ag-grid.com___For_help_with_changing_this_key_please_contact_info@ag-grid.com___{Metabolic_Code}_is_granted_a_{Single_Application}_Developer_License_for_the_application_{Metabolic_Code}_only_for_{1}_Front-End_JavaScript_developer___All_Front-End_JavaScript_developers_working_on_{Metabolic_Code}_need_to_be_licensed___{Metabolic_Code}_has_been_granted_a_Deployment_License_Add-on_for_{1}_Production_Environment___This_key_works_with_{AG_Charts}_Enterprise_versions_released_before_{31_March_2027}____[v3]_[02]_MTgwNjQ0NzYwMDAwMA==4e5dbf88087527cd3b1cf09b0557ec38", VITE_METABOLIC_REPORT_PAGES_API_BASE_URL: "https://mc-api-production-api.salmonstone-a2c3cb0d.canadacentral.azurecontainerapps.io" };
3834
- function No() {
3841
+ function Ao() {
3835
3842
  try {
3836
3843
  return "https://mc-api-production-api.salmonstone-a2c3cb0d.canadacentral.azurecontainerapps.io";
3837
3844
  } catch {
3838
3845
  return;
3839
3846
  }
3840
3847
  }
3841
- const Co = No() ?? "", yr = (() => {
3848
+ const Lo = Ao() ?? "", yr = (() => {
3842
3849
  try {
3843
3850
  return qe == null ? void 0 : qe.VITE_METABOLIC_DASHBOARD_STUB_API_KEY;
3844
3851
  } catch {
3845
3852
  return;
3846
3853
  }
3847
3854
  })();
3848
- function Ao(e) {
3855
+ function To(e) {
3849
3856
  return e === yr;
3850
3857
  }
3851
- function Lo(e) {
3858
+ function Po(e) {
3852
3859
  return e.replace(/\/+$/, "");
3853
3860
  }
3854
3861
  function fe() {
3855
- return Lo(Co);
3862
+ return Po(Lo);
3856
3863
  }
3857
3864
  function Le(e) {
3858
3865
  if (!e || /^https?:\/\//i.test(e)) return e;
@@ -3890,7 +3897,7 @@ function Yt({ variant: e }) {
3890
3897
  /* @__PURE__ */ t(wr, { blocks: e.blocks })
3891
3898
  ] });
3892
3899
  }
3893
- function To({
3900
+ function So({
3894
3901
  urinary: e,
3895
3902
  salivary: r
3896
3903
  }) {
@@ -3902,18 +3909,18 @@ function To({
3902
3909
  ] })
3903
3910
  ] });
3904
3911
  }
3905
- const Po = [
3912
+ const Mo = [
3906
3913
  { color: "#3a9e6a", position: 0 },
3907
3914
  { color: "#e09a1a", position: 50 },
3908
3915
  { color: "#d94040", position: 100 }
3909
- ], So = "text-[13px] font-medium uppercase tracking-wide text-[color:var(--mb-color-text-muted)]", Mo = "text-[15px] font-bold tabular-nums text-[color:var(--mb-color-text)]";
3916
+ ], ko = "text-[13px] font-medium uppercase tracking-wide text-[color:var(--mb-color-text-muted)]", Ho = "text-[15px] font-bold tabular-nums text-[color:var(--mb-color-text)]";
3910
3917
  function Je({ label: e, value: r }) {
3911
3918
  return /* @__PURE__ */ l("div", { className: "flex items-center justify-between border-b border-[color:var(--mb-color-card-border)] py-2 last:border-0", children: [
3912
- /* @__PURE__ */ t("span", { className: So, children: e }),
3913
- /* @__PURE__ */ t("span", { className: Mo, children: r })
3919
+ /* @__PURE__ */ t("span", { className: ko, children: e }),
3920
+ /* @__PURE__ */ t("span", { className: Ho, children: r })
3914
3921
  ] });
3915
3922
  }
3916
- function ko({ patient: e }) {
3923
+ function jo({ patient: e }) {
3917
3924
  const r = e.trendIndicatorPercent ?? 50;
3918
3925
  return /* @__PURE__ */ l("div", { className: "rounded-lg border border-[color:var(--mb-color-card-border)] bg-[color:var(--mb-color-card-bg)] p-4 sm:p-5", children: [
3919
3926
  /* @__PURE__ */ t("h2", { className: "mb-3 text-sm font-bold uppercase tracking-wide text-[color:var(--mb-color-text)]", children: e.organDisplayName }),
@@ -3923,7 +3930,7 @@ function ko({ patient: e }) {
3923
3930
  /* @__PURE__ */ t(Je, { label: "Total", value: e.totalScore })
3924
3931
  ] }),
3925
3932
  /* @__PURE__ */ l("div", { className: "mt-4", children: [
3926
- /* @__PURE__ */ t(or, { stops: Po, indicatorPercent: r }),
3933
+ /* @__PURE__ */ t(or, { stops: Mo, indicatorPercent: r }),
3927
3934
  /* @__PURE__ */ l("div", { className: "mt-2 grid grid-cols-3 text-center text-[11px] font-medium uppercase tracking-wide text-[color:var(--mb-color-text-muted)]", children: [
3928
3935
  /* @__PURE__ */ t("span", { children: "Optimal" }),
3929
3936
  /* @__PURE__ */ t("span", { children: "Trending" }),
@@ -3932,7 +3939,7 @@ function ko({ patient: e }) {
3932
3939
  ] })
3933
3940
  ] });
3934
3941
  }
3935
- function Ho({ stage: e }) {
3942
+ function Bo({ stage: e }) {
3936
3943
  return /* @__PURE__ */ l("div", { className: "rounded-lg border border-[color:var(--mb-color-card-border)] bg-[color:var(--mb-color-card-bg)] p-4 sm:p-5", children: [
3937
3944
  /* @__PURE__ */ l("div", { className: "mb-3 flex items-center gap-3", children: [
3938
3945
  /* @__PURE__ */ t(
@@ -3962,10 +3969,10 @@ function Ho({ stage: e }) {
3962
3969
  ] })
3963
3970
  ] });
3964
3971
  }
3965
- function jo({ stages: e }) {
3966
- return /* @__PURE__ */ t("div", { className: "grid grid-cols-1 gap-4", children: e.map((r) => /* @__PURE__ */ t(Ho, { stage: r }, r.number)) });
3972
+ function Io({ stages: e }) {
3973
+ return /* @__PURE__ */ t("div", { className: "grid grid-cols-1 gap-4", children: e.map((r) => /* @__PURE__ */ t(Bo, { stage: r }, r.number)) });
3967
3974
  }
3968
- function Bo({
3975
+ function Do({
3969
3976
  bodyUrl: e,
3970
3977
  organUrl: r,
3971
3978
  organDisplayName: n
@@ -3990,13 +3997,13 @@ function Bo({
3990
3997
  )
3991
3998
  ] });
3992
3999
  }
3993
- function Io({ onClick: e }) {
4000
+ function Ro({ onClick: e }) {
3994
4001
  return /* @__PURE__ */ l(M, { type: "button", variant: "soft", onClick: e, align: "start", children: [
3995
4002
  /* @__PURE__ */ t("span", { "aria-hidden": !0, children: "←" }),
3996
4003
  "Back"
3997
4004
  ] });
3998
4005
  }
3999
- function Do({
4006
+ function zo({
4000
4007
  patient: e,
4001
4008
  content: r,
4002
4009
  onBack: n,
@@ -4004,14 +4011,14 @@ function Do({
4004
4011
  }) {
4005
4012
  return /* @__PURE__ */ l("div", { className: "mx-auto w-full min-w-0 space-y-4 lg:space-y-6", children: [
4006
4013
  /* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-3", children: [
4007
- /* @__PURE__ */ t(Io, { onClick: n }),
4014
+ /* @__PURE__ */ t(Ro, { onClick: n }),
4008
4015
  e.interpretationLabel ? /* @__PURE__ */ t("span", { className: "text-sm font-bold uppercase tracking-wide text-[color:var(--mb-color-text)]", children: e.interpretationLabel }) : null
4009
4016
  ] }),
4010
4017
  /* @__PURE__ */ t("header", { children: /* @__PURE__ */ t("h1", { className: "text-2xl font-bold leading-tight text-[color:var(--mb-color-text)]", children: e.triadHeading }) }),
4011
4018
  /* @__PURE__ */ l("div", { className: "grid grid-cols-1 gap-4 lg:grid-cols-[minmax(0,1fr)_minmax(0,1fr)]", children: [
4012
- /* @__PURE__ */ t(ko, { patient: e }),
4019
+ /* @__PURE__ */ t(jo, { patient: e }),
4013
4020
  /* @__PURE__ */ t(
4014
- Bo,
4021
+ Do,
4015
4022
  {
4016
4023
  bodyUrl: r.images.body_url,
4017
4024
  organUrl: r.images.organ_url,
@@ -4032,10 +4039,10 @@ function Do({
4032
4039
  )),
4033
4040
  r.stages && r.stages.length > 0 ? /* @__PURE__ */ l("section", { className: "space-y-3", children: [
4034
4041
  /* @__PURE__ */ t("h2", { className: "text-lg font-bold text-[color:var(--mb-color-text)]", children: "Stages" }),
4035
- /* @__PURE__ */ t(jo, { stages: r.stages })
4042
+ /* @__PURE__ */ t(Io, { stages: r.stages })
4036
4043
  ] }) : null,
4037
4044
  a ? /* @__PURE__ */ t(
4038
- To,
4045
+ So,
4039
4046
  {
4040
4047
  urinary: a.urinary,
4041
4048
  salivary: a.salivary
@@ -4043,7 +4050,7 @@ function Do({
4043
4050
  ) : null
4044
4051
  ] });
4045
4052
  }
4046
- function Os({
4053
+ function Fs({
4047
4054
  content: e
4048
4055
  }) {
4049
4056
  const { pageHeader: r, sections: n } = e, a = n ?? [];
@@ -4059,8 +4066,8 @@ function Os({
4059
4066
  )) })
4060
4067
  ] });
4061
4068
  }
4062
- const Ro = ["ADRENAL", "THYROID", "PANCREAS"];
4063
- function zo({
4069
+ const Oo = ["ADRENAL", "THYROID", "PANCREAS"];
4070
+ function Eo({
4064
4071
  pageHeader: e
4065
4072
  }) {
4066
4073
  return /* @__PURE__ */ l(K, { children: [
@@ -4073,7 +4080,7 @@ function zo({
4073
4080
  ] }),
4074
4081
  /* @__PURE__ */ t(x, { className: "h-9 w-14" })
4075
4082
  ] }),
4076
- /* @__PURE__ */ t("div", { className: "grid grid-cols-1 gap-4 lg:grid-cols-2 xl:grid-cols-3", children: Ro.map((n) => /* @__PURE__ */ t(
4083
+ /* @__PURE__ */ t("div", { className: "grid grid-cols-1 gap-4 lg:grid-cols-2 xl:grid-cols-3", children: Oo.map((n) => /* @__PURE__ */ t(
4077
4084
  Be,
4078
4085
  {
4079
4086
  variant: "questionnaire",
@@ -4085,13 +4092,13 @@ function zo({
4085
4092
  ] });
4086
4093
  }
4087
4094
  const Xt = 3;
4088
- function Oo(e) {
4095
+ function Fo(e) {
4089
4096
  const r = [];
4090
4097
  for (let n = 0; n < e.length; n += Xt)
4091
4098
  r.push(e.slice(n, n + Xt));
4092
4099
  return r;
4093
4100
  }
4094
- function Es({ content: e }) {
4101
+ function Gs({ content: e }) {
4095
4102
  var S;
4096
4103
  if (!e) return null;
4097
4104
  const {
@@ -4125,14 +4132,14 @@ function Es({ content: e }) {
4125
4132
  m && A ? /* @__PURE__ */ t("div", { className: "border-t border-[color:var(--mb-color-card-border)]" }) : null,
4126
4133
  h ? /* @__PURE__ */ l("div", { className: "space-y-5", children: [
4127
4134
  /* @__PURE__ */ t("h2", { className: "text-xl font-bold text-[color:var(--mb-color-text)]", children: i }),
4128
- /* @__PURE__ */ t("div", { className: "space-y-0", children: Oo(g).map((T) => /* @__PURE__ */ t(
4135
+ /* @__PURE__ */ t("div", { className: "space-y-0", children: Fo(g).map((T) => /* @__PURE__ */ t(
4129
4136
  "div",
4130
4137
  {
4131
4138
  className: "grid grid-cols-1 gap-4 border-b border-gray-200 py-3 last:border-b-0 md:grid-cols-3 md:gap-6",
4132
- children: T.map((z) => /* @__PURE__ */ l("div", { className: "flex min-h-10 items-center gap-3", children: [
4139
+ children: T.map((R) => /* @__PURE__ */ l("div", { className: "flex min-h-10 items-center gap-3", children: [
4133
4140
  /* @__PURE__ */ t("span", { className: "inline-flex size-4 shrink-0 items-center justify-center text-[color:var(--mb-color-text)]", children: /* @__PURE__ */ t(re, { className: "size-4", "aria-hidden": !0 }) }),
4134
- /* @__PURE__ */ t("span", { className: "text-sm leading-5 text-[color:var(--mb-color-text)]", children: z })
4135
- ] }, z))
4141
+ /* @__PURE__ */ t("span", { className: "text-sm leading-5 text-[color:var(--mb-color-text)]", children: R })
4142
+ ] }, R))
4136
4143
  },
4137
4144
  T[0]
4138
4145
  )) })
@@ -4140,7 +4147,7 @@ function Es({ content: e }) {
4140
4147
  h && (f || u) ? /* @__PURE__ */ t("div", { className: "border-t border-[color:var(--mb-color-card-border)]" }) : null,
4141
4148
  f ? /* @__PURE__ */ l("div", { className: "min-w-0 space-y-5 rounded-[length:var(--mb-radius-card)] bg-[color:var(--mb-color-muted-section-bg)] p-[length:var(--mb-card-padding)]", children: [
4142
4149
  /* @__PURE__ */ t("h2", { className: "text-xl font-bold text-[color:var(--mb-color-text)]", children: c }),
4143
- /* @__PURE__ */ t("div", { className: "grid w-full min-w-0 grid-cols-1 gap-5 sm:grid-cols-2 sm:gap-6 xl:grid-cols-3 xl:gap-8", children: v.map((T) => /* @__PURE__ */ l(
4150
+ /* @__PURE__ */ t("div", { className: "grid w-full min-w-0 grid-cols-1 gap-5 sm:grid-cols-2 sm:gap-6 xl:grid-cols-3 xl:gap-8", children: v.map((T, R) => /* @__PURE__ */ l(
4144
4151
  "div",
4145
4152
  {
4146
4153
  className: "flex min-w-0 w-full flex-col items-center",
@@ -4159,7 +4166,7 @@ function Es({ content: e }) {
4159
4166
  T.tagline ? /* @__PURE__ */ t("span", { className: "mt-1 w-full min-w-0 break-words px-0.5 text-center text-xs text-[color:var(--mb-color-text-muted)]", children: T.tagline }) : null
4160
4167
  ]
4161
4168
  },
4162
- T.name
4169
+ `${T.name}-${R}`
4163
4170
  )) })
4164
4171
  ] }) : null,
4165
4172
  f && u ? /* @__PURE__ */ t("div", { className: "border-t border-[color:var(--mb-color-card-border)]" }) : null,
@@ -4177,8 +4184,8 @@ function Es({ content: e }) {
4177
4184
  ] }) }) : null
4178
4185
  ] });
4179
4186
  }
4180
- const Eo = ["GGT", "CRP", "GLUCOSE"], Fo = 5;
4181
- function Go({
4187
+ const Go = ["GGT", "CRP", "GLUCOSE"], Yo = 5;
4188
+ function Xo({
4182
4189
  pageHeader: e
4183
4190
  }) {
4184
4191
  return /* @__PURE__ */ l(K, { children: [
@@ -4189,7 +4196,7 @@ function Go({
4189
4196
  className: "flex gap-3 overflow-x-auto",
4190
4197
  role: "presentation",
4191
4198
  "aria-hidden": !0,
4192
- children: Array.from({ length: Fo }, (r, n) => /* @__PURE__ */ l(
4199
+ children: Array.from({ length: Yo }, (r, n) => /* @__PURE__ */ l(
4193
4200
  "div",
4194
4201
  {
4195
4202
  className: "flex min-w-[9rem] flex-1 flex-col items-center gap-3 px-5 py-4",
@@ -4238,12 +4245,12 @@ function Go({
4238
4245
  /* @__PURE__ */ t("div", { className: "border-t border-[color:var(--mb-color-card-border)]" }),
4239
4246
  /* @__PURE__ */ l("div", { className: "space-y-5", children: [
4240
4247
  /* @__PURE__ */ t(x, { className: "h-7 w-[min(100%,18rem)]" }),
4241
- /* @__PURE__ */ t("div", { className: "grid grid-cols-1 items-start gap-4 sm:grid-cols-2 xl:grid-cols-3 xl:gap-6", children: Eo.map((r) => /* @__PURE__ */ t(Be, { variant: "labResults", title: r }, r)) })
4248
+ /* @__PURE__ */ t("div", { className: "grid grid-cols-1 items-start gap-4 sm:grid-cols-2 xl:grid-cols-3 xl:gap-6", children: Go.map((r) => /* @__PURE__ */ t(Be, { variant: "labResults", title: r }, r)) })
4242
4249
  ] })
4243
4250
  ] }) })
4244
4251
  ] });
4245
4252
  }
4246
- function Fs({ content: e }) {
4253
+ function Ys({ content: e }) {
4247
4254
  if (!e) return null;
4248
4255
  const { pageHeader: r, practitionerNotes: n, cards: a } = e, o = a && a.length > 0;
4249
4256
  return /* @__PURE__ */ l("div", { className: "mx-auto w-full min-w-0 space-y-6", children: [
@@ -4252,7 +4259,7 @@ function Fs({ content: e }) {
4252
4259
  n ? /* @__PURE__ */ t(Pa, { ...n }) : null
4253
4260
  ] });
4254
4261
  }
4255
- function Yo({
4262
+ function Vo({
4256
4263
  pageHeader: e
4257
4264
  }) {
4258
4265
  return /* @__PURE__ */ l(K, { children: [
@@ -4284,7 +4291,7 @@ function Yo({
4284
4291
  ] })
4285
4292
  ] });
4286
4293
  }
4287
- function Xo(e, r) {
4294
+ function Zo(e, r) {
4288
4295
  const n = He(r.totalScore), a = n == null ? void 0 : Math.max(0, Math.min(100, n)), o = r.title.toLowerCase().replace(/(^|\s)\S/g, (i) => i.toUpperCase());
4289
4296
  return {
4290
4297
  triadHeading: `${e.heading.split(":")[0]}: ${o}`,
@@ -4296,7 +4303,7 @@ function Xo(e, r) {
4296
4303
  interpretationLabel: a != null && a >= 66 ? `Your ${o} is High` : a != null && a >= 33 ? `Your ${o} is Trending` : a != null ? `Your ${o} is Optimal` : void 0
4297
4304
  };
4298
4305
  }
4299
- function Gs({ content: e }) {
4306
+ function Xs({ content: e }) {
4300
4307
  const { pageHeader: r, triadCards: n, organContent: a, cortisolContent: o } = e, i = n ?? [], [s, c] = k(null), d = j(
4301
4308
  () => (m) => (b) => {
4302
4309
  b.organKey && a != null && a[b.organKey] && c({ triadCard: m, category: b });
@@ -4307,9 +4314,9 @@ function Gs({ content: e }) {
4307
4314
  const m = s.category.organKey, b = m ? a[m] : void 0;
4308
4315
  if (b)
4309
4316
  return /* @__PURE__ */ t(
4310
- Do,
4317
+ zo,
4311
4318
  {
4312
- patient: Xo(s.triadCard, s.category),
4319
+ patient: Zo(s.triadCard, s.category),
4313
4320
  content: b,
4314
4321
  onBack: () => c(null),
4315
4322
  cortisolContent: m === "adrenal" ? o : void 0
@@ -4328,8 +4335,8 @@ function Gs({ content: e }) {
4328
4335
  )) })
4329
4336
  ] });
4330
4337
  }
4331
- const Vo = ["ADRENAL", "THYROID", "PANCREAS"];
4332
- function Zo({
4338
+ const Wo = ["ADRENAL", "THYROID", "PANCREAS"];
4339
+ function Uo({
4333
4340
  pageHeader: e
4334
4341
  }) {
4335
4342
  return /* @__PURE__ */ l(K, { children: [
@@ -4342,7 +4349,7 @@ function Zo({
4342
4349
  ] }),
4343
4350
  /* @__PURE__ */ t(x, { className: "h-9 w-16" })
4344
4351
  ] }),
4345
- /* @__PURE__ */ t("div", { className: "grid grid-cols-1 gap-4 lg:grid-cols-2 xl:grid-cols-3", children: Vo.map((n) => /* @__PURE__ */ t(
4352
+ /* @__PURE__ */ t("div", { className: "grid grid-cols-1 gap-4 lg:grid-cols-2 xl:grid-cols-3", children: Wo.map((n) => /* @__PURE__ */ t(
4346
4353
  Be,
4347
4354
  {
4348
4355
  variant: "triadResiliency",
@@ -4353,13 +4360,13 @@ function Zo({
4353
4360
  ] }, r)) })
4354
4361
  ] });
4355
4362
  }
4356
- const Wo = ["Normal Range", "Current Range", ""], Vt = ["high", "trending", "optimal", "low"], Uo = {
4363
+ const Qo = ["Normal Range", "Current Range", ""], Vt = ["high", "trending", "optimal", "low"], Ko = {
4357
4364
  high: "High",
4358
4365
  trending: "Trending",
4359
4366
  optimal: "Optimal",
4360
4367
  low: "Low"
4361
4368
  };
4362
- function Qo(e) {
4369
+ function qo(e) {
4363
4370
  const r = /* @__PURE__ */ new Map();
4364
4371
  for (const n of Vt)
4365
4372
  r.set(n, []);
@@ -4373,12 +4380,12 @@ function Qo(e) {
4373
4380
  }
4374
4381
  return Vt.map((n) => ({
4375
4382
  status: n,
4376
- title: Uo[n],
4383
+ title: Ko[n],
4377
4384
  rows: r.get(n) ?? []
4378
4385
  })).filter((n) => n.rows.length > 0);
4379
4386
  }
4380
- function Ys({ content: e }) {
4381
- const { pageHeader: r, indicators: n } = e, o = Qo(n ?? []);
4387
+ function Vs({ content: e }) {
4388
+ const { pageHeader: r, indicators: n } = e, o = qo(n ?? []);
4382
4389
  return /* @__PURE__ */ l("div", { className: "mx-auto w-full min-w-0 space-y-6", children: [
4383
4390
  /* @__PURE__ */ t(D, { title: r.title, subtitle: r.subtitle }),
4384
4391
  /* @__PURE__ */ t("div", { className: "flex min-w-0 flex-col gap-6", children: o.map(({ status: i, title: s, rows: c }) => /* @__PURE__ */ l(L, { className: "min-w-0", children: [
@@ -4387,7 +4394,7 @@ function Ys({ content: e }) {
4387
4394
  le,
4388
4395
  {
4389
4396
  row: d,
4390
- metricLabels: Wo,
4397
+ metricLabels: Qo,
4391
4398
  metricSlots: 2
4392
4399
  },
4393
4400
  d.name
@@ -4395,12 +4402,12 @@ function Ys({ content: e }) {
4395
4402
  ] }, i)) })
4396
4403
  ] });
4397
4404
  }
4398
- const Ko = [
4405
+ const Jo = [
4399
4406
  { title: "High", rowCount: 2 },
4400
4407
  { title: "Trending", rowCount: 3 },
4401
4408
  { title: "Optimal", rowCount: 3 }
4402
4409
  ];
4403
- function qo() {
4410
+ function _o() {
4404
4411
  return /* @__PURE__ */ l("div", { className: "flex min-h-[4.5rem] min-w-0 flex-col overflow-hidden rounded-[length:var(--mb-radius-button)] border border-solid border-[color:var(--mb-color-card-border)] bg-[color:var(--mb-color-card-bg)] xl:flex-row xl:items-stretch", children: [
4405
4412
  /* @__PURE__ */ l("div", { className: "flex min-w-0 items-center gap-2 px-3 py-2 xl:w-[10rem] xl:shrink-0", children: [
4406
4413
  /* @__PURE__ */ t(x, { className: "size-8 shrink-0 rounded-md" }),
@@ -4413,25 +4420,25 @@ function qo() {
4413
4420
  /* @__PURE__ */ t("div", { className: "flex min-h-[3rem] border-t border-[color:var(--mb-color-card-border)] xl:w-[7rem] xl:shrink-0 xl:border-l xl:border-t-0", children: /* @__PURE__ */ t(x, { className: "m-auto h-9 w-[5.5rem] rounded-md" }) })
4414
4421
  ] });
4415
4422
  }
4416
- function Jo({
4423
+ function $o({
4417
4424
  pageHeader: e
4418
4425
  }) {
4419
4426
  return /* @__PURE__ */ l(K, { children: [
4420
4427
  /* @__PURE__ */ t(D, { title: e.title, subtitle: e.subtitle }),
4421
- /* @__PURE__ */ t("div", { className: "flex min-w-0 flex-col gap-6", children: Ko.map(({ title: r, rowCount: n }) => /* @__PURE__ */ l(L, { className: "min-w-0", children: [
4428
+ /* @__PURE__ */ t("div", { className: "flex min-w-0 flex-col gap-6", children: Jo.map(({ title: r, rowCount: n }) => /* @__PURE__ */ l(L, { className: "min-w-0", children: [
4422
4429
  /* @__PURE__ */ t(x, { className: "mb-4 h-6 w-28 rounded-md" }),
4423
- /* @__PURE__ */ t("div", { className: "space-y-2", children: Array.from({ length: n }, (a, o) => /* @__PURE__ */ t(qo, {}, `${r}-${o}`)) })
4430
+ /* @__PURE__ */ t("div", { className: "space-y-2", children: Array.from({ length: n }, (a, o) => /* @__PURE__ */ t(_o, {}, `${r}-${o}`)) })
4424
4431
  ] }, r)) })
4425
4432
  ] });
4426
4433
  }
4427
4434
  const Nr = "mb_config", Cr = "metabolic:set-config";
4428
- function _o(e) {
4435
+ function el(e) {
4429
4436
  let r = "";
4430
4437
  for (const a of e)
4431
4438
  r += String.fromCharCode(a);
4432
4439
  return btoa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
4433
4440
  }
4434
- function $o(e) {
4441
+ function tl(e) {
4435
4442
  try {
4436
4443
  const r = e.replace(/-/g, "+").replace(/_/g, "/"), n = r.length % 4, a = n ? r + "=".repeat(4 - n) : r, o = atob(a), i = new Uint8Array(o.length);
4437
4444
  for (let s = 0; s < o.length; s++)
@@ -4441,14 +4448,14 @@ function $o(e) {
4441
4448
  return null;
4442
4449
  }
4443
4450
  }
4444
- function el(e) {
4451
+ function rl(e) {
4445
4452
  const r = JSON.stringify(e);
4446
- return _o(new TextEncoder().encode(r));
4453
+ return el(new TextEncoder().encode(r));
4447
4454
  }
4448
- function tl(e) {
4455
+ function nl(e) {
4449
4456
  const r = e.trim();
4450
4457
  if (!r) return null;
4451
- const n = $o(r);
4458
+ const n = tl(r);
4452
4459
  if (!n) return null;
4453
4460
  try {
4454
4461
  const a = new TextDecoder().decode(n), o = JSON.parse(a);
@@ -4457,16 +4464,16 @@ function tl(e) {
4457
4464
  return null;
4458
4465
  }
4459
4466
  }
4460
- function rl(e) {
4467
+ function al(e) {
4461
4468
  const r = e.get(Nr) ?? e.get("config");
4462
4469
  if (r)
4463
- return tl(r) ?? void 0;
4470
+ return nl(r) ?? void 0;
4464
4471
  }
4465
- function Xs(e, r) {
4466
- const n = encodeURIComponent(el(r)), a = e.includes("?") ? "&" : "?";
4472
+ function Zs(e, r) {
4473
+ const n = encodeURIComponent(rl(r)), a = e.includes("?") ? "&" : "?";
4467
4474
  return `${e}${a}${Nr}=${n}`;
4468
4475
  }
4469
- const nl = ["patientId", "patient_id"], al = [
4476
+ const ol = ["patientId", "patient_id"], ll = [
4470
4477
  "patientFullName",
4471
4478
  "patient_full_name",
4472
4479
  "fullName"
@@ -4478,13 +4485,13 @@ function Zt(e, r) {
4478
4485
  if (o) return o;
4479
4486
  }
4480
4487
  }
4481
- function ol(e) {
4488
+ function il(e) {
4482
4489
  return {
4483
- patientId: Zt(e, nl),
4484
- patientFullName: Zt(e, al)
4490
+ patientId: Zt(e, ol),
4491
+ patientFullName: Zt(e, ll)
4485
4492
  };
4486
4493
  }
4487
- function Vs(e, r) {
4494
+ function Ws(e, r) {
4488
4495
  const n = new URLSearchParams();
4489
4496
  r.patientId && n.set("patientId", r.patientId), r.patientFullName && n.set("patientFullName", r.patientFullName);
4490
4497
  const a = n.toString();
@@ -4492,13 +4499,13 @@ function Vs(e, r) {
4492
4499
  const o = e.includes("?") ? "&" : "?";
4493
4500
  return `${e}${o}${a}`;
4494
4501
  }
4495
- function Zs() {
4502
+ function Us() {
4496
4503
  window.dispatchEvent(new CustomEvent("metabolic:logout")), window.parent !== window && window.parent.postMessage({ type: "metabolic:logout" }, "*");
4497
4504
  }
4498
- function ll(e, r) {
4505
+ function sl(e, r) {
4499
4506
  return r.length === 0 ? !1 : r.some((n) => n === e);
4500
4507
  }
4501
- function Ws(e, r, n) {
4508
+ function Qs(e, r, n) {
4502
4509
  var a;
4503
4510
  (a = e.contentWindow) == null || a.postMessage(
4504
4511
  {
@@ -4528,7 +4535,7 @@ function bt() {
4528
4535
  }
4529
4536
  );
4530
4537
  }
4531
- function il() {
4538
+ function cl() {
4532
4539
  return /* @__PURE__ */ l(
4533
4540
  "svg",
4534
4541
  {
@@ -4549,7 +4556,7 @@ function il() {
4549
4556
  }
4550
4557
  );
4551
4558
  }
4552
- function sl() {
4559
+ function dl() {
4553
4560
  return /* @__PURE__ */ l(
4554
4561
  "svg",
4555
4562
  {
@@ -4568,7 +4575,7 @@ function sl() {
4568
4575
  }
4569
4576
  );
4570
4577
  }
4571
- function cl() {
4578
+ function ml() {
4572
4579
  return /* @__PURE__ */ l(
4573
4580
  "svg",
4574
4581
  {
@@ -4593,7 +4600,7 @@ function cl() {
4593
4600
  }
4594
4601
  );
4595
4602
  }
4596
- function Us() {
4603
+ function Ks() {
4597
4604
  return /* @__PURE__ */ l(
4598
4605
  "svg",
4599
4606
  {
@@ -4617,7 +4624,7 @@ function Us() {
4617
4624
  }
4618
4625
  );
4619
4626
  }
4620
- function dl() {
4627
+ function ul() {
4621
4628
  return /* @__PURE__ */ l(
4622
4629
  "svg",
4623
4630
  {
@@ -4642,7 +4649,7 @@ function dl() {
4642
4649
  }
4643
4650
  );
4644
4651
  }
4645
- function ml() {
4652
+ function bl() {
4646
4653
  return /* @__PURE__ */ l(
4647
4654
  "svg",
4648
4655
  {
@@ -4667,7 +4674,7 @@ function ml() {
4667
4674
  }
4668
4675
  );
4669
4676
  }
4670
- function ul() {
4677
+ function hl() {
4671
4678
  return /* @__PURE__ */ t(
4672
4679
  "svg",
4673
4680
  {
@@ -4683,7 +4690,7 @@ function ul() {
4683
4690
  }
4684
4691
  );
4685
4692
  }
4686
- function bl() {
4693
+ function fl() {
4687
4694
  return /* @__PURE__ */ l(
4688
4695
  "svg",
4689
4696
  {
@@ -4708,7 +4715,7 @@ function bl() {
4708
4715
  }
4709
4716
  );
4710
4717
  }
4711
- function hl() {
4718
+ function gl() {
4712
4719
  return /* @__PURE__ */ l(
4713
4720
  "svg",
4714
4721
  {
@@ -4733,8 +4740,8 @@ function hl() {
4733
4740
  }
4734
4741
  );
4735
4742
  }
4736
- const fl = "w-16 min-w-16 lg:min-w-0 lg:w-[var(--mb-sidebar-width,290px)]";
4737
- function gl({
4743
+ const pl = "w-16 min-w-16 lg:min-w-0 lg:w-[var(--mb-sidebar-width,290px)]";
4744
+ function xl({
4738
4745
  sidebar: e,
4739
4746
  children: r,
4740
4747
  sidebarWidthClassName: n,
@@ -4742,7 +4749,7 @@ function gl({
4742
4749
  }) {
4743
4750
  const o = [
4744
4751
  "flex h-full min-h-0 shrink-0 flex-col overflow-hidden border-r border-[color:var(--mb-color-sidebar-border)] bg-[color:var(--mb-color-sidebar-bg)]",
4745
- n ?? fl
4752
+ n ?? pl
4746
4753
  ].filter(Boolean).join(" ");
4747
4754
  return /* @__PURE__ */ l(
4748
4755
  "div",
@@ -4758,12 +4765,12 @@ function gl({
4758
4765
  }
4759
4766
  );
4760
4767
  }
4761
- function pl(e, r) {
4768
+ function vl(e, r) {
4762
4769
  const n = e.replace(/\/$/, ""), a = r.startsWith("/") ? r : `/${r}`;
4763
4770
  return `${n}${a}`;
4764
4771
  }
4765
- function xl(e, r, n) {
4766
- const a = `/api/v1/pages/${encodeURIComponent(r)}`, o = pl(e || "", a);
4772
+ function wl(e, r, n) {
4773
+ const a = `/api/v1/pages/${encodeURIComponent(r)}`, o = vl(e || "", a);
4767
4774
  if (!n) return o;
4768
4775
  const i = o.includes("?") ? "&" : "?";
4769
4776
  return `${o}${i}report_id=${encodeURIComponent(n)}`;
@@ -4778,7 +4785,7 @@ async function U(e, r) {
4778
4785
  headers: o,
4779
4786
  fetchImpl: i = globalThis.fetch.bind(globalThis),
4780
4787
  signal: s
4781
- } = r, c = xl(n, e, a);
4788
+ } = r, c = wl(n, e, a);
4782
4789
  let d;
4783
4790
  try {
4784
4791
  d = await i(c, { method: "GET", headers: o, signal: s });
@@ -4813,42 +4820,42 @@ async function U(e, r) {
4813
4820
  );
4814
4821
  return b;
4815
4822
  }
4816
- const Ar = "Your metabolic overview brings together triad priorities, key metrics, and next steps in one place.", Lr = "Trends and predictive signals help you see how your metabolic trajectory may evolve over time.", Tr = "Your Metabolic Code Vitality Index is the total value of how optimized your body chemistry is performing. Your metabolism is more than just how many calories you burn – it’s the sum total of all the biochemical reactions in all your organ systems that drive your mental and physical vigor.", Pr = "Your answers are synthesized into themes and insights that inform your personalized recommendations.", Sr = "Your personalized supplement timing helps you align intake with your metabolic rhythm and triad priorities.", Mr = "Review your laboratory values with reference context and ordering details.", kr = "Discover products selected to support your metabolic goals and triad priorities.", Hr = "Deeper interpretation connects your lab patterns to your overall metabolic picture.", jr = "Focus on labs that are out of range or flagged so you can address them with your care team.", vl = () => import("./dashboard-x4GA8cqi.js"), wl = () => import("./totalPredictiveIndex-DQdWbzgU.js"), yl = () => import("./wellnessIndicators-CNQcbuvH.js"), Nl = () => import("./questionnaireAnalysis-S3k2ZioO.js"), Cl = () => import("./supplementSchedule-D8PmXo88.js"), Al = () => import("./labResults-CV9K31Os.js"), Ll = () => import("./suggestedProducts-DJlYkHhQ.js"), Tl = () => import("./labAnalysis-CaOCpV2g.js"), Pl = () => import("./alertLabSummary-BAIlZ2_U.js"), Sl = Q(
4817
- () => vl().then((e) => ({ default: e.DashboardTab }))
4818
- ), Ml = Q(
4819
- () => wl().then((e) => ({ default: e.TotalPredictiveIndexTab }))
4820
- ), kl = Q(
4821
- () => yl().then((e) => ({ default: e.WellnessIndicatorsTab }))
4823
+ const Ar = "Your metabolic overview brings together triad priorities, key metrics, and next steps in one place.", Lr = "Trends and predictive signals help you see how your metabolic trajectory may evolve over time.", Tr = "Your Metabolic Code Vitality Index is the total value of how optimized your body chemistry is performing. Your metabolism is more than just how many calories you burn – it’s the sum total of all the biochemical reactions in all your organ systems that drive your mental and physical vigor.", Pr = "Your answers are synthesized into themes and insights that inform your personalized recommendations.", Sr = "Your personalized supplement timing helps you align intake with your metabolic rhythm and triad priorities.", Mr = "Review your laboratory values with reference context and ordering details.", kr = "Discover products selected to support your metabolic goals and triad priorities.", Hr = "Deeper interpretation connects your lab patterns to your overall metabolic picture.", jr = "Focus on labs that are out of range or flagged so you can address them with your care team.", yl = () => import("./dashboard-x4GA8cqi.js"), Nl = () => import("./totalPredictiveIndex-DQdWbzgU.js"), Cl = () => import("./wellnessIndicators-CNQcbuvH.js"), Al = () => import("./questionnaireAnalysis-S3k2ZioO.js"), Ll = () => import("./supplementSchedule-D8PmXo88.js"), Tl = () => import("./labResults-CV9K31Os.js"), Pl = () => import("./suggestedProducts-DJlYkHhQ.js"), Sl = () => import("./labAnalysis-CaOCpV2g.js"), Ml = () => import("./alertLabSummary-BAIlZ2_U.js"), kl = Q(
4824
+ () => yl().then((e) => ({ default: e.DashboardTab }))
4822
4825
  ), Hl = Q(
4823
- () => Nl().then((e) => ({
4824
- default: e.QuestionnaireAnalysisTab
4825
- }))
4826
+ () => Nl().then((e) => ({ default: e.TotalPredictiveIndexTab }))
4826
4827
  ), jl = Q(
4827
- () => Cl().then((e) => ({ default: e.SupplementScheduleTab }))
4828
+ () => Cl().then((e) => ({ default: e.WellnessIndicatorsTab }))
4828
4829
  ), Bl = Q(
4829
- () => Al().then((e) => ({ default: e.LabResultsTab }))
4830
+ () => Al().then((e) => ({
4831
+ default: e.QuestionnaireAnalysisTab
4832
+ }))
4830
4833
  ), Il = Q(
4831
- () => Ll().then((e) => ({ default: e.SuggestedProductsTab }))
4834
+ () => Ll().then((e) => ({ default: e.SupplementScheduleTab }))
4832
4835
  ), Dl = Q(
4833
- () => Tl().then((e) => ({ default: e.LabAnalysisTab }))
4836
+ () => Tl().then((e) => ({ default: e.LabResultsTab }))
4834
4837
  ), Rl = Q(
4835
- () => Pl().then((e) => ({ default: e.AlertLabSummaryTab }))
4838
+ () => Pl().then((e) => ({ default: e.SuggestedProductsTab }))
4839
+ ), zl = Q(
4840
+ () => Sl().then((e) => ({ default: e.LabAnalysisTab }))
4841
+ ), Ol = Q(
4842
+ () => Ml().then((e) => ({ default: e.AlertLabSummaryTab }))
4836
4843
  );
4837
4844
  const De = [
4838
4845
  {
4839
4846
  id: "dashboard",
4840
4847
  sideMenuLabel: "Dashboard",
4841
- icon: /* @__PURE__ */ t(il, {}),
4848
+ icon: /* @__PURE__ */ t(cl, {}),
4842
4849
  pageHeader: {
4843
4850
  title: "Dashboard",
4844
4851
  subtitle: Ar
4845
4852
  },
4846
- Tab: Sl,
4847
- Skeleton: so,
4853
+ Tab: kl,
4854
+ Skeleton: co,
4848
4855
  createHttpFetcher: (e, r) => (n) => e(n, async () => {
4849
4856
  const [a, { mapDashboardPageDtoToTabContent: o }] = await Promise.all([
4850
4857
  U("dashboard", r(n)),
4851
- Promise.resolve().then(() => hi)
4858
+ Promise.resolve().then(() => gi)
4852
4859
  ]);
4853
4860
  return o(a);
4854
4861
  })
@@ -4856,17 +4863,17 @@ const De = [
4856
4863
  {
4857
4864
  id: "total-predictive-index",
4858
4865
  sideMenuLabel: "Total Predictive Trends",
4859
- icon: /* @__PURE__ */ t(dl, {}),
4866
+ icon: /* @__PURE__ */ t(ul, {}),
4860
4867
  pageHeader: {
4861
4868
  title: "Total Predictive Trends",
4862
4869
  subtitle: Lr
4863
4870
  },
4864
- Tab: Ml,
4865
- Skeleton: Zo,
4871
+ Tab: Hl,
4872
+ Skeleton: Uo,
4866
4873
  createHttpFetcher: (e, r) => (n) => e(n, async () => {
4867
4874
  const [a, { mapTotalPredictiveIndexDtoToTabContent: o }] = await Promise.all([
4868
4875
  U("total-predictive-index", r(n)),
4869
- Promise.resolve().then(() => Ti)
4876
+ Promise.resolve().then(() => Si)
4870
4877
  ]);
4871
4878
  return o(a);
4872
4879
  })
@@ -4874,17 +4881,17 @@ const De = [
4874
4881
  {
4875
4882
  id: "wellness-indicators",
4876
4883
  sideMenuLabel: "Wellness Indicators",
4877
- icon: /* @__PURE__ */ t(hl, {}),
4884
+ icon: /* @__PURE__ */ t(gl, {}),
4878
4885
  pageHeader: {
4879
4886
  title: "Wellness Indicators",
4880
4887
  subtitle: Tr
4881
4888
  },
4882
- Tab: kl,
4883
- Skeleton: Jo,
4889
+ Tab: jl,
4890
+ Skeleton: $o,
4884
4891
  createHttpFetcher: (e, r) => (n) => e(n, async () => {
4885
4892
  const [a, { mapWellnessIndicatorsDtoToTabContent: o }] = await Promise.all([
4886
4893
  U("wellness-indicators", r(n)),
4887
- Promise.resolve().then(() => ki)
4894
+ Promise.resolve().then(() => ji)
4888
4895
  ]);
4889
4896
  return o(a);
4890
4897
  })
@@ -4892,17 +4899,17 @@ const De = [
4892
4899
  {
4893
4900
  id: "lab-results",
4894
4901
  sideMenuLabel: "Lab Results",
4895
- icon: /* @__PURE__ */ t(cl, {}),
4902
+ icon: /* @__PURE__ */ t(ml, {}),
4896
4903
  pageHeader: {
4897
4904
  title: "Lab Results",
4898
4905
  subtitle: Mr
4899
4906
  },
4900
- Tab: Bl,
4901
- Skeleton: xo,
4907
+ Tab: Dl,
4908
+ Skeleton: wo,
4902
4909
  createHttpFetcher: (e, r) => (n) => e(n, async () => {
4903
4910
  const [a, { mapLabResultsDtoToTabContent: o }] = await Promise.all([
4904
4911
  U("lab-results", r(n)),
4905
- Promise.resolve().then(() => vi)
4912
+ Promise.resolve().then(() => yi)
4906
4913
  ]);
4907
4914
  return o(a);
4908
4915
  })
@@ -4910,17 +4917,17 @@ const De = [
4910
4917
  {
4911
4918
  id: "lab-analysis",
4912
4919
  sideMenuLabel: "Lab Analysis",
4913
- icon: /* @__PURE__ */ t(sl, {}),
4920
+ icon: /* @__PURE__ */ t(dl, {}),
4914
4921
  pageHeader: {
4915
4922
  title: "Lab Analysis",
4916
4923
  subtitle: Hr
4917
4924
  },
4918
- Tab: Dl,
4919
- Skeleton: co,
4925
+ Tab: zl,
4926
+ Skeleton: mo,
4920
4927
  createHttpFetcher: (e, r) => (n) => e(n, async () => {
4921
4928
  const [a, { mapLabAnalysisDtoToTabContent: o }] = await Promise.all([
4922
4929
  U("lab-analysis", r(n)),
4923
- Promise.resolve().then(() => fi)
4930
+ Promise.resolve().then(() => pi)
4924
4931
  ]);
4925
4932
  return o(a);
4926
4933
  })
@@ -4933,12 +4940,12 @@ const De = [
4933
4940
  title: "Lab Alerts Summary",
4934
4941
  subtitle: jr
4935
4942
  },
4936
- Tab: Rl,
4937
- Skeleton: Qa,
4943
+ Tab: Ol,
4944
+ Skeleton: Ka,
4938
4945
  createHttpFetcher: (e, r) => (n) => e(n, async () => {
4939
4946
  const [a, { mapAlertLabSummaryDtoToTabContent: o }] = await Promise.all([
4940
4947
  U("alert-lab-summary", r(n)),
4941
- Promise.resolve().then(() => ri)
4948
+ Promise.resolve().then(() => ai)
4942
4949
  ]);
4943
4950
  return o(a);
4944
4951
  })
@@ -4946,17 +4953,17 @@ const De = [
4946
4953
  {
4947
4954
  id: "questionnaire-analysis",
4948
4955
  sideMenuLabel: "Questionnaire Analysis",
4949
- icon: /* @__PURE__ */ t(ml, {}),
4956
+ icon: /* @__PURE__ */ t(bl, {}),
4950
4957
  pageHeader: {
4951
4958
  title: "Questionnaire Analysis",
4952
4959
  subtitle: Pr
4953
4960
  },
4954
- Tab: Hl,
4955
- Skeleton: zo,
4961
+ Tab: Bl,
4962
+ Skeleton: Eo,
4956
4963
  createHttpFetcher: (e, r) => (n) => e(n, async () => {
4957
4964
  const [a, { mapQuestionnaireAnalysisDtoToTabContent: o }] = await Promise.all([
4958
4965
  U("questionnaire-analysis", r(n)),
4959
- Promise.resolve().then(() => wi)
4966
+ Promise.resolve().then(() => Ni)
4960
4967
  ]);
4961
4968
  return o(a);
4962
4969
  })
@@ -4964,17 +4971,17 @@ const De = [
4964
4971
  {
4965
4972
  id: "suggested-products",
4966
4973
  sideMenuLabel: "Suggested Products",
4967
- icon: /* @__PURE__ */ t(ul, {}),
4974
+ icon: /* @__PURE__ */ t(hl, {}),
4968
4975
  pageHeader: {
4969
4976
  title: "Suggested Products",
4970
4977
  subtitle: kr
4971
4978
  },
4972
- Tab: Il,
4973
- Skeleton: Go,
4979
+ Tab: Rl,
4980
+ Skeleton: Xo,
4974
4981
  createHttpFetcher: (e, r) => (n) => e(n, async () => {
4975
4982
  const [a, { mapSuggestedProductsDtoToTabContent: o }] = await Promise.all([
4976
4983
  U("suggested-products", r(n)),
4977
- Promise.resolve().then(() => Ni)
4984
+ Promise.resolve().then(() => Ai)
4978
4985
  ]);
4979
4986
  return o(a);
4980
4987
  })
@@ -4982,28 +4989,28 @@ const De = [
4982
4989
  {
4983
4990
  id: "supplement-schedule",
4984
4991
  sideMenuLabel: "Supplement Schedule",
4985
- icon: /* @__PURE__ */ t(bl, {}),
4992
+ icon: /* @__PURE__ */ t(fl, {}),
4986
4993
  pageHeader: {
4987
4994
  title: "Supplement Schedule",
4988
4995
  subtitle: Sr
4989
4996
  },
4990
- Tab: jl,
4991
- Skeleton: Yo,
4997
+ Tab: Il,
4998
+ Skeleton: Vo,
4992
4999
  createHttpFetcher: (e, r) => (n) => e(n, async () => {
4993
5000
  const [a, { mapSupplementScheduleDtoToTabContent: o }] = await Promise.all([
4994
5001
  U("supplement-schedule", r(n)),
4995
- Promise.resolve().then(() => Ci)
5002
+ Promise.resolve().then(() => Li)
4996
5003
  ]);
4997
5004
  return o(a);
4998
5005
  })
4999
5006
  }
5000
- ], zl = "Supplement schedule is currently unavailable.", Te = De.map((e) => ({
5007
+ ], El = "Supplement schedule is currently unavailable.", Te = De.map((e) => ({
5001
5008
  id: e.id,
5002
5009
  label: e.sideMenuLabel,
5003
5010
  icon: e.icon,
5004
5011
  ...e.id === "supplement-schedule" ? {
5005
5012
  disabled: !0,
5006
- disabledTooltip: zl
5013
+ disabledTooltip: El
5007
5014
  } : {}
5008
5015
  })), ht = Object.fromEntries(
5009
5016
  De.map((e) => [
@@ -5011,14 +5018,14 @@ const De = [
5011
5018
  { Tab: e.Tab, Skeleton: e.Skeleton, pageHeader: e.pageHeader }
5012
5019
  ])
5013
5020
  );
5014
- function Ol(e) {
5021
+ function Fl(e) {
5015
5022
  return ht[e].pageHeader;
5016
5023
  }
5017
- function El(e, r) {
5024
+ function Gl(e, r) {
5018
5025
  const n = De.map((a) => [a.id, a.createHttpFetcher(e, r)]);
5019
5026
  return Object.fromEntries(n);
5020
5027
  }
5021
- function Fl({
5028
+ function Yl({
5022
5029
  label: e,
5023
5030
  icon: r,
5024
5031
  isActive: n = !1,
@@ -5079,7 +5086,7 @@ function Fl({
5079
5086
  )
5080
5087
  ] }) : v;
5081
5088
  }
5082
- function Gl({
5089
+ function Xl({
5083
5090
  title: e,
5084
5091
  logo: r,
5085
5092
  footerContent: n,
@@ -5123,7 +5130,7 @@ function Gl({
5123
5130
  children: i.map((C) => {
5124
5131
  const N = C.disabled === !0;
5125
5132
  return /* @__PURE__ */ t(
5126
- Fl,
5133
+ Yl,
5127
5134
  {
5128
5135
  label: C.label,
5129
5136
  icon: C.icon,
@@ -5149,14 +5156,14 @@ function Br(e) {
5149
5156
  const r = e.displayName;
5150
5157
  return typeof r != "string" || r.trim() === "";
5151
5158
  }
5152
- function Yl(e) {
5159
+ function Vl(e) {
5153
5160
  var n;
5154
5161
  const r = (e ?? "").trim();
5155
5162
  return r ? ((n = r[0]) == null ? void 0 : n.toUpperCase()) ?? "?" : "?";
5156
5163
  }
5157
- function Qs({ userProfile: e }) {
5164
+ function qs({ userProfile: e }) {
5158
5165
  return !e || Br(e) ? null : /* @__PURE__ */ t("div", { className: "mt-2 flex shrink-0 flex-col gap-2 border-t border-[color:var(--mb-color-sidebar-border)] pt-2 lg:mt-4 lg:pt-4", children: /* @__PURE__ */ l("div", { className: "flex w-full min-w-0 flex-col items-center gap-2 lg:flex-row lg:items-center lg:gap-3 lg:justify-start", children: [
5159
- /* @__PURE__ */ t("div", { className: "relative size-10 shrink-0 overflow-hidden rounded-[20px] bg-[color:var(--mb-color-nav-hover)]", children: e.avatarSrc ? /* @__PURE__ */ t("img", { src: e.avatarSrc, alt: "", className: "size-full object-cover" }) : /* @__PURE__ */ t("span", { className: "flex size-full items-center justify-center text-sm font-medium text-[color:var(--mb-color-text)]", children: Yl(e.displayName) }) }),
5166
+ /* @__PURE__ */ t("div", { className: "relative size-10 shrink-0 overflow-hidden rounded-[20px] bg-[color:var(--mb-color-nav-hover)]", children: e.avatarSrc ? /* @__PURE__ */ t("img", { src: e.avatarSrc, alt: "", className: "size-full object-cover" }) : /* @__PURE__ */ t("span", { className: "flex size-full items-center justify-center text-sm font-medium text-[color:var(--mb-color-text)]", children: Vl(e.displayName) }) }),
5160
5167
  /* @__PURE__ */ l("div", { className: "flex min-w-0 max-w-full flex-col items-center gap-0.5 text-center lg:items-start lg:text-left", children: [
5161
5168
  /* @__PURE__ */ t(
5162
5169
  "p",
@@ -5187,7 +5194,7 @@ function Re({
5187
5194
  const o = new Headers(a ?? void 0);
5188
5195
  return e && o.set("X-Api-Key", e), r && o.set("X-User-Id", r), n && (o.set("X-Questionnaire-Response-Id", n), o.set("X-Appointment-Id", n)), o;
5189
5196
  }
5190
- function Xl(e, r) {
5197
+ function Zl(e, r) {
5191
5198
  return new Promise((n, a) => {
5192
5199
  if (r.aborted) {
5193
5200
  a(new DOMException("Aborted", "AbortError"));
@@ -5201,10 +5208,10 @@ function Xl(e, r) {
5201
5208
  r.addEventListener("abort", o, { once: !0 });
5202
5209
  });
5203
5210
  }
5204
- async function Vl(e, r, n) {
5205
- return e != null && e > 0 && await Xl(e, r), n();
5211
+ async function Wl(e, r, n) {
5212
+ return e != null && e > 0 && await Zl(e, r), n();
5206
5213
  }
5207
- function Zl(e) {
5214
+ function Ul(e) {
5208
5215
  const {
5209
5216
  reportId: r,
5210
5217
  headers: n,
@@ -5221,7 +5228,7 @@ function Zl(e) {
5221
5228
  questionnaireResponseId: i,
5222
5229
  headers: n
5223
5230
  });
5224
- return El((h, f) => Vl(c, h, async () => {
5231
+ return Gl((h, f) => Wl(c, h, async () => {
5225
5232
  if (d)
5226
5233
  throw new Error(m);
5227
5234
  return f();
@@ -5233,27 +5240,27 @@ function Zl(e) {
5233
5240
  signal: h
5234
5241
  }));
5235
5242
  }
5236
- function Wl(e, r) {
5243
+ function Ql(e, r) {
5237
5244
  const n = e.replace(/\/$/, ""), a = r.startsWith("/") ? r : `/${r}`;
5238
5245
  return `${n}${a}`;
5239
5246
  }
5240
- function Ul(e, r) {
5241
- const n = Wl(e || "", "/api/v1/report/download");
5247
+ function Kl(e, r) {
5248
+ const n = Ql(e || "", "/api/v1/report/download");
5242
5249
  if (!r) return n;
5243
5250
  const a = n.includes("?") ? "&" : "?";
5244
5251
  return `${n}${a}report_id=${encodeURIComponent(r)}`;
5245
5252
  }
5246
- function Ql(e, r) {
5253
+ function ql(e, r) {
5247
5254
  const n = e.headers.get("Content-Disposition");
5248
5255
  if (!n) return r;
5249
5256
  const a = /filename\*?=(?:UTF-8'')?"?([^";]+)"?/i.exec(n);
5250
5257
  return a != null && a[1] ? decodeURIComponent(a[1]) : r;
5251
5258
  }
5252
- function Kl(e, r) {
5259
+ function Jl(e, r) {
5253
5260
  const n = URL.createObjectURL(e), a = document.createElement("a");
5254
5261
  a.href = n, a.download = r, a.rel = "noopener", document.body.appendChild(a), a.click(), a.remove(), setTimeout(() => URL.revokeObjectURL(n), 1e3);
5255
5262
  }
5256
- function ql(e) {
5263
+ function _l(e) {
5257
5264
  const {
5258
5265
  apiKey: r,
5259
5266
  userId: n,
@@ -5263,7 +5270,7 @@ function ql(e) {
5263
5270
  fetchImpl: s
5264
5271
  } = e, c = fe();
5265
5272
  return async (d) => {
5266
- const m = s ?? globalThis.fetch.bind(globalThis), b = (d == null ? void 0 : d.reportId) ?? a, g = Ul(c, b), v = Re({
5273
+ const m = s ?? globalThis.fetch.bind(globalThis), b = (d == null ? void 0 : d.reportId) ?? a, g = Kl(c, b), v = Re({
5267
5274
  apiKey: r,
5268
5275
  userId: n,
5269
5276
  questionnaireResponseId: o,
@@ -5275,22 +5282,22 @@ function ql(e) {
5275
5282
  });
5276
5283
  if (!u.ok)
5277
5284
  throw new Error(`Failed to download report PDF (HTTP ${u.status})`);
5278
- const h = await u.blob(), f = Ql(u, b ? `report-${b}.pdf` : "report.pdf");
5279
- Kl(h, f);
5285
+ const h = await u.blob(), f = ql(u, b ? `report-${b}.pdf` : "report.pdf");
5286
+ Jl(h, f);
5280
5287
  };
5281
5288
  }
5282
- function Jl(e, r) {
5289
+ function $l(e, r) {
5283
5290
  const n = e.replace(/\/$/, ""), a = r.startsWith("/") ? r : `/${r}`;
5284
5291
  return `${n}${a}`;
5285
5292
  }
5286
- function _l(e, r) {
5287
- const n = Jl(e || "", "/api/v1/report/exists");
5293
+ function ei(e, r) {
5294
+ const n = $l(e || "", "/api/v1/report/exists");
5288
5295
  return r ? `${n}?report_id=${encodeURIComponent(r)}` : n;
5289
5296
  }
5290
- function $l(e) {
5297
+ function ti(e) {
5291
5298
  return e instanceof DOMException && e.name === "AbortError";
5292
5299
  }
5293
- async function Ks(e) {
5300
+ async function Js(e) {
5294
5301
  const {
5295
5302
  reportId: r,
5296
5303
  headers: n,
@@ -5299,7 +5306,7 @@ async function Ks(e) {
5299
5306
  questionnaireResponseId: i,
5300
5307
  fetchImpl: s = globalThis.fetch.bind(globalThis),
5301
5308
  signal: c
5302
- } = e, d = fe(), m = _l(d, r), b = Re({
5309
+ } = e, d = fe(), m = ei(d, r), b = Re({
5303
5310
  apiKey: a,
5304
5311
  userId: o,
5305
5312
  questionnaireResponseId: i,
@@ -5309,7 +5316,7 @@ async function Ks(e) {
5309
5316
  try {
5310
5317
  g = await s(m, { method: "GET", headers: b, signal: c });
5311
5318
  } catch (h) {
5312
- throw $l(h) ? h : new Error(
5319
+ throw ti(h) ? h : new Error(
5313
5320
  `Network error checking report availability: ${h instanceof Error ? h.message : String(h)}`,
5314
5321
  { cause: h }
5315
5322
  );
@@ -5360,7 +5367,7 @@ const Ut = {
5360
5367
  function Ir(e) {
5361
5368
  return Ut[e] ?? Ut[1];
5362
5369
  }
5363
- const ei = [
5370
+ const ri = [
5364
5371
  ["morning", "Morning (AM)"],
5365
5372
  ["noon", "Noon"],
5366
5373
  ["afternoon", "Afternoon"],
@@ -5387,7 +5394,7 @@ function Dr(e) {
5387
5394
  const r = (e ?? "low").toLowerCase();
5388
5395
  return r === "high" ? "high" : r === "med" || r === "moderate" ? "moderate" : "low";
5389
5396
  }
5390
- function ti(e) {
5397
+ function ni(e) {
5391
5398
  const r = e.toLowerCase().trim();
5392
5399
  switch (r) {
5393
5400
  case "hi":
@@ -5418,6 +5425,7 @@ function Rr(e, r) {
5418
5425
  symptomScore: ft(a.normal_range, a.unit ?? ""),
5419
5426
  labScore: Pe(a.value, a.unit ?? ""),
5420
5427
  totalScore: a.indicator_percent != null ? String(Math.round(a.indicator_percent)) : "—",
5428
+ indicatorPercent: a.indicator_percent ?? void 0,
5421
5429
  status: a.status
5422
5430
  }));
5423
5431
  return {
@@ -5428,17 +5436,17 @@ function Rr(e, r) {
5428
5436
  indicators: n
5429
5437
  };
5430
5438
  }
5431
- const ri = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5439
+ const ai = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5432
5440
  __proto__: null,
5433
5441
  mapAlertLabSummaryDtoToTabContent: Rr
5434
5442
  }, Symbol.toStringTag, { value: "Module" }));
5435
5443
  function Ce(e) {
5436
5444
  return e != null ? String(Math.round(e)) : "—";
5437
5445
  }
5438
- function ni(e) {
5446
+ function oi(e) {
5439
5447
  return e ?? "";
5440
5448
  }
5441
- function ai(e) {
5449
+ function li(e) {
5442
5450
  switch ((e ?? "").toLowerCase()) {
5443
5451
  case "low":
5444
5452
  return "optimal";
@@ -5450,7 +5458,7 @@ function ai(e) {
5450
5458
  return "trending";
5451
5459
  }
5452
5460
  }
5453
- const oi = {
5461
+ const ii = {
5454
5462
  cardio: "cardiopulmonary",
5455
5463
  pulmonary: "cardiopulmonary",
5456
5464
  cardiopulmonary: "cardiopulmonary",
@@ -5458,49 +5466,49 @@ const oi = {
5458
5466
  neuro: "neurovascular",
5459
5467
  vascular: "neurovascular"
5460
5468
  };
5461
- function li(e) {
5469
+ function si(e) {
5462
5470
  const r = e.trim().toLowerCase().replace(/[\s-]+/g, "");
5463
- return oi[r] ?? r;
5471
+ return ii[r] ?? r;
5464
5472
  }
5465
- function ii(e, r) {
5466
- const n = li(e.name);
5473
+ function ci(e, r) {
5474
+ const n = si(e.name);
5467
5475
  return {
5468
5476
  name: e.name,
5469
5477
  infoAriaLabel: `${e.name} category information`,
5470
5478
  symptomScore: Ce(e.survey_score),
5471
5479
  labScore: Ce(e.lab_score),
5472
5480
  totalScore: Ce(e.total_score),
5473
- status: ai(e.interpretation),
5481
+ status: li(e.interpretation),
5474
5482
  statusExplanationPanel: r != null && r[n] ? {
5475
5483
  bodyParagraphs: [],
5476
5484
  organKey: n
5477
5485
  } : void 0
5478
5486
  };
5479
5487
  }
5480
- function si(e) {
5488
+ function di(e) {
5481
5489
  const r = e.trim().split(/\s+/).filter(Boolean);
5482
5490
  if (r.length === 0) return "?";
5483
5491
  if (r.length === 1) return r[0].slice(0, 2).toUpperCase();
5484
5492
  const n = r[0][0], a = r[r.length - 1][0];
5485
5493
  return `${n}${a}`.toUpperCase();
5486
5494
  }
5487
- function ci(e) {
5495
+ function mi(e) {
5488
5496
  if (!e) return "—";
5489
5497
  const r = e.toLowerCase();
5490
5498
  return r === "female" ? "Female" : r === "male" ? "Male" : e.charAt(0).toUpperCase() + e.slice(1).toLowerCase();
5491
5499
  }
5492
- function di(e) {
5500
+ function ui(e) {
5493
5501
  var a, o;
5494
5502
  const r = (o = (a = e.patient) == null ? void 0 : a.name) == null ? void 0 : o.trim();
5495
5503
  if (!r) return;
5496
5504
  const n = [
5497
- ["Gender", ci(e.patient.gender)],
5505
+ ["Gender", mi(e.patient.gender)],
5498
5506
  ["Chronological age", e.patient.chrono_age != null ? String(e.patient.chrono_age) : "—"],
5499
5507
  ["Biological age", e.patient.bio_age != null ? String(e.patient.bio_age) : "—"]
5500
5508
  ];
5501
5509
  return {
5502
5510
  patientName: r,
5503
- initials: si(r),
5511
+ initials: di(r),
5504
5512
  rows: n
5505
5513
  };
5506
5514
  }
@@ -5513,7 +5521,7 @@ function Se(e) {
5513
5521
  day: "numeric"
5514
5522
  });
5515
5523
  }
5516
- function mi(e) {
5524
+ function bi(e) {
5517
5525
  if (e.overall_score == null) return;
5518
5526
  const r = Math.round(e.overall_score), n = Se(e.labs_last_date), a = Se(e.questionnaire_last_date), o = e.wearable_last_activity ?? null;
5519
5527
  return {
@@ -5530,14 +5538,14 @@ function mi(e) {
5530
5538
  wearableValueLabel: o ?? ""
5531
5539
  };
5532
5540
  }
5533
- function ui(e, r) {
5541
+ function hi(e, r) {
5534
5542
  if (e.triads.length === 0) return;
5535
5543
  const n = e.triads.map((i) => ({
5536
5544
  triadNumber: i.number,
5537
5545
  name: `${i.name} Triad`,
5538
5546
  aggregateScoreDisplay: Ce(i.total_score)
5539
5547
  })), a = e.triads.map(
5540
- (i) => i.organs.map((s) => ii(s, r))
5548
+ (i) => i.organs.map((s) => ci(s, r))
5541
5549
  ), o = Se(e.labs_last_date);
5542
5550
  return {
5543
5551
  sectionTitle: "Total Predictive Trends",
@@ -5550,14 +5558,15 @@ function ui(e, r) {
5550
5558
  categoriesByTriadIndex: a
5551
5559
  };
5552
5560
  }
5553
- function bi(e) {
5561
+ function fi(e) {
5554
5562
  if (e.lab_metrics.length === 0) return;
5555
5563
  const r = e.lab_metrics.map((a) => ({
5556
5564
  name: a.name,
5557
5565
  infoAriaLabel: `${a.name} information`,
5558
5566
  symptomScore: "—",
5559
- labScore: a.value != null ? Pe(a.value, ni(a.unit)) : "—",
5567
+ labScore: a.value != null ? Pe(a.value, oi(a.unit)) : "—",
5560
5568
  totalScore: a.indicator_percent != null ? String(Math.round(a.indicator_percent)) : "—",
5569
+ indicatorPercent: a.indicator_percent ?? void 0,
5561
5570
  status: a.status
5562
5571
  })), n = Se(e.labs_last_date);
5563
5572
  return {
@@ -5576,13 +5585,13 @@ function zr(e, r) {
5576
5585
  title: "Dashboard",
5577
5586
  subtitle: Ar
5578
5587
  },
5579
- patientSummary: di(e),
5588
+ patientSummary: ui(e),
5580
5589
  welcome: {
5581
5590
  title: "",
5582
5591
  paragraphs: [],
5583
5592
  actions: [{ id: "export-reports", label: "Export All Reports" }]
5584
5593
  },
5585
- overallScore: mi(e),
5594
+ overallScore: bi(e),
5586
5595
  metaflammation: e.metaflammation ? {
5587
5596
  title: "Metaflammation Gauge",
5588
5597
  value: e.metaflammation.value,
@@ -5590,12 +5599,12 @@ function zr(e, r) {
5590
5599
  infoAriaLabel: "Metaflammation gauge information",
5591
5600
  centerValueColor: "#E97180"
5592
5601
  } : void 0,
5593
- totalPredictiveTrends: ui(e, r),
5594
- alertLabSummaryTable: bi(e),
5602
+ totalPredictiveTrends: hi(e, r),
5603
+ alertLabSummaryTable: fi(e),
5595
5604
  organContent: r
5596
5605
  };
5597
5606
  }
5598
- const hi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5607
+ const gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5599
5608
  __proto__: null,
5600
5609
  mapDashboardPageDtoToTabContent: zr
5601
5610
  }, Symbol.toStringTag, { value: "Module" }));
@@ -5608,7 +5617,7 @@ function Or(e) {
5608
5617
  sections: (e.triads ?? []).map((r) => {
5609
5618
  const n = (r.markers ?? []).map((a) => ({
5610
5619
  label: a.name,
5611
- arrows: ti(a.direction)
5620
+ arrows: ni(a.direction)
5612
5621
  }));
5613
5622
  return {
5614
5623
  triadNumber: r.number,
@@ -5621,11 +5630,11 @@ function Or(e) {
5621
5630
  })
5622
5631
  };
5623
5632
  }
5624
- const fi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5633
+ const pi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5625
5634
  __proto__: null,
5626
5635
  mapLabAnalysisDtoToTabContent: Or
5627
5636
  }, Symbol.toStringTag, { value: "Module" }));
5628
- function gi(e) {
5637
+ function xi(e) {
5629
5638
  const r = e.unit ?? "";
5630
5639
  return {
5631
5640
  title: e.name,
@@ -5637,30 +5646,33 @@ function gi(e) {
5637
5646
  status: e.status
5638
5647
  };
5639
5648
  }
5640
- function pi(e) {
5649
+ function vi(e) {
5650
+ const r = e.triad_number ?? null;
5641
5651
  return {
5652
+ triadNumber: r,
5642
5653
  title: e.organ_name,
5643
- subtitle: `T${e.triad_number} Lab Values`,
5644
- metrics: e.metrics.map(gi)
5654
+ subtitle: r == null ? "Additional Lab Values" : `T${r} Lab Values`,
5655
+ metrics: e.metrics.map(xi)
5645
5656
  };
5646
5657
  }
5647
- function xi(e, r) {
5658
+ function wi(e, r) {
5648
5659
  const n = /* @__PURE__ */ new Map();
5649
5660
  return e.forEach((a) => {
5650
- n.has(a.triad_number) || n.set(a.triad_number, a);
5651
- }), Array.from(n.values()).map((a) => {
5652
- var i;
5653
- const o = ((i = r == null ? void 0 : r.find((s) => s.number === a.triad_number)) == null ? void 0 : i.explainer_paragraphs) ?? Ir(a.triad_number);
5661
+ const o = a.triad_number ?? null;
5662
+ o != null && (n.has(o) || n.set(o, a));
5663
+ }), Array.from(n.entries()).map(([a, o]) => {
5664
+ var s;
5665
+ const i = ((s = r == null ? void 0 : r.find((c) => c.number === a)) == null ? void 0 : s.explainer_paragraphs) ?? Ir(a);
5654
5666
  return {
5655
- triadNumber: a.triad_number,
5656
- heading: `Triad ${a.triad_number}: ${a.triad_name}`,
5667
+ triadNumber: a,
5668
+ heading: `Triad ${a}: ${o.triad_name}`,
5657
5669
  videoAriaLabel: "Play introduction video",
5658
- paragraphs: o
5670
+ paragraphs: i
5659
5671
  };
5660
5672
  });
5661
5673
  }
5662
5674
  function Er(e, r) {
5663
- const n = e.groups ?? [], a = xi(n, r), o = a[0];
5675
+ const n = e.groups ?? [], a = wi(n, r), o = a[0];
5664
5676
  return {
5665
5677
  pageHeader: {
5666
5678
  title: "Lab Results",
@@ -5668,10 +5680,10 @@ function Er(e, r) {
5668
5680
  },
5669
5681
  intro: o,
5670
5682
  intros: a,
5671
- groups: n.map(pi)
5683
+ groups: n.map(vi)
5672
5684
  };
5673
5685
  }
5674
- const vi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5686
+ const yi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5675
5687
  __proto__: null,
5676
5688
  mapLabResultsDtoToTabContent: Er
5677
5689
  }, Symbol.toStringTag, { value: "Module" }));
@@ -5695,11 +5707,11 @@ function Fr(e) {
5695
5707
  }))
5696
5708
  };
5697
5709
  }
5698
- const wi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5710
+ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5699
5711
  __proto__: null,
5700
5712
  mapQuestionnaireAnalysisDtoToTabContent: Fr
5701
5713
  }, Symbol.toStringTag, { value: "Module" }));
5702
- function yi(e) {
5714
+ function Ci(e) {
5703
5715
  return e >= 60 ? "high" : e <= 40 ? "low" : "optimal";
5704
5716
  }
5705
5717
  function Gr(e, r) {
@@ -5723,7 +5735,7 @@ function Gr(e, r) {
5723
5735
  currentRange: String(i.score),
5724
5736
  previousRange: i.previous_score != null ? String(i.previous_score) : void 0,
5725
5737
  indicatorPercent: Math.round(i.indicator_percent),
5726
- status: yi(i.indicator_percent)
5738
+ status: Ci(i.indicator_percent)
5727
5739
  })) : [],
5728
5740
  symptomsSectionTitle: "Symptoms",
5729
5741
  symptoms: [...e.symptoms],
@@ -5736,7 +5748,7 @@ function Gr(e, r) {
5736
5748
  }))
5737
5749
  };
5738
5750
  }
5739
- const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5751
+ const Ai = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5740
5752
  __proto__: null,
5741
5753
  mapSuggestedProductsDtoToTabContent: Gr
5742
5754
  }, Symbol.toStringTag, { value: "Module" }));
@@ -5751,7 +5763,7 @@ function Yr(e) {
5751
5763
  triadNumbers: [...r.triad_numbers],
5752
5764
  imageSrc: r.image_url ?? void 0,
5753
5765
  imageAlt: r.name,
5754
- scheduleRows: ei.map(([n, a]) => ({
5766
+ scheduleRows: ri.map(([n, a]) => ({
5755
5767
  timeLabel: a,
5756
5768
  dosage: r.schedule[n] ?? null
5757
5769
  }))
@@ -5762,10 +5774,10 @@ function Yr(e) {
5762
5774
  } : void 0
5763
5775
  };
5764
5776
  }
5765
- const Ci = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5777
+ const Li = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5766
5778
  __proto__: null,
5767
5779
  mapSupplementScheduleDtoToTabContent: Yr
5768
- }, Symbol.toStringTag, { value: "Module" })), Ai = {
5780
+ }, Symbol.toStringTag, { value: "Module" })), Ti = {
5769
5781
  cardio: "cardiopulmonary",
5770
5782
  pulmonary: "cardiopulmonary",
5771
5783
  cardiopulmonary: "cardiopulmonary",
@@ -5773,9 +5785,9 @@ const Ci = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5773
5785
  neuro: "neurovascular",
5774
5786
  vascular: "neurovascular"
5775
5787
  };
5776
- function Li(e) {
5788
+ function Pi(e) {
5777
5789
  const r = e.trim().toLowerCase().replace(/[\s-]+/g, "");
5778
- return Ai[r] ?? r;
5790
+ return Ti[r] ?? r;
5779
5791
  }
5780
5792
  function Xr(e, r, n) {
5781
5793
  return {
@@ -5791,7 +5803,7 @@ function Xr(e, r, n) {
5791
5803
  currentRangeLabel: "Current Range",
5792
5804
  previousRangeLabel: "Previous Range",
5793
5805
  categories: a.categories.map((o) => {
5794
- const i = Li(o.name);
5806
+ const i = Pi(o.name);
5795
5807
  return {
5796
5808
  title: o.name.toUpperCase(),
5797
5809
  symptomScore: o.symptom_score != null ? String(o.symptom_score) : "—",
@@ -5808,29 +5820,29 @@ function Xr(e, r, n) {
5808
5820
  cortisolContent: n
5809
5821
  };
5810
5822
  }
5811
- const Ti = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5823
+ const Si = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5812
5824
  __proto__: null,
5813
5825
  mapTotalPredictiveIndexDtoToTabContent: Xr
5814
5826
  }, Symbol.toStringTag, { value: "Module" }));
5815
5827
  function Qt(e) {
5816
5828
  return `${e.min} - ${e.max}`;
5817
5829
  }
5818
- function Pi(e, r) {
5830
+ function Mi(e, r) {
5819
5831
  return e <= r.low.max ? "low" : e <= r.moderate.max ? "moderate" : "high";
5820
5832
  }
5821
- function Si(e) {
5833
+ function ki(e) {
5822
5834
  return e === "low" ? "optimal" : e === "moderate" ? "trending" : "high";
5823
5835
  }
5824
- function Mi(e) {
5836
+ function Hi(e) {
5825
5837
  var a;
5826
- const r = Pi(e.score, e.zones), n = (a = e.interpretation) == null ? void 0 : a.trim();
5838
+ const r = Mi(e.score, e.zones), n = (a = e.interpretation) == null ? void 0 : a.trim();
5827
5839
  return {
5828
5840
  name: e.name,
5829
5841
  infoAriaLabel: `${e.name} indicator information`,
5830
5842
  symptomScore: Qt(e.zones.moderate),
5831
5843
  labScore: String(e.score),
5832
5844
  totalScore: Qt(e.zones.high),
5833
- status: Si(r),
5845
+ status: ki(r),
5834
5846
  statusExplanationPanel: n && n.length > 0 ? { bodyParagraphs: [n] } : void 0
5835
5847
  };
5836
5848
  }
@@ -5840,35 +5852,35 @@ function Vr(e) {
5840
5852
  title: "Predictive Vitality Wellness Indicators",
5841
5853
  subtitle: Tr
5842
5854
  },
5843
- indicators: e.indicators.map(Mi)
5855
+ indicators: e.indicators.map(Hi)
5844
5856
  };
5845
5857
  }
5846
- const ki = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5858
+ const ji = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5847
5859
  __proto__: null,
5848
5860
  mapWellnessIndicatorsDtoToTabContent: Vr
5849
5861
  }, Symbol.toStringTag, { value: "Module" }));
5850
- function Hi(e, r) {
5862
+ function Bi(e, r) {
5851
5863
  return r ? { ...e, ...r } : e;
5852
5864
  }
5853
- const ji = De.map(
5865
+ const Ii = De.map(
5854
5866
  (e) => e.id
5855
5867
  );
5856
5868
  function gt(e) {
5857
- return ji.includes(e);
5869
+ return Ii.includes(e);
5858
5870
  }
5859
- const Bi = 3e5, pt = qt(
5871
+ const Di = 3e5, pt = qt(
5860
5872
  null
5861
5873
  );
5862
5874
  function Zr() {
5863
5875
  return ot(pt);
5864
5876
  }
5865
- function qs() {
5877
+ function _s() {
5866
5878
  const e = ot(pt);
5867
5879
  return I(() => {
5868
5880
  e == null || e.invalidate();
5869
5881
  }, [e]);
5870
5882
  }
5871
- function Ii({
5883
+ function Ri({
5872
5884
  children: e,
5873
5885
  fetchers: r,
5874
5886
  ttlMs: n
@@ -5943,10 +5955,10 @@ function Ii({
5943
5955
  );
5944
5956
  return /* @__PURE__ */ t(pt.Provider, { value: v, children: e });
5945
5957
  }
5946
- function Di(e) {
5958
+ function zi(e) {
5947
5959
  return e instanceof DOMException && e.name === "AbortError" ? !0 : e instanceof Error && e.name === "AbortError";
5948
5960
  }
5949
- function Ri(e, r) {
5961
+ function Oi(e, r) {
5950
5962
  switch (r.type) {
5951
5963
  case "loadStart":
5952
5964
  return { status: "loading" };
@@ -5956,8 +5968,8 @@ function Ri(e, r) {
5956
5968
  return { status: "error", error: r.error };
5957
5969
  }
5958
5970
  }
5959
- function zi(e, r) {
5960
- const [n, a] = tn(Ri, { status: "idle" }), [o, i] = k(0), s = F(r.onLoadError);
5971
+ function Ei(e, r) {
5972
+ const [n, a] = tn(Oi, { status: "idle" }), [o, i] = k(0), s = F(r.onLoadError);
5961
5973
  s.current = r.onLoadError;
5962
5974
  const c = Zr(), d = I(() => {
5963
5975
  c == null || c.invalidate(e), a({ type: "loadStart" }), i((b) => b + 1);
@@ -5980,7 +5992,7 @@ function zi(e, r) {
5980
5992
  if (!b) return;
5981
5993
  a({ type: "loadSuccess", data: f });
5982
5994
  } catch (f) {
5983
- if (!b || Di(f)) return;
5995
+ if (!b || zi(f)) return;
5984
5996
  const p = f instanceof Error ? f : new Error(String(f));
5985
5997
  a({ type: "loadError", error: p }), (h = s.current) == null || h.call(s, { navItemId: e, error: p });
5986
5998
  }
@@ -5990,7 +6002,7 @@ function zi(e, r) {
5990
6002
  }, [e, o, c]), { ...n, refetch: d, loadGeneration: o };
5991
6003
  }
5992
6004
  const Kt = "dashboard";
5993
- function Oi({ className: e }) {
6005
+ function Fi({ className: e }) {
5994
6006
  return /* @__PURE__ */ l(
5995
6007
  "div",
5996
6008
  {
@@ -6012,7 +6024,7 @@ function Oi({ className: e }) {
6012
6024
  }
6013
6025
  );
6014
6026
  }
6015
- function Ei({ className: e }) {
6027
+ function Gi({ className: e }) {
6016
6028
  return /* @__PURE__ */ l(
6017
6029
  "div",
6018
6030
  {
@@ -6031,7 +6043,7 @@ function Ei({ className: e }) {
6031
6043
  }
6032
6044
  );
6033
6045
  }
6034
- function Fi({ onRetry: e }) {
6046
+ function Yi({ onRetry: e }) {
6035
6047
  return /* @__PURE__ */ l(
6036
6048
  "div",
6037
6049
  {
@@ -6071,7 +6083,7 @@ function Fi({ onRetry: e }) {
6071
6083
  }
6072
6084
  );
6073
6085
  }
6074
- class Gi extends rn {
6086
+ class Xi extends rn {
6075
6087
  constructor() {
6076
6088
  super(...arguments);
6077
6089
  yt(this, "state", { error: null });
@@ -6087,7 +6099,7 @@ class Gi extends rn {
6087
6099
  }
6088
6100
  render() {
6089
6101
  return this.state.error ? /* @__PURE__ */ t(
6090
- Yi,
6102
+ Vi,
6091
6103
  {
6092
6104
  onRetry: () => {
6093
6105
  this.props.onRecover();
@@ -6096,7 +6108,7 @@ class Gi extends rn {
6096
6108
  ) : this.props.children;
6097
6109
  }
6098
6110
  }
6099
- function Yi({ onRetry: e }) {
6111
+ function Vi({ onRetry: e }) {
6100
6112
  return /* @__PURE__ */ l(
6101
6113
  "div",
6102
6114
  {
@@ -6136,41 +6148,41 @@ function Yi({ onRetry: e }) {
6136
6148
  }
6137
6149
  );
6138
6150
  }
6139
- function Xi({
6151
+ function Zi({
6140
6152
  navItemId: e,
6141
6153
  data: r
6142
6154
  }) {
6143
6155
  const { Tab: n } = ht[e];
6144
6156
  return /* @__PURE__ */ t(n, { content: r });
6145
6157
  }
6146
- function Vi({
6158
+ function Wi({
6147
6159
  navItemId: e,
6148
6160
  contentFetchers: r,
6149
6161
  onDashboardTabContentLoadError: n
6150
6162
  }) {
6151
- const a = zi(e, {
6163
+ const a = Ei(e, {
6152
6164
  fetchers: r,
6153
6165
  onLoadError: n
6154
- }), o = Ol(e), s = ht[e].Skeleton;
6155
- return a.status === "idle" || a.status === "loading" ? /* @__PURE__ */ t(s, { pageHeader: o }) : a.status === "error" ? /* @__PURE__ */ t(Fi, { onRetry: () => a.refetch() }) : /* @__PURE__ */ t(
6156
- Gi,
6166
+ }), o = Fl(e), s = ht[e].Skeleton;
6167
+ return a.status === "idle" || a.status === "loading" ? /* @__PURE__ */ t(s, { pageHeader: o }) : a.status === "error" ? /* @__PURE__ */ t(Yi, { onRetry: () => a.refetch() }) : /* @__PURE__ */ t(
6168
+ Xi,
6157
6169
  {
6158
6170
  resetKey: `${e}-${a.loadGeneration}`,
6159
6171
  onRecover: () => {
6160
6172
  a.refetch();
6161
6173
  },
6162
- children: /* @__PURE__ */ t(nn, { fallback: /* @__PURE__ */ t(s, { pageHeader: o }), children: /* @__PURE__ */ t(Xi, { navItemId: e, data: a.data }) })
6174
+ children: /* @__PURE__ */ t(nn, { fallback: /* @__PURE__ */ t(s, { pageHeader: o }), children: /* @__PURE__ */ t(Zi, { navItemId: e, data: a.data }) })
6163
6175
  }
6164
6176
  );
6165
6177
  }
6166
- function Zi({
6178
+ function Ui({
6167
6179
  activeItemId: e,
6168
6180
  activeLabel: r,
6169
6181
  contentFetchers: n,
6170
6182
  onDashboardTabContentLoadError: a
6171
6183
  }) {
6172
6184
  return gt(e) ? /* @__PURE__ */ t(
6173
- Vi,
6185
+ Wi,
6174
6186
  {
6175
6187
  navItemId: e,
6176
6188
  contentFetchers: n,
@@ -6178,7 +6190,7 @@ function Zi({
6178
6190
  }
6179
6191
  ) : /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t("h1", { className: "text-2xl font-semibold tracking-tight text-[color:var(--mb-color-text)]", children: r }) });
6180
6192
  }
6181
- function Wi({
6193
+ function Qi({
6182
6194
  renderMainContent: e,
6183
6195
  content: r,
6184
6196
  activeItemId: n,
@@ -6190,7 +6202,7 @@ function Wi({
6190
6202
  useDefaultTabData: d
6191
6203
  }) {
6192
6204
  const m = (e == null ? void 0 : e(n)) ?? (r !== void 0 ? r : /* @__PURE__ */ t(
6193
- Zi,
6205
+ Ui,
6194
6206
  {
6195
6207
  activeItemId: n,
6196
6208
  activeLabel: a,
@@ -6198,12 +6210,12 @@ function Wi({
6198
6210
  onDashboardTabContentLoadError: i
6199
6211
  }
6200
6212
  ));
6201
- return !c && d ? /* @__PURE__ */ t(Ei, { className: "max-w-full shrink-0" }) : Br(s) ? /* @__PURE__ */ l(ae, { children: [
6202
- /* @__PURE__ */ t(Oi, { className: "max-w-full shrink-0" }),
6213
+ return !c && d ? /* @__PURE__ */ t(Gi, { className: "max-w-full shrink-0" }) : Br(s) ? /* @__PURE__ */ l(ae, { children: [
6214
+ /* @__PURE__ */ t(Fi, { className: "max-w-full shrink-0" }),
6203
6215
  m
6204
6216
  ] }) : m;
6205
6217
  }
6206
- function Ui({
6218
+ function Ki({
6207
6219
  rootStyle: e,
6208
6220
  enableTabContentCache: r,
6209
6221
  menuTitle: n,
@@ -6226,10 +6238,10 @@ function Ui({
6226
6238
  className: "mb-root mb-sim-animate-in flex h-full min-h-0 min-w-0 flex-1 flex-col overflow-hidden",
6227
6239
  style: e,
6228
6240
  children: /* @__PURE__ */ t(
6229
- gl,
6241
+ xl,
6230
6242
  {
6231
6243
  sidebar: /* @__PURE__ */ t(
6232
- Gl,
6244
+ Xl,
6233
6245
  {
6234
6246
  title: n,
6235
6247
  logo: a,
@@ -6255,21 +6267,21 @@ function Ui({
6255
6267
  }
6256
6268
  );
6257
6269
  }
6258
- function Qi({
6270
+ function qi({
6259
6271
  wrapTabContentCache: e,
6260
6272
  fetchers: r,
6261
6273
  cacheTtlMs: n,
6262
6274
  viewProps: a
6263
6275
  }) {
6264
- const o = /* @__PURE__ */ t(Ui, { ...a });
6265
- return e ? /* @__PURE__ */ t(Ii, { fetchers: r, ttlMs: n, children: o }) : o;
6276
+ const o = /* @__PURE__ */ t(Ki, { ...a });
6277
+ return e ? /* @__PURE__ */ t(Ri, { fetchers: r, ttlMs: n, children: o }) : o;
6266
6278
  }
6267
- const Ki = [
6279
+ const Ji = [
6268
6280
  { id: "sim-pt-001", label: "Alex Morgan" },
6269
6281
  { id: "sim-pt-002", label: "Jordan Lee" },
6270
6282
  { id: "sim-pt-003", label: "Sam Rivera" },
6271
6283
  { id: "sim-pt-004", label: "Taylor Chen" }
6272
- ], qi = [
6284
+ ], _i = [
6273
6285
  { id: "sim-rpt-001", label: "March 12, 2026" },
6274
6286
  { id: "sim-rpt-002", label: "February 4, 2026" },
6275
6287
  { id: "sim-rpt-003", label: "January 18, 2026" },
@@ -6289,18 +6301,18 @@ function Qr({
6289
6301
  }
6290
6302
  );
6291
6303
  }
6292
- function Ji() {
6293
- return Ki;
6304
+ function $i() {
6305
+ return Ji;
6294
6306
  }
6295
- function _i() {
6296
- return qi;
6307
+ function es() {
6308
+ return _i;
6297
6309
  }
6298
- function $i({
6310
+ function ts({
6299
6311
  rootStyle: e,
6300
6312
  onSelectPatient: r,
6301
6313
  onBack: n
6302
6314
  }) {
6303
- const a = Ji();
6315
+ const a = $i();
6304
6316
  return /* @__PURE__ */ t(
6305
6317
  Qr,
6306
6318
  {
@@ -6336,12 +6348,12 @@ function $i({
6336
6348
  }
6337
6349
  );
6338
6350
  }
6339
- function es({
6351
+ function rs({
6340
6352
  rootStyle: e,
6341
6353
  onSelectReport: r,
6342
6354
  onBack: n
6343
6355
  }) {
6344
- const a = _i();
6356
+ const a = es();
6345
6357
  return /* @__PURE__ */ t(
6346
6358
  Qr,
6347
6359
  {
@@ -6377,7 +6389,7 @@ function es({
6377
6389
  }
6378
6390
  );
6379
6391
  }
6380
- function ts({
6392
+ function ns({
6381
6393
  rootStyle: e,
6382
6394
  simulationSessionReady: r,
6383
6395
  simRole: n,
@@ -6390,7 +6402,7 @@ function ts({
6390
6402
  if (!r) {
6391
6403
  if (n === "practitioner")
6392
6404
  return /* @__PURE__ */ t(
6393
- $i,
6405
+ ts,
6394
6406
  {
6395
6407
  rootStyle: e,
6396
6408
  onSelectPatient: a,
@@ -6399,7 +6411,7 @@ function ts({
6399
6411
  );
6400
6412
  if (n === "patient")
6401
6413
  return /* @__PURE__ */ t(
6402
- es,
6414
+ rs,
6403
6415
  {
6404
6416
  rootStyle: e,
6405
6417
  onSelectReport: i,
@@ -6409,7 +6421,7 @@ function ts({
6409
6421
  }
6410
6422
  return c;
6411
6423
  }
6412
- function rs(e) {
6424
+ function as(e) {
6413
6425
  return j(() => {
6414
6426
  const r = bn(e);
6415
6427
  return {
@@ -6418,18 +6430,18 @@ function rs(e) {
6418
6430
  };
6419
6431
  }, [e]);
6420
6432
  }
6421
- function ns(e, r) {
6433
+ function os(e, r) {
6422
6434
  const n = e.replace(/\/$/, ""), a = r.startsWith("/") ? r : `/${r}`;
6423
6435
  return `${n}${a}`;
6424
6436
  }
6425
6437
  function Kr(e, r) {
6426
- const n = ns(e || "", "/api/v1/report/full");
6438
+ const n = os(e || "", "/api/v1/report/full");
6427
6439
  return r ? `${n}?report_id=${encodeURIComponent(r)}` : n;
6428
6440
  }
6429
- function as(e) {
6441
+ function ls(e) {
6430
6442
  return e instanceof DOMException && e.name === "AbortError";
6431
6443
  }
6432
- async function os(e) {
6444
+ async function is(e) {
6433
6445
  const {
6434
6446
  baseUrl: r,
6435
6447
  reportId: n,
@@ -6441,7 +6453,7 @@ async function os(e) {
6441
6453
  try {
6442
6454
  c = await o(s, { method: "GET", headers: a, signal: i });
6443
6455
  } catch (b) {
6444
- throw as(b) ? b : new Error(
6456
+ throw ls(b) ? b : new Error(
6445
6457
  `Network error fetching full report: ${b instanceof Error ? b.message : String(b)}`,
6446
6458
  { cause: b }
6447
6459
  );
@@ -6461,11 +6473,11 @@ async function os(e) {
6461
6473
  throw new Error("Unexpected response shape for /report/full: missing 'report' or 'pages'");
6462
6474
  return m;
6463
6475
  }
6464
- const ls = 5e3, _e = /* @__PURE__ */ new Map();
6465
- function is(e, r, n, a) {
6476
+ const ss = 5e3, _e = /* @__PURE__ */ new Map();
6477
+ function cs(e, r, n, a) {
6466
6478
  return `${e}|${r ?? ""}|${n ?? ""}|${a ?? ""}`;
6467
6479
  }
6468
- function ss(e) {
6480
+ function ds(e) {
6469
6481
  const {
6470
6482
  reportId: r,
6471
6483
  headers: n,
@@ -6479,7 +6491,7 @@ function ss(e) {
6479
6491
  userId: o,
6480
6492
  questionnaireResponseId: i,
6481
6493
  headers: n
6482
- }), b = is(
6494
+ }), b = cs(
6483
6495
  Kr(d, r),
6484
6496
  a,
6485
6497
  o,
@@ -6488,13 +6500,13 @@ function ss(e) {
6488
6500
  }), f), v = () => {
6489
6501
  const f = _e.get(b);
6490
6502
  if (f && Date.now() < f.expiresAt) return g(f.promise);
6491
- const p = os({
6503
+ const p = is({
6492
6504
  baseUrl: d,
6493
6505
  reportId: r,
6494
6506
  headers: m,
6495
6507
  fetchImpl: s
6496
6508
  });
6497
- return p.catch(() => _e.delete(b)), _e.set(b, { promise: p, expiresAt: Date.now() + ls }), g(p);
6509
+ return p.catch(() => _e.delete(b)), _e.set(b, { promise: p, expiresAt: Date.now() + ss }), g(p);
6498
6510
  };
6499
6511
  v();
6500
6512
  const u = (f) => v();
@@ -6537,10 +6549,10 @@ function ss(e) {
6537
6549
  }
6538
6550
  };
6539
6551
  }
6540
- function cs(e, r) {
6552
+ function ms(e, r) {
6541
6553
  return e === r ? !0 : !e || !r || e.length !== r.length ? !1 : e.every((n, a) => n === r[a]);
6542
6554
  }
6543
- function ds({
6555
+ function us({
6544
6556
  config: e,
6545
6557
  apiKey: r,
6546
6558
  reportHttpConfig: n,
@@ -6551,7 +6563,7 @@ function ds({
6551
6563
  dashboardTabContentCacheTtlMs: c,
6552
6564
  simulationReportId: d
6553
6565
  }) {
6554
- const m = r ?? (e == null ? void 0 : e.apiKey), b = Ao(m), g = i === void 0 && s === void 0, [v, u] = k(), h = j(() => {
6566
+ const m = r ?? (e == null ? void 0 : e.apiKey), b = To(m), g = i === void 0 && s === void 0, [v, u] = k(), h = j(() => {
6555
6567
  const P = { ...n ?? {} };
6556
6568
  return d != null && (P.reportId = d), P;
6557
6569
  }, [n, d]), f = j(
@@ -6575,25 +6587,25 @@ function ds({
6575
6587
  if (p.current !== A) return;
6576
6588
  const S = [...P.report.available_pages];
6577
6589
  u(
6578
- (T) => cs(T, S) ? T : S
6590
+ (T) => ms(T, S) ? T : S
6579
6591
  );
6580
6592
  }, []), C = j(() => {
6581
- const P = ss({
6593
+ const P = ds({
6582
6594
  ...h,
6583
6595
  onFullReportLoaded: (A) => y(A, f)
6584
6596
  });
6585
- return Hi(P, a);
6586
- }, [a, y, f, h]), N = j(() => o || ql(h), [o, h]);
6597
+ return Bi(P, a);
6598
+ }, [a, y, f, h]), N = j(() => o || _l(h), [o, h]);
6587
6599
  return {
6588
6600
  apiKeyAccepted: b,
6589
6601
  useDefaultTabData: g,
6590
6602
  resolvedDashboardContentFetchers: C,
6591
6603
  resolvedExportReports: N,
6592
- resolvedCacheTtlMs: c ?? Bi,
6604
+ resolvedCacheTtlMs: c ?? Di,
6593
6605
  availableReportPages: v
6594
6606
  };
6595
6607
  }
6596
- function ms(e) {
6608
+ function bs(e) {
6597
6609
  const { logo: r } = e, { src: n, srcMobile: a, alt: o, width: i, height: s, widthMobile: c, heightMobile: d, placeholder: m } = r;
6598
6610
  if (n && a)
6599
6611
  return /* @__PURE__ */ l(ae, { children: [
@@ -6633,7 +6645,7 @@ function ms(e) {
6633
6645
  );
6634
6646
  if (m) return /* @__PURE__ */ t(mn, {});
6635
6647
  }
6636
- function us({
6648
+ function hs({
6637
6649
  role: e,
6638
6650
  patientLabel: r,
6639
6651
  onChangeUser: n
@@ -6664,7 +6676,7 @@ function us({
6664
6676
  function Ne(e) {
6665
6677
  return e === "practitioner" ? "practitioner" : e === "patient" ? "patient" : null;
6666
6678
  }
6667
- function bs(e) {
6679
+ function fs(e) {
6668
6680
  const [r, n] = k(
6669
6681
  () => Ne(e)
6670
6682
  ), [a, o] = k(null), [i, s] = k(""), [c, d] = k(null), [m, b] = k(""), g = j(() => {
@@ -6707,7 +6719,7 @@ function bs(e) {
6707
6719
  onSelectPatientReport: N
6708
6720
  };
6709
6721
  }
6710
- function hs({
6722
+ function gs({
6711
6723
  activeNavItemIdProp: e,
6712
6724
  defaultActiveNavItemId: r,
6713
6725
  onActiveNavItemChange: n
@@ -6720,21 +6732,21 @@ function hs({
6720
6732
  );
6721
6733
  return { activeItemId: i, handleNavItemClick: s };
6722
6734
  }
6723
- const fs = "Your lab results will be available once the lab requisition has been completed and processed.", gs = /* @__PURE__ */ new Set([
6735
+ const ps = "Your lab results will be available once the lab requisition has been completed and processed.", xs = /* @__PURE__ */ new Set([
6724
6736
  "lab-results",
6725
6737
  "lab-analysis",
6726
6738
  "alert-lab-summary"
6727
6739
  ]);
6728
- function ps(e) {
6740
+ function vs(e) {
6729
6741
  if (!e) return Te;
6730
6742
  const r = new Set(e);
6731
- return Te.map((n) => !gs.has(n.id) || r.has(n.id) ? n : {
6743
+ return Te.map((n) => !xs.has(n.id) || r.has(n.id) ? n : {
6732
6744
  ...n,
6733
6745
  disabled: !0,
6734
- disabledTooltip: fs
6746
+ disabledTooltip: ps
6735
6747
  });
6736
6748
  }
6737
- function xs({
6749
+ function ws({
6738
6750
  config: e,
6739
6751
  apiKey: r,
6740
6752
  viewerRole: n,
@@ -6758,14 +6770,14 @@ function xs({
6758
6770
  }) {
6759
6771
  var se;
6760
6772
  _r();
6761
- const { resolvedBranding: w, rootStyle: P } = rs(e), A = bs(n), { activeItemId: S, handleNavItemClick: T } = hs({
6773
+ const { resolvedBranding: w, rootStyle: P } = as(e), A = fs(n), { activeItemId: S, handleNavItemClick: T } = gs({
6762
6774
  activeNavItemIdProp: v,
6763
6775
  defaultActiveNavItemId: u,
6764
6776
  onActiveNavItemChange: h
6765
- }), z = ((se = Te.find((J) => J.id === S)) == null ? void 0 : se.label) ?? S, G = j(
6766
- () => o !== void 0 ? o : ms(w),
6777
+ }), R = ((se = Te.find((J) => J.id === S)) == null ? void 0 : se.label) ?? S, G = j(
6778
+ () => o !== void 0 ? o : bs(w),
6767
6779
  [w, o]
6768
- ), B = ds({
6780
+ ), B = us({
6769
6781
  config: e,
6770
6782
  apiKey: r,
6771
6783
  reportHttpConfig: c,
@@ -6776,7 +6788,7 @@ function xs({
6776
6788
  dashboardTabContentCacheTtlMs: N,
6777
6789
  simulationReportId: A.simulationReportId
6778
6790
  }), q = j(
6779
- () => ps(B.availableReportPages),
6791
+ () => vs(B.availableReportPages),
6780
6792
  [B.availableReportPages]
6781
6793
  ), $ = j(
6782
6794
  () => new Set(q.filter((J) => J.disabled).map((J) => J.id)),
@@ -6792,12 +6804,12 @@ function xs({
6792
6804
  ].filter(Boolean).join(" "),
6793
6805
  [y]
6794
6806
  ), ie = B.useDefaultTabData && B.apiKeyAccepted, ge = /* @__PURE__ */ t(
6795
- Wi,
6807
+ Qi,
6796
6808
  {
6797
6809
  renderMainContent: g,
6798
6810
  content: s,
6799
6811
  activeItemId: S,
6800
- activeLabel: z,
6812
+ activeLabel: R,
6801
6813
  resolvedDashboardContentFetchers: B.resolvedDashboardContentFetchers,
6802
6814
  onDashboardTabContentLoadError: m,
6803
6815
  sideMenuUserProfile: i,
@@ -6805,14 +6817,14 @@ function xs({
6805
6817
  useDefaultTabData: B.useDefaultTabData
6806
6818
  }
6807
6819
  ), pe = /* @__PURE__ */ t(
6808
- us,
6820
+ hs,
6809
6821
  {
6810
6822
  role: A.simRole,
6811
6823
  patientLabel: A.simRole === "patient" ? A.simPatientReportLabel : A.simPractitionerPatientLabel,
6812
6824
  onChangeUser: A.resetSimulationSession
6813
6825
  }
6814
6826
  ), xe = /* @__PURE__ */ t(
6815
- Qi,
6827
+ qi,
6816
6828
  {
6817
6829
  wrapTabContentCache: ie,
6818
6830
  fetchers: B.resolvedDashboardContentFetchers,
@@ -6841,8 +6853,8 @@ function xs({
6841
6853
  }),
6842
6854
  [B.resolvedExportReports, T]
6843
6855
  );
6844
- return /* @__PURE__ */ t(Ka, { value: ve, children: /* @__PURE__ */ t(
6845
- ts,
6856
+ return /* @__PURE__ */ t(qa, { value: ve, children: /* @__PURE__ */ t(
6857
+ ns,
6846
6858
  {
6847
6859
  rootStyle: P,
6848
6860
  simulationSessionReady: A.simulationSessionReady,
@@ -6855,21 +6867,21 @@ function xs({
6855
6867
  }
6856
6868
  ) });
6857
6869
  }
6858
- function vs({
6870
+ function ys({
6859
6871
  allowedPostMessageOrigins: e,
6860
6872
  validatePostMessageConfig: r
6861
6873
  } = {}) {
6862
6874
  const [n, a] = k(() => {
6863
6875
  if (!(typeof window > "u"))
6864
- return rl(new URLSearchParams(window.location.search));
6876
+ return al(new URLSearchParams(window.location.search));
6865
6877
  }), o = j(
6866
- () => ol(
6878
+ () => il(
6867
6879
  new URLSearchParams(typeof window < "u" ? window.location.search : "")
6868
6880
  ),
6869
6881
  []
6870
6882
  ), i = j(() => {
6871
6883
  if (o.patientId)
6872
- return Zl({
6884
+ return Ul({
6873
6885
  reportId: o.patientId,
6874
6886
  apiKey: n == null ? void 0 : n.apiKey
6875
6887
  });
@@ -6877,14 +6889,14 @@ function vs({
6877
6889
  return V(() => {
6878
6890
  const s = (c) => {
6879
6891
  const d = c.data;
6880
- if (!d || typeof d != "object" || d.type !== Cr || e !== void 0 && !ll(c.origin, e) || r && !r(c))
6892
+ if (!d || typeof d != "object" || d.type !== Cr || e !== void 0 && !sl(c.origin, e) || r && !r(c))
6881
6893
  return;
6882
6894
  const m = d.config;
6883
6895
  m && typeof m == "object" && a(m);
6884
6896
  };
6885
6897
  return window.addEventListener("message", s), () => window.removeEventListener("message", s);
6886
6898
  }, [e, r]), /* @__PURE__ */ t(
6887
- xs,
6899
+ ws,
6888
6900
  {
6889
6901
  apiKey: yr,
6890
6902
  config: n,
@@ -6893,13 +6905,13 @@ function vs({
6893
6905
  }
6894
6906
  );
6895
6907
  }
6896
- function Js(e = "root", r) {
6908
+ function $s(e = "root", r) {
6897
6909
  const n = document.getElementById(e);
6898
6910
  if (!n)
6899
6911
  throw new Error("Root element not found");
6900
6912
  ln(n).render(
6901
6913
  /* @__PURE__ */ t(an, { children: /* @__PURE__ */ t("div", { className: "flex h-full min-h-0 w-full flex-col", children: /* @__PURE__ */ t(
6902
- vs,
6914
+ ys,
6903
6915
  {
6904
6916
  allowedPostMessageOrigins: r == null ? void 0 : r.allowedPostMessageOrigins,
6905
6917
  validatePostMessageConfig: r == null ? void 0 : r.validatePostMessageConfig
@@ -6908,106 +6920,106 @@ function Js(e = "root", r) {
6908
6920
  );
6909
6921
  }
6910
6922
  export {
6911
- Ps as AlertLabSummaryCard,
6923
+ Ms as AlertLabSummaryCard,
6912
6924
  bt as AlertLabSummaryIcon,
6913
- Is as AlertLabSummaryTab,
6914
- Qa as AlertLabSummaryTabSkeleton,
6925
+ Rs as AlertLabSummaryTab,
6926
+ Ka as AlertLabSummaryTabSkeleton,
6915
6927
  _ as Badge,
6916
6928
  M as Button,
6917
- ji as DASHBOARD_TAB_NAV_IDS,
6929
+ Ii as DASHBOARD_TAB_NAV_IDS,
6918
6930
  De as DASHBOARD_TAB_PLUGINS,
6919
- Bi as DEFAULT_DASHBOARD_TAB_CONTENT_CACHE_TTL_MS,
6931
+ Di as DEFAULT_DASHBOARD_TAB_CONTENT_CACHE_TTL_MS,
6920
6932
  H as DEFAULT_METABOLIC_BRANDING,
6921
6933
  L as DashboardCard,
6922
6934
  it as DashboardCardSectionHeader,
6923
- il as DashboardIcon,
6924
- Ds as DashboardTab,
6925
- Ii as DashboardTabContentCacheProvider,
6926
- so as DashboardTabSkeleton,
6935
+ cl as DashboardIcon,
6936
+ zs as DashboardTab,
6937
+ Ri as DashboardTabContentCacheProvider,
6938
+ co as DashboardTabSkeleton,
6927
6939
  or as GradientRangeBar,
6928
6940
  he as LAB_METRIC_RANGE_BAR_SEGMENTS,
6929
- sl as LabAnalysisIcon,
6930
- Rs as LabAnalysisTab,
6931
- co as LabAnalysisTabSkeleton,
6941
+ dl as LabAnalysisIcon,
6942
+ Os as LabAnalysisTab,
6943
+ mo as LabAnalysisTabSkeleton,
6932
6944
  ua as LabAnalysisTriadCard,
6933
- Ss as LabMetricRangeCard,
6934
- cl as LabResultsIcon,
6945
+ ks as LabMetricRangeCard,
6946
+ ml as LabResultsIcon,
6935
6947
  hr as LabResultsIntroCard,
6936
- zs as LabResultsTab,
6937
- xo as LabResultsTabSkeleton,
6948
+ Es as LabResultsTab,
6949
+ wo as LabResultsTabSkeleton,
6938
6950
  mn as LogoPlaceholder,
6939
- Us as LogoutIcon,
6951
+ Ks as LogoutIcon,
6940
6952
  yr as METABOLIC_DASHBOARD_STUB_API_KEY,
6941
6953
  Nr as METABOLIC_IFRAME_CONFIG_QUERY_KEY,
6942
6954
  Cr as METABOLIC_IFRAME_SET_CONFIG_MESSAGE,
6943
- Co as METABOLIC_REPORT_PAGES_API_BASE_URL,
6944
- xs as MetabolicDashboard,
6945
- Zi as MetabolicDashboardDefaultMain,
6946
- vs as MetabolicEmbedRoot,
6955
+ Lo as METABOLIC_REPORT_PAGES_API_BASE_URL,
6956
+ ws as MetabolicDashboard,
6957
+ Ui as MetabolicDashboardDefaultMain,
6958
+ ys as MetabolicEmbedRoot,
6947
6959
  Rn as MetabolicScoreBar,
6948
6960
  ne as MetabolicTriadCategoryPanel,
6949
6961
  Be as MetabolicTriadCategoryPanelSkeleton,
6950
- Ms as MetabolicTriadIntroCard,
6962
+ Hs as MetabolicTriadIntroCard,
6951
6963
  gr as MetabolicTriadSectionCard,
6952
6964
  lr as MetaflammationGauge,
6953
6965
  wa as MetaflammationGaugeCard,
6954
6966
  Pn as OVERALL_SCORE_GRADIENT_STOPS,
6955
6967
  Sn as OVERALL_SCORE_LABELS,
6956
- Do as OrganDetailPage,
6968
+ zo as OrganDetailPage,
6957
6969
  Ta as OverallMetabolicScoreCard,
6958
6970
  D as PageHeader,
6959
6971
  Yn as PractitionerNoteRow,
6960
6972
  Pa as PractitionerNotesCard,
6961
- dl as PredictiveIndexIcon,
6962
- ks as ProfileSummaryCard,
6963
- Os as QuestionnaireAnalysisTab,
6964
- zo as QuestionnaireAnalysisTabSkeleton,
6965
- ml as QuestionnaireIcon,
6973
+ ul as PredictiveIndexIcon,
6974
+ js as ProfileSummaryCard,
6975
+ Fs as QuestionnaireAnalysisTab,
6976
+ Eo as QuestionnaireAnalysisTabSkeleton,
6977
+ bl as QuestionnaireIcon,
6966
6978
  oe as SegmentedRangeBar,
6967
- gl as ShellLayout,
6968
- Gl as SideMenu,
6969
- Qs as SideMenuFooter,
6970
- Fl as SideMenuNavButton,
6979
+ xl as ShellLayout,
6980
+ Xl as SideMenu,
6981
+ qs as SideMenuFooter,
6982
+ Yl as SideMenuNavButton,
6971
6983
  jt as SkeletonCircle,
6972
6984
  x as SkeletonRect,
6973
- ul as SuggestedProductsIcon,
6974
- Es as SuggestedProductsTab,
6975
- Go as SuggestedProductsTabSkeleton,
6985
+ hl as SuggestedProductsIcon,
6986
+ Gs as SuggestedProductsTab,
6987
+ Xo as SuggestedProductsTabSkeleton,
6976
6988
  Sa as SupplementScheduleCard,
6977
- bl as SupplementScheduleIcon,
6978
- Fs as SupplementScheduleTab,
6979
- Yo as SupplementScheduleTabSkeleton,
6989
+ fl as SupplementScheduleIcon,
6990
+ Ys as SupplementScheduleTab,
6991
+ Vo as SupplementScheduleTabSkeleton,
6980
6992
  qn as SupplementScheduleTableRow,
6981
6993
  $n as SupplementTriadMarkGroup,
6982
6994
  Y as TRIAD_RESILIENCY_TREND_SEGMENTS,
6983
6995
  K as TabSkeletonRoot,
6984
6996
  Z as Tooltip,
6985
- Gs as TotalPredictiveIndexTab,
6986
- Zo as TotalPredictiveIndexTabSkeleton,
6997
+ Xs as TotalPredictiveIndexTab,
6998
+ Uo as TotalPredictiveIndexTabSkeleton,
6987
6999
  ee as TriadMarkIcon,
6988
7000
  ra as TriadRadar,
6989
- Hs as TriadRadarReportCard,
6990
- js as WelcomeMessageCard,
6991
- Bs as WellnessIndicatorCard,
6992
- hl as WellnessIndicatorsIcon,
6993
- Ys as WellnessIndicatorsTab,
6994
- Jo as WellnessIndicatorsTabSkeleton,
7001
+ Bs as TriadRadarReportCard,
7002
+ Is as WelcomeMessageCard,
7003
+ Ds as WellnessIndicatorCard,
7004
+ gl as WellnessIndicatorsIcon,
7005
+ Vs as WellnessIndicatorsTab,
7006
+ $o as WellnessIndicatorsTabSkeleton,
6995
7007
  Kn as activeSegmentHighlightColor,
6996
- _l as buildReportExistsUrl,
6997
- xl as buildReportPageUrl,
6998
- Ks as checkMetabolicReportExists,
6999
- Zl as createHttpDashboardContentFetchers,
7000
- ql as createReportPdfDownloader,
7001
- tl as decodeMetabolicIframeConfig,
7002
- Zs as emitMetabolicDashboardLogout,
7003
- el as encodeMetabolicIframeConfig,
7008
+ ei as buildReportExistsUrl,
7009
+ wl as buildReportPageUrl,
7010
+ Js as checkMetabolicReportExists,
7011
+ Ul as createHttpDashboardContentFetchers,
7012
+ _l as createReportPdfDownloader,
7013
+ nl as decodeMetabolicIframeConfig,
7014
+ Us as emitMetabolicDashboardLogout,
7015
+ rl as encodeMetabolicIframeConfig,
7004
7016
  _r as ensureAgChartsModules,
7005
7017
  U as fetchReportPage,
7006
7018
  fe as getBuiltInReportPagesApiBaseUrl,
7007
- Ol as getDashboardTabStaticPageHeader,
7019
+ Fl as getDashboardTabStaticPageHeader,
7008
7020
  gt as isDashboardNavItemId,
7009
- Ao as isMetabolicDashboardApiKeyAccepted,
7010
- ll as isMetabolicEmbedPostMessageOriginAllowed,
7021
+ To as isMetabolicDashboardApiKeyAccepted,
7022
+ sl as isMetabolicEmbedPostMessageOriginAllowed,
7011
7023
  Rr as mapAlertLabSummaryDtoToTabContent,
7012
7024
  zr as mapDashboardPageDtoToTabContent,
7013
7025
  Or as mapLabAnalysisDtoToTabContent,
@@ -7017,17 +7029,17 @@ export {
7017
7029
  Yr as mapSupplementScheduleDtoToTabContent,
7018
7030
  Xr as mapTotalPredictiveIndexDtoToTabContent,
7019
7031
  Vr as mapWellnessIndicatorsDtoToTabContent,
7020
- Hi as mergeDashboardContentFetchers,
7032
+ Bi as mergeDashboardContentFetchers,
7021
7033
  _t as metabolicBrandingToStyle,
7022
- Vs as metabolicIframeSrcAppendStealthParams,
7023
- Xs as metabolicIframeSrcWithConfig,
7024
- Js as mountMetabolicEmbed,
7025
- Ws as postMetabolicIframeConfig,
7026
- ol as readMetabolicEmbedStealthParams,
7027
- rl as readMetabolicIframeConfigFromSearchParams,
7034
+ Ws as metabolicIframeSrcAppendStealthParams,
7035
+ Zs as metabolicIframeSrcWithConfig,
7036
+ $s as mountMetabolicEmbed,
7037
+ Qs as postMetabolicIframeConfig,
7038
+ il as readMetabolicEmbedStealthParams,
7039
+ al as readMetabolicIframeConfigFromSearchParams,
7028
7040
  bn as resolveMetabolicBranding,
7029
7041
  W as sideMenuItemIconClass,
7030
7042
  Me as useAgCharts,
7031
- zi as useDashboardTabContent,
7032
- qs as useInvalidateDashboardTabContentCache
7043
+ Ei as useDashboardTabContent,
7044
+ _s as useInvalidateDashboardTabContentCache
7033
7045
  };