@alfadocs/ui-kit 1.4.1 → 1.4.2

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.
@@ -1527,7 +1527,7 @@ function Ct({
1527
1527
  ] }) }),
1528
1528
  /* @__PURE__ */ t("tbody", { children: c.map(
1529
1529
  (p) => {
1530
- var N, y;
1530
+ var w, y;
1531
1531
  return p.banner != null ? /* @__PURE__ */ t("tr", { className: "ds:bg-[color:var(--muted)]", children: /* @__PURE__ */ t(
1532
1532
  "th",
1533
1533
  {
@@ -1537,7 +1537,7 @@ function Ct({
1537
1537
  }
1538
1538
  ) }, p.key) : /* @__PURE__ */ d("tr", { children: [
1539
1539
  p.header,
1540
- (N = p.cells) == null ? void 0 : N[0],
1540
+ (w = p.cells) == null ? void 0 : w[0],
1541
1541
  p.trend,
1542
1542
  (y = p.cells) == null ? void 0 : y.slice(1),
1543
1543
  p.trailing
@@ -1667,23 +1667,23 @@ function Vs({
1667
1667
  t: m,
1668
1668
  onClose: h
1669
1669
  }) {
1670
- const g = Qe(), [p, N] = $(""), y = O(
1671
- () => e.map((T, E) => ({
1670
+ const g = Qe(), [p, w] = $(""), y = O(
1671
+ () => e.map((T, D) => ({
1672
1672
  value: T.id,
1673
- label: mt(T, E, m)
1673
+ label: mt(T, D, m)
1674
1674
  })),
1675
1675
  [e, m]
1676
1676
  ), f = O(
1677
1677
  () => s ? Os(s, { t: m, pathologies: r, seriesByKey: o }) : [],
1678
1678
  [s, m, r, o]
1679
1679
  ), C = O(() => {
1680
- var R, u;
1681
- const T = (R = a[0]) == null ? void 0 : R.visit.dateIso, E = (u = a[a.length - 1]) == null ? void 0 : u.visit.dateIso, S = m("anamnesis.compare.selected", {
1680
+ var L, u;
1681
+ const T = (L = a[0]) == null ? void 0 : L.visit.dateIso, D = (u = a[a.length - 1]) == null ? void 0 : u.visit.dateIso, E = m("anamnesis.compare.selected", {
1682
1682
  total: a.length,
1683
1683
  from: T ? se(T, m) : "",
1684
- to: E ? se(E, m) : ""
1684
+ to: D ? se(D, m) : ""
1685
1685
  });
1686
- return a.length === 2 ? `${S} · ${m("anamnesis.compare.minimum")}` : S;
1686
+ return a.length === 2 ? `${E} · ${m("anamnesis.compare.minimum")}` : E;
1687
1687
  }, [a, m]), x = O(
1688
1688
  () => a.map((T) => /* @__PURE__ */ t(
1689
1689
  Nt,
@@ -1698,40 +1698,40 @@ function Vs({
1698
1698
  [a, m]
1699
1699
  ), A = O(() => {
1700
1700
  const T = [];
1701
- let E = null;
1702
- for (const S of f)
1703
- S.categoryId !== E && (E = S.categoryId, T.push({
1704
- key: `group-${S.categoryId}`,
1705
- banner: m(`anamnesis.compare.category.${S.categoryId}`)
1701
+ let D = null;
1702
+ for (const E of f)
1703
+ E.categoryId !== D && (D = E.categoryId, T.push({
1704
+ key: `group-${E.categoryId}`,
1705
+ banner: m(`anamnesis.compare.category.${E.categoryId}`)
1706
1706
  })), T.push({
1707
- key: S.id,
1707
+ key: E.id,
1708
1708
  header: /* @__PURE__ */ t(
1709
1709
  "th",
1710
1710
  {
1711
1711
  scope: "row",
1712
1712
  className: `${xn} ds:sticky ds:start-0 ds:z-[1] ds:bg-[color:var(--card)] ds:text-start ds:shadow-[var(--shadow-chrome-end)] ${je}`,
1713
1713
  children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
1714
- /* @__PURE__ */ t("span", { className: "type-label ds:break-words ds:text-[color:var(--foreground)]", children: S.item }),
1715
- S.meta ? /* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: S.meta }) : null
1714
+ /* @__PURE__ */ t("span", { className: "type-label ds:break-words ds:text-[color:var(--foreground)]", children: E.item }),
1715
+ E.meta ? /* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: E.meta }) : null
1716
1716
  ] })
1717
1717
  }
1718
1718
  ),
1719
- cells: S.values.map((R, u) => {
1720
- var v;
1719
+ cells: E.values.map((L, u) => {
1720
+ var N;
1721
1721
  return /* @__PURE__ */ t(
1722
1722
  "td",
1723
1723
  {
1724
1724
  className: `${ya} ${je} ds:tabular-nums`,
1725
- children: /* @__PURE__ */ t("span", { className: "type-body-sm ds:block ds:break-words ds:whitespace-normal ds:text-[color:var(--foreground)]", children: R })
1725
+ children: /* @__PURE__ */ t("span", { className: "type-body-sm ds:block ds:break-words ds:whitespace-normal ds:text-[color:var(--foreground)]", children: L })
1726
1726
  },
1727
- ((v = a[u]) == null ? void 0 : v.key) ?? u
1727
+ ((N = a[u]) == null ? void 0 : N.key) ?? u
1728
1728
  );
1729
1729
  }),
1730
- trend: /* @__PURE__ */ t("td", { className: `${kn} ${je}`, children: S.series && S.def ? /* @__PURE__ */ t(
1730
+ trend: /* @__PURE__ */ t("td", { className: `${kn} ${je}`, children: E.series && E.def ? /* @__PURE__ */ t(
1731
1731
  yt,
1732
1732
  {
1733
- series: S.series,
1734
- def: S.def,
1733
+ series: E.series,
1734
+ def: E.def,
1735
1735
  t: m,
1736
1736
  annotations: l,
1737
1737
  onSelectAnnotation: c
@@ -1741,8 +1741,8 @@ function Vs({
1741
1741
  "td",
1742
1742
  {
1743
1743
  className: `${ya} ${je} ${Is}`,
1744
- "data-change": S.change,
1745
- children: /* @__PURE__ */ t(qs, { row: S, t: m })
1744
+ "data-change": E.change,
1745
+ children: /* @__PURE__ */ t(qs, { row: E, t: m })
1746
1746
  }
1747
1747
  )
1748
1748
  });
@@ -1781,10 +1781,10 @@ function Vs({
1781
1781
  allowSelectAll: !0,
1782
1782
  onChange: (T) => {
1783
1783
  if (T.length >= 2) {
1784
- N(""), i(T);
1784
+ w(""), i(T);
1785
1785
  return;
1786
1786
  }
1787
- N(m("anamnesis.compare.minimum"));
1787
+ w(m("anamnesis.compare.minimum"));
1788
1788
  }
1789
1789
  }
1790
1790
  )
@@ -2017,16 +2017,16 @@ function Ys({
2017
2017
  annotations: g,
2018
2018
  onSelectAnnotation: p
2019
2019
  }) {
2020
- const N = Qe(), y = De(n), f = fn(e, a), C = e.visits, x = C.length - 1, A = m ?? Et(C), T = [];
2021
- let E = null;
2022
- const S = (u) => (o == null ? void 0 : o.visitIds.has(u)) ?? !1;
2020
+ const w = Qe(), y = De(n), f = fn(e, a), C = e.visits, x = C.length - 1, A = m ?? Et(C), T = [];
2021
+ let D = null;
2022
+ const E = (u) => (o == null ? void 0 : o.visitIds.has(u)) ?? !1;
2023
2023
  if (f.forEach((u) => {
2024
- u.def.group !== E && (E = u.def.group, T.push({
2024
+ u.def.group !== D && (D = u.def.group, T.push({
2025
2025
  key: `group-${u.def.group}`,
2026
2026
  banner: n(`anamnesis.group.${u.def.group}`)
2027
2027
  }));
2028
- const v = Qs(u.def.referenceRange, n, y), w = A.map((P, z) => {
2029
- const { visit: B, index: L } = P, F = u.cells[L] ?? js, V = L === x, j = h == null || h.has(u.def.key), ne = i && V && j && !u.def.computed, ve = !Ws(A, z), ce = o != null && o.changedCells.has(`${B.id}:${u.def.key}`), de = S(B.id);
2028
+ const N = Qs(u.def.referenceRange, n, y), k = A.map((S, z) => {
2029
+ const { visit: V, index: F } = S, P = u.cells[F] ?? js, B = F === x, j = h == null || h.has(u.def.key), ne = i && B && j && !u.def.computed, ve = !Ws(A, z), ce = o != null && o.changedCells.has(`${V.id}:${u.def.key}`), de = E(V.id);
2030
2030
  return /* @__PURE__ */ t(
2031
2031
  "td",
2032
2032
  {
@@ -2045,22 +2045,22 @@ function Ys({
2045
2045
  ga,
2046
2046
  {
2047
2047
  size: "sm",
2048
- value: F.value,
2048
+ value: P.value,
2049
2049
  mode: (u.def.precision ?? 0) > 0 ? "decimal" : "integer",
2050
2050
  "aria-label": n("anamnesis.grid.editCell", {
2051
2051
  parameter: ze(u.def, n)
2052
2052
  }),
2053
- onChange: (Y) => s == null ? void 0 : s(B, u.def, Y)
2053
+ onChange: (Y) => s == null ? void 0 : s(V, u.def, Y)
2054
2054
  }
2055
- ) : /* @__PURE__ */ t("span", { className: "type-body-sm ds:font-[var(--font-weight-medium)] ds:text-[color:var(--foreground)]", children: Ae(F.value, u.def.precision, y) }),
2055
+ ) : /* @__PURE__ */ t("span", { className: "type-body-sm ds:font-[var(--font-weight-medium)] ds:text-[color:var(--foreground)]", children: Ae(P.value, u.def.precision, y) }),
2056
2056
  /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
2057
- F.outOfRange ? /* @__PURE__ */ t(bn, { flag: F.outOfRange, t: n, compact: !0 }) : null,
2058
- ve ? null : /* @__PURE__ */ t(qa, { delta: F.delta, def: u.def, t: n }),
2057
+ P.outOfRange ? /* @__PURE__ */ t(bn, { flag: P.outOfRange, t: n, compact: !0 }) : null,
2058
+ ve ? null : /* @__PURE__ */ t(qa, { delta: P.delta, def: u.def, t: n }),
2059
2059
  ce ? /* @__PURE__ */ t("span", { className: "ds:sr-only", children: n("anamnesis.compare.changedCell") }) : null
2060
2060
  ] })
2061
2061
  ] })
2062
2062
  },
2063
- P.key
2063
+ S.key
2064
2064
  );
2065
2065
  });
2066
2066
  T.push({
@@ -2076,9 +2076,9 @@ function Ys({
2076
2076
  /* @__PURE__ */ t("span", { className: "type-label ds:text-[color:var(--foreground)]", children: ze(u.def, n) }),
2077
2077
  /* @__PURE__ */ d("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: [
2078
2078
  u.def.unit,
2079
- v ? /* @__PURE__ */ d(_e, { children: [
2079
+ N ? /* @__PURE__ */ d(_e, { children: [
2080
2080
  " · ",
2081
- v
2081
+ N
2082
2082
  ] }) : null
2083
2083
  ] }),
2084
2084
  u.target != null ? /* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: n("anamnesis.grid.target", {
@@ -2088,7 +2088,7 @@ function Ys({
2088
2088
  ] })
2089
2089
  }
2090
2090
  ),
2091
- cells: w,
2091
+ cells: k,
2092
2092
  trend: /* @__PURE__ */ t("td", { className: `${kn} ${je}`, children: /* @__PURE__ */ t(
2093
2093
  yt,
2094
2094
  {
@@ -2117,12 +2117,12 @@ function Ys({
2117
2117
  )
2118
2118
  }
2119
2119
  );
2120
- const R = A.map((u) => /* @__PURE__ */ t(
2120
+ const L = A.map((u) => /* @__PURE__ */ t(
2121
2121
  Nt,
2122
2122
  {
2123
2123
  column: u,
2124
2124
  t: n,
2125
- emphasised: S(u.visit.id),
2125
+ emphasised: E(u.visit.id),
2126
2126
  editable: i && u.index === x,
2127
2127
  defaultOpenNoteVisitId: l,
2128
2128
  onOpenNote: c
@@ -2132,12 +2132,12 @@ function Ys({
2132
2132
  return /* @__PURE__ */ t(
2133
2133
  Ct,
2134
2134
  {
2135
- captionId: N,
2135
+ captionId: w,
2136
2136
  caption: n("anamnesis.grid.caption"),
2137
2137
  identityLabel: n("anamnesis.grid.parameter"),
2138
2138
  trendLabel: n("anamnesis.grid.trend"),
2139
2139
  trendTestId: "anamnesis-grid-trend",
2140
- visitHeaders: R,
2140
+ visitHeaders: L,
2141
2141
  rows: T,
2142
2142
  framed: r
2143
2143
  }
@@ -2157,31 +2157,31 @@ function wn({
2157
2157
  onVisitSelectionChange: h,
2158
2158
  onOpenNote: g
2159
2159
  }) {
2160
- const { visits: p } = e, N = p.length >= 2, y = Qe(), f = Qe(), C = O(() => Pe(o), [o]), x = O(
2160
+ const { visits: p } = e, w = p.length >= 2, y = Qe(), f = Qe(), C = O(() => Pe(o), [o]), x = O(
2161
2161
  () => new Set(Ne(o).map((M) => M.key)),
2162
2162
  [o]
2163
- ), A = O(() => _a(o), [o]), [T, E] = $(r), [S, R] = $(""), u = we(null), v = we(null), w = we(!1);
2163
+ ), A = O(() => _a(o), [o]), [T, D] = $(r), [E, L] = $(""), u = we(null), N = we(null), k = we(!1);
2164
2164
  ia(() => {
2165
2165
  var M;
2166
- w.current && T && ((M = u.current) == null || M.scrollIntoView({ block: "start" })), w.current = !0;
2166
+ k.current && T && ((M = u.current) == null || M.scrollIntoView({ block: "start" })), k.current = !0;
2167
2167
  }, [T]);
2168
- const P = () => {
2168
+ const S = () => {
2169
2169
  var M;
2170
- E(!1), (M = v.current) == null || M.focus();
2171
- }, [z, B] = $(
2170
+ D(!1), (M = N.current) == null || M.focus();
2171
+ }, [z, V] = $(
2172
2172
  () => c ? [...c] : pa(p)
2173
- ), L = O(() => {
2173
+ ), F = O(() => {
2174
2174
  const M = z.filter(
2175
2175
  (H) => p.some((G) => G.id === H)
2176
2176
  );
2177
2177
  return M.length >= 2 ? M : pa(p);
2178
- }, [z, p]), F = O(
2179
- () => Ra(p, L).columns,
2180
- [p, L]
2181
- ), V = O(() => T ? Xi(
2182
- F.map((M) => M.visit),
2178
+ }, [z, p]), P = O(
2179
+ () => Ra(p, F).columns,
2180
+ [p, F]
2181
+ ), B = O(() => T ? Xi(
2182
+ P.map((M) => M.visit),
2183
2183
  C
2184
- ) : null, [T, F, C]), j = O(() => {
2184
+ ) : null, [T, P, C]), j = O(() => {
2185
2185
  const M = /* @__PURE__ */ new Map();
2186
2186
  for (const H of fn(e, C))
2187
2187
  M.set(H.def.key, H.series);
@@ -2196,9 +2196,9 @@ function wn({
2196
2196
  // A compared visit is always a column, so compare always marks its
2197
2197
  // columns in the grid — comparing a visit the picker left out brings
2198
2198
  // it back on screen rather than marking nothing.
2199
- alsoShowIds: T ? L : []
2199
+ alsoShowIds: T ? F : []
2200
2200
  }),
2201
- [p, de, T, L]
2201
+ [p, de, T, F]
2202
2202
  ), Ie = O(
2203
2203
  () => Y.columns.map((M) => M.visit.id),
2204
2204
  [Y]
@@ -2206,7 +2206,7 @@ function wn({
2206
2206
  ia(() => {
2207
2207
  h == null || h(Ie);
2208
2208
  }, [Ie, h]);
2209
- const D = O(
2209
+ const I = O(
2210
2210
  () => p.map((M, H) => ({
2211
2211
  value: M.id,
2212
2212
  label: mt(M, H, a, kt(M))
@@ -2241,18 +2241,18 @@ function wn({
2241
2241
  () => g ? (M) => g({ kind: "event", eventId: M }) : void 0,
2242
2242
  [g]
2243
2243
  ), da = O(() => {
2244
- if (!V) return null;
2244
+ if (!B) return null;
2245
2245
  const M = /* @__PURE__ */ new Set();
2246
- for (const H of V.numeric)
2246
+ for (const H of B.numeric)
2247
2247
  H.values.forEach((G, be) => {
2248
2248
  const Xe = be === 0 ? H.values[1] : H.values[be - 1];
2249
- G !== Xe && M.add(`${V.visits[be].id}:${H.def.key}`);
2249
+ G !== Xe && M.add(`${B.visits[be].id}:${H.def.key}`);
2250
2250
  });
2251
2251
  return {
2252
- visitIds: new Set(V.visits.map((H) => H.id)),
2252
+ visitIds: new Set(B.visits.map((H) => H.id)),
2253
2253
  changedCells: M
2254
2254
  };
2255
- }, [V]);
2255
+ }, [B]);
2256
2256
  return p.length === 0 ? /* @__PURE__ */ t("div", { className: "ds:w-full", "data-testid": "anamnesis-evolution-empty", children: /* @__PURE__ */ t(
2257
2257
  Ue,
2258
2258
  {
@@ -2262,7 +2262,7 @@ function wn({
2262
2262
  description: a("anamnesis.empty.noVisits.description")
2263
2263
  }
2264
2264
  ) }) : /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2265
- ce || N ? /* @__PURE__ */ d(
2265
+ ce || w ? /* @__PURE__ */ d(
2266
2266
  "div",
2267
2267
  {
2268
2268
  "data-testid": "anamnesis-evolution-toolbar",
@@ -2282,15 +2282,15 @@ function wn({
2282
2282
  children: /* @__PURE__ */ t(
2283
2283
  dn,
2284
2284
  {
2285
- options: D,
2285
+ options: I,
2286
2286
  value: de,
2287
2287
  allowSelectAll: !0,
2288
2288
  onChange: (M) => {
2289
2289
  if (M.length > 0) {
2290
- R(""), ve(M);
2290
+ L(""), ve(M);
2291
2291
  return;
2292
2292
  }
2293
- R(a("anamnesis.window.minimum"));
2293
+ L(a("anamnesis.window.minimum"));
2294
2294
  }
2295
2295
  }
2296
2296
  )
@@ -2302,13 +2302,13 @@ function wn({
2302
2302
  role: "status",
2303
2303
  "data-testid": "anamnesis-window-floor",
2304
2304
  className: "ds:sr-only",
2305
- children: S
2305
+ children: E
2306
2306
  }
2307
2307
  )
2308
2308
  ]
2309
2309
  }
2310
2310
  ) : null,
2311
- N ? (
2311
+ w ? (
2312
2312
  // The picker beside it is a FormField — label, control, then
2313
2313
  // description. A bare button in an `items-start` row top-aligns
2314
2314
  // with that LABEL and reads as floating above the control it acts
@@ -2320,14 +2320,14 @@ function wn({
2320
2320
  /* @__PURE__ */ t(
2321
2321
  Z,
2322
2322
  {
2323
- ref: v,
2323
+ ref: N,
2324
2324
  id: f,
2325
2325
  intent: T ? "primary" : "outline",
2326
2326
  "data-testid": "anamnesis-compare-toggle",
2327
2327
  "aria-pressed": T,
2328
2328
  "aria-expanded": T,
2329
2329
  "aria-controls": y,
2330
- onClick: () => E((M) => !M),
2330
+ onClick: () => D((M) => !M),
2331
2331
  children: a(T ? "anamnesis.compare.stop" : "anamnesis.compare.start")
2332
2332
  }
2333
2333
  )
@@ -2362,7 +2362,7 @@ function wn({
2362
2362
  onOpenNote: g
2363
2363
  }
2364
2364
  ),
2365
- N ? /* @__PURE__ */ t(ln, { open: T, onOpenChange: E, children: /* @__PURE__ */ t(
2365
+ w ? /* @__PURE__ */ t(ln, { open: T, onOpenChange: D, children: /* @__PURE__ */ t(
2366
2366
  cn,
2367
2367
  {
2368
2368
  ref: u,
@@ -2374,16 +2374,16 @@ function wn({
2374
2374
  Vs,
2375
2375
  {
2376
2376
  visits: p,
2377
- columns: F,
2378
- selectedIds: L,
2379
- onSelectionChange: B,
2380
- diff: V,
2377
+ columns: P,
2378
+ selectedIds: F,
2379
+ onSelectionChange: V,
2380
+ diff: B,
2381
2381
  seriesByKey: j,
2382
2382
  pathologies: A,
2383
2383
  annotations: Le,
2384
2384
  onSelectAnnotation: ka,
2385
2385
  t: a,
2386
- onClose: P
2386
+ onClose: S
2387
2387
  }
2388
2388
  )
2389
2389
  }
@@ -2680,7 +2680,7 @@ function Pa(e, a, n, i = []) {
2680
2680
  };
2681
2681
  }
2682
2682
  function no(e) {
2683
- var N;
2683
+ var w;
2684
2684
  const { record: a, audience: n, t: i, config: s } = e, o = e.generatedAtIso ?? (/* @__PURE__ */ new Date()).toISOString(), r = { audience: n, withheld: /* @__PURE__ */ new Set() };
2685
2685
  if (!ee(r, Ua))
2686
2686
  return Tn("summary", n, i);
@@ -2715,7 +2715,7 @@ function no(e) {
2715
2715
  emptyText: i("anamnesis.summary.noAnswers")
2716
2716
  });
2717
2717
  } else g || h.push(i("anamnesis.compile.noIntake"));
2718
- const p = Be(g == null ? void 0 : g.submittedAtIso) ?? Be((N = Ma(a)) == null ? void 0 : N.dateIso) ?? Be(o);
2718
+ const p = Be(g == null ? void 0 : g.submittedAtIso) ?? Be((w = Ma(a)) == null ? void 0 : w.dateIso) ?? Be(o);
2719
2719
  return Pa(
2720
2720
  {
2721
2721
  tab: "summary",
@@ -2822,7 +2822,7 @@ function to(e) {
2822
2822
  }), p.length > 0 && h.push(
2823
2823
  ja("visit", i("anamnesis.section.visitMeta"), p, i)
2824
2824
  );
2825
- const N = Ga(
2825
+ const w = Ga(
2826
2826
  "anthropometrics",
2827
2827
  i("anamnesis.section.anthropometrics"),
2828
2828
  Ne(s, "anthropometric"),
@@ -2831,7 +2831,7 @@ function to(e) {
2831
2831
  i,
2832
2832
  !1
2833
2833
  );
2834
- N && h.push(N);
2834
+ w && h.push(w);
2835
2835
  const y = Ga(
2836
2836
  "dietary",
2837
2837
  i("anamnesis.section.dietary"),
@@ -2870,11 +2870,11 @@ function to(e) {
2870
2870
  }), ie(x.stage) && A.push({
2871
2871
  cells: [i("anamnesis.field.stage.label"), ie(x.stage)]
2872
2872
  }), x.metastases) {
2873
- const T = i(`anamnesis.common.${x.metastases.present}`), E = ie(x.metastases.site);
2873
+ const T = i(`anamnesis.common.${x.metastases.present}`), D = ie(x.metastases.site);
2874
2874
  A.push({
2875
2875
  cells: [
2876
2876
  i("anamnesis.field.metastases.label"),
2877
- E ? `${T} — ${E}` : T
2877
+ D ? `${T} — ${D}` : T
2878
2878
  ]
2879
2879
  });
2880
2880
  }
@@ -2941,7 +2941,7 @@ function to(e) {
2941
2941
  }), ee(r, "annual.programme")) {
2942
2942
  const x = m.annualProgramme, A = [];
2943
2943
  if (x) {
2944
- const T = (E) => i(E ? "anamnesis.common.yes" : "anamnesis.common.no");
2944
+ const T = (D) => i(D ? "anamnesis.common.yes" : "anamnesis.common.no");
2945
2945
  A.push({
2946
2946
  cells: [
2947
2947
  i("anamnesis.field.annualProposed.label"),
@@ -3026,7 +3026,7 @@ function oo(e) {
3026
3026
  const { record: a, audience: n, t: i, config: s } = e, o = e.generatedAtIso ?? (/* @__PURE__ */ new Date()).toISOString(), r = e.scope ?? "selected", l = { audience: n, withheld: /* @__PURE__ */ new Set() };
3027
3027
  if (!ee(l, Ua))
3028
3028
  return Tn("evolution", n, i);
3029
- const { meta: c, patientName: m } = Cn(a, l, i, o), h = [], g = [], p = e.selectedVisitIds ? [...e.selectedVisitIds] : null, N = p && p.length > 0 ? p : pa(a.visits), y = r === "all" ? Et(a.visits) : Ra(a.visits, N).columns;
3029
+ const { meta: c, patientName: m } = Cn(a, l, i, o), h = [], g = [], p = e.selectedVisitIds ? [...e.selectedVisitIds] : null, w = p && p.length > 0 ? p : pa(a.visits), y = r === "all" ? Et(a.visits) : Ra(a.visits, w).columns;
3030
3030
  if (c.push({
3031
3031
  label: i("anamnesis.export.visitsLabel"),
3032
3032
  value: r === "all" ? i("anamnesis.export.visitsAll", { total: a.visits.length }) : i("anamnesis.export.visitsSelected", {
@@ -3034,16 +3034,16 @@ function oo(e) {
3034
3034
  total: a.visits.length
3035
3035
  })
3036
3036
  }), ee(l, "visit.date") && y.length > 0) {
3037
- const x = Pe(s), A = fn(a, x), T = se(y[0].visit.dateIso, i), E = se(y[y.length - 1].visit.dateIso, i), S = [
3037
+ const x = Pe(s), A = fn(a, x), T = se(y[0].visit.dateIso, i), D = se(y[y.length - 1].visit.dateIso, i), E = [
3038
3038
  { key: "parameter", header: i("anamnesis.grid.parameter") },
3039
3039
  { key: "unit", header: i("anamnesis.export.column.unit") },
3040
3040
  {
3041
3041
  key: "referenceRange",
3042
3042
  header: i("anamnesis.export.column.referenceRange")
3043
3043
  },
3044
- ...y.map((v) => ({
3045
- key: `visit-${v.visit.id}`,
3046
- header: se(v.visit.dateIso, i),
3044
+ ...y.map((N) => ({
3045
+ key: `visit-${N.visit.id}`,
3046
+ header: se(N.visit.dateIso, i),
3047
3047
  numeric: !0
3048
3048
  })),
3049
3049
  {
@@ -3055,34 +3055,34 @@ function oo(e) {
3055
3055
  key: "change",
3056
3056
  header: i("anamnesis.export.column.change", {
3057
3057
  from: T,
3058
- to: E
3058
+ to: D
3059
3059
  }),
3060
3060
  numeric: !0
3061
3061
  },
3062
3062
  { key: "outOfRange", header: i("anamnesis.export.column.outOfRange") }
3063
- ], R = [];
3063
+ ], L = [];
3064
3064
  let u = null;
3065
- for (const v of A)
3066
- ee(l, Dt(v.def)) && (v.def.group !== u && (u = v.def.group, R.push(It(i(`anamnesis.group.${v.def.group}`)))), R.push({
3067
- precision: v.def.precision,
3065
+ for (const N of A)
3066
+ ee(l, Dt(N.def)) && (N.def.group !== u && (u = N.def.group, L.push(It(i(`anamnesis.group.${N.def.group}`)))), L.push({
3067
+ precision: N.def.precision,
3068
3068
  cells: [
3069
- ze(v.def, i),
3070
- v.def.unit ?? null,
3071
- Rt(v.def, i),
3072
- ...y.map((w) => {
3073
- var P;
3074
- return ((P = v.cells[w.index]) == null ? void 0 : P.value) ?? null;
3069
+ ze(N.def, i),
3070
+ N.def.unit ?? null,
3071
+ Rt(N.def, i),
3072
+ ...y.map((k) => {
3073
+ var S;
3074
+ return ((S = N.cells[k.index]) == null ? void 0 : S.value) ?? null;
3075
3075
  }),
3076
- v.target,
3077
- so(v, y),
3078
- io(v, y, i)
3076
+ N.target,
3077
+ so(N, y),
3078
+ io(N, y, i)
3079
3079
  ]
3080
3080
  }));
3081
3081
  h.push({
3082
3082
  id: "matrix",
3083
3083
  title: i("anamnesis.section.evolution"),
3084
- columns: S,
3085
- rows: R,
3084
+ columns: E,
3085
+ rows: L,
3086
3086
  emptyText: i("anamnesis.export.none")
3087
3087
  });
3088
3088
  } else y.length === 0 && g.push(i("anamnesis.export.none"));
@@ -3243,15 +3243,15 @@ async function wo(e) {
3243
3243
  m.font = { bold: !0 }, c.views = [{ state: "frozen", ySplit: 1 }], l.rows.length === 0 && l.emptyText && c.addRow([l.emptyText]);
3244
3244
  for (const h of l.rows) {
3245
3245
  if (h.kind === "section") {
3246
- const N = c.addRow([h.cells[0] ?? null]);
3247
- N.font = { bold: !0 };
3246
+ const w = c.addRow([h.cells[0] ?? null]);
3247
+ w.font = { bold: !0 };
3248
3248
  continue;
3249
3249
  }
3250
- const g = l.columns.map((N, y) => h.cells[y] ?? null), p = c.addRow(g);
3251
- l.columns.forEach((N, y) => {
3250
+ const g = l.columns.map((w, y) => h.cells[y] ?? null), p = c.addRow(g);
3251
+ l.columns.forEach((w, y) => {
3252
3252
  const f = p.getCell(y + 1);
3253
3253
  if (typeof g[y] != "number") return;
3254
- const C = vo(Pt(h, N));
3254
+ const C = vo(Pt(h, w));
3255
3255
  C && (f.numFmt = C), f.alignment = { horizontal: "right" };
3256
3256
  });
3257
3257
  }
@@ -3452,11 +3452,11 @@ async function $t(e, a = {}) {
3452
3452
  g += Me, h("normal", Kn, s.mutedText), r.text(qe(f.emptyText), te, g), g += 1;
3453
3453
  continue;
3454
3454
  }
3455
- const C = /* @__PURE__ */ new Set(), x = f.rows.map((E, S) => E.kind === "section" ? (C.add(S), [
3456
- _t(E.cells[0] ?? null, void 0, o),
3455
+ const C = /* @__PURE__ */ new Set(), x = f.rows.map((D, E) => D.kind === "section" ? (C.add(E), [
3456
+ _t(D.cells[0] ?? null, void 0, o),
3457
3457
  ...f.columns.slice(1).map(() => "")
3458
- ]) : Fo(E, f, o)), A = {}, T = {
3459
- head: [f.columns.map((E) => qe(E.header))],
3458
+ ]) : Fo(D, f, o)), A = {}, T = {
3459
+ head: [f.columns.map((D) => qe(D.header))],
3460
3460
  body: x,
3461
3461
  startY: g + 2,
3462
3462
  margin: { left: te, right: te, bottom: te + Me },
@@ -3477,16 +3477,16 @@ async function $t(e, a = {}) {
3477
3477
  },
3478
3478
  alternateRowStyles: { fillColor: s.zebraFill },
3479
3479
  columnStyles: Object.fromEntries(
3480
- f.columns.map((E, S) => [
3481
- S,
3482
- E.numeric ? { halign: "right" } : {}
3480
+ f.columns.map((D, E) => [
3481
+ E,
3482
+ D.numeric ? { halign: "right" } : {}
3483
3483
  ])
3484
3484
  ),
3485
- didParseCell: (E) => {
3486
- E.section === "body" && C.has(E.row.index) && (E.cell.styles.fillColor = s.sectionFill, E.cell.styles.textColor = s.headerText, E.cell.styles.fontStyle = "bold");
3485
+ didParseCell: (D) => {
3486
+ D.section === "body" && C.has(D.row.index) && (D.cell.styles.fillColor = s.sectionFill, D.cell.styles.textColor = s.headerText, D.cell.styles.fontStyle = "bold");
3487
3487
  },
3488
- didDrawPage: (E) => {
3489
- A.table = E.table;
3488
+ didDrawPage: (D) => {
3489
+ A.table = D.table;
3490
3490
  }
3491
3491
  };
3492
3492
  i(r, T), g = ((y = A.table) == null ? void 0 : y.finalY) ?? g + Me;
@@ -3499,10 +3499,10 @@ async function $t(e, a = {}) {
3499
3499
  }
3500
3500
  const p = qe(
3501
3501
  [e.patientName, e.audienceLabel].filter(Boolean).join(" · ")
3502
- ), N = r.getNumberOfPages();
3503
- for (let f = 1; f <= N; f += 1)
3502
+ ), w = r.getNumberOfPages();
3503
+ for (let f = 1; f <= w; f += 1)
3504
3504
  r.setPage(f), h("normal", Hn, s.mutedText), p && r.text(p, te, c - te + 4), r.text(
3505
- `${f} / ${N}`,
3505
+ `${f} / ${w}`,
3506
3506
  l - te,
3507
3507
  c - te + 4,
3508
3508
  { align: "right" }
@@ -3532,14 +3532,14 @@ function $o({
3532
3532
  defaultShareOpen: r = !1,
3533
3533
  defaultAudience: l = "clinician"
3534
3534
  }) {
3535
- const [c, m] = $(l), [h, g] = $(!1), [p, N] = $(o), [y, f] = $(r), [C, x] = $(l), [A, T] = $({ text: "", seq: 0 }), E = we(null), S = we(null), R = we(null), u = we(!1), v = Qe();
3535
+ const [c, m] = $(l), [h, g] = $(!1), [p, w] = $(o), [y, f] = $(r), [C, x] = $(l), [A, T] = $({ text: "", seq: 0 }), D = we(null), E = we(null), L = we(null), u = we(!1), N = Qe();
3536
3536
  ia(
3537
3537
  () => () => {
3538
- R.current && URL.revokeObjectURL(R.current);
3538
+ L.current && URL.revokeObjectURL(L.current);
3539
3539
  },
3540
3540
  []
3541
3541
  );
3542
- const w = na(
3542
+ const k = na(
3543
3543
  (U) => ro(e, {
3544
3544
  record: a,
3545
3545
  audience: U,
@@ -3549,46 +3549,46 @@ function $o({
3549
3549
  scope: h ? "all" : "selected"
3550
3550
  }),
3551
3551
  [e, a, n, i, s, h]
3552
- ), P = n(`anamnesis.export.tab.${e}`), z = n("anamnesis.export.control.audienceBadge"), B = O(
3553
- () => p ? qn(w("patient"), n).excluded : [],
3554
- [p, w, n]
3555
- ), L = {
3556
- clinician: B.length > 0 ? n("anamnesis.export.control.holds", {
3557
- list: B.join(n("anamnesis.export.listSeparator"))
3552
+ ), S = n(`anamnesis.export.tab.${e}`), z = n("anamnesis.export.control.audienceBadge"), V = O(
3553
+ () => p ? qn(k("patient"), n).excluded : [],
3554
+ [p, k, n]
3555
+ ), F = {
3556
+ clinician: V.length > 0 ? n("anamnesis.export.control.holds", {
3557
+ list: V.join(n("anamnesis.export.listSeparator"))
3558
3558
  }) : n("anamnesis.export.control.holdsNone"),
3559
- patient: B.length > 0 ? n("anamnesis.export.control.excludes", {
3560
- list: B.join(n("anamnesis.export.listSeparator"))
3559
+ patient: V.length > 0 ? n("anamnesis.export.control.excludes", {
3560
+ list: V.join(n("anamnesis.export.listSeparator"))
3561
3561
  }) : n("anamnesis.export.control.excludesNone")
3562
- }, F = O(
3563
- () => y ? qn(w(C), n) : { included: [], excluded: [] },
3564
- [y, w, C, n]
3565
- ), V = (U) => T((J) => ({ text: U, seq: J.seq + 1 })), j = (U, J) => {
3562
+ }, P = O(
3563
+ () => y ? qn(k(C), n) : { included: [], excluded: [] },
3564
+ [y, k, C, n]
3565
+ ), B = (U) => T((J) => ({ text: U, seq: J.seq + 1 })), j = (U, J) => {
3566
3566
  if (u.current) return;
3567
3567
  u.current = !0;
3568
- const me = w(c);
3568
+ const me = k(c);
3569
3569
  Promise.resolve(J(me)).then(
3570
- (le) => V(
3570
+ (le) => B(
3571
3571
  le ? n("anamnesis.export.control.ready", {
3572
3572
  file: `${me.fileStem}.${U}`
3573
3573
  }) : n("anamnesis.export.control.failed")
3574
3574
  )
3575
- ).catch(() => V(n("anamnesis.export.control.failed"))).finally(() => {
3575
+ ).catch(() => B(n("anamnesis.export.control.failed"))).finally(() => {
3576
3576
  u.current = !1;
3577
3577
  });
3578
- }, ne = () => To(E.current), ve = () => j("pdf", (U) => Po(U, { palette: ne() })), ce = () => j("xlsx", Co), de = () => j("csv", No), Y = () => {
3579
- u.current || (u.current = !0, _o(w(c), S.current, { palette: ne() }).then((U) => {
3578
+ }, ne = () => To(D.current), ve = () => j("pdf", (U) => Po(U, { palette: ne() })), ce = () => j("xlsx", Co), de = () => j("csv", No), Y = () => {
3579
+ u.current || (u.current = !0, _o(k(c), E.current, { palette: ne() }).then((U) => {
3580
3580
  if (!U) {
3581
- V(n("anamnesis.export.control.failed"));
3581
+ B(n("anamnesis.export.control.failed"));
3582
3582
  return;
3583
3583
  }
3584
- R.current && URL.revokeObjectURL(R.current), R.current = U, V(n("anamnesis.export.control.printing"));
3585
- }).catch(() => V(n("anamnesis.export.control.failed"))).finally(() => {
3584
+ L.current && URL.revokeObjectURL(L.current), L.current = U, B(n("anamnesis.export.control.printing"));
3585
+ }).catch(() => B(n("anamnesis.export.control.failed"))).finally(() => {
3586
3586
  u.current = !1;
3587
3587
  }));
3588
3588
  }, Ie = () => {
3589
3589
  x(c), f(!0);
3590
- }, D = () => {
3591
- m(C), f(!1), V(
3590
+ }, I = () => {
3591
+ m(C), f(!1), B(
3592
3592
  n("anamnesis.export.share.confirmed", {
3593
3593
  audience: n(`anamnesis.export.audience.${C}`)
3594
3594
  })
@@ -3597,7 +3597,7 @@ function $o({
3597
3597
  return /* @__PURE__ */ d(
3598
3598
  "div",
3599
3599
  {
3600
- ref: E,
3600
+ ref: D,
3601
3601
  "data-component": "anamnesis-export-menu",
3602
3602
  "data-tab": e,
3603
3603
  "data-audience": c,
@@ -3616,7 +3616,7 @@ function $o({
3616
3616
  oe.Root,
3617
3617
  {
3618
3618
  open: p,
3619
- onOpenChange: N,
3619
+ onOpenChange: w,
3620
3620
  modal: !o,
3621
3621
  children: [
3622
3622
  /* @__PURE__ */ t(oe.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
@@ -3626,8 +3626,8 @@ function $o({
3626
3626
  intent: "outline",
3627
3627
  size: "sm",
3628
3628
  endIcon: /* @__PURE__ */ t(mn, { "aria-hidden": "true" }),
3629
- "aria-label": c === "clinician" ? n("anamnesis.export.control.triggerLabel", { tab: P }) : n("anamnesis.export.control.triggerLabelAudience", {
3630
- tab: P,
3629
+ "aria-label": c === "clinician" ? n("anamnesis.export.control.triggerLabel", { tab: S }) : n("anamnesis.export.control.triggerLabelAudience", {
3630
+ tab: S,
3631
3631
  audience: z
3632
3632
  }),
3633
3633
  "data-testid": "anamnesis-export-trigger",
@@ -3635,7 +3635,7 @@ function $o({
3635
3635
  }
3636
3636
  ) }),
3637
3637
  /* @__PURE__ */ d(oe.Content, { align: "end", children: [
3638
- /* @__PURE__ */ t(oe.Label, { children: n("anamnesis.export.control.menuLabel", { tab: P }) }),
3638
+ /* @__PURE__ */ t(oe.Label, { children: n("anamnesis.export.control.menuLabel", { tab: S }) }),
3639
3639
  /* @__PURE__ */ t(oe.Separator, {}),
3640
3640
  /* @__PURE__ */ t(oe.Label, { children: n("anamnesis.export.audienceLabel") }),
3641
3641
  /* @__PURE__ */ t(
@@ -3647,7 +3647,7 @@ function $o({
3647
3647
  oe.RadioItem,
3648
3648
  {
3649
3649
  value: U,
3650
- "aria-describedby": `${v}-${U}`,
3650
+ "aria-describedby": `${N}-${U}`,
3651
3651
  onSelect: (J) => J.preventDefault(),
3652
3652
  children: n(`anamnesis.export.audience.${U}`)
3653
3653
  },
@@ -3655,13 +3655,13 @@ function $o({
3655
3655
  ))
3656
3656
  }
3657
3657
  ),
3658
- /* @__PURE__ */ t(oe.Label, { "data-testid": "anamnesis-export-disclosure", children: L[c === "patient" ? "patient" : "clinician"] }),
3658
+ /* @__PURE__ */ t(oe.Label, { "data-testid": "anamnesis-export-disclosure", children: F[c === "patient" ? "patient" : "clinician"] }),
3659
3659
  on.map((U) => /* @__PURE__ */ t(
3660
3660
  "span",
3661
3661
  {
3662
- id: `${v}-${U}`,
3662
+ id: `${N}-${U}`,
3663
3663
  className: "ds:sr-only",
3664
- children: L[U]
3664
+ children: F[U]
3665
3665
  },
3666
3666
  U
3667
3667
  )),
@@ -3731,16 +3731,16 @@ function $o({
3731
3731
  onOpenChange: f,
3732
3732
  audience: C,
3733
3733
  onAudienceChange: x,
3734
- preview: F,
3735
- onConfirm: D,
3736
- tabName: P,
3734
+ preview: P,
3735
+ onConfirm: I,
3736
+ tabName: S,
3737
3737
  t: n
3738
3738
  }
3739
3739
  ),
3740
3740
  /* @__PURE__ */ t(
3741
3741
  "iframe",
3742
3742
  {
3743
- ref: S,
3743
+ ref: E,
3744
3744
  title: n("anamnesis.export.control.printFrame"),
3745
3745
  "aria-hidden": "true",
3746
3746
  tabIndex: -1,
@@ -3896,7 +3896,7 @@ function zt({
3896
3896
  {
3897
3897
  disabled: o,
3898
3898
  value: p,
3899
- onChange: (N) => n({ kind: "text", text: N.target.value })
3899
+ onChange: (w) => n({ kind: "text", text: w.target.value })
3900
3900
  }
3901
3901
  ) });
3902
3902
  break;
@@ -3910,7 +3910,7 @@ function zt({
3910
3910
  value: p,
3911
3911
  autoResize: !0,
3912
3912
  minRows: 2,
3913
- onChange: (N) => n({ kind: "text", text: N.target.value })
3913
+ onChange: (w) => n({ kind: "text", text: w.target.value })
3914
3914
  }
3915
3915
  ) });
3916
3916
  break;
@@ -3924,13 +3924,13 @@ function zt({
3924
3924
  value: p,
3925
3925
  min: 0,
3926
3926
  mode: e.decimal || Vo.has(e.key) ? "decimal" : "integer",
3927
- onChange: (N) => n({ kind: "number", value: N })
3927
+ onChange: (w) => n({ kind: "number", value: w })
3928
3928
  }
3929
3929
  ) });
3930
3930
  break;
3931
3931
  }
3932
3932
  case "frequency": {
3933
- const p = (a == null ? void 0 : a.kind) === "frequency" ? a.perWeek : null, N = (a == null ? void 0 : a.kind) === "frequency" ? a.detail ?? "" : "";
3933
+ const p = (a == null ? void 0 : a.kind) === "frequency" ? a.perWeek : null, w = (a == null ? void 0 : a.kind) === "frequency" ? a.detail ?? "" : "";
3934
3934
  g = /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
3935
3935
  /* @__PURE__ */ t(q, { label: l, description: c, children: /* @__PURE__ */ t(
3936
3936
  ga,
@@ -3943,7 +3943,7 @@ function zt({
3943
3943
  onChange: (y) => n({
3944
3944
  kind: "frequency",
3945
3945
  perWeek: y,
3946
- detail: N || void 0
3946
+ detail: w || void 0
3947
3947
  })
3948
3948
  }
3949
3949
  ) }),
@@ -3951,7 +3951,7 @@ function zt({
3951
3951
  ae,
3952
3952
  {
3953
3953
  disabled: o,
3954
- value: N,
3954
+ value: w,
3955
3955
  onChange: (y) => n({
3956
3956
  kind: "frequency",
3957
3957
  perWeek: p,
@@ -3963,7 +3963,7 @@ function zt({
3963
3963
  break;
3964
3964
  }
3965
3965
  case "yesNoDetail": {
3966
- const p = (a == null ? void 0 : a.kind) === "yesNo" ? a.present : "unknown", N = (a == null ? void 0 : a.kind) === "yesNo" ? a.detail ?? "" : "";
3966
+ const p = (a == null ? void 0 : a.kind) === "yesNo" ? a.present : "unknown", w = (a == null ? void 0 : a.kind) === "yesNo" ? a.detail ?? "" : "";
3967
3967
  g = /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
3968
3968
  /* @__PURE__ */ d(
3969
3969
  ha,
@@ -3976,7 +3976,7 @@ function zt({
3976
3976
  onValueChange: (y) => n({
3977
3977
  kind: "yesNo",
3978
3978
  present: y,
3979
- detail: N || void 0
3979
+ detail: w || void 0
3980
3980
  }),
3981
3981
  children: [
3982
3982
  /* @__PURE__ */ t(
@@ -4010,7 +4010,7 @@ function zt({
4010
4010
  ae,
4011
4011
  {
4012
4012
  disabled: o,
4013
- value: N,
4013
+ value: w,
4014
4014
  onChange: (y) => n({
4015
4015
  kind: "yesNo",
4016
4016
  present: p,
@@ -4022,7 +4022,7 @@ function zt({
4022
4022
  break;
4023
4023
  }
4024
4024
  case "choice": {
4025
- const p = (a == null ? void 0 : a.kind) === "choice" ? a.selected ?? "" : "", N = (a == null ? void 0 : a.kind) === "choice" ? a.detail ?? "" : "", y = (e.options ?? []).map((f) => ({
4025
+ const p = (a == null ? void 0 : a.kind) === "choice" ? a.selected ?? "" : "", w = (a == null ? void 0 : a.kind) === "choice" ? a.detail ?? "" : "", y = (e.options ?? []).map((f) => ({
4026
4026
  value: f,
4027
4027
  // A practice-added option has no kit translation; show it verbatim
4028
4028
  // rather than the unresolved key.
@@ -4041,7 +4041,7 @@ function zt({
4041
4041
  onValueChange: (f) => n({
4042
4042
  kind: "choice",
4043
4043
  selected: f || null,
4044
- detail: N || void 0
4044
+ detail: w || void 0
4045
4045
  })
4046
4046
  }
4047
4047
  ) }),
@@ -4049,7 +4049,7 @@ function zt({
4049
4049
  ae,
4050
4050
  {
4051
4051
  disabled: o,
4052
- value: N,
4052
+ value: w,
4053
4053
  onChange: (f) => n({
4054
4054
  kind: "choice",
4055
4055
  selected: p,
@@ -4061,7 +4061,7 @@ function zt({
4061
4061
  break;
4062
4062
  }
4063
4063
  case "multiChoice": {
4064
- const p = (a == null ? void 0 : a.kind) === "multiChoice" ? a.selected : [], N = (y) => n({
4064
+ const p = (a == null ? void 0 : a.kind) === "multiChoice" ? a.selected : [], w = (y) => n({
4065
4065
  kind: "multiChoice",
4066
4066
  selected: p.includes(y) ? p.filter((f) => f !== y) : [...p, y]
4067
4067
  });
@@ -4076,7 +4076,7 @@ function zt({
4076
4076
  defaultValue: y
4077
4077
  }),
4078
4078
  checked: p.includes(y),
4079
- onCheckedChange: () => N(y)
4079
+ onCheckedChange: () => w(y)
4080
4080
  },
4081
4081
  y
4082
4082
  )) })
@@ -4084,7 +4084,7 @@ function zt({
4084
4084
  break;
4085
4085
  }
4086
4086
  case "meal": {
4087
- const p = (a == null ? void 0 : a.kind) === "meal" ? a.time : "", N = (a == null ? void 0 : a.kind) === "meal" ? a.description : "";
4087
+ const p = (a == null ? void 0 : a.kind) === "meal" ? a.time : "", w = (a == null ? void 0 : a.kind) === "meal" ? a.description : "";
4088
4088
  g = /* @__PURE__ */ d("fieldset", { className: "ds:m-0 ds:border-0 ds:p-0", children: [
4089
4089
  /* @__PURE__ */ t("legend", { className: "type-label ds:mb-[var(--spacing-2xs)] ds:text-[color:var(--foreground)]", children: l }),
4090
4090
  /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:sm:flex-row ds:sm:items-start", children: [
@@ -4096,7 +4096,7 @@ function zt({
4096
4096
  onChange: (y) => n({
4097
4097
  kind: "meal",
4098
4098
  time: qo(y),
4099
- description: N
4099
+ description: w
4100
4100
  })
4101
4101
  }
4102
4102
  ) }),
@@ -4104,7 +4104,7 @@ function zt({
4104
4104
  ae,
4105
4105
  {
4106
4106
  disabled: o,
4107
- value: N,
4107
+ value: w,
4108
4108
  onChange: (y) => n({
4109
4109
  kind: "meal",
4110
4110
  time: p,
@@ -4226,7 +4226,7 @@ function Ot({
4226
4226
  t: s,
4227
4227
  onCommit: o
4228
4228
  }) {
4229
- const [r, l] = $(!1), [c, m] = $(n), h = jo(e), g = Wo(c, h), p = !Qo(c, n), N = Te(e, s), y = Yo(h, e), f = (x) => {
4229
+ const [r, l] = $(!1), [c, m] = $(n), h = jo(e), g = Wo(c, h), p = !Qo(c, n), w = Te(e, s), y = Yo(h, e), f = (x) => {
4230
4230
  x && m(n), l(x);
4231
4231
  }, C = (x) => {
4232
4232
  o(x), l(!1);
@@ -4250,7 +4250,7 @@ function Ot({
4250
4250
  "data-testid": `anamnesis-target-form-${e.key}`,
4251
4251
  children: [
4252
4252
  /* @__PURE__ */ t(ge.Close, {}),
4253
- /* @__PURE__ */ t(ge.Heading, { children: s("anamnesis.targets.editTitle", { parameter: N }) }),
4253
+ /* @__PURE__ */ t(ge.Heading, { children: s("anamnesis.targets.editTitle", { parameter: w }) }),
4254
4254
  /* @__PURE__ */ t(ge.Description, { children: i }),
4255
4255
  /* @__PURE__ */ d("div", { className: "ds:mt-[var(--spacing-md)] ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
4256
4256
  /* @__PURE__ */ t(
@@ -4375,7 +4375,7 @@ function Zo({ def: e, visits: a, target: n, t: i, onTargetChange: s }) {
4375
4375
  committed: n,
4376
4376
  nowLabel: g,
4377
4377
  t: i,
4378
- onCommit: (N) => s(e, N)
4378
+ onCommit: (w) => s(e, w)
4379
4379
  }
4380
4380
  )
4381
4381
  }
@@ -4438,7 +4438,7 @@ function Qa({
4438
4438
  }) {
4439
4439
  const c = De(o);
4440
4440
  return /* @__PURE__ */ t("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: a.filter((m) => !m.computed).map((m) => {
4441
- const h = $e(n, m), g = i ? $e(i, m) : null, p = i ? ba(h, g, m) : null, N = va(h, m.referenceRange), y = s.get(m.key) ?? null, f = Te(m, o), C = l != null && Oi(m.key) && !e.has(m.key);
4441
+ const h = $e(n, m), g = i ? $e(i, m) : null, p = i ? ba(h, g, m) : null, w = va(h, m.referenceRange), y = s.get(m.key) ?? null, f = Te(m, o), C = l != null && Oi(m.key) && !e.has(m.key);
4442
4442
  return /* @__PURE__ */ d(
4443
4443
  "div",
4444
4444
  {
@@ -4453,7 +4453,7 @@ function Qa({
4453
4453
  }
4454
4454
  ) }),
4455
4455
  /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
4456
- N ? /* @__PURE__ */ t(bn, { flag: N, t: o }) : null,
4456
+ w ? /* @__PURE__ */ t(bn, { flag: w, t: o }) : null,
4457
4457
  /* @__PURE__ */ t(qa, { delta: p, def: m, t: o }),
4458
4458
  C || y != null ? /* @__PURE__ */ d("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
4459
4459
  /* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: y == null ? o("anamnesis.targets.unset") : o("anamnesis.grid.target", {
@@ -4554,7 +4554,7 @@ function ar({
4554
4554
  practitioners: h,
4555
4555
  newVisitDateIso: g,
4556
4556
  defaultView: p = "summary",
4557
- defaultExportMenuOpen: N = !1,
4557
+ defaultExportMenuOpen: w = !1,
4558
4558
  defaultShareOpen: y = !1,
4559
4559
  defaultExportAudience: f = "clinician"
4560
4560
  }) {
@@ -4569,55 +4569,55 @@ function ar({
4569
4569
  }
4570
4570
  m == null || m(C);
4571
4571
  }, [C]);
4572
- const T = we(0), { patient: E, visits: S } = C, R = S[S.length - 1], u = S.length > 1 ? S[S.length - 2] : void 0, v = O(
4573
- () => new Map(C.targets.map((b) => [b.parameterKey, b.target])),
4572
+ const T = we(0), { patient: D, visits: E } = C, L = E[E.length - 1], u = E.length > 1 ? E[E.length - 2] : void 0, N = O(
4573
+ () => new Map(C.targets.map((v) => [v.parameterKey, v.target])),
4574
4574
  [C.targets]
4575
- ), w = O(
4575
+ ), k = O(
4576
4576
  () => Ne(i, "anthropometric"),
4577
4577
  [i]
4578
- ), P = O(
4578
+ ), S = O(
4579
4579
  () => Ne(i, "dietary"),
4580
4580
  [i]
4581
- ), z = O(() => Ne(i, "lab"), [i]), B = O(() => Mt(i), [i]), L = O(
4582
- () => new Set(B.map((b) => b.key)),
4583
- [B]
4584
- ), F = O(
4585
- () => Mn(R, z),
4586
- [R, z]
4587
- ), [V, j] = $(() => {
4588
- const b = Mn(R, z), k = {};
4589
- for (const I of xt) k[I] = b[I].open;
4590
- return k;
4581
+ ), z = O(() => Ne(i, "lab"), [i]), V = O(() => Mt(i), [i]), F = O(
4582
+ () => new Set(V.map((v) => v.key)),
4583
+ [V]
4584
+ ), P = O(
4585
+ () => Mn(L, z),
4586
+ [L, z]
4587
+ ), [B, j] = $(() => {
4588
+ const v = Mn(L, z), b = {};
4589
+ for (const R of xt) b[R] = v[R].open;
4590
+ return b;
4591
4591
  }), ne = na(
4592
- (b) => (k) => j((I) => ({ ...I, [b]: k })),
4592
+ (v) => (b) => j((R) => ({ ...R, [v]: b })),
4593
4593
  []
4594
4594
  ), ve = O(
4595
4595
  () => Ge(i),
4596
4596
  [i]
4597
- ), ce = O(() => hn(i), [i]), de = O(() => _a(i), [i]), [Y, Ie] = $(p), [D, U] = $(!0), [J, me] = $([]), le = na((b) => {
4597
+ ), ce = O(() => hn(i), [i]), de = O(() => _a(i), [i]), [Y, Ie] = $(p), [I, U] = $(!0), [J, me] = $([]), le = na((v) => {
4598
4598
  me(
4599
- (k) => k.length === b.length && k.every((I, K) => I === b[K]) ? k : [...b]
4599
+ (b) => b.length === v.length && b.every((R, K) => R === v[K]) ? b : [...v]
4600
4600
  );
4601
4601
  }, []), { containerRef: Re, requestJump: Le } = ht(), Fe = na(
4602
- (b) => {
4603
- var k, I;
4604
- return (I = (k = C.intake) == null ? void 0 : k.answers[b]) == null ? void 0 : I.value;
4602
+ (v) => {
4603
+ var b, R;
4604
+ return (R = (b = C.intake) == null ? void 0 : b.answers[v]) == null ? void 0 : R.value;
4605
4605
  },
4606
4606
  [C.intake]
4607
4607
  ), ka = O(
4608
- () => ms(ve, Fe, E.sex, a),
4609
- [ve, Fe, E.sex, a]
4608
+ () => ms(ve, Fe, D.sex, a),
4609
+ [ve, Fe, D.sex, a]
4610
4610
  ), da = O(
4611
- () => pt(ce, Fe, E.sex, a),
4612
- [ce, Fe, E.sex, a]
4613
- ), [M] = $(() => new Set(da.map((b) => b.key))), H = (b) => {
4611
+ () => pt(ce, Fe, D.sex, a),
4612
+ [ce, Fe, D.sex, a]
4613
+ ), [M] = $(() => new Set(da.map((v) => v.key))), H = (v) => {
4614
4614
  if (c) {
4615
- c(b);
4615
+ c(v);
4616
4616
  return;
4617
4617
  }
4618
- Ie("compile"), U(!0), Le(b.key);
4618
+ Ie("compile"), U(!0), Le(v.key);
4619
4619
  };
4620
- if (!R)
4620
+ if (!L)
4621
4621
  return /* @__PURE__ */ t(Wn, { embedded: n, children: /* @__PURE__ */ t(ye, { variant: "elevated", children: /* @__PURE__ */ t(ye.Body, { children: /* @__PURE__ */ t(
4622
4622
  Ue,
4623
4623
  {
@@ -4627,42 +4627,42 @@ function ar({
4627
4627
  description: a("anamnesis.empty.noRecord.description")
4628
4628
  }
4629
4629
  ) }) }) });
4630
- const G = (b) => {
4631
- x((k) => {
4632
- if (k.visits.length === 0) return k;
4633
- const I = k.visits.slice();
4634
- return I[I.length - 1] = b(I[I.length - 1]), { ...k, visits: I };
4630
+ const G = (v) => {
4631
+ x((b) => {
4632
+ if (b.visits.length === 0) return b;
4633
+ const R = b.visits.slice();
4634
+ return R[R.length - 1] = v(R[R.length - 1]), { ...b, visits: R };
4635
4635
  });
4636
- }, be = (b, k) => G((I) => Pn(I, b, k)), Xe = (b, k, I) => x((K) => ({
4636
+ }, be = (v, b) => G((R) => Pn(R, v, b)), Xe = (v, b, R) => x((K) => ({
4637
4637
  ...K,
4638
4638
  visits: K.visits.map(
4639
- (Je) => Je.id === b.id ? Pn(Je, k, I) : Je
4639
+ (Je) => Je.id === v.id ? Pn(Je, b, R) : Je
4640
4640
  )
4641
- })), Ka = (b, k) => {
4642
- x((I) => ct(I, b.key, k)), s == null || s(b.key, k);
4643
- }, Ht = (b) => G((k) => ({ ...k, pathologyCodes: b })), Dn = (b, k) => G((I) => ({
4644
- ...I,
4645
- therapy: I.therapy.map((K) => K.id === b ? { ...K, ...k } : K)
4646
- })), Gt = (b) => G((k) => ({
4647
- ...k,
4648
- therapy: k.therapy.filter((I) => I.id !== b)
4641
+ })), Ka = (v, b) => {
4642
+ x((R) => ct(R, v.key, b)), s == null || s(v.key, b);
4643
+ }, Ht = (v) => G((b) => ({ ...b, pathologyCodes: v })), Dn = (v, b) => G((R) => ({
4644
+ ...R,
4645
+ therapy: R.therapy.map((K) => K.id === v ? { ...K, ...b } : K)
4646
+ })), Gt = (v) => G((b) => ({
4647
+ ...b,
4648
+ therapy: b.therapy.filter((R) => R.id !== v)
4649
4649
  })), jt = () => {
4650
4650
  T.current += 1;
4651
- const b = `new-${T.current}`;
4652
- G((k) => ({
4653
- ...k,
4654
- therapy: [...k.therapy, { id: b, name: "", dose: "", kind: "medication" }]
4651
+ const v = `new-${T.current}`;
4652
+ G((b) => ({
4653
+ ...b,
4654
+ therapy: [...b.therapy, { id: v, name: "", dose: "", kind: "medication" }]
4655
4655
  }));
4656
4656
  }, Wt = () => {
4657
4657
  T.current += 1;
4658
- const b = `new-visit-${T.current}`;
4659
- x((k) => {
4660
- const I = k.visits[k.visits.length - 1];
4661
- if (!I) return k;
4658
+ const v = `new-visit-${T.current}`;
4659
+ x((b) => {
4660
+ const R = b.visits[b.visits.length - 1];
4661
+ if (!R) return b;
4662
4662
  const K = {
4663
- id: b,
4663
+ id: v,
4664
4664
  visitType: "followUp",
4665
- dateIso: g ?? I.dateIso,
4665
+ dateIso: g ?? R.dateIso,
4666
4666
  anthropometrics: {
4667
4667
  weightKg: null,
4668
4668
  heightCm: null,
@@ -4676,46 +4676,46 @@ function ar({
4676
4676
  therapy: [],
4677
4677
  fmdCycles: []
4678
4678
  };
4679
- return { ...k, visits: [...k.visits, K] };
4679
+ return { ...b, visits: [...b.visits, K] };
4680
4680
  });
4681
- }, Qt = (b, k) => {
4682
- x((I) => {
4681
+ }, Qt = (v, b) => {
4682
+ x((R) => {
4683
4683
  var K;
4684
4684
  return {
4685
- ...I,
4685
+ ...R,
4686
4686
  intake: {
4687
- ...I.intake,
4687
+ ...R.intake,
4688
4688
  answers: {
4689
- ...(K = I.intake) == null ? void 0 : K.answers,
4690
- [b]: { value: k, origin: "clinician" }
4689
+ ...(K = R.intake) == null ? void 0 : K.answers,
4690
+ [v]: { value: b, origin: "clinician" }
4691
4691
  }
4692
4692
  }
4693
4693
  };
4694
4694
  });
4695
4695
  }, Yt = Vi(i).map(
4696
- (b) => {
4697
- const k = de[b], I = k == null ? void 0 : k.parentCode;
4696
+ (v) => {
4697
+ const b = de[v], R = b == null ? void 0 : b.parentCode;
4698
4698
  return {
4699
- value: b,
4700
- label: Se(b, a, k),
4701
- group: I ? yn(I, a, de[I]) : a("anamnesis.pathology.groupGeneral")
4699
+ value: v,
4700
+ label: Se(v, a, b),
4701
+ group: R ? yn(R, a, de[R]) : a("anamnesis.pathology.groupGeneral")
4702
4702
  };
4703
4703
  }
4704
- ), wa = R.oncological ?? {}, Na = R.annualProgramme ?? {
4704
+ ), wa = L.oncological ?? {}, Na = L.annualProgramme ?? {
4705
4705
  proposed: !1,
4706
4706
  accepted: !1
4707
4707
  }, Xt = /* @__PURE__ */ d(_e, { children: [
4708
4708
  !n || r ? /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-end ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
4709
4709
  n ? /* @__PURE__ */ t("span", {}) : /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
4710
4710
  /* @__PURE__ */ d("h1", { className: "type-title-page ds:m-0 ds:text-[color:var(--foreground)]", children: [
4711
- E.firstName,
4711
+ D.firstName,
4712
4712
  " ",
4713
- E.lastName
4713
+ D.lastName
4714
4714
  ] }),
4715
4715
  /* @__PURE__ */ d("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: [
4716
4716
  Oa(C, a),
4717
4717
  " · ",
4718
- a("anamnesis.compile.visitCount", { visits: S.length })
4718
+ a("anamnesis.compile.visitCount", { visits: E.length })
4719
4719
  ] })
4720
4720
  ] }),
4721
4721
  r ? /* @__PURE__ */ t(
@@ -4730,9 +4730,9 @@ function ar({
4730
4730
  o ? null : /* @__PURE__ */ t(
4731
4731
  qt,
4732
4732
  {
4733
- visits: S,
4734
- defs: B,
4735
- targets: v,
4733
+ visits: E,
4734
+ defs: V,
4735
+ targets: N,
4736
4736
  t: a,
4737
4737
  onTargetChange: Ka
4738
4738
  }
@@ -4741,7 +4741,7 @@ function ar({
4741
4741
  W,
4742
4742
  {
4743
4743
  value: Y,
4744
- onValueChange: (b) => Ie(b),
4744
+ onValueChange: (v) => Ie(v),
4745
4745
  children: [
4746
4746
  /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
4747
4747
  /* @__PURE__ */ d(W.List, { "aria-label": a("anamnesis.compile.viewsLabel"), children: [
@@ -4757,7 +4757,7 @@ function ar({
4757
4757
  t: a,
4758
4758
  config: i,
4759
4759
  shownVisitIds: J,
4760
- defaultOpen: N,
4760
+ defaultOpen: w,
4761
4761
  defaultShareOpen: y,
4762
4762
  defaultAudience: f
4763
4763
  }
@@ -4768,7 +4768,7 @@ function ar({
4768
4768
  {
4769
4769
  intake: C.intake,
4770
4770
  sections: ve,
4771
- sex: E.sex,
4771
+ sex: D.sex,
4772
4772
  digest: ka,
4773
4773
  missing: da,
4774
4774
  onJump: H,
@@ -4791,10 +4791,10 @@ function ar({
4791
4791
  label: a("anamnesis.visitType.followUp")
4792
4792
  }
4793
4793
  ],
4794
- value: R.visitType,
4795
- onValueChange: (b) => G((k) => ({
4796
- ...k,
4797
- visitType: b || "followUp"
4794
+ value: L.visitType,
4795
+ onValueChange: (v) => G((b) => ({
4796
+ ...b,
4797
+ visitType: v || "followUp"
4798
4798
  }))
4799
4799
  }
4800
4800
  ) }),
@@ -4802,29 +4802,29 @@ function ar({
4802
4802
  Ve,
4803
4803
  {
4804
4804
  options: h,
4805
- value: R.practitioner ?? "",
4806
- onValueChange: (b) => G((k) => ({
4807
- ...k,
4808
- practitioner: b || void 0
4805
+ value: L.practitioner ?? "",
4806
+ onValueChange: (v) => G((b) => ({
4807
+ ...b,
4808
+ practitioner: v || void 0
4809
4809
  }))
4810
4810
  }
4811
4811
  ) : /* @__PURE__ */ t(
4812
4812
  ae,
4813
4813
  {
4814
- value: R.practitioner ?? "",
4815
- onChange: (b) => G((k) => ({
4816
- ...k,
4817
- practitioner: b.target.value
4814
+ value: L.practitioner ?? "",
4815
+ onChange: (v) => G((b) => ({
4816
+ ...b,
4817
+ practitioner: v.target.value
4818
4818
  }))
4819
4819
  }
4820
4820
  ) }),
4821
4821
  /* @__PURE__ */ t(q, { label: a("anamnesis.header.visitDate"), children: /* @__PURE__ */ t(
4822
4822
  ni,
4823
4823
  {
4824
- value: ns(R.dateIso),
4825
- onChange: (b) => b && G((k) => ({
4826
- ...k,
4827
- dateIso: is(b) + ts(k.dateIso)
4824
+ value: ns(L.dateIso),
4825
+ onChange: (v) => v && G((b) => ({
4826
+ ...b,
4827
+ dateIso: is(v) + ts(b.dateIso)
4828
4828
  }))
4829
4829
  }
4830
4830
  ) })
@@ -4846,7 +4846,7 @@ function ar({
4846
4846
  {
4847
4847
  titleKey: "anamnesis.section.intakeGaps",
4848
4848
  t: a,
4849
- open: D,
4849
+ open: I,
4850
4850
  onOpenChange: U,
4851
4851
  fill: da.length,
4852
4852
  fillKind: "outstanding",
@@ -4857,33 +4857,33 @@ function ar({
4857
4857
  {
4858
4858
  ref: Re,
4859
4859
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]",
4860
- children: ce.map((b) => {
4861
- const k = b.fields.filter((I) => ca(I, E.sex)).filter((I) => M.has(I.key));
4862
- return k.length === 0 ? null : /* @__PURE__ */ d(
4860
+ children: ce.map((v) => {
4861
+ const b = v.fields.filter((R) => ca(R, D.sex)).filter((R) => M.has(R.key));
4862
+ return b.length === 0 ? null : /* @__PURE__ */ d(
4863
4863
  "div",
4864
4864
  {
4865
4865
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
4866
4866
  children: [
4867
- /* @__PURE__ */ t("h3", { className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]", children: fe(b, a) }),
4868
- k.map((I) => {
4867
+ /* @__PURE__ */ t("h3", { className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]", children: fe(v, a) }),
4868
+ b.map((R) => {
4869
4869
  var Je;
4870
- const K = (Je = C.intake) == null ? void 0 : Je.answers[I.key];
4870
+ const K = (Je = C.intake) == null ? void 0 : Je.answers[R.key];
4871
4871
  return /* @__PURE__ */ t(
4872
4872
  zt,
4873
4873
  {
4874
- def: I,
4874
+ def: R,
4875
4875
  answer: K == null ? void 0 : K.value,
4876
4876
  origin: K == null ? void 0 : K.origin,
4877
4877
  showOrigin: !0,
4878
- onChange: (Jt) => Qt(I.key, Jt),
4878
+ onChange: (Jt) => Qt(R.key, Jt),
4879
4879
  t: a
4880
4880
  },
4881
- I.key
4881
+ R.key
4882
4882
  );
4883
4883
  })
4884
4884
  ]
4885
4885
  },
4886
- b.key
4886
+ v.key
4887
4887
  );
4888
4888
  })
4889
4889
  }
@@ -4896,25 +4896,25 @@ function ar({
4896
4896
  /* @__PURE__ */ t(
4897
4897
  Qa,
4898
4898
  {
4899
- stripKeys: L,
4900
- defs: w,
4901
- visit: R,
4899
+ stripKeys: F,
4900
+ defs: k,
4901
+ visit: L,
4902
4902
  previous: u,
4903
- targets: v,
4903
+ targets: N,
4904
4904
  t: a,
4905
4905
  onChange: be,
4906
4906
  onTargetChange: Ka
4907
4907
  }
4908
4908
  )
4909
4909
  ] }),
4910
- P.length > 0 ? /* @__PURE__ */ t(he, { titleKey: "anamnesis.section.dietary", t: a, children: /* @__PURE__ */ t(
4910
+ S.length > 0 ? /* @__PURE__ */ t(he, { titleKey: "anamnesis.section.dietary", t: a, children: /* @__PURE__ */ t(
4911
4911
  Qa,
4912
4912
  {
4913
- stripKeys: L,
4914
- defs: P,
4915
- visit: R,
4913
+ stripKeys: F,
4914
+ defs: S,
4915
+ visit: L,
4916
4916
  previous: u,
4917
- targets: v,
4917
+ targets: N,
4918
4918
  t: a,
4919
4919
  onChange: be,
4920
4920
  onTargetChange: Ka
@@ -4929,7 +4929,7 @@ function ar({
4929
4929
  dn,
4930
4930
  {
4931
4931
  options: Yt,
4932
- value: R.pathologyCodes,
4932
+ value: L.pathologyCodes,
4933
4933
  allowClear: !0,
4934
4934
  placeholder: a(
4935
4935
  "anamnesis.compile.pathologiesPlaceholder"
@@ -4944,19 +4944,19 @@ function ar({
4944
4944
  {
4945
4945
  titleKey: "anamnesis.section.oncological",
4946
4946
  t: a,
4947
- open: V.oncological,
4947
+ open: B.oncological,
4948
4948
  onOpenChange: ne("oncological"),
4949
- fill: F.oncological.fill,
4949
+ fill: P.oncological.fill,
4950
4950
  children: /* @__PURE__ */ d("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
4951
4951
  /* @__PURE__ */ t(q, { label: a("anamnesis.field.tumourType.label"), children: /* @__PURE__ */ t(
4952
4952
  ae,
4953
4953
  {
4954
4954
  value: wa.tumourType ?? "",
4955
- onChange: (b) => G((k) => ({
4956
- ...k,
4955
+ onChange: (v) => G((b) => ({
4956
+ ...b,
4957
4957
  oncological: {
4958
- ...k.oncological,
4959
- tumourType: b.target.value
4958
+ ...b.oncological,
4959
+ tumourType: v.target.value
4960
4960
  }
4961
4961
  }))
4962
4962
  }
@@ -4965,11 +4965,11 @@ function ar({
4965
4965
  ae,
4966
4966
  {
4967
4967
  value: wa.stage ?? "",
4968
- onChange: (b) => G((k) => ({
4969
- ...k,
4968
+ onChange: (v) => G((b) => ({
4969
+ ...b,
4970
4970
  oncological: {
4971
- ...k.oncological,
4972
- stage: b.target.value
4971
+ ...b.oncological,
4972
+ stage: v.target.value
4973
4973
  }
4974
4974
  }))
4975
4975
  }
@@ -4980,15 +4980,15 @@ function ar({
4980
4980
  label: a("anamnesis.field.metastases.label"),
4981
4981
  variant: "horizontal",
4982
4982
  value: ((In = wa.metastases) == null ? void 0 : In.present) ?? "unknown",
4983
- onValueChange: (b) => G((k) => {
4984
- var I, K;
4983
+ onValueChange: (v) => G((b) => {
4984
+ var R, K;
4985
4985
  return {
4986
- ...k,
4986
+ ...b,
4987
4987
  oncological: {
4988
- ...k.oncological,
4988
+ ...b.oncological,
4989
4989
  metastases: {
4990
- present: b,
4991
- site: (K = (I = k.oncological) == null ? void 0 : I.metastases) == null ? void 0 : K.site
4990
+ present: v,
4991
+ site: (K = (R = b.oncological) == null ? void 0 : R.metastases) == null ? void 0 : K.site
4992
4992
  }
4993
4993
  }
4994
4994
  };
@@ -5014,11 +5014,11 @@ function ar({
5014
5014
  ae,
5015
5015
  {
5016
5016
  value: wa.treatmentStatus ?? "",
5017
- onChange: (b) => G((k) => ({
5018
- ...k,
5017
+ onChange: (v) => G((b) => ({
5018
+ ...b,
5019
5019
  oncological: {
5020
- ...k.oncological,
5021
- treatmentStatus: b.target.value
5020
+ ...b.oncological,
5021
+ treatmentStatus: v.target.value
5022
5022
  }
5023
5023
  }))
5024
5024
  }
@@ -5029,7 +5029,7 @@ function ar({
5029
5029
  }
5030
5030
  ),
5031
5031
  /* @__PURE__ */ t(he, { titleKey: "anamnesis.section.therapy", t: a, children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
5032
- R.therapy.length === 0 ? /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: a("anamnesis.compile.noTherapy") }) : R.therapy.map((b) => /* @__PURE__ */ d(
5032
+ L.therapy.length === 0 ? /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: a("anamnesis.compile.noTherapy") }) : L.therapy.map((v) => /* @__PURE__ */ d(
5033
5033
  "div",
5034
5034
  {
5035
5035
  className: "ds:flex ds:flex-wrap ds:items-end ds:gap-[var(--spacing-sm)]",
@@ -5041,9 +5041,9 @@ function ar({
5041
5041
  children: /* @__PURE__ */ t(
5042
5042
  ae,
5043
5043
  {
5044
- value: b.name,
5045
- onChange: (k) => Dn(b.id, {
5046
- name: k.target.value
5044
+ value: v.name,
5045
+ onChange: (b) => Dn(v.id, {
5046
+ name: b.target.value
5047
5047
  })
5048
5048
  }
5049
5049
  )
@@ -5052,18 +5052,18 @@ function ar({
5052
5052
  /* @__PURE__ */ t(q, { label: a("anamnesis.field.medDose.label"), children: /* @__PURE__ */ t(
5053
5053
  ae,
5054
5054
  {
5055
- value: b.dose ?? "",
5056
- onChange: (k) => Dn(b.id, {
5057
- dose: k.target.value
5055
+ value: v.dose ?? "",
5056
+ onChange: (b) => Dn(v.id, {
5057
+ dose: b.target.value
5058
5058
  })
5059
5059
  }
5060
5060
  ) }),
5061
5061
  /* @__PURE__ */ t(
5062
5062
  Q,
5063
5063
  {
5064
- variant: b.kind === "medication" ? "info" : "neutral",
5064
+ variant: v.kind === "medication" ? "info" : "neutral",
5065
5065
  size: "md",
5066
- children: a(`anamnesis.medKind.${b.kind}`)
5066
+ children: a(`anamnesis.medKind.${v.kind}`)
5067
5067
  }
5068
5068
  ),
5069
5069
  /* @__PURE__ */ t(
@@ -5072,14 +5072,14 @@ function ar({
5072
5072
  icon: /* @__PURE__ */ t(xi, { "aria-hidden": "true" }),
5073
5073
  intent: "ghost",
5074
5074
  "aria-label": a("anamnesis.compile.removeTherapy", {
5075
- name: b.name
5075
+ name: v.name
5076
5076
  }),
5077
- onClick: () => Gt(b.id)
5077
+ onClick: () => Gt(v.id)
5078
5078
  }
5079
5079
  )
5080
5080
  ]
5081
5081
  },
5082
- b.id
5082
+ v.id
5083
5083
  )),
5084
5084
  /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
5085
5085
  Z,
@@ -5097,18 +5097,18 @@ function ar({
5097
5097
  {
5098
5098
  titleKey: "anamnesis.section.labs",
5099
5099
  t: a,
5100
- open: V.labs,
5100
+ open: B.labs,
5101
5101
  onOpenChange: ne("labs"),
5102
- fill: F.labs.fill,
5103
- flagged: F.labs.flagged,
5102
+ fill: P.labs.fill,
5103
+ flagged: P.labs.flagged,
5104
5104
  children: /* @__PURE__ */ t(
5105
5105
  Qa,
5106
5106
  {
5107
- stripKeys: L,
5107
+ stripKeys: F,
5108
5108
  defs: z,
5109
- visit: R,
5109
+ visit: L,
5110
5110
  previous: u,
5111
- targets: v,
5111
+ targets: N,
5112
5112
  t: a,
5113
5113
  onChange: be
5114
5114
  }
@@ -5120,21 +5120,21 @@ function ar({
5120
5120
  {
5121
5121
  titleKey: "anamnesis.section.fmd",
5122
5122
  t: a,
5123
- open: V.fmd,
5123
+ open: B.fmd,
5124
5124
  onOpenChange: ne("fmd"),
5125
- fill: F.fmd.fill,
5126
- children: R.fmdCycles.length === 0 ? /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: a("anamnesis.compile.noFmd") }) : /* @__PURE__ */ t("ul", { className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0", children: R.fmdCycles.map((b) => /* @__PURE__ */ d(
5125
+ fill: P.fmd.fill,
5126
+ children: L.fmdCycles.length === 0 ? /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: a("anamnesis.compile.noFmd") }) : /* @__PURE__ */ t("ul", { className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0", children: L.fmdCycles.map((v) => /* @__PURE__ */ d(
5127
5127
  "li",
5128
5128
  {
5129
5129
  className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]",
5130
5130
  children: [
5131
5131
  /* @__PURE__ */ t("span", { className: "type-label ds:text-[color:var(--foreground)]", children: a("anamnesis.compile.cycleNumber", {
5132
- number: b.cycleNumber
5132
+ number: v.cycleNumber
5133
5133
  }) }),
5134
5134
  /* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: /* @__PURE__ */ t(
5135
5135
  sa,
5136
5136
  {
5137
- value: b.startDateIso,
5137
+ value: v.startDateIso,
5138
5138
  format: "absolute",
5139
5139
  shape: "bare",
5140
5140
  absoluteFormat: $a
@@ -5143,15 +5143,15 @@ function ar({
5143
5143
  /* @__PURE__ */ t(
5144
5144
  Q,
5145
5145
  {
5146
- variant: b.completed ? "success" : "warning",
5146
+ variant: v.completed ? "success" : "warning",
5147
5147
  size: "sm",
5148
5148
  withDot: !0,
5149
- children: b.completed ? a("anamnesis.compile.cycleCompleted") : a("anamnesis.compile.cycleInProgress")
5149
+ children: v.completed ? a("anamnesis.compile.cycleCompleted") : a("anamnesis.compile.cycleInProgress")
5150
5150
  }
5151
5151
  )
5152
5152
  ]
5153
5153
  },
5154
- b.cycleNumber
5154
+ v.cycleNumber
5155
5155
  )) })
5156
5156
  }
5157
5157
  ),
@@ -5163,12 +5163,12 @@ function ar({
5163
5163
  children: /* @__PURE__ */ t(
5164
5164
  ta,
5165
5165
  {
5166
- value: R.nutritionalProposal ?? "",
5166
+ value: L.nutritionalProposal ?? "",
5167
5167
  autoResize: !0,
5168
5168
  minRows: 2,
5169
- onChange: (b) => G((k) => ({
5170
- ...k,
5171
- nutritionalProposal: b.target.value
5169
+ onChange: (v) => G((b) => ({
5170
+ ...b,
5171
+ nutritionalProposal: v.target.value
5172
5172
  }))
5173
5173
  }
5174
5174
  )
@@ -5177,12 +5177,12 @@ function ar({
5177
5177
  /* @__PURE__ */ t(q, { label: a("anamnesis.field.clinicalNotes.label"), children: /* @__PURE__ */ t(
5178
5178
  ta,
5179
5179
  {
5180
- value: R.clinicalNotes ?? "",
5180
+ value: L.clinicalNotes ?? "",
5181
5181
  autoResize: !0,
5182
5182
  minRows: 2,
5183
- onChange: (b) => G((k) => ({
5184
- ...k,
5185
- clinicalNotes: b.target.value
5183
+ onChange: (v) => G((b) => ({
5184
+ ...b,
5185
+ clinicalNotes: v.target.value
5186
5186
  }))
5187
5187
  }
5188
5188
  ) })
@@ -5192,9 +5192,9 @@ function ar({
5192
5192
  {
5193
5193
  titleKey: "anamnesis.section.annual",
5194
5194
  t: a,
5195
- open: V.annual,
5195
+ open: B.annual,
5196
5196
  onOpenChange: ne("annual"),
5197
- fill: F.annual.fill,
5197
+ fill: P.annual.fill,
5198
5198
  children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
5199
5199
  /* @__PURE__ */ d(
5200
5200
  ha,
@@ -5202,14 +5202,14 @@ function ar({
5202
5202
  label: a("anamnesis.field.annualProposed.label"),
5203
5203
  variant: "horizontal",
5204
5204
  value: Na.proposed ? "yes" : "no",
5205
- onValueChange: (b) => G((k) => {
5206
- var I, K;
5205
+ onValueChange: (v) => G((b) => {
5206
+ var R, K;
5207
5207
  return {
5208
- ...k,
5208
+ ...b,
5209
5209
  annualProgramme: {
5210
- proposed: b === "yes",
5211
- accepted: ((I = k.annualProgramme) == null ? void 0 : I.accepted) ?? !1,
5212
- declineReason: (K = k.annualProgramme) == null ? void 0 : K.declineReason
5210
+ proposed: v === "yes",
5211
+ accepted: ((R = b.annualProgramme) == null ? void 0 : R.accepted) ?? !1,
5212
+ declineReason: (K = b.annualProgramme) == null ? void 0 : K.declineReason
5213
5213
  }
5214
5214
  };
5215
5215
  }),
@@ -5225,14 +5225,14 @@ function ar({
5225
5225
  label: a("anamnesis.field.annualAccepted.label"),
5226
5226
  variant: "horizontal",
5227
5227
  value: Na.accepted ? "yes" : "no",
5228
- onValueChange: (b) => G((k) => {
5229
- var I, K;
5228
+ onValueChange: (v) => G((b) => {
5229
+ var R, K;
5230
5230
  return {
5231
- ...k,
5231
+ ...b,
5232
5232
  annualProgramme: {
5233
- proposed: ((I = k.annualProgramme) == null ? void 0 : I.proposed) ?? !1,
5234
- accepted: b === "yes",
5235
- declineReason: (K = k.annualProgramme) == null ? void 0 : K.declineReason
5233
+ proposed: ((R = b.annualProgramme) == null ? void 0 : R.proposed) ?? !1,
5234
+ accepted: v === "yes",
5235
+ declineReason: (K = b.annualProgramme) == null ? void 0 : K.declineReason
5236
5236
  }
5237
5237
  };
5238
5238
  }),
@@ -5252,14 +5252,14 @@ function ar({
5252
5252
  value: Na.declineReason ?? "",
5253
5253
  autoResize: !0,
5254
5254
  minRows: 2,
5255
- onChange: (b) => G((k) => {
5256
- var I, K;
5255
+ onChange: (v) => G((b) => {
5256
+ var R, K;
5257
5257
  return {
5258
- ...k,
5258
+ ...b,
5259
5259
  annualProgramme: {
5260
- proposed: ((I = k.annualProgramme) == null ? void 0 : I.proposed) ?? !1,
5261
- accepted: ((K = k.annualProgramme) == null ? void 0 : K.accepted) ?? !1,
5262
- declineReason: b.target.value
5260
+ proposed: ((R = b.annualProgramme) == null ? void 0 : R.proposed) ?? !1,
5261
+ accepted: ((K = b.annualProgramme) == null ? void 0 : K.accepted) ?? !1,
5262
+ declineReason: v.target.value
5263
5263
  }
5264
5264
  };
5265
5265
  })
@@ -5313,54 +5313,54 @@ function Vt({
5313
5313
  jumpToField: r,
5314
5314
  readOnly: l = !1
5315
5315
  }) {
5316
- const { patient: c } = e, m = Ma(e), [h, g] = $(() => Qn(e)), [p, N] = $(e);
5317
- e !== p && (N(e), g(Qn(e)));
5316
+ const { patient: c } = e, m = Ma(e), [h, g] = $(() => Qn(e)), [p, w] = $(e.intake);
5317
+ e.intake !== p && (w(e.intake), g(Qn(e)));
5318
5318
  const [y, f] = $(
5319
5319
  () => {
5320
- var F;
5321
- return ((F = e.intake) == null ? void 0 : F.submittedAtIso) != null;
5320
+ var P;
5321
+ return ((P = e.intake) == null ? void 0 : P.submittedAtIso) != null;
5322
5322
  }
5323
- ), C = (F, V) => {
5324
- g((j) => ({ ...j, [F]: V }));
5323
+ ), C = (P, B) => {
5324
+ g((j) => ({ ...j, [P]: B }));
5325
5325
  }, x = O(
5326
- () => hn(i).map((F) => ({
5327
- ...F,
5328
- fields: F.fields.filter((V) => ca(V, c.sex))
5329
- })).filter((F) => F.fields.length > 0),
5326
+ () => hn(i).map((P) => ({
5327
+ ...P,
5328
+ fields: P.fields.filter((B) => ca(B, c.sex))
5329
+ })).filter((P) => P.fields.length > 0),
5330
5330
  [i, c.sex]
5331
5331
  ), [A, T] = $(
5332
5332
  () => {
5333
- var F;
5334
- return s ?? ((F = x[0]) == null ? void 0 : F.key) ?? "";
5333
+ var P;
5334
+ return s ?? ((P = x[0]) == null ? void 0 : P.key) ?? "";
5335
5335
  }
5336
- ), { containerRef: E, requestJump: S } = ht(), R = O(
5336
+ ), { containerRef: D, requestJump: E } = ht(), L = O(
5337
5337
  () => pt(
5338
5338
  x,
5339
- (F) => h[F],
5339
+ (P) => h[P],
5340
5340
  c.sex,
5341
5341
  a
5342
5342
  ),
5343
5343
  [x, h, c.sex, a]
5344
- ), u = (F) => {
5345
- T(F.sectionKey), S(F.key);
5344
+ ), u = (P) => {
5345
+ T(P.sectionKey), E(P.key);
5346
5346
  };
5347
5347
  ia(() => {
5348
5348
  if (!r) return;
5349
- const F = x.find(
5350
- (V) => V.fields.some((j) => j.key === r)
5349
+ const P = x.find(
5350
+ (B) => B.fields.some((j) => j.key === r)
5351
5351
  );
5352
- F && (T(F.key), S(r));
5352
+ P && (T(P.key), E(r));
5353
5353
  }, [r]);
5354
- const { answeredCount: v, totalCount: w } = O(() => {
5355
- let F = 0, V = 0;
5354
+ const { answeredCount: N, totalCount: k } = O(() => {
5355
+ let P = 0, B = 0;
5356
5356
  for (const j of x)
5357
5357
  for (const ne of j.fields)
5358
- V += 1, ra(h[ne.key]) && (F += 1);
5359
- return { answeredCount: F, totalCount: V };
5360
- }, [x, h]), P = w === 0 ? 0 : Math.round(v / w * 100), z = a("anamnesis.intake.answered", {
5361
- answered: v,
5362
- total: w
5363
- }), B = R.length > 0 && (v > 0 || y), L = /* @__PURE__ */ d(_e, { children: [
5358
+ B += 1, ra(h[ne.key]) && (P += 1);
5359
+ return { answeredCount: P, totalCount: B };
5360
+ }, [x, h]), S = k === 0 ? 0 : Math.round(N / k * 100), z = a("anamnesis.intake.answered", {
5361
+ answered: N,
5362
+ total: k
5363
+ }), V = L.length > 0 && (N > 0 || y), F = /* @__PURE__ */ d(_e, { children: [
5364
5364
  n ? null : /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
5365
5365
  /* @__PURE__ */ t("h1", { className: "type-title-page ds:m-0 ds:text-[color:var(--foreground)]", children: a("anamnesis.intake.title") }),
5366
5366
  /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: a("anamnesis.intake.subtitle") })
@@ -5404,7 +5404,7 @@ function Vt({
5404
5404
  ] }) : null
5405
5405
  ] }),
5406
5406
  /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
5407
- /* @__PURE__ */ t(Ti, { value: P, ariaLabel: z }),
5407
+ /* @__PURE__ */ t(Ti, { value: S, ariaLabel: z }),
5408
5408
  /* @__PURE__ */ t(
5409
5409
  "p",
5410
5410
  {
@@ -5414,16 +5414,16 @@ function Vt({
5414
5414
  }
5415
5415
  )
5416
5416
  ] }),
5417
- B ? /* @__PURE__ */ t(
5417
+ V ? /* @__PURE__ */ t(
5418
5418
  gt,
5419
5419
  {
5420
- missing: R,
5420
+ missing: L,
5421
5421
  t: a,
5422
5422
  onJump: u,
5423
5423
  announce: "off"
5424
5424
  }
5425
5425
  ) : null,
5426
- /* @__PURE__ */ t(ye, { variant: "elevated", children: /* @__PURE__ */ t(ye.Body, { ref: E, children: /* @__PURE__ */ d(
5426
+ /* @__PURE__ */ t(ye, { variant: "elevated", children: /* @__PURE__ */ t(ye.Body, { ref: D, children: /* @__PURE__ */ d(
5427
5427
  "section",
5428
5428
  {
5429
5429
  "aria-label": a("anamnesis.intake.sectionsLabel"),
@@ -5446,19 +5446,19 @@ function Vt({
5446
5446
  variant: "default",
5447
5447
  value: A,
5448
5448
  onValueChange: T,
5449
- children: x.map((F) => {
5450
- const V = F.fields.filter(
5449
+ children: x.map((P) => {
5450
+ const B = P.fields.filter(
5451
5451
  (j) => ra(h[j.key])
5452
5452
  ).length;
5453
- return /* @__PURE__ */ d(wi, { value: F.key, children: [
5453
+ return /* @__PURE__ */ d(wi, { value: P.key, children: [
5454
5454
  /* @__PURE__ */ t(Ni, { children: /* @__PURE__ */ d("span", { className: "ds:flex ds:w-full ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
5455
- /* @__PURE__ */ t("span", { children: fe(F, a) }),
5455
+ /* @__PURE__ */ t("span", { children: fe(P, a) }),
5456
5456
  /* @__PURE__ */ t("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: a("anamnesis.intake.sectionProgress", {
5457
- answered: V,
5458
- total: F.fields.length
5457
+ answered: B,
5458
+ total: P.fields.length
5459
5459
  }) })
5460
5460
  ] }) }),
5461
- /* @__PURE__ */ t(Ci, { children: /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", children: F.fields.map((j) => /* @__PURE__ */ t(
5461
+ /* @__PURE__ */ t(Ci, { children: /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", children: P.fields.map((j) => /* @__PURE__ */ t(
5462
5462
  zt,
5463
5463
  {
5464
5464
  readOnly: l,
@@ -5469,7 +5469,7 @@ function Vt({
5469
5469
  },
5470
5470
  j.key
5471
5471
  )) }) })
5472
- ] }, F.key);
5472
+ ] }, P.key);
5473
5473
  })
5474
5474
  }
5475
5475
  )
@@ -5499,7 +5499,7 @@ function Vt({
5499
5499
  ) })
5500
5500
  ] })
5501
5501
  ] });
5502
- return n ? /* @__PURE__ */ t("div", { className: "ds:flex ds:w-full ds:flex-col ds:gap-[var(--spacing-lg)]", children: L }) : /* @__PURE__ */ t("div", { className: "ds:min-h-[100dvh] ds:w-full ds:bg-[color:var(--app-shell-background)] ds:py-[var(--spacing-xl)]", children: /* @__PURE__ */ t("div", { className: "ds:mx-auto ds:flex ds:w-full ds:max-w-[48rem] ds:flex-col ds:gap-[var(--spacing-lg)] ds:px-[var(--spacing-md)]", children: L }) });
5502
+ return n ? /* @__PURE__ */ t("div", { className: "ds:flex ds:w-full ds:flex-col ds:gap-[var(--spacing-lg)]", children: F }) : /* @__PURE__ */ t("div", { className: "ds:min-h-[100dvh] ds:w-full ds:bg-[color:var(--app-shell-background)] ds:py-[var(--spacing-xl)]", children: /* @__PURE__ */ t("div", { className: "ds:mx-auto ds:flex ds:w-full ds:max-w-[48rem] ds:flex-col ds:gap-[var(--spacing-lg)] ds:px-[var(--spacing-md)]", children: F }) });
5503
5503
  }
5504
5504
  function xe({
5505
5505
  titleKey: e,
@@ -5547,7 +5547,7 @@ function nr({
5547
5547
  }) {
5548
5548
  const { patient: o, visits: r } = e, l = r[r.length - 1], c = r.length > 1 ? r[r.length - 2] : void 0, m = new Map(
5549
5549
  e.targets.map((A) => [A.parameterKey, A.target])
5550
- ), h = Pe(i, "anthropometric"), g = Pe(i, "dietary"), p = Pe(i, "lab"), N = Ge(i), y = _a(i);
5550
+ ), h = Pe(i, "anthropometric"), g = Pe(i, "dietary"), p = Pe(i, "lab"), w = Ge(i), y = _a(i);
5551
5551
  if (!l)
5552
5552
  return /* @__PURE__ */ t(Yn, { embedded: n, children: /* @__PURE__ */ t(ye, { variant: "elevated", children: /* @__PURE__ */ t(ye.Body, { children: /* @__PURE__ */ t(
5553
5553
  Ue,
@@ -5722,7 +5722,7 @@ function nr({
5722
5722
  bt,
5723
5723
  {
5724
5724
  intake: e.intake,
5725
- sections: N,
5725
+ sections: w,
5726
5726
  sex: o.sex,
5727
5727
  t: a
5728
5728
  }
@@ -5758,61 +5758,63 @@ function Bt({
5758
5758
  onTargetChange: r,
5759
5759
  hideTargetStrip: l = !1,
5760
5760
  leadingTabs: c = tr,
5761
- tab: m,
5762
- onTabChange: h,
5763
- defaultTab: g
5761
+ readOnly: m = !1,
5762
+ questionnaireSlot: h,
5763
+ tab: g,
5764
+ onTabChange: p,
5765
+ defaultTab: w
5764
5766
  }) {
5765
- const [p, N] = $(
5767
+ const [y, f] = $(
5766
5768
  () => {
5767
- var v;
5768
- return g ?? ((v = c[0]) == null ? void 0 : v.value) ?? "questionnaire";
5769
+ var S;
5770
+ return w ?? ((S = c[0]) == null ? void 0 : S.value) ?? "questionnaire";
5769
5771
  }
5770
- ), y = m ?? p, f = (v) => {
5771
- m === void 0 && N(v), h == null || h(v);
5772
- }, [C, x] = $(e), [A, T] = $(e);
5773
- e !== A && (T(e), x(e));
5774
- const E = O(
5775
- () => new Map(C.targets.map((v) => [v.parameterKey, v.target])),
5776
- [C.targets]
5777
- ), S = O(() => Mt(n), [n]), R = O(
5772
+ ), C = g ?? y, x = (S) => {
5773
+ g === void 0 && f(S), p == null || p(S);
5774
+ }, [A, T] = $(e), [D, E] = $(e);
5775
+ e !== D && (E(e), T(e));
5776
+ const L = O(
5777
+ () => new Map(A.targets.map((S) => [S.parameterKey, S.target])),
5778
+ [A.targets]
5779
+ ), u = O(() => Mt(n), [n]), N = O(
5778
5780
  () => Pe(n),
5779
5781
  [n]
5780
- ), u = (v, w) => {
5781
- x((P) => ct(P, v.key, w)), r == null || r(v.key, w);
5782
+ ), k = (S, z) => {
5783
+ T((V) => ct(V, S.key, z)), r == null || r(S.key, z);
5782
5784
  };
5783
5785
  return (
5784
5786
  // The goals strip and the tabs are two objects, not one run-on block: an
5785
5787
  // explicit column gap keeps the strip from sitting flush on the card
5786
5788
  // below it, which read as a rendering fault rather than as a heading.
5787
5789
  /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", children: [
5788
- l || C.visits.length === 0 ? null : /* @__PURE__ */ t(
5790
+ l || A.visits.length === 0 ? null : /* @__PURE__ */ t(
5789
5791
  qt,
5790
5792
  {
5791
- visits: C.visits,
5792
- defs: S,
5793
- targets: E,
5793
+ visits: A.visits,
5794
+ defs: u,
5795
+ targets: L,
5794
5796
  t: a,
5795
- onTargetChange: u
5797
+ onTargetChange: k
5796
5798
  }
5797
5799
  ),
5798
- /* @__PURE__ */ d(W, { value: y, onValueChange: f, children: [
5800
+ /* @__PURE__ */ d(W, { value: C, onValueChange: x, children: [
5799
5801
  /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
5800
5802
  /* @__PURE__ */ d(W.List, { "aria-label": a("anamnesis.compile.viewsLabel"), children: [
5801
- c.map((v) => /* @__PURE__ */ t(W.Trigger, { value: v.value, children: v.label }, v.value)),
5803
+ c.map((S) => /* @__PURE__ */ t(W.Trigger, { value: S.value, children: S.label }, S.value)),
5802
5804
  /* @__PURE__ */ t(W.Trigger, { value: "questionnaire", children: a("anamnesis.compile.tabCompile") }),
5803
5805
  /* @__PURE__ */ t(W.Trigger, { value: "trend", children: a("anamnesis.compile.tabEvolution") })
5804
5806
  ] }),
5805
5807
  o ? /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: o }) : null
5806
5808
  ] }),
5807
- c.map((v) => /* @__PURE__ */ t(
5809
+ c.map((S) => /* @__PURE__ */ t(
5808
5810
  W.Content,
5809
5811
  {
5810
- value: v.value,
5812
+ value: S.value,
5811
5813
  forceMount: !0,
5812
5814
  className: "ds:data-[state=inactive]:hidden",
5813
- children: v.content
5815
+ children: S.content
5814
5816
  },
5815
- v.value
5817
+ S.value
5816
5818
  )),
5817
5819
  /* @__PURE__ */ t(
5818
5820
  W.Content,
@@ -5820,20 +5822,21 @@ function Bt({
5820
5822
  value: "questionnaire",
5821
5823
  forceMount: !0,
5822
5824
  className: "ds:data-[state=inactive]:hidden",
5823
- children: /* @__PURE__ */ t(
5825
+ children: h ?? /* @__PURE__ */ t(
5824
5826
  Vt,
5825
5827
  {
5826
- record: C,
5828
+ record: A,
5827
5829
  t: a,
5828
5830
  embedded: !0,
5829
5831
  config: n,
5830
5832
  onSubmit: i,
5831
- jumpToField: s
5833
+ jumpToField: s,
5834
+ readOnly: m
5832
5835
  }
5833
5836
  )
5834
5837
  }
5835
5838
  ),
5836
- /* @__PURE__ */ t(W.Content, { value: "trend", children: R.length === 0 ? /* @__PURE__ */ t(
5839
+ /* @__PURE__ */ t(W.Content, { value: "trend", children: N.length === 0 ? /* @__PURE__ */ t(
5837
5840
  Ue,
5838
5841
  {
5839
5842
  variant: "no-results",
@@ -5846,7 +5849,7 @@ function Bt({
5846
5849
  /* @__PURE__ */ t(
5847
5850
  wn,
5848
5851
  {
5849
- record: C,
5852
+ record: A,
5850
5853
  t: a,
5851
5854
  config: n,
5852
5855
  framed: !1
@@ -5872,20 +5875,21 @@ function wl({
5872
5875
  onIntakeSubmit: h,
5873
5876
  intakeJumpToField: g,
5874
5877
  readOnly: p,
5875
- onMissingAnswerJump: N,
5878
+ onMissingAnswerJump: w,
5876
5879
  onRecordChange: y,
5877
5880
  leadingTabs: f,
5878
5881
  questionnaireTab: C,
5879
5882
  onQuestionnaireTabChange: x,
5880
- defaultQuestionnaireTab: A,
5881
- practitioners: T,
5883
+ questionnaireSlot: A,
5884
+ defaultQuestionnaireTab: T,
5885
+ practitioners: D,
5882
5886
  newVisitDateIso: E,
5883
- defaultView: S,
5884
- defaultExportMenuOpen: R,
5885
- defaultShareOpen: u,
5886
- defaultExportAudience: v
5887
+ defaultView: L,
5888
+ defaultExportMenuOpen: u,
5889
+ defaultShareOpen: N,
5890
+ defaultExportAudience: k
5887
5891
  }) {
5888
- const w = e === "intake" ? /* @__PURE__ */ t(
5892
+ const S = e === "intake" ? /* @__PURE__ */ t(
5889
5893
  Vt,
5890
5894
  {
5891
5895
  record: a,
@@ -5910,7 +5914,9 @@ function wl({
5910
5914
  leadingTabs: f,
5911
5915
  tab: C,
5912
5916
  onTabChange: x,
5913
- defaultTab: A
5917
+ defaultTab: T,
5918
+ readOnly: p,
5919
+ questionnaireSlot: A
5914
5920
  }
5915
5921
  ) : e === "compile" ? /* @__PURE__ */ t(
5916
5922
  ar,
@@ -5923,14 +5929,14 @@ function wl({
5923
5929
  hideTargetStrip: l,
5924
5930
  statusSlot: c,
5925
5931
  onOpenNote: m,
5926
- onMissingAnswerJump: N,
5932
+ onMissingAnswerJump: w,
5927
5933
  onRecordChange: y,
5928
- practitioners: T,
5934
+ practitioners: D,
5929
5935
  newVisitDateIso: E,
5930
- defaultView: S,
5931
- defaultExportMenuOpen: R,
5932
- defaultShareOpen: u,
5933
- defaultExportAudience: v
5936
+ defaultView: L,
5937
+ defaultExportMenuOpen: u,
5938
+ defaultShareOpen: N,
5939
+ defaultExportAudience: k
5934
5940
  }
5935
5941
  ) : /* @__PURE__ */ t(
5936
5942
  nr,
@@ -5948,7 +5954,7 @@ function wl({
5948
5954
  "data-component": i,
5949
5955
  "data-mode": e,
5950
5956
  className: "ds:w-full",
5951
- children: w
5957
+ children: S
5952
5958
  }
5953
5959
  ) : /* @__PURE__ */ t(
5954
5960
  "main",
@@ -5959,7 +5965,7 @@ function wl({
5959
5965
  mode: n(`anamnesis.mode.${e}`)
5960
5966
  }),
5961
5967
  className: "ds:w-full",
5962
- children: w
5968
+ children: S
5963
5969
  }
5964
5970
  );
5965
5971
  }
@@ -6003,8 +6009,8 @@ function Ja({
6003
6009
  throw new Error(
6004
6010
  "AnamnesisReorderRow must render inside an AnamnesisReorderGroup"
6005
6011
  );
6006
- const { t: r } = i, l = (p, N) => {
6007
- const y = Math.max(0, Math.min(i.count - 1, N));
6012
+ const { t: r } = i, l = (p, w) => {
6013
+ const y = Math.max(0, Math.min(i.count - 1, w));
6008
6014
  y !== p && (i.onReorder(p, y), i.announce(
6009
6015
  r("anamnesis.configEditor.reorderAnnounce", {
6010
6016
  name: a,
@@ -6028,8 +6034,8 @@ function Ja({
6028
6034
  onDragLeave: () => o(!1),
6029
6035
  onDrop: (p) => {
6030
6036
  p.preventDefault();
6031
- const N = i.dragSource;
6032
- o(!1), i.setDragSource(null), !(N === null || N === e) && l(N, e);
6037
+ const w = i.dragSource;
6038
+ o(!1), i.setDragSource(null), !(w === null || w === e) && l(w, e);
6033
6039
  },
6034
6040
  className: ir({
6035
6041
  dragging: m,
@@ -6107,61 +6113,61 @@ function Cl({
6107
6113
  const [s, o] = $(null), [r, l] = $(null), c = (u) => a({ ...e, parameters: e.parameters.map(u) }), m = (u) => a({
6108
6114
  ...e,
6109
6115
  intakeSections: e.intakeSections.map(u)
6110
- }), h = (u, v, w) => m(
6111
- (P) => P.key === u ? {
6112
- ...P,
6113
- fields: P.fields.map(
6114
- (z) => z.key === v ? w(z) : z
6116
+ }), h = (u, N, k) => m(
6117
+ (S) => S.key === u ? {
6118
+ ...S,
6119
+ fields: S.fields.map(
6120
+ (z) => z.key === N ? k(z) : z
6115
6121
  )
6116
- } : P
6117
- ), g = (u) => a({ ...e, pathologies: e.pathologies.map(u) }), p = (u, v, w) => {
6118
- const P = Pe(e, u), z = en(P, v, w);
6122
+ } : S
6123
+ ), g = (u) => a({ ...e, pathologies: e.pathologies.map(u) }), p = (u, N, k) => {
6124
+ const S = Pe(e, u), z = en(S, N, k);
6119
6125
  if (!z) return;
6120
- const B = new Map(z.map((L, F) => [L.key, F]));
6126
+ const V = new Map(z.map((F, P) => [F.key, P]));
6121
6127
  c(
6122
- (L) => B.has(L.key) ? { ...L, order: B.get(L.key) } : L
6128
+ (F) => V.has(F.key) ? { ...F, order: V.get(F.key) } : F
6123
6129
  );
6124
- }, N = (u, v) => {
6125
- const w = en(Ge(e), u, v);
6126
- if (!w) return;
6127
- const P = new Map(
6128
- w.map((z, B) => [z.key, B])
6130
+ }, w = (u, N) => {
6131
+ const k = en(Ge(e), u, N);
6132
+ if (!k) return;
6133
+ const S = new Map(
6134
+ k.map((z, V) => [z.key, V])
6129
6135
  );
6130
6136
  m(
6131
- (z) => P.has(z.key) ? { ...z, order: P.get(z.key) } : z
6137
+ (z) => S.has(z.key) ? { ...z, order: S.get(z.key) } : z
6132
6138
  );
6133
- }, y = (u, v, w) => {
6134
- const P = en(u.fields, v, w);
6135
- if (!P) return;
6139
+ }, y = (u, N, k) => {
6140
+ const S = en(u.fields, N, k);
6141
+ if (!S) return;
6136
6142
  const z = new Map(
6137
- P.map((B, L) => [B.key, L])
6143
+ S.map((V, F) => [V.key, F])
6138
6144
  );
6139
6145
  m(
6140
- (B) => B.key === u.key ? {
6141
- ...B,
6142
- fields: B.fields.map(
6143
- (L) => z.has(L.key) ? { ...L, order: z.get(L.key) } : L
6146
+ (V) => V.key === u.key ? {
6147
+ ...V,
6148
+ fields: V.fields.map(
6149
+ (F) => z.has(F.key) ? { ...F, order: z.get(F.key) } : F
6144
6150
  )
6145
- } : B
6151
+ } : V
6146
6152
  );
6147
- }, f = (u, v) => {
6153
+ }, f = (u, N) => {
6148
6154
  u.kind === "parameter" ? c(
6149
- (w) => w.key === u.entry.key ? { ...w, enabled: v } : w
6155
+ (k) => k.key === u.entry.key ? { ...k, enabled: N } : k
6150
6156
  ) : u.kind === "section" ? m(
6151
- (w) => w.key === u.entry.key ? { ...w, enabled: v } : w
6152
- ) : u.kind === "field" ? h(u.sectionKey, u.entry.key, (w) => ({
6153
- ...w,
6154
- enabled: v
6157
+ (k) => k.key === u.entry.key ? { ...k, enabled: N } : k
6158
+ ) : u.kind === "field" ? h(u.sectionKey, u.entry.key, (k) => ({
6159
+ ...k,
6160
+ enabled: N
6155
6161
  })) : g(
6156
- (w) => w.code === u.entry.code ? { ...w, enabled: v } : w
6162
+ (k) => k.code === u.entry.code ? { ...k, enabled: N } : k
6157
6163
  );
6158
6164
  }, C = Ne(e).length, x = Pe(e).length, A = hn(e).reduce(
6159
- (u, v) => u + v.fields.length,
6165
+ (u, N) => u + N.fields.length,
6160
6166
  0
6161
6167
  ), T = Ge(e).reduce(
6162
- (u, v) => u + v.fields.length,
6168
+ (u, N) => u + N.fields.length,
6163
6169
  0
6164
- ), E = ot(e).length, S = tn(e).length, R = Ne(e).filter(
6170
+ ), D = ot(e).length, E = tn(e).length, L = Ne(e).filter(
6165
6171
  (u) => u.goal === !0
6166
6172
  ).length;
6167
6173
  return /* @__PURE__ */ d(
@@ -6194,21 +6200,21 @@ function Cl({
6194
6200
  Xa,
6195
6201
  {
6196
6202
  count: Ge(e).length,
6197
- onReorder: N,
6203
+ onReorder: w,
6198
6204
  t: n,
6199
6205
  children: Ge(e).map(
6200
- (u, v) => {
6201
- const w = u.enabled === !1, P = u.fields.filter(
6206
+ (u, N) => {
6207
+ const k = u.enabled === !1, S = u.fields.filter(
6202
6208
  (z) => z.enabled !== !1
6203
6209
  ).length;
6204
6210
  return /* @__PURE__ */ t(
6205
6211
  Ja,
6206
6212
  {
6207
- index: v,
6213
+ index: N,
6208
6214
  label: fe(u, n),
6209
6215
  children: ({
6210
6216
  rowProps: z,
6211
- handle: B
6217
+ handle: V
6212
6218
  }) => /* @__PURE__ */ d("section", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
6213
6219
  /* @__PURE__ */ d(
6214
6220
  "div",
@@ -6221,7 +6227,7 @@ function Cl({
6221
6227
  children: [
6222
6228
  /* @__PURE__ */ d("h3", { className: "type-title-item ds:m-0 ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--foreground)]", children: [
6223
6229
  fe(u, n),
6224
- w ? /* @__PURE__ */ t(Q, { size: "sm", variant: "neutral", children: n("anamnesis.configEditor.archived") }) : null
6230
+ k ? /* @__PURE__ */ t(Q, { size: "sm", variant: "neutral", children: n("anamnesis.configEditor.archived") }) : null
6225
6231
  ] }),
6226
6232
  /* @__PURE__ */ d(
6227
6233
  Ca,
@@ -6233,7 +6239,7 @@ function Cl({
6233
6239
  }
6234
6240
  ),
6235
6241
  children: [
6236
- B,
6242
+ V,
6237
6243
  /* @__PURE__ */ t(
6238
6244
  re,
6239
6245
  {
@@ -6252,7 +6258,7 @@ function Cl({
6252
6258
  })
6253
6259
  }
6254
6260
  ),
6255
- w ? /* @__PURE__ */ t(
6261
+ k ? /* @__PURE__ */ t(
6256
6262
  re,
6257
6263
  {
6258
6264
  size: "sm",
@@ -6289,27 +6295,27 @@ function Cl({
6289
6295
  ]
6290
6296
  }
6291
6297
  ),
6292
- P === 0 && !w ? /* @__PURE__ */ t("p", { className: "type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]", children: n(
6298
+ S === 0 && !k ? /* @__PURE__ */ t("p", { className: "type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]", children: n(
6293
6299
  "anamnesis.configEditor.sectionEmptyCapture"
6294
6300
  ) }) : null,
6295
6301
  u.fields.length > 0 ? /* @__PURE__ */ t(
6296
6302
  Xa,
6297
6303
  {
6298
6304
  count: u.fields.length,
6299
- onReorder: (L, F) => y(u, L, F),
6305
+ onReorder: (F, P) => y(u, F, P),
6300
6306
  t: n,
6301
- children: /* @__PURE__ */ t(Ze, { divider: "divided", children: u.fields.map((L, F) => /* @__PURE__ */ t(
6307
+ children: /* @__PURE__ */ t(Ze, { divider: "divided", children: u.fields.map((F, P) => /* @__PURE__ */ t(
6302
6308
  Ja,
6303
6309
  {
6304
- index: F,
6305
- label: pe(L, n),
6306
- children: ({ rowProps: V, handle: j }) => /* @__PURE__ */ t(
6310
+ index: P,
6311
+ label: pe(F, n),
6312
+ children: ({ rowProps: B, handle: j }) => /* @__PURE__ */ t(
6307
6313
  Ze.Item,
6308
6314
  {
6309
- ...V,
6315
+ ...B,
6310
6316
  title: /* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
6311
- pe(L, n),
6312
- L.required === !0 ? /* @__PURE__ */ t(
6317
+ pe(F, n),
6318
+ F.required === !0 ? /* @__PURE__ */ t(
6313
6319
  Q,
6314
6320
  {
6315
6321
  size: "sm",
@@ -6319,7 +6325,7 @@ function Cl({
6319
6325
  )
6320
6326
  }
6321
6327
  ) : null,
6322
- L.enabled === !1 ? /* @__PURE__ */ t(
6328
+ F.enabled === !1 ? /* @__PURE__ */ t(
6323
6329
  Q,
6324
6330
  {
6325
6331
  size: "sm",
@@ -6331,8 +6337,8 @@ function Cl({
6331
6337
  ) : null
6332
6338
  ] }),
6333
6339
  description: [
6334
- Kt(L, n),
6335
- ut(L, n)
6340
+ Kt(F, n),
6341
+ ut(F, n)
6336
6342
  ].filter(Boolean).join(" · "),
6337
6343
  trailing: /* @__PURE__ */ d(
6338
6344
  Ca,
@@ -6341,7 +6347,7 @@ function Cl({
6341
6347
  "anamnesis.configEditor.rowActions",
6342
6348
  {
6343
6349
  name: pe(
6344
- L,
6350
+ F,
6345
6351
  n
6346
6352
  )
6347
6353
  }
@@ -6358,7 +6364,7 @@ function Cl({
6358
6364
  "anamnesis.configEditor.edit",
6359
6365
  {
6360
6366
  name: pe(
6361
- L,
6367
+ F,
6362
6368
  n
6363
6369
  )
6364
6370
  }
@@ -6366,11 +6372,11 @@ function Cl({
6366
6372
  onClick: () => o({
6367
6373
  kind: "field",
6368
6374
  sectionKey: u.key,
6369
- entry: L
6375
+ entry: F
6370
6376
  })
6371
6377
  }
6372
6378
  ),
6373
- L.enabled === !1 ? /* @__PURE__ */ t(
6379
+ F.enabled === !1 ? /* @__PURE__ */ t(
6374
6380
  re,
6375
6381
  {
6376
6382
  size: "sm",
@@ -6380,7 +6386,7 @@ function Cl({
6380
6386
  "anamnesis.configEditor.restore",
6381
6387
  {
6382
6388
  name: pe(
6383
- L,
6389
+ F,
6384
6390
  n
6385
6391
  )
6386
6392
  }
@@ -6389,7 +6395,7 @@ function Cl({
6389
6395
  {
6390
6396
  kind: "field",
6391
6397
  sectionKey: u.key,
6392
- entry: L
6398
+ entry: F
6393
6399
  },
6394
6400
  void 0
6395
6401
  )
@@ -6404,7 +6410,7 @@ function Cl({
6404
6410
  "anamnesis.configEditor.archive",
6405
6411
  {
6406
6412
  name: pe(
6407
- L,
6413
+ F,
6408
6414
  n
6409
6415
  )
6410
6416
  }
@@ -6413,7 +6419,7 @@ function Cl({
6413
6419
  {
6414
6420
  kind: "field",
6415
6421
  sectionKey: u.key,
6416
- entry: L
6422
+ entry: F
6417
6423
  },
6418
6424
  !1
6419
6425
  )
@@ -6425,7 +6431,7 @@ function Cl({
6425
6431
  }
6426
6432
  )
6427
6433
  },
6428
- L.key
6434
+ F.key
6429
6435
  )) })
6430
6436
  }
6431
6437
  ) : null,
@@ -6468,11 +6474,11 @@ function Cl({
6468
6474
  count: x - C
6469
6475
  })}` }),
6470
6476
  rn.map((u) => {
6471
- const v = Pe(
6477
+ const N = Pe(
6472
6478
  e,
6473
6479
  u
6474
6480
  );
6475
- return v.length === 0 ? null : /* @__PURE__ */ d(
6481
+ return N.length === 0 ? null : /* @__PURE__ */ d(
6476
6482
  "section",
6477
6483
  {
6478
6484
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
@@ -6481,29 +6487,29 @@ function Cl({
6481
6487
  /* @__PURE__ */ t(
6482
6488
  Xa,
6483
6489
  {
6484
- count: v.length,
6485
- onReorder: (w, P) => p(u, w, P),
6490
+ count: N.length,
6491
+ onReorder: (k, S) => p(u, k, S),
6486
6492
  t: n,
6487
- children: /* @__PURE__ */ t(Ze, { divider: "divided", children: v.map((w, P) => {
6493
+ children: /* @__PURE__ */ t(Ze, { divider: "divided", children: N.map((k, S) => {
6488
6494
  const z = [
6489
- lr(w, n),
6495
+ lr(k, n),
6490
6496
  n(
6491
- `anamnesis.configEditor.direction.${w.betterDirection}`
6497
+ `anamnesis.configEditor.direction.${k.betterDirection}`
6492
6498
  ),
6493
- w.locked ? n("anamnesis.configEditor.lockedHint") : null
6499
+ k.locked ? n("anamnesis.configEditor.lockedHint") : null
6494
6500
  ].filter(Boolean).join(" · ");
6495
6501
  return /* @__PURE__ */ t(
6496
6502
  Ja,
6497
6503
  {
6498
- index: P,
6499
- label: Te(w, n),
6500
- children: ({ rowProps: B, handle: L }) => /* @__PURE__ */ t(
6504
+ index: S,
6505
+ label: Te(k, n),
6506
+ children: ({ rowProps: V, handle: F }) => /* @__PURE__ */ t(
6501
6507
  Ze.Item,
6502
6508
  {
6503
- ...B,
6509
+ ...V,
6504
6510
  title: /* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
6505
- Te(w, n),
6506
- w.locked ? /* @__PURE__ */ t(
6511
+ Te(k, n),
6512
+ k.locked ? /* @__PURE__ */ t(
6507
6513
  Q,
6508
6514
  {
6509
6515
  size: "sm",
@@ -6512,7 +6518,7 @@ function Cl({
6512
6518
  children: n("anamnesis.configEditor.locked")
6513
6519
  }
6514
6520
  ) : null,
6515
- w.enabled === !1 ? /* @__PURE__ */ t(Q, { size: "sm", variant: "neutral", children: n(
6521
+ k.enabled === !1 ? /* @__PURE__ */ t(Q, { size: "sm", variant: "neutral", children: n(
6516
6522
  "anamnesis.configEditor.archived"
6517
6523
  ) }) : null
6518
6524
  ] }),
@@ -6524,13 +6530,13 @@ function Cl({
6524
6530
  "anamnesis.configEditor.rowActions",
6525
6531
  {
6526
6532
  name: Te(
6527
- w,
6533
+ k,
6528
6534
  n
6529
6535
  )
6530
6536
  }
6531
6537
  ),
6532
6538
  children: [
6533
- L,
6539
+ F,
6534
6540
  /* @__PURE__ */ t(
6535
6541
  re,
6536
6542
  {
@@ -6541,18 +6547,18 @@ function Cl({
6541
6547
  "anamnesis.configEditor.edit",
6542
6548
  {
6543
6549
  name: Te(
6544
- w,
6550
+ k,
6545
6551
  n
6546
6552
  )
6547
6553
  }
6548
6554
  ),
6549
6555
  onClick: () => o({
6550
6556
  kind: "parameter",
6551
- entry: w
6557
+ entry: k
6552
6558
  })
6553
6559
  }
6554
6560
  ),
6555
- w.locked ? null : w.enabled === !1 ? /* @__PURE__ */ t(
6561
+ k.locked ? null : k.enabled === !1 ? /* @__PURE__ */ t(
6556
6562
  re,
6557
6563
  {
6558
6564
  size: "sm",
@@ -6562,7 +6568,7 @@ function Cl({
6562
6568
  "anamnesis.configEditor.restore",
6563
6569
  {
6564
6570
  name: Te(
6565
- w,
6571
+ k,
6566
6572
  n
6567
6573
  )
6568
6574
  }
@@ -6570,7 +6576,7 @@ function Cl({
6570
6576
  onClick: () => f(
6571
6577
  {
6572
6578
  kind: "parameter",
6573
- entry: w
6579
+ entry: k
6574
6580
  },
6575
6581
  void 0
6576
6582
  )
@@ -6585,7 +6591,7 @@ function Cl({
6585
6591
  "anamnesis.configEditor.archive",
6586
6592
  {
6587
6593
  name: Te(
6588
- w,
6594
+ k,
6589
6595
  n
6590
6596
  )
6591
6597
  }
@@ -6593,7 +6599,7 @@ function Cl({
6593
6599
  onClick: () => f(
6594
6600
  {
6595
6601
  kind: "parameter",
6596
- entry: w
6602
+ entry: k
6597
6603
  },
6598
6604
  !1
6599
6605
  )
@@ -6605,7 +6611,7 @@ function Cl({
6605
6611
  }
6606
6612
  )
6607
6613
  },
6608
- w.key
6614
+ k.key
6609
6615
  );
6610
6616
  }) })
6611
6617
  }
@@ -6628,18 +6634,18 @@ function Cl({
6628
6634
  ] }) }),
6629
6635
  /* @__PURE__ */ t(W.Content, { value: "pathologies", children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:pt-[var(--spacing-md)]", children: [
6630
6636
  /* @__PURE__ */ t("p", { className: "type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]", children: `${n("anamnesis.configEditor.panelLive", {
6631
- count: E
6637
+ count: D
6632
6638
  })} · ${n("anamnesis.configEditor.panelArchived", {
6633
- count: S - E
6639
+ count: E - D
6634
6640
  })}` }),
6635
6641
  /* @__PURE__ */ t(Ze, { divider: "divided", children: tn(e).map((u) => {
6636
- const v = e.pathologies.some(
6637
- (P) => P.parentCode === u.code && P.enabled !== !1
6638
- ), w = [
6642
+ const N = e.pathologies.some(
6643
+ (S) => S.parentCode === u.code && S.enabled !== !1
6644
+ ), k = [
6639
6645
  u.parentCode ? n("anamnesis.configEditor.subCodeOf", {
6640
6646
  code: u.parentCode
6641
6647
  }) : null,
6642
- v ? n("anamnesis.configEditor.familyHeading") : null
6648
+ N ? n("anamnesis.configEditor.familyHeading") : null
6643
6649
  ].filter(Boolean).join(" · ");
6644
6650
  return /* @__PURE__ */ t(
6645
6651
  Ze.Item,
@@ -6648,7 +6654,7 @@ function Cl({
6648
6654
  Se(u.code, n, u),
6649
6655
  u.enabled === !1 ? /* @__PURE__ */ t(Q, { size: "sm", variant: "neutral", children: n("anamnesis.configEditor.archived") }) : null
6650
6656
  ] }),
6651
- description: w || void 0,
6657
+ description: k || void 0,
6652
6658
  trailing: /* @__PURE__ */ d(
6653
6659
  Ca,
6654
6660
  {
@@ -6735,27 +6741,27 @@ function Cl({
6735
6741
  ] }) }),
6736
6742
  /* @__PURE__ */ t(W.Content, { value: "targets", children: /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)] ds:pt-[var(--spacing-md)]", children: [
6737
6743
  /* @__PURE__ */ t("p", { className: "type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]", children: n("anamnesis.configEditor.panelTracked", {
6738
- count: R
6744
+ count: L
6739
6745
  }) }),
6740
6746
  /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: n("anamnesis.configEditor.targetsIntro") }),
6741
6747
  rn.map((u) => {
6742
- const v = Ne(e, u);
6743
- return v.length === 0 ? null : /* @__PURE__ */ d(
6748
+ const N = Ne(e, u);
6749
+ return N.length === 0 ? null : /* @__PURE__ */ d(
6744
6750
  "section",
6745
6751
  {
6746
6752
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
6747
6753
  children: [
6748
6754
  /* @__PURE__ */ t("h3", { className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]", children: n(`anamnesis.group.${u}`) }),
6749
- /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: v.map((w) => /* @__PURE__ */ t(
6755
+ /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: N.map((k) => /* @__PURE__ */ t(
6750
6756
  pn,
6751
6757
  {
6752
- label: Te(w, n),
6753
- checked: w.goal === !0,
6754
- onCheckedChange: (P) => c(
6755
- (z) => z.key === w.key ? { ...z, goal: P === !0 } : z
6758
+ label: Te(k, n),
6759
+ checked: k.goal === !0,
6760
+ onCheckedChange: (S) => c(
6761
+ (z) => z.key === k.key ? { ...z, goal: S === !0 } : z
6756
6762
  )
6757
6763
  },
6758
- w.key
6764
+ k.key
6759
6765
  )) })
6760
6766
  ]
6761
6767
  },
@@ -6834,25 +6840,25 @@ function mr({
6834
6840
  e.kind === "field" ? o.helpText ?? "" : ""
6835
6841
  ), [g, p] = $(
6836
6842
  e.kind === "field" && e.entry.required === !0
6837
- ), N = e.kind === "field" ? e.entry : null, y = N !== null && (N.type === "choice" || N.type === "multiChoice"), f = y && !or.has(N.key), [C, x] = $(
6838
- f ? (N.options ?? []).join(", ") : ""
6839
- ), A = C.split(",").map((S) => S.trim()).filter(Boolean), T = !f || A.length > 0, E = () => {
6840
- const S = l.trim(), R = (u) => {
6841
- const v = { ...u };
6842
- return S ? v.label = S : delete v.label, v;
6843
+ ), w = e.kind === "field" ? e.entry : null, y = w !== null && (w.type === "choice" || w.type === "multiChoice"), f = y && !or.has(w.key), [C, x] = $(
6844
+ f ? (w.options ?? []).join(", ") : ""
6845
+ ), A = C.split(",").map((E) => E.trim()).filter(Boolean), T = !f || A.length > 0, D = () => {
6846
+ const E = l.trim(), L = (u) => {
6847
+ const N = { ...u };
6848
+ return E ? N.label = E : delete N.label, N;
6843
6849
  };
6844
6850
  if (e.kind === "parameter")
6845
6851
  i({
6846
6852
  ...n,
6847
6853
  parameters: n.parameters.map(
6848
- (u) => u.key === e.entry.key ? R(u) : u
6854
+ (u) => u.key === e.entry.key ? L(u) : u
6849
6855
  )
6850
6856
  });
6851
6857
  else if (e.kind === "section")
6852
6858
  i({
6853
6859
  ...n,
6854
6860
  intakeSections: n.intakeSections.map(
6855
- (u) => u.key === e.entry.key ? R(u) : u
6861
+ (u) => u.key === e.entry.key ? L(u) : u
6856
6862
  )
6857
6863
  });
6858
6864
  else if (e.kind === "field") {
@@ -6860,21 +6866,21 @@ function mr({
6860
6866
  i({
6861
6867
  ...n,
6862
6868
  intakeSections: n.intakeSections.map(
6863
- (v) => v.key === e.sectionKey ? {
6864
- ...v,
6865
- fields: v.fields.map((w) => {
6866
- if (w.key !== e.entry.key) return w;
6867
- const P = R(w);
6868
- return u ? P.helpText = u : delete P.helpText, f && (P.options = A), g ? P.required = !0 : delete P.required, P;
6869
+ (N) => N.key === e.sectionKey ? {
6870
+ ...N,
6871
+ fields: N.fields.map((k) => {
6872
+ if (k.key !== e.entry.key) return k;
6873
+ const S = L(k);
6874
+ return u ? S.helpText = u : delete S.helpText, f && (S.options = A), g ? S.required = !0 : delete S.required, S;
6869
6875
  })
6870
- } : v
6876
+ } : N
6871
6877
  )
6872
6878
  });
6873
6879
  } else
6874
6880
  i({
6875
6881
  ...n,
6876
6882
  pathologies: n.pathologies.map(
6877
- (u) => u.code === o.code ? R(u) : u
6883
+ (u) => u.code === o.code ? L(u) : u
6878
6884
  )
6879
6885
  });
6880
6886
  a();
@@ -6902,7 +6908,7 @@ function mr({
6902
6908
  ae,
6903
6909
  {
6904
6910
  value: l,
6905
- onChange: (S) => c(S.target.value),
6911
+ onChange: (E) => c(E.target.value),
6906
6912
  placeholder: r
6907
6913
  }
6908
6914
  )
@@ -6912,7 +6918,7 @@ function mr({
6912
6918
  ta,
6913
6919
  {
6914
6920
  value: m,
6915
- onChange: (S) => h(S.target.value),
6921
+ onChange: (E) => h(E.target.value),
6916
6922
  minRows: 2
6917
6923
  }
6918
6924
  ) }) : null,
@@ -6921,7 +6927,7 @@ function mr({
6921
6927
  {
6922
6928
  label: s("anamnesis.configEditor.requiredField"),
6923
6929
  checked: g,
6924
- onCheckedChange: (S) => p(S === !0)
6930
+ onCheckedChange: (E) => p(E === !0)
6925
6931
  }
6926
6932
  ) : null,
6927
6933
  f ? /* @__PURE__ */ t(
@@ -6934,21 +6940,21 @@ function mr({
6934
6940
  ae,
6935
6941
  {
6936
6942
  value: C,
6937
- onChange: (S) => x(S.target.value)
6943
+ onChange: (E) => x(E.target.value)
6938
6944
  }
6939
6945
  )
6940
6946
  }
6941
6947
  ) : y ? /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: s("anamnesis.configEditor.optionsCurrent", {
6942
- list: (N.options ?? []).map(
6943
- (S) => s(`anamnesis.field.${N.key}.option.${S}`, {
6944
- defaultValue: S
6948
+ list: (w.options ?? []).map(
6949
+ (E) => s(`anamnesis.field.${w.key}.option.${E}`, {
6950
+ defaultValue: E
6945
6951
  })
6946
6952
  ).join(", ")
6947
6953
  }) }) : null
6948
6954
  ] }),
6949
6955
  /* @__PURE__ */ d(X.Footer, { children: [
6950
6956
  /* @__PURE__ */ t(Z, { intent: "ghost", onClick: a, children: s("anamnesis.configEditor.cancel") }),
6951
- /* @__PURE__ */ t(Z, { intent: "primary", onClick: E, disabled: !T, children: s("anamnesis.configEditor.save") })
6957
+ /* @__PURE__ */ t(Z, { intent: "primary", onClick: D, disabled: !T, children: s("anamnesis.configEditor.save") })
6952
6958
  ] })
6953
6959
  ] });
6954
6960
  }
@@ -6996,34 +7002,34 @@ function hr({
6996
7002
  onConfigChange: i,
6997
7003
  t: s
6998
7004
  }) {
6999
- const [o, r] = $(""), [l, c] = $(""), [m, h] = $(""), [g, p] = $(""), [N, y] = $(""), [f, C] = $(""), [x, A] = $("0"), [T, E] = $(""), [S, R] = $(""), [u, v] = $(""), [w, P] = $(""), [z, B] = $(!1), [L, F] = $(""), V = rn.map((D) => ({
7000
- value: D,
7001
- label: s(`anamnesis.group.${D}`)
7002
- })), j = rr.map((D) => ({
7003
- value: D,
7004
- label: s(`anamnesis.configEditor.direction.${D}`)
7005
- })), ne = sr.map((D) => ({
7006
- value: D,
7007
- label: s(`anamnesis.configEditor.type.${D}`)
7008
- })), ve = n.pathologies.filter((D) => !D.parentCode && D.enabled !== !1).map((D) => ({
7009
- value: D.code,
7010
- label: Se(D.code, s, D)
7011
- })), ce = S.split(",").map((D) => D.trim()).filter(Boolean), de = e.kind === "parameter" ? o.trim() !== "" && l !== "" && m !== "" : e.kind === "field" ? o.trim() !== "" && T !== "" && (!an(T) || ce.length > 0) : e.kind === "section" ? o.trim() !== "" : o.trim() !== "" && w.trim() !== "" && // A duplicate code would collide with the existing entry
7005
+ const [o, r] = $(""), [l, c] = $(""), [m, h] = $(""), [g, p] = $(""), [w, y] = $(""), [f, C] = $(""), [x, A] = $("0"), [T, D] = $(""), [E, L] = $(""), [u, N] = $(""), [k, S] = $(""), [z, V] = $(!1), [F, P] = $(""), B = rn.map((I) => ({
7006
+ value: I,
7007
+ label: s(`anamnesis.group.${I}`)
7008
+ })), j = rr.map((I) => ({
7009
+ value: I,
7010
+ label: s(`anamnesis.configEditor.direction.${I}`)
7011
+ })), ne = sr.map((I) => ({
7012
+ value: I,
7013
+ label: s(`anamnesis.configEditor.type.${I}`)
7014
+ })), ve = n.pathologies.filter((I) => !I.parentCode && I.enabled !== !1).map((I) => ({
7015
+ value: I.code,
7016
+ label: Se(I.code, s, I)
7017
+ })), ce = E.split(",").map((I) => I.trim()).filter(Boolean), de = e.kind === "parameter" ? o.trim() !== "" && l !== "" && m !== "" : e.kind === "field" ? o.trim() !== "" && T !== "" && (!an(T) || ce.length > 0) : e.kind === "section" ? o.trim() !== "" : o.trim() !== "" && k.trim() !== "" && // A duplicate code would collide with the existing entry
7012
7018
  // everywhere codes are matched (lookup, archive, edit) —
7013
7019
  // uniqueness is the add gate, matching keyFromLabel's guarantee
7014
7020
  // on the other vocabularies.
7015
7021
  !n.pathologies.some(
7016
- (D) => D.code.toLowerCase() === w.trim().toLowerCase()
7022
+ (I) => I.code.toLowerCase() === k.trim().toLowerCase()
7017
7023
  ), Y = () => {
7018
- const D = o.trim();
7024
+ const I = o.trim();
7019
7025
  if (e.kind === "parameter") {
7020
7026
  const U = new Set(n.parameters.map((Le) => Le.key)), J = (Le) => {
7021
7027
  if (Le.trim() === "") return;
7022
7028
  const Fe = Number(Le);
7023
7029
  return Number.isFinite(Fe) ? Fe : void 0;
7024
- }, me = J(N), le = J(f), Re = {
7025
- key: Za(D, U),
7026
- label: D,
7030
+ }, me = J(w), le = J(f), Re = {
7031
+ key: Za(I, U),
7032
+ label: I,
7027
7033
  group: l,
7028
7034
  betterDirection: m,
7029
7035
  precision: Number(x),
@@ -7042,8 +7048,8 @@ function hr({
7042
7048
  (le) => le.fields.map((Re) => Re.key)
7043
7049
  )
7044
7050
  ), J = T === "numberInteger" || T === "numberDecimal" ? "number" : T === "choiceWithText" ? "choice" : T, me = {
7045
- key: Za(D, U),
7046
- label: D,
7051
+ key: Za(I, U),
7052
+ label: I,
7047
7053
  type: J,
7048
7054
  ...T === "numberDecimal" ? { decimal: !0 } : {},
7049
7055
  ...T === "choiceWithText" ? { detail: !0 } : {},
@@ -7061,8 +7067,8 @@ function hr({
7061
7067
  const U = new Set(
7062
7068
  n.intakeSections.map((me) => me.key)
7063
7069
  ), J = {
7064
- key: Za(D, U),
7065
- label: D,
7070
+ key: Za(I, U),
7071
+ label: I,
7066
7072
  fields: []
7067
7073
  };
7068
7074
  i({
@@ -7071,9 +7077,9 @@ function hr({
7071
7077
  });
7072
7078
  } else {
7073
7079
  const U = {
7074
- code: w.trim(),
7075
- label: D,
7076
- ...L ? { parentCode: L } : {}
7080
+ code: k.trim(),
7081
+ label: I,
7082
+ ...F ? { parentCode: F } : {}
7077
7083
  };
7078
7084
  i({
7079
7085
  ...n,
@@ -7093,24 +7099,24 @@ function hr({
7093
7099
  e.kind === "pathology" ? /* @__PURE__ */ t(q, { label: s("anamnesis.configEditor.codeField"), required: !0, children: /* @__PURE__ */ t(
7094
7100
  ae,
7095
7101
  {
7096
- value: w,
7097
- onChange: (D) => P(D.target.value)
7102
+ value: k,
7103
+ onChange: (I) => S(I.target.value)
7098
7104
  }
7099
7105
  ) }) : null,
7100
7106
  /* @__PURE__ */ t(q, { label: s("anamnesis.configEditor.labelField"), required: !0, children: /* @__PURE__ */ t(
7101
7107
  ae,
7102
7108
  {
7103
7109
  value: o,
7104
- onChange: (D) => r(D.target.value)
7110
+ onChange: (I) => r(I.target.value)
7105
7111
  }
7106
7112
  ) }),
7107
7113
  e.kind === "parameter" ? /* @__PURE__ */ d(_e, { children: [
7108
7114
  /* @__PURE__ */ t(q, { label: s("anamnesis.configEditor.groupField"), required: !0, children: /* @__PURE__ */ t(
7109
7115
  Ve,
7110
7116
  {
7111
- options: V,
7117
+ options: B,
7112
7118
  value: l,
7113
- onValueChange: (D) => c(D),
7119
+ onValueChange: (I) => c(I),
7114
7120
  placeholder: s("anamnesis.configEditor.selectPlaceholder"),
7115
7121
  "aria-label": s("anamnesis.configEditor.groupField")
7116
7122
  }
@@ -7125,7 +7131,7 @@ function hr({
7125
7131
  {
7126
7132
  options: j,
7127
7133
  value: m,
7128
- onValueChange: (D) => h(D),
7134
+ onValueChange: (I) => h(I),
7129
7135
  placeholder: s("anamnesis.configEditor.selectPlaceholder"),
7130
7136
  "aria-label": s("anamnesis.configEditor.directionField")
7131
7137
  }
@@ -7137,7 +7143,7 @@ function hr({
7137
7143
  ae,
7138
7144
  {
7139
7145
  value: g,
7140
- onChange: (D) => p(D.target.value)
7146
+ onChange: (I) => p(I.target.value)
7141
7147
  }
7142
7148
  ) }),
7143
7149
  /* @__PURE__ */ t(
@@ -7154,7 +7160,7 @@ function hr({
7154
7160
  { value: "2", label: "2" }
7155
7161
  ],
7156
7162
  value: x,
7157
- onValueChange: (D) => A(D || "0"),
7163
+ onValueChange: (I) => A(I || "0"),
7158
7164
  "aria-label": s("anamnesis.configEditor.precisionField")
7159
7165
  }
7160
7166
  )
@@ -7171,8 +7177,8 @@ function hr({
7171
7177
  ae,
7172
7178
  {
7173
7179
  inputMode: "decimal",
7174
- value: N,
7175
- onChange: (D) => y(D.target.value)
7180
+ value: w,
7181
+ onChange: (I) => y(I.target.value)
7176
7182
  }
7177
7183
  )
7178
7184
  }
@@ -7187,7 +7193,7 @@ function hr({
7187
7193
  {
7188
7194
  inputMode: "decimal",
7189
7195
  value: f,
7190
- onChange: (D) => C(D.target.value)
7196
+ onChange: (I) => C(I.target.value)
7191
7197
  }
7192
7198
  )
7193
7199
  }
@@ -7200,7 +7206,7 @@ function hr({
7200
7206
  {
7201
7207
  options: ne,
7202
7208
  value: T,
7203
- onValueChange: (D) => E(D),
7209
+ onValueChange: (I) => D(I),
7204
7210
  placeholder: s("anamnesis.configEditor.selectPlaceholder"),
7205
7211
  "aria-label": s("anamnesis.configEditor.typeField")
7206
7212
  }
@@ -7214,8 +7220,8 @@ function hr({
7214
7220
  children: /* @__PURE__ */ t(
7215
7221
  ae,
7216
7222
  {
7217
- value: S,
7218
- onChange: (D) => R(D.target.value)
7223
+ value: E,
7224
+ onChange: (I) => L(I.target.value)
7219
7225
  }
7220
7226
  )
7221
7227
  }
@@ -7224,7 +7230,7 @@ function hr({
7224
7230
  ta,
7225
7231
  {
7226
7232
  value: u,
7227
- onChange: (D) => v(D.target.value),
7233
+ onChange: (I) => N(I.target.value),
7228
7234
  minRows: 2
7229
7235
  }
7230
7236
  ) }),
@@ -7233,7 +7239,7 @@ function hr({
7233
7239
  {
7234
7240
  label: s("anamnesis.configEditor.requiredField"),
7235
7241
  checked: z,
7236
- onCheckedChange: (D) => B(D === !0)
7242
+ onCheckedChange: (I) => V(I === !0)
7237
7243
  }
7238
7244
  )
7239
7245
  ] }) : null,
@@ -7247,8 +7253,8 @@ function hr({
7247
7253
  Ve,
7248
7254
  {
7249
7255
  options: ve,
7250
- value: L,
7251
- onValueChange: (D) => F(D),
7256
+ value: F,
7257
+ onValueChange: (I) => P(I),
7252
7258
  placeholder: s("anamnesis.configEditor.selectPlaceholder"),
7253
7259
  clearable: !0,
7254
7260
  "aria-label": s("anamnesis.configEditor.parentField")
@@ -9158,4 +9164,4 @@ export {
9158
9164
  Sl as r,
9159
9165
  Nl as s
9160
9166
  };
9161
- //# sourceMappingURL=anamnesis-i18n-DZcrt8dP.js.map
9167
+ //# sourceMappingURL=anamnesis-i18n-CwQX6KXF.js.map