@burdenoff/microfe-mybodyshield 2026.827.1 → 2026.830.1

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.
Files changed (90) hide show
  1. package/dist/mybodyshield/MyBodyShieldRoot.d.ts.map +1 -1
  2. package/dist/mybodyshield/MyBodyShieldRoot.js +54 -56
  3. package/dist/mybodyshield/MyBodyShieldRoot.js.map +1 -1
  4. package/dist/mybodyshield/MyBodyShieldRoutes.d.ts.map +1 -1
  5. package/dist/mybodyshield/MyBodyShieldRoutes.js +121 -62
  6. package/dist/mybodyshield/MyBodyShieldRoutes.js.map +1 -1
  7. package/dist/mybodyshield/components/EvidenceUpload.d.ts.map +1 -1
  8. package/dist/mybodyshield/components/EvidenceUpload.js +46 -45
  9. package/dist/mybodyshield/components/EvidenceUpload.js.map +1 -1
  10. package/dist/mybodyshield/components/FileLink.d.ts.map +1 -1
  11. package/dist/mybodyshield/components/FileLink.js +27 -18
  12. package/dist/mybodyshield/components/FileLink.js.map +1 -1
  13. package/dist/mybodyshield/components/MybDiscussion.d.ts +1 -1
  14. package/dist/mybodyshield/components/MybDiscussion.d.ts.map +1 -1
  15. package/dist/mybodyshield/components/MybDiscussion.js +59 -58
  16. package/dist/mybodyshield/components/MybDiscussion.js.map +1 -1
  17. package/dist/mybodyshield/components/MybTags.d.ts +1 -1
  18. package/dist/mybodyshield/components/MybTags.d.ts.map +1 -1
  19. package/dist/mybodyshield/components/MybTags.js +83 -74
  20. package/dist/mybodyshield/components/MybTags.js.map +1 -1
  21. package/dist/mybodyshield/components/PageDisabled.d.ts.map +1 -1
  22. package/dist/mybodyshield/components/PageDisabled.js +16 -11
  23. package/dist/mybodyshield/components/PageDisabled.js.map +1 -1
  24. package/dist/mybodyshield/components/Pagination.d.ts.map +1 -1
  25. package/dist/mybodyshield/components/Pagination.js +36 -27
  26. package/dist/mybodyshield/components/Pagination.js.map +1 -1
  27. package/dist/mybodyshield/components/StateViews.d.ts.map +1 -1
  28. package/dist/mybodyshield/components/StateViews.js +42 -34
  29. package/dist/mybodyshield/components/StateViews.js.map +1 -1
  30. package/dist/mybodyshield/components/UserSearchSelect.d.ts.map +1 -1
  31. package/dist/mybodyshield/components/UserSearchSelect.js +66 -68
  32. package/dist/mybodyshield/components/UserSearchSelect.js.map +1 -1
  33. package/dist/mybodyshield/hooks/index.d.ts +1 -0
  34. package/dist/mybodyshield/hooks/index.d.ts.map +1 -1
  35. package/dist/mybodyshield/hooks/index.js +1 -0
  36. package/dist/mybodyshield/hooks/useTr.d.ts +5 -0
  37. package/dist/mybodyshield/hooks/useTr.d.ts.map +1 -0
  38. package/dist/mybodyshield/hooks/useTr.js +12 -0
  39. package/dist/mybodyshield/hooks/useTr.js.map +1 -0
  40. package/dist/mybodyshield/pages/DashboardPage.d.ts.map +1 -1
  41. package/dist/mybodyshield/pages/DashboardPage.js +157 -136
  42. package/dist/mybodyshield/pages/DashboardPage.js.map +1 -1
  43. package/dist/mybodyshield/pages/SettingsPage.d.ts.map +1 -1
  44. package/dist/mybodyshield/pages/SettingsPage.js +50 -59
  45. package/dist/mybodyshield/pages/SettingsPage.js.map +1 -1
  46. package/dist/mybodyshield/pages/_shared/visuals.d.ts +2 -1
  47. package/dist/mybodyshield/pages/_shared/visuals.d.ts.map +1 -1
  48. package/dist/mybodyshield/pages/_shared/visuals.js +91 -81
  49. package/dist/mybodyshield/pages/_shared/visuals.js.map +1 -1
  50. package/dist/mybodyshield/pages/ai/AiControlsPage.d.ts.map +1 -1
  51. package/dist/mybodyshield/pages/ai/AiControlsPage.js +255 -266
  52. package/dist/mybodyshield/pages/ai/AiControlsPage.js.map +1 -1
  53. package/dist/mybodyshield/pages/coaching/CoachingPage.d.ts.map +1 -1
  54. package/dist/mybodyshield/pages/coaching/CoachingPage.js +321 -301
  55. package/dist/mybodyshield/pages/coaching/CoachingPage.js.map +1 -1
  56. package/dist/mybodyshield/pages/goals/GoalsPage.d.ts.map +1 -1
  57. package/dist/mybodyshield/pages/goals/GoalsPage.js +247 -251
  58. package/dist/mybodyshield/pages/goals/GoalsPage.js.map +1 -1
  59. package/dist/mybodyshield/pages/insights/InsightsCharts.d.ts.map +1 -1
  60. package/dist/mybodyshield/pages/insights/InsightsCharts.js +216 -213
  61. package/dist/mybodyshield/pages/insights/InsightsCharts.js.map +1 -1
  62. package/dist/mybodyshield/pages/insights/InsightsPage.d.ts.map +1 -1
  63. package/dist/mybodyshield/pages/insights/InsightsPage.js +290 -284
  64. package/dist/mybodyshield/pages/insights/InsightsPage.js.map +1 -1
  65. package/dist/mybodyshield/pages/nutrition/NutritionPage.d.ts.map +1 -1
  66. package/dist/mybodyshield/pages/nutrition/NutritionPage.js +575 -529
  67. package/dist/mybodyshield/pages/nutrition/NutritionPage.js.map +1 -1
  68. package/dist/mybodyshield/pages/programs/ProgramDetailPage.d.ts.map +1 -1
  69. package/dist/mybodyshield/pages/programs/ProgramDetailPage.js +333 -275
  70. package/dist/mybodyshield/pages/programs/ProgramDetailPage.js.map +1 -1
  71. package/dist/mybodyshield/pages/programs/ProgramsPage.d.ts.map +1 -1
  72. package/dist/mybodyshield/pages/programs/ProgramsPage.js +258 -253
  73. package/dist/mybodyshield/pages/programs/ProgramsPage.js.map +1 -1
  74. package/dist/mybodyshield/pages/progress/ProgressPage.d.ts.map +1 -1
  75. package/dist/mybodyshield/pages/progress/ProgressPage.js +271 -254
  76. package/dist/mybodyshield/pages/progress/ProgressPage.js.map +1 -1
  77. package/dist/mybodyshield/pages/recovery/RecoveryPage.d.ts.map +1 -1
  78. package/dist/mybodyshield/pages/recovery/RecoveryPage.js +206 -200
  79. package/dist/mybodyshield/pages/recovery/RecoveryPage.js.map +1 -1
  80. package/dist/mybodyshield/pages/train/SessionDetailPage.d.ts.map +1 -1
  81. package/dist/mybodyshield/pages/train/SessionDetailPage.js +327 -294
  82. package/dist/mybodyshield/pages/train/SessionDetailPage.js.map +1 -1
  83. package/dist/mybodyshield/pages/train/SessionsPage.d.ts.map +1 -1
  84. package/dist/mybodyshield/pages/train/SessionsPage.js +180 -163
  85. package/dist/mybodyshield/pages/train/SessionsPage.js.map +1 -1
  86. package/dist/mybodyshield/utils/i18n.d.ts +1 -2
  87. package/dist/mybodyshield/utils/i18n.d.ts.map +1 -1
  88. package/dist/mybodyshield/utils/i18n.js +15 -0
  89. package/dist/mybodyshield/utils/i18n.js.map +1 -0
  90. package/package.json +1 -1
