@epam/ai-dial-projects 1.3.0-dev.343 → 1.3.0-dev.353

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,43 +1,43 @@
1
1
  import { ActionMenu as e, DeleteConfirmationDialog 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 l, getAttachmentTypeFromMime as u, inferMimeTypeFromPath as d, mergeClasses as f, useAvailableHeightCap as p, useIsMobile as m, useTextRefinement as h } from "@epam/ai-dial-chat-shared";
2
- import { Button as g, ButtonAppearance as _, ButtonDropdown as v, ButtonVariant as y, CaptionText as b, CardShell as x, DIAL_ICON_SIZE as S, DIAL_KIT_ICON_STROKE as C, ElementSize as w, EllipsisTooltip as T, ErrorText as E, FileDropzone as D, FolderPath as O, GhostButton as k, GhostIconButton as A, Highlight as j, Input as M, Label as ee, LinkButton as N, LiveRegion as P, LiveRegionElement as F, LiveRegionPoliteness as I, MenuItemMark as te, NeutralButton as ne, Popup as re, PopupSize as L, Search as ie, Spinner as ae } from "@epam/ai-dial-ui-kit";
3
- import { IconArrowNarrowLeft as oe, IconArrowsSort as R, IconDotsVertical as se, IconDownload as ce, IconPencilMinus as le, IconPin as z, IconPinFilled as ue, IconPlus as de, IconShare as fe, IconTrashX as pe, IconWorldShare as me, createReactComponent as he } from "@tabler/icons-react";
2
+ import { Button as g, ButtonAppearance as _, ButtonDropdown as v, ButtonVariant as y, CaptionText as b, CardShell as x, DIAL_ICON_SIZE as S, DIAL_KIT_ICON_STROKE as C, ElementSize as w, EllipsisTooltip as T, ErrorText as E, FileDropzone as D, FolderPath as O, GhostButton as k, GhostIconButton as A, Highlight as j, Input as M, Label as ee, LinkButton as N, LiveRegion as P, LiveRegionElement as F, LiveRegionPoliteness as I, MenuItemMark as L, NeutralButton as te, Popup as ne, PopupSize as R, Search as re, Spinner as ie } from "@epam/ai-dial-ui-kit";
3
+ import { IconArrowNarrowLeft as ae, IconArrowsSort as z, IconDotsVertical as oe, IconDownload as se, IconPencilMinus as ce, IconPin as le, IconPinFilled as ue, IconPlus as de, IconShare as fe, IconTrashX as pe, IconWorldShare as me, createReactComponent as he } from "@tabler/icons-react";
4
4
  import { Suspense as ge, lazy as B, memo as V, useCallback as H, useEffect as _e, useId as U, useMemo as W, useRef as G, useState as K } from "react";
5
- import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
6
- import { AttachmentCard as ve, FileDndOverlay as ye } from "@epam/ai-dial-attachment-input";
7
- import { BuilderFormActionsOrder as be, BuilderFormContainer as xe } from "@epam/ai-dial-builder-form";
8
- import { LazyMarkdownEditor as Se } from "@epam/ai-dial-ui-kit/editors";
5
+ import { Fragment as ve, jsx as q, jsxs as J } from "react/jsx-runtime";
6
+ import { AttachmentCard as ye, FileDndOverlay as be } from "@epam/ai-dial-attachment-input";
7
+ import { BuilderFormActionsOrder as xe, BuilderFormContainer as Se } from "@epam/ai-dial-builder-form";
8
+ import { LazyMarkdownEditor as Ce } from "@epam/ai-dial-ui-kit/editors";
9
9
  //#region src/types/projects-sort-key.ts
