gentiq 0.12.1 → 0.13.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{checkbox-DOit9Yho.js → checkbox-BIIJ4fLi.js} +259 -260
- package/dist/gentiq-admin.es.js +945 -899
- package/dist/gentiq-index.es.js +975 -965
- package/dist/gentiq.css +1 -1
- package/dist/src/admin/lib/api.d.ts +11 -0
- package/dist/src/hooks/useGentiqAdmin.d.ts +3 -0
- package/dist/src/lib/api.d.ts +3 -3
- package/dist/src/lib/errors.d.ts +1 -2
- package/dist/src/locales/en.json.d.ts +8 -6
- package/dist/src/locales/fa.json.d.ts +8 -6
- package/dist/src/types.d.ts +6 -6
- package/package.json +1 -1
|
@@ -4,24 +4,24 @@ import { createContext as pe, useContext as ke, useState as P, useEffect as V, u
|
|
|
4
4
|
import { useTranslation as z, initReactI18next as Bn } from "react-i18next";
|
|
5
5
|
import { Slot as Kt } from "@radix-ui/react-slot";
|
|
6
6
|
import { cva as ot } from "class-variance-authority";
|
|
7
|
-
import { QuoteIcon as Oe, CheckIcon as
|
|
7
|
+
import { QuoteIcon as Oe, CheckIcon as Le, SendIcon as Hn, ArrowDownIcon as jn, ChevronDownIcon as we, BookIcon as Gn, XIcon as be, ArrowUpIcon as Wn, Loader2Icon as Vn, SquareIcon as Yn, FileIcon as Qt, PaperclipIcon as Xn, RefreshCcwIcon as Kn, ThumbsUpIcon as Qn, ThumbsDownIcon as Zn, CopyIcon as Zt, BrainIcon as Jn, WrenchIcon as eo, ImagePlusIcon as to, CodeIcon as no, DownloadIcon as Ce, GlobeIcon as oo, XCircleIcon as Jt, CheckCircleIcon as ro, ClockIcon as ao, CircleIcon as io, ChevronUpIcon as lo } from "lucide-react";
|
|
8
8
|
import * as ce from "@radix-ui/react-tooltip";
|
|
9
9
|
import { toast as so } from "sonner";
|
|
10
10
|
import { createPortal as co } from "react-dom";
|
|
11
11
|
import { nanoid as en } from "nanoid";
|
|
12
12
|
import { useQuery as uo } from "@tanstack/react-query";
|
|
13
13
|
import { Streamdown as po } from "streamdown";
|
|
14
|
-
import
|
|
15
|
-
import { useControllableState as
|
|
14
|
+
import gt from "katex";
|
|
15
|
+
import { useControllableState as ht } from "@radix-ui/react-use-controllable-state";
|
|
16
16
|
import * as rt from "@radix-ui/react-collapsible";
|
|
17
17
|
import * as J from "@radix-ui/react-dialog";
|
|
18
18
|
import { PrismLight as K } from "react-syntax-highlighter";
|
|
19
19
|
import { StickToBottom as tn, useStickToBottomContext as nn } from "use-stick-to-bottom";
|
|
20
|
-
import
|
|
20
|
+
import go from "i18next";
|
|
21
21
|
import * as M from "@radix-ui/react-select";
|
|
22
22
|
import * as ye from "@radix-ui/react-dropdown-menu";
|
|
23
23
|
import * as mt from "@radix-ui/react-checkbox";
|
|
24
|
-
import { clsx as
|
|
24
|
+
import { clsx as ho } from "clsx";
|
|
25
25
|
import { twMerge as mo } from "tailwind-merge";
|
|
26
26
|
const fo = {
|
|
27
27
|
theme: "system",
|
|
@@ -43,7 +43,7 @@ function pl({
|
|
|
43
43
|
return d === "system" || d === "light" || d === "dark" ? d : void 0;
|
|
44
44
|
}), [c, s] = P(
|
|
45
45
|
() => window.localStorage.getItem(n + "-accent") || void 0
|
|
46
|
-
), [u,
|
|
46
|
+
), [u, h] = P(
|
|
47
47
|
() => window.localStorage.getItem(n + "-radius") || "1.25rem"
|
|
48
48
|
), { i18n: m } = z(["theme"]), b = a ?? o?.defaultTheme ?? t, p = c ?? o?.accent;
|
|
49
49
|
V(() => {
|
|
@@ -64,7 +64,7 @@ function pl({
|
|
|
64
64
|
const y = u || (typeof o?.radius == "number" ? `${o.radius}px` : o?.radius);
|
|
65
65
|
y !== void 0 && d.style.setProperty("--radius", y), p !== void 0 ? d.style.setProperty("--gentiq-primary", p) : d.style.removeProperty("--gentiq-primary"), window.document.documentElement.dir = m.dir();
|
|
66
66
|
}, [o, m, m.language, p, u]);
|
|
67
|
-
const
|
|
67
|
+
const g = {
|
|
68
68
|
theme: b,
|
|
69
69
|
setTheme: (d) => {
|
|
70
70
|
window.localStorage.setItem(n, d), l(d);
|
|
@@ -75,19 +75,19 @@ function pl({
|
|
|
75
75
|
},
|
|
76
76
|
radius: u,
|
|
77
77
|
setRadius: (d) => {
|
|
78
|
-
d ? window.localStorage.setItem(n + "-radius", d) : window.localStorage.removeItem(n + "-radius"),
|
|
78
|
+
d ? window.localStorage.setItem(n + "-radius", d) : window.localStorage.removeItem(n + "-radius"), h(d);
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
|
-
return /* @__PURE__ */ i(on.Provider, { ...r, value:
|
|
81
|
+
return /* @__PURE__ */ i(on.Provider, { ...r, value: g, children: e });
|
|
82
82
|
}
|
|
83
|
-
const
|
|
83
|
+
const gl = () => ke(on), rn = pe(null);
|
|
84
84
|
function at() {
|
|
85
85
|
const e = ke(rn);
|
|
86
86
|
if (!e)
|
|
87
87
|
throw new Error("useGentiqApi() must be used within a <GentiqProvider>.");
|
|
88
88
|
return e;
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function hl({ api: e, children: t }) {
|
|
91
91
|
return /* @__PURE__ */ i(rn.Provider, { value: e, children: t });
|
|
92
92
|
}
|
|
93
93
|
const j = (e) => e;
|
|
@@ -103,7 +103,7 @@ function bo(e, t) {
|
|
|
103
103
|
const s = o === c ? void 0 : c;
|
|
104
104
|
r(s);
|
|
105
105
|
try {
|
|
106
|
-
const u = e.parts.find((b) => b.type === "data-message-id"),
|
|
106
|
+
const u = e.parts.find((b) => b.type === "data-message-id"), h = u ? j(u) : void 0, m = h ? h.data[0].message_id : e.id;
|
|
107
107
|
await n.saveFeedback(t, m, s ?? null);
|
|
108
108
|
} catch (u) {
|
|
109
109
|
console.error("Error saving feedback:", u);
|
|
@@ -132,7 +132,7 @@ const yo = /* @__PURE__ */ new Set([
|
|
|
132
132
|
"syc"
|
|
133
133
|
]);
|
|
134
134
|
function _o() {
|
|
135
|
-
const { i18n: e } = z(["translation"]), { app: t } =
|
|
135
|
+
const { i18n: e } = z(["translation"]), { app: t } = he(), n = at(), o = de(() => {
|
|
136
136
|
const c = n.getConfig(), s = t || c.app;
|
|
137
137
|
return {
|
|
138
138
|
name: s?.name || "Gentiq App",
|
|
@@ -157,7 +157,7 @@ function _o() {
|
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
159
|
function v(...e) {
|
|
160
|
-
return mo(
|
|
160
|
+
return mo(ho(e));
|
|
161
161
|
}
|
|
162
162
|
function ml(e, t) {
|
|
163
163
|
if (t === "/") return e;
|
|
@@ -291,8 +291,8 @@ const an = pe(null), $ = (e) => e.replace(/\s+/g, " ").trim(), Me = (e, t) => {
|
|
|
291
291
|
`[data-gentiq-reference-kind="${Ee(e.kind)}"]`
|
|
292
292
|
)
|
|
293
293
|
).find((s) => {
|
|
294
|
-
const u = $(s.textContent || ""),
|
|
295
|
-
return !!r && (u.includes(r) || m === r) || !!a &&
|
|
294
|
+
const u = $(s.textContent || ""), h = $(s.dataset.gentiqReferenceLabel || ""), m = $(s.dataset.gentiqReferenceExcerpt || "");
|
|
295
|
+
return !!r && (u.includes(r) || m === r) || !!a && h === a && !!r && u.includes(r);
|
|
296
296
|
});
|
|
297
297
|
if (c) return c;
|
|
298
298
|
}
|
|
@@ -342,10 +342,10 @@ function fl({
|
|
|
342
342
|
maxExcerptLength: o = 500,
|
|
343
343
|
children: r
|
|
344
344
|
}) {
|
|
345
|
-
const { t: a } = z(["chat"]), [l, c] = P([]), [s, u] = P(null),
|
|
346
|
-
x.sourceId &&
|
|
347
|
-
}, []),
|
|
348
|
-
x &&
|
|
345
|
+
const { t: a } = z(["chat"]), [l, c] = P([]), [s, u] = P(null), h = Z(/* @__PURE__ */ new Map()), m = Z(null), b = e && !t, p = W((x) => {
|
|
346
|
+
x.sourceId && h.current.set(x.sourceId, x);
|
|
347
|
+
}, []), g = W((x) => {
|
|
348
|
+
x && h.current.delete(x);
|
|
349
349
|
}, []), d = W(
|
|
350
350
|
(x) => {
|
|
351
351
|
if (!b) return null;
|
|
@@ -401,7 +401,7 @@ function fl({
|
|
|
401
401
|
u(null);
|
|
402
402
|
return;
|
|
403
403
|
}
|
|
404
|
-
const ee =
|
|
404
|
+
const ee = h.current.get(Y.dataset.gentiqReferenceSourceId || "") || vo(Y), N = Y.textContent || "";
|
|
405
405
|
u({
|
|
406
406
|
top: Math.max(8, X.top - 42),
|
|
407
407
|
left: X.left + X.width / 2,
|
|
@@ -438,7 +438,7 @@ function fl({
|
|
|
438
438
|
clearReferences: _,
|
|
439
439
|
focusReference: y,
|
|
440
440
|
registerSource: p,
|
|
441
|
-
unregisterSource:
|
|
441
|
+
unregisterSource: g,
|
|
442
442
|
enabled: e
|
|
443
443
|
}),
|
|
444
444
|
[
|
|
@@ -448,7 +448,7 @@ function fl({
|
|
|
448
448
|
_,
|
|
449
449
|
y,
|
|
450
450
|
p,
|
|
451
|
-
|
|
451
|
+
g,
|
|
452
452
|
e
|
|
453
453
|
]
|
|
454
454
|
);
|
|
@@ -498,7 +498,7 @@ function Qe({
|
|
|
498
498
|
children: o,
|
|
499
499
|
...r
|
|
500
500
|
}) {
|
|
501
|
-
const { t: a } = z(["chat"]), { addReference: l, registerSource: c, unregisterSource: s, enabled: u } = it(),
|
|
501
|
+
const { t: a } = z(["chat"]), { addReference: l, registerSource: c, unregisterSource: s, enabled: u } = it(), h = Z(null), m = Z(`source_${en(8)}`), b = de(
|
|
502
502
|
() => e.sourceId || [e.messageId, e.partIndex, e.kind].filter(Boolean).join("-") || m.current,
|
|
503
503
|
[e.kind, e.messageId, e.partIndex, e.sourceId]
|
|
504
504
|
), p = de(
|
|
@@ -507,8 +507,8 @@ function Qe({
|
|
|
507
507
|
sourceId: b
|
|
508
508
|
}),
|
|
509
509
|
[e, b]
|
|
510
|
-
),
|
|
511
|
-
const d =
|
|
510
|
+
), g = W(() => {
|
|
511
|
+
const d = h.current?.textContent || "";
|
|
512
512
|
return {
|
|
513
513
|
...p,
|
|
514
514
|
metadata: {
|
|
@@ -517,10 +517,10 @@ function Qe({
|
|
|
517
517
|
}
|
|
518
518
|
};
|
|
519
519
|
}, [p]);
|
|
520
|
-
return V(() => (c(
|
|
520
|
+
return V(() => (c(g()), () => s(b)), [c, s, g, b]), /* @__PURE__ */ k(
|
|
521
521
|
"div",
|
|
522
522
|
{
|
|
523
|
-
ref:
|
|
523
|
+
ref: h,
|
|
524
524
|
className: v("group/reference relative rounded-md transition-colors", n),
|
|
525
525
|
"data-gentiq-reference-source-id": b,
|
|
526
526
|
"data-gentiq-reference-kind": p.kind,
|
|
@@ -538,7 +538,7 @@ function Qe({
|
|
|
538
538
|
type: "button",
|
|
539
539
|
className: "absolute right-1.5 top-1.5 z-10 flex size-7 items-center justify-center rounded-lg bg-background/90 text-muted-foreground opacity-0 shadow-sm ring-1 ring-border/60 backdrop-blur transition hover:text-foreground group-hover/reference:opacity-100 focus-visible:opacity-100",
|
|
540
540
|
onClick: (d) => {
|
|
541
|
-
d.stopPropagation(), l(
|
|
541
|
+
d.stopPropagation(), l(g());
|
|
542
542
|
},
|
|
543
543
|
"aria-label": a("reference"),
|
|
544
544
|
title: a("reference"),
|
|
@@ -600,12 +600,12 @@ function To(e) {
|
|
|
600
600
|
function Co({ part: e, disabled: t, onAnswer: n }) {
|
|
601
601
|
const o = de(() => fe(e.data), [e.data]), [r, a] = P(""), [l, c] = P(null), [s, u] = P(!1);
|
|
602
602
|
if (!o) return null;
|
|
603
|
-
const
|
|
604
|
-
const
|
|
605
|
-
if (!(!
|
|
606
|
-
u(!0), c(
|
|
603
|
+
const h = t || s || l !== null || !n, m = async (p) => {
|
|
604
|
+
const g = p.trim();
|
|
605
|
+
if (!(!g || h)) {
|
|
606
|
+
u(!0), c(g);
|
|
607
607
|
try {
|
|
608
|
-
await n?.(
|
|
608
|
+
await n?.(g);
|
|
609
609
|
} catch {
|
|
610
610
|
c(null), u(!1);
|
|
611
611
|
return;
|
|
@@ -618,19 +618,19 @@ function Co({ part: e, disabled: t, onAnswer: n }) {
|
|
|
618
618
|
return /* @__PURE__ */ i("div", { className: "my-3 flex w-full justify-start animate-in-bubble", children: /* @__PURE__ */ k("div", { className: "w-full max-w-xl rounded-xl border border-border/70 bg-card/90 p-3.5 shadow-sm", children: [
|
|
619
619
|
/* @__PURE__ */ i("div", { className: "text-sm font-semibold leading-snug text-foreground", dir: "auto", children: o.question }),
|
|
620
620
|
/* @__PURE__ */ i("div", { className: "mt-3 grid gap-2", children: o.choices.map((p) => {
|
|
621
|
-
const
|
|
621
|
+
const g = l === p.label;
|
|
622
622
|
return /* @__PURE__ */ k(
|
|
623
623
|
"button",
|
|
624
624
|
{
|
|
625
625
|
type: "button",
|
|
626
|
-
disabled:
|
|
626
|
+
disabled: h,
|
|
627
627
|
onClick: () => {
|
|
628
628
|
m(p.label);
|
|
629
629
|
},
|
|
630
630
|
className: v(
|
|
631
631
|
"group flex min-h-10 w-full items-center justify-between gap-3 rounded-lg border border-border/65 bg-muted/25 px-3 py-2 text-left text-sm transition",
|
|
632
632
|
"hover:border-primary/35 hover:bg-primary/8 focus-visible:ring-2 focus-visible:ring-primary/30 disabled:cursor-not-allowed disabled:opacity-70",
|
|
633
|
-
|
|
633
|
+
g && "border-primary/45 bg-primary/10 text-primary"
|
|
634
634
|
),
|
|
635
635
|
children: [
|
|
636
636
|
/* @__PURE__ */ i("span", { className: "min-w-0 flex-1 leading-snug", dir: "auto", children: p.label }),
|
|
@@ -639,9 +639,9 @@ function Co({ part: e, disabled: t, onAnswer: n }) {
|
|
|
639
639
|
{
|
|
640
640
|
className: v(
|
|
641
641
|
"flex size-5 shrink-0 items-center justify-center rounded-full border border-border/70 text-transparent transition",
|
|
642
|
-
|
|
642
|
+
g && "border-primary bg-primary text-primary-foreground"
|
|
643
643
|
),
|
|
644
|
-
children: /* @__PURE__ */ i(
|
|
644
|
+
children: /* @__PURE__ */ i(Le, { className: "size-3.5" })
|
|
645
645
|
}
|
|
646
646
|
)
|
|
647
647
|
]
|
|
@@ -654,7 +654,7 @@ function Co({ part: e, disabled: t, onAnswer: n }) {
|
|
|
654
654
|
"input",
|
|
655
655
|
{
|
|
656
656
|
value: r,
|
|
657
|
-
disabled:
|
|
657
|
+
disabled: h,
|
|
658
658
|
onChange: (p) => a(p.target.value),
|
|
659
659
|
placeholder: "Other",
|
|
660
660
|
className: "min-h-10 min-w-0 flex-1 rounded-lg border border-input bg-background px-3 text-sm outline-none transition placeholder:text-muted-foreground/70 focus-visible:ring-2 focus-visible:ring-primary/30 disabled:cursor-not-allowed disabled:opacity-70"
|
|
@@ -664,7 +664,7 @@ function Co({ part: e, disabled: t, onAnswer: n }) {
|
|
|
664
664
|
"button",
|
|
665
665
|
{
|
|
666
666
|
type: "submit",
|
|
667
|
-
disabled:
|
|
667
|
+
disabled: h || !r.trim(),
|
|
668
668
|
className: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-primary text-primary-foreground transition hover:bg-primary/90 focus-visible:ring-2 focus-visible:ring-primary/30 disabled:cursor-not-allowed disabled:opacity-50",
|
|
669
669
|
"aria-label": "Send custom answer",
|
|
670
670
|
title: "Send custom answer",
|
|
@@ -685,11 +685,11 @@ function Ao(e) {
|
|
|
685
685
|
conversationId: c,
|
|
686
686
|
isFinished: s,
|
|
687
687
|
renderMessagePart: u,
|
|
688
|
-
chat:
|
|
688
|
+
chat: h,
|
|
689
689
|
readonly: m
|
|
690
690
|
} = e, { showToolDetails: b } = _o(), {
|
|
691
691
|
TextPart: p,
|
|
692
|
-
ReasoningPart:
|
|
692
|
+
ReasoningPart: g,
|
|
693
693
|
ToolPart: d,
|
|
694
694
|
FilePart: w,
|
|
695
695
|
ReferencePart: _,
|
|
@@ -697,7 +697,7 @@ function Ao(e) {
|
|
|
697
697
|
toolComponents: T,
|
|
698
698
|
referenceAdapters: x,
|
|
699
699
|
threadActions: C
|
|
700
|
-
} =
|
|
700
|
+
} = he(), { feedback: O, handleFeedback: U, copy: q } = bo(n, c), I = (N) => {
|
|
701
701
|
if (N.toolName) return N.toolName;
|
|
702
702
|
if (typeof N.type == "string" && N.type.startsWith("tool-")) {
|
|
703
703
|
const S = N.type.slice(5);
|
|
@@ -707,25 +707,25 @@ function Ao(e) {
|
|
|
707
707
|
const S = N.output;
|
|
708
708
|
if (typeof S == "string") return S;
|
|
709
709
|
if (S && typeof S == "object") {
|
|
710
|
-
const
|
|
711
|
-
if (
|
|
710
|
+
const D = Object.values(S).filter((Q) => ["string", "number", "boolean"].includes(typeof Q)).slice(0, 3).map(String);
|
|
711
|
+
if (D.length > 0) return D.join(" · ");
|
|
712
712
|
}
|
|
713
|
-
const
|
|
714
|
-
if (
|
|
715
|
-
const
|
|
716
|
-
if (
|
|
713
|
+
const L = N.input;
|
|
714
|
+
if (L && typeof L == "object") {
|
|
715
|
+
const D = Object.values(L).filter((Q) => ["string", "number", "boolean"].includes(typeof Q)).slice(0, 3).map(String);
|
|
716
|
+
if (D.length > 0) return D.join(" · ");
|
|
717
717
|
}
|
|
718
718
|
return I(N) || "Tool result";
|
|
719
719
|
}, Y = (N, S) => {
|
|
720
|
-
const
|
|
720
|
+
const D = (S ? x?.[S] : void 0)?.({ part: t, message: n, toolName: S, chat: h }) || {};
|
|
721
721
|
return {
|
|
722
722
|
...N,
|
|
723
|
-
...
|
|
724
|
-
sourceId:
|
|
725
|
-
messageId:
|
|
726
|
-
partIndex:
|
|
727
|
-
role:
|
|
728
|
-
kind:
|
|
723
|
+
...D,
|
|
724
|
+
sourceId: D.sourceId || N.sourceId,
|
|
725
|
+
messageId: D.messageId || N.messageId,
|
|
726
|
+
partIndex: D.partIndex ?? N.partIndex,
|
|
727
|
+
role: D.role || N.role,
|
|
728
|
+
kind: D.kind || N.kind
|
|
729
729
|
};
|
|
730
730
|
};
|
|
731
731
|
if (u) {
|
|
@@ -748,7 +748,7 @@ function Ao(e) {
|
|
|
748
748
|
part: t,
|
|
749
749
|
message: n,
|
|
750
750
|
disabled: m || !l || !s || o !== "ready",
|
|
751
|
-
onAnswer:
|
|
751
|
+
onAnswer: h?.sendMessage
|
|
752
752
|
}
|
|
753
753
|
) : null;
|
|
754
754
|
const X = n.parts.filter(
|
|
@@ -783,13 +783,13 @@ function Ao(e) {
|
|
|
783
783
|
}
|
|
784
784
|
},
|
|
785
785
|
ie
|
|
786
|
-
), S = j(t).text || "",
|
|
787
|
-
if (!
|
|
786
|
+
), S = j(t).text || "", L = To(S);
|
|
787
|
+
if (!L.some((G) => G.type === "choice-question"))
|
|
788
788
|
return N(S, "text");
|
|
789
789
|
const Pe = n.parts.some(
|
|
790
790
|
(G) => G.type === "data-choice-question"
|
|
791
|
-
) ? -1 :
|
|
792
|
-
return /* @__PURE__ */ i(oe, { children:
|
|
791
|
+
) ? -1 : L.findIndex((G) => G.type === "choice-question");
|
|
792
|
+
return /* @__PURE__ */ i(oe, { children: L.map((G, ie) => G.type === "text" ? N(G.text, `text-${ie}`) : ie !== Pe ? null : /* @__PURE__ */ i(
|
|
793
793
|
y,
|
|
794
794
|
{
|
|
795
795
|
part: {
|
|
@@ -798,14 +798,14 @@ function Ao(e) {
|
|
|
798
798
|
},
|
|
799
799
|
message: n,
|
|
800
800
|
disabled: m || !l || !s || o !== "ready",
|
|
801
|
-
onAnswer:
|
|
801
|
+
onAnswer: h?.sendMessage
|
|
802
802
|
},
|
|
803
803
|
`choice-${ie}`
|
|
804
804
|
)) });
|
|
805
805
|
}
|
|
806
806
|
if (t.type === "reasoning")
|
|
807
807
|
return /* @__PURE__ */ i(
|
|
808
|
-
|
|
808
|
+
g,
|
|
809
809
|
{
|
|
810
810
|
part: t,
|
|
811
811
|
status: o,
|
|
@@ -837,7 +837,7 @@ function Ao(e) {
|
|
|
837
837
|
{
|
|
838
838
|
part: t,
|
|
839
839
|
message: n,
|
|
840
|
-
chat:
|
|
840
|
+
chat: h,
|
|
841
841
|
toolComponents: T,
|
|
842
842
|
showToolCalls: !!b
|
|
843
843
|
}
|
|
@@ -877,7 +877,7 @@ const ze = ({ className: e, ...t }) => /* @__PURE__ */ i("div", { className: v("
|
|
|
877
877
|
},
|
|
878
878
|
n
|
|
879
879
|
)) }), Io = /[\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC]/;
|
|
880
|
-
function
|
|
880
|
+
function De(e, t = "ltr") {
|
|
881
881
|
if (!e) return t;
|
|
882
882
|
for (const n of e) {
|
|
883
883
|
if (Io.test(n))
|
|
@@ -930,14 +930,14 @@ const Oo = ({ className: e, ...t }) => /* @__PURE__ */ i(
|
|
|
930
930
|
role: "log",
|
|
931
931
|
...t
|
|
932
932
|
}
|
|
933
|
-
),
|
|
933
|
+
), Lo = ({ className: e, ...t }) => /* @__PURE__ */ i(
|
|
934
934
|
tn.Content,
|
|
935
935
|
{
|
|
936
936
|
className: v("p-4 pb-6 stick-to-bottom", e),
|
|
937
937
|
scrollClassName: "custom-scrollbar",
|
|
938
938
|
...t
|
|
939
939
|
}
|
|
940
|
-
),
|
|
940
|
+
), Do = ({ status: e }) => {
|
|
941
941
|
const { scrollToBottom: t } = nn(), n = Z(e);
|
|
942
942
|
return V(() => {
|
|
943
943
|
e === "submitted" && n.current !== "submitted" && t(), n.current = e;
|
|
@@ -1007,7 +1007,7 @@ const Po = ({ className: e, ...t }) => /* @__PURE__ */ i(lt, { className: v("not
|
|
|
1007
1007
|
const p = j(b);
|
|
1008
1008
|
return p.type === "text" && (p.text || "").trim().length > 0 || p.type === "tool-invocation" || p.type === "tool-call" || p.type === "data-choice-question";
|
|
1009
1009
|
}) && o !== "running")) return null;
|
|
1010
|
-
const u = o === "running",
|
|
1010
|
+
const u = o === "running", h = o === "error", m = De(r);
|
|
1011
1011
|
return /* @__PURE__ */ i(
|
|
1012
1012
|
"div",
|
|
1013
1013
|
{
|
|
@@ -1024,7 +1024,7 @@ const Po = ({ className: e, ...t }) => /* @__PURE__ */ i(lt, { className: v("not
|
|
|
1024
1024
|
),
|
|
1025
1025
|
dir: m,
|
|
1026
1026
|
children: [
|
|
1027
|
-
u ? /* @__PURE__ */ i("div", { className: "size-4 animate-spin rounded-full border-2 border-primary border-r-transparent shrink-0" }) :
|
|
1027
|
+
u ? /* @__PURE__ */ i("div", { className: "size-4 animate-spin rounded-full border-2 border-primary border-r-transparent shrink-0" }) : h ? /* @__PURE__ */ i(be, { className: "size-4 text-destructive shrink-0" }) : /* @__PURE__ */ i(Le, { className: "size-4 text-green-500 shrink-0" }),
|
|
1028
1028
|
/* @__PURE__ */ i("span", { className: v("font-medium", u && "animate-pulse"), children: r })
|
|
1029
1029
|
]
|
|
1030
1030
|
}
|
|
@@ -1043,59 +1043,59 @@ function $o({
|
|
|
1043
1043
|
className: c,
|
|
1044
1044
|
readonly: s
|
|
1045
1045
|
}) {
|
|
1046
|
-
const { i18n: u, t:
|
|
1046
|
+
const { i18n: u, t: h } = z(["chat", "translation"]), m = u.language === "fa", b = e[e.length - 1], p = b?.role === "assistant" && (t === "ready" || b.parts.some((g) => g.type === "data-chat-finished"));
|
|
1047
1047
|
return /* @__PURE__ */ k(Oo, { className: v("min-h-0 flex-1", c), children: [
|
|
1048
|
-
/* @__PURE__ */ i(
|
|
1049
|
-
/* @__PURE__ */ k(
|
|
1050
|
-
e.length === 0 && !n ? null : e.map((
|
|
1048
|
+
/* @__PURE__ */ i(Do, { status: t }),
|
|
1049
|
+
/* @__PURE__ */ k(Lo, { className: "max-w-4xl mx-auto w-full px-4 md:px-0 pb-32", dir: "ltr", children: [
|
|
1050
|
+
e.length === 0 && !n ? null : e.map((g) => /* @__PURE__ */ k(
|
|
1051
1051
|
"div",
|
|
1052
1052
|
{
|
|
1053
|
-
"data-gentiq-message-id":
|
|
1054
|
-
"data-gentiq-message-role":
|
|
1053
|
+
"data-gentiq-message-id": g.id,
|
|
1054
|
+
"data-gentiq-message-role": g.role,
|
|
1055
1055
|
children: [
|
|
1056
|
-
|
|
1056
|
+
g.role === "assistant" && g.parts.filter((d) => d.type === "source-url").length > 0 && /* @__PURE__ */ k(Po, { children: [
|
|
1057
1057
|
/* @__PURE__ */ i(
|
|
1058
1058
|
Mo,
|
|
1059
1059
|
{
|
|
1060
|
-
count:
|
|
1060
|
+
count: g.parts.filter((d) => d.type === "source-url").length
|
|
1061
1061
|
}
|
|
1062
1062
|
),
|
|
1063
|
-
|
|
1063
|
+
g.parts.filter((d) => d.type === "source-url").map((d, w) => {
|
|
1064
1064
|
const _ = j(d).url;
|
|
1065
|
-
return /* @__PURE__ */ i(zo, { children: /* @__PURE__ */ i(Uo, { href: _, title: _ }, `${
|
|
1065
|
+
return /* @__PURE__ */ i(zo, { children: /* @__PURE__ */ i(Uo, { href: _, title: _ }, `${g.id}-${w}`) }, `${g.id}-${w}`);
|
|
1066
1066
|
})
|
|
1067
1067
|
] }),
|
|
1068
|
-
|
|
1068
|
+
g.parts.map((d, w) => /* @__PURE__ */ i(
|
|
1069
1069
|
Ao,
|
|
1070
1070
|
{
|
|
1071
1071
|
part: d,
|
|
1072
|
-
message:
|
|
1072
|
+
message: g,
|
|
1073
1073
|
status: t,
|
|
1074
1074
|
index: w,
|
|
1075
1075
|
regen: a,
|
|
1076
|
-
lastMessage:
|
|
1076
|
+
lastMessage: g.id === e.at(-1)?.id,
|
|
1077
1077
|
conversationId: r,
|
|
1078
1078
|
isFinished: p,
|
|
1079
1079
|
chat: l,
|
|
1080
1080
|
readonly: s
|
|
1081
1081
|
},
|
|
1082
|
-
`${
|
|
1082
|
+
`${g.id}-${w}`
|
|
1083
1083
|
))
|
|
1084
1084
|
]
|
|
1085
1085
|
},
|
|
1086
|
-
|
|
1086
|
+
g.id
|
|
1087
1087
|
)),
|
|
1088
1088
|
(() => {
|
|
1089
1089
|
if (!b || b.role !== "assistant") return null;
|
|
1090
|
-
const
|
|
1091
|
-
if (
|
|
1092
|
-
const d =
|
|
1090
|
+
const g = b.parts.filter((w) => w.type === "data-progress-update");
|
|
1091
|
+
if (g.length === 0) return null;
|
|
1092
|
+
const d = g[g.length - 1];
|
|
1093
1093
|
return d ? /* @__PURE__ */ i(qo, { latestProgress: d, parts: b.parts }) : null;
|
|
1094
1094
|
})(),
|
|
1095
1095
|
(n || t === "submitted") && /* @__PURE__ */ i("div", { className: "animate-in-bubble", children: /* @__PURE__ */ i(ze, {}) }),
|
|
1096
1096
|
t === "streaming" && (() => {
|
|
1097
|
-
const
|
|
1098
|
-
return !
|
|
1097
|
+
const g = e[e.length - 1];
|
|
1098
|
+
return !g || g.role === "user" ? /* @__PURE__ */ i(ze, {}) : g.parts?.some((w) => {
|
|
1099
1099
|
const _ = j(w);
|
|
1100
1100
|
return _.type === "text" && (_.text?.trim().length ?? 0) > 0 || _.type === "reasoning" || _.type === "tool-invocation" || _.type === "tool-call" || _.type === "data-choice-question";
|
|
1101
1101
|
}) ? null : /* @__PURE__ */ i(ze, {});
|
|
@@ -1118,7 +1118,7 @@ function $o({
|
|
|
1118
1118
|
m ? "text-right" : "text-left"
|
|
1119
1119
|
),
|
|
1120
1120
|
children: [
|
|
1121
|
-
/* @__PURE__ */ i("span", { className: "font-semibold", children:
|
|
1121
|
+
/* @__PURE__ */ i("span", { className: "font-semibold", children: h("error") }),
|
|
1122
1122
|
" ",
|
|
1123
1123
|
o.message
|
|
1124
1124
|
]
|
|
@@ -1173,7 +1173,7 @@ const Ho = ({ className: e, ...t }) => /* @__PURE__ */ i("div", { className: "bg
|
|
|
1173
1173
|
const s = c.currentTarget.form;
|
|
1174
1174
|
s && s.requestSubmit();
|
|
1175
1175
|
}
|
|
1176
|
-
}, { i18n: a } = z(["chat"]), l =
|
|
1176
|
+
}, { i18n: a } = z(["chat"]), l = De(o.value, a.dir());
|
|
1177
1177
|
return /* @__PURE__ */ i(
|
|
1178
1178
|
Bo,
|
|
1179
1179
|
{
|
|
@@ -1301,7 +1301,7 @@ function Xo() {
|
|
|
1301
1301
|
}
|
|
1302
1302
|
const Ko = (e) => [e, "currentUser"];
|
|
1303
1303
|
function Qo(e = {}) {
|
|
1304
|
-
const { app: t } =
|
|
1304
|
+
const { app: t } = he(), n = at(), o = t?.cacheNamespace || "gentiq", r = uo({
|
|
1305
1305
|
queryKey: Ko(o),
|
|
1306
1306
|
queryFn: () => n.getMe(),
|
|
1307
1307
|
enabled: e.enabled ?? !0
|
|
@@ -1312,16 +1312,16 @@ function Qo(e = {}) {
|
|
|
1312
1312
|
firstName: l
|
|
1313
1313
|
};
|
|
1314
1314
|
}
|
|
1315
|
-
function
|
|
1315
|
+
function gn({
|
|
1316
1316
|
enabled: e = !0
|
|
1317
1317
|
} = {}) {
|
|
1318
|
-
const { t, i18n: n } = z(["chat", "translation"]), { welcome: o } =
|
|
1318
|
+
const { t, i18n: n } = z(["chat", "translation"]), { welcome: o } = he(), r = typeof o?.greeting == "function", a = typeof o?.typingPrompts == "function", { user: l, firstName: c, isLoading: s } = Qo({
|
|
1319
1319
|
enabled: e && (r || a)
|
|
1320
|
-
}),
|
|
1320
|
+
}), h = (typeof o?.typingPrompts == "function" ? o.typingPrompts({ user: l, firstName: c, isLoading: s, t }) : o?.typingPrompts ?? []).map((g) => t(g)).filter((g) => g !== null && g !== ""), m = o?.greeting, b = typeof m == "function" ? m({ user: l, firstName: c, isLoading: s, t }) : m ? t(m) ?? m : t("welcome.title"), p = o?.subtitle ? t(o.subtitle) : null;
|
|
1321
1321
|
return {
|
|
1322
1322
|
title: b,
|
|
1323
1323
|
subtitle: p,
|
|
1324
|
-
typingMessages:
|
|
1324
|
+
typingMessages: h,
|
|
1325
1325
|
isRtl: n.dir() === "rtl",
|
|
1326
1326
|
icon: o?.icon
|
|
1327
1327
|
};
|
|
@@ -1330,30 +1330,30 @@ const Zo = () => typeof window < "u" && typeof window.matchMedia == "function" &
|
|
|
1330
1330
|
function Jo(e, t = {}) {
|
|
1331
1331
|
const { typingSpeed: n = 20, deletingSpeed: o = 15, pauseMs: r = 2e3, startDelayMs: a = 250 } = t, l = e.join("\0"), [c, s] = P(""), u = Z(e);
|
|
1332
1332
|
return u.current = e, V(() => {
|
|
1333
|
-
const
|
|
1334
|
-
if (
|
|
1333
|
+
const h = u.current;
|
|
1334
|
+
if (h.length === 0) {
|
|
1335
1335
|
s("");
|
|
1336
1336
|
return;
|
|
1337
1337
|
}
|
|
1338
|
-
let m, b = 0, p = "typing",
|
|
1338
|
+
let m, b = 0, p = "typing", g = 0;
|
|
1339
1339
|
if (Zo()) {
|
|
1340
|
-
s(
|
|
1340
|
+
s(h[0]);
|
|
1341
1341
|
const _ = setInterval(() => {
|
|
1342
|
-
b = (b + 1) %
|
|
1342
|
+
b = (b + 1) % h.length, s(h[b]);
|
|
1343
1343
|
}, r);
|
|
1344
1344
|
return () => clearInterval(_);
|
|
1345
1345
|
}
|
|
1346
1346
|
const w = () => {
|
|
1347
|
-
const _ =
|
|
1347
|
+
const _ = h[b];
|
|
1348
1348
|
if (p === "typing") {
|
|
1349
|
-
|
|
1349
|
+
g++, s(_.slice(0, g)), g >= _.length ? (p = "pausing", m = setTimeout(w, r)) : m = setTimeout(w, n);
|
|
1350
1350
|
return;
|
|
1351
1351
|
}
|
|
1352
1352
|
if (p === "pausing") {
|
|
1353
1353
|
p = "deleting", m = setTimeout(w, o);
|
|
1354
1354
|
return;
|
|
1355
1355
|
}
|
|
1356
|
-
|
|
1356
|
+
g--, s(_.slice(0, Math.max(g, 0))), g <= 0 ? (p = "typing", b = (b + 1) % h.length, m = setTimeout(w, n)) : m = setTimeout(w, o);
|
|
1357
1357
|
};
|
|
1358
1358
|
return s(""), m = setTimeout(w, a), () => clearTimeout(m);
|
|
1359
1359
|
}, [l, n, o, r, a]), c;
|
|
@@ -1368,7 +1368,7 @@ function er({
|
|
|
1368
1368
|
newChat: l,
|
|
1369
1369
|
className: c
|
|
1370
1370
|
}) {
|
|
1371
|
-
const { t: s } = z(["chat", "translation"]), { composer: u } =
|
|
1371
|
+
const { t: s } = z(["chat", "translation"]), { composer: u } = he(), { typingMessages: h } = gn({ enabled: !!l }), m = Jo(l ? h : []), b = !!l && h.length > 0, p = u?.placeholder ? s(u.placeholder) : s("input_placeholder"), g = b ? m : p, [d, w] = P(""), [_, y] = P([]), T = Xo(), {
|
|
1372
1372
|
references: x,
|
|
1373
1373
|
removeReference: C,
|
|
1374
1374
|
clearReferences: O,
|
|
@@ -1385,22 +1385,22 @@ function er({
|
|
|
1385
1385
|
const Se = W(
|
|
1386
1386
|
(S) => {
|
|
1387
1387
|
if (S.target.files) {
|
|
1388
|
-
const
|
|
1389
|
-
if (
|
|
1390
|
-
so.error(s("file_too_large", { size:
|
|
1388
|
+
const L = Array.from(S.target.files), D = u?.attachments?.maxSize;
|
|
1389
|
+
if (D && L.filter((Pe) => Pe.size > D).length > 0) {
|
|
1390
|
+
so.error(s("file_too_large", { size: D }));
|
|
1391
1391
|
return;
|
|
1392
1392
|
}
|
|
1393
|
-
y((Q) => [...Q, ...
|
|
1393
|
+
y((Q) => [...Q, ...L]);
|
|
1394
1394
|
}
|
|
1395
1395
|
S.target.value = "";
|
|
1396
1396
|
},
|
|
1397
1397
|
[u, s]
|
|
1398
1398
|
), X = W((S) => {
|
|
1399
|
-
y((
|
|
1399
|
+
y((L) => L.filter((D, Q) => Q !== S));
|
|
1400
1400
|
}, []), ee = t === "streaming" && !n, N = (S) => {
|
|
1401
1401
|
if (S.preventDefault(), !ee && (d.trim() || _.length > 0 || x.length > 0)) {
|
|
1402
|
-
const
|
|
1403
|
-
_.forEach((
|
|
1402
|
+
const L = new DataTransfer();
|
|
1403
|
+
_.forEach((D) => L.items.add(D)), e(d, L.files, x), w(""), y([]), O();
|
|
1404
1404
|
}
|
|
1405
1405
|
};
|
|
1406
1406
|
return /* @__PURE__ */ i("div", { className: v("shrink-0 px-4 pb-5 pt-2 md:px-6 md:pb-6 w-full", c), children: /* @__PURE__ */ i("div", { className: "max-w-[50rem] mx-auto w-full", children: /* @__PURE__ */ k(Ho, { onSubmit: N, children: [
|
|
@@ -1438,8 +1438,8 @@ function er({
|
|
|
1438
1438
|
"button",
|
|
1439
1439
|
{
|
|
1440
1440
|
type: "button",
|
|
1441
|
-
onClick: (
|
|
1442
|
-
|
|
1441
|
+
onClick: (L) => {
|
|
1442
|
+
L.stopPropagation(), C(S.id);
|
|
1443
1443
|
},
|
|
1444
1444
|
className: "ml-0.5 flex size-4 shrink-0 items-center justify-center rounded-full text-muted-foreground/60 transition hover:bg-destructive/15 hover:text-destructive",
|
|
1445
1445
|
"aria-label": `${s("remove_reference")}: ${S.excerpt}`,
|
|
@@ -1451,7 +1451,7 @@ function er({
|
|
|
1451
1451
|
},
|
|
1452
1452
|
S.id
|
|
1453
1453
|
)) }),
|
|
1454
|
-
_.length > 0 && /* @__PURE__ */ i("div", { className: "flex flex-wrap gap-2 px-2 pt-2", children: _.map((S,
|
|
1454
|
+
_.length > 0 && /* @__PURE__ */ i("div", { className: "flex flex-wrap gap-2 px-2 pt-2", children: _.map((S, L) => /* @__PURE__ */ k(
|
|
1455
1455
|
"div",
|
|
1456
1456
|
{
|
|
1457
1457
|
className: "group relative flex items-center gap-2 rounded-xl glass-surface px-2.5 py-1.5 text-sm shadow-sm",
|
|
@@ -1469,7 +1469,7 @@ function er({
|
|
|
1469
1469
|
"button",
|
|
1470
1470
|
{
|
|
1471
1471
|
type: "button",
|
|
1472
|
-
onClick: () => X(
|
|
1472
|
+
onClick: () => X(L),
|
|
1473
1473
|
className: "ml-0.5 flex items-center justify-center size-4 rounded-full hover:bg-destructive/15 text-muted-foreground/60 hover:text-destructive transition-all duration-150",
|
|
1474
1474
|
"aria-label": `${s("remove_file")}: ${S.name}`,
|
|
1475
1475
|
children: /* @__PURE__ */ i(be, { className: "size-2.5" })
|
|
@@ -1477,7 +1477,7 @@ function er({
|
|
|
1477
1477
|
)
|
|
1478
1478
|
]
|
|
1479
1479
|
},
|
|
1480
|
-
`${S.name}-${
|
|
1480
|
+
`${S.name}-${L}`
|
|
1481
1481
|
)) }),
|
|
1482
1482
|
/* @__PURE__ */ i(
|
|
1483
1483
|
jo,
|
|
@@ -1486,7 +1486,7 @@ function er({
|
|
|
1486
1486
|
onChange: (S) => w(S.target.value),
|
|
1487
1487
|
value: d,
|
|
1488
1488
|
autoFocus: !T,
|
|
1489
|
-
placeholder:
|
|
1489
|
+
placeholder: g,
|
|
1490
1490
|
"aria-label": s("input_placeholder"),
|
|
1491
1491
|
"aria-busy": ee
|
|
1492
1492
|
}
|
|
@@ -1521,7 +1521,7 @@ function er({
|
|
|
1521
1521
|
] }) }) });
|
|
1522
1522
|
}
|
|
1523
1523
|
const tr = (e) => {
|
|
1524
|
-
const { title: t, subtitle: n, isRtl: o, icon: r } =
|
|
1524
|
+
const { title: t, subtitle: n, isRtl: o, icon: r } = gn();
|
|
1525
1525
|
return /* @__PURE__ */ k(
|
|
1526
1526
|
"div",
|
|
1527
1527
|
{
|
|
@@ -1539,7 +1539,7 @@ const tr = (e) => {
|
|
|
1539
1539
|
]
|
|
1540
1540
|
}
|
|
1541
1541
|
);
|
|
1542
|
-
},
|
|
1542
|
+
}, hn = ({ className: e, from: t, ...n }) => /* @__PURE__ */ i(
|
|
1543
1543
|
"div",
|
|
1544
1544
|
{
|
|
1545
1545
|
className: v(
|
|
@@ -1717,7 +1717,7 @@ ut.prototype.defined = !0;
|
|
|
1717
1717
|
function kt(e, t, n) {
|
|
1718
1718
|
n && (e[t] = n);
|
|
1719
1719
|
}
|
|
1720
|
-
function
|
|
1720
|
+
function ge(e) {
|
|
1721
1721
|
const t = {}, n = {};
|
|
1722
1722
|
for (const [o, r] of Object.entries(e.properties)) {
|
|
1723
1723
|
const a = new ut(
|
|
@@ -1730,7 +1730,7 @@ function he(e) {
|
|
|
1730
1730
|
}
|
|
1731
1731
|
return new xe(t, n, e.space);
|
|
1732
1732
|
}
|
|
1733
|
-
const bn =
|
|
1733
|
+
const bn = ge({
|
|
1734
1734
|
properties: {
|
|
1735
1735
|
ariaActiveDescendant: null,
|
|
1736
1736
|
ariaAtomic: F,
|
|
@@ -1792,7 +1792,7 @@ function yn(e, t) {
|
|
|
1792
1792
|
function _n(e, t) {
|
|
1793
1793
|
return yn(e, t.toLowerCase());
|
|
1794
1794
|
}
|
|
1795
|
-
const rr =
|
|
1795
|
+
const rr = ge({
|
|
1796
1796
|
attributes: {
|
|
1797
1797
|
acceptcharset: "accept-charset",
|
|
1798
1798
|
classname: "class",
|
|
@@ -2153,7 +2153,7 @@ const rr = he({
|
|
|
2153
2153
|
},
|
|
2154
2154
|
space: "html",
|
|
2155
2155
|
transform: _n
|
|
2156
|
-
}), ar =
|
|
2156
|
+
}), ar = ge({
|
|
2157
2157
|
attributes: {
|
|
2158
2158
|
accentHeight: "accent-height",
|
|
2159
2159
|
alignmentBaseline: "alignment-baseline",
|
|
@@ -2712,7 +2712,7 @@ const rr = he({
|
|
|
2712
2712
|
},
|
|
2713
2713
|
space: "svg",
|
|
2714
2714
|
transform: yn
|
|
2715
|
-
}), vn =
|
|
2715
|
+
}), vn = ge({
|
|
2716
2716
|
properties: {
|
|
2717
2717
|
xLinkActuate: null,
|
|
2718
2718
|
xLinkArcRole: null,
|
|
@@ -2726,12 +2726,12 @@ const rr = he({
|
|
|
2726
2726
|
transform(e, t) {
|
|
2727
2727
|
return "xlink:" + t.slice(5).toLowerCase();
|
|
2728
2728
|
}
|
|
2729
|
-
}), kn =
|
|
2729
|
+
}), kn = ge({
|
|
2730
2730
|
attributes: { xmlnsxlink: "xmlns:xlink" },
|
|
2731
2731
|
properties: { xmlnsXLink: null, xmlns: null },
|
|
2732
2732
|
space: "xmlns",
|
|
2733
2733
|
transform: _n
|
|
2734
|
-
}), wn =
|
|
2734
|
+
}), wn = ge({
|
|
2735
2735
|
properties: { xmlBase: null, xmlLang: null, xmlSpace: null },
|
|
2736
2736
|
space: "xml",
|
|
2737
2737
|
transform(e, t) {
|
|
@@ -2776,7 +2776,7 @@ function xt(e) {
|
|
|
2776
2776
|
return t;
|
|
2777
2777
|
}
|
|
2778
2778
|
const St = /[#.]/g;
|
|
2779
|
-
function
|
|
2779
|
+
function gr(e, t) {
|
|
2780
2780
|
const n = e || "", o = {};
|
|
2781
2781
|
let r = 0, a, l;
|
|
2782
2782
|
for (; r < n.length; ) {
|
|
@@ -2808,9 +2808,9 @@ function xn(e, t, n) {
|
|
|
2808
2808
|
);
|
|
2809
2809
|
c.unshift(u);
|
|
2810
2810
|
} else {
|
|
2811
|
-
s =
|
|
2812
|
-
const u = s.tagName.toLowerCase(),
|
|
2813
|
-
if (s.tagName =
|
|
2811
|
+
s = gr(a, t);
|
|
2812
|
+
const u = s.tagName.toLowerCase(), h = o ? o.get(u) : void 0;
|
|
2813
|
+
if (s.tagName = h || u, hr(l))
|
|
2814
2814
|
c.unshift(l);
|
|
2815
2815
|
else
|
|
2816
2816
|
for (const [m, b] of Object.entries(l))
|
|
@@ -2822,7 +2822,7 @@ function xn(e, t, n) {
|
|
|
2822
2822
|
}
|
|
2823
2823
|
return r;
|
|
2824
2824
|
}
|
|
2825
|
-
function
|
|
2825
|
+
function hr(e) {
|
|
2826
2826
|
if (e === null || typeof e != "object" || Array.isArray(e))
|
|
2827
2827
|
return !0;
|
|
2828
2828
|
if (typeof e.type != "string") return !1;
|
|
@@ -3109,7 +3109,7 @@ function Rr(e) {
|
|
|
3109
3109
|
function Fe(e) {
|
|
3110
3110
|
return t;
|
|
3111
3111
|
function t(n, o, r) {
|
|
3112
|
-
return !!(
|
|
3112
|
+
return !!(Lr(n) && e.call(
|
|
3113
3113
|
this,
|
|
3114
3114
|
n,
|
|
3115
3115
|
typeof o == "number" ? o : void 0,
|
|
@@ -3120,7 +3120,7 @@ function Fe(e) {
|
|
|
3120
3120
|
function Or() {
|
|
3121
3121
|
return !0;
|
|
3122
3122
|
}
|
|
3123
|
-
function
|
|
3123
|
+
function Lr(e) {
|
|
3124
3124
|
return e !== null && typeof e == "object" && "type" in e;
|
|
3125
3125
|
}
|
|
3126
3126
|
const Ct = (
|
|
@@ -3170,13 +3170,13 @@ const Ct = (
|
|
|
3170
3170
|
if (typeof e == "string")
|
|
3171
3171
|
return Fr(e);
|
|
3172
3172
|
if (typeof e == "object")
|
|
3173
|
-
return
|
|
3173
|
+
return Dr(e);
|
|
3174
3174
|
if (typeof e == "function")
|
|
3175
3175
|
return pt(e);
|
|
3176
3176
|
throw new Error("Expected function, string, or array as `test`");
|
|
3177
3177
|
})
|
|
3178
3178
|
);
|
|
3179
|
-
function
|
|
3179
|
+
function Dr(e) {
|
|
3180
3180
|
const t = [];
|
|
3181
3181
|
let n = -1;
|
|
3182
3182
|
for (; ++n < e.length; )
|
|
@@ -3338,9 +3338,9 @@ function qr(e, t) {
|
|
|
3338
3338
|
const s = [];
|
|
3339
3339
|
let u;
|
|
3340
3340
|
for (c = -1; ++c < l.length; ) {
|
|
3341
|
-
const
|
|
3342
|
-
typeof
|
|
3343
|
-
`.repeat(u) || " "), u = -1, s.push(
|
|
3341
|
+
const h = l[c];
|
|
3342
|
+
typeof h == "number" ? u !== void 0 && h > u && (u = h) : h && (u !== void 0 && u > -1 && s.push(`
|
|
3343
|
+
`.repeat(u) || " "), u = -1, s.push(h));
|
|
3344
3344
|
}
|
|
3345
3345
|
return s.join("");
|
|
3346
3346
|
}
|
|
@@ -3433,13 +3433,13 @@ function Gr(e) {
|
|
|
3433
3433
|
function Wr(e) {
|
|
3434
3434
|
return e.tagName === "dialog" && !(e.properties || {}).open;
|
|
3435
3435
|
}
|
|
3436
|
-
const In = [], Vr = !0,
|
|
3436
|
+
const In = [], Vr = !0, Lt = !1, Rn = "skip";
|
|
3437
3437
|
function Yr(e, t, n, o) {
|
|
3438
3438
|
let r;
|
|
3439
3439
|
r = t;
|
|
3440
3440
|
const a = dt(r), l = 1;
|
|
3441
3441
|
c(e, void 0, [])();
|
|
3442
|
-
function c(s, u,
|
|
3442
|
+
function c(s, u, h) {
|
|
3443
3443
|
const m = (
|
|
3444
3444
|
/** @type {Record<string, unknown>} */
|
|
3445
3445
|
s && typeof s == "object" ? s : {}
|
|
@@ -3458,8 +3458,8 @@ function Yr(e, t, n, o) {
|
|
|
3458
3458
|
}
|
|
3459
3459
|
return b;
|
|
3460
3460
|
function b() {
|
|
3461
|
-
let p = In,
|
|
3462
|
-
if (a(s, u,
|
|
3461
|
+
let p = In, g, d, w;
|
|
3462
|
+
if (a(s, u, h[h.length - 1] || void 0) && (p = Xr(n(s, h)), p[0] === Lt))
|
|
3463
3463
|
return p;
|
|
3464
3464
|
if ("children" in s && s.children) {
|
|
3465
3465
|
const _ = (
|
|
@@ -3467,11 +3467,11 @@ function Yr(e, t, n, o) {
|
|
|
3467
3467
|
s
|
|
3468
3468
|
);
|
|
3469
3469
|
if (_.children && p[0] !== Rn)
|
|
3470
|
-
for (d = -1 + l, w =
|
|
3470
|
+
for (d = -1 + l, w = h.concat(_); d > -1 && d < _.children.length; ) {
|
|
3471
3471
|
const y = _.children[d];
|
|
3472
|
-
if (
|
|
3473
|
-
return
|
|
3474
|
-
d = typeof
|
|
3472
|
+
if (g = c(y, d, w)(), g[0] === Lt)
|
|
3473
|
+
return g;
|
|
3474
|
+
d = typeof g[1] == "number" ? g[1] : d + l;
|
|
3475
3475
|
}
|
|
3476
3476
|
}
|
|
3477
3477
|
return p;
|
|
@@ -3487,17 +3487,17 @@ function Zr(e) {
|
|
|
3487
3487
|
return function(n, o) {
|
|
3488
3488
|
Yr(n, "element", function(r, a) {
|
|
3489
3489
|
const l = Array.isArray(r.properties.className) ? r.properties.className : Qr, c = l.includes("language-math"), s = l.includes("math-display"), u = l.includes("math-inline");
|
|
3490
|
-
let
|
|
3490
|
+
let h = s;
|
|
3491
3491
|
if (!c && !s && !u)
|
|
3492
3492
|
return;
|
|
3493
3493
|
let m = a[a.length - 1], b = r;
|
|
3494
|
-
if (r.tagName === "code" && c && m && m.type === "element" && m.tagName === "pre" && (b = m, m = a[a.length - 2],
|
|
3494
|
+
if (r.tagName === "code" && c && m && m.type === "element" && m.tagName === "pre" && (b = m, m = a[a.length - 2], h = !0), !m) return;
|
|
3495
3495
|
const p = qr(b, { whitespace: "pre" });
|
|
3496
|
-
let
|
|
3496
|
+
let g;
|
|
3497
3497
|
try {
|
|
3498
|
-
|
|
3498
|
+
g = gt.renderToString(p, {
|
|
3499
3499
|
...t,
|
|
3500
|
-
displayMode:
|
|
3500
|
+
displayMode: h,
|
|
3501
3501
|
throwOnError: !0
|
|
3502
3502
|
});
|
|
3503
3503
|
} catch (w) {
|
|
@@ -3513,14 +3513,14 @@ function Zr(e) {
|
|
|
3513
3513
|
source: "rehype-katex"
|
|
3514
3514
|
});
|
|
3515
3515
|
try {
|
|
3516
|
-
|
|
3516
|
+
g = gt.renderToString(p, {
|
|
3517
3517
|
...t,
|
|
3518
|
-
displayMode:
|
|
3518
|
+
displayMode: h,
|
|
3519
3519
|
strict: "ignore",
|
|
3520
3520
|
throwOnError: !1
|
|
3521
3521
|
});
|
|
3522
3522
|
} catch {
|
|
3523
|
-
|
|
3523
|
+
g = [
|
|
3524
3524
|
{
|
|
3525
3525
|
type: "element",
|
|
3526
3526
|
tagName: "span",
|
|
@@ -3534,10 +3534,10 @@ function Zr(e) {
|
|
|
3534
3534
|
];
|
|
3535
3535
|
}
|
|
3536
3536
|
}
|
|
3537
|
-
typeof
|
|
3538
|
-
Tr(
|
|
3537
|
+
typeof g == "string" && (g = /** @type {Array<ElementContent>} */
|
|
3538
|
+
Tr(g).children);
|
|
3539
3539
|
const d = m.children.indexOf(b);
|
|
3540
|
-
return m.children.splice(d, 1, ...
|
|
3540
|
+
return m.children.splice(d, 1, ...g), Rn;
|
|
3541
3541
|
});
|
|
3542
3542
|
};
|
|
3543
3543
|
}
|
|
@@ -3592,11 +3592,11 @@ function ea() {
|
|
|
3592
3592
|
this.data.mathFlowInside || (this.buffer(), this.data.mathFlowInside = !0);
|
|
3593
3593
|
}
|
|
3594
3594
|
function r(s) {
|
|
3595
|
-
const u = this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""),
|
|
3596
|
-
|
|
3595
|
+
const u = this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), h = this.stack[this.stack.length - 1];
|
|
3596
|
+
h.type, this.exit(s), h.value = u;
|
|
3597
3597
|
const m = (
|
|
3598
3598
|
/** @type {HastElement} */
|
|
3599
|
-
|
|
3599
|
+
h.data.hChildren[0]
|
|
3600
3600
|
);
|
|
3601
3601
|
m.type, m.tagName, m.children.push({ type: "text", value: u }), this.data.mathFlowInside = void 0;
|
|
3602
3602
|
}
|
|
@@ -3615,10 +3615,10 @@ function ea() {
|
|
|
3615
3615
|
), this.buffer();
|
|
3616
3616
|
}
|
|
3617
3617
|
function l(s) {
|
|
3618
|
-
const u = this.resume(),
|
|
3619
|
-
|
|
3618
|
+
const u = this.resume(), h = this.stack[this.stack.length - 1];
|
|
3619
|
+
h.type, this.exit(s), h.value = u, /** @type {Array<HastElementContent>} */
|
|
3620
3620
|
// @ts-expect-error: we defined it in `enterMathFlow`.
|
|
3621
|
-
|
|
3621
|
+
h.data.hChildren.push({ type: "text", value: u });
|
|
3622
3622
|
}
|
|
3623
3623
|
function c(s) {
|
|
3624
3624
|
this.config.enter.data.call(this, s), this.config.exit.data.call(this, s);
|
|
@@ -3642,29 +3642,29 @@ function ta(e) {
|
|
|
3642
3642
|
handlers: { math: n, inlineMath: o }
|
|
3643
3643
|
};
|
|
3644
3644
|
function n(a, l, c, s) {
|
|
3645
|
-
const u = a.value || "",
|
|
3646
|
-
let p =
|
|
3645
|
+
const u = a.value || "", h = c.createTracker(s), m = "$".repeat(Math.max(Jr(u, "$") + 1, 2)), b = c.enter("mathFlow");
|
|
3646
|
+
let p = h.move(m);
|
|
3647
3647
|
if (a.meta) {
|
|
3648
|
-
const
|
|
3649
|
-
p +=
|
|
3648
|
+
const g = c.enter("mathFlowMeta");
|
|
3649
|
+
p += h.move(
|
|
3650
3650
|
c.safe(a.meta, {
|
|
3651
3651
|
after: `
|
|
3652
3652
|
`,
|
|
3653
3653
|
before: p,
|
|
3654
3654
|
encode: ["$"],
|
|
3655
|
-
...
|
|
3655
|
+
...h.current()
|
|
3656
3656
|
})
|
|
3657
|
-
),
|
|
3657
|
+
), g();
|
|
3658
3658
|
}
|
|
3659
|
-
return p +=
|
|
3660
|
-
`), u && (p +=
|
|
3661
|
-
`)), p +=
|
|
3659
|
+
return p += h.move(`
|
|
3660
|
+
`), u && (p += h.move(u + `
|
|
3661
|
+
`)), p += h.move(m), b(), p;
|
|
3662
3662
|
}
|
|
3663
3663
|
function o(a, l, c) {
|
|
3664
3664
|
let s = a.value || "", u = 1;
|
|
3665
3665
|
for (t || u++; new RegExp("(^|[^$])" + "\\$".repeat(u) + "([^$]|$)").test(s); )
|
|
3666
3666
|
u++;
|
|
3667
|
-
const
|
|
3667
|
+
const h = "$".repeat(u);
|
|
3668
3668
|
// Contains non-space.
|
|
3669
3669
|
/[^ \r\n]/.test(s) && // Starts with space and ends with space.
|
|
3670
3670
|
(/^[ \r\n]/.test(s) && /[ \r\n]$/.test(s) || // Starts or ends with dollar.
|
|
@@ -3674,13 +3674,13 @@ function ta(e) {
|
|
|
3674
3674
|
const b = c.unsafe[m];
|
|
3675
3675
|
if (!b.atBreak) continue;
|
|
3676
3676
|
const p = c.compilePattern(b);
|
|
3677
|
-
let
|
|
3678
|
-
for (;
|
|
3679
|
-
let d =
|
|
3680
|
-
s.codePointAt(d) === 10 && s.codePointAt(d - 1) === 13 && d--, s = s.slice(0, d) + " " + s.slice(
|
|
3677
|
+
let g;
|
|
3678
|
+
for (; g = p.exec(s); ) {
|
|
3679
|
+
let d = g.index;
|
|
3680
|
+
s.codePointAt(d) === 10 && s.codePointAt(d - 1) === 13 && d--, s = s.slice(0, d) + " " + s.slice(g.index + 1);
|
|
3681
3681
|
}
|
|
3682
3682
|
}
|
|
3683
|
-
return
|
|
3683
|
+
return h + s + h;
|
|
3684
3684
|
}
|
|
3685
3685
|
function r() {
|
|
3686
3686
|
return "$";
|
|
@@ -3689,7 +3689,7 @@ function ta(e) {
|
|
|
3689
3689
|
function ne(e) {
|
|
3690
3690
|
return e !== null && e < -2;
|
|
3691
3691
|
}
|
|
3692
|
-
function
|
|
3692
|
+
function Dt(e) {
|
|
3693
3693
|
return e === -2 || e === -1 || e === 32;
|
|
3694
3694
|
}
|
|
3695
3695
|
function Te(e, t, n, o) {
|
|
@@ -3697,10 +3697,10 @@ function Te(e, t, n, o) {
|
|
|
3697
3697
|
let a = 0;
|
|
3698
3698
|
return l;
|
|
3699
3699
|
function l(s) {
|
|
3700
|
-
return
|
|
3700
|
+
return Dt(s) ? (e.enter(n), c(s)) : t(s);
|
|
3701
3701
|
}
|
|
3702
3702
|
function c(s) {
|
|
3703
|
-
return
|
|
3703
|
+
return Dt(s) && a++ < r ? (e.consume(s), c) : (e.exit(n), t(s));
|
|
3704
3704
|
}
|
|
3705
3705
|
}
|
|
3706
3706
|
const na = {
|
|
@@ -3724,10 +3724,10 @@ function oa(e, t, n) {
|
|
|
3724
3724
|
function u(y) {
|
|
3725
3725
|
return y === null || ne(y) ? m(y) : (e.enter("mathFlowFenceMeta"), e.enter("chunkString", {
|
|
3726
3726
|
contentType: "string"
|
|
3727
|
-
}),
|
|
3727
|
+
}), h(y));
|
|
3728
3728
|
}
|
|
3729
|
-
function
|
|
3730
|
-
return y === null || ne(y) ? (e.exit("chunkString"), e.exit("mathFlowFenceMeta"), m(y)) : y === 36 ? n(y) : (e.consume(y),
|
|
3729
|
+
function h(y) {
|
|
3730
|
+
return y === null || ne(y) ? (e.exit("chunkString"), e.exit("mathFlowFenceMeta"), m(y)) : y === 36 ? n(y) : (e.consume(y), h);
|
|
3731
3731
|
}
|
|
3732
3732
|
function m(y) {
|
|
3733
3733
|
return e.exit("mathFlowFence"), o.interrupt ? t(y) : e.attempt(Ft, b, w)(y);
|
|
@@ -3739,13 +3739,13 @@ function oa(e, t, n) {
|
|
|
3739
3739
|
}, w, p)(y);
|
|
3740
3740
|
}
|
|
3741
3741
|
function p(y) {
|
|
3742
|
-
return (a ? Te(e,
|
|
3742
|
+
return (a ? Te(e, g, "linePrefix", a + 1) : g)(y);
|
|
3743
3743
|
}
|
|
3744
|
-
function
|
|
3744
|
+
function g(y) {
|
|
3745
3745
|
return y === null ? w(y) : ne(y) ? e.attempt(Ft, b, w)(y) : (e.enter("mathFlowValue"), d(y));
|
|
3746
3746
|
}
|
|
3747
3747
|
function d(y) {
|
|
3748
|
-
return y === null || ne(y) ? (e.exit("mathFlowValue"),
|
|
3748
|
+
return y === null || ne(y) ? (e.exit("mathFlowValue"), g(y)) : (e.consume(y), d);
|
|
3749
3749
|
}
|
|
3750
3750
|
function w(y) {
|
|
3751
3751
|
return e.exit("mathFlow"), t(y);
|
|
@@ -3784,21 +3784,21 @@ function aa(e) {
|
|
|
3784
3784
|
};
|
|
3785
3785
|
function o(r, a, l) {
|
|
3786
3786
|
let c = 0, s, u;
|
|
3787
|
-
return
|
|
3788
|
-
function
|
|
3787
|
+
return h;
|
|
3788
|
+
function h(d) {
|
|
3789
3789
|
return r.enter("mathText"), r.enter("mathTextSequence"), m(d);
|
|
3790
3790
|
}
|
|
3791
3791
|
function m(d) {
|
|
3792
3792
|
return d === 36 ? (r.consume(d), c++, m) : c < 2 && !n ? l(d) : (r.exit("mathTextSequence"), b(d));
|
|
3793
3793
|
}
|
|
3794
3794
|
function b(d) {
|
|
3795
|
-
return d === null ? l(d) : d === 36 ? (u = r.enter("mathTextSequence"), s = 0,
|
|
3795
|
+
return d === null ? l(d) : d === 36 ? (u = r.enter("mathTextSequence"), s = 0, g(d)) : d === 32 ? (r.enter("space"), r.consume(d), r.exit("space"), b) : ne(d) ? (r.enter("lineEnding"), r.consume(d), r.exit("lineEnding"), b) : (r.enter("mathTextData"), p(d));
|
|
3796
3796
|
}
|
|
3797
3797
|
function p(d) {
|
|
3798
3798
|
return d === null || d === 32 || d === 36 || ne(d) ? (r.exit("mathTextData"), b(d)) : (r.consume(d), p);
|
|
3799
3799
|
}
|
|
3800
|
-
function
|
|
3801
|
-
return d === 36 ? (r.consume(d), s++,
|
|
3800
|
+
function g(d) {
|
|
3801
|
+
return d === 36 ? (r.consume(d), s++, g) : s === c ? (r.exit("mathTextSequence"), r.exit("mathText"), a(d)) : (u.type = "mathTextData", p(d));
|
|
3802
3802
|
}
|
|
3803
3803
|
}
|
|
3804
3804
|
}
|
|
@@ -3868,18 +3868,18 @@ function pa({
|
|
|
3868
3868
|
feedback: c,
|
|
3869
3869
|
handleFeedback: s,
|
|
3870
3870
|
copyHost: u,
|
|
3871
|
-
feedbackEnabled:
|
|
3871
|
+
feedbackEnabled: h,
|
|
3872
3872
|
retryEnabled: m,
|
|
3873
3873
|
reference: b
|
|
3874
3874
|
}) {
|
|
3875
|
-
const { t: p } = z(["chat"]), { textComponents:
|
|
3875
|
+
const { t: p } = z(["chat"]), { textComponents: g, remarkPlugins: d, rehypePlugins: w } = he(), _ = De(e.text), y = !o && r && (n === "streaming" || n === "submitted"), T = l || (() => {
|
|
3876
3876
|
});
|
|
3877
3877
|
return /* @__PURE__ */ k("div", { className: "group py-2 first:pt-4 animate-in-bubble", children: [
|
|
3878
|
-
/* @__PURE__ */ i(
|
|
3878
|
+
/* @__PURE__ */ i(hn, { from: t.role, children: /* @__PURE__ */ i(mn, { dir: _, children: b ? /* @__PURE__ */ i(Qe, { showAction: !1, reference: b, children: /* @__PURE__ */ i(
|
|
3879
3879
|
Ie,
|
|
3880
3880
|
{
|
|
3881
3881
|
className: v(t.role === "user" && "whitespace-pre-wrap break-words"),
|
|
3882
|
-
components:
|
|
3882
|
+
components: g,
|
|
3883
3883
|
remarkPlugins: d,
|
|
3884
3884
|
rehypePlugins: w,
|
|
3885
3885
|
children: e.text
|
|
@@ -3888,7 +3888,7 @@ function pa({
|
|
|
3888
3888
|
Ie,
|
|
3889
3889
|
{
|
|
3890
3890
|
className: v(t.role === "user" && "whitespace-pre-wrap break-words"),
|
|
3891
|
-
components:
|
|
3891
|
+
components: g,
|
|
3892
3892
|
remarkPlugins: d,
|
|
3893
3893
|
rehypePlugins: w,
|
|
3894
3894
|
children: e.text
|
|
@@ -3905,7 +3905,7 @@ function pa({
|
|
|
3905
3905
|
children: /* @__PURE__ */ i(Kn, { className: "size-3" })
|
|
3906
3906
|
}
|
|
3907
3907
|
),
|
|
3908
|
-
|
|
3908
|
+
h && /* @__PURE__ */ k(oe, { children: [
|
|
3909
3909
|
/* @__PURE__ */ i(
|
|
3910
3910
|
Ne,
|
|
3911
3911
|
{
|
|
@@ -3942,12 +3942,12 @@ function pa({
|
|
|
3942
3942
|
] })
|
|
3943
3943
|
] });
|
|
3944
3944
|
}
|
|
3945
|
-
const On = pe(null),
|
|
3945
|
+
const On = pe(null), ga = () => {
|
|
3946
3946
|
const e = ke(On);
|
|
3947
3947
|
if (!e)
|
|
3948
3948
|
throw new Error("Reasoning components must be used within Reasoning");
|
|
3949
3949
|
return e;
|
|
3950
|
-
},
|
|
3950
|
+
}, ha = 1e3, ma = 1e3, Ln = Re(
|
|
3951
3951
|
({
|
|
3952
3952
|
className: e,
|
|
3953
3953
|
isStreaming: t = !1,
|
|
@@ -3959,21 +3959,21 @@ const On = pe(null), ha = () => {
|
|
|
3959
3959
|
children: l,
|
|
3960
3960
|
...c
|
|
3961
3961
|
}) => {
|
|
3962
|
-
const [s, u] =
|
|
3962
|
+
const [s, u] = ht({
|
|
3963
3963
|
prop: n,
|
|
3964
3964
|
defaultProp: o,
|
|
3965
3965
|
onChange: r
|
|
3966
|
-
}), [
|
|
3966
|
+
}), [h, m] = ht({
|
|
3967
3967
|
prop: a,
|
|
3968
3968
|
defaultProp: 0
|
|
3969
|
-
}), [b, p] = P(!1), [
|
|
3969
|
+
}), [b, p] = P(!1), [g, d] = P(null);
|
|
3970
3970
|
V(() => {
|
|
3971
|
-
t ?
|
|
3972
|
-
}, [t,
|
|
3971
|
+
t ? g === null && d(Date.now()) : g !== null && (m(Math.ceil((Date.now() - g) / ma)), d(null));
|
|
3972
|
+
}, [t, g, m]), V(() => {
|
|
3973
3973
|
if (o && !t && s && !b) {
|
|
3974
3974
|
const _ = setTimeout(() => {
|
|
3975
3975
|
u(!1), p(!0);
|
|
3976
|
-
},
|
|
3976
|
+
}, ha);
|
|
3977
3977
|
return () => {
|
|
3978
3978
|
clearTimeout(_);
|
|
3979
3979
|
};
|
|
@@ -3982,7 +3982,7 @@ const On = pe(null), ha = () => {
|
|
|
3982
3982
|
const w = (_) => {
|
|
3983
3983
|
u(_);
|
|
3984
3984
|
};
|
|
3985
|
-
return /* @__PURE__ */ i(On.Provider, { value: { isStreaming: t, isOpen: s, setIsOpen: u, duration:
|
|
3985
|
+
return /* @__PURE__ */ i(On.Provider, { value: { isStreaming: t, isOpen: s, setIsOpen: u, duration: h }, children: /* @__PURE__ */ i(
|
|
3986
3986
|
lt,
|
|
3987
3987
|
{
|
|
3988
3988
|
className: v("not-prose mb-4", e),
|
|
@@ -3993,8 +3993,8 @@ const On = pe(null), ha = () => {
|
|
|
3993
3993
|
}
|
|
3994
3994
|
) });
|
|
3995
3995
|
}
|
|
3996
|
-
),
|
|
3997
|
-
const { isStreaming: o, isOpen: r, duration: a } =
|
|
3996
|
+
), Dn = Re(({ className: e, children: t, ...n }) => {
|
|
3997
|
+
const { isStreaming: o, isOpen: r, duration: a } = ga();
|
|
3998
3998
|
return /* @__PURE__ */ i(
|
|
3999
3999
|
st,
|
|
4000
4000
|
{
|
|
@@ -4032,8 +4032,8 @@ const On = pe(null), ha = () => {
|
|
|
4032
4032
|
children: /* @__PURE__ */ i(Ie, { className: "grid gap-2", children: t })
|
|
4033
4033
|
}
|
|
4034
4034
|
));
|
|
4035
|
-
|
|
4036
|
-
|
|
4035
|
+
Ln.displayName = "Reasoning";
|
|
4036
|
+
Dn.displayName = "ReasoningTrigger";
|
|
4037
4037
|
Fn.displayName = "ReasoningContent";
|
|
4038
4038
|
function fa({
|
|
4039
4039
|
part: e,
|
|
@@ -4042,14 +4042,14 @@ function fa({
|
|
|
4042
4042
|
partsCount: o,
|
|
4043
4043
|
lastMessage: r
|
|
4044
4044
|
}) {
|
|
4045
|
-
const a =
|
|
4045
|
+
const a = De(e.text);
|
|
4046
4046
|
return /* @__PURE__ */ k(
|
|
4047
|
-
|
|
4047
|
+
Ln,
|
|
4048
4048
|
{
|
|
4049
4049
|
className: "w-full animate-in-bubble",
|
|
4050
4050
|
isStreaming: t === "streaming" && n === o - 1 && r,
|
|
4051
4051
|
children: [
|
|
4052
|
-
/* @__PURE__ */ i(
|
|
4052
|
+
/* @__PURE__ */ i(Dn, {}),
|
|
4053
4053
|
/* @__PURE__ */ i(Fn, { dir: a, children: e.text })
|
|
4054
4054
|
]
|
|
4055
4055
|
}
|
|
@@ -5373,9 +5373,9 @@ function Ra() {
|
|
|
5373
5373
|
return He;
|
|
5374
5374
|
}
|
|
5375
5375
|
var Oa = Ra();
|
|
5376
|
-
const
|
|
5376
|
+
const La = /* @__PURE__ */ te(Oa);
|
|
5377
5377
|
var je, Ut;
|
|
5378
|
-
function
|
|
5378
|
+
function Da() {
|
|
5379
5379
|
if (Ut) return je;
|
|
5380
5380
|
Ut = 1, je = e, e.displayName = "typescript", e.aliases = ["ts"];
|
|
5381
5381
|
function e(t) {
|
|
@@ -5427,7 +5427,7 @@ function La() {
|
|
|
5427
5427
|
}
|
|
5428
5428
|
return je;
|
|
5429
5429
|
}
|
|
5430
|
-
var Fa =
|
|
5430
|
+
var Fa = Da();
|
|
5431
5431
|
const Pa = /* @__PURE__ */ te(Fa);
|
|
5432
5432
|
var Ge, qt;
|
|
5433
5433
|
function Ma() {
|
|
@@ -5740,14 +5740,14 @@ function Wa() {
|
|
|
5740
5740
|
return /[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source;
|
|
5741
5741
|
}
|
|
5742
5742
|
), c = /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;
|
|
5743
|
-
function s(u,
|
|
5744
|
-
|
|
5743
|
+
function s(u, h) {
|
|
5744
|
+
h = (h || "").replace(/m/g, "") + "m";
|
|
5745
5745
|
var m = /([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g, function() {
|
|
5746
5746
|
return a;
|
|
5747
5747
|
}).replace(/<<value>>/g, function() {
|
|
5748
5748
|
return u;
|
|
5749
5749
|
});
|
|
5750
|
-
return RegExp(m,
|
|
5750
|
+
return RegExp(m, h);
|
|
5751
5751
|
}
|
|
5752
5752
|
n.languages.yaml = {
|
|
5753
5753
|
scalar: {
|
|
@@ -6079,10 +6079,10 @@ function Xa() {
|
|
|
6079
6079
|
}), n.hooks.add("after-tokenize", function(b) {
|
|
6080
6080
|
if (b.language !== "markdown" && b.language !== "md")
|
|
6081
6081
|
return;
|
|
6082
|
-
function p(
|
|
6083
|
-
if (!(!
|
|
6084
|
-
for (var d = 0, w =
|
|
6085
|
-
var _ =
|
|
6082
|
+
function p(g) {
|
|
6083
|
+
if (!(!g || typeof g == "string"))
|
|
6084
|
+
for (var d = 0, w = g.length; d < w; d++) {
|
|
6085
|
+
var _ = g[d];
|
|
6086
6086
|
if (_.type !== "code") {
|
|
6087
6087
|
p(_.content);
|
|
6088
6088
|
continue;
|
|
@@ -6099,8 +6099,8 @@ function Xa() {
|
|
|
6099
6099
|
p(b.tokens);
|
|
6100
6100
|
}), n.hooks.add("wrap", function(b) {
|
|
6101
6101
|
if (b.type === "code-block") {
|
|
6102
|
-
for (var p = "",
|
|
6103
|
-
var w = b.classes[
|
|
6102
|
+
for (var p = "", g = 0, d = b.classes.length; g < d; g++) {
|
|
6103
|
+
var w = b.classes[g], _ = /language-(.+)/.exec(w);
|
|
6104
6104
|
if (_) {
|
|
6105
6105
|
p = _[1];
|
|
6106
6106
|
break;
|
|
@@ -6131,16 +6131,16 @@ function Xa() {
|
|
|
6131
6131
|
lt: "<",
|
|
6132
6132
|
gt: ">",
|
|
6133
6133
|
quot: '"'
|
|
6134
|
-
},
|
|
6134
|
+
}, h = String.fromCodePoint || String.fromCharCode;
|
|
6135
6135
|
function m(b) {
|
|
6136
6136
|
var p = b.replace(s, "");
|
|
6137
|
-
return p = p.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function(
|
|
6137
|
+
return p = p.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function(g, d) {
|
|
6138
6138
|
if (d = d.toLowerCase(), d[0] === "#") {
|
|
6139
6139
|
var w;
|
|
6140
|
-
return d[1] === "x" ? w = parseInt(d.slice(2), 16) : w = Number(d.slice(1)),
|
|
6140
|
+
return d[1] === "x" ? w = parseInt(d.slice(2), 16) : w = Number(d.slice(1)), h(w);
|
|
6141
6141
|
} else {
|
|
6142
6142
|
var _ = u[d];
|
|
6143
|
-
return _ ||
|
|
6143
|
+
return _ || g;
|
|
6144
6144
|
}
|
|
6145
6145
|
}), p;
|
|
6146
6146
|
}
|
|
@@ -6152,7 +6152,7 @@ function Xa() {
|
|
|
6152
6152
|
var Ka = Xa();
|
|
6153
6153
|
const Qa = /* @__PURE__ */ te(Ka);
|
|
6154
6154
|
K.registerLanguage("python", Ia);
|
|
6155
|
-
K.registerLanguage("javascript",
|
|
6155
|
+
K.registerLanguage("javascript", La);
|
|
6156
6156
|
K.registerLanguage("typescript", Pa);
|
|
6157
6157
|
K.registerLanguage("json", Ua);
|
|
6158
6158
|
K.registerLanguage("bash", Ba);
|
|
@@ -6345,8 +6345,8 @@ function ii({ part: e, message: t, chat: n, toolComponents: o, showToolCalls: r
|
|
|
6345
6345
|
if (!l && a.toolCallId && Array.isArray(t.parts))
|
|
6346
6346
|
try {
|
|
6347
6347
|
const c = t.parts.find((u) => {
|
|
6348
|
-
const
|
|
6349
|
-
return
|
|
6348
|
+
const h = j(u);
|
|
6349
|
+
return h && typeof h == "object" && h.toolCallId === a.toolCallId && (h.toolName || h.type?.startsWith("tool-"));
|
|
6350
6350
|
}), s = c ? j(c) : void 0;
|
|
6351
6351
|
s && (l = s.toolName || (s.type.startsWith("tool-") ? s.type.slice(5) : void 0));
|
|
6352
6352
|
} catch (c) {
|
|
@@ -6377,7 +6377,7 @@ function li({ part: e, message: t }) {
|
|
|
6377
6377
|
const s = document.createElement("a");
|
|
6378
6378
|
s.href = o.url, s.download = a, document.body.appendChild(s), s.click(), document.body.removeChild(s);
|
|
6379
6379
|
};
|
|
6380
|
-
return /* @__PURE__ */ i("div", { className: "py-2 animate-in-bubble", children: /* @__PURE__ */ i(
|
|
6380
|
+
return /* @__PURE__ */ i("div", { className: "py-2 animate-in-bubble", children: /* @__PURE__ */ i(hn, { from: t.role, children: /* @__PURE__ */ i(mn, { isPlain: !0, children: r ? /* @__PURE__ */ k("div", { className: "group relative max-w-[280px] rounded-xl overflow-hidden border border-border/5 transition-all duration-300 hover:border-primary/30 hover:shadow-[0_0_20px_var(--glow)]", children: [
|
|
6381
6381
|
/* @__PURE__ */ i(
|
|
6382
6382
|
"img",
|
|
6383
6383
|
{
|
|
@@ -6507,7 +6507,7 @@ const R = {
|
|
|
6507
6507
|
}
|
|
6508
6508
|
}
|
|
6509
6509
|
}, Mn = pe(R);
|
|
6510
|
-
function
|
|
6510
|
+
function he() {
|
|
6511
6511
|
return ke(Mn);
|
|
6512
6512
|
}
|
|
6513
6513
|
function vl({
|
|
@@ -6521,7 +6521,7 @@ function vl({
|
|
|
6521
6521
|
app: c,
|
|
6522
6522
|
i18n: s,
|
|
6523
6523
|
settings: u,
|
|
6524
|
-
children:
|
|
6524
|
+
children: h
|
|
6525
6525
|
}) {
|
|
6526
6526
|
const m = de(
|
|
6527
6527
|
() => ({
|
|
@@ -6554,7 +6554,7 @@ function vl({
|
|
|
6554
6554
|
}),
|
|
6555
6555
|
[e, t, n, o, r, a, l, c, s, u]
|
|
6556
6556
|
);
|
|
6557
|
-
return /* @__PURE__ */ i(Mn.Provider, { value: m, children:
|
|
6557
|
+
return /* @__PURE__ */ i(Mn.Provider, { value: m, children: h });
|
|
6558
6558
|
}
|
|
6559
6559
|
const {
|
|
6560
6560
|
slice: ci,
|
|
@@ -6570,7 +6570,7 @@ function di(e) {
|
|
|
6570
6570
|
function pi(e) {
|
|
6571
6571
|
return typeof e != "string" ? !1 : [/<\s*script.*?>/i, /<\s*\/\s*script\s*>/i, /<\s*img.*?on\w+\s*=/i, /<\s*\w+\s*on\w+\s*=.*?>/i, /javascript\s*:/i, /vbscript\s*:/i, /expression\s*\(/i, /eval\s*\(/i, /alert\s*\(/i, /document\.cookie/i, /document\.write\s*\(/i, /window\.location/i, /innerHTML/i].some((n) => n.test(e));
|
|
6572
6572
|
}
|
|
6573
|
-
const Gt = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,
|
|
6573
|
+
const Gt = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, gi = function(e, t) {
|
|
6574
6574
|
const o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
|
|
6575
6575
|
path: "/"
|
|
6576
6576
|
}, r = encodeURIComponent(t);
|
|
@@ -6619,7 +6619,7 @@ const Gt = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, hi = function(e, t) {
|
|
|
6619
6619
|
path: "/",
|
|
6620
6620
|
sameSite: "strict"
|
|
6621
6621
|
};
|
|
6622
|
-
n && (r.expires = /* @__PURE__ */ new Date(), r.expires.setTime(r.expires.getTime() + n * 60 * 1e3)), o && (r.domain = o), document.cookie =
|
|
6622
|
+
n && (r.expires = /* @__PURE__ */ new Date(), r.expires.setTime(r.expires.getTime() + n * 60 * 1e3)), o && (r.domain = o), document.cookie = gi(e, t, r);
|
|
6623
6623
|
},
|
|
6624
6624
|
read(e) {
|
|
6625
6625
|
const t = `${e}=`, n = document.cookie.split(";");
|
|
@@ -6634,7 +6634,7 @@ const Gt = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, hi = function(e, t) {
|
|
|
6634
6634
|
this.create(e, "", -1, t);
|
|
6635
6635
|
}
|
|
6636
6636
|
};
|
|
6637
|
-
var
|
|
6637
|
+
var hi = {
|
|
6638
6638
|
name: "cookie",
|
|
6639
6639
|
// Deconstruct the options object and extract the lookupCookie property
|
|
6640
6640
|
lookup(e) {
|
|
@@ -6842,7 +6842,7 @@ class qn {
|
|
|
6842
6842
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
|
|
6843
6843
|
languageUtils: {}
|
|
6844
6844
|
}, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
6845
|
-
this.services = t, this.options = di(n, this.options || {}, xi()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = (r) => r.replace("-", "_")), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = o, this.addDetector(
|
|
6845
|
+
this.services = t, this.options = di(n, this.options || {}, xi()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = (r) => r.replace("-", "_")), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = o, this.addDetector(hi), this.addDetector(mi), this.addDetector(bi), this.addDetector(yi), this.addDetector(_i), this.addDetector(vi), this.addDetector(ki), this.addDetector(wi), this.addDetector(fi);
|
|
6846
6846
|
}
|
|
6847
6847
|
addDetector(t) {
|
|
6848
6848
|
return this.detectors[t.name] = t, this;
|
|
@@ -6864,7 +6864,7 @@ class qn {
|
|
|
6864
6864
|
}
|
|
6865
6865
|
}
|
|
6866
6866
|
qn.type = "languageDetector";
|
|
6867
|
-
const Si = { new_conversation: "New conversation", tooltip_new_conversation: "Start a new conversation", delete_conversation: "Delete", delete_confirm_title: "Delete conversation?", delete_confirm_description: "Are you sure you want to delete this chat? This action cannot be undone.", cancel: "Cancel", delete: "Delete", chat_deleted_success: "Chat deleted successfully", logout: "Logout", new_chat: "New Chat", rename_conversation: "Rename", rename_success: "Conversation renamed successfully", rename_failed: "Failed to rename conversation", search_conversations: "Search conversations...", save: "Save", no_conversations: "No conversations yet", loading_more: "Loading more...", pinned_success: "Conversation pinned", unpinned_success: "Conversation unpinned", pin_failed: "Failed to pin conversation", share_success: "Link copied", share_description: "The shareable link has been copied to your clipboard.", share_failed: "Failed to generate share link", pin_conversation: "Pin", unpin_conversation: "Unpin", share_conversation: "Share" }, Ei = { tools: "Tools", error: "Error:", input_placeholder: "Ask something...", insufficient_balance: "Insufficient balance. Please recharge your account to continue.", regenerate: "Regenerate", retry: "Retry", copy: "Copy", like: "Like", dislike: "Dislike", attach_file: "Attach file", remove_file: "Remove file", reference: "Reference", reference_selection: "Reference selection", remove_reference: "Remove reference", referenced_context: "Referenced context", source_unavailable: "Source unavailable", tool_reference: "Tool reference", card_reference: "Card reference", used_sources: "Used {{count}} sources", welcome: { title: "Hello! How can I help you today?", subtitle: "Ask me anything and I'll do my best to help.", suggestions: ["What can you help me with?", "Tell me something interesting", "Help me write an email", "Explain a concept to me"] }, disclaimer: "AI can make mistakes. Check important info." }, Ni = { pending: "Pending", running: "Running", completed: "Completed", error: "Error", parameters: "Parameters", result: "Result", view_error: "View Error", tool_error: "Tool Error", copied: "Copied!", copy_error: "Copy Error" }, Ti = { login_tab: "Login", signup_tab: "Sign Up", phone: "Phone", phone_placeholder: "Phone number", password: "Password", name: "Name", name_placeholder: "First Name", surname: "Surname", surname_placeholder: "Last Name", loading: "Loading...", logging_in: "Logging in...", signing_up: "Signing up...", auth_page_disabled_title: "The sign-in page is currently disabled.", auth_page_disabled_description: "Please contact the administrator for access.", select_placeholder: "Select an option", login_button: "Login", signup_button: "Sign Up", username: "Username", username_placeholder: "Username", email: "Email", email_placeholder: "you@example.com" }, Ci = { toggle: "Change theme", light: "Switch to light theme", dark: "Switch to dark theme", system: "Switch to system theme" }, Ai = /* @__PURE__ */ JSON.parse(`{"select_placeholder":"Select an option","loading":"Loading...","retry":"Retry","save":"Save","saving":"Saving...","cancel":"Cancel","delete":"Delete","edit":"Edit","search":"Search","search_placeholder":"Search...","no_data":"No data available","loading_more":"Loading more...","confirm_delete":"Are you sure you want to delete?","error_loading":"Error loading data","close":"Close","jobs":{"section_title":"Maintenance Jobs","no_jobs":"No jobs are registered for this deployment.","run":"Run","run_dry":"Dry run","run_started":"Started \\"{{name}}\\"","run_failed":"Failed to start job","history":"Run history","history_help":"Recent runs. Click a row to see its inputs and output.","view_history":"View run history","inputs":"Inputs","no_runs":"No runs yet.","dry_run":"Dry run","dry_run_help":"Simulate the job without writing any changes.","confirm_destructive":"This is a destructive job. Type \\"{{name}}\\" to confirm.","output":"Output","no_output":"(no output)","output_truncated":"...[output truncated]","result":"Result","cancel_run":"Cancel run","triggered_by":"Triggered by {{user}}","triggered_by_api":"Triggered via API key","danger":{"safe":"safe","caution":"caution","destructive":"destructive"},"status":{"queued":"Queued","processing":"Running","completed":"Completed","failed":"Failed","cancelled":"Cancelled"},"raw":{"title":"Run raw Python","warning":"This executes arbitrary Python on the server with full process privileges. There is no sandbox — only access control and an audit log. Use only when you know exactly what you are doing.","confirm_label":"Type \\"{{phrase}}\\" to enable running.","run":"Execute"}},"dashboard":{"title":"Admin Panel","logout":"Logout","tabs":{"analytics":"Analytics","chat_history":"Chats","users":"Users","admins":"Admins","settings":"Settings"}},"app_settings":{"title":"System Settings","subtitle":"Manage global configuration for application appearance and behavior.","sections":{"general":"Basic Information","chat":"Chat Experience","user_billing":"User & Billing"},"general":{"app_name":"App Name","admin_title":"Admin Panel Title","language":"Default Language","language_help":"The language users see on their first visit (if not auto-detected).","appearance":"Default Appearance","appearance_help":"These values apply when a user has not saved their own appearance preferences.","default_theme":"Default Theme","default_accent":"Default Accent Color","default_accent_help":"Enter any browser-supported CSS color, such as #3b82f6, rgb(59 130 246), or oklch(0.623 0.214 259.815).","default_accent_invalid":"Enter a valid browser-supported CSS color.","default_accent_preview":"Accent color preview"},"chat":{"welcome_greeting":"Welcome Greeting","welcome_subtitle":"Welcome Subtitle","disclaimer":"Disclaimer Text","show_tool_details":"Show technical tool details","show_tool_details_help":"Enable this to show professional technical details of AI tools to users.","show_settings":"Show settings icon for users","show_settings_help":"Show a settings gear icon in the chat interface for user customization.","show_version_in_settings":"Show app version in user settings","show_version_in_settings_help":"Show the app version at the bottom of the user settings dialog. This does not affect the admin settings page.","disable_signup":"Disable signup","disable_signup_help":"Hide the signup tab so users can only log in.","disable_auth_page":"Disable login/signup page","disable_auth_page_help":"Hide the entire auth page and prevent users from reaching login or signup forms.","composer_attachments":"Enable File Attachments","composer_attachments_help":"Allow users to upload and attach files to their messages.","thread_actions_feedback":"Enable Feedback Buttons","thread_actions_feedback_help":"Show like/dislike buttons on AI responses.","thread_actions_retry":"Enable Retry Button","thread_actions_retry_help":"Show a retry button to regenerate the last AI response.","history_enabled":"Enable Chat History Sidebar","history_enabled_help":"Show the sidebar containing previous conversations.","history_show_delete":"Allow Deleting Conversations","history_show_rename":"Allow Renaming Conversations","history_show_share":"Allow Sharing Conversations","history_show_pin":"Allow Pinning Conversations","sections_modes":"Settings Tab Modes","sections_modes_help":"Control visibility and interactability of settings tabs for users.","mode_editable":"Enable (Editable)","mode_faded":"Fade (Readonly)","mode_hidden":"Hide (Disable)","general_tab":"General Tab","profile_tab":"Profile Tab","account_tab":"Account Tab","inner_fields_modes":"Inner Fields Visibility","inner_fields_modes_help":"Configure visibility for individual fields within each tab."},"user_billing":{"initial_balance_tokens":"Default Initial Tokens","initial_balance_requests":"Default Initial Requests","initial_balance_help":"These values will be assigned to new users by default if not specified during creation."},"save_success":"Settings saved successfully","save_error":"Failed to save settings","save":"Save Changes","translations_management":"Translations Management","editor_tips":"All changes are saved automatically to local state. Don't forget to push 'Save Changes' to persist.","sync_from_code":"Sync from Code","reset_button":"Reset to Defaults","reset_confirm_title":"Reset Settings?","reset_confirm_description":"This will reset all fields to their original default values from the code. Current unsaved changes will be lost.","preview":"Preview","tips_label":"TIPS"},"analytics":{"title":"Analytics & Statistics","days":"{{count}} Days","time_range_label":"Last","days_unit":"days","total_users":"Total Users","total_threads":"Total Threads","total_messages":"Total Messages","total_token_usage":"Total Token Usage","usage_cost":"Usage & Cost","input":"Input","output":"Output","cost":"Cost","threads_chart":"Threads","messages_chart":"Messages","token_usage_chart":"Token Usage","cost_chart":"Cost Per Day","active_users":"Active Users","conversations":"conversations","threads":"threads","feedback":"User Feedback","total_feedback":"Total Feedback","positive":"Positive","negative":"Negative","loading_analytics":"Loading analytics...","error_loading":"Error loading data","source_human":"Users","source_service":"Service","source_all":"All","source_caption_human":"Showing real users only","source_caption_service":"Showing service traffic only","source_caption_all":"Showing all traffic"},"chat_history":{"title":"Chat History Management","search_placeholder":"Search by name, phone, thread title, or ID...","search_button":"Search","threads_list":"Threads List","thread_count":"{{count}}","no_thread_title":"Untitled conversation","messages":"Messages","messages_for":"Messages for: {{title}}","select_thread":"Select a conversation to view","no_threads":"No conversations found","empty_thread":"This conversation is empty","loading_threads":"Loading...","loading_messages":"Loading messages...","user_label":"User","assistant_label":"AI Assistant","subagent_label":"Subagent","input_tokens":"Input: {{value}}","output_tokens":"Output: {{value}}","total_tokens":"Total: {{value}}","cost":"Cost: {{value}}","unpriced":"Unpriced","all_feedbacks":"All Conversations","liked_feedbacks":"Liked 👍","disliked_feedbacks":"Disliked 👎","any_feedback":"With Feedback","output_available":"Output Available","running":"Running...","unnamed_file":"Unnamed File","download_file":"Download File","source_human":"Users","source_service":"Service","source_all":"All sources","external_user_id":"Service ref"},"users":{"title":"User Management","user_count":"User count: {{count}}","add_user":"Add New User","edit_user":"Edit User","phone":"Phone Number","phone_placeholder":"09123456789","name":"Name","surname":"Surname","initial_tokens":"Initial Tokens (optional)","initial_requests":"Initial Requests (optional)","balance":"Balance","requests_label":"Requests","tokens_label":"Tokens","token_limit":"Token Limit","request_limit":"Request Limit","tokens_usage":"Tokens Usage","requests_usage":"Requests Usage","actions":"Actions","copy_token":"Copy Token (auto-refresh)","token_copied":"Token copied successfully","no_token":"No token found for this user","recharge":"Recharge Balance","full_charge":"Full Charge","update_balance":"Update Balance","update_balance_for":"Update Balance for","token_count":"Token Count","request_count":"Request Count","updating":"Updating...","no_users":"No users found.","sort_ascending":"Sort ascending","sort_descending":"Sort descending","confirm_delete_user":"Are you sure you want to delete this user?","tokens_exceed_limit":"Tokens cannot exceed the specified limit","requests_exceed_limit":"Requests cannot exceed the specified limit","metadata":"Metadata (JSON)","initial_balance":"Initial Balance","custom_fields":"Additional Fields","metadata_raw":"Metadata (Raw JSON)","advanced_usage":"Advanced usage","invalid_json":"Invalid JSON format","auto_recharge":"Automatic Balance Renewal","auto_recharge_help":"Restore this user's balance to its limits on a recurring schedule.","enabled":"Enabled","recharge_interval":"Every","recharge_unit":"Interval Unit","recharge_unit_minute":"Minute(s)","recharge_unit_hour":"Hour(s)","recharge_unit_day":"Day(s)","recharge_unit_week":"Week(s)","recharge_unit_month":"Month(s)","recharge_schedule_help":"New schedules begin when saved. Existing schedules keep their current cycle anchor.","next_recharge":"Next renewal","last_recharge":"Last automatic renewal","not_available":"Not available","recharge_interval_invalid":"The renewal interval must be a positive whole number","recharge_policy_not_saved":"The backend did not save the renewal policy. Restart or update the backend to the version that supports automatic renewal.","usage_summary":"Usage Summary","input_tokens":"Input Tokens","output_tokens":"Output Tokens","total_tokens":"Total Tokens","requests_made":"Requests Made","total_cost":"Total Cost","renewals":"Balance Renewals","unpriced_requests":"Unpriced Requests","bulk_balance":"Bulk Balance","bulk_balance_help":"Apply a balance change to all matching users using search, explicit IDs, and metadata filters.","bulk_operation":"Operation","bulk_operation_add":"Add to balance","bulk_operation_set":"Set exact balance","bulk_operation_full_charge":"Fill to limits","bulk_use_current_search":"Use current search text","bulk_user_ids":"User IDs (optional)","bulk_metadata_filters":"Metadata Filters (JSON)","bulk_available_metadata":"Available metadata keys","bulk_preview_empty":"Affected users will be checked before applying.","bulk_preview_count":"{{count}} users match","apply_bulk_balance":"Apply Change","bulk_balance_confirm":"Apply this balance change to {{count}} users?","matching_users":"matching","bulk_apply_balance":"Update balances","bulk_apply_renewal":"Update renewal policy","bulk_select_change":"Select at least one bulk change to apply.","bulk_renewal_policy":"Renewal Policy","bulk_renewal_policy_help":"Enable or disable automatic renewal for every matched user.","bulk_renewal_anchor":"First renewal time (optional)","source_human":"Users","source_service":"Service","source_all":"All","account_type":"Account type","account_type_human":"Human user","account_type_service":"Service (external API)","account_type_service_help":"External API consumer. Phone is optional; share this account’s token with the integrating service.","service_name":"Service name","service_name_placeholder":"e.g. Acme CRM integration","optional":"optional","username":"Username","username_placeholder":"username","email":"Email","email_placeholder":"you@example.com"},"admins":{"title":"Admin Management","admin_count":"Admin count: {{count}}","add_admin":"Add New Admin","edit_admin":"Edit Admin","username":"Username","name":"Name","password":"Password","password_edit":"New Password (leave empty to keep current)","permissions":"Permissions","perm_chat_history":"Chat History","perm_admin_management":"Admin Management","perm_user_management":"User Management","perm_analytics":"Analytics","perm_settings":"Settings","no_admins":"No admins found.","confirm_delete_admin":"Are you sure you want to delete this admin?"},"errors":{"access_denied_title":"Access Denied","access_denied_message":"You don't have the necessary permissions to access this page. You can contact the administrator!","back_to_dashboard":"Back to Dashboard"},"login":{"title":"Admin Panel","setup_title":"Initial Setup","setup_description":"No admin account exists yet. Set a password for the default admin user to get started.","set_password":"Set Password","set_password_placeholder":"Choose a strong password","confirm_password":"Confirm Password","confirm_password_placeholder":"Re-enter the password","passwords_mismatch":"Passwords do not match","password_too_short":"Password must be at least 4 characters","create_admin":"Create Admin & Login","setting_up":"Setting up...","username":"Username","username_placeholder":"Username","password":"Password","password_placeholder":"••••••••","submit":"Login","logging_in":"Logging in...","error":"Login failed","copyright":"© 2026 AI Chatbot Platform"}}`), Ii = { title: "Settings", sections: { profile: "Profile", general: "General", account: "Account" }, profile: { title: "Profile Information", subtitle: "Update your personal details below.", name: "First Name", surname: "Last Name", username: "Username", email: "Email", phone: "Phone Number", password: "New Password", password_placeholder: "Leave empty to keep current", save: "Save Changes", saving: "Saving...", success: "Profile updated successfully", error: "Failed to update profile", select_placeholder: "Select an option" }, general: { title: "General Settings", subtitle: "Configure look and feel and language.", theme: "Theme", language: "Language", themes: { light: "Light", dark: "Dark", system: "System" }, accent: "Accent Color", radius: "Rounded Corners", radius_levels: { sharp: "Sharp", round: "Round" }, languages: { en: "English", fa: "Persian" } }, account: { title: "Account & Usage", subtitle: "Monitor your quotas and manage your session.", balance: "Current Balance", tokens: "Tokens", requests: "Requests", logout: "Logout", logout_confirm: "Are you sure you want to logout?", last_recharge: "Last balance update on" } }, Ri = { unauthorized: "Authentication required. Please login again.", invalid_credentials: "Invalid phone number or password.", phone_required: "Phone number is required.", password_required: "Password is required.", name_surname_required: "Name and surname are required.", phone_already_exists: "This phone number is already registered.", invalid_token: "Your session has expired. Please login again.", user_not_found: "User not found.", insufficient_balance: "Insufficient balance. Please recharge your account.", insufficient_balance_recharge: "You've reached your balance quota. It will be reset on {{datetime, datetime}}.", insufficient_balance_no_recharge: "You've run out of balance. Please contact support to recharge your account.", me_update_failed: "Failed to update profile information.", thread_not_found: "Conversation not found.", access_denied: "You do not have permission to perform this action.", feedback_save_failed: "Failed to save feedback.", thread_update_failed: "Failed to update conversation.", thread_delete_failed: "Failed to delete conversation.", attachment_not_found: "Attachment not found.", thread_share_failed: "Failed to share conversation.", model_quota_reached_error: "The system cannot respond at this time. Please try again later.", admin_already_exists: "Admin with this username already exists.", admin_not_found: "Admin not found.", cannot_delete_self: "You cannot delete your own admin account.", admin_update_failed: "Failed to update admin information.", internal_error: "An internal server error occurred. Please try again later.", validation_error: "Invalid data provided. Please check your input.", not_found: "The requested resource was not found.", identity_required: "This field is required.", identity_already_exists: "This value is already registered." }, Oi = {
|
|
6867
|
+
const Si = { new_conversation: "New conversation", tooltip_new_conversation: "Start a new conversation", delete_conversation: "Delete", delete_confirm_title: "Delete conversation?", delete_confirm_description: "Are you sure you want to delete this chat? This action cannot be undone.", cancel: "Cancel", delete: "Delete", chat_deleted_success: "Chat deleted successfully", logout: "Logout", new_chat: "New Chat", rename_conversation: "Rename", rename_success: "Conversation renamed successfully", rename_failed: "Failed to rename conversation", search_conversations: "Search conversations...", save: "Save", no_conversations: "No conversations yet", loading_more: "Loading more...", pinned_success: "Conversation pinned", unpinned_success: "Conversation unpinned", pin_failed: "Failed to pin conversation", share_success: "Link copied", share_description: "The shareable link has been copied to your clipboard.", share_failed: "Failed to generate share link", pin_conversation: "Pin", unpin_conversation: "Unpin", share_conversation: "Share" }, Ei = { tools: "Tools", error: "Error:", input_placeholder: "Ask something...", insufficient_balance: "Insufficient balance. Please recharge your account to continue.", regenerate: "Regenerate", retry: "Retry", copy: "Copy", like: "Like", dislike: "Dislike", attach_file: "Attach file", remove_file: "Remove file", reference: "Reference", reference_selection: "Reference selection", remove_reference: "Remove reference", referenced_context: "Referenced context", source_unavailable: "Source unavailable", tool_reference: "Tool reference", card_reference: "Card reference", used_sources: "Used {{count}} sources", welcome: { title: "Hello! How can I help you today?", subtitle: "Ask me anything and I'll do my best to help.", suggestions: ["What can you help me with?", "Tell me something interesting", "Help me write an email", "Explain a concept to me"] }, disclaimer: "AI can make mistakes. Check important info." }, Ni = { pending: "Pending", running: "Running", completed: "Completed", error: "Error", parameters: "Parameters", result: "Result", view_error: "View Error", tool_error: "Tool Error", copied: "Copied!", copy_error: "Copy Error" }, Ti = { login_tab: "Login", signup_tab: "Sign Up", phone: "Phone", phone_placeholder: "Phone number", password: "Password", name: "Name", name_placeholder: "First Name", surname: "Surname", surname_placeholder: "Last Name", loading: "Loading...", logging_in: "Logging in...", signing_up: "Signing up...", auth_page_disabled_title: "The sign-in page is currently disabled.", auth_page_disabled_description: "Please contact the administrator for access.", select_placeholder: "Select an option", login_button: "Login", signup_button: "Sign Up", username: "Username", username_placeholder: "Username", email: "Email", email_placeholder: "you@example.com", at_least_one_login_field: "Please provide at least one login field." }, Ci = { toggle: "Change theme", light: "Switch to light theme", dark: "Switch to dark theme", system: "Switch to system theme" }, Ai = /* @__PURE__ */ JSON.parse(`{"select_placeholder":"Select an option","loading":"Loading...","retry":"Retry","save":"Save","saving":"Saving...","cancel":"Cancel","delete":"Delete","edit":"Edit","search":"Search","search_placeholder":"Search...","no_data":"No data available","loading_more":"Loading more...","confirm_delete":"Are you sure you want to delete?","error_loading":"Error loading data","close":"Close","jobs":{"section_title":"Maintenance Jobs","no_jobs":"No jobs are registered for this deployment.","run":"Run","run_dry":"Dry run","run_started":"Started \\"{{name}}\\"","run_failed":"Failed to start job","history":"Run history","history_help":"Recent runs. Click a row to see its inputs and output.","view_history":"View run history","inputs":"Inputs","no_runs":"No runs yet.","dry_run":"Dry run","dry_run_help":"Simulate the job without writing any changes.","confirm_destructive":"This is a destructive job. Type \\"{{name}}\\" to confirm.","output":"Output","no_output":"(no output)","output_truncated":"...[output truncated]","result":"Result","cancel_run":"Cancel run","triggered_by":"Triggered by {{user}}","triggered_by_api":"Triggered via API key","danger":{"safe":"safe","caution":"caution","destructive":"destructive"},"status":{"queued":"Queued","processing":"Running","completed":"Completed","failed":"Failed","cancelled":"Cancelled"},"raw":{"title":"Run raw Python","warning":"This executes arbitrary Python on the server with full process privileges. There is no sandbox — only access control and an audit log. Use only when you know exactly what you are doing.","confirm_label":"Type \\"{{phrase}}\\" to enable running.","run":"Execute"},"resolve":"Resolve"},"dashboard":{"title":"Admin Panel","logout":"Logout","tabs":{"analytics":"Analytics","chat_history":"Chats","users":"Users","admins":"Admins","settings":"Settings"}},"app_settings":{"title":"System Settings","subtitle":"Manage global configuration for application appearance and behavior.","sections":{"general":"Basic Information","chat":"Chat Experience","user_billing":"User & Billing"},"general":{"app_name":"App Name","admin_title":"Admin Panel Title","language":"Default Language","language_help":"The language users see on their first visit (if not auto-detected).","appearance":"Default Appearance","appearance_help":"These values apply when a user has not saved their own appearance preferences.","default_theme":"Default Theme","default_accent":"Default Accent Color","default_accent_help":"Enter any browser-supported CSS color, such as #3b82f6, rgb(59 130 246), or oklch(0.623 0.214 259.815).","default_accent_invalid":"Enter a valid browser-supported CSS color.","default_accent_preview":"Accent color preview"},"chat":{"welcome_greeting":"Welcome Greeting","welcome_subtitle":"Welcome Subtitle","disclaimer":"Disclaimer Text","show_tool_details":"Show technical tool details","show_tool_details_help":"Enable this to show professional technical details of AI tools to users.","show_settings":"Show settings icon for users","show_settings_help":"Show a settings gear icon in the chat interface for user customization.","show_version_in_settings":"Show app version in user settings","show_version_in_settings_help":"Show the app version at the bottom of the user settings dialog. This does not affect the admin settings page.","disable_signup":"Disable signup","disable_signup_help":"Hide the signup tab so users can only log in.","disable_auth_page":"Disable login/signup page","disable_auth_page_help":"Hide the entire auth page and prevent users from reaching login or signup forms.","composer_attachments":"Enable File Attachments","composer_attachments_help":"Allow users to upload and attach files to their messages.","thread_actions_feedback":"Enable Feedback Buttons","thread_actions_feedback_help":"Show like/dislike buttons on AI responses.","thread_actions_retry":"Enable Retry Button","thread_actions_retry_help":"Show a retry button to regenerate the last AI response.","history_enabled":"Enable Chat History Sidebar","history_enabled_help":"Show the sidebar containing previous conversations.","history_show_delete":"Allow Deleting Conversations","history_show_rename":"Allow Renaming Conversations","history_show_share":"Allow Sharing Conversations","history_show_pin":"Allow Pinning Conversations","sections_modes":"Settings Tab Modes","sections_modes_help":"Control visibility and interactability of settings tabs for users.","mode_editable":"Enable (Editable)","mode_faded":"Fade (Readonly)","mode_hidden":"Hide (Disable)","general_tab":"General Tab","profile_tab":"Profile Tab","account_tab":"Account Tab","inner_fields_modes":"Inner Fields Visibility","inner_fields_modes_help":"Configure visibility for individual fields within each tab."},"user_billing":{"initial_balance_tokens":"Default Initial Tokens","initial_balance_requests":"Default Initial Requests","initial_balance_help":"These values will be assigned to new users by default if not specified during creation."},"save_success":"Settings saved successfully","save_error":"Failed to save settings","save":"Save Changes","translations_management":"Translations Management","editor_tips":"All changes are saved automatically to local state. Don't forget to push 'Save Changes' to persist.","sync_from_code":"Sync from Code","reset_button":"Reset to Defaults","reset_confirm_title":"Reset Settings?","reset_confirm_description":"This will reset all fields to their original default values from the code. Current unsaved changes will be lost.","preview":"Preview","tips_label":"TIPS"},"analytics":{"title":"Analytics & Statistics","days":"{{count}} Days","time_range_label":"Last","days_unit":"days","total_users":"Total Users","total_threads":"Total Threads","total_messages":"Total Messages","total_token_usage":"Total Token Usage","usage_cost":"Usage & Cost","input":"Input","output":"Output","cost":"Cost","threads_chart":"Threads","messages_chart":"Messages","token_usage_chart":"Token Usage","cost_chart":"Cost Per Day","active_users":"Active Users","conversations":"conversations","threads":"threads","feedback":"User Feedback","total_feedback":"Total Feedback","positive":"Positive","negative":"Negative","loading_analytics":"Loading analytics...","error_loading":"Error loading data","source_human":"Users","source_service":"Service","source_all":"All","source_caption_human":"Showing real users only","source_caption_service":"Showing service traffic only","source_caption_all":"Showing all traffic"},"chat_history":{"title":"Chat History Management","search_placeholder":"Search by name, phone, thread title, or ID...","search_button":"Search","threads_list":"Threads List","thread_count":"{{count}}","no_thread_title":"Untitled conversation","messages":"Messages","messages_for":"Messages for: {{title}}","select_thread":"Select a conversation to view","no_threads":"No conversations found","empty_thread":"This conversation is empty","loading_threads":"Loading...","loading_messages":"Loading messages...","user_label":"User","assistant_label":"AI Assistant","subagent_label":"Subagent","input_tokens":"Input: {{value}}","output_tokens":"Output: {{value}}","total_tokens":"Total: {{value}}","cost":"Cost: {{value}}","unpriced":"Unpriced","all_feedbacks":"All Conversations","liked_feedbacks":"Liked 👍","disliked_feedbacks":"Disliked 👎","any_feedback":"With Feedback","output_available":"Output Available","running":"Running...","unnamed_file":"Unnamed File","download_file":"Download File","source_human":"Users","source_service":"Service","source_all":"All sources","external_user_id":"Service ref"},"users":{"title":"User Management","user_count":"User count: {{count}}","add_user":"Add New User","edit_user":"Edit User","phone":"Phone Number","phone_placeholder":"09123456789","name":"Name","surname":"Surname","initial_tokens":"Initial Tokens (optional)","initial_requests":"Initial Requests (optional)","balance":"Balance","requests_label":"Requests","tokens_label":"Tokens","token_limit":"Token Limit","request_limit":"Request Limit","tokens_usage":"Tokens Usage","requests_usage":"Requests Usage","actions":"Actions","copy_token":"Copy Token (auto-refresh)","token_copied":"Token copied successfully","no_token":"No token found for this user","recharge":"Recharge Balance","full_charge":"Full Charge","update_balance":"Update Balance","update_balance_for":"Update Balance for","token_count":"Token Count","request_count":"Request Count","updating":"Updating...","no_users":"No users found.","sort_ascending":"Sort ascending","sort_descending":"Sort descending","confirm_delete_user":"Are you sure you want to delete this user?","tokens_exceed_limit":"Tokens cannot exceed the specified limit","requests_exceed_limit":"Requests cannot exceed the specified limit","metadata":"Metadata (JSON)","initial_balance":"Initial Balance","custom_fields":"Additional Fields","metadata_raw":"Metadata (Raw JSON)","advanced_usage":"Advanced usage","invalid_json":"Invalid JSON format","auto_recharge":"Automatic Balance Renewal","auto_recharge_help":"Restore this user's balance to its limits on a recurring schedule.","enabled":"Enabled","recharge_interval":"Every","recharge_unit":"Interval Unit","recharge_unit_minute":"Minute(s)","recharge_unit_hour":"Hour(s)","recharge_unit_day":"Day(s)","recharge_unit_week":"Week(s)","recharge_unit_month":"Month(s)","recharge_schedule_help":"New schedules begin when saved. Existing schedules keep their current cycle anchor.","next_recharge":"Next renewal","last_recharge":"Last automatic renewal","not_available":"Not available","recharge_interval_invalid":"The renewal interval must be a positive whole number","recharge_policy_not_saved":"The backend did not save the renewal policy. Restart or update the backend to the version that supports automatic renewal.","usage_summary":"Usage Summary","input_tokens":"Input Tokens","output_tokens":"Output Tokens","total_tokens":"Total Tokens","requests_made":"Requests Made","total_cost":"Total Cost","renewals":"Balance Renewals","unpriced_requests":"Unpriced Requests","bulk_balance":"Bulk Balance","bulk_balance_help":"Apply a balance change to all matching users using search, explicit IDs, and metadata filters.","bulk_operation":"Operation","bulk_operation_add":"Add to balance","bulk_operation_set":"Set exact balance","bulk_operation_full_charge":"Fill to limits","bulk_use_current_search":"Use current search text","bulk_user_ids":"User IDs (optional)","bulk_metadata_filters":"Metadata Filters (JSON)","bulk_available_metadata":"Available metadata keys","bulk_preview_empty":"Affected users will be checked before applying.","bulk_preview_count":"{{count}} users match","apply_bulk_balance":"Apply Change","bulk_balance_confirm":"Apply this balance change to {{count}} users?","matching_users":"matching","bulk_apply_balance":"Update balances","bulk_apply_renewal":"Update renewal policy","bulk_select_change":"Select at least one bulk change to apply.","bulk_renewal_policy":"Renewal Policy","bulk_renewal_policy_help":"Enable or disable automatic renewal for every matched user.","bulk_renewal_anchor":"First renewal time (optional)","source_human":"Users","source_service":"Service","source_all":"All","account_type":"Account type","account_type_human":"Human user","account_type_service":"Service (external API)","account_type_service_help":"External API consumer. Phone is optional; share this account’s token with the integrating service.","service_name":"Service name","service_name_placeholder":"e.g. Acme CRM integration","optional":"optional","username":"Username","username_placeholder":"username","email":"Email","email_placeholder":"you@example.com","at_least_one_login_field":"Please provide at least one login field."},"admins":{"title":"Admin Management","admin_count":"Admin count: {{count}}","add_admin":"Add New Admin","edit_admin":"Edit Admin","username":"Username","name":"Name","password":"Password","password_edit":"New Password (leave empty to keep current)","permissions":"Permissions","perm_chat_history":"Chat History","perm_admin_management":"Admin Management","perm_user_management":"User Management","perm_analytics":"Analytics","perm_settings":"Settings","no_admins":"No admins found.","confirm_delete_admin":"Are you sure you want to delete this admin?"},"errors":{"access_denied_title":"Access Denied","access_denied_message":"You don't have the necessary permissions to access this page. You can contact the administrator!","back_to_dashboard":"Back to Dashboard"},"login":{"title":"Admin Panel","setup_title":"Initial Setup","setup_description":"No admin account exists yet. Set a password for the default admin user to get started.","set_password":"Set Password","set_password_placeholder":"Choose a strong password","confirm_password":"Confirm Password","confirm_password_placeholder":"Re-enter the password","passwords_mismatch":"Passwords do not match","password_too_short":"Password must be at least 4 characters","create_admin":"Create Admin & Login","setting_up":"Setting up...","username":"Username","username_placeholder":"Username","password":"Password","password_placeholder":"••••••••","submit":"Login","logging_in":"Logging in...","error":"Login failed","copyright":"© 2026 AI Chatbot Platform"}}`), Ii = { title: "Settings", sections: { profile: "Profile", general: "General", account: "Account" }, profile: { title: "Profile Information", subtitle: "Update your personal details below.", name: "First Name", surname: "Last Name", username: "Username", email: "Email", phone: "Phone Number", password: "New Password", password_placeholder: "Leave empty to keep current", save: "Save Changes", saving: "Saving...", success: "Profile updated successfully", error: "Failed to update profile", select_placeholder: "Select an option" }, general: { title: "General Settings", subtitle: "Configure look and feel and language.", theme: "Theme", language: "Language", themes: { light: "Light", dark: "Dark", system: "System" }, accent: "Accent Color", radius: "Rounded Corners", radius_levels: { sharp: "Sharp", round: "Round" }, languages: { en: "English", fa: "Persian" } }, account: { title: "Account & Usage", subtitle: "Monitor your quotas and manage your session.", balance: "Current Balance", tokens: "Tokens", requests: "Requests", logout: "Logout", logout_confirm: "Are you sure you want to logout?", last_recharge: "Last balance update on" } }, Ri = { unauthorized: "Authentication required. Please login again.", invalid_credentials: "Invalid login or password.", ambiguous_login: "This login matches more than one account. Please contact support.", password_required: "Password is required.", name_surname_required: "Name and surname are required.", invalid_token: "Your session has expired. Please login again.", user_not_found: "User not found.", insufficient_balance: "Insufficient balance. Please recharge your account.", insufficient_balance_recharge: "You've reached your balance quota. It will be reset on {{datetime, datetime}}.", insufficient_balance_no_recharge: "You've run out of balance. Please contact support to recharge your account.", me_update_failed: "Failed to update profile information.", thread_not_found: "Conversation not found.", access_denied: "You do not have permission to perform this action.", feedback_save_failed: "Failed to save feedback.", thread_update_failed: "Failed to update conversation.", thread_delete_failed: "Failed to delete conversation.", attachment_not_found: "Attachment not found.", thread_share_failed: "Failed to share conversation.", model_quota_reached_error: "The system cannot respond at this time. Please try again later.", admin_already_exists: "Admin with this username already exists.", admin_not_found: "Admin not found.", cannot_delete_self: "You cannot delete your own admin account.", admin_update_failed: "Failed to update admin information.", internal_error: "An internal server error occurred. Please try again later.", validation_error: "Invalid data provided. Please check your input.", not_found: "The requested resource was not found.", identity_required: "This field is required.", identity_already_exists: "This value is already registered." }, Oi = {
|
|
6868
6868
|
sidebar: Si,
|
|
6869
6869
|
chat: Ei,
|
|
6870
6870
|
tools_ui: Ni,
|
|
@@ -6873,9 +6873,9 @@ const Si = { new_conversation: "New conversation", tooltip_new_conversation: "St
|
|
|
6873
6873
|
admin: Ai,
|
|
6874
6874
|
settings: Ii,
|
|
6875
6875
|
errors: Ri
|
|
6876
|
-
}, Di = { new_conversation: "گفتگوی جدید", tooltip_new_conversation: "شروع یک گفتگوی جدید", delete_conversation: "حذف", delete_confirm_title: "حذف گفتگو؟", delete_confirm_description: "آیا از حذف این گفتگو اطمینان دارید؟ این عمل قابل بازگشت نیست.", cancel: "انصراف", delete: "حذف", chat_deleted_success: "گفتگو با موفقیت حذف شد", logout: "خروج", new_chat: "گفتگوی جدید", rename_conversation: "تغییر نام", rename_success: "نام گفتگو با موفقیت تغییر کرد", rename_failed: "خطا در تغییر نام گفتگو", search_conversations: "جستجوی گفتگوها...", save: "ذخیره", no_conversations: "هنوز گفتگویی ندارید", loading_more: "در حال بارگذاری...", pinned_success: "گفتگو پین شد", unpinned_success: "گفتگو از حالت پین خارج شد", pin_failed: "خطا در پین کردن گفتگو", share_success: "لینک کپی شد", share_description: "لینک اشتراکگذاری در حافظه موقت کپی شد.", share_failed: "خطا در ایجاد لینک اشتراکگذاری", pin_conversation: "پین", unpin_conversation: "برداشتن پین", share_conversation: "اشتراکگذاری" }, Li = { tools: "ابزارها", error: "خطا:", input_placeholder: "سوالتو اینجا بپرس...", insufficient_balance: "موجودی حساب شما کافی نیست. لطفا برای ادامه، حساب خود را شارژ کنید.", regenerate: "تولید مجدد", retry: "تلاش مجدد", copy: "کپی", like: "پسندیدم", dislike: "نپسندیدم", attach_file: "پیوست فایل", remove_file: "حذف فایل", reference: "ارجاع", reference_selection: "ارجاع به بخش انتخابشده", remove_reference: "حذف ارجاع", referenced_context: "بخش ارجاعشده", source_unavailable: "منبع در دسترس نیست", tool_reference: "ارجاع به ابزار", card_reference: "ارجاع به کارت", used_sources: "از {{count}} منبع استفاده شد", welcome: { title: "سلام! چطور میتونم کمکت کنم؟", subtitle: "هر سوالی داری بپرس، تمام تلاشمو میکنم کمکت کنم.", suggestions: ["چه کارهایی میتونی انجام بدی؟", "یه چیز جالب بهم بگو", "کمکم کن یه ایمیل بنویسم", "یه مفهوم رو برام توضیح بده"] }, disclaimer: "هوش مصنوعی ممکن است اشتباه کند. اطلاعات مهم را بررسی کنید." }, Fi = { pending: "در انتظار", running: "در حال اجرا", completed: "تکمیل شده", error: "خطا", parameters: "پارامترها", result: "نتیجه", view_error: "نمایش خطا", tool_error: "خطای ابزار", copied: "کپی شد!", copy_error: "کپی خطا" }, Pi = { login_tab: "ورود", signup_tab: "ثبت نام", phone: "شماره تلفن", phone_placeholder: "شماره تلفن", password: "رمز عبور", name: "نام", name_placeholder: "نام", surname: "نام خانوادگی", surname_placeholder: "نام خانوادگی", logging_in: "در حال ورود...", signing_up: "در حال ثبت نام...", auth_page_disabled_title: "صفحه ورود غیرفعال شده است.", auth_page_disabled_description: "برای دسترسی با مدیر سامانه تماس بگیرید.", select_placeholder: "انتخاب کنید", login_button: "ورود", signup_button: "ثبت نام", username: "نام کاربری", username_placeholder: "نام کاربری", email: "ایمیل", email_placeholder: "you@example.com" }, Mi = { toggle: "تغییر تم", light: "تغییر به تم روشن", dark: "تغییر به تم تاریک", system: "تغییر به تم سیستم" }, zi = /* @__PURE__ */ JSON.parse('{"select_placeholder":"انتخاب کنید","loading":"در حال بارگذاری...","retry":"تلاش مجدد","save":"ذخیره","saving":"در حال ذخیره...","cancel":"انصراف","delete":"حذف","edit":"ویرایش","search":"جستجو","search_placeholder":"جستجو...","no_data":"دادهای موجود نیست","loading_more":"در حال بارگذاری بیشتر...","confirm_delete":"آیا از حذف اطمینان دارید؟","error_loading":"خطا در بارگذاری دادهها","close":"بستن","jobs":{"section_title":"کارهای سیستمی","no_jobs":"هیچ کاری برای این برنامه تعریف نشده است.","run":"اجرا","run_dry":"اجرای آزمایشی","run_started":"کار «{{name}}» اجرا شد","run_failed":"اجرای کار با خطا مواجه شد","history":"تاریخچهٔ اجراها","history_help":"اجراهای اخیر. برای دیدن ورودیها و خروجی هر اجرا روی آن کلیک کنید.","view_history":"مشاهدهٔ تاریخچهٔ اجراها","inputs":"ورودیها","no_runs":"هنوز هیچ کاری اجرا نشده است.","dry_run":"اجرای آزمایشی","dry_run_help":"کار را بدون اعمال هیچ تغییری شبیهسازی میکند.","confirm_destructive":"این یک کار مخرب است. برای تأیید، نام «{{name}}» را وارد کنید.","output":"خروجی","no_output":"(خروجیای ثبت نشد)","output_truncated":"...[خروجی کوتاه شد]","result":"نتیجه","cancel_run":"لغو اجرا","triggered_by":"اجرا شده توسط {{user}}","triggered_by_api":"اجرا شده با کلید API","danger":{"safe":"بیخطر","caution":"نیازمند احتیاط","destructive":"مخرب"},"status":{"queued":"در صف","processing":"در حال اجرا","completed":"انجام شد","failed":"ناموفق","cancelled":"لغو شد"},"raw":{"title":"اجرای کد پایتون","warning":"این بخش کد پایتون دلخواه را با دسترسی کامل روی سرور اجرا میکند. هیچ ایزولهسازیای در کار نیست؛ تنها محافظت، کنترل دسترسی و ثبت در گزارش است. فقط زمانی استفاده کنید که از کاری که انجام میدهید کاملاً مطمئن هستید.","confirm_label":"برای فعال شدن دکمهٔ اجرا، عبارت «{{phrase}}» را وارد کنید.","run":"اجرای کد"}},"dashboard":{"title":"پنل ادمین","logout":"خروج","tabs":{"analytics":"تحلیل و آمار","chat_history":"گفتگوها","users":"کاربران","admins":"ادمینها","settings":"تنظیمات"}},"app_settings":{"title":"تنظیمات سامانه","subtitle":"پیکربندی کلی ظاهر و رفتار سامانه را مدیریت کنید.","sections":{"general":"اطلاعات پایه","chat":"تنظیمات گفتگو","user_billing":"کاربری و مالی"},"general":{"app_name":"نام سامانه","admin_title":"عنوان پنل ادمین","language":"زبان پیشفرض","language_help":"زبانی که کاربر در اولین ورود مشاهده میکند (در صورت عدم تشخیص خودکار).","appearance":"ظاهر پیشفرض","appearance_help":"این مقادیر زمانی اعمال میشوند که کاربر تنظیمات ظاهری خود را ذخیره نکرده باشد.","default_theme":"پوسته پیشفرض","default_accent":"رنگ اصلی پیشفرض","default_accent_help":"هر رنگ CSS پشتیبانیشده توسط مرورگر را وارد کنید؛ مانند #3b82f6 یا rgb(59 130 246).","default_accent_invalid":"یک رنگ CSS معتبر و پشتیبانیشده توسط مرورگر وارد کنید.","default_accent_preview":"پیشنمایش رنگ اصلی"},"chat":{"welcome_greeting":"پیام خوشآمدگویی","welcome_subtitle":"زیرعنوان خوشآمدگویی","disclaimer":"متن سلب مسئولیت","show_tool_details":"نمایش جزئیات فنی ابزارها (Tools)","show_tool_details_help":"برای نمایش جزئیات فنی و نحوه عملکرد ابزارهای هوش مصنوعی به کاربران، این گزینه را فعال کنید.","show_settings":"نمایش آیکون تنظیمات برای کاربران","show_settings_help":"نمایش چرخدنده تنظیمات در محیط چت برای شخصیسازی توسط کاربر.","show_version_in_settings":"نمایش نسخه برنامه در تنظیمات کاربر","show_version_in_settings_help":"نسخه برنامه را در پایین پنجره تنظیمات کاربر نمایش میدهد. این گزینه روی صفحه تنظیمات ادمین اثری ندارد.","disable_signup":"غیرفعالسازی ثبتنام","disable_signup_help":"تب ثبتنام را مخفی میکند تا کاربران فقط بتوانند وارد شوند.","disable_auth_page":"غیرفعالسازی صفحه ورود/ثبتنام","disable_auth_page_help":"کل صفحه احراز هویت را مخفی میکند و دسترسی به فرمهای ورود و ثبتنام را میبندد.","composer_attachments":"فعالسازی پیوست فایل","composer_attachments_help":"اجازه به کاربران برای آپلود و پیوست فایل به پیامها.","thread_actions_feedback":"فعالسازی دکمههای بازخورد","thread_actions_feedback_help":"نمایش دکمههای پسندیدن/نپسندیدن در پاسخهای هوش مصنوعی.","thread_actions_retry":"فعالسازی دکمه تلاش مجدد","thread_actions_retry_help":"نمایش دکمه تلاش مجدد برای تولید دوباره آخرین پاسخ هوش مصنوعی.","history_enabled":"فعالسازی سایدبار تاریخچه","history_enabled_help":"نمایش منوی کناری شامل گفتگوهای قبلی.","history_show_delete":"اجازه حذف گفتگوها","history_show_rename":"اجازه تغییر نام گفتگوها","history_show_share":"اجازه اشتراکگذاری گفتگوها","history_show_pin":"اجازه پین کردن گفتگوها","sections_modes":"وضعیت نمایش تبهای تنظیمات","sections_modes_help":"کنترل نمایش یا غیرفعال بودن تبهای مختلف در بخش تنظیمات کاربر.","mode_editable":"فعال (قابل ویرایش)","mode_faded":"محو (فقط خواندنی)","mode_hidden":"مخفی (غیرفعال)","general_tab":"تب عمومی","profile_tab":"تب پروفایل","account_tab":"تب حساب کاربری","inner_fields_modes":"مشاهدهپذیری فیلدهای داخلی","inner_fields_modes_help":"وضعیت نمایش فیلدهای هر تب را بهصورت مجزا پیکربندی کنید."},"user_billing":{"initial_balance_tokens":"توکن اولیه پیشفرض","initial_balance_requests":"تعداد درخواست اولیه پیشفرض","initial_balance_help":"این مقادیر بهصورت خودکار به کاربران جدید اختصاص داده میشوند، مگر اینکه هنگام ایجاد کاربر مقدار دیگری تعیین شود."},"save_success":"تنظیمات با موفقیت ذخیره شد","save_error":"خطا در ذخیرهسازی تنظیمات","save":"ذخیره تغییرات","translations_management":"مدیریت ترجمهها","editor_tips":"تمام تغییرات بهصورت خودکار در حالت محلی ذخیره میشوند. برای نهاییسازی، دکمه «ذخیره تغییرات» را بزنید.","sync_from_code":"همگامسازی از کد","reset_button":"بازنشانی به تنظیمات اولیه","reset_confirm_title":"بازنشانی تنظیمات؟","reset_confirm_description":"این عمل تمام فیلدها را به مقادیر پیشفرض در کد بازمیگرداند. تغییرات ذخیره نشده فعلی از بین خواهند رفت.","preview":"پیشنمایش","tips_label":"نکته"},"analytics":{"title":"تحلیل و آمار","days":"{{count}} روز","time_range_label":"بازه","days_unit":"روز","total_users":"تعداد کاربران","total_threads":"تعداد گفتگوها","total_messages":"تعداد پیامها","total_token_usage":"مصرف کل توکن","usage_cost":"مصرف و هزینه","input":"ورودی","output":"خروجی","cost":"هزینه","threads_chart":"گفتگوها","messages_chart":"پیامها","token_usage_chart":"مصرف توکن","cost_chart":"هزینه روزانه","active_users":"کاربران فعال","conversations":"گفتگو","threads":"گفتگو","feedback":"نظرات کاربران","total_feedback":"کل نظرات","positive":"مثبت","negative":"منفی","loading_analytics":"در حال بارگذاری تحلیلها...","error_loading":"خطا در بارگذاری دادهها","source_human":"کاربران","source_service":"سرویس","source_all":"همه","source_caption_human":"نمایش فقط کاربران واقعی","source_caption_service":"نمایش فقط ترافیک سرویس","source_caption_all":"نمایش همهٔ ترافیک"},"chat_history":{"title":"مدیریت تاریخچه گفتگوها","search_placeholder":"جستجو بر اساس نام، شماره تماس، عنوان گفتگو یا شناسه...","search_button":"جستجو","threads_list":"لیست گفتگوها","thread_count":"{{count}}","no_thread_title":"گفتگو بدون عنوان","messages":"پیامها","messages_for":"پیامهای گفتگو: {{title}}","select_thread":"یک گفتگو را برای مشاهده انتخاب کنید","no_threads":"هیچ گفتگویی یافت نشد","empty_thread":"این گفتگو خالی است","loading_threads":"در حال بارگذاری...","loading_messages":"در حال بارگذاری پیامها...","user_label":"کاربر","assistant_label":"دستیار هوشمند","subagent_label":"زیرعامل","input_tokens":"ورودی: {{value}}","output_tokens":"خروجی: {{value}}","total_tokens":"کل: {{value}}","cost":"هزینه: {{value}}","unpriced":"بدون هزینه","all_feedbacks":"همه گفتگوها","liked_feedbacks":"پسندیده شده 👍","disliked_feedbacks":"نپسندیده شده 👎","any_feedback":"دارای بازخورد","output_available":"خروجی موجود است","running":"در حال اجرا...","unnamed_file":"فایل بدون نام","download_file":"دانلود فایل","source_human":"کاربران","source_service":"سرویس","source_all":"همهٔ منابع","external_user_id":"شناسهٔ سرویس"},"users":{"title":"مدیریت کاربران","user_count":"تعداد کاربران: {{count}}","add_user":"افزودن کاربر جدید","edit_user":"ویرایش کاربر","phone":"شماره تلفن","phone_placeholder":"۰۹۱۲۳۴۵۶۷۸۹","name":"نام","surname":"نام خانوادگی","initial_tokens":"تعداد توکن اولیه (اختیاری)","initial_requests":"تعداد درخواست اولیه (اختیاری)","balance":"موجودی","requests_label":"درخواستها","tokens_label":"توکنها","token_limit":"سقف توکن","request_limit":"سقف درخواست","tokens_usage":"میزان مصرف توکن","requests_usage":"میزان مصرف درخواست","actions":"عملیات","copy_token":"کپی توکن (با بروزرسانی خودکار)","token_copied":"توکن با موفقیت کپی شد","no_token":"توکنی برای این کاربر یافت نشد","recharge":"شارژ موجودی","full_charge":"شارژ کامل","update_balance":"بروزرسانی موجودی","update_balance_for":"بروزرسانی موجودی","token_count":"تعداد توکن","request_count":"تعداد درخواست","updating":"در حال بروزرسانی...","no_users":"هیچ کاربری یافت نشد.","sort_ascending":"مرتبسازی صعودی","sort_descending":"مرتبسازی نزولی","confirm_delete_user":"آیا از حذف این کاربر اطمینان دارید؟","tokens_exceed_limit":"تعداد توکن نمیتواند بیشتر از سقف مجاز باشد","requests_exceed_limit":"تعداد درخواست نمیتواند بیشتر از سقف مجاز باشد","metadata":"متادیتا (JSON)","initial_balance":"موجودی اولیه","custom_fields":"فیلدهای اضافه","metadata_raw":"متادیتا (JSON خام)","advanced_usage":"استفاده پیشرفته","invalid_json":"فرمت JSON نامعتبر است","auto_recharge":"تمدید خودکار موجودی","auto_recharge_help":"موجودی این کاربر را طبق یک برنامه تکرارشونده تا سقف تعیینشده بازنشانی میکند.","enabled":"فعال","recharge_interval":"هر","recharge_unit":"واحد بازه","recharge_unit_minute":"دقیقه","recharge_unit_hour":"ساعت","recharge_unit_day":"روز","recharge_unit_week":"هفته","recharge_unit_month":"ماه","recharge_schedule_help":"برنامه جدید از زمان ذخیره آغاز میشود. برنامه موجود مبدأ دوره فعلی خود را حفظ میکند.","next_recharge":"تمدید بعدی","last_recharge":"آخرین تمدید خودکار","not_available":"در دسترس نیست","recharge_interval_invalid":"بازه تمدید باید یک عدد صحیح مثبت باشد","recharge_policy_not_saved":"سرور تنظیمات تمدید خودکار را ذخیره نکرد. سرور را راهاندازی مجدد یا به نسخه پشتیبانکننده از تمدید خودکار بروزرسانی کنید.","usage_summary":"خلاصه مصرف","input_tokens":"توکنهای ورودی","output_tokens":"توکنهای خروجی","total_tokens":"کل توکنها","requests_made":"تعداد درخواستها","total_cost":"هزینه کل","renewals":"دفعات شارژ موجودی","unpriced_requests":"درخواستهای بدون هزینهی ثبت شده","bulk_balance":"تغییر گروهی موجودی","bulk_balance_help":"تغییر موجودی را روی کاربران مطابق جستجو، شناسههای مشخص و فیلترهای متادیتا اعمال کنید.","bulk_operation":"عملیات","bulk_operation_add":"افزودن به موجودی","bulk_operation_set":"تنظیم مقدار دقیق","bulk_operation_full_charge":"شارژ تا سقف","bulk_use_current_search":"استفاده از جستجوی فعلی","bulk_user_ids":"شناسه کاربران (اختیاری)","bulk_metadata_filters":"فیلترهای متادیتا (JSON)","bulk_available_metadata":"کلیدهای متادیتای در دسترس","bulk_preview_empty":"تعداد کاربران مطابق قبل از اعمال بررسی میشود.","bulk_preview_count":"{{count}} کاربر مطابق هستند","apply_bulk_balance":"اعمال تغییر","bulk_balance_confirm":"این تغییر موجودی برای {{count}} کاربر اعمال شود؟","matching_users":"کاربران مطابق","bulk_apply_balance":"بروزرسانی موجودی","bulk_apply_renewal":"بروزرسانی سیاست تمدید","bulk_select_change":"حداقل یک تغییر گروهی را برای اعمال انتخاب کنید.","bulk_renewal_policy":"سیاست تمدید","bulk_renewal_policy_help":"تمدید خودکار را برای همه کاربران مطابق فعال یا غیرفعال کنید.","bulk_renewal_anchor":"زمان اولین تمدید (اختیاری)","source_human":"کاربران","source_service":"سرویس","source_all":"همه","account_type":"نوع حساب","account_type_human":"کاربر انسانی","account_type_service":"سرویس","account_type_service_help":"مصرفکنندهٔ سرویس خارجی. شمارهٔ تلفن اختیاری است؛ توکن این حساب را با سرویس یکپارچهشونده به اشتراک بگذارید.","service_name":"نام سرویس","service_name_placeholder":"مثلاً یکپارچهسازی CRM","optional":"اختیاری","username":"نام کاربری","username_placeholder":"نام کاربری","email":"ایمیل","email_placeholder":"you@example.com"},"admins":{"title":"مدیریت ادمینها","admin_count":"تعداد ادمینها: {{count}}","add_admin":"افزودن ادمین جدید","edit_admin":"ویرایش ادمین","username":"نام کاربری","name":"نام","password":"رمز عبور","password_edit":"رمز عبور جدید (خالی بگذارید تا تغییر نکند)","permissions":"دسترسیها","perm_chat_history":"تاریخچه گفتگوها","perm_admin_management":"مدیریت ادمینها","perm_user_management":"مدیریت کاربران","perm_analytics":"تحلیل و آمار","perm_settings":"تنظیمات","no_admins":"هیچ ادمینی یافت نشد.","confirm_delete_admin":"آیا از حذف این ادمین اطمینان دارید؟"},"errors":{"access_denied_title":"عدم دسترسی","access_denied_message":"شما مجوزهای لازم برای دسترسی به این صفحه را ندارید. میتوانید با مدیر سیستم تماس بگیرید.","back_to_dashboard":"بازگشت به پیشخوان"},"login":{"title":"پنل ادمین","setup_title":"راهاندازی اولیه","setup_description":"هنوز حساب ادمینی وجود ندارد. برای شروع، یک رمز عبور برای کاربر ادمین پیشفرض تنظیم کنید.","set_password":"تعیین رمز عبور","set_password_placeholder":"یک رمز عبور قوی انتخاب کنید","confirm_password":"تأیید رمز عبور","confirm_password_placeholder":"رمز عبور را دوباره وارد کنید","passwords_mismatch":"رمزهای عبور مطابقت ندارند","password_too_short":"رمز عبور باید حداقل ۴ کاراکتر باشد","create_admin":"ایجاد ادمین و ورود","setting_up":"در حال راهاندازی...","username":"نام کاربری","username_placeholder":"نام کاربری","password":"رمز عبور","password_placeholder":"••••••••","submit":"ورود به پنل","logging_in":"در حال ورود...","error":"خطا در ورود","copyright":"© ۲۰۲۶ پلتفرم چتبات هوشمند"}}'), Ui = { title: "تنظیمات", sections: { profile: "پروفایل", general: "عمومی", account: "حساب کاربری" }, profile: { title: "اطلاعات پروفایل", subtitle: "اطلاعات شخصی خود را در زیر بروز کنید.", name: "نام", surname: "نام خانوادگی", username: "نام کاربری", email: "ایمیل", phone: "شماره تلفن", password: "رمز عبور جدید", password_placeholder: "برای عدم تغییر خالی بگذارید", save: "ذخیره تغییرات", saving: "در حال ذخیره...", success: "پروفایل با موفقیت بروزرسانی شد", error: "خطا در بروزرسانی پروفایل", select_placeholder: "انتخاب کنید" }, general: { title: "تنظیمات عمومی", subtitle: "ظاهر و زبان برنامه را تنظیم کنید.", theme: "تم", language: "زبان", themes: { light: "روشن", dark: "تاریک", system: "سیستم" }, accent: "رنگ اصلی", radius: "میزان گردی لبهها", radius_levels: { sharp: "تیز", round: "گرد" }, languages: { en: "English", fa: "فارسی" } }, account: { title: "حساب و میزان مصرف", subtitle: "سهمیه مصرف و نشست خود را مدیریت کنید.", balance: "موجود فعلی", tokens: "توکنها", requests: "درخواستها", logout: "خروج از حساب", logout_confirm: "آیا از خروج اطمینان دارید؟", last_recharge: "آخرین بروزرسانی اعتبار در تاریخ" } }, qi = { unauthorized: "دسترسی مجاز نیست. لطفاً دوباره وارد شوید.", invalid_credentials: "شماره تلفن یا رمز عبور اشتباه است.", phone_required: "شماره تلفن الزامی است.", password_required: "رمز عبور الزامی است.", name_surname_required: "نام و نام خانوادگی الزامی است.", phone_already_exists: "این شماره تلفن قبلاً ثبت شده است.", invalid_token: "نشست شما منقضی شده است. لطفاً دوباره وارد شوید.", user_not_found: "کاربر یافت نشد.", insufficient_balance: "موجودی کافی نیست. لطفاً حساب خود را شارژ کنید.", insufficient_balance_recharge: "شما به سقف موجودی خود رسیدهاید. موجودی شما {{datetime, datetime}} بازنشانی خواهد شد.", insufficient_balance_no_recharge: "موجودی شما به پایان رسیده است. لطفاً برای شارژ حساب خود با پشتیبانی تماس بگیرید.", me_update_failed: "خطا در بروزرسانی اطلاعات پروفایل.", thread_not_found: "گفتگو یافت نشد.", access_denied: "شما اجازه انجام این عملیات را ندارید.", feedback_save_failed: "خطا در ثبت بازخورد.", thread_update_failed: "خطا در بروزرسانی گفتگو.", thread_delete_failed: "خطا در حذف گفتگو.", attachment_not_found: "فایل پیوست یافت نشد.", thread_share_failed: "خطا در اشتراکگذاری گفتگو.", model_quota_reached_error: "سامانه در حال حاضر قادر به پاسخگویی نیست. لطفاً بعداً دوباره تلاش کنید.", admin_already_exists: "ادمین با این نام کاربری قبلاً ایجاد شده است.", admin_not_found: "ادمین یافت نشد.", cannot_delete_self: "شما نمیتوانید حساب مدیریت خود را حذف کنید.", admin_update_failed: "خطا در بروزرسانی اطلاعات ادمین.", internal_error: "یک خطای داخلی در سرور رخ داده است. لطفاً بعداً تلاش کنید.", validation_error: "دادههای ارسالی معتبر نیستند. لطفاً ورودیهای خود را بررسی کنید.", not_found: "منبع مورد نظر یافت نشد.", identity_required: "این فیلد الزامی است.", identity_already_exists: "این مقدار قبلاً ثبت شده است." }, $i = {
|
|
6877
|
-
sidebar:
|
|
6878
|
-
chat:
|
|
6876
|
+
}, Li = { new_conversation: "گفتگوی جدید", tooltip_new_conversation: "شروع یک گفتگوی جدید", delete_conversation: "حذف", delete_confirm_title: "حذف گفتگو؟", delete_confirm_description: "آیا از حذف این گفتگو اطمینان دارید؟ این عمل قابل بازگشت نیست.", cancel: "انصراف", delete: "حذف", chat_deleted_success: "گفتگو با موفقیت حذف شد", logout: "خروج", new_chat: "گفتگوی جدید", rename_conversation: "تغییر نام", rename_success: "نام گفتگو با موفقیت تغییر کرد", rename_failed: "خطا در تغییر نام گفتگو", search_conversations: "جستجوی گفتگوها...", save: "ذخیره", no_conversations: "هنوز گفتگویی ندارید", loading_more: "در حال بارگذاری...", pinned_success: "گفتگو پین شد", unpinned_success: "گفتگو از حالت پین خارج شد", pin_failed: "خطا در پین کردن گفتگو", share_success: "لینک کپی شد", share_description: "لینک اشتراکگذاری در حافظه موقت کپی شد.", share_failed: "خطا در ایجاد لینک اشتراکگذاری", pin_conversation: "پین", unpin_conversation: "برداشتن پین", share_conversation: "اشتراکگذاری" }, Di = { tools: "ابزارها", error: "خطا:", input_placeholder: "سوالتو اینجا بپرس...", insufficient_balance: "موجودی حساب شما کافی نیست. لطفا برای ادامه، حساب خود را شارژ کنید.", regenerate: "تولید مجدد", retry: "تلاش مجدد", copy: "کپی", like: "پسندیدم", dislike: "نپسندیدم", attach_file: "پیوست فایل", remove_file: "حذف فایل", reference: "ارجاع", reference_selection: "ارجاع به بخش انتخابشده", remove_reference: "حذف ارجاع", referenced_context: "بخش ارجاعشده", source_unavailable: "منبع در دسترس نیست", tool_reference: "ارجاع به ابزار", card_reference: "ارجاع به کارت", used_sources: "از {{count}} منبع استفاده شد", welcome: { title: "سلام! چطور میتونم کمکت کنم؟", subtitle: "هر سوالی داری بپرس، تمام تلاشمو میکنم کمکت کنم.", suggestions: ["چه کارهایی میتونی انجام بدی؟", "یه چیز جالب بهم بگو", "کمکم کن یه ایمیل بنویسم", "یه مفهوم رو برام توضیح بده"] }, disclaimer: "هوش مصنوعی ممکن است اشتباه کند. اطلاعات مهم را بررسی کنید." }, Fi = { pending: "در انتظار", running: "در حال اجرا", completed: "تکمیل شده", error: "خطا", parameters: "پارامترها", result: "نتیجه", view_error: "نمایش خطا", tool_error: "خطای ابزار", copied: "کپی شد!", copy_error: "کپی خطا" }, Pi = { login_tab: "ورود", signup_tab: "ثبت نام", phone: "شماره تلفن", phone_placeholder: "شماره تلفن", password: "رمز عبور", name: "نام", name_placeholder: "نام", surname: "نام خانوادگی", surname_placeholder: "نام خانوادگی", logging_in: "در حال ورود...", signing_up: "در حال ثبت نام...", auth_page_disabled_title: "صفحه ورود غیرفعال شده است.", auth_page_disabled_description: "برای دسترسی با مدیر سامانه تماس بگیرید.", select_placeholder: "انتخاب کنید", login_button: "ورود", signup_button: "ثبت نام", username: "نام کاربری", username_placeholder: "نام کاربری", email: "ایمیل", email_placeholder: "you@example.com", at_least_one_login_field: "لطفاً حداقل یک فیلد ورود را وارد کنید." }, Mi = { toggle: "تغییر تم", light: "تغییر به تم روشن", dark: "تغییر به تم تاریک", system: "تغییر به تم سیستم" }, zi = /* @__PURE__ */ JSON.parse('{"select_placeholder":"انتخاب کنید","loading":"در حال بارگذاری...","retry":"تلاش مجدد","save":"ذخیره","saving":"در حال ذخیره...","cancel":"انصراف","delete":"حذف","edit":"ویرایش","search":"جستجو","search_placeholder":"جستجو...","no_data":"دادهای موجود نیست","loading_more":"در حال بارگذاری بیشتر...","confirm_delete":"آیا از حذف اطمینان دارید؟","error_loading":"خطا در بارگذاری دادهها","close":"بستن","jobs":{"section_title":"کارهای سیستمی","no_jobs":"هیچ کاری برای این برنامه تعریف نشده است.","run":"اجرا","run_dry":"اجرای آزمایشی","run_started":"کار «{{name}}» اجرا شد","run_failed":"اجرای کار با خطا مواجه شد","history":"تاریخچهٔ اجراها","history_help":"اجراهای اخیر. برای دیدن ورودیها و خروجی هر اجرا روی آن کلیک کنید.","view_history":"مشاهدهٔ تاریخچهٔ اجراها","inputs":"ورودیها","no_runs":"هنوز هیچ کاری اجرا نشده است.","dry_run":"اجرای آزمایشی","dry_run_help":"کار را بدون اعمال هیچ تغییری شبیهسازی میکند.","confirm_destructive":"این یک کار مخرب است. برای تأیید، نام «{{name}}» را وارد کنید.","output":"خروجی","no_output":"(خروجیای ثبت نشد)","output_truncated":"...[خروجی کوتاه شد]","result":"نتیجه","cancel_run":"لغو اجرا","triggered_by":"اجرا شده توسط {{user}}","triggered_by_api":"اجرا شده با کلید API","danger":{"safe":"بیخطر","caution":"نیازمند احتیاط","destructive":"مخرب"},"status":{"queued":"در صف","processing":"در حال اجرا","completed":"انجام شد","failed":"ناموفق","cancelled":"لغو شد"},"raw":{"title":"اجرای کد پایتون","warning":"این بخش کد پایتون دلخواه را با دسترسی کامل روی سرور اجرا میکند. هیچ ایزولهسازیای در کار نیست؛ تنها محافظت، کنترل دسترسی و ثبت در گزارش است. فقط زمانی استفاده کنید که از کاری که انجام میدهید کاملاً مطمئن هستید.","confirm_label":"برای فعال شدن دکمهٔ اجرا، عبارت «{{phrase}}» را وارد کنید.","run":"اجرای کد"},"resolve":"رفع"},"dashboard":{"title":"پنل ادمین","logout":"خروج","tabs":{"analytics":"تحلیل و آمار","chat_history":"گفتگوها","users":"کاربران","admins":"ادمینها","settings":"تنظیمات"}},"app_settings":{"title":"تنظیمات سامانه","subtitle":"پیکربندی کلی ظاهر و رفتار سامانه را مدیریت کنید.","sections":{"general":"اطلاعات پایه","chat":"تنظیمات گفتگو","user_billing":"کاربری و مالی"},"general":{"app_name":"نام سامانه","admin_title":"عنوان پنل ادمین","language":"زبان پیشفرض","language_help":"زبانی که کاربر در اولین ورود مشاهده میکند (در صورت عدم تشخیص خودکار).","appearance":"ظاهر پیشفرض","appearance_help":"این مقادیر زمانی اعمال میشوند که کاربر تنظیمات ظاهری خود را ذخیره نکرده باشد.","default_theme":"پوسته پیشفرض","default_accent":"رنگ اصلی پیشفرض","default_accent_help":"هر رنگ CSS پشتیبانیشده توسط مرورگر را وارد کنید؛ مانند #3b82f6 یا rgb(59 130 246).","default_accent_invalid":"یک رنگ CSS معتبر و پشتیبانیشده توسط مرورگر وارد کنید.","default_accent_preview":"پیشنمایش رنگ اصلی"},"chat":{"welcome_greeting":"پیام خوشآمدگویی","welcome_subtitle":"زیرعنوان خوشآمدگویی","disclaimer":"متن سلب مسئولیت","show_tool_details":"نمایش جزئیات فنی ابزارها (Tools)","show_tool_details_help":"برای نمایش جزئیات فنی و نحوه عملکرد ابزارهای هوش مصنوعی به کاربران، این گزینه را فعال کنید.","show_settings":"نمایش آیکون تنظیمات برای کاربران","show_settings_help":"نمایش چرخدنده تنظیمات در محیط چت برای شخصیسازی توسط کاربر.","show_version_in_settings":"نمایش نسخه برنامه در تنظیمات کاربر","show_version_in_settings_help":"نسخه برنامه را در پایین پنجره تنظیمات کاربر نمایش میدهد. این گزینه روی صفحه تنظیمات ادمین اثری ندارد.","disable_signup":"غیرفعالسازی ثبتنام","disable_signup_help":"تب ثبتنام را مخفی میکند تا کاربران فقط بتوانند وارد شوند.","disable_auth_page":"غیرفعالسازی صفحه ورود/ثبتنام","disable_auth_page_help":"کل صفحه احراز هویت را مخفی میکند و دسترسی به فرمهای ورود و ثبتنام را میبندد.","composer_attachments":"فعالسازی پیوست فایل","composer_attachments_help":"اجازه به کاربران برای آپلود و پیوست فایل به پیامها.","thread_actions_feedback":"فعالسازی دکمههای بازخورد","thread_actions_feedback_help":"نمایش دکمههای پسندیدن/نپسندیدن در پاسخهای هوش مصنوعی.","thread_actions_retry":"فعالسازی دکمه تلاش مجدد","thread_actions_retry_help":"نمایش دکمه تلاش مجدد برای تولید دوباره آخرین پاسخ هوش مصنوعی.","history_enabled":"فعالسازی سایدبار تاریخچه","history_enabled_help":"نمایش منوی کناری شامل گفتگوهای قبلی.","history_show_delete":"اجازه حذف گفتگوها","history_show_rename":"اجازه تغییر نام گفتگوها","history_show_share":"اجازه اشتراکگذاری گفتگوها","history_show_pin":"اجازه پین کردن گفتگوها","sections_modes":"وضعیت نمایش تبهای تنظیمات","sections_modes_help":"کنترل نمایش یا غیرفعال بودن تبهای مختلف در بخش تنظیمات کاربر.","mode_editable":"فعال (قابل ویرایش)","mode_faded":"محو (فقط خواندنی)","mode_hidden":"مخفی (غیرفعال)","general_tab":"تب عمومی","profile_tab":"تب پروفایل","account_tab":"تب حساب کاربری","inner_fields_modes":"مشاهدهپذیری فیلدهای داخلی","inner_fields_modes_help":"وضعیت نمایش فیلدهای هر تب را بهصورت مجزا پیکربندی کنید."},"user_billing":{"initial_balance_tokens":"توکن اولیه پیشفرض","initial_balance_requests":"تعداد درخواست اولیه پیشفرض","initial_balance_help":"این مقادیر بهصورت خودکار به کاربران جدید اختصاص داده میشوند، مگر اینکه هنگام ایجاد کاربر مقدار دیگری تعیین شود."},"save_success":"تنظیمات با موفقیت ذخیره شد","save_error":"خطا در ذخیرهسازی تنظیمات","save":"ذخیره تغییرات","translations_management":"مدیریت ترجمهها","editor_tips":"تمام تغییرات بهصورت خودکار در حالت محلی ذخیره میشوند. برای نهاییسازی، دکمه «ذخیره تغییرات» را بزنید.","sync_from_code":"همگامسازی از کد","reset_button":"بازنشانی به تنظیمات اولیه","reset_confirm_title":"بازنشانی تنظیمات؟","reset_confirm_description":"این عمل تمام فیلدها را به مقادیر پیشفرض در کد بازمیگرداند. تغییرات ذخیره نشده فعلی از بین خواهند رفت.","preview":"پیشنمایش","tips_label":"نکته"},"analytics":{"title":"تحلیل و آمار","days":"{{count}} روز","time_range_label":"بازه","days_unit":"روز","total_users":"تعداد کاربران","total_threads":"تعداد گفتگوها","total_messages":"تعداد پیامها","total_token_usage":"مصرف کل توکن","usage_cost":"مصرف و هزینه","input":"ورودی","output":"خروجی","cost":"هزینه","threads_chart":"گفتگوها","messages_chart":"پیامها","token_usage_chart":"مصرف توکن","cost_chart":"هزینه روزانه","active_users":"کاربران فعال","conversations":"گفتگو","threads":"گفتگو","feedback":"نظرات کاربران","total_feedback":"کل نظرات","positive":"مثبت","negative":"منفی","loading_analytics":"در حال بارگذاری تحلیلها...","error_loading":"خطا در بارگذاری دادهها","source_human":"کاربران","source_service":"سرویس","source_all":"همه","source_caption_human":"نمایش فقط کاربران واقعی","source_caption_service":"نمایش فقط ترافیک سرویس","source_caption_all":"نمایش همهٔ ترافیک"},"chat_history":{"title":"مدیریت تاریخچه گفتگوها","search_placeholder":"جستجو بر اساس نام، شماره تماس، عنوان گفتگو یا شناسه...","search_button":"جستجو","threads_list":"لیست گفتگوها","thread_count":"{{count}}","no_thread_title":"گفتگو بدون عنوان","messages":"پیامها","messages_for":"پیامهای گفتگو: {{title}}","select_thread":"یک گفتگو را برای مشاهده انتخاب کنید","no_threads":"هیچ گفتگویی یافت نشد","empty_thread":"این گفتگو خالی است","loading_threads":"در حال بارگذاری...","loading_messages":"در حال بارگذاری پیامها...","user_label":"کاربر","assistant_label":"دستیار هوشمند","subagent_label":"زیرعامل","input_tokens":"ورودی: {{value}}","output_tokens":"خروجی: {{value}}","total_tokens":"کل: {{value}}","cost":"هزینه: {{value}}","unpriced":"بدون هزینه","all_feedbacks":"همه گفتگوها","liked_feedbacks":"پسندیده شده 👍","disliked_feedbacks":"نپسندیده شده 👎","any_feedback":"دارای بازخورد","output_available":"خروجی موجود است","running":"در حال اجرا...","unnamed_file":"فایل بدون نام","download_file":"دانلود فایل","source_human":"کاربران","source_service":"سرویس","source_all":"همهٔ منابع","external_user_id":"شناسهٔ سرویس"},"users":{"title":"مدیریت کاربران","user_count":"تعداد کاربران: {{count}}","add_user":"افزودن کاربر جدید","edit_user":"ویرایش کاربر","phone":"شماره تلفن","phone_placeholder":"۰۹۱۲۳۴۵۶۷۸۹","name":"نام","surname":"نام خانوادگی","initial_tokens":"تعداد توکن اولیه (اختیاری)","initial_requests":"تعداد درخواست اولیه (اختیاری)","balance":"موجودی","requests_label":"درخواستها","tokens_label":"توکنها","token_limit":"سقف توکن","request_limit":"سقف درخواست","tokens_usage":"میزان مصرف توکن","requests_usage":"میزان مصرف درخواست","actions":"عملیات","copy_token":"کپی توکن (با بروزرسانی خودکار)","token_copied":"توکن با موفقیت کپی شد","no_token":"توکنی برای این کاربر یافت نشد","recharge":"شارژ موجودی","full_charge":"شارژ کامل","update_balance":"بروزرسانی موجودی","update_balance_for":"بروزرسانی موجودی","token_count":"تعداد توکن","request_count":"تعداد درخواست","updating":"در حال بروزرسانی...","no_users":"هیچ کاربری یافت نشد.","sort_ascending":"مرتبسازی صعودی","sort_descending":"مرتبسازی نزولی","confirm_delete_user":"آیا از حذف این کاربر اطمینان دارید؟","tokens_exceed_limit":"تعداد توکن نمیتواند بیشتر از سقف مجاز باشد","requests_exceed_limit":"تعداد درخواست نمیتواند بیشتر از سقف مجاز باشد","metadata":"متادیتا (JSON)","initial_balance":"موجودی اولیه","custom_fields":"فیلدهای اضافه","metadata_raw":"متادیتا (JSON خام)","advanced_usage":"استفاده پیشرفته","invalid_json":"فرمت JSON نامعتبر است","auto_recharge":"تمدید خودکار موجودی","auto_recharge_help":"موجودی این کاربر را طبق یک برنامه تکرارشونده تا سقف تعیینشده بازنشانی میکند.","enabled":"فعال","recharge_interval":"هر","recharge_unit":"واحد بازه","recharge_unit_minute":"دقیقه","recharge_unit_hour":"ساعت","recharge_unit_day":"روز","recharge_unit_week":"هفته","recharge_unit_month":"ماه","recharge_schedule_help":"برنامه جدید از زمان ذخیره آغاز میشود. برنامه موجود مبدأ دوره فعلی خود را حفظ میکند.","next_recharge":"تمدید بعدی","last_recharge":"آخرین تمدید خودکار","not_available":"در دسترس نیست","recharge_interval_invalid":"بازه تمدید باید یک عدد صحیح مثبت باشد","recharge_policy_not_saved":"سرور تنظیمات تمدید خودکار را ذخیره نکرد. سرور را راهاندازی مجدد یا به نسخه پشتیبانکننده از تمدید خودکار بروزرسانی کنید.","usage_summary":"خلاصه مصرف","input_tokens":"توکنهای ورودی","output_tokens":"توکنهای خروجی","total_tokens":"کل توکنها","requests_made":"تعداد درخواستها","total_cost":"هزینه کل","renewals":"دفعات شارژ موجودی","unpriced_requests":"درخواستهای بدون هزینهی ثبت شده","bulk_balance":"تغییر گروهی موجودی","bulk_balance_help":"تغییر موجودی را روی کاربران مطابق جستجو، شناسههای مشخص و فیلترهای متادیتا اعمال کنید.","bulk_operation":"عملیات","bulk_operation_add":"افزودن به موجودی","bulk_operation_set":"تنظیم مقدار دقیق","bulk_operation_full_charge":"شارژ تا سقف","bulk_use_current_search":"استفاده از جستجوی فعلی","bulk_user_ids":"شناسه کاربران (اختیاری)","bulk_metadata_filters":"فیلترهای متادیتا (JSON)","bulk_available_metadata":"کلیدهای متادیتای در دسترس","bulk_preview_empty":"تعداد کاربران مطابق قبل از اعمال بررسی میشود.","bulk_preview_count":"{{count}} کاربر مطابق هستند","apply_bulk_balance":"اعمال تغییر","bulk_balance_confirm":"این تغییر موجودی برای {{count}} کاربر اعمال شود؟","matching_users":"کاربران مطابق","bulk_apply_balance":"بروزرسانی موجودی","bulk_apply_renewal":"بروزرسانی سیاست تمدید","bulk_select_change":"حداقل یک تغییر گروهی را برای اعمال انتخاب کنید.","bulk_renewal_policy":"سیاست تمدید","bulk_renewal_policy_help":"تمدید خودکار را برای همه کاربران مطابق فعال یا غیرفعال کنید.","bulk_renewal_anchor":"زمان اولین تمدید (اختیاری)","source_human":"کاربران","source_service":"سرویس","source_all":"همه","account_type":"نوع حساب","account_type_human":"کاربر انسانی","account_type_service":"سرویس","account_type_service_help":"مصرفکنندهٔ سرویس خارجی. شمارهٔ تلفن اختیاری است؛ توکن این حساب را با سرویس یکپارچهشونده به اشتراک بگذارید.","service_name":"نام سرویس","service_name_placeholder":"مثلاً یکپارچهسازی CRM","optional":"اختیاری","username":"نام کاربری","username_placeholder":"نام کاربری","email":"ایمیل","email_placeholder":"you@example.com","at_least_one_login_field":"لطفاً حداقل یک فیلد ورود را وارد کنید."},"admins":{"title":"مدیریت ادمینها","admin_count":"تعداد ادمینها: {{count}}","add_admin":"افزودن ادمین جدید","edit_admin":"ویرایش ادمین","username":"نام کاربری","name":"نام","password":"رمز عبور","password_edit":"رمز عبور جدید (خالی بگذارید تا تغییر نکند)","permissions":"دسترسیها","perm_chat_history":"تاریخچه گفتگوها","perm_admin_management":"مدیریت ادمینها","perm_user_management":"مدیریت کاربران","perm_analytics":"تحلیل و آمار","perm_settings":"تنظیمات","no_admins":"هیچ ادمینی یافت نشد.","confirm_delete_admin":"آیا از حذف این ادمین اطمینان دارید؟"},"errors":{"access_denied_title":"عدم دسترسی","access_denied_message":"شما مجوزهای لازم برای دسترسی به این صفحه را ندارید. میتوانید با مدیر سیستم تماس بگیرید.","back_to_dashboard":"بازگشت به پیشخوان"},"login":{"title":"پنل ادمین","setup_title":"راهاندازی اولیه","setup_description":"هنوز حساب ادمینی وجود ندارد. برای شروع، یک رمز عبور برای کاربر ادمین پیشفرض تنظیم کنید.","set_password":"تعیین رمز عبور","set_password_placeholder":"یک رمز عبور قوی انتخاب کنید","confirm_password":"تأیید رمز عبور","confirm_password_placeholder":"رمز عبور را دوباره وارد کنید","passwords_mismatch":"رمزهای عبور مطابقت ندارند","password_too_short":"رمز عبور باید حداقل ۴ کاراکتر باشد","create_admin":"ایجاد ادمین و ورود","setting_up":"در حال راهاندازی...","username":"نام کاربری","username_placeholder":"نام کاربری","password":"رمز عبور","password_placeholder":"••••••••","submit":"ورود به پنل","logging_in":"در حال ورود...","error":"خطا در ورود","copyright":"© ۲۰۲۶ پلتفرم چتبات هوشمند"}}'), Ui = { title: "تنظیمات", sections: { profile: "پروفایل", general: "عمومی", account: "حساب کاربری" }, profile: { title: "اطلاعات پروفایل", subtitle: "اطلاعات شخصی خود را در زیر بروز کنید.", name: "نام", surname: "نام خانوادگی", username: "نام کاربری", email: "ایمیل", phone: "شماره تلفن", password: "رمز عبور جدید", password_placeholder: "برای عدم تغییر خالی بگذارید", save: "ذخیره تغییرات", saving: "در حال ذخیره...", success: "پروفایل با موفقیت بروزرسانی شد", error: "خطا در بروزرسانی پروفایل", select_placeholder: "انتخاب کنید" }, general: { title: "تنظیمات عمومی", subtitle: "ظاهر و زبان برنامه را تنظیم کنید.", theme: "تم", language: "زبان", themes: { light: "روشن", dark: "تاریک", system: "سیستم" }, accent: "رنگ اصلی", radius: "میزان گردی لبهها", radius_levels: { sharp: "تیز", round: "گرد" }, languages: { en: "English", fa: "فارسی" } }, account: { title: "حساب و میزان مصرف", subtitle: "سهمیه مصرف و نشست خود را مدیریت کنید.", balance: "موجود فعلی", tokens: "توکنها", requests: "درخواستها", logout: "خروج از حساب", logout_confirm: "آیا از خروج اطمینان دارید؟", last_recharge: "آخرین بروزرسانی اعتبار در تاریخ" } }, qi = { unauthorized: "دسترسی مجاز نیست. لطفاً دوباره وارد شوید.", invalid_credentials: "نام کاربری یا رمز عبور اشتباه است.", ambiguous_login: "این ورود با بیش از یک حساب مطابقت دارد. لطفاً با پشتیبانی تماس بگیرید.", password_required: "رمز عبور الزامی است.", name_surname_required: "نام و نام خانوادگی الزامی است.", invalid_token: "نشست شما منقضی شده است. لطفاً دوباره وارد شوید.", user_not_found: "کاربر یافت نشد.", insufficient_balance: "موجودی کافی نیست. لطفاً حساب خود را شارژ کنید.", insufficient_balance_recharge: "شما به سقف موجودی خود رسیدهاید. موجودی شما {{datetime, datetime}} بازنشانی خواهد شد.", insufficient_balance_no_recharge: "موجودی شما به پایان رسیده است. لطفاً برای شارژ حساب خود با پشتیبانی تماس بگیرید.", me_update_failed: "خطا در بروزرسانی اطلاعات پروفایل.", thread_not_found: "گفتگو یافت نشد.", access_denied: "شما اجازه انجام این عملیات را ندارید.", feedback_save_failed: "خطا در ثبت بازخورد.", thread_update_failed: "خطا در بروزرسانی گفتگو.", thread_delete_failed: "خطا در حذف گفتگو.", attachment_not_found: "فایل پیوست یافت نشد.", thread_share_failed: "خطا در اشتراکگذاری گفتگو.", model_quota_reached_error: "سامانه در حال حاضر قادر به پاسخگویی نیست. لطفاً بعداً دوباره تلاش کنید.", admin_already_exists: "ادمین با این نام کاربری قبلاً ایجاد شده است.", admin_not_found: "ادمین یافت نشد.", cannot_delete_self: "شما نمیتوانید حساب مدیریت خود را حذف کنید.", admin_update_failed: "خطا در بروزرسانی اطلاعات ادمین.", internal_error: "یک خطای داخلی در سرور رخ داده است. لطفاً بعداً تلاش کنید.", validation_error: "دادههای ارسالی معتبر نیستند. لطفاً ورودیهای خود را بررسی کنید.", not_found: "منبع مورد نظر یافت نشد.", identity_required: "این فیلد الزامی است.", identity_already_exists: "این مقدار قبلاً ثبت شده است." }, $i = {
|
|
6877
|
+
sidebar: Li,
|
|
6878
|
+
chat: Di,
|
|
6879
6879
|
tools_ui: Fi,
|
|
6880
6880
|
login: Pi,
|
|
6881
6881
|
theme: Mi,
|
|
@@ -6885,7 +6885,7 @@ const Si = { new_conversation: "New conversation", tooltip_new_conversation: "St
|
|
|
6885
6885
|
}, Bi = {
|
|
6886
6886
|
en: Oi,
|
|
6887
6887
|
fa: $i
|
|
6888
|
-
}, Hi =
|
|
6888
|
+
}, Hi = go.createInstance();
|
|
6889
6889
|
Hi.use(qn).use(Bn).init({
|
|
6890
6890
|
resources: Bi,
|
|
6891
6891
|
fallbackLng: "en",
|
|
@@ -6922,12 +6922,11 @@ const Xt = {
|
|
|
6922
6922
|
// Auth Errors
|
|
6923
6923
|
UNAUTHORIZED: "unauthorized",
|
|
6924
6924
|
INVALID_CREDENTIALS: "invalid_credentials",
|
|
6925
|
-
PHONE_REQUIRED: "phone_required",
|
|
6926
6925
|
PASSWORD_REQUIRED: "password_required",
|
|
6927
6926
|
NAME_SURNAME_REQUIRED: "name_surname_required",
|
|
6928
|
-
PHONE_ALREADY_EXISTS: "phone_already_exists",
|
|
6929
6927
|
IDENTITY_REQUIRED: "identity_required",
|
|
6930
6928
|
IDENTITY_ALREADY_EXISTS: "identity_already_exists",
|
|
6929
|
+
AMBIGUOUS_LOGIN: "ambiguous_login",
|
|
6931
6930
|
INVALID_TOKEN: "invalid_token",
|
|
6932
6931
|
// User & Balance Errors
|
|
6933
6932
|
USER_NOT_FOUND: "user_not_found",
|
|
@@ -7090,7 +7089,7 @@ function Rl({ className: e, children: t, ...n }) {
|
|
|
7090
7089
|
),
|
|
7091
7090
|
...n,
|
|
7092
7091
|
children: [
|
|
7093
|
-
/* @__PURE__ */ i("span", { className: "absolute end-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ i(M.ItemIndicator, { children: /* @__PURE__ */ i(
|
|
7092
|
+
/* @__PURE__ */ i("span", { className: "absolute end-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ i(M.ItemIndicator, { children: /* @__PURE__ */ i(Le, { className: "size-4" }) }) }),
|
|
7094
7093
|
/* @__PURE__ */ i(M.ItemText, { children: t })
|
|
7095
7094
|
]
|
|
7096
7095
|
}
|
|
@@ -7131,7 +7130,7 @@ function Vi({
|
|
|
7131
7130
|
}
|
|
7132
7131
|
);
|
|
7133
7132
|
}
|
|
7134
|
-
function
|
|
7133
|
+
function Ll(e, t) {
|
|
7135
7134
|
if (!e) return !0;
|
|
7136
7135
|
const { field: n, operator: o = "equals", value: r } = e, a = t[n];
|
|
7137
7136
|
switch (o) {
|
|
@@ -7147,7 +7146,7 @@ function Dl(e, t) {
|
|
|
7147
7146
|
return !0;
|
|
7148
7147
|
}
|
|
7149
7148
|
}
|
|
7150
|
-
function
|
|
7149
|
+
function Dl({ ...e }) {
|
|
7151
7150
|
return /* @__PURE__ */ i(ye.Root, { "data-slot": "dropdown-menu", ...e });
|
|
7152
7151
|
}
|
|
7153
7152
|
function Fl({ ...e }) {
|
|
@@ -7206,7 +7205,7 @@ function zl({ className: e, ...t }) {
|
|
|
7206
7205
|
{
|
|
7207
7206
|
"data-slot": "checkbox-indicator",
|
|
7208
7207
|
className: "grid place-content-center text-current transition-none",
|
|
7209
|
-
children: /* @__PURE__ */ i(
|
|
7208
|
+
children: /* @__PURE__ */ i(Le, { className: "size-3.5" })
|
|
7210
7209
|
}
|
|
7211
7210
|
)
|
|
7212
7211
|
}
|
|
@@ -7214,11 +7213,11 @@ function zl({ className: e, ...t }) {
|
|
|
7214
7213
|
}
|
|
7215
7214
|
export {
|
|
7216
7215
|
Nl as $,
|
|
7217
|
-
|
|
7216
|
+
De as A,
|
|
7218
7217
|
_e as B,
|
|
7219
7218
|
vl as C,
|
|
7220
7219
|
_a as D,
|
|
7221
|
-
|
|
7220
|
+
Dl as E,
|
|
7222
7221
|
Fl as F,
|
|
7223
7222
|
kl as G,
|
|
7224
7223
|
Pl as H,
|
|
@@ -7241,7 +7240,7 @@ export {
|
|
|
7241
7240
|
fa as Y,
|
|
7242
7241
|
si as Z,
|
|
7243
7242
|
Qe as _,
|
|
7244
|
-
|
|
7243
|
+
hl as a,
|
|
7245
7244
|
Il as a0,
|
|
7246
7245
|
Vi as a1,
|
|
7247
7246
|
Wi as a2,
|
|
@@ -7270,12 +7269,12 @@ export {
|
|
|
7270
7269
|
un as m,
|
|
7271
7270
|
dn as n,
|
|
7272
7271
|
pn as o,
|
|
7273
|
-
|
|
7274
|
-
|
|
7272
|
+
gl as p,
|
|
7273
|
+
Ll as q,
|
|
7275
7274
|
va as r,
|
|
7276
7275
|
xa as s,
|
|
7277
7276
|
Cl as t,
|
|
7278
|
-
|
|
7277
|
+
he as u,
|
|
7279
7278
|
Tl as v,
|
|
7280
7279
|
Al as w,
|
|
7281
7280
|
Rl as x,
|