@@ -3,133 +3,154 @@ import { PageLayout as t } from "../../components/PageLayout.js";
3
3
  import { formatKcal as n, formatNumber as ee, formatRelativeTime as te } from "../../utils/formatters.js";
4
4
  import { StatusBadge as ne } from "../../components/StatusBadge.js";
5
5
  import { EmptyState as r } from "../../components/EmptyState.js";
6
- import { ErrorView as i, LoadingView as a } from "../../components/StateViews.js";
7
- import { FilterTabs as o } from "../../components/FilterTabs.js";
8
- import { Pagination as s } from "../../components/Pagination.js";
9
6
  import "../../context/index.js";
10
- import { useMybProgramWorkouts as c, useMybPrograms as l, useMybSessions as u, useMybStartSession as re } from "../../hooks/useMyBodyShieldApi.js";
11
- import { useOffsetPager as d } from "../../hooks/usePager.js";
12
- import { useMyBodyShieldAnalytics as f } from "../../hooks/useMyBodyShieldAnalytics.js";
7
+ import { useMybProgramWorkouts as i, useMybPrograms as a, useMybSessions as o, useMybStartSession as s } from "../../hooks/useMyBodyShieldApi.js";
8
+ import { useOffsetPager as re } from "../../hooks/usePager.js";
9
+ import { useMyBodyShieldAnalytics as ie } from "../../hooks/useMyBodyShieldAnalytics.js";
10
+ import { useTr as c } from "../../hooks/useTr.js";
13
11
  import "../../hooks/index.js";
