@factorialco/f0-react 10.13.0 → 10.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/{ChatPostComposerDialog-Dxf_Nbbb.js → ChatPostComposerDialog-CIKfoH8G.js} +3 -3
  2. package/dist/{CoachmarkProvider-ByfCE0-j.js → CoachmarkProvider-BQGJN9Eq.js} +16122 -16128
  3. package/dist/{DocumentToolbar-UFkOiw8e.js → DocumentToolbar-C7Hoqt2k.js} +5 -5
  4. package/dist/{DocxViewer-BjmzL4sn.js → DocxViewer-lSeezeTM.js} +2 -2
  5. package/dist/{F0AiProcessingOverlay-B2kWuLdK.js → F0AiProcessingOverlay-mGAGIMhR.js} +467 -466
  6. package/dist/{F0CanvasPanel-9PijExob.js → F0CanvasPanel-DpK3VDqw.js} +7373 -7340
  7. package/dist/{F0DocumentViewer-hMDS3Kpg.js → F0DocumentViewer-3dkTQl5F.js} +9 -9
  8. package/dist/F0DocumentViewer-BXXUyUaZ.js +3 -0
  9. package/dist/{F0Map-CznQg3YF.js → F0Map-CbaCGcqg.js} +845 -607
  10. package/dist/{F0Select-By_QpX1S.js → F0Select-CFbVOJB3.js} +73 -73
  11. package/dist/{F0Box-CYL5_Zhb.js → F0Text-eOwHoc51.js} +104 -96
  12. package/dist/{F0VideoPlayer-BByW1cIV.js → F0VideoPlayer-BdQ7J79i.js} +279 -279
  13. package/dist/F0VideoPlayer-pCo7xxqk.js +1 -0
  14. package/dist/{Map-DZ1yBUGL.js → Map-CqeYx7ZH.js} +53 -52
  15. package/dist/{PdfThumbnail-Dkwm6GDn.js → PdfThumbnail-BrRRXFmm.js} +1 -1
  16. package/dist/{SheetViewer-DT6WypD8.js → SheetViewer-i-Apnmgp.js} +4 -4
  17. package/dist/{TextViewer-D8MLMNev.js → TextViewer-DZmOqOxb.js} +2 -2
  18. package/dist/ai.d.ts +3 -3
  19. package/dist/ai.js +4 -4
  20. package/dist/component-status.js +28 -28
  21. package/dist/{dist-CUsub1Mu.js → dist-Ck_UA8Lz.js} +1 -1
  22. package/dist/{dist-CSP_0yKt.js → dist-Cuwaibqg.js} +2 -1
  23. package/dist/experimental.d.ts +216 -115
  24. package/dist/experimental.js +5917 -4716
  25. package/dist/{exports-0B2luDkl.d.ts → exports-CUQ_f1Aq.d.ts} +1 -1
  26. package/dist/f0.d.ts +12 -7
  27. package/dist/f0.js +704 -704
  28. package/dist/{google-B7uAYsxU.js → google-D1V0swd7.js} +1 -1
  29. package/dist/{i18n-provider-defaults-BA2_-hRH.js → i18n-provider-defaults-Ch0JDGbK.js} +12 -3
  30. package/dist/{i18n-provider-defaults-m88KkXdP.d.ts → i18n-provider-defaults-D1lWzbYx.d.ts} +14 -1
  31. package/dist/i18n-provider-defaults.d.ts +1 -1
  32. package/dist/i18n-provider-defaults.js +1 -1
  33. package/dist/{index-Bdpf44A3.d.ts → index--CBjax6U.d.ts} +2 -2
  34. package/dist/{index-s5SdT3uE.d.ts → index-2J8R9Uml.d.ts} +3 -1
  35. package/dist/{maplibre-GffVTD0r.js → maplibre-C6hlLglQ.js} +2 -2
  36. package/dist/{pdfWorker-C3UVNtZV.js → pdfWorker-DR5Zoo3d.js} +2 -2
  37. package/dist/{popover-B7fqB9lu.js → popover-DNcAIP25.js} +20 -20
  38. package/dist/styles.css +1 -1
  39. package/dist/{tooltip-TOvfXq9F.js → tooltip-BX4dSfeL.js} +338 -247
  40. package/dist/{useData-CAl9SKtE.js → useData-zygrn6e-.js} +950 -949
  41. package/package.json +2 -2
  42. package/dist/F0DocumentViewer-DDaXV0U3.js +0 -3
  43. package/dist/F0VideoPlayer-DerqL5g5.js +0 -1
@@ -1,18 +1,18 @@
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
- import { I as y, L as b } from "./tooltip-TOvfXq9F.js";
3
- import { n as x, t as S } from "./F0Box-CYL5_Zhb.js";
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-9PijExob.js";
5
- import { t as dt } from "./i18n-provider-defaults-BA2_-hRH.js";
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
- 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";
8
- import { n as zt } from "./dist-CUsub1Mu.js";
9
- import { createContext as Bt, createElement as Vt, forwardRef as H, memo as Ht, useCallback as U, useContext as Ut, useEffect as W, useId as Wt, useInsertionEffect as Gt, useLayoutEffect as Kt, useMemo as G, useRef as K, useState as q } from "react";
10
- import { Fragment as J, jsx as Y, jsxs as X } from "react/jsx-runtime";
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-DNcAIP25.js";
2
+ import { L as y, R as b } from "./tooltip-BX4dSfeL.js";
3
+ import { n as x, r as S } from "./F0Text-eOwHoc51.js";
4
+ import { $a as C, $n as w, $r as T, Ao as E, B as D, Bo as O, C as ee, Dt as k, Es as A, F as j, Fr as M, Gr as N, Ha as P, Ho as F, Hr as I, Lo as te, Lt as ne, M as re, Ms as L, Mt as R, N as ie, Oa as z, Os as B, P as ae, Q as oe, R as V, Ra as se, Ri as ce, S as le, So as ue, St as H, Tt as de, Ur as fe, V as pe, Wr as me, Ya as he, Yo as ge, Yr as _e, Z as ve, Zr as ye, _a as be, _o as xe, a as Se, at as Ce, bt as we, cc as Te, ct as Ee, d as De, eo as Oe, es as ke, et as Ae, fa as je, fr as Me, g as Ne, h as Pe, i as Fe, kt as Ie, l as Le, lc as Re, lt as ze, m as Be, no as Ve, nt as He, o as Ue, ot as We, pa as Ge, po as Ke, pr as qe, pt as Je, qn as Ye, r as Xe, rr as Ze, to as Qe, tt as $e, u as et, ut as tt, vt as nt, w as rt, x as it, xo as at, xt as ot, yo as st, yt as ct, z as lt } from "./F0CanvasPanel-DpK3VDqw.js";
5
+ import { t as ut } from "./i18n-provider-defaults-Ch0JDGbK.js";
6
+ import { C as dt, D as ft, F as pt, J as mt, S as ht, V as gt, k as _t, l as vt, q as yt, x as bt } from "./useData-zygrn6e-.js";
7
+ import { Dn as xt, Dr as St, Er as Ct, Ft as wt, Nr as Tt, On as Et, Or as Dt, Ot, _t as kt, cn as At, ct as jt, gt as Mt, ht as Nt, jr as Pt, nn as Ft, sn as It, un as Lt } from "./F0Select-CFbVOJB3.js";
8
+ import { n as Rt } from "./dist-Ck_UA8Lz.js";
9
+ import { createContext as zt, createElement as Bt, forwardRef as U, memo as Vt, useCallback as W, useContext as Ht, useEffect as G, useId as Ut, useInsertionEffect as Wt, useLayoutEffect as Gt, useMemo as K, useRef as q, useState as J } from "react";
10
+ import { Fragment as Kt, jsx as Y, jsxs as X } from "react/jsx-runtime";
11
11
  import { createPortal as qt } from "react-dom";
12
12
  import { useTrackVolume as Jt } from "@livekit/components-react";
13
13
  //#region ../../node_modules/.pnpm/motion@12.17.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/motion/dist/es/framer-motion/dist/es/utils/use-motion-value-event.mjs
14
14
  function Yt(e, t, n) {
15
- Gt(() => e.on(t, n), [
15
+ Wt(() => e.on(t, n), [
16
16
  e,
17
17
  t,
18
18
  n
@@ -30,10 +30,10 @@ var Xt = [
30
30
  "sm",
31
31
  "md",
32
32
  "lg"
33
- ], Qt = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;"), $t = /[\\`*_{}[\]()#+\-.!|~>]/g, en = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").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");
33
+ ], Qt = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;"), $t = /[\\`*_{}[\]()#+\-.!|~>]/g, en = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").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, pe(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 || V(t) > r || (a += en(e.slice(o, t.start)) + tn(t), o = V(t));
36
+ for (let t of i) t.start < o || pe(t) > r || (a += en(e.slice(o, t.start)) + tn(t), o = pe(t));
37
37
  return a + en(e.slice(o, r));
38
38
  }
39
39
  //#endregion
@@ -110,7 +110,7 @@ var an = 14, on = 2.31, sn = ({ percentage: e, tone: t }) => {
110
110
  children: [/* @__PURE__ */ Y("div", { className: "h-5 w-28 animate-pulse rounded bg-f1-background-secondary" }), /* @__PURE__ */ Y("div", { className: "h-5 w-16 animate-pulse rounded bg-f1-background-secondary" })]
111
111
  }), /* @__PURE__ */ Y("div", { className: "h-2 w-full animate-pulse rounded-full bg-f1-background-secondary" })]
