research-agent-ui 0.1.330 → 0.1.331

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.
@@ -5,9 +5,9 @@ import v, { Suspense as y, createContext as b, forwardRef as x, lazy as S, useCa
5
5
  import { useParams as k, usePathname as A, useRouter as j, useSearchParams as M } from "next/navigation";
6
6
  import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
7
7
  import { AnimatePresence as I, motion as L } from "motion/react";
8
- import { AlertCircle as R, Archive as z, ArrowUp as B, BadgePercent as V, BookMarked as H, BookOpen as ee, Bot as te, Building2 as U, CalendarDays as ne, Check as re, CheckIcon as ie, ChevronDown as ae, ChevronRightIcon as oe, Clipboard as W, Clock as se, Cloud as ce, CloudIcon as le, Copy as ue, Cpu as de, Download as fe, ExternalLink as pe, EyeOff as me, File as he, FileDown as ge, FileSpreadsheet as _e, FileText as ve, FileType as ye, FolderOpen as be, Globe as xe, HelpCircle as Se, Highlighter as Ce, History as we, Info as Te, LayoutGrid as Ee, Link as De, Loader2 as G, Lock as Oe, LogIn as ke, LogOut as Ae, Mail as je, MessageCircle as Me, MessageCircleQuestion as Ne, MessageSquare as Pe, Mic as Fe, Newspaper as Ie, Paperclip as Le, Pencil as Re, Pin as ze, Plus as Be, Search as Ve, Settings as He, Settings2 as Ue, Share2 as We, SlidersHorizontal as Ge, Sparkles as Ke, Square as qe, SquarePen as Je, Star as Ye, Sun as Xe, SwatchBook as Ze, Trash as Qe, Trash2 as $e, Upload as et, Volume2 as tt, X as nt, ZoomIn as rt, ZoomOut as it } from "lucide-react";
9
- import { Toaster as at, toast as K } from "sonner";
10
- import ot from "grab-url";
8
+ import { AlertCircle as R, Archive as z, ArrowUp as B, BadgePercent as V, BookMarked as H, BookOpen as ee, Bot as te, Building2 as U, CalendarDays as ne, Check as re, CheckIcon as ie, ChevronDown as ae, ChevronRightIcon as oe, Clipboard as se, Clock as ce, Cloud as le, CloudIcon as ue, Copy as de, Cpu as fe, Download as pe, ExternalLink as me, EyeOff as he, File as ge, FileDown as _e, FileSpreadsheet as ve, FileText as ye, FileType as be, FolderOpen as xe, Globe as Se, HelpCircle as Ce, Highlighter as we, History as Te, Info as Ee, LayoutGrid as De, Link as Oe, Loader2 as W, Lock as ke, LogIn as Ae, LogOut as je, Mail as Me, MessageCircle as Ne, MessageCircleQuestion as Pe, MessageSquare as Fe, Mic as Ie, Newspaper as Le, Paperclip as Re, Pencil as ze, Pin as Be, Plus as Ve, Search as He, Settings as Ue, Settings2 as We, Share2 as Ge, SlidersHorizontal as Ke, Sparkles as qe, Square as Je, SquarePen as Ye, Star as Xe, Sun as Ze, SwatchBook as Qe, Trash as $e, Trash2 as et, Upload as tt, Volume2 as nt, X as rt, ZoomIn as it, ZoomOut as at } from "lucide-react";
9
+ import { Toaster as ot, toast as G } from "sonner";
10
+ import K from "grab-url";
11
11
  import { agentChat as st, autocomplete as ct, createDocument as lt, deleteAllChats as ut, deleteChatById as dt, deleteUploadedFile as ft, getChatById as pt, getGoogleDriveFile as mt, getGoogleToken as ht, googleDocsAuth as gt, googleDocsAuthStatus as _t, listChats as vt, listProviders as yt, saveMessage as bt, searchChats as xt, shareChat as St, uploadFiles as Ct } from "qwksearch-api-client";
12
12
  import { LiveTranscriber as wt } from "use-voice-control/client";
13
13
  import { SpokenPhraseOverlay as Tt } from "use-voice-control/react";
@@ -152,7 +152,7 @@ function qt({ open: e, suggestions: t, domains: n, placement: r, highlightedInde
152
152
  className: Kt,
153
153
  children: r + 1
154
154
  }),
155
- /* @__PURE__ */ P(Ve, { className: "w-4 h-4 text-text-400 shrink-0" }),
155
+ /* @__PURE__ */ P(He, { className: "w-4 h-4 text-text-400 shrink-0" }),
156
156
  /* @__PURE__ */ P("span", {
157
157
  className: "truncate",
158
158
  children: e
@@ -295,12 +295,12 @@ function $t(e) {
295
295
  }
296
296
  // src/components/MessageComposer/MessageInputIconSet.tsx
297
297
  var J = {
298
- Plus: Be,
299
- Paperclip: Le,
300
- Cloud: ce,
301
- Upload: et,
302
- File: he,
303
- SquarePen: Je,
298
+ Plus: Ve,
299
+ Paperclip: Re,
300
+ Cloud: le,
301
+ Upload: tt,
302
+ File: ge,
303
+ SquarePen: Ye,
304
304
  Thinking: (e) => /* @__PURE__ */ P("svg", {
305
305
  width: "20",
306
306
  height: "20",
@@ -312,13 +312,13 @@ var J = {
312
312
  }),
313
313
  SelectArrow: ae,
314
314
  ArrowUp: B,
315
- X: nt,
316
- FileText: ve,
317
- Loader2: G,
315
+ X: rt,
316
+ FileText: ye,
317
+ Loader2: W,
318
318
  Check: re,
319
319
  Archive: z,
320
- Mic: Fe,
321
- Stop: qe,
320
+ Mic: Ie,
321
+ Stop: Je,
322
322
  Clock: (e) => /* @__PURE__ */ P("svg", {
323
323
  xmlns: "http://www.w3.org/2000/svg",
324
324
  width: "20",
@@ -423,7 +423,7 @@ var J = {
423
423
  ]
424
424
  }), rn = async (e, t, n) => {
425
425
  try {
426
- let n = localStorage.getItem("chatModelKey"), r = localStorage.getItem("chatModelProviderId"), i = (await ot("agent/providers"))?.providers || [];
426
+ let n = localStorage.getItem("chatModelKey"), r = localStorage.getItem("chatModelProviderId"), i = (await K("agent/providers"))?.providers || [];
427
427
  if (!i || i.length === 0) {
428
428
  t(!0);
429
429
  return;
@@ -444,7 +444,7 @@ var J = {
444
444
  providerId: r
445
445
  }), t(!0);
446
446
  } catch (e) {
447
- console.error("An error occurred while checking the configuration:", e), K.error(`Could not load AI providers: ${e?.message ?? String(e)}`), t(!0);
447
+ console.error("An error occurred while checking the configuration:", e), G.error(`Could not load AI providers: ${e?.message ?? String(e)}`), t(!0);
448
448
  }
449
449
  }, an = "qwksearch_guest_chats", on = typeof window < "u";
450
450
  function Y() {
@@ -589,7 +589,7 @@ var fn = async (e, t, n, r, i, a, o, s, c) => {
589
589
  }, mn = async (e) => {
590
590
  let t = localStorage.getItem("chatModelKey"), n = localStorage.getItem("chatModelProviderId"), r = parseInt(localStorage.getItem("maxFollowupQuestions") || "4"), i = localStorage.getItem("followUpQuestionsPrompt")?.trim() || void 0, a = e.filter((e) => e.role === "user" || e.role === "assistant");
591
591
  try {
592
- let e = await ot("agent/suggestions", {
592
+ let e = await K("agent/suggestions", {
593
593
  method: "POST",
594
594
  body: JSON.stringify({
595
595
  chatHistory: a,
@@ -639,7 +639,7 @@ async function bn(e, n) {
639
639
  typeof t == "string" && (t.includes("no longer available") || t.includes("deprecated") || t.includes("410")) && (localStorage.removeItem("chatModelKey"), localStorage.removeItem("chatModelProviderId"), C?.({
640
640
  key: "",
641
641
  providerId: ""
642
- })), K.error(t), B(t), y(!1);
642
+ })), G.error(t), B(t), y(!1);
643
643
  } else {
644
644
  if (e.type === "searching") {
645
645
  let t = e.data;
@@ -685,7 +685,7 @@ async function bn(e, n) {
685
685
  createdAt: /* @__PURE__ */ new Date()
686
686
  }]), N.length > 0 && (b(!0), N.slice(0, hn).forEach((e) => {
687
687
  let t = e?.metadata?.url;
688
- t && t !== "File" && ot(`doc/article?url=${encodeURIComponent(t)}`).catch(() => {});
688
+ t && t !== "File" && K(`doc/article?url=${encodeURIComponent(t)}`).catch(() => {});
689
689
  }))), e.type === "message" && (A += e.data, F ? (I += e.data, L ||= e.messageId, j = !0) : j ? x((t) => t.map((t) => t.messageId === e.messageId && t.role === "assistant" ? {
690
690
  ...t,
691
691
  content: t.content + e.data
@@ -765,7 +765,7 @@ async function bn(e, n) {
765
765
  sseMaxRetryAttempts: 1,
766
766
  onSseError: (e) => {
767
767
  let t = e instanceof Error ? e.message : String(e);
768
- t.includes("401") && g ? (K.error("Your session has expired. Please sign in again."), y(!1), window.location.href = "/") : (K.error("Failed to send message. Please try again."), B(`${t}. Please try again.`), y(!1));
768
+ t.includes("401") && g ? (G.error("Your session has expired. Please sign in again."), y(!1), window.location.href = "/") : (G.error("Failed to send message. Please try again."), B(`${t}. Please try again.`), y(!1));
769
769
  }
770
770
  });
771
771
  for await (let t of e) await V(t);
@@ -846,7 +846,7 @@ var Sn = async (e, t) => {
846
846
  }));
847
847
  if (i.length === 0) return "";
848
848
  try {
849
- let t = await ot("agent/chat-title", {
849
+ let t = await K("agent/chat-title", {
850
850
  method: "POST",
851
851
  body: JSON.stringify({
852
852
  chatId: e,
@@ -989,7 +989,7 @@ function Cn({ children: e }) {
989
989
  let { error: t } = await ft({ query: { fileId: e } });
990
990
  if (t) throw Error(t.message ?? "Delete failed");
991
991
  } catch (e) {
992
- console.error("[ChatProvider] Failed to delete uploaded file:", e), K.error("Removed from the chat, but the file could not be deleted from storage.");
992
+ console.error("[ChatProvider] Failed to delete uploaded file:", e), G.error("Removed from the chat, but the file could not be deleted from storage.");
993
993
  }
994
994
  }, [l.files, l.fileIds]), S = C(() => {
995
995
  m.current &&= (m.current.abort(), null);
@@ -1064,19 +1064,19 @@ function Tn(e, t, n = {}) {
1064
1064
  o(""), c(e), u((e) => e + 1), m.current.onTranscript(e);
1065
1065
  },
1066
1066
  onError: () => {
1067
- K.error("Speech recognition stopped unexpectedly.");
1067
+ G.error("Speech recognition stopped unexpectedly.");
1068
1068
  }
1069
1069
  }), [n.language]), g = C(() => {
1070
1070
  let e = d.current;
1071
1071
  e && e.state !== "inactive" ? e.stop() : (f.current?.getTracks().forEach((e) => e.stop()), f.current = null, d.current = null);
1072
1072
  }, []), _ = async (e) => {
1073
1073
  let t = new FormData();
1074
- return t.append("file", e, "speech-input.webm"), t.append("languageCode", "en"), ((await ot("agent/transcript", {
1074
+ return t.append("file", e, "speech-input.webm"), t.append("languageCode", "en"), ((await K("agent/transcript", {
1075
1075
  method: "POST",
1076
1076
  body: t
1077
1077
  }))?.text ?? "").trim();
1078
1078
  }, v = C(async () => {
1079
- if (typeof navigator > "u" || !navigator.mediaDevices?.getUserMedia || typeof MediaRecorder > "u") K.error("Speech input is not supported in this browser", { duration: 5e3 }), i(!1), m.current.onEnd();
1079
+ if (typeof navigator > "u" || !navigator.mediaDevices?.getUserMedia || typeof MediaRecorder > "u") G.error("Speech input is not supported in this browser", { duration: 5e3 }), i(!1), m.current.onEnd();
1080
1080
  else try {
1081
1081
  let e = await navigator.mediaDevices.getUserMedia({ audio: !0 }), t = new MediaRecorder(e);
1082
1082
  p.current = [], f.current = e, d.current = t, t.ondataavailable = (e) => {
@@ -1088,15 +1088,15 @@ function Tn(e, t, n = {}) {
1088
1088
  let e = new Blob(p.current, { type: "audio/webm" });
1089
1089
  if (p.current = [], f.current?.getTracks().forEach((e) => e.stop()), f.current = null, d.current = null, i(!1), e.size === 0) return;
1090
1090
  let t = await _(e);
1091
- t ? (c(t), u((e) => e + 1), m.current.onTranscript(t)) : K.error("No speech detected. Please try again.");
1091
+ t ? (c(t), u((e) => e + 1), m.current.onTranscript(t)) : G.error("No speech detected. Please try again.");
1092
1092
  } catch {
1093
- K.error("Unable to transcribe audio.");
1093
+ G.error("Unable to transcribe audio.");
1094
1094
  } finally {
1095
1095
  m.current.onEnd();
1096
1096
  }
1097
1097
  }, t.start();
1098
1098
  } catch {
1099
- K.error("Microphone access is required for speech input."), i(!1), m.current.onEnd();
1099
+ G.error("Microphone access is required for speech input."), i(!1), m.current.onEnd();
1100
1100
  }
1101
1101
  }, []), y = C(async () => {
1102
1102
  h.isListening() ? (await h.stop(), o(""), m.current.onEnd()) : d.current ? g() : wn() ? await h.start() : await v();
@@ -1177,9 +1177,9 @@ var Fn = [
1177
1177
  function Vn({ setMessage: e, contextFiles: t, contextFileIds: n, setContextFiles: r, setContextFileIds: i }) {
1178
1178
  let [a, o] = O([]), [s, c] = O([]), [l, u] = O(!1), [d, f] = O(!1), p = C(async (e) => {
1179
1179
  let a = Array.from(e);
1180
- a.length > Rn && (K.error(`You can attach up to ${Rn} files at a time.`), a = a.slice(0, Rn));
1180
+ a.length > Rn && (G.error(`You can attach up to ${Rn} files at a time.`), a = a.slice(0, Rn));
1181
1181
  let s = a.filter((e) => e.size > zn);
1182
- if (s.length > 0 && (K.error(`${s.map((e) => e.name).join(", ")} exceed${s.length === 1 ? "s" : ""} the 50 MB per-file limit.`), a = a.filter((e) => e.size <= zn)), a.length === 0) return;
1182
+ if (s.length > 0 && (G.error(`${s.map((e) => e.name).join(", ")} exceed${s.length === 1 ? "s" : ""} the 50 MB per-file limit.`), a = a.filter((e) => e.size <= zn)), a.length === 0) return;
1183
1183
  let c = a.map((e) => {
1184
1184
  let t = e.type.startsWith("image/") || /\.(jpg|jpeg|png|gif|webp|svg)$/i.test(e.name), n = e.name.split(".").pop()?.toLowerCase() ?? "", r = Ln.includes(n);
1185
1185
  return {
@@ -1208,7 +1208,7 @@ function Vn({ setMessage: e, contextFiles: t, contextFileIds: n, setContextFiles
1208
1208
  uploadStatus: "complete"
1209
1209
  } : e)), r([...t, ...e.files]), i([...n, ...e.files.map((e) => e.fileId)]);
1210
1210
  } catch (e) {
1211
- K.error(Bn(e, "Failed to upload files.")), o((e) => e.map((e) => l.some((t) => t.id === e.id) ? {
1211
+ G.error(Bn(e, "Failed to upload files.")), o((e) => e.map((e) => l.some((t) => t.id === e.id) ? {
1212
1212
  ...e,
1213
1213
  uploadStatus: "error"
1214
1214
  } : e));
@@ -1230,7 +1230,7 @@ function Vn({ setMessage: e, contextFiles: t, contextFileIds: n, setContextFiles
1230
1230
  handleFiles: p,
1231
1231
  extractUrl: C(async (e) => {
1232
1232
  let a = e.trim();
1233
- if (!/^https?:\/\//i.test(a)) return K.error("Enter a valid http(s) URL."), !1;
1233
+ if (!/^https?:\/\//i.test(a)) return G.error("Enter a valid http(s) URL."), !1;
1234
1234
  f(!0);
1235
1235
  try {
1236
1236
  let e = await (await fetch("/api/doc/uploads", {
@@ -1239,9 +1239,9 @@ function Vn({ setMessage: e, contextFiles: t, contextFileIds: n, setContextFiles
1239
1239
  body: JSON.stringify({ url: a })
1240
1240
  })).json();
1241
1241
  if (!e?.files || e.files.length === 0) throw Error(Bn(e, `Could not extract content from ${a}`));
1242
- return r([...t, ...e.files]), i([...n, ...e.files.map((e) => e.fileId)]), K.success(`Added "${e.files[0].fileName}" as context.`), !0;
1242
+ return r([...t, ...e.files]), i([...n, ...e.files.map((e) => e.fileId)]), G.success(`Added "${e.files[0].fileName}" as context.`), !0;
1243
1243
  } catch (e) {
1244
- return K.error(Bn(e, "Failed to extract URL.")), !1;
1244
+ return G.error(Bn(e, "Failed to extract URL.")), !1;
1245
1245
  } finally {
1246
1246
  f(!1);
1247
1247
  }
@@ -2128,7 +2128,7 @@ var lr = [
2128
2128
  return /* @__PURE__ */ F(qn, { children: [/* @__PURE__ */ F(Jn, {
2129
2129
  className: "gap-2",
2130
2130
  children: [
2131
- /* @__PURE__ */ P(de, { className: "w-4 h-4 flex-shrink-0 text-sky-500" }),
2131
+ /* @__PURE__ */ P(fe, { className: "w-4 h-4 flex-shrink-0 text-sky-500" }),
2132
2132
  /* @__PURE__ */ P("span", { children: "Model" }),
2133
2133
  /* @__PURE__ */ P("span", {
2134
2134
  className: "ml-auto text-xs text-muted-foreground truncate max-w-[55px]",
@@ -2140,7 +2140,7 @@ var lr = [
2140
2140
  children: [
2141
2141
  i ? /* @__PURE__ */ P("div", {
2142
2142
  className: "flex items-center justify-center py-4",
2143
- children: /* @__PURE__ */ P(G, { className: "h-4 w-4 animate-spin text-muted-foreground" })
2143
+ children: /* @__PURE__ */ P(W, { className: "h-4 w-4 animate-spin text-muted-foreground" })
2144
2144
  }) : n.length === 0 ? /* @__PURE__ */ P("div", {
2145
2145
  className: "px-3 py-2 text-xs text-muted-foreground",
2146
2146
  children: "No models configured"
@@ -2153,7 +2153,7 @@ var lr = [
2153
2153
  onSelect: () => c(t.id, n.key),
2154
2154
  className: h("gap-2", e?.providerId === t.id && e?.key === n.key && "bg-secondary"),
2155
2155
  children: [
2156
- /* @__PURE__ */ P(de, { className: h("h-3.5 w-3.5 flex-shrink-0", e?.providerId === t.id && e?.key === n.key ? "text-sky-500" : "text-muted-foreground") }),
2156
+ /* @__PURE__ */ P(fe, { className: h("h-3.5 w-3.5 flex-shrink-0", e?.providerId === t.id && e?.key === n.key ? "text-sky-500" : "text-muted-foreground") }),
2157
2157
  /* @__PURE__ */ P("span", {
2158
2158
  className: "truncate",
2159
2159
  children: n.name
@@ -2178,7 +2178,7 @@ var lr = [
2178
2178
  /* @__PURE__ */ F(X, {
2179
2179
  onSelect: () => o.push("/settings?section=models"),
2180
2180
  className: "gap-2",
2181
- children: [/* @__PURE__ */ P(Be, { className: "h-3.5 w-3.5 text-sky-500 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Add model" })]
2181
+ children: [/* @__PURE__ */ P(Ve, { className: "h-3.5 w-3.5 text-sky-500 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Add model" })]
2182
2182
  })
2183
2183
  ]
2184
2184
  })] });
@@ -2249,7 +2249,7 @@ function hr(e) {
2249
2249
  // src/components/ChatHistoryDropdown/HistorySubmenu.tsx
2250
2250
  var gr = 10, _r = () => {
2251
2251
  let e = j(), { incognito: n, setIncognito: r } = u(), { recentChats: i, loading: a, load: o } = mr(gr), s = (e) => {
2252
- r(e), K.success(e ? "Private mode on — messages won't be saved" : "Private mode off");
2252
+ r(e), G.success(e ? "Private mode on — messages won't be saved" : "Private mode off");
2253
2253
  }, c = (n) => {
2254
2254
  t.onOpenChat?.(n) || e.push(`/c/${n}`);
2255
2255
  };
@@ -2259,7 +2259,7 @@ var gr = 10, _r = () => {
2259
2259
  },
2260
2260
  children: [/* @__PURE__ */ F(Jn, {
2261
2261
  className: "gap-2",
2262
- children: [/* @__PURE__ */ P(we, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }), /* @__PURE__ */ P("span", { children: "History" })]
2262
+ children: [/* @__PURE__ */ P(Te, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }), /* @__PURE__ */ P("span", { children: "History" })]
2263
2263
  }), /* @__PURE__ */ F(Yn, {
2264
2264
  className: "w-64 max-h-[70vh] overflow-y-auto",
2265
2265
  children: [
@@ -2268,13 +2268,13 @@ var gr = 10, _r = () => {
2268
2268
  onCheckedChange: s,
2269
2269
  onSelect: (e) => e.preventDefault(),
2270
2270
  className: "gap-2",
2271
- children: [/* @__PURE__ */ P(me, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }), /* @__PURE__ */ P("span", { children: "Private" })]
2271
+ children: [/* @__PURE__ */ P(he, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }), /* @__PURE__ */ P("span", { children: "Private" })]
2272
2272
  }),
2273
2273
  /* @__PURE__ */ P(Z, {}),
2274
2274
  a ? /* @__PURE__ */ F(X, {
2275
2275
  disabled: !0,
2276
2276
  className: "gap-2",
2277
- children: [/* @__PURE__ */ P(G, { className: "w-3.5 h-3.5 animate-spin flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Loading…" })]
2277
+ children: [/* @__PURE__ */ P(W, { className: "w-3.5 h-3.5 animate-spin flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Loading…" })]
2278
2278
  }) : i.length === 0 ? /* @__PURE__ */ P(X, {
2279
2279
  disabled: !0,
2280
2280
  children: /* @__PURE__ */ P("span", {
@@ -2300,7 +2300,7 @@ var gr = 10, _r = () => {
2300
2300
  /* @__PURE__ */ F(X, {
2301
2301
  onSelect: () => e.push("/library"),
2302
2302
  className: "gap-2",
2303
- children: [/* @__PURE__ */ P(we, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }), /* @__PURE__ */ P("span", { children: "All history" })]
2303
+ children: [/* @__PURE__ */ P(Te, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }), /* @__PURE__ */ P("span", { children: "All history" })]
2304
2304
  })
2305
2305
  ]
2306
2306
  })]
@@ -2619,7 +2619,7 @@ var kr = [
2619
2619
  className: "inline-flex items-center justify-center relative shrink-0 transition-colors duration-200 h-8 w-8 rounded-lg active:scale-95 text-text-400 hover:text-text-200 hover:bg-bg-200 disabled:opacity-50 disabled:cursor-not-allowed group-active:scale-95",
2620
2620
  type: "button",
2621
2621
  "aria-label": "Search options",
2622
- children: /* @__PURE__ */ P(Ge, { className: "w-5 h-5" })
2622
+ children: /* @__PURE__ */ P(Ke, { className: "w-5 h-5" })
2623
2623
  })
2624
2624
  }), /* @__PURE__ */ F(Wn, {
2625
2625
  align: "start",
@@ -2653,7 +2653,7 @@ var kr = [
2653
2653
  /* @__PURE__ */ F(qn, { children: [/* @__PURE__ */ F(Jn, {
2654
2654
  className: "gap-2",
2655
2655
  children: [
2656
- /* @__PURE__ */ P(se, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }),
2656
+ /* @__PURE__ */ P(ce, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }),
2657
2657
  /* @__PURE__ */ P("span", { children: "Speed" }),
2658
2658
  /* @__PURE__ */ P("span", {
2659
2659
  className: "ml-auto text-xs text-muted-foreground",
@@ -2684,20 +2684,20 @@ var kr = [
2684
2684
  /* @__PURE__ */ P(Z, {}),
2685
2685
  /* @__PURE__ */ F(qn, { children: [/* @__PURE__ */ F(Jn, {
2686
2686
  className: "gap-2",
2687
- children: [/* @__PURE__ */ P(et, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }), /* @__PURE__ */ P("span", { children: "Upload" })]
2687
+ children: [/* @__PURE__ */ P(tt, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }), /* @__PURE__ */ P("span", { children: "Upload" })]
2688
2688
  }), /* @__PURE__ */ F(Yn, {
2689
2689
  className: "w-44",
2690
2690
  children: [
2691
2691
  /* @__PURE__ */ F(X, {
2692
2692
  onSelect: I,
2693
2693
  className: "gap-2",
2694
- children: [/* @__PURE__ */ P(et, { className: "h-3.5 w-3.5 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Your Device" })]
2694
+ children: [/* @__PURE__ */ P(tt, { className: "h-3.5 w-3.5 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Your Device" })]
2695
2695
  }),
2696
2696
  /* @__PURE__ */ F(X, {
2697
2697
  onSelect: R,
2698
2698
  disabled: S,
2699
2699
  className: "gap-2",
2700
- children: [S ? /* @__PURE__ */ P(G, { className: "h-3.5 w-3.5 animate-spin flex-shrink-0" }) : /* @__PURE__ */ P(be, { className: "h-3.5 w-3.5 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: S ? "Scanning…" : "Local Folder" })]
2700
+ children: [S ? /* @__PURE__ */ P(W, { className: "h-3.5 w-3.5 animate-spin flex-shrink-0" }) : /* @__PURE__ */ P(xe, { className: "h-3.5 w-3.5 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: S ? "Scanning…" : "Local Folder" })]
2701
2701
  }),
2702
2702
  /* @__PURE__ */ P(Z, {}),
2703
2703
  /* @__PURE__ */ P(Kn, {
@@ -2708,38 +2708,38 @@ var kr = [
2708
2708
  onSelect: B,
2709
2709
  disabled: b,
2710
2710
  className: "gap-2",
2711
- children: [b ? /* @__PURE__ */ P(G, { className: "h-3.5 w-3.5 animate-spin flex-shrink-0" }) : /* @__PURE__ */ P(le, { className: "h-3.5 w-3.5 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: b ? "Loading…" : "Google Drive" })]
2711
+ children: [b ? /* @__PURE__ */ P(W, { className: "h-3.5 w-3.5 animate-spin flex-shrink-0" }) : /* @__PURE__ */ P(ue, { className: "h-3.5 w-3.5 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: b ? "Loading…" : "Google Drive" })]
2712
2712
  }) : /* @__PURE__ */ F(X, {
2713
2713
  onSelect: z,
2714
2714
  disabled: _,
2715
2715
  className: "gap-2",
2716
- children: [_ ? /* @__PURE__ */ P(G, { className: "h-3.5 w-3.5 animate-spin flex-shrink-0" }) : /* @__PURE__ */ P(le, { className: "h-3.5 w-3.5 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: _ ? "Connecting…" : "Connect Google Drive" })]
2716
+ children: [_ ? /* @__PURE__ */ P(W, { className: "h-3.5 w-3.5 animate-spin flex-shrink-0" }) : /* @__PURE__ */ P(ue, { className: "h-3.5 w-3.5 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: _ ? "Connecting…" : "Connect Google Drive" })]
2717
2717
  })
2718
2718
  ]
2719
2719
  })] }),
2720
2720
  /* @__PURE__ */ P(Z, {}),
2721
2721
  s.length > 0 && /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ F(qn, { children: [/* @__PURE__ */ F(Jn, {
2722
2722
  className: "gap-2",
2723
- children: [/* @__PURE__ */ P(We, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }), /* @__PURE__ */ P("span", { children: "Share" })]
2723
+ children: [/* @__PURE__ */ P(Ge, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }), /* @__PURE__ */ P("span", { children: "Share" })]
2724
2724
  }), /* @__PURE__ */ F(Yn, {
2725
2725
  className: "w-48",
2726
2726
  children: [
2727
2727
  /* @__PURE__ */ F(X, {
2728
2728
  onSelect: async () => {
2729
- if (!c) K.error("No chat to share");
2730
- else if (!l) K.error("Please sign in to share chats");
2729
+ if (!c) G.error("No chat to share");
2730
+ else if (!l) G.error("Please sign in to share chats");
2731
2731
  else try {
2732
2732
  let { data: e, error: t } = await St({ body: { chatId: c } });
2733
- if (!t && e?.success && e?.data?.shareUrl) await navigator.clipboard.writeText(e.data.shareUrl), K.success("Chat is now public - link copied to clipboard");
2733
+ if (!t && e?.success && e?.data?.shareUrl) await navigator.clipboard.writeText(e.data.shareUrl), G.success("Chat is now public - link copied to clipboard");
2734
2734
  else throw Error(t?.error || "Failed to share chat");
2735
2735
  } catch (e) {
2736
2736
  console.error("Error sharing chat:", e);
2737
2737
  let t = e instanceof Error ? e.message : "Failed to share chat";
2738
- K.error(t);
2738
+ G.error(t);
2739
2739
  }
2740
2740
  },
2741
2741
  className: "gap-2",
2742
- children: [/* @__PURE__ */ P(De, { className: "w-4 h-4 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Copy link" })]
2742
+ children: [/* @__PURE__ */ P(Oe, { className: "w-4 h-4 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Copy link" })]
2743
2743
  }),
2744
2744
  /* @__PURE__ */ F(X, {
2745
2745
  onSelect: async () => {
@@ -2753,9 +2753,9 @@ var kr = [
2753
2753
  source: "chat",
2754
2754
  chatId: window.location.pathname
2755
2755
  }
2756
- } }), K.success("Saved to QwkDocs");
2756
+ } }), G.success("Saved to QwkDocs");
2757
2757
  } catch {
2758
- K.error("Failed to save to QwkDocs");
2758
+ G.error("Failed to save to QwkDocs");
2759
2759
  }
2760
2760
  },
2761
2761
  className: "gap-2",
@@ -2767,28 +2767,28 @@ var kr = [
2767
2767
  wr(s[0]?.userMessage?.content || "Chat", s.map((e) => `<h2>${e.userMessage.content}</h2>${e.assistantMessage?.content || ""}`).join("\n"));
2768
2768
  },
2769
2769
  className: "gap-2",
2770
- children: [/* @__PURE__ */ P(ve, { className: "w-4 h-4 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Export as Markdown" })]
2770
+ children: [/* @__PURE__ */ P(ye, { className: "w-4 h-4 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Export as Markdown" })]
2771
2771
  }),
2772
2772
  /* @__PURE__ */ F(X, {
2773
2773
  onSelect: () => {
2774
2774
  Er(s[0]?.userMessage?.content || "Chat", s.map((e) => `<h2>${e.userMessage.content}</h2>${e.assistantMessage?.content || ""}`).join("\n"));
2775
2775
  },
2776
2776
  className: "gap-2",
2777
- children: [/* @__PURE__ */ P(ye, { className: "w-4 h-4 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Export as PDF" })]
2777
+ children: [/* @__PURE__ */ P(be, { className: "w-4 h-4 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Export as PDF" })]
2778
2778
  }),
2779
2779
  /* @__PURE__ */ F(X, {
2780
2780
  onSelect: () => {
2781
2781
  Tr(s[0]?.userMessage?.content || "Chat", s.map((e) => `<h2>${e.userMessage.content}</h2>${e.assistantMessage?.content || ""}`).join("\n"));
2782
2782
  },
2783
2783
  className: "gap-2",
2784
- children: [/* @__PURE__ */ P(ge, { className: "w-4 h-4 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Export as DOCX" })]
2784
+ children: [/* @__PURE__ */ P(_e, { className: "w-4 h-4 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Export as DOCX" })]
2785
2785
  }),
2786
2786
  /* @__PURE__ */ F(X, {
2787
2787
  onSelect: () => {
2788
2788
  Dr(s[0]?.userMessage?.content || "Chat", s.map((e) => `<h2>${e.userMessage.content}</h2>${e.assistantMessage?.content || ""}`).join("\n"));
2789
2789
  },
2790
2790
  className: "gap-2",
2791
- children: [/* @__PURE__ */ P(_e, { className: "w-4 h-4 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Export to Google Docs" })]
2791
+ children: [/* @__PURE__ */ P(ve, { className: "w-4 h-4 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Export to Google Docs" })]
2792
2792
  })
2793
2793
  ]
2794
2794
  })] }), /* @__PURE__ */ P(Z, {})] }),
@@ -2798,7 +2798,7 @@ var kr = [
2798
2798
  t.onOpenSettings?.() || i.push("/settings");
2799
2799
  },
2800
2800
  className: "gap-2",
2801
- children: [/* @__PURE__ */ P(He, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }), /* @__PURE__ */ P("span", { children: "Settings" })]
2801
+ children: [/* @__PURE__ */ P(Ue, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }), /* @__PURE__ */ P("span", { children: "Settings" })]
2802
2802
  })
2803
2803
  ]
2804
2804
  })] }), /* @__PURE__ */ P("div", {
@@ -2817,7 +2817,7 @@ var kr = [
2817
2817
  onClick: I,
2818
2818
  "aria-label": "Attach files",
2819
2819
  className: "inline-flex items-center justify-center relative shrink-0 transition-colors duration-200 h-7 w-7 rounded-md active:scale-95 text-text-400 hover:text-text-200 hover:bg-bg-200 disabled:opacity-50 disabled:cursor-not-allowed group-active:scale-95",
2820
- children: /* @__PURE__ */ P(Le, { className: "w-[18px] h-[18px]" })
2820
+ children: /* @__PURE__ */ P(Re, { className: "w-[18px] h-[18px]" })
2821
2821
  }), /* @__PURE__ */ P("div", {
2822
2822
  className: "absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 bg-[#1F1E1D] dark:bg-[#EEEEEC] text-[11px] font-medium rounded-[6px] opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap pointer-events-none z-50 shadow-sm tracking-wide",
2823
2823
  children: /* @__PURE__ */ P("span", {
@@ -3097,7 +3097,7 @@ var Pr = async (e, { signal: t, limit: n }) => {
3097
3097
  t || (d.trim() || h.length !== 0 || _.length !== 0) && (n(d), k());
3098
3098
  }, oe = (e) => {
3099
3099
  re(e) || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), ae());
3100
- }, W = !!(d.trim() || h.length > 0 || _.length > 0);
3100
+ }, se = !!(d.trim() || h.length > 0 || _.length > 0);
3101
3101
  return /* @__PURE__ */ F("div", {
3102
3102
  className: "relative w-full max-w-2xl mx-auto transition-all duration-300 font-sans",
3103
3103
  onDragOver: x,
@@ -3243,9 +3243,9 @@ var Pr = async (e, { signal: t, limit: n }) => {
3243
3243
  onClick: (e) => {
3244
3244
  e.stopPropagation(), ae();
3245
3245
  },
3246
- disabled: !W,
3246
+ disabled: !se,
3247
3247
  className: `inline-flex items-center justify-center shrink-0 transition-all duration-200 h-8 w-8 rounded-full active:scale-95
3248
- ${W ? "bg-accent text-bg-0 hover:bg-accent-hover shadow-md" : "bg-bg-300 text-text-400 cursor-default opacity-50"}
3248
+ ${se ? "bg-accent text-bg-0 hover:bg-accent-hover shadow-md" : "bg-bg-300 text-text-400 cursor-default opacity-50"}
3249
3249
  `,
3250
3250
  type: "button",
3251
3251
  "aria-label": "Send message",
@@ -3359,7 +3359,7 @@ function qr() {
3359
3359
  t(e);
3360
3360
  }
3361
3361
  } catch (e) {
3362
- console.error("Failed to fetch chat history:", e), t([]), K.error("Failed to load chat history");
3362
+ console.error("Failed to fetch chat history:", e), t([]), G.error("Failed to load chat history");
3363
3363
  } finally {
3364
3364
  i(!1);
3365
3365
  }
@@ -3378,9 +3378,9 @@ function qr() {
3378
3378
  let { error: e, response: t } = await dt({ path: { id: s } });
3379
3379
  if (e) throw Error(`Failed to delete chat: ${Hr(e, t?.status)}`);
3380
3380
  } else ln(s);
3381
- t((e) => e.filter((e) => e.id !== s)), K.success("Chat deleted");
3381
+ t((e) => e.filter((e) => e.id !== s)), G.success("Chat deleted");
3382
3382
  } catch (e) {
3383
- K.error(e.message || "Failed to delete chat");
3383
+ G.error(e.message || "Failed to delete chat");
3384
3384
  } finally {
3385
3385
  o(!1), c(null), d(!1);
3386
3386
  }
@@ -3394,14 +3394,14 @@ function qr() {
3394
3394
  let { error: e, response: t } = await ut();
3395
3395
  if (e) throw Error(`Failed to clear history: ${Hr(e, t?.status)}`);
3396
3396
  } else un();
3397
- t([]), K.success("All history cleared");
3397
+ t([]), G.success("All history cleared");
3398
3398
  } catch (e) {
3399
- K.error(e.message || "Failed to clear history");
3399
+ G.error(e.message || "Failed to clear history");
3400
3400
  } finally {
3401
3401
  p(!1), h(!1);
3402
3402
  }
3403
3403
  }, B = () => {
3404
- j(!A), K.success(A ? "Private mode off" : "Private mode on — messages won't be saved");
3404
+ j(!A), G.success(A ? "Private mode off" : "Private mode on — messages won't be saved");
3405
3405
  }, V = C(async (e) => {
3406
3406
  if (!e.trim()) x([]), w(!1);
3407
3407
  else {
@@ -3423,7 +3423,7 @@ function qr() {
3423
3423
  })));
3424
3424
  }
3425
3425
  } catch (e) {
3426
- console.error("Failed to search chat history:", e), x([]), K.error("Failed to search chat history");
3426
+ console.error("Failed to search chat history:", e), x([]), G.error("Failed to search chat history");
3427
3427
  } finally {
3428
3428
  w(!1);
3429
3429
  }
@@ -3478,18 +3478,18 @@ function Jr({ incognito: e, onToggleIncognito: t, showClearAll: n, onClearAll: r
3478
3478
  onClick: t,
3479
3479
  className: `flex items-center gap-1 px-2 py-1 text-xs rounded-lg transition-colors duration-200 ${e ? "text-primary bg-primary/10" : "text-muted-foreground hover:text-foreground hover:bg-secondary"}`,
3480
3480
  title: e ? "Private mode on" : "Private mode",
3481
- children: [/* @__PURE__ */ P(Oe, { size: 12 }), /* @__PURE__ */ P("span", { children: "Private" })]
3481
+ children: [/* @__PURE__ */ P(ke, { size: 12 }), /* @__PURE__ */ P("span", { children: "Private" })]
3482
3482
  }), n && /* @__PURE__ */ F("button", {
3483
3483
  onClick: r,
3484
3484
  className: "flex items-center gap-1 px-2 py-1 text-xs text-muted-foreground hover:text-red-500 hover:bg-red-500/10 rounded-lg transition-colors duration-200",
3485
3485
  title: "Clear all history",
3486
- children: [/* @__PURE__ */ P($e, { size: 12 }), /* @__PURE__ */ P("span", { children: "Clear All" })]
3486
+ children: [/* @__PURE__ */ P(et, { size: 12 }), /* @__PURE__ */ P("span", { children: "Clear All" })]
3487
3487
  })]
3488
3488
  })]
3489
3489
  }), /* @__PURE__ */ F("div", {
3490
3490
  className: "relative",
3491
3491
  children: [
3492
- /* @__PURE__ */ P(Ve, {
3492
+ /* @__PURE__ */ P(He, {
3493
3493
  className: "absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground",
3494
3494
  size: 14
3495
3495
  }),
@@ -3503,7 +3503,7 @@ function Jr({ incognito: e, onToggleIncognito: t, showClearAll: n, onClearAll: r
3503
3503
  i && /* @__PURE__ */ P("button", {
3504
3504
  onClick: () => a(""),
3505
3505
  className: "absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",
3506
- children: /* @__PURE__ */ P(nt, { size: 14 })
3506
+ children: /* @__PURE__ */ P(rt, { size: 14 })
3507
3507
  })
3508
3508
  ]
3509
3509
  })]
@@ -3552,7 +3552,7 @@ function Zr({ chat: e, isPinned: n, onTogglePin: r, onDelete: i }) {
3552
3552
  })]
3553
3553
  }), /* @__PURE__ */ F("p", {
3554
3554
  className: "text-xs text-popover-foreground truncate",
3555
- children: [n && /* @__PURE__ */ P(ze, {
3555
+ children: [n && /* @__PURE__ */ P(Be, {
3556
3556
  size: 10,
3557
3557
  className: "inline mr-1 text-primary"
3558
3558
  }), e.title]
@@ -3562,13 +3562,13 @@ function Zr({ chat: e, isPinned: n, onTogglePin: r, onDelete: i }) {
3562
3562
  onClick: (t) => r(t, e.id),
3563
3563
  className: `p-1.5 rounded-lg transition-all duration-200 ${n ? "opacity-100 text-primary hover:bg-primary/10" : "opacity-0 group-hover:opacity-100 text-muted-foreground hover:text-primary hover:bg-primary/10"}`,
3564
3564
  title: n ? "Unpin chat" : "Pin chat",
3565
- children: /* @__PURE__ */ P(ze, { size: 14 })
3565
+ children: /* @__PURE__ */ P(Be, { size: 14 })
3566
3566
  }),
3567
3567
  /* @__PURE__ */ P("button", {
3568
3568
  onClick: (t) => i(t, e.id),
3569
3569
  className: "opacity-0 group-hover:opacity-100 p-1.5 rounded-lg hover:bg-red-500/10 text-muted-foreground hover:text-red-500 transition-all duration-200",
3570
3570
  title: "Delete chat",
3571
- children: /* @__PURE__ */ P(Qe, { size: 14 })
3571
+ children: /* @__PURE__ */ P($e, { size: 14 })
3572
3572
  })
3573
3573
  ]
3574
3574
  });
@@ -3635,8 +3635,8 @@ function $r({ deleteDialogOpen: e, setDeleteDialogOpen: t, chatToDelete: n, setC
3635
3635
  }
3636
3636
  // src/components/ChatHistoryDropdown/HistoryDropdown.tsx
3637
3637
  var ei = {
3638
- Today: /* @__PURE__ */ P(Xe, { size: 12 }),
3639
- Yesterday: /* @__PURE__ */ P(se, { size: 12 }),
3638
+ Today: /* @__PURE__ */ P(Ze, { size: 12 }),
3639
+ Yesterday: /* @__PURE__ */ P(ce, { size: 12 }),
3640
3640
  "This Week": /* @__PURE__ */ P(ne, { size: 12 }),
3641
3641
  Older: /* @__PURE__ */ P(z, { size: 12 })
3642
3642
  };
@@ -3665,7 +3665,7 @@ var ni = ({ showLabel: e = !1 }) => {
3665
3665
  let t = qr();
3666
3666
  return /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ F(_, { children: [/* @__PURE__ */ F(d, {
3667
3667
  className: e ? "inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs text-muted-foreground bg-secondary hover:bg-secondary/80 hover:text-foreground transition-colors duration-150" : "p-2 text-muted-foreground rounded-2xl bg-background/60 backdrop-blur-md hover:bg-secondary/80 transition duration-200 hover:text-foreground border border-border/30",
3668
- children: [/* @__PURE__ */ P(we, { size: e ? 14 : 18 }), e && /* @__PURE__ */ P("span", { children: "History" })]
3668
+ children: [/* @__PURE__ */ P(Te, { size: e ? 14 : 18 }), e && /* @__PURE__ */ P("span", { children: "History" })]
3669
3669
  }), /* @__PURE__ */ F(m, {
3670
3670
  className: "max-w-[420px] p-3",
3671
3671
  children: [
@@ -3772,102 +3772,26 @@ function ii() {
3772
3772
  })]
3773
3773
  });
3774
3774
  }
3775
- var ai = (/* @__PURE__ */ "hyZbH3n.mp4,iOeZcCk.mp4,dUZlxYE.mp4,GpWeP6E.gif,LuKUsLE.png,w7X11Dd.png,MHmVtCr.png,HmnUAee.png,vKP22VU.png,l1lsV39.png,Ku8F2qc.png,KUEXtwm.png,vvKFPmY.png,5p8eaEf.png,VAKuJcG.png,sTMPtQW.png,m0gHbZZ.png,cKu7dWQ.png,ogfefYD.png,ey5vAae.png,twuLrvk.png,ELILiYt.png,9el5qpP.png,Up6xTkk.png,W1XKBo0.png,1Y6xvW0.png,JXOytMz.png,DNiI6pp.png,XDv5s6p.jpeg,eRwiRJ9.jpeg,DRAfJoc.jpeg,ASVRQ1G.jpeg,35svwUT.jpeg,81xLiVI.jpeg,6kod2Em.jpeg,eU0C8zt.jpeg,Bv0PBY8.jpeg,DQNbjIZ.jpeg,2uACPqZ.jpeg,XEKltMF.jpeg,WHgLfBm.jpeg,QFYM0Fw.jpeg,K12HCao.jpeg,oN8rtsE.jpeg,9fGnrns.jpeg,2ONJJeW.jpeg,DO23Va7.jpeg,QaKeoXk.jpeg,QU5oCBR.jpeg,MhlYZmh.jpeg,ylL1ToB.jpeg,AWWsCv8.jpeg,Tk9Tzzj.jpeg".split(",")).map((e) => "https://i.imgur.com/" + e), oi = () => {
3776
- let e = (/* @__PURE__ */ new Date()).getHours(), t = {
3777
- morning: [
3778
- "Good morning",
3779
- "Rise and shine",
3780
- "Top of the morning to you",
3781
- "Have a great day ahead",
3782
- "Wishing you a wonderful morning"
3783
- ],
3784
- afternoon: [
3785
- "Good afternoon",
3786
- "Hope your day is going well",
3787
- "Enjoy your afternoon",
3788
- "Greetings for a pleasant afternoon",
3789
- "Wishing you a productive afternoon"
3790
- ],
3791
- evening: [
3792
- "Good evening",
3793
- "Hope you had a great day",
3794
- "Wishing you a relaxing evening",
3795
- "Pleasant evening to you",
3796
- "Enjoy your evening"
3797
- ],
3798
- night: [
3799
- "Greetings at this late hour",
3800
- "Fancy seeing you up so late",
3801
- "Burning the midnight oil, I see",
3802
- "Hope your late-night work is going well",
3803
- "Wishing you a productive night shift"
3804
- ]
3805
- }, n;
3806
- n = e >= 5 && e < 12 ? "morning" : e >= 12 && e < 17 ? "afternoon" : e >= 17 && e < 22 ? "evening" : "night";
3807
- let r = Math.floor(Math.random() * t[n].length);
3808
- return t[n][r];
3809
- };
3810
- // src/components/ChatConversation/MascotWidget.tsx
3811
- function si({ src: e, onDismiss: t, className: n, style: r }) {
3812
- let [i] = O(oi);
3813
- return /* @__PURE__ */ F("div", {
3814
- className: `relative flex items-center gap-3 overflow-hidden px-3 py-2 ${n ?? ""}`,
3815
- style: r,
3816
- "data-testid": "mascot-widget",
3817
- children: [
3818
- /* @__PURE__ */ P("img", {
3819
- src: e,
3820
- alt: "",
3821
- "aria-hidden": !0,
3822
- decoding: "async",
3823
- loading: "lazy",
3824
- className: "h-16 w-14 shrink-0 object-contain object-bottom"
3825
- }),
3826
- /* @__PURE__ */ F("div", {
3827
- className: "min-w-0 flex-1 pr-6",
3828
- children: [/* @__PURE__ */ F("p", {
3829
- className: "text-sm font-semibold leading-tight",
3830
- children: [i, "!"]
3831
- }), /* @__PURE__ */ P("p", {
3832
- className: "mt-0.5 text-xs leading-snug opacity-75",
3833
- children: "Ask me anything: I search 100+ sites, read the sources and cite every one."
3834
- })]
3835
- }),
3836
- /* @__PURE__ */ P("button", {
3837
- type: "button",
3838
- "aria-label": "Hide mascot widget",
3839
- className: "absolute top-1.5 right-1.5 rounded-full p-1 opacity-60 transition-opacity hover:opacity-100",
3840
- onClick: () => {
3841
- try {
3842
- localStorage.setItem("showMascotWidget", "false");
3843
- } catch {}
3844
- t?.();
3845
- },
3846
- children: /* @__PURE__ */ P(nt, { className: "size-3.5" })
3847
- })
3848
- ]
3849
- });
3850
- }
3851
3775
  // src/components/Footer.tsx
3852
- var ci = {
3776
+ var ai = {
3853
3777
  Bot: te,
3854
3778
  BookOpen: ee,
3855
3779
  Building2: U,
3856
- Download: fe,
3857
- HelpCircle: Se,
3858
- Info: Te,
3859
- Lock: Oe,
3860
- Mail: je,
3861
- MessageCircle: Me,
3862
- Newspaper: Ie,
3863
- Sparkles: Ke
3780
+ Download: pe,
3781
+ HelpCircle: Ce,
3782
+ Info: Ee,
3783
+ Lock: ke,
3784
+ Mail: Me,
3785
+ MessageCircle: Ne,
3786
+ Newspaper: Le,
3787
+ Sparkles: qe
3864
3788
  };
3865
- function li({ name: e }) {
3866
- let t = ci[e];
3789
+ function oi({ name: e }) {
3790
+ let t = ai[e];
3867
3791
  return t ? /* @__PURE__ */ P(t, { size: 14 }) : null;
3868
3792
  }
3869
- var ui = "relative group inline-flex items-center gap-1 px-[3px] sm:px-1.5 py-0.5 rounded-md whitespace-nowrap transition-all duration-300 ease-[cubic-bezier(0.34,1.56,0.64,1)] hover:text-white hover:bg-white/10 hover:-translate-y-0.5 hover:scale-110 hover:drop-shadow-[0_0_8px_rgba(255,255,255,0.8)] active:scale-95 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white/60";
3870
- function di({ listFooterLinks: e = [], optionShowIcons: t = !0, optionBackgroundColor: n = "bg-black/40" }) {
3793
+ var si = "relative group inline-flex items-center gap-1 px-[3px] sm:px-1.5 py-0.5 rounded-md whitespace-nowrap transition-all duration-300 ease-[cubic-bezier(0.34,1.56,0.64,1)] hover:text-white hover:bg-white/10 hover:-translate-y-0.5 hover:scale-110 hover:drop-shadow-[0_0_8px_rgba(255,255,255,0.8)] active:scale-95 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white/60";
3794
+ function ci({ listFooterLinks: e = [], optionShowIcons: t = !0, optionBackgroundColor: n = "bg-black/40" }) {
3871
3795
  return e.length === 0 ? null : /* @__PURE__ */ P("nav", {
3872
3796
  "aria-label": "Footer",
3873
3797
  className: `relative z-20 mx-auto flex w-max flex-nowrap items-center justify-center gap-0 sm:gap-1 max-w-full text-slate-200 ${n} backdrop-blur-sm rounded-full px-1 sm:px-1.5 py-0.5 shadow-lg hover:shadow-xl transition-shadow duration-300`,
@@ -3878,7 +3802,7 @@ function di({ listFooterLinks: e = [], optionShowIcons: t = !0, optionBackground
3878
3802
  } : {}, s = /* @__PURE__ */ F(N, { children: [
3879
3803
  t && r && /* @__PURE__ */ P("span", {
3880
3804
  className: "hidden sm:inline-flex transition-transform duration-300 group-hover:-rotate-12 group-hover:scale-125",
3881
- children: /* @__PURE__ */ P(li, { name: r })
3805
+ children: /* @__PURE__ */ P(oi, { name: r })
3882
3806
  }),
3883
3807
  /* @__PURE__ */ P("span", {
3884
3808
  className: "font-semibold tracking-wide text-[11px] sm:text-xs",
@@ -3890,84 +3814,83 @@ function di({ listFooterLinks: e = [], optionShowIcons: t = !0, optionBackground
3890
3814
  return i ? /* @__PURE__ */ P("button", {
3891
3815
  type: "button",
3892
3816
  onClick: i,
3893
- className: ui,
3817
+ className: si,
3894
3818
  children: s
3895
3819
  }, e) : a ? /* @__PURE__ */ P("a", {
3896
3820
  href: e,
3897
3821
  ...o,
3898
- className: ui,
3822
+ className: si,
3899
3823
  children: s
3900
3824
  }, e) : /* @__PURE__ */ P(Et, {
3901
3825
  href: e,
3902
- className: ui,
3826
+ className: si,
3903
3827
  children: s
3904
3828
  }, e);
3905
3829
  })
3906
3830
  });
3907
3831
  }
3908
3832
  // src/components/ArticleReader/ArticleReaderMount.tsx
3909
- var fi = S(() => import("./ArticleExtractPanel-BzkK_N4J.js"));
3910
- function pi() {
3833
+ var li = S(() => import("./ArticleExtractPanel-BiUxXcIA.js"));
3834
+ function ui() {
3911
3835
  let e = o()?.isOpen ?? !1, [t, n] = O(!1);
3912
3836
  return T(() => {
3913
3837
  e && n(!0);
3914
3838
  }, [e]), !t && !e ? null : /* @__PURE__ */ P(y, {
3915
3839
  fallback: null,
3916
- children: /* @__PURE__ */ P(fi, {})
3840
+ children: /* @__PURE__ */ P(li, {})
3917
3841
  });
3918
3842
  }
3919
- // src/components/ChatConversation/background-cache.ts
3920
- var mi = "qwksearch-background-art-v1", hi = "backgroundArtCache", gi = (e) => typeof e == "string" && ai.includes(e);
3921
- function _i() {
3843
+ var di = (/* @__PURE__ */ "hyZbH3n.mp4,iOeZcCk.mp4,dUZlxYE.mp4,GpWeP6E.gif,LuKUsLE.png,w7X11Dd.png,MHmVtCr.png,HmnUAee.png,vKP22VU.png,l1lsV39.png,Ku8F2qc.png,KUEXtwm.png,vvKFPmY.png,5p8eaEf.png,VAKuJcG.png,sTMPtQW.png,m0gHbZZ.png,cKu7dWQ.png,ogfefYD.png,ey5vAae.png,twuLrvk.png,ELILiYt.png,9el5qpP.png,Up6xTkk.png,W1XKBo0.png,1Y6xvW0.png,JXOytMz.png,DNiI6pp.png,XDv5s6p.jpeg,eRwiRJ9.jpeg,DRAfJoc.jpeg,ASVRQ1G.jpeg,35svwUT.jpeg,81xLiVI.jpeg,6kod2Em.jpeg,eU0C8zt.jpeg,Bv0PBY8.jpeg,DQNbjIZ.jpeg,2uACPqZ.jpeg,XEKltMF.jpeg,WHgLfBm.jpeg,QFYM0Fw.jpeg,K12HCao.jpeg,oN8rtsE.jpeg,9fGnrns.jpeg,2ONJJeW.jpeg,DO23Va7.jpeg,QaKeoXk.jpeg,QU5oCBR.jpeg,MhlYZmh.jpeg,ylL1ToB.jpeg,AWWsCv8.jpeg,Tk9Tzzj.jpeg".split(",")).map((e) => "https://i.imgur.com/" + e), fi = "qwksearch-background-art-v1", pi = "backgroundArtCache", mi = (e) => typeof e == "string" && di.includes(e);
3844
+ function hi() {
3922
3845
  try {
3923
3846
  let e = JSON.parse(localStorage.getItem("backgroundArtCache") || "[]");
3924
- return Array.isArray(e) ? [...new Set(e.filter(gi))] : [];
3847
+ return Array.isArray(e) ? [...new Set(e.filter(mi))] : [];
3925
3848
  } catch {
3926
3849
  return [];
3927
3850
  }
3928
3851
  }
3929
- function vi(e) {
3852
+ function gi(e) {
3930
3853
  try {
3931
- localStorage.setItem(hi, JSON.stringify(e));
3854
+ localStorage.setItem(pi, JSON.stringify(e));
3932
3855
  } catch {}
3933
3856
  }
3934
- function yi(e) {
3935
- let t = _i().filter((t) => t !== e);
3857
+ function _i(e) {
3858
+ let t = hi().filter((t) => t !== e);
3936
3859
  t.push(e);
3937
3860
  let n = t.splice(0, Math.max(0, t.length - 10));
3938
- return vi(t), n;
3861
+ return gi(t), n;
3939
3862
  }
3940
- function bi(e) {
3941
- vi(_i().filter((t) => t !== e));
3863
+ function vi(e) {
3864
+ gi(hi().filter((t) => t !== e));
3942
3865
  }
3943
- var xi = (e) => e.length ? e[Math.floor(Math.random() * e.length)] : null;
3944
- function Si(e) {
3945
- return xi(_i().filter((t) => t !== e));
3866
+ var yi = (e) => e.length ? e[Math.floor(Math.random() * e.length)] : null;
3867
+ function bi(e) {
3868
+ return yi(hi().filter((t) => t !== e));
3946
3869
  }
3947
- function Ci() {
3948
- let e = new Set(_i());
3949
- return xi(ai.filter((t) => !e.has(t)));
3870
+ function xi() {
3871
+ let e = new Set(hi());
3872
+ return yi(di.filter((t) => !e.has(t)));
3950
3873
  }
3951
- async function wi() {
3874
+ async function Si() {
3952
3875
  if (typeof caches > "u") return null;
3953
3876
  try {
3954
- return await caches.open(mi);
3877
+ return await caches.open(fi);
3955
3878
  } catch {
3956
3879
  return null;
3957
3880
  }
3958
3881
  }
3959
- async function Ti(e) {
3960
- let t = await wi();
3882
+ async function Ci(e) {
3883
+ let t = await Si();
3961
3884
  if (!t) return null;
3962
3885
  try {
3963
3886
  let n = await t.match(e);
3964
- return n ? URL.createObjectURL(await n.blob()) : (bi(e), null);
3887
+ return n ? URL.createObjectURL(await n.blob()) : (vi(e), null);
3965
3888
  } catch {
3966
3889
  return null;
3967
3890
  }
3968
3891
  }
3969
- async function Ei(e) {
3970
- let t = await wi();
3892
+ async function wi(e) {
3893
+ let t = await Si();
3971
3894
  if (!t) return e;
3972
3895
  let n;
3973
3896
  try {
@@ -3982,17 +3905,17 @@ async function Ei(e) {
3982
3905
  }
3983
3906
  if (n.size <= 15728640) try {
3984
3907
  await t.put(e, new Response(n, { headers: { "Content-Type": n.type } }));
3985
- let r = yi(e);
3908
+ let r = _i(e);
3986
3909
  await Promise.all(r.map((e) => t.delete(e)));
3987
3910
  } catch {}
3988
3911
  return URL.createObjectURL(n);
3989
3912
  }
3990
3913
  // src/components/ChatConversation/ChatHomepage.tsx
3991
- var Di = S(() => import("use-weather-forecast").then((e) => ({ default: e.WeatherForecast }))), Oi = S(() => import("trending-news-api").then((e) => ({ default: e.TrendingNews }))), ki = S(() => import("education-playlists").then((e) => ({ default: e.EducationPlaylists }))), Ai = S(() => import("./DownloadsDialog-DvS23Dh-.js")), ji = 15;
3992
- function Mi(e) {
3914
+ var Ti = S(() => import("use-weather-forecast").then((e) => ({ default: e.WeatherForecast }))), Ei = S(() => import("trending-news-api").then((e) => ({ default: e.TrendingNews }))), Di = S(() => import("education-playlists").then((e) => ({ default: e.EducationPlaylists }))), Oi = S(() => import("./DownloadsDialog-DvS23Dh-.js")), ki = 15;
3915
+ function Ai(e) {
3993
3916
  return e ? e.split(/[,\n]/).map((e) => e.trim()).filter(Boolean) : [];
3994
3917
  }
3995
- function Ni(e) {
3918
+ function ji(e) {
3996
3919
  return e ? e.split(/\r?\n/).map((e) => e.trim()).filter(Boolean).map((e) => {
3997
3920
  let t = e.split(",").map((e) => e.trim()), n = Number(t[t.length - 2]), r = Number(t[t.length - 1]);
3998
3921
  return t.length >= 2 && t[t.length - 2] !== "" && t[t.length - 1] !== "" && Number.isFinite(n) && Number.isFinite(r) ? {
@@ -4002,20 +3925,20 @@ function Ni(e) {
4002
3925
  } : { label: e };
4003
3926
  }) : [];
4004
3927
  }
4005
- var Pi = (e) => e.endsWith(".webm") || e.endsWith(".mp4"), Fi = (e) => e.startsWith("blob:");
4006
- function Ii({ url: e, src: t }) {
4007
- return Pi(e) ? Promise.resolve(!0) : new Promise((e) => {
3928
+ var Mi = (e) => e.endsWith(".webm") || e.endsWith(".mp4"), Ni = (e) => e.startsWith("blob:");
3929
+ function Pi({ url: e, src: t }) {
3930
+ return Mi(e) ? Promise.resolve(!0) : new Promise((e) => {
4008
3931
  let n = new Image();
4009
3932
  n.decoding = "async", n.onload = () => e(!0), n.onerror = () => e(!1), n.src = t;
4010
3933
  });
4011
3934
  }
4012
- function Li() {
4013
- let { sendMessage: e } = u(), n = o(), r = n ? (e) => n.openPanel(e.url, "", { suggestQuestions: !0 }) : void 0, [i, a] = O(null), [s, c] = O(null), [l, d] = O(!1), [f, p] = O(!1), [m, h] = O(!1), [g, _] = O([]), [v, b] = O(!0), [x, S] = O(5), [C, w] = O(12), [E, D] = O("fahrenheit"), [k, A] = O(null), [j, M] = O(!0), [N, I] = O(null), [L, R] = O(null), [z, B] = O([]), [V, H] = O("trending"), [ee, te] = O(null), [U, ne] = O(!0), [re, ie] = O(!0), [ae, oe] = O(!0), W = t.homepageMascotUrl, [se, ce] = O(!1), [le, ue] = O(!1), [de, fe] = O(!1), pe = t.footerLinks.map((e) => e.url === "/#downloads" ? {
3935
+ function Fi() {
3936
+ let { sendMessage: e } = u(), n = o(), r = n ? (e) => n.openPanel(e.url, "", { suggestQuestions: !0 }) : void 0, [i, a] = O(null), [s, c] = O(null), [l, d] = O(!1), [f, p] = O(!1), [m, h] = O(!1), [g, _] = O([]), [v, b] = O(!0), [x, S] = O(5), [C, w] = O(12), [E, D] = O("fahrenheit"), [k, A] = O(null), [j, M] = O(!0), [N, I] = O(null), [L, R] = O(null), [z, B] = O([]), [V, H] = O("trending"), [ee, te] = O(null), [U, ne] = O(!0), [re, ie] = O(!1), [ae, oe] = O(!1), [se, ce] = O(!1), le = t.footerLinks.map((e) => e.url === "/#downloads" ? {
4014
3937
  ...e,
4015
3938
  onClick: () => {
4016
3939
  h(!0), p(!0);
4017
3940
  }
4018
- } : e), me = k || t.trendingNewsApiUrl, he = ee?.enabled !== !1, ge = ee?.allowUserTopics === !1 ? [] : z, _e = N ?? ee?.maxTopics ?? 6, ve = L ?? ee?.showImages ?? !0, ye = j && he;
3941
+ } : e), ue = k || t.trendingNewsApiUrl, de = ee?.enabled !== !1, fe = ee?.allowUserTopics === !1 ? [] : z, pe = N ?? ee?.maxTopics ?? 6, me = L ?? ee?.showImages ?? !0, he = j && de;
4019
3942
  T(() => {
4020
3943
  let e = t.trendingNewsSettingsUrl;
4021
3944
  if (!e) return;
@@ -4027,11 +3950,11 @@ function Li() {
4027
3950
  };
4028
3951
  }, []), T(() => {
4029
3952
  let e = () => {
4030
- _(Ni(localStorage.getItem("weatherLocations"))), b(localStorage.getItem("showWeatherWidget") !== "false"), S(Number(localStorage.getItem("weatherForecastDays")) || 5), w(Number(localStorage.getItem("weatherForecastHours")) || 12), D(localStorage.getItem("weatherTemperatureUnit") === "celsius" ? "celsius" : "fahrenheit"), A(localStorage.getItem("trendingNewsApiUrl")), M(localStorage.getItem("showTrendingNewsWidget") !== "false");
3953
+ _(ji(localStorage.getItem("weatherLocations"))), b(localStorage.getItem("showWeatherWidget") !== "false"), S(Number(localStorage.getItem("weatherForecastDays")) || 5), w(Number(localStorage.getItem("weatherForecastHours")) || 12), D(localStorage.getItem("weatherTemperatureUnit") === "celsius" ? "celsius" : "fahrenheit"), A(localStorage.getItem("trendingNewsApiUrl")), M(localStorage.getItem("showTrendingNewsWidget") !== "false");
4031
3954
  let e = localStorage.getItem("trendingNewsMaxTopics");
4032
3955
  I(e && Number(e) || null);
4033
3956
  let t = localStorage.getItem("trendingNewsShowImages");
4034
- R(t === null ? null : t !== "false"), B(Mi(localStorage.getItem("trendingNewsCustomTopics"))), H(localStorage.getItem("trendingNewsSource") === "hckrnews" ? "hckrnews" : "trending"), ne(localStorage.getItem("showEducationPlaylistsWidget") !== "false"), ie(localStorage.getItem("showMascotWidget") !== "false"), oe(localStorage.getItem("showBackgroundArt") !== "false"), ue(localStorage.getItem("orbHoverGlow") === "true"), fe(localStorage.getItem("cursorGlowTrail") === "true");
3957
+ R(t === null ? null : t !== "false"), B(Ai(localStorage.getItem("trendingNewsCustomTopics"))), H(localStorage.getItem("trendingNewsSource") === "hckrnews" ? "hckrnews" : "trending"), ne(localStorage.getItem("showEducationPlaylistsWidget") !== "false"), oe(localStorage.getItem("orbHoverGlow") === "true"), ce(localStorage.getItem("cursorGlowTrail") === "true");
4035
3958
  };
4036
3959
  return e(), window.addEventListener("client-config-changed", e), window.addEventListener("storage", e), () => {
4037
3960
  window.removeEventListener("client-config-changed", e), window.removeEventListener("storage", e);
@@ -4039,10 +3962,10 @@ function Li() {
4039
3962
  }, []), T(() => {
4040
3963
  let e, t = () => {
4041
3964
  if (typeof window.requestIdleCallback == "function") {
4042
- let t = window.requestIdleCallback(() => ce(!0), { timeout: 2500 });
3965
+ let t = window.requestIdleCallback(() => ie(!0), { timeout: 2500 });
4043
3966
  e = () => window.cancelIdleCallback(t);
4044
3967
  } else {
4045
- let t = window.setTimeout(() => ce(!0), 800);
3968
+ let t = window.setTimeout(() => ie(!0), 800);
4046
3969
  e = () => window.clearTimeout(t);
4047
3970
  }
4048
3971
  };
@@ -4051,25 +3974,25 @@ function Li() {
4051
3974
  };
4052
3975
  }, []), T(() => {
4053
3976
  if (localStorage.getItem("showBackgroundArt") === "false") return;
4054
- let e = !1, t, n, r, i = null, o = null, s = /* @__PURE__ */ new Set(), l = (e) => (e && Fi(e.src) && s.add(e.src), e), u = (e) => {
4055
- e && Fi(e.src) && (URL.revokeObjectURL(e.src), s.delete(e.src));
4056
- }, f = async (t) => t ? e || !await Ii(t) ? (u(t), null) : t : null, p = async (e) => {
3977
+ let e = !1, t, n, r, i = null, o = null, s = /* @__PURE__ */ new Set(), l = (e) => (e && Ni(e.src) && s.add(e.src), e), u = (e) => {
3978
+ e && Ni(e.src) && (URL.revokeObjectURL(e.src), s.delete(e.src));
3979
+ }, f = async (t) => t ? e || !await Pi(t) ? (u(t), null) : t : null, p = async (e) => {
4057
3980
  if (!e) return null;
4058
- let t = await Ti(e);
3981
+ let t = await Ci(e);
4059
3982
  return f(l(t ? {
4060
3983
  url: e,
4061
3984
  src: t
4062
3985
  } : null));
4063
3986
  }, m = async (e) => {
4064
- let t = _i().length < 10 ? Ci() : null;
3987
+ let t = hi().length < 10 ? xi() : null;
4065
3988
  if (t) {
4066
- let e = await Ei(t), n = await f(l(e ? {
3989
+ let e = await wi(t), n = await f(l(e ? {
4067
3990
  url: t,
4068
3991
  src: e
4069
3992
  } : null));
4070
3993
  if (n) return n;
4071
3994
  }
4072
- return p(Si(e?.url));
3995
+ return p(bi(e?.url));
4073
3996
  }, h = (e) => {
4074
3997
  let t = i;
4075
3998
  i = e, t ? (c(e), d(!0), n = setTimeout(() => {
@@ -4080,7 +4003,7 @@ function Li() {
4080
4003
  g = !0;
4081
4004
  let t = await (o ?? m(i));
4082
4005
  o = null, g = !1, e || (t && h(t), o = m(i));
4083
- }, v = p(Si()).then((t) => {
4006
+ }, v = p(bi()).then((t) => {
4084
4007
  t && !e && h(t);
4085
4008
  }), y = () => {
4086
4009
  v.then(() => {
@@ -4100,7 +4023,7 @@ function Li() {
4100
4023
  for (let e of s) URL.revokeObjectURL(e);
4101
4024
  };
4102
4025
  }, []);
4103
- let be = ({ url: e, src: t }, n) => Pi(e) ? /* @__PURE__ */ P("video", {
4026
+ let ge = ({ url: e, src: t }, n) => Mi(e) ? /* @__PURE__ */ P("video", {
4104
4027
  src: t,
4105
4028
  autoPlay: !0,
4106
4029
  loop: !0,
@@ -4119,17 +4042,9 @@ function Li() {
4119
4042
  /* @__PURE__ */ F("div", {
4120
4043
  className: "absolute inset-0 z-0",
4121
4044
  children: [
4122
- i && be(i, l ? "opacity-0" : "opacity-30"),
4123
- s && be(s, l ? "opacity-30" : "opacity-0"),
4124
- se && ae && W && /* @__PURE__ */ P("img", {
4125
- src: W,
4126
- alt: "",
4127
- "aria-hidden": !0,
4128
- decoding: "async",
4129
- "data-testid": "background-mascot",
4130
- className: "pointer-events-none absolute right-4 bottom-0 hidden h-[60vh] max-h-[560px] w-auto object-contain object-bottom opacity-40 md:block"
4131
- }),
4132
- de && /* @__PURE__ */ P(Ht, {})
4045
+ i && ge(i, l ? "opacity-0" : "opacity-30"),
4046
+ s && ge(s, l ? "opacity-30" : "opacity-0"),
4047
+ se && /* @__PURE__ */ P(Ht, {})
4133
4048
  ]
4134
4049
  }),
4135
4050
  /* @__PURE__ */ P("div", {
@@ -4144,7 +4059,7 @@ function Li() {
4144
4059
  alignItems: "center",
4145
4060
  justifyContent: "center"
4146
4061
  },
4147
- className: le ? void 0 : "pointer-events-none",
4062
+ className: ae ? void 0 : "pointer-events-none",
4148
4063
  children: /* @__PURE__ */ P(kt, {
4149
4064
  autoRandomize: !0,
4150
4065
  onSphereClick: () => console.log("Sphere clicked"),
@@ -4155,23 +4070,12 @@ function Li() {
4155
4070
  children: [
4156
4071
  /* @__PURE__ */ P(ii, {}),
4157
4072
  /* @__PURE__ */ P(Rr, {}),
4158
- se && (re && W || U || v || ye) && /* @__PURE__ */ P(y, {
4073
+ re && (U || v || he) && /* @__PURE__ */ P(y, {
4159
4074
  fallback: null,
4160
4075
  children: /* @__PURE__ */ F("div", {
4161
4076
  className: "flex flex-col gap-2 w-full",
4162
4077
  children: [
4163
- re && W && /* @__PURE__ */ P(si, {
4164
- src: W,
4165
- onDismiss: () => ie(!1),
4166
- className: "rounded-2xl w-full",
4167
- style: {
4168
- background: "rgba(255,255,255,0.08)",
4169
- border: "1px solid rgba(255,255,255,0.15)",
4170
- color: "inherit",
4171
- backdropFilter: "blur(8px)"
4172
- }
4173
- }),
4174
- U && /* @__PURE__ */ P(ki, {
4078
+ U && /* @__PURE__ */ P(Di, {
4175
4079
  compact: !0,
4176
4080
  planEndpoint: t.educationPlaylistsApiUrl || void 0,
4177
4081
  openHref: t.educationPlaylistsPageUrl || void 0,
@@ -4185,16 +4089,16 @@ function Li() {
4185
4089
  maxWidth: "100%"
4186
4090
  }
4187
4091
  }),
4188
- ye && /* @__PURE__ */ P(Oi, {
4092
+ he && /* @__PURE__ */ P(Ei, {
4189
4093
  compact: !0,
4190
4094
  expandable: !0,
4191
- maxTopics: _e,
4192
- expandedMaxTopics: ji,
4193
- showImages: ve,
4194
- apiEndpoint: me,
4195
- topics: ge,
4095
+ maxTopics: pe,
4096
+ expandedMaxTopics: ki,
4097
+ showImages: me,
4098
+ apiEndpoint: ue,
4099
+ topics: fe,
4196
4100
  source: V,
4197
- limit: ji,
4101
+ limit: ki,
4198
4102
  className: "rounded-2xl w-full",
4199
4103
  style: {
4200
4104
  background: "rgba(255,255,255,0.08)",
@@ -4204,7 +4108,7 @@ function Li() {
4204
4108
  maxWidth: "100%"
4205
4109
  }
4206
4110
  }),
4207
- v && /* @__PURE__ */ P(Di, {
4111
+ v && /* @__PURE__ */ P(Ti, {
4208
4112
  compact: !0,
4209
4113
  forecastDays: x,
4210
4114
  forecastHours: C,
@@ -4221,24 +4125,24 @@ function Li() {
4221
4125
  ]
4222
4126
  })
4223
4127
  }),
4224
- /* @__PURE__ */ P(di, { listFooterLinks: pe })
4128
+ /* @__PURE__ */ P(ci, { listFooterLinks: le })
4225
4129
  ]
4226
4130
  })]
4227
4131
  })
4228
4132
  }),
4229
4133
  m && /* @__PURE__ */ P(y, {
4230
4134
  fallback: null,
4231
- children: /* @__PURE__ */ P(Ai, {
4135
+ children: /* @__PURE__ */ P(Oi, {
4232
4136
  open: f,
4233
4137
  onOpenChange: p
4234
4138
  })
4235
4139
  }),
4236
- /* @__PURE__ */ P(pi, {})
4140
+ /* @__PURE__ */ P(ui, {})
4237
4141
  ]
4238
4142
  });
4239
4143
  }
4240
4144
  // src/ui/Loader.tsx
4241
- var Ri = () => /* @__PURE__ */ F("svg", {
4145
+ var Ii = () => /* @__PURE__ */ F("svg", {
4242
4146
  "aria-hidden": "true",
4243
4147
  className: "w-8 h-8 text-border fill-secondary animate-spin",
4244
4148
  viewBox: "0 0 100 101",
@@ -4253,7 +4157,7 @@ var Ri = () => /* @__PURE__ */ F("svg", {
4253
4157
  })]
4254
4158
  });
4255
4159
  // src/components/ConfigError.tsx
4256
- function zi() {
4160
+ function Li() {
4257
4161
  return /* @__PURE__ */ P("div", {
4258
4162
  className: "flex min-h-screen flex-col items-center justify-center p-8",
4259
4163
  children: /* @__PURE__ */ F("div", {
@@ -4370,15 +4274,15 @@ function zi() {
4370
4274
  });
4371
4275
  }
4372
4276
  // src/components/ChatConversation/ChatWindow.tsx
4373
- var Bi = () => import("./ChatConversationThread-CNNOv4XP.js"), Vi = S(Bi), Hi = () => {
4277
+ var Ri = () => import("./ChatConversationThread-BokwudCc.js"), zi = S(Ri), Bi = () => {
4374
4278
  let e = j(), { hasError: t, isReady: r, notFound: i, messages: a } = u(), { isAuthenticated: o } = n(), s = r && !i && a.length === 0;
4375
4279
  return T(() => {
4376
4280
  if (!s) return;
4377
4281
  if (typeof window.requestIdleCallback == "function") {
4378
- let e = window.requestIdleCallback(() => void Bi(), { timeout: 5e3 });
4282
+ let e = window.requestIdleCallback(() => void Ri(), { timeout: 5e3 });
4379
4283
  return () => window.cancelIdleCallback(e);
4380
4284
  }
4381
- let e = window.setTimeout(() => void Bi(), 3e3);
4285
+ let e = window.setTimeout(() => void Ri(), 3e3);
4382
4286
  return () => window.clearTimeout(e);
4383
4287
  }, [s]), T(() => {
4384
4288
  r && i && !o && e.replace("/");
@@ -4387,9 +4291,9 @@ var Bi = () => import("./ChatConversationThread-CNNOv4XP.js"), Vi = S(Bi), Hi =
4387
4291
  i,
4388
4292
  o,
4389
4293
  e
4390
- ]), t ? /* @__PURE__ */ P(zi, {}) : r && i && !o ? /* @__PURE__ */ P("div", {
4294
+ ]), t ? /* @__PURE__ */ P(Li, {}) : r && i && !o ? /* @__PURE__ */ P("div", {
4391
4295
  className: "flex flex-row items-center justify-center min-h-screen",
4392
- children: /* @__PURE__ */ P(Ri, {})
4296
+ children: /* @__PURE__ */ P(Ii, {})
4393
4297
  }) : r ? i ? /* @__PURE__ */ F("div", {
4394
4298
  className: "flex min-h-screen flex-col items-center justify-center gap-3 px-4 text-center",
4395
4299
  children: [/* @__PURE__ */ P("p", {
@@ -4404,15 +4308,15 @@ var Bi = () => import("./ChatConversationThread-CNNOv4XP.js"), Vi = S(Bi), Hi =
4404
4308
  }) : /* @__PURE__ */ P("div", { children: a.length > 0 ? /* @__PURE__ */ P(N, { children: /* @__PURE__ */ P(y, {
4405
4309
  fallback: /* @__PURE__ */ P("div", {
4406
4310
  className: "flex flex-row items-center justify-center min-h-screen",
4407
- children: /* @__PURE__ */ P(Ri, {})
4311
+ children: /* @__PURE__ */ P(Ii, {})
4408
4312
  }),
4409
- children: /* @__PURE__ */ P(Vi, {})
4410
- }) }) : /* @__PURE__ */ P(Li, {}) }) : /* @__PURE__ */ P("div", {
4313
+ children: /* @__PURE__ */ P(zi, {})
4314
+ }) }) : /* @__PURE__ */ P(Fi, {}) }) : /* @__PURE__ */ P("div", {
4411
4315
  className: "flex flex-row items-center justify-center min-h-screen",
4412
- children: /* @__PURE__ */ P(Ri, {})
4316
+ children: /* @__PURE__ */ P(Ii, {})
4413
4317
  });
4414
- }, Ui = "https://qwksearch.com", Wi = null, Gi = Ui, Ki = !1;
4415
- function qi(e, t) {
4318
+ }, Vi = "https://qwksearch.com", Hi = null, Ui = Vi, Wi = !1;
4319
+ function Gi(e, t) {
4416
4320
  let n;
4417
4321
  n = typeof e == "string" ? e : e instanceof URL ? e.href : e.url;
4418
4322
  try {
@@ -4422,32 +4326,32 @@ function qi(e, t) {
4422
4326
  return !1;
4423
4327
  }
4424
4328
  }
4425
- function Ji() {
4426
- if (Ki || typeof window > "u" || typeof window.fetch != "function") return;
4427
- Ki = !0;
4329
+ function Ki() {
4330
+ if (Wi || typeof window > "u" || typeof window.fetch != "function") return;
4331
+ Wi = !0;
4428
4332
  let e = window.fetch.bind(window);
4429
4333
  window.fetch = (t, n) => {
4430
- if (!Wi || !qi(t, Gi)) return e(t, n);
4334
+ if (!Hi || !Gi(t, Ui)) return e(t, n);
4431
4335
  let r = new Headers(n?.headers ?? (t instanceof Request ? t.headers : void 0));
4432
- return !r.has("x-api-key") && !r.has("authorization") && r.set("X-API-Key", Wi), e(t, {
4336
+ return !r.has("x-api-key") && !r.has("authorization") && r.set("X-API-Key", Hi), e(t, {
4433
4337
  ...n,
4434
4338
  headers: r
4435
4339
  });
4436
4340
  };
4437
4341
  }
4438
- function Yi(e, t = Ui) {
4439
- Wi = e || null, Gi = t.replace(/\/+$/, ""), Wi && Ji();
4342
+ function qi(e, t = Vi) {
4343
+ Hi = e || null, Ui = t.replace(/\/+$/, ""), Hi && Ki();
4440
4344
  }
4441
- function Xi() {
4442
- return Wi;
4345
+ function Ji() {
4346
+ return Hi;
4443
4347
  }
4444
- function Zi(e, t) {
4348
+ function Yi(e, t) {
4445
4349
  let n = t ?? (typeof window < "u" ? `${window.location.pathname}${window.location.search}` : "/");
4446
4350
  return `${e}${e.includes("?") ? "&" : "?"}returnTo=${encodeURIComponent(n)}`;
4447
4351
  }
4448
- function Qi(e) {
4352
+ function Xi(e) {
4449
4353
  let t = e.qwksearchOrigin ?? "https://qwksearch.com", n = { connected: !1 }, r = /* @__PURE__ */ new Set(), i = (i) => {
4450
- n = i, Yi(i.connected ? i.apiKey ?? null : null, t), e.onSession?.(i), r.forEach((e) => e());
4354
+ n = i, qi(i.connected ? i.apiKey ?? null : null, t), e.onSession?.(i), r.forEach((e) => e());
4451
4355
  }, a = null, o = () => (a ??= fetch(e.sessionUrl, {
4452
4356
  credentials: "same-origin",
4453
4357
  headers: { Accept: "application/json" }
@@ -4464,7 +4368,7 @@ function Qi(e) {
4464
4368
  },
4465
4369
  oneTap: (e) => {},
4466
4370
  signIn: { social: (t) => {
4467
- typeof window < "u" && window.location.assign(Zi(e.connectUrl));
4371
+ typeof window < "u" && window.location.assign(Yi(e.connectUrl));
4468
4372
  } },
4469
4373
  signOut: async (t) => {
4470
4374
  try {
@@ -4480,14 +4384,14 @@ function Qi(e) {
4480
4384
  };
4481
4385
  }
4482
4386
  // src/components/ArticleReader/ArticlePanelHeader.tsx
4483
- var $i = ({ onClose: e }) => /* @__PURE__ */ P("div", {
4387
+ var Zi = ({ onClose: e }) => /* @__PURE__ */ P("div", {
4484
4388
  className: "flex items-center justify-between bg-secondary px-4 py-3 border-b border-border",
4485
4389
  children: /* @__PURE__ */ P("button", {
4486
4390
  onClick: e,
4487
4391
  className: "rounded-md p-1 hover:bg-accent transition-colors",
4488
- children: /* @__PURE__ */ P(nt, { className: "h-5 w-5" })
4392
+ children: /* @__PURE__ */ P(rt, { className: "h-5 w-5" })
4489
4393
  })
4490
- }), ea = Ot("inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-2xl text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
4394
+ }), Qi = Ot("inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-2xl text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
4491
4395
  variants: {
4492
4396
  variant: {
4493
4397
  default: "bg-primary text-primary-foreground hover:bg-primary/90",
@@ -4512,7 +4416,7 @@ var $i = ({ onClose: e }) => /* @__PURE__ */ P("div", {
4512
4416
  function Q({ className: e, variant: t, size: n, asChild: r = !1, ...i }) {
4513
4417
  return /* @__PURE__ */ P(r ? Dt : "button", {
4514
4418
  "data-slot": "button",
4515
- className: h(ea({
4419
+ className: h(Qi({
4516
4420
  variant: t,
4517
4421
  size: n,
4518
4422
  className: e
@@ -4521,7 +4425,7 @@ function Q({ className: e, variant: t, size: n, asChild: r = !1, ...i }) {
4521
4425
  });
4522
4426
  }
4523
4427
  // src/components/ArticleReader/ArticleActionButtons.tsx
4524
- var ta = {
4428
+ var $i = {
4525
4429
  ask: {
4526
4430
  alt: !0,
4527
4431
  key: "a"
@@ -4562,12 +4466,12 @@ var ta = {
4562
4466
  alt: !1,
4563
4467
  key: "Escape"
4564
4468
  }
4565
- }, na = typeof navigator < "u" && /Mac|iPhone|iPad|iPod/.test(navigator.platform || navigator.userAgent || "");
4566
- function ra(e) {
4567
- let { alt: t, key: n } = ta[e], r = n === "Escape" ? "Esc" : n.length === 1 ? n.toUpperCase() : n;
4568
- return t ? na ? `⌥${r}` : `Alt+${r}` : r;
4469
+ }, ea = typeof navigator < "u" && /Mac|iPhone|iPad|iPod/.test(navigator.platform || navigator.userAgent || "");
4470
+ function ta(e) {
4471
+ let { alt: t, key: n } = $i[e], r = n === "Escape" ? "Esc" : n.length === 1 ? n.toUpperCase() : n;
4472
+ return t ? ea ? `⌥${r}` : `Alt+${r}` : r;
4569
4473
  }
4570
- var ia = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80 hover:text-foreground text-muted-foreground"), $ = ({ label: e, action: t, children: n }) => /* @__PURE__ */ F(l, { children: [/* @__PURE__ */ P(s, {
4474
+ var na = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80 hover:text-foreground text-muted-foreground"), $ = ({ label: e, action: t, children: n }) => /* @__PURE__ */ F(l, { children: [/* @__PURE__ */ P(s, {
4571
4475
  asChild: !0,
4572
4476
  children: n
4573
4477
  }), /* @__PURE__ */ P(a, {
@@ -4576,10 +4480,10 @@ var ia = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4576
4480
  className: "flex items-center gap-1.5",
4577
4481
  children: [/* @__PURE__ */ P("span", { children: e }), t && /* @__PURE__ */ P("kbd", {
4578
4482
  className: "rounded bg-primary-foreground/20 px-1 py-0.5 text-[10px] font-semibold leading-none tracking-wide",
4579
- children: ra(t)
4483
+ children: ta(t)
4580
4484
  })]
4581
4485
  })
4582
- })] }), aa = ({ isLoadingAI: e, isLoadingFollowups: t, isLoadingFavorite: n, isFavorited: r, isHighlightMode: i, articleUrl: a, fontScale: o, onAskClick: s, onSuggestClick: c, onCopyClick: l, onShareClick: u, onFavoriteClick: d, onHighlightToggle: f, onZoomIn: p, onZoomOut: m, onZoomReset: g, onClose: _ }) => {
4486
+ })] }), ra = ({ isLoadingAI: e, isLoadingFollowups: t, isLoadingFavorite: n, isFavorited: r, isHighlightMode: i, articleUrl: a, fontScale: o, onAskClick: s, onSuggestClick: c, onCopyClick: l, onShareClick: u, onFavoriteClick: d, onHighlightToggle: f, onZoomIn: p, onZoomOut: m, onZoomReset: g, onClose: _ }) => {
4583
4487
  let v = p || m, y = Math.round((o ?? 1) * 100);
4584
4488
  return /* @__PURE__ */ F("div", {
4585
4489
  className: "flex flex-nowrap items-center gap-1 rounded-2xl border border-muted bg-gradient-to-b from-background to-muted/30 p-1 shadow-sm",
@@ -4608,7 +4512,7 @@ var ia = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4608
4512
  variant: "ghost",
4609
4513
  size: "sm",
4610
4514
  className: h("flex items-center gap-2 px-3 h-9 rounded-xl transition-all duration-200", "hover:bg-muted/80 hover:text-foreground text-muted-foreground"),
4611
- children: [/* @__PURE__ */ P(Ne, { className: "size-4" }), /* @__PURE__ */ P("span", {
4515
+ children: [/* @__PURE__ */ P(Pe, { className: "size-4" }), /* @__PURE__ */ P("span", {
4612
4516
  className: "font-medium",
4613
4517
  children: "Suggest"
4614
4518
  })]
@@ -4621,8 +4525,8 @@ var ia = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4621
4525
  onClick: l,
4622
4526
  variant: "ghost",
4623
4527
  size: "icon",
4624
- className: ia,
4625
- children: /* @__PURE__ */ P(W, { className: "size-4" })
4528
+ className: na,
4529
+ children: /* @__PURE__ */ P(se, { className: "size-4" })
4626
4530
  })
4627
4531
  }),
4628
4532
  /* @__PURE__ */ P($, {
@@ -4631,8 +4535,8 @@ var ia = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4631
4535
  onClick: u,
4632
4536
  variant: "ghost",
4633
4537
  size: "icon",
4634
- className: ia,
4635
- children: /* @__PURE__ */ P(We, { className: "size-4" })
4538
+ className: na,
4539
+ children: /* @__PURE__ */ P(Ge, { className: "size-4" })
4636
4540
  })
4637
4541
  }),
4638
4542
  /* @__PURE__ */ P($, {
@@ -4643,7 +4547,7 @@ var ia = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4643
4547
  variant: "ghost",
4644
4548
  size: "icon",
4645
4549
  className: h("h-9 w-9 rounded-xl transition-all duration-200", i ? "text-yellow-500 bg-yellow-50 dark:bg-yellow-950/30 hover:bg-yellow-100 dark:hover:bg-yellow-950/50" : "hover:bg-muted/80 hover:text-foreground text-muted-foreground"),
4646
- children: /* @__PURE__ */ P(Ce, { className: "size-4" })
4550
+ children: /* @__PURE__ */ P(we, { className: "size-4" })
4647
4551
  })
4648
4552
  }),
4649
4553
  /* @__PURE__ */ P($, {
@@ -4655,7 +4559,7 @@ var ia = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4655
4559
  variant: "ghost",
4656
4560
  size: "icon",
4657
4561
  className: h("h-9 w-9 rounded-xl transition-all duration-200", r ? "text-yellow-500 hover:text-yellow-600 hover:bg-yellow-50 dark:hover:bg-yellow-950/30" : "hover:bg-muted/80 hover:text-foreground text-muted-foreground"),
4658
- children: /* @__PURE__ */ P(Ye, { className: h("size-4", r && "fill-yellow-400") })
4562
+ children: /* @__PURE__ */ P(Xe, { className: h("size-4", r && "fill-yellow-400") })
4659
4563
  })
4660
4564
  }),
4661
4565
  a && /* @__PURE__ */ P($, {
@@ -4665,12 +4569,12 @@ var ia = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4665
4569
  asChild: !0,
4666
4570
  variant: "ghost",
4667
4571
  size: "icon",
4668
- className: ia,
4572
+ className: na,
4669
4573
  children: /* @__PURE__ */ P("a", {
4670
4574
  href: a,
4671
4575
  target: "_blank",
4672
4576
  rel: "noopener noreferrer",
4673
- children: /* @__PURE__ */ P(pe, { className: "size-4" })
4577
+ children: /* @__PURE__ */ P(me, { className: "size-4" })
4674
4578
  })
4675
4579
  })
4676
4580
  }),
@@ -4685,7 +4589,7 @@ var ia = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4685
4589
  variant: "ghost",
4686
4590
  size: "icon",
4687
4591
  className: "h-8 w-8 rounded-lg text-muted-foreground transition-all duration-200 hover:bg-muted/80 hover:text-foreground",
4688
- children: /* @__PURE__ */ P(it, { className: "size-4" })
4592
+ children: /* @__PURE__ */ P(at, { className: "size-4" })
4689
4593
  })
4690
4594
  }),
4691
4595
  /* @__PURE__ */ P($, {
@@ -4706,7 +4610,7 @@ var ia = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4706
4610
  variant: "ghost",
4707
4611
  size: "icon",
4708
4612
  className: "h-8 w-8 rounded-lg text-muted-foreground transition-all duration-200 hover:bg-muted/80 hover:text-foreground",
4709
- children: /* @__PURE__ */ P(rt, { className: "size-4" })
4613
+ children: /* @__PURE__ */ P(it, { className: "size-4" })
4710
4614
  })
4711
4615
  })
4712
4616
  ]
@@ -4718,13 +4622,13 @@ var ia = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4718
4622
  onClick: _,
4719
4623
  variant: "ghost",
4720
4624
  size: "icon",
4721
- className: h(ia, !v && "ml-auto"),
4722
- children: /* @__PURE__ */ P(nt, { className: "size-4" })
4625
+ className: h(na, !v && "ml-auto"),
4626
+ children: /* @__PURE__ */ P(rt, { className: "size-4" })
4723
4627
  })
4724
4628
  })
4725
4629
  ]
4726
4630
  });
4727
- }, oa = ({ value: e, onChange: t, onSubmit: n }) => /* @__PURE__ */ P("div", {
4631
+ }, ia = ({ value: e, onChange: t, onSubmit: n }) => /* @__PURE__ */ P("div", {
4728
4632
  className: "relative",
4729
4633
  children: /* @__PURE__ */ P("input", {
4730
4634
  value: e,
@@ -4734,7 +4638,7 @@ var ia = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4734
4638
  placeholder: "Ask AI any question...",
4735
4639
  className: "w-full px-3 py-2 text-sm rounded-md border border-input bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-ring"
4736
4640
  })
4737
- }), sa = ({ questions: e, isLoading: n, error: r, onQuestionClick: i }) => {
4641
+ }), aa = ({ questions: e, isLoading: n, error: r, onQuestionClick: i }) => {
4738
4642
  let a = v.useMemo(() => {
4739
4643
  let t = [];
4740
4644
  return e.forEach((e) => {
@@ -4771,7 +4675,7 @@ var ia = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4771
4675
  children: r
4772
4676
  })
4773
4677
  ] });
4774
- }, ca = ({ response: e, isLoading: t, error: n }) => /* @__PURE__ */ F(N, { children: [
4678
+ }, oa = ({ response: e, isLoading: t, error: n }) => /* @__PURE__ */ F(N, { children: [
4775
4679
  t && /* @__PURE__ */ P("div", {
4776
4680
  className: "flex justify-center",
4777
4681
  children: /* @__PURE__ */ P("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500" })
@@ -4785,7 +4689,7 @@ var ia = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4785
4689
  className: "bg-red-500 text-white p-2 rounded-md text-sm",
4786
4690
  children: n
4787
4691
  })
4788
- ] }), la = ({ html: e, isHighlightMode: t = !1, fontScale: n = 1 }) => {
4692
+ ] }), sa = ({ html: e, isHighlightMode: t = !1, fontScale: n = 1 }) => {
4789
4693
  let [r, i] = O("");
4790
4694
  return T(() => {
4791
4695
  i(At.sanitize(e || "", {
@@ -4808,7 +4712,7 @@ var ia = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4808
4712
  },
4809
4713
  dangerouslySetInnerHTML: { __html: r }
4810
4714
  });
4811
- }, ua = ({ article: e, isHighlightMode: t, fontScale: n = 1 }) => /* @__PURE__ */ P("div", {
4715
+ }, ca = ({ article: e, isHighlightMode: t, fontScale: n = 1 }) => /* @__PURE__ */ P("div", {
4812
4716
  className: "border-t border-border pt-6",
4813
4717
  children: /* @__PURE__ */ F("div", { children: [
4814
4718
  /* @__PURE__ */ P("div", { className: "flex items-start justify-between mb-2" }),
@@ -4829,24 +4733,24 @@ var ia = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4829
4733
  }),
4830
4734
  /* @__PURE__ */ P("div", {
4831
4735
  id: "article-content",
4832
- children: /* @__PURE__ */ P(la, {
4736
+ children: /* @__PURE__ */ P(sa, {
4833
4737
  html: e.html || "",
4834
4738
  isHighlightMode: t,
4835
4739
  fontScale: n
4836
4740
  })
4837
4741
  })
4838
4742
  ] })
4839
- }), da = /(?:https?:\/\/)?(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)/g, fa = /[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g;
4840
- function pa(e) {
4743
+ }), la = /(?:https?:\/\/)?(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)/g, ua = /[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g;
4744
+ function da(e) {
4841
4745
  return e.includes("](") || e.includes(")[") ? !1 : /\.(com|org|net|io|dev|co|uk|de|fr|it|es|jp|cn|in|br|au|ca|us|gov|edu|mil|int|xyz|info|app|tech|online|site|website|store|shop|blog|news|tv|me|cc|ws|name|mobi|asia|tel|travel|jobs|pro|museum|coop|aero|arpa|biz|cat|jobs|post|tel|xxx|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw)(?:\/|$)/i.test(e);
4842
4746
  }
4843
- function ma(e) {
4747
+ function fa(e) {
4844
4748
  return /^https?:\/\//i.test(e) ? e : `https://${e}`;
4845
4749
  }
4846
- function ha(e) {
4750
+ function pa(e) {
4847
4751
  if (!e || typeof e != "string") return e;
4848
4752
  let t = e, n = [], r;
4849
- for (fa.lastIndex = 0; (r = fa.exec(t)) !== null;) {
4753
+ for (ua.lastIndex = 0; (r = ua.exec(t)) !== null;) {
4850
4754
  let e = r[0], i = r.index, a = t.substring(0, i), o = t.substring(i + e.length);
4851
4755
  !a.endsWith("](") && !o.startsWith(")") && n.push({
4852
4756
  email: e,
@@ -4858,9 +4762,9 @@ function ha(e) {
4858
4762
  t = t.substring(0, i) + `[${r}](mailto:${r})` + t.substring(i + r.length);
4859
4763
  }
4860
4764
  let i = [], a;
4861
- for (da.lastIndex = 0; (a = da.exec(t)) !== null;) {
4765
+ for (la.lastIndex = 0; (a = la.exec(t)) !== null;) {
4862
4766
  let e = a[0], n = a.index;
4863
- if (fa.test(e)) continue;
4767
+ if (ua.test(e)) continue;
4864
4768
  let r = t.substring(0, n), o = t.substring(n + e.length);
4865
4769
  if (r.endsWith("](") || o.startsWith(")") || (r.match(/```/g) || []).length % 2 != 0) continue;
4866
4770
  let s = r.lastIndexOf("`");
@@ -4868,22 +4772,22 @@ function ha(e) {
4868
4772
  let e = t.substring(s + 1).indexOf("`");
4869
4773
  if (e !== -1 && e > n - s - 1) continue;
4870
4774
  }
4871
- pa(e) && i.push({
4775
+ da(e) && i.push({
4872
4776
  url: e,
4873
4777
  index: n
4874
4778
  });
4875
4779
  }
4876
4780
  for (let e = i.length - 1; e >= 0; e--) {
4877
- let { url: n, index: r } = i[e], a = ma(n);
4781
+ let { url: n, index: r } = i[e], a = fa(n);
4878
4782
  t = t.substring(0, r) + `[${n}](${a})` + t.substring(r + n.length);
4879
4783
  }
4880
4784
  return t;
4881
4785
  }
4882
4786
  // src/components/ArticleReader/unified-markdown.tsx
4883
- function ga(e) {
4787
+ function ma(e) {
4884
4788
  return !e || e.startsWith("http://") || e.startsWith("https://") || e.includes("://") ? !1 : e.startsWith("/") || e.startsWith("#");
4885
4789
  }
4886
- function _a(e, t) {
4790
+ function ha(e, t) {
4887
4791
  if (t.startsWith("#")) {
4888
4792
  e.preventDefault();
4889
4793
  let n = t.substring(1), r = document.getElementById(n);
@@ -4893,7 +4797,7 @@ function _a(e, t) {
4893
4797
  });
4894
4798
  }
4895
4799
  }
4896
- function va({ code: e }) {
4800
+ function ga({ code: e }) {
4897
4801
  let [t, n] = O(!1), r = C(async () => {
4898
4802
  try {
4899
4803
  await navigator.clipboard.writeText(e), n(!0), setTimeout(() => n(!1), 2e3);
@@ -4905,10 +4809,10 @@ function va({ code: e }) {
4905
4809
  onClick: r,
4906
4810
  className: h("absolute top-3 right-3 p-1.5 rounded-md", "opacity-0 group-hover:opacity-100 transition-opacity duration-150", "bg-zinc-200/80 hover:bg-zinc-300 dark:bg-zinc-700/80 dark:hover:bg-zinc-600", "text-zinc-600 hover:text-zinc-800 dark:text-zinc-400 dark:hover:text-zinc-200", "focus:outline-none focus:ring-1 focus:ring-zinc-400 dark:focus:ring-zinc-500"),
4907
4811
  "aria-label": t ? "Copied!" : "Copy code",
4908
- children: t ? /* @__PURE__ */ P(re, { className: "h-4 w-4 text-green-600 dark:text-green-400" }) : /* @__PURE__ */ P(ue, { className: "h-4 w-4" })
4812
+ children: t ? /* @__PURE__ */ P(re, { className: "h-4 w-4 text-green-600 dark:text-green-400" }) : /* @__PURE__ */ P(de, { className: "h-4 w-4" })
4909
4813
  });
4910
4814
  }
4911
- function ya({ children: e }) {
4815
+ function _a({ children: e }) {
4912
4816
  let t = D(null), [n, r] = O("");
4913
4817
  return T(() => {
4914
4818
  if (t.current) {
@@ -4924,15 +4828,15 @@ function ya({ children: e }) {
4924
4828
  ref: t,
4925
4829
  className: h("p-4 rounded-xl overflow-x-auto", "bg-zinc-100 dark:bg-zinc-900", "border border-zinc-200 dark:border-zinc-800", "text-[13px] font-mono leading-relaxed", "text-zinc-800 dark:text-zinc-200", "[&_code]:bg-transparent [&_code]:text-inherit [&_code]:p-0"),
4926
4830
  children: e
4927
- }), n && /* @__PURE__ */ P(va, { code: n })]
4831
+ }), n && /* @__PURE__ */ P(ga, { code: n })]
4928
4832
  });
4929
4833
  }
4930
- var ba = v.memo(({ content: e, className: t, isStreaming: n = !1 }) => {
4834
+ var va = v.memo(({ content: e, className: t, isStreaming: n = !1 }) => {
4931
4835
  if (!e) return /* @__PURE__ */ P("div", {
4932
4836
  className: h("text-muted-foreground text-sm", t),
4933
4837
  children: "No content"
4934
4838
  });
4935
- let r = ha(e);
4839
+ let r = pa(e);
4936
4840
  return /* @__PURE__ */ P("div", {
4937
4841
  className: h("kortix-markdown", t),
4938
4842
  children: /* @__PURE__ */ P(jt, {
@@ -4979,10 +4883,10 @@ var ba = v.memo(({ content: e, className: t, isStreaming: n = !1 }) => {
4979
4883
  children: e
4980
4884
  }),
4981
4885
  a: ({ href: e, children: t }) => {
4982
- let n = ga(e), r = e?.startsWith("#"), i = h("font-medium text-foreground", "underline decoration-foreground/30 underline-offset-[3px] decoration-[1px]", "hover:decoration-foreground/60 transition-colors duration-150");
4886
+ let n = ma(e), r = e?.startsWith("#"), i = h("font-medium text-foreground", "underline decoration-foreground/30 underline-offset-[3px] decoration-[1px]", "hover:decoration-foreground/60 transition-colors duration-150");
4983
4887
  return r ? /* @__PURE__ */ P("a", {
4984
4888
  href: e,
4985
- onClick: (t) => _a(t, e),
4889
+ onClick: (t) => ha(t, e),
4986
4890
  className: i,
4987
4891
  children: t
4988
4892
  }) : n ? /* @__PURE__ */ P(Et, {
@@ -5004,7 +4908,7 @@ var ba = v.memo(({ content: e, className: t, isStreaming: n = !1 }) => {
5004
4908
  className: "px-2 py-1 rounded-md text-[13px] font-mono bg-card dark:bg-[#161618] border border-neutral-200 dark:border-neutral-700/50 text-foreground",
5005
4909
  children: e
5006
4910
  }),
5007
- pre: ({ children: e }) => /* @__PURE__ */ P(ya, { children: e }),
4911
+ pre: ({ children: e }) => /* @__PURE__ */ P(_a, { children: e }),
5008
4912
  blockquote: ({ children: e }) => /* @__PURE__ */ P("blockquote", {
5009
4913
  className: h("my-5 pl-4 py-1 text-sm", "border-l-2 border-border", "text-muted-foreground", "[&>p]:my-2"),
5010
4914
  children: e
@@ -5085,17 +4989,17 @@ var ba = v.memo(({ content: e, className: t, isStreaming: n = !1 }) => {
5085
4989
  })
5086
4990
  });
5087
4991
  });
5088
- ba.displayName = "UnifiedMarkdown";
4992
+ va.displayName = "UnifiedMarkdown";
5089
4993
  // src/app/MainViewProvider.tsx
5090
- var xa = b(null), Sa = "qwksearch-main-view";
5091
- function Ca({ children: e, docsEnabled: t = !0 }) {
4994
+ var ya = b(null), ba = "qwksearch-main-view";
4995
+ function xa({ children: e, docsEnabled: t = !0 }) {
5092
4996
  let [n, r] = O("research"), [i, a] = O(0), o = C((e) => r(t ? e : "research"), [t]);
5093
4997
  T(() => {
5094
4998
  if (typeof window > "u" || !t) return;
5095
- let e = window.localStorage.getItem(Sa);
4999
+ let e = window.localStorage.getItem(ba);
5096
5000
  (e === "research" || e === "docs") && r(e);
5097
5001
  }, [t]), T(() => {
5098
- typeof window < "u" && t && window.localStorage.setItem(Sa, n);
5002
+ typeof window < "u" && t && window.localStorage.setItem(ba, n);
5099
5003
  }, [n, t]);
5100
5004
  let s = E(() => ({
5101
5005
  activeView: n,
@@ -5111,12 +5015,12 @@ function Ca({ children: e, docsEnabled: t = !0 }) {
5111
5015
  t,
5112
5016
  i
5113
5017
  ]);
5114
- return /* @__PURE__ */ P(xa.Provider, {
5018
+ return /* @__PURE__ */ P(ya.Provider, {
5115
5019
  value: s,
5116
5020
  children: e
5117
5021
  });
5118
5022
  }
5119
- var wa = Object.freeze({
5023
+ var Sa = Object.freeze({
5120
5024
  activeView: "research",
5121
5025
  setActiveView: () => {},
5122
5026
  docsEnabled: !1,
@@ -5124,12 +5028,12 @@ var wa = Object.freeze({
5124
5028
  toggleToResearch: () => {},
5125
5029
  filesSidebarRequestId: 0,
5126
5030
  requestFilesSidebar: () => {}
5127
- }), Ta = !1;
5128
- function Ea() {
5129
- return w(xa) || (!Ta && process.env.NODE_ENV !== "production" && (Ta = !0, console.error("useMainView was called outside a MainViewProvider. The component is rendering with view switching disabled — mount it inside MainViewProvider (see QwkSearchProviders).")), wa);
5031
+ }), Ca = !1;
5032
+ function wa() {
5033
+ return w(ya) || (!Ca && process.env.NODE_ENV !== "production" && (Ca = !0, console.error("useMainView was called outside a MainViewProvider. The component is rendering with view switching disabled — mount it inside MainViewProvider (see QwkSearchProviders).")), Sa);
5130
5034
  }
5131
5035
  // src/settings/sections.json
5132
- var Da = [
5036
+ var Ta = [
5133
5037
  {
5134
5038
  key: "account",
5135
5039
  name: "Account",
@@ -5193,24 +5097,24 @@ var Da = [
5193
5097
  icon: "Volume2",
5194
5098
  dataAdd: "voice"
5195
5099
  }
5196
- ], Oa = [
5100
+ ], Ea = [
5197
5101
  {
5198
5102
  key: "webSearch",
5199
5103
  title: "All",
5200
5104
  description: "Searches across all of the internet",
5201
- icon: /* @__PURE__ */ P(xe, { size: 16 })
5105
+ icon: /* @__PURE__ */ P(Se, { size: 16 })
5202
5106
  },
5203
5107
  {
5204
5108
  key: "academicSearch",
5205
5109
  title: "Academic",
5206
5110
  description: "Search in published academic papers",
5207
- icon: /* @__PURE__ */ P(Ze, { size: 16 })
5111
+ icon: /* @__PURE__ */ P(Qe, { size: 16 })
5208
5112
  },
5209
5113
  {
5210
5114
  key: "writingAssistant",
5211
5115
  title: "Writing",
5212
5116
  description: "Chat without searching the web",
5213
- icon: /* @__PURE__ */ P(Re, { size: 16 })
5117
+ icon: /* @__PURE__ */ P(ze, { size: 16 })
5214
5118
  },
5215
5119
  {
5216
5120
  key: "wolframAlphaSearch",
@@ -5230,7 +5134,7 @@ var Da = [
5230
5134
  description: "Search for discussions and opinions",
5231
5135
  icon: /* @__PURE__ */ P(Mt, { className: "h-[16px] w-auto mr-0.5" })
5232
5136
  }
5233
- ], ka = [
5137
+ ], Da = [
5234
5138
  {
5235
5139
  href: "/",
5236
5140
  label: "Research",
@@ -5288,9 +5192,9 @@ var Da = [
5288
5192
  }
5289
5193
  ];
5290
5194
  // src/components/SpotlightPalette/spotlightItems.ts
5291
- function Aa(e) {
5292
- let t = (e) => e === "/" ? Ve : e === "/workspace" ? ve : e === "/settings" ? He : e === "/docs" ? ee : Ee;
5293
- return ka.filter((t) => !t.docsOnly || e.docsEnabled).map((n) => ({
5195
+ function Oa(e) {
5196
+ let t = (e) => e === "/" ? He : e === "/workspace" ? ye : e === "/settings" ? Ue : e === "/docs" ? ee : De;
5197
+ return Da.filter((t) => !t.docsOnly || e.docsEnabled).map((n) => ({
5294
5198
  id: `page:${n.href}`,
5295
5199
  source: "page",
5296
5200
  name: n.label,
@@ -5300,7 +5204,7 @@ function Aa(e) {
5300
5204
  run: () => e.navigate(n.href)
5301
5205
  }));
5302
5206
  }
5303
- function ja(e, t) {
5207
+ function ka(e, t) {
5304
5208
  let n = /* @__PURE__ */ new Date();
5305
5209
  return e.map((e) => ({
5306
5210
  id: `chat:${e.id}`,
@@ -5308,23 +5212,23 @@ function ja(e, t) {
5308
5212
  name: e.title || "Untitled chat",
5309
5213
  meta: `${e.messageCount ?? 0} question${(e.messageCount ?? 0) === 1 ? "" : "s"}`,
5310
5214
  keywords: e.focusMode ?? "",
5311
- icon: Pe,
5215
+ icon: Fe,
5312
5216
  hint: f(n, e.lastMessageAt || e.createdAt),
5313
5217
  run: () => t.openChat(e.id)
5314
5218
  }));
5315
5219
  }
5316
- function Ma(e) {
5317
- return Da.map((t) => ({
5220
+ function Aa(e) {
5221
+ return Ta.map((t) => ({
5318
5222
  id: `setting:${t.key}`,
5319
5223
  source: "setting",
5320
5224
  name: t.name,
5321
5225
  meta: t.description,
5322
5226
  keywords: `settings ${t.key}`,
5323
- icon: Ge,
5227
+ icon: Ke,
5324
5228
  run: () => e.openSettings(t.key)
5325
5229
  }));
5326
5230
  }
5327
- function Na(e) {
5231
+ function ja(e) {
5328
5232
  let t = [
5329
5233
  {
5330
5234
  id: "action:new-chat",
@@ -5332,7 +5236,7 @@ function Na(e) {
5332
5236
  name: "New chat",
5333
5237
  meta: "Start a fresh conversation",
5334
5238
  keywords: "clear reset blank",
5335
- icon: Be,
5239
+ icon: Ve,
5336
5240
  run: e.newChat
5337
5241
  },
5338
5242
  {
@@ -5341,7 +5245,7 @@ function Na(e) {
5341
5245
  name: "Open settings",
5342
5246
  meta: "Models, connectors, search sources and preferences",
5343
5247
  keywords: "preferences configure",
5344
- icon: He,
5248
+ icon: Ue,
5345
5249
  run: () => e.openSettings()
5346
5250
  },
5347
5251
  {
@@ -5350,18 +5254,18 @@ function Na(e) {
5350
5254
  name: e.incognito ? "Turn off incognito" : "Turn on incognito",
5351
5255
  meta: "Stop saving this conversation to history",
5352
5256
  keywords: "private incognito history off",
5353
- icon: me,
5257
+ icon: he,
5354
5258
  hint: e.incognito ? "on" : "off",
5355
5259
  run: () => e.setIncognito(!e.incognito)
5356
5260
  }
5357
5261
  ];
5358
- for (let n of Oa) t.push({
5262
+ for (let n of Ea) t.push({
5359
5263
  id: `action:focus:${n.key}`,
5360
5264
  source: "action",
5361
5265
  name: `Focus: ${n.title}`,
5362
5266
  meta: n.description,
5363
5267
  keywords: `focus mode ${n.key}`,
5364
- icon: xe,
5268
+ icon: Se,
5365
5269
  hint: e.focusMode === n.key ? "current" : void 0,
5366
5270
  run: () => e.setFocusMode(n.key)
5367
5271
  });
@@ -5371,7 +5275,7 @@ function Na(e) {
5371
5275
  name: "Switch to documents",
5372
5276
  meta: "Open the REASON editor view",
5373
5277
  keywords: "reason editor write docs",
5374
- icon: ve,
5278
+ icon: ye,
5375
5279
  run: () => e.setActiveView("docs")
5376
5280
  }, {
5377
5281
  id: "action:view-research",
@@ -5379,7 +5283,7 @@ function Na(e) {
5379
5283
  name: "Switch to research",
5380
5284
  meta: "Back to the search and chat view",
5381
5285
  keywords: "chat search",
5382
- icon: Ve,
5286
+ icon: He,
5383
5287
  run: () => e.setActiveView("research")
5384
5288
  }, {
5385
5289
  id: "action:files-sidebar",
@@ -5387,7 +5291,7 @@ function Na(e) {
5387
5291
  name: "Show files sidebar",
5388
5292
  meta: "Browse REASON documents",
5389
5293
  keywords: "files documents sidebar",
5390
- icon: ve,
5294
+ icon: ye,
5391
5295
  run: () => {
5392
5296
  e.setActiveView("docs"), e.requestFilesSidebar();
5393
5297
  }
@@ -5397,7 +5301,7 @@ function Na(e) {
5397
5301
  name: "Sign out",
5398
5302
  meta: "End this session",
5399
5303
  keywords: "logout log out",
5400
- icon: Ae,
5304
+ icon: je,
5401
5305
  run: e.signOut
5402
5306
  } : {
5403
5307
  id: "action:sign-in",
@@ -5405,24 +5309,24 @@ function Na(e) {
5405
5309
  name: "Sign in",
5406
5310
  meta: "Sync chats and settings across devices",
5407
5311
  keywords: "login log in account",
5408
- icon: ke,
5312
+ icon: Ae,
5409
5313
  run: e.signIn
5410
5314
  }), t;
5411
5315
  }
5412
- function Pa(e, t) {
5316
+ function Ma(e, t) {
5413
5317
  let n = e.trim();
5414
5318
  return n ? {
5415
5319
  id: "search:ask",
5416
5320
  source: "search",
5417
5321
  name: n,
5418
5322
  meta: `Ask ${t.appName} — searches the web and answers with sources`,
5419
- icon: Ke,
5323
+ icon: qe,
5420
5324
  hint: "Enter",
5421
5325
  run: () => t.ask(n)
5422
5326
  } : null;
5423
5327
  }
5424
5328
  // src/components/SpotlightPalette/spotlightMatch.ts
5425
- var Fa = [
5329
+ var Na = [
5426
5330
  {
5427
5331
  prefix: "c",
5428
5332
  source: "chat",
@@ -5449,10 +5353,10 @@ var Fa = [
5449
5353
  label: "web"
5450
5354
  }
5451
5355
  ];
5452
- function Ia(e) {
5356
+ function Pa(e) {
5453
5357
  let t = e.match(/^([a-zA-Z])\s+(.*)$/);
5454
5358
  if (t) {
5455
- let e = t[1].toLowerCase(), n = Fa.find((t) => t.prefix === e);
5359
+ let e = t[1].toLowerCase(), n = Na.find((t) => t.prefix === e);
5456
5360
  if (n) return {
5457
5361
  prefix: n.prefix,
5458
5362
  query: t[2]
@@ -5463,11 +5367,11 @@ function Ia(e) {
5463
5367
  query: e
5464
5368
  };
5465
5369
  }
5466
- var La = 18;
5467
- function Ra(e) {
5370
+ var Fa = 18;
5371
+ function Ia(e) {
5468
5372
  return `${e.meta ?? ""} ${e.keywords ?? ""}`.toLowerCase();
5469
5373
  }
5470
- function za(e, t) {
5374
+ function La(e, t) {
5471
5375
  let n = t.toLowerCase().split(/\s+/).filter(Boolean);
5472
5376
  if (n.length === 0) return e.map((e) => ({
5473
5377
  item: e,
@@ -5479,7 +5383,7 @@ function za(e, t) {
5479
5383
  let e = t.name.toLowerCase();
5480
5384
  if (n.every((t) => e.includes(t))) r.push(t);
5481
5385
  else {
5482
- let r = `${e} ${Ra(t)}`;
5386
+ let r = `${e} ${Ia(t)}`;
5483
5387
  n.every((e) => r.includes(e)) && i.push(t);
5484
5388
  }
5485
5389
  }
@@ -5491,32 +5395,32 @@ function za(e, t) {
5491
5395
  })), ...i.map((e) => ({
5492
5396
  item: e,
5493
5397
  matchedName: !1,
5494
- snippet: Ba(Ra(e), a)
5398
+ snippet: Ra(Ia(e), a)
5495
5399
  }))];
5496
5400
  }
5497
- function Ba(e, t) {
5401
+ function Ra(e, t) {
5498
5402
  let n = e.indexOf(t);
5499
5403
  if (n < 0) return "";
5500
- let r = Math.max(0, n - La), i = Math.min(e.length, n + t.length + La), a = e.slice(r, i).replace(/\s+/g, " ").trim();
5404
+ let r = Math.max(0, n - Fa), i = Math.min(e.length, n + t.length + Fa), a = e.slice(r, i).replace(/\s+/g, " ").trim();
5501
5405
  return r > 0 && (a = "…" + a), i < e.length && (a += "…"), a;
5502
5406
  }
5503
5407
  // src/components/SpotlightPalette/SpotlightPalette.tsx
5504
- var Va = "qwksearch:open-spotlight", Ha = 100, Ua = 6, Wa = 40;
5505
- function Ga() {
5506
- typeof window < "u" && window.dispatchEvent(new Event(Va));
5408
+ var za = "qwksearch:open-spotlight", Ba = 100, Va = 6, Ha = 40;
5409
+ function Ua() {
5410
+ typeof window < "u" && window.dispatchEvent(new Event(za));
5507
5411
  }
5508
- function Ka(e) {
5412
+ function Wa(e) {
5509
5413
  return e.ctrlKey && !e.metaKey && !e.altKey && (e.code === "Space" || e.key === " ");
5510
5414
  }
5511
- var qa = {
5415
+ var Ga = {
5512
5416
  search: "ask",
5513
5417
  chat: "chat",
5514
5418
  page: "page",
5515
5419
  setting: "setting",
5516
5420
  action: "action"
5517
5421
  };
5518
- function Ja() {
5519
- let [e, r] = O(!1), [i, a] = O(""), [o, s] = O(0), c = j(), l = u(), { isAuthenticated: d, signIn: f, signOut: p } = n(), { docsEnabled: m, setActiveView: g, requestFilesSidebar: _ } = Ea(), { recentChats: v, load: y } = mr(Ha), b = D(null), x = D(null), S = D(null), w = C(() => r(!1), []), k = D(y);
5422
+ function Ka() {
5423
+ let [e, r] = O(!1), [i, a] = O(""), [o, s] = O(0), c = j(), l = u(), { isAuthenticated: d, signIn: f, signOut: p } = n(), { docsEnabled: m, setActiveView: g, requestFilesSidebar: _ } = wa(), { recentChats: v, load: y } = mr(Ba), b = D(null), x = D(null), S = D(null), w = C(() => r(!1), []), k = D(y);
5520
5424
  T(() => {
5521
5425
  k.current = y;
5522
5426
  }, [y]);
@@ -5556,30 +5460,30 @@ function Ja() {
5556
5460
  m,
5557
5461
  g,
5558
5462
  _
5559
- ]), { prefix: M, query: N } = Ia(i), I = N.trim(), L = E(() => ({
5560
- chat: ja(v, A),
5561
- page: Aa(A),
5562
- setting: Ma(A),
5563
- action: Na(A)
5463
+ ]), { prefix: M, query: N } = Pa(i), I = N.trim(), L = E(() => ({
5464
+ chat: ka(v, A),
5465
+ page: Oa(A),
5466
+ setting: Aa(A),
5467
+ action: ja(A)
5564
5468
  }), [v, A]), R = E(() => {
5565
- let e = Pa(N, A);
5469
+ let e = Ma(N, A);
5566
5470
  if (M === "w") return e ? [e] : [];
5567
5471
  if (M) {
5568
- let e = Fa.find((e) => e.prefix === M).source;
5569
- return za(L[e], N).map((e) => e.item).slice(0, Wa);
5472
+ let e = Na.find((e) => e.prefix === M).source;
5473
+ return La(L[e], N).map((e) => e.item).slice(0, Ha);
5570
5474
  }
5571
5475
  if (!I) return [
5572
- ...L.chat.slice(0, Ua),
5476
+ ...L.chat.slice(0, Va),
5573
5477
  ...L.action,
5574
5478
  ...L.page
5575
- ].slice(0, Wa);
5576
- let t = za([
5479
+ ].slice(0, Ha);
5480
+ let t = La([
5577
5481
  ...L.action,
5578
5482
  ...L.page,
5579
5483
  ...L.setting,
5580
5484
  ...L.chat
5581
5485
  ], N).map((e) => e.item);
5582
- return [...e ? [e] : [], ...t].slice(0, Wa);
5486
+ return [...e ? [e] : [], ...t].slice(0, Ha);
5583
5487
  }, [
5584
5488
  M,
5585
5489
  N,
@@ -5589,10 +5493,10 @@ function Ja() {
5589
5493
  ]);
5590
5494
  T(() => {
5591
5495
  let e = (e) => {
5592
- Ka(e) && (e.preventDefault(), r((e) => !e));
5496
+ Wa(e) && (e.preventDefault(), r((e) => !e));
5593
5497
  }, t = () => r(!0);
5594
- return window.addEventListener("keydown", e), window.addEventListener(Va, t), () => {
5595
- window.removeEventListener("keydown", e), window.removeEventListener(Va, t);
5498
+ return window.addEventListener("keydown", e), window.addEventListener(za, t), () => {
5499
+ window.removeEventListener("keydown", e), window.removeEventListener(za, t);
5596
5500
  };
5597
5501
  }, []), T(() => {
5598
5502
  e ? (s(0), k.current(), x.current?.focus()) : (a(""), s(0));
@@ -5610,7 +5514,7 @@ function Ja() {
5610
5514
  let z = C((e) => {
5611
5515
  e && (w(), e.run());
5612
5516
  }, [w]), B = C(() => {
5613
- let e = Fa.map((e) => e.prefix), t = e[((M ? e.indexOf(M) : -1) + 1) % e.length];
5517
+ let e = Na.map((e) => e.prefix), t = e[((M ? e.indexOf(M) : -1) + 1) % e.length];
5614
5518
  a(`${t} ${N}`), s(0);
5615
5519
  }, [M, N]), V = (e) => {
5616
5520
  switch (e.key) {
@@ -5630,7 +5534,7 @@ function Ja() {
5630
5534
  }
5631
5535
  };
5632
5536
  if (!e) return null;
5633
- let H = M ? Fa.find((e) => e.prefix === M) : null;
5537
+ let H = M ? Na.find((e) => e.prefix === M) : null;
5634
5538
  return /* @__PURE__ */ P("div", {
5635
5539
  className: "fixed inset-0 z-[10000] flex items-start justify-center bg-black/40 backdrop-blur-[2px] px-4 pt-[12vh]",
5636
5540
  role: "presentation",
@@ -5644,7 +5548,7 @@ function Ja() {
5644
5548
  /* @__PURE__ */ F("div", {
5645
5549
  className: "flex items-center gap-3 border-b border-border px-4",
5646
5550
  children: [
5647
- /* @__PURE__ */ P(Ve, {
5551
+ /* @__PURE__ */ P(He, {
5648
5552
  size: 18,
5649
5553
  className: "shrink-0 text-muted-foreground"
5650
5554
  }),
@@ -5712,7 +5616,7 @@ function Ja() {
5712
5616
  }),
5713
5617
  /* @__PURE__ */ P("span", {
5714
5618
  className: "shrink-0 rounded-md bg-secondary px-1.5 py-0 text-[10px] text-muted-foreground",
5715
- children: qa[e.source]
5619
+ children: Ga[e.source]
5716
5620
  })
5717
5621
  ]
5718
5622
  }, e.id);
@@ -5727,7 +5631,7 @@ function Ja() {
5727
5631
  /* @__PURE__ */ P("span", { children: "esc close" }),
5728
5632
  /* @__PURE__ */ P("span", {
5729
5633
  className: "ml-auto",
5730
- children: Fa.map((e) => `${e.prefix} ${e.label}`).join(" · ")
5634
+ children: Na.map((e) => `${e.prefix} ${e.label}`).join(" · ")
5731
5635
  })
5732
5636
  ]
5733
5637
  })
@@ -5736,57 +5640,57 @@ function Ja() {
5736
5640
  });
5737
5641
  }
5738
5642
  // src/lib/kokoro.ts
5739
- var Ya = {
5643
+ var qa = {
5740
5644
  device: "webgpu",
5741
5645
  dtype: "fp32"
5742
- }, Xa = {
5646
+ }, Ja = {
5743
5647
  device: "wasm",
5744
5648
  dtype: "q8"
5745
- }, Za = "hexgrad/Kokoro-82M", Qa = null, $a = null;
5746
- function eo() {
5649
+ }, Ya = "hexgrad/Kokoro-82M", Xa = null, Za = null;
5650
+ function Qa() {
5747
5651
  return typeof navigator < "u" && "gpu" in navigator;
5748
5652
  }
5749
- async function to() {
5750
- if (!eo()) return !1;
5653
+ async function $a() {
5654
+ if (!Qa()) return !1;
5751
5655
  try {
5752
5656
  return await navigator.gpu.requestAdapter() != null;
5753
5657
  } catch {
5754
5658
  return !1;
5755
5659
  }
5756
5660
  }
5757
- async function no(e) {
5661
+ async function eo(e) {
5758
5662
  let t = [];
5759
- await to() && t.push(Ya), t.push(Xa);
5663
+ await $a() && t.push(qa), t.push(Ja);
5760
5664
  let { KokoroTTS: n } = await import("kokoro-js"), r;
5761
5665
  for (let i of t) try {
5762
- let t = await n.from_pretrained(Za, {
5666
+ let t = await n.from_pretrained(Ya, {
5763
5667
  device: i.device,
5764
5668
  dtype: i.dtype,
5765
5669
  progress_callback: e
5766
5670
  });
5767
- return $a = i.device, t;
5671
+ return Za = i.device, t;
5768
5672
  } catch (e) {
5769
5673
  r = e, console.warn(`Kokoro model failed to load on "${i.device}" backend:`, e);
5770
5674
  }
5771
5675
  throw r instanceof Error ? r : /* @__PURE__ */ Error("Failed to load Kokoro model");
5772
5676
  }
5773
- async function ro(e) {
5774
- return Qa ||= no(e).catch((e) => {
5775
- throw Qa = null, e;
5776
- }), Qa;
5677
+ async function to(e) {
5678
+ return Xa ||= eo(e).catch((e) => {
5679
+ throw Xa = null, e;
5680
+ }), Xa;
5777
5681
  }
5778
- async function io(e) {
5779
- return ro(e);
5682
+ async function no(e) {
5683
+ return to(e);
5780
5684
  }
5781
- async function ao() {
5782
- let e = await io();
5685
+ async function ro() {
5686
+ let e = await no();
5783
5687
  return Object.keys(e.voices);
5784
5688
  }
5785
- function oo() {
5786
- return $a;
5689
+ function io() {
5690
+ return Za;
5787
5691
  }
5788
5692
  // src/hooks/voice/useKokoroTTS.ts
5789
- function so(e, t) {
5693
+ function ao(e, t) {
5790
5694
  let [n, r] = O("idle"), [i, a] = O(!1), [o, s] = O([]), [c, l] = O("af_heart"), [u, d] = O(null), [f, p] = O(null), m = D(null), h = D(null);
5791
5695
  T(() => {
5792
5696
  t?.autoPreload && !i && _();
@@ -5800,10 +5704,10 @@ function so(e, t) {
5800
5704
  m.current &&= (m.current.pause(), m.current.src.startsWith("blob:") && URL.revokeObjectURL(m.current.src), null), h.current?.abort(), h.current = null;
5801
5705
  }, []), _ = C(async () => {
5802
5706
  try {
5803
- r("loading"), d(null), p(null), await ro((e) => {
5707
+ r("loading"), d(null), p(null), await to((e) => {
5804
5708
  p(e);
5805
5709
  });
5806
- let e = await ao();
5710
+ let e = await ro();
5807
5711
  s(e), e.length && !e.includes(c) && l(e[0]), a(!0), r("idle");
5808
5712
  } catch (e) {
5809
5713
  let t = e instanceof Error ? e.message : "Failed to load model";
@@ -5825,7 +5729,7 @@ function so(e, t) {
5825
5729
  g(), r("generating"), d(null);
5826
5730
  let t = new AbortController();
5827
5731
  h.current = t;
5828
- let n = (await (await io()).generate(e.slice(0, 5e3), { voice: c })).toWav(), i = new Blob([n], { type: "audio/wav" }), a = URL.createObjectURL(i), o = new Audio(a);
5732
+ let n = (await (await no()).generate(e.slice(0, 5e3), { voice: c })).toWav(), i = new Blob([n], { type: "audio/wav" }), a = URL.createObjectURL(i), o = new Audio(a);
5829
5733
  m.current = o, o.onended = () => {
5830
5734
  r("idle"), URL.revokeObjectURL(a), m.current = null;
5831
5735
  }, o.onerror = () => {
@@ -5850,11 +5754,11 @@ function so(e, t) {
5850
5754
  changeVoice: C((e) => {
5851
5755
  l(e), localStorage.setItem("kokoroVoice", e);
5852
5756
  }, []),
5853
- backend: oo()
5757
+ backend: io()
5854
5758
  };
5855
5759
  }
5856
5760
  // src/hooks/voice/useTextToVoice.ts
5857
- function co(e, t) {
5761
+ function oo(e, t) {
5858
5762
  let [n, r] = O("stopped"), [i, a] = O(!1), o = D(null), s = D(null), c = D(null), l = D(t);
5859
5763
  l.current = t;
5860
5764
  let u = C(() => {
@@ -5886,7 +5790,7 @@ function co(e, t) {
5886
5790
  try {
5887
5791
  let n = localStorage.getItem("useTTSKokoro");
5888
5792
  if (n === null || n !== "false") try {
5889
- let t = await io((e) => {
5793
+ let t = await no((e) => {
5890
5794
  (e.status === "progress_total" || e.status === "progress" || e.status === "download") && console.log(`[Kokoro] Loading: ${Math.round(e.progress ?? 0)}%`);
5891
5795
  }), n = localStorage.getItem("kokoroVoice") || "af_heart", i = (await t.generate(e.slice(0, 5e3), { voice: n })).toWav(), s = new Blob([i], { type: "audio/wav" }), c = URL.createObjectURL(s), l = new Audio(c);
5892
5796
  o.current = l, l.onended = () => {
@@ -5899,7 +5803,7 @@ function co(e, t) {
5899
5803
  console.debug("Kokoro TTS unavailable, using server-side TTS:", e instanceof Error ? e.message : String(e)), a(!1);
5900
5804
  }
5901
5805
  a(!1);
5902
- let i = await ot("agent/voice", {
5806
+ let i = await K("agent/voice", {
5903
5807
  method: "POST",
5904
5808
  body: {
5905
5809
  text: e.slice(0, 5e3),
@@ -5929,7 +5833,7 @@ function co(e, t) {
5929
5833
  };
5930
5834
  }
5931
5835
  // src/components/VoiceSettings/KokoroVoiceSelector.tsx
5932
- var lo = {
5836
+ var so = {
5933
5837
  af_heart: "American Female - Heart",
5934
5838
  af_bella: "American Female - Bella",
5935
5839
  af_nicole: "American Female - Nicole",
@@ -5941,8 +5845,8 @@ var lo = {
5941
5845
  bm_george: "British Male - George",
5942
5846
  bm_thomas: "British Male - Thomas"
5943
5847
  };
5944
- function uo({ preloadOnMount: e = !1 }) {
5945
- let { status: t, modelReady: n, voices: r, selectedVoice: i, error: o, progress: c, warmupModel: u, changeVoice: d, backend: f } = so("", { autoPreload: e }), [p, m] = O(!1), g = t === "loading", _ = t === "error";
5848
+ function co({ preloadOnMount: e = !1 }) {
5849
+ let { status: t, modelReady: n, voices: r, selectedVoice: i, error: o, progress: c, warmupModel: u, changeVoice: d, backend: f } = ao("", { autoPreload: e }), [p, m] = O(!1), g = t === "loading", _ = t === "error";
5946
5850
  return /* @__PURE__ */ F("div", {
5947
5851
  className: "flex flex-col gap-3",
5948
5852
  children: [/* @__PURE__ */ F("div", {
@@ -5954,10 +5858,10 @@ function uo({ preloadOnMount: e = !1 }) {
5954
5858
  onClick: u,
5955
5859
  disabled: g || n,
5956
5860
  className: h("p-2 rounded-full transition duration-200", n ? "bg-green-500/10 text-green-600 dark:text-green-400" : "bg-white/10 dark:bg-black/10 text-muted-foreground hover:bg-white/20 dark:hover:bg-black/20", g && "opacity-70 cursor-not-allowed"),
5957
- children: g ? /* @__PURE__ */ P(G, {
5861
+ children: g ? /* @__PURE__ */ P(W, {
5958
5862
  size: 18,
5959
5863
  className: "animate-spin"
5960
- }) : /* @__PURE__ */ P(fe, { size: 18 })
5864
+ }) : /* @__PURE__ */ P(pe, { size: 18 })
5961
5865
  })
5962
5866
  }), /* @__PURE__ */ P(a, {
5963
5867
  side: "bottom",
@@ -6004,7 +5908,7 @@ function uo({ preloadOnMount: e = !1 }) {
6004
5908
  className: "w-full text-left px-3 py-2 rounded-md bg-white/5 dark:bg-black/5 hover:bg-white/10 dark:hover:bg-black/10 transition text-sm font-medium",
6005
5909
  children: /* @__PURE__ */ F("div", {
6006
5910
  className: "flex items-center gap-2",
6007
- children: [/* @__PURE__ */ P(tt, { size: 16 }), lo[i] || i]
5911
+ children: [/* @__PURE__ */ P(nt, { size: 16 }), so[i] || i]
6008
5912
  })
6009
5913
  }), p && /* @__PURE__ */ P("div", {
6010
5914
  className: "grid grid-cols-2 gap-2 p-2 bg-white/5 dark:bg-black/5 rounded-md max-h-64 overflow-y-auto",
@@ -6013,18 +5917,18 @@ function uo({ preloadOnMount: e = !1 }) {
6013
5917
  d(e), m(!1);
6014
5918
  },
6015
5919
  className: h("p-2 text-left text-sm rounded transition duration-200", i === e ? "bg-blue-500/20 text-blue-600 dark:text-blue-400 font-medium" : "bg-white/5 dark:bg-black/5 text-foreground hover:bg-white/10 dark:hover:bg-black/10"),
6016
- children: lo[e] || e
5920
+ children: so[e] || e
6017
5921
  }, e))
6018
5922
  })]
6019
5923
  })]
6020
5924
  });
6021
5925
  }
6022
5926
  // src/components/VoiceSettings/VoiceSettingsPanel.tsx
6023
- function fo() {
5927
+ function lo() {
6024
5928
  let [e, t] = O(!1), [n, r] = O(() => {
6025
5929
  let e = localStorage.getItem("useTTSKokoro");
6026
5930
  return e === null || e !== "false";
6027
- }), [i, o] = O(() => localStorage.getItem("ttsSpeaker") || "angus"), [c, u] = O(() => kn()), { start: d, speechStatus: f } = co("This is a preview of the selected voice.", { enableInterrupt: !1 }), p = (e) => {
5931
+ }), [i, o] = O(() => localStorage.getItem("ttsSpeaker") || "angus"), [c, u] = O(() => kn()), { start: d, speechStatus: f } = oo("This is a preview of the selected voice.", { enableInterrupt: !1 }), p = (e) => {
6028
5932
  r(e), localStorage.setItem("useTTSKokoro", String(e));
6029
5933
  }, m = (e) => {
6030
5934
  o(e), localStorage.setItem("ttsSpeaker", e);
@@ -6037,7 +5941,7 @@ function fo() {
6037
5941
  className: "flex items-center justify-between",
6038
5942
  children: [/* @__PURE__ */ F("div", {
6039
5943
  className: "flex items-center gap-2",
6040
- children: [/* @__PURE__ */ P(Ue, { size: 18 }), /* @__PURE__ */ P("h3", {
5944
+ children: [/* @__PURE__ */ P(We, { size: 18 }), /* @__PURE__ */ P("h3", {
6041
5945
  className: "font-semibold",
6042
5946
  children: "Voice Settings"
6043
5947
  })]
@@ -6076,7 +5980,7 @@ function fo() {
6076
5980
  children: "Runs locally in your browser. No server requests, lower latency, and multiple voice options."
6077
5981
  })] })
6078
5982
  ]
6079
- }), n && /* @__PURE__ */ P(uo, { preloadOnMount: !1 })]
5983
+ }), n && /* @__PURE__ */ P(co, { preloadOnMount: !1 })]
6080
5984
  }),
6081
5985
  /* @__PURE__ */ F("div", {
6082
5986
  className: "space-y-2",
@@ -6133,7 +6037,7 @@ function fo() {
6133
6037
  onClick: () => d(),
6134
6038
  disabled: f === "started",
6135
6039
  className: h("w-full flex items-center justify-center gap-2 px-3 py-2 rounded-md text-sm font-medium transition", f === "started" ? "bg-gray-500/20 text-gray-600 dark:text-gray-400 cursor-not-allowed" : "bg-blue-500/20 text-blue-600 dark:text-blue-400 hover:bg-blue-500/30"),
6136
- children: [/* @__PURE__ */ P(tt, { size: 16 }), f === "started" ? "Playing..." : "Preview"]
6040
+ children: [/* @__PURE__ */ P(nt, { size: 16 }), f === "started" ? "Playing..." : "Preview"]
6137
6041
  })]
6138
6042
  })]
6139
6043
  }),
@@ -6175,10 +6079,10 @@ function fo() {
6175
6079
  });
6176
6080
  }
6177
6081
  // src/icons/icon-read.svg
6178
- var po = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3csvg%20height='800px'%20width='800px'%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20512%20512'%20xml:space='preserve'%3e%3cpath%20style='fill:%23FE5022;'%20d='M438.802,390.609V278.595h55.174c9.938,0,18.023,8.085,18.023,18.023v75.967%20c0,9.938-8.086,18.024-18.023,18.024L438.802,390.609L438.802,390.609z'/%3e%3cpath%20style='fill:%23ECE5DD;'%20d='M28.107,511.637C12.609,511.637,0,499.027,0,483.529V134.326c0-1.441,0-12.123,0-12.123%20L121.715,0.363c0,0,10.8,0,12.248,0h271.569c15.498,0,28.107,12.609,28.107,28.106v455.059c0,15.499-12.609,28.108-28.107,28.108%20H28.107V511.637z'/%3e%3cpath%20style='fill:%23D9CBBD;'%20d='M405.533,0.363h-31.991c15.498,0,28.107,12.609,28.107,28.107v455.059%20c0,15.499-12.609,28.108-28.107,28.108h31.991c15.498,0,28.107-12.609,28.107-28.108V28.469%20C433.64,12.972,421.031,0.363,405.533,0.363z'/%3e%3cg%3e%3cpath%20style='fill:%23BABABA;'%20d='M167.639,132.2h133.086c4.594,0,8.318-3.723,8.318-8.318c0-4.595-3.724-8.318-8.318-8.318H167.639%20c-4.594,0-8.318,3.723-8.318,8.318C159.321,128.477,163.045,132.2,167.639,132.2z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M356.178,132.2h22.181c4.594,0,8.318-3.723,8.318-8.318c0-4.595-3.724-8.318-8.318-8.318h-22.181%20c-4.594,0-8.318,3.723-8.318,8.318C347.86,128.477,351.584,132.2,356.178,132.2z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M242.5,212.606c0-4.595-3.724-8.318-8.318-8.318H56.734c-4.594,0-8.318,3.723-8.318,8.318%20s3.724,8.318,8.318,8.318h177.449C238.776,220.924,242.5,217.201,242.5,212.606z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M378.359,204.288h-99.815c-4.594,0-8.318,3.723-8.318,8.318s3.724,8.318,8.318,8.318h99.815%20c4.594,0,8.318-3.723,8.318-8.318S382.953,204.288,378.359,204.288z'/%3e%3c/g%3e%3cpath%20style='fill:%23D9CBBD;'%20d='M0.726,123.171L122.442,1.331l1.39,105.939c0,9.465-7.7,17.166-17.166,17.166L0.726,123.171z'/%3e%3cpath%20style='fill:%23FFB656;'%20d='M270.226,401.7V267.504H456.87c5.938,0,10.768,4.83,10.768,10.768v112.659%20c0,5.938-4.83,10.769-10.768,10.769H270.226z'/%3e%3cpath%20style='fill:%23D9CBBD;'%20d='M367.785,335.156c-12.822,0-23.252-10.431-23.252-23.254v-44.399h89.833v44.399%20c0,12.823-10.431,23.254-23.252,23.254H367.785z'/%3e%3cg%3e%3cpath%20style='fill:%23BABABA;'%20d='M167.639,132.2h133.086c4.594,0,8.318-3.723,8.318-8.318c0-4.595-3.724-8.318-8.318-8.318H167.639%20c-4.594,0-8.318,3.723-8.318,8.318C159.321,128.477,163.045,132.2,167.639,132.2z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M356.178,132.2h22.181c4.594,0,8.318-3.723,8.318-8.318c0-4.595-3.724-8.318-8.318-8.318h-22.181%20c-4.594,0-8.318,3.723-8.318,8.318C347.86,128.477,351.584,132.2,356.178,132.2z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M242.5,212.606c0-4.595-3.724-8.318-8.318-8.318H56.734c-4.594,0-8.318,3.723-8.318,8.318%20s3.724,8.318,8.318,8.318h177.449C238.776,220.924,242.5,217.201,242.5,212.606z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M378.359,204.288h-99.815c-4.594,0-8.318,3.723-8.318,8.318s3.724,8.318,8.318,8.318h99.815%20c4.594,0,8.318-3.723,8.318-8.318S382.953,204.288,378.359,204.288z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M345.087,448.28H101.096c-4.594,0-8.318,3.723-8.318,8.318c0,4.595,3.724,8.318,8.318,8.318h243.992%20c4.594,0,8.318-3.723,8.318-8.318C353.405,452.003,349.681,448.28,345.087,448.28z'/%3e%3c/g%3e%3cpath%20style='fill:%23FE5022;'%20d='M163.689,357.337c-3.692,0-6.094-3.886-4.443-7.189l16.225-32.451%20c1.799-3.597,5.416-5.833,9.438-5.833h44.282v45.471h-65.503V357.337z'/%3e%3cpolygon%20style='fill:%23FFB656;'%20points='256.918,278.252%20211.447,300.988%20211.447,368.216%20256.918,390.953%20284.321,390.953%20284.321,278.214%20'/%3e%3cg%3e%3cpath%20style='fill:%23FE5022;'%20d='M268.64,401.7c-7.075,0-12.832-5.756-12.832-12.832V280.336c0-7.075,5.756-12.831,12.832-12.831%20h19.808c7.075,0,12.832,5.756,12.832,12.831v108.532c0,7.076-5.756,12.832-12.832,12.832H268.64z'/%3e%3cpath%20style='fill:%23FE5022;'%20d='M104.156,379.377H26.143V301.33h91.398c8.546,0,14.88,7.936,12.986,16.27l-11.313,49.758%20C117.615,374.388,111.366,379.377,104.156,379.377z'/%3e%3c/g%3e%3c/svg%3e", mo = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3csvg%20height='800px'%20width='800px'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2064%2064'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%2376C2AF;}%20.st1{fill:%234F5D73;}%20.st2{opacity:0.2;}%20.st3{fill:%23231F20;}%20.st4{fill:%23FFFFFF;}%20%3c/style%3e%3cg%20id='Layer_1'%3e%3cg%3e%3ccircle%20class='st0'%20cx='32'%20cy='32'%20r='32'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st1'%20d='M32,52c-1.1,0-2-0.9-2-2V18c0-1.1,0.9-2,2-2l0,0c1.1,0,2,0.9,2,2v32C34,51.1,33.1,52,32,52L32,52z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st1'%20d='M46,52c-1.1,0-2-0.9-2-2V18c0-1.1,0.9-2,2-2l0,0c1.1,0,2,0.9,2,2v32C48,51.1,47.1,52,46,52L46,52z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st1'%20d='M18,52c-1.1,0-2-0.9-2-2V18c0-1.1,0.9-2,2-2l0,0c1.1,0,2,0.9,2,2v32C20,51.1,19.1,52,18,52L18,52z'/%3e%3c/g%3e%3cg%20class='st2'%3e%3ccircle%20class='st3'%20cx='45.9'%20cy='38'%20r='4'/%3e%3c/g%3e%3cg%20class='st2'%3e%3ccircle%20class='st3'%20cx='32'%20cy='27'%20r='4'/%3e%3c/g%3e%3cg%20class='st2'%3e%3ccircle%20class='st3'%20cx='18'%20cy='44'%20r='4'/%3e%3c/g%3e%3cg%3e%3ccircle%20class='st4'%20cx='45.9'%20cy='36'%20r='4'/%3e%3c/g%3e%3cg%3e%3ccircle%20class='st4'%20cx='32'%20cy='25'%20r='4'/%3e%3c/g%3e%3cg%3e%3ccircle%20class='st4'%20cx='18'%20cy='42'%20r='4'/%3e%3c/g%3e%3c/g%3e%3cg%20id='Layer_2'%3e%3c/g%3e%3c/svg%3e";
6082
+ var uo = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3csvg%20height='800px'%20width='800px'%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20512%20512'%20xml:space='preserve'%3e%3cpath%20style='fill:%23FE5022;'%20d='M438.802,390.609V278.595h55.174c9.938,0,18.023,8.085,18.023,18.023v75.967%20c0,9.938-8.086,18.024-18.023,18.024L438.802,390.609L438.802,390.609z'/%3e%3cpath%20style='fill:%23ECE5DD;'%20d='M28.107,511.637C12.609,511.637,0,499.027,0,483.529V134.326c0-1.441,0-12.123,0-12.123%20L121.715,0.363c0,0,10.8,0,12.248,0h271.569c15.498,0,28.107,12.609,28.107,28.106v455.059c0,15.499-12.609,28.108-28.107,28.108%20H28.107V511.637z'/%3e%3cpath%20style='fill:%23D9CBBD;'%20d='M405.533,0.363h-31.991c15.498,0,28.107,12.609,28.107,28.107v455.059%20c0,15.499-12.609,28.108-28.107,28.108h31.991c15.498,0,28.107-12.609,28.107-28.108V28.469%20C433.64,12.972,421.031,0.363,405.533,0.363z'/%3e%3cg%3e%3cpath%20style='fill:%23BABABA;'%20d='M167.639,132.2h133.086c4.594,0,8.318-3.723,8.318-8.318c0-4.595-3.724-8.318-8.318-8.318H167.639%20c-4.594,0-8.318,3.723-8.318,8.318C159.321,128.477,163.045,132.2,167.639,132.2z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M356.178,132.2h22.181c4.594,0,8.318-3.723,8.318-8.318c0-4.595-3.724-8.318-8.318-8.318h-22.181%20c-4.594,0-8.318,3.723-8.318,8.318C347.86,128.477,351.584,132.2,356.178,132.2z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M242.5,212.606c0-4.595-3.724-8.318-8.318-8.318H56.734c-4.594,0-8.318,3.723-8.318,8.318%20s3.724,8.318,8.318,8.318h177.449C238.776,220.924,242.5,217.201,242.5,212.606z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M378.359,204.288h-99.815c-4.594,0-8.318,3.723-8.318,8.318s3.724,8.318,8.318,8.318h99.815%20c4.594,0,8.318-3.723,8.318-8.318S382.953,204.288,378.359,204.288z'/%3e%3c/g%3e%3cpath%20style='fill:%23D9CBBD;'%20d='M0.726,123.171L122.442,1.331l1.39,105.939c0,9.465-7.7,17.166-17.166,17.166L0.726,123.171z'/%3e%3cpath%20style='fill:%23FFB656;'%20d='M270.226,401.7V267.504H456.87c5.938,0,10.768,4.83,10.768,10.768v112.659%20c0,5.938-4.83,10.769-10.768,10.769H270.226z'/%3e%3cpath%20style='fill:%23D9CBBD;'%20d='M367.785,335.156c-12.822,0-23.252-10.431-23.252-23.254v-44.399h89.833v44.399%20c0,12.823-10.431,23.254-23.252,23.254H367.785z'/%3e%3cg%3e%3cpath%20style='fill:%23BABABA;'%20d='M167.639,132.2h133.086c4.594,0,8.318-3.723,8.318-8.318c0-4.595-3.724-8.318-8.318-8.318H167.639%20c-4.594,0-8.318,3.723-8.318,8.318C159.321,128.477,163.045,132.2,167.639,132.2z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M356.178,132.2h22.181c4.594,0,8.318-3.723,8.318-8.318c0-4.595-3.724-8.318-8.318-8.318h-22.181%20c-4.594,0-8.318,3.723-8.318,8.318C347.86,128.477,351.584,132.2,356.178,132.2z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M242.5,212.606c0-4.595-3.724-8.318-8.318-8.318H56.734c-4.594,0-8.318,3.723-8.318,8.318%20s3.724,8.318,8.318,8.318h177.449C238.776,220.924,242.5,217.201,242.5,212.606z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M378.359,204.288h-99.815c-4.594,0-8.318,3.723-8.318,8.318s3.724,8.318,8.318,8.318h99.815%20c4.594,0,8.318-3.723,8.318-8.318S382.953,204.288,378.359,204.288z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M345.087,448.28H101.096c-4.594,0-8.318,3.723-8.318,8.318c0,4.595,3.724,8.318,8.318,8.318h243.992%20c4.594,0,8.318-3.723,8.318-8.318C353.405,452.003,349.681,448.28,345.087,448.28z'/%3e%3c/g%3e%3cpath%20style='fill:%23FE5022;'%20d='M163.689,357.337c-3.692,0-6.094-3.886-4.443-7.189l16.225-32.451%20c1.799-3.597,5.416-5.833,9.438-5.833h44.282v45.471h-65.503V357.337z'/%3e%3cpolygon%20style='fill:%23FFB656;'%20points='256.918,278.252%20211.447,300.988%20211.447,368.216%20256.918,390.953%20284.321,390.953%20284.321,278.214%20'/%3e%3cg%3e%3cpath%20style='fill:%23FE5022;'%20d='M268.64,401.7c-7.075,0-12.832-5.756-12.832-12.832V280.336c0-7.075,5.756-12.831,12.832-12.831%20h19.808c7.075,0,12.832,5.756,12.832,12.831v108.532c0,7.076-5.756,12.832-12.832,12.832H268.64z'/%3e%3cpath%20style='fill:%23FE5022;'%20d='M104.156,379.377H26.143V301.33h91.398c8.546,0,14.88,7.936,12.986,16.27l-11.313,49.758%20C117.615,374.388,111.366,379.377,104.156,379.377z'/%3e%3c/g%3e%3c/svg%3e", fo = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3csvg%20height='800px'%20width='800px'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2064%2064'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%2376C2AF;}%20.st1{fill:%234F5D73;}%20.st2{opacity:0.2;}%20.st3{fill:%23231F20;}%20.st4{fill:%23FFFFFF;}%20%3c/style%3e%3cg%20id='Layer_1'%3e%3cg%3e%3ccircle%20class='st0'%20cx='32'%20cy='32'%20r='32'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st1'%20d='M32,52c-1.1,0-2-0.9-2-2V18c0-1.1,0.9-2,2-2l0,0c1.1,0,2,0.9,2,2v32C34,51.1,33.1,52,32,52L32,52z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st1'%20d='M46,52c-1.1,0-2-0.9-2-2V18c0-1.1,0.9-2,2-2l0,0c1.1,0,2,0.9,2,2v32C48,51.1,47.1,52,46,52L46,52z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st1'%20d='M18,52c-1.1,0-2-0.9-2-2V18c0-1.1,0.9-2,2-2l0,0c1.1,0,2,0.9,2,2v32C20,51.1,19.1,52,18,52L18,52z'/%3e%3c/g%3e%3cg%20class='st2'%3e%3ccircle%20class='st3'%20cx='45.9'%20cy='38'%20r='4'/%3e%3c/g%3e%3cg%20class='st2'%3e%3ccircle%20class='st3'%20cx='32'%20cy='27'%20r='4'/%3e%3c/g%3e%3cg%20class='st2'%3e%3ccircle%20class='st3'%20cx='18'%20cy='44'%20r='4'/%3e%3c/g%3e%3cg%3e%3ccircle%20class='st4'%20cx='45.9'%20cy='36'%20r='4'/%3e%3c/g%3e%3cg%3e%3ccircle%20class='st4'%20cx='32'%20cy='25'%20r='4'/%3e%3c/g%3e%3cg%3e%3ccircle%20class='st4'%20cx='18'%20cy='42'%20r='4'/%3e%3c/g%3e%3c/g%3e%3cg%20id='Layer_2'%3e%3c/g%3e%3c/svg%3e";
6179
6083
  // src/app/CategoryDock.tsx
6180
- function ho() {
6181
- let e = A(), r = j(), { isAuthenticated: i, signIn: a, signOut: o } = n(), { newChat: s } = u(), { activeView: c, setActiveView: l, docsEnabled: d, requestFilesSidebar: f } = Ea(), p = [{
6084
+ function po() {
6085
+ let e = A(), r = j(), { isAuthenticated: i, signIn: a, signOut: o } = n(), { newChat: s } = u(), { activeView: c, setActiveView: l, docsEnabled: d, requestFilesSidebar: f } = wa(), p = [{
6182
6086
  href: "/",
6183
6087
  label: "Research",
6184
6088
  icon: t.appIconUrl
@@ -6186,7 +6090,7 @@ function ho() {
6186
6090
  href: "/workspace",
6187
6091
  label: "Docs",
6188
6092
  icon: /* @__PURE__ */ P(Bt, {
6189
- src: po,
6093
+ src: uo,
6190
6094
  alt: "Docs",
6191
6095
  width: 24,
6192
6096
  height: 24,
@@ -6206,7 +6110,7 @@ function ho() {
6206
6110
  ...d ? [{
6207
6111
  key: "files",
6208
6112
  label: "Files",
6209
- icon: /* @__PURE__ */ P(ve, { className: "w-full h-full p-1" }),
6113
+ icon: /* @__PURE__ */ P(ye, { className: "w-full h-full p-1" }),
6210
6114
  onClick: () => {
6211
6115
  l("docs"), f();
6212
6116
  }
@@ -6215,7 +6119,7 @@ function ho() {
6215
6119
  key: "settings",
6216
6120
  label: "Settings",
6217
6121
  icon: /* @__PURE__ */ P(Bt, {
6218
- src: mo,
6122
+ src: fo,
6219
6123
  alt: "Settings",
6220
6124
  width: 24,
6221
6125
  height: 24,
@@ -6224,10 +6128,10 @@ function ho() {
6224
6128
  }),
6225
6129
  menu: { renderContent: () => /* @__PURE__ */ F(N, { children: [
6226
6130
  /* @__PURE__ */ F(Lt, {
6227
- onClick: () => Ga(),
6131
+ onClick: () => Ua(),
6228
6132
  className: "cursor-pointer py-1 h-7",
6229
6133
  children: [
6230
- /* @__PURE__ */ P(Ve, { className: "mr-2 h-3.5 w-3.5" }),
6134
+ /* @__PURE__ */ P(He, { className: "mr-2 h-3.5 w-3.5" }),
6231
6135
  /* @__PURE__ */ P("span", {
6232
6136
  className: "text-sm",
6233
6137
  children: "Search"
@@ -6243,7 +6147,7 @@ function ho() {
6243
6147
  t.onOpenSettings?.() || r.push("/settings");
6244
6148
  },
6245
6149
  className: "cursor-pointer py-1 h-7",
6246
- children: [/* @__PURE__ */ P(He, { className: "mr-2 h-3.5 w-3.5" }), /* @__PURE__ */ P("span", {
6150
+ children: [/* @__PURE__ */ P(Ue, { className: "mr-2 h-3.5 w-3.5" }), /* @__PURE__ */ P("span", {
6247
6151
  className: "text-sm",
6248
6152
  children: "Settings"
6249
6153
  })]
@@ -6251,14 +6155,14 @@ function ho() {
6251
6155
  i ? /* @__PURE__ */ F(Lt, {
6252
6156
  onClick: () => o(),
6253
6157
  className: "cursor-pointer py-1 h-7",
6254
- children: [/* @__PURE__ */ P(Ae, { className: "mr-2 h-3.5 w-3.5" }), /* @__PURE__ */ P("span", {
6158
+ children: [/* @__PURE__ */ P(je, { className: "mr-2 h-3.5 w-3.5" }), /* @__PURE__ */ P("span", {
6255
6159
  className: "text-sm",
6256
6160
  children: "Logout"
6257
6161
  })]
6258
6162
  }) : /* @__PURE__ */ F(Lt, {
6259
6163
  onClick: () => a(),
6260
6164
  className: "cursor-pointer py-1 h-7",
6261
- children: [/* @__PURE__ */ P(ke, { className: "mr-2 h-3.5 w-3.5" }), /* @__PURE__ */ P("span", {
6165
+ children: [/* @__PURE__ */ P(Ae, { className: "mr-2 h-3.5 w-3.5" }), /* @__PURE__ */ P("span", {
6262
6166
  className: "text-sm",
6263
6167
  children: "Login"
6264
6168
  })]
@@ -6294,7 +6198,7 @@ function ho() {
6294
6198
  })] });
6295
6199
  }
6296
6200
  // src/app/CookieConsent.tsx
6297
- function go() {
6201
+ function mo() {
6298
6202
  return /* @__PURE__ */ P(Vt, {
6299
6203
  appName: t.appName,
6300
6204
  links: t.footerLinks,
@@ -6302,34 +6206,34 @@ function go() {
6302
6206
  });
6303
6207
  }
6304
6208
  // src/app/useChunkErrorReload.ts
6305
- var _o = "qwk:chunk-error-reload", vo = 6e4, yo = /Loading (CSS )?chunk|ChunkLoadError|Failed to fetch dynamically imported module|error loading dynamically imported module|Importing a module script failed|Unable to preload CSS/i;
6306
- function bo(e) {
6307
- if (typeof e == "string") return yo.test(e);
6209
+ var ho = "qwk:chunk-error-reload", go = 6e4, _o = /Loading (CSS )?chunk|ChunkLoadError|Failed to fetch dynamically imported module|error loading dynamically imported module|Importing a module script failed|Unable to preload CSS/i;
6210
+ function vo(e) {
6211
+ if (typeof e == "string") return _o.test(e);
6308
6212
  if (e && typeof e == "object") {
6309
6213
  let { name: t, message: n } = e;
6310
- return t === "ChunkLoadError" || typeof n == "string" && yo.test(n);
6214
+ return t === "ChunkLoadError" || typeof n == "string" && _o.test(n);
6311
6215
  }
6312
6216
  return !1;
6313
6217
  }
6314
- function xo(e) {
6315
- if (typeof window > "u" || !bo(e)) return !1;
6218
+ function yo(e) {
6219
+ if (typeof window > "u" || !vo(e)) return !1;
6316
6220
  try {
6317
- let e = Number(window.sessionStorage.getItem(_o));
6318
- if (e && Date.now() - e < vo) return !1;
6319
- window.sessionStorage.setItem(_o, String(Date.now()));
6221
+ let e = Number(window.sessionStorage.getItem(ho));
6222
+ if (e && Date.now() - e < go) return !1;
6223
+ window.sessionStorage.setItem(ho, String(Date.now()));
6320
6224
  } catch {
6321
6225
  return !1;
6322
6226
  }
6323
6227
  return window.location.reload(), !0;
6324
6228
  }
6325
- function So() {
6229
+ function bo() {
6326
6230
  T(() => {
6327
6231
  let e = (e) => {
6328
- xo(e.error ?? e.message);
6232
+ yo(e.error ?? e.message);
6329
6233
  }, t = (e) => {
6330
- xo(e.reason);
6234
+ yo(e.reason);
6331
6235
  }, n = (e) => {
6332
- xo(e.payload ?? "Loading chunk") && e.preventDefault();
6236
+ yo(e.payload ?? "Loading chunk") && e.preventDefault();
6333
6237
  };
6334
6238
  return window.addEventListener("error", e), window.addEventListener("unhandledrejection", t), window.addEventListener("vite:preloadError", n), () => {
6335
6239
  window.removeEventListener("error", e), window.removeEventListener("unhandledrejection", t), window.removeEventListener("vite:preloadError", n);
@@ -6337,8 +6241,8 @@ function So() {
6337
6241
  }, []);
6338
6242
  }
6339
6243
  // src/app/QwkSearchProviders.tsx
6340
- var Co = ({ children: e }) => /* @__PURE__ */ P(N, { children: e });
6341
- function wo(e) {
6244
+ var xo = ({ children: e }) => /* @__PURE__ */ P(N, { children: e });
6245
+ function So(e) {
6342
6246
  let [t, n] = O(e === !0);
6343
6247
  return T(() => {
6344
6248
  if (e !== "auto") {
@@ -6346,7 +6250,7 @@ function wo(e) {
6346
6250
  return;
6347
6251
  }
6348
6252
  let t = !1;
6349
- return ot("auth/providers").then((e) => {
6253
+ return K("auth/providers").then((e) => {
6350
6254
  t || n(!!e.providers?.includes("google"));
6351
6255
  }).catch(() => {
6352
6256
  t || n(!1);
@@ -6355,10 +6259,10 @@ function wo(e) {
6355
6259
  };
6356
6260
  }, [e]), t;
6357
6261
  }
6358
- function To({ children: t, authClient: n, config: i, googleOneTap: a = "auto", docsEnabled: o = !0, ChromeProvider: s = Co, showDock: l = !0, showCookieConsent: u = !0, showToaster: d = !0, showSpotlight: f = !0 }) {
6262
+ function Co({ children: t, authClient: n, config: i, googleOneTap: a = "auto", docsEnabled: o = !0, ChromeProvider: s = xo, showDock: l = !0, showCookieConsent: u = !0, showToaster: d = !0, showSpotlight: f = !0 }) {
6359
6263
  i && e(i);
6360
- let p = wo(a);
6361
- return So(), /* @__PURE__ */ P(Pt, {
6264
+ let p = So(a);
6265
+ return bo(), /* @__PURE__ */ P(Pt, {
6362
6266
  attribute: "class",
6363
6267
  defaultTheme: "system",
6364
6268
  enableSystem: !0,
@@ -6366,54 +6270,54 @@ function To({ children: t, authClient: n, config: i, googleOneTap: a = "auto", d
6366
6270
  children: /* @__PURE__ */ P(c, {
6367
6271
  authClient: n,
6368
6272
  enableGoogleOneTap: p,
6369
- children: /* @__PURE__ */ P(r, { children: /* @__PURE__ */ P(Cn, { children: /* @__PURE__ */ P(Ca, {
6273
+ children: /* @__PURE__ */ P(r, { children: /* @__PURE__ */ P(Cn, { children: /* @__PURE__ */ P(xa, {
6370
6274
  docsEnabled: o,
6371
6275
  children: /* @__PURE__ */ P(It, { children: /* @__PURE__ */ F(s, { children: [
6372
6276
  /* @__PURE__ */ F("div", {
6373
6277
  id: "app-scroll-root",
6374
6278
  className: "w-screen h-screen overflow-y-auto overflow-x-hidden pb-[calc(60px+env(safe-area-inset-bottom,0px))] md:pb-0",
6375
- children: [l && /* @__PURE__ */ P(ho, {}), /* @__PURE__ */ P("main", {
6279
+ children: [l && /* @__PURE__ */ P(po, {}), /* @__PURE__ */ P("main", {
6376
6280
  className: "bg-light-primary dark:bg-dark-primary min-h-screen",
6377
6281
  children: t
6378
6282
  })]
6379
6283
  }),
6380
- d && /* @__PURE__ */ P(at, { toastOptions: {
6284
+ d && /* @__PURE__ */ P(ot, { toastOptions: {
6381
6285
  unstyled: !0,
6382
6286
  classNames: { toast: "bg-light-secondary dark:bg-dark-secondary dark:text-white/70 text-black-70 rounded-lg p-4 flex flex-row items-center space-x-2" }
6383
6287
  } }),
6384
- u && /* @__PURE__ */ P(go, {}),
6385
- f && /* @__PURE__ */ P(Ja, {})
6288
+ u && /* @__PURE__ */ P(mo, {}),
6289
+ f && /* @__PURE__ */ P(Ka, {})
6386
6290
  ] }) })
6387
6291
  }) }) })
6388
6292
  })
6389
6293
  });
6390
6294
  }
6391
6295
  // src/app/QwkSearchApp.tsx
6392
- function Eo(e) {
6393
- return /* @__PURE__ */ P(To, {
6296
+ function wo(e) {
6297
+ return /* @__PURE__ */ P(Co, {
6394
6298
  ...e,
6395
6299
  docsEnabled: !1,
6396
- children: /* @__PURE__ */ P(Hi, {})
6300
+ children: /* @__PURE__ */ P(Bi, {})
6397
6301
  });
6398
6302
  }
6399
6303
  // src/app/useChatTabs.ts
6400
- var Do = "qwksearch-open-chat-tabs", Oo = 50;
6401
- function ko() {
6304
+ var To = "qwksearch-open-chat-tabs", Eo = 50;
6305
+ function Do() {
6402
6306
  if (typeof window > "u") return [];
6403
6307
  try {
6404
- let e = window.localStorage.getItem(Do);
6308
+ let e = window.localStorage.getItem(To);
6405
6309
  return e ? JSON.parse(e) : [];
6406
6310
  } catch {
6407
6311
  return [];
6408
6312
  }
6409
6313
  }
6410
- function Ao() {
6411
- let { chatId: e, chatTurns: t, startNewChat: n, switchToChat: r } = u(), [i, a] = O(ko), o = D(null);
6314
+ function Oo() {
6315
+ let { chatId: e, chatTurns: t, startNewChat: n, switchToChat: r } = u(), [i, a] = O(Do), o = D(null);
6412
6316
  T(() => {
6413
- window.localStorage.setItem(Do, JSON.stringify(i));
6317
+ window.localStorage.setItem(To, JSON.stringify(i));
6414
6318
  }, [i]), T(() => {
6415
6319
  if (!e) return;
6416
- let n = t[0]?.content?.slice(0, Oo), r = t.length > 0;
6320
+ let n = t[0]?.content?.slice(0, Eo), r = t.length > 0;
6417
6321
  a((t) => {
6418
6322
  let i = t.find((t) => t.id === e);
6419
6323
  return !i && e === o.current && !r ? t : i ? n && i.title !== n || i.hasMessages !== r ? t.map((t) => t.id === e ? {
@@ -6476,4 +6380,4 @@ function Ao() {
6476
6380
  closeChats: d
6477
6381
  };
6478
6382
  }
6479
- export { Cn as $, $i as A, $r as B, la as C, ta as D, oa as E, qi as F, wr as G, qr as H, Yi as I, lr as J, Er as K, Hi as L, Zi as M, Qi as N, aa as O, Xi as P, Un as Q, pi as R, ua as S, sa as T, Rr as U, Xr as V, Tr as W, Wn as X, Hn as Y, X as Z, Ia as _, xo as a, Ea as b, ho as c, co as d, xn as et, so as f, za as g, Fa as h, bo as i, Ui as j, ra as k, fo as l, Ga as m, Eo as n, So as o, Ja as p, Dr as q, To as r, go as s, Ao as t, J as tt, uo as u, ka as v, ca as w, ba as x, Ca as y, ni as z };
6383
+ export { Cn as $, Zi as A, $r as B, sa as C, $i as D, ia as E, Gi as F, wr as G, qr as H, qi as I, lr as J, Er as K, Bi as L, Yi as M, Xi as N, ra as O, Ji as P, Un as Q, ui as R, ca as S, aa as T, Rr as U, Xr as V, Tr as W, Wn as X, Hn as Y, X as Z, Pa as _, yo as a, wa as b, po as c, oo as d, xn as et, ao as f, La as g, Na as h, vo as i, Vi as j, ta as k, lo as l, Ua as m, wo as n, bo as o, Ka as p, Dr as q, Co as r, mo as s, Oo as t, J as tt, co as u, Da as v, oa as w, va as x, xa as y, ni as z };