@epam/ai-dial-skill-editor 1.3.3 → 1.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +300 -298
  2. package/package.json +3 -3
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { MARKDOWN_EDITOR_FILL_HEIGHT_CLASS_NAME as e, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as t, MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as n, RESIZABLE_TEXTAREA_CLASS_NAME as r, TAG_INPUT_TAG_CLASS_NAME as i, TextRefinementField as a, buildCssVars as o, formatFileSize as s, mergeClasses as c, useAvailableHeightCap as l, useControlErrorAssociation as u, useIsMobile as d, useTextRefinement as f } from "@epam/ai-dial-chat-shared";
2
- import { Accordion as p, BottomSheet as m, Breadcrumbs as h, ButtonAppearance as g, ButtonDropdown as _, ButtonVariant as v, CaptionText as y, DIAL_ICON_SIZE as b, DIAL_KIT_ICON_STROKE as x, DangerIconButton as S, DialItemType as C, EditorThemes as w, ElementSize as T, ErrorMessageNotification as ee, ErrorText as E, FileDropzone as D, FileName as O, GhostButton as k, GhostIconButton as te, Input as A, Label as ne, LinkButton as re, LiveRegion as ie, LiveRegionElement as ae, LiveRegionPoliteness as j, NeutralButton as oe, NoDataContent as se, Popup as M, PopupSize as ce, PrimaryButton as le, RadioGroup as ue, ResizeHandle as de, Select as fe, Spinner as pe, TagInput as me, Textarea as he, TextareaResize as ge } from "@epam/ai-dial-ui-kit";
3
- import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
4
- import { IconArrowNarrowLeft as I, IconDatabase as L, IconFileZip as _e, IconFolderPlus as ve, IconPhoto as ye, IconPlus as be, IconTrashX as xe, IconUpload as Se } from "@tabler/icons-react";
2
+ import { Accordion as p, BottomSheet as m, Breadcrumbs as h, ButtonAppearance as g, ButtonDropdown as _, ButtonVariant as v, CaptionText as y, DIAL_ICON_SIZE as b, DIAL_KIT_ICON_STROKE as x, DangerIconButton as S, DialItemType as C, EditorThemes as w, ElementSize as T, ErrorMessageNotification as E, ErrorText as D, FileDropzone as O, FileName as k, GhostButton as A, GhostIconButton as ee, Input as j, Label as te, LinkButton as ne, LiveRegion as re, LiveRegionElement as ie, LiveRegionPoliteness as M, NeutralButton as N, NoDataContent as ae, Popup as P, PopupSize as oe, PrimaryButton as se, RadioGroup as ce, ResizeHandle as le, Select as ue, Spinner as de, TagInput as fe, Textarea as pe, TextareaResize as me } from "@epam/ai-dial-ui-kit";
3
+ import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
4
+ import { IconArrowNarrowLeft as he, IconDatabase as ge, IconFileZip as _e, IconFolderPlus as ve, IconPhoto as ye, IconPlus as be, IconTrashX as xe, IconUpload as Se } from "@tabler/icons-react";
5
5
  import { Suspense as Ce, lazy as we, memo as Te, useCallback as R, useEffect as Ee, useId as De, useMemo as z, useRef as B, useState as V } from "react";
6
6
  import { DialFileNodeType as Oe, DialFoldersTree as ke } from "@epam/ai-dial-react-file-manager";
7
7
  import { LazyMarkdownEditor as Ae } from "@epam/ai-dial-ui-kit/editors";