10
- var X = /* @__PURE__ */ function(e) {
10
+ var Y = /* @__PURE__ */ function(e) {
11
11
  return e.Newest = "newest", e.Oldest = "oldest", e.NameAsc = "name-asc", e;
12
- }({}), Ce = (e, t) => {
12
+ }({}), we = (e, t) => {
13
13
  let n = t.trim().toLocaleLowerCase();
14
14
  return n ? e.filter((e) => e.name.toLocaleLowerCase().includes(n)) : e;
15
- }, we = (e, t, n) => {
15
+ }, Te = (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 === X.NameAsc) return [...e].sort((e, t) => a(e, t) || i(e, t));
21
- let o = t === X.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
- }, Te = 60, Ee = 3600, De = 24 * Ee, Oe = [
27
- ["year", 365 * De],
28
- ["month", 30 * De],
29
- ["week", 7 * De],
30
- ["day", De],
31
- ["hour", Ee],
32
- ["minute", Te]
33
- ], ke = (e, t, n) => {
26
+ }, Ee = 60, De = 3600, Oe = 24 * De, ke = [
27
+ ["year", 365 * Oe],
28
+ ["month", 30 * Oe],
29
+ ["week", 7 * Oe],
30
+ ["day", Oe],
31
+ ["hour", De],
32
+ ["minute", Ee]
33
+ ], Ae = (e, t, n) => {
34
34
  let r = (t - e) / 1e3;
35
- for (let [e, t] of Oe) {
35
+ for (let [e, t] of ke) {
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
- }, Z = {
40
+ }, X = {
41
41
  card: "_card_1gkfw_1",
42
42
  title: "_title_1gkfw_5",
43
43
  updatedAt: "_updatedAt_1gkfw_9",
@@ -48,57 +48,57 @@ var X = /* @__PURE__ */ function(e) {
48
48
  link: "_link_1gkfw_39",
49
49
  aboveLink: "_aboveLink_1gkfw_55",
50
50
  interactive: "_interactive_1gkfw_60"
51
- }, Ae = (e, t) => [e, ...(t ?? "").split("/").filter((e) => e.length > 0)], je = (e) => e.button === 0 && !e.metaKey && !e.ctrlKey && !e.shiftKey && !e.altKey, Me = ({ project: e, searchQuery: t, sourceLabel: n, folderPathLabel: r, pinnedLabel: i, pinLabel: a, onTogglePin: o, href: s, onOpen: c, now: l, locale: u, updatedAtClassName: d, titleClassName: p, pathLabelClassName: m, pathLeafClassName: h }) => {
52
- let g = /* @__PURE__ */ J(j, {
51
+ }, je = (e, t) => [e, ...(t ?? "").split("/").filter((e) => e.length > 0)], Me = (e) => e.button === 0 && !e.metaKey && !e.ctrlKey && !e.shiftKey && !e.altKey, Ne = ({ project: e, searchQuery: t, sourceLabel: n, folderPathLabel: r, pinnedLabel: i, pinLabel: a, onTogglePin: o, href: s, onOpen: c, now: l, locale: u, updatedAtClassName: d, titleClassName: p, pathLabelClassName: m, pathLeafClassName: h }) => {
52
+ let g = /* @__PURE__ */ q(j, {
53
53
  text: e.name,
54
54
  query: t,
55
55
  maxLines: 1,
56
- className: f("min-w-0", p, Z.title, s != null && Z.aboveLink)
57
- }), _ = /* @__PURE__ */ J(O, {
58
- segments: Ae(n, e.parentPath),
56
+ className: f("min-w-0", p, X.title, s != null && X.aboveLink)
57
+ }), _ = /* @__PURE__ */ q(O, {
58
+ segments: je(n, e.parentPath),
59
59
  ariaLabel: r,
60
- labelClassName: f(m, Z.path),
61
- leafClassName: f(h, Z.path)
60
+ labelClassName: f(m, X.path),
61
+ leafClassName: f(h, X.path)
62
62
  }), v = G(null);
63
- return /* @__PURE__ */ J("li", {
63
+ return /* @__PURE__ */ q("li", {
64
64
  className: "flex min-w-0",
65
- children: /* @__PURE__ */ Y(x, {
65
+ children: /* @__PURE__ */ J(x, {
66
66
  "aria-label": e.name,
67
- className: f("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),
67
+ className: f("relative flex w-full min-w-0 flex-col gap-2", X.card, s != null && "has-focus-visible:translate-y-[-3px] has-focus-visible:shadow-lg motion-reduce:has-focus-visible:translate-y-0", s != null && X.interactive),
68
68
  children: [
69
- e.updatedAt != null && /* @__PURE__ */ J("time", {
69
+ e.updatedAt != null && /* @__PURE__ */ q("time", {
70
70
  dateTime: new Date(e.updatedAt).toISOString(),
71
- className: f(d, Z.updatedAt, (e.isPinned || o != null) && "pe-6"),
72
- children: ke(e.updatedAt, l, u)
71
+ className: f(d, X.updatedAt, (e.isPinned || o != null) && "pe-6"),
72
+ children: Ae(e.updatedAt, l, u)
73
73
  }),
74
- /* @__PURE__ */ Y("div", {
74
+ /* @__PURE__ */ J("div", {
75
75
  className: f("flex min-w-0 items-center", (e.isPinned || o != null) && "pe-6"),
76
- children: [s == null ? /* @__PURE__ */ J("div", {
76
+ children: [s == null ? /* @__PURE__ */ q("div", {
77
77
  className: "min-w-0 flex-1",
78
78
  children: g
79
- }) : /* @__PURE__ */ J("a", {
79
+ }) : /* @__PURE__ */ q("a", {
80
80
  ref: v,
81
81
  href: s,
82
82
  onClick: (t) => {
83
- c != null && je(t) && (t.preventDefault(), c(e.id));
83
+ c != null && Me(t) && (t.preventDefault(), c(e.id));
84
84
  },
85
- className: f("min-w-0 flex-1", Z.link),
85
+ className: f("min-w-0 flex-1", X.link),
86
86
  children: g
87
- }), o == null ? e.isPinned && /* @__PURE__ */ Y("span", {
88
- className: f("absolute inset-e-5 top-5 flex", Z.pin),
89
- children: [/* @__PURE__ */ J(ue, {
87
+ }), o == null ? e.isPinned && /* @__PURE__ */ J("span", {
88
+ className: f("absolute inset-e-5 top-5 flex", X.pin),
89
+ children: [/* @__PURE__ */ q(ue, {
90
90
  size: S.SM,
91
91
  "aria-hidden": !0
92
- }), /* @__PURE__ */ J("span", {
92
+ }), /* @__PURE__ */ q("span", {
93
93
  className: "sr-only",
94
94
  children: i
95
95
  })]
96
- }) : /* @__PURE__ */ J(A, {
96
+ }) : /* @__PURE__ */ q(A, {
97
97
  size: w.Small,
98
- icon: e.isPinned ? /* @__PURE__ */ J(ue, {
98
+ icon: e.isPinned ? /* @__PURE__ */ q(ue, {
99
99
  size: S.SM,
100
100
  "aria-hidden": !0
101
- }) : /* @__PURE__ */ J(z, {
101
+ }) : /* @__PURE__ */ q(le, {
102
102
  size: S.SM,
103
103
  "aria-hidden": !0,
104
104
  stroke: C
@@ -106,11 +106,11 @@ var X = /* @__PURE__ */ function(e) {
106
106
  "aria-label": a,
107
107
  "aria-pressed": e.isPinned === !0,
108
108
  onClick: () => o(e.id, !e.isPinned),
109
- className: f("absolute inset-e-4 top-4", Z.pinToggle, !e.isPinned && Z.pinToggleIdle)
109
+ className: f("absolute inset-e-4 top-4", X.pinToggle, !e.isPinned && X.pinToggleIdle)
110
110
  })]
111
111
  }),
112
- s == null ? _ : /* @__PURE__ */ J("div", {
113
- className: Z.aboveLink,
112
+ s == null ? _ : /* @__PURE__ */ q("div", {
113
+ className: X.aboveLink,
114
114
  onClick: (e) => {
115
115
  v.current?.dispatchEvent(new window.MouseEvent("click", {
116
116
  bubbles: !0,
@@ -127,12 +127,12 @@ var X = /* @__PURE__ */ function(e) {
127
127
  ]
128
128
  })
129
129
  });
130
- }, Q = {
130
+ }, Z = {
131
131
  container: "_container_4rer8_1",
132
132
  subtitle: "_subtitle_4rer8_5",
133
133
  sortButton: "_sortButton_4rer8_9"
134
- }, Ne = ({ projects: e, isLoading: t = !1, hasError: n = !1, incompleteSources: r = [], onRetry: i, onCreateProject: a, onTogglePin: s, onOpenProject: c, getProjectHref: u, searchQuery: d, onSearchQueryChange: p, sortKey: h, onSortKeyChange: b, labels: x, locale: T, styles: E }) => {
135
- let { colors: D, typography: O } = E ?? {}, A = O?.titleClassName ?? "dial-h1-text", j = O?.subtitleClassName ?? "dial-body-text", M = O?.cardTitleClassName ?? "dial-body-semi-text", ee = O?.pathLabelClassName ?? "dial-tiny-text", N = O?.pathLeafClassName ?? "dial-tiny-semi-text", I = O?.updatedAtClassName ?? "dial-tiny-text", ne = O?.emptyStateDescriptionClassName ?? "dial-small-paragraph-text", re = l({
134
+ }, Pe = ({ projects: e, isLoading: t = !1, hasError: n = !1, incompleteSources: r = [], onRetry: i, onCreateProject: a, onTogglePin: s, onOpenProject: c, getProjectHref: u, searchQuery: d, onSearchQueryChange: p, sortKey: h, onSortKeyChange: b, labels: x, locale: T, styles: E }) => {
135
+ let { colors: D, typography: O } = E ?? {}, A = O?.titleClassName ?? "dial-h1-text", j = O?.subtitleClassName ?? "dial-body-text", M = O?.cardTitleClassName ?? "dial-body-semi-text", ee = O?.pathLabelClassName ?? "dial-tiny-text", N = O?.pathLeafClassName ?? "dial-tiny-semi-text", I = O?.updatedAtClassName ?? "dial-tiny-text", te = O?.emptyStateDescriptionClassName ?? "dial-small-paragraph-text", ne = l({
136
136
  "--pr-bg": D?.background,
137
137
  "--pr-subtitle-text": D?.subtitleText,
138
138
  "--pr-sort-text": D?.sortButtonText,
@@ -141,7 +141,7 @@ var X = /* @__PURE__ */ function(e) {
141
141
  "--pr-updated-at-text": D?.updatedAtText,
142
142
  "--pr-path-text": D?.pathText,
143
143
  "--pr-card-focus-outline": D?.cardFocusOutline
144
- }), L = m(), oe = W(() => Date.now(), [e]), se = d.trim(), ce = r.length > 0, le = ce && e.length === 0, z = W(() => we(Ce(e, d), h, T), [
144
+ }), R = m(), ae = W(() => Date.now(), [e]), oe = d.trim(), se = r.length > 0, ce = se && e.length === 0, le = W(() => Te(we(e, d), h, T), [
145
145
  e,
146
146
  d,
147
147
  h,
@@ -149,7 +149,7 @@ var X = /* @__PURE__ */ function(e) {
149
149
  ]), ue = x.sortOptions.find((e) => e.value === h)?.label ?? x.sortLabel, fe = W(() => x.sortOptions.map((e) => ({
150
150
  key: e.value,
151
151
  label: e.label,
152
- mark: te.Check,
152
+ mark: L.Check,
153
153
  checked: e.value === h,
154
154
  onClick: () => b(e.value)
155
155
  })), [
@@ -159,37 +159,37 @@ var X = /* @__PURE__ */ function(e) {
159
159
  ]), pe = (e) => {
160
160
  p(e ?? "");
161
161
  }, me = () => {
162
- if (!t) return n ? x.errorLabel : ce ? x.incompleteLabel : e.length === 0 ? x.emptyStateLabel : z.length === 0 ? x.noResultsLabel : x.resultCountLabel(z.length);
163
- }, he = (e, t) => a ? /* @__PURE__ */ J(g, {
162
+ if (!t) return n ? x.errorLabel : se ? x.incompleteLabel : e.length === 0 ? x.emptyStateLabel : le.length === 0 ? x.noResultsLabel : x.resultCountLabel(le.length);
163
+ }, he = (e, t) => a ? /* @__PURE__ */ q(g, {
164
164
  label: x.createProjectLabel,
165
165
  variant: e,
166
166
  onClick: a,
167
167
  className: f("shrink-0", t)
168
- }) : void 0, ge = () => t ? /* @__PURE__ */ J(ae, { ariaLabel: x.loadingAriaLabel ?? "Loading projects" }) : n || le ? /* @__PURE__ */ Y("div", {
168
+ }) : void 0, ge = () => t ? /* @__PURE__ */ q(ie, { ariaLabel: x.loadingAriaLabel ?? "Loading projects" }) : n || ce ? /* @__PURE__ */ J("div", {
169
169
  className: "flex flex-col items-center gap-3",
170
- children: [/* @__PURE__ */ J("p", {
171
- className: f(j, Q.subtitle),
170
+ children: [/* @__PURE__ */ q("p", {
171
+ className: f(j, Z.subtitle),
172
172
  children: n ? x.errorLabel : x.incompleteLabel
173
- }), /* @__PURE__ */ J(k, {
173
+ }), /* @__PURE__ */ q(k, {
174
174
  label: x.retryLabel,
175
175
  onClick: i
176
176
  })]
177
- }) : e.length === 0 ? /* @__PURE__ */ J(o, {
177
+ }) : e.length === 0 ? /* @__PURE__ */ q(o, {
178
178
  label: x.emptyStateLabel,
179
179
  description: x.emptyStateDescription,
180
180
  action: he(y.Secondary, "mt-2"),
181
181
  containerClassName: V,
182
182
  labelClassName: "mt-3",
183
- descriptionClassName: ne
184
- }) : z.length === 0 ? /* @__PURE__ */ J(o, {
183
+ descriptionClassName: te
184
+ }) : le.length === 0 ? /* @__PURE__ */ q(o, {
185
185
  label: x.noResultsLabel,
186
186
  containerClassName: V,
187
187
  labelClassName: "mt-3"
188
- }) : /* @__PURE__ */ J("ul", {
188
+ }) : /* @__PURE__ */ q("ul", {
189
189
  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",
190
- children: z.map((e) => /* @__PURE__ */ J(Me, {
190
+ children: le.map((e) => /* @__PURE__ */ q(Ne, {
191
191
  project: e,
192
- searchQuery: se,
192
+ searchQuery: oe,
193
193
  sourceLabel: x.sourceLabels[e.source],
194
194
  folderPathLabel: x.folderPathLabel,
195
195
  pinnedLabel: x.pinnedLabel ?? "Pinned",
@@ -197,93 +197,93 @@ var X = /* @__PURE__ */ function(e) {
197
197
  onTogglePin: s,
198
198
  href: u?.(e.id),
199
199
  onOpen: c,
200
- now: oe,
200
+ now: ae,
201
201
  locale: T,
202
202
  updatedAtClassName: I,
203
203
  titleClassName: M,
204
204
  pathLabelClassName: ee,
205
205
  pathLeafClassName: N
206
206
  }, e.id))
207
- }), B = t || n || le, V = "mt-6 p-3 desktop:mt-0";
208
- return /* @__PURE__ */ Y("div", {
209
- style: re,
210
- className: f("relative flex size-full min-h-0 min-w-0 flex-1 flex-col", Q.container),
211
- children: [/* @__PURE__ */ Y("div", {
207
+ }), B = t || n || ce, V = "mt-6 p-3 desktop:mt-0";
208
+ return /* @__PURE__ */ J("div", {
209
+ style: ne,
210
+ className: f("relative flex size-full min-h-0 min-w-0 flex-1 flex-col", Z.container),
211
+ children: [/* @__PURE__ */ J("div", {
212
212
  className: "flex min-h-0 w-full min-w-0 flex-1 flex-col overflow-y-auto",
213
213
  children: [
214
- L ? /* @__PURE__ */ J("h1", {
214
+ R ? /* @__PURE__ */ q("h1", {
215
215
  className: "sr-only",
216
216
  children: x.title
217
- }) : /* @__PURE__ */ Y("div", {
217
+ }) : /* @__PURE__ */ J("div", {
218
218
  className: "flex min-w-0 items-start gap-2 px-8 py-4",
219
- children: [/* @__PURE__ */ Y("div", {
219
+ children: [/* @__PURE__ */ J("div", {
220
220
  className: "flex min-h-10 min-w-0 flex-1 flex-col justify-center gap-0.5",
221
- children: [/* @__PURE__ */ J("h1", {
221
+ children: [/* @__PURE__ */ q("h1", {
222
222
  className: f("wrap-break-word", A),
223
223
  children: x.title
224
- }), x.subtitle && /* @__PURE__ */ J("p", {
225
- className: f(j, Q.subtitle),
224
+ }), x.subtitle && /* @__PURE__ */ q("p", {
225
+ className: f(j, Z.subtitle),
226
226
  children: x.subtitle
227
227
  })]
228
228
  }), he(y.Primary)]
229
229
  }),
230
- /* @__PURE__ */ Y("div", {
230
+ /* @__PURE__ */ J("div", {
231
231
  className: "flex items-center gap-2 p-4 desktop:gap-3 desktop:px-8 desktop:pt-4 desktop:pb-5",
232
- children: [/* @__PURE__ */ J("div", {
232
+ children: [/* @__PURE__ */ q("div", {
233
233
  role: "search",
234
234
  className: "min-w-0 flex-1",
235
- children: /* @__PURE__ */ J(ie, {
235
+ children: /* @__PURE__ */ q(re, {
236
236
  value: d,
237
237
  onChange: pe,
238
238
  placeholder: x.searchPlaceholder,
239
239
  clearLabel: x.clearSearchLabel,
240
240
  "aria-label": x.searchAriaLabel,
241
- size: L ? w.Standard : w.Large
241
+ size: R ? w.Standard : w.Large
242
242
  })
243
- }), x.sortOptions.length > 0 && /* @__PURE__ */ J("div", {
243
+ }), x.sortOptions.length > 0 && /* @__PURE__ */ q("div", {
244
244
  role: "group",
245
245
  "aria-label": x.sortLabel,
246
246
  className: "shrink-0",
247
- children: /* @__PURE__ */ J(v, {
247
+ children: /* @__PURE__ */ q(v, {
248
248
  items: fe,
249
249
  label: ue,
250
250
  variant: y.Primary,
251
251
  appearance: _.Ghost,
252
- size: L ? w.Small : w.Standard,
253
- iconBefore: /* @__PURE__ */ J(R, {
254
- size: L ? S.SM : S.MD,
252
+ size: R ? w.Small : w.Standard,
253
+ iconBefore: /* @__PURE__ */ q(z, {
254
+ size: R ? S.SM : S.MD,
255
255
  "aria-hidden": !0,
256
256
  stroke: C
257
257
  }),
258
- className: f("desktop:px-3", Q.sortButton)
258
+ className: f("desktop:px-3", Z.sortButton)
259
259
  })
260
260
  })]
261
261
  }),
262
- /* @__PURE__ */ J(P, {
262
+ /* @__PURE__ */ q(P, {
263
263
  visuallyHidden: !0,
264
264
  as: F.Span,
265
265
  children: me()
266
266
  }),
267
- /* @__PURE__ */ Y("div", {
267
+ /* @__PURE__ */ J("div", {
268
268
  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",
269
- children: [ce && !t && !n && !le && /* @__PURE__ */ Y("div", {
269
+ children: [se && !t && !n && !ce && /* @__PURE__ */ J("div", {
270
270
  className: "flex w-full max-w-[1116px] flex-wrap items-center gap-3",
271
- children: [/* @__PURE__ */ J("p", {
272
- className: f(j, Q.subtitle),
271
+ children: [/* @__PURE__ */ q("p", {
272
+ className: f(j, Z.subtitle),
273
273
  children: x.incompleteLabel
274
- }), /* @__PURE__ */ J(k, {
274
+ }), /* @__PURE__ */ q(k, {
275
275
  label: x.retryLabel,
276
276
  onClick: i
277
277
  })]
278
- }), /* @__PURE__ */ J("div", {
278
+ }), /* @__PURE__ */ q("div", {
279
279
  className: f("flex w-full max-w-[1116px] min-w-0 flex-col items-center", B && "flex-1 justify-center"),
280
280
  children: ge()
281
281
  })]
282
282
  })
283
283
  ]
284
- }), L && a && /* @__PURE__ */ J(g, {
284
+ }), R && a && /* @__PURE__ */ q(g, {
285
285
  variant: y.Primary,
286
- iconBefore: /* @__PURE__ */ J(de, {
286
+ iconBefore: /* @__PURE__ */ q(de, {
287
287
  size: S.LG,
288
288
  "aria-hidden": !0,
289
289
  stroke: C
@@ -293,31 +293,31 @@ var X = /* @__PURE__ */ function(e) {
293
293
  className: "absolute inset-e-4 bottom-4 z-10 size-10 rounded-full px-0"
294
294
  })]
295
295
  });
296
- }, Pe = /* @__PURE__ */ function(e) {
296
+ }, Fe = /* @__PURE__ */ function(e) {
297
297
  return e.Personal = "personal", e.Shared = "shared", e.Organization = "organization", e;
298
- }({}), Fe = (e) => !!e.dataTransfer?.types.includes("Files"), Ie = (e) => {
298
+ }({}), Ie = (e) => !!e.dataTransfer?.types.includes("Files"), Le = (e) => {
299
299
  let [t, n] = K(!1), r = G(0);
300
300
  return {
301
301
  isDragActive: t,
302
302
  handlers: {
303
303
  onDragEnter: H((e) => {
304
- Fe(e) && (e.preventDefault(), r.current += 1, n(!0));
304
+ Ie(e) && (e.preventDefault(), r.current += 1, n(!0));
305
305
  }, []),
306
306
  onDragLeave: H((e) => {
307
- Fe(e) && (--r.current, r.current <= 0 && (r.current = 0, n(!1)));
307
+ Ie(e) && (--r.current, r.current <= 0 && (r.current = 0, n(!1)));
308
308
  }, []),
309
309
  onDragOver: H((e) => {
310
- Fe(e) && e.preventDefault();
310
+ Ie(e) && e.preventDefault();
311
311
  }, []),
312
312
  onDrop: H((t) => {
313
- if (!Fe(t)) return;
313
+ if (!Ie(t)) return;
314
314
  t.preventDefault(), r.current = 0, n(!1);
315
315
  let i = Array.from(t.dataTransfer?.files ?? []);
316
316
  i.length > 0 && e(i);
317
317
  }, [e])
318
318
  }
319
319
  };
320
- }, Le = /* @__PURE__ */ function(e) {
320
+ }, Q = /* @__PURE__ */ function(e) {
321
321
  return e.UnsupportedType = "unsupported-type", e.TooLarge = "too-large", e.CapacityExceeded = "capacity-exceeded", e.Duplicate = "duplicate", e.InvalidName = "invalid-name", e;
322
322
  }({}), Re = /* @__PURE__ */ function(e) {
323
323
  return e.Required = "required", e.InvalidCharacters = "invalid-characters", e.Reserved = "reserved", e.TooLong = "too-long", e;
@@ -344,7 +344,7 @@ var X = /* @__PURE__ */ function(e) {
344
344
  status: s.Idle,
345
345
  file: e
346
346
  };
347
- }, Qe = (e, t, n, r) => We(e.name) != null || e.name.trim() !== e.name ? Le.InvalidName : r.allowedExtensions.includes(Ge(e.name)) ? t.has(e.name) ? Le.Duplicate : e.size > r.maxFileBytes ? Le.TooLarge : n + e.size > r.maxTotalBytes ? Le.CapacityExceeded : null : Le.UnsupportedType, $e = (e, t, n) => {
347
+ }, Qe = (e, t, n, r) => We(e.name) != null || e.name.trim() !== e.name ? Q.InvalidName : r.allowedExtensions.includes(Ge(e.name)) ? t.has(e.name) ? Q.Duplicate : e.size > r.maxFileBytes ? Q.TooLarge : n + e.size > r.maxTotalBytes ? Q.CapacityExceeded : null : Q.UnsupportedType, $e = (e, t, n) => {
348
348
  let r = new Set(t.map((e) => e.name)), i = Je(t), a = [], o = [];
349
349
  for (let t of e) {
350
350
  let e = Qe(t, r, i, n);
@@ -365,19 +365,19 @@ var X = /* @__PURE__ */ function(e) {
365
365
  dropZone: "_dropZone_ru73x_11",
366
366
  label: "_label_ru73x_20",
367
367
  link: "_link_ru73x_24"
368
- }, nt = B(async () => ({ default: (await Se()).MarkdownEditor })), rt = (e) => `Preview ${e}`, it = "Only the project owner can rename it.", at = ({ values: e, errors: t, onFieldChange: i, contextFiles: a, onContextFilesChange: o, onContextFileClick: s, selectedContextFileId: u, allowedExtensions: d, maxFileBytes: m, maxTotalBytes: g, onPickFromFileManager: _, onRefineInstructions: v, onBack: y, onCancel: x, onSubmit: w, isSubmitting: T = !1, isNameReadOnly: O = !1, labels: k, markdownEditorTheme: A, className: j, styles: N }) => {
369
- let te = U(), ne = U(), re = U(), L = U(), ie = U(), R = U(), se = G(null), ce = p(), [le, z] = K(!1), [ue, de] = K([]), [fe, pe] = K(""), me = h({
368
+ }, nt = B(async () => ({ default: (await Ce()).MarkdownEditor })), rt = (e) => `Preview ${e}`, it = "The project name can't be changed after creation", at = ({ values: e, errors: t, onFieldChange: i, contextFiles: a, onContextFilesChange: o, onContextFileClick: s, selectedContextFileId: u, allowedExtensions: d, maxFileBytes: m, maxTotalBytes: g, onPickFromFileManager: _, onRefineInstructions: v, onBack: y, onCancel: x, onSubmit: w, isSubmitting: T = !1, isNameReadOnly: O = !1, labels: k, markdownEditorTheme: A, className: j, styles: N }) => {
369
+ let L = U(), te = U(), ne = U(), R = U(), re = U(), z = U(), oe = G(null), se = p(), [ce, le] = K(!1), [ue, de] = K([]), [fe, pe] = K(""), me = h({
370
370
  value: e.instructions,
371
371
  onChange: (e) => i("instructions", e),
372
372
  onRefine: v,
373
373
  disabled: T
374
- }), he = me.isPending, B = We(e.name), V = t.name ?? (le && B != null ? k.nameErrors[B] : void 0), H = B != null || T || he, q;
375
- t.name ? q = ne : V && (q = re);
376
- let Se = [O && L, q].filter(Boolean).join(" ") || void 0;
374
+ }), he = me.isPending, B = We(e.name), V = k.nameReadOnlyHint ?? it, H = t.name ?? (ce && B != null ? k.nameErrors[B] : void 0), ve = B != null || T || he, Ce;
375
+ t.name ? Ce = te : H && (Ce = ne);
376
+ let Y = [O && R, Ce].filter(Boolean).join(" ") || void 0;
377
377
  _e(() => {
378
- t.name && se.current?.focus();
379
- }, [t.name]);
380
- let X = W(() => d.map((e) => `.${e}`).join(","), [d]), Ce = (e) => {
378
+ t.name && !O && oe.current?.focus();
379
+ }, [t.name, O]);
380
+ let we = W(() => d.map((e) => `.${e}`).join(","), [d]), Te = (e) => {
381
381
  if (e.length === 0) return;
382
382
  let { accepted: t, rejected: n } = $e(e, a, {
383
383
  allowedExtensions: d,
@@ -385,41 +385,41 @@ var X = /* @__PURE__ */ function(e) {
385
385
  maxTotalBytes: g
386
386
  });
387
387
  de(n), t.length > 0 && o([...a, ...t]), pe([t.length > 0 ? k.filesAddedStatus(t.length) : "", ...n.map(({ name: e, reason: t }) => k.fileRejections[t](e))].filter(Boolean).join(" "));
388
- }, { isDragActive: we, handlers: Te } = Ie(Ce), Ee = k.openFileLabel ?? rt, De = (e) => {
388
+ }, { isDragActive: Ee, handlers: De } = Le(Te), Oe = k.openFileLabel ?? rt, ke = (e) => {
389
389
  let t = a.find((t) => t.id === e);
390
390
  o(a.filter((t) => t.id !== e)), de([]), t && pe(k.fileRemovedStatus(t.name));
391
- }, Oe = async (e) => {
391
+ }, Ae = async (e) => {
392
392
  if (e.preventDefault(), e.stopPropagation(), _) try {
393
393
  let e = await _();
394
- e && Ce(e);
394
+ e && Te(e);
395
395
  } catch {}
396
- }, ke = () => {
397
- H || w();
398
- }, { colors: Z, typography: Ae } = N ?? {}, je = Ae?.titleClassName ?? "dial-h1-text", Me = f(Ae?.labelClassName ?? "dial-tiny-semi-text", tt.label), Q = Ae?.helperClassName ?? "dial-tiny-text", Ne = l({
399
- "--pcf-label-text": Z?.labelText,
400
- "--pcf-link-text": Z?.linkText,
401
- "--pcf-dropzone-bg": Z?.dropZoneBackground
402
- }), Pe = k.refinement, Fe = t.context, Le = [...ue.map(({ name: e, reason: t }) => k.fileRejections[t](e)), Fe].filter(Boolean).join("\n"), Re = k.dropZoneLabel({
403
- fromDevice: /* @__PURE__ */ J("span", { className: tt.link }),
404
- fileManager: _ ? /* @__PURE__ */ J("button", {
396
+ }, X = () => {
397
+ ve || w();
398
+ }, { colors: je, typography: Me } = N ?? {}, Ne = Me?.titleClassName ?? "dial-h1-text", Z = f(Me?.labelClassName ?? "dial-tiny-semi-text", tt.label), Pe = Me?.helperClassName ?? "dial-tiny-text", Fe = l({
399
+ "--pcf-label-text": je?.labelText,
400
+ "--pcf-link-text": je?.linkText,
401
+ "--pcf-dropzone-bg": je?.dropZoneBackground
402
+ }), Ie = k.refinement, Q = t.context, Re = [...ue.map(({ name: e, reason: t }) => k.fileRejections[t](e)), Q].filter(Boolean).join("\n"), ze = k.dropZoneLabel({
403
+ fromDevice: /* @__PURE__ */ q("span", { className: tt.link }),
404
+ fileManager: _ ? /* @__PURE__ */ q("button", {
405
405
  type: "button",
406
406
  className: tt.link,
407
407
  disabled: T,
408
- onClick: (e) => void Oe(e)
408
+ onClick: (e) => void Ae(e)
409
409
  }) : void 0
410
410
  });
411
- return /* @__PURE__ */ Y("div", {
411
+ return /* @__PURE__ */ J("div", {
412
412
  className: f("relative flex h-full min-h-0 w-full", j),
413
- ...Te,
413
+ ...De,
414
414
  children: [
415
- /* @__PURE__ */ J(ye, {
416
- isVisible: we,
415
+ /* @__PURE__ */ q(be, {
416
+ isVisible: Ee,
417
417
  labels: {
418
418
  title: k.dropOverlayTitle,
419
419
  subtitle: k.dropOverlaySubtitle
420
420
  }
421
421
  }),
422
- /* @__PURE__ */ J(xe, {
422
+ /* @__PURE__ */ q(Se, {
423
423
  labels: {
424
424
  title: k.title,
425
425
  backButtonLabel: k.backLabel,
@@ -429,39 +429,39 @@ var X = /* @__PURE__ */ function(e) {
429
429
  },
430
430
  onBack: y,
431
431
  onCancel: x,
432
- onSubmit: ke,
432
+ onSubmit: X,
433
433
  isCancelDisabled: T,
434
- isSubmitDisabled: H,
434
+ isSubmitDisabled: ve,
435
435
  isSubmitting: T,
436
- footerActionsOrder: be.SubmitFirst,
437
- backIcon: /* @__PURE__ */ J(oe, {
436
+ footerActionsOrder: xe.SubmitFirst,
437
+ backIcon: /* @__PURE__ */ q(ae, {
438
438
  size: S.LG,
439
439
  stroke: C,
440
440
  "aria-hidden": !0,
441
441
  className: "rtl:scale-x-[-1]"
442
442
  }),
443
443
  styles: {
444
- colors: { background: Z?.background },
444
+ colors: { background: je?.background },
445
445
  header: {
446
- colors: { borderColor: Z?.headerBorder },
447
- typography: { fontClassName: je }
446
+ colors: { borderColor: je?.headerBorder },
447
+ typography: { fontClassName: Ne }
448
448
  },
449
- cssVars: Ne
449
+ cssVars: Fe
450
450
  },
451
- children: /* @__PURE__ */ Y("div", {
451
+ children: /* @__PURE__ */ J("div", {
452
452
  className: f("mx-auto flex w-full max-w-262 min-w-0 flex-col gap-5 py-6", tt.formColumn),
453
453
  children: [
454
- /* @__PURE__ */ Y("div", {
454
+ /* @__PURE__ */ J("div", {
455
455
  className: "flex flex-col gap-1",
456
456
  children: [
457
- /* @__PURE__ */ J(M, {
458
- id: te,
459
- inputRef: se,
457
+ /* @__PURE__ */ q(M, {
458
+ id: L,
459
+ inputRef: oe,
460
460
  value: e.name,
461
461
  onChange: (e) => {
462
462
  O || i("name", e ?? "");
463
463
  },
464
- onBlur: () => z(!0),
464
+ onBlur: () => le(!0),
465
465
  placeholder: k.namePlaceholder,
466
466
  labelProps: {
467
467
  label: k.nameLabel,
@@ -470,49 +470,51 @@ var X = /* @__PURE__ */ function(e) {
470
470
  required: !0,
471
471
  "aria-required": !0,
472
472
  readOnly: O,
473
- invalid: !!V,
474
- "aria-invalid": !!V,
475
- "aria-describedby": Se
473
+ disabled: O,
474
+ tooltipText: O ? V : void 0,
475
+ invalid: !!H,
476
+ "aria-invalid": !!H,
477
+ "aria-describedby": Y
476
478
  }),
477
- O && /* @__PURE__ */ J(b, {
478
- id: L,
479
- className: Q,
480
- text: k.nameReadOnlyHint ?? it
479
+ O && /* @__PURE__ */ q(b, {
480
+ id: R,
481
+ className: Pe,
482
+ text: V
481
483
  }),
482
- /* @__PURE__ */ J(E, {
484
+ /* @__PURE__ */ q(E, {
483
485
  announce: I.Assertive,
484
- id: ne,
485
- className: Q,
486
+ id: te,
487
+ className: Pe,
486
488
  text: t.name ?? ""
487
489
  }),
488
- V && !t.name && /* @__PURE__ */ J(E, {
489
- id: re,
490
- className: Q,
491
- text: V
490
+ H && !t.name && /* @__PURE__ */ q(E, {
491
+ id: ne,
492
+ className: Pe,
493
+ text: H
492
494
  })
493
495
  ]
494
496
  }),
495
- /* @__PURE__ */ J(c, {
497
+ /* @__PURE__ */ q(c, {
496
498
  isEnabled: !!v,
497
- fieldId: ie,
499
+ fieldId: re,
498
500
  label: k.instructionsLabel,
499
- labelClassName: Me,
500
- labels: Pe,
501
+ labelClassName: Z,
502
+ labels: Ie,
501
503
  refinement: me,
502
504
  disabled: T || he,
503
- children: /* @__PURE__ */ Y("div", {
505
+ children: /* @__PURE__ */ J("div", {
504
506
  className: "flex flex-1 flex-col gap-2",
505
- children: [!v && /* @__PURE__ */ J(ee, {
506
- htmlFor: ie,
507
- className: Me,
507
+ children: [!v && /* @__PURE__ */ q(ee, {
508
+ htmlFor: re,
509
+ className: Z,
508
510
  label: k.instructionsLabel
509
- }), /* @__PURE__ */ J("div", {
510
- ref: ce,
511
+ }), /* @__PURE__ */ q("div", {
512
+ ref: se,
511
513
  className: f("w-full", n, r),
512
- children: /* @__PURE__ */ J(ge, {
513
- fallback: /* @__PURE__ */ J(ae, { ariaLabel: k.editorLoadingAriaLabel ?? "Loading editor" }),
514
- children: /* @__PURE__ */ J(nt, {
515
- id: ie,
514
+ children: /* @__PURE__ */ q(ge, {
515
+ fallback: /* @__PURE__ */ q(ie, { ariaLabel: k.editorLoadingAriaLabel ?? "Loading editor" }),
516
+ children: /* @__PURE__ */ q(nt, {
517
+ id: re,
516
518
  value: e.instructions,
517
519
  onChange: (e) => {
518
520
  me.reset(), i("instructions", e);
@@ -525,44 +527,44 @@ var X = /* @__PURE__ */ function(e) {
525
527
  })]
526
528
  })
527
529
  }),
528
- /* @__PURE__ */ Y("section", {
529
- "aria-labelledby": R,
530
+ /* @__PURE__ */ J("section", {
531
+ "aria-labelledby": z,
530
532
  className: "flex flex-col gap-2",
531
533
  children: [
532
- /* @__PURE__ */ J("h2", {
533
- id: R,
534
- className: Me,
534
+ /* @__PURE__ */ q("h2", {
535
+ id: z,
536
+ className: Z,
535
537
  children: k.contextLabel
536
538
  }),
537
- /* @__PURE__ */ J(D, {
538
- label: Re,
539
+ /* @__PURE__ */ q(D, {
540
+ label: ze,
539
541
  ariaLabel: k.dropZoneAriaLabel,
540
542
  description: k.dropZoneHint,
541
- accept: X,
543
+ accept: we,
542
544
  multiple: !0,
543
545
  disabled: T,
544
- onChange: Ce,
545
- onReject: Ce,
546
- errorText: Le || void 0,
546
+ onChange: Te,
547
+ onReject: Te,
548
+ errorText: Re || void 0,
547
549
  className: tt.dropZone
548
550
  }),
549
- /* @__PURE__ */ J(P, {
551
+ /* @__PURE__ */ q(P, {
550
552
  visuallyHidden: !0,
551
553
  politeness: I.Assertive,
552
- children: Fe
554
+ children: Q
553
555
  }),
554
- a.length > 0 && /* @__PURE__ */ J("ul", {
556
+ a.length > 0 && /* @__PURE__ */ q("ul", {
555
557
  className: "flex min-w-0 flex-wrap gap-2 pt-3",
556
- children: a.map((e) => /* @__PURE__ */ J("li", {
558
+ children: a.map((e) => /* @__PURE__ */ q("li", {
557
559
  className: "min-w-0",
558
- children: /* @__PURE__ */ J(ve, {
560
+ children: /* @__PURE__ */ q(ye, {
559
561
  attachment: e,
560
562
  onClick: s,
561
563
  isSelected: s == null ? void 0 : e.id === u,
562
- onRemove: De,
564
+ onRemove: ke,
563
565
  labels: {
564
566
  removeLabel: k.removeFileLabel(e.name),
565
- clickLabel: Ee(e.name)
567
+ clickLabel: Oe(e.name)
566
568
  }
567
569
  })
568
570
  }, e.id))
@@ -572,7 +574,7 @@ var X = /* @__PURE__ */ function(e) {
572
574
  ]
573
575
  })
574
576
  }),
575
- /* @__PURE__ */ J(P, {
577
+ /* @__PURE__ */ q(P, {
576
578
  visuallyHidden: !0,
577
579
  as: F.Span,
578
580
  children: T ? k.creatingStatus : fe
@@ -622,7 +624,7 @@ var X = /* @__PURE__ */ function(e) {
622
624
  type: u(e.contentType),
623
625
  status: s.Idle
624
626
  }), ct = V(({ project: t, isLoading: n = !1, hasError: r = !1, isNotFound: a = !1, isPinned: s, isPinPending: c = !1, contextSearchQuery: u, onContextSearchQueryChange: d, onBack: p, onTogglePin: m, onPublish: h, onEdit: g, onShare: _, onDelete: v, onDownload: y, onContextFileClick: b, selectedContextFileId: x, isDetailsStacked: w = !1, onRetry: E, onBrowseProjects: D, mainContent: O, mainContentLabel: j = "Project content", labels: M, styles: ee }) => {
625
- let { colors: N, typography: I } = ee ?? {}, te = I?.titleClassName ?? "dial-h1-text", re = I?.panelTitleClassName ?? "dial-body-semi-text", L = I?.sectionTitleClassName ?? "dial-tiny-text", R = I?.bodyClassName ?? "dial-small-text", ue = I?.helperClassName ?? "dial-tiny-text", de = I?.instructionsHeadingClassName ?? "dial-small-semi-text", he = l({
627
+ let { colors: N, typography: I } = ee ?? {}, L = I?.titleClassName ?? "dial-h1-text", ne = I?.panelTitleClassName ?? "dial-body-semi-text", R = I?.sectionTitleClassName ?? "dial-tiny-text", z = I?.bodyClassName ?? "dial-small-text", ue = I?.helperClassName ?? "dial-tiny-text", de = I?.instructionsHeadingClassName ?? "dial-small-semi-text", he = l({
626
628
  "--pv-bg": N?.background,
627
629
  "--pv-border": N?.border,
628
630
  "--pv-heading-text": N?.headingText,
@@ -637,11 +639,11 @@ var X = /* @__PURE__ */ function(e) {
637
639
  h4: e,
638
640
  h5: e,
639
641
  h6: e,
640
- p: R,
641
- ul: R,
642
- ol: R
642
+ p: z,
643
+ ul: z,
644
+ ol: z
643
645
  };
644
- }, [R, de]), G = (e) => /* @__PURE__ */ J(e, {
646
+ }, [z, de]), G = (e) => /* @__PURE__ */ q(e, {
645
647
  size: S.SM,
646
648
  "aria-hidden": !0,
647
649
  stroke: C
@@ -655,7 +657,7 @@ var X = /* @__PURE__ */ function(e) {
655
657
  }), e && g && t.push({
656
658
  key: "edit",
657
659
  label: M.editLabel,
658
- icon: G(le),
660
+ icon: G(ce),
659
661
  onClick: g
660
662
  }), _ && t.push({
661
663
  key: "share",
@@ -665,7 +667,7 @@ var X = /* @__PURE__ */ function(e) {
665
667
  }), t.push({
666
668
  key: "download",
667
669
  label: M.downloadLabel,
668
- icon: G(ce),
670
+ icon: G(se),
669
671
  onClick: y
670
672
  }), v && t.push({
671
673
  key: "delete",
@@ -674,16 +676,16 @@ var X = /* @__PURE__ */ function(e) {
674
676
  danger: !0,
675
677
  onClick: v
676
678
  }), t;
677
- }, ye = (t, n) => /* @__PURE__ */ J("div", {
679
+ }, be = (t, n) => /* @__PURE__ */ q("div", {
678
680
  className: n,
679
- children: /* @__PURE__ */ J(e, {
681
+ children: /* @__PURE__ */ q(e, {
680
682
  items: K(t),
681
683
  title: M.moreActionsLabel,
682
684
  closeLabel: M.closeLabel,
683
685
  matchReferenceWidth: !1,
684
686
  listClassName: "w-[200px]",
685
- children: /* @__PURE__ */ J(A, {
686
- icon: /* @__PURE__ */ J(se, {
687
+ children: /* @__PURE__ */ q(A, {
688
+ icon: /* @__PURE__ */ q(oe, {
687
689
  size: S.MD,
688
690
  "aria-hidden": !0,
689
691
  stroke: C
@@ -691,40 +693,40 @@ var X = /* @__PURE__ */ function(e) {
691
693
  "aria-label": M.moreActionsLabel
692
694
  })
693
695
  })
694
- }), be = () => {
696
+ }), xe = () => {
695
697
  c || m();
696
- }, xe = () => n ? /* @__PURE__ */ J(ae, { ariaLabel: M.loadingAriaLabel ?? "Loading project" }) : r ? /* @__PURE__ */ Y("div", {
698
+ }, Se = () => n ? /* @__PURE__ */ q(ie, { ariaLabel: M.loadingAriaLabel ?? "Loading project" }) : r ? /* @__PURE__ */ J("div", {
697
699
  className: "flex flex-col items-center gap-3",
698
- children: [/* @__PURE__ */ J("p", {
700
+ children: [/* @__PURE__ */ q("p", {
699
701
  "aria-hidden": !0,
700
- className: f(R, $.body),
702
+ className: f(z, $.body),
701
703
  children: M.errorLabel
702
- }), /* @__PURE__ */ J(k, {
704
+ }), /* @__PURE__ */ q(k, {
703
705
  label: M.retryLabel,
704
706
  onClick: E
705
707
  })]
706
- }) : /* @__PURE__ */ Y("div", {
708
+ }) : /* @__PURE__ */ J("div", {
707
709
  className: "flex flex-col items-center gap-3",
708
- children: [/* @__PURE__ */ J("p", {
709
- className: f(R, $.body),
710
+ children: [/* @__PURE__ */ q("p", {
711
+ className: f(z, $.body),
710
712
  children: M.notFoundLabel
711
- }), /* @__PURE__ */ J(k, {
713
+ }), /* @__PURE__ */ q(k, {
712
714
  label: M.browseProjectsLabel,
713
715
  onClick: D
714
716
  })]
715
717
  });
716
- if (n || r || a || t == null) return /* @__PURE__ */ Y("div", {
718
+ if (n || r || a || t == null) return /* @__PURE__ */ J("div", {
717
719
  style: he,
718
720
  className: f("flex h-full w-full min-w-0 items-center justify-center p-4", $.container),
719
- children: [/* @__PURE__ */ J(P, {
721
+ children: [/* @__PURE__ */ q(P, {
720
722
  visuallyHidden: !0,
721
723
  children: !n && r && M.errorLabel
722
- }), xe()]
724
+ }), Se()]
723
725
  });
724
- let Se = () => ge.length === 0 ? /* @__PURE__ */ J(o, { label: M.emptyContextLabel }) : /* @__PURE__ */ Y(q, { children: [
725
- /* @__PURE__ */ J("div", {
726
+ let Ce = () => ge.length === 0 ? /* @__PURE__ */ q(o, { label: M.emptyContextLabel }) : /* @__PURE__ */ J(ve, { children: [
727
+ /* @__PURE__ */ q("div", {
726
728
  role: "search",
727
- children: /* @__PURE__ */ J(ie, {
729
+ children: /* @__PURE__ */ q(re, {
728
730
  value: u,
729
731
  onChange: (e) => d(e ?? ""),
730
732
  placeholder: M.contextSearchPlaceholder,
@@ -732,14 +734,14 @@ var X = /* @__PURE__ */ function(e) {
732
734
  "aria-label": M.contextSearchAriaLabel
733
735
  })
734
736
  }),
735
- B.length === 0 ? /* @__PURE__ */ J("p", {
737
+ B.length === 0 ? /* @__PURE__ */ q("p", {
736
738
  className: f(ue, $.secondary),
737
739
  children: M.noContextMatchesLabel
738
- }) : /* @__PURE__ */ J("ul", {
740
+ }) : /* @__PURE__ */ q("ul", {
739
741
  className: "m-0 flex min-w-0 list-none flex-wrap gap-2 p-0 pt-2",
740
- children: B.map((e) => /* @__PURE__ */ J("li", {
742
+ children: B.map((e) => /* @__PURE__ */ q("li", {
741
743
  className: "min-w-0",
742
- children: /* @__PURE__ */ J(ve, {
744
+ children: /* @__PURE__ */ q(ye, {
743
745
  attachment: st(e),
744
746
  searchQuery: V,
745
747
  onClick: b,
@@ -748,20 +750,20 @@ var X = /* @__PURE__ */ function(e) {
748
750
  })
749
751
  }, e.name))
750
752
  }),
751
- /* @__PURE__ */ J(P, {
753
+ /* @__PURE__ */ q(P, {
752
754
  visuallyHidden: !0,
753
755
  as: F.Span,
754
756
  children: V === "" ? "" : M.contextResultCountLabel(B.length)
755
757
  })
756
- ] }), X = !w;
757
- return /* @__PURE__ */ Y("div", {
758
+ ] }), Y = !w;
759
+ return /* @__PURE__ */ J("div", {
758
760
  style: he,
759
761
  className: f("flex size-full min-h-0 min-w-0 flex-1 flex-col", $.container),
760
- children: [/* @__PURE__ */ Y("header", {
762
+ children: [/* @__PURE__ */ J("header", {
761
763
  className: f("flex min-w-0 shrink-0 items-center gap-2 px-4 py-3 desktop:px-8 desktop:py-4", $.header),
762
764
  children: [
763
- /* @__PURE__ */ J(A, {
764
- icon: /* @__PURE__ */ J(oe, {
765
+ /* @__PURE__ */ q(A, {
766
+ icon: /* @__PURE__ */ q(ae, {
765
767
  size: S.LG,
766
768
  className: "rtl:scale-x-[-1]",
767
769
  "aria-hidden": !0,
@@ -770,24 +772,24 @@ var X = /* @__PURE__ */ function(e) {
770
772
  "aria-label": M.backLabel,
771
773
  onClick: p
772
774
  }),
773
- /* @__PURE__ */ J("h1", {
774
- className: f("min-w-0 flex-1", te, $.title),
775
- children: /* @__PURE__ */ J(T, { text: t.name })
775
+ /* @__PURE__ */ q("h1", {
776
+ className: f("min-w-0 flex-1", L, $.title),
777
+ children: /* @__PURE__ */ q(T, { text: t.name })
776
778
  }),
777
- /* @__PURE__ */ J(k, {
779
+ /* @__PURE__ */ q(k, {
778
780
  label: s ? M.unpinLabel : M.pinLabel,
779
- iconBefore: J(s ? ot : z, {
781
+ iconBefore: q(s ? ot : le, {
780
782
  size: S.MD,
781
783
  "aria-hidden": !0,
782
784
  stroke: C
783
785
  }),
784
786
  "aria-disabled": c || void 0,
785
- onClick: be,
787
+ onClick: xe,
786
788
  className: "shrink-0"
787
789
  }),
788
- h && /* @__PURE__ */ J(ne, {
790
+ h && /* @__PURE__ */ q(te, {
789
791
  label: M.publishLabel,
790
- iconBefore: /* @__PURE__ */ J(me, {
792
+ iconBefore: /* @__PURE__ */ q(me, {
791
793
  size: S.MD,
792
794
  "aria-hidden": !0,
793
795
  stroke: C
@@ -795,9 +797,9 @@ var X = /* @__PURE__ */ function(e) {
795
797
  onClick: h,
796
798
  className: "hidden shrink-0 desktop:inline-flex"
797
799
  }),
798
- g && /* @__PURE__ */ J(ne, {
800
+ g && /* @__PURE__ */ q(te, {
799
801
  label: M.editLabel,
800
- iconBefore: /* @__PURE__ */ J(le, {
802
+ iconBefore: /* @__PURE__ */ q(ce, {
801
803
  size: S.MD,
802
804
  "aria-hidden": !0,
803
805
  stroke: C
@@ -805,56 +807,56 @@ var X = /* @__PURE__ */ function(e) {
805
807
  onClick: g,
806
808
  className: "hidden shrink-0 desktop:inline-flex"
807
809
  }),
808
- ye(!1, "hidden desktop:block"),
809
- ye(!0, "desktop:hidden")
810
+ be(!1, "hidden desktop:block"),
811
+ be(!0, "desktop:hidden")
810
812
  ]
811
- }), /* @__PURE__ */ Y("div", {
812
- className: f("flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto", X && "desktop:flex-row desktop:overflow-hidden", O == null && X && "desktop:justify-end"),
813
- children: [O != null && /* @__PURE__ */ J("section", {
813
+ }), /* @__PURE__ */ J("div", {
814
+ className: f("flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto", Y && "desktop:flex-row desktop:overflow-hidden", O == null && Y && "desktop:justify-end"),
815
+ children: [O != null && /* @__PURE__ */ q("section", {
814
816
  "aria-label": j,
815
- className: f("flex min-w-0 flex-1 flex-col px-4 py-6 desktop:px-8", X && "desktop:overflow-y-auto"),
816
- children: /* @__PURE__ */ J("div", {
817
+ className: f("flex min-w-0 flex-1 flex-col px-4 py-6 desktop:px-8", Y && "desktop:overflow-y-auto"),
818
+ children: /* @__PURE__ */ q("div", {
817
819
  className: "mx-auto flex w-full max-w-[748px] min-w-0 flex-col gap-5",
818
820
  children: O
819
821
  })
820
- }), /* @__PURE__ */ Y("aside", {
822
+ }), /* @__PURE__ */ J("aside", {
821
823
  "aria-labelledby": H,
822
- className: f("flex w-full min-w-0 flex-col gap-5 border-t px-4 py-6 desktop:px-8", X && "desktop:w-[488px] desktop:shrink-0 desktop:overflow-y-auto desktop:border-s desktop:border-t-0", $.panel),
824
+ className: f("flex w-full min-w-0 flex-col gap-5 border-t px-4 py-6 desktop:px-8", Y && "desktop:w-[488px] desktop:shrink-0 desktop:overflow-y-auto desktop:border-s desktop:border-t-0", $.panel),
823
825
  children: [
824
- /* @__PURE__ */ J("h2", {
826
+ /* @__PURE__ */ q("h2", {
825
827
  id: H,
826
- className: f(re, $.title),
828
+ className: f(ne, $.title),
827
829
  children: M.detailsLabel
828
830
  }),
829
- t.description !== "" && /* @__PURE__ */ Y("section", {
831
+ t.description !== "" && /* @__PURE__ */ J("section", {
830
832
  className: "flex min-w-0 flex-col gap-1",
831
- children: [/* @__PURE__ */ J("h3", {
832
- className: f(L, $.secondary),
833
+ children: [/* @__PURE__ */ q("h3", {
834
+ className: f(R, $.secondary),
833
835
  children: M.descriptionLabel
834
- }), /* @__PURE__ */ J("p", {
835
- className: f("wrap-break-word whitespace-pre-line", R, $.body),
836
+ }), /* @__PURE__ */ q("p", {
837
+ className: f("wrap-break-word whitespace-pre-line", z, $.body),
836
838
  children: t.description
837
839
  })]
838
840
  }),
839
- t.instructions !== "" && /* @__PURE__ */ Y("section", {
841
+ t.instructions !== "" && /* @__PURE__ */ J("section", {
840
842
  className: "flex min-w-0 flex-col gap-1",
841
- children: [/* @__PURE__ */ J("h3", {
842
- className: f(L, $.secondary),
843
+ children: [/* @__PURE__ */ q("h3", {
844
+ className: f(R, $.secondary),
843
845
  children: M.instructionsLabel
844
- }), /* @__PURE__ */ J("div", {
845
- className: f("min-w-0 wrap-break-word", R, $.body),
846
- children: /* @__PURE__ */ J(i, {
846
+ }), /* @__PURE__ */ q("div", {
847
+ className: f("min-w-0 wrap-break-word", z, $.body),
848
+ children: /* @__PURE__ */ q(i, {
847
849
  content: t.instructions,
848
850
  classNames: _e
849
851
  })
850
852
  })]
851
853
  }),
852
- /* @__PURE__ */ Y("section", {
854
+ /* @__PURE__ */ J("section", {
853
855
  className: "flex min-w-0 flex-col gap-2",
854
- children: [/* @__PURE__ */ J("h3", {
855
- className: f(L, $.secondary),
856
+ children: [/* @__PURE__ */ q("h3", {
857
+ className: f(R, $.secondary),
856
858
  children: M.contextLabel
857
- }), Se()]
859
+ }), Ce()]
858
860
  })
859
861
  ]
860
862
  })]
@@ -881,48 +883,48 @@ var X = /* @__PURE__ */ function(e) {
881
883
  s,
882
884
  o
883
885
  ]);
884
- return /* @__PURE__ */ Y("li", {
886
+ return /* @__PURE__ */ J("li", {
885
887
  className: f("group/row flex min-w-0 items-center gap-1 rounded-xl", lt.row),
886
888
  children: [
887
- /* @__PURE__ */ Y("button", {
889
+ /* @__PURE__ */ J("button", {
888
890
  type: "button",
889
891
  "aria-label": n.openLabel(t.title, t.authorName),
890
892
  "aria-describedby": d ? c : void 0,
891
893
  className: "flex min-w-0 flex-1 items-center gap-3 rounded-xl p-3 text-start focus-visible:outline-2 focus-visible:-outline-offset-2",
892
894
  onClick: () => a(t.id),
893
895
  children: [
894
- t.leading ?? /* @__PURE__ */ J("span", {
896
+ t.leading ?? /* @__PURE__ */ q("span", {
895
897
  "aria-hidden": !0,
896
898
  className: "flex size-4 shrink-0 items-center justify-center",
897
- children: /* @__PURE__ */ J("span", { className: f("size-[7.11px] rounded-full", d ? lt.unreadDot : lt.readDot) })
899
+ children: /* @__PURE__ */ q("span", { className: f("size-[7.11px] rounded-full", d ? lt.unreadDot : lt.readDot) })
898
900
  }),
899
- /* @__PURE__ */ J(T, {
901
+ /* @__PURE__ */ q(T, {
900
902
  text: t.title,
901
903
  className: f("min-w-0 flex-1", d ? i : r)
902
904
  }),
903
- t.trailing ?? (d && t.leading != null && /* @__PURE__ */ J("span", {
905
+ t.trailing ?? (d && t.leading != null && /* @__PURE__ */ q("span", {
904
906
  "aria-hidden": !0,
905
907
  className: "flex size-6 shrink-0 items-center justify-center",
906
- children: /* @__PURE__ */ J("span", { className: f("size-[7.11px] rounded-full", lt.unreadDot) })
908
+ children: /* @__PURE__ */ q("span", { className: f("size-[7.11px] rounded-full", lt.unreadDot) })
907
909
  }))
908
910
  ]
909
911
  }),
910
- d && /* @__PURE__ */ J("span", {
912
+ d && /* @__PURE__ */ q("span", {
911
913
  id: c,
912
914
  className: "sr-only",
913
915
  children: n.unreadLabel ?? "Unread"
914
916
  }),
915
- p.length > 0 && /* @__PURE__ */ J(e, {
917
+ p.length > 0 && /* @__PURE__ */ q(e, {
916
918
  items: p,
917
919
  title: n.moreActionsLabel(t.title),
918
920
  closeLabel: n.closeLabel,
919
921
  placement: "bottom-end",
920
922
  onOpenChange: u,
921
- children: /* @__PURE__ */ J(A, {
923
+ children: /* @__PURE__ */ q(A, {
922
924
  "aria-label": n.moreActionsLabel(t.title),
923
925
  size: w.Small,
924
926
  className: f("me-2 shrink-0", !l && "desktop:opacity-0 desktop:group-focus-within/row:opacity-100 desktop:group-hover/row:opacity-100"),
925
- icon: /* @__PURE__ */ J(se, {
927
+ icon: /* @__PURE__ */ q(oe, {
926
928
  "aria-hidden": !0,
927
929
  size: S.SM,
928
930
  stroke: C
@@ -941,50 +943,50 @@ var X = /* @__PURE__ */ function(e) {
941
943
  g?.unreadDot,
942
944
  g?.rowHoverBackground
943
945
  ]), S = h?.messageClassName ?? "dial-small-text", C = !t && !n && e.length === 0;
944
- return C && !c ? null : /* @__PURE__ */ Y("section", {
946
+ return C && !c ? null : /* @__PURE__ */ J("section", {
945
947
  "aria-labelledby": C ? void 0 : _,
946
948
  "aria-label": C ? m.title : void 0,
947
949
  className: "flex min-w-0 flex-col gap-2 pt-3",
948
950
  style: x,
949
951
  children: [
950
- !C && /* @__PURE__ */ J("h2", {
952
+ !C && /* @__PURE__ */ q("h2", {
951
953
  id: _,
952
954
  className: f("m-0", v),
953
955
  children: m.title
954
956
  }),
955
- /* @__PURE__ */ J(P, {
957
+ /* @__PURE__ */ q(P, {
956
958
  visuallyHidden: !0,
957
- children: t ? m.loadingLabel : n ? m.errorLabel : C ? /* @__PURE__ */ Y(q, { children: [
958
- /* @__PURE__ */ J("span", { children: m.emptyTitle }),
959
+ children: t ? m.loadingLabel : n ? m.errorLabel : C ? /* @__PURE__ */ J(ve, { children: [
960
+ /* @__PURE__ */ q("span", { children: m.emptyTitle }),
959
961
  " ",
960
- /* @__PURE__ */ J("span", { children: m.emptyDescription })
962
+ /* @__PURE__ */ q("span", { children: m.emptyDescription })
961
963
  ] }) : null
962
964
  }),
963
- t ? /* @__PURE__ */ J("div", {
965
+ t ? /* @__PURE__ */ q("div", {
964
966
  className: "flex justify-center py-6",
965
- children: /* @__PURE__ */ J("span", {
967
+ children: /* @__PURE__ */ q("span", {
966
968
  "aria-hidden": !0,
967
- children: /* @__PURE__ */ J(ae, {})
969
+ children: /* @__PURE__ */ q(ie, {})
968
970
  })
969
- }) : n ? /* @__PURE__ */ Y("div", {
971
+ }) : n ? /* @__PURE__ */ J("div", {
970
972
  className: "flex flex-col items-center gap-3 py-6 text-center",
971
- children: [/* @__PURE__ */ J("p", {
973
+ children: [/* @__PURE__ */ q("p", {
972
974
  "aria-hidden": !0,
973
975
  className: f("m-0", S),
974
976
  children: m.errorLabel
975
- }), /* @__PURE__ */ J(k, {
977
+ }), /* @__PURE__ */ q(k, {
976
978
  label: m.retryLabel,
977
979
  onClick: r
978
980
  })]
979
- }) : C ? /* @__PURE__ */ J("div", {
981
+ }) : C ? /* @__PURE__ */ q("div", {
980
982
  "aria-hidden": !0,
981
- children: /* @__PURE__ */ J(o, {
983
+ children: /* @__PURE__ */ q(o, {
982
984
  label: m.emptyTitle,
983
985
  description: m.emptyDescription
984
986
  })
985
- }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J("ul", {
987
+ }) : /* @__PURE__ */ J(ve, { children: [/* @__PURE__ */ q("ul", {
986
988
  className: "m-0 flex min-w-0 list-none flex-col gap-2 p-0",
987
- children: e.map((e) => /* @__PURE__ */ J(ut, {
989
+ children: e.map((e) => /* @__PURE__ */ q(ut, {
988
990
  item: e,
989
991
  labels: m,
990
992
  rowTitleClassName: y,
@@ -993,7 +995,7 @@ var X = /* @__PURE__ */ function(e) {
993
995
  onRename: d,
994
996
  onDelete: p
995
997
  }, e.id))
996
- }), i && s && /* @__PURE__ */ J(N, {
998
+ }), i && s && /* @__PURE__ */ q(N, {
997
999
  className: "self-start",
998
1000
  label: m.loadMoreLabel ?? "See more",
999
1001
  disabled: a,
@@ -1014,7 +1016,7 @@ var X = /* @__PURE__ */ function(e) {
1014
1016
  let n = t.querySelectorAll("li > button"), r = n[Math.min(e, n.length - 1)] ?? t.querySelector("h2, section");
1015
1017
  r && !r.matches("button") && (r.tabIndex = -1), r?.focus();
1016
1018
  }, 0);
1017
- }, []), te = H((e) => i.find((t) => t.id === e) ?? null, [i]);
1019
+ }, []), L = H((e) => i.find((t) => t.id === e) ?? null, [i]);
1018
1020
  _e(() => {
1019
1021
  let e = (e) => e != null && i.some((t) => t.id === e.id);
1020
1022
  x && !D && !e(x) && (S(null), I(0)), k && !j && !e(k) && (A(null), I(0));
@@ -1026,17 +1028,17 @@ var X = /* @__PURE__ */ function(e) {
1026
1028
  i,
1027
1029
  x
1028
1030
  ]);
1029
- let ne = H((e) => {
1031
+ let te = H((e) => {
1030
1032
  P();
1031
- let t = te(e);
1033
+ let t = L(e);
1032
1034
  S(t), w(t?.title ?? ""), E(void 0);
1033
- }, [te, P]), ie = H((e) => {
1034
- P(), A(te(e));
1035
- }, [te, P]), ae = H(() => {
1035
+ }, [L, P]), re = H((e) => {
1036
+ P(), A(L(e));
1037
+ }, [L, P]), ie = H(() => {
1036
1038
  D || (S(null), F());
1037
- }, [D, F]), oe = H(() => {
1039
+ }, [D, F]), ae = H(() => {
1038
1040
  j || (A(null), F());
1039
- }, [j, F]), R = H(async () => {
1041
+ }, [j, F]), z = H(async () => {
1040
1042
  if (!x || !f || D) return;
1041
1043
  let e = C.trim();
1042
1044
  if (!e) E(m.renameEmptyError);
@@ -1055,9 +1057,9 @@ var X = /* @__PURE__ */ function(e) {
1055
1057
  x,
1056
1058
  C,
1057
1059
  F
1058
- ]), se = H((e) => {
1059
- e.key !== "Enter" || e.nativeEvent.isComposing || (e.preventDefault(), R());
1060
- }, [R]), ce = H(async () => {
1060
+ ]), oe = H((e) => {
1061
+ e.key !== "Enter" || e.nativeEvent.isComposing || (e.preventDefault(), z());
1062
+ }, [z]), se = H(async () => {
1061
1063
  if (!k || !p) return;
1062
1064
  let e = i.findIndex((e) => e.id === k.id);
1063
1065
  ee(!0);
@@ -1071,33 +1073,33 @@ var X = /* @__PURE__ */ function(e) {
1071
1073
  I,
1072
1074
  i,
1073
1075
  p
1074
- ]), le = W(() => [{
1076
+ ]), ce = W(() => [{
1075
1077
  label: m.renameCancelLabel ?? "Cancel",
1076
1078
  variant: y.Primary,
1077
1079
  appearance: _.Ghost,
1078
1080
  disabled: D,
1079
- onClick: ae
1081
+ onClick: ie
1080
1082
  }, {
1081
1083
  label: m.renameSaveLabel,
1082
1084
  variant: y.Primary,
1083
1085
  disabled: D,
1084
1086
  onClick: () => {
1085
- R();
1087
+ z();
1086
1088
  }
1087
1089
  }], [
1088
- ae,
1089
- R,
1090
+ ie,
1091
+ z,
1090
1092
  D,
1091
1093
  m.renameCancelLabel,
1092
1094
  m.renameSaveLabel
1093
1095
  ]);
1094
- return /* @__PURE__ */ Y(q, { children: [
1096
+ return /* @__PURE__ */ J(ve, { children: [
1095
1097
  e,
1096
1098
  n,
1097
- /* @__PURE__ */ J("div", {
1099
+ /* @__PURE__ */ q("div", {
1098
1100
  ref: b,
1099
1101
  className: "contents",
1100
- children: /* @__PURE__ */ J(dt, {
1102
+ children: /* @__PURE__ */ q(dt, {
1101
1103
  items: i,
1102
1104
  isLoading: a,
1103
1105
  hasError: o,
@@ -1107,35 +1109,35 @@ var X = /* @__PURE__ */ function(e) {
1107
1109
  onLoadMore: u,
1108
1110
  isEmptyStateShown: !r,
1109
1111
  onOpen: d,
1110
- onRename: f ? ne : void 0,
1111
- onDelete: p ? ie : void 0,
1112
+ onRename: f ? te : void 0,
1113
+ onDelete: p ? re : void 0,
1112
1114
  labels: m.list,
1113
1115
  typography: h,
1114
1116
  colors: g
1115
1117
  })
1116
1118
  }),
1117
- x && /* @__PURE__ */ J(re, {
1119
+ x && /* @__PURE__ */ q(ne, {
1118
1120
  open: !0,
1119
1121
  header: m.renameTitle,
1120
- size: L.Sm,
1121
- mainButtons: le,
1122
- onClose: ae,
1123
- children: /* @__PURE__ */ J("div", {
1122
+ size: R.Sm,
1123
+ mainButtons: ce,
1124
+ onClose: ie,
1125
+ children: /* @__PURE__ */ q("div", {
1124
1126
  className: "px-6 py-4",
1125
- children: /* @__PURE__ */ J(M, {
1127
+ children: /* @__PURE__ */ q(M, {
1126
1128
  id: v,
1127
1129
  value: C,
1128
1130
  labelProps: { label: m.renameInputLabel },
1129
1131
  error: T,
1130
1132
  disabled: D,
1131
- onKeyDown: se,
1133
+ onKeyDown: oe,
1132
1134
  onChange: (e) => {
1133
1135
  w(e ?? ""), E(void 0);
1134
1136
  }
1135
1137
  })
1136
1138
  })
1137
1139
  }),
1138
- k && /* @__PURE__ */ J(t, {
1140
+ k && /* @__PURE__ */ q(t, {
1139
1141
  open: !0,
1140
1142
  title: m.deleteTitle(k.title),
1141
1143
  names: [k.title],
@@ -1143,9 +1145,9 @@ var X = /* @__PURE__ */ function(e) {
1143
1145
  labels: m.deleteDialog,
1144
1146
  isLoading: j,
1145
1147
  onConfirm: () => {
1146
- ce();
1148
+ se();
1147
1149
  },
1148
- onClose: oe
1150
+ onClose: ae
1149
1151
  })
1150
1152
  ] });
1151
1153
  }), pt = {
@@ -1168,40 +1170,40 @@ var X = /* @__PURE__ */ function(e) {
1168
1170
  !r && p.current && (p.current = !1, d.current?.focus());
1169
1171
  }, [r]);
1170
1172
  let T = r || e.length > 0, E = e.length > a, D = m || !E ? e : e.slice(0, a), O = o?.openOutputLabel ?? ((e) => `Preview ${e}`), A = o?.seeAllLabel?.(e.length) ?? `See all (${e.length})`, j = o?.showLessLabel ?? "Show less";
1171
- return /* @__PURE__ */ Y("div", {
1173
+ return /* @__PURE__ */ J("div", {
1172
1174
  className: "contents",
1173
1175
  style: S,
1174
- children: [T && /* @__PURE__ */ Y("section", {
1176
+ children: [T && /* @__PURE__ */ J("section", {
1175
1177
  "aria-labelledby": c,
1176
1178
  className: "flex min-w-0 flex-col gap-2 pt-3",
1177
- children: [/* @__PURE__ */ Y("div", {
1179
+ children: [/* @__PURE__ */ J("div", {
1178
1180
  className: "flex min-w-0 items-center justify-between gap-2",
1179
- children: [/* @__PURE__ */ J("h2", {
1181
+ children: [/* @__PURE__ */ q("h2", {
1180
1182
  ref: d,
1181
1183
  id: c,
1182
1184
  tabIndex: -1,
1183
1185
  className: f("m-0", pt.title, v),
1184
1186
  children: b
1185
- }), !r && E && /* @__PURE__ */ J(N, {
1187
+ }), !r && E && /* @__PURE__ */ q(N, {
1186
1188
  label: m ? j : A,
1187
1189
  "aria-expanded": m,
1188
1190
  "aria-controls": u,
1189
1191
  onClick: C
1190
1192
  })]
1191
- }), r ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J("p", {
1193
+ }), r ? /* @__PURE__ */ J(ve, { children: [/* @__PURE__ */ q("p", {
1192
1194
  "aria-hidden": !0,
1193
1195
  className: f("m-0", pt.secondary, y),
1194
1196
  children: x
1195
- }), i && /* @__PURE__ */ J(k, {
1197
+ }), i && /* @__PURE__ */ q(k, {
1196
1198
  className: "self-start",
1197
1199
  label: o?.retryLabel ?? "Retry",
1198
1200
  onClick: w
1199
- })] }) : /* @__PURE__ */ J("ul", {
1201
+ })] }) : /* @__PURE__ */ q("ul", {
1200
1202
  id: u,
1201
1203
  className: f("m-0 flex min-w-0 list-none gap-2 p-0", m ? "flex-wrap" : "flex-nowrap overflow-x-auto"),
1202
- children: D.map((e) => /* @__PURE__ */ J("li", {
1204
+ children: D.map((e) => /* @__PURE__ */ q("li", {
1203
1205
  className: "shrink-0",
1204
- children: /* @__PURE__ */ J(ve, {
1206
+ children: /* @__PURE__ */ q(ye, {
1205
1207
  attachment: ht(e),
1206
1208
  onClick: t,
1207
1209
  isSelected: e.name === n,
@@ -1209,32 +1211,32 @@ var X = /* @__PURE__ */ function(e) {
1209
1211
  })
1210
1212
  }, e.name))
1211
1213
  })]
1212
- }), /* @__PURE__ */ J(P, {
1214
+ }), /* @__PURE__ */ q(P, {
1213
1215
  visuallyHidden: !0,
1214
1216
  children: r ? x : ""
1215
1217
  })]
1216
1218
  });
1217
- }), _t = V(({ projectName: e, projectHref: t, onBack: n, onProjectLinkClick: r, backLabel: i, className: a, nameClassName: o = "dial-body-text" }) => /* @__PURE__ */ Y("nav", {
1219
+ }), _t = V(({ projectName: e, projectHref: t, onBack: n, onProjectLinkClick: r, backLabel: i, className: a, nameClassName: o = "dial-body-text" }) => /* @__PURE__ */ J("nav", {
1218
1220
  "aria-label": i,
1219
1221
  className: f("flex min-w-0 shrink-0 items-center gap-2 border-b px-4 py-2", a),
1220
- children: [/* @__PURE__ */ J(A, {
1222
+ children: [/* @__PURE__ */ q(A, {
1221
1223
  "aria-label": i,
1222
- icon: /* @__PURE__ */ J(oe, {
1224
+ icon: /* @__PURE__ */ q(ae, {
1223
1225
  "aria-hidden": !0,
1224
1226
  size: S.MD,
1225
1227
  stroke: C,
1226
1228
  className: "rtl:scale-x-[-1]"
1227
1229
  }),
1228
1230
  onClick: n
1229
- }), /* @__PURE__ */ J("a", {
1231
+ }), /* @__PURE__ */ q("a", {
1230
1232
  href: t,
1231
1233
  onClick: r,
1232
1234
  className: "min-w-0 hover:underline focus-visible:underline",
1233
- children: /* @__PURE__ */ J(T, {
1235
+ children: /* @__PURE__ */ q(T, {
1234
1236
  text: e,
1235
1237
  className: f("min-w-0", o)
1236
1238
  })
1237
1239
  })]
1238
1240
  }));
1239
1241
  //#endregion
1240
- export { Le as ContextFileRejection, ze as PROJECT_NAME_MAX_BYTES, _t as ProjectChatHeader, dt as ProjectConversationList, ft as ProjectConversationsPanel, at as ProjectCreateForm, Re as ProjectNameError, gt as ProjectOutputs, Pe as ProjectSource, ct as ProjectView, Ne as Projects, X as ProjectsSortKey, $e as checkContextFiles, et as filterContextFileItems, Je as getContextFilesSize, Ke as isStoredContextFile, We as validateProjectName };
1242
+ export { Q as ContextFileRejection, ze as PROJECT_NAME_MAX_BYTES, _t as ProjectChatHeader, dt as ProjectConversationList, ft as ProjectConversationsPanel, at as ProjectCreateForm, Re as ProjectNameError, gt as ProjectOutputs, Fe as ProjectSource, ct as ProjectView, Pe as Projects, Y as ProjectsSortKey, $e as checkContextFiles, et as filterContextFileItems, Je as getContextFilesSize, Ke as isStoredContextFile, We as validateProjectName };