@epam/ai-dial-catalog 1.3.0 → 1.3.2

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,6 +1,6 @@
1
1
  import { A as e, C as t, D as n, E as r, M as i, N as a, O as o, P as s, S as c, T as l, _ as u, a as d, b as f, c as p, d as m, f as h, g, h as _, i as v, j as y, k as b, l as x, m as S, n as C, o as w, p as T, r as E, s as D, t as O, u as k, v as A, w as j, x as M, y as N } from "./mapping-Bsy4fyg5.js";
2
- import { CatalogEntityType as P, ConfirmationFooter as F, ConfirmationView as I, DESKTOP_BREAKPOINT_PX as ee, DeploymentIcon as L, EntityHeader as te, EntityTypeLabel as ne, FeaturedChip as re, ItemHeader as ie, MarkdownCodeBlock as R, MarkdownRenderer as z, MarkdownWithPlaceholders as ae, PanelEmptyState as oe, SELECT_LIST_MAX_HEIGHT_CLASS_NAME as se, SELECT_LIST_MAX_HEIGHT_PX as ce, buildCssVars as B, mergeClasses as V, useIsMobile as le, useIsPhone as ue, useIsVerticallyClamped as de } from "@epam/ai-dial-chat-shared";
3
- import { Fragment as fe, memo as pe, startTransition as H, useCallback as U, useEffect as W, useId as me, useImperativeHandle as he, useLayoutEffect as ge, useMemo as G, useRef as K, useState as q } from "react";
2
+ import { CatalogEntityType as P, ConfirmationFooter as F, ConfirmationView as I, DESKTOP_BREAKPOINT_PX as ee, DeploymentIcon as L, EntityHeader as te, EntityTypeLabel as ne, FeaturedChip as re, ItemHeader as ie, MarkdownCodeBlock as ae, MarkdownRenderer as R, MarkdownWithPlaceholders as oe, PanelEmptyState as z, SELECT_LIST_MAX_HEIGHT_CLASS_NAME as se, SELECT_LIST_MAX_HEIGHT_PX as ce, buildCssVars as B, mergeClasses as V, useIsMobile as le, useIsPhone as ue, useIsVerticallyClamped as de } from "@epam/ai-dial-chat-shared";
3
+ import { Fragment as fe, memo as pe, startTransition as me, useCallback as H, useEffect as U, useId as he, useImperativeHandle as W, useLayoutEffect as ge, useMemo as G, useRef as K, useState as q } from "react";
4
4
  import { Badge as _e, BottomSheet as ve, Breadcrumbs as ye, Button as be, ButtonAppearance as xe, ButtonDropdown as Se, ButtonVariant as Ce, CaptionText as we, CardShell as Te, Checkbox as Ee, ConfirmationPopupVariant as De, DIAL_ICON_SIZE as J, DIAL_KIT_ICON_STROKE as Y, DangerButton as Oe, Dropdown as ke, DropdownItemType as Ae, DropdownOverlayRole as je, ElementSize as Me, EllipsisTooltip as Ne, ErrorText as Pe, FabButton as Fe, FileIcon as Ie, FolderPath as Le, GhostButton as Re, GhostIconButton as ze, Highlight as Be, InlineSelect as Ve, InlineSelectTrigger as He, Input as Ue, InteractiveTooltip as We, LinkButton as Ge, LiveRegion as Ke, LiveRegionElement as qe, LiveRegionPoliteness as Je, MenuItem as Ye, MenuItemMark as Xe, NeutralButton as Ze, NeutralIconButton as Qe, NoDataContent as $e, Popup as et, PopupSize as tt, PrimaryButton as nt, ProgressBar as rt, RadioGroup as it, Search as at, SegmentedControl as ot, SideDrawer as st, Skeleton as ct, SkeletonAvatarShape as lt, Spinner as ut, Tabs as dt, ToggleIconButton as ft, Tooltip as pt, mergeClasses as mt } from "@epam/ai-dial-ui-kit";
5
5
  import { Fragment as X, jsx as Z, jsxs as Q } from "react/jsx-runtime";
6
6
  import { IconAdjustmentsHorizontal as ht, IconAlertCircleFilled as gt, IconAlertTriangleFilled as _t, IconArrowNarrowUp as vt, IconArrowRight as yt, IconBuildingCommunity as bt, IconCheck as xt, IconChevronDown as St, IconChevronLeft as Ct, IconChevronRight as wt, IconCircleCheckFilled as Tt, IconDots as Et, IconDownload as Dt, IconFilter as Ot, IconFolder as kt, IconKey as At, IconLayoutGrid as jt, IconLayoutList as Mt, IconLogin as Nt, IconLogout as Pt, IconPencil as Ft, IconPlayerPlayFilled as It, IconPlus as Lt, IconShare as Rt, IconStar as zt, IconStarFilled as Bt, IconTrash as Vt, IconTrashX as Ht, IconUser as Ut, IconUserOff as Wt, IconWorldOff as Gt, IconWorldShare as Kt } from "@tabler/icons-react";