112
112
  }), dn = ({ usage: e, error: t = !1, onOpenChange: n, trigger: r, side: a = "top" }) => {
113
- let o = p(), [s, c] = q(!1), d = K(null), f = U((e) => {
113
+ let o = p(), [s, c] = J(!1), d = q(null), f = W((e) => {
114
114
  c(e), n?.(e);
115
115
  }, [n]), m = e ? ln(e.usedPercentage) : 0, g = e?.unlimited ?? !1, _ = g ? "unlimited" : m >= 100 ? "exhausted" : "default", v = e?.sections ?? [], x = !!e?.onSeeCompany || v.length > 0, S = o.t("ai.usageLimits.title"), C = g ? o.t("ai.usageLimits.unlimited") : o.t("ai.usageLimits.used", { percentage: m }), w = e ? `${S}: ${C}` : S;
116
116
  return /* @__PURE__ */ X(h, {
@@ -163,7 +163,7 @@ var an = 14, on = 2.31, sn = ({ percentage: e, tone: t }) => {
163
163
  className: "min-w-0 flex-1 truncate",
164
164
  children: o.t("ai.usageLimits.yourCompany")
165
165
  }), /* @__PURE__ */ Y(u, {
166
- icon: Ct,
166
+ icon: St,
167
167
  size: "md",
168
168
  color: "default"
169
169
  })]
@@ -181,12 +181,12 @@ var an = 14, on = 2.31, sn = ({ percentage: e, tone: t }) => {
181
181
  });
182
182
  }, fn = (e) => {
183
183
  let { provided: t } = $e();
184
- return t ? /* @__PURE__ */ Y(pn, { ...e }) : /* @__PURE__ */ Y(Oe, { children: /* @__PURE__ */ Y(pn, { ...e }) });
184
+ return t ? /* @__PURE__ */ Y(pn, { ...e }) : /* @__PURE__ */ Y(Ae, { 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 || xe({
189
+ let i = e.file.name, a = e.file.type || Ce({
190
190
  name: i,
191
191
  url: t
192
192
  }), s = We({
@@ -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(z, {
210
+ content: /* @__PURE__ */ Y(ae, {
211
211
  attachment: s,
212
212
  status: e.status === "uploaded" ? "ready" : e.status === "error" ? "error" : "uploading",
213
213
  errorMessage: e.errorMessage,
@@ -217,7 +217,7 @@ var an = 14, on = 2.31, sn = ({ percentage: e, tone: t }) => {
217
217
  })
218
218
  }];
219
219
  });
220
- return /* @__PURE__ */ Y(re, {
220
+ return /* @__PURE__ */ Y(ie, {
221
221
  items: s,
222
222
  label: a.t(e.length === 1 ? "chat.attachmentCount.one" : "chat.attachmentCount.other", { count: e.length }),
223
223
  busy: t,
@@ -225,10 +225,10 @@ var an = 14, on = 2.31, sn = ({ percentage: e, tone: t }) => {
225
225
  testIdPrefix: "ai-chat"
226
226
  });
227
227
  }, mn = (e) => {
228
- let [t, n] = q(() => /* @__PURE__ */ new Map()), r = K(t);
229
- return Kt(() => {
228
+ let [t, n] = J(() => /* @__PURE__ */ new Map()), r = q(t);
229
+ return Gt(() => {
230
230
  r.current = t;
231
- }, [t]), W(() => {
231
+ }, [t]), G(() => {
232
232
  let t = r.current, i = new Set(e.map((e) => e.id)), a = e.filter((e) => !t.has(e.id)), o = [...t.keys()].filter((e) => !i.has(e));
233
233
  if (a.length === 0 && o.length === 0) return;
234
234
  let s = new Map(t);
@@ -238,7 +238,7 @@ var an = 14, on = 2.31, sn = ({ percentage: e, tone: t }) => {
238
238
  }
239
239
  for (let e of a) s.set(e.id, URL.createObjectURL(e.file));
240
240
  n(s);
241
- }, [e]), W(() => () => {
241
+ }, [e]), G(() => () => {
242
242
  for (let e of r.current.values()) URL.revokeObjectURL(e);
243
243
  r.current = /* @__PURE__ */ new Map();
244
244
  }, []), t;
@@ -262,18 +262,18 @@ var an = 14, on = 2.31, sn = ({ percentage: e, tone: t }) => {
262
262
  let { id: t, type: n, ...r } = e;
263
263
  return r;
264
264
  }), gn = ({ actions: e, showAttachEntry: t, onAttachClick: n, attachDisabled: r, attachDisabledTooltip: i, disabled: a, onOpenChange: o }) => {
265
- let s = p(), [c, l] = q(!1), u = (e) => {
265
+ let s = p(), [c, l] = J(!1), u = (e) => {
266
266
  l(e), o?.(e);
267
267
  }, d = [...t ? [{
268
268
  label: s.ai.addFilesOrPhotos,
269
- icon: Le,
269
+ icon: E,
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(ye, {
276
+ children: /* @__PURE__ */ Y(be, {
277
277
  items: d,
278
278
  align: "start",
279
279
  disabled: a,
@@ -284,7 +284,7 @@ var an = 14, on = 2.31, sn = ({ percentage: e, tone: t }) => {
284
284
  label: s.ai.addToConversation,
285
285
  hideLabel: !0,
286
286
  type: "button",
287
- icon: pt,
287
+ icon: mt,
288
288
  variant: "outline",
289
289
  size: "md",
290
290
  pressed: c,
@@ -294,7 +294,7 @@ var an = 14, on = 2.31, sn = ({ percentage: e, tone: t }) => {
294
294
  });
295
295
  }, _n = ({ onUploadFiles: e, composerActions: t, isAtMaxFiles: n, maxFiles: r, acceptValue: i, fileInputRef: a, handleFileSelect: o, recordingStatus: s, onComposerActionsOpenChange: c }) => {
296
296
  let l = p(), u = s === "transcribing", d = () => a.current?.click(), f = t?.length ? t : null;
297
- return !e && !f ? null : /* @__PURE__ */ X(J, { children: [f ? /* @__PURE__ */ Y(gn, {
297
+ return !e && !f ? null : /* @__PURE__ */ X(Kt, { children: [f ? /* @__PURE__ */ Y(gn, {
298
298
  actions: f,
299
299
  showAttachEntry: !!e,
300
300
  onAttachClick: d,
@@ -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: Le,
309
+ icon: E,
310
310
  variant: "outline",
311
311
  size: "md",
312
312
  disabled: n || u,
@@ -354,7 +354,7 @@ var an = 14, on = 2.31, sn = ({ percentage: e, tone: t }) => {
354
354
  label: n.ai.creditWarning.dismiss ?? "",
355
355
  size: "sm",
356
356
  variant: "ghost",
357
- icon: x,
357
+ icon: S,
358
358
  hideLabel: !0,
359
359
  onClick: e.onDismiss
360
360
  }) : null]
@@ -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: Ne,
377
+ icon: xe,
378
378
  size: "md",
379
379
  color: "default"
380
380
  })
@@ -385,10 +385,11 @@ var an = 14, on = 2.31, sn = ({ percentage: e, tone: t }) => {
385
385
  children: e.text
386
386
  }),
387
387
  /* @__PURE__ */ Y(_, {
388
+ type: "button",
388
389
  variant: "ghost",
389
390
  label: n.ai.removeQuote,
390
391
  onClick: t,
391
- icon: x,
392
+ icon: S,
392
393
  hideLabel: !0,
393
394
  size: "sm"
394
395
  })
@@ -397,7 +398,7 @@ var an = 14, on = 2.31, sn = ({ percentage: e, tone: t }) => {
397
398
  });
398
399
  }, xn = ({ cards: e }) => e.length === 0 ? null : /* @__PURE__ */ Y("div", {
399
400
  className: "grid w-full grid-cols-2 gap-3",
400
- children: e.slice(0, 4).map((e) => /* @__PURE__ */ Y(ne, {
401
+ children: e.slice(0, 4).map((e) => /* @__PURE__ */ Y(re, {
401
402
  avatar: {
402
403
  type: "icon",
403
404
  icon: e.icon
@@ -408,11 +409,11 @@ var an = 14, on = 2.31, sn = ({ percentage: e, tone: t }) => {
408
409
  }, e.id))
409
410
  });
410
411
  function Sn(e = 24) {
411
- let [t, n] = q(null), [r, i] = q({
412
+ let [t, n] = J(null), [r, i] = J({
412
413
  start: !1,
413
414
  end: !1
414
415
  });
415
- return W(() => {
416
+ return G(() => {
416
417
  if (!t) return;
417
418
  let e = () => {
418
419
  let e = t.scrollWidth > t.clientWidth + 1;
@@ -430,7 +431,7 @@ function Sn(e = 24) {
430
431
  };
431
432
  }, [t]), {
432
433
  ref: n,
433
- style: G(() => {
434
+ style: K(() => {
434
435
  if (!r.start && !r.end) return {};
435
436
  let t = `linear-gradient(to right, ${r.start ? `transparent 0, black ${e}px` : "black 0"}, ${r.end ? `black calc(100% - ${e}px), transparent 100%` : "black 100%"})`;
436
437
  return {
@@ -447,7 +448,7 @@ function On(e, t = Cn) {
447
448
  return e.length <= t ? e : [...e].sort(() => .5 - Math.random()).slice(0, t);
448
449
  }
449
450
  var kn = ({ suggestions: e, onItemClick: t, onItemHover: n, side: r = "top", reserveTwoRows: i = !0, overflow: a = "wrap" }) => {
450
- let [o, s] = q(null), c = K(null), d = a === "scroll", p = Sn(), m = K(null), g = K(!1), v = Wt(), b = Wt(), x = o === null ? null : e[o];
451
+ let [o, s] = J(null), c = q(null), d = a === "scroll", p = Sn(), m = q(null), g = q(!1), v = Ut(), b = Ut(), x = o === null ? null : e[o];
451
452
  return e.length === 0 ? null : /* @__PURE__ */ X(h, {
452
453
  open: x !== null,
453
454
  onOpenChange: (e) => {
@@ -519,11 +520,11 @@ var kn = ({ suggestions: e, onItemClick: t, onItemHover: n, side: r = "top", res
519
520
  });
520
521
  };
521
522
  function An({ item: e, onSelect: n, onHover: r }) {
522
- let i = K(null), a = K(null), o = K(null), s = t(), c = U(() => {
523
+ let i = q(null), a = q(null), o = q(null), s = t(), c = W(() => {
523
524
  o.current != null && (clearTimeout(o.current), o.current = null);
524
525
  let e = a.current, t = i.current;
525
526
  e && (e.style.transition = "none", e.style.transform = "translateX(0)", e.style.overflow = ""), t && (t.style.removeProperty("mask-image"), t.style.removeProperty("-webkit-mask-image"));
526
- }, []), l = U(() => {
527
+ }, []), l = W(() => {
527
528
  s || (o.current = window.setTimeout(() => {
528
529
  let e = a.current, t = i.current;
529
530
  if (!e || !t) return;
@@ -534,16 +535,16 @@ function An({ item: e, onSelect: n, onHover: r }) {
534
535
  let s = `linear-gradient(90deg, transparent 0, #000 ${Dn}px)`;
535
536
  t.style.setProperty("mask-image", s), t.style.setProperty("-webkit-mask-image", s), e.style.transition = `transform ${o}ms linear`, e.style.transform = `translateX(-${r}px)`;
536
537
  }, Tn));
537
- }, [s]), d = U(() => {
538
+ }, [s]), d = W(() => {
538
539
  r?.(e), l();
539
540
  }, [
540
541
  e,
541
542
  r,
542
543
  l
543
- ]), f = U(() => {
544
+ ]), f = W(() => {
544
545
  r?.(null), c();
545
546
  }, [r, c]);
546
- return W(() => () => {
547
+ return G(() => () => {
547
548
  o.current != null && clearTimeout(o.current);
548
549
  }, []), /* @__PURE__ */ X("button", {
549
550
  type: "button",
@@ -565,7 +566,7 @@ function An({ item: e, onSelect: n, onHover: r }) {
565
566
  "aria-hidden": !0,
566
567
  className: "flex flex-shrink-0 items-center text-f1-foreground-secondary opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",
567
568
  children: /* @__PURE__ */ Y(u, {
568
- icon: Ft,
569
+ icon: Pt,
569
570
  size: "sm"
570
571
  })
571
572
  })]
@@ -593,7 +594,7 @@ function jn(e, t) {
593
594
  }
594
595
  function Mn({ searchPersons: e, mentionSources: t }) {
595
596
  let { ai: n } = p(), r = n.mentions.people;
596
- return G(() => {
597
+ return K(() => {
597
598
  let n = t ?? [];
598
599
  return !e || n.some((e) => e.type === "person") ? n : [jn(e, { label: r }), ...n];
599
600
  }, [
@@ -621,21 +622,21 @@ function Pn(e, t) {
621
622
  //#region src/addons/ai/ai/F0AiChatTextArea/useFileAttachments.ts
622
623
  var Fn = 4e3;
623
624
  function In(e) {
624
- let [t, n] = q([]), [r, i] = q(null), a = K(null), o = K(null), s = p(), c = e?.onUploadFiles, l = e?.allowedMimeTypes, u = e?.maxFiles, d = G(() => {
625
+ let [t, n] = J([]), [r, i] = J(null), a = q(null), o = q(null), s = p(), c = e?.onUploadFiles, l = e?.allowedMimeTypes, u = e?.maxFiles, d = K(() => {
625
626
  if (l) return Array.isArray(l) ? l.join(",") : l;
626
- }, [l]), f = u !== void 0 && t.length >= u, m = K(0);
627
- W(() => {
627
+ }, [l]), f = u !== void 0 && t.length >= u, m = q(0);
628
+ G(() => {
628
629
  m.current = t.length;
629
630
  }, [t]);
630
- let h = U((e) => {
631
+ let h = W((e) => {
631
632
  a.current && clearTimeout(a.current), i(e), a.current = setTimeout(() => {
632
633
  i(null), a.current = null;
633
634
  }, Fn);
634
635
  }, []);
635
- W(() => () => {
636
+ G(() => () => {
636
637
  a.current && clearTimeout(a.current);
637
638
  }, []);
638
- let g = U(async (e) => {
639
+ let g = W(async (e) => {
639
640
  if (e.length === 0 || !c) return;
640
641
  let t = Pn(e, l);
641
642
  if (t.length === 0) return;
@@ -691,10 +692,10 @@ function In(e) {
691
692
  isAtMaxFiles: f,
692
693
  maxFiles: u,
693
694
  processFiles: g,
694
- handleFileSelect: U(async (e) => {
695
+ handleFileSelect: W(async (e) => {
695
696
  await g(Array.from(e.target.files ?? [])), e.target.value = "";
696
697
  }, [g]),
697
- handleRemoveFile: U((e) => {
698
+ handleRemoveFile: W((e) => {
698
699
  n((t) => t.filter((t) => t.id !== e));
699
700
  }, []),
700
701
  transientError: r,
@@ -703,46 +704,46 @@ function In(e) {
703
704
  }
704
705
  //#endregion
705
706
  //#region src/addons/ai/ai/F0AiChatTextArea/AiChatComposer.tsx
706
- var Ln = ({ onSubmit: e, onStop: r, inProgress: i, onBeforeSubmit: a, placeholders: o, creditWarning: c, clarifyingUI: l, pendingContext: u = null, onPendingContextChange: d, pendingQuote: f = null, onPendingQuoteChange: m, fileAttachments: h, toolbarStart: _, composerActions: b, onComposerActionsOpenChange: x, onTranscribe: S, searchPersons: C, mentionSources: w, onProcessFilesRef: T, disclaimer: E, usageLimits: O, footer: k, isWelcomeScreen: j = !1, fullscreen: M = !1, welcomeScreenSuggestions: N, onSuggestionClick: P, welcomeScreenSuggestionsPlacement: F = "above", welcomeScreenSuggestionsCollapsedByDefault: I = !1, welcomeScreenCards: L, padding: ee = "default", name: te, ref: ne }) => {
707
- let R = p(), re = t(), ie = !!re, z = K(null), [ae, oe] = q(null), [se, ce] = q(!1), [le, ue] = q({
707
+ var Ln = ({ onSubmit: e, onStop: r, inProgress: i, onBeforeSubmit: a, placeholders: o, creditWarning: c, clarifyingUI: l, pendingContext: u = null, onPendingContextChange: d, pendingQuote: f = null, onPendingQuoteChange: m, fileAttachments: h, toolbarStart: _, composerActions: b, onComposerActionsOpenChange: x, onTranscribe: S, searchPersons: C, mentionSources: w, onProcessFilesRef: T, disclaimer: E, usageLimits: O, footer: ee, isWelcomeScreen: A = !1, fullscreen: j = !1, welcomeScreenSuggestions: M, onSuggestionClick: N, welcomeScreenSuggestionsPlacement: P = "above", welcomeScreenSuggestionsCollapsedByDefault: F = !1, welcomeScreenCards: I, padding: te = "default", name: ne, ref: re }) => {
708
+ let L = p(), R = t(), ie = !!R, z = q(null), [B, ae] = J(null), [oe, se] = J(!1), [ce, le] = J({
708
709
  isEmpty: !0,
709
710
  recorder: "idle"
710
- }), de = K(null), fe = K(null);
711
- W(() => () => {
712
- fe.current && clearTimeout(fe.current);
711
+ }), ue = q(null), H = q(null);
712
+ G(() => () => {
713
+ H.current && clearTimeout(H.current);
713
714
  }, []);
714
- let V = l != null, pe = K(u), me = K(f);
715
- Kt(() => {
716
- pe.current = u, me.current = f;
715
+ let de = l != null, fe = q(u), pe = q(f);
716
+ Gt(() => {
717
+ fe.current = u, pe.current = f;
717
718
  });
718
- let { tracking: he, setFocusChatInputFunction: ge } = B(), _e = U((e, t) => {
719
- he?.onWelcomeSuggestionClick?.({
719
+ let { tracking: me, setFocusChatInputFunction: he } = V(), ge = W((e, t) => {
720
+ me?.onWelcomeSuggestionClick?.({
720
721
  item: e,
721
722
  group: t,
722
723
  prompt: e.prompt || e.title
723
- }), P?.(e, t);
724
- }, [he, P]), { attachedFiles: ve, fileInputRef: ye, onUploadFiles: be, acceptValue: xe, isAtMaxFiles: Se, maxFiles: Ce, processFiles: we, handleFileSelect: Te, handleRemoveFile: Ee, transientError: De, showTransientError: Oe } = In(h), ke = Mn({
724
+ }), N?.(e, t);
725
+ }, [me, N]), { attachedFiles: _e, fileInputRef: ve, onUploadFiles: ye, acceptValue: be, isAtMaxFiles: xe, maxFiles: Se, processFiles: Ce, handleFileSelect: we, handleRemoveFile: Te, transientError: Ee, showTransientError: De } = In(h), Oe = Mn({
725
726
  searchPersons: C,
726
727
  mentionSources: w
727
728
  });
728
- W(() => {
729
- I || typeof window < "u" && window.location.hash.length === 0 && z.current?.focus();
730
- }, []), W(() => {
731
- if (V) ge(null);
732
- else return ge(() => {
729
+ G(() => {
730
+ F || typeof window < "u" && window.location.hash.length === 0 && z.current?.focus();
731
+ }, []), G(() => {
732
+ if (de) he(null);
733
+ else return he(() => {
733
734
  z.current?.focus();
734
- }), () => ge(null);
735
- }, [V, ge]), W(() => {
735
+ }), () => he(null);
736
+ }, [de, he]), G(() => {
736
737
  if (T) return T((e) => {
737
- we(e);
738
+ Ce(e);
738
739
  }), () => {
739
740
  T(null);
740
741
  };
741
- }, [T, we]);
742
- let Ae = U((e) => void we(e), [we]), je = ve.filter((e) => e.status === "uploaded"), Me = ve.some((e) => e.status === "uploading"), Ne = ve.some((e) => e.status === "error"), Pe = !le.isEmpty || je.length > 0, Fe = async ({ text: t, mentions: n }) => {
743
- if (Ne) return Oe(R.ai.fileUploadBlockedSubmit), !1;
742
+ }, [T, Ce]);
743
+ let ke = W((e) => void Ce(e), [Ce]), Ae = _e.filter((e) => e.status === "uploaded"), je = _e.some((e) => e.status === "uploading"), Me = _e.some((e) => e.status === "error"), Ne = !ce.isEmpty || Ae.length > 0, Pe = async ({ text: t, mentions: n }) => {
744
+ if (Me) return De(L.ai.fileUploadBlockedSubmit), !1;
744
745
  if (a && await a() === !1) return !1;
745
- let r = je, i = r.flatMap((e) => e.uploadedFile ? [e.uploadedFile] : []), o = u, s = f;
746
+ let r = Ae, i = r.flatMap((e) => e.uploadedFile ? [e.uploadedFile] : []), o = u, s = f;
746
747
  o && d?.(null), s && m?.(null);
747
748
  try {
748
749
  await e({
@@ -752,25 +753,25 @@ var Ln = ({ onSubmit: e, onStop: r, inProgress: i, onBeforeSubmit: a, placeholde
752
753
  quote: s
753
754
  });
754
755
  } catch {
755
- return o && (pe.current == null || pe.current === o) && d?.(o), s && (me.current == null || me.current === s) && m?.(s), !1;
756
+ return o && (fe.current == null || fe.current === o) && d?.(o), s && (pe.current == null || pe.current === s) && m?.(s), !1;
756
757
  }
757
- for (let e of r) Ee(e.id);
758
+ for (let e of r) Te(e.id);
758
759
  return !0;
759
- }, Ie = ae ? ae.prompt ?? ae.title : null, Le = Ie ? [Ie] : o ?? [], Re = F === "inside", ze = j && N && N.length > 0 && P ? /* @__PURE__ */ Y(kn, {
760
- suggestions: N,
761
- onItemClick: _e,
762
- onItemHover: oe,
763
- side: Re ? "bottom" : "top",
764
- reserveTwoRows: !Re,
765
- overflow: Re ? "scroll" : "wrap"
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
- fe.current && clearTimeout(fe.current), fe.current = setTimeout(() => {
768
- Ve(document.activeElement) || ce(!1);
760
+ }, Fe = B ? B.prompt ?? B.title : null, Ie = Fe ? [Fe] : o ?? [], Le = P === "inside", Re = A && M && M.length > 0 && N ? /* @__PURE__ */ Y(kn, {
761
+ suggestions: M,
762
+ onItemClick: ge,
763
+ onItemHover: ae,
764
+ side: Le ? "bottom" : "top",
765
+ reserveTwoRows: !Le,
766
+ overflow: Le ? "scroll" : "wrap"
767
+ }) : null, ze = !F || oe || Ne || ce.recorder !== "idle", Be = (e) => e instanceof Node ? ue.current?.contains(e) ? !0 : e instanceof Element && e.closest("[data-radix-popper-content-wrapper]") !== null : !1, Ve = () => {
768
+ H.current && clearTimeout(H.current), H.current = setTimeout(() => {
769
+ Be(document.activeElement) || se(!1);
769
770
  }, 0);
770
- }, Ue = Re, We = Ue && I, Ge = We && !Be, Ke = Ue && ze ? /* @__PURE__ */ Y("div", {
771
+ }, He = Le, Ue = He && F, We = Ue && !ze, Ge = He && Re ? /* @__PURE__ */ Y("div", {
771
772
  onClick: (e) => e.stopPropagation(),
772
- children: ze
773
- }) : void 0, qe = {
773
+ children: Re
774
+ }) : void 0, Ke = {
774
775
  duration: ie ? 0 : .32,
775
776
  ease: [
776
777
  .4,
@@ -778,18 +779,18 @@ var Ln = ({ onSubmit: e, onStop: r, inProgress: i, onBeforeSubmit: a, placeholde
778
779
  .2,
779
780
  1
780
781
  ]
781
- }, Je = j && M && !!L && L.length > 0, Ye = M && j, { motionProps: Xe } = lt(j, 160, .5);
782
+ }, qe = A && j && !!I && I.length > 0, Je = j && A, { motionProps: Ye } = lt(A, 160, .5);
782
783
  return /* @__PURE__ */ X(s.div, {
783
- ref: ne,
784
- "data-composer-layout": Ye ? "welcome" : "docked",
785
- className: y("flex flex-col items-center gap-2", ee === "default" && "px-4 pb-3 pt-2", Ye && "min-h-0 flex-1 justify-start -mt-20"),
786
- ...M ? Xe : {},
784
+ ref: re,
785
+ "data-composer-layout": Je ? "welcome" : "docked",
786
+ className: y("flex flex-col items-center gap-2", te === "default" && "px-4 pb-3 pt-2", Je && "min-h-0 flex-1 justify-start -mt-20"),
787
+ ...j ? Ye : {},
787
788
  children: [
788
789
  /* @__PURE__ */ X("div", {
789
790
  className: "flex w-full max-w-content flex-col gap-2",
790
- children: [ze && !Re ? /* @__PURE__ */ Y("div", { children: I ? /* @__PURE__ */ Y(n, {
791
+ children: [Re && !Le ? /* @__PURE__ */ Y("div", { children: F ? /* @__PURE__ */ Y(n, {
791
792
  initial: !1,
792
- children: Be ? /* @__PURE__ */ Y(s.div, {
793
+ children: ze ? /* @__PURE__ */ Y(s.div, {
793
794
  className: "overflow-hidden",
794
795
  initial: {
795
796
  opacity: 0,
@@ -803,107 +804,107 @@ var Ln = ({ onSubmit: e, onStop: r, inProgress: i, onBeforeSubmit: a, placeholde
803
804
  opacity: 0,
804
805
  height: 0
805
806
  },
806
- transition: qe,
807
- children: ze
807
+ transition: Ke,
808
+ children: Re
808
809
  }, "welcome-suggestions") : null
809
- }) : ze }) : null, /* @__PURE__ */ Y(yn, {
810
+ }) : Re }) : null, /* @__PURE__ */ Y(yn, {
810
811
  creditWarning: c,
811
812
  children: /* @__PURE__ */ Y(D, {
812
813
  asForm: !0,
813
- surfaceRef: de,
814
+ surfaceRef: ue,
814
815
  handleRef: z,
815
816
  className: "isolate z-20 items-stretch p-0 hover:cursor-text",
816
- accent: V,
817
- replacement: V ? l : null,
818
- onSurfaceFocus: () => ce(!0),
819
- onSurfaceBlur: He,
820
- onStateChange: ue,
821
- onSend: Fe,
817
+ accent: de,
818
+ replacement: de ? l : null,
819
+ onSurfaceFocus: () => se(!0),
820
+ onSurfaceBlur: Ve,
821
+ onStateChange: le,
822
+ onSend: Pe,
822
823
  inProgress: i,
823
824
  onStop: r,
824
- hasAttachments: je.length > 0,
825
- sendBlocked: Me,
826
- error: De,
825
+ hasAttachments: Ae.length > 0,
826
+ sendBlocked: je,
827
+ error: Ee,
827
828
  role: "textbox",
828
- name: te,
829
- placeholders: Le,
829
+ name: ne,
830
+ placeholders: Ie,
830
831
  placeholdersPaused: i,
831
832
  labels: {
832
- placeholder: R.ai.inputPlaceholder,
833
- listening: R.ai.listening,
834
- send: R.ai.sendMessage,
835
- stop: R.ai.stopAnswerGeneration,
836
- recordAudio: R.ai.recordAudio,
837
- cancelRecording: R.ai.cancelRecording,
838
- confirmRecording: R.ai.stopRecording,
839
- micPermissionDenied: R.ai.micPermissionDenied,
840
- micError: R.ai.micError,
841
- transcriptionError: R.ai.transcriptionError,
842
- mentionSuggestions: R.ai.mentions.suggestions
833
+ placeholder: L.ai.inputPlaceholder,
834
+ listening: L.ai.listening,
835
+ send: L.ai.sendMessage,
836
+ stop: L.ai.stopAnswerGeneration,
837
+ recordAudio: L.ai.recordAudio,
838
+ cancelRecording: L.ai.cancelRecording,
839
+ confirmRecording: L.ai.stopRecording,
840
+ micPermissionDenied: L.ai.micPermissionDenied,
841
+ micError: L.ai.micError,
842
+ transcriptionError: L.ai.transcriptionError,
843
+ mentionSuggestions: L.ai.mentions.suggestions
843
844
  },
844
845
  mentions: {
845
- sources: ke,
846
- showGroupLabels: ke.length > 1
846
+ sources: Oe,
847
+ showGroupLabels: Oe.length > 1
847
848
  },
848
849
  voice: S ? {
849
850
  onTranscribe: S,
850
- onPress: he?.onDictationStart,
851
- onCancelled: he?.onDictationCancel
851
+ onPress: me?.onDictationStart,
852
+ onCancelled: me?.onDictationCancel
852
853
  } : void 0,
853
- onPasteFiles: h?.onUploadFiles ? Ae : void 0,
854
+ onPasteFiles: h?.onUploadFiles ? ke : void 0,
854
855
  pastePreferText: !0,
855
856
  header: f ? /* @__PURE__ */ Y(bn, {
856
857
  quote: f,
857
858
  onRemove: () => m?.(null)
858
859
  }) : null,
859
860
  tray: /* @__PURE__ */ Y(fn, {
860
- attachedFiles: ve,
861
- isUploading: Me,
862
- onRemove: Ee,
863
- removeLabel: R.ai.removeFile,
861
+ attachedFiles: _e,
862
+ isUploading: je,
863
+ onRemove: Te,
864
+ removeLabel: L.ai.removeFile,
864
865
  reducedMotion: ie
865
866
  }),
866
- leading: Ue ? /* @__PURE__ */ Y("div", {
867
+ leading: He ? /* @__PURE__ */ Y("div", {
867
868
  className: "flex shrink-0 self-center pl-3",
868
- children: /* @__PURE__ */ Y(A, {
869
+ children: /* @__PURE__ */ Y(k, {
869
870
  size: "sm",
870
871
  spin: i
871
872
  })
872
873
  }) : void 0,
873
- toolbarStart: be || _ || b?.length ? (e) => /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(_n, {
874
- onUploadFiles: be,
874
+ toolbarStart: ye || _ || b?.length ? (e) => /* @__PURE__ */ X(Kt, { children: [/* @__PURE__ */ Y(_n, {
875
+ onUploadFiles: ye,
875
876
  composerActions: b,
876
877
  onComposerActionsOpenChange: x,
877
- isAtMaxFiles: Se,
878
- maxFiles: Ce,
879
- acceptValue: xe,
880
- fileInputRef: ye,
881
- handleFileSelect: Te,
878
+ isAtMaxFiles: xe,
879
+ maxFiles: Se,
880
+ acceptValue: be,
881
+ fileInputRef: ve,
882
+ handleFileSelect: we,
882
883
  recordingStatus: e
883
884
  }), _ ? /* @__PURE__ */ Y("div", {
884
885
  className: "min-w-0 cursor-default",
885
886
  onClick: (e) => e.stopPropagation(),
886
887
  children: _
887
888
  }) : null] }) : void 0,
888
- toolbarCenter: Ke,
889
- collapsible: We,
890
- collapsed: Ge,
889
+ toolbarCenter: Ge,
890
+ collapsible: Ue,
891
+ collapsed: We,
891
892
  reducedMotion: ie
892
893
  })
893
894
  })]
894
895
  }),
895
- Je ? /* @__PURE__ */ Y("div", {
896
+ qe ? /* @__PURE__ */ Y("div", {
896
897
  className: "w-full max-w-content pt-2",
897
- children: /* @__PURE__ */ Y(xn, { cards: L })
898
+ children: /* @__PURE__ */ Y(xn, { cards: I })
898
899
  }) : null,
899
- k && j && M ? /* @__PURE__ */ Y("div", {
900
+ ee && A && j ? /* @__PURE__ */ Y("div", {
900
901
  className: "w-full py-4 mx-auto flex max-w-content justify-center",
901
- children: k
902
+ children: ee
902
903
  }) : null,
903
904
  /* @__PURE__ */ Y(n, {
904
905
  mode: "wait",
905
906
  initial: !1,
906
- children: V ? /* @__PURE__ */ X(s.div, {
907
+ children: de ? /* @__PURE__ */ X(s.div, {
907
908
  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
909
  initial: { opacity: 0 },
909
910
  animate: { opacity: 1 },
@@ -919,7 +920,7 @@ var Ln = ({ onSubmit: e, onStop: r, inProgress: i, onBeforeSubmit: a, placeholde
919
920
  children: "↑↓"
920
921
  }),
921
922
  " ",
922
- R.ai.clarifyingQuestion.navHint.navigate
923
+ L.ai.clarifyingQuestion.navHint.navigate
923
924
  ] }),
924
925
  /* @__PURE__ */ X("span", { children: [
925
926
  /* @__PURE__ */ Y("kbd", {
@@ -927,7 +928,7 @@ var Ln = ({ onSubmit: e, onStop: r, inProgress: i, onBeforeSubmit: a, placeholde
927
928
  children: "Enter"
928
929
  }),
929
930
  " ",
930
- R.ai.clarifyingQuestion.navHint.select
931
+ L.ai.clarifyingQuestion.navHint.select
931
932
  ] }),
932
933
  /* @__PURE__ */ X("span", { children: [
933
934
  /* @__PURE__ */ Y("kbd", {
@@ -935,16 +936,16 @@ var Ln = ({ onSubmit: e, onStop: r, inProgress: i, onBeforeSubmit: a, placeholde
935
936
  children: "Esc"
936
937
  }),
937
938
  " ",
938
- R.ai.clarifyingQuestion.navHint.cancel
939
+ L.ai.clarifyingQuestion.navHint.cancel
939
940
  ] })
940
941
  ]
941
- }, "clarifying-nav-hint") : (E?.text || O) && !Ye && /* @__PURE__ */ X(s.div, {
942
+ }, "clarifying-nav-hint") : (E?.text || O) && !Je && /* @__PURE__ */ X(s.div, {
942
943
  className: y("flex w-full max-w-content flex-row items-center gap-1", O ? "justify-between" : "justify-center"),
943
944
  initial: { opacity: 0 },
944
945
  animate: { opacity: 1 },
945
946
  exit: { opacity: 0 },
946
947
  transition: {
947
- duration: re ? 0 : .3,
948
+ duration: R ? 0 : .3,
948
949
  ease: "easeOut"
949
950
  },
950
951
  children: [/* @__PURE__ */ X("div", {
@@ -1011,12 +1012,12 @@ function Hn({ ...e }) {
1011
1012
  //#endregion
1012
1013
  //#region src/addons/ai/ai/F0AiChat/components/markdownRenderers/components/Image.tsx
1013
1014
  function Un({ src: e, alt: t, ...n }) {
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
+ let r = p(), i = ct(), a = we(), s = H(e || void 0), [c, l] = J(!1), [u, d] = J(!1), f = t || (e ? He(e) : "") || "image";
1015
1016
  if (!e || c || s.status === "error") return t ? /* @__PURE__ */ Y("span", {
1016
1017
  className: "text-f1-foreground-secondary",
1017
1018
  children: t
1018
1019
  }) : null;
1019
- let m = s.status === "ready" ? /* @__PURE__ */ Y(qe, {
1020
+ let m = s.status === "ready" ? /* @__PURE__ */ Y(Je, {
1020
1021
  ...n,
1021
1022
  src: s.url,
1022
1023
  alt: t,
@@ -1044,7 +1045,7 @@ function Un({ src: e, alt: t, ...n }) {
1044
1045
  variant: "neutral",
1045
1046
  label: r.chat.download,
1046
1047
  hideLabel: !0,
1047
- icon: k,
1048
+ icon: B,
1048
1049
  onClick: () => a(e, f)
1049
1050
  })
1050
1051
  })]
@@ -1086,11 +1087,11 @@ function qn({ children: e, ...t }) {
1086
1087
  //#endregion
1087
1088
  //#region src/addons/ai/ai/F0AiChat/components/markdownRenderers/entityRef/components/EntityRefHoverCard.tsx
1088
1089
  function Jn({ id: e, trigger: t, resolver: n, mapToCard: r, fallbackCard: i }) {
1089
- let a = K(/* @__PURE__ */ new Map()), [o, s] = q(() => a.current.get(e) ?? null), [c, l] = q(!1), [u, d] = q(!1), f = K(!0);
1090
- W(() => () => {
1090
+ let a = q(/* @__PURE__ */ new Map()), [o, s] = J(() => a.current.get(e) ?? null), [c, l] = J(!1), [u, d] = J(!1), f = q(!0);
1091
+ G(() => () => {
1091
1092
  f.current = !1;
1092
1093
  }, []);
1093
- let p = U(() => {
1094
+ let p = W(() => {
1094
1095
  if (o || c) return;
1095
1096
  let t = a.current.get(e);
1096
1097
  t ? s(t) : (l(!0), d(!1), n(e).then((t) => {
@@ -1106,16 +1107,16 @@ function Jn({ id: e, trigger: t, resolver: n, mapToCard: r, fallbackCard: i }) {
1106
1107
  o,
1107
1108
  c
1108
1109
  ]), m = u || !o ? i : r(o);
1109
- return /* @__PURE__ */ X(Pt, {
1110
+ return /* @__PURE__ */ X(Nt, {
1110
1111
  openDelay: 300,
1111
1112
  closeDelay: 100,
1112
1113
  onOpenChange: (e) => {
1113
1114
  e && p();
1114
1115
  },
1115
- children: [/* @__PURE__ */ Y(At, {
1116
+ children: [/* @__PURE__ */ Y(kt, {
1116
1117
  asChild: !0,
1117
1118
  children: t
1118
- }), /* @__PURE__ */ Y(Nt, {
1119
+ }), /* @__PURE__ */ Y(Mt, {
1119
1120
  side: "top",
1120
1121
  align: "start",
1121
1122
  className: "w-64 rounded-2xl border-none p-0 shadow-md",
@@ -1125,7 +1126,7 @@ function Jn({ id: e, trigger: t, resolver: n, mapToCard: r, fallbackCard: i }) {
1125
1126
  }
1126
1127
  //#endregion
1127
1128
  //#region src/addons/ai/ai/F0AiChat/components/markdownRenderers/entityRef/components/MentionTrigger.tsx
1128
- var Yn = H(({ label: e, ...t }, n) => /* @__PURE__ */ X("button", {
1129
+ var Yn = U(({ label: e, ...t }, n) => /* @__PURE__ */ X("button", {
1129
1130
  ref: n,
1130
1131
  type: "button",
1131
1132
  className: y("cursor-pointer font-medium text-f1-foreground-secondary hover:text-f1-foreground", b()),
@@ -1136,7 +1137,7 @@ Yn.displayName = "MentionTrigger";
1136
1137
  //#endregion
1137
1138
  //#region src/addons/ai/ai/F0AiChat/components/markdownRenderers/entityRef/entities/custom/CustomEntityRef.tsx
1138
1139
  function Xn({ id: e, label: t, config: n }) {
1139
- let r = p(), { resolve: i, avatar: a, url: o } = n, s = o?.(e), c = U((e) => ({
1140
+ let r = p(), { resolve: i, avatar: a, url: o } = n, s = o?.(e), c = W((e) => ({
1140
1141
  ...e,
1141
1142
  avatar: e.avatar ?? a,
1142
1143
  ...s && { secondaryActions: {
@@ -1147,7 +1148,7 @@ function Xn({ id: e, label: t, config: n }) {
1147
1148
  a,
1148
1149
  s,
1149
1150
  r
1150
- ]), l = G(() => c({ title: t }), [c, t]), u = U((e) => i ? i(e) : Promise.resolve({ title: t }), [i, t]);
1151
+ ]), l = K(() => c({ title: t }), [c, t]), u = W((e) => i ? i(e) : Promise.resolve({ title: t }), [i, t]);
1151
1152
  return /* @__PURE__ */ Y(Jn, {
1152
1153
  id: e,
1153
1154
  trigger: /* @__PURE__ */ Y(Yn, { label: t }),
@@ -1158,7 +1159,7 @@ function Xn({ id: e, label: t, config: n }) {
1158
1159
  }
1159
1160
  //#endregion
1160
1161
  //#region src/addons/ai/ai/F0AiChat/components/markdownRenderers/entityRef/entities/candidate/CandidateEntityRef.tsx
1161
- var Zn = H(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1162
+ var Zn = U(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1162
1163
  ref: n,
1163
1164
  type: "button",
1164
1165
  className: y("cursor-pointer font-medium text-f1-foreground-secondary hover:text-f1-foreground", b()),
@@ -1167,7 +1168,7 @@ var Zn = H(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1167
1168
  }));
1168
1169
  Zn.displayName = "CandidateTrigger";
1169
1170
  function Qn({ id: e, label: t }) {
1170
- let { entityRefs: n } = B(), r = n?.resolvers?.candidate, i = p(), a = n?.urls?.candidate?.(e), o = G(() => (e) => {
1171
+ let { entityRefs: n } = V(), r = n?.resolvers?.candidate, i = p(), a = n?.urls?.candidate?.(e), o = K(() => (e) => {
1171
1172
  let t = [];
1172
1173
  return e.source && t.push({
1173
1174
  title: i.t("ai.entityRef.candidate.source"),
@@ -1201,7 +1202,7 @@ function Qn({ id: e, label: t }) {
1201
1202
  href: a
1202
1203
  } }
1203
1204
  };
1204
- }, [i, a]), s = G(() => ({
1205
+ }, [i, a]), s = K(() => ({
1205
1206
  title: t,
1206
1207
  ...a && { secondaryActions: {
1207
1208
  label: i.t("ai.view"),
@@ -1222,7 +1223,7 @@ function Qn({ id: e, label: t }) {
1222
1223
  }
1223
1224
  //#endregion
1224
1225
  //#region src/addons/ai/ai/F0AiChat/components/markdownRenderers/entityRef/entities/expense/ExpenseEntityRef.tsx
1225
- var $n = H(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1226
+ var $n = U(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1226
1227
  ref: n,
1227
1228
  type: "button",
1228
1229
  className: y("cursor-pointer font-medium text-f1-foreground-secondary hover:text-f1-foreground", b()),
@@ -1231,10 +1232,10 @@ var $n = H(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1231
1232
  }));
1232
1233
  $n.displayName = "ExpenseTrigger";
1233
1234
  function er({ id: e, label: t }) {
1234
- let { entityRefs: n } = B(), r = n?.resolvers?.expense, i = p(), a = n?.urls?.expense?.(e), o = G(() => (e) => ({
1235
+ let { entityRefs: n } = V(), r = n?.resolvers?.expense, i = p(), a = n?.urls?.expense?.(e), o = K(() => (e) => ({
1235
1236
  avatar: {
1236
1237
  type: "icon",
1237
- icon: ut
1238
+ icon: O
1238
1239
  },
1239
1240
  title: e.description || `Expense #${e.id}`,
1240
1241
  description: [e.amount, e.status].filter(Boolean).join(" · "),
@@ -1242,7 +1243,7 @@ function er({ id: e, label: t }) {
1242
1243
  label: i.t("ai.view"),
1243
1244
  href: a
1244
1245
  } }
1245
- }), [i, a]), s = G(() => ({
1246
+ }), [i, a]), s = K(() => ({
1246
1247
  title: t,
1247
1248
  ...a && { secondaryActions: {
1248
1249
  label: i.t("ai.view"),
@@ -1263,7 +1264,7 @@ function er({ id: e, label: t }) {
1263
1264
  }
1264
1265
  //#endregion
1265
1266
  //#region src/addons/ai/ai/F0AiChat/components/markdownRenderers/entityRef/entities/jobPosting/JobPostingEntityRef.tsx
1266
- var tr = H(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1267
+ var tr = U(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1267
1268
  ref: n,
1268
1269
  type: "button",
1269
1270
  className: y("cursor-pointer font-medium text-f1-foreground-secondary hover:text-f1-foreground", b()),
@@ -1272,14 +1273,14 @@ var tr = H(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1272
1273
  }));
1273
1274
  tr.displayName = "JobPostingTrigger";
1274
1275
  function nr({ id: e, label: t }) {
1275
- let { entityRefs: n } = B(), r = n?.resolvers?.jobPosting, i = p(), a = n?.urls?.jobPosting?.(e), o = G(() => (e) => ({
1276
+ let { entityRefs: n } = V(), r = n?.resolvers?.jobPosting, i = p(), a = n?.urls?.jobPosting?.(e), o = K(() => (e) => ({
1276
1277
  title: e.title,
1277
1278
  description: [e.status, e.location].filter(Boolean).join(" · "),
1278
1279
  ...a && { secondaryActions: {
1279
1280
  label: i.t("ai.view"),
1280
1281
  href: a
1281
1282
  } }
1282
- }), [i, a]), s = G(() => ({
1283
+ }), [i, a]), s = K(() => ({
1283
1284
  title: t,
1284
1285
  ...a && { secondaryActions: {
1285
1286
  label: i.t("ai.view"),
@@ -1301,7 +1302,7 @@ function nr({ id: e, label: t }) {
1301
1302
  //#endregion
1302
1303
  //#region src/addons/ai/ai/F0AiChat/components/markdownRenderers/entityRef/entities/person/PersonEntityRef.tsx
1303
1304
  function rr({ id: e, label: t }) {
1304
- let { entityRefs: n } = B(), r = n?.resolvers?.person, i = p(), a = n?.urls?.person?.(e), o = G(() => (e) => ({
1305
+ let { entityRefs: n } = V(), r = n?.resolvers?.person, i = p(), a = n?.urls?.person?.(e), o = K(() => (e) => ({
1305
1306
  avatar: {
1306
1307
  type: "person",
1307
1308
  firstName: e.firstName,
@@ -1314,7 +1315,7 @@ function rr({ id: e, label: t }) {
1314
1315
  label: i.t("ai.view"),
1315
1316
  href: a
1316
1317
  } }
1317
- }), [i, a]), s = G(() => ({
1318
+ }), [i, a]), s = K(() => ({
1318
1319
  title: t,
1319
1320
  ...a && { secondaryActions: {
1320
1321
  label: i.t("ai.view"),
@@ -1352,7 +1353,7 @@ function ir({ rows: e }) {
1352
1353
  }
1353
1354
  //#endregion
1354
1355
  //#region src/addons/ai/ai/F0AiChat/components/markdownRenderers/entityRef/entities/requisition/RequisitionEntityRef.tsx
1355
- var ar = H(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1356
+ var ar = U(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1356
1357
  ref: n,
1357
1358
  type: "button",
1358
1359
  className: y("cursor-pointer font-medium text-f1-foreground-secondary hover:text-f1-foreground", b()),
@@ -1361,13 +1362,13 @@ var ar = H(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1361
1362
  }));
1362
1363
  ar.displayName = "RequisitionTrigger";
1363
1364
  function or({ id: e, label: t }) {
1364
- let { entityRefs: n } = B(), r = n?.resolvers?.requisition, i = p(), a = n?.urls?.requisition?.(e), o = G(() => (e) => {
1365
+ let { entityRefs: n } = V(), r = n?.resolvers?.requisition, i = p(), a = n?.urls?.requisition?.(e), o = K(() => (e) => {
1365
1366
  let t = e.lineManager ? `${e.lineManager.firstName} ${e.lineManager.lastName}` : void 0, n = [
1366
1367
  e.status ? {
1367
1368
  label: i.t("ai.entityRef.requisition.status"),
1368
1369
  value: /* @__PURE__ */ Y("div", {
1369
1370
  className: "flex items-center pt-1",
1370
- children: /* @__PURE__ */ Y(St, {
1371
+ children: /* @__PURE__ */ Y(xt, {
1371
1372
  text: e.status,
1372
1373
  variant: e.statusVariant ?? "neutral"
1373
1374
  })
@@ -1377,7 +1378,7 @@ function or({ id: e, label: t }) {
1377
1378
  label: i.t("ai.entityRef.requisition.lineManager"),
1378
1379
  value: /* @__PURE__ */ X("div", {
1379
1380
  className: "flex items-center gap-1.5 pt-1",
1380
- children: [/* @__PURE__ */ Y(xt, {
1381
+ children: [/* @__PURE__ */ Y(ht, {
1381
1382
  firstName: e.lineManager.firstName,
1382
1383
  lastName: e.lineManager.lastName,
1383
1384
  src: e.lineManager.avatarUrl,
@@ -1399,7 +1400,7 @@ function or({ id: e, label: t }) {
1399
1400
  href: a
1400
1401
  } }
1401
1402
  };
1402
- }, [i, a]), s = G(() => ({
1403
+ }, [i, a]), s = K(() => ({
1403
1404
  title: t,
1404
1405
  ...a && { secondaryActions: {
1405
1406
  label: i.t("ai.view"),
@@ -1420,7 +1421,7 @@ function or({ id: e, label: t }) {
1420
1421
  }
1421
1422
  //#endregion
1422
1423
  //#region src/addons/ai/ai/F0AiChat/components/markdownRenderers/entityRef/entities/vacancy/VacancyEntityRef.tsx
1423
- var sr = H(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1424
+ var sr = U(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1424
1425
  ref: n,
1425
1426
  type: "button",
1426
1427
  className: y("cursor-pointer font-medium text-f1-foreground-secondary hover:text-f1-foreground", b()),
@@ -1429,14 +1430,14 @@ var sr = H(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1429
1430
  }));
1430
1431
  sr.displayName = "VacancyTrigger";
1431
1432
  function cr({ id: e, label: t }) {
1432
- let { entityRefs: n } = B(), r = n?.resolvers?.vacancy, i = p(), a = n?.urls?.vacancy?.(e), o = G(() => (e) => ({
1433
+ let { entityRefs: n } = V(), r = n?.resolvers?.vacancy, i = p(), a = n?.urls?.vacancy?.(e), o = K(() => (e) => ({
1433
1434
  title: e.name,
1434
1435
  description: [e.status, e.vacancyType].filter(Boolean).join(" · "),
1435
1436
  ...a && { secondaryActions: {
1436
1437
  label: i.t("ai.view"),
1437
1438
  href: a
1438
1439
  } }
1439
- }), [i, a]), s = G(() => ({
1440
+ }), [i, a]), s = K(() => ({
1440
1441
  title: t,
1441
1442
  ...a && { secondaryActions: {
1442
1443
  label: i.t("ai.view"),
@@ -1477,7 +1478,7 @@ function fr(e) {
1477
1478
  return typeof e == "string" ? e : typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(fr).join("") : e && typeof e == "object" && "props" in e ? fr(e.props.children) : "";
1478
1479
  }
1479
1480
  function pr({ type: e, id: t, children: n }) {
1480
- let { entityRefs: r } = B();
1481
+ let { entityRefs: r } = V();
1481
1482
  if (!t || !e) return /* @__PURE__ */ Y("span", { children: n });
1482
1483
  let i = fr(n), a = ur(e);
1483
1484
  if (a) return /* @__PURE__ */ Y(a, {
@@ -1494,14 +1495,14 @@ function pr({ type: e, id: t, children: n }) {
1494
1495
  //#endregion
1495
1496
  //#region src/addons/ai/ai/F0AiChat/components/markdownRenderers/components/Table.tsx
1496
1497
  async function mr(e, t, n) {
1497
- let r = O(e), i = t === "xlsx" ? await it([{
1498
+ let r = ee(e), i = t === "xlsx" ? await rt([{
1498
1499
  name: "Data",
1499
1500
  rows: r
1500
- }]) : await at(r);
1501
- ce(i, `${n}.${t}`);
1501
+ }]) : await it(r);
1502
+ le(i, `${n}.${t}`);
1502
1503
  }
1503
1504
  function hr({ children: e, title: t, ...n }) {
1504
- let r = p(), i = K(null), a = U((e) => {
1505
+ let r = p(), i = q(null), a = W((e) => {
1505
1506
  if (!i.current) return;
1506
1507
  let n = t?.replace(/\s+/g, "_").toLowerCase() || "table";
1507
1508
  mr(i.current, e, n);
@@ -1514,16 +1515,16 @@ function hr({ children: e, title: t, ...n }) {
1514
1515
  tag: "h2",
1515
1516
  className: "text-base font-medium capitalize text-f1-foreground",
1516
1517
  children: t ?? r.ai.reportCard.tableLabel
1517
- }), /* @__PURE__ */ Y(ye, {
1518
- icon: k,
1518
+ }), /* @__PURE__ */ Y(be, {
1519
+ icon: B,
1519
1520
  size: "md",
1520
1521
  items: [{
1521
1522
  label: r.t("ai.dataDownload.download", { format: "Excel" }),
1522
- icon: k,
1523
+ icon: B,
1523
1524
  onClick: () => a("xlsx")
1524
1525
  }, {
1525
1526
  label: r.t("ai.dataDownload.download", { format: "CSV" }),
1526
- icon: k,
1527
+ icon: B,
1527
1528
  onClick: () => a("csv")
1528
1529
  }]
1529
1530
  })]
@@ -1669,13 +1670,13 @@ var wr = {
1669
1670
  mimeType: e.mimeType,
1670
1671
  size: e.bytes,
1671
1672
  previewUrl: e.preview && t ? t(e.preview.path) : void 0
1672
- }), Fr = (e) => xe(e) ?? "", Ir = ({ avatar: e }) => e?.type === "module" ? /* @__PURE__ */ Y(mt, {
1673
+ }), Fr = (e) => Ce(e) ?? "", Ir = ({ avatar: e }) => e?.type === "module" ? /* @__PURE__ */ Y(pt, {
1673
1674
  module: e.module,
1674
1675
  size: "md"
1675
- }) : e?.type === "file" ? /* @__PURE__ */ Y(yt, {
1676
+ }) : e?.type === "file" ? /* @__PURE__ */ Y(ft, {
1676
1677
  file: e.file,
1677
1678
  size: "lg"
1678
- }) : e?.type === "icon" ? /* @__PURE__ */ Y(ht, {
1679
+ }) : e?.type === "icon" ? /* @__PURE__ */ Y(dt, {
1679
1680
  icon: e.icon,
1680
1681
  size: "md"
1681
1682
  }) : null, Lr = ({ action: e, isActive: t }) => {
@@ -1724,12 +1725,12 @@ function Rr({ avatar: e, title: t, description: n, isActive: r = !1, action: i,
1724
1725
  Rr.displayName = "F0CanvasCard";
1725
1726
  //#endregion
1726
1727
  //#region src/addons/ai/ai/F0AiChat/providers/FormCardValueFormatterProvider.tsx
1727
- var zr = Bt(null);
1728
+ var zr = zt(null);
1728
1729
  function Br({ children: e }) {
1729
- let [t, n] = q(0), r = K([]), i = U((e) => {
1730
+ let [t, n] = J(0), r = q([]), i = W((e) => {
1730
1731
  let t = r.current, i = t.findIndex((t) => t.formName === e.formName && t.customFieldName === e.customFieldName), a = e;
1731
1732
  i >= 0 ? t[i] = a : t.push(a), n((e) => e + 1);
1732
- }, []), a = G(() => ({
1733
+ }, []), a = K(() => ({
1733
1734
  formatters: [...r.current],
1734
1735
  setFormCardValueFormatter: i
1735
1736
  }), [i, t]);
@@ -1739,8 +1740,8 @@ function Br({ children: e }) {
1739
1740
  });
1740
1741
  }
1741
1742
  function Vr(e) {
1742
- let t = Ut(zr)?.formatters;
1743
- return G(() => !t || t.length === 0 ? null : (n, r, i) => {
1743
+ let t = Ht(zr)?.formatters;
1744
+ return K(() => !t || t.length === 0 ? null : (n, r, i) => {
1744
1745
  let a, o = -1;
1745
1746
  for (let n of t) {
1746
1747
  let t = n.formName === void 0 || n.formName === e, r = n.customFieldName === void 0 || n.customFieldName === i.customFieldName;
@@ -1755,7 +1756,7 @@ function Vr(e) {
1755
1756
  }, [t, e]);
1756
1757
  }
1757
1758
  function Hr() {
1758
- let e = Ut(zr);
1759
+ let e = Ht(zr);
1759
1760
  if (!e) throw Error("useSetFormCardValueFormatter must be used within a FormCardValueFormatterProvider");
1760
1761
  return e.setFormCardValueFormatter;
1761
1762
  }
@@ -1844,7 +1845,7 @@ function Qr(e, t) {
1844
1845
  };
1845
1846
  }
1846
1847
  function $r({ formName: e, formDescription: t, module: n, cardTitle: r, cardDescription: i, fieldDescriptions: a, formValues: o, valueFormatter: s }) {
1847
- let { canvasContent: c, openCanvas: l, closeCanvas: u } = B(), d = Vr(e), f = s ?? d, p = K(() => {}), m = r ?? e, h = i ?? t ?? "", g = c?.type === "form" && c.formName === e, _ = () => l({
1848
+ let { canvasContent: c, openCanvas: l, closeCanvas: u } = V(), d = Vr(e), f = s ?? d, p = q(() => {}), m = r ?? e, h = i ?? t ?? "", g = c?.type === "form" && c.formName === e, _ = () => l({
1848
1849
  type: "form",
1849
1850
  title: m,
1850
1851
  description: h,
@@ -1852,7 +1853,7 @@ function $r({ formName: e, formDescription: t, module: n, cardTitle: r, cardDesc
1852
1853
  formDescription: t,
1853
1854
  formModule: n
1854
1855
  });
1855
- p.current = _, W(() => {
1856
+ p.current = _, G(() => {
1856
1857
  typeof window < "u" && (window.innerWidth < Wr || Gr.has(e) || (Gr.add(e), p.current()));
1857
1858
  }, [e]);
1858
1859
  let v = a && o ? Object.entries(a).map(([e, t]) => {
@@ -1888,7 +1889,7 @@ function $r({ formName: e, formDescription: t, module: n, cardTitle: r, cardDesc
1888
1889
  },
1889
1890
  children: y.length > 0 && !g ? /* @__PURE__ */ Y("div", {
1890
1891
  className: "-mx-3 flex w-full flex-col overflow-hidden pb-1",
1891
- children: /* @__PURE__ */ Y(Me, {
1892
+ children: /* @__PURE__ */ Y(Ne, {
1892
1893
  details: y.map((e) => ({
1893
1894
  title: e.label,
1894
1895
  content: e.content,
@@ -1905,7 +1906,7 @@ $r.displayName = "FormCard";
1905
1906
  //#endregion
1906
1907
  //#region src/addons/ai/ai/F0AiMessagesContainer/components/ActiveFormCard.tsx
1907
1908
  function ei() {
1908
- let e = te(), t = e?.activeForm;
1909
+ let e = ne(), t = e?.activeForm;
1909
1910
  if (!t) return null;
1910
1911
  let n = t.cardTitle, r = t.cardDescription, i = (e?.getFillVersion(t.formName) ?? 0) > 0;
1911
1912
  return !n || !r || !i ? null : /* @__PURE__ */ Y("div", {
@@ -1925,9 +1926,9 @@ function ei() {
1925
1926
  //#region src/addons/ai/ai/F0AiFileAttachments/F0AiFileAttachments.tsx
1926
1927
  var ti = "rounded-xl", ni = "ai-chat", ri = (e) => {
1927
1928
  let { provided: t } = $e();
1928
- return t ? /* @__PURE__ */ Y(ii, { ...e }) : /* @__PURE__ */ Y(Oe, { children: /* @__PURE__ */ Y(ii, { ...e }) });
1929
+ return t ? /* @__PURE__ */ Y(ii, { ...e }) : /* @__PURE__ */ Y(Ae, { children: /* @__PURE__ */ Y(ii, { ...e }) });
1929
1930
  }, ii = ({ files: e, align: t = "start", onOpenFile: n, onFileDownloaded: r, size: i = "default" }) => {
1930
- let { remotePreviews: a } = $e(), { openImagePreview: o } = rt(), [s, c] = q(() => /* @__PURE__ */ new Set()), l = G(() => ai(e, a, s), [
1931
+ let { remotePreviews: a } = $e(), { openImagePreview: o } = nt(), [s, c] = J(() => /* @__PURE__ */ new Set()), l = K(() => ai(e, a, s), [
1931
1932
  e,
1932
1933
  a,
1933
1934
  s
@@ -1940,13 +1941,13 @@ var ti = "rounded-xl", ni = "ai-chat", ri = (e) => {
1940
1941
  onOpenFile: n,
1941
1942
  onFileDownloaded: r,
1942
1943
  openImage: (e, t) => {
1943
- n?.(e, "image") !== !1 && o(l.images.map(Be), t);
1944
+ n?.(e, "image") !== !1 && o(l.images.map(ze), t);
1944
1945
  },
1945
1946
  onImageError: (e) => c((t) => new Set(t).add(e.url))
1946
1947
  };
1947
1948
  return Y(i === "compact" ? ci : si, { ...u });
1948
1949
  }, ai = (e, t, n) => {
1949
- let r = (e) => t || de(e.url), i = Te(e.filter(r)), a = /* @__PURE__ */ new Set([
1950
+ let r = (e) => t || de(e.url), i = Ee(e.filter(r)), a = /* @__PURE__ */ new Set([
1950
1951
  ...e.filter((e) => !r(e)),
1951
1952
  ...i.images.filter((e) => n.has(e.url)),
1952
1953
  ...i.files
@@ -1973,7 +1974,7 @@ var ti = "rounded-xl", ni = "ai-chat", ri = (e) => {
1973
1974
  },
1974
1975
  onImageError: o
1975
1976
  }) : null,
1976
- t.map((e, t) => /* @__PURE__ */ Y(ze, {
1977
+ t.map((e, t) => /* @__PURE__ */ Y(Le, {
1977
1978
  file: tt(e),
1978
1979
  cornerClass: "rounded-xl",
1979
1980
  testIdPrefix: ni,
@@ -2027,7 +2028,7 @@ var ti = "rounded-xl", ni = "ai-chat", ri = (e) => {
2027
2028
  })]
2028
2029
  });
2029
2030
  }, li = ({ files: e, align: t, onFileDownloaded: n }) => {
2030
- let r = Ce();
2031
+ let r = we();
2031
2032
  return e.length === 0 ? null : /* @__PURE__ */ Y("div", {
2032
2033
  className: y("flex max-w-full flex-wrap gap-1.5", t === "end" ? "justify-end" : "justify-start"),
2033
2034
  children: e.map((e, t) => /* @__PURE__ */ Y(di, {
@@ -2038,15 +2039,15 @@ var ti = "rounded-xl", ni = "ai-chat", ri = (e) => {
2038
2039
  }, `${e.name}-${t}`))
2039
2040
  });
2040
2041
  }, ui = ({ file: e, onOpen: t, onError: n }) => {
2041
- let r = p(), i = le(e.thumbnailUrl ?? e.url);
2042
- return st(i.status, n), /* @__PURE__ */ Y("button", {
2042
+ let r = p(), i = H(e.thumbnailUrl ?? e.url);
2043
+ return ot(i.status, n), /* @__PURE__ */ Y("button", {
2043
2044
  type: "button",
2044
2045
  onClick: t,
2045
2046
  draggable: !1,
2046
2047
  "aria-label": r.t("chat.openNamedDocument", { name: e.name }),
2047
2048
  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
2049
  "data-testid": "ai-chat-image-attachment",
2049
- children: i.status === "ready" ? /* @__PURE__ */ Y(qe, {
2050
+ children: i.status === "ready" ? /* @__PURE__ */ Y(Je, {
2050
2051
  src: i.url,
2051
2052
  alt: e.name,
2052
2053
  draggable: !1,
@@ -2056,7 +2057,7 @@ var ti = "rounded-xl", ni = "ai-chat", ri = (e) => {
2056
2057
  });
2057
2058
  }, di = ({ file: e, onDownload: t }) => {
2058
2059
  let n = p();
2059
- return /* @__PURE__ */ Y(Re, {
2060
+ return /* @__PURE__ */ Y(Ie, {
2060
2061
  file: {
2061
2062
  name: e.name,
2062
2063
  type: Fr(e)
@@ -2064,22 +2065,22 @@ var ti = "rounded-xl", ni = "ai-chat", ri = (e) => {
2064
2065
  size: "lg",
2065
2066
  actions: [{
2066
2067
  label: n.t("chat.downloadNamedFile", { name: e.name }),
2067
- icon: k,
2068
+ icon: B,
2068
2069
  onClick: t
2069
2070
  }]
2070
2071
  });
2071
2072
  }, fi = ({ images: e, onOpen: t, onImageError: n }) => {
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
+ let r = p(), i = e.length === 1 ? e[0] : void 0, a = H(i ? i.thumbnailUrl ?? i.url : void 0), o = Ue(i && a.status === "ready" ? a.url : void 0, i) ?? void 0, s = i ? Se(o?.width, o?.height) : null;
2073
2074
  return /* @__PURE__ */ Y("div", {
2074
2075
  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, et, ti),
2076
+ className: y("grid grid-cols-2 overflow-hidden border border-solid border-f1-border-secondary", s ? "max-w-full" : Be, et, ti),
2076
2077
  "data-testid": "ai-chat-image-album",
2077
2078
  children: Fe(o ? [o] : e).map((i, a, o) => {
2078
2079
  let s = e[i.index];
2079
2080
  if (!s) return null;
2080
2081
  let c = a === o.length - 1;
2081
2082
  return /* @__PURE__ */ Y(Pe, {
2082
- image: Be(s),
2083
+ image: ze(s),
2083
2084
  aspectRatio: i.aspectRatio,
2084
2085
  spanFull: i.span === 2,
2085
2086
  inset: i.inset,
@@ -2095,7 +2096,7 @@ var ti = "rounded-xl", ni = "ai-chat", ri = (e) => {
2095
2096
  testIdPrefix: ni,
2096
2097
  overlay: i.hiddenCount > 0 ? /* @__PURE__ */ Y("span", {
2097
2098
  "aria-hidden": !0,
2098
- className: y("absolute inset-0 flex items-center justify-center text-2xl font-semibold text-f1-foreground-inverse", Ee),
2099
+ className: y("absolute inset-0 flex items-center justify-center text-2xl font-semibold text-f1-foreground-inverse", De),
2099
2100
  "data-testid": "ai-chat-image-album-more",
2100
2101
  children: `+${i.hiddenCount}`
2101
2102
  }) : void 0
@@ -2118,8 +2119,8 @@ function hi(e, t) {
2118
2119
  };
2119
2120
  }
2120
2121
  function gi({ containerRef: e, enabled: t = !0 }) {
2121
- let [n, r] = q(null), i = U(() => r(null), []);
2122
- return W(() => {
2122
+ let [n, r] = J(null), i = W(() => r(null), []);
2123
+ return G(() => {
2123
2124
  if (!t || typeof window > "u") return;
2124
2125
  let n = e.current;
2125
2126
  if (!n) return;
@@ -2144,8 +2145,8 @@ function gi({ containerRef: e, enabled: t = !0 }) {
2144
2145
  //#region src/addons/ai/ai/F0AiMessagesContainer/components/ReplyPopover.tsx
2145
2146
  var _i = 8, vi = 8;
2146
2147
  function yi({ anchor: e, onReply: t }) {
2147
- let n = p(), r = K(null), [i, a] = q(null);
2148
- if (Kt(() => {
2148
+ let n = p(), r = q(null), [i, a] = J(null);
2149
+ if (Gt(() => {
2149
2150
  if (!e) {
2150
2151
  a(null);
2151
2152
  return;
@@ -2174,7 +2175,7 @@ function yi({ anchor: e, onReply: t }) {
2174
2175
  type: "button",
2175
2176
  variant: "ghost",
2176
2177
  label: o,
2177
- icon: nt,
2178
+ icon: st,
2178
2179
  onClick: () => {
2179
2180
  t(e.text);
2180
2181
  }
@@ -2183,15 +2184,15 @@ function yi({ anchor: e, onReply: t }) {
2183
2184
  }
2184
2185
  //#endregion
2185
2186
  //#region src/addons/ai/ai/F0AiMessagesContainer/components/AssistantMessage.tsx
2186
- var bi = Bt(void 0), xi = () => Ut(bi), Si = (e) => /* @__PURE__ */ Y(Ke, {
2187
+ var bi = zt(void 0), xi = () => Ht(bi), Si = (e) => /* @__PURE__ */ Y(qe, {
2187
2188
  content: e,
2188
2189
  format: "markdown"
2189
2190
  }), Ci = ({ isGenerating: e, isLoading: t, message: n, renderToolCall: r, onReplyQuote: i, onRendered: a, renderMarkdown: o }) => {
2190
- let s = n?.content, c = Nr(s, "assistant") ?? "", l = G(() => Mr({ content: s }), [s]), u = (n && r?.(n)) ?? n?.generativeUI?.() ?? null, d = n?.toolCalls?.[0]?.id, f = !c && !u && l.length === 0, p = K(null), { anchor: m, clear: h } = gi({
2191
+ let s = n?.content, c = Nr(s, "assistant") ?? "", l = K(() => Mr({ content: s }), [s]), u = (n && r?.(n)) ?? n?.generativeUI?.() ?? null, d = n?.toolCalls?.[0]?.id, f = !c && !u && l.length === 0, p = q(null), { anchor: m, clear: h } = gi({
2191
2192
  containerRef: p,
2192
2193
  enabled: !!(n?.id && c)
2193
2194
  });
2194
- return W(() => {
2195
+ return G(() => {
2195
2196
  n?.id && !t && !e && a?.(n);
2196
2197
  }, [
2197
2198
  n,
@@ -2229,7 +2230,7 @@ var bi = Bt(void 0), xi = () => Ut(bi), Si = (e) => /* @__PURE__ */ Y(Ke, {
2229
2230
  })
2230
2231
  });
2231
2232
  }, wi = ({ onClose: e, onSubmit: t, reactionType: n, message: r }) => {
2232
- let [i, a] = q(""), o = p(), { title: s, label: c, placeholder: l } = n === "like" ? o.ai.feedbackModal.positive : o.ai.feedbackModal.negative, u = U(() => {
2233
+ let [i, a] = J(""), o = p(), { title: s, label: c, placeholder: l } = n === "like" ? o.ai.feedbackModal.positive : o.ai.feedbackModal.negative, u = W(() => {
2233
2234
  t(r, i);
2234
2235
  }, [
2235
2236
  i,
@@ -2238,14 +2239,14 @@ var bi = Bt(void 0), xi = () => Ut(bi), Si = (e) => /* @__PURE__ */ Y(Ke, {
2238
2239
  ]), d = () => {
2239
2240
  e(r);
2240
2241
  };
2241
- return W(() => {
2242
+ return G(() => {
2242
2243
  let e = (e) => {
2243
2244
  e.key === "Enter" && (e.preventDefault(), u());
2244
2245
  };
2245
2246
  return document.addEventListener("keydown", e), () => {
2246
2247
  document.removeEventListener("keydown", e);
2247
2248
  };
2248
- }, [u]), /* @__PURE__ */ Y(Xe, {
2249
+ }, [u]), /* @__PURE__ */ Y(Ze, {
2249
2250
  position: "center",
2250
2251
  isOpen: !0,
2251
2252
  onClose: d,
@@ -2262,7 +2263,7 @@ var bi = Bt(void 0), xi = () => Ut(bi), Si = (e) => /* @__PURE__ */ Y(Ke, {
2262
2263
  },
2263
2264
  children: /* @__PURE__ */ Y("div", {
2264
2265
  className: "flex flex-col gap-6",
2265
- children: /* @__PURE__ */ Y(Je, {
2266
+ children: /* @__PURE__ */ Y(Ye, {
2266
2267
  autoFocus: !0,
2267
2268
  label: c,
2268
2269
  placeholder: l,
@@ -2273,8 +2274,8 @@ var bi = Bt(void 0), xi = () => Ut(bi), Si = (e) => /* @__PURE__ */ Y(Ke, {
2273
2274
  })
2274
2275
  })
2275
2276
  });
2276
- }, Ti = Bt(null), Ei = ({ children: e }) => {
2277
- let [t, n] = q(null), r = t ? {
2277
+ }, Ti = zt(null), Ei = ({ children: e }) => {
2278
+ let [t, n] = J(null), r = t ? {
2278
2279
  isOpen: !0,
2279
2280
  currentReaction: t.action,
2280
2281
  currentMessage: t.message,
@@ -2298,7 +2299,7 @@ var bi = Bt(void 0), xi = () => Ut(bi), Si = (e) => /* @__PURE__ */ Y(Ke, {
2298
2299
  children: e
2299
2300
  });
2300
2301
  }, Di = () => {
2301
- let e = Ut(Ti);
2302
+ let e = Ht(Ti);
2302
2303
  if (e === null) throw Error("useFeedbackModal must be used within a FeedbackModalProvider");
2303
2304
  return e;
2304
2305
  };
@@ -2323,11 +2324,11 @@ function Oi(e) {
2323
2324
  //#endregion
2324
2325
  //#region src/addons/ai/ai/F0AiMessagesContainer/components/feedback/TurnFeedback.tsx
2325
2326
  var ki = ({ content: t, targetMessage: n, onCopy: r }) => {
2326
- let i = p(), { open: a } = Di(), [o, s] = q(null);
2327
+ let i = p(), { open: a } = Di(), [o, s] = J(null);
2327
2328
  return /* @__PURE__ */ X("div", {
2328
2329
  className: "flex",
2329
2330
  children: [
2330
- /* @__PURE__ */ Y(je, {
2331
+ /* @__PURE__ */ Y(Me, {
2331
2332
  size: "md",
2332
2333
  variant: "ghost",
2333
2334
  valueToCopy: t,
@@ -2348,7 +2349,7 @@ var ki = ({ content: t, targetMessage: n, onCopy: r }) => {
2348
2349
  className: "flex min-w-0 flex-1 items-center justify-center gap-1",
2349
2350
  children: /* @__PURE__ */ Y(u, {
2350
2351
  size: "md",
2351
- icon: o === "like" ? oe : C,
2352
+ icon: o === "like" ? C : Oe,
2352
2353
  color: "default"
2353
2354
  })
2354
2355
  })
@@ -2366,7 +2367,7 @@ var ki = ({ content: t, targetMessage: n, onCopy: r }) => {
2366
2367
  className: "flex min-w-0 flex-1 items-center justify-center gap-1",
2367
2368
  children: /* @__PURE__ */ Y(u, {
2368
2369
  size: "md",
2369
- icon: o === "dislike" ? De : Qe,
2370
+ icon: o === "dislike" ? Qe : Ve,
2370
2371
  color: "default"
2371
2372
  })
2372
2373
  })
@@ -2374,14 +2375,14 @@ var ki = ({ content: t, targetMessage: n, onCopy: r }) => {
2374
2375
  ]
2375
2376
  });
2376
2377
  }, Ai = ({ icon: e, title: n, children: r, open: i, defaultOpen: a = !1, onOpenChange: o, lockOpen: c = !1 }) => {
2377
- let [l, d] = q(a), f = t(), p = i !== void 0, m = p ? i : l;
2378
- return /* @__PURE__ */ X(P, {
2378
+ let [l, d] = J(a), f = t(), p = i !== void 0, m = p ? i : l;
2379
+ return /* @__PURE__ */ X(I, {
2379
2380
  className: "mb-1 w-full",
2380
2381
  open: m,
2381
2382
  onOpenChange: (e) => {
2382
2383
  c || (p || d(e), o?.(e));
2383
2384
  },
2384
- children: [/* @__PURE__ */ X(he, {
2385
+ children: [/* @__PURE__ */ X(me, {
2385
2386
  disabled: c,
2386
2387
  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
2388
  children: [
@@ -2396,7 +2397,7 @@ var ki = ({ content: t, targetMessage: n, onCopy: r }) => {
2396
2397
  className: "min-h-6 flex items-center",
2397
2398
  children: /* @__PURE__ */ Y("span", { children: n })
2398
2399
  }),
2399
- c ? null : /* @__PURE__ */ Y(u, { icon: Ct })
2400
+ c ? null : /* @__PURE__ */ Y(u, { icon: St })
2400
2401
  ]
2401
2402
  }), /* @__PURE__ */ Y(fe, {
2402
2403
  forceMount: !0,
@@ -2423,8 +2424,8 @@ var ki = ({ content: t, targetMessage: n, onCopy: r }) => {
2423
2424
  })]
2424
2425
  });
2425
2426
  }, ji = 1e3, Mi = 1e3, Ni = ({ startedAt: e }) => {
2426
- let t = p(), [n, r] = q(() => e === null ? 0 : Date.now() - e);
2427
- if (W(() => {
2427
+ let t = p(), [n, r] = J(() => e === null ? 0 : Date.now() - e);
2428
+ if (G(() => {
2428
2429
  if (e === null) {
2429
2430
  r(0);
2430
2431
  return;
@@ -2448,13 +2449,13 @@ var ki = ({ content: t, targetMessage: n, onCopy: r }) => {
2448
2449
  }), s]
2449
2450
  });
2450
2451
  }, Pi = ({ titles: e, title: t, inProgress: n, isWriting: r, startedAt: i = null }) => {
2451
- let a = p(), [o, s] = q(!!n), c = K(n);
2452
- W(() => {
2452
+ let a = p(), [o, s] = J(!!n), c = q(n);
2453
+ G(() => {
2453
2454
  c.current && !n ? s(!1) : n && !o && s(!0), c.current = n;
2454
2455
  }, [n, o]);
2455
2456
  let l = n ? a.ai.thoughtsGroupTitle : t ?? a.ai.thoughtsGroupTitle, u = e.length - 1, d = (e) => !n || r ? "completed" : e === u ? "executing" : "completed";
2456
2457
  return /* @__PURE__ */ Y(Ai, {
2457
- icon: T,
2458
+ icon: ke,
2458
2459
  title: l,
2459
2460
  open: o,
2460
2461
  onOpenChange: s,
@@ -2475,24 +2476,24 @@ var ki = ({ content: t, targetMessage: n, onCopy: r }) => {
2475
2476
  }, n))
2476
2477
  })
2477
2478
  });
2478
- }, Fi = (e) => /* @__PURE__ */ Y(Ke, {
2479
+ }, Fi = (e) => /* @__PURE__ */ Y(qe, {
2479
2480
  content: e,
2480
2481
  format: "markdown"
2481
2482
  }), Ii = ({ text: e, renderMarkdown: t }) => /* @__PURE__ */ X("div", {
2482
2483
  className: "flex max-w-[90%] items-start gap-2 self-end pb-1 pr-2 text-f1-foreground-tertiary",
2483
2484
  children: [/* @__PURE__ */ Y("div", {
2484
2485
  className: "flex h-5 items-center",
2485
- children: /* @__PURE__ */ Y(u, { icon: Ne })
2486
+ children: /* @__PURE__ */ Y(u, { icon: xe })
2486
2487
  }), /* @__PURE__ */ Y("div", {
2487
2488
  className: "min-w-0 whitespace-pre-wrap text-base leading-5 [&>div]:flex [&>div]:flex-col [&>div]:gap-1 [&_p]:m-0",
2488
2489
  children: (t ?? Fi)(e)
2489
2490
  })]
2490
2491
  }), Li = ({ message: e, onReplyQuote: t, autoScrollIntoView: n = !0, renderMarkdown: r }) => {
2491
- let i = K(null), a = K(null);
2492
- W(() => {
2492
+ let i = q(null), a = q(null);
2493
+ G(() => {
2493
2494
  i.current && n && i.current.scrollIntoView({ behavior: "smooth" });
2494
2495
  }, [n]);
2495
- let o = e?.content, s = e?.rawData, c = G(() => Mr({
2496
+ let o = e?.content, s = e?.rawData, c = K(() => Mr({
2496
2497
  content: o,
2497
2498
  rawData: s
2498
2499
  }), [o, s]), l = (Nr(o, "user") ?? "").trim(), u = e?.replyQuote ?? null, d = l.length > 0, { anchor: f, clear: p } = gi({
@@ -2549,10 +2550,10 @@ var ki = ({ content: t, targetMessage: n, onCopy: r }) => {
2549
2550
  })]
2550
2551
  }, r);
2551
2552
  }, Wi = ({ messages: e, caption: n, subtitle: r, cta: i, onClick: a, fullscreen: o = !1 }) => {
2552
- let [s, c] = q(0), [l, u] = q(0), [d, f] = q("starting"), p = t(), m = e[s] ?? "", h = e.join("\0"), g = K(!0);
2553
- return W(() => {
2553
+ let [s, c] = J(0), [l, u] = J(0), [d, f] = J("starting"), p = t(), m = e[s] ?? "", h = e.join("\0"), g = q(!0);
2554
+ return G(() => {
2554
2555
  g.current ? g.current = !1 : (c(0), u(0), f("writing"));
2555
- }, [h]), W(() => {
2556
+ }, [h]), G(() => {
2556
2557
  if (p) return;
2557
2558
  let t;
2558
2559
  if (d === "starting") t = setTimeout(() => f("writing"), Bi);
@@ -2603,20 +2604,20 @@ var ki = ({ content: t, targetMessage: n, onCopy: r }) => {
2603
2604
  })
2604
2605
  });
2605
2606
  }, Gi = (e, t) => {
2606
- let [n, r] = q(null);
2607
- return W(() => {
2607
+ let [n, r] = J(null);
2608
+ return G(() => {
2608
2609
  r(e ? (e) => e ?? t ?? Date.now() : null);
2609
2610
  }, [e, t]), n;
2610
2611
  };
2611
2612
  //#endregion
2612
2613
  //#region src/addons/ai/ai/F0AiMessagesContainer/useMessageScroll.ts
2613
2614
  function Ki({ viewportRef: e, contentRef: t, endRef: n, lastTurnRef: r, turnsCount: i, freezeTurnMinHeight: a = !1 }) {
2614
- let [o, s] = q(0), [c, l] = q(!1), u = K(i), d = K(a);
2615
+ let [o, s] = J(0), [c, l] = J(!1), u = q(i), d = q(a);
2615
2616
  d.current = a;
2616
- let f = U((e = "smooth") => {
2617
+ let f = W((e = "smooth") => {
2617
2618
  n.current?.scrollIntoView({ behavior: e });
2618
2619
  }, [n]);
2619
- W(() => {
2620
+ G(() => {
2620
2621
  let n = e.current, r = t.current;
2621
2622
  if (!n || !r) return;
2622
2623
  let i = new ResizeObserver(() => {
@@ -2626,16 +2627,16 @@ function Ki({ viewportRef: e, contentRef: t, endRef: n, lastTurnRef: r, turnsCou
2626
2627
  });
2627
2628
  return i.observe(n), i.observe(r), () => i.disconnect();
2628
2629
  }, [e, t]);
2629
- let p = U(() => {
2630
+ let p = W(() => {
2630
2631
  let t = e.current;
2631
2632
  if (!t) return;
2632
2633
  let { scrollTop: n, scrollHeight: r, clientHeight: i } = t, a = r - n - i;
2633
2634
  l(a > i);
2634
2635
  }, [e]);
2635
- return W(() => {
2636
+ return G(() => {
2636
2637
  let t = e.current;
2637
2638
  if (t) return t.addEventListener("scroll", p, { passive: !0 }), () => t.removeEventListener("scroll", p);
2638
- }, [p, e]), W(() => {
2639
+ }, [p, e]), G(() => {
2639
2640
  i > u.current && requestAnimationFrame(() => {
2640
2641
  requestAnimationFrame(() => {
2641
2642
  let t = e.current, n = r.current;
@@ -2665,22 +2666,22 @@ var qi = {
2665
2666
  onThumbsDown: () => {}
2666
2667
  }, Ji = (e) => {
2667
2668
  let t = $e(), n = /* @__PURE__ */ Y(Ei, { children: /* @__PURE__ */ Y(Yi, { ...e }) });
2668
- return e.filePreviews || !t.provided ? /* @__PURE__ */ Y(Oe, {
2669
+ return e.filePreviews || !t.provided ? /* @__PURE__ */ Y(Ae, {
2669
2670
  filePreviews: e.filePreviews,
2670
2671
  children: n
2671
2672
  }) : n;
2672
2673
  }, Yi = ({ turns: e, isLoadingThread: t = !1, interrupt: r, initialMessage: i, initialMessageCaption: a, initialMessageSubtitle: o, initialMessageCta: c, onWelcomeClick: l, renderToolCall: u, onReplyQuote: d, onAssistantMessageRendered: f, autoScrollUserIntoView: m = !0, renderMarkdown: h, feedback: g, freezeLayout: v = !1, noShadows: b = !1, fullscreen: x = !1, children: S, AssistantMessage: C, UserMessage: w, onRegenerate: T, onCopy: E }) => {
2673
- let { modal: D, handleSubmit: O, handleClose: k } = Oi(g ?? qi), A = p(), j = C ?? Ci, M = w ?? Li, N = G(() => {
2674
- let e = i ?? A.ai.defaultInitialMessage;
2674
+ let { modal: D, handleSubmit: O, handleClose: ee } = Oi(g ?? qi), k = p(), A = C ?? Ci, j = w ?? Li, M = K(() => {
2675
+ let e = i ?? k.ai.defaultInitialMessage;
2675
2676
  return (Array.isArray(e) ? e : [e]).filter((e) => typeof e == "string" && e.length > 0);
2676
- }, [i, A.ai.defaultInitialMessage]), P = !t && e.length === 0 && N.length > 0, F = K(null), I = K(null), L = K(null), ee = K(null), te = K(null), { showScrollBtn: ne, turnMinHeight: re, scrollToBottom: ie } = Ki({
2677
- viewportRef: F,
2678
- contentRef: I,
2679
- endRef: L,
2680
- lastTurnRef: te,
2677
+ }, [i, k.ai.defaultInitialMessage]), N = !t && e.length === 0 && M.length > 0, P = q(null), F = q(null), I = q(null), te = q(null), ne = q(null), { showScrollBtn: re, turnMinHeight: L, scrollToBottom: ie } = Ki({
2678
+ viewportRef: P,
2679
+ contentRef: F,
2680
+ endRef: I,
2681
+ lastTurnRef: ne,
2681
2682
  turnsCount: e.length,
2682
2683
  freezeTurnMinHeight: v
2683
- }), z = e[e.length - 1], ae = Gi(!(!z || z.endIndicator !== "thinking" && !z.thinking?.inProgress), z?.thinking?.startedAt), oe = (t, n) => {
2684
+ }), z = e[e.length - 1], B = Gi(!(!z || z.endIndicator !== "thinking" && !z.thinking?.inProgress), z?.thinking?.startedAt), ae = (t, n) => {
2684
2685
  let r = n === e.length - 1, i = {
2685
2686
  renderToolCall: u,
2686
2687
  onReplyQuote: d,
@@ -2693,51 +2694,51 @@ var qi = {
2693
2694
  inProgress: t.isInProgress,
2694
2695
  index: r,
2695
2696
  isCurrentMessage: !1,
2696
- AssistantMessage: j,
2697
- UserMessage: M,
2697
+ AssistantMessage: A,
2698
+ UserMessage: j,
2698
2699
  onRegenerate: T,
2699
2700
  onCopy: E,
2700
2701
  rawData: e.rawData || {},
2701
2702
  ...i
2702
2703
  };
2703
- return /* @__PURE__ */ Y(M, { ...a }, `${n}-u-${r}`);
2704
+ return /* @__PURE__ */ Y(j, { ...a }, `${n}-u-${r}`);
2704
2705
  }, o = (e, a) => {
2705
2706
  let o = r && a === t.assistantMessages.length - 1, s = t.userMessages.length + a, c = {
2706
2707
  message: e,
2707
2708
  inProgress: t.isInProgress,
2708
2709
  index: s,
2709
2710
  isCurrentMessage: o,
2710
- AssistantMessage: j,
2711
- UserMessage: M,
2711
+ AssistantMessage: A,
2712
+ UserMessage: j,
2712
2713
  onRegenerate: T,
2713
2714
  onCopy: E,
2714
2715
  rawData: e.rawData || {},
2715
2716
  ...i
2716
2717
  };
2717
- return /* @__PURE__ */ Y(j, {
2718
+ return /* @__PURE__ */ Y(A, {
2718
2719
  ...c,
2719
2720
  isGenerating: t.isInProgress && o,
2720
2721
  isLoading: t.isInProgress && o && !Xi(e)
2721
2722
  }, `${n}-a-${a}`);
2722
2723
  };
2723
2724
  return /* @__PURE__ */ X("div", {
2724
- ref: r ? te : void 0,
2725
+ ref: r ? ne : void 0,
2725
2726
  className: y("flex flex-col items-start justify-start gap-2 px-1", r && "pb-5"),
2726
- style: { minHeight: r && re || void 0 },
2727
+ style: { minHeight: r && L || void 0 },
2727
2728
  children: [
2728
2729
  t.userMessages.map((e, t) => a(e, t)),
2729
2730
  t.thinking && t.thinking.titles.length > 0 ? /* @__PURE__ */ Y(Pi, {
2730
2731
  titles: t.thinking.titles,
2731
- title: A.ai.thoughtsGroupTitle,
2732
+ title: k.ai.thoughtsGroupTitle,
2732
2733
  inProgress: t.thinking.inProgress,
2733
2734
  isWriting: t.thinking.isWriting,
2734
- startedAt: r ? ae : null
2735
+ startedAt: r ? B : null
2735
2736
  }) : null,
2736
2737
  t.assistantMessages.map((e, t) => o(e, t)),
2737
2738
  t.endIndicator === "thinking" ? /* @__PURE__ */ Y(R, {
2738
- title: A.ai.thinking,
2739
+ title: k.ai.thinking,
2739
2740
  status: "executing",
2740
- suffix: /* @__PURE__ */ Y(Ni, { startedAt: ae })
2741
+ suffix: /* @__PURE__ */ Y(Ni, { startedAt: B })
2741
2742
  }) : null,
2742
2743
  t.endIndicator === "activity" ? /* @__PURE__ */ Y(R, { status: "writing" }) : null,
2743
2744
  t.feedback ? /* @__PURE__ */ Y(ki, {
@@ -2749,42 +2750,42 @@ var qi = {
2749
2750
  ]
2750
2751
  }, `turn-${n}`);
2751
2752
  };
2752
- return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X("div", {
2753
+ return /* @__PURE__ */ X(Kt, { children: [/* @__PURE__ */ X("div", {
2753
2754
  className: "relative flex flex-1 flex-col overflow-hidden",
2754
2755
  children: [/* @__PURE__ */ Y("div", {
2755
- ref: F,
2756
+ ref: P,
2756
2757
  className: y("flex-1 overflow-y-scroll", "[scrollbar-width:thin] [scrollbar-color:transparent_transparent]", "hover:[scrollbar-color:var(--scrollbar-thumb)_transparent]", "[&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-track]:bg-transparent", "[&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-transparent", "hover:[&::-webkit-scrollbar-thumb]:bg-f1-background-inverse/30"),
2757
2758
  children: /* @__PURE__ */ X("div", {
2758
- ref: I,
2759
+ ref: F,
2759
2760
  className: "flex min-h-full flex-col items-center px-4 pt-4 pb-[calc(1rem+var(--f0-ai-composer-overlap,0px))]",
2760
2761
  children: [
2761
2762
  /* @__PURE__ */ X("div", {
2762
- className: y(P ? "flex flex-1" : "flex flex-col gap-6", "w-full max-w-content"),
2763
+ className: y(N ? "flex flex-1" : "flex flex-col gap-6", "w-full max-w-content"),
2763
2764
  children: [
2764
2765
  t ? /* @__PURE__ */ Y(Zi, {}) : null,
2765
- P ? /* @__PURE__ */ Y(Wi, {
2766
- messages: N,
2766
+ N ? /* @__PURE__ */ Y(Wi, {
2767
+ messages: M,
2767
2768
  caption: a,
2768
2769
  subtitle: o,
2769
2770
  cta: c,
2770
2771
  onClick: l,
2771
2772
  fullscreen: x
2772
2773
  }) : null,
2773
- t ? null : e.map((e, t) => oe(e, t)),
2774
+ t ? null : e.map((e, t) => ae(e, t)),
2774
2775
  r
2775
2776
  ]
2776
2777
  }),
2777
2778
  /* @__PURE__ */ Y("div", {
2778
- ref: ee,
2779
+ ref: te,
2779
2780
  className: "h-px shrink-0",
2780
2781
  "aria-hidden": !0
2781
2782
  }),
2782
2783
  /* @__PURE__ */ Y("footer", {
2783
2784
  className: "copilotKitMessagesFooter",
2784
- ref: L,
2785
+ ref: I,
2785
2786
  children: S
2786
2787
  }),
2787
- /* @__PURE__ */ Y(n, { children: ne ? /* @__PURE__ */ Y(s.div, {
2788
+ /* @__PURE__ */ Y(n, { children: re ? /* @__PURE__ */ Y(s.div, {
2788
2789
  className: "sticky bottom-[calc(0.5rem+var(--f0-ai-composer-overlap,0px))] z-10 flex justify-center",
2789
2790
  initial: {
2790
2791
  opacity: 0,
@@ -2801,18 +2802,18 @@ var qi = {
2801
2802
  transition: { duration: .2 },
2802
2803
  children: /* @__PURE__ */ Y(_, {
2803
2804
  onClick: () => ie(),
2804
- label: A.ai.scrollToBottom,
2805
+ label: k.ai.scrollToBottom,
2805
2806
  variant: "neutral",
2806
- icon: Et,
2807
+ icon: Tt,
2807
2808
  hideLabel: !0
2808
2809
  })
2809
2810
  }) : null })
2810
2811
  ]
2811
2812
  })
2812
- }), !b && !P ? /* @__PURE__ */ Y(Ye, { position: "top" }, "shadow-top") : null]
2813
+ }), !b && !N ? /* @__PURE__ */ Y(Xe, { position: "top" }, "shadow-top") : null]
2813
2814
  }), D.isOpen ? /* @__PURE__ */ Y(wi, {
2814
2815
  onSubmit: O,
2815
- onClose: k,
2816
+ onClose: ee,
2816
2817
  reactionType: D.currentReaction,
2817
2818
  message: D.currentMessage
2818
2819
  }) : null] });
@@ -2830,7 +2831,7 @@ var qi = {
2830
2831
  /* @__PURE__ */ Y(d, { className: "h-5 w-4/5 rounded-md" })
2831
2832
  ]
2832
2833
  })
2833
- }), Qi = { ai: dt.ai }, $i = Bt(null);
2834
+ }), Qi = { ai: ut.ai }, $i = zt(null);
2834
2835
  function ea({ children: e, translations: t }) {
2835
2836
  return /* @__PURE__ */ Y($i.Provider, {
2836
2837
  value: t,
@@ -2838,14 +2839,14 @@ function ea({ children: e, translations: t }) {
2838
2839
  });
2839
2840
  }
2840
2841
  function ta() {
2841
- let e = Ut($i);
2842
+ let e = Ht($i);
2842
2843
  if (e === null) throw Error("useAiChatTranslations must be used within an AiChatTranslationsProvider");
2843
2844
  return e;
2844
2845
  }
2845
2846
  //#endregion
2846
2847
  //#region src/addons/ai/ai/F0AiChat/providers/useCanvasEntities.ts
2847
2848
  function na() {
2848
- let { canvasEntities: e } = B();
2849
+ let { canvasEntities: e } = V();
2849
2850
  return e;
2850
2851
  }
2851
2852
  //#endregion
@@ -2881,15 +2882,15 @@ var ia = ({ canProceed: e, submitDisabled: t, label: n, onConfirm: r, onSkip: i,
2881
2882
  className: y("flex h-5 w-5 shrink-0 items-center justify-center rounded-full transition-colors", e ? "bg-f1-background-selected-bold" : "border-2 border-solid border-f1-border bg-f1-background"),
2882
2883
  children: e ? /* @__PURE__ */ Y("div", { className: "h-2 w-2 rounded-full bg-f1-background" }) : null
2883
2884
  }), oa = 132, sa = ({ mode: e, hasSelection: t, hasCustomText: n, customAnswerText: i, isCustomAnswerActive: a, canProceed: o, inputRef: s, onActivate: c, onChangeText: l, onToggleActive: u, onConfirm: d }) => {
2884
- let f = p().ai.clarifyingQuestion.typeYourAnswer, m = K(null), h = r(m, s);
2885
- Kt(() => {
2885
+ let f = p().ai.clarifyingQuestion.typeYourAnswer, m = q(null), h = r(m, s);
2886
+ Gt(() => {
2886
2887
  let e = m.current;
2887
2888
  if (!e) return;
2888
2889
  e.style.height = "auto";
2889
2890
  let t = Math.min(e.scrollHeight, oa);
2890
2891
  e.style.height = `${t}px`, e.style.overflowY = e.scrollHeight > oa ? "auto" : "hidden";
2891
2892
  }, [i]);
2892
- let g = e === "single" ? /* @__PURE__ */ Y(aa, { isSelected: n && !t }) : /* @__PURE__ */ Y(Mt, {
2893
+ let g = e === "single" ? /* @__PURE__ */ Y(aa, { isSelected: n && !t }) : /* @__PURE__ */ Y(jt, {
2893
2894
  checked: a,
2894
2895
  onCheckedChange: () => u(!a),
2895
2896
  title: f,
@@ -2911,7 +2912,7 @@ var ia = ({ canProceed: e, submitDisabled: t, label: n, onConfirm: r, onSkip: i,
2911
2912
  className: "min-w-0 flex-1 resize-none bg-transparent text-base text-f1-foreground outline-none placeholder:text-f1-foreground-tertiary"
2912
2913
  })]
2913
2914
  });
2914
- }, ca = H(({ option: e, isSelected: t, mode: n, isTabStop: r, onToggle: i, onKeyNavigate: a }, o) => n === "single" ? /* @__PURE__ */ X("div", {
2915
+ }, ca = U(({ option: e, isSelected: t, mode: n, isTabStop: r, onToggle: i, onKeyNavigate: a }, o) => n === "single" ? /* @__PURE__ */ X("div", {
2915
2916
  ref: o,
2916
2917
  role: "radio",
2917
2918
  "aria-checked": t,
@@ -2928,7 +2929,7 @@ var ia = ({ canProceed: e, submitDisabled: t, label: n, onConfirm: r, onSkip: i,
2928
2929
  }) : /* @__PURE__ */ X("div", {
2929
2930
  ref: o,
2930
2931
  className: y("flex cursor-pointer items-center rounded-md pl-2 transition-[background-color,transform] hover:bg-f1-background-secondary active:scale-[0.99]"),
2931
- children: [/* @__PURE__ */ Y(Mt, {
2932
+ children: [/* @__PURE__ */ Y(jt, {
2932
2933
  checked: t,
2933
2934
  onCheckedChange: () => i(e.id),
2934
2935
  title: e.label,
@@ -2952,8 +2953,8 @@ var la = [
2952
2953
  if (e !== "single") return 0;
2953
2954
  let t = r.findIndex((e) => i.includes(e.id));
2954
2955
  return t >= 0 ? t : 0;
2955
- })(), [x, S] = q(b), C = K([]);
2956
- W(() => {
2956
+ })(), [x, S] = J(b), C = q([]);
2957
+ G(() => {
2957
2958
  p && e === "single" && C.current[x]?.focus();
2958
2959
  }, []);
2959
2960
  let w = (t) => {
@@ -3049,7 +3050,7 @@ var la = [
3049
3050
  disabled: n,
3050
3051
  label: l.ai.clarifyingQuestion.back,
3051
3052
  hideLabel: !0,
3052
- icon: Ot
3053
+ icon: Dt
3053
3054
  }),
3054
3055
  /* @__PURE__ */ Y("span", {
3055
3056
  className: "translate-y-px text-sm font-semibold text-f1-foreground-tertiary",
@@ -3063,7 +3064,7 @@ var la = [
3063
3064
  disabled: r || !i,
3064
3065
  label: l.ai.clarifyingQuestion.next,
3065
3066
  hideLabel: !0,
3066
- icon: Ct
3067
+ icon: St
3067
3068
  })
3068
3069
  ]
3069
3070
  }) : null,
@@ -3074,7 +3075,7 @@ var la = [
3074
3075
  onClick: c,
3075
3076
  label: l.actions.cancel,
3076
3077
  hideLabel: !0,
3077
- icon: x
3078
+ icon: S
3078
3079
  })
3079
3080
  ]
3080
3081
  });
@@ -3082,23 +3083,23 @@ var la = [
3082
3083
  clarifyingQuestion: e,
3083
3084
  isSubmitDisabled: t
3084
3085
  }), ya = ({ clarifyingQuestion: e, isSubmitDisabled: r }) => {
3085
- let i = p(), a = t(), { currentStep: o, currentStepIndex: c, totalSteps: l, toggleOption: u, confirm: d, skip: f, cancel: m, back: h, setCustomAnswerText: g, setCustomAnswerActive: _, activateCustomAnswer: v } = e, { question: y, options: b, selectedOptionIds: x, selectionMode: S, optional: C, allowCustomAnswer: w, customAnswerText: T, isCustomAnswerActive: E } = o, D = K(null), O = S ?? "single", k = l > 1, A = c === 0, j = c === l - 1, M = k ? i.t("ai.clarifyingQuestion.stepOf", {
3086
+ let i = p(), a = t(), { currentStep: o, currentStepIndex: c, totalSteps: l, toggleOption: u, confirm: d, skip: f, cancel: m, back: h, setCustomAnswerText: g, setCustomAnswerActive: _, activateCustomAnswer: v } = e, { question: y, options: b, selectedOptionIds: x, selectionMode: S, optional: C, allowCustomAnswer: w, customAnswerText: T, isCustomAnswerActive: E } = o, D = q(null), O = S ?? "single", ee = l > 1, k = c === 0, A = c === l - 1, j = ee ? i.t("ai.clarifyingQuestion.stepOf", {
3086
3087
  current: String(c + 1),
3087
3088
  total: String(l)
3088
- }) : void 0, N = x.length > 0, P = (T ?? "").trim().length > 0, F = N || E && P || C === !0, I = r === !0 && j, L = () => {
3089
- I || d();
3090
- }, ee = () => {
3091
- I || f();
3092
- }, te = (e) => {
3089
+ }) : void 0, M = x.length > 0, N = (T ?? "").trim().length > 0, P = M || E && N || C === !0, F = r === !0 && A, I = () => {
3090
+ F || d();
3091
+ }, te = () => {
3092
+ F || f();
3093
+ }, ne = (e) => {
3093
3094
  let t = O === "single" && x.includes(e);
3094
- u(e), O === "single" && !j && !t && Promise.resolve().then(d);
3095
- }, ne = j ? i.ai.clarifyingQuestion.submit : i.ai.clarifyingQuestion.next, R = C === !0 && !N && !(E && P), re = () => {
3095
+ u(e), O === "single" && !A && !t && Promise.resolve().then(d);
3096
+ }, re = A ? i.ai.clarifyingQuestion.submit : i.ai.clarifyingQuestion.next, L = C === !0 && !M && !(E && N), R = () => {
3096
3097
  v(), requestAnimationFrame(() => {
3097
3098
  D.current?.focus();
3098
3099
  });
3099
3100
  }, ie = (e) => {
3100
3101
  e.key === "Escape" && (e.preventDefault(), m());
3101
- }, z = a ? 0 : ga, ae = a ? 0 : _a;
3102
+ }, z = a ? 0 : ga, B = a ? 0 : _a;
3102
3103
  return /* @__PURE__ */ X("div", {
3103
3104
  className: "flex flex-col",
3104
3105
  onKeyDown: ie,
@@ -3120,16 +3121,16 @@ var la = [
3120
3121
  exit: {
3121
3122
  opacity: 0,
3122
3123
  transition: {
3123
- duration: ae,
3124
+ duration: B,
3124
3125
  ease: ha
3125
3126
  }
3126
3127
  },
3127
3128
  children: [/* @__PURE__ */ Y(ma, {
3128
3129
  question: y,
3129
- stepLabel: M,
3130
- isFirstStep: A,
3131
- isFinalStep: j,
3132
- canProceed: F,
3130
+ stepLabel: j,
3131
+ isFirstStep: k,
3132
+ isFinalStep: A,
3133
+ canProceed: P,
3133
3134
  onBack: h,
3134
3135
  onNext: d,
3135
3136
  onCancel: m
@@ -3139,27 +3140,27 @@ var la = [
3139
3140
  options: b,
3140
3141
  selectedOptionIds: x,
3141
3142
  allowCustomAnswer: w,
3142
- hasSelection: N,
3143
- hasCustomText: P,
3143
+ hasSelection: M,
3144
+ hasCustomText: N,
3144
3145
  customAnswerText: T,
3145
3146
  isCustomAnswerActive: E,
3146
- canProceed: F,
3147
+ canProceed: P,
3147
3148
  customInputRef: D,
3148
- onToggleOption: te,
3149
- onActivateCustom: re,
3149
+ onToggleOption: ne,
3150
+ onActivateCustom: R,
3150
3151
  onChangeCustomText: g,
3151
3152
  onToggleCustomActive: _,
3152
- onConfirm: L
3153
+ onConfirm: I
3153
3154
  })]
3154
3155
  }, c)
3155
3156
  })
3156
3157
  }), /* @__PURE__ */ Y(ia, {
3157
- canProceed: F,
3158
- submitDisabled: I,
3159
- label: ne,
3160
- onConfirm: L,
3161
- onSkip: ee,
3162
- showSkip: R
3158
+ canProceed: P,
3159
+ submitDisabled: F,
3160
+ label: re,
3161
+ onConfirm: I,
3162
+ onSkip: te,
3163
+ showSkip: L
3163
3164
  })]
3164
3165
  });
3165
3166
  };
@@ -3485,22 +3486,22 @@ var Da = class {
3485
3486
  repeatType: "mirror"
3486
3487
  };
3487
3488
  function Pa(e) {
3488
- let [t, n] = q(e), r = we(e), i = K(null);
3489
+ let [t, n] = J(e), r = Re(e), i = q(null);
3489
3490
  return Yt(r, "change", (e) => n(e)), {
3490
3491
  value: t,
3491
3492
  motionValue: r,
3492
3493
  controls: i,
3493
- animate: U((e, t) => {
3494
- i.current = Ze(r, e, t);
3494
+ animate: W((e, t) => {
3495
+ i.current = Te(r, e, t);
3495
3496
  }, [r])
3496
3497
  };
3497
3498
  }
3498
3499
  function Fa(e, t) {
3499
- let [n, r] = q(Oa), { value: i, animate: a, motionValue: o } = Pa(ja), { value: s, animate: c } = Pa(ka), { value: l, animate: u } = Pa(Aa), { value: d, animate: f } = Pa(Ma), p = Jt(t, {
3500
+ let [n, r] = J(Oa), { value: i, animate: a, motionValue: o } = Pa(ja), { value: s, animate: c } = Pa(ka), { value: l, animate: u } = Pa(Aa), { value: d, animate: f } = Pa(Ma), p = Jt(t, {
3500
3501
  fftSize: 512,
3501
3502
  smoothingTimeConstant: .55
3502
3503
  });
3503
- return W(() => {
3504
+ return G(() => {
3504
3505
  switch (e) {
3505
3506
  case "idle":
3506
3507
  case "failed":
@@ -3530,7 +3531,7 @@ function Fa(e, t) {
3530
3531
  c,
3531
3532
  u,
3532
3533
  f
3533
- ]), W(() => {
3534
+ ]), G(() => {
3534
3535
  e === "speaking" && p > 0 && !o.isAnimating() && a(.2 + .2 * p, { duration: 0 });
3535
3536
  }, [
3536
3537
  e,
@@ -3704,7 +3705,7 @@ function uo({ fs: e, vs: t = za, textures: n = [], uniforms: r, clearColor: i =
3704
3705
  0,
3705
3706
  1
3706
3707
  ], precision: a = "highp", style: o, contextAttributes: s = {}, lerp: c = 1, devicePixelRatio: l = 1, onDoneLoadingTextures: u, onError: d = console.error, onWarning: f = console.warn }) {
3707
- let p = K(null), m = K(null), h = K(null), g = K(null), _ = K(void 0), v = K(void 0), y = K(!1), b = K(void 0), x = K(0), S = K([0, 0]), C = K([]), w = K(0), T = K(void 0), E = K({
3708
+ let p = q(null), m = q(null), h = q(null), g = q(null), _ = q(void 0), v = q(void 0), y = q(!1), b = q(void 0), x = q(0), S = q([0, 0]), C = q([]), w = q(0), T = q(void 0), E = q({
3708
3709
  [Ba]: {
3709
3710
  type: "float",
3710
3711
  isNeeded: !1,
@@ -3755,15 +3756,15 @@ function uo({ fs: e, vs: t = za, textures: n = [], uniforms: r, clearColor: i =
3755
3756
  0
3756
3757
  ]
3757
3758
  }
3758
- }), D = K(r), O = (e, t) => {
3759
+ }), D = q(r), O = (e, t) => {
3759
3760
  let n = "width" in e ? e.width ?? 0 : 0, r = "height" in e ? e.height ?? 0 : 0, i = E.current.iChannelResolution;
3760
3761
  if (!i) return;
3761
3762
  Array.isArray(i.value) || (i.value = []);
3762
3763
  let a = i.value;
3763
3764
  a[t * 3] = n * l, a[t * 3 + 1] = r * l, a[t * 3 + 2] = 0;
3764
- }, k = () => {
3765
+ }, ee = () => {
3765
3766
  p.current && (m.current = p.current.getContext("webgl", s) || p.current.getContext("experimental-webgl", s), m.current?.getExtension("OES_standard_derivatives"), m.current?.getExtension("EXT_shader_texture_lod"));
3766
- }, A = () => {
3767
+ }, k = () => {
3767
3768
  let e = m.current;
3768
3769
  h.current = e?.createBuffer() ?? null, e?.bindBuffer(e.ARRAY_BUFFER, h.current), e?.bufferData(e.ARRAY_BUFFER, new Float32Array([
3769
3770
  1,
@@ -3779,19 +3780,19 @@ function uo({ fs: e, vs: t = za, textures: n = [], uniforms: r, clearColor: i =
3779
3780
  -1,
3780
3781
  0
3781
3782
  ]), e.STATIC_DRAW);
3782
- }, j = ({ alpha: e, beta: t, gamma: n }) => {
3783
+ }, A = ({ alpha: e, beta: t, gamma: n }) => {
3783
3784
  E.current.iDeviceOrientation.value = [
3784
3785
  e ?? 0,
3785
3786
  t ?? 0,
3786
3787
  n ?? 0,
3787
3788
  window.orientation ?? 0
3788
3789
  ];
3789
- }, M = (e) => {
3790
+ }, j = (e) => {
3790
3791
  let [t = 0, n = 0] = so(e), r = t - (b.current?.left ?? 0) - window.pageXOffset, i = (b.current?.height ?? 0) - n - (b.current?.top ?? 0) - window.pageYOffset;
3791
3792
  y.current = !0;
3792
3793
  let a = Array.isArray(E.current.iMouse?.value) ? E.current.iMouse.value : void 0;
3793
3794
  a && (a[2] = r, a[3] = i), S.current[0] = r, S.current[1] = i;
3794
- }, N = (e) => {
3795
+ }, M = (e) => {
3795
3796
  b.current = p.current?.getBoundingClientRect();
3796
3797
  let [t = 0, n = 0] = so(e), r = t - (b.current?.left ?? 0), i = (b.current?.height ?? 0) - n - (b.current?.top ?? 0);
3797
3798
  if (c !== 1) S.current[0] = r, S.current[1] = i;
@@ -3799,10 +3800,10 @@ function uo({ fs: e, vs: t = za, textures: n = [], uniforms: r, clearColor: i =
3799
3800
  let e = Array.isArray(E.current.iMouse?.value) ? E.current.iMouse.value : void 0;
3800
3801
  e && (e[0] = r, e[1] = i);
3801
3802
  }
3802
- }, P = () => {
3803
+ }, N = () => {
3803
3804
  let e = Array.isArray(E.current.iMouse?.value) ? E.current.iMouse.value : void 0;
3804
3805
  e && (e[2] = 0, e[3] = 0);
3805
- }, F = () => {
3806
+ }, P = () => {
3806
3807
  let e = m.current;
3807
3808
  if (!e) return;
3808
3809
  b.current = p.current?.getBoundingClientRect();
@@ -3811,7 +3812,7 @@ function uo({ fs: e, vs: t = za, textures: n = [], uniforms: r, clearColor: i =
3811
3812
  let t = e.getUniformLocation(g.current, Ga);
3812
3813
  e.uniform2fv(t, [e.canvas.width, e.canvas.height]);
3813
3814
  }
3814
- }, I = (e, t) => {
3815
+ }, F = (e, t) => {
3815
3816
  let n = m.current;
3816
3817
  if (!n) return null;
3817
3818
  let r = n.createShader(e);
@@ -3822,12 +3823,12 @@ function uo({ fs: e, vs: t = za, textures: n = [], uniforms: r, clearColor: i =
3822
3823
  n.deleteShader(r), d?.($(`Shader compiler log: ${e}`));
3823
3824
  }
3824
3825
  return r;
3825
- }, L = (e, t) => {
3826
+ }, I = (e, t) => {
3826
3827
  let n = m.current;
3827
3828
  if (!n) return;
3828
- let r = I(n.FRAGMENT_SHADER, e), i = I(n.VERTEX_SHADER, t);
3829
+ let r = F(n.FRAGMENT_SHADER, e), i = F(n.VERTEX_SHADER, t);
3829
3830
  g.current = n.createProgram(), g.current && i && r && (n.attachShader(g.current, i), n.attachShader(g.current, r), n.linkProgram(g.current), n.getProgramParameter(g.current, n.LINK_STATUS) ? (n.useProgram(g.current), _.current = n.getAttribLocation(g.current, "aVertexPosition"), n.enableVertexAttribArray(_.current)) : d?.($(`Unable to initialize the shader program: ${n.getProgramInfoLog(g.current)}`)));
3830
- }, ee = () => {
3831
+ }, te = () => {
3831
3832
  if (r) for (let e of Object.keys(r)) {
3832
3833
  let t = r[e];
3833
3834
  if (!t) continue;
@@ -3841,7 +3842,7 @@ function uo({ fs: e, vs: t = za, textures: n = [], uniforms: r, clearColor: i =
3841
3842
  ...o ? { arraySize: o } : {}
3842
3843
  };
3843
3844
  }
3844
- }, te = () => {
3845
+ }, ne = () => {
3845
3846
  let e = m.current;
3846
3847
  if (e) {
3847
3848
  if (n && n.length > 0) {
@@ -3862,7 +3863,7 @@ function uo({ fs: e, vs: t = za, textures: n = [], uniforms: r, clearColor: i =
3862
3863
  });
3863
3864
  } else u && u();
3864
3865
  }
3865
- }, ne = (e) => {
3866
+ }, re = (e) => {
3866
3867
  let t = Ia.includes(a ?? "highp"), n = `precision ${t ? a : Ia[1]} float;\n`;
3867
3868
  t || f?.($(`wrong precision type ${a}, please make sure to pass one of a valid precision lowp, mediump, highp, by default you shader precision will be set to highp.`));
3868
3869
  let r = n.concat(`#define DPR ${l.toFixed(1)}\n`).concat(e.replace(/texture\(/g, "texture2D("));
@@ -3872,7 +3873,7 @@ function uo({ fs: e, vs: t = za, textures: n = [], uniforms: r, clearColor: i =
3872
3873
  r = lo(r, `uniform ${e.type} ${t}${e.arraySize || ""}; \n`, r.lastIndexOf(n) + n.length), e.isNeeded = !0;
3873
3874
  }
3874
3875
  return e.includes("mainImage") && (r = r.concat(La)), r;
3875
- }, R = (e) => {
3876
+ }, L = (e) => {
3876
3877
  let t = m.current;
3877
3878
  if (!t || !g.current) return;
3878
3879
  let n = w.current ? (e - w.current) / 1e3 : 0;
@@ -3931,31 +3932,31 @@ function uo({ fs: e, vs: t = za, textures: n = [], uniforms: r, clearColor: i =
3931
3932
  t.activeTexture(t.TEXTURE0 + e), t.bindTexture(t.TEXTURE_2D, i), t.uniform1i(s, e), r && n.updateTexture(i, a, o);
3932
3933
  }
3933
3934
  }
3934
- }, re = (e) => {
3935
+ }, R = (e) => {
3935
3936
  let t = m.current;
3936
3937
  if (!t) return;
3937
- t.viewport(0, 0, t.drawingBufferWidth, t.drawingBufferHeight), t.clear(t.COLOR_BUFFER_BIT | t.DEPTH_BUFFER_BIT), t.bindBuffer(t.ARRAY_BUFFER, h.current), t.vertexAttribPointer(_.current ?? 0, 3, t.FLOAT, !1, 0, 0), R(e), t.drawArrays(t.TRIANGLE_STRIP, 0, 4);
3938
+ t.viewport(0, 0, t.drawingBufferWidth, t.drawingBufferHeight), t.clear(t.COLOR_BUFFER_BIT | t.DEPTH_BUFFER_BIT), t.bindBuffer(t.ARRAY_BUFFER, h.current), t.vertexAttribPointer(_.current ?? 0, 3, t.FLOAT, !1, 0, 0), L(e), t.drawArrays(t.TRIANGLE_STRIP, 0, 4);
3938
3939
  let n = E.current.iMouse?.value;
3939
3940
  if (E.current.iMouse?.isNeeded && c !== 1 && Array.isArray(n)) {
3940
3941
  let e = n[0] ?? 0, t = n[1] ?? 0;
3941
3942
  n[0] = co(e, S.current[0] ?? 0, c), n[1] = co(t, S.current[1] ?? 0, c);
3942
3943
  }
3943
- v.current = requestAnimationFrame(re);
3944
+ v.current = requestAnimationFrame(R);
3944
3945
  }, ie = () => {
3945
3946
  let e = { passive: !0 };
3946
- E.current.iMouse?.isNeeded && p.current && (p.current.addEventListener("mousemove", N, e), p.current.addEventListener("mouseout", P, e), p.current.addEventListener("mouseup", P, e), p.current.addEventListener("mousedown", M, e), p.current.addEventListener("touchmove", N, e), p.current.addEventListener("touchend", P, e), p.current.addEventListener("touchstart", M, e)), E.current.iDeviceOrientation?.isNeeded && window.addEventListener("deviceorientation", j, e), p.current && (T.current = new ResizeObserver(F), T.current.observe(p.current), window.addEventListener("resize", F, e));
3947
+ E.current.iMouse?.isNeeded && p.current && (p.current.addEventListener("mousemove", M, e), p.current.addEventListener("mouseout", N, e), p.current.addEventListener("mouseup", N, e), p.current.addEventListener("mousedown", j, e), p.current.addEventListener("touchmove", M, e), p.current.addEventListener("touchend", N, e), p.current.addEventListener("touchstart", j, e)), E.current.iDeviceOrientation?.isNeeded && window.addEventListener("deviceorientation", A, e), p.current && (T.current = new ResizeObserver(P), T.current.observe(p.current), window.addEventListener("resize", P, e));
3947
3948
  }, z = () => {
3948
3949
  let e = { passive: !0 };
3949
- E.current.iMouse?.isNeeded && p.current && (p.current.removeEventListener("mousemove", N, e), p.current.removeEventListener("mouseout", P, e), p.current.removeEventListener("mouseup", P, e), p.current.removeEventListener("mousedown", M, e), p.current.removeEventListener("touchmove", N, e), p.current.removeEventListener("touchend", P, e), p.current.removeEventListener("touchstart", M, e)), E.current.iDeviceOrientation?.isNeeded && window.removeEventListener("deviceorientation", j, e), T.current && (T.current.disconnect(), window.removeEventListener("resize", F, e));
3950
+ E.current.iMouse?.isNeeded && p.current && (p.current.removeEventListener("mousemove", M, e), p.current.removeEventListener("mouseout", N, e), p.current.removeEventListener("mouseup", N, e), p.current.removeEventListener("mousedown", j, e), p.current.removeEventListener("touchmove", M, e), p.current.removeEventListener("touchend", N, e), p.current.removeEventListener("touchstart", j, e)), E.current.iDeviceOrientation?.isNeeded && window.removeEventListener("deviceorientation", A, e), T.current && (T.current.disconnect(), window.removeEventListener("resize", P, e));
3950
3951
  };
3951
- return W(() => {
3952
+ return G(() => {
3952
3953
  D.current = r;
3953
- }, [r]), W(() => {
3954
+ }, [r]), G(() => {
3954
3955
  let n = C.current;
3955
3956
  function r() {
3956
- k();
3957
+ ee();
3957
3958
  let n = m.current;
3958
- n && p.current && (n.clearColor(...i), n.clearDepth(1), n.enable(n.DEPTH_TEST), n.depthFunc(n.LEQUAL), n.viewport(0, 0, p.current.width, p.current.height), p.current.height = p.current.clientHeight, p.current.width = p.current.clientWidth, ee(), te(), L(ne(e || Ra), t || za), A(), requestAnimationFrame(re), ie(), F());
3959
+ n && p.current && (n.clearColor(...i), n.clearDepth(1), n.enable(n.DEPTH_TEST), n.depthFunc(n.LEQUAL), n.viewport(0, 0, p.current.width, p.current.height), p.current.height = p.current.clientHeight, p.current.width = p.current.clientWidth, te(), ne(), I(re(e || Ra), t || za), k(), requestAnimationFrame(R), ie(), P());
3959
3960
  }
3960
3961
  return requestAnimationFrame(r), () => {
3961
3962
  let e = m.current;
@@ -3999,7 +4000,7 @@ function mo(e) {
3999
4000
  }
4000
4001
  }
4001
4002
  function ho({ shape: e = 1, speed: t = 1, amplitude: n = .5, frequency: r = .5, scale: i = .2, blur: a = 1, color: o = "#FF355E", colorShift: s = 1, brightness: c = 1, themeMode: l = typeof window < "u" && document.documentElement.classList.contains("dark") ? "dark" : "light", ref: u, className: d, ...f }) {
4002
- let p = G(() => mo(o), [o]);
4003
+ let p = K(() => mo(o), [o]);
4003
4004
  return /* @__PURE__ */ Y("div", {
4004
4005
  ref: u,
4005
4006
  className: d,
@@ -4102,7 +4103,7 @@ function go({ size: e = "lg", state: t, color: n, colorShift: r = .05, audioTrac
4102
4103
  }
4103
4104
  //#endregion
4104
4105
  //#region src/blocks/ai/F0HILActionConfirmation/F0HILActionConfirmation.tsx
4105
- var _o = ({ text: e, description: t, avatar: n, confirmationText: r, onConfirm: i, cancelText: a, onCancel: o, stackAt: s = "sm" }) => /* @__PURE__ */ Y(ne, {
4106
+ var _o = ({ text: e, description: t, avatar: n, confirmationText: r, onConfirm: i, cancelText: a, onCancel: o, stackAt: s = "sm" }) => /* @__PURE__ */ Y(re, {
4106
4107
  title: e,
4107
4108
  description: t,
4108
4109
  avatar: n,
@@ -4129,7 +4130,7 @@ var _o = ({ text: e, description: t, avatar: n, confirmationText: r, onConfirm:
4129
4130
  defaultVariants: { selected: !1 }
4130
4131
  }), yo = c({ base: "text-lg font-semibold text-f1-foreground line-clamp-3" }), bo = c({ base: "text-sm text-f1-foreground-secondary leading-normal" }), xo = c({ base: "text-sm font-medium text-f1-foreground leading-normal" }), So = ({ description: e, isRevealed: r, onAskOne: i }) => {
4131
4132
  let a = p(), o = t();
4132
- return /* @__PURE__ */ X(J, { children: [e ? /* @__PURE__ */ Y("span", {
4133
+ return /* @__PURE__ */ X(Kt, { children: [e ? /* @__PURE__ */ Y("span", {
4133
4134
  className: y(bo(), "truncate"),
4134
4135
  children: e
4135
4136
  }) : null, /* @__PURE__ */ Y(n, { children: i && r ? /* @__PURE__ */ Y(s.div, {
@@ -4146,7 +4147,7 @@ var _o = ({ text: e, description: t, avatar: n, confirmationText: r, onConfirm:
4146
4147
  1
4147
4148
  ]
4148
4149
  },
4149
- children: /* @__PURE__ */ Y(ee, {
4150
+ children: /* @__PURE__ */ Y(se, {
4150
4151
  size: "md",
4151
4152
  label: a.ai.ask,
4152
4153
  onClick: (e) => {
@@ -4167,7 +4168,7 @@ var _o = ({ text: e, description: t, avatar: n, confirmationText: r, onConfirm:
4167
4168
  className: y(xo()),
4168
4169
  children: e
4169
4170
  }) : null]
4170
- }), To = ({ balance: e }) => /* @__PURE__ */ Y(Tt, {
4171
+ }), To = ({ balance: e }) => /* @__PURE__ */ Y(wt, {
4171
4172
  amount: e.amount,
4172
4173
  percentage: e.percentage ?? void 0,
4173
4174
  invertStatus: e.invertStatus,
@@ -4176,32 +4177,32 @@ var _o = ({ text: e, description: t, avatar: n, confirmationText: r, onConfirm:
4176
4177
  let { label: t } = e;
4177
4178
  return e.content === "person" ? /* @__PURE__ */ Y(wo, {
4178
4179
  label: t,
4179
- children: /* @__PURE__ */ Y(xt, {
4180
+ children: /* @__PURE__ */ Y(ht, {
4180
4181
  firstName: e.avatar.firstName,
4181
4182
  lastName: e.avatar.lastName,
4182
4183
  src: e.avatar.src,
4183
4184
  size: "xs"
4184
4185
  })
4185
- }) : e.content === "people" ? /* @__PURE__ */ Y(_t, {
4186
+ }) : e.content === "people" ? /* @__PURE__ */ Y(vt, {
4186
4187
  type: "person",
4187
4188
  avatars: e.avatars,
4188
4189
  size: "md",
4189
4190
  max: 3
4190
4191
  }) : e.content === "team" ? /* @__PURE__ */ Y(wo, {
4191
4192
  label: t,
4192
- children: /* @__PURE__ */ Y(ft, {
4193
+ children: /* @__PURE__ */ Y(bt, {
4193
4194
  name: e.avatar.name,
4194
4195
  src: e.avatar.src,
4195
4196
  size: "xs"
4196
4197
  })
4197
4198
  }) : e.content === "company" ? /* @__PURE__ */ Y(wo, {
4198
4199
  label: t,
4199
- children: /* @__PURE__ */ Y(vt, {
4200
+ children: /* @__PURE__ */ Y(_t, {
4200
4201
  name: e.avatar.name,
4201
4202
  src: e.avatar.src,
4202
4203
  size: "xs"
4203
4204
  })
4204
- }) : e.content === "alert" ? /* @__PURE__ */ Y(Dt, {
4205
+ }) : e.content === "alert" ? /* @__PURE__ */ Y(Et, {
4205
4206
  text: e.alertLabel,
4206
4207
  level: e.level
4207
4208
  }) : e.content === "balance" ? /* @__PURE__ */ Y(To, { balance: e.balance }) : null;
@@ -4267,17 +4268,17 @@ var Ao = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
4267
4268
  children: e
4268
4269
  });
4269
4270
  }, Mo = ({ data: e, label: t, invertStatus: n }) => {
4270
- let r = `sparkline-gradient-${Wt().replace(/:/g, "")}`, i = ko(e, n), a = Oo[i];
4271
+ let r = `sparkline-gradient-${Ut().replace(/:/g, "")}`, i = ko(e, n), a = Oo[i];
4271
4272
  return /* @__PURE__ */ Y("div", {
4272
4273
  className: "flex flex-1 flex-col",
4273
4274
  children: /* @__PURE__ */ X("div", {
4274
4275
  className: "relative w-full flex-1",
4275
4276
  role: "img",
4276
4277
  "aria-label": `Sparkline chart showing ${i} trend`,
4277
- children: [/* @__PURE__ */ Y(se, {
4278
+ children: [/* @__PURE__ */ Y(ce, {
4278
4279
  width: "100%",
4279
4280
  height: "100%",
4280
- children: /* @__PURE__ */ X(ge, {
4281
+ children: /* @__PURE__ */ X(_e, {
4281
4282
  data: e,
4282
4283
  margin: {
4283
4284
  top: 4,
@@ -4302,11 +4303,11 @@ var Ao = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
4302
4303
  stopOpacity: .02
4303
4304
  })]
4304
4305
  }) }),
4305
- /* @__PURE__ */ Y(ve, {
4306
+ /* @__PURE__ */ Y(ye, {
4306
4307
  hide: !0,
4307
4308
  domain: ["dataMin - 1", "dataMax + 1"]
4308
4309
  }),
4309
- /* @__PURE__ */ Y(E, {
4310
+ /* @__PURE__ */ Y(T, {
4310
4311
  type: "linear",
4311
4312
  dataKey: "value",
4312
4313
  stroke: a.stroke,
@@ -4314,7 +4315,7 @@ var Ao = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
4314
4315
  fill: `url(#${r})`,
4315
4316
  fillOpacity: 1,
4316
4317
  isAnimationActive: !1,
4317
- dot: (t) => /* @__PURE__ */ Vt(Ao, {
4318
+ dot: (t) => /* @__PURE__ */ Bt(Ao, {
4318
4319
  ...t,
4319
4320
  key: t.index,
4320
4321
  dataLength: e.length,
@@ -4330,8 +4331,8 @@ var Ao = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
4330
4331
  })]
4331
4332
  })
4332
4333
  });
4333
- }, No = H((e, n) => {
4334
- let { description: r, heading: i, label: a, selected: o = !1, onClick: c, onAskOne: l, className: u, ...d } = e, [f, p] = q(!1), [m, h] = q(!1), g = f || m, _ = t(), v = g && !!l, x = {
4334
+ }, No = U((e, n) => {
4335
+ let { description: r, heading: i, label: a, selected: o = !1, onClick: c, onAskOne: l, className: u, ...d } = e, [f, p] = J(!1), [m, h] = J(!1), g = f || m, _ = t(), v = g && !!l, x = {
4335
4336
  duration: _ ? 0 : .2,
4336
4337
  ease: [
4337
4338
  .33,
@@ -4342,7 +4343,7 @@ var Ao = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
4342
4343
  };
4343
4344
  return /* @__PURE__ */ X("div", {
4344
4345
  className: "relative",
4345
- children: [o ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("div", {
4346
+ children: [o ? /* @__PURE__ */ X(Kt, { children: [/* @__PURE__ */ Y("div", {
4346
4347
  "data-testid": "selected-border",
4347
4348
  className: y("absolute -inset-px rounded-2xl", "[--gradient-angle:0deg]", "bg-[conic-gradient(from_var(--gradient-angle),hsla(229,57%,76%,0.7),hsla(348,80%,50%,0.7),hsla(348,80%,50%,0.7),hsla(18,80%,50%,0.7),hsla(229,57%,76%,0.7),hsla(229,57%,76%,0.7))]", "animate-rotate-gradient")
4348
4349
  }), /* @__PURE__ */ Y("div", {
@@ -4395,7 +4396,7 @@ var Ao = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
4395
4396
  No.displayName = "F0AiInsightCardInternal";
4396
4397
  //#endregion
4397
4398
  //#region src/addons/ai/ai/F0AiInsightCard/F0AiInsightCard.tsx
4398
- var Po = ["className"], Fo = H((e, t) => {
4399
+ var Po = ["className"], Fo = U((e, t) => {
4399
4400
  let n = Po.reduce((e, t) => {
4400
4401
  let { [t]: n, ...r } = e;
4401
4402
  return r;
@@ -4406,7 +4407,7 @@ var Po = ["className"], Fo = H((e, t) => {
4406
4407
  });
4407
4408
  });
4408
4409
  Fo.displayName = "F0AiInsightCard";
4409
- var Io = a(ie(Fo, () => /* @__PURE__ */ X("div", {
4410
+ var Io = a(z(Fo, () => /* @__PURE__ */ X("div", {
4410
4411
  className: "flex w-[217px] h-[200px] flex-col gap-2 rounded-2xl border border-solid border-f1-border-secondary bg-f1-background p-4",
4411
4412
  "aria-busy": "true",
4412
4413
  "aria-live": "polite",
@@ -4431,8 +4432,8 @@ var Io = a(ie(Fo, () => /* @__PURE__ */ X("div", {
4431
4432
  "sparkline"
4432
4433
  ], Ro = 180, zo = (e) => Number.isFinite(e) ? Math.max(0, Math.floor(e)) : Ro, Bo = (e, t) => e.length <= t ? e : `${e.slice(0, t).trimEnd()}...`, Vo = (e) => e.showActions !== !1, Ho = (e) => Object.fromEntries(Object.entries(e).filter(([e]) => e.startsWith("data-")));
4433
4434
  function Uo(e) {
4434
- let { module: t, heading: n, title: r, subtitle: i, description: a, seeMoreLabel: s, maxCollapsedDescriptionLength: c = Ro } = e, [l, u] = q(!1), d = Wt(), f = K(null), p = zo(c), m = a.length > p, h = l ? a : Bo(a, p), g = Vo(e) ? e : null, _ = Ho(e);
4435
- return W(() => {
4435
+ let { module: t, heading: n, title: r, subtitle: i, description: a, seeMoreLabel: s, maxCollapsedDescriptionLength: c = Ro } = e, [l, u] = J(!1), d = Ut(), f = q(null), p = zo(c), m = a.length > p, h = l ? a : Bo(a, p), g = Vo(e) ? e : null, _ = Ho(e);
4436
+ return G(() => {
4436
4437
  l && f.current?.focus();
4437
4438
  }, [l]), /* @__PURE__ */ X("section", {
4438
4439
  className: "overflow-hidden rounded-xl border border-solid border-f1-border-secondary bg-f1-background",
@@ -4440,7 +4441,7 @@ function Uo(e) {
4440
4441
  children: [
4441
4442
  /* @__PURE__ */ X("div", {
4442
4443
  className: "flex items-center gap-3 px-4 py-3",
4443
- children: [t ? /* @__PURE__ */ Y(mt, {
4444
+ children: [t ? /* @__PURE__ */ Y(pt, {
4444
4445
  module: t,
4445
4446
  size: "md"
4446
4447
  }) : null, /* @__PURE__ */ X("div", {
@@ -4464,7 +4465,7 @@ function Uo(e) {
4464
4465
  ref: f,
4465
4466
  tabIndex: l ? -1 : void 0,
4466
4467
  className: y("text-base text-f1-foreground whitespace-pre-wrap break-words", l && b(), !l && "inline"),
4467
- children: [h, m && !l ? /* @__PURE__ */ X(J, { children: [" ", /* @__PURE__ */ Y("button", {
4468
+ children: [h, m && !l ? /* @__PURE__ */ X(Kt, { children: [" ", /* @__PURE__ */ Y("button", {
4468
4469
  type: "button",
4469
4470
  className: y("inline cursor-pointer rounded-none border-0 bg-transparent p-0 text-base text-f1-foreground underline underline-offset-2 hover:text-f1-foreground-secondary", b()),
4470
4471
  "aria-controls": d,
@@ -4490,12 +4491,12 @@ Uo.displayName = "F0AiProposalCard";
4490
4491
  //#endregion
4491
4492
  //#region src/blocks/ai/F0AiMessageSources/components/CollapsibleMessage.tsx
4492
4493
  var Wo = ({ icon: e, title: n, children: r }) => {
4493
- let [i, a] = q(!1), o = t();
4494
- return /* @__PURE__ */ X(P, {
4494
+ let [i, a] = J(!1), o = t();
4495
+ return /* @__PURE__ */ X(I, {
4495
4496
  className: "mb-1 w-full",
4496
4497
  open: i,
4497
4498
  onOpenChange: a,
4498
- children: [/* @__PURE__ */ X(he, {
4499
+ children: [/* @__PURE__ */ X(me, {
4499
4500
  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
4501
  children: [
4501
4502
  /* @__PURE__ */ Y("span", {
@@ -4510,7 +4511,7 @@ var Wo = ({ icon: e, title: n, children: r }) => {
4510
4511
  children: n
4511
4512
  }),
4512
4513
  /* @__PURE__ */ Y(u, {
4513
- icon: Ct,
4514
+ icon: St,
4514
4515
  className: "h-4 w-4 transition-transform duration-200"
4515
4516
  })
4516
4517
  ]
@@ -4538,7 +4539,7 @@ var Wo = ({ icon: e, title: n, children: r }) => {
4538
4539
  })
4539
4540
  })]
4540
4541
  });
4541
- }, Go = (e) => pe[e] ?? zt, Ko = ({ iconName: e }) => e ? /* @__PURE__ */ Y("div", {
4542
+ }, Go = (e) => P[e] ?? Rt, Ko = ({ iconName: e }) => e ? /* @__PURE__ */ Y("div", {
4542
4543
  className: "mr-1 flex items-center justify-center",
4543
4544
  children: /* @__PURE__ */ Y(u, {
4544
4545
  icon: Go(e),
@@ -4582,26 +4583,26 @@ qo.displayName = "F0AiMessageSources";
4582
4583
  //#endregion
4583
4584
  //#region src/addons/ai/ai/F0AiTableCard/F0AiTableCard.tsx
4584
4585
  async function Jo(e, t, n) {
4585
- let r = O(e), i = t === "xlsx" ? await it([{
4586
+ let r = ee(e), i = t === "xlsx" ? await rt([{
4586
4587
  name: "Data",
4587
4588
  rows: r
4588
- }]) : await at(r);
4589
- ce(i, `${n}.${t}`);
4589
+ }]) : await it(r);
4590
+ le(i, `${n}.${t}`);
4590
4591
  }
4591
4592
  function Yo({ dataset: e, title: t, filename: n }) {
4592
- let r = p(), i = K(null), a = t ?? r.ai.aiTable.title, o = U((e) => {
4593
+ let r = p(), i = q(null), a = t ?? r.ai.aiTable.title, o = W((e) => {
4593
4594
  if (!i.current) return;
4594
4595
  let t = n ?? (a.replace(/\s+/g, "_").toLowerCase() || "table");
4595
4596
  Jo(i.current, e, t);
4596
4597
  }, [a, n]);
4597
- return e.columns?.length ? /* @__PURE__ */ X(S, {
4598
+ return e.columns?.length ? /* @__PURE__ */ X(x, {
4598
4599
  display: "flex",
4599
4600
  flexDirection: "column",
4600
4601
  gap: "md",
4601
4602
  borderRadius: "md",
4602
4603
  border: "default",
4603
4604
  borderColor: "secondary",
4604
- children: [/* @__PURE__ */ X(S, {
4605
+ children: [/* @__PURE__ */ X(x, {
4605
4606
  display: "flex",
4606
4607
  alignItems: "center",
4607
4608
  justifyContent: "between",
@@ -4615,20 +4616,20 @@ function Yo({ dataset: e, title: t, filename: n }) {
4615
4616
  tag: "h2",
4616
4617
  className: "text-base font-medium capitalize text-f1-foreground",
4617
4618
  children: a
4618
- }), /* @__PURE__ */ Y(ye, {
4619
- icon: k,
4619
+ }), /* @__PURE__ */ Y(be, {
4620
+ icon: B,
4620
4621
  size: "md",
4621
4622
  items: [{
4622
4623
  label: r.ai.aiTable.downloadExcel,
4623
- icon: k,
4624
+ icon: B,
4624
4625
  onClick: () => o("xlsx")
4625
4626
  }, {
4626
4627
  label: r.ai.aiTable.downloadCsv,
4627
- icon: k,
4628
+ icon: B,
4628
4629
  onClick: () => o("csv")
4629
4630
  }]
4630
4631
  })]
4631
- }), /* @__PURE__ */ Y(S, {
4632
+ }), /* @__PURE__ */ Y(x, {
4632
4633
  overflowX: "auto",
4633
4634
  children: /* @__PURE__ */ X("table", {
4634
4635
  ref: i,
@@ -4651,7 +4652,7 @@ Yo.displayName = "F0AiTableCard";
4651
4652
  //#endregion
4652
4653
  //#region src/addons/ai/ai/F0AiChatHeader/components/CreditsPopover.tsx
4653
4654
  function Xo({ credits: e, trigger: t }) {
4654
- let n = p(), [r, a] = q(!1), [c, u] = q(!1), [d, f] = q(!1), [m, g] = q(null), y = U((t) => {
4655
+ let n = p(), [r, a] = J(!1), [c, u] = J(!1), [d, f] = J(!1), [m, g] = J(null), y = W((t) => {
4655
4656
  a(t), t && e?.fetchUsage && (u(!0), f(!1), e.fetchUsage().then((e) => {
4656
4657
  g(e), f(!1);
4657
4658
  }).catch(() => {
@@ -4671,7 +4672,7 @@ function Xo({ credits: e, trigger: t }) {
4671
4672
  variant: "ghost",
4672
4673
  hideLabel: !0,
4673
4674
  label: n.t("ai.credits.title"),
4674
- icon: Ae,
4675
+ icon: Ke,
4675
4676
  pressed: r
4676
4677
  })
4677
4678
  }), /* @__PURE__ */ X(l, {
@@ -4683,7 +4684,7 @@ function Xo({ credits: e, trigger: t }) {
4683
4684
  className: "flex w-[324px] flex-col gap-3 rounded-md border border-solid border-f1-border-secondary p-3",
4684
4685
  children: [x ? /* @__PURE__ */ X("div", {
4685
4686
  className: "flex min-w-0 max-w-full flex-1 items-center gap-2 overflow-hidden text-left text-lg text-f1-foreground",
4686
- children: [/* @__PURE__ */ Y(vt, {
4687
+ children: [/* @__PURE__ */ Y(_t, {
4687
4688
  name: e.companyName ?? "",
4688
4689
  src: e.companyLogoUrl,
4689
4690
  size: "lg"
@@ -4722,7 +4723,7 @@ function Xo({ credits: e, trigger: t }) {
4722
4723
  className: "text-sm text-f1-foreground-secondary",
4723
4724
  children: n.t("ai.credits.creditsError")
4724
4725
  }) : null,
4725
- !c && !d && m ? /* @__PURE__ */ X(J, { children: [
4726
+ !c && !d && m ? /* @__PURE__ */ X(Kt, { children: [
4726
4727
  /* @__PURE__ */ X("div", {
4727
4728
  className: "flex justify-between",
4728
4729
  children: [/* @__PURE__ */ Y("span", {
@@ -4769,7 +4770,7 @@ function Xo({ credits: e, trigger: t }) {
4769
4770
  variant: "outlinePromote",
4770
4771
  href: e.upgradePlanUrl,
4771
4772
  label: n.t("ai.credits.upgradePlan"),
4772
- icon: I
4773
+ icon: he
4773
4774
  })]
4774
4775
  }) : null]
4775
4776
  })]
@@ -4853,7 +4854,7 @@ var Zo = "linear-gradient(90deg, #E55619, #A1ADE5, #E51943, #E55619)", Qo = ({ l
4853
4854
  });
4854
4855
  };
4855
4856
  function $o({ employeeCredits: e, trigger: t }) {
4856
- let n = p(), [r, a] = q(!1), [o, s] = q(!1), [c, u] = q(!1), [d, f] = q(null), m = U((t) => {
4857
+ let n = p(), [r, a] = J(!1), [o, s] = J(!1), [c, u] = J(!1), [d, f] = J(null), m = W((t) => {
4857
4858
  a(t), t && e?.fetchUsage && (s(!0), u(!1), e.fetchUsage().then((e) => {
4858
4859
  f(e), u(!1);
4859
4860
  }).catch(() => {
@@ -4873,7 +4874,7 @@ function $o({ employeeCredits: e, trigger: t }) {
4873
4874
  variant: "ghost",
4874
4875
  hideLabel: !0,
4875
4876
  label: n.t("ai.credits.title"),
4876
- icon: Ae,
4877
+ icon: Ke,
4877
4878
  pressed: r
4878
4879
  })
4879
4880
  }), /* @__PURE__ */ X(l, {
@@ -4885,7 +4886,7 @@ function $o({ employeeCredits: e, trigger: t }) {
4885
4886
  className: "flex w-[324px] flex-col gap-3 rounded-md border border-solid border-f1-border-secondary p-3",
4886
4887
  children: [g ? /* @__PURE__ */ X("div", {
4887
4888
  className: "flex min-w-0 max-w-full flex-1 items-center gap-2 overflow-hidden text-left text-lg text-f1-foreground",
4888
- children: [/* @__PURE__ */ Y(vt, {
4889
+ children: [/* @__PURE__ */ Y(_t, {
4889
4890
  name: e.companyName ?? "",
4890
4891
  src: e.companyLogoUrl,
4891
4892
  size: "lg"
@@ -4917,20 +4918,20 @@ var es = ({ credits: e, employeeCredits: t, trigger: n }) => t ? /* @__PURE__ */
4917
4918
  }) : e ? /* @__PURE__ */ Y(Xo, {
4918
4919
  credits: e,
4919
4920
  trigger: n
4920
- }) : null, ts = es, ns = ({ historyEnabled: n = !1, title: r, currentThreadTitle: i, fullscreen: a = !1, lockVisualizationMode: o = !1, onToggleVisualizationMode: c, onClose: l, onNewChat: d, onOpenHistory: f, hasMessages: m = !1, credits: h, employeeCredits: g, compact: b = !1, actions: S }) => {
4921
- let C = p(), w = t(), { panelOverlays: T } = B(), E = !o && !T && /* @__PURE__ */ Y(_, {
4921
+ }) : null, ts = es, ns = ({ historyEnabled: n = !1, title: r, currentThreadTitle: i, fullscreen: a = !1, lockVisualizationMode: o = !1, onToggleVisualizationMode: c, onClose: l, onNewChat: d, onOpenHistory: f, hasMessages: m = !1, credits: h, employeeCredits: g, compact: b = !1, actions: x }) => {
4922
+ let C = p(), w = t(), { panelOverlays: T } = V(), E = !o && !T && /* @__PURE__ */ Y(_, {
4922
4923
  variant: "ghost",
4923
4924
  hideLabel: !0,
4924
4925
  label: a ? C.ai.collapseChat : C.ai.expandChat,
4925
- icon: a ? me : L,
4926
+ icon: a ? F : ge,
4926
4927
  onClick: c
4927
4928
  }), D = /* @__PURE__ */ Y(_, {
4928
4929
  variant: "ghost",
4929
4930
  hideLabel: !0,
4930
4931
  label: C.ai.closeChat,
4931
- icon: x,
4932
+ icon: S,
4932
4933
  onClick: l
4933
- }), O = S?.map((e) => /* @__PURE__ */ Y(_, {
4934
+ }), O = x?.map((e) => /* @__PURE__ */ Y(_, {
4934
4935
  variant: "ghost",
4935
4936
  hideLabel: !0,
4936
4937
  label: e.label,
@@ -4974,7 +4975,7 @@ var es = ({ credits: e, employeeCredits: t, trigger: n }) => t ? /* @__PURE__ */
4974
4975
  className: "min-w-0 text-left",
4975
4976
  children: i ?? C.ai.newConversation
4976
4977
  }), /* @__PURE__ */ Y(u, {
4977
- icon: bt,
4978
+ icon: yt,
4978
4979
  color: "default",
4979
4980
  size: "md"
4980
4981
  })]
@@ -5019,7 +5020,7 @@ var es = ({ credits: e, employeeCredits: t, trigger: n }) => t ? /* @__PURE__ */
5019
5020
  variant: "ghost",
5020
5021
  hideLabel: !0,
5021
5022
  label: C.ai.startNewChat,
5022
- icon: F,
5023
+ icon: te,
5023
5024
  onClick: d
5024
5025
  }) : null,
5025
5026
  /* @__PURE__ */ Y(es, {
@@ -5037,14 +5038,14 @@ var es = ({ credits: e, employeeCredits: t, trigger: n }) => t ? /* @__PURE__ */
5037
5038
  //#region src/addons/ai/ai/F0AiChatHistory/utils.ts
5038
5039
  function rs(e) {
5039
5040
  let t = new Date(e), n = /* @__PURE__ */ new Date();
5040
- return Ge(t) ? "today" : ke(t) ? "yesterday" : jt(t, n) ? "thisMonth" : "older";
5041
+ return Ge(t) ? "today" : je(t) ? "yesterday" : At(t, n) ? "thisMonth" : "older";
5041
5042
  }
5042
5043
  function is(e, t, n) {
5043
- let r = new Date(e), i = Rt(r, "p", { locale: n });
5044
+ let r = new Date(e), i = Lt(r, "p", { locale: n });
5044
5045
  if (Ge(r)) return `${t.today}, ${i}`;
5045
- if (ke(r)) return `${t.yesterday}, ${i}`;
5046
- let a = !Lt(r, /* @__PURE__ */ new Date());
5047
- return `${Rt(r, a ? "MMM d yyyy" : "MMM d", { locale: n })}, ${i}`;
5046
+ if (je(r)) return `${t.yesterday}, ${i}`;
5047
+ let a = !It(r, /* @__PURE__ */ new Date());
5048
+ return `${Lt(r, a ? "MMM d yyyy" : "MMM d", { locale: n })}, ${i}`;
5048
5049
  }
5049
5050
  function as(e) {
5050
5051
  let t = {
@@ -5067,13 +5068,13 @@ function as(e) {
5067
5068
  //#endregion
5068
5069
  //#region src/addons/ai/ai/F0AiChatHistory/components/ThreadItem.tsx
5069
5070
  function os({ thread: e, isPinned: t, isActive: n = !1, isPending: r = !1, onSelect: i, onPin: a, onUnpin: o, onDelete: s, className: c }) {
5070
- let l = p(), d = It(), f = G(() => [{
5071
+ let l = p(), d = Ft(), f = K(() => [{
5071
5072
  label: t ? l.ai.unpinChat : l.ai.pinChat,
5072
- icon: t ? Se : ot,
5073
+ icon: t ? at : ue,
5073
5074
  onClick: () => t ? o(e.id) : a(e.id)
5074
5075
  }, {
5075
5076
  label: l.ai.deleteChat,
5076
- icon: Ie,
5077
+ icon: L,
5077
5078
  critical: !0,
5078
5079
  onClick: () => s(e.id)
5079
5080
  }], [
@@ -5082,7 +5083,7 @@ function os({ thread: e, isPinned: t, isActive: n = !1, isPending: r = !1, onSel
5082
5083
  a,
5083
5084
  o,
5084
5085
  s
5085
- ]), m = G(() => is(e.updatedAt, {
5086
+ ]), m = K(() => is(e.updatedAt, {
5086
5087
  today: l.ai.today,
5087
5088
  yesterday: l.ai.yesterday
5088
5089
  }, d), [
@@ -5128,13 +5129,13 @@ function os({ thread: e, isPinned: t, isActive: n = !1, isPending: r = !1, onSel
5128
5129
  r ? /* @__PURE__ */ Y("div", {
5129
5130
  className: "flex h-7 w-7 shrink-0 items-center justify-center",
5130
5131
  "aria-label": l.ai.threadOptions,
5131
- children: /* @__PURE__ */ Y(kt, { size: "small" })
5132
+ children: /* @__PURE__ */ Y(Ot, { size: "small" })
5132
5133
  }) : /* @__PURE__ */ Y("div", {
5133
5134
  className: y("hidden items-center", "group-hover:flex group-focus-within:flex", "has-[[aria-expanded=true]]:flex"),
5134
- children: /* @__PURE__ */ Y(ye, {
5135
+ children: /* @__PURE__ */ Y(be, {
5135
5136
  items: f,
5136
5137
  children: /* @__PURE__ */ Y(_, {
5137
- icon: ue,
5138
+ icon: A,
5138
5139
  variant: "ghost",
5139
5140
  size: "sm",
5140
5141
  label: l.ai.threadOptions,
@@ -5148,9 +5149,9 @@ function os({ thread: e, isPinned: t, isActive: n = !1, isPending: r = !1, onSel
5148
5149
  //#endregion
5149
5150
  //#region src/addons/ai/ai/F0AiChatHistory/components/CollapsibleGroup.tsx
5150
5151
  function ss({ label: e, threads: t, pinnedIds: n, onSelect: r, onPin: i, onUnpin: a, onDelete: o }) {
5151
- let [s, c] = q(!0), l = U(() => {
5152
+ let [s, c] = J(!0), l = W(() => {
5152
5153
  c((e) => !e);
5153
- }, []), d = U((e) => {
5154
+ }, []), d = W((e) => {
5154
5155
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), l());
5155
5156
  }, [l]);
5156
5157
  return /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ X("div", {
@@ -5163,7 +5164,7 @@ function ss({ label: e, threads: t, pinnedIds: n, onSelect: r, onPin: i, onUnpin
5163
5164
  className: "text-sm font-medium capitalize tracking-wide text-f1-foreground-secondary",
5164
5165
  children: e
5165
5166
  }), /* @__PURE__ */ Y(u, {
5166
- icon: s ? bt : wt,
5167
+ icon: s ? yt : Ct,
5167
5168
  color: "secondary",
5168
5169
  size: "xs"
5169
5170
  })]
@@ -5214,14 +5215,14 @@ function ds() {
5214
5215
  //#endregion
5215
5216
  //#region src/addons/ai/ai/F0AiChatHistory/F0AiChatHistory.tsx
5216
5217
  var fs = ({ onClose: t, onSelectThread: n, onNewChat: r, threads: i, isLoading: a, error: o, pinnedIds: s, onPinThread: c, onUnpinThread: l, onDeleteThread: d }) => {
5217
- let f = p(), [m, h] = q("");
5218
- W(() => {
5218
+ let f = p(), [m, h] = J("");
5219
+ G(() => {
5219
5220
  let e = (e) => {
5220
5221
  e.key === "Escape" && t();
5221
5222
  };
5222
5223
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
5223
5224
  }, [t]);
5224
- let g = G(() => ({
5225
+ let g = K(() => ({
5225
5226
  today: f.ai.today,
5226
5227
  yesterday: f.ai.yesterday,
5227
5228
  thisMonth: f.ai.thisMonth,
@@ -5231,18 +5232,18 @@ var fs = ({ onClose: t, onSelectThread: n, onNewChat: r, threads: i, isLoading:
5231
5232
  f.ai.yesterday,
5232
5233
  f.ai.thisMonth,
5233
5234
  f.ai.older
5234
- ]), _ = G(() => {
5235
+ ]), _ = K(() => {
5235
5236
  if (!m.trim()) return i;
5236
5237
  let e = m.toLowerCase();
5237
5238
  return i.filter((t) => t.title.toLowerCase().includes(e));
5238
- }, [i, m]), b = G(() => _.filter((e) => s.has(e.id)), [_, s]), x = G(() => _.filter((e) => !s.has(e.id)), [_, s]), S = G(() => as(x), [x]), C = U((e, r) => {
5239
+ }, [i, m]), b = K(() => _.filter((e) => s.has(e.id)), [_, s]), x = K(() => _.filter((e) => !s.has(e.id)), [_, s]), S = K(() => as(x), [x]), C = W((e, r) => {
5239
5240
  n(e, r), t();
5240
- }, [n, t]), w = U(() => {
5241
+ }, [n, t]), w = W(() => {
5241
5242
  r(), t();
5242
- }, [r, t]), T = U((e) => {
5243
+ }, [r, t]), T = W((e) => {
5243
5244
  d(e);
5244
5245
  }, [d]), E = b.length > 0 || S.length > 0;
5245
- return qt(/* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("div", {
5246
+ return qt(/* @__PURE__ */ X(Kt, { children: [/* @__PURE__ */ Y("div", {
5246
5247
  className: "fixed inset-0 z-50 bg-f1-background-overlay animate-in fade-in-0",
5247
5248
  onClick: t,
5248
5249
  "aria-hidden": "true"
@@ -5277,7 +5278,7 @@ var fs = ({ onClose: t, onSelectThread: n, onNewChat: r, threads: i, isLoading:
5277
5278
  children: /* @__PURE__ */ X("div", {
5278
5279
  className: "flex w-full items-center gap-2",
5279
5280
  children: [/* @__PURE__ */ Y(u, {
5280
- icon: F,
5281
+ icon: te,
5281
5282
  color: "default",
5282
5283
  size: "md"
5283
5284
  }), /* @__PURE__ */ Y(v, {
@@ -5320,14 +5321,14 @@ var fs = ({ onClose: t, onSelectThread: n, onNewChat: r, threads: i, isLoading:
5320
5321
  })] }), document.body);
5321
5322
  }, ps = "f0-ai-pinned-threads";
5322
5323
  function ms() {
5323
- let e = _e(ps, []);
5324
+ let e = ve(ps, []);
5324
5325
  return new Set(Array.isArray(e) ? e : []);
5325
5326
  }
5326
5327
  function hs(e) {
5327
- ae(ps, [...e]);
5328
+ oe(ps, [...e]);
5328
5329
  }
5329
5330
  function gs({ enabled: e = !1, fetchThreads: t, deleteThread: n, pinThread: r, unpinThread: i }) {
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 () => {
5331
+ let [a, o] = J([]), [s, c] = J(!1), [l, u] = J(null), [d, f] = J(ms), [p, m] = J(() => /* @__PURE__ */ new Set()), h = W(async () => {
5331
5332
  c(!0), u(null);
5332
5333
  try {
5333
5334
  let e = await t();
@@ -5339,22 +5340,22 @@ function gs({ enabled: e = !1, fetchThreads: t, deleteThread: n, pinThread: r, u
5339
5340
  c(!1);
5340
5341
  }
5341
5342
  }, [t]);
5342
- W(() => {
5343
+ G(() => {
5343
5344
  e && h();
5344
5345
  }, [e, h]);
5345
- let g = U((e, t) => {
5346
+ let g = W((e, t) => {
5346
5347
  f((n) => {
5347
5348
  if (t === n.has(e)) return n;
5348
5349
  let r = new Set(n);
5349
5350
  return t ? r.add(e) : r.delete(e), hs(r), r;
5350
5351
  });
5351
- }, []), _ = U((e, t) => {
5352
+ }, []), _ = W((e, t) => {
5352
5353
  m((n) => {
5353
5354
  if (t === n.has(e)) return n;
5354
5355
  let r = new Set(n);
5355
5356
  return t ? r.add(e) : r.delete(e), r;
5356
5357
  });
5357
- }, []), v = U((e, t) => {
5358
+ }, []), v = W((e, t) => {
5358
5359
  let n = t ? r : i;
5359
5360
  g(e, t), n && (_(e, !0), n(e).catch(() => g(e, !t)).finally(() => _(e, !1)));
5360
5361
  }, [
@@ -5370,9 +5371,9 @@ function gs({ enabled: e = !1, fetchThreads: t, deleteThread: n, pinThread: r, u
5370
5371
  refetch: h,
5371
5372
  pinnedIds: d,
5372
5373
  pendingIds: p,
5373
- pinThread: U((e) => v(e, !0), [v]),
5374
- unpinThread: U((e) => v(e, !1), [v]),
5375
- deleteThread: U(async (e) => {
5374
+ pinThread: W((e) => v(e, !0), [v]),
5375
+ unpinThread: W((e) => v(e, !1), [v]),
5376
+ deleteThread: W(async (e) => {
5376
5377
  _(e, !0);
5377
5378
  try {
5378
5379
  await n(e), o((t) => t.filter((t) => t.id !== e)), f((t) => {
@@ -5394,7 +5395,7 @@ function gs({ enabled: e = !1, fetchThreads: t, deleteThread: n, pinThread: r, u
5394
5395
  }
5395
5396
  //#endregion
5396
5397
  //#region src/addons/ai/ai/F0AiChatUsageLimits/types.ts
5397
- var _s = ["top", "bottom"], vs = s.create(A), ys = ({ label: e, reduceMotion: t }) => /* @__PURE__ */ X("div", {
5398
+ var _s = ["top", "bottom"], vs = s.create(k), ys = ({ label: e, reduceMotion: t }) => /* @__PURE__ */ X("div", {
5398
5399
  role: "status",
5399
5400
  "aria-live": "polite",
5400
5401
  className: "flex flex-row items-center gap-1 rounded-full border border-solid border-f1-border-secondary bg-f1-background px-2 py-1.5 pr-2.5 shadow-md",
@@ -5447,9 +5448,9 @@ var _s = ["top", "bottom"], vs = s.create(A), ys = ({ label: e, reduceMotion: t
5447
5448
  className: "font-medium",
5448
5449
  children: e
5449
5450
  })]
5450
- }), bs = Ht(function({ active: e, label: r, className: i, children: a }) {
5451
+ }), bs = Vt(function({ active: e, label: r, className: i, children: a }) {
5451
5452
  let { t: o } = p(), c = t(), l = r ?? o("ai.applyingChanges");
5452
- return W(() => {
5453
+ return G(() => {
5453
5454
  if (!e) return;
5454
5455
  let t = document.activeElement;
5455
5456
  t && t.getAttribute("name") !== "one-ai-input" && t.blur();