@versini/sassysaint 8.99.3 → 8.100.0

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 (26) hide show
  1. package/dist/chunks/{AboutChangelog.C_qMLuiB.js → AboutChangelog.DA361mHf.js} +3 -3
  2. package/dist/chunks/AboutEntry.COmeuxq_.js +83 -0
  3. package/dist/chunks/{App.BUZaV6AF.js → App.BLNMkw5x.js} +331 -329
  4. package/dist/chunks/{Chart.DvSv2Eza.js → Chart.GBOvQ25I.js} +2 -2
  5. package/dist/chunks/{ChatBubbleAssistant.DPvPqKP2.js → ChatBubbleAssistant.De5psmEG.js} +4 -4
  6. package/dist/chunks/{ChatBubbleUser.BCEiPwpY.js → ChatBubbleUser.DF9Axp_4.js} +3 -3
  7. package/dist/chunks/{ChatHistoryTable.BV0EO83B.js → ChatHistoryTable.rOFYnFKa.js} +3 -3
  8. package/dist/chunks/{HistoryEntry.DdsxhGAV.js → HistoryEntry.DnG7vXnm.js} +134 -133
  9. package/dist/chunks/{UserMemoriesPanel.B7Vh6shw.js → MemoriesEntry.rleSeGKZ.js} +212 -209
  10. package/dist/chunks/{ProfileEntry.C-3cFRJF.js → ProfileEntry.ZVmjBCNA.js} +76 -72
  11. package/dist/chunks/{SettingsEntry.AuH85ovZ.js → SettingsEntry.azCvMpSB.js} +116 -108
  12. package/dist/chunks/{UsageEntry.C5_CSslN.js → UsageEntry.CK1PBjs3.js} +77 -76
  13. package/dist/chunks/{index.DQOeZzJl.js → index.Bil3-QBE.js} +1 -1
  14. package/dist/chunks/{index.BtC6g5QI.js → index.Bz0fwQT2.js} +1 -1
  15. package/dist/chunks/{index.CHoYdZu2.js → index.CY7OKrvt.js} +3 -3
  16. package/dist/chunks/{index.3sEe64_a.js → index.CYzDnVAL.js} +1 -1
  17. package/dist/chunks/{index.BbB1hl1m.js → index.CgmhTYJp.js} +1 -1
  18. package/dist/chunks/{index.DRSAc_Rh.js → index.DfrHJ6QJ.js} +1 -1
  19. package/dist/chunks/{index.C8gT8NUq.js → index.DlepPi73.js} +2 -2
  20. package/dist/chunks/{index.IFwWrDqI.js → index.Dw8chhdS.js} +1 -1
  21. package/dist/chunks/{index.D3zzxjS0.js → index.iTnfwVri.js} +1 -1
  22. package/dist/chunks/{useMarkdown.CFmffPvi.js → useMarkdown.DhNvct2e.js} +6 -6
  23. package/dist/components/SassySaint/SassySaint.js +1 -1
  24. package/dist/index.js +4 -4
  25. package/package.json +3 -3
  26. package/dist/chunks/AboutEntry.CKKvxJXb.js +0 -79
@@ -1,65 +1,65 @@
1
1
  import { jsx as e, jsxs as r, Fragment as I } from "react/jsx-runtime";
