@fencyai/react 0.1.206 → 0.1.208

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsxs as m, jsx as r, Fragment as R } from "react/jsx-runtime";
2
- import { StreamEventManager as ze, StreamCacheManager as Be, toStreamData as Pe, taskReducer as Le, initialTaskStoreState as Ae, createAgentTaskFileDownloadLink as De, isTerminalAgentTaskEventData as We, agentTaskErrorFromEventData as $e, shouldAppendCompletedToProgress as Ne, getTerminalCreateAgentTaskResponse as He, createAgentTask as Ge, mapCreateAgentTaskParams as Oe, parseAgentTaskFileIdFromFencyFileHref as _e, parseAgentTaskMemoryFromFencyMemHref as qe } from "@fencyai/js";
3
- import { StreamEventManager as $n } from "@fencyai/js";
4
- import Ue, { createContext as fe, useState as w, useRef as A, useEffect as H, useCallback as L, useContext as xe, useReducer as Qe, useMemo as z, useLayoutEffect as je } from "react";
2
+ import { StreamEventManager as ze, StreamCacheManager as Pe, toStreamData as Be, taskReducer as Le, initialTaskStoreState as Ae, createAgentTaskFileDownloadLink as De, isTerminalAgentTaskEventData as We, agentTaskErrorFromEventData as $e, shouldAppendCompletedToProgress as Ne, getTerminalCreateAgentTaskResponse as He, createAgentTask as Ge, mapCreateAgentTaskParams as Oe, parseAgentTaskFileIdFromFencyFileHref as _e, parseAgentTaskMemoryFromFencyMemHref as qe } from "@fencyai/js";
3
+ import { StreamEventManager as _n } from "@fencyai/js";
4
+ import Ue, { createContext as fe, useState as C, useRef as A, useEffect as H, useCallback as L, useContext as xe, useReducer as je, useMemo as z, useLayoutEffect as Qe } from "react";
5
5
  import { motion as v, useInView as Ke, AnimatePresence as Ve } from "motion/react";
6
6
  import Xe from "react-markdown";
7
7
  import { Prism as ke } from "react-syntax-highlighter";
@@ -9,60 +9,60 @@ import Ye from "remark-gfm";
9
9
  import './assets/index.css';const Se = fe(
10
10
  void 0
11
11
  );
