@epam/ai-dial-projects 1.3.0-dev.253 → 1.3.0-dev.259

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,266 +1,302 @@
1
- import { DeleteConfirmationDialog as e, InitialsAvatar as t, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as n, MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as r, MarkdownRenderer as i, PROHIBITED_CONVERSATION_NAME_CHARS_RE as a, PanelEmptyState as o, RequestStatus as s, TextRefinementField as c, buildCssVars as ee, getAttachmentTypeFromMime as l, inferMimeTypeFromPath as u, mergeClasses as d, useAvailableHeightCap as f, useTextRefinement as p } from "@epam/ai-dial-chat-shared";
2
- import { Button as m, ButtonAppearance as h, ButtonDropdown as g, ButtonVariant as _, CardShell as v, DIAL_ICON_SIZE as y, DIAL_KIT_ICON_STROKE as b, Dropdown as x, ElementSize as S, EllipsisTooltip as C, ErrorText as w, FileDropzone as T, FolderPath as E, GhostButton as D, GhostIconButton as O, Highlight as k, Input as te, Label as A, LiveRegion as j, LiveRegionElement as ne, LiveRegionPoliteness as M, MenuItemMark as N, NeutralButton as re, Popup as P, PopupSize as ie, ProgressBar as F, ProgressBarRole as I, Search as L, Spinner as ae, Textarea as R } from "@epam/ai-dial-ui-kit";
3
- import { IconArrowNarrowLeft as z, IconArrowsSort as oe, IconDotsVertical as se, IconPin as ce, IconPinFilled as le } from "@tabler/icons-react";
4
- import { Suspense as ue, lazy as de, memo as B, useCallback as V, useEffect as fe, useId as H, useMemo as U, useRef as W, useState as G } from "react";
5
- import { Fragment as pe, jsx as K, jsxs as q } from "react/jsx-runtime";
6
- import { AttachmentCard as me, FileDndOverlay as he } from "@epam/ai-dial-attachment-input";
7
- import { BuilderFormContainer as ge } from "@epam/ai-dial-builder-form";
8
- import { LazyMarkdownEditor as _e } from "@epam/ai-dial-ui-kit/editors";
1
+ import { DeleteConfirmationDialog as e, InitialsAvatar as t, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as n, MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as r, MarkdownRenderer as i, PROHIBITED_CONVERSATION_NAME_CHARS_RE as a, PanelEmptyState as o, RequestStatus as s, TextRefinementField as c, buildCssVars as ee, getAttachmentTypeFromMime as l, inferMimeTypeFromPath as u, mergeClasses as d, useAvailableHeightCap as f, useIsMobile as p, useTextRefinement as m } from "@epam/ai-dial-chat-shared";
2
+ import { Button as h, ButtonAppearance as g, ButtonDropdown as _, ButtonVariant as v, CardShell as y, DIAL_ICON_SIZE as b, DIAL_KIT_ICON_STROKE as x, Dropdown as S, ElementSize as C, EllipsisTooltip as w, ErrorText as T, FileDropzone as E, FolderPath as D, GhostButton as O, GhostIconButton as k, Highlight as A, Input as j, Label as M, LiveRegion as te, LiveRegionElement as N, LiveRegionPoliteness as P, MenuItemMark as F, NeutralButton as ne, Popup as re, PopupSize as ie, ProgressBar as I, ProgressBarRole as L, Search as ae, Spinner as oe, Textarea as se } from "@epam/ai-dial-ui-kit";
3
+ import { IconArrowNarrowLeft as ce, IconArrowsSort as le, IconDotsVertical as ue, IconPin as R, IconPinFilled as de, IconPlus as fe } from "@tabler/icons-react";
4
+ import { Suspense as pe, lazy as z, memo as B, useCallback as V, useEffect as me, useId as H, useMemo as U, useRef as W, useState as G } from "react";
5
+ import { Fragment as he, jsx as K, jsxs as q } from "react/jsx-runtime";
6
+ import { AttachmentCard as ge, FileDndOverlay as _e } from "@epam/ai-dial-attachment-input";
7
+ import { BuilderFormContainer as ve } from "@epam/ai-dial-builder-form";
8
+ import { LazyMarkdownEditor as J } from "@epam/ai-dial-ui-kit/editors";
9
9
  //#region src/types/projects-sort-key.ts