2
- import { L as E, j as f, Button as P, n as Se, useLocalStorage as W, LOCAL_STORAGE_PREFIX as Z, LOCAL_STORAGE_SORT_MEMORY_DIRECTION as Te, e$1 as l, LOCAL_STORAGE_SORT_MEMORY_COLUMN as ke, useUserMemories as ve, useExpiredMemories as De, useDeleteMemory as be, useDeleteAllActiveMemories as Ee, useDeleteAllExpiredMemories as Me, useUpdateMemory as Re, useRestoreMemory as Ie, ButtonIcon as L, IconEdit as Le, IconDelete as ee, IconRestore as Oe } from "./index.BbB1hl1m.js";
3
- import { Panel as se, Toggle as O, CancelButton as ae, ConfirmationPanel as te, ResponsiveTooltip as _ } from "./App.BUZaV6AF.js";
4
- import { j as re, D as ie, F as D, L as s, Y as z, G as ne, H as oe } from "./index.DQOeZzJl.js";
5
- import A from "clsx";
6
- import { useState as y, useEffect as _e, useRef as le } from "react";
7
- import { TextArea as ze } from "./index.DRSAc_Rh.js";
2
+ import { L as M, j as f, Button as B, n as Te, useLocalStorage as ee, LOCAL_STORAGE_PREFIX as te, LOCAL_STORAGE_SORT_MEMORY_DIRECTION as ke, e$1 as s, LOCAL_STORAGE_SORT_MEMORY_COLUMN as ve, useUserMemories as De, useExpiredMemories as be, useDeleteMemory as Ee, useDeleteAllActiveMemories as Me, useDeleteAllExpiredMemories as Re, useUpdateMemory as Ie, useRestoreMemory as Le, ButtonIcon as L, IconEdit as Oe, IconDelete as re, IconRestore as _e } from "./index.CgmhTYJp.js";
3
+ import { Panel as ae, Toggle as O, CancelButton as ce, ConfirmationPanel as ie, ResponsiveTooltip as _ } from "./App.BLNMkw5x.js";
4
+ import { j as ne, D as oe, F as v, L as a, Y as z, G as le, H as se } from "./index.Bil3-QBE.js";
5
+ import C from "clsx";
6
+ import { useState as N, useEffect as ze, useRef as q } from "react";
7
+ import { TextArea as Be } from "./index.DfrHJ6QJ.js";
8
8
  const Pe = ({
9
- open: C,
10
- onOpenChange: b,
11
- initialText: c,
9
+ open: w,
10
+ onOpenChange: D,
11
+ initialText: d,
12
12
  metadata: n,
13
- onSave: M,
14
- isSaving: m = !1
13
+ onSave: A,
14
+ isSaving: b = !1
15
15
  }) => {
16
- const [p, R] = y(c), [h, N] = y("none");
17
- _e(() => {
18
- if (C) {
19
- R(c);
16
+ const [l, E] = N(d), [y, h] = N("none");
17
+ ze(() => {
18
+ if (w) {
19
+ E(d);
20
20
  const o = n?.expiration || "none";
21
- N(o);
21
+ h(o);
22
22
  }
23
- }, [C, c, n?.expiration]);
24
- const S = () => {
25
- if (p.trim().length >= 3) {
26
- const o = h === "none" ? null : h;
27
- M(p.trim(), o);
23
+ }, [w, d, n?.expiration]);
24
+ const P = () => {
25
+ if (l.trim().length >= 3) {
26
+ const o = y === "none" ? null : y;
27
+ A(l.trim(), o);
28
28
  }
29
- }, u = p.trim().length >= 3, T = p.trim() !== c.trim() || h !== (n?.expiration || "none");
29
+ }, T = l.trim().length >= 3, p = l.trim() !== d.trim() || y !== (n?.expiration || "none");
30
30
  return /* @__PURE__ */ e(
31
- se,
31
+ ae,
32
32
  {
33
- open: C,
34
- onOpenChange: b,
33
+ open: w,
34
+ onOpenChange: D,
35
35
  title: "Edit Memory",
36
36
  animation: !0,
37
37
  animationType: "fade",
38
- footer: /* @__PURE__ */ r(E, { columnGap: 2, alignHorizontal: "flex-end", children: [
39
- /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(ae, { onOpenChange: b, label: "Cancel" }) }),
38
+ footer: /* @__PURE__ */ r(M, { columnGap: 2, alignHorizontal: "flex-end", children: [
39
+ /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(ce, { onOpenChange: D, label: "Cancel" }) }),
40
40
  /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(
41
- P,
41
+ B,
42
42
  {
43
43
  mode: "dark",
44
44
  focusMode: "light",
45
- disabled: m || !u || !T,
46
- onClick: S,
47
- children: m ? "Saving..." : "Save"
45
+ disabled: b || !T || !p,
46
+ onClick: P,
47
+ children: b ? "Saving..." : "Save"
48
48
  }
49
49
  ) })
50
50
  ] }),
51
51
  children: /* @__PURE__ */ r("div", { className: "flex flex-col pt-2 gap-4", children: [
52
52
  /* @__PURE__ */ e(
53
- ze,
53
+ Be,
54
54
  {
55
55
  mode: "dark",
56
56
  focusMode: "light",
57
57
  label: "Memory text",
58
58
  name: "memoryText",
59
- value: p,
60
- onChange: (o) => R(o.target.value),
59
+ value: l,
60
+ onChange: (o) => E(o.target.value),
61
61
  autoFocus: !0,
62
- helperText: p.trim().length < 3 ? "Memory text must be at least 3 characters" : `${p.length} characters`
62
+ helperText: l.trim().length < 3 ? "Memory text must be at least 3 characters" : `${l.length} characters`
63
63
  }
64
64
  ),
65
65
  /* @__PURE__ */ r("div", { className: "flex flex-col gap-3 p-4 bg-slate-800/50 rounded-md border border-slate-700/50", children: [
@@ -75,9 +75,9 @@ const Pe = ({
75
75
  narrow: !0,
76
76
  label: "Never expire",
77
77
  name: "expiration-none",
78
- checked: h === "none",
78
+ checked: y === "none",
79
79
  onChange: (o) => {
80
- o && N("none");
80
+ o && h("none");
81
81
  }
82
82
  }
83
83
  ),
@@ -90,9 +90,9 @@ const Pe = ({
90
90
  narrow: !0,
91
91
  label: "Short (1 month)",
92
92
  name: "expiration-short",
93
- checked: h === "short",
93
+ checked: y === "short",
94
94
  onChange: (o) => {
95
- o && N("short");
95
+ o && h("short");
96
96
  }
97
97
  }
98
98
  ),
@@ -105,9 +105,9 @@ const Pe = ({
105
105
  narrow: !0,
106
106
  label: "Medium (6 months)",
107
107
  name: "expiration-medium",
108
- checked: h === "medium",
108
+ checked: y === "medium",
109
109
  onChange: (o) => {
110
- o && N("medium");
110
+ o && h("medium");
111
111
  }
112
112
  }
113
113
  ),
@@ -120,9 +120,9 @@ const Pe = ({
120
120
  narrow: !0,
121
121
  label: "Long (1 year)",
122
122
  name: "expiration-long",
123
- checked: h === "long",
123
+ checked: y === "long",
124
124
  onChange: (o) => {
125
- o && N("long");
125
+ o && h("long");
126
126
  }
127
127
  }
128
128
  )
@@ -132,13 +132,13 @@ const Pe = ({
132
132
  /* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-slate-300 m-0", children: "Memory Details" }),
133
133
  n.categories && n.categories.length > 0 && /* @__PURE__ */ r("div", { className: "flex flex-col gap-1", children: [
134
134
  /* @__PURE__ */ e("span", { className: "text-xs text-slate-400 uppercase", children: "Category" }),
135
- /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: n.categories.map((o, k) => /* @__PURE__ */ e(
135
+ /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: n.categories.map((o, u) => /* @__PURE__ */ e(
136
136
  "span",
137
137
  {
138
138
  className: "text-xs px-2 py-1 bg-slate-700/50 text-slate-200 rounded",
139
139
  children: o
140
140
  },
141
- `${o}-${k}`
141
+ `${o}-${u}`
142
142
  )) })
143
143
  ] }),
144
144
  /* @__PURE__ */ r("div", { className: "flex flex-col sm:flex-row gap-4", children: [
@@ -178,78 +178,74 @@ const Pe = ({
178
178
  ] })
179
179
  }
180
180
  );
181
- }, je = ({
182
- open: C,
183
- onOpenChange: b,
184
- user: c
185
- }) => {
186
- const { getAccessToken: n } = Se(), [M] = y(void 0), [m, p] = y("active"), [R, h] = W({
187
- key: Z + Te,
188
- initialValue: l.DESC
189
- }), [N, S] = W({
190
- key: Z + ke,
181
+ }, Xe = ({ open: w, onOpenChange: D, user: d }) => {
182
+ const n = q(null), { getAccessToken: A } = Te(), [b] = N(void 0), [l, E] = N("active"), [y, h] = ee({
183
+ key: te + ke,
184
+ initialValue: s.DESC
185
+ }), [P, T] = ee({
186
+ key: te + ve,
191
187
  initialValue: "createdAt"
192
- }), [u, T] = y(R || l.DESC), [o, k] = y(
193
- N || "createdAt"
194
- ), { data: v, isLoading: U, isError: q } = ve({
195
- user: c,
196
- query: M,
197
- getAccessToken: n,
198
- enabled: C && m === "active"
188
+ }), [p, o] = N(y || s.DESC), [u, R] = N(
189
+ P || "createdAt"
190
+ ), { data: k, isLoading: $, isError: H } = De({
191
+ user: d,
192
+ query: b,
193
+ getAccessToken: A,
194
+ enabled: w && l === "active"
199
195
  }), {
200
196
  data: g,
201
- isLoading: $,
202
- isError: H
203
- } = De({
204
- user: c,
205
- query: M,
206
- getAccessToken: n,
207
- enabled: C && m === "expired"
208
- }), B = be({ getAccessToken: n }), j = Ee({ getAccessToken: n }), X = Me({ getAccessToken: n }), F = Re({ getAccessToken: n }), V = Ie({ getAccessToken: n }), [ce, Y] = y(!1), w = le(null), [de, J] = y(!1), [me, G] = y(!1), x = le(null), K = (t, i, a, d) => {
209
- w.current = { id: t, text: i, description: a, createdAt: d }, Y(!0);
210
- }, xe = () => {
211
- w.current && B.mutate({ user: c, memoryId: w.current.id });
212
- }, he = (t, i, a, d, fe, Ae, ye, Ce, Ne, we) => {
197
+ isLoading: j,
198
+ isError: X
199
+ } = be({
200
+ user: d,
201
+ query: b,
202
+ getAccessToken: A,
203
+ enabled: w && l === "expired"
204
+ }), F = Ee({ getAccessToken: A }), V = Me({ getAccessToken: A }), Y = Re({ getAccessToken: A }), G = Ie({ getAccessToken: A }), J = Le({ getAccessToken: A }), [de, K] = N(!1), S = q(null), [me, Q] = N(!1), [xe, U] = N(!1), x = q(null), W = (t, i, c, m) => {
205
+ S.current = { id: t, text: i, description: c, createdAt: m }, K(!0);
206
+ }, he = () => {
207
+ S.current && F.mutate({ user: d, memoryId: S.current.id });
208
+ }, pe = (t, i, c, m, Ae, ye, Ce, Ne, we, Se) => {
213
209
  x.current = {
214
210
  id: t,
215
211
  description: i,
216
- categories: a,
217
- quote: d,
218
- canonicalText: fe,
219
- confidence: Ae,
220
- status: ye,
221
- sourceType: Ce,
222
- expiration: Ne,
223
- expiresAt: we
224
- }, G(!0);
225
- }, pe = (t, i) => {
226
- x.current && c && F.mutate(
212
+ categories: c,
213
+ quote: m,
214
+ canonicalText: Ae,
215
+ confidence: ye,
216
+ status: Ce,
217
+ sourceType: Ne,
218
+ expiration: we,
219
+ expiresAt: Se
220
+ }, U(!0);
221
+ }, ue = (t, i) => {
222
+ x.current && d && G.mutate(
227
223
  {
228
- user: c,
224
+ user: d,
229
225
  memoryId: x.current.id,
230
226
  description: t,
231
227
  expiration: i || void 0
232
228
  },
233
229
  {
234
230
  onSuccess: () => {
235
- G(!1);
231
+ U(!1);
236
232
  }
237
233
  }
238
234
  );
239
- }, ue = () => {
240
- c && J(!0);
241
235
  }, ge = () => {
242
- c && (m === "active" ? j.mutate({ user: c }) : X.mutate({ user: c }));
243
- }, Q = (t) => {
244
- const i = `${t.total} memor${t.total === 1 ? "y" : "ies"}`, a = t.totalTokenUsage ? ` (~${t.totalTokenUsage} tokens)` : "";
245
- return i + a;
236
+ d && Q(!0);
237
+ }, fe = () => {
238
+ d && (l === "active" ? V.mutate({ user: d }) : Y.mutate({ user: d }));
239
+ }, Z = (t) => {
240
+ const i = `${t.total} memor${t.total === 1 ? "y" : "ies"}`, c = t.totalTokenUsage ? ` (~${t.totalTokenUsage} tokens)` : "";
241
+ return i + c;
246
242
  };
247
243
  return /* @__PURE__ */ r(I, { children: [
248
244
  /* @__PURE__ */ e(
249
245
  Pe,
250
246
  {
251
- open: me,
252
- onOpenChange: G,
247
+ open: xe,
248
+ onOpenChange: U,
253
249
  initialText: x.current?.description || "",
254
250
  metadata: x.current ? {
255
251
  categories: x.current.categories,
@@ -261,16 +257,16 @@ const Pe = ({
261
257
  expiration: x.current.expiration,
262
258
  expiresAt: x.current.expiresAt
263
259
  } : void 0,
264
- onSave: pe,
265
- isSaving: F.isPending
260
+ onSave: ue,
261
+ isSaving: G.isPending
266
262
  }
267
263
  ),
268
264
  /* @__PURE__ */ r(
269
- te,
265
+ ie,
270
266
  {
271
- showConfirmation: ce,
272
- setShowConfirmation: Y,
273
- action: xe,
267
+ showConfirmation: de,
268
+ setShowConfirmation: K,
269
+ action: he,
274
270
  customStrings: {
275
271
  title: "Delete memory",
276
272
  confirmAction: "Delete",
@@ -282,75 +278,83 @@ const Pe = ({
282
278
  /* @__PURE__ */ r("li", { children: [
283
279
  "Excerpt:",
284
280
  " ",
285
- (w.current?.description || w.current?.text || "").slice(0, 80)
281
+ (S.current?.description || S.current?.text || "").slice(0, 80)
286
282
  ] }),
287
283
  /* @__PURE__ */ r("li", { children: [
288
284
  "Created:",
289
285
  " ",
290
- w.current?.createdAt ? new Date(w.current.createdAt).toLocaleString() : "-"
286
+ S.current?.createdAt ? new Date(S.current.createdAt).toLocaleString() : "-"
291
287
  ] })
292
288
  ] })
293
289
  ]
294
290
  }
295
291
  ),
296
292
  /* @__PURE__ */ e(
297
- te,
293
+ ie,
298
294
  {
299
- showConfirmation: de,
300
- setShowConfirmation: J,
301
- action: ge,
295
+ showConfirmation: me,
296
+ setShowConfirmation: Q,
297
+ action: fe,
302
298
  customStrings: {
303
- title: m === "active" ? "Delete all active memories" : "Delete all expired memories",
299
+ title: l === "active" ? "Delete all active memories" : "Delete all expired memories",
304
300
  confirmAction: "Delete all",
305
301
  cancelAction: "Cancel"
306
302
  },
307
- children: /* @__PURE__ */ e("p", { className: "m-0", children: m === "active" ? "This will permanently delete all active memories for this user. This action cannot be undone." : "This will permanently delete all expired memories for this user. This action cannot be undone." })
303
+ children: /* @__PURE__ */ e("p", { className: "m-0", children: l === "active" ? "This will permanently delete all active memories for this user. This action cannot be undone." : "This will permanently delete all expired memories for this user. This action cannot be undone." })
308
304
  }
309
305
  ),
310
306
  /* @__PURE__ */ e(
311
- se,
307
+ ae,
312
308
  {
313
- open: C,
314
- onOpenChange: (t) => b(t),
309
+ open: w,
310
+ onOpenChange: (t) => D(t),
315
311
  title: "User Memories",
316
312
  animation: !0,
317
313
  animationType: "fade",
318
314
  blurEffect: "large",
319
- footer: /* @__PURE__ */ r(E, { columnGap: 2, alignHorizontal: "flex-end", children: [
320
- /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(ae, { onOpenChange: b, label: "Close" }) }),
315
+ initialFocus: n,
316
+ footer: /* @__PURE__ */ r(M, { columnGap: 2, alignHorizontal: "flex-end", children: [
317
+ /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(
318
+ ce,
319
+ {
320
+ onOpenChange: D,
321
+ label: "Close",
322
+ ref: n
323
+ }
324
+ ) }),
321
325
  /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(
322
- P,
326
+ B,
323
327
  {
324
328
  mode: "dark",
325
329
  focusMode: "light",
326
330
  variant: "danger",
327
- disabled: (m === "active" ? j.isPending : X.isPending) || (m === "active" ? (v?.total ?? 0) === 0 : (g?.total ?? 0) === 0),
328
- onClick: ue,
331
+ disabled: (l === "active" ? V.isPending : Y.isPending) || (l === "active" ? (k?.total ?? 0) === 0 : (g?.total ?? 0) === 0),
332
+ onClick: ge,
329
333
  children: "Delete All"
330
334
  }
331
335
  ) })
332
336
  ] }),
333
337
  children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-4 @container/editmemoriespanel", children: [
334
- /* @__PURE__ */ r(E, { columnGap: 2, alignHorizontal: "center", children: [
338
+ /* @__PURE__ */ r(M, { columnGap: 2, alignHorizontal: "center", children: [
335
339
  /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(
336
- P,
340
+ B,
337
341
  {
338
342
  focusMode: "light",
339
- mode: m === "active" ? "light" : "dark",
343
+ mode: l === "active" ? "light" : "dark",
340
344
  size: "small",
341
345
  noBorder: !0,
342
- onClick: () => p("active"),
346
+ onClick: () => E("active"),
343
347
  children: "Active Memories"
344
348
  }
345
349
  ) }),
346
350
  /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(
347
- P,
351
+ B,
348
352
  {
349
353
  focusMode: "light",
350
- mode: m === "expired" ? "light" : "dark",
354
+ mode: l === "expired" ? "light" : "dark",
351
355
  size: "small",
352
356
  noBorder: !0,
353
- onClick: () => p("expired"),
357
+ onClick: () => E("expired"),
354
358
  children: "Expired Memories"
355
359
  }
356
360
  ) })
@@ -358,27 +362,27 @@ const Pe = ({
358
362
  /* @__PURE__ */ e(
359
363
  "div",
360
364
  {
361
- className: A(
365
+ className: C(
362
366
  "flex flex-col sm:flex-row",
363
367
  "max-h-[75vh]",
364
368
  "sm:max-h-[75vh]",
365
369
  "min-h-[70vh]"
366
370
  ),
367
- children: m === "active" ? /* @__PURE__ */ r(I, { children: [
368
- U && /* @__PURE__ */ e("p", { className: "m-0", children: "Loading memories..." }),
369
- q && /* @__PURE__ */ e("p", { className: "m-0 text-red-500", children: "Failed to load memories." }),
370
- !U && !q && (v && v.items.length > 0 ? /* @__PURE__ */ r(
371
- re,
371
+ children: l === "active" ? /* @__PURE__ */ r(I, { children: [
372
+ $ && /* @__PURE__ */ e("p", { className: "m-0", children: "Loading memories..." }),
373
+ H && /* @__PURE__ */ e("p", { className: "m-0 text-red-500", children: "Failed to load memories." }),
374
+ !$ && !H && (k && k.items.length > 0 ? /* @__PURE__ */ r(
375
+ ne,
372
376
  {
373
377
  stickyHeader: !0,
374
378
  stickyFooter: !0,
375
379
  compact: !0,
376
380
  mode: "alt-system",
377
- caption: Q(v),
381
+ caption: Z(k),
378
382
  children: [
379
- /* @__PURE__ */ e(ie, { children: /* @__PURE__ */ r(D, { children: [
380
- /* @__PURE__ */ e(s, { className: "sr-only", children: "Row" }),
381
- /* @__PURE__ */ e(s, { children: "Memory" }),
383
+ /* @__PURE__ */ e(oe, { children: /* @__PURE__ */ r(v, { children: [
384
+ /* @__PURE__ */ e(a, { className: "sr-only", children: "Row" }),
385
+ /* @__PURE__ */ e(a, { children: "Memory" }),
382
386
  /* @__PURE__ */ e(
383
387
  z,
384
388
  {
@@ -386,11 +390,11 @@ const Pe = ({
386
390
  buttonClassName: "text-xs sm:text-sm",
387
391
  cellId: "createdAt",
388
392
  align: "left",
389
- sortDirection: u,
390
- sortedCell: o,
393
+ sortDirection: p,
394
+ sortedCell: u,
391
395
  onClick: () => {
392
- k("createdAt"), S("createdAt"), T((t) => {
393
- const i = t === l.ASC ? l.DESC : l.ASC;
396
+ R("createdAt"), T("createdAt"), o((t) => {
397
+ const i = t === s.ASC ? s.DESC : s.ASC;
394
398
  return h(i), i;
395
399
  });
396
400
  },
@@ -404,35 +408,35 @@ const Pe = ({
404
408
  buttonClassName: "text-xs sm:text-sm",
405
409
  cellId: "expiresAt",
406
410
  align: "left",
407
- sortDirection: u,
408
- sortedCell: o,
411
+ sortDirection: p,
412
+ sortedCell: u,
409
413
  onClick: () => {
410
- k("expiresAt"), S("expiresAt"), T((t) => {
411
- const i = t === l.ASC ? l.DESC : l.ASC;
414
+ R("expiresAt"), T("expiresAt"), o((t) => {
415
+ const i = t === s.ASC ? s.DESC : s.ASC;
412
416
  return h(i), i;
413
417
  });
414
418
  },
415
419
  children: "Expires"
416
420
  }
417
421
  ),
418
- /* @__PURE__ */ e(s, { align: "right", children: "Actions" })
422
+ /* @__PURE__ */ e(a, { align: "right", children: "Actions" })
419
423
  ] }) }),
420
- /* @__PURE__ */ e(ne, { children: [...v.items].sort((t, i) => {
421
- if (o === "createdAt") {
422
- const a = t.createdAt ? new Date(t.createdAt).getTime() : 0, d = i.createdAt ? new Date(i.createdAt).getTime() : 0;
423
- return u === l.ASC ? a - d : d - a;
424
+ /* @__PURE__ */ e(le, { children: [...k.items].sort((t, i) => {
425
+ if (u === "createdAt") {
426
+ const c = t.createdAt ? new Date(t.createdAt).getTime() : 0, m = i.createdAt ? new Date(i.createdAt).getTime() : 0;
427
+ return p === s.ASC ? c - m : m - c;
424
428
  }
425
- if (o === "expiresAt") {
426
- const a = t.expiresAt ? new Date(t.expiresAt).getTime() : Number.MAX_SAFE_INTEGER, d = i.expiresAt ? new Date(i.expiresAt).getTime() : Number.MAX_SAFE_INTEGER;
427
- return u === l.ASC ? a - d : d - a;
429
+ if (u === "expiresAt") {
430
+ const c = t.expiresAt ? new Date(t.expiresAt).getTime() : Number.MAX_SAFE_INTEGER, m = i.expiresAt ? new Date(i.expiresAt).getTime() : Number.MAX_SAFE_INTEGER;
431
+ return p === s.ASC ? c - m : m - c;
428
432
  }
429
433
  return 0;
430
- }).map((t, i) => /* @__PURE__ */ r(D, { children: [
431
- /* @__PURE__ */ e(s, { className: A("dark:text-gray-400"), children: i + 1 }),
434
+ }).map((t, i) => /* @__PURE__ */ r(v, { children: [
435
+ /* @__PURE__ */ e(a, { className: C("dark:text-gray-400"), children: i + 1 }),
432
436
  /* @__PURE__ */ e(
433
- s,
437
+ a,
434
438
  {
435
- className: A(
439
+ className: C(
436
440
  "dark:text-white",
437
441
  "max-w-25 sm:max-w-100",
438
442
  "text-xs sm:text-sm"
@@ -444,11 +448,11 @@ const Pe = ({
444
448
  }
445
449
  ),
446
450
  /* @__PURE__ */ e(
447
- s,
451
+ a,
448
452
  {
449
453
  component: "th",
450
454
  scope: "row",
451
- className: A(
455
+ className: C(
452
456
  "dark:text-gray-400",
453
457
  "sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none"
454
458
  ),
@@ -456,9 +460,9 @@ const Pe = ({
456
460
  }
457
461
  ),
458
462
  /* @__PURE__ */ e(
459
- s,
463
+ a,
460
464
  {
461
- className: A(
465
+ className: C(
462
466
  "dark:text-gray-400",
463
467
  "sm:whitespace-nowrap text-xs sm:text-sm"
464
468
  ),
@@ -466,12 +470,12 @@ const Pe = ({
466
470
  }
467
471
  ),
468
472
  /* @__PURE__ */ e(
469
- s,
473
+ a,
470
474
  {
471
475
  className: "align-top border-l border-table-light dark:border-table-dark",
472
476
  align: "right",
473
477
  children: /* @__PURE__ */ r(
474
- E,
478
+ M,
475
479
  {
476
480
  columnGap: 2,
477
481
  alignHorizontal: "flex-end",
@@ -489,8 +493,8 @@ const Pe = ({
489
493
  noBorder: !0,
490
494
  label: "Edit memory",
491
495
  variant: "primary",
492
- disabled: F.isPending,
493
- onClick: () => he(
496
+ disabled: G.isPending,
497
+ onClick: () => pe(
494
498
  t.memoryId,
495
499
  t.description || t.text,
496
500
  t.categories,
@@ -502,7 +506,7 @@ const Pe = ({
502
506
  t.expiration,
503
507
  t.expiresAt
504
508
  ),
505
- children: /* @__PURE__ */ e(Le, { size: "size-3", monotone: !0 })
509
+ children: /* @__PURE__ */ e(Oe, { size: "size-3", monotone: !0 })
506
510
  }
507
511
  )
508
512
  }
@@ -521,14 +525,14 @@ const Pe = ({
521
525
  label: "Delete memory",
522
526
  variant: "primary",
523
527
  iconClassName: "text-red-700 dark:text-red-500",
524
- disabled: B.isPending,
525
- onClick: () => K(
528
+ disabled: F.isPending,
529
+ onClick: () => W(
526
530
  t.memoryId,
527
531
  t.text,
528
532
  t.description,
529
533
  t.createdAt
530
534
  ),
531
- children: /* @__PURE__ */ e(ee, { size: "size-3", monotone: !0 })
535
+ children: /* @__PURE__ */ e(re, { size: "size-3", monotone: !0 })
532
536
  }
533
537
  )
534
538
  }
@@ -539,17 +543,17 @@ const Pe = ({
539
543
  }
540
544
  )
541
545
  ] }, t.memoryId)) }),
542
- /* @__PURE__ */ e(oe, { children: /* @__PURE__ */ e(D, { children: /* @__PURE__ */ e(s, { colSpan: 5, children: Q(v) }) }) })
546
+ /* @__PURE__ */ e(se, { children: /* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(a, { colSpan: 5, children: Z(k) }) }) })
543
547
  ]
544
548
  }
545
549
  ) : /* @__PURE__ */ e("p", { className: "m-0 italic opacity-70", children: "No memories stored." }))
546
550
  ] }) : /* @__PURE__ */ r(I, { children: [
547
- $ && /* @__PURE__ */ e("p", { className: "m-0", children: "Loading expired memories..." }),
548
- H && /* @__PURE__ */ e("p", { className: "m-0 text-red-500", children: "Failed to load expired memories." }),
549
- !$ && !H && (g && g.items.length > 0 ? /* @__PURE__ */ r(re, { stickyHeader: !0, stickyFooter: !0, compact: !0, mode: "alt-system", children: [
550
- /* @__PURE__ */ e(ie, { children: /* @__PURE__ */ r(D, { children: [
551
- /* @__PURE__ */ e(s, { className: "sr-only", children: "Row" }),
552
- /* @__PURE__ */ e(s, { children: "Memory" }),
551
+ j && /* @__PURE__ */ e("p", { className: "m-0", children: "Loading expired memories..." }),
552
+ X && /* @__PURE__ */ e("p", { className: "m-0 text-red-500", children: "Failed to load expired memories." }),
553
+ !j && !X && (g && g.items.length > 0 ? /* @__PURE__ */ r(ne, { stickyHeader: !0, stickyFooter: !0, compact: !0, mode: "alt-system", children: [
554
+ /* @__PURE__ */ e(oe, { children: /* @__PURE__ */ r(v, { children: [
555
+ /* @__PURE__ */ e(a, { className: "sr-only", children: "Row" }),
556
+ /* @__PURE__ */ e(a, { children: "Memory" }),
553
557
  /* @__PURE__ */ e(
554
558
  z,
555
559
  {
@@ -557,11 +561,11 @@ const Pe = ({
557
561
  buttonClassName: "text-xs sm:text-sm",
558
562
  cellId: "createdAt",
559
563
  align: "left",
560
- sortDirection: u,
561
- sortedCell: o,
564
+ sortDirection: p,
565
+ sortedCell: u,
562
566
  onClick: () => {
563
- k("createdAt"), S("createdAt"), T((t) => {
564
- const i = t === l.ASC ? l.DESC : l.ASC;
567
+ R("createdAt"), T("createdAt"), o((t) => {
568
+ const i = t === s.ASC ? s.DESC : s.ASC;
565
569
  return h(i), i;
566
570
  });
567
571
  },
@@ -575,35 +579,35 @@ const Pe = ({
575
579
  buttonClassName: "text-xs sm:text-sm",
576
580
  cellId: "expiresAt",
577
581
  align: "left",
578
- sortDirection: u,
579
- sortedCell: o,
582
+ sortDirection: p,
583
+ sortedCell: u,
580
584
  onClick: () => {
581
- k("expiresAt"), S("expiresAt"), T((t) => {
582
- const i = t === l.ASC ? l.DESC : l.ASC;
585
+ R("expiresAt"), T("expiresAt"), o((t) => {
586
+ const i = t === s.ASC ? s.DESC : s.ASC;
583
587
  return h(i), i;
584
588
  });
585
589
  },
586
590
  children: "Expired"
587
591
  }
588
592
  ),
589
- /* @__PURE__ */ e(s, { align: "right", children: "Actions" })
593
+ /* @__PURE__ */ e(a, { align: "right", children: "Actions" })
590
594
  ] }) }),
591
- /* @__PURE__ */ e(ne, { children: [...g.items].sort((t, i) => {
592
- if (o === "createdAt") {
593
- const a = t.createdAt ? new Date(t.createdAt).getTime() : 0, d = i.createdAt ? new Date(i.createdAt).getTime() : 0;
594
- return u === l.ASC ? a - d : d - a;
595
+ /* @__PURE__ */ e(le, { children: [...g.items].sort((t, i) => {
596
+ if (u === "createdAt") {
597
+ const c = t.createdAt ? new Date(t.createdAt).getTime() : 0, m = i.createdAt ? new Date(i.createdAt).getTime() : 0;
598
+ return p === s.ASC ? c - m : m - c;
595
599
  }
596
- if (o === "expiresAt") {
597
- const a = t.expiresAt ? new Date(t.expiresAt).getTime() : Number.MAX_SAFE_INTEGER, d = i.expiresAt ? new Date(i.expiresAt).getTime() : Number.MAX_SAFE_INTEGER;
598
- return u === l.ASC ? a - d : d - a;
600
+ if (u === "expiresAt") {
601
+ const c = t.expiresAt ? new Date(t.expiresAt).getTime() : Number.MAX_SAFE_INTEGER, m = i.expiresAt ? new Date(i.expiresAt).getTime() : Number.MAX_SAFE_INTEGER;
602
+ return p === s.ASC ? c - m : m - c;
599
603
  }
600
604
  return 0;
601
- }).map((t, i) => /* @__PURE__ */ r(D, { children: [
602
- /* @__PURE__ */ e(s, { className: A("dark:text-gray-400"), children: i + 1 }),
605
+ }).map((t, i) => /* @__PURE__ */ r(v, { children: [
606
+ /* @__PURE__ */ e(a, { className: C("dark:text-gray-400"), children: i + 1 }),
603
607
  /* @__PURE__ */ e(
604
- s,
608
+ a,
605
609
  {
606
- className: A(
610
+ className: C(
607
611
  "dark:text-white",
608
612
  "max-w-25 sm:max-w-100",
609
613
  "text-xs sm:text-sm"
@@ -615,11 +619,11 @@ const Pe = ({
615
619
  }
616
620
  ),
617
621
  /* @__PURE__ */ e(
618
- s,
622
+ a,
619
623
  {
620
624
  component: "th",
621
625
  scope: "row",
622
- className: A(
626
+ className: C(
623
627
  "dark:text-gray-400",
624
628
  "sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none"
625
629
  ),
@@ -627,9 +631,9 @@ const Pe = ({
627
631
  }
628
632
  ),
629
633
  /* @__PURE__ */ e(
630
- s,
634
+ a,
631
635
  {
632
- className: A(
636
+ className: C(
633
637
  "dark:text-gray-400",
634
638
  "sm:whitespace-nowrap text-xs sm:text-sm"
635
639
  ),
@@ -637,12 +641,12 @@ const Pe = ({
637
641
  }
638
642
  ),
639
643
  /* @__PURE__ */ e(
640
- s,
644
+ a,
641
645
  {
642
646
  className: "align-top border-l border-table-light dark:border-table-dark",
643
647
  align: "right",
644
648
  children: /* @__PURE__ */ r(
645
- E,
649
+ M,
646
650
  {
647
651
  columnGap: 2,
648
652
  alignHorizontal: "flex-end",
@@ -660,14 +664,14 @@ const Pe = ({
660
664
  noBorder: !0,
661
665
  label: "Restore memory",
662
666
  variant: "primary",
663
- disabled: V.isPending,
667
+ disabled: J.isPending,
664
668
  onClick: () => {
665
- c && V.mutate({
666
- user: c,
669
+ d && J.mutate({
670
+ user: d,
667
671
  memoryId: t.memoryId
668
672
  });
669
673
  },
670
- children: /* @__PURE__ */ e(Oe, { size: "size-3", monotone: !0 })
674
+ children: /* @__PURE__ */ e(_e, { size: "size-3", monotone: !0 })
671
675
  }
672
676
  )
673
677
  }
@@ -686,14 +690,14 @@ const Pe = ({
686
690
  label: "Delete memory",
687
691
  variant: "primary",
688
692
  iconClassName: "text-red-700 dark:text-red-500",
689
- disabled: B.isPending,
690
- onClick: () => K(
693
+ disabled: F.isPending,
694
+ onClick: () => W(
691
695
  t.memoryId,
692
696
  t.text,
693
697
  t.description,
694
698
  t.createdAt
695
699
  ),
696
- children: /* @__PURE__ */ e(ee, { size: "size-3", monotone: !0 })
700
+ children: /* @__PURE__ */ e(re, { size: "size-3", monotone: !0 })
697
701
  }
698
702
  )
699
703
  }
@@ -704,7 +708,7 @@ const Pe = ({
704
708
  }
705
709
  )
706
710
  ] }, t.memoryId)) }),
707
- /* @__PURE__ */ e(oe, { children: /* @__PURE__ */ e(D, { children: /* @__PURE__ */ r(s, { colSpan: 5, children: [
711
+ /* @__PURE__ */ e(se, { children: /* @__PURE__ */ e(v, { children: /* @__PURE__ */ r(a, { colSpan: 5, children: [
708
712
  g.total,
709
713
  " expired memor",
710
714
  g.total === 1 ? "y" : "ies",
@@ -731,6 +735,5 @@ const Pe = ({
731
735
  ] });
732
736
  };
733
737
  export {
734
- je as UserMemoriesPanel,
735
- je as default
738
+ Xe as default
736
739
  };