@burdenoff/microfe-timecampus 2026.1031.6 → 2026.1031.7

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.
@@ -11,84 +11,84 @@ import { ToastContainer as g, useToast as _ } from "../../components/Toast.js";
11
11
  import "../../components/index.js";
12
12
  import { TimeCampusLifeDomain as v } from "../../../generated/wspace-types.js";
13
13
  import { lifeDomainLabel as y } from "./domains.js";
14
- import { evidenceWeeks as b, formatEvidenceRef as x, formatHourOfDay as S, humaniseToken as C, parseEvidenceRefs as w, parseSuggestedAction as T } from "./recommendationEvidence.js";
15
- import { useMemo as E, useState as D } from "react";
16
- import { BellOff as O, Briefcase as k, Bus as A, CalendarClock as ee, Check as te, CheckCircle2 as ne, ChevronDown as j, Circle as re, Clock as M, Coffee as ie, ExternalLink as ae, GraduationCap as oe, Handshake as N, Heart as se, HeartPulse as ce, Home as le, Hourglass as ue, Lightbulb as P, Microscope as F, Moon as I, ShieldCheck as L, Sparkles as R, Users as z, Wallet as B, X as V } from "lucide-react";
17
- import { Fragment as de, jsx as H, jsxs as U } from "react/jsx-runtime";
18
- import { GlassCard as W } from "@burdenoff/fe-libs/ui";
14
+ import { evidenceWeeks as ee, formatEvidenceRef as b, formatHourOfDay as x, humaniseToken as S, parseEvidenceRefs as C, parseSuggestedAction as w, recommendationKindLabel as T, recommendationProvenance as E } from "./recommendationEvidence.js";
15
+ import { useMemo as D, useState as O } from "react";
16
+ import { BellOff as k, Briefcase as te, Bus as ne, CalendarClock as A, Check as re, CheckCircle2 as ie, ChevronDown as ae, Circle as oe, Clock as se, Coffee as ce, ExternalLink as j, GraduationCap as le, Handshake as ue, Heart as de, HeartPulse as fe, Home as M, Hourglass as N, Lightbulb as P, Microscope as F, Moon as I, ShieldCheck as L, Sparkles as R, Users as z, Wallet as pe, X as B } from "lucide-react";
17
+ import { Fragment as me, jsx as V, jsxs as H } from "react/jsx-runtime";
18
+ import { GlassCard as U } from "@burdenoff/fe-libs/ui";
19
19
  //#region src/timecampus/pages/lifetime/RecommendationsPage.tsx