@@ -16,14 +16,16 @@ var H = {
16
16
  section: "_section_l1mnx_1",
17
17
  title: "_title_l1mnx_5"
18
18
  }, Me = ({ title: e, children: t, styles: n, className: r }) => {
19
- let i = o({
19
+ let i = De(), a = o({
20
20
  "--es-border-color": n?.colors?.borderColor,
21
21
  "--es-title-color": n?.colors?.titleColor
22
22
  });
23
- return /* @__PURE__ */ F("section", {
23
+ return /* @__PURE__ */ L("section", {
24
+ "aria-labelledby": e == null ? void 0 : i,
24
25
  className: c("flex h-full flex-col gap-4 rounded border", je.section, r, H.section),
25
- style: i,
26
- children: [e != null && /* @__PURE__ */ P("h2", {
26
+ style: a,
27
+ children: [e != null && /* @__PURE__ */ I("h2", {
28
+ id: i,
27
29
  className: c(n?.typography?.titleClassName ?? "dial-h3-text", je.title),
28
30
  children: e
29
31
  }), t]
@@ -40,34 +42,34 @@ var H = {
40
42
  min: S,
41
43
  max: C,
42
44
  containerWidth: _
43
- }, T = y ? Ne(l.width, w) : void 0, ee = Ne(C ?? 640, w);
45
+ }, T = y ? Ne(l.width, w) : void 0, E = Ne(C ?? 640, w);
44
46
  Ee(() => {
45
47
  let e = g.current;
46
48
  if (!y || e == null || typeof ResizeObserver > "u") return;
47
49
  let t = new ResizeObserver(() => v(e.clientWidth));
48
50
  return t.observe(e), () => t.disconnect();
49
51
  }, [y]);
50
- let E = o({
52
+ let D = o({
51
53
  "--el-header-border-color": f?.colors?.headerBorderColor,
52
54
  "--el-sidebar-border-color": f?.colors?.sidebarBorderColor
53
55
  });
54
- return /* @__PURE__ */ F("div", {
56
+ return /* @__PURE__ */ L("div", {
55
57
  dir: p,
56
58
  className: c("flex min-h-0 flex-1 flex-col", H.layout),
57
- style: E,
59
+ style: D,
58
60
  children: [
59
- /* @__PURE__ */ P(ie, {
61
+ /* @__PURE__ */ I(re, {
60
62
  visuallyHidden: !0,
61
- as: ae.Span,
63
+ as: ie.Span,
62
64
  id: m,
63
65
  children: h
64
66
  }),
65
- /* @__PURE__ */ F("div", {
67
+ /* @__PURE__ */ L("div", {
66
68
  className: c("flex items-center justify-between gap-2 border-b px-4 py-2 desktop:px-8 desktop:pt-3 desktop:pb-3", U.headerBorder),
67
- children: [/* @__PURE__ */ F("div", {
69
+ children: [/* @__PURE__ */ L("div", {
68
70
  className: "flex min-w-0 flex-1 items-center gap-2",
69
- children: [/* @__PURE__ */ P(te, {
70
- icon: /* @__PURE__ */ P(I, {
71
+ children: [/* @__PURE__ */ I(ee, {
72
+ icon: /* @__PURE__ */ I(he, {
71
73
  size: b.LG,
72
74
  stroke: x,
73
75
  "aria-hidden": !0,
@@ -75,47 +77,47 @@ var H = {
75
77
  }),
76
78
  "aria-label": n,
77
79
  onClick: t
78
- }), /* @__PURE__ */ P("h1", {
80
+ }), /* @__PURE__ */ I("h1", {
79
81
  className: c(f?.typography?.titleClassName ?? "dial-h2-text", "min-w-0 truncate"),
80
82
  children: e
81
83
  })]
82
- }), r != null && /* @__PURE__ */ P("div", {
84
+ }), r != null && /* @__PURE__ */ I("div", {
83
85
  className: "hidden shrink-0 items-center gap-2 desktop:flex",
84
86
  children: r
85
87
  })]
86
88
  }),
87
- /* @__PURE__ */ F("div", {
89
+ /* @__PURE__ */ L("div", {
88
90
  ref: g,
89
91
  className: "flex flex-1 flex-col overflow-y-auto desktop:flex-row desktop:overflow-hidden",
90
92
  children: [
91
- /* @__PURE__ */ P("div", {
93
+ /* @__PURE__ */ I("div", {
92
94
  className: c(a == null ? "desktop:flex-1" : "desktop:shrink-0 desktop:overflow-y-auto desktop:border-e", a != null && !y && "desktop:w-[400px]", y && "desktop:relative desktop:w-(--el-left-width)", "desktop:overflow-y-auto", a == null ? void 0 : U.columnBorder),
93
95
  style: T == null ? void 0 : { "--el-left-width": `${T}px` },
94
96
  children: i
95
97
  }),
96
- y && T != null && /* @__PURE__ */ P("div", {
98
+ y && T != null && /* @__PURE__ */ I("div", {
97
99
  className: "relative hidden w-0 shrink-0 desktop:block",
98
- children: /* @__PURE__ */ P(de, {
100
+ children: /* @__PURE__ */ I(le, {
99
101
  width: T,
100
102
  minWidth: S ?? 280,
101
- maxWidth: ee,
103
+ maxWidth: E,
102
104
  defaultWidth: l.defaultWidth ?? 400,
103
105
  onWidthChange: l.onWidthChange,
104
106
  label: d?.resizeHandleLabel ?? "Resize columns",
105
107
  tooltip: d?.resizeHandleTooltip ?? "Drag to resize"
106
108
  })
107
109
  }),
108
- a != null && /* @__PURE__ */ P("div", {
110
+ a != null && /* @__PURE__ */ I("div", {
109
111
  className: "desktop:flex desktop:min-h-0 desktop:flex-1 desktop:flex-col desktop:overflow-y-auto",
110
112
  children: a
111
113
  }),
112
- s != null && /* @__PURE__ */ P("div", {
114
+ s != null && /* @__PURE__ */ I("div", {
113
115
  className: c("desktop:w-[400px] desktop:shrink-0 desktop:overflow-y-auto desktop:border-s", U.columnBorder),
114
116
  children: s
115
117
  })
116
118
  ]
117
119
  }),
118
- r != null && /* @__PURE__ */ P("div", {
120
+ r != null && /* @__PURE__ */ I("div", {
119
121
  className: c("flex shrink-0 flex-row-reverse items-center gap-2 border-t px-4 py-2 *:flex-1 desktop:hidden", U.footerBorder),
120
122
  children: r
121
123
  })
@@ -132,28 +134,28 @@ var H = {
132
134
  "--aa-icon": l?.colors?.placeholderIconColor,
133
135
  "--aa-caption": l?.colors?.captionColor
134
136
  });
135
- return /* @__PURE__ */ F("div", {
137
+ return /* @__PURE__ */ L("div", {
136
138
  className: c("flex flex-col gap-2", u),
137
139
  style: d,
138
- children: [/* @__PURE__ */ P(ne, { label: e }), /* @__PURE__ */ F("div", {
140
+ children: [/* @__PURE__ */ I(te, { label: e }), /* @__PURE__ */ L("div", {
139
141
  className: "flex items-start gap-3",
140
- children: [/* @__PURE__ */ P("div", {
142
+ children: [/* @__PURE__ */ I("div", {
141
143
  className: c("flex h-16 w-16 shrink-0 items-center justify-center overflow-hidden rounded-lg border", Fe.box),
142
- children: t ? /* @__PURE__ */ P("img", {
144
+ children: t ? /* @__PURE__ */ I("img", {
143
145
  src: t,
144
146
  alt: n,
145
147
  className: "h-16 w-16 object-cover"
146
- }) : /* @__PURE__ */ P(ye, {
148
+ }) : /* @__PURE__ */ I(ye, {
147
149
  size: b.LG,
148
150
  stroke: x,
149
151
  "aria-hidden": !0,
150
152
  className: Fe.icon
151
153
  })
152
- }), /* @__PURE__ */ F("div", {
154
+ }), /* @__PURE__ */ L("div", {
153
155
  className: "flex flex-col gap-3",
154
- children: [/* @__PURE__ */ P(k, {
156
+ children: [/* @__PURE__ */ I(A, {
155
157
  size: T.Small,
156
- iconBefore: /* @__PURE__ */ P(be, {
158
+ iconBefore: /* @__PURE__ */ I(be, {
157
159
  size: b.SM,
158
160
  stroke: x,
159
161
  "aria-hidden": !0
@@ -161,7 +163,7 @@ var H = {
161
163
  className: "w-fit",
162
164
  label: r,
163
165
  onClick: a
164
- }), /* @__PURE__ */ P("span", {
166
+ }), /* @__PURE__ */ I("span", {
165
167
  className: c(s, Fe.caption),
166
168
  children: i
167
169
  })]
@@ -172,18 +174,18 @@ var H = {
172
174
  confirmText: "_confirmText_19ec1_1",
173
175
  confirmItem: "_confirmItem_19ec1_5"
174
176
  }, Re = ({ isOpen: e, onClose: t, onAttach: n, bucket: r, FileManagerModal: i, allowedMimeTypes: a, maxFileSizeBytes: s, labels: l, confirmBodyClassName: u = "dial-small-text", styles: d }) => {
175
- let f = d?.colors?.confirmText, p = d?.colors?.confirmItemText, m = R((e) => e.length === 1 ? l.deleteConfirmTitleSingle : l.deleteConfirmTitleMultiple, [l.deleteConfirmTitleSingle, l.deleteConfirmTitleMultiple]), h = R((e) => /* @__PURE__ */ P("div", {
177
+ let f = d?.colors?.confirmText, p = d?.colors?.confirmItemText, m = R((e) => e.length === 1 ? l.deleteConfirmTitleSingle : l.deleteConfirmTitleMultiple, [l.deleteConfirmTitleSingle, l.deleteConfirmTitleMultiple]), h = R((e) => /* @__PURE__ */ I("div", {
176
178
  className: c(u, "px-6 py-3"),
177
179
  style: o({
178
180
  "--apm-confirm-text": f,
179
181
  "--apm-confirm-item-text": p
180
182
  }),
181
- children: /* @__PURE__ */ P("p", {
183
+ children: /* @__PURE__ */ I("p", {
182
184
  className: c("mb-3", Le.confirmText),
183
- children: e.length === 1 ? /* @__PURE__ */ F(N, { children: [
185
+ children: e.length === 1 ? /* @__PURE__ */ L(F, { children: [
184
186
  l.deleteConfirmSingleText,
185
187
  " ",
186
- /* @__PURE__ */ F("span", {
188
+ /* @__PURE__ */ L("span", {
187
189
  className: c("wrap-break-word", Le.confirmItem),
188
190
  children: [
189
191
  "\"",
@@ -191,10 +193,10 @@ var H = {
191
193
  "\"?"
192
194
  ]
193
195
  })
194
- ] }) : /* @__PURE__ */ F(N, { children: [
196
+ ] }) : /* @__PURE__ */ L(F, { children: [
195
197
  l.deleteConfirmMultipleText,
196
198
  " ",
197
- /* @__PURE__ */ F("span", {
199
+ /* @__PURE__ */ L("span", {
198
200
  className: Le.confirmItem,
199
201
  children: [
200
202
  e.length,
@@ -212,9 +214,9 @@ var H = {
212
214
  p,
213
215
  u
214
216
  ]);
215
- return /* @__PURE__ */ P(Ce, {
217
+ return /* @__PURE__ */ I(Ce, {
216
218
  fallback: null,
217
- children: e && /* @__PURE__ */ P(i, {
219
+ children: e && /* @__PURE__ */ I(i, {
218
220
  isOpen: e,
219
221
  onClose: t,
220
222
  onAttach: n,
@@ -266,28 +268,28 @@ var H = {
266
268
  let f = o({
267
269
  "--dlf-summary-text": d?.summaryText,
268
270
  "--dlf-row-label-text": d?.rowLabelText
269
- }), { summaryLabel: p, addLabel: m, editLabel: h, popupTitle: _, addLocaleLabel: y, localeRowLabel: C = "Locale", languageLabel: w, nameLabel: ee, namePlaceholder: E, descriptionLabel: D, descriptionPlaceholder: O, deleteAriaLabel: k, cancelLabel: te = "Cancel", saveLabel: ne = "Save" } = a, [ie, ae] = V(!1), [j, oe] = V([]), se = B(0);
271
+ }), { summaryLabel: p, addLabel: m, editLabel: h, popupTitle: _, addLocaleLabel: y, localeRowLabel: C = "Locale", languageLabel: w, nameLabel: E, namePlaceholder: D, descriptionLabel: O, descriptionPlaceholder: k, deleteAriaLabel: A, cancelLabel: ee = "Cancel", saveLabel: te = "Save" } = a, [re, ie] = V(!1), [M, N] = V([]), ae = B(0);
270
272
  Ee(() => {
271
- ie && oe(e.length > 0 ? e : [Ve(`locale-row-${++se.current}`, /* @__PURE__ */ new Set(), n)]);
273
+ re && N(e.length > 0 ? e : [Ve(`locale-row-${++ae.current}`, /* @__PURE__ */ new Set(), n)]);
272
274
  }, [
273
- ie,
275
+ re,
274
276
  e,
275
277
  n
276
278
  ]);
277
- let ce = () => ae(!0), le = () => ae(!1), ue = () => {
278
- t(j.filter((e) => e.language && e.name)), ae(!1);
279
- }, de = () => {
280
- let e = new Set(j.map((e) => e.language).filter(Boolean));
281
- oe((t) => [...t, Ve(`locale-row-${++se.current}`, e, n)]);
282
- }, pe = (e, t) => {
283
- oe((n) => n.map((n) => n.id === e ? {
279
+ let oe = () => ie(!0), se = () => ie(!1), ce = () => {
280
+ t(M.filter((e) => e.language && e.name)), ie(!1);
281
+ }, le = () => {
282
+ let e = new Set(M.map((e) => e.language).filter(Boolean));
283
+ N((t) => [...t, Ve(`locale-row-${++ae.current}`, e, n)]);
284
+ }, de = (e, t) => {
285
+ N((n) => n.map((n) => n.id === e ? {
284
286
  ...n,
285
287
  ...t
286
288
  } : n));
287
- }, me = (e) => {
288
- oe((t) => t.filter((t) => t.id !== e));
289
- }, N = new Set(n.map((e) => e.code)), I = (e) => e !== "" && !N.has(e), L = e.some((e) => I(e.language)), _e = new Set(j.map((e) => e.language).filter((e) => N.has(e))).size, ve = (t, r) => {
290
- let a = e.find((e) => e.id === t.id)?.language, o = [...new Set([a ?? "", t.language].filter(I))];
289
+ }, fe = (e) => {
290
+ N((t) => t.filter((t) => t.id !== e));
291
+ }, F = new Set(n.map((e) => e.code)), he = (e) => e !== "" && !F.has(e), ge = e.some((e) => he(e.language)), _e = new Set(M.map((e) => e.language).filter((e) => F.has(e))).size, ve = (t, r) => {
292
+ let a = e.find((e) => e.id === t.id)?.language, o = [...new Set([a ?? "", t.language].filter(he))];
291
293
  return [...n.map((e) => ({
292
294
  value: e.code,
293
295
  label: e.label,
@@ -297,72 +299,72 @@ var H = {
297
299
  label: i(e),
298
300
  disabled: r.has(e)
299
301
  }))];
300
- }, ye = j.some((e) => !e.language || !e.name);
301
- return n.length === 0 && !L ? null : /* @__PURE__ */ F("div", {
302
+ }, ye = M.some((e) => !e.language || !e.name);
303
+ return n.length === 0 && !ge ? null : /* @__PURE__ */ L("div", {
302
304
  className: c("flex items-center gap-2", s),
303
305
  style: f,
304
306
  children: [
305
- e.length > 0 && /* @__PURE__ */ P("span", {
307
+ e.length > 0 && /* @__PURE__ */ I("span", {
306
308
  className: c(Be.summary, l),
307
309
  children: `${p}: ${e.map((e) => `[${e.language.toUpperCase()}]`).join(", ")}`
308
310
  }),
309
- /* @__PURE__ */ P(re, {
311
+ /* @__PURE__ */ I(ne, {
310
312
  label: e.length > 0 ? h : m,
311
- iconBefore: /* @__PURE__ */ P(be, {
313
+ iconBefore: /* @__PURE__ */ I(be, {
312
314
  size: b.SM,
313
315
  "aria-hidden": !0,
314
316
  stroke: x
315
317
  }),
316
318
  className: "px-0!",
317
- onClick: ce
319
+ onClick: oe
318
320
  }),
319
- /* @__PURE__ */ P(M, {
320
- open: ie,
321
+ /* @__PURE__ */ I(P, {
322
+ open: re,
321
323
  header: _,
322
- onClose: le,
324
+ onClose: se,
323
325
  mainButtons: [{
324
- label: te,
325
- onClick: le
326
+ label: ee,
327
+ onClick: se
326
328
  }, {
327
- label: ne,
329
+ label: te,
328
330
  variant: v.Primary,
329
331
  disabled: ye,
330
- onClick: ue
332
+ onClick: ce
331
333
  }],
332
- children: /* @__PURE__ */ F("div", {
334
+ children: /* @__PURE__ */ L("div", {
333
335
  className: "flex flex-col gap-8 px-6 py-3",
334
336
  style: f,
335
- children: [j.map((e, t) => {
336
- let n = new Set(j.filter((t) => t.id !== e.id).map((e) => e.language).filter(Boolean));
337
- return /* @__PURE__ */ F("div", {
337
+ children: [M.map((e, t) => {
338
+ let n = new Set(M.filter((t) => t.id !== e.id).map((e) => e.language).filter(Boolean));
339
+ return /* @__PURE__ */ L("div", {
338
340
  className: "flex flex-col gap-2",
339
- children: [/* @__PURE__ */ F("div", {
341
+ children: [/* @__PURE__ */ L("div", {
340
342
  className: "flex items-center justify-between",
341
- children: [/* @__PURE__ */ F("span", {
343
+ children: [/* @__PURE__ */ L("span", {
342
344
  className: c(Be.rowLabel, u),
343
345
  children: [
344
346
  C,
345
347
  " ",
346
348
  t + 1
347
349
  ]
348
- }), /* @__PURE__ */ P(S, {
350
+ }), /* @__PURE__ */ I(S, {
349
351
  appearance: g.Ghost,
350
352
  size: T.Small,
351
- icon: /* @__PURE__ */ P(xe, {
353
+ icon: /* @__PURE__ */ I(xe, {
352
354
  size: b.SM,
353
355
  "aria-hidden": !0,
354
356
  stroke: x
355
357
  }),
356
- "aria-label": `${k} ${t + 1}`,
357
- onClick: () => me(e.id)
358
+ "aria-label": `${A} ${t + 1}`,
359
+ onClick: () => fe(e.id)
358
360
  })]
359
- }), /* @__PURE__ */ F("div", {
361
+ }), /* @__PURE__ */ L("div", {
360
362
  role: "group",
361
363
  "aria-label": `${C} ${t + 1}`,
362
364
  className: "flex flex-col gap-5",
363
- children: [/* @__PURE__ */ F("div", {
365
+ children: [/* @__PURE__ */ L("div", {
364
366
  className: "flex flex-col gap-5 desktop:flex-row desktop:items-start",
365
- children: [/* @__PURE__ */ P(fe, {
367
+ children: [/* @__PURE__ */ I(ue, {
366
368
  id: `${e.id}-language`,
367
369
  labelProps: {
368
370
  label: w,
@@ -371,39 +373,39 @@ var H = {
371
373
  className: "desktop:shrink-0 desktop:basis-40",
372
374
  options: ve(e, n),
373
375
  value: e.language,
374
- onChange: (t) => pe(e.id, { language: t })
375
- }), /* @__PURE__ */ P(A, {
376
+ onChange: (t) => de(e.id, { language: t })
377
+ }), /* @__PURE__ */ I(j, {
376
378
  id: `${e.id}-name`,
377
379
  containerClassName: "min-w-0 flex-1",
378
380
  required: !0,
379
381
  value: e.name,
380
- onChange: (t) => pe(e.id, { name: t ?? "" }),
382
+ onChange: (t) => de(e.id, { name: t ?? "" }),
381
383
  labelProps: {
382
- label: ee,
384
+ label: E,
383
385
  required: !0
384
386
  },
385
- placeholder: E
387
+ placeholder: D
386
388
  })]
387
- }), /* @__PURE__ */ P(he, {
389
+ }), /* @__PURE__ */ I(pe, {
388
390
  id: `${e.id}-description`,
389
391
  className: r,
390
- resize: ge.Vertical,
392
+ resize: me.Vertical,
391
393
  value: e.description,
392
- onChange: (t) => pe(e.id, { description: t }),
393
- labelProps: { label: D },
394
- placeholder: O
394
+ onChange: (t) => de(e.id, { description: t }),
395
+ labelProps: { label: O },
396
+ placeholder: k
395
397
  })]
396
398
  })]
397
399
  }, e.id);
398
- }), /* @__PURE__ */ P(re, {
400
+ }), /* @__PURE__ */ I(ne, {
399
401
  label: y,
400
- iconBefore: /* @__PURE__ */ P(be, {
402
+ iconBefore: /* @__PURE__ */ I(be, {
401
403
  size: b.SM,
402
404
  "aria-hidden": !0,
403
405
  stroke: x
404
406
  }),
405
407
  className: "self-start",
406
- onClick: de,
408
+ onClick: le,
407
409
  disabled: _e >= n.length
408
410
  })]
409
411
  })
@@ -411,22 +413,22 @@ var H = {
411
413
  ]
412
414
  });
413
415
  }, We = "Add tags, comma separated", Ge = "The version is changed with \"Save as new version\"", Ke = "deployment-creation-form-description", qe = ({ values: e, errors: t, onChange: n, onNameBlur: a, onVersionBlur: o, iconPreviewUrl: s, onAddAvatarClick: l, labels: u, styles: d, availableLocaleOptions: f = [], formatLocaleLabel: p, fields: m = ze, isNameReadOnly: h = !1, nameReadOnlyTooltip: g, isVersionReadOnly: _ = !1, versionReadOnlyTooltip: v = Ge, nameCaption: y, isDescriptionRequired: b = !1, descriptionCaption: x, renderDescription: S, focusRequestKey: C }) => {
414
- let w = B(null), T = B(null), ee = B(null), E = B(!1), D = (e) => m.includes(e), O = D(W.Name), k = D(W.Version), te = !!(t.name || t.version || t.description), ne = B(C);
416
+ let w = B(null), T = B(null), E = B(null), D = B(!1), O = (e) => m.includes(e), k = O(W.Name), A = O(W.Version), ee = !!(t.name || t.version || t.description), te = B(C);
415
417
  Ee(() => {
416
418
  let e = () => {
417
- t.name ? w.current?.focus() : t.version ? T.current?.focus() : t.description && ee.current?.focus();
419
+ t.name ? w.current?.focus() : t.version ? T.current?.focus() : t.description && E.current?.focus();
418
420
  };
419
- C === void 0 ? (te && !E.current && e(), E.current = te) : C !== ne.current && (ne.current = C, e());
421
+ C === void 0 ? (ee && !D.current && e(), D.current = ee) : C !== te.current && (te.current = C, e());
420
422
  }, [
421
423
  C,
422
- te,
424
+ ee,
423
425
  t.name,
424
426
  t.version,
425
427
  t.description
426
428
  ]);
427
- let re = /* @__PURE__ */ P(he, {
429
+ let ne = /* @__PURE__ */ I(pe, {
428
430
  id: Ke,
429
- ref: ee,
431
+ ref: E,
430
432
  value: e.description,
431
433
  onChange: (e) => n({ description: e }),
432
434
  "aria-required": b || void 0,
@@ -440,14 +442,14 @@ var H = {
440
442
  invalid: !!t.description,
441
443
  containerClassName: S ? void 0 : d?.field,
442
444
  className: r,
443
- resize: ge.Vertical
445
+ resize: me.Vertical
444
446
  });
445
- return /* @__PURE__ */ F("div", {
447
+ return /* @__PURE__ */ L("div", {
446
448
  role: u.ariaLabel ? "group" : void 0,
447
449
  "aria-label": u.ariaLabel,
448
450
  className: c("flex flex-col gap-4", d?.root),
449
451
  children: [
450
- D(W.Avatar) && /* @__PURE__ */ P(Ie, {
452
+ O(W.Avatar) && /* @__PURE__ */ I(Ie, {
451
453
  label: u.iconUrl.label,
452
454
  avatarUrl: s,
453
455
  addAvatarLabel: u.iconUrl.addAvatarLabel,
@@ -455,9 +457,9 @@ var H = {
455
457
  onAddAvatarClick: l,
456
458
  className: d?.field
457
459
  }),
458
- (O || k) && /* @__PURE__ */ F("div", {
460
+ (k || A) && /* @__PURE__ */ L("div", {
459
461
  className: c("flex items-start gap-4", d?.field),
460
- children: [O && /* @__PURE__ */ P(A, {
462
+ children: [k && /* @__PURE__ */ I(j, {
461
463
  id: "deployment-creation-form-name",
462
464
  inputRef: w,
463
465
  value: e.name,
@@ -473,8 +475,8 @@ var H = {
473
475
  caption: y,
474
476
  error: t.name || void 0,
475
477
  invalid: !!t.name,
476
- containerClassName: k ? "min-w-0 basis-0 grow-[2]" : "min-w-0 flex-1"
477
- }), k && /* @__PURE__ */ P(A, {
478
+ containerClassName: A ? "min-w-0 basis-0 grow-[2]" : "min-w-0 flex-1"
479
+ }), A && /* @__PURE__ */ I(j, {
478
480
  id: "deployment-creation-form-version",
479
481
  inputRef: T,
480
482
  value: e.version,
@@ -488,14 +490,14 @@ var H = {
488
490
  placeholder: u.version.placeholder,
489
491
  error: t.version || void 0,
490
492
  invalid: !!t.version,
491
- containerClassName: O ? "min-w-0 basis-0 grow-[1]" : "min-w-0 flex-1"
493
+ containerClassName: k ? "min-w-0 basis-0 grow-[1]" : "min-w-0 flex-1"
492
494
  })]
493
495
  }),
494
- D(W.Description) && (S ? /* @__PURE__ */ P("div", {
496
+ O(W.Description) && (S ? /* @__PURE__ */ I("div", {
495
497
  className: d?.field,
496
- children: S(re, Ke)
497
- }) : re),
498
- D(W.Locales) && /* @__PURE__ */ P(Ue, {
498
+ children: S(ne, Ke)
499
+ }) : ne),
500
+ O(W.Locales) && /* @__PURE__ */ I(Ue, {
499
501
  value: e.otherLocales,
500
502
  onChange: (e) => n({ otherLocales: e }),
501
503
  availableLocaleOptions: f,
@@ -504,9 +506,9 @@ var H = {
504
506
  className: d?.field,
505
507
  colors: d?.localesColors
506
508
  }),
507
- D(W.Tags) && /* @__PURE__ */ P("div", {
509
+ O(W.Tags) && /* @__PURE__ */ I("div", {
508
510
  className: d?.field,
509
- children: /* @__PURE__ */ P(me, {
511
+ children: /* @__PURE__ */ I(fe, {
510
512
  id: "deployment-creation-form-topics",
511
513
  labelProps: { label: u.topics.label },
512
514
  placeholder: u.topics.placeholder ?? We,
@@ -518,12 +520,12 @@ var H = {
518
520
  ]
519
521
  });
520
522
  }, Je = "border-0 p-4 desktop:p-8", Ye = "border-0", Xe = "desktop:flex-1", Ze = "px-4 pt-4 desktop:px-6 desktop:pt-6", Qe = Te(({ title: e, onBack: t, onCancel: n, onSubmit: r, submitLabel: i, isSubmitting: a = !1, isSubmitDisabled: o = !1, extraActions: s, hideStandardActions: l = !1, metadata: u, metadataTitle: d, metadataFooter: f, setup: p, setupTitle: m, asideData: h, asideTitle: g, asideSectionClassName: _, alert: v, resizableLeftColumn: y, metadataSectionClassName: b, setupSectionClassName: x, hasSetupSectionPadding: S = !0, labels: C, styles: w, dir: T }) => {
521
- let ee = /* @__PURE__ */ P(ie, {
522
- politeness: j.Assertive,
523
+ let E = /* @__PURE__ */ I(re, {
524
+ politeness: M.Assertive,
523
525
  className: v == null ? void 0 : Ze,
524
526
  children: v
525
- }), E = p != null;
526
- return /* @__PURE__ */ P(Pe, {
527
+ }), D = p != null;
528
+ return /* @__PURE__ */ I(Pe, {
527
529
  title: e,
528
530
  onBack: t,
529
531
  backAriaLabel: C?.backAriaLabel ?? "Back",
@@ -534,7 +536,7 @@ var H = {
534
536
  resizeHandleLabel: C?.resizeHandleLabel,
535
537
  resizeHandleTooltip: C?.resizeHandleTooltip
536
538
  },
537
- rightContent: h == null ? void 0 : /* @__PURE__ */ P(Me, {
539
+ rightContent: h == null ? void 0 : /* @__PURE__ */ I(Me, {
538
540
  title: g,
539
541
  styles: w?.section,
540
542
  className: c(Je, _, H.asideSection),
@@ -542,18 +544,18 @@ var H = {
542
544
  }),
543
545
  styles: w?.layout,
544
546
  dir: T,
545
- actions: /* @__PURE__ */ F(N, { children: [s, !l && /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(oe, {
547
+ actions: /* @__PURE__ */ L(F, { children: [s, !l && /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I(N, {
546
548
  label: C?.cancelLabel ?? "Cancel",
547
549
  disabled: a,
548
550
  onClick: n
549
- }), /* @__PURE__ */ P(le, {
551
+ }), /* @__PURE__ */ I(se, {
550
552
  label: i,
551
553
  disabled: a || o,
552
554
  onClick: r
553
555
  })] })] }),
554
- leftContent: /* @__PURE__ */ F(N, { children: [
555
- !E && ee,
556
- /* @__PURE__ */ P(Me, {
556
+ leftContent: /* @__PURE__ */ L(F, { children: [
557
+ !D && E,
558
+ /* @__PURE__ */ I(Me, {
557
559
  title: d === null ? void 0 : d ?? C?.metadataTitle ?? "Metadata",
558
560
  styles: w?.section,
559
561
  className: c(Je, b, H.metadataSection),
@@ -561,7 +563,7 @@ var H = {
561
563
  }),
562
564
  f
563
565
  ] }),
564
- centerContent: E ? /* @__PURE__ */ F(N, { children: [ee, /* @__PURE__ */ P(Me, {
566
+ centerContent: D ? /* @__PURE__ */ L(F, { children: [E, /* @__PURE__ */ I(Me, {
565
567
  title: m === null ? void 0 : m ?? C?.setupTitle ?? "Setup",
566
568
  styles: w?.section,
567
569
  className: c(S ? Je : Ye, Xe, x, H.setupSection),
@@ -632,11 +634,11 @@ var H = {
632
634
  deleteConfirmLabel: "Delete",
633
635
  deleteCancelLabel: "Cancel"
634
636
  }, tt = Te(({ values: e, errors: t, onChange: n, onNameBlur: r, onVersionBlur: i, avatarPicker: a, availableLocaleOptions: o, formatLocaleLabel: s, fields: c = ze, isNameReadOnly: l, nameReadOnlyTooltip: u, isVersionReadOnly: d, versionReadOnlyTooltip: f, nameCaption: p, isDescriptionRequired: m, descriptionCaption: h, renderDescription: g, focusRequestKey: _, labels: v }) => {
635
- let [y, b] = V(!1), x = z(() => a ? c : c.filter((e) => e !== W.Avatar), [a, c]), S = e.iconUrl, C = a?.resolveIconUrl, w = z(() => C ? C(S) : void 0, [S, C]), T = R(() => b(!0), []), ee = R(() => b(!1), []), E = a?.resolveAttachedIconUrl, D = R((e) => {
636
- let t = E?.(e);
637
+ let [y, b] = V(!1), x = z(() => a ? c : c.filter((e) => e !== W.Avatar), [a, c]), S = e.iconUrl, C = a?.resolveIconUrl, w = z(() => C ? C(S) : void 0, [S, C]), T = R(() => b(!0), []), E = R(() => b(!1), []), D = a?.resolveAttachedIconUrl, O = R((e) => {
638
+ let t = D?.(e);
637
639
  t && n({ iconUrl: t }), b(!1);
638
- }, [n, E]);
639
- return /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(qe, {
640
+ }, [n, D]);
641
+ return /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I(qe, {
640
642
  values: e,
641
643
  errors: t,
642
644
  onChange: n,
@@ -657,10 +659,10 @@ var H = {
657
659
  descriptionCaption: h,
658
660
  renderDescription: g,
659
661
  focusRequestKey: _
660
- }), a && /* @__PURE__ */ P(Re, {
662
+ }), a && /* @__PURE__ */ I(Re, {
661
663
  isOpen: y,
662
- onClose: ee,
663
- onAttach: D,
664
+ onClose: E,
665
+ onAttach: O,
664
666
  bucket: a.bucket,
665
667
  FileManagerModal: a.FileManagerModal,
666
668
  allowedMimeTypes: a.allowedMimeTypes,
@@ -836,14 +838,14 @@ var H = {
836
838
  return e.Files = "files", e.Archive = "archive", e;
837
839
  }({}), J = /* @__PURE__ */ function(e) {
838
840
  return e.Mobile = "mobile", e.Desktop = "desktop", e;
839
- }({}), vt = (e, t, n = b.MD, r) => /* @__PURE__ */ P(e, {
841
+ }({}), vt = (e, t, n = b.MD, r) => /* @__PURE__ */ I(e, {
840
842
  size: n,
841
843
  className: t,
842
844
  style: r,
843
845
  "aria-hidden": !0,
844
846
  stroke: x
845
847
  }), yt = { footer: "_footer_hn1ri_7" }, bt = ({ isOpen: e, title: t, closeAriaLabel: n, onClose: r, confirmLabel: i, onConfirm: a, cancelLabel: s, onCancel: l, isConfirmDisabled: u = !1, isConfirming: f = !1, children: p, colors: h }) => {
846
- let _ = d(), y = f ? /* @__PURE__ */ P(pe, {
848
+ let _ = d(), y = f ? /* @__PURE__ */ I(de, {
847
849
  size: 16,
848
850
  ariaLabel: ""
849
851
  }) : void 0;
@@ -852,21 +854,21 @@ var H = {
852
854
  "--se-dialog-footer-bg": h?.footerBackground,
853
855
  "--se-dialog-footer-border": h?.footerBorder
854
856
  });
855
- return /* @__PURE__ */ F(m, {
857
+ return /* @__PURE__ */ L(m, {
856
858
  open: e,
857
859
  title: t,
858
860
  closeAriaLabel: n,
859
861
  onClose: r,
860
- children: [p, /* @__PURE__ */ F("div", {
862
+ children: [p, /* @__PURE__ */ L("div", {
861
863
  className: c("sticky bottom-0 flex gap-3 border-t p-4", yt.footer),
862
864
  style: d,
863
- children: [/* @__PURE__ */ P(le, {
865
+ children: [/* @__PURE__ */ I(se, {
864
866
  className: "flex-1",
865
867
  label: i,
866
868
  iconBefore: y,
867
869
  disabled: u,
868
870
  onClick: a
869
- }), /* @__PURE__ */ P(oe, {
871
+ }), /* @__PURE__ */ I(N, {
870
872
  className: "flex-1",
871
873
  label: s,
872
874
  onClick: l
@@ -874,10 +876,10 @@ var H = {
874
876
  })]
875
877
  });
876
878
  }
877
- return /* @__PURE__ */ P(M, {
879
+ return /* @__PURE__ */ I(P, {
878
880
  open: e,
879
881
  header: t,
880
- size: ce.Sm,
882
+ size: oe.Sm,
881
883
  closeAriaLabel: n,
882
884
  onClose: r,
883
885
  mainButtons: [{
@@ -902,7 +904,7 @@ var H = {
902
904
  let g = m ? n(f) : void 0, _ = () => {
903
905
  h(!0), n(f) ?? (r(f), t());
904
906
  };
905
- return /* @__PURE__ */ P(bt, {
907
+ return /* @__PURE__ */ I(bt, {
906
908
  isOpen: e,
907
909
  title: i,
908
910
  closeAriaLabel: l,
@@ -912,12 +914,12 @@ var H = {
912
914
  cancelLabel: c,
913
915
  onCancel: t,
914
916
  colors: u,
915
- children: /* @__PURE__ */ P("form", {
917
+ children: /* @__PURE__ */ I("form", {
916
918
  className: "px-4 py-4 desktop:px-6",
917
919
  onSubmit: (e) => {
918
920
  e.preventDefault(), _();
919
921
  },
920
- children: /* @__PURE__ */ P(A, {
922
+ children: /* @__PURE__ */ I(j, {
921
923
  id: d,
922
924
  labelProps: {
923
925
  label: a,
@@ -933,28 +935,28 @@ var H = {
933
935
  })
934
936
  });
935
937
  }, St = { icon: "_icon_1p1f5_1" }, Ct = ({ isVisible: e, labels: t, titleClassName: n = "dial-h3-text", subtitleClassName: r = "dial-small-text" }) => {
936
- let i = t ?? {}, a = i.dropOverlayTitle ?? "Upload files", o = i.dropOverlaySubtitle ?? "Drop files here to add them to this skill", s = /* @__PURE__ */ P(ie, {
938
+ let i = t ?? {}, a = i.dropOverlayTitle ?? "Upload files", o = i.dropOverlaySubtitle ?? "Drop files here to add them to this skill", s = /* @__PURE__ */ I(re, {
937
939
  visuallyHidden: !0,
938
- as: ae.Span,
940
+ as: ie.Span,
939
941
  children: e ? `${a}. ${o}` : ""
940
942
  });
941
- return e ? /* @__PURE__ */ F(N, { children: [s, /* @__PURE__ */ P("div", {
943
+ return e ? /* @__PURE__ */ L(F, { children: [s, /* @__PURE__ */ I("div", {
942
944
  className: c("pointer-events-none absolute inset-0 z-100 flex items-center justify-center backdrop-blur-sm"),
943
- children: /* @__PURE__ */ F("div", {
945
+ children: /* @__PURE__ */ L("div", {
944
946
  "aria-hidden": !0,
945
947
  className: "flex flex-col items-center text-center",
946
948
  children: [
947
- /* @__PURE__ */ P(Se, {
949
+ /* @__PURE__ */ I(Se, {
948
950
  size: 100,
949
951
  className: St.icon,
950
952
  "aria-hidden": !0,
951
953
  stroke: x
952
954
  }),
953
- /* @__PURE__ */ P("span", {
955
+ /* @__PURE__ */ I("span", {
954
956
  className: c("mt-5", n),
955
957
  children: a
956
958
  }),
957
- /* @__PURE__ */ P("span", {
959
+ /* @__PURE__ */ I("span", {
958
960
  className: c("mt-4", r),
959
961
  children: o
960
962
  })
@@ -966,14 +968,14 @@ var H = {
966
968
  label: "_label_1tr87_7",
967
969
  fileName: "_fileName_1tr87_11",
968
970
  header: "_header_1tr87_16"
969
- }, wt = ({ label: e, fileName: t, isExpanded: n, onToggle: r, children: i, labelClassName: a = "dial-tiny-lead-text", fileNameClassName: o = "dial-small-text" }) => /* @__PURE__ */ P(p, {
971
+ }, wt = ({ label: e, fileName: t, isExpanded: n, onToggle: r, children: i, labelClassName: a = "dial-tiny-lead-text", fileNameClassName: o = "dial-small-text" }) => /* @__PURE__ */ I(p, {
970
972
  expanded: n,
971
973
  onToggle: r,
972
- title: /* @__PURE__ */ P("span", {
974
+ title: /* @__PURE__ */ I("span", {
973
975
  className: c("block", Y.label, a),
974
976
  children: e
975
977
  }),
976
- description: /* @__PURE__ */ P(O, {
978
+ description: /* @__PURE__ */ I(k, {
977
979
  name: t,
978
980
  nameClassName: c(Y.fileName, o)
979
981
  }),
@@ -995,7 +997,7 @@ var H = {
995
997
  file: e,
996
998
  path: ot(n, t.replace(/\\/g, "/"))
997
999
  }), jt = ({ isOpen: e, onClose: t, fileActions: n, mode: r = _t.Files, targetFolderPath: i = "", initialFiles: a, initialEntries: l, existingFilePaths: u = $, onCommitted: d, messageClassName: f = "dial-small-text", rowCaptionClassName: p, labels: m, dialogColors: h, colors: g }) => {
998
- let _ = m ?? {}, [v, b] = V([]), [S, C] = V([]), [w, T] = V(X.Replace), ee = z(() => new Set(u), [u]), [k, A] = V(/* @__PURE__ */ new Map()), [ne, re] = V([]), [oe, se] = V(!1), [M, ce] = V(), [le, de] = V(!1), [fe, me] = V(), [he, ge] = V(0), I = B(0), L = r === _t.Archive, _e = _.uploadArchiveErrorMessage ?? "Couldn't read this archive", ve = De(), ye = De(), be = De(), Se = B(null), Ce = B(!1), we = S[0]?.id;
1000
+ let _ = m ?? {}, [v, b] = V([]), [S, C] = V([]), [w, T] = V(X.Replace), E = z(() => new Set(u), [u]), [A, j] = V(/* @__PURE__ */ new Map()), [te, ne] = V([]), [N, ae] = V(!1), [P, oe] = V(), [se, le] = V(!1), [ue, fe] = V(), [pe, me] = V(0), he = B(0), ge = r === _t.Archive, _e = _.uploadArchiveErrorMessage ?? "Couldn't read this archive", ve = De(), ye = De(), be = De(), Se = B(null), Ce = B(!1), we = S[0]?.id;
999
1001
  Ee(() => {
1000
1002
  e && (we == null ? Ce.current && (Ce.current = !1, document.getElementById(ye)?.focus()) : (Ce.current = !0, Se.current?.focus()));
1001
1003
  }, [
@@ -1003,11 +1005,11 @@ var H = {
1003
1005
  e,
1004
1006
  ye
1005
1007
  ]);
1006
- let Te = (e) => e.path !== "SKILL.md" && ee.has(e.path), R = (e) => {
1007
- ce(void 0), b((t) => [...t, ...e.filter((e) => !Te(e))]), C((t) => [...t, ...e.filter(Te)]);
1008
+ let Te = (e) => e.path !== "SKILL.md" && E.has(e.path), R = (e) => {
1009
+ oe(void 0), b((t) => [...t, ...e.filter((e) => !Te(e))]), C((t) => [...t, ...e.filter(Te)]);
1008
1010
  }, Oe = (e) => {
1009
1011
  let [t, ...n] = S;
1010
- t && (C(n), T(X.Replace), e != null && (ce(void 0), b((r) => {
1012
+ t && (C(n), T(X.Replace), e != null && (oe(void 0), b((r) => {
1011
1013
  if (e === X.Replace) return [...r, {
1012
1014
  ...t,
1013
1015
  replacesExisting: !0
@@ -1025,66 +1027,66 @@ var H = {
1025
1027
  }, ke = async (e) => {
1026
1028
  let { extractArchive: t } = n;
1027
1029
  if (!t) return;
1028
- let r = I.current;
1029
- me(void 0), ge((e) => e + 1);
1030
+ let r = he.current;
1031
+ fe(void 0), me((e) => e + 1);
1030
1032
  try {
1031
1033
  let n = await Promise.all(e.map((e) => t(e)));
1032
- if (r !== I.current) return;
1034
+ if (r !== he.current) return;
1033
1035
  let a = n.flat();
1034
1036
  if (a.length === 0) {
1035
- me(_.uploadArchiveEmptyMessage ?? "This archive has no files");
1037
+ fe(_.uploadArchiveEmptyMessage ?? "This archive has no files");
1036
1038
  return;
1037
1039
  }
1038
1040
  R(a.map((e) => At(e.file, e.path, i)));
1039
1041
  } catch {
1040
- if (r !== I.current) return;
1041
- me(_e);
1042
+ if (r !== he.current) return;
1043
+ fe(_e);
1042
1044
  } finally {
1043
- r === I.current && ge((e) => e - 1);
1045
+ r === he.current && me((e) => e - 1);
1044
1046
  }
1045
1047
  }, Ae = (e) => {
1046
- L ? ke(e) : R(e.map((e) => At(e, Dt(e), i)));
1048
+ ge ? ke(e) : R(e.map((e) => At(e, Dt(e), i)));
1047
1049
  }, H = (e) => {
1048
1050
  b((t) => t.filter((t) => t.id !== e));
1049
1051
  };
1050
1052
  Ee(() => {
1051
1053
  if (!e) return;
1052
- I.current += 1;
1054
+ he.current += 1;
1053
1055
  let t = [...(a ?? []).map((e) => At(e, Dt(e), i)), ...(l ?? []).map((e) => At(e.file, e.path, i))];
1054
- b(t.filter((e) => !Te(e))), C(t.filter(Te)), T(X.Replace), A(/* @__PURE__ */ new Map()), re([]), ce(void 0), me(void 0), ge(0);
1056
+ b(t.filter((e) => !Te(e))), C(t.filter(Te)), T(X.Replace), j(/* @__PURE__ */ new Map()), ne([]), oe(void 0), fe(void 0), me(0);
1055
1057
  }, [e]), Ee(() => {
1056
1058
  if (!e) return;
1057
1059
  let t = !1;
1058
- if (v.length === 0) A(/* @__PURE__ */ new Map()), re([]);
1059
- else return se(!0), n.validateBatch(v).then(({ results: e, batchErrors: n }) => {
1060
- t || (A(new Map(e.map((e) => [e.candidateId, e]))), re(n.map((e) => e.message)));
1060
+ if (v.length === 0) j(/* @__PURE__ */ new Map()), ne([]);
1061
+ else return ae(!0), n.validateBatch(v).then(({ results: e, batchErrors: n }) => {
1062
+ t || (j(new Map(e.map((e) => [e.candidateId, e]))), ne(n.map((e) => e.message)));
1061
1063
  }).finally(() => {
1062
- t || se(!1);
1064
+ t || ae(!1);
1063
1065
  }), () => {
1064
1066
  t = !0;
1065
1067
  };
1066
1068
  }, [v, e]);
1067
- let je = v.some((e) => k.get(e.id)?.status === Et.Invalid), Me = v.length > 0 && v.every((e) => k.get(e.id)?.status === Et.Invalid), Ne = [...ne, ...v.flatMap((e) => {
1068
- let t = k.get(e.id);
1069
+ let je = v.some((e) => A.get(e.id)?.status === Et.Invalid), Me = v.length > 0 && v.every((e) => A.get(e.id)?.status === Et.Invalid), Ne = [...te, ...v.flatMap((e) => {
1070
+ let t = A.get(e.id);
1069
1071
  return t?.status === Et.Invalid && t.error ? [`${e.path}: ${t.error}`] : [];
1070
- })], U = v.length > 0 && !je && ne.length === 0 && !oe && !le && he === 0, Pe = async () => {
1071
- de(!0), ce(void 0);
1072
+ })], U = v.length > 0 && !je && te.length === 0 && !N && !se && pe === 0, Pe = async () => {
1073
+ le(!0), oe(void 0);
1072
1074
  try {
1073
1075
  let { results: e, batchErrors: r } = await n.validateBatch(v), i = new Map(e.map((e) => [e.candidateId, e]));
1074
- if (A(i), re(r.map((e) => e.message)), v.some((e) => i.get(e.id)?.status === Et.Invalid) || r.length > 0) return;
1076
+ if (j(i), ne(r.map((e) => e.message)), v.some((e) => i.get(e.id)?.status === Et.Invalid) || r.length > 0) return;
1075
1077
  let a = await n.commitBatch(v);
1076
1078
  if (a.error) {
1077
- ce(a.error);
1079
+ oe(a.error);
1078
1080
  return;
1079
1081
  }
1080
1082
  d?.(v), t();
1081
1083
  } finally {
1082
- de(!1);
1084
+ le(!1);
1083
1085
  }
1084
1086
  }, Fe = _.uploadDialogCloseAriaLabel ?? "Close", Ie = _.uploadCancelLabel ?? "Cancel", [Le] = S;
1085
1087
  if (Le) {
1086
1088
  let t = _.uploadConflictTitle ?? "Replace or duplicate it?";
1087
- return /* @__PURE__ */ P(bt, {
1089
+ return /* @__PURE__ */ I(bt, {
1088
1090
  isOpen: e,
1089
1091
  title: t,
1090
1092
  closeAriaLabel: Fe,
@@ -1094,14 +1096,14 @@ var H = {
1094
1096
  cancelLabel: Ie,
1095
1097
  onCancel: () => Oe(null),
1096
1098
  colors: h,
1097
- children: /* @__PURE__ */ F("div", {
1099
+ children: /* @__PURE__ */ L("div", {
1098
1100
  className: "flex flex-col gap-4 px-4 py-4 desktop:px-6",
1099
- children: [/* @__PURE__ */ P("p", {
1101
+ children: [/* @__PURE__ */ I("p", {
1100
1102
  ref: Se,
1101
1103
  tabIndex: -1,
1102
1104
  className: c("outline-hidden", f),
1103
1105
  children: _.uploadConflictMessage?.(Le.path) ?? `Item with the same name "${Le.path}" already exists.`
1104
- }), /* @__PURE__ */ P(ue, {
1106
+ }), /* @__PURE__ */ I(ce, {
1105
1107
  ariaLabel: t,
1106
1108
  value: w,
1107
1109
  onChange: (e) => T(e === X.Duplicate ? X.Duplicate : X.Replace),
@@ -1116,83 +1118,83 @@ var H = {
1116
1118
  })
1117
1119
  });
1118
1120
  }
1119
- return /* @__PURE__ */ P(bt, {
1121
+ return /* @__PURE__ */ I(bt, {
1120
1122
  isOpen: e,
1121
- title: L ? _.uploadArchiveDialogTitle ?? "Upload archive from device" : _.uploadDialogTitle ?? "Upload files from device",
1123
+ title: ge ? _.uploadArchiveDialogTitle ?? "Upload archive from device" : _.uploadDialogTitle ?? "Upload files from device",
1122
1124
  closeAriaLabel: Fe,
1123
1125
  onClose: t,
1124
1126
  confirmLabel: _.uploadConfirmLabel ?? "Add",
1125
1127
  onConfirm: () => void Pe(),
1126
1128
  isConfirmDisabled: !U,
1127
- isConfirming: le,
1129
+ isConfirming: se,
1128
1130
  cancelLabel: Ie,
1129
1131
  onCancel: t,
1130
1132
  colors: h,
1131
- children: /* @__PURE__ */ F("div", {
1133
+ children: /* @__PURE__ */ L("div", {
1132
1134
  className: "flex flex-col gap-4 px-4 py-4 desktop:px-6",
1133
1135
  style: o({
1134
1136
  "--se-upload-invalid-dropzone-border": g?.invalidDropZoneBorder,
1135
1137
  "--se-upload-row-border": g?.rowBorder
1136
1138
  }),
1137
1139
  children: [
1138
- /* @__PURE__ */ P(D, {
1139
- label: /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P("span", {
1140
+ /* @__PURE__ */ I(O, {
1141
+ label: /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I("span", {
1140
1142
  className: "desktop:hidden",
1141
- children: L ? _.uploadArchiveDropZoneMobileLabel ?? "Click here to upload a .zip archive" : _.uploadDropZoneMobileLabel ?? "Click here to upload"
1142
- }), /* @__PURE__ */ P("span", {
1143
+ children: ge ? _.uploadArchiveDropZoneMobileLabel ?? "Click here to upload a .zip archive" : _.uploadDropZoneMobileLabel ?? "Click here to upload"
1144
+ }), /* @__PURE__ */ I("span", {
1143
1145
  className: "hidden desktop:inline",
1144
- children: L ? _.uploadArchiveDropZoneLabel ?? "Drag and drop a .zip archive or click here to upload" : _.uploadDropZoneLabel ?? "Drag and drop it or click here to upload"
1146
+ children: ge ? _.uploadArchiveDropZoneLabel ?? "Drag and drop a .zip archive or click here to upload" : _.uploadDropZoneLabel ?? "Drag and drop it or click here to upload"
1145
1147
  })] }),
1146
- description: L ? _.uploadArchiveDropZoneDescription : _.uploadDropZoneDescription,
1148
+ description: ge ? _.uploadArchiveDropZoneDescription : _.uploadDropZoneDescription,
1147
1149
  id: ye,
1148
1150
  ariaLabel: _.uploadDropZoneAriaLabel ?? "Upload files",
1149
1151
  multiple: !0,
1150
- accept: L ? Q : void 0,
1152
+ accept: ge ? Q : void 0,
1151
1153
  className: Me ? Z.invalidDropZone : void 0,
1152
1154
  onChange: Ae,
1153
- onReject: L ? () => me(_e) : void 0
1155
+ onReject: ge ? () => fe(_e) : void 0
1154
1156
  }),
1155
- he > 0 && /* @__PURE__ */ P(pe, { ariaLabel: _.uploadArchiveExtractingAriaLabel ?? "Reading archive" }),
1156
- /* @__PURE__ */ P(E, {
1157
- text: fe,
1158
- announce: j.Assertive
1157
+ pe > 0 && /* @__PURE__ */ I(de, { ariaLabel: _.uploadArchiveExtractingAriaLabel ?? "Reading archive" }),
1158
+ /* @__PURE__ */ I(D, {
1159
+ text: ue,
1160
+ announce: M.Assertive
1159
1161
  }),
1160
- /* @__PURE__ */ P(ie, {
1162
+ /* @__PURE__ */ I(re, {
1161
1163
  visuallyHidden: !0,
1162
- as: ae.Span,
1164
+ as: ie.Span,
1163
1165
  id: ve,
1164
1166
  children: Ne.map((e) => `${_.uploadBatchErrorAriaPrefix ?? "Upload error: "}${e}`).join(" ")
1165
1167
  }),
1166
- ne.map((e) => /* @__PURE__ */ P(E, { text: e }, e)),
1167
- v.length > 0 && /* @__PURE__ */ P("ul", {
1168
+ te.map((e) => /* @__PURE__ */ I(D, { text: e }, e)),
1169
+ v.length > 0 && /* @__PURE__ */ I("ul", {
1168
1170
  className: "flex flex-col gap-2",
1169
1171
  children: v.map((e) => {
1170
- let t = k.get(e.id), n = t?.kind === Tt.Manifest, r = t?.status === Et.Invalid, i = r ? t?.error : void 0, a = `${be}${e.id}`;
1171
- return /* @__PURE__ */ F("li", {
1172
+ let t = A.get(e.id), n = t?.kind === Tt.Manifest, r = t?.status === Et.Invalid, i = r ? t?.error : void 0, a = `${be}${e.id}`;
1173
+ return /* @__PURE__ */ L("li", {
1172
1174
  className: c("flex items-center gap-2 rounded-lg border p-2", Z.row),
1173
- children: [/* @__PURE__ */ P(O, {
1175
+ children: [/* @__PURE__ */ I(k, {
1174
1176
  name: e.path,
1175
1177
  className: "min-w-0 flex-1",
1176
- details: /* @__PURE__ */ F(N, { children: [
1177
- /* @__PURE__ */ P(y, {
1178
+ details: /* @__PURE__ */ L(F, { children: [
1179
+ /* @__PURE__ */ I(y, {
1178
1180
  className: p,
1179
1181
  text: s(e.file.size)
1180
1182
  }),
1181
- /* @__PURE__ */ P(E, {
1183
+ /* @__PURE__ */ I(D, {
1182
1184
  id: a,
1183
1185
  text: i
1184
1186
  }),
1185
- n && !r && /* @__PURE__ */ P(y, {
1187
+ n && !r && /* @__PURE__ */ I(y, {
1186
1188
  className: p,
1187
1189
  text: _.uploadManifestRowNote ?? "Will replace this Skill's name, description, and instructions"
1188
1190
  }),
1189
- e.replacesExisting && !r && /* @__PURE__ */ P(y, {
1191
+ e.replacesExisting && !r && /* @__PURE__ */ I(y, {
1190
1192
  className: p,
1191
1193
  text: _.uploadReplaceRowNote ?? "Will replace the existing file"
1192
1194
  })
1193
1195
  ] })
1194
- }), /* @__PURE__ */ P(te, {
1195
- icon: /* @__PURE__ */ P(xe, {
1196
+ }), /* @__PURE__ */ I(ee, {
1197
+ icon: /* @__PURE__ */ I(xe, {
1196
1198
  size: 16,
1197
1199
  "aria-hidden": !0,
1198
1200
  stroke: x
@@ -1204,9 +1206,9 @@ var H = {
1204
1206
  }, e.id);
1205
1207
  })
1206
1208
  }),
1207
- /* @__PURE__ */ P(E, {
1208
- text: M,
1209
- announce: j.Assertive
1209
+ /* @__PURE__ */ I(D, {
1210
+ text: P,
1211
+ announce: M.Assertive
1210
1212
  })
1211
1213
  ]
1212
1214
  })
@@ -1226,32 +1228,32 @@ var H = {
1226
1228
  onClick: () => n(r, K.Folder)
1227
1229
  };
1228
1230
  })];
1229
- return /* @__PURE__ */ F("div", {
1231
+ return /* @__PURE__ */ L("div", {
1230
1232
  className: "flex min-h-0 flex-1 flex-col gap-4",
1231
- children: [/* @__PURE__ */ P(h, {
1233
+ children: [/* @__PURE__ */ I(h, {
1232
1234
  items: p,
1233
1235
  ariaLabel: i,
1234
1236
  overflowAriaLabel: a
1235
- }), t.length === 0 ? /* @__PURE__ */ P(se, {
1237
+ }), t.length === 0 ? /* @__PURE__ */ I(ae, {
1236
1238
  title: s,
1237
1239
  description: l,
1238
1240
  live: !0
1239
- }) : /* @__PURE__ */ P("ul", {
1241
+ }) : /* @__PURE__ */ I("ul", {
1240
1242
  "aria-label": o,
1241
1243
  className: c("m-0 flex list-none flex-col overflow-hidden rounded-lg border p-0", Mt.list),
1242
1244
  children: t.map((e) => {
1243
1245
  let t = e.kind === K.Folder;
1244
- return /* @__PURE__ */ P("li", {
1246
+ return /* @__PURE__ */ I("li", {
1245
1247
  className: "m-0 p-0",
1246
- children: /* @__PURE__ */ F("button", {
1248
+ children: /* @__PURE__ */ L("button", {
1247
1249
  type: "button",
1248
1250
  onClick: () => n(e.path, e.kind),
1249
1251
  className: c("flex w-full cursor-pointer items-center justify-between gap-4 border-b bg-transparent px-3 py-2 text-start last:border-b-0", Mt.row),
1250
- children: [/* @__PURE__ */ P(O, {
1252
+ children: [/* @__PURE__ */ I(k, {
1251
1253
  name: e.name,
1252
1254
  type: t ? C.Folder : C.File,
1253
1255
  className: "min-w-0 flex-1"
1254
- }), t && /* @__PURE__ */ P("span", {
1256
+ }), t && /* @__PURE__ */ I("span", {
1255
1257
  className: c("shrink-0", Mt.count, d),
1256
1258
  children: u(e.childCount)
1257
1259
  })]
@@ -1272,13 +1274,13 @@ var H = {
1272
1274
  }, Lt = [W.Name, W.Description], Rt = 24, zt = 300, Bt = "pb-0 desktop:px-8 desktop:py-6", Vt = "desktop:px-8 desktop:py-6", Ht = "gap-4 px-4 pt-5 pb-6 desktop:gap-5 desktop:px-8 desktop:py-6", Ut = we(async () => {
1273
1275
  let { MarkdownEditor: e } = await Ae();
1274
1276
  return { default: e };
1275
- }), Wt = ({ initialValues: r, files: i, selectedPath: s, onSelectedPathChange: d, expandedPaths: p, onExpandedPathsChange: m, isLoading: h = !1, hasLoadError: S = !1, isSubmitting: C = !1, errors: D, submitError: O, conflict: A, onReloadLatest: re, isNameReadOnly: ie = !1, onDirtyChange: ae, onValuesChange: j, onRefineDescription: oe, onRefineInstructions: se, fileActions: M, supportingFileContent: ce, asideData: ue, onSubmit: de, onCancel: fe, onBack: me, backAriaLabel: he, title: ge, onRetry: I, onRetrySubmit: ye, labels: be, styles: we, dir: Te, instructionsEditorTheme: Ae = w.light }) => {
1277
+ }), Wt = ({ initialValues: r, files: i, selectedPath: s, onSelectedPathChange: d, expandedPaths: p, onExpandedPathsChange: m, isLoading: h = !1, hasLoadError: S = !1, isSubmitting: C = !1, errors: O, submitError: k, conflict: j, onReloadLatest: ne, isNameReadOnly: re = !1, onDirtyChange: ie, onValuesChange: M, onRefineDescription: N, onRefineInstructions: ae, fileActions: P, supportingFileContent: oe, asideData: ce, onSubmit: le, onCancel: ue, onBack: fe, backAriaLabel: pe, title: me, onRetry: he, onRetrySubmit: ye, labels: be, styles: we, dir: Te, instructionsEditorTheme: Ae = w.light }) => {
1276
1278
  let [H, je] = V({
1277
1279
  name: r?.name ?? "",
1278
1280
  description: r?.description ?? "",
1279
1281
  instructions: r?.instructions ?? ""
1280
1282
  }), Me = De(), Ne = De();
1281
- u(() => document.getElementById(Me), Ne, !!D?.instructions);
1283
+ u(() => document.getElementById(Me), Ne, !!O?.instructions);
1282
1284
  let U = B(void 0), Pe = l({
1283
1285
  bottomGap: Rt,
1284
1286
  minHeight: zt
@@ -1287,7 +1289,7 @@ var H = {
1287
1289
  ...Fe.current,
1288
1290
  ...e
1289
1291
  };
1290
- Fe.current = t, je(t), j?.(t);
1292
+ Fe.current = t, je(t), M?.(t);
1291
1293
  }, Le = (e) => e ? async (t, n) => {
1292
1294
  if (U.current && !U.current.aborted) throw new DOMException("Busy", "AbortError");
1293
1295
  U.current = n;
@@ -1299,23 +1301,23 @@ var H = {
1299
1301
  } : void 0, Re = f({
1300
1302
  value: H.description,
1301
1303
  onChange: (e) => Ie({ description: e }),
1302
- onRefine: Le(oe),
1304
+ onRefine: Le(N),
1303
1305
  disabled: C || h || S,
1304
1306
  resetKey: r
1305
1307
  }), W = f({
1306
1308
  value: H.instructions,
1307
1309
  onChange: (e) => Ie({ instructions: e }),
1308
- onRefine: Le(se),
1310
+ onRefine: Le(ae),
1309
1311
  disabled: C || h || S,
1310
1312
  resetKey: r
1311
1313
  }), ze = Re.isPending || W.isPending, Be = () => {
1312
1314
  Re.reset(), W.reset();
1313
1315
  }, Ve = () => {
1314
- Be(), fe();
1316
+ Be(), ue();
1315
1317
  }, He = () => {
1316
- Be(), me();
1318
+ Be(), fe();
1317
1319
  }, Ue = () => {
1318
- C || h || S || U.current && !U.current.aborted || de(H);
1320
+ C || h || S || U.current && !U.current.aborted || le(H);
1319
1321
  }, We = B(r), Ge = We.current !== r, Ke = B(i), [qe, Je] = V(!1);
1320
1322
  Ee(() => {
1321
1323
  We.current = r;
@@ -1334,14 +1336,14 @@ var H = {
1334
1336
  description: r?.description ?? "",
1335
1337
  instructions: r?.instructions ?? ""
1336
1338
  }, t = JSON.stringify(H) !== JSON.stringify(e) || Ye(i) !== Ye(Ke.current) || qe;
1337
- t !== Xe.current && (Xe.current = t, ae?.(t));
1339
+ t !== Xe.current && (Xe.current = t, ie?.(t));
1338
1340
  }, [
1339
1341
  H,
1340
1342
  i,
1341
1343
  r,
1342
1344
  Ge,
1343
1345
  qe,
1344
- ae
1346
+ ie
1345
1347
  ]);
1346
1348
  let [Ze, et] = V(G), q = s ?? Ze, it = R((e) => {
1347
1349
  et(e), d?.(e);
@@ -1388,18 +1390,18 @@ var H = {
1388
1390
  ]), Jt = R((e) => {
1389
1391
  ut.has(e) || pt(/* @__PURE__ */ new Set([...ut, e]));
1390
1392
  }, [ut, pt]), Yt = bt.targetFolderPath, Xt = z(() => ({
1391
- ...M,
1393
+ ...P,
1392
1394
  commitBatch: async (e) => {
1393
- let t = await M.commitBatch(e);
1395
+ let t = await P.commitBatch(e);
1394
1396
  return !t.error && Yt !== "" && Jt(Yt), t;
1395
1397
  }
1396
1398
  }), [
1397
- M,
1399
+ P,
1398
1400
  Yt,
1399
1401
  Jt
1400
1402
  ]), Zt = mt({
1401
1403
  files: i,
1402
- fileActions: M,
1404
+ fileActions: P,
1403
1405
  defaultName: Z.newFolderDefaultName ?? "New folder",
1404
1406
  messages: qt,
1405
1407
  onRevealFolder: Jt,
@@ -1434,12 +1436,12 @@ var H = {
1434
1436
  pt,
1435
1437
  it
1436
1438
  ]), ln = R((e) => {
1437
- M.onRemoveNode(e), (q === e || q.startsWith(`${e}/`)) && it(G);
1439
+ P.onRemoveNode(e), (q === e || q.startsWith(`${e}/`)) && it(G);
1438
1440
  }, [
1439
- M,
1441
+ P,
1440
1442
  q,
1441
1443
  it
1442
- ]), { startDraft: un } = Zt, { onCreateFolder: dn, extractArchive: fn, pickFromFileSystem: pn } = M, [mn, hn] = V(null), gn = R((e, t) => {
1444
+ ]), { startDraft: un } = Zt, { onCreateFolder: dn, extractArchive: fn, pickFromFileSystem: pn } = P, [mn, hn] = V(null), gn = R((e, t) => {
1443
1445
  t === J.Mobile ? hn(e) : un(e, t);
1444
1446
  }, [un]), _n = z(() => i.filter((e) => e.kind === K.File).map((e) => e.path), [i]), vn = R(async (e) => {
1445
1447
  if (!pn) return;
@@ -1475,7 +1477,7 @@ var H = {
1475
1477
  }), pn && r.push({
1476
1478
  key: "open-file-system",
1477
1479
  label: Z.openFileSystemLabel ?? "Open DIAL file system",
1478
- icon: n(L),
1480
+ icon: n(ge),
1479
1481
  onClick: () => void vn(e)
1480
1482
  }), r;
1481
1483
  }, [
@@ -1523,7 +1525,7 @@ var H = {
1523
1525
  ]), Sn = z(() => ({
1524
1526
  [J.Mobile]: (e) => xn(e, J.Mobile),
1525
1527
  [J.Desktop]: (e) => xn(e, J.Desktop)
1526
- }), [xn]), Cn = R((e) => e.nodeType === Oe.FOLDER || e.path === "SKILL.md" ? null : /* @__PURE__ */ P(te, {
1528
+ }), [xn]), Cn = R((e) => e.nodeType === Oe.FOLDER || e.path === "SKILL.md" ? null : /* @__PURE__ */ I(ee, {
1527
1529
  size: T.Small,
1528
1530
  icon: vt(xe, At, b.SM),
1529
1531
  "aria-label": Z.deleteLabel ?? "Delete",
@@ -1532,24 +1534,24 @@ var H = {
1532
1534
  Z.deleteLabel,
1533
1535
  At,
1534
1536
  ln
1535
- ]), wn = (e) => /* @__PURE__ */ F("div", {
1537
+ ]), wn = (e) => /* @__PURE__ */ L("div", {
1536
1538
  className: "flex flex-col gap-2 desktop:gap-5",
1537
- children: [/* @__PURE__ */ F("div", {
1539
+ children: [/* @__PURE__ */ L("div", {
1538
1540
  className: "flex items-center justify-between",
1539
- children: [/* @__PURE__ */ P("span", {
1541
+ children: [/* @__PURE__ */ I("span", {
1540
1542
  className: c(Ft.title, Ot),
1541
1543
  children: Z.filesHeading ?? "Files"
1542
- }), /* @__PURE__ */ P(_, {
1544
+ }), /* @__PURE__ */ I(_, {
1543
1545
  label: Z.addLabel ?? "Add",
1544
1546
  variant: v.Neutral,
1545
1547
  appearance: g.Solid,
1546
1548
  size: T.Small,
1547
1549
  items: bn[e]
1548
1550
  })]
1549
- }), /* @__PURE__ */ P("div", {
1551
+ }), /* @__PURE__ */ I("div", {
1550
1552
  role: "tree",
1551
1553
  "aria-label": Z.filesTreeAriaLabel ?? "Skill files",
1552
- children: /* @__PURE__ */ P(ke, {
1554
+ children: /* @__PURE__ */ I(ke, {
1553
1555
  items: en === e ? nn : tn,
1554
1556
  showFiles: !0,
1555
1557
  selectedPath: q,
@@ -1573,9 +1575,9 @@ var H = {
1573
1575
  topics: [],
1574
1576
  otherLocales: []
1575
1577
  }), [H.name, H.description]), En = z(() => ({
1576
- name: D?.name,
1577
- description: D?.description
1578
- }), [D?.name, D?.description]), Dn = z(() => ({ form: {
1578
+ name: O?.name,
1579
+ description: O?.description
1580
+ }), [O?.name, O?.description]), Dn = z(() => ({ form: {
1579
1581
  ...$e,
1580
1582
  name: {
1581
1583
  label: Z.nameLabel ?? "Name",
@@ -1593,7 +1595,7 @@ var H = {
1593
1595
  Z.descriptionPlaceholder
1594
1596
  ]), On = (e) => {
1595
1597
  e.name !== void 0 && Ie({ name: e.name }), e.description !== void 0 && (Re.reset(), Ie({ description: e.description }));
1596
- }, kn = oe ? (e, t) => /* @__PURE__ */ P(a, {
1598
+ }, kn = N ? (e, t) => /* @__PURE__ */ I(a, {
1597
1599
  isEnabled: !0,
1598
1600
  fieldId: t,
1599
1601
  required: !0,
@@ -1604,7 +1606,7 @@ var H = {
1604
1606
  ...Gt,
1605
1607
  children: e
1606
1608
  }) : void 0, An = {
1607
- title: ge,
1609
+ title: me,
1608
1610
  onBack: He,
1609
1611
  onCancel: Ve,
1610
1612
  onSubmit: Ue,
@@ -1612,58 +1614,58 @@ var H = {
1612
1614
  isSubmitDisabled: ze || h || S,
1613
1615
  labels: {
1614
1616
  cancelLabel: Z.cancelLabel ?? "Cancel",
1615
- backAriaLabel: he ?? "Back",
1617
+ backAriaLabel: pe ?? "Back",
1616
1618
  savingStatusLabel: Z.savingStatusLabel ?? "Saving"
1617
1619
  },
1618
1620
  styles: Kt,
1619
1621
  metadataTitle: null
1620
1622
  };
1621
- if (h) return /* @__PURE__ */ P("div", {
1623
+ if (h) return /* @__PURE__ */ I("div", {
1622
1624
  dir: Te,
1623
1625
  className: "relative flex min-h-0 flex-1 flex-col",
1624
- children: /* @__PURE__ */ P(Qe, {
1626
+ children: /* @__PURE__ */ I(Qe, {
1625
1627
  ...An,
1626
- metadata: /* @__PURE__ */ P("div", {
1628
+ metadata: /* @__PURE__ */ I("div", {
1627
1629
  className: "flex flex-1 items-center justify-center p-8",
1628
- children: /* @__PURE__ */ P(pe, { ariaLabel: Z.loadingAriaLabel ?? "Loading skill" })
1630
+ children: /* @__PURE__ */ I(de, { ariaLabel: Z.loadingAriaLabel ?? "Loading skill" })
1629
1631
  })
1630
1632
  })
1631
1633
  });
1632
- if (S) return /* @__PURE__ */ P("div", {
1634
+ if (S) return /* @__PURE__ */ I("div", {
1633
1635
  dir: Te,
1634
1636
  className: "relative flex min-h-0 flex-1 flex-col",
1635
- children: /* @__PURE__ */ P(Qe, {
1637
+ children: /* @__PURE__ */ I(Qe, {
1636
1638
  ...An,
1637
- metadata: /* @__PURE__ */ P("div", {
1639
+ metadata: /* @__PURE__ */ I("div", {
1638
1640
  className: "p-8",
1639
- children: /* @__PURE__ */ P(ee, {
1641
+ children: /* @__PURE__ */ I(E, {
1640
1642
  message: Z.loadErrorMessage ?? "Couldn't load this skill. Please try again.",
1641
1643
  iconStroke: x,
1642
- action: /* @__PURE__ */ P(le, {
1644
+ action: /* @__PURE__ */ I(se, {
1643
1645
  label: Z.retryLabel ?? "Retry",
1644
- onClick: I
1646
+ onClick: he
1645
1647
  })
1646
1648
  })
1647
1649
  })
1648
1650
  })
1649
1651
  });
1650
- let jn = q === G, Mn = rn?.name ?? q.slice(q.lastIndexOf("/") + 1), Nn = jn ? G : Z.selectedFileHeading?.(Mn) ?? Mn, Pn = O != null || A != null ? /* @__PURE__ */ F("div", {
1652
+ let jn = q === G, Mn = rn?.name ?? q.slice(q.lastIndexOf("/") + 1), Nn = jn ? G : Z.selectedFileHeading?.(Mn) ?? Mn, Pn = k != null || j != null ? /* @__PURE__ */ L("div", {
1651
1653
  className: "flex flex-col gap-2",
1652
- children: [O != null && /* @__PURE__ */ F("div", {
1654
+ children: [k != null && /* @__PURE__ */ L("div", {
1653
1655
  className: "flex items-center gap-2",
1654
- children: [/* @__PURE__ */ P(E, { text: O }), ye != null && /* @__PURE__ */ P(k, {
1656
+ children: [/* @__PURE__ */ I(D, { text: k }), ye != null && /* @__PURE__ */ I(A, {
1655
1657
  label: Z.retryLabel ?? "Retry",
1656
1658
  onClick: ye
1657
1659
  })]
1658
- }), A != null && /* @__PURE__ */ F("div", {
1660
+ }), j != null && /* @__PURE__ */ L("div", {
1659
1661
  className: "flex items-center gap-2",
1660
- children: [/* @__PURE__ */ P(E, { text: A.message }), /* @__PURE__ */ P(k, {
1662
+ children: [/* @__PURE__ */ I(D, { text: j.message }), /* @__PURE__ */ I(A, {
1661
1663
  label: Z.reloadLatestLabel ?? "Reload latest",
1662
- onClick: re
1664
+ onClick: ne
1663
1665
  })]
1664
1666
  })]
1665
- }) : void 0, Fn = /* @__PURE__ */ P(a, {
1666
- isEnabled: !!se,
1667
+ }) : void 0, Fn = /* @__PURE__ */ I(a, {
1668
+ isEnabled: !!ae,
1667
1669
  fieldId: Me,
1668
1670
  required: !0,
1669
1671
  labelClassName: c(Ft.helperText, kt),
@@ -1672,21 +1674,21 @@ var H = {
1672
1674
  refinement: W,
1673
1675
  disabled: ze || C,
1674
1676
  ...Gt,
1675
- children: /* @__PURE__ */ F("div", {
1677
+ children: /* @__PURE__ */ L("div", {
1676
1678
  className: "flex flex-1 flex-col gap-2",
1677
1679
  children: [
1678
- !se && /* @__PURE__ */ P(ne, {
1680
+ !ae && /* @__PURE__ */ I(te, {
1679
1681
  htmlFor: Me,
1680
1682
  className: c(Ft.helperText, kt),
1681
1683
  label: Z.instructionsLabel ?? "Instructions",
1682
1684
  required: !0
1683
1685
  }),
1684
- /* @__PURE__ */ P("div", {
1686
+ /* @__PURE__ */ I("div", {
1685
1687
  ref: Pe,
1686
1688
  className: c(t, e, n),
1687
- children: /* @__PURE__ */ P(Ce, {
1688
- fallback: /* @__PURE__ */ P(pe, { ariaLabel: Z.instructionsLoadingAriaLabel ?? "Loading" }),
1689
- children: /* @__PURE__ */ P(Ut, {
1689
+ children: /* @__PURE__ */ I(Ce, {
1690
+ fallback: /* @__PURE__ */ I(de, { ariaLabel: Z.instructionsLoadingAriaLabel ?? "Loading" }),
1691
+ children: /* @__PURE__ */ I(Ut, {
1690
1692
  id: Me,
1691
1693
  ariaLabel: Z.instructionsLabel ?? "Instructions",
1692
1694
  value: H.instructions,
@@ -1699,34 +1701,34 @@ var H = {
1699
1701
  })
1700
1702
  })
1701
1703
  }),
1702
- D?.instructions != null && /* @__PURE__ */ P(E, {
1704
+ O?.instructions != null && /* @__PURE__ */ I(D, {
1703
1705
  id: Ne,
1704
- text: D.instructions
1706
+ text: O.instructions
1705
1707
  })
1706
1708
  ]
1707
1709
  })
1708
1710
  });
1709
- return /* @__PURE__ */ F("div", {
1711
+ return /* @__PURE__ */ L("div", {
1710
1712
  dir: Te,
1711
1713
  className: c("relative flex min-h-0 min-w-0 flex-1 flex-col", nt.root),
1712
1714
  style: Nt,
1713
1715
  ...Dt,
1714
1716
  children: [
1715
- /* @__PURE__ */ P(Ct, {
1717
+ /* @__PURE__ */ I(Ct, {
1716
1718
  isVisible: X && !ht,
1717
1719
  labels: be,
1718
1720
  titleClassName: $.dropOverlayTitleClassName,
1719
1721
  subtitleClassName: $.dropOverlaySubtitleClassName
1720
1722
  }),
1721
- /* @__PURE__ */ P(Qe, {
1723
+ /* @__PURE__ */ I(Qe, {
1722
1724
  ...An,
1723
- asideData: ue,
1725
+ asideData: ce,
1724
1726
  asideSectionClassName: Vt,
1725
1727
  isSubmitting: C,
1726
1728
  metadataSectionClassName: Bt,
1727
- metadata: /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P("div", {
1729
+ metadata: /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I("div", {
1728
1730
  className: "desktop:hidden",
1729
- children: /* @__PURE__ */ P(wt, {
1731
+ children: /* @__PURE__ */ I(wt, {
1730
1732
  label: Z.editingFileLabel ?? "Editing file",
1731
1733
  fileName: jn ? G : Mn,
1732
1734
  isExpanded: Tt,
@@ -1735,25 +1737,25 @@ var H = {
1735
1737
  fileNameClassName: $.editingFileNameClassName,
1736
1738
  children: wn(J.Mobile)
1737
1739
  })
1738
- }), /* @__PURE__ */ P("div", {
1740
+ }), /* @__PURE__ */ I("div", {
1739
1741
  className: "hidden desktop:block",
1740
1742
  children: wn(J.Desktop)
1741
1743
  })] }),
1742
1744
  alert: Pn,
1743
1745
  setupTitle: Nn,
1744
1746
  setupSectionClassName: Ht,
1745
- setup: jn ? /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(tt, {
1747
+ setup: jn ? /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I(tt, {
1746
1748
  values: Tn,
1747
1749
  errors: En,
1748
1750
  onChange: On,
1749
1751
  fields: Lt,
1750
1752
  isDescriptionRequired: !0,
1751
- isNameReadOnly: ie,
1753
+ isNameReadOnly: re,
1752
1754
  nameReadOnlyTooltip: Z.nameReadOnlyTooltip ?? "The skill name can't be changed after creation",
1753
- nameCaption: D?.name ? void 0 : Z.nameCaption ?? "Lowercase letters and hyphens only, no spaces. We'll reformat automatically if needed.",
1755
+ nameCaption: O?.name ? void 0 : Z.nameCaption ?? "Lowercase letters and hyphens only, no spaces. We'll reformat automatically if needed.",
1754
1756
  renderDescription: kn,
1755
1757
  labels: Dn
1756
- }), Fn] }) : /* @__PURE__ */ F(N, { children: [on && q !== $t && /* @__PURE__ */ P(Pt, {
1758
+ }), Fn] }) : /* @__PURE__ */ L(F, { children: [on && q !== $t && /* @__PURE__ */ I(Pt, {
1757
1759
  folderPath: q,
1758
1760
  entries: an,
1759
1761
  onOpen: cn,
@@ -1765,12 +1767,12 @@ var H = {
1765
1767
  emptyDescription: Z.folderEmptyDescription,
1766
1768
  itemCountLabel: Z.folderItemCountLabel,
1767
1769
  itemCountClassName: $.folderItemCountClassName
1768
- }), rn?.kind === K.File && /* @__PURE__ */ P("div", {
1770
+ }), rn?.kind === K.File && /* @__PURE__ */ I("div", {
1769
1771
  className: "flex h-[max(320px,60dvh)] min-h-0 min-w-0 flex-none flex-col desktop:h-auto desktop:flex-1",
1770
- children: ce ?? /* @__PURE__ */ P(y, { text: Z.supportingFileNote ?? "This supporting file is included in the skill package as-is. Remove it from the Files panel to replace its content." })
1772
+ children: oe ?? /* @__PURE__ */ I(y, { text: Z.supportingFileNote ?? "This supporting file is included in the skill package as-is. Remove it from the Files panel to replace its content." })
1771
1773
  })] })
1772
1774
  }),
1773
- /* @__PURE__ */ P(jt, {
1775
+ /* @__PURE__ */ I(jt, {
1774
1776
  isOpen: ht,
1775
1777
  onClose: () => yt(!1),
1776
1778
  fileActions: Xt,
@@ -1791,7 +1793,7 @@ var H = {
1791
1793
  rowBorder: Q?.uploadRowBorder
1792
1794
  }
1793
1795
  }),
1794
- /* @__PURE__ */ P(xt, {
1796
+ /* @__PURE__ */ I(xt, {
1795
1797
  isOpen: mn != null,
1796
1798
  onClose: () => hn(null),
1797
1799
  validateName: (e) => Zt.validateNewFolder(e, mn ?? ""),