12
- function Pn({
12
+ function $n({
13
13
  fency: e,
14
14
  fetchCreateStreamClientToken: o,
15
15
  children: t
16
16
  }) {
17
- const [n, i] = w(
17
+ const [n, i] = C(
18
18
  null
19
- ), [a, l] = w(!0), [d, p] = w(null), [u, g] = w([]), h = A(null), x = A(null);
19
+ ), [a, l] = C(!0), [c, p] = C(null), [u, g] = C([]), h = A(null), x = A(null);
20
20
  H(() => {
21
- e.then((c) => {
22
- i(c), l(!1);
23
- }).catch((c) => {
24
- p(c), l(!1);
21
+ e.then((d) => {
22
+ i(d), l(!1);
23
+ }).catch((d) => {
24
+ p(d), l(!1);
25
25
  });
26
26
  }, [e]), H(() => {
27
27
  if (!n) return;
28
28
  x.current || (x.current = new ze(n));
29
- const c = new Be(
29
+ const d = new Pe(
30
30
  n,
31
31
  o
32
32
  );
33
- h.current = c, c.startPeriodicCleanup();
34
- const f = c.onChange((S) => {
33
+ h.current = d, d.startPeriodicCleanup();
34
+ const f = d.onChange((b) => {
35
35
  var M;
36
- g(S), (M = x.current) == null || M.updateStreams(S);
36
+ g(b), (M = x.current) == null || M.updateStreams(b);
37
37
  });
38
38
  return () => {
39
- var S;
40
- f(), c.destroy(), h.current = null, (S = x.current) == null || S.cleanup(), x.current = null;
39
+ var b;
40
+ f(), d.destroy(), h.current = null, (b = x.current) == null || b.cleanup(), x.current = null;
41
41
  };
42
42
  }, [n, o]);
43
- const b = L(
44
- async (c) => {
43
+ const T = L(
44
+ async (d) => {
45
45
  if (!h.current)
46
46
  throw new Error("Fency instance not initialized");
47
- return h.current.getOrCreateStream(c);
47
+ return h.current.getOrCreateStream(d);
48
48
  },
49
49
  []
50
50
  );
51
- if (d)
51
+ if (c)
52
52
  return /* @__PURE__ */ m("div", { children: [
53
53
  "Fency error: ",
54
- d.message
54
+ c.message
55
55
  ] });
56
56
  if (!n)
57
57
  return null;
58
58
  const y = u.length > 0 ? u[u.length - 1] : null, s = {
59
59
  fency: n,
60
60
  loading: a,
61
- error: d,
61
+ error: c,
62
62
  activeStreams: u,
63
63
  latestStream: y,
64
64
  eventManager: x.current,
65
- getOrCreateStream: b
65
+ getOrCreateStream: T
66
66
  };
67
67
  return /* @__PURE__ */ r(Se.Provider, { value: s, children: t });
68
68
  }
@@ -73,15 +73,15 @@ function be() {
73
73
  return e;
74
74
  }
75
75
  const Je = (e) => {
76
- const o = be(), [t, n] = w(null), i = A(
76
+ const o = be(), [t, n] = C(null), i = A(
77
77
  `subscriber-${Math.random().toString(36).substr(2, 9)}`
78
78
  );
79
79
  return H(() => {
80
80
  if (!o.eventManager) return;
81
81
  const l = {
82
82
  onMessage: (p, u) => {
83
- var h, x, b;
84
- const g = Pe(p);
83
+ var h, x, T;
84
+ const g = Be(p);
85
85
  if (g)
86
86
  switch (g.type) {
87
87
  case "STREAM_TIMEOUT":
@@ -91,7 +91,7 @@ const Je = (e) => {
91
91
  (x = e == null ? void 0 : e.onStreamNotFound) == null || x.call(e, g);
92
92
  break;
93
93
  case "AGENT_TASK_PROGRESS_ITEM_UPDATED":
94
- (b = e == null ? void 0 : e.onAgentTaskProgressItemUpdated) == null || b.call(e, g);
94
+ (T = e == null ? void 0 : e.onAgentTaskProgressItemUpdated) == null || T.call(e, g);
95
95
  break;
96
96
  }
97
97
  },
@@ -143,58 +143,58 @@ function Ze(e) {
143
143
  }
144
144
  return e instanceof Error ? e.message : typeof e == "string" ? e : "Unknown error during agent task creation";
145
145
  }
146
- const Ln = (e) => {
147
- const o = be(), [t, n] = Qe(Le, Ae), i = A(/* @__PURE__ */ new Set()), a = A(/* @__PURE__ */ new Map()), l = A(/* @__PURE__ */ new Map()), d = L(
146
+ const Nn = (e) => {
147
+ const o = be(), [t, n] = je(Le, Ae), i = A(/* @__PURE__ */ new Set()), a = A(/* @__PURE__ */ new Map()), l = A(/* @__PURE__ */ new Map()), c = L(
148
148
  (y) => {
149
149
  if (y)
150
150
  return async (s) => {
151
- const { clientToken: c } = await y(s), f = await De({
151
+ const { clientToken: d } = await y(s), f = await De({
152
152
  pk: o.fency.publishableKey,
153
153
  baseUrl: o.fency.baseUrl,
154
- clientToken: c,
154
+ clientToken: d,
155
155
  agentTaskFileId: s
156
156
  });
157
157
  if (f.type === "error")
158
158
  throw new Error(f.error.message);
159
- const S = document.createElement("a");
160
- S.href = f.downloadLink, S.download = "", S.click();
159
+ const b = document.createElement("a");
160
+ b.href = f.downloadLink, b.download = "", b.click();
161
161
  };
162
162
  },
163
163
  [o.fency.baseUrl, o.fency.publishableKey]
164
164
  ), p = L(
165
165
  (y, s) => {
166
- const c = t.tasks.filter(
166
+ const d = t.tasks.filter(
167
167
  (f) => {
168
- var S;
169
- return f.streamId === y && f.loading && ((S = f.confirmedData) == null ? void 0 : S.taskId);
168
+ var b;
169
+ return f.streamId === y && f.loading && ((b = f.confirmedData) == null ? void 0 : b.taskId);
170
170
  }
171
171
  ).map((f) => f.confirmedData.taskId);
172
172
  n({ type: "STREAM_FAILURE", streamId: y, error: s });
173
- for (const f of c) {
173
+ for (const f of d) {
174
174
  i.current.delete(f);
175
- const S = a.current.get(f);
176
- S && (a.current.delete(f), S({ type: "error", error: s }));
175
+ const b = a.current.get(f);
176
+ b && (a.current.delete(f), b({ type: "error", error: s }));
177
177
  }
178
178
  },
179
179
  [t.tasks]
180
180
  ), u = L(
181
181
  (y) => {
182
- var c;
182
+ var d;
183
183
  if (!i.current.has(y.agentTaskId)) return;
184
184
  const s = y.data;
185
185
  if (We(s)) {
186
186
  if (s.eventType === "Error") {
187
- const S = $e(s);
188
- if (!S) return;
187
+ const b = $e(s);
188
+ if (!b) return;
189
189
  n({
190
190
  type: "TASK_ERROR",
191
191
  agentTaskId: y.agentTaskId,
192
- error: S
192
+ error: b
193
193
  });
194
194
  const M = a.current.get(
195
195
  y.agentTaskId
196
196
  );
197
- M && (a.current.delete(y.agentTaskId), M({ type: "error", error: S }));
197
+ M && (a.current.delete(y.agentTaskId), M({ type: "error", error: b }));
198
198
  return;
199
199
  }
200
200
  n({
@@ -208,16 +208,16 @@ const Ln = (e) => {
208
208
  );
209
209
  if (f) {
210
210
  a.current.delete(y.agentTaskId);
211
- const S = He(
211
+ const b = He(
212
212
  y.streamId,
213
213
  y.agentTaskId,
214
214
  s
215
215
  );
216
- S && f(S);
216
+ b && f(b);
217
217
  }
218
218
  return;
219
219
  }
220
- (c = e.onAgentTaskProgressItemUpdated) == null || c.call(e, y), n({ type: "PROGRESS_ITEM", item: y });
220
+ (d = e.onAgentTaskProgressItemUpdated) == null || d.call(e, y), n({ type: "PROGRESS_ITEM", item: y });
221
221
  },
222
222
  [e]
223
223
  ), { createStream: g } = Je({
@@ -243,15 +243,15 @@ const Ln = (e) => {
243
243
  }), h = L(
244
244
  async (y, s) => {
245
245
  var D;
246
- const c = `task-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`, f = (s == null ? void 0 : s.fetchCreateAgentTaskClientToken) ?? e.fetchCreateAgentTaskClientToken;
246
+ const d = `task-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`, f = (s == null ? void 0 : s.fetchCreateAgentTaskClientToken) ?? e.fetchCreateAgentTaskClientToken;
247
247
  if (f === void 0)
248
248
  throw new Error(
249
249
  "fetchCreateAgentTaskClientToken must be provided either in useAgentTasks props or in createAgentTask options"
250
250
  );
251
- const S = (s == null ? void 0 : s.fetchAgentTaskFileDownloadClientToken) ?? e.fetchAgentTaskFileDownloadClientToken, M = await g();
251
+ const b = (s == null ? void 0 : s.fetchAgentTaskFileDownloadClientToken) ?? e.fetchAgentTaskFileDownloadClientToken, M = await g();
252
252
  if (M.type === "success") {
253
- const W = (/* @__PURE__ */ new Date()).toISOString(), B = {
254
- taskKey: c,
253
+ const W = (/* @__PURE__ */ new Date()).toISOString(), P = {
254
+ taskKey: d,
255
255
  streamId: M.stream.id,
256
256
  triggeredAt: W,
257
257
  confirmedData: null,
@@ -261,10 +261,10 @@ const Ln = (e) => {
261
261
  loading: !0,
262
262
  loadingText: s == null ? void 0 : s.loadingText
263
263
  };
264
- n({ type: "TASK_PENDING", task: B }), (D = s == null ? void 0 : s.onTaskRegistered) == null || D.call(s, {
265
- ...B,
266
- downloadFile: d(
267
- S
264
+ n({ type: "TASK_PENDING", task: P }), (D = s == null ? void 0 : s.onTaskRegistered) == null || D.call(s, {
265
+ ...P,
266
+ downloadFile: c(
267
+ b
268
268
  )
269
269
  });
270
270
  try {
@@ -279,22 +279,22 @@ const Ln = (e) => {
279
279
  i.current.add(
280
280
  I.agentTask.id
281
281
  );
282
- const G = d(
283
- S
282
+ const G = c(
283
+ b
284
284
  );
285
285
  return G && l.current.set(
286
286
  I.agentTask.id,
287
287
  G
288
288
  ), n({
289
289
  type: "TASK_CONFIRMED",
290
- taskKey: c,
290
+ taskKey: d,
291
291
  taskId: I.agentTask.id,
292
292
  createdAt: I.agentTask.createdAt
293
293
  }), await new Promise(
294
- (P) => {
294
+ (B) => {
295
295
  a.current.set(
296
296
  I.agentTask.id,
297
- P
297
+ B
298
298
  );
299
299
  }
300
300
  );
@@ -302,7 +302,7 @@ const Ln = (e) => {
302
302
  if (I.type === "error")
303
303
  return n({
304
304
  type: "TASK_API_ERROR",
305
- taskKey: c,
305
+ taskKey: d,
306
306
  error: I.error
307
307
  }), {
308
308
  type: "error",
@@ -315,7 +315,7 @@ const Ln = (e) => {
315
315
  };
316
316
  return n({
317
317
  type: "TASK_API_ERROR",
318
- taskKey: c,
318
+ taskKey: d,
319
319
  error: G
320
320
  }), {
321
321
  type: "error",
@@ -330,7 +330,7 @@ const Ln = (e) => {
330
330
  };
331
331
  return n({
332
332
  type: "TASK_API_ERROR",
333
- taskKey: c,
333
+ taskKey: d,
334
334
  error: I
335
335
  }), {
336
336
  type: "error",
@@ -342,7 +342,7 @@ const Ln = (e) => {
342
342
  },
343
343
  [
344
344
  o,
345
- d,
345
+ c,
346
346
  g,
347
347
  e.fetchCreateAgentTaskClientToken,
348
348
  e.fetchAgentTaskFileDownloadClientToken
@@ -353,7 +353,7 @@ const Ln = (e) => {
353
353
  ...y,
354
354
  downloadFile: (s = y.confirmedData) != null && s.taskId ? l.current.get(y.confirmedData.taskId) : void 0
355
355
  };
356
- }), [t.tasks]), b = z(() => {
356
+ }), [t.tasks]), T = z(() => {
357
357
  if (x.length !== 0)
358
358
  return [...x].sort((y, s) => new Date(s.triggeredAt).getTime() - new Date(y.triggeredAt).getTime())[0];
359
359
  }, [x]);
@@ -362,7 +362,7 @@ const Ln = (e) => {
362
362
  }, []), {
363
363
  agentTasks: x,
364
364
  createAgentTask: h,
365
- latest: b
365
+ latest: T
366
366
  };
367
367
  };
368
368
  function er(e) {
@@ -380,10 +380,10 @@ function nr(e) {
380
380
  const n = rr(e.progressItems, t), i = n != null;
381
381
  let a;
382
382
  if (n != null && n.createdAt) {
383
- const l = new Date(o.createdAt).getTime(), d = new Date(n.createdAt).getTime();
383
+ const l = new Date(o.createdAt).getTime(), c = new Date(n.createdAt).getTime();
384
384
  a = Math.max(
385
385
  0,
386
- Math.round((d - l) / 1e3)
386
+ Math.round((c - l) / 1e3)
387
387
  );
388
388
  }
389
389
  return {
@@ -1098,10 +1098,10 @@ function ar({
1098
1098
  );
1099
1099
  return /* @__PURE__ */ r(ve.Provider, { value: t, children: o });
1100
1100
  }
1101
- function T() {
1101
+ function S() {
1102
1102
  return xe(ve);
1103
1103
  }
1104
- function we(e) {
1104
+ function Ce(e) {
1105
1105
  return e === "dark" ? or : tr;
1106
1106
  }
1107
1107
  const N = ({
@@ -1109,18 +1109,18 @@ const N = ({
1109
1109
  onFileDownload: o,
1110
1110
  onMemoryClick: t
1111
1111
  }) => {
1112
- const { theme: n } = T(), i = we(n), [a, l] = w(
1112
+ const { theme: n } = S(), i = Ce(n), [a, l] = C(
1113
1113
  null
1114
- ), [d, p] = w(
1114
+ ), [c, p] = C(
1115
1115
  null
1116
- ), [u, g] = w(!1), [h, x] = w(!1), b = L(
1116
+ ), [u, g] = C(!1), [h, x] = C(!1), T = L(
1117
1117
  (f) => {
1118
1118
  o && (l(null), g(!0), (async () => {
1119
1119
  try {
1120
1120
  await o(f);
1121
- } catch (S) {
1121
+ } catch (b) {
1122
1122
  l(
1123
- S instanceof Error ? S.message : "Download failed"
1123
+ b instanceof Error ? b.message : "Download failed"
1124
1124
  );
1125
1125
  } finally {
1126
1126
  g(!1);
@@ -1133,9 +1133,9 @@ const N = ({
1133
1133
  t && (p(null), x(!0), (async () => {
1134
1134
  try {
1135
1135
  await t(f);
1136
- } catch (S) {
1136
+ } catch (b) {
1137
1137
  p(
1138
- S instanceof Error ? S.message : "Memory link action failed"
1138
+ b instanceof Error ? b.message : "Memory link action failed"
1139
1139
  );
1140
1140
  } finally {
1141
1141
  x(!1);
@@ -1145,20 +1145,20 @@ const N = ({
1145
1145
  [t]
1146
1146
  ), s = z(() => ({
1147
1147
  code(f) {
1148
- const { children: S, className: M, node: D, ref: W, ...B } = f, $ = /language-(\w+)/.exec(M || "");
1148
+ const { children: b, className: M, node: D, ref: W, ...P } = f, $ = /language-(\w+)/.exec(M || "");
1149
1149
  return $ ? /* @__PURE__ */ r(
1150
1150
  ke,
1151
1151
  {
1152
- ...B,
1152
+ ...P,
1153
1153
  PreTag: "div",
1154
- children: String(S).replace(/\n$/, ""),
1154
+ children: String(b).replace(/\n$/, ""),
1155
1155
  language: $[1],
1156
1156
  style: i
1157
1157
  }
1158
- ) : /* @__PURE__ */ r("code", { ...B, className: M, children: String(S) });
1158
+ ) : /* @__PURE__ */ r("code", { ...P, className: M, children: String(b) });
1159
1159
  },
1160
1160
  a(f) {
1161
- const { children: S, href: M, ...D } = f, W = M ? _e(M) : null;
1161
+ const { children: b, href: M, ...D } = f, W = M ? _e(M) : null;
1162
1162
  if (W != null)
1163
1163
  return o ? /* @__PURE__ */ r("span", { className: "fency-file-download-wrap", children: /* @__PURE__ */ r(
1164
1164
  "button",
@@ -1166,8 +1166,8 @@ const N = ({
1166
1166
  type: "button",
1167
1167
  className: "fency-file-download-button",
1168
1168
  disabled: u,
1169
- onClick: () => b(W),
1170
- children: S
1169
+ onClick: () => T(W),
1170
+ children: b
1171
1171
  }
1172
1172
  ) }) : /* @__PURE__ */ r("span", { className: "fency-file-download-wrap", children: /* @__PURE__ */ r(
1173
1173
  "button",
@@ -1182,11 +1182,11 @@ const N = ({
1182
1182
  "File download is not configured. Please provide fetchAgentTaskFileDownloadClientToken."
1183
1183
  );
1184
1184
  },
1185
- children: S
1185
+ children: b
1186
1186
  }
1187
1187
  ) });
1188
- const B = M ? qe(M) : null;
1189
- return B != null ? t ? /* @__PURE__ */ r("span", { className: "fency-file-download-wrap", children: /* @__PURE__ */ r(
1188
+ const P = M ? qe(M) : null;
1189
+ return P != null ? t ? /* @__PURE__ */ r("span", { className: "fency-file-download-wrap", children: /* @__PURE__ */ r(
1190
1190
  "button",
1191
1191
  {
1192
1192
  type: "button",
@@ -1194,39 +1194,39 @@ const N = ({
1194
1194
  disabled: h,
1195
1195
  onClick: () => y({
1196
1196
  source: {
1197
- memoryId: B.memoryId,
1198
- memoryTypeId: B.memoryTypeId ?? ""
1197
+ memoryId: P.memoryId,
1198
+ memoryTypeId: P.memoryTypeId ?? ""
1199
1199
  }
1200
1200
  }),
1201
- children: S
1201
+ children: b
1202
1202
  }
1203
- ) }) : /* @__PURE__ */ r("span", { children: S }) : /* @__PURE__ */ r(
1203
+ ) }) : /* @__PURE__ */ r("span", { children: b }) : /* @__PURE__ */ r(
1204
1204
  "a",
1205
1205
  {
1206
1206
  href: M,
1207
1207
  target: "_blank",
1208
1208
  rel: "noopener noreferrer",
1209
1209
  ...D,
1210
- children: S
1210
+ children: b
1211
1211
  }
1212
1212
  );
1213
1213
  }
1214
1214
  }), [
1215
1215
  u,
1216
1216
  h,
1217
- b,
1217
+ T,
1218
1218
  y,
1219
1219
  o,
1220
1220
  t,
1221
1221
  i
1222
- ]), c = a ?? d;
1222
+ ]), d = a ?? c;
1223
1223
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
1224
- c ? /* @__PURE__ */ r(
1224
+ d ? /* @__PURE__ */ r(
1225
1225
  "p",
1226
1226
  {
1227
1227
  role: "alert",
1228
1228
  style: { color: "#b91c1c", marginBottom: 8, fontSize: 14 },
1229
- children: c
1229
+ children: d
1230
1230
  }
1231
1231
  ) : null,
1232
1232
  /* @__PURE__ */ r(
@@ -1248,7 +1248,7 @@ const N = ({
1248
1248
  )
1249
1249
  ] });
1250
1250
  }, lr = ({ data: e }) => {
1251
- const { theme: o } = T(), t = we(o), n = e.response.jsonResponse;
1251
+ const { theme: o } = S(), t = Ce(o), n = e.response.jsonResponse;
1252
1252
  let i;
1253
1253
  try {
1254
1254
  i = JSON.stringify(JSON.parse(n), null, 2);
@@ -1353,6 +1353,7 @@ const N = ({
1353
1353
  exploreExporting: "Loading {n} memory files...",
1354
1354
  exploreExportingOne: "Loading memory data...",
1355
1355
  exploreRunCode: "Analyzing: {title}",
1356
+ exploreComposeHtmlReport: "Composing report: {title}",
1356
1357
  exploreSetupSandbox: "Setting up environment...",
1357
1358
  exploreSetupSandboxPhrases: [
1358
1359
  "Spelunking...",
@@ -1381,6 +1382,29 @@ const N = ({
1381
1382
  "Schlepping...",
1382
1383
  "Kwisatz-haderaching..."
1383
1384
  ],
1385
+ exploreClassifying: "Analyzing task...",
1386
+ exploreClassifyingPhrases: [
1387
+ "Spelunking...",
1388
+ "Divining...",
1389
+ "Rummaging...",
1390
+ "Deciphering...",
1391
+ "Unraveling...",
1392
+ "Concocting...",
1393
+ "Percolating...",
1394
+ "Noodling...",
1395
+ "Cogitating...",
1396
+ "Pondering...",
1397
+ "Snooping...",
1398
+ "Tinkering...",
1399
+ "Scavenging...",
1400
+ "Untangling...",
1401
+ "Inspecting...",
1402
+ "Scheming...",
1403
+ "Ferreting...",
1404
+ "Conjuring...",
1405
+ "Calibrating...",
1406
+ "Fossicking..."
1407
+ ],
1384
1408
  explorePlanning: "Planning approach...",
1385
1409
  exploreFindMemoriesQuery: "Finding memories: '{query}'",
1386
1410
  exploreFindMemoriesPrefix: "Finding memories: ",
@@ -1474,6 +1498,7 @@ const N = ({
1474
1498
  exploreExporting: "Laster {n} minnefiler...",
1475
1499
  exploreExportingOne: "Laster data...",
1476
1500
  exploreRunCode: "Analyserer: {title}",
1501
+ exploreComposeHtmlReport: "Lager rapport: {title}",
1477
1502
  exploreSetupSandbox: "Setter opp miljø...",
1478
1503
  exploreSetupSandboxPhrases: [
1479
1504
  "Spelunker...",
@@ -1504,6 +1529,29 @@ const N = ({
1504
1529
  "Sleper...",
1505
1530
  "Kwisatz-haderacher..."
1506
1531
  ],
1532
+ exploreClassifying: "Analyserer oppgave...",
1533
+ exploreClassifyingPhrases: [
1534
+ "Spelunker...",
1535
+ "Spaner...",
1536
+ "Roter...",
1537
+ "Dechiffrerer...",
1538
+ "Noster opp...",
1539
+ "Koker opp...",
1540
+ "Filtrerer...",
1541
+ "Grubler...",
1542
+ "Funderer...",
1543
+ "Snuser...",
1544
+ "Pusler...",
1545
+ "Leter...",
1546
+ "Nister...",
1547
+ "Gransker...",
1548
+ "Poengterer...",
1549
+ "Smir renker...",
1550
+ "Graver...",
1551
+ "Tryller...",
1552
+ "Kalibrerer...",
1553
+ "Snubler..."
1554
+ ],
1507
1555
  explorePlanning: "Planlegger tilnærming...",
1508
1556
  exploreFindMemoriesQuery: "Finner minner: '{query}'",
1509
1557
  exploreFindMemoriesPrefix: "Finner minner: ",
@@ -1521,7 +1569,7 @@ function k(e, o) {
1521
1569
  e
1522
1570
  );
1523
1571
  }
1524
- function j(e, o) {
1572
+ function Q(e, o) {
1525
1573
  const t = e.map((n) => `'${n}'`);
1526
1574
  if (o != null && t.length >= 2) {
1527
1575
  const n = t.pop();
@@ -1529,7 +1577,7 @@ function j(e, o) {
1529
1577
  }
1530
1578
  return t.join(", ");
1531
1579
  }
1532
- function C({
1580
+ function w({
1533
1581
  text: e,
1534
1582
  duration: o = 2,
1535
1583
  delay: t = 0,
@@ -1537,18 +1585,18 @@ function C({
1537
1585
  repeatDelay: i = 0.5,
1538
1586
  className: a,
1539
1587
  startOnView: l = !1,
1540
- once: d = !1,
1588
+ once: c = !1,
1541
1589
  inViewMargin: p,
1542
1590
  spread: u = 2,
1543
1591
  color: g,
1544
1592
  shimmerColor: h,
1545
1593
  direction: x = "fromBottom"
1546
1594
  }) {
1547
- const { colors: b } = T(), y = g ?? b.shimmerBase, s = h ?? b.shimmerHighlight, c = A(null), f = Ke(c, { once: d, margin: p }), S = z(() => e.length * u, [e, u]), M = !l || f, D = x === "fromBottom" ? "100% center" : "-100% center", W = x === "fromBottom" ? "0% center" : "200% center";
1595
+ const { colors: T } = S(), y = g ?? T.shimmerBase, s = h ?? T.shimmerHighlight, d = A(null), f = Ke(d, { once: c, margin: p }), b = z(() => e.length * u, [e, u]), M = !l || f, D = x === "fromBottom" ? "100% center" : "-100% center", W = x === "fromBottom" ? "0% center" : "200% center";
1548
1596
  return /* @__PURE__ */ r(
1549
1597
  v.span,
1550
1598
  {
1551
- ref: c,
1599
+ ref: d,
1552
1600
  className: a,
1553
1601
  style: {
1554
1602
  position: "relative",
@@ -1559,7 +1607,7 @@ function C({
1559
1607
  color: "transparent",
1560
1608
  WebkitTextFillColor: "transparent",
1561
1609
  backgroundRepeat: "no-repeat, padding-box",
1562
- "--spread": `${S}px`,
1610
+ "--spread": `${b}px`,
1563
1611
  "--base-color": y,
1564
1612
  "--shimmer-color": s,
1565
1613
  "--shimmer-bg": "linear-gradient(90deg, transparent calc(50% - var(--spread)), var(--shimmer-color), transparent calc(50% + var(--spread)))",
@@ -1591,10 +1639,10 @@ function C({
1591
1639
  );
1592
1640
  }
1593
1641
  const X = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compactBelow: i = !1 }) => {
1594
- const { colors: a } = T(), [l, d] = w(!1), u = (e.memories ?? []).map((S) => S.memoryTitle), g = u.length > 0, h = g && u.length > X, x = h && !l ? u.slice(0, X) : u, b = u.length - X, y = !h || l, s = `${n.searchingFor}'${e.queryDescription}'`, c = g ? `${n.searchingIn}${j(
1642
+ const { colors: a } = S(), [l, c] = C(!1), u = (e.memories ?? []).map((b) => b.memoryTitle), g = u.length > 0, h = g && u.length > X, x = h && !l ? u.slice(0, X) : u, T = u.length - X, y = !h || l, s = `${n.searchingFor}'${e.queryDescription}'`, d = g ? `${n.searchingIn}${Q(
1595
1643
  x,
1596
1644
  y ? n.and : void 0
1597
- )}` : "", f = g ? `${s}${c}` : `${n.searchingPrefix}${e.queryDescription}`;
1645
+ )}` : "", f = g ? `${s}${d}` : `${n.searchingPrefix}${e.queryDescription}`;
1598
1646
  return /* @__PURE__ */ m(
1599
1647
  "div",
1600
1648
  {
@@ -1607,7 +1655,7 @@ const X = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
1607
1655
  initial: { opacity: 0, y: -10 },
1608
1656
  animate: { opacity: 1, y: 0 },
1609
1657
  transition: { duration: 0.3, delay: 0 },
1610
- children: o && !t && !h ? /* @__PURE__ */ r(C, { text: f, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ m(R, { children: [
1658
+ children: o && !t && !h ? /* @__PURE__ */ r(w, { text: f, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ m(R, { children: [
1611
1659
  /* @__PURE__ */ r("span", { style: { color: a.textSecondary }, children: g ? /* @__PURE__ */ m(R, { children: [
1612
1660
  n.searchingFor,
1613
1661
  /* @__PURE__ */ m("span", { style: { fontWeight: 600 }, children: [
@@ -1615,7 +1663,7 @@ const X = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
1615
1663
  e.queryDescription,
1616
1664
  "'"
1617
1665
  ] }),
1618
- c
1666
+ d
1619
1667
  ] }) : `${n.searchingPrefix}${e.queryDescription}` }),
1620
1668
  h && !l && /* @__PURE__ */ m(R, { children: [
1621
1669
  " ",
@@ -1623,7 +1671,7 @@ const X = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
1623
1671
  "button",
1624
1672
  {
1625
1673
  type: "button",
1626
- onClick: () => d(!0),
1674
+ onClick: () => c(!0),
1627
1675
  style: {
1628
1676
  background: "none",
1629
1677
  border: "none",
@@ -1636,7 +1684,7 @@ const X = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
1636
1684
  fontFamily: "inherit"
1637
1685
  },
1638
1686
  children: k(n.moreMemories, {
1639
- n: b
1687
+ n: T
1640
1688
  })
1641
1689
  }
1642
1690
  )
@@ -1647,7 +1695,7 @@ const X = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
1647
1695
  "button",
1648
1696
  {
1649
1697
  type: "button",
1650
- onClick: () => d(!1),
1698
+ onClick: () => c(!1),
1651
1699
  style: {
1652
1700
  background: "none",
1653
1701
  border: "none",
@@ -1686,7 +1734,7 @@ const X = 5, q = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, compact
1686
1734
  size: o = 24,
1687
1735
  borderWidth: t = 7
1688
1736
  }) => {
1689
- const { colors: n } = T(), i = e ?? n.checkmarkColor, a = o * 0.5;
1737
+ const { colors: n } = S(), i = e ?? n.checkmarkColor, a = o * 0.5;
1690
1738
  return /* @__PURE__ */ r(
1691
1739
  "span",
1692
1740
  {
@@ -1754,13 +1802,13 @@ function te(e) {
1754
1802
  if (o !== "") return o;
1755
1803
  if (e.memoryTypeId !== "") return e.memoryTypeId;
1756
1804
  }
1757
- function Ce(e) {
1805
+ function we(e) {
1758
1806
  return e.chunks.filter((o) => o.relation === "MATCH").length;
1759
1807
  }
1760
1808
  function ur(e, o) {
1761
1809
  let t = 0, n = 0;
1762
1810
  for (const l of e)
1763
- t += Ce(l), l.matchingChunkScore > n && (n = l.matchingChunkScore);
1811
+ t += we(l), l.matchingChunkScore > n && (n = l.matchingChunkScore);
1764
1812
  const i = t === 1 ? o.chunkFound : k(o.chunksFound, { n: t }), a = k(o.scoreLabel, {
1765
1813
  n: n.toFixed(2)
1766
1814
  });
@@ -1787,7 +1835,7 @@ function gr({
1787
1835
  onSearchResultClick: o,
1788
1836
  t
1789
1837
  }) {
1790
- const { colors: n } = T(), [i, a] = w(null), l = !!o;
1838
+ const { colors: n } = S(), [i, a] = C(null), l = !!o;
1791
1839
  return /* @__PURE__ */ r(
1792
1840
  "div",
1793
1841
  {
@@ -1799,24 +1847,24 @@ function gr({
1799
1847
  paddingTop: 8,
1800
1848
  borderTop: `1px solid ${n.borderDivider}`
1801
1849
  },
1802
- children: e.map((d, p) => {
1850
+ children: e.map((c, p) => {
1803
1851
  const u = oe(
1804
- d.chunks
1852
+ c.chunks
1805
1853
  ), g = [
1806
- te(d),
1854
+ te(c),
1807
1855
  k(t.scoreLabel, {
1808
- n: d.matchingChunkScore.toFixed(2)
1856
+ n: c.matchingChunkScore.toFixed(2)
1809
1857
  }),
1810
1858
  u.length > 0 ? ne(u, t) : t.pagesNotAvailable
1811
1859
  ].filter(
1812
1860
  (y) => y != null && y !== ""
1813
1861
  ), h = {
1814
- memoryId: d.memoryId,
1815
- memoryTitle: d.memoryTitle,
1816
- memoryTypeId: d.memoryTypeId,
1817
- memoryTypeName: d.memoryTypeName,
1862
+ memoryId: c.memoryId,
1863
+ memoryTitle: c.memoryTitle,
1864
+ memoryTypeId: c.memoryTypeId,
1865
+ memoryTypeName: c.memoryTypeName,
1818
1866
  pageNumbers: u
1819
- }, x = `${d.memoryId}-${p}`, b = i === x;
1867
+ }, x = `${c.memoryId}-${p}`, T = i === x;
1820
1868
  return /* @__PURE__ */ m(
1821
1869
  "div",
1822
1870
  {
@@ -1852,7 +1900,7 @@ function gr({
1852
1900
  whiteSpace: "pre-wrap",
1853
1901
  wordBreak: "break-word"
1854
1902
  },
1855
- children: re(d.chunks)
1903
+ children: re(c.chunks)
1856
1904
  }
1857
1905
  ),
1858
1906
  /* @__PURE__ */ r(
@@ -1874,8 +1922,8 @@ function gr({
1874
1922
  "button",
1875
1923
  {
1876
1924
  type: "button",
1877
- "aria-busy": b,
1878
- disabled: b,
1925
+ "aria-busy": T,
1926
+ disabled: T,
1879
1927
  onClick: async () => {
1880
1928
  a(x);
1881
1929
  try {
@@ -1896,14 +1944,14 @@ function gr({
1896
1944
  background: n.bgChip,
1897
1945
  border: `1px solid ${n.bgChipBorder}`,
1898
1946
  borderRadius: 6,
1899
- cursor: b ? "wait" : "pointer",
1947
+ cursor: T ? "wait" : "pointer",
1900
1948
  fontFamily: "inherit",
1901
1949
  display: "inline-flex",
1902
1950
  alignItems: "center",
1903
1951
  gap: 8
1904
1952
  },
1905
1953
  children: [
1906
- b && /* @__PURE__ */ r(
1954
+ T && /* @__PURE__ */ r(
1907
1955
  "span",
1908
1956
  {
1909
1957
  className: "explore-memory-loader explore-memory-loader--callback",
@@ -1929,7 +1977,7 @@ function hr({
1929
1977
  onToggle: n,
1930
1978
  onSearchResultClick: i
1931
1979
  }) {
1932
- const { colors: a } = T(), l = e.items.map((p) => p.item), d = l.some((p) => p.chunks.length > 0);
1980
+ const { colors: a } = S(), l = e.items.map((p) => p.item), c = l.some((p) => p.chunks.length > 0);
1933
1981
  return /* @__PURE__ */ m(
1934
1982
  v.div,
1935
1983
  {
@@ -2007,7 +2055,7 @@ function hr({
2007
2055
  children: ur(l, o)
2008
2056
  }
2009
2057
  ),
2010
- d && /* @__PURE__ */ r(
2058
+ c && /* @__PURE__ */ r(
2011
2059
  "button",
2012
2060
  {
2013
2061
  type: "button",
@@ -2028,7 +2076,7 @@ function hr({
2028
2076
  ]
2029
2077
  }
2030
2078
  ),
2031
- t && d && /* @__PURE__ */ r(
2079
+ t && c && /* @__PURE__ */ r(
2032
2080
  gr,
2033
2081
  {
2034
2082
  items: l,
@@ -2052,17 +2100,17 @@ const ie = ({
2052
2100
  t,
2053
2101
  compactTop: n = !1
2054
2102
  }) => {
2055
- const { colors: i } = T(), a = e.items, l = a.reduce(
2056
- (s, c) => s + Ce(c),
2103
+ const { colors: i } = S(), a = e.items, l = a.reduce(
2104
+ (s, d) => s + we(d),
2057
2105
  0
2058
- ), d = new Set(a.map((s) => s.memoryId)).size, [p, u] = w({}), g = L((s) => {
2059
- u((c) => ({
2060
- ...c,
2061
- [s]: !c[s]
2106
+ ), c = new Set(a.map((s) => s.memoryId)).size, [p, u] = C({}), g = L((s) => {
2107
+ u((d) => ({
2108
+ ...d,
2109
+ [s]: !d[s]
2062
2110
  }));
2063
- }, []), h = z(() => mr(a), [a]), x = d === 1 ? t.memoryChatChunkResultsInOneMemory : k(t.memoryChatChunkResultsInMemories, {
2064
- n: d
2065
- }), b = `${yr(l, t)} ${x}`, y = n ? { paddingBottom: "10px" } : { paddingBlock: "10px" };
2111
+ }, []), h = z(() => mr(a), [a]), x = c === 1 ? t.memoryChatChunkResultsInOneMemory : k(t.memoryChatChunkResultsInMemories, {
2112
+ n: c
2113
+ }), T = `${yr(l, t)} ${x}`, y = n ? { paddingBottom: "10px" } : { paddingBlock: "10px" };
2066
2114
  return a.length === 0 ? /* @__PURE__ */ r("div", { style: y, children: /* @__PURE__ */ r(
2067
2115
  "div",
2068
2116
  {
@@ -2094,7 +2142,7 @@ const ie = ({
2094
2142
  marginTop: "4px",
2095
2143
  fontStyle: "italic"
2096
2144
  },
2097
- children: b
2145
+ children: T
2098
2146
  }
2099
2147
  )
2100
2148
  ] });
@@ -2149,7 +2197,7 @@ const xr = ({
2149
2197
  )
2150
2198
  ] });
2151
2199
  }, Y = 5, kr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
2152
- const { colors: i } = T(), [a, l] = w(!1), d = e.titles, p = d.length > 0, u = p && d.length > Y, g = u && !a ? d.slice(0, Y) : d, h = d.length - Y, x = !u || a, b = p ? `${n.findingMemoriesIn}${j(
2200
+ const { colors: i } = S(), [a, l] = C(!1), c = e.titles, p = c.length > 0, u = p && c.length > Y, g = u && !a ? c.slice(0, Y) : c, h = c.length - Y, x = !u || a, T = p ? `${n.findingMemoriesIn}${Q(
2153
2201
  g,
2154
2202
  x ? n.and : void 0
2155
2203
  )}` : n.findingMemories;
@@ -2163,8 +2211,8 @@ const xr = ({
2163
2211
  initial: { opacity: 0, y: -10 },
2164
2212
  animate: { opacity: 1, y: 0 },
2165
2213
  transition: { duration: 0.3, delay: 0 },
2166
- children: o && !t && !u ? /* @__PURE__ */ r(C, { text: b, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ m(R, { children: [
2167
- /* @__PURE__ */ r("span", { style: { color: i.textSecondary }, children: b }),
2214
+ children: o && !t && !u ? /* @__PURE__ */ r(w, { text: T, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ m(R, { children: [
2215
+ /* @__PURE__ */ r("span", { style: { color: i.textSecondary }, children: T }),
2168
2216
  u && !a && /* @__PURE__ */ m(R, { children: [
2169
2217
  " ",
2170
2218
  /* @__PURE__ */ r(
@@ -2228,7 +2276,7 @@ const xr = ({
2228
2276
  )
2229
2277
  ] });
2230
2278
  }, J = 5, Sr = ({ data: e, t: o }) => {
2231
- const { colors: t } = T(), [n, i] = w(!1), l = e.memories.map((y) => y.memoryTitle), d = l.length > 0, p = d && l.length > J, u = p && !n ? l.slice(0, J) : l, g = l.length - J, h = !p || n, x = l.length === 1 ? o.memoryFound : o.memoriesFoundPrefix, b = d ? `${x}${j(
2279
+ const { colors: t } = S(), [n, i] = C(!1), l = e.memories.map((y) => y.memoryTitle), c = l.length > 0, p = c && l.length > J, u = p && !n ? l.slice(0, J) : l, g = l.length - J, h = !p || n, x = l.length === 1 ? o.memoryFound : o.memoriesFoundPrefix, T = c ? `${x}${Q(
2232
2280
  u,
2233
2281
  h ? o.and : void 0
2234
2282
  )}` : o.memoriesFound;
@@ -2240,7 +2288,7 @@ const xr = ({
2240
2288
  animate: { opacity: 1, y: 0 },
2241
2289
  transition: { duration: 0.3, delay: 0 },
2242
2290
  children: /* @__PURE__ */ m(R, { children: [
2243
- /* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children: b }),
2291
+ /* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children: T }),
2244
2292
  p && !n && /* @__PURE__ */ m(R, { children: [
2245
2293
  " ",
2246
2294
  /* @__PURE__ */ r(
@@ -2291,7 +2339,7 @@ const xr = ({
2291
2339
  }
2292
2340
  ) });
2293
2341
  }, ce = ({ isLatest: e = !1, durationSeconds: o, t }) => {
2294
- const { colors: n } = T(), i = t.addingSources;
2342
+ const { colors: n } = S(), i = t.addingSources;
2295
2343
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
2296
2344
  /* @__PURE__ */ r(
2297
2345
  v.div,
@@ -2305,7 +2353,7 @@ const xr = ({
2305
2353
  initial: { opacity: 0, y: -10 },
2306
2354
  animate: { opacity: 1, y: 0 },
2307
2355
  transition: { duration: 0.3, delay: 0 },
2308
- children: e && !o ? /* @__PURE__ */ r(C, { text: i, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: n.textSecondary }, children: i })
2356
+ children: e && !o ? /* @__PURE__ */ r(w, { text: i, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: n.textSecondary }, children: i })
2309
2357
  }
2310
2358
  ),
2311
2359
  o !== void 0 && /* @__PURE__ */ r(
@@ -2335,7 +2383,7 @@ function br(e, o) {
2335
2383
  return k(o.pageMultiple, { list: n, n: t });
2336
2384
  }
2337
2385
  const Me = ({ data: e, onSourceClick: o, t }) => {
2338
- const { colors: n } = T(), [i, a] = w(null);
2386
+ const { colors: n } = S(), [i, a] = C(null);
2339
2387
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
2340
2388
  /* @__PURE__ */ r(
2341
2389
  v.div,
@@ -2354,11 +2402,11 @@ const Me = ({ data: e, onSourceClick: o, t }) => {
2354
2402
  children: t.sources
2355
2403
  }
2356
2404
  ),
2357
- /* @__PURE__ */ r("div", { style: { display: "flex", flexWrap: "wrap", gap: "8px" }, children: e.sources.length === 0 ? /* @__PURE__ */ r("span", { style: { fontSize: "13px", color: n.textTertiary }, children: t.noSources }) : e.sources.map((l, d) => /* @__PURE__ */ r(
2405
+ /* @__PURE__ */ r("div", { style: { display: "flex", flexWrap: "wrap", gap: "8px" }, children: e.sources.length === 0 ? /* @__PURE__ */ r("span", { style: { fontSize: "13px", color: n.textTertiary }, children: t.noSources }) : e.sources.map((l, c) => /* @__PURE__ */ r(
2358
2406
  Tr,
2359
2407
  {
2360
2408
  source: l,
2361
- index: d,
2409
+ index: c,
2362
2410
  loadingMemoryId: i,
2363
2411
  setLoadingMemoryId: a,
2364
2412
  onSourceClick: o,
@@ -2375,7 +2423,7 @@ const Me = ({ data: e, onSourceClick: o, t }) => {
2375
2423
  onSourceClick: i,
2376
2424
  t: a
2377
2425
  }) => {
2378
- const { colors: l } = T(), [d, p] = w(!1), u = !!i, g = t === e.memoryId, h = e.pageNumbers ?? [], x = br(h, a);
2426
+ const { colors: l } = S(), [c, p] = C(!1), u = !!i, g = t === e.memoryId, h = e.pageNumbers ?? [], x = br(h, a);
2379
2427
  return /* @__PURE__ */ m(
2380
2428
  v.div,
2381
2429
  {
@@ -2406,7 +2454,7 @@ const Me = ({ data: e, onSourceClick: o, t }) => {
2406
2454
  padding: "8px 12px",
2407
2455
  borderRadius: "6px",
2408
2456
  border: `1px solid ${l.borderStrong}`,
2409
- backgroundColor: d ? l.sourcesBadgeBg : l.transparent,
2457
+ backgroundColor: c ? l.sourcesBadgeBg : l.transparent,
2410
2458
  cursor: u && !g ? "pointer" : g ? "wait" : "default",
2411
2459
  transition: "background-color 0.15s ease",
2412
2460
  userSelect: "none",
@@ -2445,10 +2493,10 @@ const Me = ({ data: e, onSourceClick: o, t }) => {
2445
2493
  size: o = 32,
2446
2494
  lineWidth: t = 2
2447
2495
  }) => {
2448
- const { colors: n } = T(), i = e ?? n.xmarkColor, a = o + 1, l = (o - t) / 2, d = (o - a) / 2, p = {
2496
+ const { colors: n } = S(), i = e ?? n.xmarkColor, a = o + 1, l = (o - t) / 2, c = (o - a) / 2, p = {
2449
2497
  position: "absolute",
2450
2498
  left: l,
2451
- top: d,
2499
+ top: c,
2452
2500
  width: t,
2453
2501
  height: a,
2454
2502
  backgroundColor: i
@@ -2492,12 +2540,12 @@ function vr({
2492
2540
  return e.error != null ? /* @__PURE__ */ r(_, { size: 15, lineWidth: 2 }) : e.result != null ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : o ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" });
2493
2541
  }
2494
2542
  const de = 80;
2495
- function wr({
2543
+ function Cr({
2496
2544
  memory: e,
2497
2545
  completed: o,
2498
2546
  t
2499
2547
  }) {
2500
- const { colors: n } = T(), [i, a] = w(!1), l = e.result ?? e.error, d = l != null && l.length > de, p = l != null ? i || !d ? l : `${l.slice(0, de)}...` : void 0, u = d, g = e.error != null;
2548
+ const { colors: n } = S(), [i, a] = C(!1), l = e.result ?? e.error, c = l != null && l.length > de, p = l != null ? i || !c ? l : `${l.slice(0, de)}...` : void 0, u = c, g = e.error != null;
2501
2549
  return /* @__PURE__ */ m(
2502
2550
  v.div,
2503
2551
  {
@@ -2577,8 +2625,8 @@ function wr({
2577
2625
  }
2578
2626
  );
2579
2627
  }
2580
- const Cr = ({ data: e, completed: o, t }) => /* @__PURE__ */ r("div", { style: { paddingTop: "0px", paddingBottom: "10px" }, children: e.memories.map((n) => /* @__PURE__ */ r(
2581
- wr,
2628
+ const wr = ({ data: e, completed: o, t }) => /* @__PURE__ */ r("div", { style: { paddingTop: "0px", paddingBottom: "10px" }, children: e.memories.map((n) => /* @__PURE__ */ r(
2629
+ Cr,
2582
2630
  {
2583
2631
  memory: n,
2584
2632
  completed: o,
@@ -2597,7 +2645,7 @@ function Er({
2597
2645
  item: e,
2598
2646
  t: o
2599
2647
  }) {
2600
- const { colors: t } = T(), [n, i] = w(!1), a = e.description ?? "", l = a.length > pe, d = a.length === 0 ? void 0 : n || !l ? a : `${a.slice(0, pe)}...`;
2648
+ const { colors: t } = S(), [n, i] = C(!1), a = e.description ?? "", l = a.length > pe, c = a.length === 0 ? void 0 : n || !l ? a : `${a.slice(0, pe)}...`;
2601
2649
  return /* @__PURE__ */ m(
2602
2650
  "div",
2603
2651
  {
@@ -2645,7 +2693,7 @@ function Er({
2645
2693
  ]
2646
2694
  }
2647
2695
  ),
2648
- d != null && /* @__PURE__ */ m(R, { children: [
2696
+ c != null && /* @__PURE__ */ m(R, { children: [
2649
2697
  /* @__PURE__ */ r(
2650
2698
  "span",
2651
2699
  {
@@ -2658,7 +2706,7 @@ function Er({
2658
2706
  wordBreak: "break-word",
2659
2707
  cursor: l ? "pointer" : "default"
2660
2708
  },
2661
- children: d
2709
+ children: c
2662
2710
  }
2663
2711
  ),
2664
2712
  l && /* @__PURE__ */ r(
@@ -2692,7 +2740,7 @@ function Rr({
2692
2740
  durationSeconds: t,
2693
2741
  t: n
2694
2742
  }) {
2695
- const { colors: i } = T(), a = Ee(e, n);
2743
+ const { colors: i } = S(), a = Ee(e, n);
2696
2744
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
2697
2745
  /* @__PURE__ */ r(
2698
2746
  v.div,
@@ -2701,7 +2749,7 @@ function Rr({
2701
2749
  initial: { opacity: 0, y: -10 },
2702
2750
  animate: { opacity: 1, y: 0 },
2703
2751
  transition: { duration: 0.3, delay: 0 },
2704
- children: o && !t ? /* @__PURE__ */ r(C, { text: a, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: i.textSecondary }, children: a })
2752
+ children: o && !t ? /* @__PURE__ */ r(w, { text: a, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: i.textSecondary }, children: a })
2705
2753
  }
2706
2754
  ),
2707
2755
  t !== void 0 && /* @__PURE__ */ r(
@@ -2722,7 +2770,7 @@ function Ir({
2722
2770
  data: e,
2723
2771
  t: o
2724
2772
  }) {
2725
- const { colors: t } = T(), [n, i] = w(!1), a = z(() => [...e.results ?? []].sort((g, h) => g.rank - h.rank), [e.results]), l = a.length, d = l === 1 ? o.googleResultFound : k(o.googleResultsFound, { n: l }), p = Ee(e, o);
2773
+ const { colors: t } = S(), [n, i] = C(!1), a = z(() => [...e.results ?? []].sort((g, h) => g.rank - h.rank), [e.results]), l = a.length, c = l === 1 ? o.googleResultFound : k(o.googleResultsFound, { n: l }), p = Ee(e, o);
2726
2774
  return l === 0 ? /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
2727
2775
  /* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children: p }),
2728
2776
  /* @__PURE__ */ r(
@@ -2762,7 +2810,7 @@ function Ir({
2762
2810
  color: t.textSecondary,
2763
2811
  whiteSpace: "nowrap"
2764
2812
  },
2765
- children: d
2813
+ children: c
2766
2814
  }
2767
2815
  ),
2768
2816
  /* @__PURE__ */ r(
@@ -2848,9 +2896,9 @@ function zr(e) {
2848
2896
  var o;
2849
2897
  return e.error != null ? !0 : e.status != null ? !1 : (((o = e.summary) == null ? void 0 : o.length) ?? 0) > 0;
2850
2898
  }
2851
- const ue = 80, ae = 12, le = 1.4, Br = Math.ceil(
2899
+ const ue = 80, ae = 12, le = 1.4, Pr = Math.ceil(
2852
2900
  ae * le
2853
- ), Pr = Math.ceil(
2901
+ ), Br = Math.ceil(
2854
2902
  5 * ae * le
2855
2903
  );
2856
2904
  function Ie(e, o = 48) {
@@ -2872,9 +2920,9 @@ function Dr({
2872
2920
  t: o,
2873
2921
  isLatest: t = !1
2874
2922
  }) {
2875
- const { colors: n } = T(), i = e.error ?? e.summary ?? "", a = i.length > 0, l = e.error != null, d = A(null), p = e.summary != null && e.summary !== "", u = Re(e, o), g = l || p || !a && u != null, h = e.error == null && (e.summary == null || e.summary === "");
2923
+ const { colors: n } = S(), i = e.error ?? e.summary ?? "", a = i.length > 0, l = e.error != null, c = A(null), p = e.summary != null && e.summary !== "", u = Re(e, o), g = l || p || !a && u != null, h = e.error == null && (e.summary == null || e.summary === "");
2876
2924
  return H(() => {
2877
- const x = d.current;
2925
+ const x = c.current;
2878
2926
  x != null && a && (x.scrollTop = x.scrollHeight);
2879
2927
  }, [i, a]), /* @__PURE__ */ m(
2880
2928
  v.div,
@@ -2937,7 +2985,7 @@ function Dr({
2937
2985
  children: Ie(e.url)
2938
2986
  }
2939
2987
  ),
2940
- !a && u != null && /* @__PURE__ */ r("div", { style: { fontSize: 12, color: n.textTertiary, minHeight: 18 }, children: t ? /* @__PURE__ */ r(C, { text: u, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: n.textTertiary }, children: u }) }),
2988
+ !a && u != null && /* @__PURE__ */ r("div", { style: { fontSize: 12, color: n.textTertiary, minHeight: 18 }, children: t ? /* @__PURE__ */ r(w, { text: u, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: n.textTertiary }, children: u }) }),
2941
2989
  a && /* @__PURE__ */ r(
2942
2990
  "div",
2943
2991
  {
@@ -2950,10 +2998,10 @@ function Dr({
2950
2998
  children: /* @__PURE__ */ r(
2951
2999
  "div",
2952
3000
  {
2953
- ref: d,
3001
+ ref: c,
2954
3002
  style: {
2955
- minHeight: Br,
2956
- maxHeight: Pr,
3003
+ minHeight: Pr,
3004
+ maxHeight: Br,
2957
3005
  height: "auto",
2958
3006
  overflowY: "auto",
2959
3007
  overflowX: "hidden",
@@ -2979,7 +3027,7 @@ function Wr({
2979
3027
  item: e,
2980
3028
  t: o
2981
3029
  }) {
2982
- const { colors: t } = T(), [n, i] = w(!1), a = e.error ?? e.summary ?? "", l = e.error != null, d = a.length > ue, p = a.length === 0 ? void 0 : n || !d ? a : `${a.slice(0, ue)}...`, u = Re(e, o), g = e.error == null && (e.summary == null || e.summary === "") && e.status != null;
3030
+ const { colors: t } = S(), [n, i] = C(!1), a = e.error ?? e.summary ?? "", l = e.error != null, c = a.length > ue, p = a.length === 0 ? void 0 : n || !c ? a : `${a.slice(0, ue)}...`, u = Re(e, o), g = e.error == null && (e.summary == null || e.summary === "") && e.status != null;
2983
3031
  return /* @__PURE__ */ m(
2984
3032
  v.div,
2985
3033
  {
@@ -3056,19 +3104,19 @@ function Wr({
3056
3104
  /* @__PURE__ */ r(
3057
3105
  "span",
3058
3106
  {
3059
- onClick: d ? () => i((h) => !h) : void 0,
3107
+ onClick: c ? () => i((h) => !h) : void 0,
3060
3108
  style: {
3061
3109
  fontSize: 12,
3062
3110
  color: l ? t.textError : t.textSecondary,
3063
3111
  lineHeight: 1.4,
3064
3112
  whiteSpace: n ? "pre-wrap" : void 0,
3065
3113
  wordBreak: "break-word",
3066
- cursor: d ? "pointer" : "default"
3114
+ cursor: c ? "pointer" : "default"
3067
3115
  },
3068
3116
  children: p
3069
3117
  }
3070
3118
  ),
3071
- d && /* @__PURE__ */ r(
3119
+ c && /* @__PURE__ */ r(
3072
3120
  "span",
3073
3121
  {
3074
3122
  style: {
@@ -3121,7 +3169,7 @@ function $r({
3121
3169
  durationSeconds: t,
3122
3170
  t: n
3123
3171
  }) {
3124
- const { colors: i } = T(), a = e.input.urls, l = e.input.query, d = a.length, p = d === 1 ? k(n.scrapingPage, { query: l }) : k(n.scrapingPages, { n: d, query: l });
3172
+ const { colors: i } = S(), a = e.input.urls, l = e.input.query, c = a.length, p = c === 1 ? k(n.scrapingPage, { query: l }) : k(n.scrapingPages, { n: c, query: l });
3125
3173
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
3126
3174
  /* @__PURE__ */ r(
3127
3175
  v.div,
@@ -3130,7 +3178,7 @@ function $r({
3130
3178
  initial: { opacity: 0, y: -10 },
3131
3179
  animate: { opacity: 1, y: 0 },
3132
3180
  transition: { duration: 0.3, delay: 0 },
3133
- children: o && !t ? /* @__PURE__ */ r(C, { text: p, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: i.textSecondary }, children: p })
3181
+ children: o && !t ? /* @__PURE__ */ r(w, { text: p, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: i.textSecondary }, children: p })
3134
3182
  }
3135
3183
  ),
3136
3184
  t !== void 0 && /* @__PURE__ */ r(
@@ -3152,12 +3200,12 @@ function Nr({
3152
3200
  isLatest: o = !1,
3153
3201
  t
3154
3202
  }) {
3155
- const { colors: n } = T(), [i, a] = w(!1), l = e.results ?? [], { successCount: d, errorCount: p } = z(() => {
3156
- let s = 0, c = 0;
3203
+ const { colors: n } = S(), [i, a] = C(!1), l = e.results ?? [], { successCount: c, errorCount: p } = z(() => {
3204
+ let s = 0, d = 0;
3157
3205
  for (const f of l)
3158
- f.error != null ? c += 1 : s += 1;
3159
- return { successCount: s, errorCount: c };
3160
- }, [l]), u = l.length, g = e.input.query, h = l.length > 0 && l.every((s) => zr(s)), x = o && !h ? u === 1 ? k(t.scrapingPage, { query: g }) : k(t.scrapingPages, { n: u, query: g }) : u === 1 ? t.scrapedPage : k(t.scrapedPages, { n: u }), b = k(t.scrapeOkCount, { n: d }), y = p > 0 ? `${x} - ${b}, ${k(t.scrapeFailedCount, { n: p })}` : `${x} - ${b}`;
3206
+ f.error != null ? d += 1 : s += 1;
3207
+ return { successCount: s, errorCount: d };
3208
+ }, [l]), u = l.length, g = e.input.query, h = l.length > 0 && l.every((s) => zr(s)), x = o && !h ? u === 1 ? k(t.scrapingPage, { query: g }) : k(t.scrapingPages, { n: u, query: g }) : u === 1 ? t.scrapedPage : k(t.scrapedPages, { n: u }), T = k(t.scrapeOkCount, { n: c }), y = p > 0 ? `${x} - ${T}, ${k(t.scrapeFailedCount, { n: p })}` : `${x} - ${T}`;
3161
3209
  return u === 0 ? /* @__PURE__ */ r("div", { style: { paddingBlock: "10px" }, children: /* @__PURE__ */ r(
3162
3210
  "div",
3163
3211
  {
@@ -3183,7 +3231,7 @@ function Nr({
3183
3231
  gap: "6px 12px",
3184
3232
  minWidth: 0
3185
3233
  },
3186
- children: o && !h ? /* @__PURE__ */ r(C, { text: y, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r(
3234
+ children: o && !h ? /* @__PURE__ */ r(w, { text: y, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r(
3187
3235
  "span",
3188
3236
  {
3189
3237
  style: {
@@ -3269,7 +3317,7 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
3269
3317
  t: n
3270
3318
  }
3271
3319
  ), ge = (e) => {
3272
- const { colors: o } = T(), { isLatest: t = !1, durationSeconds: n, t: i } = e, a = i.memoryChatThinking;
3320
+ const { colors: o } = S(), { isLatest: t = !1, durationSeconds: n, t: i } = e, a = i.memoryChatThinking;
3273
3321
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
3274
3322
  /* @__PURE__ */ r(
3275
3323
  v.div,
@@ -3283,7 +3331,7 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
3283
3331
  initial: { opacity: 0, y: -10 },
3284
3332
  animate: { opacity: 1, y: 0 },
3285
3333
  transition: { duration: 0.3, delay: 0 },
3286
- children: t && !n ? /* @__PURE__ */ r(C, { text: a, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: o.textSecondary }, children: a })
3334
+ children: t && !n ? /* @__PURE__ */ r(w, { text: a, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: o.textSecondary }, children: a })
3287
3335
  }
3288
3336
  ),
3289
3337
  n !== void 0 && /* @__PURE__ */ r(
@@ -3315,7 +3363,7 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
3315
3363
  animate: { opacity: 1, y: 0 },
3316
3364
  transition: { duration: 0.3, delay: 0 },
3317
3365
  children: o && !t ? /* @__PURE__ */ r(
3318
- C,
3366
+ w,
3319
3367
  {
3320
3368
  text: i,
3321
3369
  duration: 2.5,
@@ -3357,7 +3405,7 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
3357
3405
  animate: { opacity: 1, y: 0 },
3358
3406
  transition: { duration: 0.3, delay: 0 },
3359
3407
  children: o && !t ? /* @__PURE__ */ r(
3360
- C,
3408
+ w,
3361
3409
  {
3362
3410
  text: i,
3363
3411
  duration: 2.5,
@@ -3399,7 +3447,7 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
3399
3447
  animate: { opacity: 1, y: 0 },
3400
3448
  transition: { duration: 0.3, delay: 0 },
3401
3449
  children: o && !t ? /* @__PURE__ */ r(
3402
- C,
3450
+ w,
3403
3451
  {
3404
3452
  text: i,
3405
3453
  duration: 2.5,
@@ -3441,7 +3489,7 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
3441
3489
  animate: { opacity: 1, y: 0 },
3442
3490
  transition: { duration: 0.3, delay: 0 },
3443
3491
  children: o && !t ? /* @__PURE__ */ r(
3444
- C,
3492
+ w,
3445
3493
  {
3446
3494
  text: i,
3447
3495
  duration: 2.5,
@@ -3483,7 +3531,7 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
3483
3531
  animate: { opacity: 1, y: 0 },
3484
3532
  transition: { duration: 0.3, delay: 0 },
3485
3533
  children: o && !t ? /* @__PURE__ */ r(
3486
- C,
3534
+ w,
3487
3535
  {
3488
3536
  text: i,
3489
3537
  duration: 2.5,
@@ -3507,7 +3555,7 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
3507
3555
  }
3508
3556
  )
3509
3557
  ] });
3510
- }, Qr = ({ data: e, t: o }) => {
3558
+ }, jr = ({ data: e, t: o }) => {
3511
3559
  const t = k(o.generateReportCompleted, {
3512
3560
  title: e.reportTitle
3513
3561
  });
@@ -3526,7 +3574,7 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
3526
3574
  children: /* @__PURE__ */ r("span", { style: { color: "#666" }, children: t })
3527
3575
  }
3528
3576
  ) });
3529
- }, K = 12, V = 1.45, jr = Math.ceil(
3577
+ }, K = 12, V = 1.45, Qr = Math.ceil(
3530
3578
  K * V
3531
3579
  ), he = Math.ceil(
3532
3580
  5 * K * V
@@ -3536,15 +3584,15 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
3536
3584
  collapsed: t = !1,
3537
3585
  label: n
3538
3586
  }) => {
3539
- const { colors: i } = T(), a = A(null);
3540
- return je(() => {
3587
+ const { colors: i } = S(), a = A(null);
3588
+ return Qe(() => {
3541
3589
  const l = a.current;
3542
3590
  if (l == null || !o || e.length === 0)
3543
3591
  return;
3544
- const d = () => {
3592
+ const c = () => {
3545
3593
  l.scrollTop = l.scrollHeight;
3546
3594
  };
3547
- d(), requestAnimationFrame(d);
3595
+ c(), requestAnimationFrame(c);
3548
3596
  }, [e, o]), /* @__PURE__ */ m("div", { style: { minWidth: 0 }, children: [
3549
3597
  n != null && n.length > 0 && /* @__PURE__ */ r(
3550
3598
  "span",
@@ -3574,7 +3622,7 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
3574
3622
  ref: a,
3575
3623
  className: "memory-search-generating-reasoning-viewport",
3576
3624
  style: {
3577
- minHeight: jr,
3625
+ minHeight: Qr,
3578
3626
  ...o ? {
3579
3627
  maxHeight: he,
3580
3628
  overflowY: "auto"
@@ -3600,7 +3648,7 @@ const Hr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => e.result
3600
3648
  function Z(e) {
3601
3649
  return e.text != null && e.text.length > 0;
3602
3650
  }
3603
- function Q(e) {
3651
+ function j(e) {
3604
3652
  return e.technicalReasoning != null && e.technicalReasoning.length > 0;
3605
3653
  }
3606
3654
  function Kr(e, o) {
@@ -3615,7 +3663,7 @@ const Vr = ({
3615
3663
  t: i,
3616
3664
  onMemoryClick: a
3617
3665
  }) => {
3618
- const { colors: l } = T(), d = e.reasoningCompleted === !0 || n || Z(e), p = !d, u = !Q(e) && !Z(e), [g, h] = w(!1), x = Q(e) && e.reasoningCompleted !== !0, b = u && p, y = Q(e) && !x, s = d ? Kr(o, t) : void 0;
3666
+ const { colors: l } = S(), c = e.reasoningCompleted === !0 || n || Z(e), p = !c, u = !j(e) && !Z(e), [g, h] = C(!1), x = j(e) && e.reasoningCompleted !== !0, T = u && p, y = j(e) && !x, s = c ? Kr(o, t) : void 0;
3619
3667
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
3620
3668
  /* @__PURE__ */ m(
3621
3669
  v.div,
@@ -3641,14 +3689,14 @@ const Vr = ({
3641
3689
  flexShrink: 0,
3642
3690
  width: 32
3643
3691
  },
3644
- children: d ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" })
3692
+ children: c ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" })
3645
3693
  }
3646
3694
  ),
3647
- b ? /* @__PURE__ */ r(C, { text: i.explorePlanning, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: l.textSecondary }, children: i.explorePlanning })
3695
+ T ? /* @__PURE__ */ r(w, { text: i.explorePlanning, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: l.textSecondary }, children: i.explorePlanning })
3648
3696
  ]
3649
3697
  }
3650
3698
  ),
3651
- Q(e) && /* @__PURE__ */ m("div", { style: { marginTop: 8 }, children: [
3699
+ j(e) && /* @__PURE__ */ m("div", { style: { marginTop: 8 }, children: [
3652
3700
  /* @__PURE__ */ r(
3653
3701
  Fe,
3654
3702
  {
@@ -3662,7 +3710,7 @@ const Vr = ({
3662
3710
  "button",
3663
3711
  {
3664
3712
  type: "button",
3665
- onClick: () => h((c) => !c),
3713
+ onClick: () => h((d) => !d),
3666
3714
  style: {
3667
3715
  alignSelf: "flex-start",
3668
3716
  border: "none",
@@ -3698,8 +3746,46 @@ const Vr = ({
3698
3746
  }
3699
3747
  )
3700
3748
  ] });
3701
- }, Xr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
3702
- const { colors: i } = T(), a = e.fileCount === 1 ? n.exploreExportingOne : k(n.exploreExporting, { n: e.fileCount });
3749
+ };
3750
+ function Xr(e) {
3751
+ const [o] = C(
3752
+ () => e[Math.floor(Math.random() * e.length)] ?? e[0] ?? ""
3753
+ );
3754
+ return o;
3755
+ }
3756
+ const Yr = ({ isLatest: e = !1, durationSeconds: o, t }) => {
3757
+ const { colors: n } = S(), i = e && o === void 0, a = Xr(t.exploreClassifyingPhrases) || t.exploreClassifying;
3758
+ return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
3759
+ /* @__PURE__ */ r(
3760
+ v.div,
3761
+ {
3762
+ style: {
3763
+ display: "flex",
3764
+ alignItems: "center",
3765
+ gap: "10px",
3766
+ color: n.textSecondary
3767
+ },
3768
+ initial: { opacity: 0, y: -10 },
3769
+ animate: { opacity: 1, y: 0 },
3770
+ transition: { duration: 0.3, delay: 0 },
3771
+ children: i ? /* @__PURE__ */ r(w, { text: a, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: n.textSecondary }, children: a })
3772
+ }
3773
+ ),
3774
+ o !== void 0 && /* @__PURE__ */ r(
3775
+ "div",
3776
+ {
3777
+ style: {
3778
+ fontSize: "12px",
3779
+ color: n.textMuted,
3780
+ marginTop: "4px",
3781
+ fontStyle: "italic"
3782
+ },
3783
+ children: k(t.tookSeconds, { n: o })
3784
+ }
3785
+ )
3786
+ ] });
3787
+ }, Jr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
3788
+ const { colors: i } = S(), a = e.fileCount === 1 ? n.exploreExportingOne : k(n.exploreExporting, { n: e.fileCount });
3703
3789
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
3704
3790
  /* @__PURE__ */ r(
3705
3791
  v.div,
@@ -3713,7 +3799,7 @@ const Vr = ({
3713
3799
  initial: { opacity: 0, y: -10 },
3714
3800
  animate: { opacity: 1, y: 0 },
3715
3801
  transition: { duration: 0.3, delay: 0 },
3716
- children: o && !t ? /* @__PURE__ */ r(C, { text: a, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: i.textSecondary }, children: a })
3802
+ children: o && !t ? /* @__PURE__ */ r(w, { text: a, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: i.textSecondary }, children: a })
3717
3803
  }
3718
3804
  ),
3719
3805
  t !== void 0 && /* @__PURE__ */ r(
@@ -3729,8 +3815,8 @@ const Vr = ({
3729
3815
  }
3730
3816
  )
3731
3817
  ] });
3732
- }, Yr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
3733
- const { colors: i } = T(), a = k(n.exploreFindMemoriesQuery, {
3818
+ }, Zr = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
3819
+ const { colors: i } = S(), a = k(n.exploreFindMemoriesQuery, {
3734
3820
  query: e.query
3735
3821
  });
3736
3822
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
@@ -3741,7 +3827,7 @@ const Vr = ({
3741
3827
  initial: { opacity: 0, y: -10 },
3742
3828
  animate: { opacity: 1, y: 0 },
3743
3829
  transition: { duration: 0.3, delay: 0 },
3744
- children: o && !t ? /* @__PURE__ */ r(C, { text: a, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ m("span", { style: { color: i.textSecondary }, children: [
3830
+ children: o && !t ? /* @__PURE__ */ r(w, { text: a, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ m("span", { style: { color: i.textSecondary }, children: [
3745
3831
  n.exploreFindMemoriesPrefix,
3746
3832
  /* @__PURE__ */ m("span", { style: { fontWeight: 600 }, children: [
3747
3833
  "'",
@@ -3764,8 +3850,8 @@ const Vr = ({
3764
3850
  }
3765
3851
  )
3766
3852
  ] });
3767
- }, ee = 5, Jr = ({ data: e, t: o }) => {
3768
- const { colors: t } = T(), [n, i] = w(!1), a = e.memories.map((b) => b.memoryTitle), l = a.length > 0, d = l && a.length > ee, p = d && !n ? a.slice(0, ee) : a, u = a.length - ee, g = !d || n, h = a.length === 1 ? o.memoryFound : o.memoriesFoundPrefix, x = l ? `${h}${j(
3853
+ }, ee = 5, en = ({ data: e, t: o }) => {
3854
+ const { colors: t } = S(), [n, i] = C(!1), a = e.memories.map((T) => T.memoryTitle), l = a.length > 0, c = l && a.length > ee, p = c && !n ? a.slice(0, ee) : a, u = a.length - ee, g = !c || n, h = a.length === 1 ? o.memoryFound : o.memoriesFoundPrefix, x = l ? `${h}${Q(
3769
3855
  p,
3770
3856
  g ? o.and : void 0
3771
3857
  )}` : o.memoriesFound;
@@ -3778,7 +3864,7 @@ const Vr = ({
3778
3864
  transition: { duration: 0.3, delay: 0 },
3779
3865
  children: [
3780
3866
  /* @__PURE__ */ r("span", { style: { color: t.textSecondary }, children: x }),
3781
- d && !n && /* @__PURE__ */ m(R, { children: [
3867
+ c && !n && /* @__PURE__ */ m(R, { children: [
3782
3868
  " ",
3783
3869
  /* @__PURE__ */ r(
3784
3870
  "button",
@@ -3802,7 +3888,7 @@ const Vr = ({
3802
3888
  }
3803
3889
  )
3804
3890
  ] }),
3805
- d && n && /* @__PURE__ */ m(R, { children: [
3891
+ c && n && /* @__PURE__ */ m(R, { children: [
3806
3892
  " ",
3807
3893
  /* @__PURE__ */ r(
3808
3894
  "button",
@@ -3828,7 +3914,7 @@ const Vr = ({
3828
3914
  }
3829
3915
  ) });
3830
3916
  };
3831
- function Zr(e) {
3917
+ function rn(e) {
3832
3918
  return {
3833
3919
  taskType: "MemoryChat",
3834
3920
  eventType: "Search",
@@ -3836,8 +3922,8 @@ function Zr(e) {
3836
3922
  ...e.input.memories !== void 0 && e.input.memories.length > 0 ? { memories: e.input.memories } : {}
3837
3923
  };
3838
3924
  }
3839
- const en = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, onSearchResultClick: i }) => {
3840
- const a = Zr(e);
3925
+ const nn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, onSearchResultClick: i }) => {
3926
+ const a = rn(e);
3841
3927
  return e.items === void 0 ? /* @__PURE__ */ r(
3842
3928
  q,
3843
3929
  {
@@ -3872,19 +3958,19 @@ const en = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n, onSearchResul
3872
3958
  )
3873
3959
  ] });
3874
3960
  };
3875
- function rn({
3961
+ function on({
3876
3962
  memory: e,
3877
3963
  completed: o
3878
3964
  }) {
3879
3965
  return e.error != null ? /* @__PURE__ */ r(_, { size: 15, lineWidth: 2 }) : e.summary != null ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : o ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" });
3880
3966
  }
3881
3967
  const ye = 80;
3882
- function nn({
3968
+ function tn({
3883
3969
  memory: e,
3884
3970
  completed: o,
3885
3971
  t
3886
3972
  }) {
3887
- const { colors: n } = T(), [i, a] = w(!1), l = e.summary ?? e.error, d = l != null && l.length > ye, p = l != null ? i || !d ? l : `${l.slice(0, ye)}...` : void 0, u = d, g = e.error != null;
3973
+ const { colors: n } = S(), [i, a] = C(!1), l = e.summary ?? e.error, c = l != null && l.length > ye, p = l != null ? i || !c ? l : `${l.slice(0, ye)}...` : void 0, u = c, g = e.error != null;
3888
3974
  return /* @__PURE__ */ m(
3889
3975
  v.div,
3890
3976
  {
@@ -3914,7 +4000,7 @@ function nn({
3914
4000
  flexShrink: 0,
3915
4001
  width: 32
3916
4002
  },
3917
- children: /* @__PURE__ */ r(rn, { memory: e, completed: o })
4003
+ children: /* @__PURE__ */ r(on, { memory: e, completed: o })
3918
4004
  }
3919
4005
  ),
3920
4006
  /* @__PURE__ */ m(
@@ -3968,8 +4054,8 @@ function nn({
3968
4054
  }
3969
4055
  );
3970
4056
  }
3971
- const on = ({ data: e, completed: o, t }) => {
3972
- const { colors: n } = T();
4057
+ const an = ({ data: e, completed: o, t }) => {
4058
+ const { colors: n } = S();
3973
4059
  return /* @__PURE__ */ m("div", { style: { paddingTop: "16px", paddingBottom: "10px" }, children: [
3974
4060
  /* @__PURE__ */ r(
3975
4061
  "div",
@@ -3984,7 +4070,7 @@ const on = ({ data: e, completed: o, t }) => {
3984
4070
  }
3985
4071
  ),
3986
4072
  e.memories.map((i) => /* @__PURE__ */ r(
3987
- nn,
4073
+ tn,
3988
4074
  {
3989
4075
  memory: i,
3990
4076
  completed: o,
@@ -3993,13 +4079,13 @@ const on = ({ data: e, completed: o, t }) => {
3993
4079
  i.memoryId
3994
4080
  ))
3995
4081
  ] });
3996
- }, tn = ({
4082
+ }, ln = ({
3997
4083
  data: e,
3998
4084
  isLatest: o = !1,
3999
4085
  durationSeconds: t,
4000
4086
  t: n
4001
4087
  }) => {
4002
- const { colors: i } = T(), a = k(n.exploreRunCode, { title: e.title });
4088
+ const { colors: i } = S(), a = k(n.exploreRunCode, { title: e.title });
4003
4089
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
4004
4090
  /* @__PURE__ */ r(
4005
4091
  v.div,
@@ -4013,7 +4099,7 @@ const on = ({ data: e, completed: o, t }) => {
4013
4099
  initial: { opacity: 0, y: -10 },
4014
4100
  animate: { opacity: 1, y: 0 },
4015
4101
  transition: { duration: 0.3, delay: 0 },
4016
- children: o && !t ? /* @__PURE__ */ r(C, { text: a, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: i.textSecondary }, children: a })
4102
+ children: o && !t ? /* @__PURE__ */ r(w, { text: a, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: i.textSecondary }, children: a })
4017
4103
  }
4018
4104
  ),
4019
4105
  t !== void 0 && /* @__PURE__ */ r(
@@ -4029,7 +4115,106 @@ const on = ({ data: e, completed: o, t }) => {
4029
4115
  }
4030
4116
  )
4031
4117
  ] });
4032
- }, an = ({ data: e, onSourceClick: o, t }) => /* @__PURE__ */ r(
4118
+ };
4119
+ function sn({
4120
+ section: e,
4121
+ allCompleted: o
4122
+ }) {
4123
+ return e.completed || o ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" });
4124
+ }
4125
+ function cn({
4126
+ section: e,
4127
+ allCompleted: o
4128
+ }) {
4129
+ const { colors: t } = S();
4130
+ return /* @__PURE__ */ m(
4131
+ v.div,
4132
+ {
4133
+ initial: { opacity: 0 },
4134
+ animate: { opacity: 1 },
4135
+ transition: { duration: 0.25 },
4136
+ style: {
4137
+ paddingTop: "12px",
4138
+ paddingBottom: "12px",
4139
+ borderBottom: `1px solid ${t.border}`,
4140
+ display: "flex",
4141
+ flexDirection: "row",
4142
+ alignItems: "center",
4143
+ gap: "10px",
4144
+ minWidth: 0
4145
+ },
4146
+ children: [
4147
+ /* @__PURE__ */ r(
4148
+ "div",
4149
+ {
4150
+ style: {
4151
+ display: "flex",
4152
+ alignItems: "center",
4153
+ justifyContent: "center",
4154
+ flexShrink: 0,
4155
+ width: 32
4156
+ },
4157
+ children: /* @__PURE__ */ r(sn, { section: e, allCompleted: o })
4158
+ }
4159
+ ),
4160
+ /* @__PURE__ */ r(
4161
+ "span",
4162
+ {
4163
+ style: {
4164
+ fontSize: 13,
4165
+ fontWeight: 500,
4166
+ color: t.textPrimary
4167
+ },
4168
+ children: e.title
4169
+ }
4170
+ )
4171
+ ]
4172
+ }
4173
+ );
4174
+ }
4175
+ const dn = ({ data: e, completed: o, isLatest: t = !1, durationSeconds: n, t: i }) => {
4176
+ const { colors: a } = S(), l = k(i.exploreComposeHtmlReport, {
4177
+ title: e.title
4178
+ }), c = e.sections ?? [], p = o || c.length > 0 && c.every((g) => g.completed), u = t && !n && !p;
4179
+ return /* @__PURE__ */ m("div", { style: { paddingTop: "16px", paddingBottom: "10px" }, children: [
4180
+ /* @__PURE__ */ r(
4181
+ v.div,
4182
+ {
4183
+ style: {
4184
+ display: "flex",
4185
+ alignItems: "center",
4186
+ gap: "10px",
4187
+ color: a.textSecondary,
4188
+ marginBottom: c.length > 0 ? "4px" : void 0
4189
+ },
4190
+ initial: { opacity: 0, y: -10 },
4191
+ animate: { opacity: 1, y: 0 },
4192
+ transition: { duration: 0.3 },
4193
+ children: u ? /* @__PURE__ */ r(w, { text: l, duration: 2.5, repeat: !0 }) : /* @__PURE__ */ r("span", { style: { color: a.textSecondary }, children: l })
4194
+ }
4195
+ ),
4196
+ c.map((g) => /* @__PURE__ */ r(
4197
+ cn,
4198
+ {
4199
+ section: g,
4200
+ allCompleted: p
4201
+ },
4202
+ g.title
4203
+ )),
4204
+ n !== void 0 && /* @__PURE__ */ r(
4205
+ "div",
4206
+ {
4207
+ style: {
4208
+ fontSize: "12px",
4209
+ color: a.textMuted,
4210
+ marginTop: "4px",
4211
+ fontStyle: "italic"
4212
+ },
4213
+ children: k(i.tookSeconds, { n })
4214
+ }
4215
+ )
4216
+ ] });
4217
+ }, pn = ({ data: e, onSourceClick: o, t }) => /* @__PURE__ */ r(
4033
4218
  Me,
4034
4219
  {
4035
4220
  data: {
@@ -4041,20 +4226,20 @@ const on = ({ data: e, completed: o, t }) => {
4041
4226
  t
4042
4227
  }
4043
4228
  );
4044
- function ln({ item: e }) {
4229
+ function un({ item: e }) {
4045
4230
  return e.error != null ? /* @__PURE__ */ r(_, { size: 15, lineWidth: 2 }) : e.result != null ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" });
4046
4231
  }
4047
- function sn(e, o) {
4232
+ function mn(e, o) {
4048
4233
  return k(o.searchingInMemoriesOfType, {
4049
4234
  name: e.memoryTypeName
4050
4235
  });
4051
4236
  }
4052
- function cn({
4237
+ function gn({
4053
4238
  item: e,
4054
4239
  t: o,
4055
4240
  showShimmerForPrimary: t
4056
4241
  }) {
4057
- const { colors: n } = T(), i = e.result != null, a = e.error != null, l = sn(e, o);
4242
+ const { colors: n } = S(), i = e.result != null, a = e.error != null, l = mn(e, o);
4058
4243
  return /* @__PURE__ */ m(
4059
4244
  v.div,
4060
4245
  {
@@ -4082,7 +4267,7 @@ function cn({
4082
4267
  flexShrink: 0,
4083
4268
  width: 32
4084
4269
  },
4085
- children: /* @__PURE__ */ r(ln, { item: e })
4270
+ children: /* @__PURE__ */ r(un, { item: e })
4086
4271
  }
4087
4272
  ),
4088
4273
  /* @__PURE__ */ m(
@@ -4096,7 +4281,7 @@ function cn({
4096
4281
  flex: 1
4097
4282
  },
4098
4283
  children: [
4099
- /* @__PURE__ */ r("span", { style: { fontSize: 13, fontWeight: 500, color: n.textPrimary }, children: !i && !a && t ? /* @__PURE__ */ r(C, { text: l, duration: 2.5, repeat: !0 }) : l }),
4284
+ /* @__PURE__ */ r("span", { style: { fontSize: 13, fontWeight: 500, color: n.textPrimary }, children: !i && !a && t ? /* @__PURE__ */ r(w, { text: l, duration: 2.5, repeat: !0 }) : l }),
4100
4285
  i && /* @__PURE__ */ r("span", { style: { fontSize: 12, color: n.textSecondary }, children: e.result.numberOfChunks === 1 ? k(
4101
4286
  o.memorySearchTypeResultSummaryOne,
4102
4287
  {
@@ -4121,20 +4306,20 @@ function cn({
4121
4306
  }
4122
4307
  );
4123
4308
  }
4124
- const dn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
4125
- const { colors: i } = T(), a = z(() => {
4309
+ const hn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
4310
+ const { colors: i } = S(), a = z(() => {
4126
4311
  let l = -1;
4127
- return e.memoryTypes.forEach((d, p) => {
4128
- d.result == null && d.error == null && (l = p);
4312
+ return e.memoryTypes.forEach((c, p) => {
4313
+ c.result == null && c.error == null && (l = p);
4129
4314
  }), l;
4130
4315
  }, [e.memoryTypes]);
4131
4316
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "10px" }, children: [
4132
- o && !t && e.memoryTypes.length === 0 ? /* @__PURE__ */ r(C, { text: n.searchingMemoryTypes, duration: 2.5, repeat: !0 }) : e.memoryTypes.map((l, d) => /* @__PURE__ */ r(
4133
- cn,
4317
+ o && !t && e.memoryTypes.length === 0 ? /* @__PURE__ */ r(w, { text: n.searchingMemoryTypes, duration: 2.5, repeat: !0 }) : e.memoryTypes.map((l, c) => /* @__PURE__ */ r(
4318
+ gn,
4134
4319
  {
4135
4320
  item: l,
4136
4321
  t: n,
4137
- showShimmerForPrimary: d === a && o
4322
+ showShimmerForPrimary: c === a && o
4138
4323
  },
4139
4324
  l.memoryTypeId
4140
4325
  )),
@@ -4155,26 +4340,26 @@ const dn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
4155
4340
  function U(e) {
4156
4341
  return e.queries != null && e.queries.length > 0;
4157
4342
  }
4158
- function pn(e) {
4343
+ function yn(e) {
4159
4344
  const o = e.reasoning;
4160
4345
  return (o == null || o === "") && !U(e);
4161
4346
  }
4162
- function un(e) {
4347
+ function fn(e) {
4163
4348
  if (U(e)) return 3;
4164
4349
  const o = e.reasoning;
4165
4350
  return o == null || o === "" ? 1 : e.reasoningCompleted === !0 ? 2 : 1;
4166
4351
  }
4167
- function mn({ phase: e }) {
4352
+ function xn({ phase: e }) {
4168
4353
  return e === 3 ? /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 }) : /* @__PURE__ */ r("span", { className: "explore-memory-loader" });
4169
4354
  }
4170
- function gn({
4355
+ function kn({
4171
4356
  item: e,
4172
4357
  t: o,
4173
4358
  isActiveRow: t
4174
4359
  }) {
4175
- const { colors: n } = T(), i = pn(e), a = un(e), l = e.reasoning, d = l != null && l.length > 0, [p, u] = w(!1), g = i && t, h = a === 2 && t && !U(e), x = k(o.searchingInMemoriesOfType, {
4360
+ const { colors: n } = S(), i = yn(e), a = fn(e), l = e.reasoning, c = l != null && l.length > 0, [p, u] = C(!1), g = i && t, h = a === 2 && t && !U(e), x = k(o.searchingInMemoriesOfType, {
4176
4361
  name: e.memoryTypeName
4177
- }), b = !i && a === 3;
4362
+ }), T = !i && a === 3;
4178
4363
  return /* @__PURE__ */ m(
4179
4364
  v.div,
4180
4365
  {
@@ -4187,7 +4372,7 @@ function gn({
4187
4372
  borderBottom: `1px solid ${n.border}`,
4188
4373
  display: "flex",
4189
4374
  flexDirection: "row",
4190
- alignItems: b ? "flex-start" : "center",
4375
+ alignItems: T ? "flex-start" : "center",
4191
4376
  gap: "10px",
4192
4377
  minWidth: 0
4193
4378
  },
@@ -4201,9 +4386,9 @@ function gn({
4201
4386
  justifyContent: "center",
4202
4387
  flexShrink: 0,
4203
4388
  width: 32,
4204
- ...b ? { paddingTop: 2 } : {}
4389
+ ...T ? { paddingTop: 2 } : {}
4205
4390
  },
4206
- children: /* @__PURE__ */ r(mn, { phase: i ? 1 : a })
4391
+ children: /* @__PURE__ */ r(xn, { phase: i ? 1 : a })
4207
4392
  }
4208
4393
  ),
4209
4394
  /* @__PURE__ */ m(
@@ -4217,8 +4402,8 @@ function gn({
4217
4402
  flex: 1
4218
4403
  },
4219
4404
  children: [
4220
- /* @__PURE__ */ r("span", { style: { fontSize: 13, fontWeight: 500, color: n.textPrimary }, children: g ? /* @__PURE__ */ r(C, { text: x, duration: 2.5, repeat: !0 }) : e.memoryTypeName }),
4221
- a === 1 && d && !U(e) && /* @__PURE__ */ r(
4405
+ /* @__PURE__ */ r("span", { style: { fontSize: 13, fontWeight: 500, color: n.textPrimary }, children: g ? /* @__PURE__ */ r(w, { text: x, duration: 2.5, repeat: !0 }) : e.memoryTypeName }),
4406
+ a === 1 && c && !U(e) && /* @__PURE__ */ r(
4222
4407
  Fe,
4223
4408
  {
4224
4409
  text: l,
@@ -4227,7 +4412,7 @@ function gn({
4227
4412
  }
4228
4413
  ),
4229
4414
  a === 2 && h && /* @__PURE__ */ r("div", { style: { fontSize: 12 }, children: /* @__PURE__ */ r(
4230
- C,
4415
+ w,
4231
4416
  {
4232
4417
  text: o.memorySearchGeneratingQueriesPending,
4233
4418
  duration: 2.5,
@@ -4273,7 +4458,7 @@ function gn({
4273
4458
  }
4274
4459
  )
4275
4460
  ] }),
4276
- d && /* @__PURE__ */ m(R, { children: [
4461
+ c && /* @__PURE__ */ m(R, { children: [
4277
4462
  /* @__PURE__ */ r(
4278
4463
  "button",
4279
4464
  {
@@ -4317,20 +4502,20 @@ function gn({
4317
4502
  }
4318
4503
  );
4319
4504
  }
4320
- const hn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
4321
- const { colors: i } = T(), a = z(() => {
4505
+ const Sn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
4506
+ const { colors: i } = S(), a = z(() => {
4322
4507
  let l = -1;
4323
- return e.memoryTypes.forEach((d, p) => {
4324
- U(d) || (l = p);
4508
+ return e.memoryTypes.forEach((c, p) => {
4509
+ U(c) || (l = p);
4325
4510
  }), l;
4326
4511
  }, [e.memoryTypes]);
4327
4512
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "10px" }, children: [
4328
- o && !t && e.memoryTypes.length === 0 ? /* @__PURE__ */ r(C, { text: n.memorySearchGeneratingQueries, duration: 2.5, repeat: !0 }) : e.memoryTypes.map((l, d) => /* @__PURE__ */ r(
4329
- gn,
4513
+ o && !t && e.memoryTypes.length === 0 ? /* @__PURE__ */ r(w, { text: n.memorySearchGeneratingQueries, duration: 2.5, repeat: !0 }) : e.memoryTypes.map((l, c) => /* @__PURE__ */ r(
4514
+ kn,
4330
4515
  {
4331
4516
  item: l,
4332
4517
  t: n,
4333
- isActiveRow: d === a && o
4518
+ isActiveRow: c === a && o
4334
4519
  },
4335
4520
  l.memoryTypeId
4336
4521
  )),
@@ -4348,18 +4533,18 @@ const hn = ({ data: e, isLatest: o = !1, durationSeconds: t, t: n }) => {
4348
4533
  )
4349
4534
  ] });
4350
4535
  };
4351
- function yn(e) {
4536
+ function bn(e) {
4352
4537
  return e.some((n) => n.result == null && n.error == null) ? /* @__PURE__ */ r("span", { className: "explore-memory-loader" }) : e.some((n) => n.error != null) ? /* @__PURE__ */ r(_, { size: 15, lineWidth: 2 }) : /* @__PURE__ */ r(F, { size: 15, borderWidth: 2 });
4353
4538
  }
4354
- function fn({
4539
+ function Tn({
4355
4540
  item: e,
4356
4541
  t: o
4357
4542
  }) {
4358
- const { colors: t } = T();
4543
+ const { colors: t } = S();
4359
4544
  if (e.error != null)
4360
4545
  return /* @__PURE__ */ r("span", { style: { fontSize: 12, color: t.textError, whiteSpace: "nowrap" }, children: e.error });
4361
4546
  if (e.result == null)
4362
- return /* @__PURE__ */ r("span", { style: { flexShrink: 0, fontSize: 12 }, children: /* @__PURE__ */ r(C, { text: o.searching, duration: 2.5, repeat: !0 }) });
4547
+ return /* @__PURE__ */ r("span", { style: { flexShrink: 0, fontSize: 12 }, children: /* @__PURE__ */ r(w, { text: o.searching, duration: 2.5, repeat: !0 }) });
4363
4548
  const n = e.result, i = n.numberOfChunks === 1 ? o.chunkFound : k(o.chunksFound, { n: n.numberOfChunks }), a = k(o.scoreLabel, {
4364
4549
  n: n.highestChunkScore.toFixed(2)
4365
4550
  });
@@ -4369,13 +4554,13 @@ function fn({
4369
4554
  a
4370
4555
  ] });
4371
4556
  }
4372
- function xn({
4557
+ function vn({
4373
4558
  items: e,
4374
4559
  queryRow: o,
4375
4560
  onExploreQueryResultClick: t,
4376
4561
  t: n
4377
4562
  }) {
4378
- const { colors: i } = T(), [a, l] = w(null);
4563
+ const { colors: i } = S(), [a, l] = C(null);
4379
4564
  if (e.length === 0)
4380
4565
  return /* @__PURE__ */ r(
4381
4566
  "div",
@@ -4388,7 +4573,7 @@ function xn({
4388
4573
  children: n.memorySearchExploreNoResults
4389
4574
  }
4390
4575
  );
4391
- const d = !!t;
4576
+ const c = !!t;
4392
4577
  return /* @__PURE__ */ r(
4393
4578
  "div",
4394
4579
  {
@@ -4410,8 +4595,8 @@ function xn({
4410
4595
  }),
4411
4596
  h.length > 0 ? ne(h, n) : n.pagesNotAvailable
4412
4597
  ].filter(
4413
- (c) => c != null && c !== ""
4414
- ), b = {
4598
+ (d) => d != null && d !== ""
4599
+ ), T = {
4415
4600
  memoryId: p.memoryId,
4416
4601
  memoryTitle: p.memoryTitle,
4417
4602
  pageNumbers: h,
@@ -4485,7 +4670,7 @@ function xn({
4485
4670
  ]
4486
4671
  }
4487
4672
  ),
4488
- d && /* @__PURE__ */ m(
4673
+ c && /* @__PURE__ */ m(
4489
4674
  "button",
4490
4675
  {
4491
4676
  type: "button",
@@ -4495,7 +4680,7 @@ function xn({
4495
4680
  l(y);
4496
4681
  try {
4497
4682
  await t(
4498
- b
4683
+ T
4499
4684
  );
4500
4685
  } finally {
4501
4686
  l(null);
@@ -4537,7 +4722,7 @@ function xn({
4537
4722
  }
4538
4723
  );
4539
4724
  }
4540
- function kn(e) {
4725
+ function Cn(e) {
4541
4726
  const o = [], t = /* @__PURE__ */ new Map();
4542
4727
  return e.forEach((n, i) => {
4543
4728
  let a = t.get(n.memoryTypeId);
@@ -4548,7 +4733,7 @@ function kn(e) {
4548
4733
  }, t.set(n.memoryTypeId, a)), a.items.push({ item: n, flatIndex: i });
4549
4734
  }), o.map((n) => t.get(n));
4550
4735
  }
4551
- function Sn({
4736
+ function wn({
4552
4737
  group: e,
4553
4738
  t: o,
4554
4739
  isLatest: t,
@@ -4556,7 +4741,7 @@ function Sn({
4556
4741
  toggleExpanded: i,
4557
4742
  onExploreQueryResultClick: a
4558
4743
  }) {
4559
- const { colors: l } = T(), d = e.items.map((u) => u.item), p = d.some(
4744
+ const { colors: l } = S(), c = e.items.map((u) => u.item), p = c.some(
4560
4745
  (u) => u.result == null && u.error == null
4561
4746
  );
4562
4747
  return /* @__PURE__ */ m(
@@ -4587,7 +4772,7 @@ function Sn({
4587
4772
  width: 32,
4588
4773
  ...p ? {} : { paddingTop: 2 }
4589
4774
  },
4590
- children: yn(d)
4775
+ children: bn(c)
4591
4776
  }
4592
4777
  ),
4593
4778
  /* @__PURE__ */ m(
@@ -4614,8 +4799,8 @@ function Sn({
4614
4799
  }
4615
4800
  ),
4616
4801
  e.items.map(({ item: u, flatIndex: g }) => {
4617
- var c;
4618
- const h = u.result != null, x = u.error != null, b = t && !h && !x, y = n[g] === !0, s = ((c = u.result) == null ? void 0 : c.items) ?? [];
4802
+ var d;
4803
+ const h = u.result != null, x = u.error != null, T = t && !h && !x, y = n[g] === !0, s = ((d = u.result) == null ? void 0 : d.items) ?? [];
4619
4804
  return /* @__PURE__ */ m(
4620
4805
  "div",
4621
4806
  {
@@ -4649,8 +4834,8 @@ function Sn({
4649
4834
  flex: "1 1 12rem",
4650
4835
  minWidth: 0
4651
4836
  },
4652
- children: b ? /* @__PURE__ */ r(
4653
- C,
4837
+ children: T ? /* @__PURE__ */ r(
4838
+ w,
4654
4839
  {
4655
4840
  text: u.query,
4656
4841
  duration: 2.5,
@@ -4670,7 +4855,7 @@ function Sn({
4670
4855
  flexShrink: 0
4671
4856
  },
4672
4857
  children: [
4673
- /* @__PURE__ */ r(fn, { item: u, t: o }),
4858
+ /* @__PURE__ */ r(Tn, { item: u, t: o }),
4674
4859
  h && /* @__PURE__ */ r(
4675
4860
  "button",
4676
4861
  {
@@ -4696,7 +4881,7 @@ function Sn({
4696
4881
  }
4697
4882
  ),
4698
4883
  h && y && /* @__PURE__ */ r(
4699
- xn,
4884
+ vn,
4700
4885
  {
4701
4886
  items: s,
4702
4887
  queryRow: u,
@@ -4716,34 +4901,34 @@ function Sn({
4716
4901
  }
4717
4902
  );
4718
4903
  }
4719
- const bn = ({
4904
+ const Mn = ({
4720
4905
  data: e,
4721
4906
  isLatest: o = !1,
4722
4907
  durationSeconds: t,
4723
4908
  onExploreQueryResultClick: n,
4724
4909
  t: i
4725
4910
  }) => {
4726
- const { colors: a } = T(), [l, d] = w(
4911
+ const { colors: a } = S(), [l, c] = C(
4727
4912
  {}
4728
4913
  ), p = L((g) => {
4729
- d((h) => ({
4914
+ c((h) => ({
4730
4915
  ...h,
4731
4916
  [g]: !h[g]
4732
4917
  }));
4733
4918
  }, []), u = z(
4734
- () => kn(e.queries),
4919
+ () => Cn(e.queries),
4735
4920
  [e.queries]
4736
4921
  );
4737
4922
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "10px" }, children: [
4738
4923
  o && !t && e.queries.length === 0 ? /* @__PURE__ */ r(
4739
- C,
4924
+ w,
4740
4925
  {
4741
4926
  text: i.memorySearchExploringQueries,
4742
4927
  duration: 2.5,
4743
4928
  repeat: !0
4744
4929
  }
4745
4930
  ) : u.map((g) => /* @__PURE__ */ r(
4746
- Sn,
4931
+ wn,
4747
4932
  {
4748
4933
  group: g,
4749
4934
  t: i,
@@ -4767,8 +4952,8 @@ const bn = ({
4767
4952
  }
4768
4953
  )
4769
4954
  ] });
4770
- }, Tn = ({ data: e, onSearchResultClick: o, t }) => {
4771
- const { colors: n } = T(), i = e.response.items, a = !!o, [l, d] = w(null);
4955
+ }, En = ({ data: e, onSearchResultClick: o, t }) => {
4956
+ const { colors: n } = S(), i = e.response.items, a = !!o, [l, c] = C(null);
4772
4957
  return /* @__PURE__ */ m("div", { style: { paddingBlock: "16px" }, children: [
4773
4958
  /* @__PURE__ */ r(
4774
4959
  v.div,
@@ -4803,8 +4988,8 @@ const bn = ({
4803
4988
  }),
4804
4989
  h.length > 0 ? ne(h, t) : t.pagesNotAvailable
4805
4990
  ].filter(
4806
- (c) => c != null && c !== ""
4807
- ), b = {
4991
+ (d) => d != null && d !== ""
4992
+ ), T = {
4808
4993
  memoryId: p.memoryId,
4809
4994
  memoryTitle: p.memoryTitle,
4810
4995
  memoryTypeId: p.memoryTypeId,
@@ -4885,11 +5070,11 @@ const bn = ({
4885
5070
  "aria-busy": s,
4886
5071
  disabled: s,
4887
5072
  onClick: async () => {
4888
- d(y);
5073
+ c(y);
4889
5074
  try {
4890
- await o(b);
5075
+ await o(T);
4891
5076
  } finally {
4892
- d(null);
5077
+ c(null);
4893
5078
  }
4894
5079
  },
4895
5080
  style: {
@@ -4929,7 +5114,7 @@ const bn = ({
4929
5114
  )
4930
5115
  ] });
4931
5116
  }, O = ({ message: e }) => {
4932
- const { colors: o } = T();
5117
+ const { colors: o } = S();
4933
5118
  return /* @__PURE__ */ r("div", { style: { paddingBlock: "16px" }, children: /* @__PURE__ */ r(
4934
5119
  v.div,
4935
5120
  {
@@ -4955,7 +5140,7 @@ const bn = ({
4955
5140
  }
4956
5141
  ) });
4957
5142
  };
4958
- class vn extends Ue.Component {
5143
+ class Rn extends Ue.Component {
4959
5144
  constructor(o) {
4960
5145
  super(o), this.state = { hasError: !1 };
4961
5146
  }
@@ -4974,7 +5159,7 @@ class vn extends Ue.Component {
4974
5159
  return this.state.hasError ? null : this.props.children;
4975
5160
  }
4976
5161
  }
4977
- const wn = ({
5162
+ const In = ({
4978
5163
  progressViewItems: e,
4979
5164
  loading: o,
4980
5165
  error: t,
@@ -4982,33 +5167,33 @@ const wn = ({
4982
5167
  t: i,
4983
5168
  onMemoryClick: a,
4984
5169
  onSourceClick: l,
4985
- onSearchResultClick: d,
5170
+ onSearchResultClick: c,
4986
5171
  onExploreQueryResultClick: p,
4987
5172
  downloadFile: u
4988
5173
  }) => {
4989
- const { theme: g, colors: h } = T(), x = A(null);
5174
+ const { theme: g, colors: h } = S(), x = A(null);
4990
5175
  H(() => {
4991
5176
  x.current && (x.current.scrollTop = x.current.scrollHeight);
4992
5177
  }, [e.length]);
4993
- const b = (s) => {
4994
- const c = s.item.data;
4995
- if (c.taskType === "StreamingChatCompletion" && c.eventType === "Text")
5178
+ const T = (s) => {
5179
+ const d = s.item.data;
5180
+ if (d.taskType === "StreamingChatCompletion" && d.eventType === "Text")
4996
5181
  return /* @__PURE__ */ r(
4997
5182
  N,
4998
5183
  {
4999
- text: c.text,
5184
+ text: d.text,
5000
5185
  onMemoryClick: a
5001
5186
  }
5002
5187
  );
5003
- if (c.taskType === "StructuredChatCompletion" && c.eventType === "Completed")
5004
- return /* @__PURE__ */ r(lr, { data: c });
5005
- if (c.taskType === "MemoryChat")
5006
- switch (c.eventType) {
5188
+ if (d.taskType === "StructuredChatCompletion" && d.eventType === "Completed")
5189
+ return /* @__PURE__ */ r(lr, { data: d });
5190
+ if (d.taskType === "MemoryChat")
5191
+ switch (d.eventType) {
5007
5192
  case "Text":
5008
5193
  return /* @__PURE__ */ r(
5009
5194
  N,
5010
5195
  {
5011
- text: c.text,
5196
+ text: d.text,
5012
5197
  onFileDownload: u,
5013
5198
  onMemoryClick: a
5014
5199
  }
@@ -5017,7 +5202,7 @@ const wn = ({
5017
5202
  return /* @__PURE__ */ r(
5018
5203
  ge,
5019
5204
  {
5020
- data: c,
5205
+ data: d,
5021
5206
  isLatest: s.isLatest,
5022
5207
  durationSeconds: s.durationSeconds,
5023
5208
  t: i
@@ -5027,7 +5212,7 @@ const wn = ({
5027
5212
  return /* @__PURE__ */ r(
5028
5213
  Gr,
5029
5214
  {
5030
- data: c,
5215
+ data: d,
5031
5216
  isLatest: s.isLatest,
5032
5217
  durationSeconds: s.durationSeconds,
5033
5218
  t: i
@@ -5037,7 +5222,7 @@ const wn = ({
5037
5222
  return /* @__PURE__ */ r(
5038
5223
  Or,
5039
5224
  {
5040
- data: c,
5225
+ data: d,
5041
5226
  isLatest: s.isLatest,
5042
5227
  durationSeconds: s.durationSeconds,
5043
5228
  t: i
@@ -5047,7 +5232,7 @@ const wn = ({
5047
5232
  return /* @__PURE__ */ r(
5048
5233
  _r,
5049
5234
  {
5050
- data: c,
5235
+ data: d,
5051
5236
  isLatest: s.isLatest,
5052
5237
  durationSeconds: s.durationSeconds,
5053
5238
  t: i
@@ -5057,7 +5242,7 @@ const wn = ({
5057
5242
  return /* @__PURE__ */ r(
5058
5243
  qr,
5059
5244
  {
5060
- data: c,
5245
+ data: d,
5061
5246
  isLatest: s.isLatest,
5062
5247
  durationSeconds: s.durationSeconds,
5063
5248
  t: i
@@ -5067,19 +5252,19 @@ const wn = ({
5067
5252
  return /* @__PURE__ */ r(
5068
5253
  Ur,
5069
5254
  {
5070
- data: c,
5255
+ data: d,
5071
5256
  isLatest: s.isLatest,
5072
5257
  durationSeconds: s.durationSeconds,
5073
5258
  t: i
5074
5259
  }
5075
5260
  );
5076
5261
  case "GenerateReportCompleted":
5077
- return /* @__PURE__ */ r(Qr, { data: c, t: i });
5262
+ return /* @__PURE__ */ r(jr, { data: d, t: i });
5078
5263
  case "FindMemories":
5079
5264
  return /* @__PURE__ */ r(
5080
5265
  kr,
5081
5266
  {
5082
- data: c,
5267
+ data: d,
5083
5268
  isLatest: s.isLatest,
5084
5269
  durationSeconds: s.durationSeconds,
5085
5270
  t: i
@@ -5089,7 +5274,7 @@ const wn = ({
5089
5274
  return /* @__PURE__ */ r(
5090
5275
  Sr,
5091
5276
  {
5092
- data: c,
5277
+ data: d,
5093
5278
  t: i
5094
5279
  }
5095
5280
  );
@@ -5097,7 +5282,7 @@ const wn = ({
5097
5282
  return /* @__PURE__ */ r(
5098
5283
  q,
5099
5284
  {
5100
- data: c,
5285
+ data: d,
5101
5286
  isLatest: s.isLatest,
5102
5287
  durationSeconds: s.durationSeconds,
5103
5288
  t: i
@@ -5107,18 +5292,18 @@ const wn = ({
5107
5292
  return /* @__PURE__ */ r(
5108
5293
  xr,
5109
5294
  {
5110
- data: c,
5295
+ data: d,
5111
5296
  isLatest: s.isLatest,
5112
5297
  durationSeconds: s.durationSeconds,
5113
5298
  t: i,
5114
- onSearchResultClick: d
5299
+ onSearchResultClick: c
5115
5300
  }
5116
5301
  );
5117
5302
  case "FindSources":
5118
5303
  return /* @__PURE__ */ r(
5119
5304
  ce,
5120
5305
  {
5121
- data: c,
5306
+ data: d,
5122
5307
  isLatest: s.isLatest,
5123
5308
  durationSeconds: s.durationSeconds,
5124
5309
  t: i
@@ -5128,16 +5313,16 @@ const wn = ({
5128
5313
  return /* @__PURE__ */ r(
5129
5314
  Me,
5130
5315
  {
5131
- data: c,
5316
+ data: d,
5132
5317
  onSourceClick: l,
5133
5318
  t: i
5134
5319
  }
5135
5320
  );
5136
5321
  case "ExploreMemories":
5137
5322
  return /* @__PURE__ */ r(
5138
- Cr,
5323
+ wr,
5139
5324
  {
5140
- data: c,
5325
+ data: d,
5141
5326
  completed: s.completed,
5142
5327
  isLatest: s.isLatest,
5143
5328
  t: i
@@ -5147,8 +5332,8 @@ const wn = ({
5147
5332
  return /* @__PURE__ */ r(
5148
5333
  ie,
5149
5334
  {
5150
- data: c,
5151
- onSearchResultClick: d,
5335
+ data: d,
5336
+ onSearchResultClick: c,
5152
5337
  t: i
5153
5338
  }
5154
5339
  );
@@ -5156,7 +5341,7 @@ const wn = ({
5156
5341
  return /* @__PURE__ */ r(
5157
5342
  Fr,
5158
5343
  {
5159
- data: c,
5344
+ data: d,
5160
5345
  isLatest: s.isLatest,
5161
5346
  durationSeconds: s.durationSeconds,
5162
5347
  t: i
@@ -5166,7 +5351,7 @@ const wn = ({
5166
5351
  return /* @__PURE__ */ r(
5167
5352
  Hr,
5168
5353
  {
5169
- data: c,
5354
+ data: d,
5170
5355
  isLatest: s.isLatest,
5171
5356
  durationSeconds: s.durationSeconds,
5172
5357
  t: i
@@ -5176,13 +5361,13 @@ const wn = ({
5176
5361
  return /* @__PURE__ */ r(
5177
5362
  N,
5178
5363
  {
5179
- text: c.response.textResponse,
5364
+ text: d.response.textResponse,
5180
5365
  onFileDownload: u,
5181
5366
  onMemoryClick: a
5182
5367
  }
5183
5368
  );
5184
5369
  default: {
5185
- const f = c;
5370
+ const f = d;
5186
5371
  return f.eventType === "Error" && "message" in f ? /* @__PURE__ */ r(O, { message: f.message }) : (console.warn(
5187
5372
  "[fency] Unknown MemoryChat eventType (no UI):",
5188
5373
  f.eventType,
@@ -5190,13 +5375,13 @@ const wn = ({
5190
5375
  ), null);
5191
5376
  }
5192
5377
  }
5193
- if (c.taskType === "MemorySearch")
5194
- switch (c.eventType) {
5378
+ if (d.taskType === "MemorySearch")
5379
+ switch (d.eventType) {
5195
5380
  case "GeneratingQueries":
5196
5381
  return /* @__PURE__ */ r(
5197
- hn,
5382
+ Sn,
5198
5383
  {
5199
- data: c,
5384
+ data: d,
5200
5385
  isLatest: s.isLatest,
5201
5386
  durationSeconds: s.durationSeconds,
5202
5387
  t: i
@@ -5204,9 +5389,9 @@ const wn = ({
5204
5389
  );
5205
5390
  case "ExploreQueries":
5206
5391
  return /* @__PURE__ */ r(
5207
- bn,
5392
+ Mn,
5208
5393
  {
5209
- data: c,
5394
+ data: d,
5210
5395
  isLatest: s.isLatest,
5211
5396
  durationSeconds: s.durationSeconds,
5212
5397
  onExploreQueryResultClick: p,
@@ -5215,9 +5400,9 @@ const wn = ({
5215
5400
  );
5216
5401
  case "SearchMemoryTypes":
5217
5402
  return /* @__PURE__ */ r(
5218
- dn,
5403
+ hn,
5219
5404
  {
5220
- data: c,
5405
+ data: d,
5221
5406
  isLatest: s.isLatest,
5222
5407
  durationSeconds: s.durationSeconds,
5223
5408
  t: i
@@ -5225,15 +5410,15 @@ const wn = ({
5225
5410
  );
5226
5411
  case "Completed":
5227
5412
  return /* @__PURE__ */ r(
5228
- Tn,
5413
+ En,
5229
5414
  {
5230
- data: c,
5231
- onSearchResultClick: d,
5415
+ data: d,
5416
+ onSearchResultClick: c,
5232
5417
  t: i
5233
5418
  }
5234
5419
  );
5235
5420
  default: {
5236
- const f = c;
5421
+ const f = d;
5237
5422
  return f.eventType === "Error" && "message" in f ? /* @__PURE__ */ r(O, { message: f.message }) : (console.warn(
5238
5423
  "[fency] Unknown MemorySearch eventType (no UI):",
5239
5424
  f.eventType,
@@ -5241,17 +5426,27 @@ const wn = ({
5241
5426
  ), null);
5242
5427
  }
5243
5428
  }
5244
- if (c.taskType === "ExploreMemories")
5245
- switch (c.eventType) {
5429
+ if (d.taskType === "ExploreMemories")
5430
+ switch (d.eventType) {
5246
5431
  case "Text":
5247
5432
  return /* @__PURE__ */ r(
5248
5433
  N,
5249
5434
  {
5250
- text: c.text,
5435
+ text: d.text,
5251
5436
  onFileDownload: u,
5252
5437
  onMemoryClick: a
5253
5438
  }
5254
5439
  );
5440
+ case "Classifying":
5441
+ return /* @__PURE__ */ r(
5442
+ Yr,
5443
+ {
5444
+ data: d,
5445
+ isLatest: s.isLatest,
5446
+ durationSeconds: s.durationSeconds,
5447
+ t: i
5448
+ }
5449
+ );
5255
5450
  case "Thinking":
5256
5451
  return /* @__PURE__ */ r(
5257
5452
  ge,
@@ -5266,7 +5461,7 @@ const wn = ({
5266
5461
  return /* @__PURE__ */ r(
5267
5462
  Vr,
5268
5463
  {
5269
- data: c,
5464
+ data: d,
5270
5465
  createdAt: s.item.createdAt,
5271
5466
  timestamp: s.item.timestamp,
5272
5467
  completed: s.completed,
@@ -5278,9 +5473,9 @@ const wn = ({
5278
5473
  return null;
5279
5474
  case "ExportingMemories":
5280
5475
  return /* @__PURE__ */ r(
5281
- Xr,
5476
+ Jr,
5282
5477
  {
5283
- data: c,
5478
+ data: d,
5284
5479
  isLatest: s.isLatest,
5285
5480
  durationSeconds: s.durationSeconds,
5286
5481
  t: i
@@ -5288,32 +5483,32 @@ const wn = ({
5288
5483
  );
5289
5484
  case "FindMemories":
5290
5485
  return /* @__PURE__ */ r(
5291
- Yr,
5486
+ Zr,
5292
5487
  {
5293
- data: c,
5488
+ data: d,
5294
5489
  isLatest: s.isLatest,
5295
5490
  durationSeconds: s.durationSeconds,
5296
5491
  t: i
5297
5492
  }
5298
5493
  );
5299
5494
  case "FindMemoriesResult":
5300
- return /* @__PURE__ */ r(Jr, { data: c, t: i });
5495
+ return /* @__PURE__ */ r(en, { data: d, t: i });
5301
5496
  case "SemanticSearch":
5302
5497
  return /* @__PURE__ */ r(
5303
- en,
5498
+ nn,
5304
5499
  {
5305
- data: c,
5500
+ data: d,
5306
5501
  isLatest: s.isLatest,
5307
5502
  durationSeconds: s.durationSeconds,
5308
5503
  t: i,
5309
- onSearchResultClick: d
5504
+ onSearchResultClick: c
5310
5505
  }
5311
5506
  );
5312
5507
  case "SemanticSearchForEach":
5313
5508
  return /* @__PURE__ */ r(
5314
- on,
5509
+ an,
5315
5510
  {
5316
- data: c,
5511
+ data: d,
5317
5512
  completed: s.completed,
5318
5513
  isLatest: s.isLatest,
5319
5514
  t: i
@@ -5321,9 +5516,20 @@ const wn = ({
5321
5516
  );
5322
5517
  case "RunCode":
5323
5518
  return /* @__PURE__ */ r(
5324
- tn,
5519
+ ln,
5520
+ {
5521
+ data: d,
5522
+ isLatest: s.isLatest,
5523
+ durationSeconds: s.durationSeconds,
5524
+ t: i
5525
+ }
5526
+ );
5527
+ case "ComposeHtmlReport":
5528
+ return /* @__PURE__ */ r(
5529
+ dn,
5325
5530
  {
5326
- data: c,
5531
+ data: d,
5532
+ completed: s.completed,
5327
5533
  isLatest: s.isLatest,
5328
5534
  durationSeconds: s.durationSeconds,
5329
5535
  t: i
@@ -5341,9 +5547,9 @@ const wn = ({
5341
5547
  );
5342
5548
  case "SourcesResult":
5343
5549
  return /* @__PURE__ */ r(
5344
- an,
5550
+ pn,
5345
5551
  {
5346
- data: c,
5552
+ data: d,
5347
5553
  onSourceClick: l,
5348
5554
  t: i
5349
5555
  }
@@ -5352,13 +5558,13 @@ const wn = ({
5352
5558
  return /* @__PURE__ */ r(
5353
5559
  N,
5354
5560
  {
5355
- text: c.response.textResponse,
5561
+ text: d.response.textResponse,
5356
5562
  onFileDownload: u,
5357
5563
  onMemoryClick: a
5358
5564
  }
5359
5565
  );
5360
5566
  default: {
5361
- const f = c;
5567
+ const f = d;
5362
5568
  return f.eventType === "Error" && "message" in f ? /* @__PURE__ */ r(O, { message: f.message }) : (console.warn(
5363
5569
  "[fency] Unknown ExploreMemories eventType (no UI):",
5364
5570
  f.eventType,
@@ -5366,17 +5572,17 @@ const wn = ({
5366
5572
  ), null);
5367
5573
  }
5368
5574
  }
5369
- return c.taskType === "StreamingChatCompletion" && c.eventType === "Completed" ? /* @__PURE__ */ r(
5575
+ return d.taskType === "StreamingChatCompletion" && d.eventType === "Completed" ? /* @__PURE__ */ r(
5370
5576
  N,
5371
5577
  {
5372
- text: c.response.textResponse,
5578
+ text: d.response.textResponse,
5373
5579
  onMemoryClick: a
5374
5580
  }
5375
- ) : c.eventType === "Error" && "message" in c ? /* @__PURE__ */ r(O, { message: c.message }) : null;
5581
+ ) : d.eventType === "Error" && "message" in d ? /* @__PURE__ */ r(O, { message: d.message }) : null;
5376
5582
  };
5377
5583
  if (e.length === 0)
5378
5584
  return t ? /* @__PURE__ */ r("div", { style: { width: "fit-content" }, children: /* @__PURE__ */ r(O, { message: t.message }) }) : o ? /* @__PURE__ */ r("div", { style: { width: "fit-content", paddingBlock: "16px" }, children: /* @__PURE__ */ r(
5379
- C,
5585
+ w,
5380
5586
  {
5381
5587
  text: n ?? i.processingYourTask,
5382
5588
  duration: 1.5,
@@ -5386,42 +5592,42 @@ const wn = ({
5386
5592
  shimmerColor: h.shimmerHighlight
5387
5593
  }
5388
5594
  ) }) : null;
5389
- const y = e.filter((s, c) => {
5595
+ const y = e.filter((s, d) => {
5390
5596
  const f = s.item.data;
5391
5597
  if (f.taskType === "ExploreMemories" && f.eventType === "SetupSandbox")
5392
5598
  return !1;
5393
5599
  if (f.taskType === "MemoryChat" && f.eventType === "ExploreMemories")
5394
- return !e.slice(c + 1).some(
5600
+ return !e.slice(d + 1).some(
5395
5601
  (E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "ExploreMemories"
5396
5602
  );
5397
5603
  if (f.taskType === "MemorySearch" && f.eventType === "GeneratingQueries")
5398
- return !e.slice(c + 1).some(
5604
+ return !e.slice(d + 1).some(
5399
5605
  (E) => E.item.data.taskType === "MemorySearch" && E.item.data.eventType === "GeneratingQueries"
5400
5606
  );
5401
5607
  if (f.taskType === "MemorySearch" && f.eventType === "ExploreQueries")
5402
- return !e.slice(c + 1).some(
5608
+ return !e.slice(d + 1).some(
5403
5609
  (E) => E.item.data.taskType === "MemorySearch" && E.item.data.eventType === "ExploreQueries"
5404
5610
  );
5405
5611
  if (f.taskType === "MemoryChat" && f.eventType === "GoogleSearch")
5406
- return !e.slice(c + 1).some(
5612
+ return !e.slice(d + 1).some(
5407
5613
  (E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "GoogleSearch"
5408
5614
  );
5409
5615
  if (f.taskType === "MemoryChat" && f.eventType === "Thinking")
5410
- return !e.slice(c + 1).some(
5616
+ return !e.slice(d + 1).some(
5411
5617
  (E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "Thinking"
5412
5618
  );
5413
5619
  if (f.taskType === "MemoryChat" && f.eventType === "GenerateReportExporting")
5414
- return !e.slice(c + 1).some(
5620
+ return !e.slice(d + 1).some(
5415
5621
  (E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "GenerateReportExporting"
5416
5622
  );
5417
5623
  if (f.taskType === "MemoryChat" && f.eventType === "ScrapeWebsites")
5418
- return !e.slice(c + 1).some(
5624
+ return !e.slice(d + 1).some(
5419
5625
  (E) => E.item.data.taskType === "MemoryChat" && E.item.data.eventType === "ScrapeWebsites"
5420
5626
  );
5421
- if (f.taskType === "ExploreMemories" && (f.eventType === "Thinking" || f.eventType === "ExportingMemories" || f.eventType === "FindSources")) {
5422
- const P = f.eventType;
5423
- return !e.slice(c + 1).some(
5424
- (se) => se.item.data.taskType === "ExploreMemories" && se.item.data.eventType === P
5627
+ if (f.taskType === "ExploreMemories" && (f.eventType === "Classifying" || f.eventType === "Thinking" || f.eventType === "ExportingMemories" || f.eventType === "FindSources")) {
5628
+ const B = f.eventType;
5629
+ return !e.slice(d + 1).some(
5630
+ (se) => se.item.data.taskType === "ExploreMemories" && se.item.data.eventType === B
5425
5631
  );
5426
5632
  }
5427
5633
  return !0;
@@ -5433,7 +5639,7 @@ const wn = ({
5433
5639
  ref: x,
5434
5640
  "data-theme": g,
5435
5641
  children: [
5436
- /* @__PURE__ */ r(Ve, { children: y.map((s, c) => /* @__PURE__ */ r(
5642
+ /* @__PURE__ */ r(Ve, { children: y.map((s, d) => /* @__PURE__ */ r(
5437
5643
  v.div,
5438
5644
  {
5439
5645
  id: `agent-task-progress-item-${s.item.progressItemId}`,
@@ -5441,14 +5647,14 @@ const wn = ({
5441
5647
  animate: { opacity: 1, y: 0 },
5442
5648
  transition: {
5443
5649
  duration: 0.4,
5444
- delay: c * 0.1,
5650
+ delay: d * 0.1,
5445
5651
  ease: "easeOut"
5446
5652
  },
5447
5653
  children: /* @__PURE__ */ r(
5448
- vn,
5654
+ Rn,
5449
5655
  {
5450
5656
  progressItemId: s.item.progressItemId,
5451
- children: b(s)
5657
+ children: T(s)
5452
5658
  }
5453
5659
  )
5454
5660
  },
@@ -5458,12 +5664,12 @@ const wn = ({
5458
5664
  ]
5459
5665
  }
5460
5666
  );
5461
- }, Cn = ({ taskId: e, label: o, copiedLabel: t }) => {
5462
- const { colors: n } = T(), [i, a] = w(!1);
5667
+ }, Fn = ({ taskId: e, label: o, copiedLabel: t }) => {
5668
+ const { colors: n } = S(), [i, a] = C(!1);
5463
5669
  H(() => {
5464
5670
  if (!i) return;
5465
- const d = window.setTimeout(() => a(!1), 1500);
5466
- return () => window.clearTimeout(d);
5671
+ const c = window.setTimeout(() => a(!1), 1500);
5672
+ return () => window.clearTimeout(c);
5467
5673
  }, [i]);
5468
5674
  const l = L(async () => {
5469
5675
  try {
@@ -5492,7 +5698,7 @@ const wn = ({
5492
5698
  children: i ? t : o
5493
5699
  }
5494
5700
  );
5495
- }, An = ({
5701
+ }, Hn = ({
5496
5702
  agentTask: e,
5497
5703
  theme: o = "light",
5498
5704
  language: t,
@@ -5502,7 +5708,7 @@ const wn = ({
5502
5708
  onExploreQueryResultClick: l
5503
5709
  }) => {
5504
5710
  var h;
5505
- const d = nr(e), p = (e.params.type === "MemoryChat" || e.params.type === "MemorySearch") && "language" in e.params ? e.params.language ?? "en" : t ?? "en", u = cr(p), g = (h = e.confirmedData) == null ? void 0 : h.taskId;
5711
+ const c = nr(e), p = (e.params.type === "MemoryChat" || e.params.type === "MemorySearch") && "language" in e.params ? e.params.language ?? "en" : t ?? "en", u = cr(p), g = (h = e.confirmedData) == null ? void 0 : h.taskId;
5506
5712
  return /* @__PURE__ */ r(ar, { theme: o, children: /* @__PURE__ */ m("div", { style: { position: "relative" }, children: [
5507
5713
  g ? /* @__PURE__ */ r(
5508
5714
  "div",
@@ -5514,7 +5720,7 @@ const wn = ({
5514
5720
  zIndex: 1
5515
5721
  },
5516
5722
  children: /* @__PURE__ */ r(
5517
- Cn,
5723
+ Fn,
5518
5724
  {
5519
5725
  taskId: g,
5520
5726
  label: u.copyId,
@@ -5524,9 +5730,9 @@ const wn = ({
5524
5730
  }
5525
5731
  ) : null,
5526
5732
  /* @__PURE__ */ r(
5527
- wn,
5733
+ In,
5528
5734
  {
5529
- progressViewItems: d,
5735
+ progressViewItems: c,
5530
5736
  loading: e.loading,
5531
5737
  error: e.error,
5532
5738
  loadingText: e.loadingText,
@@ -5541,16 +5747,16 @@ const wn = ({
5541
5747
  ] }) });
5542
5748
  };
5543
5749
  export {
5544
- An as AgentTaskProgress,
5750
+ Hn as AgentTaskProgress,
5545
5751
  ar as AgentTaskThemeProvider,
5546
5752
  F as Checkmark,
5547
- Pn as FencyProvider,
5548
- Tn as MemorySearchCompletedResults,
5549
- $n as StreamEventManager,
5753
+ $n as FencyProvider,
5754
+ En as MemorySearchCompletedResults,
5755
+ _n as StreamEventManager,
5550
5756
  _ as XMark,
5551
5757
  ir as darkAgentTaskThemeColors,
5552
- we as getAgentTaskPrismStyle,
5758
+ Ce as getAgentTaskPrismStyle,
5553
5759
  Te as lightAgentTaskThemeColors,
5554
- T as useAgentTaskTheme,
5555
- Ln as useAgentTasks
5760
+ S as useAgentTaskTheme,
5761
+ Nn as useAgentTasks
5556
5762
  };