20
- var G = "Raised by TimeCampus's built-in rules from your own tracked time. It can be wrong for your week, so judge it before you accept.", K = {
20
+ var W = {
21
21
  New: "NEW",
22
22
  Snoozed: "SNOOZED",
23
23
  Accepted: "ACCEPTED",
24
24
  Dismissed: "DISMISSED",
25
25
  Expired: "EXPIRED"
26
- }, fe = [
26
+ }, he = [
27
27
  {
28
- key: K.New,
28
+ key: W.New,
29
29
  label: "New"
30
30
  },
31
31
  {
32
- key: K.Snoozed,
32
+ key: W.Snoozed,
33
33
  label: "Snoozed"
34
34
  },
35
35
  {
36
- key: K.Accepted,
36
+ key: W.Accepted,
37
37
  label: "Accepted"
38
38
  },
39
39
  {
40
- key: K.Dismissed,
40
+ key: W.Dismissed,
41
41
  label: "Dismissed"
42
42
  }
43
43
  ];
44
- function pe(e) {
45
- return e === K.New || e === K.Snoozed;
44
+ function ge(e) {
45
+ return e === W.New || e === W.Snoozed;
46
46
  }
47
- function me() {
47
+ function _e() {
48
48
  return new Date(Date.now() + 6048e5).toISOString();
49
49
  }
50
- var he = (e) => Math.min(1, Math.max(0, e)), q = (e) => `${Math.round(he(e) * 100)}%`;
51
- function J(e) {
50
+ var ve = (e) => Math.min(1, Math.max(0, e)), G = (e) => `${Math.round(ve(e) * 100)}%`;
51
+ function K(e) {
52
52
  return new Date(e).toLocaleDateString(void 0, {
53
53
  month: "short",
54
54
  day: "numeric",
55
55
  year: "numeric"
56
56
  });
57
57
  }
58
- var Y = Array.from({ length: 24 }, (e, t) => t), ge = {
59
- [v.Work]: k,
58
+ var q = Array.from({ length: 24 }, (e, t) => t), ye = {
59
+ [v.Work]: te,
60
60
  [v.Sleep]: I,
61
- [v.Health]: ce,
61
+ [v.Health]: fe,
62
62
  [v.Family]: z,
63
- [v.Learning]: oe,
64
- [v.Leisure]: ie,
65
- [v.Commute]: A,
66
- [v.Waiting]: ue,
67
- [v.Chores]: le,
68
- [v.SelfCare]: se,
69
- [v.Social]: N,
70
- [v.FinanceAdmin]: B,
63
+ [v.Learning]: le,
64
+ [v.Leisure]: ce,
65
+ [v.Commute]: ne,
66
+ [v.Waiting]: N,
67
+ [v.Chores]: M,
68
+ [v.SelfCare]: de,
69
+ [v.Social]: ue,
70
+ [v.FinanceAdmin]: pe,
71
71
  [v.Reflection]: R,
72
- [v.Other]: re
72
+ [v.Other]: oe
73
73
  };
74
- function _e(e) {
75
- return e ? ge[e] ?? P : P;
74
+ function be(e) {
75
+ return e ? ye[e] ?? P : P;
76
76
  }
77
- function ve(e) {
77
+ function J(e) {
78
78
  switch (e) {
79
- case K.Accepted: return {
79
+ case W.Accepted: return {
80
80
  variant: "success",
81
81
  label: "Accepted"
82
82
  };
83
- case K.Snoozed: return {
83
+ case W.Snoozed: return {
84
84
  variant: "warning",
85
85
  label: "Snoozed"
86
86
  };
87
- case K.Dismissed: return {
87
+ case W.Dismissed: return {
88
88
  variant: "muted",
89
89
  label: "Dismissed"
90
90
  };
91
- case K.Expired: return {
91
+ case W.Expired: return {
92
92
  variant: "muted",
93
93
  label: "Expired"
94
94
  };
@@ -98,9 +98,9 @@ function ve(e) {
98
98
  };
99
99
  }
100
100
  }
101
- var ye = "inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-1.5 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50", X = "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-bg-sunken/50 disabled:opacity-50", Z = "inline-flex items-center gap-1 rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs font-medium text-text-secondary";
102
- function be({ checked: e, onChange: t, label: r, disabled: i }) {
103
- return /* @__PURE__ */ H("button", {
101
+ var Y = "inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-1.5 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50", X = "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-bg-sunken/50 disabled:opacity-50", Z = "inline-flex items-center gap-1 rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs font-medium text-text-secondary";
102
+ function xe({ checked: e, onChange: t, label: r, disabled: i }) {
103
+ return /* @__PURE__ */ V("button", {
104
104
  type: "button",
105
105
  role: "switch",
106
106
  "aria-checked": e,
@@ -108,99 +108,106 @@ function be({ checked: e, onChange: t, label: r, disabled: i }) {
108
108
  disabled: i,
109
109
  onClick: () => t(!e),
110
110
  className: n("relative inline-flex h-5 w-9 shrink-0 items-center rounded-full border transition-colors disabled:cursor-not-allowed disabled:opacity-50", e ? "border-transparent bg-action-primary-bg" : "border-border-subtle bg-bg-sunken"),
111
- children: /* @__PURE__ */ H("span", { className: n("inline-block h-3.5 w-3.5 transform rounded-full shadow-sm transition-transform", e ? "translate-x-4 bg-action-primary-text" : "translate-x-0.5 bg-text-secondary") })
111
+ children: /* @__PURE__ */ V("span", { className: n("inline-block h-3.5 w-3.5 transform rounded-full shadow-sm transition-transform", e ? "translate-x-4 bg-action-primary-text" : "translate-x-0.5 bg-text-secondary") })
112
112
  });
113
113
  }
114
- function xe({ rec: e, busy: r, muted: i, onAccept: a, onSnooze: o, onDismiss: s, onMuteKind: c }) {
115
- let l = _e(e.domain), u = pe(e.state), d = ve(e.state), [f, p] = D(!1), h = w(e.evidenceRefs), g = T(e.suggestedAction), _ = `rec-evidence-${e.id}`, v = b(e.createdAt, h), S = t();
116
- return /* @__PURE__ */ U(W, {
114
+ function Se({ rec: e, busy: r, muted: i, onAccept: a, onSnooze: o, onDismiss: s, onMuteKind: c }) {
115
+ let l = be(e.domain), u = ge(e.state), d = J(e.state), [f, p] = O(!1), h = C(e.evidenceRefs), g = w(e.suggestedAction), _ = `rec-evidence-${e.id}`, v = ee(e.createdAt, h), x = t();
116
+ return /* @__PURE__ */ H(U, {
117
117
  treatment: "glass",
118
118
  className: "flex flex-col gap-3 p-4 sm:p-5",
119
119
  children: [
120
- /* @__PURE__ */ U("div", {
120
+ /* @__PURE__ */ H("div", {
121
121
  className: "flex items-start justify-between gap-3",
122
- children: [/* @__PURE__ */ U("div", {
122
+ children: [/* @__PURE__ */ H("div", {
123
123
  className: "flex min-w-0 items-center gap-3",
124
- children: [/* @__PURE__ */ H("span", {
124
+ children: [/* @__PURE__ */ V("span", {
125
125
  className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-action-primary-bg/10 text-primary",
126
- children: /* @__PURE__ */ H(l, { className: "h-5 w-5" })
127
- }), /* @__PURE__ */ U("div", {
126
+ children: /* @__PURE__ */ V(l, { className: "h-5 w-5" })
127
+ }), /* @__PURE__ */ H("div", {
128
128
  className: "min-w-0",
129
129
  children: [/* @__PURE__ */ H("p", {
130
- className: "truncate text-xs font-medium uppercase tracking-wide text-text-secondary",
131
- children: C(e.kind)
132
- }), /* @__PURE__ */ H("h3", {
130
+ className: "flex min-w-0 items-center gap-1.5 text-xs font-medium uppercase tracking-wide text-text-secondary",
131
+ children: [e.source === "AI" && /* @__PURE__ */ H("span", {
132
+ className: Z,
133
+ "data-testid": "rec-ai-chip",
134
+ children: [/* @__PURE__ */ V(R, { className: "h-3 w-3" }), "AI"]
135
+ }), /* @__PURE__ */ V("span", {
136
+ className: "truncate",
137
+ children: T(e.kind)
138
+ })]
139
+ }), /* @__PURE__ */ V("h3", {
133
140
  className: "mt-0.5 text-base font-semibold text-text-primary",
134
141
  children: e.title
135
142
  })]
136
143
  })]
137
- }), e.confidence != null && /* @__PURE__ */ H(m, {
144
+ }), e.confidence != null && /* @__PURE__ */ V(m, {
138
145
  variant: "info",
139
- label: `${q(e.confidence)} confident`,
146
+ label: `${G(e.confidence)} confident`,
140
147
  className: "shrink-0"
141
148
  })]
142
149
  }),
143
- /* @__PURE__ */ H("p", {
150
+ /* @__PURE__ */ V("p", {
144
151
  className: "text-sm text-text-secondary",
145
152
  children: e.rationale
146
153
  }),
147
- /* @__PURE__ */ H("p", {
154
+ /* @__PURE__ */ V("p", {
148
155
  className: "text-xs text-text-tertiary",
149
156
  "data-testid": "rec-provenance",
150
- children: G
157
+ children: E(e.source, e.aiModel)
151
158
  }),
152
- /* @__PURE__ */ U("div", {
159
+ /* @__PURE__ */ H("div", {
153
160
  className: "flex flex-wrap items-center gap-1.5",
154
161
  children: [
155
- e.domain && /* @__PURE__ */ H("span", {
162
+ e.domain && /* @__PURE__ */ V("span", {
156
163
  className: Z,
157
164
  children: y(e.domain)
158
165
  }),
159
- e.valueAlignment != null && /* @__PURE__ */ U("span", {
166
+ e.valueAlignment != null && /* @__PURE__ */ H("span", {
160
167
  className: Z,
161
168
  children: [
162
- /* @__PURE__ */ H(L, { className: "h-3 w-3" }),
169
+ /* @__PURE__ */ V(L, { className: "h-3 w-3" }),
163
170
  "Aligns with your values · ",
164
- q(e.valueAlignment)
171
+ G(e.valueAlignment)
165
172
  ]
166
173
  }),
167
- e.state === K.Snoozed && e.snoozeUntil && /* @__PURE__ */ U("span", {
174
+ e.state === W.Snoozed && e.snoozeUntil && /* @__PURE__ */ H("span", {
168
175
  className: Z,
169
176
  children: [
170
- /* @__PURE__ */ H(M, { className: "h-3 w-3" }),
177
+ /* @__PURE__ */ V(se, { className: "h-3 w-3" }),
171
178
  "Snoozed until ",
172
- J(e.snoozeUntil)
179
+ K(e.snoozeUntil)
173
180
  ]
174
181
  }),
175
- u && e.expiresAt && /* @__PURE__ */ U("span", {
182
+ u && e.expiresAt && /* @__PURE__ */ H("span", {
176
183
  className: Z,
177
184
  children: [
178
- /* @__PURE__ */ H(ee, { className: "h-3 w-3" }),
185
+ /* @__PURE__ */ V(A, { className: "h-3 w-3" }),
179
186
  "Expires ",
180
- J(e.expiresAt)
187
+ K(e.expiresAt)
181
188
  ]
182
189
  })
183
190
  ]
184
191
  }),
185
- g && /* @__PURE__ */ U("div", {
192
+ g && /* @__PURE__ */ H("div", {
186
193
  className: "rounded-lg border border-border-seam bg-bg-sunken/40 p-3",
187
194
  children: [
188
- /* @__PURE__ */ H("p", {
195
+ /* @__PURE__ */ V("p", {
189
196
  className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
190
197
  children: "Suggested action"
191
198
  }),
192
- /* @__PURE__ */ H("p", {
199
+ /* @__PURE__ */ V("p", {
193
200
  className: "mt-1 text-sm font-medium text-text-primary",
194
- children: C(g.type)
201
+ children: S(g.type)
195
202
  }),
196
- g.details.length > 0 && /* @__PURE__ */ H("dl", {
203
+ g.details.length > 0 && /* @__PURE__ */ V("dl", {
197
204
  className: "mt-1.5 flex flex-wrap gap-x-4 gap-y-1",
198
- children: g.details.map((e) => /* @__PURE__ */ U("div", {
205
+ children: g.details.map((e) => /* @__PURE__ */ H("div", {
199
206
  className: "flex items-center gap-1.5",
200
- children: [/* @__PURE__ */ H("dt", {
207
+ children: [/* @__PURE__ */ V("dt", {
201
208
  className: "text-xs text-text-secondary",
202
209
  children: e.key
203
- }), /* @__PURE__ */ H("dd", {
210
+ }), /* @__PURE__ */ V("dd", {
204
211
  className: "text-xs font-medium tabular-nums text-text-primary",
205
212
  children: e.value
206
213
  })]
@@ -208,106 +215,106 @@ function xe({ rec: e, busy: r, muted: i, onAccept: a, onSnooze: o, onDismiss: s,
208
215
  })
209
216
  ]
210
217
  }),
211
- h.length > 0 && /* @__PURE__ */ U("div", {
218
+ h.length > 0 && /* @__PURE__ */ H("div", {
212
219
  className: "rounded-lg border border-border-seam bg-bg-sunken/40",
213
- children: [/* @__PURE__ */ U("button", {
220
+ children: [/* @__PURE__ */ H("button", {
214
221
  type: "button",
215
222
  onClick: () => p((e) => !e),
216
223
  "aria-expanded": f,
217
224
  "aria-controls": _,
218
225
  className: "flex w-full items-center justify-between gap-2 px-3 py-2 text-left",
219
- children: [/* @__PURE__ */ U("span", {
226
+ children: [/* @__PURE__ */ H("span", {
220
227
  className: "flex min-w-0 items-center gap-2",
221
- children: [/* @__PURE__ */ H(F, { className: "h-3.5 w-3.5 shrink-0 text-text-secondary" }), /* @__PURE__ */ U("span", {
228
+ children: [/* @__PURE__ */ V(F, { className: "h-3.5 w-3.5 shrink-0 text-text-secondary" }), /* @__PURE__ */ H("span", {
222
229
  className: "truncate text-xs text-text-secondary",
223
230
  children: [
224
231
  "Evidence: ",
225
- x(h[0]),
232
+ b(h[0]),
226
233
  h.length > 1 ? ` · +${h.length - 1} more` : ""
227
234
  ]
228
235
  })]
229
- }), /* @__PURE__ */ H(j, { className: n("h-4 w-4 shrink-0 text-text-secondary transition-transform", f && "rotate-180") })]
230
- }), f && /* @__PURE__ */ U("dl", {
236
+ }), /* @__PURE__ */ V(ae, { className: n("h-4 w-4 shrink-0 text-text-secondary transition-transform", f && "rotate-180") })]
237
+ }), f && /* @__PURE__ */ H("dl", {
231
238
  id: _,
232
239
  className: "space-y-1.5 border-t border-border-seam px-3 py-2.5",
233
240
  children: [
234
- h.map((e, t) => /* @__PURE__ */ U("div", {
241
+ h.map((e, t) => /* @__PURE__ */ H("div", {
235
242
  className: "flex items-baseline justify-between gap-3",
236
- children: [/* @__PURE__ */ H("dt", {
243
+ children: [/* @__PURE__ */ V("dt", {
237
244
  className: "text-xs text-text-secondary",
238
- children: x(e).split(": ")[0]
239
- }), /* @__PURE__ */ H("dd", {
245
+ children: b(e).split(": ")[0]
246
+ }), /* @__PURE__ */ V("dd", {
240
247
  className: "text-xs font-medium tabular-nums text-text-primary",
241
- children: x(e).split(": ").slice(1).join(": ")
248
+ children: b(e).split(": ").slice(1).join(": ")
242
249
  })]
243
250
  }, `${e.metric}-${e.period ?? e.domain ?? t}`)),
244
- v.length > 0 && /* @__PURE__ */ H("div", {
251
+ v.length > 0 && /* @__PURE__ */ V("div", {
245
252
  className: "flex flex-wrap gap-2 pt-1",
246
- children: v.map((e) => /* @__PURE__ */ U("button", {
253
+ children: v.map((e) => /* @__PURE__ */ H("button", {
247
254
  type: "button",
248
- onClick: () => S(`/timeline?date=${encodeURIComponent(e)}`),
255
+ onClick: () => x(`/timeline?date=${encodeURIComponent(e)}`),
249
256
  "data-testid": "rec-evidence-timeline-link",
250
257
  className: "inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-bg/40",
251
258
  children: [
252
- /* @__PURE__ */ H(ae, { className: "h-3 w-3" }),
259
+ /* @__PURE__ */ V(j, { className: "h-3 w-3" }),
253
260
  "Open the week of ",
254
- J(`${e}T12:00:00`),
261
+ K(`${e}T12:00:00`),
255
262
  " on your timeline"
256
263
  ]
257
264
  }, e))
258
265
  }),
259
- /* @__PURE__ */ H("p", {
266
+ /* @__PURE__ */ V("p", {
260
267
  className: "pt-1 text-xs text-text-tertiary",
261
268
  children: "Measured from your own tracked week. Nothing is applied until you accept."
262
269
  })
263
270
  ]
264
271
  })]
265
272
  }),
266
- u ? /* @__PURE__ */ U("div", {
273
+ u ? /* @__PURE__ */ H("div", {
267
274
  className: "flex flex-wrap items-center gap-2 pt-1",
268
275
  children: [
269
- /* @__PURE__ */ U("button", {
276
+ /* @__PURE__ */ H("button", {
270
277
  type: "button",
271
278
  onClick: () => a(e.id),
272
279
  disabled: r,
273
- className: ye,
274
- children: [/* @__PURE__ */ H(te, { className: "h-4 w-4" }), "Accept"]
280
+ className: Y,
281
+ children: [/* @__PURE__ */ V(re, { className: "h-4 w-4" }), "Accept"]
275
282
  }),
276
- /* @__PURE__ */ U("button", {
283
+ /* @__PURE__ */ H("button", {
277
284
  type: "button",
278
285
  onClick: () => o(e.id),
279
286
  disabled: r,
280
287
  className: X,
281
- children: [/* @__PURE__ */ H(M, { className: "h-4 w-4" }), "Snooze"]
288
+ children: [/* @__PURE__ */ V(se, { className: "h-4 w-4" }), "Snooze"]
282
289
  }),
283
- /* @__PURE__ */ U("button", {
290
+ /* @__PURE__ */ H("button", {
284
291
  type: "button",
285
292
  onClick: () => s(e),
286
293
  disabled: r,
287
294
  className: X,
288
- children: [/* @__PURE__ */ H(V, { className: "h-4 w-4" }), "Dismiss"]
295
+ children: [/* @__PURE__ */ V(B, { className: "h-4 w-4" }), "Dismiss"]
289
296
  }),
290
- /* @__PURE__ */ U("button", {
297
+ /* @__PURE__ */ H("button", {
291
298
  type: "button",
292
299
  onClick: () => c(e.kind),
293
300
  disabled: r || i,
294
301
  className: X,
295
- title: i ? `${C(e.kind)} suggestions are already muted` : `Stop generating ${C(e.kind)} suggestions`,
296
- children: [/* @__PURE__ */ H(O, { className: "h-4 w-4" }), i ? "Muted" : "Mute this kind"]
302
+ title: i ? `${T(e.kind)} suggestions are already muted` : `Stop generating ${T(e.kind)} suggestions`,
303
+ children: [/* @__PURE__ */ V(k, { className: "h-4 w-4" }), i ? "Muted" : "Mute this kind"]
297
304
  })
298
305
  ]
299
- }) : /* @__PURE__ */ U("div", {
306
+ }) : /* @__PURE__ */ H("div", {
300
307
  className: "flex flex-col gap-2 pt-1",
301
- children: [/* @__PURE__ */ U("div", {
308
+ children: [/* @__PURE__ */ H("div", {
302
309
  className: "flex items-center justify-between gap-2",
303
- children: [/* @__PURE__ */ H(m, {
310
+ children: [/* @__PURE__ */ V(m, {
304
311
  variant: d.variant,
305
312
  label: d.label
306
- }), /* @__PURE__ */ H("span", {
313
+ }), /* @__PURE__ */ V("span", {
307
314
  className: "text-xs text-text-secondary",
308
- children: J(e.createdAt)
315
+ children: K(e.createdAt)
309
316
  })]
310
- }), e.state === K.Dismissed && e.dismissReason && /* @__PURE__ */ U("p", {
317
+ }), e.state === W.Dismissed && e.dismissReason && /* @__PURE__ */ H("p", {
311
318
  className: "text-xs text-text-secondary",
312
319
  children: ["Reason given: ", e.dismissReason]
313
320
  })]
@@ -315,102 +322,102 @@ function xe({ rec: e, busy: r, muted: i, onAccept: a, onSnooze: o, onDismiss: s,
315
322
  ]
316
323
  });
317
324
  }
318
- function Se({ prefs: e, loading: t, saving: r, onToggleOutputGuard: a, onQuietHoursChange: o, onUnmuteKind: s }) {
319
- if (t) return /* @__PURE__ */ H(i, {
325
+ function Ce({ prefs: e, loading: t, saving: r, onToggleOutputGuard: a, onQuietHoursChange: o, onUnmuteKind: s }) {
326
+ if (t) return /* @__PURE__ */ V(i, {
320
327
  variant: "card",
321
328
  count: 1
322
329
  });
323
330
  if (!e) return null;
324
- let c = S(e.quietHoursStart), l = S(e.quietHoursEnd), u = c !== null && l !== null, d = "rounded-md border border-border-subtle bg-bg-surface px-2 py-1 text-xs text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/40 disabled:opacity-50";
325
- return /* @__PURE__ */ U(W, {
331
+ let c = x(e.quietHoursStart), l = x(e.quietHoursEnd), u = c !== null && l !== null, d = "rounded-md border border-border-subtle bg-bg-surface px-2 py-1 text-xs text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/40 disabled:opacity-50";
332
+ return /* @__PURE__ */ H(U, {
326
333
  treatment: "glass",
327
334
  className: "p-4 sm:p-5",
328
335
  children: [
329
- /* @__PURE__ */ U("div", {
336
+ /* @__PURE__ */ H("div", {
330
337
  className: "flex items-center gap-2",
331
- children: [/* @__PURE__ */ H(L, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ H("h3", {
338
+ children: [/* @__PURE__ */ V(L, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ V("h3", {
332
339
  className: "text-sm font-semibold text-text-primary",
333
340
  children: "Guardrails"
334
341
  })]
335
342
  }),
336
- /* @__PURE__ */ H("p", {
343
+ /* @__PURE__ */ V("p", {
337
344
  className: "mt-1 text-xs text-text-secondary",
338
345
  children: "What TimeCampus is allowed to suggest, and when."
339
346
  }),
340
- /* @__PURE__ */ U("div", {
347
+ /* @__PURE__ */ H("div", {
341
348
  className: "mt-4 space-y-4",
342
349
  children: [
343
- /* @__PURE__ */ U("div", {
350
+ /* @__PURE__ */ H("div", {
344
351
  className: "flex items-start justify-between gap-3",
345
- children: [/* @__PURE__ */ U("div", {
352
+ children: [/* @__PURE__ */ H("div", {
346
353
  className: "min-w-0",
347
- children: [/* @__PURE__ */ H("p", {
354
+ children: [/* @__PURE__ */ V("p", {
348
355
  className: "text-sm font-medium text-text-primary",
349
356
  children: "Never suggest more work"
350
- }), /* @__PURE__ */ H("p", {
357
+ }), /* @__PURE__ */ V("p", {
351
358
  className: "mt-0.5 text-xs text-text-secondary",
352
359
  children: "Output-increasing suggestions are filtered out before they reach you."
353
360
  })]
354
- }), /* @__PURE__ */ H(be, {
361
+ }), /* @__PURE__ */ V(xe, {
355
362
  checked: e.neverOptimiseForOutput,
356
363
  disabled: r,
357
364
  label: "Never suggest more work",
358
365
  onChange: a
359
366
  })]
360
367
  }),
361
- /* @__PURE__ */ U("div", {
368
+ /* @__PURE__ */ H("div", {
362
369
  className: "border-t border-border-seam pt-4",
363
370
  children: [
364
- /* @__PURE__ */ U("div", {
371
+ /* @__PURE__ */ H("div", {
365
372
  className: "flex items-center justify-between gap-3",
366
- children: [/* @__PURE__ */ H("p", {
373
+ children: [/* @__PURE__ */ V("p", {
367
374
  className: "text-sm font-medium text-text-primary",
368
375
  children: "Quiet hours"
369
- }), /* @__PURE__ */ H("span", {
376
+ }), /* @__PURE__ */ V("span", {
370
377
  className: "text-xs text-text-secondary",
371
378
  children: u ? `${c}–${l}` : "Not set"
372
379
  })]
373
380
  }),
374
- /* @__PURE__ */ H("p", {
381
+ /* @__PURE__ */ V("p", {
375
382
  className: "mt-0.5 text-xs text-text-secondary",
376
383
  children: "No nudges are sent inside this window."
377
384
  }),
378
- /* @__PURE__ */ U("div", {
385
+ /* @__PURE__ */ H("div", {
379
386
  className: "mt-2 flex flex-wrap items-center gap-2",
380
387
  children: [
381
- /* @__PURE__ */ U("label", {
388
+ /* @__PURE__ */ H("label", {
382
389
  className: "flex items-center gap-1.5 text-xs text-text-secondary",
383
- children: ["From", /* @__PURE__ */ U("select", {
390
+ children: ["From", /* @__PURE__ */ H("select", {
384
391
  className: d,
385
392
  disabled: r,
386
393
  value: e.quietHoursStart ?? "",
387
394
  onChange: (t) => o(t.target.value === "" ? null : Number(t.target.value), e.quietHoursEnd ?? null),
388
- children: [/* @__PURE__ */ H("option", {
395
+ children: [/* @__PURE__ */ V("option", {
389
396
  value: "",
390
397
  children: "—"
391
- }), Y.map((e) => /* @__PURE__ */ H("option", {
398
+ }), q.map((e) => /* @__PURE__ */ V("option", {
392
399
  value: e,
393
- children: S(e)
400
+ children: x(e)
394
401
  }, e))]
395
402
  })]
396
403
  }),
397
- /* @__PURE__ */ U("label", {
404
+ /* @__PURE__ */ H("label", {
398
405
  className: "flex items-center gap-1.5 text-xs text-text-secondary",
399
- children: ["To", /* @__PURE__ */ U("select", {
406
+ children: ["To", /* @__PURE__ */ H("select", {
400
407
  className: d,
401
408
  disabled: r,
402
409
  value: e.quietHoursEnd ?? "",
403
410
  onChange: (t) => o(e.quietHoursStart ?? null, t.target.value === "" ? null : Number(t.target.value)),
404
- children: [/* @__PURE__ */ H("option", {
411
+ children: [/* @__PURE__ */ V("option", {
405
412
  value: "",
406
413
  children: "—"
407
- }), Y.map((e) => /* @__PURE__ */ H("option", {
414
+ }), q.map((e) => /* @__PURE__ */ V("option", {
408
415
  value: e,
409
- children: S(e)
416
+ children: x(e)
410
417
  }, e))]
411
418
  })]
412
419
  }),
413
- u && /* @__PURE__ */ H("button", {
420
+ u && /* @__PURE__ */ V("button", {
414
421
  type: "button",
415
422
  disabled: r,
416
423
  onClick: () => o(null, null),
@@ -421,49 +428,49 @@ function Se({ prefs: e, loading: t, saving: r, onToggleOutputGuard: a, onQuietHo
421
428
  })
422
429
  ]
423
430
  }),
424
- /* @__PURE__ */ U("div", {
431
+ /* @__PURE__ */ H("div", {
425
432
  className: "border-t border-border-seam pt-4",
426
- children: [/* @__PURE__ */ U("div", {
433
+ children: [/* @__PURE__ */ H("div", {
427
434
  className: "flex items-center justify-between gap-3",
428
- children: [/* @__PURE__ */ H("p", {
435
+ children: [/* @__PURE__ */ V("p", {
429
436
  className: "text-sm font-medium text-text-primary",
430
437
  children: "Muted kinds"
431
- }), /* @__PURE__ */ H("span", {
438
+ }), /* @__PURE__ */ V("span", {
432
439
  className: Z,
433
440
  children: e.mutedKinds.length
434
441
  })]
435
- }), e.mutedKinds.length === 0 ? /* @__PURE__ */ H("p", {
442
+ }), e.mutedKinds.length === 0 ? /* @__PURE__ */ V("p", {
436
443
  className: "mt-0.5 text-xs text-text-secondary",
437
444
  children: "Nothing muted — mute a kind from any suggestion to stop it coming back."
438
- }) : /* @__PURE__ */ H("div", {
445
+ }) : /* @__PURE__ */ V("div", {
439
446
  className: "mt-2 flex flex-wrap gap-1.5",
440
- children: e.mutedKinds.map((e) => /* @__PURE__ */ U("button", {
447
+ children: e.mutedKinds.map((e) => /* @__PURE__ */ H("button", {
441
448
  type: "button",
442
449
  disabled: r,
443
450
  onClick: () => s(e),
444
451
  className: n(Z, "hover:text-text-primary disabled:opacity-50"),
445
- title: `Unmute ${C(e)} suggestions`,
446
- children: [C(e), /* @__PURE__ */ H(V, { className: "h-3 w-3" })]
452
+ title: `Unmute ${T(e)} suggestions`,
453
+ children: [T(e), /* @__PURE__ */ V(B, { className: "h-3 w-3" })]
447
454
  }, e))
448
455
  })]
449
456
  }),
450
- /* @__PURE__ */ U("div", {
457
+ /* @__PURE__ */ H("div", {
451
458
  className: "border-t border-border-seam pt-4",
452
- children: [/* @__PURE__ */ U("div", {
459
+ children: [/* @__PURE__ */ H("div", {
453
460
  className: "flex items-center justify-between gap-3",
454
- children: [/* @__PURE__ */ H("p", {
461
+ children: [/* @__PURE__ */ V("p", {
455
462
  className: "text-sm font-medium text-text-primary",
456
463
  children: "Cadence"
457
- }), /* @__PURE__ */ H("span", {
464
+ }), /* @__PURE__ */ V("span", {
458
465
  className: "text-xs text-text-secondary",
459
- children: C(e.cadence)
466
+ children: S(e.cadence)
460
467
  })]
461
- }), e.optedInDomains.length > 0 && /* @__PURE__ */ U(de, { children: [/* @__PURE__ */ H("p", {
468
+ }), e.optedInDomains.length > 0 && /* @__PURE__ */ H(me, { children: [/* @__PURE__ */ V("p", {
462
469
  className: "mt-3 text-sm font-medium text-text-primary",
463
470
  children: "Opted-in domains"
464
- }), /* @__PURE__ */ H("div", {
471
+ }), /* @__PURE__ */ V("div", {
465
472
  className: "mt-1.5 flex flex-wrap gap-1.5",
466
- children: e.optedInDomains.map((e) => /* @__PURE__ */ H("span", {
473
+ children: e.optedInDomains.map((e) => /* @__PURE__ */ V("span", {
467
474
  className: Z,
468
475
  children: y(e)
469
476
  }, e))
@@ -474,17 +481,17 @@ function Se({ prefs: e, loading: t, saving: r, onToggleOutputGuard: a, onQuietHo
474
481
  ]
475
482
  });
476
483
  }
477
- function Ce(e) {
484
+ function we(e) {
478
485
  switch (e) {
479
- case K.Snoozed: return {
486
+ case W.Snoozed: return {
480
487
  title: "Nothing snoozed",
481
488
  description: "Suggestions you snooze for later will wait here quietly until they're worth another look."
482
489
  };
483
- case K.Accepted: return {
490
+ case W.Accepted: return {
484
491
  title: "Nothing accepted yet",
485
492
  description: "When you accept a suggestion it moves here, so you can see the changes you chose to make."
486
493
  };
487
- case K.Dismissed: return {
494
+ case W.Dismissed: return {
488
495
  title: "Nothing dismissed",
489
496
  description: "Suggestions you dismiss are kept here — TimeCampus learns from them and won't keep nagging."
490
497
  };
@@ -494,22 +501,22 @@ function Ce(e) {
494
501
  };
495
502
  }
496
503
  }
497
- function we() {
498
- let { workspaceId: t } = e(), { toasts: n, addToast: m, dismissToast: v } = _(), [y, b] = D(K.New), [x, S] = D(null), [w, T] = D(null), [O, k] = D(""), { data: A, loading: ee, error: te, refetch: j } = u({
504
+ function Te() {
505
+ let { workspaceId: t } = e(), { toasts: n, addToast: m, dismissToast: v } = _(), [y, ee] = O(W.New), [b, x] = O(null), [S, C] = O(null), [w, E] = O(""), { data: k, loading: te, error: ne, refetch: A } = u({
499
506
  variables: { state: null },
500
507
  skip: !t
501
- }), { data: re, loading: ie, refetch: ae } = l({ skip: !t }), [oe, { loading: N }] = c(), [se] = o(), [ce] = s(), [le] = d(), [ue, { loading: P }] = f(), F = re?.myRecommendationPreferences, I = E(() => new Set(F?.mutedKinds ?? []), [F?.mutedKinds]), z = E(() => A?.myRecommendations ?? [], [A?.myRecommendations]), B = E(() => {
508
+ }), { data: re, loading: ae, refetch: oe } = l({ skip: !t }), [ce, { loading: j }] = c(), [le] = o(), [ue] = s(), [de] = d(), [fe, { loading: M }] = f(), N = re?.myRecommendationPreferences, P = D(() => new Set(N?.mutedKinds ?? []), [N?.mutedKinds]), F = D(() => k?.myRecommendations ?? [], [k?.myRecommendations]), I = D(() => {
502
509
  let e = {};
503
- for (let t of z) e[t.state] = (e[t.state] ?? 0) + 1;
510
+ for (let t of F) e[t.state] = (e[t.state] ?? 0) + 1;
504
511
  return e;
505
- }, [z]), G = E(() => z.filter((e) => e.state === y), [z, y]), pe = B[K.New] ?? 0, he = B[K.Accepted] ?? 0, q = B[K.Snoozed] ?? 0, J = async () => {
512
+ }, [F]), z = D(() => F.filter((e) => e.state === y), [F, y]), pe = I[W.New] ?? 0, ge = I[W.Accepted] ?? 0, ve = I[W.Snoozed] ?? 0, G = async () => {
506
513
  try {
507
- let e = (await oe()).data?.generateMyRecommendations ?? [];
514
+ let e = (await ce()).data?.generateMyRecommendations ?? [];
508
515
  m({
509
516
  title: e.length > 0 ? `${e.length} suggestion${e.length === 1 ? "" : "s"} ready` : "No new suggestions",
510
517
  description: e.length > 0 ? "Fresh, values-aware ideas are in your New feed." : "You're all caught up — nothing new to suggest right now.",
511
518
  variant: e.length > 0 ? "success" : "info"
512
- }), b(K.New), await j();
519
+ }), ee(W.New), await A();
513
520
  } catch {
514
521
  m({
515
522
  title: "Couldn't generate recommendations",
@@ -517,69 +524,69 @@ function we() {
517
524
  variant: "error"
518
525
  });
519
526
  }
520
- }, Y = async (e) => {
521
- S(e);
527
+ }, K = async (e) => {
528
+ x(e);
522
529
  try {
523
- await se({ variables: { id: e } }), m({
530
+ await le({ variables: { id: e } }), m({
524
531
  title: "Accepted — nice",
525
532
  variant: "success"
526
- }), await j();
533
+ }), await A();
527
534
  } catch {
528
535
  m({
529
536
  title: "Couldn't accept that one",
530
537
  variant: "error"
531
538
  });
532
539
  } finally {
533
- S(null);
540
+ x(null);
534
541
  }
535
- }, ge = async (e) => {
536
- S(e);
542
+ }, q = async (e) => {
543
+ x(e);
537
544
  try {
538
- await le({ variables: {
545
+ await de({ variables: {
539
546
  id: e,
540
- until: me()
547
+ until: _e()
541
548
  } }), m({
542
549
  title: "Snoozed for a week",
543
550
  description: "It'll resurface later — no nagging in between.",
544
551
  variant: "info"
545
- }), await j();
552
+ }), await A();
546
553
  } catch {
547
554
  m({
548
555
  title: "Couldn't snooze that one",
549
556
  variant: "error"
550
557
  });
551
558
  } finally {
552
- S(null);
559
+ x(null);
553
560
  }
554
- }, _e = (e) => {
555
- k(""), T(e);
556
- }, ve = async () => {
557
- let e = w;
561
+ }, ye = (e) => {
562
+ E(""), C(e);
563
+ }, be = async () => {
564
+ let e = S;
558
565
  if (!e) return;
559
- let t = O.trim();
560
- S(e.id);
566
+ let t = w.trim();
567
+ x(e.id);
561
568
  try {
562
- await ce({ variables: {
569
+ await ue({ variables: {
563
570
  id: e.id,
564
571
  reason: t.length > 0 ? t : null
565
572
  } }), m({
566
573
  title: "Dismissed",
567
574
  variant: "success"
568
- }), T(null), k(""), await j();
575
+ }), C(null), E(""), await A();
569
576
  } catch {
570
577
  m({
571
578
  title: "Couldn't dismiss that one",
572
579
  variant: "error"
573
580
  });
574
581
  } finally {
575
- S(null);
582
+ x(null);
576
583
  }
577
- }, Z = async (e, t) => {
584
+ }, J = async (e, t) => {
578
585
  try {
579
- await ue({ variables: { input: e } }), m({
586
+ await fe({ variables: { input: e } }), m({
580
587
  title: t,
581
588
  variant: "success"
582
- }), await ae();
589
+ }), await oe();
583
590
  } catch {
584
591
  m({
585
592
  title: "Couldn't save that guardrail",
@@ -587,115 +594,115 @@ function we() {
587
594
  variant: "error"
588
595
  });
589
596
  }
590
- }, be = (e) => void Z({ neverOptimiseForOutput: e }, e ? "Output-increasing suggestions are off" : "Output-increasing suggestions allowed"), we = (e, t) => void Z({
597
+ }, Z = (e) => void J({ neverOptimiseForOutput: e }, e ? "Output-increasing suggestions are off" : "Output-increasing suggestions allowed"), xe = (e, t) => void J({
591
598
  quietHoursStart: e,
592
599
  quietHoursEnd: t
593
600
  }, e === null && t === null ? "Quiet hours cleared" : "Quiet hours saved"), Te = (e) => {
594
- I.has(e) || Z({ mutedKinds: [...I, e] }, `${C(e)} suggestions muted`);
595
- }, Ee = /* @__PURE__ */ H(Se, {
596
- prefs: F,
597
- loading: ie,
598
- saving: P,
599
- onToggleOutputGuard: be,
600
- onQuietHoursChange: we,
601
- onUnmuteKind: (e) => void Z({ mutedKinds: [...I].filter((t) => t !== e) }, `${C(e)} suggestions unmuted`)
602
- }), Q = /* @__PURE__ */ U("button", {
601
+ P.has(e) || J({ mutedKinds: [...P, e] }, `${T(e)} suggestions muted`);
602
+ }, Ee = /* @__PURE__ */ V(Ce, {
603
+ prefs: N,
604
+ loading: ae,
605
+ saving: M,
606
+ onToggleOutputGuard: Z,
607
+ onQuietHoursChange: xe,
608
+ onUnmuteKind: (e) => void J({ mutedKinds: [...P].filter((t) => t !== e) }, `${T(e)} suggestions unmuted`)
609
+ }), Q = /* @__PURE__ */ H("button", {
603
610
  type: "button",
604
- onClick: J,
605
- disabled: N || !t,
606
- className: ye,
607
- children: [/* @__PURE__ */ H(R, { className: "h-4 w-4" }), N ? "Generating…" : "Generate recommendations"]
608
- }), $ = "Gentle, values-aware nudges built from your real timeline — protect a focus block, reclaim a commute, guard family time. Accept the ones that fit, snooze the rest, and dismiss what doesn't. TimeCampus never optimises for more output — only for time that matches what you value.", De = /* @__PURE__ */ H(W, {
611
+ onClick: G,
612
+ disabled: j || !t,
613
+ className: Y,
614
+ children: [/* @__PURE__ */ V(R, { className: "h-4 w-4" }), j ? "Generating…" : "Generate recommendations"]
615
+ }), $ = "Gentle, values-aware nudges built from your real timeline — protect a focus block, reclaim a commute, guard family time. Accept the ones that fit, snooze the rest, and dismiss what doesn't. TimeCampus never optimises for more output — only for time that matches what you value.", De = /* @__PURE__ */ V(U, {
609
616
  treatment: "insight",
610
617
  className: "mt-6 p-4 sm:p-5",
611
- children: /* @__PURE__ */ U("div", {
618
+ children: /* @__PURE__ */ H("div", {
612
619
  className: "flex items-start gap-3",
613
- children: [/* @__PURE__ */ H("span", {
620
+ children: [/* @__PURE__ */ V("span", {
614
621
  className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-status-info-bg text-status-info-text",
615
- children: /* @__PURE__ */ H(L, { className: "h-5 w-5" })
616
- }), /* @__PURE__ */ U("div", {
622
+ children: /* @__PURE__ */ V(L, { className: "h-5 w-5" })
623
+ }), /* @__PURE__ */ H("div", {
617
624
  className: "min-w-0",
618
- children: [/* @__PURE__ */ H("h3", {
625
+ children: [/* @__PURE__ */ V("h3", {
619
626
  className: "text-sm font-semibold text-text-primary",
620
627
  children: "Never optimises for more output."
621
- }), /* @__PURE__ */ H("p", {
628
+ }), /* @__PURE__ */ V("p", {
622
629
  className: "mt-1 text-sm text-text-secondary",
623
630
  children: "Every suggestion protects something you value — rest, focus, relationships — not your throughput. Snooze or dismiss freely; TimeCampus takes the hint and won't keep nagging."
624
631
  })]
625
632
  })]
626
633
  })
627
634
  });
628
- if (!t || ee) return /* @__PURE__ */ H(p, {
635
+ if (!t || te) return /* @__PURE__ */ V(p, {
629
636
  title: "Recommendations",
630
637
  description: "Values-aware suggestions from your real timeline",
631
638
  purpose: $,
632
639
  actions: Q,
633
- children: /* @__PURE__ */ H(i, {
640
+ children: /* @__PURE__ */ V(i, {
634
641
  variant: "list",
635
642
  count: 4
636
643
  })
637
644
  });
638
- if (te) return /* @__PURE__ */ H(p, {
645
+ if (ne) return /* @__PURE__ */ V(p, {
639
646
  title: "Recommendations",
640
647
  description: "Values-aware suggestions from your real timeline",
641
648
  purpose: $,
642
649
  actions: Q,
643
- children: /* @__PURE__ */ H("div", {
650
+ children: /* @__PURE__ */ V("div", {
644
651
  className: "rounded-xl border border-status-error-border/50 bg-status-error-bg/10 p-4 text-sm text-status-error-text",
645
652
  children: "Couldn't load your recommendations right now. Please try again in a moment."
646
653
  })
647
654
  });
648
- let Oe = z.length > 0, ke = Ce(y);
649
- return /* @__PURE__ */ U(p, {
655
+ let Oe = F.length > 0, ke = we(y);
656
+ return /* @__PURE__ */ H(p, {
650
657
  title: "Recommendations",
651
658
  description: "Values-aware suggestions from your real timeline",
652
659
  purpose: $,
653
660
  actions: Q,
654
661
  children: [
655
- Oe ? /* @__PURE__ */ U("div", {
662
+ Oe ? /* @__PURE__ */ H("div", {
656
663
  className: "grid grid-cols-1 gap-6 lg:grid-cols-[minmax(0,1fr)_20rem]",
657
- children: [/* @__PURE__ */ U("div", {
664
+ children: [/* @__PURE__ */ H("div", {
658
665
  className: "min-w-0 space-y-6",
659
666
  children: [
660
- /* @__PURE__ */ U("div", {
667
+ /* @__PURE__ */ H("div", {
661
668
  className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
662
669
  children: [
663
- /* @__PURE__ */ H(r, {
670
+ /* @__PURE__ */ V(r, {
664
671
  featured: !0,
665
672
  title: "New for you",
666
673
  value: String(pe),
667
- icon: /* @__PURE__ */ H(R, { className: "h-5 w-5" }),
674
+ icon: /* @__PURE__ */ V(R, { className: "h-5 w-5" }),
668
675
  description: "Awaiting your call"
669
676
  }),
670
- /* @__PURE__ */ H(r, {
677
+ /* @__PURE__ */ V(r, {
671
678
  title: "Accepted",
672
- value: String(he),
673
- icon: /* @__PURE__ */ H(ne, { className: "h-5 w-5" }),
679
+ value: String(ge),
680
+ icon: /* @__PURE__ */ V(ie, { className: "h-5 w-5" }),
674
681
  description: "Changes you chose to make"
675
682
  }),
676
- /* @__PURE__ */ H(r, {
683
+ /* @__PURE__ */ V(r, {
677
684
  title: "Snoozed",
678
- value: String(q),
679
- icon: /* @__PURE__ */ H(M, { className: "h-5 w-5" }),
685
+ value: String(ve),
686
+ icon: /* @__PURE__ */ V(se, { className: "h-5 w-5" }),
680
687
  description: "Waiting for a better moment"
681
688
  })
682
689
  ]
683
690
  }),
684
- /* @__PURE__ */ H("div", {
691
+ /* @__PURE__ */ V("div", {
685
692
  className: "overflow-x-auto",
686
- children: /* @__PURE__ */ H("div", {
693
+ children: /* @__PURE__ */ V("div", {
687
694
  className: "inline-flex items-center rounded-lg border border-border-subtle bg-bg-sunken/50 p-0.5",
688
695
  role: "tablist",
689
696
  "aria-label": "Filter recommendations by state",
690
- children: fe.map((e) => {
691
- let t = e.key === y, n = B[e.key] ?? 0;
692
- return /* @__PURE__ */ U("button", {
697
+ children: he.map((e) => {
698
+ let t = e.key === y, n = I[e.key] ?? 0;
699
+ return /* @__PURE__ */ H("button", {
693
700
  type: "button",
694
701
  role: "tab",
695
702
  "aria-selected": t,
696
- onClick: () => b(e.key),
703
+ onClick: () => ee(e.key),
697
704
  className: t ? "flex items-center gap-1.5 rounded-md bg-bg-surface px-3 py-1.5 text-sm font-medium text-text-primary shadow-sm" : "flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium text-text-secondary transition-colors hover:text-text-primary",
698
- children: [e.label, /* @__PURE__ */ H("span", {
705
+ children: [e.label, /* @__PURE__ */ V("span", {
699
706
  className: t ? "rounded-full bg-action-primary-bg/15 px-1.5 text-xs font-semibold text-primary" : "rounded-full bg-bg-sunken px-1.5 text-xs font-semibold text-text-secondary",
700
707
  children: n
701
708
  })]
@@ -703,81 +710,81 @@ function we() {
703
710
  })
704
711
  })
705
712
  }),
706
- G.length === 0 ? /* @__PURE__ */ H(a, {
713
+ z.length === 0 ? /* @__PURE__ */ V(a, {
707
714
  illustration: "empty-data",
708
715
  title: ke.title,
709
716
  description: ke.description,
710
- action: y === K.New ? Q : void 0
711
- }) : /* @__PURE__ */ H("div", {
717
+ action: y === W.New ? Q : void 0
718
+ }) : /* @__PURE__ */ V("div", {
712
719
  className: "space-y-4",
713
- children: G.map((e) => /* @__PURE__ */ H(xe, {
720
+ children: z.map((e) => /* @__PURE__ */ V(Se, {
714
721
  rec: e,
715
- busy: x === e.id || P,
716
- muted: I.has(e.kind),
717
- onAccept: Y,
718
- onSnooze: ge,
719
- onDismiss: _e,
722
+ busy: b === e.id || M,
723
+ muted: P.has(e.kind),
724
+ onAccept: K,
725
+ onSnooze: q,
726
+ onDismiss: ye,
720
727
  onMuteKind: Te
721
728
  }, e.id))
722
729
  }),
723
730
  De
724
731
  ]
725
- }), /* @__PURE__ */ H("div", { children: Ee })]
726
- }) : /* @__PURE__ */ U("div", {
732
+ }), /* @__PURE__ */ V("div", { children: Ee })]
733
+ }) : /* @__PURE__ */ H("div", {
727
734
  className: "grid grid-cols-1 gap-6 lg:grid-cols-[minmax(0,1fr)_20rem]",
728
- children: [/* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H(a, {
735
+ children: [/* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V(a, {
729
736
  illustration: "empty-data",
730
737
  title: "No recommendations yet",
731
738
  description: "TimeCampus turns your real timeline into gentle, values-aware suggestions — like protecting a focus block or reclaiming a commute. Generate your first set to see what it notices.",
732
739
  action: Q
733
- }), De] }), /* @__PURE__ */ H("div", { children: Ee })]
740
+ }), De] }), /* @__PURE__ */ V("div", { children: Ee })]
734
741
  }),
735
- /* @__PURE__ */ U(h, {
736
- open: w !== null,
737
- onClose: () => T(null),
742
+ /* @__PURE__ */ H(h, {
743
+ open: S !== null,
744
+ onClose: () => C(null),
738
745
  title: "Dismiss this suggestion",
739
- description: w?.title,
746
+ description: S?.title,
740
747
  size: "sm",
741
- footer: /* @__PURE__ */ U(de, { children: [/* @__PURE__ */ H("button", {
748
+ footer: /* @__PURE__ */ H(me, { children: [/* @__PURE__ */ V("button", {
742
749
  type: "button",
743
- onClick: () => T(null),
750
+ onClick: () => C(null),
744
751
  className: X,
745
752
  children: "Cancel"
746
- }), /* @__PURE__ */ U("button", {
753
+ }), /* @__PURE__ */ H("button", {
747
754
  type: "button",
748
- onClick: () => void ve(),
749
- disabled: x !== null,
750
- className: ye,
751
- children: [/* @__PURE__ */ H(V, { className: "h-4 w-4" }), "Dismiss"]
755
+ onClick: () => void be(),
756
+ disabled: b !== null,
757
+ className: Y,
758
+ children: [/* @__PURE__ */ V(B, { className: "h-4 w-4" }), "Dismiss"]
752
759
  })] }),
753
760
  children: [
754
- /* @__PURE__ */ U("label", {
761
+ /* @__PURE__ */ H("label", {
755
762
  htmlFor: "rec-dismiss-reason",
756
763
  className: "block text-sm font-medium text-text-primary",
757
764
  children: [
758
765
  "Why isn't this one for you?",
759
766
  " ",
760
- /* @__PURE__ */ H("span", {
767
+ /* @__PURE__ */ V("span", {
761
768
  className: "font-normal text-text-secondary",
762
769
  children: "(optional)"
763
770
  })
764
771
  ]
765
772
  }),
766
- /* @__PURE__ */ H("textarea", {
773
+ /* @__PURE__ */ V("textarea", {
767
774
  id: "rec-dismiss-reason",
768
775
  rows: 3,
769
- value: O,
770
- onChange: (e) => k(e.target.value),
776
+ value: w,
777
+ onChange: (e) => E(e.target.value),
771
778
  placeholder: "e.g. already handled, not the right week",
772
779
  className: "mt-1.5 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary"
773
780
  }),
774
- /* @__PURE__ */ H("p", {
781
+ /* @__PURE__ */ V("p", {
775
782
  className: "mt-2 text-xs text-text-secondary",
776
783
  children: "Saved with the suggestion so you can see why you passed on it later. To stop this kind of suggestion entirely, use Mute this kind."
777
784
  })
778
785
  ]
779
786
  }),
780
- /* @__PURE__ */ H(g, {
787
+ /* @__PURE__ */ V(g, {
781
788
  toasts: n,
782
789
  onDismiss: v
783
790
  })
@@ -785,6 +792,6 @@ function we() {
785
792
  });
786
793
  }
787
794
  //#endregion
788
- export { we as RecommendationsPage };
795
+ export { Te as RecommendationsPage };
789
796
 
790
797
  //# sourceMappingURL=RecommendationsPage.js.map