10
- var ve = /* @__PURE__ */ function(e) {
10
+ var Y = /* @__PURE__ */ function(e) {
11
11
  return e.Newest = "newest", e.Oldest = "oldest", e.NameAsc = "name-asc", e;
12
- }({}), J = (e, t) => {
12
+ }({}), ye = (e, t) => {
13
13
  let n = t.trim().toLocaleLowerCase();
14
14
  return n ? e.filter((e) => e.name.toLocaleLowerCase().includes(n)) : e;
15
- }, ye = (e, t, n) => {
15
+ }, be = (e, t, n) => {
16
16
  let r = new Intl.Collator(n, {
17
17
  sensitivity: "base",
18
18
  numeric: !0
19
19
  }), i = (e, t) => r.compare(e.name, t.name), a = (e, t) => Number(t.isPinned ?? !1) - Number(e.isPinned ?? !1);
20
- if (t === ve.NameAsc) return [...e].sort((e, t) => a(e, t) || i(e, t));
21
- let o = t === ve.Oldest ? 1 : -1;
20
+ if (t === Y.NameAsc) return [...e].sort((e, t) => a(e, t) || i(e, t));
21
+ let o = t === Y.Oldest ? 1 : -1;
22
22
  return [...e].sort((e, t) => {
23
23
  let n = a(e, t);
24
24
  return n === 0 ? e.updatedAt == null && t.updatedAt == null ? i(e, t) : e.updatedAt == null ? 1 : t.updatedAt == null ? -1 : (e.updatedAt - t.updatedAt) * o || i(e, t) : n;
25
25
  });
26
- }, be = 60, xe = 3600, Y = 24 * xe, Se = [
27
- ["year", 365 * Y],
28
- ["month", 30 * Y],
29
- ["week", 7 * Y],
30
- ["day", Y],
31
- ["hour", xe],
32
- ["minute", be]
33
- ], Ce = (e, t, n) => {
26
+ }, xe = 60, Se = 3600, X = 24 * Se, Ce = [
27
+ ["year", 365 * X],
28
+ ["month", 30 * X],
29
+ ["week", 7 * X],
30
+ ["day", X],
31
+ ["hour", Se],
32
+ ["minute", xe]
33
+ ], we = (e, t, n) => {
34
34
  let r = (t - e) / 1e3;
35
- for (let [e, t] of Se) {
35
+ for (let [e, t] of Ce) {
36
36
  let i = Math.floor(r / t);
37
37
  if (i >= 1) return new Intl.RelativeTimeFormat(n).format(-i, e);
38
38
  }
39
39
  return new Intl.RelativeTimeFormat(n, { numeric: "auto" }).format(0, "second");
40
- }, X = {
41
- card: "_card_1o77o_1",
42
- title: "_title_1o77o_5",
43
- updatedAt: "_updatedAt_1o77o_9",
44
- path: "_path_1o77o_13",
45
- pin: "_pin_1o77o_17",
46
- link: "_link_1o77o_23",
47
- aboveLink: "_aboveLink_1o77o_39",
48
- interactive: "_interactive_1o77o_44"
49
- }, we = (e, t) => [e, ...(t ?? "").split("/").filter((e) => e.length > 0)], Te = (e) => e.button === 0 && !e.metaKey && !e.ctrlKey && !e.shiftKey && !e.altKey, Ee = ({ project: e, searchQuery: t, sourceLabel: n, folderPathLabel: r, pinnedLabel: i, href: a, onOpen: o, now: s, locale: c, updatedAtClassName: ee, titleClassName: l, pathLabelClassName: u, pathLeafClassName: f }) => {
50
- let p = /* @__PURE__ */ K(k, {
40
+ }, Z = {
41
+ card: "_card_1gkfw_1",
42
+ title: "_title_1gkfw_5",
43
+ updatedAt: "_updatedAt_1gkfw_9",
44
+ path: "_path_1gkfw_13",
45
+ pin: "_pin_1gkfw_17",
46
+ pinToggle: "_pinToggle_1gkfw_22",
47
+ pinToggleIdle: "_pinToggleIdle_1gkfw_29",
48
+ link: "_link_1gkfw_39",
49
+ aboveLink: "_aboveLink_1gkfw_55",
50
+ interactive: "_interactive_1gkfw_60"
51
+ }, Te = (e, t) => [e, ...(t ?? "").split("/").filter((e) => e.length > 0)], Ee = (e) => e.button === 0 && !e.metaKey && !e.ctrlKey && !e.shiftKey && !e.altKey, De = ({ project: e, searchQuery: t, sourceLabel: n, folderPathLabel: r, pinnedLabel: i, pinLabel: a, onTogglePin: o, href: s, onOpen: c, now: ee, locale: l, updatedAtClassName: u, titleClassName: f, pathLabelClassName: p, pathLeafClassName: m }) => {
52
+ let h = /* @__PURE__ */ K(A, {
51
53
  text: e.name,
52
54
  query: t,
53
55
  maxLines: 1,
54
- className: d("min-w-0", l, X.title, a != null && X.aboveLink)
56
+ className: d("min-w-0", f, Z.title, s != null && Z.aboveLink)
55
57
  });
56
58
  return /* @__PURE__ */ K("li", {
57
59
  className: "flex min-w-0",
58
- children: /* @__PURE__ */ q(v, {
60
+ children: /* @__PURE__ */ q(y, {
59
61
  "aria-label": e.name,
60
- className: d("relative flex w-full min-w-0 flex-col gap-2", X.card, a != null && "has-focus-visible:-translate-y-[3px] has-focus-visible:shadow-lg motion-reduce:has-focus-visible:translate-y-0", a != null && X.interactive),
62
+ className: d("relative flex w-full min-w-0 flex-col gap-2", Z.card, s != null && "has-focus-visible:translate-y-[-3px] has-focus-visible:shadow-lg motion-reduce:has-focus-visible:translate-y-0", s != null && Z.interactive),
61
63
  children: [
62
64
  e.updatedAt != null && /* @__PURE__ */ K("time", {
63
65
  dateTime: new Date(e.updatedAt).toISOString(),
64
- className: d(ee, X.updatedAt),
65
- children: Ce(e.updatedAt, s, c)
66
+ className: d(u, Z.updatedAt, (e.isPinned || o != null) && "pe-6"),
67
+ children: we(e.updatedAt, ee, l)
66
68
  }),
67
69
  /* @__PURE__ */ q("div", {
68
- className: "flex min-w-0 items-center gap-2",
69
- children: [a == null ? /* @__PURE__ */ K("div", {
70
+ className: d("flex min-w-0 items-center", (e.isPinned || o != null) && "pe-6"),
71
+ children: [s == null ? /* @__PURE__ */ K("div", {
70
72
  className: "min-w-0 flex-1",
71
- children: p
73
+ children: h
72
74
  }) : /* @__PURE__ */ K("a", {
73
- href: a,
75
+ href: s,
74
76
  onClick: (t) => {
75
- o != null && Te(t) && (t.preventDefault(), o(e.id));
77
+ c != null && Ee(t) && (t.preventDefault(), c(e.id));
76
78
  },
77
- className: d("min-w-0 flex-1", X.link),
78
- children: p
79
- }), e.isPinned && /* @__PURE__ */ q("span", {
80
- className: d("shrink-0", X.pin),
81
- children: [/* @__PURE__ */ K(le, {
82
- size: y.SM,
79
+ className: d("min-w-0 flex-1", Z.link),
80
+ children: h
81
+ }), o == null ? e.isPinned && /* @__PURE__ */ q("span", {
82
+ className: d("absolute inset-e-5 top-5 flex", Z.pin),
83
+ children: [/* @__PURE__ */ K(de, {
84
+ size: b.SM,
83
85
  "aria-hidden": !0
84
86
  }), /* @__PURE__ */ K("span", {
85
87
  className: "sr-only",
86
88
  children: i
87
89
  })]
90
+ }) : /* @__PURE__ */ K(k, {
91
+ size: C.Small,
92
+ icon: e.isPinned ? /* @__PURE__ */ K(de, {
93
+ size: b.SM,
94
+ "aria-hidden": !0
95
+ }) : /* @__PURE__ */ K(R, {
96
+ size: b.SM,
97
+ "aria-hidden": !0,
98
+ stroke: x
99
+ }),
100
+ "aria-label": a,
101
+ "aria-pressed": e.isPinned === !0,
102
+ onClick: () => o(e.id, !e.isPinned),
103
+ className: d("absolute inset-e-4 top-4", Z.pinToggle, !e.isPinned && Z.pinToggleIdle)
88
104
  })]
89
105
  }),
90
- /* @__PURE__ */ K(E, {
91
- segments: we(n, e.parentPath),
106
+ /* @__PURE__ */ K(D, {
107
+ segments: Te(n, e.parentPath),
92
108
  ariaLabel: r,
93
- labelClassName: d(u, X.path),
94
- leafClassName: d(f, X.path),
95
- className: d(a != null && X.aboveLink)
109
+ labelClassName: d(p, Z.path),
110
+ leafClassName: d(m, Z.path),
111
+ className: d(s != null && Z.aboveLink)
96
112
  })
97
113
  ]
98
114
  })
99
115
  });
100
- }, Z = {
101
- container: "_container_qfuxj_1",
102
- subtitle: "_subtitle_qfuxj_5",
103
- sortButton: "_sortButton_qfuxj_9"
104
- }, De = ({ projects: e, isLoading: t = !1, hasError: n = !1, incompleteSources: r = [], onRetry: i, onCreateProject: a, onOpenProject: s, getProjectHref: c, searchQuery: l, onSearchQueryChange: u, sortKey: f, onSortKeyChange: p, labels: v, locale: x, styles: C }) => {
105
- let { colors: w, typography: T } = C ?? {}, E = T?.titleClassName ?? "dial-h2-text", O = T?.subtitleClassName ?? "dial-body-text", k = T?.cardTitleClassName ?? "dial-body-semi-text", te = T?.pathLabelClassName ?? "dial-tiny-text", A = T?.pathLeafClassName ?? "dial-tiny-semi-text", M = T?.updatedAtClassName ?? "dial-tiny-text", re = T?.emptyStateDescriptionClassName ?? "dial-small-paragraph-text", P = ee({
106
- "--pr-bg": w?.background,
107
- "--pr-subtitle-text": w?.subtitleText,
108
- "--pr-sort-text": w?.sortButtonText,
109
- "--pr-card-bg": w?.cardBackground,
110
- "--pr-card-title-text": w?.cardTitleText,
111
- "--pr-updated-at-text": w?.updatedAtText,
112
- "--pr-path-text": w?.pathText
113
- }), [ie] = G(() => Date.now()), F = l.trim(), I = r.length > 0, R = I && e.length === 0, z = U(() => ye(J(e, l), f, x), [
116
+ }, Oe = {
117
+ container: "_container_4rer8_1",
118
+ subtitle: "_subtitle_4rer8_5",
119
+ sortButton: "_sortButton_4rer8_9"
120
+ }, ke = ({ projects: e, isLoading: t = !1, hasError: n = !1, incompleteSources: r = [], onRetry: i, onCreateProject: a, onTogglePin: s, onOpenProject: c, getProjectHref: l, searchQuery: u, onSearchQueryChange: f, sortKey: m, onSortKeyChange: y, labels: S, locale: w, styles: T }) => {
121
+ let { colors: E, typography: D } = T ?? {}, k = D?.titleClassName ?? "dial-h1-text", A = D?.subtitleClassName ?? "dial-body-text", j = D?.cardTitleClassName ?? "dial-body-semi-text", M = D?.pathLabelClassName ?? "dial-tiny-text", P = D?.pathLeafClassName ?? "dial-tiny-semi-text", ne = D?.updatedAtClassName ?? "dial-tiny-text", re = D?.emptyStateDescriptionClassName ?? "dial-small-paragraph-text", ie = ee({
122
+ "--pr-bg": E?.background,
123
+ "--pr-subtitle-text": E?.subtitleText,
124
+ "--pr-sort-text": E?.sortButtonText,
125
+ "--pr-card-bg": E?.cardBackground,
126
+ "--pr-card-title-text": E?.cardTitleText,
127
+ "--pr-updated-at-text": E?.updatedAtText,
128
+ "--pr-path-text": E?.pathText,
129
+ "--pr-card-focus-outline": E?.cardFocusOutline
130
+ }), I = p(), L = U(() => Date.now(), [e]), se = u.trim(), ce = r.length > 0, ue = ce && e.length === 0, R = U(() => be(ye(e, u), m, w), [
114
131
  e,
115
- l,
116
- f,
117
- x
118
- ]), se = v.sortOptions.find((e) => e.value === f)?.label ?? v.sortLabel, ce = U(() => v.sortOptions.map((e) => ({
132
+ u,
133
+ m,
134
+ w
135
+ ]), de = S.sortOptions.find((e) => e.value === m)?.label ?? S.sortLabel, pe = U(() => S.sortOptions.map((e) => ({
119
136
  key: e.value,
120
137
  label: e.label,
121
- mark: N.Check,
122
- checked: e.value === f,
123
- onClick: () => p(e.value)
138
+ mark: F.Check,
139
+ checked: e.value === m,
140
+ onClick: () => y(e.value)
124
141
  })), [
125
- v.sortOptions,
126
- f,
127
- p
128
- ]), le = (e) => {
129
- u(e ?? "");
130
- }, ue = () => {
131
- if (!t) return n ? v.errorLabel : I ? v.incompleteLabel : e.length === 0 ? v.emptyStateLabel : z.length === 0 ? v.noResultsLabel : v.resultCountLabel(z.length);
132
- }, de = (e, t) => a ? /* @__PURE__ */ K(m, {
133
- label: v.createProjectLabel,
142
+ S.sortOptions,
143
+ m,
144
+ y
145
+ ]), z = (e) => {
146
+ f(e ?? "");
147
+ }, B = () => {
148
+ if (!t) return n ? S.errorLabel : ce ? S.incompleteLabel : e.length === 0 ? S.emptyStateLabel : R.length === 0 ? S.noResultsLabel : S.resultCountLabel(R.length);
149
+ }, V = (e, t) => a ? /* @__PURE__ */ K(h, {
150
+ label: S.createProjectLabel,
134
151
  variant: e,
135
152
  onClick: a,
136
153
  className: d("shrink-0", t)
137
- }) : void 0, B = () => t ? /* @__PURE__ */ K(ae, {}) : n || R ? /* @__PURE__ */ q("div", {
154
+ }) : void 0, me = () => t ? /* @__PURE__ */ K(oe, {}) : n || ue ? /* @__PURE__ */ q("div", {
138
155
  className: "flex flex-col items-center gap-3",
139
156
  children: [/* @__PURE__ */ K("p", {
140
- className: d(O, Z.subtitle),
141
- children: n ? v.errorLabel : v.incompleteLabel
142
- }), /* @__PURE__ */ K(D, {
143
- label: v.retryLabel,
157
+ className: d(A, Oe.subtitle),
158
+ children: n ? S.errorLabel : S.incompleteLabel
159
+ }), /* @__PURE__ */ K(O, {
160
+ label: S.retryLabel,
144
161
  onClick: i
145
162
  })]
146
163
  }) : e.length === 0 ? /* @__PURE__ */ K(o, {
147
- label: v.emptyStateLabel,
148
- description: v.emptyStateDescription,
149
- action: de(_.Secondary, "mt-2"),
150
- containerClassName: "p-3",
164
+ label: S.emptyStateLabel,
165
+ description: S.emptyStateDescription,
166
+ action: V(v.Secondary, "mt-2"),
167
+ containerClassName: W,
151
168
  labelClassName: "mt-3",
152
169
  descriptionClassName: re
153
- }) : z.length === 0 ? /* @__PURE__ */ K(o, {
154
- label: v.noResultsLabel,
155
- containerClassName: "p-3",
170
+ }) : R.length === 0 ? /* @__PURE__ */ K(o, {
171
+ label: S.noResultsLabel,
172
+ containerClassName: W,
156
173
  labelClassName: "mt-3"
157
174
  }) : /* @__PURE__ */ K("ul", {
158
- className: "m-0 grid w-full min-w-0 list-none grid-cols-1 gap-5 p-0 desktop:grid-cols-3",
159
- children: z.map((e) => /* @__PURE__ */ K(Ee, {
175
+ className: "m-0 grid w-full min-w-0 list-none grid-cols-1 gap-4 p-0 desktop:grid-cols-3 desktop:gap-5",
176
+ children: R.map((e) => /* @__PURE__ */ K(De, {
160
177
  project: e,
161
- searchQuery: F,
162
- sourceLabel: v.sourceLabels[e.source],
163
- folderPathLabel: v.folderPathLabel,
164
- pinnedLabel: v.pinnedLabel ?? "Pinned",
165
- href: c?.(e.id),
166
- onOpen: s,
167
- now: ie,
168
- locale: x,
169
- updatedAtClassName: M,
170
- titleClassName: k,
171
- pathLabelClassName: te,
172
- pathLeafClassName: A
178
+ searchQuery: se,
179
+ sourceLabel: S.sourceLabels[e.source],
180
+ folderPathLabel: S.folderPathLabel,
181
+ pinnedLabel: S.pinnedLabel ?? "Pinned",
182
+ pinLabel: S.pinLabel ?? "Pin",
183
+ onTogglePin: s,
184
+ href: l?.(e.id),
185
+ onOpen: c,
186
+ now: L,
187
+ locale: w,
188
+ updatedAtClassName: ne,
189
+ titleClassName: j,
190
+ pathLabelClassName: M,
191
+ pathLeafClassName: P
173
192
  }, e.id))
174
- }), V = t || n || R;
193
+ }), H = t || n || ue, W = "mt-6 p-3 desktop:mt-0";
175
194
  return /* @__PURE__ */ q("div", {
176
- style: P,
177
- className: d("flex h-full w-full min-w-0 flex-col overflow-y-auto", Z.container),
178
- children: [
179
- /* @__PURE__ */ q("div", {
180
- className: "flex min-w-0 items-center gap-2 px-4 py-4 desktop:px-8",
181
- children: [/* @__PURE__ */ q("div", {
182
- className: "min-w-0 flex-1",
183
- children: [/* @__PURE__ */ K("h1", {
184
- className: d("break-words", E),
185
- children: v.title
186
- }), v.subtitle && /* @__PURE__ */ K("p", {
187
- className: d("mt-0.5", O, Z.subtitle),
188
- children: v.subtitle
189
- })]
190
- }), de(_.Primary)]
191
- }),
192
- /* @__PURE__ */ q("div", {
193
- className: "flex flex-col gap-3 px-4 pt-4 pb-5 desktop:flex-row desktop:items-center desktop:px-8",
194
- children: [/* @__PURE__ */ K("div", {
195
- role: "search",
196
- className: "min-w-0 flex-1",
197
- children: /* @__PURE__ */ K(L, {
198
- value: l,
199
- onChange: le,
200
- placeholder: v.searchPlaceholder,
201
- clearLabel: v.clearSearchLabel,
202
- "aria-label": v.searchAriaLabel,
203
- size: S.Large
204
- })
205
- }), v.sortOptions.length > 0 && /* @__PURE__ */ K("div", {
206
- role: "group",
207
- "aria-label": v.sortLabel,
208
- className: "shrink-0",
209
- children: /* @__PURE__ */ K(g, {
210
- items: ce,
211
- label: se,
212
- variant: _.Primary,
213
- appearance: h.Ghost,
214
- iconBefore: /* @__PURE__ */ K(oe, {
215
- size: y.SM,
216
- "aria-hidden": !0,
217
- stroke: b
218
- }),
219
- className: Z.sortButton
220
- })
221
- })]
222
- }),
223
- /* @__PURE__ */ K(j, {
224
- visuallyHidden: !0,
225
- as: ne.Span,
226
- children: ue()
227
- }),
228
- /* @__PURE__ */ q("div", {
229
- className: "flex w-full min-w-0 flex-1 flex-col items-center gap-5 px-4 pt-6 pb-8 desktop:px-8",
230
- children: [I && !t && !n && !R && /* @__PURE__ */ q("div", {
231
- className: "flex w-full max-w-[1116px] flex-wrap items-center gap-3",
232
- children: [/* @__PURE__ */ K("p", {
233
- className: d(O, Z.subtitle),
234
- children: v.incompleteLabel
235
- }), /* @__PURE__ */ K(D, {
236
- label: v.retryLabel,
237
- onClick: i
195
+ style: ie,
196
+ className: d("relative flex h-full w-full min-w-0 flex-col", Oe.container),
197
+ children: [/* @__PURE__ */ q("div", {
198
+ className: "flex min-h-0 w-full min-w-0 flex-1 flex-col overflow-y-auto",
199
+ children: [
200
+ I ? /* @__PURE__ */ K("h1", {
201
+ className: "sr-only",
202
+ children: S.title
203
+ }) : /* @__PURE__ */ q("div", {
204
+ className: "flex min-w-0 items-start gap-2 px-8 py-4",
205
+ children: [/* @__PURE__ */ q("div", {
206
+ className: "flex min-h-10 min-w-0 flex-1 flex-col justify-center gap-0.5",
207
+ children: [/* @__PURE__ */ K("h1", {
208
+ className: d("wrap-break-word", k),
209
+ children: S.title
210
+ }), S.subtitle && /* @__PURE__ */ K("p", {
211
+ className: d(A, Oe.subtitle),
212
+ children: S.subtitle
213
+ })]
214
+ }), V(v.Primary)]
215
+ }),
216
+ /* @__PURE__ */ q("div", {
217
+ className: "flex items-center gap-2 p-4 desktop:gap-3 desktop:px-8 desktop:pt-4 desktop:pb-5",
218
+ children: [/* @__PURE__ */ K("div", {
219
+ role: "search",
220
+ className: "min-w-0 flex-1",
221
+ children: /* @__PURE__ */ K(ae, {
222
+ value: u,
223
+ onChange: z,
224
+ placeholder: S.searchPlaceholder,
225
+ clearLabel: S.clearSearchLabel,
226
+ "aria-label": S.searchAriaLabel,
227
+ size: I ? C.Standard : C.Large
228
+ })
229
+ }), S.sortOptions.length > 0 && /* @__PURE__ */ K("div", {
230
+ role: "group",
231
+ "aria-label": S.sortLabel,
232
+ className: "shrink-0",
233
+ children: /* @__PURE__ */ K(_, {
234
+ items: pe,
235
+ label: de,
236
+ variant: v.Primary,
237
+ appearance: g.Ghost,
238
+ size: I ? C.Small : C.Standard,
239
+ iconBefore: /* @__PURE__ */ K(le, {
240
+ size: I ? b.SM : b.MD,
241
+ "aria-hidden": !0,
242
+ stroke: x
243
+ }),
244
+ className: d("desktop:px-3", Oe.sortButton)
245
+ })
238
246
  })]
239
- }), /* @__PURE__ */ K("div", {
240
- className: d("flex w-full max-w-[1116px] min-w-0 flex-col items-center", V && "flex-1 justify-center"),
247
+ }),
248
+ /* @__PURE__ */ K(te, {
249
+ visuallyHidden: !0,
250
+ as: N.Span,
241
251
  children: B()
242
- })]
243
- })
244
- ]
252
+ }),
253
+ /* @__PURE__ */ q("div", {
254
+ className: "flex w-full min-w-0 flex-1 flex-col items-center gap-4 px-4 pb-20 desktop:gap-5 desktop:px-8 desktop:pt-6 desktop:pb-8",
255
+ children: [ce && !t && !n && !ue && /* @__PURE__ */ q("div", {
256
+ className: "flex w-full max-w-[1116px] flex-wrap items-center gap-3",
257
+ children: [/* @__PURE__ */ K("p", {
258
+ className: d(A, Oe.subtitle),
259
+ children: S.incompleteLabel
260
+ }), /* @__PURE__ */ K(O, {
261
+ label: S.retryLabel,
262
+ onClick: i
263
+ })]
264
+ }), /* @__PURE__ */ K("div", {
265
+ className: d("flex w-full max-w-[1116px] min-w-0 flex-col items-center", H && "flex-1 justify-center"),
266
+ children: me()
267
+ })]
268
+ })
269
+ ]
270
+ }), I && a && /* @__PURE__ */ K(h, {
271
+ variant: v.Primary,
272
+ iconBefore: /* @__PURE__ */ K(fe, {
273
+ size: b.LG,
274
+ "aria-hidden": !0,
275
+ stroke: x
276
+ }),
277
+ "aria-label": S.createProjectLabel,
278
+ onClick: a,
279
+ className: "absolute inset-e-4 bottom-4 z-10 size-10 rounded-full px-0"
280
+ })]
245
281
  });
246
- }, Oe = /* @__PURE__ */ function(e) {
282
+ }, Ae = /* @__PURE__ */ function(e) {
247
283
  return e.Personal = "personal", e.Shared = "shared", e.Organization = "organization", e;
248
- }({}), ke = (e) => !!e.dataTransfer?.types.includes("Files"), Ae = (e) => {
284
+ }({}), je = (e) => !!e.dataTransfer?.types.includes("Files"), Me = (e) => {
249
285
  let [t, n] = G(!1), r = W(0);
250
286
  return {
251
287
  isDragActive: t,
252
288
  handlers: {
253
289
  onDragEnter: V((e) => {
254
- ke(e) && (e.preventDefault(), r.current += 1, n(!0));
290
+ je(e) && (e.preventDefault(), r.current += 1, n(!0));
255
291
  }, []),
256
292
  onDragLeave: V((e) => {
257
- ke(e) && (--r.current, r.current <= 0 && (r.current = 0, n(!1)));
293
+ je(e) && (--r.current, r.current <= 0 && (r.current = 0, n(!1)));
258
294
  }, []),
259
295
  onDragOver: V((e) => {
260
- ke(e) && e.preventDefault();
296
+ je(e) && e.preventDefault();
261
297
  }, []),
262
298
  onDrop: V((t) => {
263
- if (!ke(t)) return;
299
+ if (!je(t)) return;
264
300
  t.preventDefault(), r.current = 0, n(!1);
265
301
  let i = Array.from(t.dataTransfer?.files ?? []);
266
302
  i.length > 0 && e(i);
@@ -269,36 +305,36 @@ var ve = /* @__PURE__ */ function(e) {
269
305
  };
270
306
  }, Q = /* @__PURE__ */ function(e) {
271
307
  return e.UnsupportedType = "unsupported-type", e.TooLarge = "too-large", e.CapacityExceeded = "capacity-exceeded", e.Duplicate = "duplicate", e.InvalidName = "invalid-name", e;
272
- }({}), je = /* @__PURE__ */ function(e) {
308
+ }({}), Ne = /* @__PURE__ */ function(e) {
273
309
  return e.Required = "required", e.InvalidCharacters = "invalid-characters", e.Reserved = "reserved", e.TooLong = "too-long", e;
274
- }({}), Me = 255, Ne = new RegExp(a.source, "u"), Pe = /[\p{Cc}‎‏‪-‮⁦-⁩]/u, Fe = /* @__PURE__ */ new Set([
310
+ }({}), Pe = 255, Fe = new RegExp(a.source, "u"), Ie = /[\p{Cc}‎‏‪-‮⁦-⁩]/u, Le = /* @__PURE__ */ new Set([
275
311
  ".",
276
312
  "..",
277
313
  "v",
278
314
  "files",
279
315
  ".dial-resource",
280
316
  ".dial-folder"
281
- ]), Ie = (e) => new TextEncoder().encode(e).length, Le = (e) => {
317
+ ]), Re = (e) => new TextEncoder().encode(e).length, ze = (e) => {
282
318
  let t = e.trim();
283
- return t.length === 0 ? je.Required : Ie(t) > 255 ? je.TooLong : Ne.test(t) || Pe.test(t) ? je.InvalidCharacters : Fe.has(t) ? je.Reserved : null;
284
- }, Re = (e) => {
319
+ return t.length === 0 ? Ne.Required : Re(t) > 255 ? Ne.TooLong : Fe.test(t) || Ie.test(t) ? Ne.InvalidCharacters : Le.has(t) ? Ne.Reserved : null;
320
+ }, Be = (e) => {
285
321
  let t = e.lastIndexOf(".");
286
322
  return t > 0 ? e.slice(t + 1).toLowerCase() : "";
287
- }, ze = (e) => "isStored" in e && e.isStored, Be = (e) => ze(e) ? e.size : e.file.size, Ve = (e) => e.reduce((e, t) => e + Be(t), 0), He = 0, Ue = () => (He += 1, `project-context-${Date.now()}-${He}`), We = (e) => {
323
+ }, Ve = (e) => "isStored" in e && e.isStored, He = (e) => Ve(e) ? e.size : e.file.size, Ue = (e) => e.reduce((e, t) => e + He(t), 0), We = 0, Ge = () => (We += 1, `project-context-${Date.now()}-${We}`), Ke = (e) => {
288
324
  let t = e.type || u(e.name) || "application/octet-stream";
289
325
  return {
290
- id: Ue(),
326
+ id: Ge(),
291
327
  name: e.name,
292
328
  contentType: t,
293
329
  type: l(t),
294
330
  status: s.Idle,
295
331
  file: e
296
332
  };
297
- }, Ge = (e, t, n, r) => Le(e.name) != null || e.name.trim() !== e.name ? Q.InvalidName : r.allowedExtensions.includes(Re(e.name)) ? t.has(e.name) ? Q.Duplicate : e.size > r.maxFileBytes ? Q.TooLarge : n + e.size > r.maxTotalBytes ? Q.CapacityExceeded : null : Q.UnsupportedType, Ke = (e, t, n) => {
298
- let r = new Set(t.map((e) => e.name)), i = Ve(t), a = [], o = [];
333
+ }, qe = (e, t, n, r) => ze(e.name) != null || e.name.trim() !== e.name ? Q.InvalidName : r.allowedExtensions.includes(Be(e.name)) ? t.has(e.name) ? Q.Duplicate : e.size > r.maxFileBytes ? Q.TooLarge : n + e.size > r.maxTotalBytes ? Q.CapacityExceeded : null : Q.UnsupportedType, Je = (e, t, n) => {
334
+ let r = new Set(t.map((e) => e.name)), i = Ue(t), a = [], o = [];
299
335
  for (let t of e) {
300
- let e = Ge(t, r, i, n);
301
- e == null ? (r.add(t.name), i += t.size, a.push(We(t))) : o.push({
336
+ let e = qe(t, r, i, n);
337
+ e == null ? (r.add(t.name), i += t.size, a.push(Ke(t))) : o.push({
302
338
  name: t.name,
303
339
  reason: e
304
340
  });
@@ -307,37 +343,37 @@ var ve = /* @__PURE__ */ function(e) {
307
343
  accepted: a,
308
344
  rejected: o
309
345
  };
310
- }, qe = (e, t) => e <= 0 ? 0 : t <= 0 ? 100 : Math.min(100, Math.max(1, Math.round(e / t * 100))), Je = (e, t) => {
346
+ }, Ye = (e, t) => e <= 0 ? 0 : t <= 0 ? 100 : Math.min(100, Math.max(1, Math.round(e / t * 100))), Xe = (e, t) => {
311
347
  let n = t.trim().toLowerCase();
312
348
  return n === "" ? e : e.filter((e) => e.name.toLowerCase().includes(n));
313
- }, Ye = {
349
+ }, Ze = {
314
350
  track: "_track_1eyt2_1",
315
351
  text: "_text_1eyt2_11"
316
- }, Xe = ({ usedBytes: e, maxBytes: t, ariaLabel: n, formatLabel: r, textClassName: i = "dial-tiny-text" }) => {
352
+ }, Qe = ({ usedBytes: e, maxBytes: t, ariaLabel: n, formatLabel: r, textClassName: i = "dial-tiny-text" }) => {
317
353
  if (e <= 0) return null;
318
- let a = r(qe(e, t));
354
+ let a = r(Ye(e, t));
319
355
  return /* @__PURE__ */ q("div", {
320
356
  className: "flex min-w-0 items-center gap-2",
321
- children: [/* @__PURE__ */ K(F, {
322
- role: I.Meter,
357
+ children: [/* @__PURE__ */ K(I, {
358
+ role: L.Meter,
323
359
  value: e,
324
360
  max: t,
325
- size: S.Small,
361
+ size: C.Small,
326
362
  "aria-label": n,
327
363
  "aria-valuetext": a,
328
- className: d("w-[60px] shrink-0", Ye.track)
364
+ className: d("w-[60px] shrink-0", Ze.track)
329
365
  }), /* @__PURE__ */ K("span", {
330
366
  "aria-hidden": !0,
331
- className: d("whitespace-nowrap", i, Ye.text),
367
+ className: d("whitespace-nowrap", i, Ze.text),
332
368
  children: a
333
369
  })]
334
370
  });
335
- }, Ze = {
371
+ }, $e = {
336
372
  formColumn: "_formColumn_1fxsc_1",
337
373
  helper: "_helper_1fxsc_10",
338
374
  label: "_label_1fxsc_14"
339
- }, Qe = de(async () => ({ default: (await _e()).MarkdownEditor })), $e = "device", et = "file-manager", tt = ({ values: e, errors: t, onFieldChange: i, contextFiles: a, onContextFilesChange: o, allowedExtensions: s, maxFileBytes: l, maxTotalBytes: u, onPickFromFileManager: m, onRefineDescription: h, onRefineInstructions: v, onBack: x, onCancel: C, onSubmit: E, isSubmitting: D = !1, labels: O, markdownEditorTheme: k, className: N, styles: re }) => {
340
- let P = H(), ie = H(), F = H(), I = H(), L = H(), oe = W(null), se = W(null), ce = f(), [le, de] = G(!1), [B, pe] = G([]), [_e, ve] = G(""), J = W(void 0), ye = V((e) => e ? async (t, n) => {
375
+ }, et = z(async () => ({ default: (await J()).MarkdownEditor })), tt = "device", nt = "file-manager", rt = ({ values: e, errors: t, onFieldChange: i, contextFiles: a, onContextFilesChange: o, allowedExtensions: s, maxFileBytes: l, maxTotalBytes: u, onPickFromFileManager: p, onRefineDescription: h, onRefineInstructions: g, onBack: y, onCancel: S, onSubmit: w, isSubmitting: D = !1, labels: O, markdownEditorTheme: k, className: A, styles: F }) => {
376
+ let ne = H(), re = H(), ie = H(), I = H(), L = H(), ae = W(null), le = W(null), ue = f(), [R, de] = G(!1), [fe, z] = G([]), [B, he] = G(""), J = W(void 0), Y = V((e) => e ? async (t, n) => {
341
377
  if (J.current && !J.current.aborted) throw new DOMException("Busy", "AbortError");
342
378
  J.current = n;
343
379
  try {
@@ -345,66 +381,66 @@ var ve = /* @__PURE__ */ function(e) {
345
381
  } finally {
346
382
  J.current === n && (J.current = void 0);
347
383
  }
348
- } : void 0, []), be = U(() => ye(h), [ye, h]), xe = U(() => ye(v), [ye, v]), Y = p({
384
+ } : void 0, []), ye = U(() => Y(h), [Y, h]), be = U(() => Y(g), [Y, g]), xe = m({
349
385
  value: e.description,
350
386
  onChange: (e) => i("description", e),
351
- onRefine: be,
387
+ onRefine: ye,
352
388
  disabled: D
353
- }), Se = p({
389
+ }), Se = m({
354
390
  value: e.instructions,
355
391
  onChange: (e) => i("instructions", e),
356
- onRefine: xe,
392
+ onRefine: be,
357
393
  disabled: D
358
- }), Ce = Y.isPending || Se.isPending, X = Le(e.name), we = t.name ?? (le && X != null ? O.nameErrors[X] : void 0), Te = X != null || D || Ce;
359
- fe(() => {
360
- t.name && oe.current?.focus();
394
+ }), X = xe.isPending || Se.isPending, Ce = ze(e.name), we = t.name ?? (R && Ce != null ? O.nameErrors[Ce] : void 0), Z = Ce != null || D || X;
395
+ me(() => {
396
+ t.name && ae.current?.focus();
361
397
  }, [t.name]);
362
- let Ee = U(() => Ve(a), [a]), Z = U(() => s.map((e) => `.${e}`).join(","), [s]), De = (e) => {
398
+ let Te = U(() => Ue(a), [a]), Ee = U(() => s.map((e) => `.${e}`).join(","), [s]), De = (e) => {
363
399
  if (e.length === 0) return;
364
- let { accepted: t, rejected: n } = Ke(e, a, {
400
+ let { accepted: t, rejected: n } = Je(e, a, {
365
401
  allowedExtensions: s,
366
402
  maxFileBytes: l,
367
403
  maxTotalBytes: u
368
404
  });
369
- pe(n), t.length > 0 && o([...a, ...t]), ve([t.length > 0 ? O.filesAddedStatus(t.length) : "", ...n.map(({ name: e, reason: t }) => O.fileRejections[t](e))].filter(Boolean).join(" "));
370
- }, { isDragActive: Oe, handlers: ke } = Ae(De), Q = (e) => {
405
+ z(n), t.length > 0 && o([...a, ...t]), he([t.length > 0 ? O.filesAddedStatus(t.length) : "", ...n.map(({ name: e, reason: t }) => O.fileRejections[t](e))].filter(Boolean).join(" "));
406
+ }, { isDragActive: Oe, handlers: ke } = Me(De), Ae = (e) => {
371
407
  let t = a.find((t) => t.id === e);
372
- o(a.filter((t) => t.id !== e)), pe([]), t && ve(O.fileRemovedStatus(t.name));
408
+ o(a.filter((t) => t.id !== e)), z([]), t && he(O.fileRemovedStatus(t.name));
373
409
  }, je = (e) => {
374
410
  De(Array.from(e.target.files ?? [])), e.target.value = "";
375
- }, Me = async () => {
376
- if (m) try {
377
- let e = await m();
411
+ }, Q = async () => {
412
+ if (p) try {
413
+ let e = await p();
378
414
  e && De(e);
379
415
  } catch {}
380
416
  }, Ne = [{
381
- key: $e,
417
+ key: tt,
382
418
  label: O.addFromDeviceLabel,
383
- onClick: () => se.current?.click()
384
- }, ...m ? [{
385
- key: et,
419
+ onClick: () => le.current?.click()
420
+ }, ...p ? [{
421
+ key: nt,
386
422
  label: O.addFromFileManagerLabel,
387
- onClick: () => void Me()
423
+ onClick: () => void Q()
388
424
  }] : []], Pe = () => {
389
- !Te && (!J.current || J.current.aborted) && E();
390
- }, { colors: Fe, typography: Ie } = re ?? {}, Re = Ie?.titleClassName ?? "dial-h1-text", ze = d(Ie?.labelClassName ?? "dial-tiny-semi-text", Ze.label), Be = Ie?.helperClassName ?? "dial-tiny-text", He = ee({
425
+ !Z && (!J.current || J.current.aborted) && w();
426
+ }, { colors: Fe, typography: Ie } = F ?? {}, Le = Ie?.titleClassName ?? "dial-h1-text", Re = d(Ie?.labelClassName ?? "dial-tiny-semi-text", $e.label), Be = Ie?.helperClassName ?? "dial-tiny-text", Ve = ee({
391
427
  "--pcf-helper-text": Fe?.helperText,
392
428
  "--pcf-label-text": Fe?.labelText,
393
429
  "--pcf-meter-track": Fe?.meterTrack,
394
430
  "--pcf-meter-fill": Fe?.meterFill
395
- }), Ue = O.refinement, We = t.context, Ge = !!We;
431
+ }), He = O.refinement, We = t.context, Ge = !!We;
396
432
  return /* @__PURE__ */ q("div", {
397
- className: d("relative flex h-full min-h-0 w-full", N),
433
+ className: d("relative flex h-full min-h-0 w-full", A),
398
434
  ...ke,
399
435
  children: [
400
- /* @__PURE__ */ K(he, {
436
+ /* @__PURE__ */ K(_e, {
401
437
  isVisible: Oe,
402
438
  labels: {
403
439
  title: O.dropOverlayTitle,
404
440
  subtitle: O.dropOverlaySubtitle
405
441
  }
406
442
  }),
407
- /* @__PURE__ */ K(ge, {
443
+ /* @__PURE__ */ K(ve, {
408
444
  labels: {
409
445
  title: O.title,
410
446
  backButtonLabel: O.backLabel,
@@ -412,15 +448,15 @@ var ve = /* @__PURE__ */ function(e) {
412
448
  submitButtonLabel: O.createLabel,
413
449
  submittingLabel: O.submittingLabel ?? O.createLabel
414
450
  },
415
- onBack: x,
416
- onCancel: C,
451
+ onBack: y,
452
+ onCancel: S,
417
453
  onSubmit: Pe,
418
454
  isCancelDisabled: D,
419
- isSubmitDisabled: Te,
455
+ isSubmitDisabled: Z,
420
456
  isSubmitting: D,
421
- backIcon: /* @__PURE__ */ K(z, {
422
- size: y.LG,
423
- stroke: b,
457
+ backIcon: /* @__PURE__ */ K(ce, {
458
+ size: b.LG,
459
+ stroke: x,
424
460
  "aria-hidden": !0,
425
461
  className: "rtl:scale-x-[-1]"
426
462
  }),
@@ -428,19 +464,19 @@ var ve = /* @__PURE__ */ function(e) {
428
464
  colors: { background: Fe?.background },
429
465
  header: {
430
466
  colors: { borderColor: Fe?.headerBorder },
431
- typography: { fontClassName: Re }
467
+ typography: { fontClassName: Le }
432
468
  },
433
- cssVars: He
469
+ cssVars: Ve
434
470
  },
435
471
  children: /* @__PURE__ */ q("div", {
436
- className: d("mx-auto flex w-full max-w-[1040px] min-w-0 flex-col gap-5 py-6", Ze.formColumn),
472
+ className: d("mx-auto flex w-full max-w-[1040px] min-w-0 flex-col gap-5 py-6", $e.formColumn),
437
473
  children: [
438
474
  /* @__PURE__ */ q("div", {
439
475
  className: "flex flex-col gap-1",
440
476
  children: [
441
- /* @__PURE__ */ K(te, {
442
- id: P,
443
- inputRef: oe,
477
+ /* @__PURE__ */ K(j, {
478
+ id: ne,
479
+ inputRef: ae,
444
480
  value: e.name,
445
481
  onChange: (e) => i("name", e ?? ""),
446
482
  onBlur: () => de(!0),
@@ -453,16 +489,16 @@ var ve = /* @__PURE__ */ function(e) {
453
489
  "aria-required": !0,
454
490
  invalid: !!we,
455
491
  "aria-invalid": !!we,
456
- "aria-describedby": we ? ie : void 0
492
+ "aria-describedby": we ? re : void 0
457
493
  }),
458
- /* @__PURE__ */ K(w, {
459
- announce: M.Assertive,
460
- id: ie,
494
+ /* @__PURE__ */ K(T, {
495
+ announce: P.Assertive,
496
+ id: re,
461
497
  className: Be,
462
498
  text: t.name ?? ""
463
499
  }),
464
- we && !t.name && /* @__PURE__ */ K(w, {
465
- id: ie,
500
+ we && !t.name && /* @__PURE__ */ K(T, {
501
+ id: re,
466
502
  className: Be,
467
503
  text: we
468
504
  })
@@ -470,42 +506,42 @@ var ve = /* @__PURE__ */ function(e) {
470
506
  }),
471
507
  /* @__PURE__ */ K(c, {
472
508
  isEnabled: !!h,
473
- fieldId: F,
509
+ fieldId: ie,
474
510
  label: O.descriptionLabel,
475
- labelClassName: ze,
476
- labels: Ue,
477
- refinement: Y,
478
- disabled: D || Ce,
479
- children: /* @__PURE__ */ K(R, {
480
- id: F,
511
+ labelClassName: Re,
512
+ labels: He,
513
+ refinement: xe,
514
+ disabled: D || X,
515
+ children: /* @__PURE__ */ K(se, {
516
+ id: ie,
481
517
  value: e.description,
482
518
  onChange: (e) => {
483
- Y.reset(), i("description", e);
519
+ xe.reset(), i("description", e);
484
520
  },
485
521
  placeholder: O.descriptionPlaceholder,
486
522
  labelProps: h ? void 0 : { label: O.descriptionLabel }
487
523
  })
488
524
  }),
489
525
  /* @__PURE__ */ K(c, {
490
- isEnabled: !!v,
526
+ isEnabled: !!g,
491
527
  fieldId: I,
492
528
  label: O.instructionsLabel,
493
- labelClassName: ze,
494
- labels: Ue,
529
+ labelClassName: Re,
530
+ labels: He,
495
531
  refinement: Se,
496
- disabled: D || Ce,
532
+ disabled: D || X,
497
533
  children: /* @__PURE__ */ q("div", {
498
534
  className: "flex flex-1 flex-col gap-2",
499
- children: [!v && /* @__PURE__ */ K(A, {
535
+ children: [!g && /* @__PURE__ */ K(M, {
500
536
  htmlFor: I,
501
- className: ze,
537
+ className: Re,
502
538
  label: O.instructionsLabel
503
539
  }), /* @__PURE__ */ K("div", {
504
- ref: ce,
540
+ ref: ue,
505
541
  className: d("w-full", n, r),
506
- children: /* @__PURE__ */ K(ue, {
507
- fallback: /* @__PURE__ */ K(ae, {}),
508
- children: /* @__PURE__ */ K(Qe, {
542
+ children: /* @__PURE__ */ K(pe, {
543
+ fallback: /* @__PURE__ */ K(oe, {}),
544
+ children: /* @__PURE__ */ K(et, {
509
545
  id: I,
510
546
  value: e.instructions,
511
547
  onChange: (e) => {
@@ -527,52 +563,52 @@ var ve = /* @__PURE__ */ function(e) {
527
563
  className: "flex min-w-0 flex-wrap items-center justify-between gap-2",
528
564
  children: [/* @__PURE__ */ K("h2", {
529
565
  id: L,
530
- className: ze,
566
+ className: Re,
531
567
  children: O.contextLabel
532
568
  }), /* @__PURE__ */ q("div", {
533
569
  className: "flex min-w-0 items-center gap-4",
534
- children: [/* @__PURE__ */ K(Xe, {
535
- usedBytes: Ee,
570
+ children: [/* @__PURE__ */ K(Qe, {
571
+ usedBytes: Te,
536
572
  maxBytes: u,
537
573
  ariaLabel: O.capacityMeterLabel,
538
574
  formatLabel: O.capacityLabel,
539
575
  textClassName: Be
540
- }), /* @__PURE__ */ K(g, {
576
+ }), /* @__PURE__ */ K(_, {
541
577
  items: Ne,
542
578
  label: O.addLabel,
543
- variant: _.Neutral,
544
- size: S.Small,
579
+ variant: v.Neutral,
580
+ size: C.Small,
545
581
  disabled: D
546
582
  })]
547
583
  })]
548
584
  }),
549
585
  /* @__PURE__ */ K("input", {
550
- ref: se,
586
+ ref: le,
551
587
  type: "file",
552
588
  multiple: !0,
553
- accept: Z,
589
+ accept: Ee,
554
590
  tabIndex: -1,
555
591
  "aria-hidden": !0,
556
592
  className: "sr-only",
557
593
  onChange: je
558
594
  }),
559
- /* @__PURE__ */ K(T, {
595
+ /* @__PURE__ */ K(E, {
560
596
  label: O.dropZoneLabel,
561
597
  description: O.dropZoneHint,
562
- accept: Z,
598
+ accept: Ee,
563
599
  multiple: !0,
564
600
  disabled: D,
565
601
  onChange: De,
566
602
  onReject: De
567
603
  }),
568
- B.length > 0 && /* @__PURE__ */ K("ul", {
569
- className: d("flex flex-col gap-1", Be, Ze.helper),
570
- children: B.map(({ name: e, reason: t }) => /* @__PURE__ */ K("li", { children: O.fileRejections[t](e) }, `${t}:${e}`))
604
+ fe.length > 0 && /* @__PURE__ */ K("ul", {
605
+ className: d("flex flex-col gap-1", Be, $e.helper),
606
+ children: fe.map(({ name: e, reason: t }) => /* @__PURE__ */ K("li", { children: O.fileRejections[t](e) }, `${t}:${e}`))
571
607
  }),
572
- /* @__PURE__ */ K(j, {
573
- politeness: M.Assertive,
608
+ /* @__PURE__ */ K(te, {
609
+ politeness: P.Assertive,
574
610
  children: Ge && /* @__PURE__ */ K("p", {
575
- className: d(Be, Ze.helper),
611
+ className: d(Be, $e.helper),
576
612
  children: We
577
613
  })
578
614
  }),
@@ -580,9 +616,9 @@ var ve = /* @__PURE__ */ function(e) {
580
616
  className: "flex min-w-0 flex-wrap gap-2 pt-1",
581
617
  children: a.map((e) => /* @__PURE__ */ K("li", {
582
618
  className: "min-w-0",
583
- children: /* @__PURE__ */ K(me, {
619
+ children: /* @__PURE__ */ K(ge, {
584
620
  attachment: e,
585
- onRemove: Q,
621
+ onRemove: Ae,
586
622
  labels: { removeLabel: O.removeFileLabel(e.name) }
587
623
  })
588
624
  }, e.id))
@@ -592,10 +628,10 @@ var ve = /* @__PURE__ */ function(e) {
592
628
  ]
593
629
  })
594
630
  }),
595
- /* @__PURE__ */ K(j, {
631
+ /* @__PURE__ */ K(te, {
596
632
  visuallyHidden: !0,
597
- as: ne.Span,
598
- children: D ? O.creatingStatus : _e
633
+ as: N.Span,
634
+ children: D ? O.creatingStatus : B
599
635
  })
600
636
  ]
601
637
  });
@@ -606,21 +642,21 @@ var ve = /* @__PURE__ */ function(e) {
606
642
  body: "_body_16lvl_13",
607
643
  secondary: "_secondary_16lvl_17",
608
644
  panel: "_panel_16lvl_21"
609
- }, nt = (e) => ({
645
+ }, it = (e) => ({
610
646
  id: e.name,
611
647
  name: e.name,
612
648
  contentType: e.contentType,
613
649
  type: l(e.contentType),
614
650
  status: s.Idle
615
- }), rt = B(({ project: e, isLoading: t = !1, hasError: n = !1, isNotFound: r = !1, isPinned: a, isPinPending: s = !1, contextSearchQuery: c, onContextSearchQueryChange: l, onBack: u, onTogglePin: f, onPublish: p, onEdit: h, onShare: g, onDelete: v, onDownload: S, onOpenFile: w, onRetry: T, onBrowseProjects: E, mainContent: k, mainContentLabel: te = "Project content", labels: A, styles: M }) => {
616
- let { colors: N, typography: P } = M ?? {}, ie = P?.titleClassName ?? "dial-h2-text", F = P?.panelTitleClassName ?? "dial-body-semi-text", I = P?.sectionTitleClassName ?? "dial-tiny-text", R = P?.bodyClassName ?? "dial-small-text", oe = P?.helperClassName ?? "dial-tiny-text", ue = P?.instructionsHeadingClassName ?? "dial-small-semi-text", de = ee({
617
- "--pv-bg": N?.background,
618
- "--pv-border": N?.border,
619
- "--pv-heading-text": N?.headingText,
620
- "--pv-body-text": N?.bodyText,
621
- "--pv-secondary-text": N?.secondaryText
622
- }), B = U(() => e?.contextFiles ?? [], [e]), V = U(() => Je(B, c), [B, c]), fe = c.trim(), W = H(), G = U(() => {
623
- let e = d("mb-1 mt-3 first:mt-0", ue);
651
+ }), at = B(({ project: e, isLoading: t = !1, hasError: n = !1, isNotFound: r = !1, isPinned: a, isPinPending: s = !1, contextSearchQuery: c, onContextSearchQueryChange: l, onBack: u, onTogglePin: f, onPublish: p, onEdit: m, onShare: g, onDelete: _, onDownload: y, onOpenFile: C, onRetry: T, onBrowseProjects: E, mainContent: D, mainContentLabel: A = "Project content", labels: j, styles: M }) => {
652
+ let { colors: P, typography: F } = M ?? {}, re = F?.titleClassName ?? "dial-h2-text", ie = F?.panelTitleClassName ?? "dial-body-semi-text", I = F?.sectionTitleClassName ?? "dial-tiny-text", L = F?.bodyClassName ?? "dial-small-text", se = F?.helperClassName ?? "dial-tiny-text", le = F?.instructionsHeadingClassName ?? "dial-small-semi-text", fe = ee({
653
+ "--pv-bg": P?.background,
654
+ "--pv-border": P?.border,
655
+ "--pv-heading-text": P?.headingText,
656
+ "--pv-body-text": P?.bodyText,
657
+ "--pv-secondary-text": P?.secondaryText
658
+ }), pe = U(() => e?.contextFiles ?? [], [e]), z = U(() => Xe(pe, c), [pe, c]), B = c.trim(), V = H(), me = U(() => {
659
+ let e = d("mb-1 mt-3 first:mt-0", le);
624
660
  return {
625
661
  h1: e,
626
662
  h2: e,
@@ -628,145 +664,145 @@ var ve = /* @__PURE__ */ function(e) {
628
664
  h4: e,
629
665
  h5: e,
630
666
  h6: e,
631
- p: R,
632
- ul: R,
633
- ol: R
667
+ p: L,
668
+ ul: L,
669
+ ol: L
634
670
  };
635
- }, [R, ue]), he = (e) => {
671
+ }, [L, le]), W = (e) => {
636
672
  let t = [];
637
673
  return e && p && t.push({
638
674
  key: "publish",
639
- label: A.publishLabel,
675
+ label: j.publishLabel,
640
676
  onClick: p
641
- }), e && h && t.push({
677
+ }), e && m && t.push({
642
678
  key: "edit",
643
- label: A.editLabel,
644
- onClick: h
679
+ label: j.editLabel,
680
+ onClick: m
645
681
  }), g && t.push({
646
682
  key: "share",
647
- label: A.shareLabel,
683
+ label: j.shareLabel,
648
684
  onClick: g
649
685
  }), t.push({
650
686
  key: "download",
651
- label: A.downloadLabel,
652
- onClick: S
653
- }), v && t.push({
687
+ label: j.downloadLabel,
688
+ onClick: y
689
+ }), _ && t.push({
654
690
  key: "delete",
655
- label: A.deleteLabel,
691
+ label: j.deleteLabel,
656
692
  danger: !0,
657
- onClick: v
693
+ onClick: _
658
694
  }), t;
659
- }, ge = (e, t) => /* @__PURE__ */ K("div", {
695
+ }, G = (e, t) => /* @__PURE__ */ K("div", {
660
696
  className: t,
661
- children: /* @__PURE__ */ K(x, {
662
- items: he(e),
697
+ children: /* @__PURE__ */ K(S, {
698
+ items: W(e),
663
699
  matchReferenceWidth: !1,
664
700
  listClassName: "w-[200px]",
665
- children: /* @__PURE__ */ K(O, {
666
- icon: /* @__PURE__ */ K(se, {
667
- size: y.MD,
701
+ children: /* @__PURE__ */ K(k, {
702
+ icon: /* @__PURE__ */ K(ue, {
703
+ size: b.MD,
668
704
  "aria-hidden": !0,
669
- stroke: b
705
+ stroke: x
670
706
  }),
671
- "aria-label": A.moreActionsLabel
707
+ "aria-label": j.moreActionsLabel
672
708
  })
673
709
  })
674
710
  });
675
711
  return t || n || r || e == null ? /* @__PURE__ */ K("div", {
676
- style: de,
712
+ style: fe,
677
713
  className: d("flex h-full w-full min-w-0 items-center justify-center p-4", $.container),
678
- children: t ? /* @__PURE__ */ K(ae, {}) : n ? /* @__PURE__ */ q("div", {
714
+ children: t ? /* @__PURE__ */ K(oe, {}) : n ? /* @__PURE__ */ q("div", {
679
715
  className: "flex flex-col items-center gap-3",
680
716
  children: [/* @__PURE__ */ K("p", {
681
717
  role: "status",
682
- className: d(R, $.body),
683
- children: A.errorLabel
684
- }), /* @__PURE__ */ K(D, {
685
- label: A.retryLabel,
718
+ className: d(L, $.body),
719
+ children: j.errorLabel
720
+ }), /* @__PURE__ */ K(O, {
721
+ label: j.retryLabel,
686
722
  onClick: T
687
723
  })]
688
724
  }) : /* @__PURE__ */ q("div", {
689
725
  className: "flex flex-col items-center gap-3",
690
726
  children: [/* @__PURE__ */ K("p", {
691
- className: d(R, $.body),
692
- children: A.notFoundLabel
693
- }), /* @__PURE__ */ K(D, {
694
- label: A.browseProjectsLabel,
727
+ className: d(L, $.body),
728
+ children: j.notFoundLabel
729
+ }), /* @__PURE__ */ K(O, {
730
+ label: j.browseProjectsLabel,
695
731
  onClick: E
696
732
  })]
697
733
  })
698
734
  }) : /* @__PURE__ */ q("div", {
699
- style: de,
735
+ style: fe,
700
736
  className: d("flex h-full w-full min-w-0 flex-col overflow-y-auto", $.container),
701
737
  children: [/* @__PURE__ */ q("header", {
702
738
  className: d("flex min-w-0 items-center gap-2 px-4 py-3 desktop:px-8", $.header),
703
739
  children: [
704
- /* @__PURE__ */ K(O, {
705
- icon: /* @__PURE__ */ K(z, {
706
- size: y.LG,
740
+ /* @__PURE__ */ K(k, {
741
+ icon: /* @__PURE__ */ K(ce, {
742
+ size: b.LG,
707
743
  className: "rtl:scale-x-[-1]",
708
744
  "aria-hidden": !0,
709
- stroke: b
745
+ stroke: x
710
746
  }),
711
- "aria-label": A.backLabel,
747
+ "aria-label": j.backLabel,
712
748
  onClick: u
713
749
  }),
714
750
  /* @__PURE__ */ K("h1", {
715
- className: d("min-w-0 flex-1", ie, $.title),
716
- children: /* @__PURE__ */ K(C, { text: e.name })
751
+ className: d("min-w-0 flex-1", re, $.title),
752
+ children: /* @__PURE__ */ K(w, { text: e.name })
717
753
  }),
718
- /* @__PURE__ */ K(O, {
719
- icon: a ? /* @__PURE__ */ K(le, {
720
- size: y.MD,
754
+ /* @__PURE__ */ K(k, {
755
+ icon: a ? /* @__PURE__ */ K(de, {
756
+ size: b.MD,
721
757
  "aria-hidden": !0
722
- }) : /* @__PURE__ */ K(ce, {
723
- size: y.MD,
758
+ }) : /* @__PURE__ */ K(R, {
759
+ size: b.MD,
724
760
  "aria-hidden": !0,
725
- stroke: b
761
+ stroke: x
726
762
  }),
727
- "aria-label": A.pinLabel,
763
+ "aria-label": j.pinLabel,
728
764
  "aria-pressed": a,
729
765
  "aria-disabled": s || void 0,
730
766
  onClick: () => {
731
767
  s || f();
732
768
  }
733
769
  }),
734
- p && /* @__PURE__ */ K(re, {
735
- label: A.publishLabel,
770
+ p && /* @__PURE__ */ K(ne, {
771
+ label: j.publishLabel,
736
772
  onClick: p,
737
773
  className: "hidden shrink-0 desktop:inline-flex"
738
774
  }),
739
- h && /* @__PURE__ */ K(m, {
740
- label: A.editLabel,
741
- variant: _.Primary,
742
- onClick: h,
775
+ m && /* @__PURE__ */ K(h, {
776
+ label: j.editLabel,
777
+ variant: v.Primary,
778
+ onClick: m,
743
779
  className: "hidden shrink-0 desktop:inline-flex"
744
780
  }),
745
- ge(!1, "hidden desktop:block"),
746
- ge(!0, "desktop:hidden")
781
+ G(!1, "hidden desktop:block"),
782
+ G(!0, "desktop:hidden")
747
783
  ]
748
784
  }), /* @__PURE__ */ q("div", {
749
- className: d("flex min-w-0 flex-1 flex-col desktop:flex-row", k == null && "desktop:justify-end"),
750
- children: [k != null && /* @__PURE__ */ K("section", {
751
- "aria-label": te,
785
+ className: d("flex min-w-0 flex-1 flex-col desktop:flex-row", D == null && "desktop:justify-end"),
786
+ children: [D != null && /* @__PURE__ */ K("section", {
787
+ "aria-label": A,
752
788
  className: "flex min-w-0 flex-1 flex-col gap-6 px-4 py-6 desktop:px-8",
753
- children: k
789
+ children: D
754
790
  }), /* @__PURE__ */ q("aside", {
755
- "aria-labelledby": W,
791
+ "aria-labelledby": V,
756
792
  className: d("flex w-full min-w-0 flex-col gap-5 border-t px-4 py-6 desktop:w-[488px] desktop:shrink-0 desktop:border-s desktop:border-t-0 desktop:px-8", $.panel),
757
793
  children: [
758
794
  /* @__PURE__ */ K("h2", {
759
- id: W,
760
- className: d(F, $.title),
761
- children: A.detailsLabel
795
+ id: V,
796
+ className: d(ie, $.title),
797
+ children: j.detailsLabel
762
798
  }),
763
799
  e.description !== "" && /* @__PURE__ */ q("section", {
764
800
  className: "flex min-w-0 flex-col gap-1",
765
801
  children: [/* @__PURE__ */ K("h3", {
766
802
  className: d(I, $.secondary),
767
- children: A.descriptionLabel
803
+ children: j.descriptionLabel
768
804
  }), /* @__PURE__ */ K("p", {
769
- className: d("break-words whitespace-pre-line", R, $.body),
805
+ className: d("wrap-break-word whitespace-pre-line", L, $.body),
770
806
  children: e.description
771
807
  })]
772
808
  }),
@@ -774,12 +810,12 @@ var ve = /* @__PURE__ */ function(e) {
774
810
  className: "flex min-w-0 flex-col gap-1",
775
811
  children: [/* @__PURE__ */ K("h3", {
776
812
  className: d(I, $.secondary),
777
- children: A.instructionsLabel
813
+ children: j.instructionsLabel
778
814
  }), /* @__PURE__ */ K("div", {
779
- className: d("min-w-0 break-words", R, $.body),
815
+ className: d("min-w-0 wrap-break-word", L, $.body),
780
816
  children: /* @__PURE__ */ K(i, {
781
817
  content: e.instructions,
782
- classNames: G
818
+ classNames: me
783
819
  })
784
820
  })]
785
821
  }),
@@ -787,37 +823,37 @@ var ve = /* @__PURE__ */ function(e) {
787
823
  className: "flex min-w-0 flex-col gap-2",
788
824
  children: [/* @__PURE__ */ K("h3", {
789
825
  className: d(I, $.secondary),
790
- children: A.contextLabel
791
- }), B.length === 0 ? /* @__PURE__ */ K(o, { label: A.emptyContextLabel }) : /* @__PURE__ */ q(pe, { children: [
826
+ children: j.contextLabel
827
+ }), pe.length === 0 ? /* @__PURE__ */ K(o, { label: j.emptyContextLabel }) : /* @__PURE__ */ q(he, { children: [
792
828
  /* @__PURE__ */ K("div", {
793
829
  role: "search",
794
- children: /* @__PURE__ */ K(L, {
830
+ children: /* @__PURE__ */ K(ae, {
795
831
  value: c,
796
832
  onChange: (e) => l(e ?? ""),
797
- placeholder: A.contextSearchPlaceholder,
798
- clearLabel: A.clearSearchLabel,
799
- "aria-label": A.contextSearchAriaLabel
833
+ placeholder: j.contextSearchPlaceholder,
834
+ clearLabel: j.clearSearchLabel,
835
+ "aria-label": j.contextSearchAriaLabel
800
836
  })
801
837
  }),
802
- V.length === 0 ? /* @__PURE__ */ K("p", {
803
- className: d(oe, $.secondary),
804
- children: A.noContextMatchesLabel
838
+ z.length === 0 ? /* @__PURE__ */ K("p", {
839
+ className: d(se, $.secondary),
840
+ children: j.noContextMatchesLabel
805
841
  }) : /* @__PURE__ */ K("ul", {
806
842
  className: "m-0 flex min-w-0 list-none flex-wrap gap-2 p-0 pt-2",
807
- children: V.map((e) => /* @__PURE__ */ K("li", {
843
+ children: z.map((e) => /* @__PURE__ */ K("li", {
808
844
  className: "min-w-0",
809
- children: /* @__PURE__ */ K(me, {
810
- attachment: nt(e),
811
- searchQuery: fe,
812
- onClick: w,
813
- labels: { clickLabel: A.openFileLabel(e.name) }
845
+ children: /* @__PURE__ */ K(ge, {
846
+ attachment: it(e),
847
+ searchQuery: B,
848
+ onClick: C,
849
+ labels: { clickLabel: j.openFileLabel(e.name) }
814
850
  })
815
851
  }, e.name))
816
852
  }),
817
- /* @__PURE__ */ K(j, {
853
+ /* @__PURE__ */ K(te, {
818
854
  visuallyHidden: !0,
819
- as: ne.Span,
820
- children: fe === "" ? "" : A.contextResultCountLabel(V.length)
855
+ as: N.Span,
856
+ children: B === "" ? "" : j.contextResultCountLabel(z.length)
821
857
  })
822
858
  ] })]
823
859
  })
@@ -825,7 +861,7 @@ var ve = /* @__PURE__ */ function(e) {
825
861
  })]
826
862
  })]
827
863
  });
828
- }), it = 24, at = ({ item: e, labels: n, rowTitleClassName: r, onOpen: i, onRename: a, onDelete: o }) => {
864
+ }), ot = 24, st = ({ item: e, labels: n, rowTitleClassName: r, onOpen: i, onRename: a, onDelete: o }) => {
829
865
  let s = U(() => [...a ? [{
830
866
  key: "rename",
831
867
  label: n.renameLabel,
@@ -854,28 +890,28 @@ var ve = /* @__PURE__ */ function(e) {
854
890
  className: "shrink-0",
855
891
  children: /* @__PURE__ */ K(t, {
856
892
  name: e.authorName ?? "",
857
- size: it
893
+ size: ot
858
894
  })
859
- }), /* @__PURE__ */ K(C, {
895
+ }), /* @__PURE__ */ K(w, {
860
896
  text: e.title,
861
897
  className: d("min-w-0 flex-1", r)
862
898
  })]
863
- }), s.length > 0 && /* @__PURE__ */ K(x, {
899
+ }), s.length > 0 && /* @__PURE__ */ K(S, {
864
900
  items: s,
865
901
  placement: "bottom-end",
866
- children: /* @__PURE__ */ K(O, {
902
+ children: /* @__PURE__ */ K(k, {
867
903
  "aria-label": n.moreActionsLabel(e.title),
868
- size: S.Small,
904
+ size: C.Small,
869
905
  className: "me-2 shrink-0",
870
- icon: /* @__PURE__ */ K(se, {
906
+ icon: /* @__PURE__ */ K(ue, {
871
907
  "aria-hidden": !0,
872
- size: y.SM,
873
- stroke: b
908
+ size: b.SM,
909
+ stroke: x
874
910
  })
875
911
  })
876
912
  })]
877
913
  });
878
- }, ot = B(({ items: e, isLoading: t = !1, hasError: n = !1, onRetry: r, hasMore: i = !1, isLoadingMore: a = !1, onLoadMore: s, onOpen: c, onRename: ee, onDelete: l, labels: u, typography: f }) => {
914
+ }, ct = B(({ items: e, isLoading: t = !1, hasError: n = !1, onRetry: r, hasMore: i = !1, isLoadingMore: a = !1, onLoadMore: s, onOpen: c, onRename: ee, onDelete: l, labels: u, typography: f }) => {
879
915
  let p = H(), m = f?.titleClassName ?? "dial-body-semi-text", h = f?.rowTitleClassName ?? "dial-body-text", g = f?.messageClassName ?? "dial-small-text", _ = !t && !n && e.length === 0;
880
916
  return /* @__PURE__ */ q("section", {
881
917
  "aria-labelledby": _ ? void 0 : p,
@@ -890,7 +926,7 @@ var ve = /* @__PURE__ */ function(e) {
890
926
  className: "flex justify-center py-6",
891
927
  children: [/* @__PURE__ */ K("span", {
892
928
  "aria-hidden": !0,
893
- children: /* @__PURE__ */ K(ae, {})
929
+ children: /* @__PURE__ */ K(oe, {})
894
930
  }), /* @__PURE__ */ K("span", {
895
931
  className: "sr-only",
896
932
  children: u.loadingLabel
@@ -901,7 +937,7 @@ var ve = /* @__PURE__ */ function(e) {
901
937
  children: [/* @__PURE__ */ K("p", {
902
938
  className: d("m-0", g),
903
939
  children: u.errorLabel
904
- }), /* @__PURE__ */ K(D, {
940
+ }), /* @__PURE__ */ K(O, {
905
941
  label: u.retryLabel,
906
942
  onClick: r
907
943
  })]
@@ -911,9 +947,9 @@ var ve = /* @__PURE__ */ function(e) {
911
947
  label: u.emptyTitle,
912
948
  description: u.emptyDescription
913
949
  })
914
- }) : /* @__PURE__ */ q(pe, { children: [/* @__PURE__ */ K("ul", {
950
+ }) : /* @__PURE__ */ q(he, { children: [/* @__PURE__ */ K("ul", {
915
951
  className: "m-0 flex min-w-0 list-none flex-col gap-1 p-0",
916
- children: e.map((e) => /* @__PURE__ */ K(at, {
952
+ children: e.map((e) => /* @__PURE__ */ K(st, {
917
953
  item: e,
918
954
  labels: u,
919
955
  rowTitleClassName: h,
@@ -921,44 +957,44 @@ var ve = /* @__PURE__ */ function(e) {
921
957
  onRename: ee,
922
958
  onDelete: l
923
959
  }, e.id))
924
- }), i && s && /* @__PURE__ */ K(D, {
960
+ }), i && s && /* @__PURE__ */ K(O, {
925
961
  className: "self-center",
926
962
  label: u.loadMoreLabel ?? "Show more",
927
963
  disabled: a,
928
964
  onClick: s
929
965
  })] })]
930
966
  });
931
- }), st = B(({ composer: t, items: n, isLoading: r = !1, hasError: i = !1, onRetry: a, hasMore: o, isLoadingMore: s, onLoadMore: c, onOpen: ee, onRename: l, onDelete: u, labels: d, listTypography: f }) => {
932
- let p = H(), m = W(null), [g, v] = G(null), [y, b] = G(""), [x, S] = G(), [C, w] = G(!1), [T, E] = G(null), [D, O] = G(!1), k = W(null), A = V(() => {
967
+ }), lt = B(({ composer: t, items: n, isLoading: r = !1, hasError: i = !1, onRetry: a, hasMore: o, isLoadingMore: s, onLoadMore: c, onOpen: ee, onRename: l, onDelete: u, labels: d, listTypography: f }) => {
968
+ let p = H(), m = W(null), [h, _] = G(null), [y, b] = G(""), [x, S] = G(), [C, w] = G(!1), [T, E] = G(null), [D, O] = G(!1), k = W(null), A = V(() => {
933
969
  k.current = document.activeElement;
934
- }, []), j = V(() => {
970
+ }, []), M = V(() => {
935
971
  let e = k.current;
936
972
  k.current = null, e?.isConnected && window.setTimeout(() => e.focus(), 0);
937
- }, []), ne = V((e) => {
973
+ }, []), te = V((e) => {
938
974
  k.current = null, window.setTimeout(() => {
939
975
  let t = m.current;
940
976
  if (!t) return;
941
977
  let n = t.querySelectorAll("li > button"), r = n[Math.min(e, n.length - 1)] ?? t.querySelector("h2, section");
942
978
  r && !r.matches("button") && (r.tabIndex = -1), r?.focus();
943
979
  }, 0);
944
- }, []), M = V((e) => n.find((t) => t.id === e) ?? null, [n]), N = V((e) => {
980
+ }, []), N = V((e) => n.find((t) => t.id === e) ?? null, [n]), P = V((e) => {
945
981
  A();
946
- let t = M(e);
947
- v(t), b(t?.title ?? ""), S(void 0);
948
- }, [M, A]), re = V((e) => {
949
- A(), E(M(e));
950
- }, [M, A]), F = V(() => {
951
- C || (v(null), j());
952
- }, [C, j]), I = V(() => {
953
- D || (E(null), j());
954
- }, [D, j]), L = V(async () => {
955
- if (!g || !l || C) return;
982
+ let t = N(e);
983
+ _(t), b(t?.title ?? ""), S(void 0);
984
+ }, [N, A]), F = V((e) => {
985
+ A(), E(N(e));
986
+ }, [N, A]), ne = V(() => {
987
+ C || (_(null), M());
988
+ }, [C, M]), I = V(() => {
989
+ D || (E(null), M());
990
+ }, [D, M]), L = V(async () => {
991
+ if (!h || !l || C) return;
956
992
  let e = y.trim();
957
993
  if (!e) S(d.renameEmptyError);
958
994
  else {
959
995
  w(!0);
960
996
  try {
961
- await l(g.id, e), v(null), j();
997
+ await l(h.id, e), _(null), M();
962
998
  } catch {} finally {
963
999
  w(!1);
964
1000
  }
@@ -967,51 +1003,51 @@ var ve = /* @__PURE__ */ function(e) {
967
1003
  C,
968
1004
  d.renameEmptyError,
969
1005
  l,
970
- g,
1006
+ h,
971
1007
  y,
972
- j
1008
+ M
973
1009
  ]), ae = V((e) => {
974
1010
  e.key !== "Enter" || e.nativeEvent.isComposing || (e.preventDefault(), L());
975
- }, [L]), R = V(async () => {
1011
+ }, [L]), oe = V(async () => {
976
1012
  if (!T || !u) return;
977
1013
  let e = n.findIndex((e) => e.id === T.id);
978
1014
  O(!0);
979
1015
  try {
980
- await u(T.id), E(null), ne(Math.max(e, 0));
1016
+ await u(T.id), E(null), te(Math.max(e, 0));
981
1017
  } catch {} finally {
982
1018
  O(!1);
983
1019
  }
984
1020
  }, [
985
1021
  T,
986
- ne,
1022
+ te,
987
1023
  n,
988
1024
  u
989
- ]), z = U(() => [{
1025
+ ]), se = U(() => [{
990
1026
  label: d.renameCancelLabel ?? "Cancel",
991
- variant: _.Primary,
992
- appearance: h.Ghost,
1027
+ variant: v.Primary,
1028
+ appearance: g.Ghost,
993
1029
  disabled: C,
994
- onClick: F
1030
+ onClick: ne
995
1031
  }, {
996
1032
  label: d.renameSaveLabel,
997
- variant: _.Primary,
1033
+ variant: v.Primary,
998
1034
  disabled: C,
999
1035
  onClick: () => {
1000
1036
  L();
1001
1037
  }
1002
1038
  }], [
1003
- F,
1039
+ ne,
1004
1040
  L,
1005
1041
  C,
1006
1042
  d.renameCancelLabel,
1007
1043
  d.renameSaveLabel
1008
1044
  ]);
1009
- return /* @__PURE__ */ q(pe, { children: [
1045
+ return /* @__PURE__ */ q(he, { children: [
1010
1046
  t,
1011
1047
  /* @__PURE__ */ K("div", {
1012
1048
  ref: m,
1013
1049
  className: "contents",
1014
- children: /* @__PURE__ */ K(ot, {
1050
+ children: /* @__PURE__ */ K(ct, {
1015
1051
  items: n,
1016
1052
  isLoading: r,
1017
1053
  hasError: i,
@@ -1020,21 +1056,21 @@ var ve = /* @__PURE__ */ function(e) {
1020
1056
  isLoadingMore: s,
1021
1057
  onLoadMore: c,
1022
1058
  onOpen: ee,
1023
- onRename: l ? N : void 0,
1024
- onDelete: u ? re : void 0,
1059
+ onRename: l ? P : void 0,
1060
+ onDelete: u ? F : void 0,
1025
1061
  labels: d.list,
1026
1062
  typography: f
1027
1063
  })
1028
1064
  }),
1029
- g && /* @__PURE__ */ K(P, {
1065
+ h && /* @__PURE__ */ K(re, {
1030
1066
  open: !0,
1031
1067
  header: d.renameTitle,
1032
1068
  size: ie.Sm,
1033
- mainButtons: z,
1034
- onClose: F,
1069
+ mainButtons: se,
1070
+ onClose: ne,
1035
1071
  children: /* @__PURE__ */ K("div", {
1036
1072
  className: "px-6 py-4",
1037
- children: /* @__PURE__ */ K(te, {
1073
+ children: /* @__PURE__ */ K(j, {
1038
1074
  id: p,
1039
1075
  value: y,
1040
1076
  labelProps: { label: d.renameInputLabel },
@@ -1055,20 +1091,20 @@ var ve = /* @__PURE__ */ function(e) {
1055
1091
  labels: d.deleteDialog,
1056
1092
  isLoading: D,
1057
1093
  onConfirm: () => {
1058
- R();
1094
+ oe();
1059
1095
  },
1060
1096
  onClose: I
1061
1097
  })
1062
1098
  ] });
1063
- }), ct = B(({ projectName: e, projectHref: t, onBack: n, onProjectLinkClick: r, backLabel: i, className: a, nameClassName: o = "dial-body-text" }) => /* @__PURE__ */ q("nav", {
1099
+ }), ut = B(({ projectName: e, projectHref: t, onBack: n, onProjectLinkClick: r, backLabel: i, className: a, nameClassName: o = "dial-body-text" }) => /* @__PURE__ */ q("nav", {
1064
1100
  "aria-label": i,
1065
1101
  className: d("flex min-w-0 shrink-0 items-center gap-2 border-b px-4 py-2", a),
1066
- children: [/* @__PURE__ */ K(O, {
1102
+ children: [/* @__PURE__ */ K(k, {
1067
1103
  "aria-label": i,
1068
- icon: /* @__PURE__ */ K(z, {
1104
+ icon: /* @__PURE__ */ K(ce, {
1069
1105
  "aria-hidden": !0,
1070
- size: y.MD,
1071
- stroke: b,
1106
+ size: b.MD,
1107
+ stroke: x,
1072
1108
  className: "rtl:scale-x-[-1]"
1073
1109
  }),
1074
1110
  onClick: n
@@ -1076,11 +1112,11 @@ var ve = /* @__PURE__ */ function(e) {
1076
1112
  href: t,
1077
1113
  onClick: r,
1078
1114
  className: "min-w-0 hover:underline focus-visible:underline",
1079
- children: /* @__PURE__ */ K(C, {
1115
+ children: /* @__PURE__ */ K(w, {
1080
1116
  text: e,
1081
1117
  className: d("min-w-0", o)
1082
1118
  })
1083
1119
  })]
1084
1120
  }));
1085
1121
  //#endregion
1086
- export { Q as ContextFileRejection, Me as PROJECT_NAME_MAX_BYTES, ct as ProjectChatHeader, ot as ProjectConversationList, st as ProjectConversationsPanel, tt as ProjectCreateForm, je as ProjectNameError, Oe as ProjectSource, rt as ProjectView, De as Projects, ve as ProjectsSortKey, Ke as checkContextFiles, Je as filterContextFileItems, Ve as getContextFilesSize, ze as isStoredContextFile, Le as validateProjectName };
1122
+ export { Q as ContextFileRejection, Pe as PROJECT_NAME_MAX_BYTES, ut as ProjectChatHeader, ct as ProjectConversationList, lt as ProjectConversationsPanel, rt as ProjectCreateForm, Ne as ProjectNameError, Ae as ProjectSource, at as ProjectView, ke as Projects, Y as ProjectsSortKey, Je as checkContextFiles, Xe as filterContextFileItems, Ue as getContextFilesSize, Ve as isStoredContextFile, ze as validateProjectName };