@factorialco/f0-react 10.10.0 → 10.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ChatPostComposerDialog-Fz7bdV_-.js → ChatPostComposerDialog-DtnQi3aj.js} +2 -2
- package/dist/{CoachmarkProvider-DqNqwEPd.js → CoachmarkProvider-jyLtxTVG.js} +14125 -14125
- package/dist/{DocumentToolbar-B4aCipER.js → DocumentToolbar-DN4zdfiO.js} +2 -2
- package/dist/{DocxViewer-BOdYordL.js → DocxViewer-DsvcWnn4.js} +1 -1
- package/dist/{F0AiProcessingOverlay-BTW13lnQ.js → F0AiProcessingOverlay-yQIsYRms.js} +107 -107
- package/dist/{F0CanvasPanel-BcBFycU-.js → F0CanvasPanel-CLp2sCjm.js} +4 -4
- package/dist/{F0DocumentViewer-CWZNde9w.js → F0DocumentViewer-Bd3izb6I.js} +5 -5
- package/dist/F0DocumentViewer-DcJ7xzOj.js +3 -0
- package/dist/{F0Map-4fqLL5gP.js → F0Map-CeP8-2ww.js} +3 -3
- package/dist/{F0VideoPlayer-CTsCZ4u5.js → F0VideoPlayer-CQagh8Eo.js} +20 -20
- package/dist/F0VideoPlayer-iAcACeDO.js +1 -0
- package/dist/{Map-B_fzR9ly.js → Map-xessP8Rf.js} +3 -3
- package/dist/{PdfThumbnail-BLNfQ1EH.js → PdfThumbnail-BpiRg0m6.js} +1 -1
- package/dist/{SheetViewer-BhZTOpb4.js → SheetViewer-BSwX6EZX.js} +3 -3
- package/dist/{TextViewer-B1eR_7q4.js → TextViewer-K_7wKV8e.js} +1 -1
- package/dist/ai.js +2 -2
- package/dist/component-status.js +1 -1
- package/dist/experimental.d.ts +44 -1
- package/dist/experimental.js +3646 -3559
- package/dist/f0.js +156 -156
- package/dist/{maplibre-NpfvETJP.js → maplibre-Cj0jFYG6.js} +1 -1
- package/dist/{pdfWorker-CA8jPCRh.js → pdfWorker-Tv3MY3tw.js} +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/tailwind.config.ts +8 -0
- package/dist/F0DocumentViewer-BqRsz00c.js +0 -3
- package/dist/F0VideoPlayer-DEpDxvjC.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Ht as e, Mt as t, Zn as n, _t as r, a as i, ar as a, b as o, gn as s, hn as c, i as l, in as u, ln as d, n as f, rn as p, rr as m, t as h, un as g, vt as _, yt as v } from "./popover-B7fqB9lu.js";
|
|
2
2
|
import { I as y, L as b } from "./tooltip-TOvfXq9F.js";
|
|
3
3
|
import { n as x, t as S } from "./F0Box-CYL5_Zhb.js";
|
|
4
|
-
import { $a as C, $n as w, $
|
|
4
|
+
import { $a as C, $n as w, $o as T, $r as E, B as D, C as O, Ds as k, Dt as A, F as j, Fr as M, Gr as N, Hr as P, Io as F, Ja as I, Jo as L, La as ee, Lt as te, M as ne, Mt as R, N as re, Oa as ie, P as z, Q as ae, Qa as oe, R as B, Ri as se, S as ce, St as le, Ts as ue, Tt as de, Ur as fe, V, Va as pe, Vo as me, Wr as he, Yr as ge, Z as _e, Zr as ve, _a as ye, a as be, at as xe, bo as Se, bt as Ce, cc as we, ct as Te, d as Ee, eo as De, et as Oe, fa as ke, fo as Ae, fr as je, g as Me, go as Ne, h as Pe, i as Fe, js as Ie, ko as Le, kt as Re, l as ze, lt as Be, m as Ve, nt as He, o as Ue, ot as We, pa as Ge, pr as Ke, pt as qe, qn as Je, r as Ye, rr as Xe, sc as Ze, to as Qe, tt as $e, u as et, ut as tt, vo as nt, vt as rt, w as it, x as at, xo as ot, xt as st, yt as ct, z as lt, zo as ut } from "./F0CanvasPanel-CLp2sCjm.js";
|
|
5
5
|
import { t as dt } from "./i18n-provider-defaults-BA2_-hRH.js";
|
|
6
6
|
import { C as ft, J as pt, L as mt, T as ht, V as gt, d as _t, j as vt, k as yt, q as bt, w as xt } from "./useData-CAl9SKtE.js";
|
|
7
7
|
import { Dn as St, Dr as Ct, Er as wt, Ft as Tt, Nr as Et, On as Dt, Or as Ot, Ot as kt, _t as At, cn as jt, ct as Mt, gt as Nt, ht as Pt, jr as Ft, nn as It, sn as Lt, un as Rt } from "./F0Select-By_QpX1S.js";
|
|
@@ -30,10 +30,10 @@ var Xt = [
|
|
|
30
30
|
"sm",
|
|
31
31
|
"md",
|
|
32
32
|
"lg"
|
|
33
|
-
], Qt = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """), $t = /[\\`*_{}[\]()#+\-.!|~>]/g, en = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace($t, "\\$&"), tn = (e) => `<entity-ref type="${Qt(e.type)}" id="${Qt(e.id)}">${Qt(e.label)}</entity-ref>`, nn = (e, t) => e.slice(t.start,
|
|
33
|
+
], Qt = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """), $t = /[\\`*_{}[\]()#+\-.!|~>]/g, en = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace($t, "\\$&"), tn = (e) => `<entity-ref type="${Qt(e.type)}" id="${Qt(e.id)}">${Qt(e.label)}</entity-ref>`, nn = (e, t) => e.slice(t.start, V(t)).normalize("NFC") === `@${t.label}`.normalize("NFC");
|
|
34
34
|
function rn(e, t) {
|
|
35
35
|
let n = e.length - e.trimStart().length, r = e.trimEnd().length, i = t.filter((t) => t.start >= n && nn(e, t)).sort((e, t) => e.start - t.start), a = "", o = n;
|
|
36
|
-
for (let t of i) t.start < o ||
|
|
36
|
+
for (let t of i) t.start < o || V(t) > r || (a += en(e.slice(o, t.start)) + tn(t), o = V(t));
|
|
37
37
|
return a + en(e.slice(o, r));
|
|
38
38
|
}
|
|
39
39
|
//#endregion
|
|
@@ -180,16 +180,16 @@ var an = 14, on = 2.31, sn = ({ percentage: e, tone: t }) => {
|
|
|
180
180
|
})]
|
|
181
181
|
});
|
|
182
182
|
}, fn = (e) => {
|
|
183
|
-
let { provided: t } =
|
|
184
|
-
return t ? /* @__PURE__ */ Y(pn, { ...e }) : /* @__PURE__ */ Y(
|
|
183
|
+
let { provided: t } = $e();
|
|
184
|
+
return t ? /* @__PURE__ */ Y(pn, { ...e }) : /* @__PURE__ */ Y(Oe, { children: /* @__PURE__ */ Y(pn, { ...e }) });
|
|
185
185
|
}, pn = ({ attachedFiles: e, isUploading: t, onRemove: n, removeLabel: r, reducedMotion: i }) => {
|
|
186
186
|
let a = p(), o = mn(e), s = e.flatMap((e) => {
|
|
187
187
|
let t = o.get(e.id);
|
|
188
188
|
if (!t) return [];
|
|
189
|
-
let i = e.file.name, a = e.file.type ||
|
|
189
|
+
let i = e.file.name, a = e.file.type || xe({
|
|
190
190
|
name: i,
|
|
191
191
|
url: t
|
|
192
|
-
}), s =
|
|
192
|
+
}), s = We({
|
|
193
193
|
name: i,
|
|
194
194
|
url: t,
|
|
195
195
|
mimeType: a
|
|
@@ -207,7 +207,7 @@ var an = 14, on = 2.31, sn = ({ percentage: e, tone: t }) => {
|
|
|
207
207
|
};
|
|
208
208
|
return [{
|
|
209
209
|
id: e.id,
|
|
210
|
-
content: /* @__PURE__ */ Y(
|
|
210
|
+
content: /* @__PURE__ */ Y(z, {
|
|
211
211
|
attachment: s,
|
|
212
212
|
status: e.status === "uploaded" ? "ready" : e.status === "error" ? "error" : "uploading",
|
|
213
213
|
errorMessage: e.errorMessage,
|
|
@@ -266,14 +266,14 @@ var an = 14, on = 2.31, sn = ({ percentage: e, tone: t }) => {
|
|
|
266
266
|
l(e), o?.(e);
|
|
267
267
|
}, d = [...t ? [{
|
|
268
268
|
label: s.ai.addFilesOrPhotos,
|
|
269
|
-
icon:
|
|
269
|
+
icon: Le,
|
|
270
270
|
onClick: n,
|
|
271
271
|
disabled: r,
|
|
272
272
|
disabledTooltip: i
|
|
273
273
|
}, ...e.length > 0 ? [{ type: "separator" }] : []] : [], ...hn(e)];
|
|
274
274
|
return /* @__PURE__ */ Y("div", {
|
|
275
275
|
onClick: (e) => e.stopPropagation(),
|
|
276
|
-
children: /* @__PURE__ */ Y(
|
|
276
|
+
children: /* @__PURE__ */ Y(ye, {
|
|
277
277
|
items: d,
|
|
278
278
|
align: "start",
|
|
279
279
|
disabled: a,
|
|
@@ -306,7 +306,7 @@ var an = 14, on = 2.31, sn = ({ percentage: e, tone: t }) => {
|
|
|
306
306
|
label: l.ai.attachFile,
|
|
307
307
|
hideLabel: !0,
|
|
308
308
|
type: "button",
|
|
309
|
-
icon:
|
|
309
|
+
icon: Le,
|
|
310
310
|
variant: "outline",
|
|
311
311
|
size: "md",
|
|
312
312
|
disabled: n || u,
|
|
@@ -374,7 +374,7 @@ var an = 14, on = 2.31, sn = ({ percentage: e, tone: t }) => {
|
|
|
374
374
|
/* @__PURE__ */ Y("div", {
|
|
375
375
|
className: "flex items-center py-0.5",
|
|
376
376
|
children: /* @__PURE__ */ Y(u, {
|
|
377
|
-
icon:
|
|
377
|
+
icon: Ne,
|
|
378
378
|
size: "md",
|
|
379
379
|
color: "default"
|
|
380
380
|
})
|
|
@@ -707,11 +707,11 @@ var Ln = ({ onSubmit: e, onStop: r, inProgress: i, onBeforeSubmit: a, placeholde
|
|
|
707
707
|
let R = p(), re = t(), ie = !!re, z = K(null), [ae, oe] = q(null), [se, ce] = q(!1), [le, ue] = q({
|
|
708
708
|
isEmpty: !0,
|
|
709
709
|
recorder: "idle"
|
|
710
|
-
}), de = K(null),
|
|
710
|
+
}), de = K(null), fe = K(null);
|
|
711
711
|
W(() => () => {
|
|
712
|
-
|
|
712
|
+
fe.current && clearTimeout(fe.current);
|
|
713
713
|
}, []);
|
|
714
|
-
let
|
|
714
|
+
let V = l != null, pe = K(u), me = K(f);
|
|
715
715
|
Kt(() => {
|
|
716
716
|
pe.current = u, me.current = f;
|
|
717
717
|
});
|
|
@@ -728,11 +728,11 @@ var Ln = ({ onSubmit: e, onStop: r, inProgress: i, onBeforeSubmit: a, placeholde
|
|
|
728
728
|
W(() => {
|
|
729
729
|
I || typeof window < "u" && window.location.hash.length === 0 && z.current?.focus();
|
|
730
730
|
}, []), W(() => {
|
|
731
|
-
if (
|
|
731
|
+
if (V) ge(null);
|
|
732
732
|
else return ge(() => {
|
|
733
733
|
z.current?.focus();
|
|
734
734
|
}), () => ge(null);
|
|
735
|
-
}, [
|
|
735
|
+
}, [V, ge]), W(() => {
|
|
736
736
|
if (T) return T((e) => {
|
|
737
737
|
we(e);
|
|
738
738
|
}), () => {
|
|
@@ -764,7 +764,7 @@ var Ln = ({ onSubmit: e, onStop: r, inProgress: i, onBeforeSubmit: a, placeholde
|
|
|
764
764
|
reserveTwoRows: !Re,
|
|
765
765
|
overflow: Re ? "scroll" : "wrap"
|
|
766
766
|
}) : null, Be = !I || se || Pe || le.recorder !== "idle", Ve = (e) => e instanceof Node ? de.current?.contains(e) ? !0 : e instanceof Element && e.closest("[data-radix-popper-content-wrapper]") !== null : !1, He = () => {
|
|
767
|
-
|
|
767
|
+
fe.current && clearTimeout(fe.current), fe.current = setTimeout(() => {
|
|
768
768
|
Ve(document.activeElement) || ce(!1);
|
|
769
769
|
}, 0);
|
|
770
770
|
}, Ue = Re, We = Ue && I, Ge = We && !Be, Ke = Ue && ze ? /* @__PURE__ */ Y("div", {
|
|
@@ -778,7 +778,7 @@ var Ln = ({ onSubmit: e, onStop: r, inProgress: i, onBeforeSubmit: a, placeholde
|
|
|
778
778
|
.2,
|
|
779
779
|
1
|
|
780
780
|
]
|
|
781
|
-
}, Je = j && M && !!L && L.length > 0, Ye = M && j, { motionProps: Xe } =
|
|
781
|
+
}, Je = j && M && !!L && L.length > 0, Ye = M && j, { motionProps: Xe } = lt(j, 160, .5);
|
|
782
782
|
return /* @__PURE__ */ X(s.div, {
|
|
783
783
|
ref: ne,
|
|
784
784
|
"data-composer-layout": Ye ? "welcome" : "docked",
|
|
@@ -813,8 +813,8 @@ var Ln = ({ onSubmit: e, onStop: r, inProgress: i, onBeforeSubmit: a, placeholde
|
|
|
813
813
|
surfaceRef: de,
|
|
814
814
|
handleRef: z,
|
|
815
815
|
className: "isolate z-20 items-stretch p-0 hover:cursor-text",
|
|
816
|
-
accent:
|
|
817
|
-
replacement:
|
|
816
|
+
accent: V,
|
|
817
|
+
replacement: V ? l : null,
|
|
818
818
|
onSurfaceFocus: () => ce(!0),
|
|
819
819
|
onSurfaceBlur: He,
|
|
820
820
|
onStateChange: ue,
|
|
@@ -903,7 +903,7 @@ var Ln = ({ onSubmit: e, onStop: r, inProgress: i, onBeforeSubmit: a, placeholde
|
|
|
903
903
|
/* @__PURE__ */ Y(n, {
|
|
904
904
|
mode: "wait",
|
|
905
905
|
initial: !1,
|
|
906
|
-
children:
|
|
906
|
+
children: V ? /* @__PURE__ */ X(s.div, {
|
|
907
907
|
className: "flex w-full max-w-content flex-row flex-wrap items-center justify-center gap-x-3 gap-y-1 text-sm font-medium text-f1-foreground-tertiary",
|
|
908
908
|
initial: { opacity: 0 },
|
|
909
909
|
animate: { opacity: 1 },
|
|
@@ -1011,12 +1011,12 @@ function Hn({ ...e }) {
|
|
|
1011
1011
|
//#endregion
|
|
1012
1012
|
//#region src/addons/ai/ai/F0AiChat/components/markdownRenderers/components/Image.tsx
|
|
1013
1013
|
function Un({ src: e, alt: t, ...n }) {
|
|
1014
|
-
let r = p(), i =
|
|
1014
|
+
let r = p(), i = ct(), a = Ce(), s = le(e || void 0), [c, l] = q(!1), [u, d] = q(!1), f = t || (e ? He(e) : "") || "image";
|
|
1015
1015
|
if (!e || c || s.status === "error") return t ? /* @__PURE__ */ Y("span", {
|
|
1016
1016
|
className: "text-f1-foreground-secondary",
|
|
1017
1017
|
children: t
|
|
1018
1018
|
}) : null;
|
|
1019
|
-
let m = s.status === "ready" ? /* @__PURE__ */ Y(
|
|
1019
|
+
let m = s.status === "ready" ? /* @__PURE__ */ Y(qe, {
|
|
1020
1020
|
...n,
|
|
1021
1021
|
src: s.url,
|
|
1022
1022
|
alt: t,
|
|
@@ -1044,7 +1044,7 @@ function Un({ src: e, alt: t, ...n }) {
|
|
|
1044
1044
|
variant: "neutral",
|
|
1045
1045
|
label: r.chat.download,
|
|
1046
1046
|
hideLabel: !0,
|
|
1047
|
-
icon:
|
|
1047
|
+
icon: k,
|
|
1048
1048
|
onClick: () => a(e, f)
|
|
1049
1049
|
})
|
|
1050
1050
|
})]
|
|
@@ -1053,7 +1053,7 @@ function Un({ src: e, alt: t, ...n }) {
|
|
|
1053
1053
|
//#endregion
|
|
1054
1054
|
//#region src/addons/ai/ai/F0AiChat/components/markdownRenderers/components/Link.tsx
|
|
1055
1055
|
function Wn({ children: e, ...t }) {
|
|
1056
|
-
return /* @__PURE__ */ Y(
|
|
1056
|
+
return /* @__PURE__ */ Y(N, {
|
|
1057
1057
|
...t,
|
|
1058
1058
|
variant: "link",
|
|
1059
1059
|
href: t.href,
|
|
@@ -1119,7 +1119,7 @@ function Jn({ id: e, trigger: t, resolver: n, mapToCard: r, fallbackCard: i }) {
|
|
|
1119
1119
|
side: "top",
|
|
1120
1120
|
align: "start",
|
|
1121
1121
|
className: "w-64 rounded-2xl border-none p-0 shadow-md",
|
|
1122
|
-
children: c ? /* @__PURE__ */ Y(
|
|
1122
|
+
children: c ? /* @__PURE__ */ Y(M.Skeleton, {}) : /* @__PURE__ */ Y(M, { ...m })
|
|
1123
1123
|
})]
|
|
1124
1124
|
});
|
|
1125
1125
|
}
|
|
@@ -1234,7 +1234,7 @@ function er({ id: e, label: t }) {
|
|
|
1234
1234
|
let { entityRefs: n } = B(), r = n?.resolvers?.expense, i = p(), a = n?.urls?.expense?.(e), o = G(() => (e) => ({
|
|
1235
1235
|
avatar: {
|
|
1236
1236
|
type: "icon",
|
|
1237
|
-
icon:
|
|
1237
|
+
icon: ut
|
|
1238
1238
|
},
|
|
1239
1239
|
title: e.description || `Expense #${e.id}`,
|
|
1240
1240
|
description: [e.amount, e.status].filter(Boolean).join(" · "),
|
|
@@ -1494,11 +1494,11 @@ function pr({ type: e, id: t, children: n }) {
|
|
|
1494
1494
|
//#endregion
|
|
1495
1495
|
//#region src/addons/ai/ai/F0AiChat/components/markdownRenderers/components/Table.tsx
|
|
1496
1496
|
async function mr(e, t, n) {
|
|
1497
|
-
let r =
|
|
1497
|
+
let r = O(e), i = t === "xlsx" ? await it([{
|
|
1498
1498
|
name: "Data",
|
|
1499
1499
|
rows: r
|
|
1500
|
-
}]) : await
|
|
1501
|
-
|
|
1500
|
+
}]) : await at(r);
|
|
1501
|
+
ce(i, `${n}.${t}`);
|
|
1502
1502
|
}
|
|
1503
1503
|
function hr({ children: e, title: t, ...n }) {
|
|
1504
1504
|
let r = p(), i = K(null), a = U((e) => {
|
|
@@ -1514,16 +1514,16 @@ function hr({ children: e, title: t, ...n }) {
|
|
|
1514
1514
|
tag: "h2",
|
|
1515
1515
|
className: "text-base font-medium capitalize text-f1-foreground",
|
|
1516
1516
|
children: t ?? r.ai.reportCard.tableLabel
|
|
1517
|
-
}), /* @__PURE__ */ Y(
|
|
1518
|
-
icon:
|
|
1517
|
+
}), /* @__PURE__ */ Y(ye, {
|
|
1518
|
+
icon: k,
|
|
1519
1519
|
size: "md",
|
|
1520
1520
|
items: [{
|
|
1521
1521
|
label: r.t("ai.dataDownload.download", { format: "Excel" }),
|
|
1522
|
-
icon:
|
|
1522
|
+
icon: k,
|
|
1523
1523
|
onClick: () => a("xlsx")
|
|
1524
1524
|
}, {
|
|
1525
1525
|
label: r.t("ai.dataDownload.download", { format: "CSV" }),
|
|
1526
|
-
icon:
|
|
1526
|
+
icon: k,
|
|
1527
1527
|
onClick: () => a("csv")
|
|
1528
1528
|
}]
|
|
1529
1529
|
})]
|
|
@@ -1669,7 +1669,7 @@ var wr = {
|
|
|
1669
1669
|
mimeType: e.mimeType,
|
|
1670
1670
|
size: e.bytes,
|
|
1671
1671
|
previewUrl: e.preview && t ? t(e.preview.path) : void 0
|
|
1672
|
-
}), Fr = (e) =>
|
|
1672
|
+
}), Fr = (e) => xe(e) ?? "", Ir = ({ avatar: e }) => e?.type === "module" ? /* @__PURE__ */ Y(mt, {
|
|
1673
1673
|
module: e.module,
|
|
1674
1674
|
size: "md"
|
|
1675
1675
|
}) : e?.type === "file" ? /* @__PURE__ */ Y(yt, {
|
|
@@ -1888,7 +1888,7 @@ function $r({ formName: e, formDescription: t, module: n, cardTitle: r, cardDesc
|
|
|
1888
1888
|
},
|
|
1889
1889
|
children: y.length > 0 && !g ? /* @__PURE__ */ Y("div", {
|
|
1890
1890
|
className: "-mx-3 flex w-full flex-col overflow-hidden pb-1",
|
|
1891
|
-
children: /* @__PURE__ */ Y(
|
|
1891
|
+
children: /* @__PURE__ */ Y(Me, {
|
|
1892
1892
|
details: y.map((e) => ({
|
|
1893
1893
|
title: e.label,
|
|
1894
1894
|
content: e.content,
|
|
@@ -1924,10 +1924,10 @@ function ei() {
|
|
|
1924
1924
|
//#endregion
|
|
1925
1925
|
//#region src/addons/ai/ai/F0AiFileAttachments/F0AiFileAttachments.tsx
|
|
1926
1926
|
var ti = "rounded-xl", ni = "ai-chat", ri = (e) => {
|
|
1927
|
-
let { provided: t } =
|
|
1928
|
-
return t ? /* @__PURE__ */ Y(ii, { ...e }) : /* @__PURE__ */ Y(
|
|
1927
|
+
let { provided: t } = $e();
|
|
1928
|
+
return t ? /* @__PURE__ */ Y(ii, { ...e }) : /* @__PURE__ */ Y(Oe, { children: /* @__PURE__ */ Y(ii, { ...e }) });
|
|
1929
1929
|
}, ii = ({ files: e, align: t = "start", onOpenFile: n, onFileDownloaded: r, size: i = "default" }) => {
|
|
1930
|
-
let { remotePreviews: a } =
|
|
1930
|
+
let { remotePreviews: a } = $e(), { openImagePreview: o } = rt(), [s, c] = q(() => /* @__PURE__ */ new Set()), l = G(() => ai(e, a, s), [
|
|
1931
1931
|
e,
|
|
1932
1932
|
a,
|
|
1933
1933
|
s
|
|
@@ -1946,7 +1946,7 @@ var ti = "rounded-xl", ni = "ai-chat", ri = (e) => {
|
|
|
1946
1946
|
};
|
|
1947
1947
|
return Y(i === "compact" ? ci : si, { ...u });
|
|
1948
1948
|
}, ai = (e, t, n) => {
|
|
1949
|
-
let r = (e) => t ||
|
|
1949
|
+
let r = (e) => t || de(e.url), i = Te(e.filter(r)), a = /* @__PURE__ */ new Set([
|
|
1950
1950
|
...e.filter((e) => !r(e)),
|
|
1951
1951
|
...i.images.filter((e) => n.has(e.url)),
|
|
1952
1952
|
...i.files
|
|
@@ -1974,13 +1974,13 @@ var ti = "rounded-xl", ni = "ai-chat", ri = (e) => {
|
|
|
1974
1974
|
onImageError: o
|
|
1975
1975
|
}) : null,
|
|
1976
1976
|
t.map((e, t) => /* @__PURE__ */ Y(ze, {
|
|
1977
|
-
file:
|
|
1977
|
+
file: tt(e),
|
|
1978
1978
|
cornerClass: "rounded-xl",
|
|
1979
1979
|
testIdPrefix: ni,
|
|
1980
1980
|
onDownloaded: () => c?.(e)
|
|
1981
1981
|
}, `${e.name}-${t}`)),
|
|
1982
|
-
n.map(({ file: e, kind: t }, n) => /* @__PURE__ */ Y(
|
|
1983
|
-
file:
|
|
1982
|
+
n.map(({ file: e, kind: t }, n) => /* @__PURE__ */ Y(j, {
|
|
1983
|
+
file: tt(e),
|
|
1984
1984
|
kind: t,
|
|
1985
1985
|
cornerClass: "rounded-xl",
|
|
1986
1986
|
testIdPrefix: ni,
|
|
@@ -2005,8 +2005,8 @@ var ti = "rounded-xl", ni = "ai-chat", ri = (e) => {
|
|
|
2005
2005
|
className: y("flex max-w-full flex-wrap gap-1", a === "end" ? "justify-end" : "justify-start"),
|
|
2006
2006
|
children: d.map((e, n) => {
|
|
2007
2007
|
let r = u.get(e);
|
|
2008
|
-
return r ? /* @__PURE__ */ Y(
|
|
2009
|
-
file:
|
|
2008
|
+
return r ? /* @__PURE__ */ Y(j, {
|
|
2009
|
+
file: tt(e),
|
|
2010
2010
|
kind: r,
|
|
2011
2011
|
cornerClass: "rounded-lg",
|
|
2012
2012
|
compact: !0,
|
|
@@ -2027,7 +2027,7 @@ var ti = "rounded-xl", ni = "ai-chat", ri = (e) => {
|
|
|
2027
2027
|
})]
|
|
2028
2028
|
});
|
|
2029
2029
|
}, li = ({ files: e, align: t, onFileDownloaded: n }) => {
|
|
2030
|
-
let r =
|
|
2030
|
+
let r = Ce();
|
|
2031
2031
|
return e.length === 0 ? null : /* @__PURE__ */ Y("div", {
|
|
2032
2032
|
className: y("flex max-w-full flex-wrap gap-1.5", t === "end" ? "justify-end" : "justify-start"),
|
|
2033
2033
|
children: e.map((e, t) => /* @__PURE__ */ Y(di, {
|
|
@@ -2038,7 +2038,7 @@ var ti = "rounded-xl", ni = "ai-chat", ri = (e) => {
|
|
|
2038
2038
|
}, `${e.name}-${t}`))
|
|
2039
2039
|
});
|
|
2040
2040
|
}, ui = ({ file: e, onOpen: t, onError: n }) => {
|
|
2041
|
-
let r = p(), i =
|
|
2041
|
+
let r = p(), i = le(e.thumbnailUrl ?? e.url);
|
|
2042
2042
|
return st(i.status, n), /* @__PURE__ */ Y("button", {
|
|
2043
2043
|
type: "button",
|
|
2044
2044
|
onClick: t,
|
|
@@ -2046,7 +2046,7 @@ var ti = "rounded-xl", ni = "ai-chat", ri = (e) => {
|
|
|
2046
2046
|
"aria-label": r.t("chat.openNamedDocument", { name: e.name }),
|
|
2047
2047
|
className: y("relative box-border h-16 w-16 shrink-0 overflow-hidden rounded-lg border border-solid border-f1-border-secondary bg-f1-background-secondary p-0 transition-opacity hover:opacity-90", b()),
|
|
2048
2048
|
"data-testid": "ai-chat-image-attachment",
|
|
2049
|
-
children: i.status === "ready" ? /* @__PURE__ */ Y(
|
|
2049
|
+
children: i.status === "ready" ? /* @__PURE__ */ Y(qe, {
|
|
2050
2050
|
src: i.url,
|
|
2051
2051
|
alt: e.name,
|
|
2052
2052
|
draggable: !1,
|
|
@@ -2064,21 +2064,21 @@ var ti = "rounded-xl", ni = "ai-chat", ri = (e) => {
|
|
|
2064
2064
|
size: "lg",
|
|
2065
2065
|
actions: [{
|
|
2066
2066
|
label: n.t("chat.downloadNamedFile", { name: e.name }),
|
|
2067
|
-
icon:
|
|
2067
|
+
icon: k,
|
|
2068
2068
|
onClick: t
|
|
2069
2069
|
}]
|
|
2070
2070
|
});
|
|
2071
2071
|
}, fi = ({ images: e, onOpen: t, onImageError: n }) => {
|
|
2072
|
-
let r = p(), i = e.length === 1 ? e[0] : void 0, a =
|
|
2072
|
+
let r = p(), i = e.length === 1 ? e[0] : void 0, a = le(i ? i.thumbnailUrl ?? i.url : void 0), o = Ue(i && a.status === "ready" ? a.url : void 0, i) ?? void 0, s = i ? be(o?.width, o?.height) : null;
|
|
2073
2073
|
return /* @__PURE__ */ Y("div", {
|
|
2074
2074
|
style: s ? { width: s.width } : void 0,
|
|
2075
|
-
className: y("grid grid-cols-2 overflow-hidden border border-solid border-f1-border-secondary", s ? "max-w-full" : Ve,
|
|
2075
|
+
className: y("grid grid-cols-2 overflow-hidden border border-solid border-f1-border-secondary", s ? "max-w-full" : Ve, et, ti),
|
|
2076
2076
|
"data-testid": "ai-chat-image-album",
|
|
2077
|
-
children:
|
|
2077
|
+
children: Fe(o ? [o] : e).map((i, a, o) => {
|
|
2078
2078
|
let s = e[i.index];
|
|
2079
2079
|
if (!s) return null;
|
|
2080
2080
|
let c = a === o.length - 1;
|
|
2081
|
-
return /* @__PURE__ */ Y(
|
|
2081
|
+
return /* @__PURE__ */ Y(Pe, {
|
|
2082
2082
|
image: Be(s),
|
|
2083
2083
|
aspectRatio: i.aspectRatio,
|
|
2084
2084
|
spanFull: i.span === 2,
|
|
@@ -2095,7 +2095,7 @@ var ti = "rounded-xl", ni = "ai-chat", ri = (e) => {
|
|
|
2095
2095
|
testIdPrefix: ni,
|
|
2096
2096
|
overlay: i.hiddenCount > 0 ? /* @__PURE__ */ Y("span", {
|
|
2097
2097
|
"aria-hidden": !0,
|
|
2098
|
-
className: y("absolute inset-0 flex items-center justify-center text-2xl font-semibold text-f1-foreground-inverse",
|
|
2098
|
+
className: y("absolute inset-0 flex items-center justify-center text-2xl font-semibold text-f1-foreground-inverse", Ee),
|
|
2099
2099
|
"data-testid": "ai-chat-image-album-more",
|
|
2100
2100
|
children: `+${i.hiddenCount}`
|
|
2101
2101
|
}) : void 0
|
|
@@ -2174,7 +2174,7 @@ function yi({ anchor: e, onReply: t }) {
|
|
|
2174
2174
|
type: "button",
|
|
2175
2175
|
variant: "ghost",
|
|
2176
2176
|
label: o,
|
|
2177
|
-
icon:
|
|
2177
|
+
icon: nt,
|
|
2178
2178
|
onClick: () => {
|
|
2179
2179
|
t(e.text);
|
|
2180
2180
|
}
|
|
@@ -2183,7 +2183,7 @@ function yi({ anchor: e, onReply: t }) {
|
|
|
2183
2183
|
}
|
|
2184
2184
|
//#endregion
|
|
2185
2185
|
//#region src/addons/ai/ai/F0AiMessagesContainer/components/AssistantMessage.tsx
|
|
2186
|
-
var bi = Bt(void 0), xi = () => Ut(bi), Si = (e) => /* @__PURE__ */ Y(
|
|
2186
|
+
var bi = Bt(void 0), xi = () => Ut(bi), Si = (e) => /* @__PURE__ */ Y(Ke, {
|
|
2187
2187
|
content: e,
|
|
2188
2188
|
format: "markdown"
|
|
2189
2189
|
}), Ci = ({ isGenerating: e, isLoading: t, message: n, renderToolCall: r, onReplyQuote: i, onRendered: a, renderMarkdown: o }) => {
|
|
@@ -2245,7 +2245,7 @@ var bi = Bt(void 0), xi = () => Ut(bi), Si = (e) => /* @__PURE__ */ Y(qe, {
|
|
|
2245
2245
|
return document.addEventListener("keydown", e), () => {
|
|
2246
2246
|
document.removeEventListener("keydown", e);
|
|
2247
2247
|
};
|
|
2248
|
-
}, [u]), /* @__PURE__ */ Y(
|
|
2248
|
+
}, [u]), /* @__PURE__ */ Y(Xe, {
|
|
2249
2249
|
position: "center",
|
|
2250
2250
|
isOpen: !0,
|
|
2251
2251
|
onClose: d,
|
|
@@ -2262,7 +2262,7 @@ var bi = Bt(void 0), xi = () => Ut(bi), Si = (e) => /* @__PURE__ */ Y(qe, {
|
|
|
2262
2262
|
},
|
|
2263
2263
|
children: /* @__PURE__ */ Y("div", {
|
|
2264
2264
|
className: "flex flex-col gap-6",
|
|
2265
|
-
children: /* @__PURE__ */ Y(
|
|
2265
|
+
children: /* @__PURE__ */ Y(Je, {
|
|
2266
2266
|
autoFocus: !0,
|
|
2267
2267
|
label: c,
|
|
2268
2268
|
placeholder: l,
|
|
@@ -2327,7 +2327,7 @@ var ki = ({ content: t, targetMessage: n, onCopy: r }) => {
|
|
|
2327
2327
|
return /* @__PURE__ */ X("div", {
|
|
2328
2328
|
className: "flex",
|
|
2329
2329
|
children: [
|
|
2330
|
-
/* @__PURE__ */ Y(
|
|
2330
|
+
/* @__PURE__ */ Y(je, {
|
|
2331
2331
|
size: "md",
|
|
2332
2332
|
variant: "ghost",
|
|
2333
2333
|
valueToCopy: t,
|
|
@@ -2348,7 +2348,7 @@ var ki = ({ content: t, targetMessage: n, onCopy: r }) => {
|
|
|
2348
2348
|
className: "flex min-w-0 flex-1 items-center justify-center gap-1",
|
|
2349
2349
|
children: /* @__PURE__ */ Y(u, {
|
|
2350
2350
|
size: "md",
|
|
2351
|
-
icon: o === "like" ?
|
|
2351
|
+
icon: o === "like" ? oe : C,
|
|
2352
2352
|
color: "default"
|
|
2353
2353
|
})
|
|
2354
2354
|
})
|
|
@@ -2366,7 +2366,7 @@ var ki = ({ content: t, targetMessage: n, onCopy: r }) => {
|
|
|
2366
2366
|
className: "flex min-w-0 flex-1 items-center justify-center gap-1",
|
|
2367
2367
|
children: /* @__PURE__ */ Y(u, {
|
|
2368
2368
|
size: "md",
|
|
2369
|
-
icon: o === "dislike" ?
|
|
2369
|
+
icon: o === "dislike" ? De : Qe,
|
|
2370
2370
|
color: "default"
|
|
2371
2371
|
})
|
|
2372
2372
|
})
|
|
@@ -2375,13 +2375,13 @@ var ki = ({ content: t, targetMessage: n, onCopy: r }) => {
|
|
|
2375
2375
|
});
|
|
2376
2376
|
}, Ai = ({ icon: e, title: n, children: r, open: i, defaultOpen: a = !1, onOpenChange: o, lockOpen: c = !1 }) => {
|
|
2377
2377
|
let [l, d] = q(a), f = t(), p = i !== void 0, m = p ? i : l;
|
|
2378
|
-
return /* @__PURE__ */ X(
|
|
2378
|
+
return /* @__PURE__ */ X(P, {
|
|
2379
2379
|
className: "mb-1 w-full",
|
|
2380
2380
|
open: m,
|
|
2381
2381
|
onOpenChange: (e) => {
|
|
2382
2382
|
c || (p || d(e), o?.(e));
|
|
2383
2383
|
},
|
|
2384
|
-
children: [/* @__PURE__ */ X(
|
|
2384
|
+
children: [/* @__PURE__ */ X(he, {
|
|
2385
2385
|
disabled: c,
|
|
2386
2386
|
className: y("gap-1", c ? "flex w-full items-center text-base text-f1-foreground-secondary" : "flex w-full items-center text-base text-f1-foreground-secondary transition-colors duration-150 hover:text-f1-foreground [&[data-state=open]>svg]:rotate-90"),
|
|
2387
2387
|
children: [
|
|
@@ -2398,7 +2398,7 @@ var ki = ({ content: t, targetMessage: n, onCopy: r }) => {
|
|
|
2398
2398
|
}),
|
|
2399
2399
|
c ? null : /* @__PURE__ */ Y(u, { icon: Ct })
|
|
2400
2400
|
]
|
|
2401
|
-
}), /* @__PURE__ */ Y(
|
|
2401
|
+
}), /* @__PURE__ */ Y(fe, {
|
|
2402
2402
|
forceMount: !0,
|
|
2403
2403
|
className: "data-[state=open]:mt-3",
|
|
2404
2404
|
children: /* @__PURE__ */ Y(s.div, {
|
|
@@ -2454,7 +2454,7 @@ var ki = ({ content: t, targetMessage: n, onCopy: r }) => {
|
|
|
2454
2454
|
}, [n, o]);
|
|
2455
2455
|
let l = n ? a.ai.thoughtsGroupTitle : t ?? a.ai.thoughtsGroupTitle, u = e.length - 1, d = (e) => !n || r ? "completed" : e === u ? "executing" : "completed";
|
|
2456
2456
|
return /* @__PURE__ */ Y(Ai, {
|
|
2457
|
-
icon:
|
|
2457
|
+
icon: T,
|
|
2458
2458
|
title: l,
|
|
2459
2459
|
open: o,
|
|
2460
2460
|
onOpenChange: s,
|
|
@@ -2475,14 +2475,14 @@ var ki = ({ content: t, targetMessage: n, onCopy: r }) => {
|
|
|
2475
2475
|
}, n))
|
|
2476
2476
|
})
|
|
2477
2477
|
});
|
|
2478
|
-
}, Fi = (e) => /* @__PURE__ */ Y(
|
|
2478
|
+
}, Fi = (e) => /* @__PURE__ */ Y(Ke, {
|
|
2479
2479
|
content: e,
|
|
2480
2480
|
format: "markdown"
|
|
2481
2481
|
}), Ii = ({ text: e, renderMarkdown: t }) => /* @__PURE__ */ X("div", {
|
|
2482
2482
|
className: "flex max-w-[90%] items-start gap-2 self-end pb-1 pr-2 text-f1-foreground-tertiary",
|
|
2483
2483
|
children: [/* @__PURE__ */ Y("div", {
|
|
2484
2484
|
className: "flex h-5 items-center",
|
|
2485
|
-
children: /* @__PURE__ */ Y(u, { icon:
|
|
2485
|
+
children: /* @__PURE__ */ Y(u, { icon: Ne })
|
|
2486
2486
|
}), /* @__PURE__ */ Y("div", {
|
|
2487
2487
|
className: "min-w-0 whitespace-pre-wrap text-base leading-5 [&>div]:flex [&>div]:flex-col [&>div]:gap-1 [&_p]:m-0",
|
|
2488
2488
|
children: (t ?? Fi)(e)
|
|
@@ -2664,8 +2664,8 @@ var qi = {
|
|
|
2664
2664
|
onThumbsUp: () => {},
|
|
2665
2665
|
onThumbsDown: () => {}
|
|
2666
2666
|
}, Ji = (e) => {
|
|
2667
|
-
let t =
|
|
2668
|
-
return e.filePreviews || !t.provided ? /* @__PURE__ */ Y(
|
|
2667
|
+
let t = $e(), n = /* @__PURE__ */ Y(Ei, { children: /* @__PURE__ */ Y(Yi, { ...e }) });
|
|
2668
|
+
return e.filePreviews || !t.provided ? /* @__PURE__ */ Y(Oe, {
|
|
2669
2669
|
filePreviews: e.filePreviews,
|
|
2670
2670
|
children: n
|
|
2671
2671
|
}) : n;
|
|
@@ -2809,7 +2809,7 @@ var qi = {
|
|
|
2809
2809
|
}) : null })
|
|
2810
2810
|
]
|
|
2811
2811
|
})
|
|
2812
|
-
}), !b && !P ? /* @__PURE__ */ Y(
|
|
2812
|
+
}), !b && !P ? /* @__PURE__ */ Y(Ye, { position: "top" }, "shadow-top") : null]
|
|
2813
2813
|
}), D.isOpen ? /* @__PURE__ */ Y(wi, {
|
|
2814
2814
|
onSubmit: O,
|
|
2815
2815
|
onClose: k,
|
|
@@ -3485,13 +3485,13 @@ var Da = class {
|
|
|
3485
3485
|
repeatType: "mirror"
|
|
3486
3486
|
};
|
|
3487
3487
|
function Pa(e) {
|
|
3488
|
-
let [t, n] = q(e), r =
|
|
3488
|
+
let [t, n] = q(e), r = we(e), i = K(null);
|
|
3489
3489
|
return Yt(r, "change", (e) => n(e)), {
|
|
3490
3490
|
value: t,
|
|
3491
3491
|
motionValue: r,
|
|
3492
3492
|
controls: i,
|
|
3493
3493
|
animate: U((e, t) => {
|
|
3494
|
-
i.current =
|
|
3494
|
+
i.current = Ze(r, e, t);
|
|
3495
3495
|
}, [r])
|
|
3496
3496
|
};
|
|
3497
3497
|
}
|
|
@@ -4274,10 +4274,10 @@ var Ao = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
|
|
|
4274
4274
|
className: "relative w-full flex-1",
|
|
4275
4275
|
role: "img",
|
|
4276
4276
|
"aria-label": `Sparkline chart showing ${i} trend`,
|
|
4277
|
-
children: [/* @__PURE__ */ Y(
|
|
4277
|
+
children: [/* @__PURE__ */ Y(se, {
|
|
4278
4278
|
width: "100%",
|
|
4279
4279
|
height: "100%",
|
|
4280
|
-
children: /* @__PURE__ */ X(
|
|
4280
|
+
children: /* @__PURE__ */ X(ge, {
|
|
4281
4281
|
data: e,
|
|
4282
4282
|
margin: {
|
|
4283
4283
|
top: 4,
|
|
@@ -4302,11 +4302,11 @@ var Ao = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
|
|
|
4302
4302
|
stopOpacity: .02
|
|
4303
4303
|
})]
|
|
4304
4304
|
}) }),
|
|
4305
|
-
/* @__PURE__ */ Y(
|
|
4305
|
+
/* @__PURE__ */ Y(ve, {
|
|
4306
4306
|
hide: !0,
|
|
4307
4307
|
domain: ["dataMin - 1", "dataMax + 1"]
|
|
4308
4308
|
}),
|
|
4309
|
-
/* @__PURE__ */ Y(
|
|
4309
|
+
/* @__PURE__ */ Y(E, {
|
|
4310
4310
|
type: "linear",
|
|
4311
4311
|
dataKey: "value",
|
|
4312
4312
|
stroke: a.stroke,
|
|
@@ -4491,11 +4491,11 @@ Uo.displayName = "F0AiProposalCard";
|
|
|
4491
4491
|
//#region src/blocks/ai/F0AiMessageSources/components/CollapsibleMessage.tsx
|
|
4492
4492
|
var Wo = ({ icon: e, title: n, children: r }) => {
|
|
4493
4493
|
let [i, a] = q(!1), o = t();
|
|
4494
|
-
return /* @__PURE__ */ X(
|
|
4494
|
+
return /* @__PURE__ */ X(P, {
|
|
4495
4495
|
className: "mb-1 w-full",
|
|
4496
4496
|
open: i,
|
|
4497
4497
|
onOpenChange: a,
|
|
4498
|
-
children: [/* @__PURE__ */ X(
|
|
4498
|
+
children: [/* @__PURE__ */ X(he, {
|
|
4499
4499
|
className: "flex w-full items-center text-base text-f1-foreground-secondary transition-colors duration-150 hover:text-f1-foreground [&[data-state=open]>svg]:rotate-90",
|
|
4500
4500
|
children: [
|
|
4501
4501
|
/* @__PURE__ */ Y("span", {
|
|
@@ -4514,7 +4514,7 @@ var Wo = ({ icon: e, title: n, children: r }) => {
|
|
|
4514
4514
|
className: "h-4 w-4 transition-transform duration-200"
|
|
4515
4515
|
})
|
|
4516
4516
|
]
|
|
4517
|
-
}), /* @__PURE__ */ Y(
|
|
4517
|
+
}), /* @__PURE__ */ Y(fe, {
|
|
4518
4518
|
forceMount: !0,
|
|
4519
4519
|
className: "data-[state=open]:mt-3",
|
|
4520
4520
|
children: /* @__PURE__ */ Y(s.div, {
|
|
@@ -4538,7 +4538,7 @@ var Wo = ({ icon: e, title: n, children: r }) => {
|
|
|
4538
4538
|
})
|
|
4539
4539
|
})]
|
|
4540
4540
|
});
|
|
4541
|
-
}, Go = (e) =>
|
|
4541
|
+
}, Go = (e) => pe[e] ?? zt, Ko = ({ iconName: e }) => e ? /* @__PURE__ */ Y("div", {
|
|
4542
4542
|
className: "mr-1 flex items-center justify-center",
|
|
4543
4543
|
children: /* @__PURE__ */ Y(u, {
|
|
4544
4544
|
icon: Go(e),
|
|
@@ -4582,11 +4582,11 @@ qo.displayName = "F0AiMessageSources";
|
|
|
4582
4582
|
//#endregion
|
|
4583
4583
|
//#region src/addons/ai/ai/F0AiTableCard/F0AiTableCard.tsx
|
|
4584
4584
|
async function Jo(e, t, n) {
|
|
4585
|
-
let r =
|
|
4585
|
+
let r = O(e), i = t === "xlsx" ? await it([{
|
|
4586
4586
|
name: "Data",
|
|
4587
4587
|
rows: r
|
|
4588
|
-
}]) : await
|
|
4589
|
-
|
|
4588
|
+
}]) : await at(r);
|
|
4589
|
+
ce(i, `${n}.${t}`);
|
|
4590
4590
|
}
|
|
4591
4591
|
function Yo({ dataset: e, title: t, filename: n }) {
|
|
4592
4592
|
let r = p(), i = K(null), a = t ?? r.ai.aiTable.title, o = U((e) => {
|
|
@@ -4615,16 +4615,16 @@ function Yo({ dataset: e, title: t, filename: n }) {
|
|
|
4615
4615
|
tag: "h2",
|
|
4616
4616
|
className: "text-base font-medium capitalize text-f1-foreground",
|
|
4617
4617
|
children: a
|
|
4618
|
-
}), /* @__PURE__ */ Y(
|
|
4619
|
-
icon:
|
|
4618
|
+
}), /* @__PURE__ */ Y(ye, {
|
|
4619
|
+
icon: k,
|
|
4620
4620
|
size: "md",
|
|
4621
4621
|
items: [{
|
|
4622
4622
|
label: r.ai.aiTable.downloadExcel,
|
|
4623
|
-
icon:
|
|
4623
|
+
icon: k,
|
|
4624
4624
|
onClick: () => o("xlsx")
|
|
4625
4625
|
}, {
|
|
4626
4626
|
label: r.ai.aiTable.downloadCsv,
|
|
4627
|
-
icon:
|
|
4627
|
+
icon: k,
|
|
4628
4628
|
onClick: () => o("csv")
|
|
4629
4629
|
}]
|
|
4630
4630
|
})]
|
|
@@ -4671,7 +4671,7 @@ function Xo({ credits: e, trigger: t }) {
|
|
|
4671
4671
|
variant: "ghost",
|
|
4672
4672
|
hideLabel: !0,
|
|
4673
4673
|
label: n.t("ai.credits.title"),
|
|
4674
|
-
icon:
|
|
4674
|
+
icon: Ae,
|
|
4675
4675
|
pressed: r
|
|
4676
4676
|
})
|
|
4677
4677
|
}), /* @__PURE__ */ X(l, {
|
|
@@ -4769,7 +4769,7 @@ function Xo({ credits: e, trigger: t }) {
|
|
|
4769
4769
|
variant: "outlinePromote",
|
|
4770
4770
|
href: e.upgradePlanUrl,
|
|
4771
4771
|
label: n.t("ai.credits.upgradePlan"),
|
|
4772
|
-
icon:
|
|
4772
|
+
icon: I
|
|
4773
4773
|
})]
|
|
4774
4774
|
}) : null]
|
|
4775
4775
|
})]
|
|
@@ -4873,7 +4873,7 @@ function $o({ employeeCredits: e, trigger: t }) {
|
|
|
4873
4873
|
variant: "ghost",
|
|
4874
4874
|
hideLabel: !0,
|
|
4875
4875
|
label: n.t("ai.credits.title"),
|
|
4876
|
-
icon:
|
|
4876
|
+
icon: Ae,
|
|
4877
4877
|
pressed: r
|
|
4878
4878
|
})
|
|
4879
4879
|
}), /* @__PURE__ */ X(l, {
|
|
@@ -4922,7 +4922,7 @@ var es = ({ credits: e, employeeCredits: t, trigger: n }) => t ? /* @__PURE__ */
|
|
|
4922
4922
|
variant: "ghost",
|
|
4923
4923
|
hideLabel: !0,
|
|
4924
4924
|
label: a ? C.ai.collapseChat : C.ai.expandChat,
|
|
4925
|
-
icon: a ?
|
|
4925
|
+
icon: a ? me : L,
|
|
4926
4926
|
onClick: c
|
|
4927
4927
|
}), D = /* @__PURE__ */ Y(_, {
|
|
4928
4928
|
variant: "ghost",
|
|
@@ -4930,7 +4930,7 @@ var es = ({ credits: e, employeeCredits: t, trigger: n }) => t ? /* @__PURE__ */
|
|
|
4930
4930
|
label: C.ai.closeChat,
|
|
4931
4931
|
icon: x,
|
|
4932
4932
|
onClick: l
|
|
4933
|
-
}),
|
|
4933
|
+
}), O = S?.map((e) => /* @__PURE__ */ Y(_, {
|
|
4934
4934
|
variant: "ghost",
|
|
4935
4935
|
hideLabel: !0,
|
|
4936
4936
|
label: e.label,
|
|
@@ -4953,7 +4953,7 @@ var es = ({ credits: e, employeeCredits: t, trigger: n }) => t ? /* @__PURE__ */
|
|
|
4953
4953
|
ease: "easeOut"
|
|
4954
4954
|
},
|
|
4955
4955
|
children: [
|
|
4956
|
-
|
|
4956
|
+
O,
|
|
4957
4957
|
E,
|
|
4958
4958
|
D
|
|
4959
4959
|
]
|
|
@@ -4993,7 +4993,7 @@ var es = ({ credits: e, employeeCredits: t, trigger: n }) => t ? /* @__PURE__ */
|
|
|
4993
4993
|
credits: h,
|
|
4994
4994
|
employeeCredits: g
|
|
4995
4995
|
}),
|
|
4996
|
-
|
|
4996
|
+
O,
|
|
4997
4997
|
E,
|
|
4998
4998
|
D
|
|
4999
4999
|
]
|
|
@@ -5019,14 +5019,14 @@ var es = ({ credits: e, employeeCredits: t, trigger: n }) => t ? /* @__PURE__ */
|
|
|
5019
5019
|
variant: "ghost",
|
|
5020
5020
|
hideLabel: !0,
|
|
5021
5021
|
label: C.ai.startNewChat,
|
|
5022
|
-
icon:
|
|
5022
|
+
icon: F,
|
|
5023
5023
|
onClick: d
|
|
5024
5024
|
}) : null,
|
|
5025
5025
|
/* @__PURE__ */ Y(es, {
|
|
5026
5026
|
credits: h,
|
|
5027
5027
|
employeeCredits: g
|
|
5028
5028
|
}),
|
|
5029
|
-
|
|
5029
|
+
O,
|
|
5030
5030
|
E,
|
|
5031
5031
|
D
|
|
5032
5032
|
]
|
|
@@ -5037,12 +5037,12 @@ var es = ({ credits: e, employeeCredits: t, trigger: n }) => t ? /* @__PURE__ */
|
|
|
5037
5037
|
//#region src/addons/ai/ai/F0AiChatHistory/utils.ts
|
|
5038
5038
|
function rs(e) {
|
|
5039
5039
|
let t = new Date(e), n = /* @__PURE__ */ new Date();
|
|
5040
|
-
return
|
|
5040
|
+
return Ge(t) ? "today" : ke(t) ? "yesterday" : jt(t, n) ? "thisMonth" : "older";
|
|
5041
5041
|
}
|
|
5042
5042
|
function is(e, t, n) {
|
|
5043
5043
|
let r = new Date(e), i = Rt(r, "p", { locale: n });
|
|
5044
|
-
if (
|
|
5045
|
-
if (
|
|
5044
|
+
if (Ge(r)) return `${t.today}, ${i}`;
|
|
5045
|
+
if (ke(r)) return `${t.yesterday}, ${i}`;
|
|
5046
5046
|
let a = !Lt(r, /* @__PURE__ */ new Date());
|
|
5047
5047
|
return `${Rt(r, a ? "MMM d yyyy" : "MMM d", { locale: n })}, ${i}`;
|
|
5048
5048
|
}
|
|
@@ -5069,11 +5069,11 @@ function as(e) {
|
|
|
5069
5069
|
function os({ thread: e, isPinned: t, isActive: n = !1, isPending: r = !1, onSelect: i, onPin: a, onUnpin: o, onDelete: s, className: c }) {
|
|
5070
5070
|
let l = p(), d = It(), f = G(() => [{
|
|
5071
5071
|
label: t ? l.ai.unpinChat : l.ai.pinChat,
|
|
5072
|
-
icon: t ?
|
|
5072
|
+
icon: t ? Se : ot,
|
|
5073
5073
|
onClick: () => t ? o(e.id) : a(e.id)
|
|
5074
5074
|
}, {
|
|
5075
5075
|
label: l.ai.deleteChat,
|
|
5076
|
-
icon:
|
|
5076
|
+
icon: Ie,
|
|
5077
5077
|
critical: !0,
|
|
5078
5078
|
onClick: () => s(e.id)
|
|
5079
5079
|
}], [
|
|
@@ -5131,10 +5131,10 @@ function os({ thread: e, isPinned: t, isActive: n = !1, isPending: r = !1, onSel
|
|
|
5131
5131
|
children: /* @__PURE__ */ Y(kt, { size: "small" })
|
|
5132
5132
|
}) : /* @__PURE__ */ Y("div", {
|
|
5133
5133
|
className: y("hidden items-center", "group-hover:flex group-focus-within:flex", "has-[[aria-expanded=true]]:flex"),
|
|
5134
|
-
children: /* @__PURE__ */ Y(
|
|
5134
|
+
children: /* @__PURE__ */ Y(ye, {
|
|
5135
5135
|
items: f,
|
|
5136
5136
|
children: /* @__PURE__ */ Y(_, {
|
|
5137
|
-
icon:
|
|
5137
|
+
icon: ue,
|
|
5138
5138
|
variant: "ghost",
|
|
5139
5139
|
size: "sm",
|
|
5140
5140
|
label: l.ai.threadOptions,
|
|
@@ -5277,7 +5277,7 @@ var fs = ({ onClose: t, onSelectThread: n, onNewChat: r, threads: i, isLoading:
|
|
|
5277
5277
|
children: /* @__PURE__ */ X("div", {
|
|
5278
5278
|
className: "flex w-full items-center gap-2",
|
|
5279
5279
|
children: [/* @__PURE__ */ Y(u, {
|
|
5280
|
-
icon:
|
|
5280
|
+
icon: F,
|
|
5281
5281
|
color: "default",
|
|
5282
5282
|
size: "md"
|
|
5283
5283
|
}), /* @__PURE__ */ Y(v, {
|
|
@@ -5320,11 +5320,11 @@ var fs = ({ onClose: t, onSelectThread: n, onNewChat: r, threads: i, isLoading:
|
|
|
5320
5320
|
})] }), document.body);
|
|
5321
5321
|
}, ps = "f0-ai-pinned-threads";
|
|
5322
5322
|
function ms() {
|
|
5323
|
-
let e =
|
|
5323
|
+
let e = _e(ps, []);
|
|
5324
5324
|
return new Set(Array.isArray(e) ? e : []);
|
|
5325
5325
|
}
|
|
5326
5326
|
function hs(e) {
|
|
5327
|
-
|
|
5327
|
+
ae(ps, [...e]);
|
|
5328
5328
|
}
|
|
5329
5329
|
function gs({ enabled: e = !1, fetchThreads: t, deleteThread: n, pinThread: r, unpinThread: i }) {
|
|
5330
5330
|
let [a, o] = q([]), [s, c] = q(!1), [l, u] = q(null), [d, f] = q(ms), [p, m] = q(() => /* @__PURE__ */ new Set()), h = U(async () => {
|