@@ -29,7 +29,7 @@ var rn = /* @__PURE__ */ function(e) {
29
29
  return e.Markdown = "markdown", e.Text = "text", e.Image = "image", e.Unsupported = "unsupported", e;
30
30
  }({}), pn = () => {
31
31
  let [e, t] = q(() => window.innerWidth);
32
- return W(() => {
32
+ return U(() => {
33
33
  let e = () => t(window.innerWidth);
34
34
  return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
35
35
  }, []), e >= 1024 ? 4 : e >= 640 ? 2 : 1;
@@ -40,27 +40,27 @@ var rn = /* @__PURE__ */ function(e) {
40
40
  favoriteCard: "dial-catalog-favorite-card",
41
41
  listView: "dial-catalog-list-view"
42
42
  }, hn = "(prefers-reduced-motion: reduce)", gn = () => typeof window.matchMedia == "function" && window.matchMedia(hn).matches ? "auto" : "smooth", _n = ({ scrollBody: e, searchInputRef: t, listViewRef: n, isListView: r }) => {
43
- let [i, a] = q(!1), o = K(0), s = K(r), c = K(null), l = U(() => {
43
+ let [i, a] = q(!1), o = K(0), s = K(r), c = K(null), l = H(() => {
44
44
  if (!e) return;
45
45
  let t = s.current ? o.current : 0;
46
46
  a(e.scrollTop + t >= e.clientHeight && e.clientHeight > 0);
47
- }, [e]), u = U(() => {
47
+ }, [e]), u = H(() => {
48
48
  c.current ??= requestAnimationFrame(() => {
49
49
  c.current = null, l();
50
50
  });
51
51
  }, [l]);
52
- return W(() => {
52
+ return U(() => {
53
53
  r || (o.current = 0), s.current = r, l();
54
- }, [r, l]), W(() => {
54
+ }, [r, l]), U(() => {
55
55
  if (e) return e.addEventListener("scroll", u, { passive: !0 }), () => {
56
56
  e.removeEventListener("scroll", u), c.current != null && (cancelAnimationFrame(c.current), c.current = null);
57
57
  };
58
58
  }, [e, u]), {
59
59
  isVisible: i,
60
- handleRowsScroll: U((e) => {
60
+ handleRowsScroll: H((e) => {
61
61
  s.current && (o.current = e, u());
62
62
  }, [u]),
63
- scrollToTop: U(() => {
63
+ scrollToTop: H(() => {
64
64
  e?.scrollTo({
65
65
  top: 0,
66
66
  behavior: gn()
@@ -121,7 +121,7 @@ var rn = /* @__PURE__ */ function(e) {
121
121
  columnCount: i
122
122
  };
123
123
  });
124
- W(() => {
124
+ U(() => {
125
125
  let n = r.current;
126
126
  if (!n) return;
127
127
  let i = Tn(n.parentElement), o = () => {
@@ -290,7 +290,7 @@ var rn = /* @__PURE__ */ function(e) {
290
290
  badgeClassName: t,
291
291
  colors: n
292
292
  }), zn = 8, Bn = ({ topics: e, overflowAriaLabel: t, className: n }) => {
293
- let r = K(null), i = K([]), a = K([]), o = K(null), s = K(Infinity), [c, l] = q(e.length), u = e.join("\0"), d = U(() => {
293
+ let r = K(null), i = K([]), a = K([]), o = K(null), s = K(Infinity), [c, l] = q(e.length), u = e.join("\0"), d = H(() => {
294
294
  let t = r.current;
295
295
  if (!t || e.length === 0) return;
296
296
  let n = t.clientWidth;
@@ -313,7 +313,7 @@ var rn = /* @__PURE__ */ function(e) {
313
313
  }), ge(() => {
314
314
  let e = r.current;
315
315
  e && c !== 0 && (e.scrollWidth <= e.clientWidth || (s.current = c - 1, l(s.current)));
316
- }, [c]), W(() => {
316
+ }, [c]), U(() => {
317
317
  let e = r.current;
318
318
  if (!e) return;
319
319
  let t = new ResizeObserver(() => {
@@ -352,7 +352,7 @@ var rn = /* @__PURE__ */ function(e) {
352
352
  });
353
353
  }, Vn = { img: () => null }, Hn = (e) => e.target instanceof Element && e.target.closest("a") !== null, Un = (e) => !(e.target instanceof Node) || !e.currentTarget.contains(e.target), Wn = ({ item: e, query: t = "", onClick: n, initialIsStarred: r = !1, onToggle: i, isFavoriteVisible: a, featuredLabel: o = "Featured", addToFavoritesAriaLabel: s = "Add to favorites", removeFromFavoritesAriaLabel: c = "Remove from favorites", isSelected: l = !1, className: u, styles: d, credentialsBadgeLoggedOutLabel: f, noFolderLabel: p = "No folder", isReadonly: m = !1, markdownLabels: h, activeTab: g }) => {
354
354
  let [_, v] = q(r), y = T(e, g);
355
- W(() => {
355
+ U(() => {
356
356
  v(r);
357
357
  }, [e.id, r]);
358
358
  let { ref: b, isClamped: x } = de(e.description), S = d?.typography?.descriptionClassName ?? "dial-small-paragraph-text", C = d?.typography?.featuredChipClassName, w = d?.typography?.folderLabelClassName ?? "dial-tiny-text", E = d?.typography?.folderLeafClassName ?? "dial-tiny-semi-text", D = d?.typography?.descriptionTooltipClassName ?? "dial-small-text", O = d?.typography?.descriptionTooltipStrongClassName ?? "dial-small-semi-text", k = G(() => ({
@@ -375,7 +375,7 @@ var rn = /* @__PURE__ */ function(e) {
375
375
  "--cg-focus-outline": d?.colors?.focusOutline
376
376
  }), j = !m && e.isFeatured === !0, M = !m && a?.(e) !== !1, N = !m || e.folder.length > 0, P = n ? (t) => {
377
377
  !Hn(t) && !Un(t) && n(e);
378
- } : void 0, F = U((t) => {
378
+ } : void 0, F = H((t) => {
379
379
  t.stopPropagation();
380
380
  let n = !_;
381
381
  v(n), i?.(e.id, n);
@@ -427,7 +427,7 @@ var rn = /* @__PURE__ */ function(e) {
427
427
  asChild: !0,
428
428
  hideTooltip: !x,
429
429
  contentClassName: "max-h-[calc(100dvh-16px)] overflow-y-auto",
430
- content: e.description && /* @__PURE__ */ Z(z, {
430
+ content: e.description && /* @__PURE__ */ Z(R, {
431
431
  content: e.description,
432
432
  classNames: k,
433
433
  components: Vn,
@@ -436,7 +436,7 @@ var rn = /* @__PURE__ */ function(e) {
436
436
  children: /* @__PURE__ */ Z("div", {
437
437
  ref: b,
438
438
  className: V(e.topics.length > 0 ? "line-clamp-2 min-h-[2lh]" : "line-clamp-3 min-h-[3lh]", "wrap-break-word", On.description),
439
- children: e.description && /* @__PURE__ */ Z(z, {
439
+ children: e.description && /* @__PURE__ */ Z(R, {
440
440
  content: e.description,
441
441
  classNames: {
442
442
  p: S,
@@ -575,7 +575,7 @@ var rn = /* @__PURE__ */ function(e) {
575
575
  }, t))
576
576
  }) : e.length === 0 ? /* @__PURE__ */ Z("div", {
577
577
  className: "flex size-full flex-col items-center justify-center",
578
- children: /* @__PURE__ */ Z(oe, {
578
+ children: /* @__PURE__ */ Z(z, {
579
579
  label: h,
580
580
  description: a?.noResultsDescription
581
581
  })
@@ -746,7 +746,7 @@ var rn = /* @__PURE__ */ function(e) {
746
746
  errorText: "_errorText_qltis_13",
747
747
  deleteAction: "_deleteAction_qltis_18"
748
748
  }, yr = ({ label: e, description: t, icon: n, status: r, isActive: i, authenticationType: a, apiKeyAddedWhen: o, apiKeyHeader: c, onLogin: l, onRequestLogout: u, onRequestDeleteApiKey: d, texts: f, labelClassName: p, descriptionClassName: m, errorClassName: h, keyCardTitleClassName: g, keyCardDescriptionClassName: _, deleteActionClassName: v, disabled: y = !1, isPending: x = !1, renderLoginOptions: S, children: C }) => {
749
- let w = me(), [T, E] = q(), [D, O] = q(""), [k, A] = q(!1), [j, M] = q(!1), N = r === b.SignedIn, P = U((e) => {
749
+ let w = he(), [T, E] = q(), [D, O] = q(""), [k, A] = q(!1), [j, M] = q(!1), N = r === b.SignedIn, P = H((e) => {
750
750
  O(e ?? ""), A(!1), E(void 0);
751
751
  }, []), F = async () => {
752
752
  if (j || y) return;
@@ -762,7 +762,7 @@ var rn = /* @__PURE__ */ function(e) {
762
762
  M(!1);
763
763
  }
764
764
  }
765
- }, I = f?.loginActionLabel ?? "Log in", ee = f?.logoutActionLabel ?? "Log out", L = f?.addApiKeyActionLabel ?? "Add", te = f?.deleteActionLabel ?? "Delete", ne = f?.credentialsSignedInLabel ?? "Signed in", re = f?.credentialsSignedOutLabel ?? "Signed out", ie = f?.addingApiKeyStatusLabel ?? "Adding", R = f?.apiKeyConfiguredMessage ?? "Key has been configured", z = `${w}-header-hint`, ae = `${w}-empty-key-error`, oe = c ? (f?.apiKeyHeaderHint ?? ((e) => `Enter your API key value for "${e}" header`))(c) : void 0, se = o == null ? void 0 : (f?.apiKeyAddedLabel ?? ((e) => `Added ${e}`))(o);
765
+ }, I = f?.loginActionLabel ?? "Log in", ee = f?.logoutActionLabel ?? "Log out", L = f?.addApiKeyActionLabel ?? "Add", te = f?.deleteActionLabel ?? "Delete", ne = f?.credentialsSignedInLabel ?? "Signed in", re = f?.credentialsSignedOutLabel ?? "Signed out", ie = f?.addingApiKeyStatusLabel ?? "Adding", ae = f?.apiKeyConfiguredMessage ?? "Key has been configured", R = `${w}-header-hint`, oe = `${w}-empty-key-error`, z = c ? (f?.apiKeyHeaderHint ?? ((e) => `Enter your API key value for "${e}" header`))(c) : void 0, se = o == null ? void 0 : (f?.apiKeyAddedLabel ?? ((e) => `Added ${e}`))(o);
766
766
  return /* @__PURE__ */ Q("div", {
767
767
  role: "group",
768
768
  "aria-label": e,
@@ -813,7 +813,7 @@ var rn = /* @__PURE__ */ function(e) {
813
813
  className: "flex items-end gap-2",
814
814
  children: [/* @__PURE__ */ Z(Ue, {
815
815
  id: w,
816
- "aria-describedby": [oe ? z : void 0, k ? ae : void 0].filter(Boolean).join(" ") || void 0,
816
+ "aria-describedby": [z ? R : void 0, k ? oe : void 0].filter(Boolean).join(" ") || void 0,
817
817
  type: "password",
818
818
  autoComplete: "off",
819
819
  value: D,
@@ -835,12 +835,12 @@ var rn = /* @__PURE__ */ function(e) {
835
835
  })]
836
836
  }),
837
837
  /* @__PURE__ */ Z(we, {
838
- id: z,
839
- text: oe,
838
+ id: R,
839
+ text: z,
840
840
  className: V(m, vr.rowDescription)
841
841
  }),
842
842
  k && /* @__PURE__ */ Z(Pe, {
843
- id: ae,
843
+ id: oe,
844
844
  className: V(h, vr.errorText),
845
845
  text: f?.apiKeyRequiredErrorMessage ?? "API key is required."
846
846
  })
@@ -854,7 +854,7 @@ var rn = /* @__PURE__ */ function(e) {
854
854
  "aria-hidden": !0,
855
855
  stroke: Y
856
856
  }),
857
- title: R,
857
+ title: ae,
858
858
  description: se,
859
859
  titleClassName: g,
860
860
  descriptionClassName: _,
@@ -963,7 +963,7 @@ var rn = /* @__PURE__ */ function(e) {
963
963
  content: "_content_1nv0c_20",
964
964
  tabsScroll: "_tabsScroll_1nv0c_26",
965
965
  publishTitle: "_publishTitle_1nv0c_33"
966
- }, Cr = ({ item: e, publishFlow: t, publishDependencies: n, publishFolderView: r, isPublishCredentialsEligible: i, publishExpandedPaths: a, onPublishExpandedPathsChange: o, publishLoadingPaths: s, ruleSourceOptions: c, publishLabels: l }) => /* @__PURE__ */ Z("div", {
966
+ }, Cr = ({ item: e, publishFlow: t, publishDependencies: n, publishFolderView: r, isPublishCredentialsEligible: i, publishExpandedPaths: a, onPublishExpandedPathsChange: o, publishLoadingPaths: s, ruleSourceOptions: c, publishLabels: l, resolvePublishDependenciesLabels: u, resolvePublishApprovalLabels: d }) => /* @__PURE__ */ Z("div", {
967
967
  className: "p-4 desktop:p-[22px]",
968
968
  children: /* @__PURE__ */ Z(Jt, {
969
969
  resource: {
@@ -996,7 +996,14 @@ var rn = /* @__PURE__ */ function(e) {
996
996
  ruleSourceOptions: c,
997
997
  isRulesLoading: t.isRulesLoading,
998
998
  hasRulesLoadError: t.hasRulesLoadError,
999
- labels: l,
999
+ labels: {
1000
+ ...l,
1001
+ ...d?.(e),
1002
+ ...u && { dependenciesLabels: {
1003
+ ...l?.dependenciesLabels,
1004
+ ...u(e)
1005
+ } }
1006
+ },
1000
1007
  dependencies: n
1001
1008
  })
1002
1009
  }), wr = {
@@ -1066,7 +1073,7 @@ var rn = /* @__PURE__ */ function(e) {
1066
1073
  [rn.JavaScript]: "javascript"
1067
1074
  }, Ar = ({ snippets: e, sectionLabel: t, copyAriaLabel: n = "Copy", copiedStatusLabel: r = "Copied!", codeClassName: i = "dial-code-text", codeTitleClassName: a = "dial-tiny-semi-text", sectionClassName: o = "dial-caption-text" }) => {
1068
1075
  let [s, c] = q(e[0]?.language ?? rn.Python);
1069
- W(() => {
1076
+ U(() => {
1070
1077
  c(e[0]?.language ?? rn.Python);
1071
1078
  }, [e]);
1072
1079
  let l = G(() => e.map((e) => ({
@@ -1077,7 +1084,7 @@ var rn = /* @__PURE__ */ function(e) {
1077
1084
  return /* @__PURE__ */ Q("section", { children: [t != null && /* @__PURE__ */ Z("p", {
1078
1085
  className: V("mt-0 mb-3", o, Dr.sectionHeading),
1079
1086
  children: t
1080
- }), /* @__PURE__ */ Z(R, {
1087
+ }), /* @__PURE__ */ Z(ae, {
1081
1088
  language: kr[s] ?? s,
1082
1089
  title: Or[s] ?? s,
1083
1090
  value: u,
@@ -1116,7 +1123,7 @@ var rn = /* @__PURE__ */ function(e) {
1116
1123
  valueClassName: d,
1117
1124
  sectionClassName: m
1118
1125
  }),
1119
- w != null && /* @__PURE__ */ Z(R, {
1126
+ w != null && /* @__PURE__ */ Z(ae, {
1120
1127
  language: a,
1121
1128
  value: w,
1122
1129
  copyLabel: c,
@@ -1131,7 +1138,7 @@ var rn = /* @__PURE__ */ function(e) {
1131
1138
  className: V("mt-0 mb-3", m, Dr.sectionHeading),
1132
1139
  children: n
1133
1140
  }),
1134
- y != null && /* @__PURE__ */ Z(R, {
1141
+ y != null && /* @__PURE__ */ Z(ae, {
1135
1142
  language: y.label,
1136
1143
  value: y.url,
1137
1144
  copyLabel: c,
@@ -1172,7 +1179,7 @@ var rn = /* @__PURE__ */ function(e) {
1172
1179
  E && /* @__PURE__ */ Q("section", { children: [/* @__PURE__ */ Z("p", {
1173
1180
  className: V("mt-0 mb-3", m, Dr.sectionHeading),
1174
1181
  children: o
1175
- }), /* @__PURE__ */ Z(R, {
1182
+ }), /* @__PURE__ */ Z(ae, {
1176
1183
  language: "bash",
1177
1184
  value: e.requestExample ?? "",
1178
1185
  copyLabel: c,
@@ -1184,7 +1191,7 @@ var rn = /* @__PURE__ */ function(e) {
1184
1191
  D && /* @__PURE__ */ Q("section", { children: [/* @__PURE__ */ Z("p", {
1185
1192
  className: V("mt-0 mb-3", m, Dr.sectionHeading),
1186
1193
  children: s
1187
- }), /* @__PURE__ */ Z(R, {
1194
+ }), /* @__PURE__ */ Z(ae, {
1188
1195
  language: "json",
1189
1196
  value: e.responseSchema ?? "",
1190
1197
  copyLabel: c,
@@ -1199,7 +1206,7 @@ var rn = /* @__PURE__ */ function(e) {
1199
1206
  let i = n?.typography?.contentHeadingClassName ?? "dial-small-semi-text", a = n?.typography?.contentClassName ?? "dial-small-text";
1200
1207
  return /* @__PURE__ */ Q("div", {
1201
1208
  className: "flex flex-col gap-5",
1202
- children: [/* @__PURE__ */ Z(z, {
1209
+ children: [/* @__PURE__ */ Z(R, {
1203
1210
  content: t,
1204
1211
  classNames: {
1205
1212
  h1: i,
@@ -1251,7 +1258,7 @@ var rn = /* @__PURE__ */ function(e) {
1251
1258
  "--cat-content-tree-row-hover-bg": c?.rowHoverBackground,
1252
1259
  "--cat-content-tree-row-selected-bg": c?.rowSelectedBackground
1253
1260
  }), u = G(() => Rr(e, n), [e, n]), d = K({}), [f, p] = q(() => t ?? u[0]?.node.id);
1254
- W(() => {
1261
+ U(() => {
1255
1262
  f != null && d.current[f]?.focus();
1256
1263
  }, []);
1257
1264
  let m = (e) => {
@@ -1348,7 +1355,7 @@ var rn = /* @__PURE__ */ function(e) {
1348
1355
  children: e.map((e) => _(e))
1349
1356
  });
1350
1357
  }, Br = () => void 0, Vr = ({ content: e, description: t, files: n, selectedFileId: r, onSelectFile: i, isFileLoading: a = !1, expandedFolderIds: o = /* @__PURE__ */ new Set(), onToggleFolder: s = Br, isFileSelectorOpen: c = !1, onFileSelectorOpenChange: l = Br, fileSelectorAriaLabel: u = "Select file", fileCountLabel: d = (e) => `${e} files`, fileLoadingLabel: f = "Loading file", fileUnsupportedLabel: p = "Preview is not supported for this file", filePreview: m, filePreviewContent: h, renderFileTree: g, detailsStyles: _, markdownLabels: v }) => {
1351
- let y = _?.typography?.contentClassName ?? "dial-small-text", b = _?.typography?.contentHeadingClassName ?? "dial-small-semi-text", x = _?.typography?.contentFileCountClassName ?? "dial-tiny-text", S = me(), C = t != null && t !== "", w = n ?? [], T = Nr(w) > 1, E = Fr(w, r) ?? "", D = {
1358
+ let y = _?.typography?.contentClassName ?? "dial-small-text", b = _?.typography?.contentHeadingClassName ?? "dial-small-semi-text", x = _?.typography?.contentFileCountClassName ?? "dial-tiny-text", S = he(), C = t != null && t !== "", w = n ?? [], T = Nr(w) > 1, E = Fr(w, r) ?? "", D = {
1352
1359
  nodes: w,
1353
1360
  selectedFileId: r,
1354
1361
  expandedFolderIds: o,
@@ -1414,12 +1421,12 @@ var rn = /* @__PURE__ */ function(e) {
1414
1421
  }), (() => {
1415
1422
  if (h != null) return h;
1416
1423
  switch (O.type) {
1417
- case fn.Markdown: return /* @__PURE__ */ Z(ae, {
1424
+ case fn.Markdown: return /* @__PURE__ */ Z(oe, {
1418
1425
  content: O.text,
1419
1426
  headingClassName: b,
1420
1427
  ...v
1421
1428
  });
1422
- case fn.Text: return /* @__PURE__ */ Z(R, {
1429
+ case fn.Text: return /* @__PURE__ */ Z(ae, {
1423
1430
  language: O.language ?? "",
1424
1431
  value: O.text,
1425
1432
  copyLabel: v?.codeBlockCopyLabel,
@@ -1679,7 +1686,7 @@ var rn = /* @__PURE__ */ function(e) {
1679
1686
  children: c.toolCount(f.length)
1680
1687
  })]
1681
1688
  }),
1682
- f.length === 0 && l.trim() !== "" && /* @__PURE__ */ Z(oe, { label: c.noResults }),
1689
+ f.length === 0 && l.trim() !== "" && /* @__PURE__ */ Z(z, { label: c.noResults }),
1683
1690
  f.map((e, a) => /* @__PURE__ */ Q("div", {
1684
1691
  className: V("flex flex-col gap-3 px-[22px] py-4", a > 0 ? ai.divider : void 0),
1685
1692
  children: [
@@ -1740,7 +1747,7 @@ var rn = /* @__PURE__ */ function(e) {
1740
1747
  return c?.toolsSearchPlaceholder != null && (e.searchPlaceholder = c.toolsSearchPlaceholder), c?.toolsSearchClearLabel != null && (e.searchClearLabel = c.toolsSearchClearLabel), c?.toolsCountLabel != null && (e.toolCount = c.toolsCountLabel), c?.toolsNoResultsLabel != null && (e.noResults = c.toolsNoResultsLabel), e;
1741
1748
  }, [c]), D = c?.emptyTabLabel ?? "No data", O = !e.description?.trim() && (e.topics?.length ?? 0) === 0, A = !e.details?.overview?.sections?.length, j = /* @__PURE__ */ Z("div", {
1742
1749
  className: "flex size-full items-center justify-center py-6",
1743
- children: /* @__PURE__ */ Z(oe, { label: D })
1750
+ children: /* @__PURE__ */ Z(z, { label: D })
1744
1751
  }), M = c?.overviewYesLabel ?? "Yes", N = c?.overviewNoLabel ?? "No";
1745
1752
  return /* @__PURE__ */ Q(X, { children: [/* @__PURE__ */ Q("div", {
1746
1753
  className: "flex items-center px-6",
@@ -1843,7 +1850,7 @@ var rn = /* @__PURE__ */ function(e) {
1843
1850
  }, di = /* @__PURE__ */ function(e) {
1844
1851
  return e.Idle = "idle", e.Loading = "loading", e.Resolved = "resolved", e.Unknown = "unknown", e;
1845
1852
  }({}), fi = (e) => e === s.ApiKey ? "Manage API keys" : "Manage credentials", pi = ({ item: e, texts: t, isReadonly: n = !1, isPrimaryActionVisible: r, onOpenUnpublish: i, hasPublishedFolders: o = !1, isUnpublishVisible: c, isPublishHistoryResolved: l = !0, isPublishVisible: u, onEdit: d, isShareVisible: f, isSharePrimary: p, isPublishPrimary: m, onLogin: h, onLogout: g, onDownload: _, isDownloadVisible: y, isDownloadPrimary: b, onUnshare: x, isUnshareVisible: S, onRevokeShare: C, onFetchRecipientsCount: w, isRevokeShareVisible: T, recipientsCountStatus: E, recipientsCount: D }) => {
1846
- let O = t?.hasPrimaryAction !== !1 && (r?.(e) ?? (e.type === P.Model || e.type === P.Agent || e.type === P.Prompt)), k = !n && !!i && o && (c?.(e) ?? !0), A = !n && !!i && !l && c?.(e) === !0, j = !n && !k && (u?.(e) ?? (e.type === P.Model || e.type === P.Toolset || e.type === P.Agent)), M = !n && !!d && !!e.isEditable, N = !n && e.isMyApp === !0 && (f?.(e) ?? !0), F = p?.(e) ?? !0, I = m?.(e) ?? !1, ee = e.credentials?.authenticationType ?? s.None, L = e.credentials != null && ee !== s.None ? v(e.credentials) : void 0, te = !n && L != null && (!!h || !!g), ne = e.type === P.Toolset && te, re = !!_ && (y?.(e) ?? !0), ie = re && !ne && (b?.(e) ?? (e.type === P.Skill && !O)), R = re && !ie, z = !n && e.isMyApp, ae = !n && !!x && e.isMyApp !== !0 && e.sharedWithMe === !0 && (S?.(e) ?? !0), oe = !n && !!C && e.isMyApp === !0 && (!w || E === di.Unknown || E === di.Resolved && (D ?? 0) > 0) && (T?.(e) ?? !0), se = c?.(e);
1853
+ let O = t?.hasPrimaryAction !== !1 && (r?.(e) ?? (e.type === P.Model || e.type === P.Agent || e.type === P.Prompt)), k = !n && !!i && o && (c?.(e) ?? !0), A = !n && !!i && !l && c?.(e) === !0, j = !n && !k && (u?.(e) ?? (e.type === P.Model || e.type === P.Toolset || e.type === P.Agent)), M = !n && !!d && !!e.isEditable, N = !n && e.isMyApp === !0 && (f?.(e) ?? !0), F = p?.(e) ?? !0, I = m?.(e) ?? !1, ee = e.credentials?.authenticationType ?? s.None, L = e.credentials != null && ee !== s.None ? v(e.credentials) : void 0, te = !n && L != null && (!!h || !!g), ne = e.type === P.Toolset && te, re = !!_ && (y?.(e) ?? !0), ie = re && !ne && (b?.(e) ?? (e.type === P.Skill && !O)), ae = re && !ie, R = !n && e.isMyApp, oe = !n && !!x && e.isMyApp !== !0 && e.sharedWithMe === !0 && (S?.(e) ?? !0), z = !n && !!C && e.isMyApp === !0 && (!w || E === di.Unknown || E === di.Resolved && (D ?? 0) > 0) && (T?.(e) ?? !0), se = c?.(e);
1847
1854
  return {
1848
1855
  shouldShowPrimaryAction: O,
1849
1856
  shouldShowUnpublish: k,
@@ -1858,10 +1865,10 @@ var rn = /* @__PURE__ */ function(e) {
1858
1865
  shouldShowCredentialsAction: te,
1859
1866
  isCredentialsActionPrimary: ne,
1860
1867
  isDownloadActionPrimary: ie,
1861
- shouldShowDownloadAction: R,
1862
- shouldShowDeleteAction: z,
1863
- shouldShowUnshareAction: ae,
1864
- shouldShowRevokeShareAction: oe,
1868
+ shouldShowDownloadAction: ae,
1869
+ shouldShowDeleteAction: R,
1870
+ shouldShowUnshareAction: oe,
1871
+ shouldShowRevokeShareAction: z,
1865
1872
  mayGainUnpublishEntry: !n && !!i && (se == null || se && !l),
1866
1873
  mayGainRevokeShareEntry: !n && !!C && !!w && e.isMyApp === !0 && (T?.(e) ?? !0),
1867
1874
  isApiKeyConfigured: ee === s.ApiKey && L === a.LogOut,
@@ -1877,9 +1884,9 @@ var rn = /* @__PURE__ */ function(e) {
1877
1884
  hint: "_hint_1lu6m_5",
1878
1885
  deleteAction: "_deleteAction_1lu6m_10"
1879
1886
  }, gi = 16, _i = ({ item: e, level: t, status: n, apiKeyAddedWhen: r, apiKeyHeader: i, onLogin: a, onLogout: o, onClose: s, texts: c, colors: l, typography: u, deleteActionClassName: d }) => {
1880
- let { credentialsOverlayTitleClassName: f = "dial-small-semi-text", credentialsHintClassName: p = "dial-caption-text", credentialsErrorClassName: m = "dial-caption-text" } = u ?? {}, [h, g] = q(""), [_, v] = q(!1), [y, x] = q(!1), [S, C] = q(!1), w = n === b.SignedIn, T = U((e) => {
1887
+ let { credentialsOverlayTitleClassName: f = "dial-small-semi-text", credentialsHintClassName: p = "dial-caption-text", credentialsErrorClassName: m = "dial-caption-text" } = u ?? {}, [h, g] = q(""), [_, v] = q(!1), [y, x] = q(!1), [S, C] = q(!1), w = n === b.SignedIn, T = H((e) => {
1881
1888
  g(e ?? ""), v(!1);
1882
- }, []), E = U(async () => {
1889
+ }, []), E = H(async () => {
1883
1890
  if (h.trim().length === 0) v(!0);
1884
1891
  else {
1885
1892
  x(!0);
@@ -1898,7 +1905,7 @@ var rn = /* @__PURE__ */ function(e) {
1898
1905
  h,
1899
1906
  a,
1900
1907
  s
1901
- ]), D = U(async () => {
1908
+ ]), D = H(async () => {
1902
1909
  C(!0);
1903
1910
  try {
1904
1911
  await o?.(e, { level: t }), s();
@@ -1996,7 +2003,7 @@ var rn = /* @__PURE__ */ function(e) {
1996
2003
  ]
1997
2004
  });
1998
2005
  }, vi = ({ item: e, buttonComponent: t, authenticationType: n, credentialsUiState: r, onLogin: o, onLogout: c, onOpenCredentialsManagement: l, onRequestLogout: u, texts: f, detailsStyles: p }) => {
1999
- let [m, h] = q(!1), g = n === s.ApiKey && r !== a.ManageCredentials, _ = e.credentials == null ? i.User : d(e.credentials), v = U(() => {
2006
+ let [m, h] = q(!1), g = n === s.ApiKey && r !== a.ManageCredentials, _ = e.credentials == null ? i.User : d(e.credentials), v = H(() => {
2000
2007
  r === a.ManageCredentials ? l?.() : g ? h((e) => !e) : r === a.LogOut ? u?.() : e.credentials != null && o?.(e, { level: d(e.credentials) });
2001
2008
  }, [
2002
2009
  r,
@@ -2053,7 +2060,7 @@ var rn = /* @__PURE__ */ function(e) {
2053
2060
  children: S
2054
2061
  });
2055
2062
  }, yi = (e) => e.isMyApp === !0, bi = ({ item: e, onShare: t, shareOverlay: n, isShareVisible: r, label: i = "Share" }) => {
2056
- let [a, o] = q(!1), s = U(() => {
2063
+ let [a, o] = q(!1), s = H(() => {
2057
2064
  n ? o((e) => !e) : t?.(e);
2058
2065
  }, [
2059
2066
  e,
@@ -2224,12 +2231,12 @@ var rn = /* @__PURE__ */ function(e) {
2224
2231
  };
2225
2232
  }, Ci = ({ item: e, onFetchRecipientsCount: t, onRevokeShare: n, isRevokeShareVisible: r }) => {
2226
2233
  let [i, a] = q(di.Idle), [o, s] = q(void 0), c = K(null);
2227
- return W(() => {
2234
+ return U(() => {
2228
2235
  c.current = null, a(di.Idle), s(void 0);
2229
2236
  }, [e.id]), {
2230
2237
  recipientsCountStatus: i,
2231
2238
  recipientsCount: o,
2232
- requestRecipientsCount: U(() => {
2239
+ requestRecipientsCount: H(() => {
2233
2240
  if (!t || c.current === e.id || !n || e.isMyApp !== !0 || r?.(e) === !1) return;
2234
2241
  let i = e.id;
2235
2242
  c.current = i, a(di.Loading), (async () => {
@@ -2260,64 +2267,64 @@ var rn = /* @__PURE__ */ function(e) {
2260
2267
  status: I,
2261
2268
  className: F,
2262
2269
  label: I === an.LimitReached ? x?.limitReachedLabel ?? "Limit reached" : x?.limitRunningLowLabel ?? "Running low"
2263
- }), L = U(() => {
2270
+ }), L = H(() => {
2264
2271
  t?.(e);
2265
- }, [e, t]), ne = U(() => {
2272
+ }, [e, t]), ne = H(() => {
2266
2273
  s?.(e);
2267
- }, [e, s]), re = U(() => {
2274
+ }, [e, s]), re = H(() => {
2268
2275
  T?.();
2269
- }, [T]), ie = U(() => {
2276
+ }, [T]), ie = H(() => {
2270
2277
  A?.();
2271
- }, [A]), R = U(() => {
2278
+ }, [A]), ae = H(() => {
2272
2279
  c?.(e);
2273
- }, [e, c]), [z, ae] = q(!1);
2274
- W(() => {
2275
- ae(!1);
2280
+ }, [e, c]), [R, oe] = q(!1);
2281
+ U(() => {
2282
+ oe(!1);
2276
2283
  }, [e.id]);
2277
- let oe = U(() => {
2278
- z || (ae(!0), (async () => {
2284
+ let z = H(() => {
2285
+ R || (oe(!0), (async () => {
2279
2286
  try {
2280
2287
  await c?.(e);
2281
2288
  } catch {} finally {
2282
- ae(!1);
2289
+ oe(!1);
2283
2290
  }
2284
2291
  })());
2285
2292
  }, [
2286
2293
  e,
2287
2294
  c,
2288
- z
2295
+ R
2289
2296
  ]), [se, ce] = q(!1);
2290
- W(() => {
2297
+ U(() => {
2291
2298
  ce(!1);
2292
2299
  }, [e.id]);
2293
- let B = U(() => {
2300
+ let B = H(() => {
2294
2301
  i ? ce(!0) : r?.(e);
2295
2302
  }, [
2296
2303
  e,
2297
2304
  r,
2298
2305
  i
2299
- ]), le = U(() => {
2306
+ ]), le = H(() => {
2300
2307
  ce(!1);
2301
- }, []), ue = U(() => {
2308
+ }, []), ue = H(() => {
2302
2309
  f?.(e);
2303
- }, [e, f]), de = U(() => {
2310
+ }, [e, f]), de = H(() => {
2304
2311
  d?.(e);
2305
- }, [e, d]), fe = U(() => {
2312
+ }, [e, d]), fe = H(() => {
2306
2313
  m?.(e);
2307
- }, [e, m]), { recipientsCountStatus: pe, recipientsCount: H, requestRecipientsCount: me } = Ci({
2314
+ }, [e, m]), { recipientsCountStatus: pe, recipientsCount: me, requestRecipientsCount: he } = Ci({
2308
2315
  item: e,
2309
2316
  onFetchRecipientsCount: h,
2310
2317
  onRevokeShare: m,
2311
2318
  isRevokeShareVisible: g
2312
- }), [he, ge] = q(!1);
2313
- W(() => {
2319
+ }), [W, ge] = q(!1);
2320
+ U(() => {
2314
2321
  ge(!1);
2315
2322
  }, [e.id]);
2316
- let G = U((e) => {
2317
- ge(e), e && (me(), k?.());
2318
- }, [me, k]), K = U(() => {
2319
- me(), k?.();
2320
- }, [me, k]), _e = U(() => {
2323
+ let G = H((e) => {
2324
+ ge(e), e && (he(), k?.());
2325
+ }, [he, k]), K = H(() => {
2326
+ he(), k?.();
2327
+ }, [he, k]), _e = H(() => {
2321
2328
  k?.();
2322
2329
  }, [k]), ve = pi({
2323
2330
  item: e,
@@ -2344,16 +2351,16 @@ var rn = /* @__PURE__ */ function(e) {
2344
2351
  onFetchRecipientsCount: h,
2345
2352
  isRevokeShareVisible: g,
2346
2353
  recipientsCountStatus: pe,
2347
- recipientsCount: H
2354
+ recipientsCount: me
2348
2355
  }), { shouldShowPrimaryAction: ye, shouldShowUnpublish: be, isUnpublishPending: xe, shouldShowPublish: Se, shouldShowShareAction: Ce, isShareInActionRow: we, isPublishInActionRow: Te, authenticationType: Ee, credentialsUiState: De, shouldShowCredentialsAction: Oe, isCredentialsActionPrimary: ke, isDownloadActionPrimary: Ae, isApiKeyConfigured: je, isOAuthLogoutState: Me } = ve, { manageItems: Ne, promotedManageAction: Pe } = Si({
2349
2356
  visibility: ve,
2350
2357
  texts: x,
2351
2358
  detailsStyles: S,
2352
- recipientsCount: H,
2353
- isManageMenuOpen: he,
2359
+ recipientsCount: me,
2360
+ isManageMenuOpen: W,
2354
2361
  handleShare: B,
2355
2362
  handleEdit: ne,
2356
- handleDownload: R,
2363
+ handleDownload: ae,
2357
2364
  handleOpenPublish: re,
2358
2365
  handleOpenUnpublish: ie,
2359
2366
  handleDelete: de,
@@ -2400,7 +2407,7 @@ var rn = /* @__PURE__ */ function(e) {
2400
2407
  }),
2401
2408
  Ae && /* @__PURE__ */ Q(X, { children: [/* @__PURE__ */ Z(nt, {
2402
2409
  label: x?.downloadActionLabel ?? "Download",
2403
- iconBefore: z ? /* @__PURE__ */ Z(ut, {
2410
+ iconBefore: R ? /* @__PURE__ */ Z(ut, {
2404
2411
  size: J.MD,
2405
2412
  "aria-hidden": !0
2406
2413
  }) : /* @__PURE__ */ Z(Dt, {
@@ -2408,13 +2415,13 @@ var rn = /* @__PURE__ */ function(e) {
2408
2415
  "aria-hidden": !0,
2409
2416
  stroke: Y
2410
2417
  }),
2411
- onClick: oe,
2412
- disabled: z,
2413
- "aria-busy": z
2418
+ onClick: z,
2419
+ disabled: R,
2420
+ "aria-busy": R
2414
2421
  }), /* @__PURE__ */ Z(Ke, {
2415
2422
  visuallyHidden: !0,
2416
2423
  as: qe.Span,
2417
- children: z ? x?.downloadingStatusLabel ?? "Downloading" : ""
2424
+ children: R ? x?.downloadingStatusLabel ?? "Downloading" : ""
2418
2425
  })] }),
2419
2426
  we && Ce && /* @__PURE__ */ Z(bi, {
2420
2427
  item: e,
@@ -2470,24 +2477,24 @@ var rn = /* @__PURE__ */ function(e) {
2470
2477
  });
2471
2478
  }, Di = ({ item: e, isOpen: t, onClose: n, onDelete: r, onUnshare: a, onRevokeShare: o, onLogout: s, onUnpublish: c, texts: l, publishedFolders: u, formatFolderLabel: d }) => {
2472
2479
  let [f, p] = q(null), [m, h] = q(!1), [g, _] = q(null), [v, y] = q(null), [b, x] = q(null);
2473
- W(() => {
2480
+ U(() => {
2474
2481
  x(null), p(null), h(!1), _(null), y(null);
2475
2482
  }, [e.id]);
2476
- let S = U(() => {
2483
+ let S = H(() => {
2477
2484
  p($.Delete);
2478
- }, []), C = U((t) => {
2485
+ }, []), C = H((t) => {
2479
2486
  y(t ?? (e.credentials == null ? null : w(e.credentials))), p($.Logout);
2480
- }, [e.credentials]), T = U(() => {
2487
+ }, [e.credentials]), T = H(() => {
2481
2488
  p($.Unshare);
2482
- }, []), E = U(() => {
2489
+ }, []), E = H(() => {
2483
2490
  p($.RevokeAccess);
2484
- }, []), D = U(() => {
2491
+ }, []), D = H(() => {
2485
2492
  p($.Unpublish);
2486
- }, []), O = U((e) => {
2493
+ }, []), O = H((e) => {
2487
2494
  _(e), p($.DeleteApiKey);
2488
- }, []), k = U(() => {
2495
+ }, []), k = H(() => {
2489
2496
  m || (p(null), _(null), y(null), x(null));
2490
- }, [m]), A = U(async () => {
2497
+ }, [m]), A = H(async () => {
2491
2498
  if (!(m || f == null)) {
2492
2499
  h(!0);
2493
2500
  try {
@@ -2535,7 +2542,7 @@ var rn = /* @__PURE__ */ function(e) {
2535
2542
  s,
2536
2543
  n
2537
2544
  ]);
2538
- return W(() => {
2545
+ return U(() => {
2539
2546
  if (!t || f == null) return;
2540
2547
  let e = (e) => {
2541
2548
  e.key === "Escape" && (e.stopPropagation(), k());
@@ -2662,22 +2669,22 @@ var rn = /* @__PURE__ */ function(e) {
2662
2669
  isConfirmDisabled: f === $.Unpublish && qn(u, b) == null
2663
2670
  };
2664
2671
  }, Oi = ({ item: e, onLoadContentFile: t, onLoadContentFilePreview: n, renderContentFilePreview: r, texts: i }) => {
2665
- let a = e.details?.promptContent, o = a?.selectedFileId, [s, c] = q(null), [l, u] = q(!1), [d, f] = q(/* @__PURE__ */ new Set()), [p, m] = q(!1), h = K(null), g = K(0), _ = U((e) => {
2672
+ let a = e.details?.promptContent, o = a?.selectedFileId, [s, c] = q(null), [l, u] = q(!1), [d, f] = q(/* @__PURE__ */ new Set()), [p, m] = q(!1), h = K(null), g = K(0), _ = H((e) => {
2666
2673
  let t = h.current, n = e?.preview?.type === fn.Image ? e.preview.url : null;
2667
2674
  t != null && t !== n && t.startsWith("blob:") && URL.revokeObjectURL(t), h.current = n, c(e);
2668
2675
  }, []);
2669
- W(() => {
2676
+ U(() => {
2670
2677
  g.current += 1, _(null), u(!1), f(Pr(a?.files ?? [])), m(!1);
2671
- }, [e.id, o]), W(() => () => {
2678
+ }, [e.id, o]), U(() => () => {
2672
2679
  let e = h.current;
2673
2680
  e != null && e.startsWith("blob:") && URL.revokeObjectURL(e);
2674
2681
  }, []);
2675
- let v = U((e) => {
2682
+ let v = H((e) => {
2676
2683
  f((t) => {
2677
2684
  let n = new Set(t);
2678
2685
  return n.has(e) ? n.delete(e) : n.add(e), n;
2679
2686
  });
2680
- }, []), y = U(async (e) => {
2687
+ }, []), y = H(async (e) => {
2681
2688
  if (e === o) {
2682
2689
  g.current += 1, _(null), u(!1);
2683
2690
  return;
@@ -2740,7 +2747,7 @@ var rn = /* @__PURE__ */ function(e) {
2740
2747
  renderedContentFilePreview: s != null && r != null ? r(s.id, Fr(a?.files ?? [], s.id) ?? "") : void 0
2741
2748
  };
2742
2749
  }, ki = ({ item: e, isReadonly: t = !1, getPublishHistory: n, getPublishDependencies: r, publishFolderItems: i = Yn, hasPublishWriteAccess: a, publishDefaultAuthor: o, onPublish: s, onPublishSuccess: c, onPublishError: l, onCreatePublishFolder: u, onFetchExistingRules: d, onUnpublish: f, isUnpublishVisible: p, publishLabels: m }) => {
2743
- let [h, g] = q(!1), [_, v] = q([]), [y, b] = q(!1), x = K(null), S = U(() => {
2750
+ let [h, g] = q(!1), [_, v] = q([]), [y, b] = q(!1), x = K(null), S = H(() => {
2744
2751
  if (!n || x.current === e.id) return;
2745
2752
  let t = e.id;
2746
2753
  x.current = t, (async () => {
@@ -2754,15 +2761,15 @@ var rn = /* @__PURE__ */ function(e) {
2754
2761
  }
2755
2762
  })();
2756
2763
  }, [n, e]);
2757
- W(() => {
2764
+ U(() => {
2758
2765
  h && S();
2759
2766
  }, [h, S]);
2760
2767
  let [C, w] = q(), T = K(r), E = K(e);
2761
- W(() => {
2768
+ U(() => {
2762
2769
  T.current = r, E.current = e;
2763
2770
  }, [r, e]);
2764
2771
  let D = r != null, k = e.id;
2765
- W(() => {
2772
+ U(() => {
2766
2773
  if (!h || !D) return;
2767
2774
  let e = !1;
2768
2775
  return (async () => {
@@ -2784,7 +2791,7 @@ var rn = /* @__PURE__ */ function(e) {
2784
2791
  ]);
2785
2792
  let A;
2786
2793
  D && (A = C?.itemId === k ? C.dependencies : Xn);
2787
- let j = U((e, t) => {
2794
+ let j = H((e, t) => {
2788
2795
  x.current = null, b(!1), S(), c?.(e, t);
2789
2796
  }, [S, c]), M = Zt({
2790
2797
  item: e,
@@ -2811,11 +2818,11 @@ var rn = /* @__PURE__ */ function(e) {
2811
2818
  M.isSubmitting,
2812
2819
  M.hasSubmitError
2813
2820
  ]);
2814
- W(() => {
2821
+ U(() => {
2815
2822
  g(!1), M.reset(), v([]), b(!1), x.current = null;
2816
2823
  }, [e.id]);
2817
2824
  let I = !t && !!f && p?.(e) === !0;
2818
- W(() => {
2825
+ U(() => {
2819
2826
  I && S();
2820
2827
  }, [I, S]);
2821
2828
  let ee = G(() => {
@@ -2828,13 +2835,13 @@ var rn = /* @__PURE__ */ function(e) {
2828
2835
  }));
2829
2836
  }
2830
2837
  return t;
2831
- }, [_]), L = y && ee.length > 0, te = U((e) => e || (m?.rootFolderLabel ?? "Organization"), [m]), ne = U(() => g(!0), []), re = U(() => {
2838
+ }, [_]), L = y && ee.length > 0, te = H((e) => e || (m?.rootFolderLabel ?? "Organization"), [m]), ne = H(() => g(!0), []), re = H(() => {
2832
2839
  g(!1), M.reset();
2833
2840
  }, [M]), ie = Qt({
2834
2841
  isOpen: h,
2835
2842
  selectedFolderPath: M.selectedFolderPath,
2836
2843
  onSelectedFolderPathChange: M.setSelectedFolderPath
2837
- }), R = ie.view === Yt.ChangeFolder, z = U(async () => {
2844
+ }), ae = ie.view === Yt.ChangeFolder, R = H(async () => {
2838
2845
  await M.handleSubmit() && re();
2839
2846
  }, [M, re]);
2840
2847
  return {
@@ -2851,196 +2858,198 @@ var rn = /* @__PURE__ */ function(e) {
2851
2858
  handleOpenPublish: ne,
2852
2859
  handleClosePublish: re,
2853
2860
  publishFolderView: ie,
2854
- isPublishFolderView: R,
2855
- handleSubmitPublish: z
2861
+ isPublishFolderView: ae,
2862
+ handleSubmitPublish: R
2856
2863
  };
2857
- }, Ai = ({ item: e, isOpen: t, isStarred: r = !1, isDetailsLoading: i = !1, isReadonly: a = !1, onClose: o, onToggleFavorite: s, isFavoriteVisible: c, onUseInChat: l, isPrimaryActionVisible: u, onShare: d, isPublishVisible: f, isPublishPrimary: p, getPublishHistory: m, getPublishDependencies: h, publishFolderItems: g = Yn, publishExpandedPaths: _, onPublishExpandedPathsChange: v, publishLoadingPaths: y, hasPublishWriteAccess: b, publishDefaultAuthor: S, onPublish: C, onPublishSuccess: w, onPublishError: T, onCreatePublishFolder: D, publishLabels: O, ruleSourceOptions: k = Zn, onFetchExistingRules: A, shareOverlay: j, isShareVisible: M, isSharePrimary: N, onEdit: P, onDownload: ee, isDownloadVisible: L, isDownloadPrimary: te, onLoadContentFile: ne, onLoadContentFilePreview: re, renderContentFilePreview: ie, renderContentFileTree: R, renderCredentials: z, onDelete: ae, onUnshare: oe, isUnshareVisible: se, onRevokeShare: ce, onFetchRecipientsCount: B, isRevokeShareVisible: le, onUnpublish: ue, isUnpublishVisible: de, onLogin: fe, onLogout: pe, texts: H, styles: me, limitsFooterNote: he }) => {
2858
- let { subViewTitleClassName: ge = "dial-body-semi-text", confirmMessageClassName: _e = "dial-small-text" } = me?.typography ?? {}, ve = me?.colors, ye = ar(ve), [be, xe] = q(r), [Se, Ce] = q(""), we = Oi({
2864
+ }, Ai = ({ item: e, isOpen: t, isStarred: r = !1, isDetailsLoading: i = !1, isReadonly: a = !1, onClose: o, onToggleFavorite: s, isFavoriteVisible: c, onUseInChat: l, isPrimaryActionVisible: u, onShare: d, isPublishVisible: f, isPublishPrimary: p, getPublishHistory: m, getPublishDependencies: h, resolvePublishDependenciesLabels: g, resolvePublishApprovalLabels: _, publishFolderItems: v = Yn, publishExpandedPaths: y, onPublishExpandedPathsChange: b, publishLoadingPaths: S, hasPublishWriteAccess: C, publishDefaultAuthor: w, onPublish: T, onPublishSuccess: D, onPublishError: O, onCreatePublishFolder: k, publishLabels: A, ruleSourceOptions: j = Zn, onFetchExistingRules: M, shareOverlay: N, isShareVisible: P, isSharePrimary: ee, onEdit: L, onDownload: te, isDownloadVisible: ne, isDownloadPrimary: re, onLoadContentFile: ie, onLoadContentFilePreview: ae, renderContentFilePreview: R, renderContentFileTree: oe, renderCredentials: z, onDelete: se, onUnshare: ce, isUnshareVisible: B, onRevokeShare: le, onFetchRecipientsCount: ue, isRevokeShareVisible: de, onUnpublish: fe, isUnpublishVisible: pe, onLogin: me, onLogout: he, texts: W, styles: ge, limitsFooterNote: _e }) => {
2865
+ let { subViewTitleClassName: ve = "dial-body-semi-text", confirmMessageClassName: ye = "dial-small-text" } = ge?.typography ?? {}, be = ge?.colors, xe = ar(be), [Se, Ce] = q(r), [we, Te] = q(""), Ee = Oi({
2859
2866
  item: e,
2860
- onLoadContentFile: ne,
2861
- onLoadContentFilePreview: re,
2862
- renderContentFilePreview: ie,
2863
- texts: H
2864
- }), { isPublishOpen: Te, isPublishHistoryResolved: Ee, requestPublishHistory: De, publishFlow: J, publishDependencies: Y, isPublishCredentialsEligible: Oe, publishDerived: ke, publishedFolders: Ae, hasPublishedFolders: je, formatFolderLabel: Me, handleOpenPublish: Ne, handleClosePublish: Pe, publishFolderView: Fe, isPublishFolderView: Ie, handleSubmitPublish: Le } = ki({
2867
+ onLoadContentFile: ie,
2868
+ onLoadContentFilePreview: ae,
2869
+ renderContentFilePreview: R,
2870
+ texts: W
2871
+ }), { isPublishOpen: De, isPublishHistoryResolved: J, requestPublishHistory: Y, publishFlow: Oe, publishDependencies: ke, isPublishCredentialsEligible: Ae, publishDerived: je, publishedFolders: Me, hasPublishedFolders: Ne, formatFolderLabel: Pe, handleOpenPublish: Fe, handleClosePublish: Ie, publishFolderView: Le, isPublishFolderView: Re, handleSubmitPublish: ze } = ki({
2865
2872
  item: e,
2866
2873
  isReadonly: a,
2867
2874
  getPublishHistory: m,
2868
2875
  getPublishDependencies: h,
2869
- publishFolderItems: g,
2870
- hasPublishWriteAccess: b,
2871
- publishDefaultAuthor: S,
2872
- onPublish: C,
2873
- onPublishSuccess: w,
2874
- onPublishError: T,
2875
- onCreatePublishFolder: D,
2876
- onFetchExistingRules: A,
2877
- onUnpublish: ue,
2878
- isUnpublishVisible: de,
2879
- publishLabels: O
2880
- }), { confirmation: Re, isConfirming: ze, selectedUnpublishFolder: Be, setSelectedUnpublishFolder: Ve, handleRequestDelete: He, handleRequestLogout: Ue, handleRequestUnshare: We, handleRequestRevokeShare: Ge, handleRequestUnpublish: Ke, handleRequestDeleteApiKey: qe, handleCancelConfirmation: Je, handleConfirm: Ye, confirmationContent: Xe, isConfirmDisabled: Ze } = Di({
2876
+ publishFolderItems: v,
2877
+ hasPublishWriteAccess: C,
2878
+ publishDefaultAuthor: w,
2879
+ onPublish: T,
2880
+ onPublishSuccess: D,
2881
+ onPublishError: O,
2882
+ onCreatePublishFolder: k,
2883
+ onFetchExistingRules: M,
2884
+ onUnpublish: fe,
2885
+ isUnpublishVisible: pe,
2886
+ publishLabels: A
2887
+ }), { confirmation: Be, isConfirming: Ve, selectedUnpublishFolder: He, setSelectedUnpublishFolder: Ue, handleRequestDelete: We, handleRequestLogout: Ge, handleRequestUnshare: Ke, handleRequestRevokeShare: qe, handleRequestUnpublish: Je, handleRequestDeleteApiKey: Ye, handleCancelConfirmation: Xe, handleConfirm: Ze, confirmationContent: Qe, isConfirmDisabled: $e } = Di({
2881
2888
  item: e,
2882
2889
  isOpen: t,
2883
2890
  onClose: o,
2884
- onDelete: ae,
2885
- onUnshare: oe,
2886
- onRevokeShare: ce,
2887
- onLogout: pe,
2888
- onUnpublish: ue,
2889
- texts: H,
2890
- publishedFolders: Ae,
2891
- formatFolderLabel: Me
2892
- }), [Qe, $e] = q(!1);
2893
- W(() => {
2894
- xe(r);
2895
- }, [e.id, r]), W(() => {
2896
- Ce(""), $e(!1);
2891
+ onDelete: se,
2892
+ onUnshare: ce,
2893
+ onRevokeShare: le,
2894
+ onLogout: he,
2895
+ onUnpublish: fe,
2896
+ texts: W,
2897
+ publishedFolders: Me,
2898
+ formatFolderLabel: Pe
2899
+ }), [et, tt] = q(!1);
2900
+ U(() => {
2901
+ Ce(r);
2902
+ }, [e.id, r]), U(() => {
2903
+ Te(""), tt(!1);
2897
2904
  }, [e.id]);
2898
- let et = U(() => $e(!0), []), tt = U(() => $e(!1), []), nt = U(() => {
2899
- let t = !be;
2900
- xe(t), s?.(e.id, t);
2905
+ let nt = H(() => tt(!0), []), rt = H(() => tt(!1), []), at = H(() => {
2906
+ let t = !Se;
2907
+ Ce(t), s?.(e.id, t);
2901
2908
  }, [
2902
- be,
2909
+ Se,
2903
2910
  e.id,
2904
2911
  s
2905
- ]), rt = G(() => {
2912
+ ]), ot = G(() => {
2906
2913
  let t = {
2907
- [n.About]: H?.tabAboutLabel ?? "About",
2908
- [n.Content]: H?.tabContentLabel ?? "Details",
2909
- [n.Overview]: H?.tabOverviewLabel ?? "Overview",
2910
- [n.Pricing]: H?.tabPricingLabel ?? "Pricing",
2911
- [n.Limits]: H?.tabLimitsLabel ?? "Limits",
2912
- [n.Api]: H?.tabConnectLabel ?? "Connect",
2913
- [n.Tools]: H?.tabToolsLabel ?? "Tools"
2914
+ [n.About]: W?.tabAboutLabel ?? "About",
2915
+ [n.Content]: W?.tabContentLabel ?? "Details",
2916
+ [n.Overview]: W?.tabOverviewLabel ?? "Overview",
2917
+ [n.Pricing]: W?.tabPricingLabel ?? "Pricing",
2918
+ [n.Limits]: W?.tabLimitsLabel ?? "Limits",
2919
+ [n.Api]: W?.tabConnectLabel ?? "Connect",
2920
+ [n.Tools]: W?.tabToolsLabel ?? "Tools"
2914
2921
  };
2915
2922
  return x(e).map((e) => ({
2916
2923
  id: e,
2917
2924
  label: t[e]
2918
2925
  }));
2919
- }, [e, H]), at = K(null);
2920
- W(() => {
2921
- let t = at.current !== e.id;
2922
- at.current = e.id, (t || !rt.some((e) => e.id === Se)) && Ce(rt[0]?.id ?? "");
2926
+ }, [e, W]), ct = K(null);
2927
+ U(() => {
2928
+ let t = ct.current !== e.id;
2929
+ ct.current = e.id, (t || !ot.some((e) => e.id === we)) && Te(ot[0]?.id ?? "");
2923
2930
  }, [
2924
2931
  e.id,
2925
- rt,
2926
- Se
2932
+ ot,
2933
+ we
2927
2934
  ]);
2928
- let ot = H?.ariaLabel ?? "Item details", ct = H?.closeAriaLabel ?? "Close", lt = be ? H?.removeFromFavoritesAriaLabel ?? "Remove from favorites" : H?.addToFavoritesAriaLabel ?? "Add to favorites", ut = H?.publishTitle ?? "Publish", dt = H?.backToDetailsAriaLabel ?? "Back", ft = H?.cancelLabel ?? "Cancel", pt = Xe != null, mt = pt || Te || Qe, ht = e.credentials == null ? "" : (H?.credentialsManagementTitle ?? nr)(e.credentials.authenticationType), gt = pt ? {
2929
- title: Xe.title,
2930
- isBackDisabled: ze,
2931
- onBack: Je
2932
- } : Te ? {
2933
- title: Ie ? H?.publishChangeFolderTitle ?? "Change folder" : ut,
2934
- isBackDisabled: J.isSubmitting,
2935
- onBack: Ie ? Fe.backToMain : Pe
2936
- } : Qe ? {
2937
- title: ht,
2935
+ let lt = W?.ariaLabel ?? "Item details", ut = W?.closeAriaLabel ?? "Close", dt = Se ? W?.removeFromFavoritesAriaLabel ?? "Remove from favorites" : W?.addToFavoritesAriaLabel ?? "Add to favorites", ft = W?.publishTitle ?? "Publish", pt = W?.backToDetailsAriaLabel ?? "Back", mt = W?.cancelLabel ?? "Cancel", ht = Qe != null, gt = ht || De || et, _t = e.credentials == null ? "" : (W?.credentialsManagementTitle ?? nr)(e.credentials.authenticationType), vt = ht ? {
2936
+ title: Qe.title,
2937
+ isBackDisabled: Ve,
2938
+ onBack: Xe
2939
+ } : De ? {
2940
+ title: Re ? W?.publishChangeFolderTitle ?? "Change folder" : ft,
2941
+ isBackDisabled: Oe.isSubmitting,
2942
+ onBack: Re ? Le.backToMain : Ie
2943
+ } : et ? {
2944
+ title: _t,
2938
2945
  isBackDisabled: !1,
2939
- onBack: tt
2940
- } : null, _t = gt?.title ?? ot;
2946
+ onBack: rt
2947
+ } : null, yt = vt?.title ?? lt;
2941
2948
  return /* @__PURE__ */ Q(st, {
2942
2949
  open: t,
2943
2950
  onClose: o,
2944
- header: gt?.title,
2945
- ariaLabel: _t,
2946
- onBack: gt?.onBack,
2947
- backAriaLabel: dt,
2948
- backDisabled: gt?.isBackDisabled,
2949
- hideClose: gt != null,
2950
- closeAriaLabel: ct,
2951
- headerActions: gt == null && !a && c?.(e) !== !1 ? /* @__PURE__ */ Z(Fn, {
2952
- isStarred: be,
2953
- ariaLabel: lt,
2954
- onClick: nt
2951
+ header: vt?.title,
2952
+ ariaLabel: yt,
2953
+ onBack: vt?.onBack,
2954
+ backAriaLabel: pt,
2955
+ backDisabled: vt?.isBackDisabled,
2956
+ hideClose: vt != null,
2957
+ closeAriaLabel: ut,
2958
+ headerActions: vt == null && !a && c?.(e) !== !1 ? /* @__PURE__ */ Z(Fn, {
2959
+ isStarred: Se,
2960
+ ariaLabel: dt,
2961
+ onClick: at
2955
2962
  }) : void 0,
2956
- style: ye,
2957
- overlayStyle: ye,
2963
+ style: xe,
2964
+ overlayStyle: xe,
2958
2965
  className: V(Sr.panel, "tablet:w-[540px]! tablet:max-w-[calc(100%-32px)]!"),
2959
2966
  overlayClassName: Sr.backdrop,
2960
2967
  headerClassName: Sr.divider,
2961
- titleClassName: V(ge, Sr.publishTitle),
2968
+ titleClassName: V(ve, Sr.publishTitle),
2962
2969
  bodyClassName: "flex flex-col overflow-hidden",
2963
2970
  children: [
2964
2971
  /* @__PURE__ */ Q("div", {
2965
2972
  className: V("flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto", Sr.content),
2966
2973
  children: [
2967
- pt && /* @__PURE__ */ Z(I, {
2974
+ ht && /* @__PURE__ */ Z(I, {
2968
2975
  item: e,
2969
- message: Xe.message,
2970
- consequences: Xe.consequences,
2971
- variant: Xe.cardVariant ?? Xe.variant,
2972
- messageClassName: _e,
2976
+ message: Qe.message,
2977
+ consequences: Qe.consequences,
2978
+ variant: Qe.cardVariant ?? Qe.variant,
2979
+ messageClassName: ye,
2973
2980
  styles: { colors: {
2974
- messageText: ve?.confirmMessageText,
2975
- consequenceText: ve?.confirmConsequenceText,
2976
- cardBackground: ve?.infoCardBackground,
2977
- cardDangerBackground: ve?.infoCardDangerBackground
2981
+ messageText: be?.confirmMessageText,
2982
+ consequenceText: be?.confirmConsequenceText,
2983
+ cardBackground: be?.infoCardBackground,
2984
+ cardDangerBackground: be?.infoCardDangerBackground
2978
2985
  } },
2979
- children: Re === $.Unpublish && Ae.length > 1 && /* @__PURE__ */ Z(it, {
2980
- ariaLabel: H?.unpublishFolderGroupAriaLabel ?? "Published folders",
2981
- value: Be ?? void 0,
2982
- onChange: Ve,
2983
- disabled: ze,
2984
- items: Ae.map((e) => ({
2986
+ children: Be === $.Unpublish && Me.length > 1 && /* @__PURE__ */ Z(it, {
2987
+ ariaLabel: W?.unpublishFolderGroupAriaLabel ?? "Published folders",
2988
+ value: He ?? void 0,
2989
+ onChange: Ue,
2990
+ disabled: Ve,
2991
+ items: Me.map((e) => ({
2985
2992
  value: e.key,
2986
- label: Me(e.key)
2993
+ label: Pe(e.key)
2987
2994
  })),
2988
- radioClassName: _e
2995
+ radioClassName: ye
2989
2996
  })
2990
2997
  }),
2991
- !pt && !Te && Qe && /* @__PURE__ */ Z(xr, {
2998
+ !ht && !De && et && /* @__PURE__ */ Z(xr, {
2992
2999
  item: e,
2993
- onLogin: fe,
2994
- onRequestLogout: Ue,
2995
- onRequestDeleteApiKey: qe,
2996
- texts: H,
2997
- detailsStyles: me
3000
+ onLogin: me,
3001
+ onRequestLogout: Ge,
3002
+ onRequestDeleteApiKey: Ye,
3003
+ texts: W,
3004
+ detailsStyles: ge
2998
3005
  }),
2999
- !pt && Te && /* @__PURE__ */ Z(Cr, {
3006
+ !ht && De && /* @__PURE__ */ Z(Cr, {
3000
3007
  item: e,
3001
- publishFlow: J,
3002
- publishDependencies: Y,
3003
- publishFolderView: Fe,
3004
- isPublishCredentialsEligible: Oe,
3005
- publishExpandedPaths: _,
3006
- onPublishExpandedPathsChange: v,
3007
- publishLoadingPaths: y,
3008
- ruleSourceOptions: k,
3009
- publishLabels: O
3008
+ publishFlow: Oe,
3009
+ publishDependencies: ke,
3010
+ publishFolderView: Le,
3011
+ isPublishCredentialsEligible: Ae,
3012
+ publishExpandedPaths: y,
3013
+ onPublishExpandedPathsChange: b,
3014
+ publishLoadingPaths: S,
3015
+ ruleSourceOptions: j,
3016
+ publishLabels: A,
3017
+ resolvePublishDependenciesLabels: g,
3018
+ resolvePublishApprovalLabels: _
3010
3019
  }),
3011
- !mt && /* @__PURE__ */ Q(X, { children: [
3020
+ !gt && /* @__PURE__ */ Q(X, { children: [
3012
3021
  /* @__PURE__ */ Z(Ei, {
3013
3022
  item: e,
3014
3023
  onUseInChat: l,
3015
3024
  isPrimaryActionVisible: u,
3016
3025
  onShare: d,
3017
- shareOverlay: j,
3018
- isShareVisible: M,
3019
- isSharePrimary: N,
3026
+ shareOverlay: N,
3027
+ isShareVisible: P,
3028
+ isSharePrimary: ee,
3020
3029
  isPublishVisible: f,
3021
3030
  isPublishPrimary: p,
3022
- onOpenPublish: Ne,
3023
- isUnpublishVisible: de,
3024
- hasPublishedFolders: je,
3025
- isPublishHistoryResolved: m == null || Ee,
3026
- onRequestPublishHistory: De,
3027
- onOpenUnpublish: ue ? Ke : void 0,
3028
- onEdit: P,
3029
- onDownload: ee,
3030
- isDownloadVisible: L,
3031
- isDownloadPrimary: te,
3032
- onDelete: ae ? He : void 0,
3033
- onUnshare: oe ? We : void 0,
3034
- isUnshareVisible: se,
3035
- onRevokeShare: ce ? Ge : void 0,
3036
- onFetchRecipientsCount: B,
3037
- isRevokeShareVisible: le,
3038
- onLogin: fe,
3039
- onLogout: pe,
3040
- onOpenCredentialsManagement: et,
3041
- onRequestLogout: Ue,
3042
- texts: H,
3043
- detailsStyles: me,
3031
+ onOpenPublish: Fe,
3032
+ isUnpublishVisible: pe,
3033
+ hasPublishedFolders: Ne,
3034
+ isPublishHistoryResolved: m == null || J,
3035
+ onRequestPublishHistory: Y,
3036
+ onOpenUnpublish: fe ? Je : void 0,
3037
+ onEdit: L,
3038
+ onDownload: te,
3039
+ isDownloadVisible: ne,
3040
+ isDownloadPrimary: re,
3041
+ onDelete: se ? We : void 0,
3042
+ onUnshare: ce ? Ke : void 0,
3043
+ isUnshareVisible: B,
3044
+ onRevokeShare: le ? qe : void 0,
3045
+ onFetchRecipientsCount: ue,
3046
+ isRevokeShareVisible: de,
3047
+ onLogin: me,
3048
+ onLogout: he,
3049
+ onOpenCredentialsManagement: nt,
3050
+ onRequestLogout: Ge,
3051
+ texts: W,
3052
+ detailsStyles: ge,
3044
3053
  isReadonly: a
3045
3054
  }),
3046
3055
  e.credentials != null && (() => {
@@ -3050,49 +3059,49 @@ var rn = /* @__PURE__ */ function(e) {
3050
3059
  children: /* @__PURE__ */ Z(_r, {
3051
3060
  state: t,
3052
3061
  authenticationType: e.credentials.authenticationType,
3053
- texts: H
3062
+ texts: W
3054
3063
  })
3055
3064
  });
3056
3065
  })(),
3057
3066
  !a && t && z?.(e),
3058
3067
  /* @__PURE__ */ Z(ui, {
3059
3068
  item: e,
3060
- tabs: rt,
3061
- activeTab: Se,
3062
- onTabChange: Ce,
3069
+ tabs: ot,
3070
+ activeTab: we,
3071
+ onTabChange: Te,
3063
3072
  isDetailsLoading: i,
3064
- contentFile: we,
3065
- renderContentFileTree: R,
3066
- texts: H,
3067
- detailsStyles: me,
3068
- limitsFooterNote: he
3073
+ contentFile: Ee,
3074
+ renderContentFileTree: oe,
3075
+ texts: W,
3076
+ detailsStyles: ge,
3077
+ limitsFooterNote: _e
3069
3078
  })
3070
3079
  ] })
3071
3080
  ]
3072
3081
  }),
3073
- pt && /* @__PURE__ */ Z(F, {
3074
- confirmLabel: Xe.confirmLabel,
3075
- cancelLabel: ft,
3076
- variant: Xe.variant,
3077
- isLoading: ze,
3078
- isConfirmDisabled: Ze,
3079
- loadingStatusLabel: Xe.loadingStatusLabel,
3080
- styles: { colors: { border: ve?.confirmFooterBorder } },
3081
- onConfirm: Ye,
3082
- onCancel: Je
3082
+ ht && /* @__PURE__ */ Z(F, {
3083
+ confirmLabel: Qe.confirmLabel,
3084
+ cancelLabel: mt,
3085
+ variant: Qe.variant,
3086
+ isLoading: Ve,
3087
+ isConfirmDisabled: $e,
3088
+ loadingStatusLabel: Qe.loadingStatusLabel,
3089
+ styles: { colors: { border: be?.confirmFooterBorder } },
3090
+ onConfirm: Ze,
3091
+ onCancel: Xe
3083
3092
  }),
3084
- !pt && Te && /* @__PURE__ */ Z(qt, {
3093
+ !ht && De && /* @__PURE__ */ Z(qt, {
3085
3094
  version: e.version,
3086
- hasExistingPublicationInFolder: J.hasExistingPublicationInFolder,
3095
+ hasExistingPublicationInFolder: Oe.hasExistingPublicationInFolder,
3087
3096
  allowReplace: !1,
3088
- isSubmitDisabled: ke.isSubmitDisabled,
3089
- isSubmitLoading: ke.isSubmitLoading,
3090
- onCancel: Ie ? Fe.backToMain : Pe,
3091
- onSubmit: Le,
3092
- view: Fe.view,
3093
- onSelectFolder: Fe.selectFolder,
3094
- isSelectFolderDisabled: Fe.pendingFolderPath == null,
3095
- labels: O
3097
+ isSubmitDisabled: je.isSubmitDisabled,
3098
+ isSubmitLoading: je.isSubmitLoading,
3099
+ onCancel: Re ? Le.backToMain : Ie,
3100
+ onSubmit: ze,
3101
+ view: Le.view,
3102
+ onSelectFolder: Le.selectFolder,
3103
+ isSelectFolderDisabled: Le.pendingFolderPath == null,
3104
+ labels: A
3096
3105
  })
3097
3106
  ]
3098
3107
  });
@@ -3211,11 +3220,11 @@ var rn = /* @__PURE__ */ function(e) {
3211
3220
  ]), O = 1;
3212
3221
  w ? O = Math.ceil(y.length / T) : C && !h && (O = y.length);
3213
3222
  let k = t ?? e.length, A = K(null), j = K(null), M = K(null), [N, P] = q(), [F, I] = q(), ee = K(S), L = K(C);
3214
- W(() => {
3223
+ U(() => {
3215
3224
  (ee.current !== S || L.current !== C) && (ee.current = S, L.current = C, x(1), P(void 0), I(void 0));
3216
- }, [S, C]), W(() => {
3225
+ }, [S, C]), U(() => {
3217
3226
  b > O && O > 0 && x(O);
3218
- }, [b, O]), W(() => {
3227
+ }, [b, O]), U(() => {
3219
3228
  O <= 1 && (N !== void 0 || F !== void 0) && (P(void 0), I(void 0));
3220
3229
  }, [
3221
3230
  O,
@@ -3229,10 +3238,10 @@ var rn = /* @__PURE__ */ function(e) {
3229
3238
  b,
3230
3239
  N
3231
3240
  ]);
3232
- let te = K(/* @__PURE__ */ new Map()), ne = K(b), re = K(S), R = K(0), z = K(!1);
3241
+ let te = K(/* @__PURE__ */ new Map()), ne = K(b), re = K(S), ae = K(0), R = K(!1);
3233
3242
  ge(() => {
3234
3243
  if (!M.current || s) return;
3235
- if (A.current && !z.current) {
3244
+ if (A.current && !R.current) {
3236
3245
  let e = A.current;
3237
3246
  e.style.height = "", e.style.transition = "";
3238
3247
  }
@@ -3243,7 +3252,7 @@ var rn = /* @__PURE__ */ function(e) {
3243
3252
  let { cardId: t } = e.dataset;
3244
3253
  t && r.set(t, Li(e));
3245
3254
  }), !e && !t) {
3246
- let e = j.current, t = R.current, i = 0;
3255
+ let e = j.current, t = ae.current, i = 0;
3247
3256
  if (e) {
3248
3257
  let t = e.style.height;
3249
3258
  t && (e.style.height = ""), i = e.offsetHeight, t && (e.style.height = t);
@@ -3270,7 +3279,7 @@ var rn = /* @__PURE__ */ function(e) {
3270
3279
  }
3271
3280
  if (te.current = r, j.current) {
3272
3281
  let e = j.current, t = e.style.height ? parseFloat(e.style.height) : NaN;
3273
- R.current = Number.isNaN(t) ? e.offsetHeight : t;
3282
+ ae.current = Number.isNaN(t) ? e.offsetHeight : t;
3274
3283
  }
3275
3284
  }, [
3276
3285
  D,
@@ -3283,11 +3292,11 @@ var rn = /* @__PURE__ */ function(e) {
3283
3292
  if (!e) return;
3284
3293
  let t = e.offsetHeight;
3285
3294
  if (t === 0) return;
3286
- z.current = !0, e.style.height = "0px", e.offsetHeight, e.style.transition = "height 300ms cubic-bezier(0, 0, 0.2, 1)", e.style.height = `${t}px`;
3295
+ R.current = !0, e.style.height = "0px", e.offsetHeight, e.style.transition = "height 300ms cubic-bezier(0, 0, 0.2, 1)", e.style.height = `${t}px`;
3287
3296
  let n = (t) => {
3288
3297
  t.target === e && t.propertyName === "height" && r();
3289
3298
  }, r = () => {
3290
- z.current = !1, parseFloat(e.style.height || "0") > 0 && (e.style.height = "", e.style.transition = ""), clearTimeout(i), e.removeEventListener("transitionend", n);
3299
+ R.current = !1, parseFloat(e.style.height || "0") > 0 && (e.style.height = "", e.style.transition = ""), clearTimeout(i), e.removeEventListener("transitionend", n);
3291
3300
  }, i = setTimeout(r, 400);
3292
3301
  return e.addEventListener("transitionend", n), r;
3293
3302
  }, []), ge(() => {
@@ -3295,30 +3304,30 @@ var rn = /* @__PURE__ */ function(e) {
3295
3304
  let e = A.current, t = e.offsetHeight;
3296
3305
  t !== 0 && (e.style.height = `${t}px`, e.offsetHeight, e.style.transition = "height 260ms ease-in", e.style.height = "0px");
3297
3306
  }, [s]);
3298
- let ae = U(() => M.current ? Array.from(M.current.querySelectorAll("[data-card-id]")) : [], []), oe = K(null), se = K(null), ce = U(() => {
3307
+ let oe = H(() => M.current ? Array.from(M.current.querySelectorAll("[data-card-id]")) : [], []), z = K(null), se = K(null), ce = H(() => {
3299
3308
  se.current ??= requestAnimationFrame(() => {
3300
3309
  se.current = null;
3301
3310
  let e = M.current;
3302
3311
  if (!e) return;
3303
- let t = Ni(e, ae()) + 1;
3304
- if (oe.current != null) {
3305
- if (t !== oe.current) return;
3306
- oe.current = null;
3312
+ let t = Ni(e, oe()) + 1;
3313
+ if (z.current != null) {
3314
+ if (t !== z.current) return;
3315
+ z.current = null;
3307
3316
  }
3308
3317
  x(t);
3309
3318
  });
3310
- }, [ae]), ue = U(() => {
3311
- oe.current = null;
3319
+ }, [oe]), ue = H(() => {
3320
+ z.current = null;
3312
3321
  }, []);
3313
- W(() => () => {
3322
+ U(() => () => {
3314
3323
  se.current != null && cancelAnimationFrame(se.current);
3315
3324
  }, []);
3316
3325
  let de = (e) => {
3317
3326
  if (x(e), !C || !M.current) return;
3318
- let t = ae()[e - 1];
3327
+ let t = oe()[e - 1];
3319
3328
  if (!t) return;
3320
3329
  let n = Mi(M.current, t);
3321
- Math.abs(n) < 1 || (oe.current = e, M.current.scrollBy({
3330
+ Math.abs(n) < 1 || (z.current = e, M.current.scrollBy({
3322
3331
  left: n,
3323
3332
  behavior: "smooth"
3324
3333
  }));
@@ -3487,7 +3496,7 @@ var rn = /* @__PURE__ */ function(e) {
3487
3496
  }) : null;
3488
3497
  }, Gi = ({ data: e, context: t }) => {
3489
3498
  let [n, r] = q(e?.isStarred ?? !1);
3490
- return W(() => {
3499
+ return U(() => {
3491
3500
  r(e?.isStarred ?? !1);
3492
3501
  }, [e?.id, e?.isStarred]), !e || t?.isFavoriteVisible?.(e) === !1 ? null : /* @__PURE__ */ Z("div", {
3493
3502
  className: "flex size-full items-center justify-end",
@@ -3584,15 +3593,15 @@ var rn = /* @__PURE__ */ function(e) {
3584
3593
  "--cat-list-version-text": T?.versionText
3585
3594
  }, D = K(null), O = K(t);
3586
3595
  O.current = t;
3587
- let k = U((e) => {
3596
+ let k = H((e) => {
3588
3597
  e.direction === "vertical" && O.current?.(e.top);
3589
- }, []), j = U(() => {
3598
+ }, []), j = H(() => {
3590
3599
  let e = D.current;
3591
3600
  e != null && !e.isDestroyed() && e.removeEventListener("bodyScroll", k);
3592
- }, [k]), M = U((e) => {
3601
+ }, [k]), M = H((e) => {
3593
3602
  j(), D.current = e, e.addEventListener("bodyScroll", k);
3594
3603
  }, [j, k]);
3595
- W(() => j, [j]), he(e, () => ({ scrollToTop: () => {
3604
+ U(() => j, [j]), W(e, () => ({ scrollToTop: () => {
3596
3605
  let e = D.current;
3597
3606
  e == null || e.isDestroyed() || e.getDisplayedRowCount() === 0 || e.ensureIndexVisible(0, "top");
3598
3607
  } }), []);
@@ -3600,7 +3609,7 @@ var rn = /* @__PURE__ */ function(e) {
3600
3609
  r,
3601
3610
  h,
3602
3611
  g
3603
- ]), P = G(() => n.map(ia), [n]), F = U((e) => y?.(A(v, e, P)), [
3612
+ ]), P = G(() => n.map(ia), [n]), F = H((e) => y?.(A(v, e, P)), [
3604
3613
  y,
3605
3614
  v,
3606
3615
  P
@@ -3637,7 +3646,7 @@ var rn = /* @__PURE__ */ function(e) {
3637
3646
  f,
3638
3647
  S
3639
3648
  ]);
3640
- return W(() => {
3649
+ return U(() => {
3641
3650
  D.current?.refreshCells({ force: !0 });
3642
3651
  }, [i, C]), /* @__PURE__ */ Z("div", {
3643
3652
  style: E,
@@ -3897,18 +3906,18 @@ var rn = /* @__PURE__ */ function(e) {
3897
3906
  "--cat-filter-divider": f?.divider,
3898
3907
  "--cat-filter-footer-border": f?.footerBorder
3899
3908
  }), _ = G(() => n == null ? [] : [...n].sort(), [n]), v = ga(e, n, r, a, s), [y, b] = q(() => new Set(e)), [x, S] = q(r ?? !1);
3900
- W(() => {
3909
+ U(() => {
3901
3910
  m && (b(new Set(e)), S(r ?? !1));
3902
3911
  }, [
3903
3912
  m,
3904
3913
  e,
3905
3914
  r
3906
3915
  ]);
3907
- let C = _.length + 1, [w, T] = q(-1), E = K([]), D = K(null), O = K(null), k = U((e) => {
3916
+ let C = _.length + 1, [w, T] = q(-1), E = K([]), D = K(null), O = K(null), k = H((e) => {
3908
3917
  let t = (e + C) % C;
3909
3918
  T(t), E.current[t]?.focus();
3910
3919
  }, [C]);
3911
- W(() => {
3920
+ U(() => {
3912
3921
  if (!m) {
3913
3922
  T(-1);
3914
3923
  return;
@@ -4362,8 +4371,8 @@ var rn = /* @__PURE__ */ function(e) {
4362
4371
  root: "_root_1h83l_1",
4363
4372
  heading: "_heading_1h83l_5",
4364
4373
  headingTitle: "_headingTitle_1h83l_9"
4365
- }, Ea = 3, Da = 300, Oa = ({ items: e, tabs: t, topicOptions: n, favorites: i, titles: a, browseHeaderRenderer: s, onToggleFavorite: c, isFavoriteVisible: l, columnVisibility: u, onUseInChat: d, isPrimaryActionVisible: m, onShare: v, isPublishVisible: y, isPublishPrimary: b, getPublishHistory: x, getPublishDependencies: C, publishFolderItems: w, publishExpandedPaths: T, onPublishExpandedPathsChange: E, publishLoadingPaths: O, hasPublishWriteAccess: k, publishDefaultAuthor: A, onPublish: P, onPublishSuccess: F, onPublishError: I, onCreatePublishFolder: ee, publishLabels: L, ruleSourceOptions: te, onFetchExistingRules: ne, shareOverlay: re, isShareVisible: ie, isSharePrimary: R, onFetchDetails: z, renderCredentials: ae, onEdit: oe, onDownload: se, isDownloadVisible: ce, isDownloadPrimary: B, onLoadContentFile: le, onLoadContentFilePreview: de, renderContentFilePreview: fe, renderContentFileTree: pe, onDelete: me, onUnshare: he, isUnshareVisible: ge, onRevokeShare: _e, onFetchRecipientsCount: ve, isRevokeShareVisible: ye, onUnpublish: be, isUnpublishVisible: xe, onLogin: Se, onLogout: Ce, onCreateClick: we, createOptions: Te, createSearch: Ee, createMenuByTab: De, hideCreateButton: J = !1, hidePageTitle: Y = !1, isReadonly: Oe = !1, initialViewMode: ke = cn.Grid, isFullWidth: Ae = !1, isFavoritesPaginationHidden: je = !1, selectedItemId: Me, onCardClick: Ne, isLoading: Pe, styles: Fe, detailsTexts: Ie, detailsLimitsFooterNote: Le, initialDetailsItemId: Re, sortKey: ze, onSortChange: Be, filterTopics: Ve, onFilterTopicsChange: He, isMyAppsActive: Ue, onMyAppsActiveChange: We, activeTab: Ge, onActiveTabChange: Ke, renderEmptyState: qe }) => {
4366
- let { typography: Je, headingRowClassName: Ye = "h-[64px]" } = Fe ?? {}, Xe = Sn(Fe), Ze = ue(), Qe = a?.pageTitle ?? "Catalog", $e = a?.createLabel ?? "Create", et = a?.favoritesTitle ?? "Your favorites", tt = a?.browseTitle ?? "Browse", nt = a?.searchPlaceholder ?? "Search models, tools, agents…", rt = a?.noResultsTitle ?? (() => "No items found"), it = a?.myAppsEmptyTitle ?? (() => "No personal items yet"), at = a?.myAppsEmptyDescription ?? "Create your first one, it'll show up right here.", ot = a?.featuredLabel ?? "Featured", st = a?.gridViewLabel ?? "Grid view", ct = a?.listViewLabel ?? "List view", lt = a?.viewToggleLabel ?? "View mode", ft = a?.ariaLabel ?? "Catalog", pt = a?.scrollToTopLabel ?? "Scroll to top", mt = a?.sortLabel ?? "Sort", ht = [
4374
+ }, Ea = 3, Da = 300, Oa = ({ items: e, tabs: t, topicOptions: n, favorites: i, titles: a, browseHeaderRenderer: s, onToggleFavorite: c, isFavoriteVisible: l, columnVisibility: u, onUseInChat: d, isPrimaryActionVisible: m, onShare: v, isPublishVisible: y, isPublishPrimary: b, getPublishHistory: x, getPublishDependencies: C, resolvePublishDependenciesLabels: w, resolvePublishApprovalLabels: T, publishFolderItems: E, publishExpandedPaths: O, onPublishExpandedPathsChange: k, publishLoadingPaths: A, hasPublishWriteAccess: P, publishDefaultAuthor: F, onPublish: I, onPublishSuccess: ee, onPublishError: L, onCreatePublishFolder: te, publishLabels: ne, ruleSourceOptions: re, onFetchExistingRules: ie, shareOverlay: ae, isShareVisible: R, isSharePrimary: oe, onFetchDetails: z, renderCredentials: se, onEdit: ce, onDownload: B, isDownloadVisible: le, isDownloadPrimary: de, onLoadContentFile: fe, onLoadContentFilePreview: pe, renderContentFilePreview: he, renderContentFileTree: W, onDelete: ge, onUnshare: _e, isUnshareVisible: ve, onRevokeShare: ye, onFetchRecipientsCount: be, isRevokeShareVisible: xe, onUnpublish: Se, isUnpublishVisible: Ce, onLogin: we, onLogout: Te, onCreateClick: Ee, createOptions: De, createSearch: J, createMenuByTab: Y, hideCreateButton: Oe = !1, hidePageTitle: ke = !1, isReadonly: Ae = !1, initialViewMode: je = cn.Grid, isFullWidth: Me = !1, isFavoritesPaginationHidden: Ne = !1, selectedItemId: Pe, onCardClick: Fe, isLoading: Ie, styles: Le, detailsTexts: Re, detailsLimitsFooterNote: ze, initialDetailsItemId: Be, sortKey: Ve, onSortChange: He, filterTopics: Ue, onFilterTopicsChange: We, isMyAppsActive: Ge, onMyAppsActiveChange: Ke, activeTab: qe, onActiveTabChange: Je, renderEmptyState: Ye }) => {
4375
+ let { typography: Xe, headingRowClassName: Ze = "h-[64px]" } = Le ?? {}, Qe = Sn(Le), $e = ue(), et = a?.pageTitle ?? "Catalog", tt = a?.createLabel ?? "Create", nt = a?.favoritesTitle ?? "Your favorites", rt = a?.browseTitle ?? "Browse", it = a?.searchPlaceholder ?? "Search models, tools, agents…", at = a?.noResultsTitle ?? (() => "No items found"), ot = a?.myAppsEmptyTitle ?? (() => "No personal items yet"), st = a?.myAppsEmptyDescription ?? "Create your first one, it'll show up right here.", ct = a?.featuredLabel ?? "Featured", lt = a?.gridViewLabel ?? "Grid view", ft = a?.listViewLabel ?? "List view", pt = a?.viewToggleLabel ?? "View mode", mt = a?.ariaLabel ?? "Catalog", ht = a?.scrollToTopLabel ?? "Scroll to top", gt = a?.sortLabel ?? "Sort", _t = [
4367
4376
  {
4368
4377
  value: o.RecentlyUpdated,
4369
4378
  label: a?.sortRecentlyUpdatedLabel ?? "Recently Updated"
@@ -4376,103 +4385,103 @@ var rn = /* @__PURE__ */ function(e) {
4376
4385
  value: o.NameAZ,
4377
4386
  label: a?.sortNameAZLabel ?? "Name A-Z"
4378
4387
  }
4379
- ], [gt, _t] = q(""), [vt, yt] = q(ke), [bt, xt] = q(ke === cn.Cards ? "shown" : "unmounted"), [St, Ct] = q(o.RecentlyUpdated), [wt, Tt] = q(/* @__PURE__ */ new Set()), [Et, Dt] = q(!1), Ot = ze ?? St, kt = Ve ?? wt, At = Ue ?? Et, jt = U((e) => {
4388
+ ], [vt, yt] = q(""), [bt, xt] = q(je), [St, Ct] = q(je === cn.Cards ? "shown" : "unmounted"), [wt, Tt] = q(o.RecentlyUpdated), [Et, Dt] = q(/* @__PURE__ */ new Set()), [Ot, kt] = q(!1), At = Ve ?? wt, jt = Ue ?? Et, Mt = Ge ?? Ot, Nt = H((e) => {
4380
4389
  let t = e;
4381
- Ct(t), Be?.(t);
4382
- }, [Be]), Mt = U((e) => {
4383
- Tt(e), He?.(e);
4384
- }, [He]), Nt = U((e) => {
4390
+ Tt(t), He?.(t);
4391
+ }, [He]), Pt = H((e) => {
4385
4392
  Dt(e), We?.(e);
4386
- }, [We]), Pt = G(() => e.filter((e) => !e.isHidden), [e]), Ft = G(() => i.filter((e) => !e.isHidden), [i]), It = G(() => n ?? j(Pt), [n, Pt]), Lt = G(() => t ?? h(Pt, a?.tabLabels), [
4393
+ }, [We]), Ft = H((e) => {
4394
+ kt(e), Ke?.(e);
4395
+ }, [Ke]), It = G(() => e.filter((e) => !e.isHidden), [e]), Lt = G(() => i.filter((e) => !e.isHidden), [i]), Rt = G(() => n ?? j(It), [n, It]), zt = G(() => t ?? h(It, a?.tabLabels), [
4387
4396
  t,
4388
- Pt,
4397
+ It,
4389
4398
  a?.tabLabels
4390
- ]), Rt = Lt[0]?.id ?? "", [zt, Bt] = q(Rt);
4391
- W(() => {
4392
- Bt((e) => e || Rt);
4393
- }, [Rt]);
4394
- let Vt = Ge ?? zt, Ht = K(null);
4395
- W(() => {
4396
- Ht.current != null && g(Ht.current);
4397
- }, [Vt, Lt.length]);
4398
- let Ut = U((e) => {
4399
- Bt(e), Ke?.(e);
4400
- }, [Ke]), [Wt, Gt] = q(Ft.length > 0);
4401
- W(() => {
4402
- Ft.length > 0 && !Wt && Gt(!0);
4403
- }, [Ft.length, Wt]);
4404
- let Kt = U(() => {
4405
- Gt(!1);
4406
- }, []), qt = Wt && Ft.length === 0, [Jt, Yt] = q(null), [Xt, Zt] = q(!1), [Qt, $t] = q(void 0), [en, tn] = q(!1), nn = K(null);
4407
- W(() => () => {
4408
- nn.current !== null && clearTimeout(nn.current);
4399
+ ]), Bt = zt[0]?.id ?? "", [Vt, Ht] = q(Bt);
4400
+ U(() => {
4401
+ Ht((e) => e || Bt);
4402
+ }, [Bt]);
4403
+ let Ut = qe ?? Vt, Wt = K(null);
4404
+ U(() => {
4405
+ Wt.current != null && g(Wt.current);
4406
+ }, [Ut, zt.length]);
4407
+ let Gt = H((e) => {
4408
+ Ht(e), Je?.(e);
4409
+ }, [Je]), [Kt, qt] = q(Lt.length > 0);
4410
+ U(() => {
4411
+ Lt.length > 0 && !Kt && qt(!0);
4412
+ }, [Lt.length, Kt]);
4413
+ let Jt = H(() => {
4414
+ qt(!1);
4415
+ }, []), Yt = Kt && Lt.length === 0, [Xt, Zt] = q(null), [Qt, $t] = q(!1), [en, tn] = q(void 0), [nn, rn] = q(!1), an = K(null);
4416
+ U(() => () => {
4417
+ an.current !== null && clearTimeout(an.current);
4409
4418
  }, []);
4410
- let rn = K(null), an = K(0), on = U(async (e) => {
4411
- rn.current = e.id;
4412
- let t = ++an.current;
4419
+ let on = K(null), $ = K(0), sn = H(async (e) => {
4420
+ on.current = e.id;
4421
+ let t = ++$.current;
4413
4422
  if (z) {
4414
- tn(!0);
4423
+ rn(!0);
4415
4424
  try {
4416
4425
  let n = await z(e);
4417
- return an.current === t && $t(n), n;
4426
+ return $.current === t && tn(n), n;
4418
4427
  } finally {
4419
- an.current === t && tn(!1);
4428
+ $.current === t && rn(!1);
4420
4429
  }
4421
4430
  }
4422
- }, [z]), $ = U(async (e) => (nn.current !== null && (clearTimeout(nn.current), nn.current = null, Zt(!0)), Yt(e), $t(void 0), on(e)), [on]), sn = U(async (e, t) => {
4431
+ }, [z]), ln = H(async (e) => (an.current !== null && (clearTimeout(an.current), an.current = null, $t(!0)), Zt(e), tn(void 0), sn(e)), [sn]), un = H(async (e, t) => {
4423
4432
  for (let n = 0; n < Ea; n++) {
4424
- if (rn.current !== e.id || t(await on(e))) return;
4433
+ if (on.current !== e.id || t(await sn(e))) return;
4425
4434
  n < 2 && await p(Da);
4426
4435
  }
4427
- }, [on]), ln = K(null);
4428
- W(() => {
4429
- if (!Re) {
4430
- ln.current = null;
4436
+ }, [sn]), dn = K(null);
4437
+ U(() => {
4438
+ if (!Be) {
4439
+ dn.current = null;
4431
4440
  return;
4432
4441
  }
4433
- if (ln.current === Re) return;
4434
- let t = e.find((e) => e.id === Re);
4435
- t && (ln.current = Re, $(t));
4442
+ if (dn.current === Be) return;
4443
+ let t = e.find((e) => e.id === Be);
4444
+ t && (dn.current = Be, ln(t));
4436
4445
  }, [
4437
- Re,
4446
+ Be,
4438
4447
  e,
4439
- $
4440
- ]), W(() => {
4441
- if (Jt == null) return;
4442
- let t = e.find((e) => e.id === Jt.id);
4443
- t && t !== Jt && Yt(t);
4444
- }, [e, Jt]);
4445
- let un = U(async (e, t) => {
4446
- await Se?.(e, t), z && await sn(e, (e) => D(e?.credentials, t.level));
4448
+ ln
4449
+ ]), U(() => {
4450
+ if (Xt == null) return;
4451
+ let t = e.find((e) => e.id === Xt.id);
4452
+ t && t !== Xt && Zt(t);
4453
+ }, [e, Xt]);
4454
+ let fn = H(async (e, t) => {
4455
+ await we?.(e, t), z && await un(e, (e) => D(e?.credentials, t.level));
4447
4456
  }, [
4448
- Se,
4457
+ we,
4449
4458
  z,
4450
- sn
4451
- ]), dn = U(async (e, t) => {
4452
- await Ce?.(e, t), z && await sn(e, (e) => !D(e?.credentials, t.level));
4459
+ un
4460
+ ]), pn = H(async (e, t) => {
4461
+ await Te?.(e, t), z && await un(e, (e) => !D(e?.credentials, t.level));
4453
4462
  }, [
4454
- Ce,
4463
+ Te,
4455
4464
  z,
4456
- sn
4457
- ]), fn = U(() => {
4458
- Zt(!1), rn.current = null, an.current += 1, nn.current !== null && clearTimeout(nn.current), nn.current = setTimeout(() => {
4459
- nn.current = null, Yt(null), $t(void 0), tn(!1);
4465
+ un
4466
+ ]), hn = H(() => {
4467
+ $t(!1), on.current = null, $.current += 1, an.current !== null && clearTimeout(an.current), an.current = setTimeout(() => {
4468
+ an.current = null, Zt(null), tn(void 0), rn(!1);
4460
4469
  }, 300);
4461
- }, []), pn = G(() => {
4462
- if (Jt == null) return null;
4463
- if (Qt == null) return Jt;
4464
- let { credentials: e, ...t } = Qt;
4470
+ }, []), gn = G(() => {
4471
+ if (Xt == null) return null;
4472
+ if (en == null) return Xt;
4473
+ let { credentials: e, ...t } = en;
4465
4474
  return {
4466
- ...Jt,
4475
+ ...Xt,
4467
4476
  details: t,
4468
- credentials: e ?? Jt.credentials
4477
+ credentials: e ?? Xt.credentials
4469
4478
  };
4470
- }, [Jt, Qt]), hn = G(() => r(Pt, Ot), [Pt, Ot]), gn = G(() => M(hn, gt), [hn, gt]), vn = G(() => kt.size > 0 ? f(gn, kt) : gn, [gn, kt]), yn = G(() => At ? N(vn) : vn, [vn, At]), Cn = G(() => Vt ? yn.filter((e) => S(e).includes(Vt)) : yn, [yn, Vt]);
4471
- W(() => {
4472
- if (bt !== "unmounted" || Pe || Cn.length === 0) return;
4479
+ }, [Xt, en]), vn = G(() => r(It, At), [It, At]), yn = G(() => M(vn, vt), [vn, vt]), Cn = G(() => jt.size > 0 ? f(yn, jt) : yn, [yn, jt]), wn = G(() => Mt ? N(Cn) : Cn, [Cn, Mt]), Tn = G(() => Ut ? wn.filter((e) => S(e).includes(Ut)) : wn, [wn, Ut]);
4480
+ U(() => {
4481
+ if (St !== "unmounted" || Ie || Tn.length === 0) return;
4473
4482
  let e = () => {
4474
- H(() => {
4475
- xt((e) => e === "unmounted" ? "prepared" : e);
4483
+ me(() => {
4484
+ Ct((e) => e === "unmounted" ? "prepared" : e);
4476
4485
  });
4477
4486
  };
4478
4487
  if (typeof window.requestIdleCallback == "function") {
@@ -4482,224 +4491,224 @@ var rn = /* @__PURE__ */ function(e) {
4482
4491
  let t = window.setTimeout(e, 200);
4483
4492
  return () => window.clearTimeout(t);
4484
4493
  }, [
4485
- bt,
4486
- Pe,
4487
- Cn.length
4494
+ St,
4495
+ Ie,
4496
+ Tn.length
4488
4497
  ]);
4489
- let wn = Jt != null && Ft.some((e) => e.id === Jt.id);
4490
- W(() => {
4491
- if (Jt == null) return;
4492
- let e = requestAnimationFrame(() => Zt(!0));
4498
+ let En = Xt != null && Lt.some((e) => e.id === Xt.id);
4499
+ U(() => {
4500
+ if (Xt == null) return;
4501
+ let e = requestAnimationFrame(() => $t(!0));
4493
4502
  return () => cancelAnimationFrame(e);
4494
- }, [Jt]);
4495
- let Tn = U((e) => {
4496
- e === cn.Cards && xt("shown"), yt(e);
4497
- }, []), En = !J && !Oe, Dn = En && Ze, [On, kn] = q(null), An = K(null), jn = K(null), { isVisible: Mn, handleRowsScroll: Nn, scrollToTop: Pn } = _n({
4498
- scrollBody: On,
4499
- searchInputRef: An,
4500
- listViewRef: jn,
4501
- isListView: vt === cn.Cards
4502
- }), Fn = Wt && !Oe, In = gt !== "" || kt.size > 0, Ln = In ? rt(gt, Vt) : _(a?.emptyTitle, Vt) ?? "No items yet", Rn = In ? a?.noResultsDescription ?? "Try a different search term or check your filters." : _(a?.emptyDescription, Vt), { copyCodeAriaLabel: zn, copiedCodeStatusLabel: Bn, downloadCodeAriaLabel: Vn, tableScrollRegionAriaLabel: Hn, mathScrollRegionAriaLabel: Un } = Ie ?? {}, Wn = G(() => xn({
4503
- copyCodeAriaLabel: zn,
4504
- copiedCodeStatusLabel: Bn,
4505
- downloadCodeAriaLabel: Vn,
4506
- tableScrollRegionAriaLabel: Hn,
4507
- mathScrollRegionAriaLabel: Un
4503
+ }, [Xt]);
4504
+ let Dn = H((e) => {
4505
+ e === cn.Cards && Ct("shown"), xt(e);
4506
+ }, []), On = !Oe && !Ae, kn = On && $e, [An, jn] = q(null), Mn = K(null), Nn = K(null), { isVisible: Pn, handleRowsScroll: Fn, scrollToTop: In } = _n({
4507
+ scrollBody: An,
4508
+ searchInputRef: Mn,
4509
+ listViewRef: Nn,
4510
+ isListView: bt === cn.Cards
4511
+ }), Ln = Kt && !Ae, Rn = vt !== "" || jt.size > 0, zn = Rn ? at(vt, Ut) : _(a?.emptyTitle, Ut) ?? "No items yet", Bn = Rn ? a?.noResultsDescription ?? "Try a different search term or check your filters." : _(a?.emptyDescription, Ut), { copyCodeAriaLabel: Vn, copiedCodeStatusLabel: Hn, downloadCodeAriaLabel: Un, tableScrollRegionAriaLabel: Wn, mathScrollRegionAriaLabel: Gn } = Re ?? {}, qn = G(() => xn({
4512
+ copyCodeAriaLabel: Vn,
4513
+ copiedCodeStatusLabel: Hn,
4514
+ downloadCodeAriaLabel: Un,
4515
+ tableScrollRegionAriaLabel: Wn,
4516
+ mathScrollRegionAriaLabel: Gn
4508
4517
  }), [
4509
- zn,
4510
- Bn,
4511
4518
  Vn,
4512
4519
  Hn,
4513
- Un
4514
- ]), Gn = G(() => ({
4515
- noResultsTitle: Ln,
4516
- noResultsDescription: Rn,
4517
- featuredLabel: ot,
4520
+ Un,
4521
+ Wn,
4522
+ Gn
4523
+ ]), Jn = G(() => ({
4524
+ noResultsTitle: zn,
4525
+ noResultsDescription: Bn,
4526
+ featuredLabel: ct,
4518
4527
  noFolderLabel: a?.noFolderLabel,
4519
- credentialsBadgeLoggedOutLabel: Ie?.credentialsBadgeLoggedOutLabel
4528
+ credentialsBadgeLoggedOutLabel: Re?.credentialsBadgeLoggedOutLabel
4520
4529
  }), [
4521
- Ln,
4522
- Rn,
4523
- ot,
4530
+ zn,
4531
+ Bn,
4532
+ ct,
4524
4533
  a?.noFolderLabel,
4525
- Ie?.credentialsBadgeLoggedOutLabel
4526
- ]), qn = !Pe && Cn.length === 0, Jn = qn ? qe?.({
4527
- query: gt,
4528
- activeTab: Vt,
4529
- hasTopicFilters: kt.size > 0,
4530
- isMyAppsActive: At
4531
- }) : void 0, Yn = qn && At && !gt && kt.size === 0 && (De == null || De[Vt] != null), Xn = {
4532
- label: $e,
4533
- options: Te,
4534
- onClick: we,
4535
- search: Ee,
4534
+ Re?.credentialsBadgeLoggedOutLabel
4535
+ ]), Yn = !Ie && Tn.length === 0, Xn = Yn ? Ye?.({
4536
+ query: vt,
4537
+ activeTab: Ut,
4538
+ hasTopicFilters: jt.size > 0,
4539
+ isMyAppsActive: Mt
4540
+ }) : void 0, Zn = Yn && Mt && !vt && jt.size === 0 && (Y == null || Y[Ut] != null), Qn = {
4541
+ label: tt,
4542
+ options: De,
4543
+ onClick: Ee,
4544
+ search: J,
4536
4545
  searchPlaceholder: a?.createSearchPlaceholder,
4537
4546
  searchClearLabel: a?.createSearchClearLabel,
4538
4547
  noResultsLabel: a?.createNoResultsLabel,
4539
4548
  backLabel: a?.createMenuBackLabel,
4540
4549
  closeLabel: a?.createMenuCloseLabel,
4541
- colors: Fe?.colors?.createMenu,
4542
- sectionHeaderClassName: Je?.createMenuSectionHeaderClassName
4543
- }, Zn = De ? bn(De[Vt]) : Xn, Qn = En && Zn != null ? {
4544
- ...Xn,
4545
- ...Zn
4550
+ colors: Le?.colors?.createMenu,
4551
+ sectionHeaderClassName: Xe?.createMenuSectionHeaderClassName
4552
+ }, $n = Y ? bn(Y[Ut]) : Qn, er = On && $n != null ? {
4553
+ ...Qn,
4554
+ ...$n
4546
4555
  } : void 0;
4547
- return Pe ? /* @__PURE__ */ Z("div", {
4556
+ return Ie ? /* @__PURE__ */ Z("div", {
4548
4557
  className: "flex size-full min-h-0 flex-1 items-center justify-center",
4549
4558
  children: /* @__PURE__ */ Z(ut, { ariaLabel: a?.loadingLabel ?? "Loading…" })
4550
4559
  }) : /* @__PURE__ */ Q("section", {
4551
- "aria-label": ft,
4560
+ "aria-label": mt,
4552
4561
  className: V("relative flex size-full min-h-0 flex-1 flex-col", Ta.root, mn.root),
4553
- style: Xe,
4562
+ style: Qe,
4554
4563
  children: [
4555
- (!Y || En) && /* @__PURE__ */ Z("div", {
4564
+ (!ke || On) && /* @__PURE__ */ Z("div", {
4556
4565
  className: V("shrink-0", Ta.heading),
4557
4566
  children: /* @__PURE__ */ Q("div", {
4558
- className: V("flex w-full items-center justify-between px-4 desktop:px-8", !(Y && Dn) && Ye),
4559
- children: [!Y && /* @__PURE__ */ Z("h1", {
4560
- className: V(Je?.pageHeadingFontClassName ?? "dial-display2-text", Ta.headingTitle),
4561
- children: Qe
4562
- }), En && /* @__PURE__ */ Z("div", {
4563
- className: Dn ? "absolute inset-e-4 bottom-4 z-10" : void 0,
4567
+ className: V("flex w-full items-center justify-between px-4 desktop:px-8", !(ke && kn) && Ze),
4568
+ children: [!ke && /* @__PURE__ */ Z("h1", {
4569
+ className: V(Xe?.pageHeadingFontClassName ?? "dial-display2-text", Ta.headingTitle),
4570
+ children: et
4571
+ }), On && /* @__PURE__ */ Z("div", {
4572
+ className: kn ? "absolute inset-e-4 bottom-4 z-10" : void 0,
4564
4573
  children: /* @__PURE__ */ Z(da, {
4565
- ...Xn,
4566
- isFloating: Dn
4574
+ ...Qn,
4575
+ isFloating: kn
4567
4576
  })
4568
4577
  })]
4569
4578
  })
4570
4579
  }),
4571
- Mn && /* @__PURE__ */ Z("div", {
4572
- className: V("absolute inset-e-4 z-10", Dn ? "bottom-20" : "bottom-4"),
4580
+ Pn && /* @__PURE__ */ Z("div", {
4581
+ className: V("absolute inset-e-4 z-10", kn ? "bottom-20" : "bottom-4"),
4573
4582
  children: /* @__PURE__ */ Z(pa, {
4574
- label: pt,
4575
- onClick: Pn
4583
+ label: ht,
4584
+ onClick: In
4576
4585
  })
4577
4586
  }),
4578
4587
  /* @__PURE__ */ Q("div", {
4579
- ref: kn,
4580
- className: V("relative flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden overflow-y-auto", Dn && "pb-16"),
4588
+ ref: jn,
4589
+ className: V("relative flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden overflow-y-auto", kn && "pb-16"),
4581
4590
  children: [
4582
- Fn && /* @__PURE__ */ Z("div", {
4591
+ Ln && /* @__PURE__ */ Z("div", {
4583
4592
  className: "w-full px-4 desktop:px-8",
4584
4593
  children: /* @__PURE__ */ Z(Ri, {
4585
- items: Ft,
4586
- totalCount: Ft.length,
4587
- title: et,
4594
+ items: Lt,
4595
+ totalCount: Lt.length,
4596
+ title: nt,
4588
4597
  onToggleFavorite: c,
4589
4598
  isFavoriteVisible: l,
4590
- onItemClick: Ne ?? $,
4591
- isLeaving: qt,
4592
- onExitComplete: Kt,
4593
- selectedItemId: Me,
4594
- credentialsBadgeLoggedOutLabel: Ie?.credentialsBadgeLoggedOutLabel,
4595
- isPaginationHidden: je
4599
+ onItemClick: Fe ?? ln,
4600
+ isLeaving: Yt,
4601
+ onExitComplete: Jt,
4602
+ selectedItemId: Pe,
4603
+ credentialsBadgeLoggedOutLabel: Re?.credentialsBadgeLoggedOutLabel,
4604
+ isPaginationHidden: Ne
4596
4605
  })
4597
4606
  }),
4598
4607
  /* @__PURE__ */ Z("div", {
4599
4608
  className: "w-full pt-6 desktop:px-4",
4600
4609
  children: /* @__PURE__ */ Z(wa, {
4601
- totalCount: yn.length,
4602
- viewMode: vt,
4603
- onViewModeChange: Tn,
4604
- sortKey: Ot,
4605
- query: gt,
4606
- onQueryChange: _t,
4607
- searchInputRef: An,
4608
- title: tt,
4610
+ totalCount: wn.length,
4611
+ viewMode: bt,
4612
+ onViewModeChange: Dn,
4613
+ sortKey: At,
4614
+ query: vt,
4615
+ onQueryChange: yt,
4616
+ searchInputRef: Mn,
4617
+ title: rt,
4609
4618
  browseHeaderRenderer: s,
4610
- searchPlaceholder: nt,
4611
- gridViewLabel: st,
4612
- listViewLabel: ct,
4613
- viewToggleLabel: lt,
4614
- sortOptions: ht,
4615
- onSortChange: jt,
4616
- sortLabel: mt,
4617
- filters: kt,
4618
- onFiltersChange: Mt,
4619
- filterValues: It,
4620
- isMyAppsActive: At,
4621
- onMyAppsChange: Nt,
4619
+ searchPlaceholder: it,
4620
+ gridViewLabel: lt,
4621
+ listViewLabel: ft,
4622
+ viewToggleLabel: pt,
4623
+ sortOptions: _t,
4624
+ onSortChange: Nt,
4625
+ sortLabel: gt,
4626
+ filters: jt,
4627
+ onFiltersChange: Pt,
4628
+ filterValues: Rt,
4629
+ isMyAppsActive: Mt,
4630
+ onMyAppsChange: Ft,
4622
4631
  filterFromLabel: a?.filterFromLabel,
4623
4632
  filterMyAppsLabel: a?.filterMyAppsLabel,
4624
4633
  filterTopicsLabel: a?.filterTopicsLabel,
4625
4634
  browseSettingsLabels: a?.browseSettings
4626
4635
  })
4627
4636
  }),
4628
- Lt.length > 1 && /* @__PURE__ */ Z("div", {
4629
- ref: Ht,
4637
+ zt.length > 1 && /* @__PURE__ */ Z("div", {
4638
+ ref: Wt,
4630
4639
  className: "mx-4 min-w-0 shrink-0 scrollbar-none overflow-x-auto desktop:mx-8",
4631
4640
  children: /* @__PURE__ */ Z(dt, {
4632
4641
  tabListClassName: "w-max min-w-full",
4633
4642
  tabClassName: "shrink-0 whitespace-nowrap",
4634
- tabs: Lt.map((e) => ({
4643
+ tabs: zt.map((e) => ({
4635
4644
  id: e.id,
4636
4645
  label: typeof e.label == "string" ? e.label : String(e.label),
4637
- count: yn.filter((t) => S(t).includes(e.id)).length
4646
+ count: wn.filter((t) => S(t).includes(e.id)).length
4638
4647
  })),
4639
- activeTabId: Vt,
4640
- onTabChange: Ut
4648
+ activeTabId: Ut,
4649
+ onTabChange: Gt
4641
4650
  })
4642
4651
  }),
4643
4652
  /* @__PURE__ */ Q("div", {
4644
- className: V(Cn.length > 0 ? ["w-full flex-1 px-4 py-6 desktop:px-8", !Ae && "mx-auto max-w-[1180px]"] : "min-h-[180px] flex-1", Cn.length === 0 && "px-4 py-6 desktop:px-8"),
4653
+ className: V(Tn.length > 0 ? ["w-full flex-1 px-4 py-6 desktop:px-8", !Me && "mx-auto max-w-[1180px]"] : "min-h-[180px] flex-1", Tn.length === 0 && "px-4 py-6 desktop:px-8"),
4645
4654
  children: [
4646
- Jn != null && Jn,
4647
- Jn == null && Yn && /* @__PURE__ */ Z(fa, {
4648
- title: it(Vt),
4649
- description: at,
4650
- createButton: Qn
4655
+ Xn != null && Xn,
4656
+ Xn == null && Zn && /* @__PURE__ */ Z(fa, {
4657
+ title: ot(Ut),
4658
+ description: st,
4659
+ createButton: er
4651
4660
  }),
4652
- Jn == null && !Yn && /* @__PURE__ */ Q(X, { children: [/* @__PURE__ */ Z("div", {
4653
- inert: vt !== cn.Grid,
4654
- className: V(Cn.length > 0 ? "pb-8" : "size-full flex-1", vt !== cn.Grid && "hidden"),
4661
+ Xn == null && !Zn && /* @__PURE__ */ Q(X, { children: [/* @__PURE__ */ Z("div", {
4662
+ inert: bt !== cn.Grid,
4663
+ className: V(Tn.length > 0 ? "pb-8" : "size-full flex-1", bt !== cn.Grid && "hidden"),
4655
4664
  children: /* @__PURE__ */ Z(Kn, {
4656
- items: Cn,
4657
- query: gt,
4665
+ items: Tn,
4666
+ query: vt,
4658
4667
  onToggleFavorite: c,
4659
4668
  isFavoriteVisible: l,
4660
- onItemClick: Ne ?? $,
4661
- titles: Gn,
4662
- selectedItemId: Me,
4663
- isReadonly: Oe,
4664
- isFullWidth: Ae,
4665
- featuredChipStyle: Fe?.colors?.featuredChipStyle,
4666
- markdownLabels: Wn,
4667
- activeTab: Vt
4669
+ onItemClick: Fe ?? ln,
4670
+ titles: Jn,
4671
+ selectedItemId: Pe,
4672
+ isReadonly: Ae,
4673
+ isFullWidth: Me,
4674
+ featuredChipStyle: Le?.colors?.featuredChipStyle,
4675
+ markdownLabels: qn,
4676
+ activeTab: Ut
4668
4677
  })
4669
- }), bt !== "unmounted" && /* @__PURE__ */ Z("div", {
4670
- inert: vt !== cn.Cards,
4671
- className: V(vt === cn.Cards && "h-full min-h-[360px] pb-8", vt !== cn.Cards && (bt === "prepared" ? "invisible h-0 overflow-hidden" : "hidden")),
4678
+ }), St !== "unmounted" && /* @__PURE__ */ Z("div", {
4679
+ inert: bt !== cn.Cards,
4680
+ className: V(bt === cn.Cards && "h-full min-h-[360px] pb-8", bt !== cn.Cards && (St === "prepared" ? "invisible h-0 overflow-hidden" : "hidden")),
4672
4681
  children: /* @__PURE__ */ Z(sa, {
4673
- ref: jn,
4674
- onRowsScroll: Nn,
4675
- type: Vt,
4676
- items: Cn,
4677
- query: gt,
4678
- ariaLabel: ft,
4679
- emptyStateTitle: Ln,
4680
- emptyStateDescription: Rn,
4681
- isEmptyStateLive: In,
4682
+ ref: Nn,
4683
+ onRowsScroll: Fn,
4684
+ type: Ut,
4685
+ items: Tn,
4686
+ query: vt,
4687
+ ariaLabel: mt,
4688
+ emptyStateTitle: zn,
4689
+ emptyStateDescription: Bn,
4690
+ isEmptyStateLive: Rn,
4682
4691
  onToggleFavorite: c,
4683
4692
  isFavoriteVisible: l,
4684
4693
  columnVisibility: u,
4685
- onItemClick: Ne ?? $,
4686
- selectedItemId: Me,
4687
- credentialsBadgeLoggedOutLabel: Ie?.credentialsBadgeLoggedOutLabel,
4688
- isReadonly: Oe
4694
+ onItemClick: Fe ?? ln,
4695
+ selectedItemId: Pe,
4696
+ credentialsBadgeLoggedOutLabel: Re?.credentialsBadgeLoggedOutLabel,
4697
+ isReadonly: Ae
4689
4698
  })
4690
4699
  })] })
4691
4700
  ]
4692
4701
  })
4693
4702
  ]
4694
4703
  }),
4695
- pn != null && /* @__PURE__ */ Z(Ai, {
4696
- renderCredentials: ae,
4697
- item: pn,
4698
- isOpen: Xt,
4699
- isStarred: wn,
4700
- isDetailsLoading: en,
4701
- isReadonly: Oe,
4702
- onClose: fn,
4704
+ gn != null && /* @__PURE__ */ Z(Ai, {
4705
+ renderCredentials: se,
4706
+ item: gn,
4707
+ isOpen: Qt,
4708
+ isStarred: En,
4709
+ isDetailsLoading: nn,
4710
+ isReadonly: Ae,
4711
+ onClose: hn,
4703
4712
  onToggleFavorite: c,
4704
4713
  isFavoriteVisible: l,
4705
4714
  onUseInChat: d,
@@ -4709,43 +4718,45 @@ var rn = /* @__PURE__ */ function(e) {
4709
4718
  isPublishPrimary: b,
4710
4719
  getPublishHistory: x,
4711
4720
  getPublishDependencies: C,
4712
- publishFolderItems: w,
4713
- publishExpandedPaths: T,
4714
- onPublishExpandedPathsChange: E,
4715
- publishLoadingPaths: O,
4716
- hasPublishWriteAccess: k,
4717
- publishDefaultAuthor: A,
4718
- onPublish: P,
4719
- onPublishSuccess: F,
4720
- onPublishError: I,
4721
- onCreatePublishFolder: ee,
4722
- publishLabels: L,
4723
- ruleSourceOptions: te,
4724
- onFetchExistingRules: ne,
4725
- shareOverlay: re,
4726
- isShareVisible: ie,
4727
- isSharePrimary: R,
4728
- onEdit: oe,
4729
- onDownload: se,
4730
- isDownloadVisible: ce,
4731
- isDownloadPrimary: B,
4732
- onLoadContentFile: le,
4733
- onLoadContentFilePreview: de,
4734
- renderContentFilePreview: fe,
4735
- renderContentFileTree: pe,
4736
- onDelete: me,
4737
- onUnshare: he,
4738
- isUnshareVisible: ge,
4739
- onRevokeShare: _e,
4740
- onFetchRecipientsCount: ve,
4741
- isRevokeShareVisible: ye,
4742
- onUnpublish: be,
4743
- isUnpublishVisible: xe,
4744
- onLogin: un,
4745
- onLogout: dn,
4746
- texts: Ie,
4747
- limitsFooterNote: Le,
4748
- styles: { colors: { featuredChipStyle: Fe?.colors?.featuredChipStyle } }
4721
+ resolvePublishDependenciesLabels: w,
4722
+ resolvePublishApprovalLabels: T,
4723
+ publishFolderItems: E,
4724
+ publishExpandedPaths: O,
4725
+ onPublishExpandedPathsChange: k,
4726
+ publishLoadingPaths: A,
4727
+ hasPublishWriteAccess: P,
4728
+ publishDefaultAuthor: F,
4729
+ onPublish: I,
4730
+ onPublishSuccess: ee,
4731
+ onPublishError: L,
4732
+ onCreatePublishFolder: te,
4733
+ publishLabels: ne,
4734
+ ruleSourceOptions: re,
4735
+ onFetchExistingRules: ie,
4736
+ shareOverlay: ae,
4737
+ isShareVisible: R,
4738
+ isSharePrimary: oe,
4739
+ onEdit: ce,
4740
+ onDownload: B,
4741
+ isDownloadVisible: le,
4742
+ isDownloadPrimary: de,
4743
+ onLoadContentFile: fe,
4744
+ onLoadContentFilePreview: pe,
4745
+ renderContentFilePreview: he,
4746
+ renderContentFileTree: W,
4747
+ onDelete: ge,
4748
+ onUnshare: _e,
4749
+ isUnshareVisible: ve,
4750
+ onRevokeShare: ye,
4751
+ onFetchRecipientsCount: be,
4752
+ isRevokeShareVisible: xe,
4753
+ onUnpublish: Se,
4754
+ isUnpublishVisible: Ce,
4755
+ onLogin: fn,
4756
+ onLogout: pn,
4757
+ texts: Re,
4758
+ limitsFooterNote: ze,
4759
+ styles: { colors: { featuredChipStyle: Le?.colors?.featuredChipStyle } }
4749
4760
  })
4750
4761
  ]
4751
4762
  });
@@ -4764,13 +4775,13 @@ var rn = /* @__PURE__ */ function(e) {
4764
4775
  isListView: !0
4765
4776
  }), A = K(O);
4766
4777
  A.current = O;
4767
- let M = U((e) => {
4778
+ let M = H((e) => {
4768
4779
  e ?? A.current(0), w(e);
4769
- }, []), N = p?.ref, P = U((e) => {
4780
+ }, []), N = p?.ref, P = H((e) => {
4770
4781
  T.current = e, typeof N == "function" ? N(e) : N != null && (N.current = e);
4771
- }, [N]), F = p?.onRowsScroll, I = U((e) => {
4782
+ }, [N]), F = p?.onRowsScroll, I = H((e) => {
4772
4783
  O(e), F?.(e);
4773
- }, [O, F]), ee = n === ka.Ready, L = ee && !a, te = t.cancel ?? "Cancel", ne = t.add ?? "Add", re = G(() => j(e), [e]), R = G(() => c(e, {
4784
+ }, [O, F]), ee = n === ka.Ready, L = ee && !a, te = t.cancel ?? "Cancel", ne = t.add ?? "Add", re = G(() => j(e), [e]), ae = G(() => c(e, {
4774
4785
  search: h,
4775
4786
  topics: _,
4776
4787
  isMyOnly: y,
@@ -4781,7 +4792,7 @@ var rn = /* @__PURE__ */ function(e) {
4781
4792
  _,
4782
4793
  y,
4783
4794
  x
4784
- ]), z = G(() => [
4795
+ ]), R = G(() => [
4785
4796
  {
4786
4797
  value: o.RecentlyUpdated,
4787
4798
  label: t.sortUpdated ?? "Recently Updated"
@@ -4798,13 +4809,13 @@ var rn = /* @__PURE__ */ function(e) {
4798
4809
  t.sortUpdated,
4799
4810
  t.sortNewest,
4800
4811
  t.sortNameAZ
4801
- ]), ae = G(() => z.map((e) => ({
4812
+ ]), oe = G(() => R.map((e) => ({
4802
4813
  key: e.value,
4803
4814
  label: e.label,
4804
4815
  mark: Xe.Check,
4805
4816
  checked: e.value === x,
4806
4817
  onClick: () => S(e.value)
4807
- })), [z, x]), oe = z.find((e) => e.value === x)?.label ?? t.sort ?? "Sort", se = U((e) => g(e ?? ""), []), ce = U(() => {
4818
+ })), [R, x]), z = R.find((e) => e.value === x)?.label ?? t.sort ?? "Sort", se = H((e) => g(e ?? ""), []), ce = H(() => {
4808
4819
  L && d();
4809
4820
  }, [L, d]), V = G(() => [{
4810
4821
  label: te,
@@ -4858,14 +4869,14 @@ var rn = /* @__PURE__ */ function(e) {
4858
4869
  onClick: i
4859
4870
  })]
4860
4871
  });
4861
- if (R.length === 0) {
4872
+ if (ae.length === 0) {
4862
4873
  let e = h.trim() !== "" || _.size > 0 || y;
4863
4874
  return /* @__PURE__ */ Z("div", {
4864
4875
  className: "py-8",
4865
4876
  children: /* @__PURE__ */ Z($e, { title: e ? t.noResults ?? "No results found" : t.empty ?? "Nothing here yet" })
4866
4877
  });
4867
4878
  }
4868
- return m ? m(R, h) : /* @__PURE__ */ Q("div", {
4879
+ return m ? m(ae, h) : /* @__PURE__ */ Q("div", {
4869
4880
  ref: M,
4870
4881
  className: "relative min-h-0 flex-1",
4871
4882
  children: [/* @__PURE__ */ Z(sa, {
@@ -4873,7 +4884,7 @@ var rn = /* @__PURE__ */ function(e) {
4873
4884
  ...p,
4874
4885
  ref: P,
4875
4886
  onRowsScroll: I,
4876
- items: R,
4887
+ items: ae,
4877
4888
  query: h
4878
4889
  }), D && /* @__PURE__ */ Z("div", {
4879
4890
  className: "absolute inset-e-4 bottom-4 z-10",
@@ -4902,14 +4913,14 @@ var rn = /* @__PURE__ */ function(e) {
4902
4913
  className: "flex items-center gap-2",
4903
4914
  children: [/* @__PURE__ */ Z(ie, {
4904
4915
  title: t.catalog,
4905
- postfix: ee ? R.length : void 0,
4916
+ postfix: ee ? ae.length : void 0,
4906
4917
  titleClassName: u,
4907
4918
  shouldTruncateTitle: !1
4908
4919
  }), /* @__PURE__ */ Z("div", {
4909
4920
  className: "ms-auto shrink-0",
4910
4921
  children: /* @__PURE__ */ Z(Se, {
4911
- items: ae,
4912
- label: oe,
4922
+ items: oe,
4923
+ label: z,
4913
4924
  variant: Ce.Primary,
4914
4925
  appearance: xe.Ghost
4915
4926
  })
@@ -4945,7 +4956,7 @@ var rn = /* @__PURE__ */ function(e) {
4945
4956
  }), ue()]
4946
4957
  });
4947
4958
  }, Na = ({ type: e, items: t, attachedIds: n, labels: r, status: i, error: a, onRetry: o, listProps: s, renderFooterStart: c, onConfirm: l, onClose: d, headingClassName: f }) => {
4948
- let [p, m] = q(() => new Set(n)), h = G(() => new Set(t.map((e) => e.id)), [t]), { selectRow: g } = r, _ = U((e) => g ? g(e.name) : `Select ${e.name}`, [g]), v = U(() => l(u(n, p, h)), [
4959
+ let [p, m] = q(() => new Set(n)), h = G(() => new Set(t.map((e) => e.id)), [t]), { selectRow: g } = r, _ = H((e) => g ? g(e.name) : `Select ${e.name}`, [g]), v = H(() => l(u(n, p, h)), [
4949
4960
  l,
4950
4961
  n,
4951
4962
  p,
@@ -4976,7 +4987,7 @@ var rn = /* @__PURE__ */ function(e) {
4976
4987
  focusable: "_focusable_xykcx_5",
4977
4988
  description: "_description_xykcx_9"
4978
4989
  }, Fa = "group relative flex min-w-0 items-center gap-1 rounded-[10px] pe-1", Ia = "outline-hidden focus-visible:outline", La = ({ name: e, version: t, iconUrl: n, fileType: r, iconSize: i = 36, path: a, description: o, trailing: s, credentials: c, labels: l, colors: u, titleClassName: d = "dial-small-semi-text", versionClassName: f = "dial-tiny-text", descriptionClassName: p = "dial-tiny-text", isDisabled: m = !1, onOpen: h, onRemove: g }) => {
4979
- let _ = me(), v = me(), y = o != null && o !== "", b = B({
4990
+ let _ = he(), v = he(), y = o != null && o !== "", b = B({
4980
4991
  "--cat-add-on-row-hover-bg": u?.rowHoverBackground,
4981
4992
  "--cat-add-on-focus-outline": u?.focusOutline,
4982
4993
  "--cat-add-on-description": u?.description
@@ -5075,7 +5086,7 @@ var rn = /* @__PURE__ */ function(e) {
5075
5086
  });
5076
5087
  }, Ra = (e) => {
5077
5088
  let t = K(null), n = K(e);
5078
- return W(() => {
5089
+ return U(() => {
5079
5090
  let r = e < n.current;
5080
5091
  if (n.current = e, !r) return;
5081
5092
  let i = document.activeElement;
@@ -5207,7 +5218,7 @@ var rn = /* @__PURE__ */ function(e) {
5207
5218
  let { searchPlaceholder: b = "Search models, agents…", clearSearchLabel: x = "Clear search", favoritesLabel: S = "Favorites", emptyHint: C = "Star a model or agent to pin it here.", browseCatalogLabel: w = "Catalog", removeFromFavoritesLabel: T = "Remove from favorites", currentlySelectedLabel: E = "Currently selected", addToFavoritesLabel: D = "Add to favorites", listAriaLabel: O = "Select model", unavailableLabel: k = "Unavailable" } = m, A = l === Ba.Sectioned, [j, M] = q(""), N = e ?? j, P = (e) => {
5208
5219
  M(e ?? ""), t?.(e ?? "");
5209
5220
  }, [F, I] = q(/* @__PURE__ */ new Set()), ee = K(/* @__PURE__ */ new Map());
5210
- W(() => {
5221
+ U(() => {
5211
5222
  let e = ee.current;
5212
5223
  return () => {
5213
5224
  e.forEach((e) => clearTimeout(e)), e.clear();
@@ -5217,7 +5228,7 @@ var rn = /* @__PURE__ */ function(e) {
5217
5228
  n,
5218
5229
  i,
5219
5230
  c
5220
- ]), ne = G(() => new Set(n.map((e) => e.id)), [n]), re = N.trim(), ie = s != null && te.some((e) => e.id === s.id), R = s != null && c(s) && (A || !ie) && (!re || Ua(s, N)), z = G(() => {
5231
+ ]), ne = G(() => new Set(n.map((e) => e.id)), [n]), re = N.trim(), ie = s != null && te.some((e) => e.id === s.id), ae = s != null && c(s) && (A || !ie) && (!re || Ua(s, N)), R = G(() => {
5221
5232
  let e = A ? te.filter((e) => e.id !== s?.id) : te;
5222
5233
  return re ? e.filter((e) => Ua(e, N)) : e;
5223
5234
  }, [
@@ -5226,28 +5237,28 @@ var rn = /* @__PURE__ */ function(e) {
5226
5237
  re,
5227
5238
  N,
5228
5239
  s?.id
5229
- ]), ae = G(() => {
5240
+ ]), oe = G(() => {
5230
5241
  let e = re.toLowerCase();
5231
5242
  return e ? r.filter((t) => t.label.toLowerCase().includes(e)) : r;
5232
- }, [r, re]), oe = K(null), [le, de] = q();
5243
+ }, [r, re]), z = K(null), [le, de] = q();
5233
5244
  ge(() => {
5234
- oe.current && de(Math.min(oe.current.scrollHeight, ce));
5245
+ z.current && de(Math.min(z.current.scrollHeight, ce));
5235
5246
  }, [
5236
- z,
5237
- ae,
5238
- R
5247
+ R,
5248
+ oe,
5249
+ ae
5239
5250
  ]);
5240
5251
  let fe = K(null), pe = K(null);
5241
- W(() => {
5252
+ U(() => {
5242
5253
  pe.current && fe.current && En(pe.current, fe.current);
5243
5254
  }, []);
5244
- let H = ue(), U = K(null);
5245
- W(() => {
5246
- H || U.current?.focus();
5247
- }, [H]);
5248
- let me = (e) => {
5255
+ let me = ue(), H = K(null);
5256
+ U(() => {
5257
+ me || H.current?.focus();
5258
+ }, [me]);
5259
+ let he = (e) => {
5249
5260
  u(e), p();
5250
- }, he = () => {
5261
+ }, W = () => {
5251
5262
  f?.(), p();
5252
5263
  }, _e = (e, t) => {
5253
5264
  I((t) => new Set(t).add(e));
@@ -5277,7 +5288,7 @@ var rn = /* @__PURE__ */ function(e) {
5277
5288
  selected: t,
5278
5289
  className: "h-auto py-1.5",
5279
5290
  label: ve(e.label),
5280
- onClick: () => me(e.id)
5291
+ onClick: () => he(e.id)
5281
5292
  })
5282
5293
  }, e.id);
5283
5294
  }, be = (e, t = !1) => {
@@ -5306,7 +5317,7 @@ var rn = /* @__PURE__ */ function(e) {
5306
5317
  className: "min-w-0 wrap-break-word"
5307
5318
  })]
5308
5319
  }),
5309
- onClick: () => me(e.id),
5320
+ onClick: () => he(e.id),
5310
5321
  rightControl: c ? /* @__PURE__ */ Z(ft, {
5311
5322
  icon: /* @__PURE__ */ Z(zt, {
5312
5323
  size: J.SM,
@@ -5330,7 +5341,7 @@ var rn = /* @__PURE__ */ function(e) {
5330
5341
  className: V(v, "px-4 py-4 text-center", Va.emptyHint),
5331
5342
  children: C
5332
5343
  }), Se = () => /* @__PURE__ */ Q(X, { children: [
5333
- R && s && /* @__PURE__ */ Q(X, { children: [/* @__PURE__ */ Z("p", {
5344
+ ae && s && /* @__PURE__ */ Q(X, { children: [/* @__PURE__ */ Z("p", {
5334
5345
  className: V(g, "px-3 pt-2 pb-2", Va.sectionHeading),
5335
5346
  children: E
5336
5347
  }), /* @__PURE__ */ Z("ul", {
@@ -5338,19 +5349,19 @@ var rn = /* @__PURE__ */ function(e) {
5338
5349
  className: "flex flex-col gap-1 px-1 pb-1",
5339
5350
  children: be(s, !0)
5340
5351
  })] }),
5341
- (R || z.length > 0) && /* @__PURE__ */ Z("p", {
5352
+ (ae || R.length > 0) && /* @__PURE__ */ Z("p", {
5342
5353
  className: V(g, "sticky top-0 z-10 px-3 pt-2 pb-2 will-change-transform", Va.sectionHeading, Va.stickyHeading),
5343
5354
  children: S
5344
5355
  }),
5345
- z.length > 0 ? /* @__PURE__ */ Z("ul", {
5356
+ R.length > 0 ? /* @__PURE__ */ Z("ul", {
5346
5357
  role: "group",
5347
5358
  className: "flex flex-col gap-1 px-1 pb-1",
5348
- children: z.map((e) => be(e))
5359
+ children: R.map((e) => be(e))
5349
5360
  }) : xe()
5350
5361
  ] }), Ce = () => {
5351
- let [e, ...t] = z, n = e != null && e.id === i?.id, r = n ? t : z, a = [
5362
+ let [e, ...t] = R, n = e != null && e.id === i?.id, r = n ? t : R, a = [
5352
5363
  ...n ? [e] : [],
5353
- ...R && s ? [s] : [],
5364
+ ...ae && s ? [s] : [],
5354
5365
  ...r
5355
5366
  ];
5356
5367
  return /* @__PURE__ */ Q(X, { children: [a.length > 0 && /* @__PURE__ */ Z("ul", {
@@ -5376,7 +5387,7 @@ var rn = /* @__PURE__ */ function(e) {
5376
5387
  role: "search",
5377
5388
  className: V("sticky top-0 z-10 pt-2 pb-3", Va.searchHeader),
5378
5389
  children: /* @__PURE__ */ Z(at, {
5379
- inputRef: U,
5390
+ inputRef: H,
5380
5391
  value: N,
5381
5392
  onChange: P,
5382
5393
  placeholder: b,
@@ -5391,11 +5402,11 @@ var rn = /* @__PURE__ */ function(e) {
5391
5402
  children: /* @__PURE__ */ Q("div", {
5392
5403
  role: "menu",
5393
5404
  "aria-label": O,
5394
- ref: oe,
5395
- children: [ae.length > 0 && /* @__PURE__ */ Z("ul", {
5405
+ ref: z,
5406
+ children: [oe.length > 0 && /* @__PURE__ */ Z("ul", {
5396
5407
  role: "group",
5397
5408
  className: "flex flex-col gap-1 px-1 pt-1 pb-1",
5398
- children: ae.map(ye)
5409
+ children: oe.map(ye)
5399
5410
  }), A ? Se() : Ce()]
5400
5411
  })
5401
5412
  }),
@@ -5404,7 +5415,7 @@ var rn = /* @__PURE__ */ function(e) {
5404
5415
  children: /* @__PURE__ */ Z(Re, {
5405
5416
  label: w,
5406
5417
  className: "w-full justify-center",
5407
- onClick: he
5418
+ onClick: W
5408
5419
  })
5409
5420
  })
5410
5421
  ]