12
+ import { ErrorView as l, LoadingView as ae } from "../../components/StateViews.js";
13
+ import { FilterTabs as u } from "../../components/FilterTabs.js";
14
+ import { Pagination as d } from "../../components/Pagination.js";
14
15
  import "../../components/index.js";
15
- import { motion as p } from "../../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
16
- import { useReducedMotion as m } from "../../../node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js";
17
- import { IconChip as h, Meter as ie } from "../_shared/visuals.js";
18
- import { useState as g } from "react";
19
- import { CalendarClock as _, CheckCircle2 as v, Flame as y, Gauge as ae, ListChecks as oe, PlayCircle as b, Plus as x, SkipForward as S } from "lucide-react";
20
- import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
21
- import { Button as E, GlassCard as D, Input as se, Label as O, ResponsiveDialog as ce, ResponsiveDialogContent as le, ResponsiveDialogDescription as ue, ResponsiveDialogFooter as de, ResponsiveDialogHeader as fe, ResponsiveDialogTitle as pe, Select as k, SelectContent as A, SelectItem as j, SelectTrigger as M, SelectValue as N, Textarea as P } from "@burdenoff/fe-libs/ui";
16
+ import { motion as f } from "../../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
17
+ import { useReducedMotion as p } from "../../../node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js";
18
+ import { IconChip as oe, Meter as se } from "../_shared/visuals.js";
19
+ import { useState as m } from "react";
20
+ import { CalendarClock as h, CheckCircle2 as g, Flame as _, Gauge as ce, ListChecks as le, PlayCircle as v, Plus as y, SkipForward as b } from "lucide-react";
21
+ import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
22
+ import { Button as w, GlassCard as T, Input as E, Label as D, ResponsiveDialog as ue, ResponsiveDialogContent as de, ResponsiveDialogDescription as fe, ResponsiveDialogFooter as pe, ResponsiveDialogHeader as me, ResponsiveDialogTitle as he, Select as O, SelectContent as k, SelectItem as A, SelectTrigger as j, SelectValue as M, Textarea as N } from "@burdenoff/fe-libs/ui";
22
23
  //#region src/mybodyshield/pages/train/SessionsPage.tsx
23
- var F = [
24
- {
25
- value: "ALL",
26
- label: "All"
27
- },
28
- {
29
- value: "SCHEDULED",
30
- label: "Scheduled"
31
- },
32
- {
33
- value: "IN_PROGRESS",
34
- label: "Live"
35
- },
36
- {
37
- value: "COMPLETED",
38
- label: "Completed"
39
- }
40
- ], I = 24, L = [
24
+ function P(e) {
25
+ return [
26
+ {
27
+ value: "ALL",
28
+ label: e("mybodyshield.pages.train.all", "All")
29
+ },
30
+ {
31
+ value: "SCHEDULED",
32
+ label: e("mybodyshield.pages.train.scheduled", "Scheduled")
33
+ },
34
+ {
35
+ value: "IN_PROGRESS",
36
+ label: e("mybodyshield.pages.train.live", "Live")
37
+ },
38
+ {
39
+ value: "COMPLETED",
40
+ label: e("mybodyshield.pages.train.completed", "Completed")
41
+ }
42
+ ];
43
+ }
44
+ var F = 24, I = [
41
45
  .16,
42
46
  1,
43
47
  .3,
44
48
  1
45
- ], R = "__none__", z = "__none__", B = {
46
- programId: R,
47
- workoutId: z,
49
+ ], L = "__none__", R = "__none__", z = {
50
+ programId: L,
51
+ workoutId: R,
48
52
  scheduledFor: "",
49
53
  notes: ""
50
54
  };
51
- function me(e) {
55
+ function ge(e) {
52
56
  switch (e.status) {
53
57
  case "IN_PROGRESS": return {
54
- icon: b,
58
+ icon: v,
55
59
  tint: "var(--color-accent-teal)",
56
- title: "Live workout in progress",
57
- stampLabel: "Started",
60
+ titleKey: "mybodyshield.pages.train.liveWorkoutInProgress",
61
+ titleFallback: "Live workout in progress",
62
+ stampLabelKey: "mybodyshield.pages.train.startedAgo",
63
+ stampLabelFallback: "Started {{time}}",
58
64
  stamp: e.startedAt ?? e.createdAt
59
65
  };
60
66
  case "COMPLETED": return {
61
- icon: v,
67
+ icon: g,
62
68
  tint: "var(--color-status-success-text)",
63
- title: e.caloriesBurned > 0 ? `${n(e.caloriesBurned)} burned` : "Workout completed",
64
- stampLabel: "Completed",
69
+ titleKey: "mybodyshield.pages.train.completedTitle",
70
+ titleFallback: e.caloriesBurned > 0 ? "{{kcal}} burned" : "Workout completed",
71
+ titleParams: e.caloriesBurned > 0 ? { kcal: n(e.caloriesBurned) } : void 0,
72
+ stampLabelKey: "mybodyshield.pages.train.completedAgo",
73
+ stampLabelFallback: "Completed {{time}}",
65
74
  stamp: e.completedAt ?? e.startedAt ?? e.createdAt
66
75
  };
67
76
  case "SKIPPED": return {
68
- icon: S,
77
+ icon: b,
69
78
  tint: "var(--color-text-secondary)",
70
- title: "Skipped session",
71
- stampLabel: "Scheduled",
79
+ titleKey: "mybodyshield.pages.train.skippedSession",
80
+ titleFallback: "Skipped session",
81
+ stampLabelKey: "mybodyshield.pages.train.scheduledAgo",
82
+ stampLabelFallback: "Scheduled {{time}}",
72
83
  stamp: e.scheduledFor ?? e.createdAt
73
84
  };
74
85
  default: return {
75
- icon: _,
86
+ icon: h,
76
87
  tint: "var(--color-accent-primary)",
77
- title: "Scheduled session",
78
- stampLabel: "Scheduled",
88
+ titleKey: "mybodyshield.pages.train.scheduledSession",
89
+ titleFallback: "Scheduled session",
90
+ stampLabelKey: "mybodyshield.pages.train.scheduledAgo",
91
+ stampLabelFallback: "Scheduled {{time}}",
79
92
  stamp: e.scheduledFor ?? e.createdAt
80
93
  };
81
94
  }
82
95
  }
83
- function V() {
84
- let { navigateTo: _, workspaceId: v } = e(), b = m(), S = f(), [V, he] = g("ALL"), H = d(I), U = u({
96
+ function B() {
97
+ let h = c(), { navigateTo: g, workspaceId: v } = e(), b = p(), B = ie(), _e = P(h), [V, ve] = m("ALL"), H = re(F), U = o({
85
98
  status: V === "ALL" ? void 0 : V,
86
99
  pagination: {
87
- limit: I,
100
+ limit: F,
88
101
  offset: H.offset
89
102
  }
90
- }), ge = l({
103
+ }), ye = a({
91
104
  status: "ACTIVE",
92
105
  pagination: { limit: 50 }
93
- }).data?.items ?? [], W = re(), [_e, G] = g(!1), [K, q] = g(B), [J, Y] = g(null), X = K.programId === R ? void 0 : K.programId, Z = c(X).data ?? [], Q = U.data?.items ?? [], ve = U.data?.pageInfo?.hasMore ?? !1, ye = (e) => {
94
- he(e), H.reset();
106
+ }).data?.items ?? [], W = s(), [be, G] = m(!1), [K, q] = m(z), [J, Y] = m(null), X = K.programId === L ? void 0 : K.programId, Z = i(X).data ?? [], Q = U.data?.items ?? [], xe = U.data?.pageInfo?.hasMore ?? !1, Se = (e) => {
107
+ ve(e), H.reset();
95
108
  }, $ = () => {
96
- q(B), Y(null), G(!0), S.emitIntent("session", "create", { workspaceId: v });
109
+ q(z), Y(null), G(!0), B.emitIntent("session", "create", { workspaceId: v });
97
110
  };
98
- return /* @__PURE__ */ T(t, {
99
- title: "Train",
100
- description: "Live workout sessions — start, log sets, and complete.",
101
- actions: /* @__PURE__ */ T(E, {
111
+ return /* @__PURE__ */ C(t, {
112
+ title: h("mybodyshield.pages.train.title", "Train"),
113
+ description: h("mybodyshield.pages.train.description", "Live workout sessions — start, log sets, and complete."),
114
+ actions: /* @__PURE__ */ C(w, {
102
115
  onClick: $,
103
- children: [/* @__PURE__ */ w(x, { className: "h-4 w-4" }), " Start session"]
116
+ children: [
117
+ /* @__PURE__ */ S(y, { className: "h-4 w-4" }),
118
+ " ",
119
+ h("mybodyshield.pages.train.startSession", "Start session")
120
+ ]
104
121
  }),
105
122
  children: [
106
- /* @__PURE__ */ w("div", {
123
+ /* @__PURE__ */ S("div", {
107
124
  className: "mb-6",
108
- children: /* @__PURE__ */ w(o, {
109
- options: F,
125
+ children: /* @__PURE__ */ S(u, {
126
+ options: _e,
110
127
  value: V,
111
- onChange: ye
128
+ onChange: Se
112
129
  })
113
130
  }),
114
- U.isLoading ? /* @__PURE__ */ w(a, { label: "Loading your sessions…" }) : U.isError ? /* @__PURE__ */ w(i, {
115
- message: "We couldn't load your workout sessions.",
131
+ U.isLoading ? /* @__PURE__ */ S(ae, { label: h("mybodyshield.pages.train.loading", "Loading your sessions…") }) : U.isError ? /* @__PURE__ */ S(l, {
132
+ message: h("mybodyshield.pages.train.error", "We couldn't load your workout sessions."),
116
133
  onRetry: () => U.refetch()
117
- }) : Q.length === 0 ? /* @__PURE__ */ w(r, {
134
+ }) : Q.length === 0 ? /* @__PURE__ */ S(r, {
118
135
  illustration: "empty-data",
119
- icon: /* @__PURE__ */ w(y, { className: "h-10 w-10" }),
120
- title: V === "ALL" ? "No sessions yet" : "No sessions in this state",
121
- description: V === "ALL" ? "Start a workout session to begin logging sets and tracking your training." : "Try a different filter, or start a new workout session.",
122
- action: /* @__PURE__ */ T(E, {
136
+ icon: /* @__PURE__ */ S(_, { className: "h-10 w-10" }),
137
+ title: V === "ALL" ? h("mybodyshield.pages.train.emptyTitle", "No sessions yet") : h("mybodyshield.pages.train.emptyFilteredTitle", "No sessions in this state"),
138
+ description: V === "ALL" ? h("mybodyshield.pages.train.emptyDescription", "Start a workout session to begin logging sets and tracking your training.") : h("mybodyshield.pages.train.emptyFilteredDescription", "Try a different filter, or start a new workout session."),
139
+ action: /* @__PURE__ */ C(w, {
123
140
  onClick: $,
124
- children: [/* @__PURE__ */ w(x, { className: "h-4 w-4" }), " Start session"]
141
+ children: [
142
+ /* @__PURE__ */ S(y, { className: "h-4 w-4" }),
143
+ " ",
144
+ h("mybodyshield.pages.train.startSession", "Start session")
145
+ ]
125
146
  })
126
- }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("div", {
147
+ }) : /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S("div", {
127
148
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
128
149
  children: Q.map((e, t) => {
129
- let r = me(e), i = r.icon, a = e.status === "IN_PROGRESS", o = e.sets?.length, s = e.perceivedExertion;
130
- return /* @__PURE__ */ w(p.button, {
150
+ let r = ge(e), i = r.icon, a = e.status === "IN_PROGRESS", o = e.sets?.length, s = e.perceivedExertion;
151
+ return /* @__PURE__ */ S(f.button, {
131
152
  type: "button",
132
- onClick: () => _(`train/${e.id}`),
153
+ onClick: () => g(`train/${e.id}`),
133
154
  className: "block w-full text-left",
134
155
  initial: b ? !1 : {
135
156
  opacity: 0,
@@ -142,164 +163,160 @@ function V() {
142
163
  transition: b ? { duration: 0 } : {
143
164
  duration: .35,
144
165
  delay: Math.min(t, 8) * .05,
145
- ease: L
166
+ ease: I
146
167
  },
147
168
  whileHover: b ? void 0 : { y: -3 },
148
169
  whileTap: b ? void 0 : { scale: .995 },
149
- children: /* @__PURE__ */ T(D, {
170
+ children: /* @__PURE__ */ C(T, {
150
171
  treatment: "plain",
151
172
  glow: a,
152
173
  className: "h-full p-4 transition-shadow hover:shadow-float" + (a ? " ring-1 ring-inset ring-[color-mix(in_oklab,var(--color-action-primary-bg)_45%,transparent)]" : ""),
153
174
  children: [
154
- /* @__PURE__ */ T("div", {
175
+ /* @__PURE__ */ C("div", {
155
176
  className: "flex items-center justify-between gap-2",
156
- children: [/* @__PURE__ */ w(h, {
157
- icon: /* @__PURE__ */ w(i, { className: "h-4 w-4" }),
177
+ children: [/* @__PURE__ */ S(oe, {
178
+ icon: /* @__PURE__ */ S(i, { className: "h-4 w-4" }),
158
179
  tint: r.tint
159
- }), /* @__PURE__ */ w(ne, { status: e.status })]
180
+ }), /* @__PURE__ */ S(ne, { status: e.status })]
160
181
  }),
161
- /* @__PURE__ */ w("p", {
182
+ /* @__PURE__ */ S("p", {
162
183
  className: "mt-3 text-base font-semibold text-text-primary",
163
- children: r.title
184
+ children: h(r.titleKey, r.titleFallback, r.titleParams)
164
185
  }),
165
- /* @__PURE__ */ T("p", {
186
+ /* @__PURE__ */ S("p", {
166
187
  className: "mt-0.5 text-xs text-text-tertiary",
167
- children: [
168
- r.stampLabel,
169
- " ",
170
- te(r.stamp)
171
- ]
188
+ children: h(r.stampLabelKey, r.stampLabelFallback, { time: te(r.stamp) })
172
189
  }),
173
- /* @__PURE__ */ T("div", {
190
+ /* @__PURE__ */ C("div", {
174
191
  className: "mt-3 flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-text-secondary",
175
192
  children: [
176
- e.caloriesBurned > 0 && /* @__PURE__ */ T("span", {
193
+ e.caloriesBurned > 0 && /* @__PURE__ */ C("span", {
177
194
  className: "inline-flex items-center gap-1 tabular-nums",
178
- children: [/* @__PURE__ */ w(y, { className: "h-3.5 w-3.5 text-status-warning-text" }), n(e.caloriesBurned)]
195
+ children: [/* @__PURE__ */ S(_, { className: "h-3.5 w-3.5 text-status-warning-text" }), n(e.caloriesBurned)]
179
196
  }),
180
- s != null && /* @__PURE__ */ T("span", {
197
+ s != null && /* @__PURE__ */ C("span", {
181
198
  className: "inline-flex items-center gap-1 tabular-nums",
182
- children: [
183
- /* @__PURE__ */ w(ae, { className: "h-3.5 w-3.5 text-accent" }),
184
- "RPE ",
185
- s,
186
- "/10"
187
- ]
199
+ children: [/* @__PURE__ */ S(ce, { className: "h-3.5 w-3.5 text-accent" }), h("mybodyshield.pages.train.rpe", "RPE {{rpe}}/10", { rpe: s })]
188
200
  }),
189
- o != null && o > 0 && /* @__PURE__ */ T("span", {
201
+ o != null && o > 0 && /* @__PURE__ */ C("span", {
190
202
  className: "inline-flex items-center gap-1 tabular-nums",
191
203
  children: [
192
- /* @__PURE__ */ w(oe, { className: "h-3.5 w-3.5 text-accent" }),
204
+ /* @__PURE__ */ S(le, { className: "h-3.5 w-3.5 text-accent" }),
193
205
  ee(o),
194
- " sets"
206
+ " ",
207
+ h("mybodyshield.pages.train.sets", "sets")
195
208
  ]
196
209
  })
197
210
  ]
198
211
  }),
199
- s != null && /* @__PURE__ */ T("div", {
212
+ s != null && /* @__PURE__ */ C("div", {
200
213
  className: "mt-3",
201
- children: [/* @__PURE__ */ T("div", {
214
+ children: [/* @__PURE__ */ C("div", {
202
215
  className: "mb-1 flex items-center justify-between text-[11px] text-text-tertiary",
203
- children: [/* @__PURE__ */ w("span", { children: "RPE intensity" }), /* @__PURE__ */ T("span", {
216
+ children: [/* @__PURE__ */ S("span", { children: h("mybodyshield.pages.train.rpeIntensity", "RPE intensity") }), /* @__PURE__ */ S("span", {
204
217
  className: "tabular-nums",
205
- children: [s, "/10"]
218
+ children: h("mybodyshield.pages.train.rpeOutOfTen", "{{rpe}}/10", { rpe: s })
206
219
  })]
207
- }), /* @__PURE__ */ w(ie, {
220
+ }), /* @__PURE__ */ S(se, {
208
221
  value: s * 10,
209
222
  height: 6
210
223
  })]
211
224
  }),
212
- a && /* @__PURE__ */ w("p", {
225
+ a && /* @__PURE__ */ S("p", {
213
226
  className: "mt-3 inline-flex items-center gap-1 text-xs font-semibold text-action-primary-bg",
214
- children: "In progress — Resume →"
227
+ children: h("mybodyshield.pages.train.resume", "In progress — Resume →")
215
228
  })
216
229
  ]
217
230
  })
218
231
  }, e.id);
219
232
  })
220
- }), /* @__PURE__ */ w(s, {
233
+ }), /* @__PURE__ */ S(d, {
221
234
  page: H.page,
222
- pageSize: I,
235
+ pageSize: F,
223
236
  itemCount: Q.length,
224
- hasMore: ve,
237
+ hasMore: xe,
225
238
  onPageChange: (e) => H.onPageChange(e)
226
239
  })] }),
227
- /* @__PURE__ */ w(ce, {
228
- open: _e,
240
+ /* @__PURE__ */ S(ue, {
241
+ open: be,
229
242
  onOpenChange: G,
230
- children: /* @__PURE__ */ T(le, { children: [
231
- /* @__PURE__ */ T(fe, { children: [/* @__PURE__ */ w(pe, { children: "Start a workout session" }), /* @__PURE__ */ w(ue, { children: "Begin a live session now, or schedule one for later. Attach an active program to keep your training organised." })] }),
232
- /* @__PURE__ */ T("div", {
243
+ children: /* @__PURE__ */ C(de, { children: [
244
+ /* @__PURE__ */ C(me, { children: [/* @__PURE__ */ S(he, { children: h("mybodyshield.pages.train.startDialogTitle", "Start a workout session") }), /* @__PURE__ */ S(fe, { children: h("mybodyshield.pages.train.startDialogDescription", "Begin a live session now, or schedule one for later. Attach an active program to keep your training organised.") })] }),
245
+ /* @__PURE__ */ C("div", {
233
246
  className: "space-y-4 px-1",
234
247
  children: [
235
- /* @__PURE__ */ T("div", {
248
+ /* @__PURE__ */ C("div", {
236
249
  className: "space-y-1.5",
237
- children: [/* @__PURE__ */ w(O, {
250
+ children: [/* @__PURE__ */ S(D, {
238
251
  htmlFor: "myb-start-program",
239
- children: "Program (optional)"
240
- }), /* @__PURE__ */ T(k, {
252
+ children: h("mybodyshield.pages.train.programOptional", "Program (optional)")
253
+ }), /* @__PURE__ */ C(O, {
241
254
  value: K.programId,
242
255
  onValueChange: (e) => q((t) => ({
243
256
  ...t,
244
257
  programId: e,
245
- workoutId: z
258
+ workoutId: R
246
259
  })),
247
- children: [/* @__PURE__ */ w(M, {
260
+ children: [/* @__PURE__ */ S(j, {
248
261
  id: "myb-start-program",
249
- children: /* @__PURE__ */ w(N, { placeholder: "No program" })
250
- }), /* @__PURE__ */ T(A, { children: [/* @__PURE__ */ w(j, {
251
- value: R,
252
- children: "No program"
253
- }), ge.map((e) => /* @__PURE__ */ w(j, {
262
+ children: /* @__PURE__ */ S(M, { placeholder: h("mybodyshield.pages.train.noProgram", "No program") })
263
+ }), /* @__PURE__ */ C(k, { children: [/* @__PURE__ */ S(A, {
264
+ value: L,
265
+ children: h("mybodyshield.pages.train.noProgram", "No program")
266
+ }), ye.map((e) => /* @__PURE__ */ S(A, {
254
267
  value: e.id,
255
268
  children: e.name
256
269
  }, e.id))] })]
257
270
  })]
258
271
  }),
259
- X && Z.length > 0 && /* @__PURE__ */ T("div", {
272
+ X && Z.length > 0 && /* @__PURE__ */ C("div", {
260
273
  className: "space-y-1.5",
261
274
  children: [
262
- /* @__PURE__ */ w(O, {
275
+ /* @__PURE__ */ S(D, {
263
276
  htmlFor: "myb-start-workout",
264
- children: "Workout (optional)"
277
+ children: h("mybodyshield.pages.train.workoutOptional", "Workout (optional)")
265
278
  }),
266
- /* @__PURE__ */ T(k, {
279
+ /* @__PURE__ */ C(O, {
267
280
  value: K.workoutId,
268
281
  onValueChange: (e) => q((t) => ({
269
282
  ...t,
270
283
  workoutId: e
271
284
  })),
272
- children: [/* @__PURE__ */ w(M, {
285
+ children: [/* @__PURE__ */ S(j, {
273
286
  id: "myb-start-workout",
274
- children: /* @__PURE__ */ w(N, { placeholder: "No specific workout" })
275
- }), /* @__PURE__ */ T(A, { children: [/* @__PURE__ */ w(j, {
276
- value: z,
277
- children: "No specific workout"
278
- }), Z.map((e) => /* @__PURE__ */ T(j, {
287
+ children: /* @__PURE__ */ S(M, { placeholder: h("mybodyshield.pages.train.noSpecificWorkout", "No specific workout") })
288
+ }), /* @__PURE__ */ C(k, { children: [/* @__PURE__ */ S(A, {
289
+ value: R,
290
+ children: h("mybodyshield.pages.train.noSpecificWorkout", "No specific workout")
291
+ }), Z.map((e) => /* @__PURE__ */ C(A, {
279
292
  value: e.id,
280
293
  children: [
281
294
  e.name,
282
- " — Week ",
295
+ " — ",
296
+ h("mybodyshield.pages.programDetail.week", "Week"),
297
+ " ",
283
298
  e.weekNumber,
284
- ", Day ",
299
+ ", ",
300
+ h("mybodyshield.pages.programDetail.day", "Day"),
301
+ " ",
285
302
  e.dayOfWeek
286
303
  ]
287
304
  }, e.id))] })]
288
305
  }),
289
- /* @__PURE__ */ w("p", {
306
+ /* @__PURE__ */ S("p", {
290
307
  className: "text-xs text-text-tertiary",
291
- children: "Attach a planned workout to guide this session exercise-by-exercise."
308
+ children: h("mybodyshield.pages.train.attachWorkoutHint", "Attach a planned workout to guide this session exercise-by-exercise.")
292
309
  })
293
310
  ]
294
311
  }),
295
- /* @__PURE__ */ T("div", {
312
+ /* @__PURE__ */ C("div", {
296
313
  className: "space-y-1.5",
297
314
  children: [
298
- /* @__PURE__ */ w(O, {
315
+ /* @__PURE__ */ S(D, {
299
316
  htmlFor: "myb-start-scheduled",
300
- children: "Scheduled for (optional)"
317
+ children: h("mybodyshield.pages.train.scheduledForOptional", "Scheduled for (optional)")
301
318
  }),
302
- /* @__PURE__ */ w(se, {
319
+ /* @__PURE__ */ S(E, {
303
320
  id: "myb-start-scheduled",
304
321
  type: "datetime-local",
305
322
  value: K.scheduledFor,
@@ -308,18 +325,18 @@ function V() {
308
325
  scheduledFor: e.target.value
309
326
  }))
310
327
  }),
311
- /* @__PURE__ */ w("p", {
328
+ /* @__PURE__ */ S("p", {
312
329
  className: "text-xs text-text-tertiary",
313
- children: "Leave empty to start a live session right now."
330
+ children: h("mybodyshield.pages.train.scheduledForHint", "Leave empty to start a live session right now.")
314
331
  })
315
332
  ]
316
333
  }),
317
- /* @__PURE__ */ T("div", {
334
+ /* @__PURE__ */ C("div", {
318
335
  className: "space-y-1.5",
319
- children: [/* @__PURE__ */ w(O, {
336
+ children: [/* @__PURE__ */ S(D, {
320
337
  htmlFor: "myb-start-notes",
321
- children: "Notes (optional)"
322
- }), /* @__PURE__ */ w(P, {
338
+ children: h("mybodyshield.pages.train.notesOptional", "Notes (optional)")
339
+ }), /* @__PURE__ */ S(N, {
323
340
  id: "myb-start-notes",
324
341
  rows: 3,
325
342
  value: K.notes,
@@ -327,40 +344,40 @@ function V() {
327
344
  ...t,
328
345
  notes: e.target.value
329
346
  })),
330
- placeholder: "Focus, target lifts, how you're feeling…"
347
+ placeholder: h("mybodyshield.pages.train.notesPlaceholder", "Focus, target lifts, how you're feeling…")
331
348
  })]
332
349
  }),
333
- J && /* @__PURE__ */ w("p", {
350
+ J && /* @__PURE__ */ S("p", {
334
351
  className: "text-sm text-status-error-text",
335
352
  children: J
336
353
  })
337
354
  ]
338
355
  }),
339
- /* @__PURE__ */ T(de, { children: [/* @__PURE__ */ w(E, {
356
+ /* @__PURE__ */ C(pe, { children: [/* @__PURE__ */ S(w, {
340
357
  variant: "outline",
341
358
  onClick: () => G(!1),
342
359
  disabled: W.isPending,
343
- children: "Cancel"
344
- }), /* @__PURE__ */ w(E, {
360
+ children: h("mybodyshield.common.cancel", "Cancel")
361
+ }), /* @__PURE__ */ S(w, {
345
362
  onClick: async () => {
346
363
  Y(null);
347
364
  try {
348
365
  let e = await W.mutateAsync({
349
366
  programId: X,
350
- workoutId: K.workoutId === z ? void 0 : K.workoutId,
367
+ workoutId: K.workoutId === R ? void 0 : K.workoutId,
351
368
  scheduledFor: K.scheduledFor ? new Date(K.scheduledFor).toISOString() : void 0,
352
369
  notes: K.notes.trim() ? K.notes.trim() : void 0
353
370
  });
354
- S.emitFact("session", "started", {
371
+ B.emitFact("session", "started", {
355
372
  workspaceId: v,
356
373
  entityId: e.id
357
- }), G(!1), _(`train/${e.id}`);
374
+ }), G(!1), g(`train/${e.id}`);
358
375
  } catch (e) {
359
- Y(e instanceof Error ? e.message : "Failed to start the session.");
376
+ Y(e instanceof Error ? e.message : h("mybodyshield.pages.train.failedToStart", "Failed to start the session."));
360
377
  }
361
378
  },
362
379
  disabled: W.isPending,
363
- children: W.isPending ? "Starting…" : "Start session"
380
+ children: W.isPending ? h("mybodyshield.common.starting", "Starting") + "…" : h("mybodyshield.pages.train.startSession", "Start session")
364
381
  })] })
365
382
  ] })
366
383
  })
@@ -368,6 +385,6 @@ function V() {
368
385
  });
369
386
  }
370
387
  //#endregion
371
- export { V as SessionsPage };
388
+ export { B as SessionsPage };
372
389
 
373
390
  //# sourceMappingURL=SessionsPage.js.map