@epam/ai-dial-catalog 1.2.0-dev.245 → 1.2.0-dev.250
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/components/CardTag/CardTag.d.ts.map +1 -1
- package/index.css +2 -2
- package/index.js +1162 -1161
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
1
|
import { _ as e, a as t, b as n, c as r, d as i, f as a, g as o, h as s, i as c, l, m as u, n as d, o as f, p, r as m, s as h, t as g, u as _, v, x as y, y as b } from "./mapping-BHlCxGmC.js";
|
|
2
2
|
import { CatalogEntityType as x, ConfirmationFooter as S, ConfirmationView as C, DESKTOP_BREAKPOINT_PX as w, DeploymentIcon as T, EntityHeader as E, EntityTypeLabel as D, FeaturedChip as O, ItemHeader as ee, MarkdownCodeBlock as k, MarkdownRenderer as A, MarkdownWithPlaceholders as te, PanelEmptyState as ne, SELECT_LIST_MAX_HEIGHT_CLASS_NAME as re, buildCssVars as j, mergeClasses as M } from "@epam/ai-dial-chat-shared";
|
|
3
|
-
import { Fragment as ie, memo as
|
|
4
|
-
import { Button as
|
|
5
|
-
import { IconAlertTriangleFilled as
|
|
6
|
-
import { Fragment as
|
|
7
|
-
import { PublishFooter as
|
|
8
|
-
import { Grid as
|
|
3
|
+
import { Fragment as ie, memo as N, startTransition as ae, useCallback as P, useEffect as F, useId as oe, useLayoutEffect as se, useMemo as I, useRef as L, useState as R } from "react";
|
|
4
|
+
import { Badge as ce, Button as le, ButtonAppearance as ue, ButtonDropdown as de, ButtonVariant as fe, CardShell as pe, Checkbox as me, CloseButton as he, ConfirmationPopupVariant as ge, DIAL_ICON_SIZE as z, DIAL_KIT_ICON_STROKE as B, DangerButton as _e, Dropdown as ve, DropdownItemType as ye, ElementSize as be, EllipsisTooltip as xe, FolderPath as Se, GhostButton as Ce, GhostIconButton as we, Highlight as Te, InlineSelect as Ee, InlineSelectTrigger as V, Input as De, LinkButton as Oe, MenuItem as ke, MenuItemMark as Ae, NeutralButton as je, NeutralIconButton as Me, PrimaryButton as Ne, ProgressBar as Pe, RadioGroup as Fe, Search as H, SegmentedControl as Ie, Skeleton as Le, SkeletonAvatarShape as Re, Spinner as ze, Tabs as Be, ToggleIconButton as Ve, Tooltip as He, mergeClasses as Ue } from "@epam/ai-dial-ui-kit";
|
|
5
|
+
import { IconAlertTriangleFilled as We, IconArrowRight as Ge, IconBuildingCommunity as Ke, IconCheck as qe, IconChevronDown as Je, IconChevronLeft as Ye, IconChevronRight as Xe, IconCircleCheckFilled as Ze, IconDots as Qe, IconDownload as $e, IconFilter as U, IconFolder as et, IconKey as tt, IconLayoutGrid as nt, IconLayoutList as rt, IconLogin as it, IconLogout as at, IconPencil as ot, IconPlayerPlayFilled as st, IconPlus as ct, IconShare as lt, IconStar as ut, IconStarFilled as dt, IconTrashX as ft, IconUser as pt, IconUserOff as mt, IconWorldOff as ht, IconWorldShare as gt } from "@tabler/icons-react";
|
|
6
|
+
import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
|
|
7
|
+
import { PublishFooter as _t, PublishPanel as vt, derivePublishState as yt, usePublishFlow as bt } from "@epam/ai-dial-publish-panel";
|
|
8
|
+
import { Grid as xt } from "@epam/ai-dial-ui-kit/grid";
|
|
9
9
|
//#region src/types/code-language.ts
|
|
10
|
-
var
|
|
10
|
+
var q = /* @__PURE__ */ function(e) {
|
|
11
11
|
return e.Python = "python", e.Curl = "curl", e.JavaScript = "javascript", e;
|
|
12
|
-
}({}),
|
|
12
|
+
}({}), J = /* @__PURE__ */ function(e) {
|
|
13
13
|
return e.About = "about", e.Content = "content", e.Overview = "overview", e.Pricing = "pricing", e.Limits = "limits", e.Api = "api", e.Tools = "tools", e;
|
|
14
|
-
}({}),
|
|
14
|
+
}({}), St = /* @__PURE__ */ function(e) {
|
|
15
15
|
return e.RunningLow = "runningLow", e.LimitReached = "limitReached", e;
|
|
16
|
-
}({}),
|
|
16
|
+
}({}), Y = /* @__PURE__ */ function(e) {
|
|
17
17
|
return e.Delete = "delete", e.Logout = "logout", e.Unshare = "unshare", e.RevokeAccess = "revokeAccess", e.DeleteApiKey = "deleteApiKey", e.Unpublish = "unpublish", e;
|
|
18
|
-
}({}),
|
|
18
|
+
}({}), X = /* @__PURE__ */ function(e) {
|
|
19
19
|
return e.SM = "sm", e.LG = "lg", e;
|
|
20
|
-
}({}),
|
|
20
|
+
}({}), Ct = /* @__PURE__ */ function(e) {
|
|
21
21
|
return e.Grid = "grid", e.Cards = "cards", e;
|
|
22
|
-
}({}),
|
|
22
|
+
}({}), wt = /* @__PURE__ */ function(e) {
|
|
23
23
|
return e.Inline = "inline", e.Stacked = "stacked", e;
|
|
24
|
-
}({}),
|
|
24
|
+
}({}), Z = /* @__PURE__ */ function(e) {
|
|
25
25
|
return e.File = "file", e.Folder = "folder", e;
|
|
26
26
|
}({}), Q = /* @__PURE__ */ function(e) {
|
|
27
27
|
return e.Markdown = "markdown", e.Text = "text", e.Image = "image", e.Unsupported = "unsupported", e;
|
|
28
|
-
}({}),
|
|
29
|
-
let [e, t] =
|
|
30
|
-
return
|
|
28
|
+
}({}), Tt = () => {
|
|
29
|
+
let [e, t] = R(() => window.innerWidth);
|
|
30
|
+
return F(() => {
|
|
31
31
|
let e = () => t(window.innerWidth);
|
|
32
32
|
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
33
33
|
}, []), e >= 1024 ? 4 : e >= 640 ? 2 : 1;
|
|
34
|
-
},
|
|
34
|
+
}, Et = {
|
|
35
35
|
root: "dial-catalog-root",
|
|
36
36
|
toolbar: "dial-catalog-toolbar",
|
|
37
37
|
card: "dial-catalog-card",
|
|
38
38
|
favoriteCard: "dial-catalog-favorite-card",
|
|
39
39
|
listView: "dial-catalog-list-view"
|
|
40
|
-
},
|
|
40
|
+
}, Dt = (e) => {
|
|
41
41
|
let { colors: t } = e ?? {};
|
|
42
42
|
return j({
|
|
43
43
|
"--cat-bg": t?.background,
|
|
44
44
|
"--cat-heading-title-text": t?.headingTitleText
|
|
45
45
|
});
|
|
46
|
-
},
|
|
46
|
+
}, Ot = 1180, kt = (e) => e >= 1280 ? 4 : e >= 966 ? 3 : e >= 620 ? 2 : 1, At = (e) => {
|
|
47
47
|
if (!e || e === document.body) return document.documentElement;
|
|
48
48
|
let { overflow: t, overflowY: n } = getComputedStyle(e);
|
|
49
|
-
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e :
|
|
50
|
-
},
|
|
51
|
-
let r =
|
|
49
|
+
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : At(e.parentElement);
|
|
50
|
+
}, jt = 10, Mt = 10, Nt = 30, Pt = (e, t, n = jt) => {
|
|
51
|
+
let r = L(null), [i, a] = R({
|
|
52
52
|
start: 0,
|
|
53
|
-
end:
|
|
53
|
+
end: Nt
|
|
54
54
|
});
|
|
55
|
-
|
|
55
|
+
F(() => {
|
|
56
56
|
let i = r.current;
|
|
57
57
|
if (!i) return;
|
|
58
|
-
let o =
|
|
58
|
+
let o = At(i.parentElement), s = () => {
|
|
59
59
|
let r = o.clientHeight;
|
|
60
60
|
if (r === 0 || i.clientWidth === 0 || getComputedStyle(i).visibility === "hidden") return;
|
|
61
|
-
let s = i.getBoundingClientRect().top, c = o.getBoundingClientRect().top, l = Math.max(0, c - s), u = Math.floor(l / t), d = Math.ceil(r / t), f = Math.max(0, Math.floor((u - n) /
|
|
61
|
+
let s = i.getBoundingClientRect().top, c = o.getBoundingClientRect().top, l = Math.max(0, c - s), u = Math.floor(l / t), d = Math.ceil(r / t), f = Math.max(0, Math.floor((u - n) / Mt) * Mt), p = Math.min(e, Math.ceil((u + d + n) / Mt) * Mt);
|
|
62
62
|
a((e) => e.start === f && e.end === p ? e : {
|
|
63
63
|
start: f,
|
|
64
64
|
end: p
|
|
@@ -74,28 +74,28 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
74
74
|
t,
|
|
75
75
|
n
|
|
76
76
|
]);
|
|
77
|
-
let o = Math.max(0, Math.floor((e - 1) /
|
|
77
|
+
let o = Math.max(0, Math.floor((e - 1) / Mt) * Mt), s = Math.min(i.start, o);
|
|
78
78
|
return {
|
|
79
79
|
containerRef: r,
|
|
80
80
|
startRow: s,
|
|
81
|
-
endRow: Math.min(e, Math.max(i.end, s +
|
|
81
|
+
endRow: Math.min(e, Math.max(i.end, s + Mt))
|
|
82
82
|
};
|
|
83
|
-
},
|
|
84
|
-
let r =
|
|
85
|
-
let t = typeof window < "u" ? window.innerWidth : 1440, r = Math.max(0, t - (t >= w ? 60 : 0)), i =
|
|
83
|
+
}, Ft = (e, { overscan: t = 3, isFullWidth: n = !1 } = {}) => {
|
|
84
|
+
let r = L(null), [i, a] = R(() => {
|
|
85
|
+
let t = typeof window < "u" ? window.innerWidth : 1440, r = Math.max(0, t - (t >= w ? 60 : 0)), i = kt((n ? r : Math.min(Ot, r)) - 64), a = Math.ceil(e / i);
|
|
86
86
|
return {
|
|
87
87
|
startRow: 0,
|
|
88
88
|
endRow: Math.min(a, 12),
|
|
89
89
|
columnCount: i
|
|
90
90
|
};
|
|
91
91
|
});
|
|
92
|
-
|
|
92
|
+
F(() => {
|
|
93
93
|
let n = r.current;
|
|
94
94
|
if (!n) return;
|
|
95
|
-
let i =
|
|
95
|
+
let i = At(n.parentElement), o = () => {
|
|
96
96
|
let r = n.clientWidth, o = i.clientHeight;
|
|
97
97
|
if (r === 0 || o === 0) return;
|
|
98
|
-
let s = n.getBoundingClientRect(), c = i.getBoundingClientRect(), l =
|
|
98
|
+
let s = n.getBoundingClientRect(), c = i.getBoundingClientRect(), l = kt(r), u = Math.ceil(e / l), d = Math.max(0, c.top - s.top), f = Math.max(0, Math.floor(d / 268) - t), p = Math.min(u, f + Math.ceil(o / 268) + 2 * t);
|
|
99
99
|
a((e) => e.startRow === f && e.endRow === p && e.columnCount === l ? e : {
|
|
100
100
|
startRow: f,
|
|
101
101
|
endRow: p,
|
|
@@ -117,7 +117,7 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
117
117
|
rowCount: o,
|
|
118
118
|
totalHeight: o * 268
|
|
119
119
|
};
|
|
120
|
-
},
|
|
120
|
+
}, It = {
|
|
121
121
|
skeletonColor: "var(--cg-skeleton-color, var(--bg-control-disable-primary, #dce0e8))",
|
|
122
122
|
card: "_card_18c2b_2",
|
|
123
123
|
emptyStarHidden: "_emptyStarHidden_18c2b_2",
|
|
@@ -127,63 +127,63 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
127
127
|
selectedCard: "_selectedCard_18c2b_37",
|
|
128
128
|
checkIcon: "_checkIcon_18c2b_42",
|
|
129
129
|
footer: "_footer_18c2b_46"
|
|
130
|
-
},
|
|
130
|
+
}, Lt = {
|
|
131
131
|
name: "_name_188yo_1",
|
|
132
132
|
lastUsed: "_lastUsed_188yo_5",
|
|
133
133
|
version: "_version_188yo_9"
|
|
134
|
-
},
|
|
135
|
-
let f = c?.colors, p = c?.typography ?? {}, m = a ===
|
|
134
|
+
}, Rt = ({ icon: e, type: t, name: n, version: r, lastUsed: i, size: a, query: o, className: s, styles: c, lastUsedTrailing: l, iconClassName: u, iconOverlay: d }) => {
|
|
135
|
+
let f = c?.colors, p = c?.typography ?? {}, m = a === X.LG, h = m ? "size-[52px] rounded-[14px]" : "size-[44px] rounded-lg", g = m ? 54 : 44, _ = j({
|
|
136
136
|
"--ai-name-text": f?.nameColor,
|
|
137
137
|
"--ai-last-used-text": f?.lastUsedColor,
|
|
138
138
|
"--ai-version-text": f?.versionColor
|
|
139
139
|
});
|
|
140
|
-
return /* @__PURE__ */
|
|
140
|
+
return /* @__PURE__ */ K("div", {
|
|
141
141
|
className: M("flex min-w-0 items-start gap-3", s),
|
|
142
142
|
style: _,
|
|
143
|
-
children: [/* @__PURE__ */
|
|
143
|
+
children: [/* @__PURE__ */ K("div", {
|
|
144
144
|
className: M("relative flex-shrink-0", h, u),
|
|
145
|
-
children: [/* @__PURE__ */
|
|
145
|
+
children: [/* @__PURE__ */ G("div", {
|
|
146
146
|
className: "size-full overflow-hidden rounded-[inherit]",
|
|
147
|
-
children: /* @__PURE__ */
|
|
147
|
+
children: /* @__PURE__ */ G(T, {
|
|
148
148
|
src: e ?? void 0,
|
|
149
149
|
size: g,
|
|
150
150
|
initialsName: n,
|
|
151
151
|
styles: { badgeClassName: M(m ? "rounded-[14px]" : "rounded-[12px]") }
|
|
152
152
|
})
|
|
153
153
|
}), d]
|
|
154
|
-
}), /* @__PURE__ */
|
|
154
|
+
}), /* @__PURE__ */ K("div", {
|
|
155
155
|
className: "flex min-w-0 flex-1 flex-col gap-1",
|
|
156
|
-
children: [/* @__PURE__ */
|
|
156
|
+
children: [/* @__PURE__ */ G(D, {
|
|
157
157
|
type: t,
|
|
158
158
|
className: p?.typeClassName
|
|
159
|
-
}), /* @__PURE__ */
|
|
159
|
+
}), /* @__PURE__ */ K("div", {
|
|
160
160
|
className: "flex min-w-0 flex-col",
|
|
161
|
-
children: [/* @__PURE__ */
|
|
161
|
+
children: [/* @__PURE__ */ K("div", {
|
|
162
162
|
className: "flex min-w-0 items-start gap-1 overflow-hidden",
|
|
163
|
-
children: [/* @__PURE__ */
|
|
164
|
-
text: o ? /* @__PURE__ */
|
|
163
|
+
children: [/* @__PURE__ */ G(xe, {
|
|
164
|
+
text: o ? /* @__PURE__ */ G(Te, {
|
|
165
165
|
text: n,
|
|
166
166
|
query: o
|
|
167
167
|
}) : n,
|
|
168
|
-
className: M(r ? "min-w-0 max-w-[66%] shrink-0" : "min-w-0 flex-1", p?.nameClassName ?? "dial-body-semi-text",
|
|
169
|
-
}), r && /* @__PURE__ */
|
|
168
|
+
className: M(r ? "min-w-0 max-w-[66%] shrink-0" : "min-w-0 flex-1", p?.nameClassName ?? "dial-body-semi-text", Lt.name)
|
|
169
|
+
}), r && /* @__PURE__ */ G(xe, {
|
|
170
170
|
text: r,
|
|
171
|
-
className: M("min-w-0 flex-1 text-end tabular-nums", p?.versionClassName ?? "dial-tiny-text",
|
|
171
|
+
className: M("min-w-0 flex-1 text-end tabular-nums", p?.versionClassName ?? "dial-tiny-text", Lt.version)
|
|
172
172
|
})]
|
|
173
|
-
}), m && i != null && /* @__PURE__ */
|
|
173
|
+
}), m && i != null && /* @__PURE__ */ K("div", {
|
|
174
174
|
className: "flex items-center gap-2",
|
|
175
|
-
children: [/* @__PURE__ */
|
|
176
|
-
className: M("tabular-nums", p?.lastUsedClassName ?? "dial-tiny-text",
|
|
175
|
+
children: [/* @__PURE__ */ G("span", {
|
|
176
|
+
className: M("tabular-nums", p?.lastUsedClassName ?? "dial-tiny-text", Lt.lastUsed),
|
|
177
177
|
children: i
|
|
178
178
|
}), l]
|
|
179
179
|
})]
|
|
180
180
|
})]
|
|
181
181
|
})]
|
|
182
182
|
});
|
|
183
|
-
},
|
|
183
|
+
}, zt = { icon: "_icon_a0p4u_1" }, Bt = ({ credentials: e, loggedOutLabel: t = "Authorize to use this toolset.", className: n, colors: r }) => e == null || d(e) == null ? null : /* @__PURE__ */ G(He, {
|
|
184
184
|
tooltip: t,
|
|
185
185
|
asChild: !0,
|
|
186
|
-
children: /* @__PURE__ */
|
|
186
|
+
children: /* @__PURE__ */ G("span", {
|
|
187
187
|
role: "img",
|
|
188
188
|
"aria-label": t,
|
|
189
189
|
style: j({
|
|
@@ -191,46 +191,47 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
191
191
|
"--cat-cred-badge-icon": r?.icon
|
|
192
192
|
}),
|
|
193
193
|
className: M("absolute -bottom-1 -end-1 shrink-0", n),
|
|
194
|
-
children: /* @__PURE__ */
|
|
194
|
+
children: /* @__PURE__ */ G(We, {
|
|
195
195
|
size: z.SM,
|
|
196
|
-
className:
|
|
196
|
+
className: zt.icon,
|
|
197
197
|
"aria-hidden": !0
|
|
198
198
|
})
|
|
199
199
|
})
|
|
200
|
-
}),
|
|
200
|
+
}), Vt = {
|
|
201
201
|
starFilledIcon: "_starFilledIcon_po6zj_1",
|
|
202
202
|
starPop: "_starPop_po6zj_1"
|
|
203
|
-
},
|
|
203
|
+
}, Ht = ({ isStarred: e, onClick: t, size: n, ariaLabel: r = "Toggle favorite", className: i, starFilledColor: a }) => /* @__PURE__ */ G(Ve, {
|
|
204
204
|
size: n,
|
|
205
205
|
style: j({ "--cat-star-filled": a }),
|
|
206
206
|
className: i,
|
|
207
207
|
isSelected: e,
|
|
208
|
-
icon: /* @__PURE__ */
|
|
208
|
+
icon: /* @__PURE__ */ G(ut, {
|
|
209
209
|
size: z.SM,
|
|
210
210
|
stroke: B,
|
|
211
211
|
"aria-hidden": !0
|
|
212
212
|
}),
|
|
213
|
-
selectedIcon: /* @__PURE__ */
|
|
213
|
+
selectedIcon: /* @__PURE__ */ G(dt, {
|
|
214
214
|
size: z.SM,
|
|
215
|
-
className:
|
|
215
|
+
className: Vt.starFilledIcon,
|
|
216
216
|
"aria-hidden": !0
|
|
217
217
|
}),
|
|
218
218
|
"aria-label": r,
|
|
219
219
|
onClick: t
|
|
220
|
-
}),
|
|
220
|
+
}), Ut = { tag: "_tag_iqin5_3" }, Wt = ({ label: e, className: t, badgeClassName: n = "dial-tiny-text", colors: r }) => /* @__PURE__ */ G(ce, {
|
|
221
|
+
label: e,
|
|
222
|
+
textClassName: n,
|
|
221
223
|
style: j({
|
|
222
224
|
"--cat-card-tag-bg": r?.background,
|
|
223
225
|
"--cat-card-tag-text": r?.text,
|
|
224
226
|
"--cat-card-tag-border": r?.border
|
|
225
227
|
}),
|
|
226
|
-
className: M(
|
|
227
|
-
|
|
228
|
-
}), Wt = ({ label: e, className: t = "dial-tiny-text", colors: n }) => /* @__PURE__ */ q(Ut, {
|
|
228
|
+
className: M(Ut.tag, t)
|
|
229
|
+
}), Gt = ({ label: e, className: t = "dial-tiny-text", colors: n }) => /* @__PURE__ */ G(Wt, {
|
|
229
230
|
label: e,
|
|
230
231
|
badgeClassName: t,
|
|
231
232
|
colors: n
|
|
232
|
-
}),
|
|
233
|
-
let r =
|
|
233
|
+
}), Kt = 8, qt = ({ topics: e, overflowAriaLabel: t, className: n }) => {
|
|
234
|
+
let r = L(null), i = L([]), a = L([]), o = L(null), s = L(Infinity), [c, l] = R(e.length), u = e.join("\0"), d = P(() => {
|
|
234
235
|
let t = r.current;
|
|
235
236
|
if (!t || e.length === 0) return;
|
|
236
237
|
let n = t.clientWidth;
|
|
@@ -241,58 +242,58 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
241
242
|
let u = o.current?.offsetWidth ?? 0, d = 0, f = 0;
|
|
242
243
|
for (let t = 0; t < e.length; t++) {
|
|
243
244
|
let r = e.length - (t + 1) > 0;
|
|
244
|
-
if (d + (t > 0 ?
|
|
245
|
-
d += (t > 0 ?
|
|
245
|
+
if (d + (t > 0 ? Kt : 0) + c[t] + (r ? Kt + u : 0) > n) break;
|
|
246
|
+
d += (t > 0 ? Kt : 0) + c[t], f = t + 1;
|
|
246
247
|
}
|
|
247
248
|
l(Math.min(f, s.current));
|
|
248
249
|
}, [e.length]);
|
|
249
|
-
if (
|
|
250
|
+
if (se(() => {
|
|
250
251
|
a.current = [], s.current = Infinity, l(e.length);
|
|
251
|
-
}, [u]),
|
|
252
|
+
}, [u]), se(() => {
|
|
252
253
|
d();
|
|
253
|
-
}),
|
|
254
|
+
}), se(() => {
|
|
254
255
|
let e = r.current;
|
|
255
256
|
!e || c === 0 || e.scrollWidth <= e.clientWidth || (s.current = c - 1, l(s.current));
|
|
256
|
-
}, [c]),
|
|
257
|
+
}, [c]), F(() => {
|
|
257
258
|
let e = r.current;
|
|
258
259
|
if (!e) return;
|
|
259
260
|
let t = new ResizeObserver(() => {
|
|
260
261
|
s.current = Infinity, d();
|
|
261
262
|
});
|
|
262
263
|
return t.observe(e), () => t.disconnect();
|
|
263
|
-
}, [d]), e.length === 0) return /* @__PURE__ */
|
|
264
|
+
}, [d]), e.length === 0) return /* @__PURE__ */ G("div", {
|
|
264
265
|
ref: r,
|
|
265
266
|
className: M("relative flex min-w-0 flex-1 flex-nowrap items-center gap-2 overflow-hidden", n)
|
|
266
267
|
});
|
|
267
268
|
let f = e.length - c;
|
|
268
|
-
return /* @__PURE__ */
|
|
269
|
+
return /* @__PURE__ */ K("div", {
|
|
269
270
|
ref: r,
|
|
270
271
|
className: M("flex min-w-0 flex-1 flex-nowrap items-center gap-2 overflow-hidden", n),
|
|
271
272
|
children: [
|
|
272
|
-
e.slice(0, c).map((e, t) => /* @__PURE__ */
|
|
273
|
+
e.slice(0, c).map((e, t) => /* @__PURE__ */ G("div", {
|
|
273
274
|
ref: (e) => {
|
|
274
275
|
i.current[t] = e;
|
|
275
276
|
},
|
|
276
|
-
children: /* @__PURE__ */
|
|
277
|
+
children: /* @__PURE__ */ G(Gt, { label: e })
|
|
277
278
|
}, e)),
|
|
278
|
-
f > 0 && /* @__PURE__ */
|
|
279
|
+
f > 0 && /* @__PURE__ */ G(He, {
|
|
279
280
|
tooltip: e.slice(c).join(", "),
|
|
280
|
-
children: /* @__PURE__ */
|
|
281
|
+
children: /* @__PURE__ */ G("span", {
|
|
281
282
|
"aria-label": t?.(f) ?? `and ${f} more topics`,
|
|
282
|
-
children: /* @__PURE__ */
|
|
283
|
+
children: /* @__PURE__ */ G(Gt, { label: `+${f}` })
|
|
283
284
|
})
|
|
284
285
|
}),
|
|
285
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ G("div", {
|
|
286
287
|
ref: o,
|
|
287
288
|
"aria-hidden": !0,
|
|
288
289
|
className: "invisible absolute start-0 top-0",
|
|
289
|
-
children: /* @__PURE__ */
|
|
290
|
+
children: /* @__PURE__ */ G(Gt, { label: `+${e.length}` })
|
|
290
291
|
})
|
|
291
292
|
]
|
|
292
293
|
});
|
|
293
|
-
},
|
|
294
|
-
let [m, h] =
|
|
295
|
-
|
|
294
|
+
}, Jt = { img: () => null }, Yt = (e) => e.target instanceof Element && e.target.closest("a") !== null, Xt = ({ 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, isReadonly: p = !1 }) => {
|
|
295
|
+
let [m, h] = R(r);
|
|
296
|
+
F(() => {
|
|
296
297
|
h(r);
|
|
297
298
|
}, [e.id, r]);
|
|
298
299
|
let g = d?.typography?.descriptionClassName ?? "dial-small-paragraph-text", _ = d?.typography?.featuredChipClassName, v = d?.typography?.folderLabelClassName ?? "dial-tiny-text", y = d?.typography?.folderLeafClassName ?? "dial-tiny-semi-text", b = j({
|
|
@@ -302,10 +303,10 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
302
303
|
"--cg-check-icon": d?.colors?.checkIcon,
|
|
303
304
|
"--cg-footer-border": d?.colors?.footerBorder
|
|
304
305
|
}), x = !p && e.isFeatured === !0, S = !p && a?.(e) !== !1, C = !p || e.folder.length > 0, w = n ? (t) => {
|
|
305
|
-
|
|
306
|
-
} : void 0, T =
|
|
307
|
-
!n ||
|
|
308
|
-
}, [n, e]), E =
|
|
306
|
+
Yt(t) || n(e);
|
|
307
|
+
} : void 0, T = P((t) => {
|
|
308
|
+
!n || Yt(t) || (t.key === "Enter" || t.key === " ") && (t.preventDefault(), n(e));
|
|
309
|
+
}, [n, e]), E = P((t) => {
|
|
309
310
|
t.stopPropagation();
|
|
310
311
|
let n = !m;
|
|
311
312
|
h(n), i?.(e.id, n);
|
|
@@ -314,7 +315,7 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
314
315
|
i,
|
|
315
316
|
e.id
|
|
316
317
|
]);
|
|
317
|
-
return /* @__PURE__ */
|
|
318
|
+
return /* @__PURE__ */ K(pe, {
|
|
318
319
|
...n ? {
|
|
319
320
|
role: "button",
|
|
320
321
|
tabIndex: 0,
|
|
@@ -323,39 +324,39 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
323
324
|
} : {},
|
|
324
325
|
"aria-label": e.name,
|
|
325
326
|
style: b,
|
|
326
|
-
className: M("box-border cursor-pointer gap-3",
|
|
327
|
+
className: M("box-border cursor-pointer gap-3", It.card, x ? It.featuredCard : void 0, l ? It.selectedCard : void 0, u, Et.card),
|
|
327
328
|
children: [
|
|
328
|
-
x && /* @__PURE__ */
|
|
329
|
+
x && /* @__PURE__ */ G("div", {
|
|
329
330
|
className: "absolute end-[22px] top-0 -translate-y-1/2",
|
|
330
|
-
children: /* @__PURE__ */
|
|
331
|
+
children: /* @__PURE__ */ G(O, {
|
|
331
332
|
label: o,
|
|
332
333
|
type: e.type,
|
|
333
334
|
className: _,
|
|
334
335
|
style: d?.colors?.featuredChipStyle
|
|
335
336
|
})
|
|
336
337
|
}),
|
|
337
|
-
l && /* @__PURE__ */
|
|
338
|
+
l && /* @__PURE__ */ G(qe, {
|
|
338
339
|
size: z.SM,
|
|
339
|
-
className: M("absolute end-3 top-3 shrink-0",
|
|
340
|
+
className: M("absolute end-3 top-3 shrink-0", It.checkIcon),
|
|
340
341
|
"aria-hidden": !0,
|
|
341
342
|
stroke: B
|
|
342
343
|
}),
|
|
343
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ G(Rt, {
|
|
344
345
|
icon: e.iconUrl,
|
|
345
346
|
type: e.type,
|
|
346
347
|
name: e.name,
|
|
347
348
|
version: e.version,
|
|
348
|
-
size:
|
|
349
|
+
size: X.SM,
|
|
349
350
|
query: t,
|
|
350
|
-
iconClassName:
|
|
351
|
-
iconOverlay: /* @__PURE__ */
|
|
351
|
+
iconClassName: It.cardIcon,
|
|
352
|
+
iconOverlay: /* @__PURE__ */ G(Bt, {
|
|
352
353
|
credentials: e.credentials,
|
|
353
354
|
loggedOutLabel: f
|
|
354
355
|
})
|
|
355
356
|
}),
|
|
356
|
-
/* @__PURE__ */
|
|
357
|
-
className: M("line-clamp-2 min-h-[2lh] break-words",
|
|
358
|
-
children: e.description && /* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ G("div", {
|
|
358
|
+
className: M("line-clamp-2 min-h-[2lh] break-words", It.description),
|
|
359
|
+
children: e.description && /* @__PURE__ */ G(A, {
|
|
359
360
|
content: e.description,
|
|
360
361
|
classNames: {
|
|
361
362
|
p: g,
|
|
@@ -368,38 +369,38 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
368
369
|
h5: g,
|
|
369
370
|
h6: g
|
|
370
371
|
},
|
|
371
|
-
components:
|
|
372
|
+
components: Jt
|
|
372
373
|
})
|
|
373
374
|
}),
|
|
374
|
-
/* @__PURE__ */
|
|
375
|
+
/* @__PURE__ */ G("div", {
|
|
375
376
|
className: "mt-auto flex items-center gap-2",
|
|
376
|
-
children: /* @__PURE__ */
|
|
377
|
+
children: /* @__PURE__ */ G(qt, { topics: e.topics })
|
|
377
378
|
}),
|
|
378
|
-
C && /* @__PURE__ */
|
|
379
|
-
className: M("pt-3", !p && M("border-t",
|
|
380
|
-
children: /* @__PURE__ */
|
|
379
|
+
C && /* @__PURE__ */ G("div", {
|
|
380
|
+
className: M("pt-3", !p && M("border-t", It.footer)),
|
|
381
|
+
children: /* @__PURE__ */ K("div", {
|
|
381
382
|
className: "flex items-center gap-2",
|
|
382
|
-
children: [/* @__PURE__ */
|
|
383
|
+
children: [/* @__PURE__ */ G("div", {
|
|
383
384
|
className: "min-w-0 flex-1",
|
|
384
|
-
children: e.folder.length > 0 && /* @__PURE__ */
|
|
385
|
+
children: e.folder.length > 0 && /* @__PURE__ */ G(Se, {
|
|
385
386
|
segments: e.folder,
|
|
386
387
|
labelClassName: v,
|
|
387
388
|
leafClassName: y
|
|
388
389
|
})
|
|
389
|
-
}), S && /* @__PURE__ */
|
|
390
|
+
}), S && /* @__PURE__ */ G(Ht, {
|
|
390
391
|
isStarred: m,
|
|
391
|
-
size:
|
|
392
|
+
size: be.Small,
|
|
392
393
|
onClick: E,
|
|
393
394
|
ariaLabel: m ? c : s,
|
|
394
|
-
className: M(
|
|
395
|
+
className: M(It.starBtn, !m && It.emptyStarHidden)
|
|
395
396
|
})]
|
|
396
397
|
})
|
|
397
398
|
})
|
|
398
399
|
]
|
|
399
400
|
});
|
|
400
|
-
},
|
|
401
|
+
}, Zt = N(({ rowIndex: e, items: t, columnCount: n, query: r, onToggleFavorite: i, isFavoriteVisible: a, onItemClick: o, featuredLabel: s, addToFavoritesAriaLabel: c, removeFromFavoritesAriaLabel: l, selectedItemId: u, credentialsBadgeLoggedOutLabel: d, isReadonly: f, featuredChipStyle: p }) => {
|
|
401
402
|
let m = e * n, h = t.slice(m, m + n);
|
|
402
|
-
return /* @__PURE__ */
|
|
403
|
+
return /* @__PURE__ */ G("div", {
|
|
403
404
|
style: {
|
|
404
405
|
top: e * 268,
|
|
405
406
|
height: 268
|
|
@@ -407,9 +408,9 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
407
408
|
className: "absolute flex w-full gap-5 pb-5",
|
|
408
409
|
children: Array.from({ length: n }, (e, t) => {
|
|
409
410
|
let n = h[t];
|
|
410
|
-
return /* @__PURE__ */
|
|
411
|
+
return /* @__PURE__ */ G("div", {
|
|
411
412
|
className: "h-full min-w-0 flex-1",
|
|
412
|
-
children: n && /* @__PURE__ */
|
|
413
|
+
children: n && /* @__PURE__ */ G(Xt, {
|
|
413
414
|
item: n,
|
|
414
415
|
query: r,
|
|
415
416
|
initialIsStarred: n.isStarred,
|
|
@@ -428,8 +429,8 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
428
429
|
}, n?.id ?? `spacer-${t}`);
|
|
429
430
|
})
|
|
430
431
|
});
|
|
431
|
-
}),
|
|
432
|
-
let p = a?.noResultsTitle ?? "No results", m = a?.featuredLabel ?? "Featured", h = a?.addToFavoritesAriaLabel ?? "Add to favorites", g = a?.removeFromFavoritesAriaLabel ?? "Remove from favorites", _ = a?.credentialsBadgeLoggedOutLabel ?? "Authorize to use this toolset.", { containerRef: v, startRow: y, endRow: b, columnCount: x, totalHeight: S } =
|
|
432
|
+
}), Qt = N(({ items: e, query: t = "", onToggleFavorite: n, isFavoriteVisible: r, onItemClick: i, titles: a, isLoading: o, selectedItemId: s, skeletonColor: c = It.skeletonColor, skeletonCardBackground: l, isReadonly: u = !1, isFullWidth: d = !1, featuredChipStyle: f }) => {
|
|
433
|
+
let p = a?.noResultsTitle ?? "No results", m = a?.featuredLabel ?? "Featured", h = a?.addToFavoritesAriaLabel ?? "Add to favorites", g = a?.removeFromFavoritesAriaLabel ?? "Remove from favorites", _ = a?.credentialsBadgeLoggedOutLabel ?? "Authorize to use this toolset.", { containerRef: v, startRow: y, endRow: b, columnCount: x, totalHeight: S } = Ft(e.length, { isFullWidth: d }), C = I(() => ({
|
|
433
434
|
items: e,
|
|
434
435
|
columnCount: x,
|
|
435
436
|
query: t,
|
|
@@ -458,19 +459,19 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
458
459
|
u,
|
|
459
460
|
f
|
|
460
461
|
]);
|
|
461
|
-
return o ? /* @__PURE__ */
|
|
462
|
+
return o ? /* @__PURE__ */ G("div", {
|
|
462
463
|
className: "grid gap-5 p-5",
|
|
463
464
|
style: {
|
|
464
465
|
gridTemplateColumns: `repeat(${x}, minmax(0, 1fr))`,
|
|
465
466
|
...j({ "--cg-skeleton-card-bg": l })
|
|
466
467
|
},
|
|
467
|
-
children: Array.from({ length: x * 3 }, (e, t) => /* @__PURE__ */
|
|
468
|
-
className: M("rounded-md border p-4",
|
|
468
|
+
children: Array.from({ length: x * 3 }, (e, t) => /* @__PURE__ */ G("div", {
|
|
469
|
+
className: M("rounded-md border p-4", It.skeletonCard),
|
|
469
470
|
style: { height: 248 },
|
|
470
|
-
children: /* @__PURE__ */
|
|
471
|
+
children: /* @__PURE__ */ G(Le, {
|
|
471
472
|
avatar: {
|
|
472
473
|
size: 48,
|
|
473
|
-
shape:
|
|
474
|
+
shape: Re.Square
|
|
474
475
|
},
|
|
475
476
|
showTitle: { width: `${60 + t * 17 % 30}%` },
|
|
476
477
|
paragraph: { rows: 3 },
|
|
@@ -478,35 +479,35 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
478
479
|
color: c
|
|
479
480
|
})
|
|
480
481
|
}, t))
|
|
481
|
-
}) : e.length === 0 ? /* @__PURE__ */
|
|
482
|
+
}) : e.length === 0 ? /* @__PURE__ */ G("div", {
|
|
482
483
|
className: "flex size-full flex-col items-center justify-center",
|
|
483
|
-
children: /* @__PURE__ */
|
|
484
|
-
}) : /* @__PURE__ */
|
|
484
|
+
children: /* @__PURE__ */ G(ne, { label: p })
|
|
485
|
+
}) : /* @__PURE__ */ G("div", {
|
|
485
486
|
ref: v,
|
|
486
487
|
className: "relative",
|
|
487
488
|
style: { height: S },
|
|
488
489
|
children: Array.from({ length: b - y }, (e, t) => {
|
|
489
490
|
let n = y + t;
|
|
490
|
-
return /* @__PURE__ */
|
|
491
|
+
return /* @__PURE__ */ G(Zt, {
|
|
491
492
|
rowIndex: n,
|
|
492
493
|
...C
|
|
493
494
|
}, n);
|
|
494
495
|
})
|
|
495
496
|
});
|
|
496
|
-
}),
|
|
497
|
+
}), $t = (e) => e.reduce((e, t) => t.type === Z.File ? e + 1 : e + $t(t.items), 0), en = (e) => {
|
|
497
498
|
let t = /* @__PURE__ */ new Set(), n = (e) => {
|
|
498
|
-
for (let r of e) r.type ===
|
|
499
|
+
for (let r of e) r.type === Z.Folder && (t.add(r.id), n(r.items));
|
|
499
500
|
};
|
|
500
501
|
return n(e), t;
|
|
501
|
-
},
|
|
502
|
+
}, tn = (e, t) => {
|
|
502
503
|
if (t != null) for (let n of e) {
|
|
503
504
|
if (n.id === t) return n.name;
|
|
504
|
-
if (n.type ===
|
|
505
|
-
let e =
|
|
505
|
+
if (n.type === Z.Folder) {
|
|
506
|
+
let e = tn(n.items, t);
|
|
506
507
|
if (e != null) return e;
|
|
507
508
|
}
|
|
508
509
|
}
|
|
509
|
-
},
|
|
510
|
+
}, nn = {
|
|
510
511
|
sectionHeading: "_sectionHeading_jnq93_1",
|
|
511
512
|
rowAlt: "_rowAlt_jnq93_5",
|
|
512
513
|
label: "_label_jnq93_9",
|
|
@@ -514,19 +515,19 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
514
515
|
valueTrue: "_valueTrue_jnq93_17",
|
|
515
516
|
valueFalse: "_valueFalse_jnq93_21",
|
|
516
517
|
valueText: "_valueText_jnq93_25"
|
|
517
|
-
},
|
|
518
|
+
}, rn = ({ value: e, valueClassName: t, valueTrueClassName: n, checkIconClassName: r, yesLabel: i, noLabel: a }) => e === !0 ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(Ze, {
|
|
518
519
|
size: z.MD,
|
|
519
|
-
className: M(r,
|
|
520
|
-
}), /* @__PURE__ */
|
|
521
|
-
className: M(n,
|
|
520
|
+
className: M(r, nn.checkIcon)
|
|
521
|
+
}), /* @__PURE__ */ G("span", {
|
|
522
|
+
className: M(n, nn.valueTrue),
|
|
522
523
|
children: i
|
|
523
|
-
})] }) : e === !1 ? /* @__PURE__ */
|
|
524
|
-
className: M(t,
|
|
524
|
+
})] }) : e === !1 ? /* @__PURE__ */ G("span", {
|
|
525
|
+
className: M(t, nn.valueFalse),
|
|
525
526
|
children: a
|
|
526
|
-
}) : /* @__PURE__ */
|
|
527
|
-
className: M("min-w-0 break-words", t,
|
|
527
|
+
}) : /* @__PURE__ */ G("span", {
|
|
528
|
+
className: M("min-w-0 break-words", t, nn.valueText),
|
|
528
529
|
children: e
|
|
529
|
-
}),
|
|
530
|
+
}), an = ({ sectionLabel: e = "Section", values: t, labelClassName: n = "dial-small-semi-text", valueClassName: r = "dial-small-text", valueTrueClassName: i = "dial-small-semi-text", checkIconClassName: a, sectionClassName: o = "dial-caption-text", yesLabel: s = "Yes", noLabel: c = "No", colors: l }) => /* @__PURE__ */ G("div", {
|
|
530
531
|
className: "flex flex-col",
|
|
531
532
|
style: j({
|
|
532
533
|
"--tv-section-heading": l?.sectionHeading,
|
|
@@ -537,19 +538,19 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
537
538
|
"--tv-value-false": l?.valueFalse,
|
|
538
539
|
"--tv-value-text": l?.valueText
|
|
539
540
|
}),
|
|
540
|
-
children: t != null && t.length > 0 && /* @__PURE__ */
|
|
541
|
-
className: M("mb-3 mt-0", o,
|
|
541
|
+
children: t != null && t.length > 0 && /* @__PURE__ */ K("section", { children: [/* @__PURE__ */ G("p", {
|
|
542
|
+
className: M("mb-3 mt-0", o, nn.sectionHeading),
|
|
542
543
|
children: e
|
|
543
|
-
}), /* @__PURE__ */
|
|
544
|
+
}), /* @__PURE__ */ G("ul", {
|
|
544
545
|
className: "m-0 list-none p-0",
|
|
545
|
-
children: t.map((e, t) => /* @__PURE__ */
|
|
546
|
-
className: M("flex items-center rounded px-3 py-2", t % 2 == 0 ?
|
|
547
|
-
children: [/* @__PURE__ */
|
|
548
|
-
className: M(n,
|
|
546
|
+
children: t.map((e, t) => /* @__PURE__ */ K("li", {
|
|
547
|
+
className: M("flex items-center rounded px-3 py-2", t % 2 == 0 ? nn.rowAlt : void 0),
|
|
548
|
+
children: [/* @__PURE__ */ G("span", {
|
|
549
|
+
className: M(n, nn.label, "w-2/5 shrink-0"),
|
|
549
550
|
children: e.label
|
|
550
|
-
}), /* @__PURE__ */
|
|
551
|
+
}), /* @__PURE__ */ G("div", {
|
|
551
552
|
className: "flex w-3/5 min-w-0 items-center gap-1",
|
|
552
|
-
children: /* @__PURE__ */
|
|
553
|
+
children: /* @__PURE__ */ G(rn, {
|
|
553
554
|
value: e.value,
|
|
554
555
|
valueClassName: r,
|
|
555
556
|
valueTrueClassName: i,
|
|
@@ -560,46 +561,46 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
560
561
|
})]
|
|
561
562
|
}, e.label))
|
|
562
563
|
})] })
|
|
563
|
-
}),
|
|
564
|
-
[
|
|
565
|
-
[
|
|
566
|
-
[
|
|
567
|
-
},
|
|
568
|
-
[
|
|
569
|
-
[
|
|
570
|
-
[
|
|
571
|
-
},
|
|
572
|
-
let [s, c] =
|
|
573
|
-
|
|
574
|
-
c(e[0]?.language ??
|
|
564
|
+
}), on = { sectionHeading: "_sectionHeading_148lj_1" }, sn = {
|
|
565
|
+
[q.Python]: "Python",
|
|
566
|
+
[q.Curl]: "cURL",
|
|
567
|
+
[q.JavaScript]: "JavaScript"
|
|
568
|
+
}, cn = {
|
|
569
|
+
[q.Python]: "python",
|
|
570
|
+
[q.Curl]: "bash",
|
|
571
|
+
[q.JavaScript]: "javascript"
|
|
572
|
+
}, ln = ({ 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" }) => {
|
|
573
|
+
let [s, c] = R(e[0]?.language ?? q.Python);
|
|
574
|
+
F(() => {
|
|
575
|
+
c(e[0]?.language ?? q.Python);
|
|
575
576
|
}, [e]);
|
|
576
|
-
let l =
|
|
577
|
+
let l = I(() => e.map((e) => ({
|
|
577
578
|
key: e.language,
|
|
578
|
-
label:
|
|
579
|
+
label: sn[e.language] ?? e.language,
|
|
579
580
|
onClick: () => c(e.language)
|
|
580
581
|
})), [e]), u = e.find((e) => e.language === s)?.code ?? "", d = e.length > 1;
|
|
581
|
-
return /* @__PURE__ */
|
|
582
|
-
className: M("mb-3 mt-0", o,
|
|
582
|
+
return /* @__PURE__ */ K("section", { children: [t != null && /* @__PURE__ */ G("p", {
|
|
583
|
+
className: M("mb-3 mt-0", o, on.sectionHeading),
|
|
583
584
|
children: t
|
|
584
|
-
}), /* @__PURE__ */
|
|
585
|
-
language:
|
|
586
|
-
title:
|
|
585
|
+
}), /* @__PURE__ */ G(k, {
|
|
586
|
+
language: cn[s] ?? s,
|
|
587
|
+
title: sn[s] ?? s,
|
|
587
588
|
value: u,
|
|
588
589
|
copyLabel: n,
|
|
589
590
|
copiedLabel: r,
|
|
590
591
|
codeClassName: i,
|
|
591
592
|
languageLabelClassName: a,
|
|
592
593
|
hideDownload: !0,
|
|
593
|
-
titleSlot: d ? /* @__PURE__ */
|
|
594
|
+
titleSlot: d ? /* @__PURE__ */ G(Ee, {
|
|
594
595
|
items: l,
|
|
595
596
|
matchReferenceWidth: !1,
|
|
596
597
|
placement: "bottom-end",
|
|
597
|
-
size:
|
|
598
|
+
size: be.Small,
|
|
598
599
|
selectedKey: s
|
|
599
600
|
}) : void 0
|
|
600
601
|
})] });
|
|
601
|
-
},
|
|
602
|
-
let [h, g] =
|
|
602
|
+
}, un = ({ api: e, resourceSectionLabel: t = "Resource", endpointSectionLabel: n = "Endpoint", snippetSectionLabel: r = "Code snippet", modelIdLabel: i = "Model ID", endpointLabel: a = "Endpoint", requestExampleLabel: o = "Request example", responseSchemaLabel: s = "Response schema", copyAriaLabel: c = "Copy", copiedStatusLabel: l = "Copied!", labelClassName: u = "dial-small-semi-text", valueClassName: d = "dial-small-text", codeClassName: f = "dial-code-text", codeTitleClassName: p = "dial-tiny-semi-text", sectionClassName: m = "dial-caption-text" }) => {
|
|
603
|
+
let [h, g] = R(0), _ = I(() => e.endpoints ?? [], [e.endpoints]), v = _.length > 0, y = _[h] ?? null, b = I(() => _.map((e, t) => ({
|
|
603
604
|
key: e.url,
|
|
604
605
|
label: e.label,
|
|
605
606
|
onClick: () => g(t)
|
|
@@ -609,17 +610,17 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
609
610
|
value: e.resource.modelId
|
|
610
611
|
});
|
|
611
612
|
let S = _.length > 1, C = x.length > 0, w = v ? null : e.resource?.endpointUrl, T = (e.snippets?.length ?? 0) > 0, E = e.requestExample != null, D = e.responseSchema != null;
|
|
612
|
-
return /* @__PURE__ */
|
|
613
|
+
return /* @__PURE__ */ K("div", {
|
|
613
614
|
className: "flex flex-col gap-6",
|
|
614
615
|
children: [
|
|
615
|
-
C && /* @__PURE__ */
|
|
616
|
+
C && /* @__PURE__ */ G(an, {
|
|
616
617
|
sectionLabel: t,
|
|
617
618
|
values: x,
|
|
618
619
|
labelClassName: u,
|
|
619
620
|
valueClassName: d,
|
|
620
621
|
sectionClassName: m
|
|
621
622
|
}),
|
|
622
|
-
w != null && /* @__PURE__ */
|
|
623
|
+
w != null && /* @__PURE__ */ G(k, {
|
|
623
624
|
language: a,
|
|
624
625
|
value: w,
|
|
625
626
|
copyLabel: c,
|
|
@@ -628,12 +629,12 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
628
629
|
languageLabelClassName: p,
|
|
629
630
|
hideDownload: !0
|
|
630
631
|
}),
|
|
631
|
-
v && /* @__PURE__ */
|
|
632
|
-
/* @__PURE__ */
|
|
633
|
-
className: M("mb-3 mt-0", m,
|
|
632
|
+
v && /* @__PURE__ */ K("section", { children: [
|
|
633
|
+
/* @__PURE__ */ G("p", {
|
|
634
|
+
className: M("mb-3 mt-0", m, on.sectionHeading),
|
|
634
635
|
children: n
|
|
635
636
|
}),
|
|
636
|
-
y != null && /* @__PURE__ */
|
|
637
|
+
y != null && /* @__PURE__ */ G(k, {
|
|
637
638
|
language: y.label,
|
|
638
639
|
value: y.url,
|
|
639
640
|
copyLabel: c,
|
|
@@ -641,17 +642,17 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
641
642
|
codeClassName: f,
|
|
642
643
|
languageLabelClassName: p,
|
|
643
644
|
hideDownload: !0,
|
|
644
|
-
titleSlot: S ? /* @__PURE__ */
|
|
645
|
+
titleSlot: S ? /* @__PURE__ */ G(Ee, {
|
|
645
646
|
items: b,
|
|
646
647
|
matchReferenceWidth: !1,
|
|
647
648
|
placement: "bottom-end",
|
|
648
|
-
size:
|
|
649
|
+
size: be.Small,
|
|
649
650
|
selectedKey: y.url
|
|
650
651
|
}) : void 0
|
|
651
652
|
}, h),
|
|
652
|
-
y?.snippets != null && y.snippets.length > 0 && /* @__PURE__ */
|
|
653
|
+
y?.snippets != null && y.snippets.length > 0 && /* @__PURE__ */ G("div", {
|
|
653
654
|
className: "mt-4",
|
|
654
|
-
children: /* @__PURE__ */
|
|
655
|
+
children: /* @__PURE__ */ G(ln, {
|
|
655
656
|
snippets: y.snippets,
|
|
656
657
|
copyAriaLabel: c,
|
|
657
658
|
copiedStatusLabel: l,
|
|
@@ -661,7 +662,7 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
661
662
|
}, h)
|
|
662
663
|
})
|
|
663
664
|
] }),
|
|
664
|
-
!v && T && /* @__PURE__ */
|
|
665
|
+
!v && T && /* @__PURE__ */ G(ln, {
|
|
665
666
|
snippets: e.snippets ?? [],
|
|
666
667
|
sectionLabel: r,
|
|
667
668
|
copyAriaLabel: c,
|
|
@@ -670,10 +671,10 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
670
671
|
codeTitleClassName: p,
|
|
671
672
|
sectionClassName: m
|
|
672
673
|
}),
|
|
673
|
-
E && /* @__PURE__ */
|
|
674
|
-
className: M("mb-3 mt-0", m,
|
|
674
|
+
E && /* @__PURE__ */ K("section", { children: [/* @__PURE__ */ G("p", {
|
|
675
|
+
className: M("mb-3 mt-0", m, on.sectionHeading),
|
|
675
676
|
children: o
|
|
676
|
-
}), /* @__PURE__ */
|
|
677
|
+
}), /* @__PURE__ */ G(k, {
|
|
677
678
|
language: "bash",
|
|
678
679
|
value: e.requestExample ?? "",
|
|
679
680
|
copyLabel: c,
|
|
@@ -681,10 +682,10 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
681
682
|
codeClassName: f,
|
|
682
683
|
hideDownload: !0
|
|
683
684
|
})] }),
|
|
684
|
-
D && /* @__PURE__ */
|
|
685
|
-
className: M("mb-3 mt-0", m,
|
|
685
|
+
D && /* @__PURE__ */ K("section", { children: [/* @__PURE__ */ G("p", {
|
|
686
|
+
className: M("mb-3 mt-0", m, on.sectionHeading),
|
|
686
687
|
children: s
|
|
687
|
-
}), /* @__PURE__ */
|
|
688
|
+
}), /* @__PURE__ */ G(k, {
|
|
688
689
|
language: "json",
|
|
689
690
|
value: e.responseSchema ?? "",
|
|
690
691
|
copyLabel: c,
|
|
@@ -694,109 +695,109 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
694
695
|
})] })
|
|
695
696
|
]
|
|
696
697
|
});
|
|
697
|
-
},
|
|
698
|
+
}, dn = {
|
|
698
699
|
sunkenBox: "_sunkenBox_1lqi3_1",
|
|
699
700
|
raisedBox: "_raisedBox_1lqi3_5",
|
|
700
701
|
activeIcon: "_activeIcon_1lqi3_9"
|
|
701
|
-
},
|
|
702
|
+
}, fn = /* @__PURE__ */ function(e) {
|
|
702
703
|
return e.Sunken = "sunken", e.Raised = "raised", e;
|
|
703
|
-
}({}),
|
|
704
|
-
sunken:
|
|
705
|
-
raised:
|
|
706
|
-
},
|
|
704
|
+
}({}), pn = {
|
|
705
|
+
sunken: dn.sunkenBox,
|
|
706
|
+
raised: dn.raisedBox
|
|
707
|
+
}, mn = ({ icon: e, isActive: t = !1, surface: n = "sunken", statusLabel: r }) => /* @__PURE__ */ K("span", {
|
|
707
708
|
className: "relative inline-flex shrink-0",
|
|
708
709
|
children: [
|
|
709
|
-
/* @__PURE__ */
|
|
710
|
-
className: M("flex size-8 items-center justify-center rounded-lg",
|
|
710
|
+
/* @__PURE__ */ G("span", {
|
|
711
|
+
className: M("flex size-8 items-center justify-center rounded-lg", pn[n]),
|
|
711
712
|
children: e
|
|
712
713
|
}),
|
|
713
|
-
t && /* @__PURE__ */
|
|
714
|
+
t && /* @__PURE__ */ G(Ze, {
|
|
714
715
|
size: z.MD,
|
|
715
716
|
"aria-hidden": !0,
|
|
716
|
-
className: M("absolute -end-2 -top-2",
|
|
717
|
+
className: M("absolute -end-2 -top-2", dn.activeIcon)
|
|
717
718
|
}),
|
|
718
|
-
r != null && /* @__PURE__ */
|
|
719
|
+
r != null && /* @__PURE__ */ G("span", {
|
|
719
720
|
role: "status",
|
|
720
721
|
className: "sr-only",
|
|
721
722
|
children: r
|
|
722
723
|
})
|
|
723
724
|
]
|
|
724
|
-
}),
|
|
725
|
+
}), hn = {
|
|
725
726
|
card: "_card_tqnz7_1",
|
|
726
727
|
icon: "_icon_tqnz7_6",
|
|
727
728
|
title: "_title_tqnz7_10",
|
|
728
729
|
description: "_description_tqnz7_14"
|
|
729
|
-
},
|
|
730
|
+
}, gn = ({ icon: e, title: t, description: n, action: r, titleClassName: i = "dial-small-semi-text", descriptionClassName: a = "dial-small-text" }) => /* @__PURE__ */ K("div", {
|
|
730
731
|
role: "status",
|
|
731
732
|
"aria-live": "polite",
|
|
732
|
-
className: M("flex items-center gap-3 rounded-xl p-3",
|
|
733
|
-
children: [/* @__PURE__ */
|
|
734
|
-
className: M("shrink-0",
|
|
733
|
+
className: M("flex items-center gap-3 rounded-xl p-3", hn.card),
|
|
734
|
+
children: [/* @__PURE__ */ G("span", {
|
|
735
|
+
className: M("shrink-0", hn.icon, n != null && "mt-0.5"),
|
|
735
736
|
children: e
|
|
736
|
-
}), /* @__PURE__ */
|
|
737
|
+
}), /* @__PURE__ */ K("div", {
|
|
737
738
|
className: "flex min-w-0 flex-1 items-center justify-between gap-2",
|
|
738
|
-
children: [/* @__PURE__ */
|
|
739
|
+
children: [/* @__PURE__ */ K("div", {
|
|
739
740
|
className: "flex min-w-0 flex-col gap-1",
|
|
740
|
-
children: [/* @__PURE__ */
|
|
741
|
-
className: M(i,
|
|
741
|
+
children: [/* @__PURE__ */ G("span", {
|
|
742
|
+
className: M(i, hn.title),
|
|
742
743
|
children: t
|
|
743
|
-
}), n != null && /* @__PURE__ */
|
|
744
|
-
className: M(a,
|
|
744
|
+
}), n != null && /* @__PURE__ */ G("span", {
|
|
745
|
+
className: M(a, hn.description),
|
|
745
746
|
children: n
|
|
746
747
|
})]
|
|
747
|
-
}), r != null && /* @__PURE__ */
|
|
748
|
+
}), r != null && /* @__PURE__ */ G("div", {
|
|
748
749
|
className: "shrink-0 whitespace-nowrap",
|
|
749
750
|
children: r
|
|
750
751
|
})]
|
|
751
752
|
})]
|
|
752
|
-
}),
|
|
753
|
-
let r = /* @__PURE__ */
|
|
754
|
-
size:
|
|
753
|
+
}), _n = (e) => e === y.ApiKey ? "You are currently using organization API key to access this toolset." : "You are currently using organization credentials to access this toolset.", vn = (e) => e === y.ApiKey ? "Configure your personal API key to have access to your data." : "Login using personal account to have access to your data.", yn = (e) => e === y.ApiKey ? "Signed in with organization API key." : "Signed in with organization credentials.", bn = (e) => e === y.ApiKey ? "Signed in with personal API key." : "Signed in with personal credentials.", xn = 20, Sn = ({ state: e, authenticationType: t, texts: n }) => {
|
|
754
|
+
let r = /* @__PURE__ */ G(Ke, {
|
|
755
|
+
size: xn,
|
|
755
756
|
"aria-hidden": !0,
|
|
756
757
|
stroke: B
|
|
757
758
|
});
|
|
758
759
|
if (e === v.PersonalCredentialsActive) {
|
|
759
|
-
let e = (n?.personalCredentialsActiveBannerTitle ??
|
|
760
|
-
return /* @__PURE__ */
|
|
761
|
-
icon: /* @__PURE__ */
|
|
762
|
-
icon: /* @__PURE__ */
|
|
760
|
+
let e = (n?.personalCredentialsActiveBannerTitle ?? bn)(t);
|
|
761
|
+
return /* @__PURE__ */ G(gn, {
|
|
762
|
+
icon: /* @__PURE__ */ G(mn, {
|
|
763
|
+
icon: /* @__PURE__ */ G(pt, {
|
|
763
764
|
size: z.SM,
|
|
764
765
|
"aria-hidden": !0,
|
|
765
766
|
stroke: B
|
|
766
767
|
}),
|
|
767
768
|
isActive: !0,
|
|
768
|
-
surface:
|
|
769
|
+
surface: fn.Raised
|
|
769
770
|
}),
|
|
770
771
|
title: e
|
|
771
772
|
});
|
|
772
773
|
}
|
|
773
774
|
if (e === v.OrgCredentialsActive) {
|
|
774
|
-
let e = (n?.orgCredentialsActiveBannerTitle ??
|
|
775
|
-
return /* @__PURE__ */
|
|
776
|
-
icon: /* @__PURE__ */
|
|
777
|
-
icon: /* @__PURE__ */
|
|
775
|
+
let e = (n?.orgCredentialsActiveBannerTitle ?? yn)(t);
|
|
776
|
+
return /* @__PURE__ */ G(gn, {
|
|
777
|
+
icon: /* @__PURE__ */ G(mn, {
|
|
778
|
+
icon: /* @__PURE__ */ G(Ke, {
|
|
778
779
|
size: z.SM,
|
|
779
780
|
"aria-hidden": !0,
|
|
780
781
|
stroke: B
|
|
781
782
|
}),
|
|
782
783
|
isActive: !0,
|
|
783
|
-
surface:
|
|
784
|
+
surface: fn.Raised
|
|
784
785
|
}),
|
|
785
786
|
title: e
|
|
786
787
|
});
|
|
787
788
|
}
|
|
788
|
-
return /* @__PURE__ */
|
|
789
|
+
return /* @__PURE__ */ G(gn, {
|
|
789
790
|
icon: r,
|
|
790
|
-
title: (n?.orgFallbackBannerTitle ??
|
|
791
|
-
description: (n?.orgFallbackBannerDescription ??
|
|
791
|
+
title: (n?.orgFallbackBannerTitle ?? _n)(t),
|
|
792
|
+
description: (n?.orgFallbackBannerDescription ?? vn)(t)
|
|
792
793
|
});
|
|
793
|
-
},
|
|
794
|
+
}, Cn = {
|
|
794
795
|
surface: "_surface_lyarp_1",
|
|
795
796
|
description: "_description_lyarp_5",
|
|
796
797
|
rowDescription: "_rowDescription_lyarp_9",
|
|
797
798
|
errorText: "_errorText_lyarp_13"
|
|
798
|
-
},
|
|
799
|
-
let C =
|
|
799
|
+
}, wn = ({ label: e, description: t, icon: n, status: r, isActive: i, authenticationType: a, apiKeyAddedWhen: s, onLogin: c, onRequestLogout: l, onRequestDeleteApiKey: u, texts: d, labelClassName: f, descriptionClassName: p, errorClassName: m, keyCardTitleClassName: h, keyCardDescriptionClassName: g, deleteActionClassName: _, disabled: v = !1, isPending: b = !1, renderLoginOptions: x, children: S }) => {
|
|
800
|
+
let C = oe(), [w, T] = R(), [E, D] = R(""), [O, ee] = R(!1), [k, A] = R(!1), te = r === o.SignedIn, ne = P((e) => {
|
|
800
801
|
D(e ?? ""), ee(!1), T(void 0);
|
|
801
802
|
}, []), re = async () => {
|
|
802
803
|
if (k || v) return;
|
|
@@ -813,40 +814,40 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
813
814
|
} finally {
|
|
814
815
|
A(!1);
|
|
815
816
|
}
|
|
816
|
-
}, j = d?.loginActionLabel ?? "Log in", ie = d?.logoutActionLabel ?? "Log out",
|
|
817
|
-
return /* @__PURE__ */
|
|
817
|
+
}, j = d?.loginActionLabel ?? "Log in", ie = d?.logoutActionLabel ?? "Log out", N = d?.addApiKeyActionLabel ?? "Add", ae = d?.deleteActionLabel ?? "Delete", F = d?.credentialsSignedInLabel ?? "Signed in", se = d?.credentialsSignedOutLabel ?? "Signed out", I = d?.addingApiKeyStatusLabel ?? "Adding", L = d?.apiKeyConfiguredMessage ?? "Key has been configured", ce = s == null ? void 0 : (d?.apiKeyAddedLabel ?? ((e) => `Added ${e}`))(s);
|
|
818
|
+
return /* @__PURE__ */ K("div", {
|
|
818
819
|
role: "group",
|
|
819
820
|
"aria-label": e,
|
|
820
821
|
"aria-busy": k || b,
|
|
821
822
|
className: "flex min-w-0 items-start gap-3 rounded-xl p-3",
|
|
822
|
-
children: [/* @__PURE__ */
|
|
823
|
+
children: [/* @__PURE__ */ G(mn, {
|
|
823
824
|
icon: n,
|
|
824
825
|
isActive: i,
|
|
825
|
-
statusLabel: i ?
|
|
826
|
-
}), /* @__PURE__ */
|
|
826
|
+
statusLabel: i ? F : se
|
|
827
|
+
}), /* @__PURE__ */ K("div", {
|
|
827
828
|
className: "flex min-w-0 flex-1 flex-col gap-1",
|
|
828
829
|
children: [
|
|
829
|
-
/* @__PURE__ */
|
|
830
|
+
/* @__PURE__ */ K("div", {
|
|
830
831
|
className: "flex flex-wrap items-start justify-between gap-2",
|
|
831
|
-
children: [/* @__PURE__ */
|
|
832
|
+
children: [/* @__PURE__ */ K("div", {
|
|
832
833
|
className: "flex min-w-0 flex-1 flex-col gap-0.5 break-words",
|
|
833
|
-
children: [/* @__PURE__ */
|
|
834
|
+
children: [/* @__PURE__ */ G("span", {
|
|
834
835
|
className: f,
|
|
835
836
|
children: e
|
|
836
|
-
}), /* @__PURE__ */
|
|
837
|
-
className: M(p,
|
|
837
|
+
}), /* @__PURE__ */ G("span", {
|
|
838
|
+
className: M(p, Cn.rowDescription),
|
|
838
839
|
children: t
|
|
839
840
|
})]
|
|
840
|
-
}), a === y.OAuth && (te ? l && /* @__PURE__ */
|
|
841
|
-
appearance:
|
|
841
|
+
}), a === y.OAuth && (te ? l && /* @__PURE__ */ G(_e, {
|
|
842
|
+
appearance: ue.Ghost,
|
|
842
843
|
label: ie,
|
|
843
844
|
className: "min-h-11 min-w-28 shrink-0 justify-center whitespace-nowrap",
|
|
844
845
|
onClick: l,
|
|
845
846
|
disabled: k || v
|
|
846
|
-
}) : /* @__PURE__ */
|
|
847
|
+
}) : /* @__PURE__ */ G(je, {
|
|
847
848
|
label: k ? void 0 : j,
|
|
848
849
|
"aria-label": j,
|
|
849
|
-
iconBefore: k ? /* @__PURE__ */
|
|
850
|
+
iconBefore: k ? /* @__PURE__ */ G(ze, {
|
|
850
851
|
size: z.SM,
|
|
851
852
|
ariaLabel: j
|
|
852
853
|
}) : void 0,
|
|
@@ -855,11 +856,11 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
855
856
|
onClick: re
|
|
856
857
|
}))]
|
|
857
858
|
}),
|
|
858
|
-
a === y.ApiKey && !te && /* @__PURE__ */
|
|
859
|
+
a === y.ApiKey && !te && /* @__PURE__ */ K("div", {
|
|
859
860
|
className: "flex animate-fadeIn flex-col gap-1 pt-1",
|
|
860
|
-
children: [/* @__PURE__ */
|
|
861
|
+
children: [/* @__PURE__ */ K("div", {
|
|
861
862
|
className: "flex items-end gap-2",
|
|
862
|
-
children: [/* @__PURE__ */
|
|
863
|
+
children: [/* @__PURE__ */ G(De, {
|
|
863
864
|
id: C,
|
|
864
865
|
type: "password",
|
|
865
866
|
autoComplete: "off",
|
|
@@ -869,37 +870,37 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
869
870
|
invalid: O,
|
|
870
871
|
disabled: k || v,
|
|
871
872
|
containerClassName: "min-w-0 flex-1"
|
|
872
|
-
}), /* @__PURE__ */
|
|
873
|
-
label: k ? void 0 :
|
|
874
|
-
"aria-label": k ?
|
|
875
|
-
iconBefore: k ? /* @__PURE__ */
|
|
873
|
+
}), /* @__PURE__ */ G(je, {
|
|
874
|
+
label: k ? void 0 : N,
|
|
875
|
+
"aria-label": k ? I : void 0,
|
|
876
|
+
iconBefore: k ? /* @__PURE__ */ G(ze, {
|
|
876
877
|
size: z.SM,
|
|
877
|
-
ariaLabel:
|
|
878
|
+
ariaLabel: I
|
|
878
879
|
}) : void 0,
|
|
879
880
|
className: "min-h-11 shrink-0 whitespace-nowrap",
|
|
880
881
|
onClick: re,
|
|
881
882
|
disabled: k || v
|
|
882
883
|
})]
|
|
883
|
-
}), O && /* @__PURE__ */
|
|
884
|
+
}), O && /* @__PURE__ */ G("span", {
|
|
884
885
|
role: "alert",
|
|
885
|
-
className: M(m,
|
|
886
|
+
className: M(m, Cn.errorText),
|
|
886
887
|
children: d?.apiKeyRequiredErrorMessage ?? "API key is required."
|
|
887
888
|
})]
|
|
888
889
|
}),
|
|
889
|
-
a === y.ApiKey && te && /* @__PURE__ */
|
|
890
|
+
a === y.ApiKey && te && /* @__PURE__ */ G("div", {
|
|
890
891
|
className: "animate-fadeIn pt-1",
|
|
891
|
-
children: /* @__PURE__ */
|
|
892
|
-
icon: /* @__PURE__ */
|
|
892
|
+
children: /* @__PURE__ */ G(gn, {
|
|
893
|
+
icon: /* @__PURE__ */ G(tt, {
|
|
893
894
|
size: z.SM,
|
|
894
895
|
"aria-hidden": !0,
|
|
895
896
|
stroke: B
|
|
896
897
|
}),
|
|
897
|
-
title:
|
|
898
|
-
description:
|
|
898
|
+
title: L,
|
|
899
|
+
description: ce,
|
|
899
900
|
titleClassName: h,
|
|
900
901
|
descriptionClassName: g,
|
|
901
|
-
action: u && /* @__PURE__ */
|
|
902
|
-
label:
|
|
902
|
+
action: u && /* @__PURE__ */ G(Oe, {
|
|
903
|
+
label: ae,
|
|
903
904
|
className: M("min-h-11", _),
|
|
904
905
|
onClick: u,
|
|
905
906
|
disabled: k || v
|
|
@@ -907,42 +908,42 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
907
908
|
})
|
|
908
909
|
}),
|
|
909
910
|
!te && x?.(k || v),
|
|
910
|
-
w && /* @__PURE__ */
|
|
911
|
+
w && /* @__PURE__ */ G("p", {
|
|
911
912
|
role: "alert",
|
|
912
|
-
className: M(m,
|
|
913
|
+
className: M(m, Cn.errorText),
|
|
913
914
|
children: w
|
|
914
915
|
}),
|
|
915
916
|
S
|
|
916
917
|
]
|
|
917
918
|
})]
|
|
918
919
|
});
|
|
919
|
-
},
|
|
920
|
+
}, Tn = (e) => e === y.ApiKey ? "Select which account to use with this toolset — personal or organization. If both are configured, personal credentials will be used by default for toolset access." : "Select which account to use with this toolset — personal or organization. If both are configured, personal credentials will be used by default.", En = ({ item: e, onLogin: t, onRequestLogout: n, onRequestDeleteApiKey: r, texts: i, detailsStyles: a, deleteActionClassName: s = "text-error" }) => {
|
|
920
921
|
let { credentialsDescriptionClassName: c = "dial-body-paragraph-text", credentialsRowLabelClassName: l = "dial-small-semi-text", credentialsRowDescriptionClassName: u = "dial-small-text", credentialsErrorClassName: d = "dial-caption-text", credentialsKeyCardTitleClassName: f = "dial-tiny-semi-text", credentialsKeyCardDescriptionClassName: p = "dial-tiny-text" } = a?.typography ?? {}, m = e.credentials;
|
|
921
922
|
if (m == null) return null;
|
|
922
|
-
let h = (i?.credentialsManagementDescription ??
|
|
923
|
-
return /* @__PURE__ */
|
|
923
|
+
let h = (i?.credentialsManagementDescription ?? Tn)(m.authenticationType), g = m.userStatus === o.SignedIn, _ = !g && m.globalStatus === o.SignedIn;
|
|
924
|
+
return /* @__PURE__ */ K("div", {
|
|
924
925
|
className: "flex flex-col",
|
|
925
|
-
children: [/* @__PURE__ */
|
|
926
|
+
children: [/* @__PURE__ */ G("div", {
|
|
926
927
|
className: "px-6 py-4",
|
|
927
|
-
children: /* @__PURE__ */
|
|
928
|
-
className: M("rounded-xl p-3",
|
|
929
|
-
children: /* @__PURE__ */
|
|
928
|
+
children: /* @__PURE__ */ G("div", {
|
|
929
|
+
className: M("rounded-xl p-3", Cn.surface),
|
|
930
|
+
children: /* @__PURE__ */ G(E, {
|
|
930
931
|
item: e,
|
|
931
932
|
iconSize: 40,
|
|
932
933
|
hasFeaturedTag: !1
|
|
933
934
|
})
|
|
934
935
|
})
|
|
935
|
-
}), /* @__PURE__ */
|
|
936
|
+
}), /* @__PURE__ */ K("div", {
|
|
936
937
|
className: "flex flex-col gap-5 px-6 py-4",
|
|
937
|
-
children: [/* @__PURE__ */
|
|
938
|
-
className: M(c,
|
|
938
|
+
children: [/* @__PURE__ */ G("span", {
|
|
939
|
+
className: M(c, Cn.description),
|
|
939
940
|
children: h
|
|
940
|
-
}), /* @__PURE__ */
|
|
941
|
+
}), /* @__PURE__ */ K("div", {
|
|
941
942
|
className: "flex flex-col",
|
|
942
|
-
children: [/* @__PURE__ */
|
|
943
|
+
children: [/* @__PURE__ */ G(wn, {
|
|
943
944
|
label: i?.personalCredentialsLabel ?? "Personal credentials",
|
|
944
945
|
description: i?.personalCredentialsDescription ?? "These credentials apply only to your account.",
|
|
945
|
-
icon: /* @__PURE__ */
|
|
946
|
+
icon: /* @__PURE__ */ G(pt, {
|
|
946
947
|
size: z.SM,
|
|
947
948
|
"aria-hidden": !0,
|
|
948
949
|
stroke: B
|
|
@@ -964,10 +965,10 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
964
965
|
keyCardTitleClassName: f,
|
|
965
966
|
keyCardDescriptionClassName: p,
|
|
966
967
|
deleteActionClassName: s
|
|
967
|
-
}), /* @__PURE__ */
|
|
968
|
+
}), /* @__PURE__ */ G(wn, {
|
|
968
969
|
label: i?.organizationCredentialsLabel ?? "Organization credentials",
|
|
969
970
|
description: i?.organizationCredentialsDescription ?? "Once added, these credentials will grant all users in your organization access to this toolset.",
|
|
970
|
-
icon: /* @__PURE__ */
|
|
971
|
+
icon: /* @__PURE__ */ G(Ke, {
|
|
971
972
|
size: z.SM,
|
|
972
973
|
"aria-hidden": !0,
|
|
973
974
|
stroke: B
|
|
@@ -993,19 +994,19 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
993
994
|
})]
|
|
994
995
|
})]
|
|
995
996
|
});
|
|
996
|
-
},
|
|
997
|
+
}, Dn = {
|
|
997
998
|
skeletonColor: "var(--cat-details-skeleton, var(--bg-control-disable-primary, #dce0e8))",
|
|
998
999
|
backdrop: "_backdrop_16ka5_2",
|
|
999
1000
|
panel: "_panel_16ka5_6",
|
|
1000
1001
|
divider: "_divider_16ka5_11",
|
|
1001
1002
|
content: "_content_16ka5_15",
|
|
1002
1003
|
publishTitle: "_publishTitle_16ka5_20"
|
|
1003
|
-
},
|
|
1004
|
+
}, On = /* @__PURE__ */ function(e) {
|
|
1004
1005
|
return e.Idle = "idle", e.Loading = "loading", e.Resolved = "resolved", e.Unknown = "unknown", e;
|
|
1005
|
-
}({}),
|
|
1006
|
-
let [u, d] =
|
|
1006
|
+
}({}), kn = { divider: "_divider_nhloi_1" }, An = 16, jn = ({ item: e, level: t, status: n, apiKeyAddedWhen: r, onLogin: i, onLogout: a, onClose: s, texts: c, deleteActionClassName: l = "text-error" }) => {
|
|
1007
|
+
let [u, d] = R(""), [f, p] = R(!1), [m, h] = R(!1), [g, _] = R(!1), v = n === o.SignedIn, y = P((e) => {
|
|
1007
1008
|
d(e ?? ""), p(!1);
|
|
1008
|
-
}, []), b =
|
|
1009
|
+
}, []), b = P(async () => {
|
|
1009
1010
|
if (u.trim().length === 0) {
|
|
1010
1011
|
p(!0);
|
|
1011
1012
|
return;
|
|
@@ -1025,7 +1026,7 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1025
1026
|
u,
|
|
1026
1027
|
i,
|
|
1027
1028
|
s
|
|
1028
|
-
]), x =
|
|
1029
|
+
]), x = P(async () => {
|
|
1029
1030
|
_(!0);
|
|
1030
1031
|
try {
|
|
1031
1032
|
await a?.(e, { level: t }), s();
|
|
@@ -1038,22 +1039,22 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1038
1039
|
a,
|
|
1039
1040
|
s
|
|
1040
1041
|
]), S = c?.personalApiKeyPanelTitle ?? "Personal API key", C = c?.addApiKeyActionLabel ?? "Add", w = c?.deleteActionLabel ?? "Delete", T = c?.addingApiKeyStatusLabel ?? "Adding", E = c?.deletingStatusLabel ?? "Deleting", D = c?.apiKeyRequiredErrorMessage ?? "API key is required.", O = c?.personalApiKeyAddedMessage ?? "Personal key has been added", ee = r == null ? void 0 : (c?.apiKeyAddedLabel ?? ((e) => `Added ${e}`))(r);
|
|
1041
|
-
return /* @__PURE__ */
|
|
1042
|
+
return /* @__PURE__ */ K("div", {
|
|
1042
1043
|
className: "flex w-[418px] flex-col",
|
|
1043
1044
|
children: [
|
|
1044
|
-
/* @__PURE__ */
|
|
1045
|
+
/* @__PURE__ */ G("div", {
|
|
1045
1046
|
className: "flex items-center gap-2 px-4 py-3",
|
|
1046
|
-
children: /* @__PURE__ */
|
|
1047
|
+
children: /* @__PURE__ */ G("span", {
|
|
1047
1048
|
className: "dial-small-semi-text",
|
|
1048
1049
|
children: S
|
|
1049
1050
|
})
|
|
1050
1051
|
}),
|
|
1051
|
-
/* @__PURE__ */
|
|
1052
|
-
!v && /* @__PURE__ */
|
|
1052
|
+
/* @__PURE__ */ G("div", { className: M("mx-4 h-px", kn.divider) }),
|
|
1053
|
+
!v && /* @__PURE__ */ K("div", {
|
|
1053
1054
|
className: "flex animate-fadeIn flex-col gap-1 px-4 py-3.5",
|
|
1054
|
-
children: [/* @__PURE__ */
|
|
1055
|
+
children: [/* @__PURE__ */ K("div", {
|
|
1055
1056
|
className: "flex items-end gap-2",
|
|
1056
|
-
children: [/* @__PURE__ */
|
|
1057
|
+
children: [/* @__PURE__ */ G(De, {
|
|
1057
1058
|
id: `catalog-item-${e.id}-${t}-api-key`,
|
|
1058
1059
|
type: "password",
|
|
1059
1060
|
autoComplete: "current-password",
|
|
@@ -1063,36 +1064,36 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1063
1064
|
invalid: f,
|
|
1064
1065
|
disabled: m,
|
|
1065
1066
|
containerClassName: "min-w-0 flex-1"
|
|
1066
|
-
}), /* @__PURE__ */
|
|
1067
|
+
}), /* @__PURE__ */ G(je, {
|
|
1067
1068
|
label: m ? void 0 : C,
|
|
1068
1069
|
"aria-label": m ? T : void 0,
|
|
1069
|
-
iconBefore: m ? /* @__PURE__ */
|
|
1070
|
-
size:
|
|
1070
|
+
iconBefore: m ? /* @__PURE__ */ G(ze, {
|
|
1071
|
+
size: An,
|
|
1071
1072
|
ariaLabel: T
|
|
1072
1073
|
}) : void 0,
|
|
1073
1074
|
onClick: b,
|
|
1074
1075
|
disabled: m
|
|
1075
1076
|
})]
|
|
1076
|
-
}), f && /* @__PURE__ */
|
|
1077
|
+
}), f && /* @__PURE__ */ G("span", {
|
|
1077
1078
|
className: "dial-caption-text text-error",
|
|
1078
1079
|
children: D
|
|
1079
1080
|
})]
|
|
1080
1081
|
}),
|
|
1081
|
-
v && /* @__PURE__ */
|
|
1082
|
+
v && /* @__PURE__ */ G("div", {
|
|
1082
1083
|
className: "animate-fadeIn px-4 py-3.5",
|
|
1083
|
-
children: /* @__PURE__ */
|
|
1084
|
-
icon: /* @__PURE__ */
|
|
1084
|
+
children: /* @__PURE__ */ G(gn, {
|
|
1085
|
+
icon: /* @__PURE__ */ G(tt, {
|
|
1085
1086
|
size: 20,
|
|
1086
1087
|
"aria-hidden": !0,
|
|
1087
1088
|
stroke: B
|
|
1088
1089
|
}),
|
|
1089
1090
|
title: O,
|
|
1090
1091
|
description: ee,
|
|
1091
|
-
action: /* @__PURE__ */
|
|
1092
|
+
action: /* @__PURE__ */ G(Oe, {
|
|
1092
1093
|
label: g ? void 0 : w,
|
|
1093
1094
|
"aria-label": g ? E : void 0,
|
|
1094
|
-
iconBefore: g ? /* @__PURE__ */
|
|
1095
|
-
size:
|
|
1095
|
+
iconBefore: g ? /* @__PURE__ */ G(ze, {
|
|
1096
|
+
size: An,
|
|
1096
1097
|
ariaLabel: E
|
|
1097
1098
|
}) : void 0,
|
|
1098
1099
|
className: l,
|
|
@@ -1103,8 +1104,8 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1103
1104
|
})
|
|
1104
1105
|
]
|
|
1105
1106
|
});
|
|
1106
|
-
},
|
|
1107
|
-
let [a, o] =
|
|
1107
|
+
}, Mn = { name: "_name_gfs1p_1" }, Nn = (e) => e.isMyApp === !0, Pn = ({ item: e, onShare: t, shareOverlay: n, isShareVisible: r, label: i = "Share" }) => {
|
|
1108
|
+
let [a, o] = R(!1), s = P(() => {
|
|
1108
1109
|
if (n) {
|
|
1109
1110
|
o((e) => !e);
|
|
1110
1111
|
return;
|
|
@@ -1115,14 +1116,14 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1115
1116
|
t,
|
|
1116
1117
|
n
|
|
1117
1118
|
]);
|
|
1118
|
-
if (!
|
|
1119
|
-
let c = /* @__PURE__ */
|
|
1119
|
+
if (!Nn(e) || r && !r(e)) return null;
|
|
1120
|
+
let c = /* @__PURE__ */ G(je, {
|
|
1120
1121
|
label: i,
|
|
1121
|
-
iconBefore: /* @__PURE__ */
|
|
1122
|
+
iconBefore: /* @__PURE__ */ G(lt, {
|
|
1122
1123
|
size: z.MD,
|
|
1123
1124
|
stroke: B
|
|
1124
1125
|
}),
|
|
1125
|
-
iconAfter: /* @__PURE__ */
|
|
1126
|
+
iconAfter: /* @__PURE__ */ G(Je, {
|
|
1126
1127
|
size: z.MD,
|
|
1127
1128
|
stroke: B
|
|
1128
1129
|
}),
|
|
@@ -1130,7 +1131,7 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1130
1131
|
"aria-haspopup": n ? "menu" : void 0,
|
|
1131
1132
|
"aria-expanded": n ? a : void 0
|
|
1132
1133
|
});
|
|
1133
|
-
return n ? /* @__PURE__ */
|
|
1134
|
+
return n ? /* @__PURE__ */ G(ve, {
|
|
1134
1135
|
placement: "bottom-end",
|
|
1135
1136
|
matchReferenceWidth: !1,
|
|
1136
1137
|
open: a,
|
|
@@ -1140,49 +1141,49 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1140
1141
|
renderOverlay: () => n(e, () => o(!1)),
|
|
1141
1142
|
children: c
|
|
1142
1143
|
}) : c;
|
|
1143
|
-
},
|
|
1144
|
-
[
|
|
1145
|
-
[
|
|
1146
|
-
},
|
|
1147
|
-
className: M("flex h-[24px] items-center justify-center gap-1 whitespace-nowrap rounded-2xl px-2", "dial-caption-lead-semi-text",
|
|
1144
|
+
}, Fn = (e) => e === y.ApiKey ? "Manage API keys" : "Manage credentials", In = {
|
|
1145
|
+
[St.LimitReached]: "bg-error text-error",
|
|
1146
|
+
[St.RunningLow]: "bg-warning text-warning"
|
|
1147
|
+
}, Ln = ({ status: e, label: t }) => /* @__PURE__ */ G("div", {
|
|
1148
|
+
className: M("flex h-[24px] items-center justify-center gap-1 whitespace-nowrap rounded-2xl px-2", "dial-caption-lead-semi-text", In[e]),
|
|
1148
1149
|
children: t
|
|
1149
|
-
}),
|
|
1150
|
-
let { nameClassName:
|
|
1151
|
-
status:
|
|
1152
|
-
label:
|
|
1153
|
-
}), ue =
|
|
1150
|
+
}), Rn = ({ item: e, onUseInChat: t, isPrimaryActionVisible: r, onShare: i, shareOverlay: a, isShareVisible: o, isSharePrimary: s, onEdit: l, onDownload: u, isDownloadVisible: d, isDownloadPrimary: f, onDelete: p, onUnshare: m, isUnshareVisible: h, onRevokeShare: g, onFetchRecipientsCount: _, isRevokeShareVisible: v, onLogin: S, onLogout: C, onOpenCredentialsManagement: w, onRequestLogout: T, texts: D, detailsStyles: O, isPublishVisible: ee, isPublishPrimary: k, onOpenPublish: A, isUnpublishVisible: te, hasPublishedFolders: ne = !1, isPublishHistoryResolved: re = !0, onRequestPublishHistory: j, onOpenUnpublish: ie, isReadonly: N = !1 }) => {
|
|
1151
|
+
let { nameClassName: ae = "dial-body-semi-text", folderLabelClassName: oe = "dial-tiny-text", folderLeafClassName: se = "dial-tiny-semi-text" } = O?.typography ?? {}, ce = e.details?.limits?.status, le = ce == null ? void 0 : /* @__PURE__ */ G(Ln, {
|
|
1152
|
+
status: ce,
|
|
1153
|
+
label: ce === St.LimitReached ? D?.limitReachedLabel ?? "Limit reached" : D?.limitRunningLowLabel ?? "Running low"
|
|
1154
|
+
}), ue = P(() => {
|
|
1154
1155
|
t?.(e);
|
|
1155
|
-
}, [e, t]), de =
|
|
1156
|
+
}, [e, t]), de = P(() => {
|
|
1156
1157
|
l?.(e);
|
|
1157
|
-
}, [e, l]), fe =
|
|
1158
|
+
}, [e, l]), fe = P(() => {
|
|
1158
1159
|
A?.();
|
|
1159
|
-
}, [A]), pe =
|
|
1160
|
+
}, [A]), pe = P(() => {
|
|
1160
1161
|
ie?.();
|
|
1161
|
-
}, [ie]), me =
|
|
1162
|
+
}, [ie]), me = P(() => {
|
|
1162
1163
|
u?.(e);
|
|
1163
|
-
}, [e, u]), [he,
|
|
1164
|
-
|
|
1165
|
-
|
|
1164
|
+
}, [e, u]), [he, ge] = R(!1);
|
|
1165
|
+
F(() => {
|
|
1166
|
+
ge(!1);
|
|
1166
1167
|
}, [e.id]);
|
|
1167
|
-
let ye =
|
|
1168
|
-
he || (
|
|
1168
|
+
let ye = P(() => {
|
|
1169
|
+
he || (ge(!0), (async () => {
|
|
1169
1170
|
try {
|
|
1170
1171
|
await u?.(e);
|
|
1171
1172
|
} catch {} finally {
|
|
1172
|
-
|
|
1173
|
+
ge(!1);
|
|
1173
1174
|
}
|
|
1174
1175
|
})());
|
|
1175
1176
|
}, [
|
|
1176
1177
|
e,
|
|
1177
1178
|
u,
|
|
1178
1179
|
he
|
|
1179
|
-
]), [be,
|
|
1180
|
-
|
|
1181
|
-
|
|
1180
|
+
]), [be, xe] = R(!1);
|
|
1181
|
+
F(() => {
|
|
1182
|
+
xe(!1);
|
|
1182
1183
|
}, [e.id]);
|
|
1183
|
-
let Ce =
|
|
1184
|
+
let Ce = P(() => {
|
|
1184
1185
|
if (a) {
|
|
1185
|
-
|
|
1186
|
+
xe(!0);
|
|
1186
1187
|
return;
|
|
1187
1188
|
}
|
|
1188
1189
|
i?.(e);
|
|
@@ -1190,29 +1191,29 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1190
1191
|
e,
|
|
1191
1192
|
i,
|
|
1192
1193
|
a
|
|
1193
|
-
]), we =
|
|
1194
|
-
|
|
1195
|
-
}, []), Te =
|
|
1194
|
+
]), we = P(() => {
|
|
1195
|
+
xe(!1);
|
|
1196
|
+
}, []), Te = P(() => {
|
|
1196
1197
|
m?.(e);
|
|
1197
|
-
}, [e, m]), Ee =
|
|
1198
|
+
}, [e, m]), Ee = P(() => {
|
|
1198
1199
|
p?.(e);
|
|
1199
|
-
}, [e, p]), V =
|
|
1200
|
+
}, [e, p]), V = P(() => {
|
|
1200
1201
|
g?.(e);
|
|
1201
|
-
}, [e, g]), [De, Oe] =
|
|
1202
|
-
|
|
1203
|
-
Pe.current = null, Oe(
|
|
1202
|
+
}, [e, g]), [De, Oe] = R(On.Idle), [ke, Ae] = R(void 0), Pe = L(null);
|
|
1203
|
+
F(() => {
|
|
1204
|
+
Pe.current = null, Oe(On.Idle), Ae(void 0);
|
|
1204
1205
|
}, [e.id]);
|
|
1205
|
-
let Fe =
|
|
1206
|
+
let Fe = P(() => {
|
|
1206
1207
|
if (!_ || Pe.current === e.id || !g || e.isMyApp !== !0 || v?.(e) === !1) return;
|
|
1207
1208
|
let t = e.id;
|
|
1208
|
-
Pe.current = t, Oe(
|
|
1209
|
+
Pe.current = t, Oe(On.Loading), (async () => {
|
|
1209
1210
|
try {
|
|
1210
1211
|
let n = await _(e);
|
|
1211
1212
|
if (Pe.current !== t) return;
|
|
1212
|
-
|
|
1213
|
+
Ae(n), Oe(n == null ? On.Unknown : On.Resolved);
|
|
1213
1214
|
} catch {
|
|
1214
1215
|
if (Pe.current !== t) return;
|
|
1215
|
-
|
|
1216
|
+
Ae(void 0), Oe(On.Unknown);
|
|
1216
1217
|
}
|
|
1217
1218
|
})();
|
|
1218
1219
|
}, [
|
|
@@ -1220,82 +1221,82 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1220
1221
|
_,
|
|
1221
1222
|
g,
|
|
1222
1223
|
v
|
|
1223
|
-
]), [H, Ie] =
|
|
1224
|
-
|
|
1224
|
+
]), [H, Ie] = R(!1);
|
|
1225
|
+
F(() => {
|
|
1225
1226
|
Ie(!1);
|
|
1226
1227
|
}, [e.id]);
|
|
1227
|
-
let Le =
|
|
1228
|
+
let Le = P((e) => {
|
|
1228
1229
|
Ie(e), e && (Fe(), j?.());
|
|
1229
|
-
}, [Fe, j]),
|
|
1230
|
+
}, [Fe, j]), Re = P(() => {
|
|
1230
1231
|
Fe(), j?.();
|
|
1231
|
-
}, [Fe, j]), Be =
|
|
1232
|
+
}, [Fe, j]), Be = P(() => {
|
|
1232
1233
|
j?.();
|
|
1233
|
-
}, [j]),
|
|
1234
|
+
}, [j]), Ve = D?.hasPrimaryAction !== !1 && (r?.(e) ?? (e.type === x.Model || e.type === x.Agent || e.type === x.Prompt)), He = !N && !!ie && ne && (te?.(e) ?? !0), Ue = !N && !!ie && !re && te?.(e) === !0, We = !N && !He && (ee?.(e) ?? (e.type === x.Model || e.type === x.Toolset || e.type === x.Agent)), Ke = !N && !!l && !!e.isEditable, qe = !N && e.isMyApp === !0 && (o?.(e) ?? !0), Ye = s?.(e) ?? !0, Xe = k?.(e) ?? !1, Ze = e.credentials?.authenticationType ?? y.None, U = e.credentials != null && Ze !== y.None ? c(e.credentials) : void 0, et = !N && U != null && (!!S || !!C), nt = e.type === x.Toolset && et, rt = !!u && (d?.(e) ?? !0), ct = rt && !nt && (f?.(e) ?? (e.type === x.Skill && !Ve)), ut = rt && !ct, dt = !N && e.isMyApp, pt = !N && !!m && e.isMyApp !== !0 && e.sharedWithMe === !0 && (h?.(e) ?? !0), _t = !N && !!g && e.isMyApp === !0 && (!_ || De === On.Unknown || De === On.Resolved && (ke ?? 0) > 0) && (v?.(e) ?? !0), vt = I(() => {
|
|
1234
1235
|
let e = [];
|
|
1235
|
-
if (!
|
|
1236
|
+
if (!Ye && qe && e.push({
|
|
1236
1237
|
key: "share",
|
|
1237
1238
|
label: D?.shareLabel ?? "Share",
|
|
1238
|
-
Icon:
|
|
1239
|
+
Icon: lt,
|
|
1239
1240
|
iconClassName: "text-secondary",
|
|
1240
1241
|
onClick: Ce
|
|
1241
|
-
}),
|
|
1242
|
+
}), Ke && e.push({
|
|
1242
1243
|
key: "edit",
|
|
1243
1244
|
label: D?.editActionLabel ?? "Edit",
|
|
1244
|
-
Icon:
|
|
1245
|
+
Icon: ot,
|
|
1245
1246
|
iconClassName: "text-secondary",
|
|
1246
1247
|
onClick: de
|
|
1247
|
-
}),
|
|
1248
|
+
}), ut && e.push({
|
|
1248
1249
|
key: "download",
|
|
1249
1250
|
label: D?.downloadActionLabel ?? "Download",
|
|
1250
|
-
Icon:
|
|
1251
|
+
Icon: $e,
|
|
1251
1252
|
iconClassName: "text-secondary",
|
|
1252
1253
|
onClick: me
|
|
1253
|
-
}), !
|
|
1254
|
+
}), !Xe && We && e.push({
|
|
1254
1255
|
key: "publish",
|
|
1255
1256
|
label: D?.publishLabel ?? "Publish",
|
|
1256
|
-
Icon:
|
|
1257
|
+
Icon: gt,
|
|
1257
1258
|
iconClassName: "text-secondary",
|
|
1258
1259
|
onClick: fe
|
|
1259
|
-
}), !
|
|
1260
|
+
}), !Xe && He && e.push({
|
|
1260
1261
|
key: "unpublish",
|
|
1261
1262
|
label: D?.unpublishLabel ?? "Unpublish",
|
|
1262
|
-
Icon:
|
|
1263
|
+
Icon: ht,
|
|
1263
1264
|
iconClassName: "text-secondary",
|
|
1264
1265
|
onClick: pe
|
|
1265
|
-
}),
|
|
1266
|
+
}), _t) {
|
|
1266
1267
|
let t = D?.revokeShareLabel ?? "Revoke access", n = D?.revokeShareLabelWithCount ?? ((e) => `${t} (${e})`);
|
|
1267
1268
|
e.push({
|
|
1268
1269
|
key: "revoke-share",
|
|
1269
1270
|
label: ke == null ? t : n(ke),
|
|
1270
|
-
Icon:
|
|
1271
|
+
Icon: mt,
|
|
1271
1272
|
danger: !0,
|
|
1272
1273
|
onClick: V
|
|
1273
1274
|
});
|
|
1274
1275
|
}
|
|
1275
|
-
return
|
|
1276
|
+
return pt && e.push({
|
|
1276
1277
|
key: "unshare",
|
|
1277
1278
|
label: D?.unshareLabel ?? "Remove from My List",
|
|
1278
|
-
Icon:
|
|
1279
|
+
Icon: ft,
|
|
1279
1280
|
onClick: Te
|
|
1280
|
-
}),
|
|
1281
|
+
}), dt && e.push({
|
|
1281
1282
|
key: "delete",
|
|
1282
1283
|
label: D?.deleteActionLabel ?? "Delete",
|
|
1283
|
-
Icon:
|
|
1284
|
+
Icon: ft,
|
|
1284
1285
|
danger: !0,
|
|
1285
1286
|
onClick: Ee
|
|
1286
1287
|
}), e;
|
|
1287
1288
|
}, [
|
|
1288
|
-
Je,
|
|
1289
|
-
qe,
|
|
1290
|
-
Ge,
|
|
1291
|
-
lt,
|
|
1292
1289
|
Ye,
|
|
1290
|
+
qe,
|
|
1291
|
+
Ke,
|
|
1292
|
+
ut,
|
|
1293
|
+
Xe,
|
|
1293
1294
|
We,
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1295
|
+
He,
|
|
1296
|
+
dt,
|
|
1297
|
+
_t,
|
|
1297
1298
|
ke,
|
|
1298
|
-
|
|
1299
|
+
pt,
|
|
1299
1300
|
D,
|
|
1300
1301
|
Ce,
|
|
1301
1302
|
de,
|
|
@@ -1305,10 +1306,10 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1305
1306
|
Ee,
|
|
1306
1307
|
V,
|
|
1307
1308
|
Te
|
|
1308
|
-
]),
|
|
1309
|
+
]), yt = I(() => vt.map(({ key: e, label: t, Icon: n, iconClassName: r, danger: i, onClick: a }) => ({
|
|
1309
1310
|
key: e,
|
|
1310
1311
|
label: t,
|
|
1311
|
-
icon: /* @__PURE__ */
|
|
1312
|
+
icon: /* @__PURE__ */ G(n, {
|
|
1312
1313
|
size: z.SM,
|
|
1313
1314
|
"aria-hidden": !0,
|
|
1314
1315
|
className: r,
|
|
@@ -1316,144 +1317,144 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1316
1317
|
}),
|
|
1317
1318
|
danger: i,
|
|
1318
1319
|
onClick: a
|
|
1319
|
-
})), [
|
|
1320
|
-
if (
|
|
1320
|
+
})), [vt]), bt = te?.(e), xt = !N && !!ie && (bt == null || bt && !re), q = !N && !!g && !!_ && e.isMyApp === !0 && (v?.(e) ?? !0), J = vt.length === 1 && !H && !xt && !q ? vt[0] : void 0, [Y, X] = R(!1), Ct = Ze === y.ApiKey && U !== n.ManageCredentials, wt = Ze === y.ApiKey && U === n.LogOut, Z = Ze !== y.ApiKey && U !== n.ManageCredentials && U === n.LogOut, Q = P(() => {
|
|
1321
|
+
if (U === n.ManageCredentials) {
|
|
1321
1322
|
w?.();
|
|
1322
1323
|
return;
|
|
1323
1324
|
}
|
|
1324
|
-
if (
|
|
1325
|
-
|
|
1325
|
+
if (Ct) {
|
|
1326
|
+
X((e) => !e);
|
|
1326
1327
|
return;
|
|
1327
1328
|
}
|
|
1328
|
-
if (
|
|
1329
|
+
if (U === n.LogOut) {
|
|
1329
1330
|
T?.();
|
|
1330
1331
|
return;
|
|
1331
1332
|
}
|
|
1332
1333
|
S?.(e, { level: b.User });
|
|
1333
1334
|
}, [
|
|
1334
|
-
|
|
1335
|
-
|
|
1335
|
+
U,
|
|
1336
|
+
Ct,
|
|
1336
1337
|
e,
|
|
1337
1338
|
S,
|
|
1338
1339
|
w,
|
|
1339
1340
|
T
|
|
1340
|
-
]), Tt =
|
|
1341
|
+
]), Tt = U === n.ManageCredentials ? (D?.manageCredentialsActionLabel ?? Fn)(Ze) : Ze === y.ApiKey ? U === n.LogOut ? D?.changeApiKeyActionLabel ?? "Change API key" : D?.apiKeyActionLabel ?? "API key" : U === n.LogOut ? D?.logoutActionLabel ?? "Log out" : D?.loginActionLabel ?? "Log in", Et = U === n.ManageCredentials || Ze === y.ApiKey ? /* @__PURE__ */ G(tt, {
|
|
1341
1342
|
size: z.MD,
|
|
1342
1343
|
stroke: B
|
|
1343
|
-
}) :
|
|
1344
|
+
}) : U === n.LogOut ? /* @__PURE__ */ G(at, {
|
|
1344
1345
|
size: z.MD,
|
|
1345
1346
|
stroke: B
|
|
1346
|
-
}) : /* @__PURE__ */
|
|
1347
|
+
}) : /* @__PURE__ */ G(it, {
|
|
1347
1348
|
size: z.MD,
|
|
1348
1349
|
stroke: B
|
|
1349
|
-
}), Dt =
|
|
1350
|
+
}), Dt = U === n.ManageCredentials ? /* @__PURE__ */ G(Ge, {
|
|
1350
1351
|
size: z.MD,
|
|
1351
1352
|
className: "rtl:scale-x-[-1]",
|
|
1352
1353
|
stroke: B
|
|
1353
|
-
}) :
|
|
1354
|
+
}) : Ct ? /* @__PURE__ */ G(Je, {
|
|
1354
1355
|
size: z.MD,
|
|
1355
1356
|
stroke: B
|
|
1356
1357
|
}) : void 0, Ot = (t) => {
|
|
1357
|
-
let n = /* @__PURE__ */
|
|
1358
|
+
let n = /* @__PURE__ */ G(t, {
|
|
1358
1359
|
label: Tt,
|
|
1359
1360
|
iconBefore: Et,
|
|
1360
1361
|
iconAfter: Dt,
|
|
1361
|
-
onClick:
|
|
1362
|
-
"aria-haspopup":
|
|
1363
|
-
"aria-expanded":
|
|
1362
|
+
onClick: Q,
|
|
1363
|
+
"aria-haspopup": Ct ? "dialog" : void 0,
|
|
1364
|
+
"aria-expanded": Ct ? Y : void 0
|
|
1364
1365
|
});
|
|
1365
|
-
return !
|
|
1366
|
+
return !Ct || e.credentials == null ? n : /* @__PURE__ */ G(ve, {
|
|
1366
1367
|
placement: "bottom-start",
|
|
1367
1368
|
matchReferenceWidth: !1,
|
|
1368
|
-
open:
|
|
1369
|
-
onOpenChange:
|
|
1369
|
+
open: Y,
|
|
1370
|
+
onOpenChange: X,
|
|
1370
1371
|
trigger: [],
|
|
1371
1372
|
outsideClosable: !0,
|
|
1372
|
-
renderOverlay: () => /* @__PURE__ */
|
|
1373
|
+
renderOverlay: () => /* @__PURE__ */ G(jn, {
|
|
1373
1374
|
item: e,
|
|
1374
1375
|
level: b.User,
|
|
1375
1376
|
status: e.credentials?.userStatus,
|
|
1376
1377
|
apiKeyAddedWhen: e.credentials?.userApiKeyAddedWhen,
|
|
1377
1378
|
onLogin: S,
|
|
1378
1379
|
onLogout: C,
|
|
1379
|
-
onClose: () =>
|
|
1380
|
+
onClose: () => X(!1),
|
|
1380
1381
|
texts: D
|
|
1381
1382
|
}),
|
|
1382
1383
|
children: n
|
|
1383
1384
|
});
|
|
1384
|
-
}, kt = ({ key: t, label: n, Icon: r, danger: s, onClick: c }) => t === "share" ? /* @__PURE__ */
|
|
1385
|
+
}, kt = ({ key: t, label: n, Icon: r, danger: s, onClick: c }) => t === "share" ? /* @__PURE__ */ G(Pn, {
|
|
1385
1386
|
item: e,
|
|
1386
1387
|
onShare: i,
|
|
1387
1388
|
shareOverlay: a,
|
|
1388
1389
|
isShareVisible: o,
|
|
1389
1390
|
label: D?.shareLabel
|
|
1390
|
-
}) : /* @__PURE__ */
|
|
1391
|
+
}) : /* @__PURE__ */ G(s ? _e : je, {
|
|
1391
1392
|
label: n,
|
|
1392
|
-
iconBefore: /* @__PURE__ */
|
|
1393
|
+
iconBefore: /* @__PURE__ */ G(r, {
|
|
1393
1394
|
size: z.MD,
|
|
1394
1395
|
"aria-hidden": !0,
|
|
1395
1396
|
stroke: B
|
|
1396
1397
|
}),
|
|
1397
1398
|
onClick: c
|
|
1398
1399
|
}), At = () => {
|
|
1399
|
-
let t = /* @__PURE__ */
|
|
1400
|
-
items:
|
|
1400
|
+
let t = /* @__PURE__ */ G(ve, {
|
|
1401
|
+
items: yt,
|
|
1401
1402
|
placement: "bottom-end",
|
|
1402
1403
|
matchReferenceWidth: !1,
|
|
1403
1404
|
onOpenChange: Le,
|
|
1404
|
-
children: /* @__PURE__ */
|
|
1405
|
-
icon: /* @__PURE__ */
|
|
1405
|
+
children: /* @__PURE__ */ G(Me, {
|
|
1406
|
+
icon: /* @__PURE__ */ G(Qe, {
|
|
1406
1407
|
size: z.LG,
|
|
1407
1408
|
"aria-hidden": !0,
|
|
1408
1409
|
stroke: B
|
|
1409
1410
|
}),
|
|
1410
1411
|
"aria-label": D?.manageActionLabel ?? "Manage",
|
|
1411
1412
|
"aria-haspopup": "menu",
|
|
1412
|
-
onMouseEnter:
|
|
1413
|
-
onFocus:
|
|
1413
|
+
onMouseEnter: Re,
|
|
1414
|
+
onFocus: Re
|
|
1414
1415
|
})
|
|
1415
1416
|
});
|
|
1416
|
-
return
|
|
1417
|
+
return Ye || !a || !qe ? t : /* @__PURE__ */ G(ve, {
|
|
1417
1418
|
placement: "bottom-end",
|
|
1418
1419
|
matchReferenceWidth: !1,
|
|
1419
1420
|
open: be,
|
|
1420
|
-
onOpenChange:
|
|
1421
|
+
onOpenChange: xe,
|
|
1421
1422
|
trigger: [],
|
|
1422
1423
|
outsideClosable: !0,
|
|
1423
1424
|
renderOverlay: () => a(e, we),
|
|
1424
1425
|
children: t
|
|
1425
1426
|
});
|
|
1426
|
-
}, jt =
|
|
1427
|
-
return /* @__PURE__ */
|
|
1427
|
+
}, jt = nt || Ve || ct || Ye && qe || Xe && He || Xe && We || et && !nt || yt.length > 0 || Ue;
|
|
1428
|
+
return /* @__PURE__ */ K("div", {
|
|
1428
1429
|
className: "flex flex-col gap-3 px-6 py-4",
|
|
1429
|
-
children: [/* @__PURE__ */
|
|
1430
|
+
children: [/* @__PURE__ */ G(E, {
|
|
1430
1431
|
item: e,
|
|
1431
1432
|
iconSize: 52,
|
|
1432
|
-
nameClassName: M(
|
|
1433
|
+
nameClassName: M(ae, Mn.name),
|
|
1433
1434
|
featuredLabel: D?.featuredLabel ?? "Featured",
|
|
1434
1435
|
featuredChipStyle: O?.colors?.featuredChipStyle,
|
|
1435
1436
|
statusBadge: le,
|
|
1436
|
-
footer: e.folder.length > 0 ? /* @__PURE__ */
|
|
1437
|
+
footer: e.folder.length > 0 ? /* @__PURE__ */ G(Se, {
|
|
1437
1438
|
segments: e.folder,
|
|
1438
|
-
labelClassName:
|
|
1439
|
-
leafClassName:
|
|
1439
|
+
labelClassName: oe,
|
|
1440
|
+
leafClassName: se
|
|
1440
1441
|
}) : void 0
|
|
1441
|
-
}), jt && /* @__PURE__ */
|
|
1442
|
+
}), jt && /* @__PURE__ */ K("div", {
|
|
1442
1443
|
className: "flex flex-wrap items-center gap-2 ps-[60px]",
|
|
1443
1444
|
children: [
|
|
1444
|
-
|
|
1445
|
-
|
|
1445
|
+
nt && Ot(wt || Z ? je : Ne),
|
|
1446
|
+
Ve && /* @__PURE__ */ G(Ne, {
|
|
1446
1447
|
label: D?.primaryActionLabel ?? "Use in chat",
|
|
1447
|
-
iconBefore: /* @__PURE__ */
|
|
1448
|
+
iconBefore: /* @__PURE__ */ G(st, { size: z.MD }),
|
|
1448
1449
|
onClick: ue,
|
|
1449
|
-
disabled:
|
|
1450
|
+
disabled: ce === St.LimitReached
|
|
1450
1451
|
}),
|
|
1451
|
-
ct && /* @__PURE__ */
|
|
1452
|
+
ct && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(Ne, {
|
|
1452
1453
|
label: D?.downloadActionLabel ?? "Download",
|
|
1453
|
-
iconBefore: he ? /* @__PURE__ */
|
|
1454
|
+
iconBefore: he ? /* @__PURE__ */ G(ze, {
|
|
1454
1455
|
size: z.MD,
|
|
1455
1456
|
"aria-hidden": !0
|
|
1456
|
-
}) : /* @__PURE__ */
|
|
1457
|
+
}) : /* @__PURE__ */ G($e, {
|
|
1457
1458
|
size: z.MD,
|
|
1458
1459
|
"aria-hidden": !0,
|
|
1459
1460
|
stroke: B
|
|
@@ -1461,22 +1462,22 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1461
1462
|
onClick: ye,
|
|
1462
1463
|
disabled: he,
|
|
1463
1464
|
"aria-busy": he
|
|
1464
|
-
}), he && /* @__PURE__ */
|
|
1465
|
+
}), he && /* @__PURE__ */ G("span", {
|
|
1465
1466
|
role: "status",
|
|
1466
1467
|
"aria-live": "polite",
|
|
1467
1468
|
className: "sr-only",
|
|
1468
1469
|
children: D?.downloadingStatusLabel ?? "Downloading"
|
|
1469
1470
|
})] }),
|
|
1470
|
-
|
|
1471
|
+
Ye && qe && /* @__PURE__ */ G(Pn, {
|
|
1471
1472
|
item: e,
|
|
1472
1473
|
onShare: i,
|
|
1473
1474
|
shareOverlay: a,
|
|
1474
1475
|
isShareVisible: o,
|
|
1475
1476
|
label: D?.shareLabel
|
|
1476
1477
|
}),
|
|
1477
|
-
|
|
1478
|
+
Xe && He && /* @__PURE__ */ G(je, {
|
|
1478
1479
|
label: D?.unpublishLabel ?? "Unpublish",
|
|
1479
|
-
iconBefore: /* @__PURE__ */
|
|
1480
|
+
iconBefore: /* @__PURE__ */ G(ht, {
|
|
1480
1481
|
size: z.MD,
|
|
1481
1482
|
"aria-hidden": !0,
|
|
1482
1483
|
stroke: B
|
|
@@ -1485,9 +1486,9 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1485
1486
|
onMouseEnter: Be,
|
|
1486
1487
|
onFocus: Be
|
|
1487
1488
|
}),
|
|
1488
|
-
|
|
1489
|
+
Xe && We && /* @__PURE__ */ G(je, {
|
|
1489
1490
|
label: D?.publishLabel ?? "Publish",
|
|
1490
|
-
iconBefore: /* @__PURE__ */
|
|
1491
|
+
iconBefore: /* @__PURE__ */ G(gt, {
|
|
1491
1492
|
size: z.MD,
|
|
1492
1493
|
"aria-hidden": !0,
|
|
1493
1494
|
stroke: B
|
|
@@ -1496,16 +1497,16 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1496
1497
|
onMouseEnter: Be,
|
|
1497
1498
|
onFocus: Be
|
|
1498
1499
|
}),
|
|
1499
|
-
et && !
|
|
1500
|
-
|
|
1500
|
+
et && !nt && Ot(je),
|
|
1501
|
+
J ? kt(J) : (yt.length > 0 || Ue) && At()
|
|
1501
1502
|
]
|
|
1502
1503
|
})]
|
|
1503
1504
|
});
|
|
1504
|
-
},
|
|
1505
|
+
}, zn = ({ topics: e, content: t, detailsStyles: n }) => {
|
|
1505
1506
|
let r = n?.typography?.contentHeadingClassName ?? "dial-small-semi-text", i = n?.typography?.contentClassName ?? "dial-small-text";
|
|
1506
|
-
return /* @__PURE__ */
|
|
1507
|
+
return /* @__PURE__ */ K("div", {
|
|
1507
1508
|
className: "flex flex-col gap-5",
|
|
1508
|
-
children: [/* @__PURE__ */
|
|
1509
|
+
children: [/* @__PURE__ */ G(A, {
|
|
1509
1510
|
content: t,
|
|
1510
1511
|
classNames: {
|
|
1511
1512
|
h1: r,
|
|
@@ -1518,24 +1519,24 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1518
1519
|
ul: i,
|
|
1519
1520
|
ol: i
|
|
1520
1521
|
}
|
|
1521
|
-
}), e && e.length > 0 && /* @__PURE__ */
|
|
1522
|
+
}), e && e.length > 0 && /* @__PURE__ */ G("div", {
|
|
1522
1523
|
className: "flex flex-wrap gap-2",
|
|
1523
|
-
children: e.map((e) => /* @__PURE__ */
|
|
1524
|
+
children: e.map((e) => /* @__PURE__ */ G(Gt, { label: e }, e))
|
|
1524
1525
|
})]
|
|
1525
1526
|
});
|
|
1526
|
-
},
|
|
1527
|
+
}, Bn = {
|
|
1527
1528
|
divider: "_divider_1gzl9_1",
|
|
1528
1529
|
fileCount: "_fileCount_1gzl9_5",
|
|
1529
1530
|
body: "_body_1gzl9_9"
|
|
1530
|
-
},
|
|
1531
|
+
}, Vn = (e, t, n = void 0) => e.flatMap((e) => {
|
|
1531
1532
|
let r = {
|
|
1532
1533
|
node: e,
|
|
1533
1534
|
parentId: n
|
|
1534
1535
|
};
|
|
1535
|
-
return e.type ===
|
|
1536
|
-
}),
|
|
1537
|
-
let c =
|
|
1538
|
-
|
|
1536
|
+
return e.type === Z.File || !t.has(e.id) ? [r] : [r, ...Vn(e.items, t, e.id)];
|
|
1537
|
+
}), Hn = ({ nodes: e, selectedFileId: t, expandedFolderIds: n, onToggleFolder: r, onSelectFile: i, onClose: a, ariaLabel: o = "Select file", rowNameClassName: s = "dial-small-text" }) => {
|
|
1538
|
+
let c = I(() => Vn(e, n), [e, n]), l = L({}), [u, d] = R(() => t ?? c[0]?.node.id);
|
|
1539
|
+
F(() => {
|
|
1539
1540
|
u != null && l.current[u]?.focus();
|
|
1540
1541
|
}, []);
|
|
1541
1542
|
let f = (e) => {
|
|
@@ -1558,14 +1559,14 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1558
1559
|
break;
|
|
1559
1560
|
}
|
|
1560
1561
|
case "ArrowRight":
|
|
1561
|
-
e.preventDefault(), o.node.type ===
|
|
1562
|
+
e.preventDefault(), o.node.type === Z.Folder && !n.has(o.node.id) && r(o.node.id);
|
|
1562
1563
|
break;
|
|
1563
1564
|
case "ArrowLeft":
|
|
1564
|
-
e.preventDefault(), o.node.type ===
|
|
1565
|
+
e.preventDefault(), o.node.type === Z.Folder && n.has(o.node.id) ? r(o.node.id) : o.parentId != null && f(o.parentId);
|
|
1565
1566
|
break;
|
|
1566
1567
|
case "Enter":
|
|
1567
1568
|
case " ":
|
|
1568
|
-
e.preventDefault(), o.node.type ===
|
|
1569
|
+
e.preventDefault(), o.node.type === Z.Folder ? r(o.node.id) : i(o.node.id);
|
|
1569
1570
|
break;
|
|
1570
1571
|
case "Escape":
|
|
1571
1572
|
e.preventDefault(), a();
|
|
@@ -1574,9 +1575,9 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1574
1575
|
}
|
|
1575
1576
|
}, m = (e) => M("flex h-10 shrink-0 cursor-pointer items-center gap-2 rounded-2 px-3 outline-none", "hover:bg-control-accent-alpha-hover focus-visible:bg-control-accent-alpha-hover", e && "bg-control-accent-alpha-hover"), h = (e) => {
|
|
1576
1577
|
let a = e.id === u;
|
|
1577
|
-
if (e.type ===
|
|
1578
|
+
if (e.type === Z.File) {
|
|
1578
1579
|
let n = e.id === t;
|
|
1579
|
-
return /* @__PURE__ */
|
|
1580
|
+
return /* @__PURE__ */ G("div", {
|
|
1580
1581
|
ref: (t) => {
|
|
1581
1582
|
l.current[e.id] = t;
|
|
1582
1583
|
},
|
|
@@ -1586,14 +1587,14 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1586
1587
|
className: M(m(a), n && "bg-control-accent-alpha-active"),
|
|
1587
1588
|
onClick: () => i(e.id),
|
|
1588
1589
|
onFocus: () => d(e.id),
|
|
1589
|
-
children: /* @__PURE__ */
|
|
1590
|
+
children: /* @__PURE__ */ G("span", {
|
|
1590
1591
|
className: M("min-w-0 flex-1 truncate", s),
|
|
1591
1592
|
children: e.name
|
|
1592
1593
|
})
|
|
1593
1594
|
}, e.id);
|
|
1594
1595
|
}
|
|
1595
1596
|
let o = n.has(e.id);
|
|
1596
|
-
return /* @__PURE__ */
|
|
1597
|
+
return /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ K("div", {
|
|
1597
1598
|
ref: (t) => {
|
|
1598
1599
|
l.current[e.id] = t;
|
|
1599
1600
|
},
|
|
@@ -1604,37 +1605,37 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1604
1605
|
onClick: () => r(e.id),
|
|
1605
1606
|
onFocus: () => d(e.id),
|
|
1606
1607
|
children: [
|
|
1607
|
-
/* @__PURE__ */
|
|
1608
|
+
/* @__PURE__ */ G(et, {
|
|
1608
1609
|
size: z.SM,
|
|
1609
1610
|
className: "shrink-0",
|
|
1610
1611
|
"aria-hidden": !0,
|
|
1611
1612
|
stroke: B
|
|
1612
1613
|
}),
|
|
1613
|
-
/* @__PURE__ */
|
|
1614
|
+
/* @__PURE__ */ G("span", {
|
|
1614
1615
|
className: M("min-w-0 flex-1 truncate", s),
|
|
1615
1616
|
children: e.name
|
|
1616
1617
|
}),
|
|
1617
|
-
/* @__PURE__ */
|
|
1618
|
+
/* @__PURE__ */ G(Je, {
|
|
1618
1619
|
size: z.SM,
|
|
1619
1620
|
className: M("shrink-0 transition-transform", !o && "-rotate-90 rtl:rotate-90"),
|
|
1620
1621
|
"aria-hidden": !0,
|
|
1621
1622
|
stroke: B
|
|
1622
1623
|
})
|
|
1623
1624
|
]
|
|
1624
|
-
}), o && e.items.length > 0 && /* @__PURE__ */
|
|
1625
|
+
}), o && e.items.length > 0 && /* @__PURE__ */ G("div", {
|
|
1625
1626
|
role: "group",
|
|
1626
1627
|
className: "ps-6",
|
|
1627
1628
|
children: e.items.map((e) => h(e))
|
|
1628
1629
|
})] }, e.id);
|
|
1629
1630
|
};
|
|
1630
|
-
return /* @__PURE__ */
|
|
1631
|
+
return /* @__PURE__ */ G("div", {
|
|
1631
1632
|
role: "tree",
|
|
1632
1633
|
"aria-label": o,
|
|
1633
1634
|
onKeyDown: p,
|
|
1634
1635
|
children: e.map((e) => h(e))
|
|
1635
1636
|
});
|
|
1636
|
-
},
|
|
1637
|
-
let v = _?.typography?.contentClassName ?? "dial-small-text", y = _?.typography?.contentHeadingClassName ?? "dial-small-semi-text", b = _?.typography?.contentFileCountClassName ?? "dial-tiny-text", x = t != null && t !== "", S = n ?? [], C =
|
|
1637
|
+
}, Un = () => void 0, Wn = ({ content: e, description: t, files: n, selectedFileId: r, onSelectFile: i, isFileLoading: a = !1, expandedFolderIds: o = /* @__PURE__ */ new Set(), onToggleFolder: s = Un, isFileSelectorOpen: c = !1, onFileSelectorOpenChange: l = Un, 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: _ }) => {
|
|
1638
|
+
let v = _?.typography?.contentClassName ?? "dial-small-text", y = _?.typography?.contentHeadingClassName ?? "dial-small-semi-text", b = _?.typography?.contentFileCountClassName ?? "dial-tiny-text", x = t != null && t !== "", S = n ?? [], C = $t(S) > 1, w = tn(S, r) ?? "", T = {
|
|
1638
1639
|
nodes: S,
|
|
1639
1640
|
selectedFileId: r,
|
|
1640
1641
|
expandedFolderIds: o,
|
|
@@ -1652,58 +1653,58 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1652
1653
|
type: Q.Markdown,
|
|
1653
1654
|
text: e
|
|
1654
1655
|
};
|
|
1655
|
-
return /* @__PURE__ */
|
|
1656
|
+
return /* @__PURE__ */ K("div", {
|
|
1656
1657
|
className: "flex h-full flex-col gap-4 pb-6",
|
|
1657
1658
|
children: [
|
|
1658
|
-
C && /* @__PURE__ */
|
|
1659
|
+
C && /* @__PURE__ */ K("div", {
|
|
1659
1660
|
className: "flex shrink-0 items-center gap-3",
|
|
1660
|
-
children: [/* @__PURE__ */
|
|
1661
|
+
children: [/* @__PURE__ */ G(ve, {
|
|
1661
1662
|
open: c,
|
|
1662
1663
|
onOpenChange: l,
|
|
1663
1664
|
trigger: [],
|
|
1664
1665
|
matchReferenceWidth: !1,
|
|
1665
1666
|
listClassName: "w-[280px] shadow-md",
|
|
1666
1667
|
placement: "bottom-start",
|
|
1667
|
-
renderOverlay: () => g ? g(T) : /* @__PURE__ */
|
|
1668
|
-
children: /* @__PURE__ */
|
|
1668
|
+
renderOverlay: () => g ? g(T) : /* @__PURE__ */ G(Hn, { ...T }),
|
|
1669
|
+
children: /* @__PURE__ */ G(V, {
|
|
1669
1670
|
label: w,
|
|
1670
|
-
size:
|
|
1671
|
+
size: be.Small,
|
|
1671
1672
|
isOpen: c,
|
|
1672
1673
|
onClick: () => l(!c)
|
|
1673
1674
|
})
|
|
1674
|
-
}), /* @__PURE__ */
|
|
1675
|
-
className: M("shrink-0", b,
|
|
1676
|
-
children: d(
|
|
1675
|
+
}), /* @__PURE__ */ G("span", {
|
|
1676
|
+
className: M("shrink-0", b, Bn.fileCount),
|
|
1677
|
+
children: d($t(S))
|
|
1677
1678
|
})]
|
|
1678
1679
|
}),
|
|
1679
|
-
x && /* @__PURE__ */
|
|
1680
|
+
x && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("p", {
|
|
1680
1681
|
className: M("m-0", v),
|
|
1681
1682
|
children: t
|
|
1682
|
-
}), /* @__PURE__ */
|
|
1683
|
-
/* @__PURE__ */
|
|
1684
|
-
className: M("min-h-0 flex-1 text-start", h == null ? "overflow-auto break-words" : "overflow-hidden", h == null &&
|
|
1685
|
-
children: [a && /* @__PURE__ */
|
|
1683
|
+
}), /* @__PURE__ */ G("div", { className: M("shrink-0", Bn.divider) })] }),
|
|
1684
|
+
/* @__PURE__ */ K("div", {
|
|
1685
|
+
className: M("min-h-0 flex-1 text-start", h == null ? "overflow-auto break-words" : "overflow-hidden", h == null && Bn.body, h == null && v),
|
|
1686
|
+
children: [a && /* @__PURE__ */ G("span", {
|
|
1686
1687
|
role: "status",
|
|
1687
1688
|
className: "sr-only",
|
|
1688
1689
|
children: f
|
|
1689
1690
|
}), (() => {
|
|
1690
1691
|
if (h != null) return h;
|
|
1691
1692
|
switch (E.type) {
|
|
1692
|
-
case Q.Markdown: return /* @__PURE__ */
|
|
1693
|
+
case Q.Markdown: return /* @__PURE__ */ G(te, {
|
|
1693
1694
|
content: E.text,
|
|
1694
1695
|
headingClassName: y
|
|
1695
1696
|
});
|
|
1696
|
-
case Q.Text: return /* @__PURE__ */
|
|
1697
|
+
case Q.Text: return /* @__PURE__ */ G(k, {
|
|
1697
1698
|
language: E.language ?? "",
|
|
1698
1699
|
value: E.text,
|
|
1699
1700
|
hideDownload: !0
|
|
1700
1701
|
});
|
|
1701
|
-
case Q.Image: return /* @__PURE__ */
|
|
1702
|
+
case Q.Image: return /* @__PURE__ */ G("img", {
|
|
1702
1703
|
src: E.url,
|
|
1703
1704
|
alt: w,
|
|
1704
1705
|
className: "max-w-full"
|
|
1705
1706
|
});
|
|
1706
|
-
case Q.Unsupported: return /* @__PURE__ */
|
|
1707
|
+
case Q.Unsupported: return /* @__PURE__ */ G("p", {
|
|
1707
1708
|
className: "m-0",
|
|
1708
1709
|
children: p
|
|
1709
1710
|
});
|
|
@@ -1712,10 +1713,10 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1712
1713
|
})
|
|
1713
1714
|
]
|
|
1714
1715
|
});
|
|
1715
|
-
},
|
|
1716
|
+
}, Gn = new Intl.NumberFormat(void 0, { maximumFractionDigits: 2 }), Kn = /* @__PURE__ */ function(e) {
|
|
1716
1717
|
return e.Default = "default", e.Warning = "warning", e.Danger = "danger", e;
|
|
1717
|
-
}({}),
|
|
1718
|
-
let t =
|
|
1718
|
+
}({}), qn = (e) => !Number.isFinite(e.used) || !Number.isFinite(e.total) ? 0 : Math.min(Math.max(e.used, 0), Math.max(e.total, 0)), Jn = (e) => Number.isFinite(e) && e > 0 ? e : 1, Yn = ({ used: e, total: t, valueLabel: n }) => n ?? `${Gn.format(e)} / ${Gn.format(t)}`, Xn = ({ total: e }) => Number.isFinite(e) && e > 0, Zn = (e) => e.isUnlimited !== !0 && Xn(e), Qn = (e) => Xn(e) ? Math.max(e.used, 0) / e.total : 0, $n = (e) => {
|
|
1719
|
+
let t = Qn(e);
|
|
1719
1720
|
return t >= 1 ? "danger" : t >= .75 ? "warning" : "default";
|
|
1720
1721
|
}, $ = {
|
|
1721
1722
|
sectionHeading: "_sectionHeading_10rw6_1",
|
|
@@ -1728,90 +1729,90 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1728
1729
|
progressFillDanger: "_progressFillDanger_10rw6_32",
|
|
1729
1730
|
resetLabel: "_resetLabel_10rw6_39",
|
|
1730
1731
|
valueDanger: "_valueDanger_10rw6_44"
|
|
1731
|
-
},
|
|
1732
|
-
let s =
|
|
1733
|
-
value:
|
|
1734
|
-
max:
|
|
1735
|
-
size:
|
|
1736
|
-
className: M("!h-1 w-full", $.progressTrack, c ===
|
|
1732
|
+
}, er = ({ row: e, layout: t, labelClassName: n, captionClassName: r, valueClassName: i, noteValueClassName: a, noteClassName: o }) => {
|
|
1733
|
+
let s = Yn(e), c = $n(e), l = /* @__PURE__ */ G(Pe, {
|
|
1734
|
+
value: qn(e),
|
|
1735
|
+
max: Jn(e.total),
|
|
1736
|
+
size: be.Small,
|
|
1737
|
+
className: M("!h-1 w-full", $.progressTrack, c === Kn.Default && $.progressFillDefault, c === Kn.Warning && $.progressFillWarning, c === Kn.Danger && $.progressFillDanger),
|
|
1737
1738
|
"aria-label": e.label,
|
|
1738
1739
|
"aria-valuetext": e.ariaLabel ?? s
|
|
1739
|
-
}), u = e.captionLabel != null && /* @__PURE__ */
|
|
1740
|
+
}), u = e.captionLabel != null && /* @__PURE__ */ G("span", {
|
|
1740
1741
|
className: M("break-words", r, $.label),
|
|
1741
1742
|
children: e.captionLabel
|
|
1742
|
-
}), d = e.resetLabel != null && /* @__PURE__ */
|
|
1743
|
+
}), d = e.resetLabel != null && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("time", {
|
|
1743
1744
|
dateTime: e.resetIsoValue,
|
|
1744
1745
|
"aria-hidden": e.resetAriaLabel != null || void 0,
|
|
1745
1746
|
className: M("break-words", r, $.resetLabel),
|
|
1746
1747
|
children: e.resetLabel
|
|
1747
|
-
}), e.resetAriaLabel != null && /* @__PURE__ */
|
|
1748
|
+
}), e.resetAriaLabel != null && /* @__PURE__ */ G("span", {
|
|
1748
1749
|
className: "sr-only",
|
|
1749
1750
|
children: e.resetAriaLabel
|
|
1750
1751
|
})] });
|
|
1751
|
-
return t ===
|
|
1752
|
+
return t === wt.Stacked ? /* @__PURE__ */ K("li", {
|
|
1752
1753
|
className: M("flex flex-col gap-2 border-b py-3 first:pt-0 last:border-b-0 last:pb-0", $.divider),
|
|
1753
1754
|
children: [
|
|
1754
|
-
/* @__PURE__ */
|
|
1755
|
+
/* @__PURE__ */ K("div", {
|
|
1755
1756
|
className: "flex items-baseline justify-between gap-3",
|
|
1756
|
-
children: [/* @__PURE__ */
|
|
1757
|
+
children: [/* @__PURE__ */ G("span", {
|
|
1757
1758
|
className: M("min-w-0 break-words", n, $.valuePrimary),
|
|
1758
1759
|
children: e.label
|
|
1759
|
-
}), /* @__PURE__ */
|
|
1760
|
-
className: M("shrink-0", i, c ===
|
|
1760
|
+
}), /* @__PURE__ */ G("span", {
|
|
1761
|
+
className: M("shrink-0", i, c === Kn.Danger ? $.valueDanger : $.valuePrimary),
|
|
1761
1762
|
children: s
|
|
1762
1763
|
})]
|
|
1763
1764
|
}),
|
|
1764
1765
|
u,
|
|
1765
|
-
|
|
1766
|
+
Zn(e) ? l : e.noteLabel != null && /* @__PURE__ */ G("span", {
|
|
1766
1767
|
className: M(o, $.label),
|
|
1767
1768
|
children: e.noteLabel
|
|
1768
1769
|
}),
|
|
1769
1770
|
d
|
|
1770
1771
|
]
|
|
1771
|
-
}) : /* @__PURE__ */
|
|
1772
|
+
}) : /* @__PURE__ */ K("li", {
|
|
1772
1773
|
className: M("flex items-center justify-between gap-5 border-b py-4 first:pt-0 last:border-b-0 last:pb-0", $.divider),
|
|
1773
|
-
children: [/* @__PURE__ */
|
|
1774
|
+
children: [/* @__PURE__ */ K("div", {
|
|
1774
1775
|
className: "flex min-w-0 flex-1 flex-col",
|
|
1775
1776
|
children: [
|
|
1776
|
-
/* @__PURE__ */
|
|
1777
|
+
/* @__PURE__ */ G("span", {
|
|
1777
1778
|
className: M("break-words", n, $.label),
|
|
1778
1779
|
children: e.label
|
|
1779
1780
|
}),
|
|
1780
1781
|
u,
|
|
1781
1782
|
d
|
|
1782
1783
|
]
|
|
1783
|
-
}),
|
|
1784
|
+
}), Zn(e) ? /* @__PURE__ */ K("div", {
|
|
1784
1785
|
className: "flex w-32 shrink-0 flex-col items-end gap-2",
|
|
1785
|
-
children: [/* @__PURE__ */
|
|
1786
|
+
children: [/* @__PURE__ */ G("div", {
|
|
1786
1787
|
className: M("flex gap-1", i),
|
|
1787
|
-
children: e.usedLabel != null && e.totalLabel != null ? /* @__PURE__ */
|
|
1788
|
+
children: e.usedLabel != null && e.totalLabel != null ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("span", {
|
|
1788
1789
|
className: $.valuePrimary,
|
|
1789
1790
|
children: e.usedLabel
|
|
1790
|
-
}), /* @__PURE__ */
|
|
1791
|
+
}), /* @__PURE__ */ G("span", {
|
|
1791
1792
|
className: $.label,
|
|
1792
1793
|
children: ` / ${e.totalLabel}`
|
|
1793
|
-
})] }) : /* @__PURE__ */
|
|
1794
|
+
})] }) : /* @__PURE__ */ G("span", {
|
|
1794
1795
|
className: $.label,
|
|
1795
1796
|
children: s
|
|
1796
1797
|
})
|
|
1797
1798
|
}), l]
|
|
1798
|
-
}) : /* @__PURE__ */
|
|
1799
|
+
}) : /* @__PURE__ */ K("div", {
|
|
1799
1800
|
className: "flex shrink-0 flex-col items-end",
|
|
1800
|
-
children: [/* @__PURE__ */
|
|
1801
|
+
children: [/* @__PURE__ */ G("span", {
|
|
1801
1802
|
className: M(a, $.valuePrimary),
|
|
1802
1803
|
children: s
|
|
1803
|
-
}), e.noteLabel != null && /* @__PURE__ */
|
|
1804
|
+
}), e.noteLabel != null && /* @__PURE__ */ G("span", {
|
|
1804
1805
|
className: M(o, $.label),
|
|
1805
1806
|
children: e.noteLabel
|
|
1806
1807
|
})]
|
|
1807
1808
|
})]
|
|
1808
1809
|
});
|
|
1809
|
-
},
|
|
1810
|
+
}, tr = ({ group: e, sectionClassName: t, layout: n, labelClassName: r, captionClassName: i, valueClassName: a, noteValueClassName: o, noteClassName: s }) => /* @__PURE__ */ K("section", { children: [/* @__PURE__ */ G("p", {
|
|
1810
1811
|
className: M("mb-3 mt-0", t, $.sectionHeading),
|
|
1811
1812
|
children: e.label
|
|
1812
|
-
}), /* @__PURE__ */
|
|
1813
|
+
}), /* @__PURE__ */ G("ul", {
|
|
1813
1814
|
className: "m-0 flex list-none flex-col p-0",
|
|
1814
|
-
children: e.rows.map((e) => /* @__PURE__ */
|
|
1815
|
+
children: e.rows.map((e) => /* @__PURE__ */ G(er, {
|
|
1815
1816
|
row: e,
|
|
1816
1817
|
layout: n,
|
|
1817
1818
|
labelClassName: r,
|
|
@@ -1820,9 +1821,9 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1820
1821
|
noteValueClassName: o,
|
|
1821
1822
|
noteClassName: s
|
|
1822
1823
|
}, e.label))
|
|
1823
|
-
})] }),
|
|
1824
|
+
})] }), nr = ({ limits: e, layout: t = wt.Inline, labelClassName: n = "dial-small-semi-text", captionClassName: r = "dial-caption-text", valueClassName: i = "dial-tiny-text", noteValueClassName: a = "dial-tiny-semi-text", noteClassName: o = "dial-caption-text", sectionClassName: s = "dial-caption-text", footerClassName: c = "dial-caption-text", footerNote: l, colors: u }) => {
|
|
1824
1825
|
let d = e?.groups.filter((e) => e.rows.length > 0);
|
|
1825
|
-
return d == null || d.length === 0 ? null : /* @__PURE__ */
|
|
1826
|
+
return d == null || d.length === 0 ? null : /* @__PURE__ */ K("div", {
|
|
1826
1827
|
className: "flex flex-col gap-6",
|
|
1827
1828
|
style: j({
|
|
1828
1829
|
"--lt-section-heading": u?.sectionHeading,
|
|
@@ -1835,7 +1836,7 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1835
1836
|
"--lt-progress-fill-warning": u?.progressFillWarning,
|
|
1836
1837
|
"--lt-progress-fill-danger": u?.progressFillDanger
|
|
1837
1838
|
}),
|
|
1838
|
-
children: [d.map((e) => /* @__PURE__ */
|
|
1839
|
+
children: [d.map((e) => /* @__PURE__ */ G(tr, {
|
|
1839
1840
|
group: e,
|
|
1840
1841
|
layout: t,
|
|
1841
1842
|
sectionClassName: s,
|
|
@@ -1844,18 +1845,18 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1844
1845
|
valueClassName: i,
|
|
1845
1846
|
noteValueClassName: a,
|
|
1846
1847
|
noteClassName: o
|
|
1847
|
-
}, e.label)), l != null && /* @__PURE__ */
|
|
1848
|
+
}, e.label)), l != null && /* @__PURE__ */ G("p", {
|
|
1848
1849
|
className: M("m-0 border-t pt-4", c, $.divider, $.label),
|
|
1849
1850
|
children: l
|
|
1850
1851
|
})]
|
|
1851
1852
|
});
|
|
1852
|
-
},
|
|
1853
|
+
}, rr = ({ sections: e, sectionClassName: t, labelClassName: n, valueClassName: r, valueTrueClassName: i, yesLabel: a, noLabel: o }) => e ? /* @__PURE__ */ G("div", {
|
|
1853
1854
|
className: "flex flex-col gap-4",
|
|
1854
|
-
children: e.map((e, s) => /* @__PURE__ */
|
|
1855
|
+
children: e.map((e, s) => /* @__PURE__ */ K("div", {
|
|
1855
1856
|
className: "flex flex-col gap-4",
|
|
1856
|
-
children: [s > 0 && /* @__PURE__ */
|
|
1857
|
+
children: [s > 0 && /* @__PURE__ */ G("div", { className: M("shrink-0 border-b", Dn.divider) }), /* @__PURE__ */ G("div", {
|
|
1857
1858
|
className: "px-6",
|
|
1858
|
-
children: /* @__PURE__ */
|
|
1859
|
+
children: /* @__PURE__ */ G(an, {
|
|
1859
1860
|
sectionLabel: e.title,
|
|
1860
1861
|
values: e.specs,
|
|
1861
1862
|
sectionClassName: t,
|
|
@@ -1867,7 +1868,7 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1867
1868
|
})
|
|
1868
1869
|
})]
|
|
1869
1870
|
}, s))
|
|
1870
|
-
}) : null,
|
|
1871
|
+
}) : null, ir = ({ pricing: e, pricesSectionLabel: t = "Token pricing", limitsSectionLabel: n = "Usage limits", labelClassName: r = "dial-small-semi-text", valueClassName: i = "dial-small-text", sectionClassName: a = "dial-caption-text" }) => {
|
|
1871
1872
|
if (e == null) return null;
|
|
1872
1873
|
let o = e.prices?.map((e) => ({
|
|
1873
1874
|
label: e.label,
|
|
@@ -1876,15 +1877,15 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1876
1877
|
label: e.label,
|
|
1877
1878
|
value: e.value
|
|
1878
1879
|
}));
|
|
1879
|
-
return /* @__PURE__ */
|
|
1880
|
+
return /* @__PURE__ */ K("div", {
|
|
1880
1881
|
className: "flex flex-col gap-4",
|
|
1881
|
-
children: [/* @__PURE__ */
|
|
1882
|
+
children: [/* @__PURE__ */ G(an, {
|
|
1882
1883
|
sectionLabel: t,
|
|
1883
1884
|
values: o ?? [],
|
|
1884
1885
|
labelClassName: r,
|
|
1885
1886
|
valueClassName: i,
|
|
1886
1887
|
sectionClassName: a
|
|
1887
|
-
}), /* @__PURE__ */
|
|
1888
|
+
}), /* @__PURE__ */ G(an, {
|
|
1888
1889
|
sectionLabel: n,
|
|
1889
1890
|
values: s ?? [],
|
|
1890
1891
|
labelClassName: r,
|
|
@@ -1892,44 +1893,44 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1892
1893
|
sectionClassName: a
|
|
1893
1894
|
})]
|
|
1894
1895
|
});
|
|
1895
|
-
},
|
|
1896
|
+
}, ar = {
|
|
1896
1897
|
container: "_container_ddi3i_1",
|
|
1897
1898
|
header: "_header_ddi3i_5",
|
|
1898
1899
|
cell: "_cell_ddi3i_10",
|
|
1899
1900
|
evenRow: "_evenRow_ddi3i_17"
|
|
1900
|
-
},
|
|
1901
|
+
}, or = ({ columns: e, rows: t, columnsTemplate: n, headingClassName: r = "dial-caption-lead-semi-text", cellClassName: i = "dial-tiny-text" }) => {
|
|
1901
1902
|
let a = n ?? `repeat(${e.length}, 1fr)`;
|
|
1902
|
-
return /* @__PURE__ */
|
|
1903
|
-
className: M(
|
|
1903
|
+
return /* @__PURE__ */ K("div", {
|
|
1904
|
+
className: M(ar.container, "grid overflow-hidden rounded-md"),
|
|
1904
1905
|
style: { gridTemplateColumns: a },
|
|
1905
|
-
children: [e.map((e) => /* @__PURE__ */
|
|
1906
|
-
className: M("px-2 py-1 text-start", r,
|
|
1906
|
+
children: [e.map((e) => /* @__PURE__ */ G("div", {
|
|
1907
|
+
className: M("px-2 py-1 text-start", r, ar.header),
|
|
1907
1908
|
children: e
|
|
1908
|
-
}, e)), t.map((e, t) => /* @__PURE__ */
|
|
1909
|
-
className: M("px-2 py-1.5", i,
|
|
1909
|
+
}, e)), t.map((e, t) => /* @__PURE__ */ G(ie, { children: e.map((e, n) => /* @__PURE__ */ G("div", {
|
|
1910
|
+
className: M("px-2 py-1.5", i, ar.cell, t % 2 == 1 ? ar.evenRow : void 0),
|
|
1910
1911
|
children: e
|
|
1911
1912
|
}, n)) }, t))]
|
|
1912
1913
|
});
|
|
1913
|
-
},
|
|
1914
|
+
}, sr = {
|
|
1914
1915
|
divider: "_divider_1f796_1",
|
|
1915
1916
|
description: "_description_1f796_5",
|
|
1916
1917
|
code: "_code_1f796_9"
|
|
1917
|
-
},
|
|
1918
|
+
}, cr = ({ tools: e, toolNameClassName: t = "dial-small-semi-text", descriptionClassName: n = "dial-small-text", tableHeadingClassName: r = "dial-caption-text", tableCellClassName: i = "dial-tiny-text" }) => e == null ? null : /* @__PURE__ */ G("div", {
|
|
1918
1919
|
className: "flex flex-col",
|
|
1919
|
-
children: e.tools.map((e, a) => /* @__PURE__ */
|
|
1920
|
-
className: M("flex flex-col gap-3 px-[22px] py-4", a > 0 ?
|
|
1920
|
+
children: e.tools.map((e, a) => /* @__PURE__ */ K("div", {
|
|
1921
|
+
className: M("flex flex-col gap-3 px-[22px] py-4", a > 0 ? sr.divider : void 0),
|
|
1921
1922
|
children: [
|
|
1922
|
-
/* @__PURE__ */
|
|
1923
|
+
/* @__PURE__ */ K("div", {
|
|
1923
1924
|
className: "flex flex-col gap-1",
|
|
1924
|
-
children: [/* @__PURE__ */
|
|
1925
|
+
children: [/* @__PURE__ */ G("span", {
|
|
1925
1926
|
className: t,
|
|
1926
1927
|
children: e.name
|
|
1927
|
-
}), e.description != null && /* @__PURE__ */
|
|
1928
|
-
className: M("m-0", n,
|
|
1928
|
+
}), e.description != null && /* @__PURE__ */ G("p", {
|
|
1929
|
+
className: M("m-0", n, sr.description),
|
|
1929
1930
|
children: e.description
|
|
1930
1931
|
})]
|
|
1931
1932
|
}),
|
|
1932
|
-
e.inputParams != null && e.inputParams.length > 0 && /* @__PURE__ */
|
|
1933
|
+
e.inputParams != null && e.inputParams.length > 0 && /* @__PURE__ */ G(or, {
|
|
1933
1934
|
columns: [
|
|
1934
1935
|
"Name",
|
|
1935
1936
|
"Type",
|
|
@@ -1937,12 +1938,12 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1937
1938
|
],
|
|
1938
1939
|
columnsTemplate: "1fr 1fr auto",
|
|
1939
1940
|
rows: e.inputParams.map((e) => [
|
|
1940
|
-
/* @__PURE__ */
|
|
1941
|
-
className: M("text-inherit border-none bg-transparent p-0",
|
|
1941
|
+
/* @__PURE__ */ G("code", {
|
|
1942
|
+
className: M("text-inherit border-none bg-transparent p-0", sr.code),
|
|
1942
1943
|
children: e.name
|
|
1943
1944
|
}, "name"),
|
|
1944
|
-
/* @__PURE__ */
|
|
1945
|
-
className: M("text-inherit border-none bg-transparent p-0",
|
|
1945
|
+
/* @__PURE__ */ G("code", {
|
|
1946
|
+
className: M("text-inherit border-none bg-transparent p-0", sr.code),
|
|
1946
1947
|
children: e.type
|
|
1947
1948
|
}, "type"),
|
|
1948
1949
|
e.isRequired ? "✓" : "—"
|
|
@@ -1950,10 +1951,10 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1950
1951
|
headingClassName: r,
|
|
1951
1952
|
cellClassName: i
|
|
1952
1953
|
}),
|
|
1953
|
-
e.annotations != null && e.annotations.length > 0 && /* @__PURE__ */
|
|
1954
|
+
e.annotations != null && e.annotations.length > 0 && /* @__PURE__ */ G(or, {
|
|
1954
1955
|
columns: ["Key", "Value"],
|
|
1955
|
-
rows: e.annotations.map((e) => [/* @__PURE__ */
|
|
1956
|
-
className: M("text-inherit border-none bg-transparent p-0",
|
|
1956
|
+
rows: e.annotations.map((e) => [/* @__PURE__ */ G("code", {
|
|
1957
|
+
className: M("text-inherit border-none bg-transparent p-0", sr.code),
|
|
1957
1958
|
children: e.key
|
|
1958
1959
|
}, "key"), e.value]),
|
|
1959
1960
|
headingClassName: r,
|
|
@@ -1961,24 +1962,24 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
1961
1962
|
})
|
|
1962
1963
|
]
|
|
1963
1964
|
}, e.name))
|
|
1964
|
-
}),
|
|
1965
|
+
}), lr = new Set([x.Prompt, x.Skill]), ur = (e) => e?.resource?.endpointUrl != null || (e?.endpoints?.length ?? 0) > 0, dr = (e, t) => t == null ? e.length === 1 ? e[0] : void 0 : e.find((e) => e.key === t), fr = async () => void 0, pr = [], mr = [], hr = [
|
|
1965
1966
|
"All shared configurations will be lost",
|
|
1966
1967
|
"Users who rely on it will lose access",
|
|
1967
1968
|
"Cannot be undone"
|
|
1968
|
-
],
|
|
1969
|
+
], gr = [
|
|
1969
1970
|
"You will lose access to this item",
|
|
1970
1971
|
"Other people keep their access",
|
|
1971
1972
|
"You will need a new invitation to get it back"
|
|
1972
|
-
],
|
|
1973
|
+
], _r = [
|
|
1973
1974
|
"Everyone loses access to the published copy",
|
|
1974
1975
|
"Your own copy is not deleted",
|
|
1975
1976
|
"You can publish it again later"
|
|
1976
|
-
],
|
|
1977
|
+
], vr = [
|
|
1977
1978
|
"Everyone you shared it with loses access",
|
|
1978
1979
|
"Existing share links stop working",
|
|
1979
1980
|
"You keep full access — nothing is deleted"
|
|
1980
|
-
],
|
|
1981
|
-
let { subViewTitleClassName: ke = "dial-body-semi-text", overviewSectionClassName: Ae = "dial-caption-text", overviewLabelClassName: je = "dial-small-semi-text", overviewValueClassName: Me = "dial-small-text", overviewValueTrueClassName: Ne = "dial-small-text", confirmMessageClassName:
|
|
1981
|
+
], yr = (e) => e === y.ApiKey ? "Toolset API keys" : "Toolset credentials", br = (e) => e === b.Global ? "Are you sure you want to delete the organization API key?" : "Are you sure you want to delete your personal API key?", xr = new Set([Y.Delete, Y.Unshare]), Sr = ({ item: e, isOpen: n, 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: h, publishFolderItems: _ = pr, publishExpandedPaths: v, onPublishExpandedPathsChange: y, publishLoadingPaths: w, hasPublishWriteAccess: T, publishDefaultAuthor: E, onPublish: D, onPublishSuccess: O, onPublishError: ee, onCreatePublishFolder: k, publishLabels: A, ruleSourceOptions: te = mr, onFetchExistingRules: ne, shareOverlay: re, isShareVisible: ie, isSharePrimary: N, onEdit: ae, onDownload: oe, isDownloadVisible: se, isDownloadPrimary: ce, onLoadContentFile: le, onLoadContentFilePreview: ue, renderContentFilePreview: de, renderContentFileTree: fe, renderCredentials: pe, onDelete: me, onUnshare: z, isUnshareVisible: _e, onRevokeShare: ve, onFetchRecipientsCount: ye, isRevokeShareVisible: xe, onUnpublish: Se, isUnpublishVisible: Ce, onLogin: Te, onLogout: Ee, texts: V, styles: De, limitsFooterNote: Oe }) => {
|
|
1982
|
+
let { subViewTitleClassName: ke = "dial-body-semi-text", overviewSectionClassName: Ae = "dial-caption-text", overviewLabelClassName: je = "dial-small-semi-text", overviewValueClassName: Me = "dial-small-text", overviewValueTrueClassName: Ne = "dial-small-text", confirmMessageClassName: Pe = "dial-small-text" } = De?.typography ?? {}, H = De?.colors, Ie = j({
|
|
1982
1983
|
"--cat-details-backdrop": H?.backdrop,
|
|
1983
1984
|
"--cat-details-bg": H?.background,
|
|
1984
1985
|
"--cat-details-border": H?.border,
|
|
@@ -2009,133 +2010,133 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
2009
2010
|
"--cat-cred-card-icon": H?.credentialsCardIcon,
|
|
2010
2011
|
"--cat-cred-card-title-text": H?.credentialsCardTitleText,
|
|
2011
2012
|
"--cat-cred-card-description-text": H?.credentialsCardDescriptionText
|
|
2012
|
-
}), [Re,
|
|
2013
|
-
let t =
|
|
2014
|
-
t != null && t !== n && t.startsWith("blob:") && URL.revokeObjectURL(t),
|
|
2013
|
+
}), [Re, ze] = R(r), [Ve, He] = R(""), [Ue, We] = R(!1), [Ge, Ke] = R([]), [qe, Je] = R(!1), [Xe, Ze] = R(!1), [Qe, $e] = R(!1), U = L(null), et = e.details?.promptContent, tt = et?.selectedFileId, [nt, rt] = R(null), [it, at] = R(!1), [ot, st] = R(/* @__PURE__ */ new Set()), [ct, lt] = R(!1), ut = L(null), dt = L(0), ft = P((e) => {
|
|
2014
|
+
let t = ut.current, n = e?.preview?.type === Q.Image ? e.preview.url : null;
|
|
2015
|
+
t != null && t !== n && t.startsWith("blob:") && URL.revokeObjectURL(t), ut.current = n, rt(e);
|
|
2015
2016
|
}, []);
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
}, [e.id,
|
|
2019
|
-
let e =
|
|
2017
|
+
F(() => {
|
|
2018
|
+
dt.current += 1, ft(null), at(!1), st(en(et?.files ?? [])), lt(!1);
|
|
2019
|
+
}, [e.id, tt]), F(() => () => {
|
|
2020
|
+
let e = ut.current;
|
|
2020
2021
|
e != null && e.startsWith("blob:") && URL.revokeObjectURL(e);
|
|
2021
2022
|
}, []);
|
|
2022
|
-
let
|
|
2023
|
-
|
|
2023
|
+
let pt = P((e) => {
|
|
2024
|
+
st((t) => {
|
|
2024
2025
|
let n = new Set(t);
|
|
2025
2026
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
2026
2027
|
});
|
|
2027
|
-
}, []),
|
|
2028
|
-
if (e ===
|
|
2029
|
-
|
|
2028
|
+
}, []), mt = P(async (e) => {
|
|
2029
|
+
if (e === tt) {
|
|
2030
|
+
dt.current += 1, ft(null), at(!1);
|
|
2030
2031
|
return;
|
|
2031
2032
|
}
|
|
2032
2033
|
if (de == null && le == null && ue == null) return;
|
|
2033
2034
|
if (de != null) {
|
|
2034
|
-
|
|
2035
|
+
dt.current += 1, ft({
|
|
2035
2036
|
id: e,
|
|
2036
2037
|
preview: null
|
|
2037
|
-
}),
|
|
2038
|
+
}), at(!1);
|
|
2038
2039
|
return;
|
|
2039
2040
|
}
|
|
2040
|
-
let t = ++
|
|
2041
|
-
|
|
2041
|
+
let t = ++dt.current;
|
|
2042
|
+
ft({
|
|
2042
2043
|
id: e,
|
|
2043
2044
|
preview: null
|
|
2044
|
-
}),
|
|
2045
|
+
}), at(!0);
|
|
2045
2046
|
try {
|
|
2046
2047
|
let n = ue == null ? await le?.(e).then((e) => e == null ? void 0 : {
|
|
2047
2048
|
type: Q.Markdown,
|
|
2048
2049
|
text: e
|
|
2049
2050
|
}) : await ue(e);
|
|
2050
|
-
if (
|
|
2051
|
+
if (dt.current !== t) {
|
|
2051
2052
|
n?.type === Q.Image && n.url.startsWith("blob:") && URL.revokeObjectURL(n.url);
|
|
2052
2053
|
return;
|
|
2053
2054
|
}
|
|
2054
|
-
|
|
2055
|
+
ft({
|
|
2055
2056
|
id: e,
|
|
2056
2057
|
preview: n ?? null
|
|
2057
2058
|
});
|
|
2058
2059
|
} catch {
|
|
2059
|
-
if (
|
|
2060
|
-
|
|
2060
|
+
if (dt.current !== t) return;
|
|
2061
|
+
ft({
|
|
2061
2062
|
id: e,
|
|
2062
2063
|
preview: null
|
|
2063
2064
|
});
|
|
2064
2065
|
} finally {
|
|
2065
|
-
|
|
2066
|
+
dt.current === t && at(!1);
|
|
2066
2067
|
}
|
|
2067
2068
|
}, [
|
|
2068
|
-
|
|
2069
|
+
tt,
|
|
2069
2070
|
le,
|
|
2070
2071
|
ue,
|
|
2071
2072
|
de,
|
|
2072
|
-
|
|
2073
|
-
]),
|
|
2073
|
+
ft
|
|
2074
|
+
]), ht = nt?.id ?? tt, gt = () => nt == null ? null : nt.preview == null ? {
|
|
2074
2075
|
type: Q.Text,
|
|
2075
2076
|
text: V?.contentFileErrorLabel ?? "Failed to load this file."
|
|
2076
|
-
} :
|
|
2077
|
-
if (!h ||
|
|
2077
|
+
} : nt.preview, xt = nt != null && de != null ? de(nt.id, tn(et?.files ?? [], nt.id) ?? "") : void 0, q = P(() => {
|
|
2078
|
+
if (!h || U.current === e.id) return;
|
|
2078
2079
|
let t = e.id;
|
|
2079
|
-
|
|
2080
|
+
U.current = t, Je(!0), Ze(!1), (async () => {
|
|
2080
2081
|
try {
|
|
2081
2082
|
let n = await h(e);
|
|
2082
|
-
if (
|
|
2083
|
-
|
|
2083
|
+
if (U.current !== t) return;
|
|
2084
|
+
Ke(n), $e(!0), Je(!1);
|
|
2084
2085
|
} catch {
|
|
2085
|
-
if (
|
|
2086
|
-
|
|
2086
|
+
if (U.current !== t) return;
|
|
2087
|
+
Ze(!0), Je(!1), U.current = null;
|
|
2087
2088
|
}
|
|
2088
2089
|
})();
|
|
2089
2090
|
}, [h, e]);
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
}, [
|
|
2093
|
-
let
|
|
2094
|
-
|
|
2095
|
-
}, [
|
|
2091
|
+
F(() => {
|
|
2092
|
+
Ue && q();
|
|
2093
|
+
}, [Ue, q]);
|
|
2094
|
+
let St = P((e, t) => {
|
|
2095
|
+
U.current = null, $e(!1), q(), O?.(e, t);
|
|
2096
|
+
}, [q, O]), X = bt({
|
|
2096
2097
|
item: e,
|
|
2097
|
-
history:
|
|
2098
|
+
history: Ge,
|
|
2098
2099
|
folderItems: _,
|
|
2099
2100
|
hasWriteAccess: T,
|
|
2100
2101
|
defaultAuthor: E,
|
|
2101
2102
|
onCreateFolder: k,
|
|
2102
|
-
onPublish: D ??
|
|
2103
|
-
onPublishSuccess:
|
|
2103
|
+
onPublish: D ?? fr,
|
|
2104
|
+
onPublishSuccess: St,
|
|
2104
2105
|
onPublishError: ee,
|
|
2105
2106
|
onFetchExistingRules: ne
|
|
2106
|
-
}),
|
|
2107
|
-
hasSelectedFolder:
|
|
2108
|
-
hasExistingPublicationInFolder:
|
|
2109
|
-
hasWriteAccess:
|
|
2110
|
-
isSubmitting:
|
|
2111
|
-
hasSubmitError:
|
|
2107
|
+
}), Ct = e.type === x.Toolset && g(e.credentials), wt = I(() => yt({
|
|
2108
|
+
hasSelectedFolder: X.selectedFolderPath != null,
|
|
2109
|
+
hasExistingPublicationInFolder: X.hasExistingPublicationInFolder,
|
|
2110
|
+
hasWriteAccess: X.hasWriteAccess,
|
|
2111
|
+
isSubmitting: X.isSubmitting,
|
|
2112
|
+
hasSubmitError: X.hasSubmitError
|
|
2112
2113
|
}), [
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
]), [
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
}, [e.id, r]),
|
|
2122
|
-
|
|
2114
|
+
X.selectedFolderPath,
|
|
2115
|
+
X.hasExistingPublicationInFolder,
|
|
2116
|
+
X.hasWriteAccess,
|
|
2117
|
+
X.isSubmitting,
|
|
2118
|
+
X.hasSubmitError
|
|
2119
|
+
]), [Z, Tt] = R(!1), [Et, Dt] = R(null), [Ot, kt] = R(!1), [At, jt] = R(null), [Mt, Nt] = R(null), [Pt, Ft] = R(null);
|
|
2120
|
+
F(() => {
|
|
2121
|
+
ze(r);
|
|
2122
|
+
}, [e.id, r]), F(() => {
|
|
2123
|
+
He(""), We(!1), X.reset(), Ke([]), Ze(!1), Je(!1), $e(!1), U.current = null, Ft(null), Tt(!1), Dt(null), kt(!1), jt(null), Nt(null);
|
|
2123
2124
|
}, [e.id]);
|
|
2124
|
-
let It = !a && !!Se &&
|
|
2125
|
-
|
|
2126
|
-
It &&
|
|
2127
|
-
}, [It,
|
|
2128
|
-
let Lt =
|
|
2129
|
-
Dt(
|
|
2130
|
-
}, []), Bt =
|
|
2131
|
-
Nt(n ?? (e.credentials == null ? null : t(e.credentials))), Dt(
|
|
2132
|
-
}, [e.credentials]),
|
|
2133
|
-
Dt(
|
|
2134
|
-
}, []), Ut =
|
|
2135
|
-
Dt(
|
|
2136
|
-
}, []), Wt =
|
|
2125
|
+
let It = !a && !!Se && Ce?.(e) === !0;
|
|
2126
|
+
F(() => {
|
|
2127
|
+
It && q();
|
|
2128
|
+
}, [It, q]);
|
|
2129
|
+
let Lt = P(() => Tt(!0), []), Rt = P(() => Tt(!1), []), zt = P(() => {
|
|
2130
|
+
Dt(Y.Delete);
|
|
2131
|
+
}, []), Bt = P((n) => {
|
|
2132
|
+
Nt(n ?? (e.credentials == null ? null : t(e.credentials))), Dt(Y.Logout);
|
|
2133
|
+
}, [e.credentials]), Vt = P(() => {
|
|
2134
|
+
Dt(Y.Unshare);
|
|
2135
|
+
}, []), Ut = P(() => {
|
|
2136
|
+
Dt(Y.RevokeAccess);
|
|
2137
|
+
}, []), Wt = I(() => {
|
|
2137
2138
|
let e = /* @__PURE__ */ new Set(), t = [];
|
|
2138
|
-
for (let n of
|
|
2139
|
+
for (let n of Ge) {
|
|
2139
2140
|
let r = n.folderPath.join("/");
|
|
2140
2141
|
e.has(r) || (e.add(r), t.push({
|
|
2141
2142
|
key: r,
|
|
@@ -2143,39 +2144,39 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
2143
2144
|
}));
|
|
2144
2145
|
}
|
|
2145
2146
|
return t;
|
|
2146
|
-
}, [
|
|
2147
|
-
Dt(
|
|
2148
|
-
}, []), Jt =
|
|
2149
|
-
jt(e), Dt(
|
|
2150
|
-
}, []), Yt =
|
|
2147
|
+
}, [Ge]), Gt = Qe && Wt.length > 0, Kt = P((e) => e || (A?.rootFolderLabel ?? "Organization"), [A]), qt = P(() => {
|
|
2148
|
+
Dt(Y.Unpublish);
|
|
2149
|
+
}, []), Jt = P((e) => {
|
|
2150
|
+
jt(e), Dt(Y.DeleteApiKey);
|
|
2151
|
+
}, []), Yt = P(() => {
|
|
2151
2152
|
Ot || (Dt(null), jt(null), Nt(null), Ft(null));
|
|
2152
|
-
}, [Ot]), Xt =
|
|
2153
|
+
}, [Ot]), Xt = P(async () => {
|
|
2153
2154
|
if (!(Ot || Et == null)) {
|
|
2154
2155
|
kt(!0);
|
|
2155
2156
|
try {
|
|
2156
2157
|
switch (Et) {
|
|
2157
|
-
case
|
|
2158
|
-
await
|
|
2158
|
+
case Y.Delete:
|
|
2159
|
+
await me?.(e);
|
|
2159
2160
|
break;
|
|
2160
|
-
case
|
|
2161
|
-
await
|
|
2161
|
+
case Y.Unshare:
|
|
2162
|
+
await z?.(e);
|
|
2162
2163
|
break;
|
|
2163
|
-
case
|
|
2164
|
+
case Y.RevokeAccess:
|
|
2164
2165
|
await ve?.(e);
|
|
2165
2166
|
break;
|
|
2166
|
-
case
|
|
2167
|
+
case Y.Logout:
|
|
2167
2168
|
Mt != null && await Ee?.(e, { level: Mt });
|
|
2168
2169
|
break;
|
|
2169
|
-
case
|
|
2170
|
+
case Y.DeleteApiKey:
|
|
2170
2171
|
At != null && await Ee?.(e, { level: At });
|
|
2171
2172
|
break;
|
|
2172
|
-
case
|
|
2173
|
-
let t =
|
|
2173
|
+
case Y.Unpublish: {
|
|
2174
|
+
let t = dr(Wt, Pt);
|
|
2174
2175
|
t != null && await Se?.(e, t.segments);
|
|
2175
2176
|
break;
|
|
2176
2177
|
}
|
|
2177
2178
|
}
|
|
2178
|
-
Dt(null), jt(null), Nt(null), Ft(null),
|
|
2179
|
+
Dt(null), jt(null), Nt(null), Ft(null), xr.has(Et) && o();
|
|
2179
2180
|
} catch {
|
|
2180
2181
|
Dt(null), jt(null), Nt(null), Ft(null);
|
|
2181
2182
|
} finally {
|
|
@@ -2188,8 +2189,8 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
2188
2189
|
At,
|
|
2189
2190
|
Mt,
|
|
2190
2191
|
e,
|
|
2192
|
+
me,
|
|
2191
2193
|
z,
|
|
2192
|
-
ge,
|
|
2193
2194
|
ve,
|
|
2194
2195
|
Se,
|
|
2195
2196
|
Pt,
|
|
@@ -2197,7 +2198,7 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
2197
2198
|
Ee,
|
|
2198
2199
|
o
|
|
2199
2200
|
]);
|
|
2200
|
-
|
|
2201
|
+
F(() => {
|
|
2201
2202
|
if (!n) return;
|
|
2202
2203
|
let e = (e) => {
|
|
2203
2204
|
if (e.key === "Escape") {
|
|
@@ -2215,119 +2216,119 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
2215
2216
|
Et,
|
|
2216
2217
|
Yt
|
|
2217
2218
|
]);
|
|
2218
|
-
let Zt =
|
|
2219
|
-
|
|
2220
|
-
}, [
|
|
2221
|
-
await
|
|
2222
|
-
}, [
|
|
2219
|
+
let Zt = P(() => We(!0), []), Qt = P(() => {
|
|
2220
|
+
We(!1), X.reset();
|
|
2221
|
+
}, [X]), $t = P(async () => {
|
|
2222
|
+
await X.handleSubmit() && Qt();
|
|
2223
|
+
}, [X, Qt]), nn = P(() => {
|
|
2223
2224
|
let t = !Re;
|
|
2224
|
-
|
|
2225
|
+
ze(t), s?.(e.id, t);
|
|
2225
2226
|
}, [
|
|
2226
2227
|
Re,
|
|
2227
2228
|
e.id,
|
|
2228
2229
|
s
|
|
2229
|
-
]), rn =
|
|
2230
|
-
let t = [], n =
|
|
2230
|
+
]), rn = I(() => {
|
|
2231
|
+
let t = [], n = lr.has(e.type);
|
|
2231
2232
|
return n || t.push({
|
|
2232
|
-
id:
|
|
2233
|
+
id: J.About,
|
|
2233
2234
|
label: V?.tabAboutLabel ?? "About"
|
|
2234
2235
|
}), (n || e.details?.promptContent != null) && t.push({
|
|
2235
|
-
id:
|
|
2236
|
+
id: J.Content,
|
|
2236
2237
|
label: V?.tabContentLabel ?? "Details"
|
|
2237
2238
|
}), e.details?.overview != null && t.push({
|
|
2238
|
-
id:
|
|
2239
|
+
id: J.Overview,
|
|
2239
2240
|
label: V?.tabOverviewLabel ?? "Overview"
|
|
2240
2241
|
}), e.details?.pricing != null && t.push({
|
|
2241
|
-
id:
|
|
2242
|
+
id: J.Pricing,
|
|
2242
2243
|
label: V?.tabPricingLabel ?? "Pricing"
|
|
2243
2244
|
}), e.details?.limits != null && t.push({
|
|
2244
|
-
id:
|
|
2245
|
+
id: J.Limits,
|
|
2245
2246
|
label: V?.tabLimitsLabel ?? "Limits"
|
|
2246
2247
|
}), e.details?.tools != null && t.push({
|
|
2247
|
-
id:
|
|
2248
|
+
id: J.Tools,
|
|
2248
2249
|
label: V?.tabToolsLabel ?? "Tools"
|
|
2249
|
-
}),
|
|
2250
|
-
id:
|
|
2250
|
+
}), ur(e.details?.api) && t.push({
|
|
2251
|
+
id: J.Api,
|
|
2251
2252
|
label: V?.tabConnectLabel ?? "Connect"
|
|
2252
2253
|
}), t;
|
|
2253
|
-
}, [e, V]), an =
|
|
2254
|
-
|
|
2254
|
+
}, [e, V]), an = L(null);
|
|
2255
|
+
F(() => {
|
|
2255
2256
|
let t = an.current !== e.id;
|
|
2256
|
-
an.current = e.id, (t || !rn.some((e) => e.id ===
|
|
2257
|
+
an.current = e.id, (t || !rn.some((e) => e.id === Ve)) && He(rn[0]?.id ?? "");
|
|
2257
2258
|
}, [
|
|
2258
2259
|
e.id,
|
|
2259
2260
|
rn,
|
|
2260
|
-
|
|
2261
|
+
Ve
|
|
2261
2262
|
]);
|
|
2262
|
-
let on = V?.overviewYesLabel ?? "Yes", sn = V?.overviewNoLabel ?? "No", cn = V?.ariaLabel ?? "Item details",
|
|
2263
|
+
let on = V?.overviewYesLabel ?? "Yes", sn = V?.overviewNoLabel ?? "No", cn = V?.ariaLabel ?? "Item details", ln = V?.closeAriaLabel ?? "Close", dn = Re ? V?.removeFromFavoritesAriaLabel ?? "Remove from favorites" : V?.addToFavoritesAriaLabel ?? "Add to favorites", fn = V?.publishTitle ?? "Publish", pn = V?.backToDetailsAriaLabel ?? "Back", mn = V?.cancelLabel ?? "Cancel", hn = I(() => {
|
|
2263
2264
|
switch (Et) {
|
|
2264
|
-
case
|
|
2265
|
+
case Y.Delete: {
|
|
2265
2266
|
let t = V?.deleteActionLabel ?? "Delete";
|
|
2266
2267
|
return {
|
|
2267
2268
|
title: V?.deleteConfirmTitle ?? t,
|
|
2268
|
-
message: V?.deleteConfirmMessage?.(e.name) ?? /* @__PURE__ */
|
|
2269
|
+
message: V?.deleteConfirmMessage?.(e.name) ?? /* @__PURE__ */ K(W, { children: [
|
|
2269
2270
|
"Are you sure you want to delete ",
|
|
2270
|
-
/* @__PURE__ */
|
|
2271
|
+
/* @__PURE__ */ G("strong", { children: e.name }),
|
|
2271
2272
|
"? This action is permanent and cannot be undone."
|
|
2272
2273
|
] }),
|
|
2273
|
-
consequences: V?.deleteConfirmConsequences ??
|
|
2274
|
+
consequences: V?.deleteConfirmConsequences ?? hr,
|
|
2274
2275
|
confirmLabel: t,
|
|
2275
2276
|
loadingStatusLabel: V?.deletingStatusLabel ?? "Deleting",
|
|
2276
|
-
variant:
|
|
2277
|
+
variant: ge.Danger
|
|
2277
2278
|
};
|
|
2278
2279
|
}
|
|
2279
|
-
case
|
|
2280
|
+
case Y.Unshare: {
|
|
2280
2281
|
let t = V?.unshareLabel ?? "Remove from My List";
|
|
2281
2282
|
return {
|
|
2282
2283
|
title: V?.unshareConfirmTitle ?? t,
|
|
2283
|
-
message: V?.unshareConfirmMessage?.(e.name) ?? /* @__PURE__ */
|
|
2284
|
+
message: V?.unshareConfirmMessage?.(e.name) ?? /* @__PURE__ */ K(W, { children: [
|
|
2284
2285
|
"Remove ",
|
|
2285
|
-
/* @__PURE__ */
|
|
2286
|
+
/* @__PURE__ */ G("strong", { children: e.name }),
|
|
2286
2287
|
" from your list? You'll need a new invitation to access it again."
|
|
2287
2288
|
] }),
|
|
2288
|
-
consequences: V?.unshareConfirmConsequences ??
|
|
2289
|
+
consequences: V?.unshareConfirmConsequences ?? gr,
|
|
2289
2290
|
confirmLabel: t,
|
|
2290
2291
|
loadingStatusLabel: V?.unsharingStatusLabel ?? "Removing",
|
|
2291
|
-
variant:
|
|
2292
|
+
variant: ge.Info
|
|
2292
2293
|
};
|
|
2293
2294
|
}
|
|
2294
|
-
case
|
|
2295
|
+
case Y.RevokeAccess: {
|
|
2295
2296
|
let t = V?.revokeShareLabel ?? "Revoke access";
|
|
2296
2297
|
return {
|
|
2297
2298
|
title: V?.revokeShareConfirmTitle ?? t,
|
|
2298
|
-
message: V?.revokeShareConfirmMessage?.(e.name) ?? /* @__PURE__ */
|
|
2299
|
+
message: V?.revokeShareConfirmMessage?.(e.name) ?? /* @__PURE__ */ K(W, { children: [
|
|
2299
2300
|
"Revoke shared access to ",
|
|
2300
|
-
/* @__PURE__ */
|
|
2301
|
+
/* @__PURE__ */ G("strong", { children: e.name }),
|
|
2301
2302
|
"? Anyone you shared it with will lose access."
|
|
2302
2303
|
] }),
|
|
2303
|
-
consequences: V?.revokeShareConfirmConsequences ??
|
|
2304
|
+
consequences: V?.revokeShareConfirmConsequences ?? vr,
|
|
2304
2305
|
confirmLabel: t,
|
|
2305
2306
|
loadingStatusLabel: V?.revokingShareStatusLabel ?? "Revoking access",
|
|
2306
|
-
variant:
|
|
2307
|
+
variant: ge.Danger
|
|
2307
2308
|
};
|
|
2308
2309
|
}
|
|
2309
|
-
case
|
|
2310
|
-
let t = V?.unpublishLabel ?? "Unpublish", n = Wt.length === 1, r = n ? Kt(Wt[0].key) : "", i = V?.unpublishConfirmMessage?.(e.name, r) ?? /* @__PURE__ */
|
|
2310
|
+
case Y.Unpublish: {
|
|
2311
|
+
let t = V?.unpublishLabel ?? "Unpublish", n = Wt.length === 1, r = n ? Kt(Wt[0].key) : "", i = V?.unpublishConfirmMessage?.(e.name, r) ?? /* @__PURE__ */ K(W, { children: [
|
|
2311
2312
|
"Unpublish ",
|
|
2312
|
-
/* @__PURE__ */
|
|
2313
|
+
/* @__PURE__ */ G("strong", { children: e.name }),
|
|
2313
2314
|
" from \"",
|
|
2314
2315
|
r,
|
|
2315
2316
|
"\"? The request is submitted for admin approval."
|
|
2316
|
-
] }), a = V?.unpublishSelectFolderMessage?.(e.name) ?? /* @__PURE__ */
|
|
2317
|
+
] }), a = V?.unpublishSelectFolderMessage?.(e.name) ?? /* @__PURE__ */ K(W, { children: [
|
|
2317
2318
|
"Choose which folder to unpublish ",
|
|
2318
|
-
/* @__PURE__ */
|
|
2319
|
+
/* @__PURE__ */ G("strong", { children: e.name }),
|
|
2319
2320
|
" from. The request is submitted for admin approval."
|
|
2320
2321
|
] });
|
|
2321
2322
|
return {
|
|
2322
2323
|
title: V?.unpublishConfirmTitle ?? t,
|
|
2323
2324
|
message: n ? i : a,
|
|
2324
|
-
consequences: V?.unpublishConfirmConsequences ??
|
|
2325
|
+
consequences: V?.unpublishConfirmConsequences ?? _r,
|
|
2325
2326
|
confirmLabel: t,
|
|
2326
2327
|
loadingStatusLabel: V?.unpublishingStatusLabel ?? "Requesting unpublish",
|
|
2327
|
-
variant:
|
|
2328
|
+
variant: ge.Danger
|
|
2328
2329
|
};
|
|
2329
2330
|
}
|
|
2330
|
-
case
|
|
2331
|
+
case Y.Logout: {
|
|
2331
2332
|
let e = V?.logoutActionLabel ?? "Log out";
|
|
2332
2333
|
return {
|
|
2333
2334
|
title: e,
|
|
@@ -2335,19 +2336,19 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
2335
2336
|
consequences: void 0,
|
|
2336
2337
|
confirmLabel: e,
|
|
2337
2338
|
loadingStatusLabel: V?.loggingOutStatusLabel ?? "Logging out",
|
|
2338
|
-
variant:
|
|
2339
|
+
variant: ge.Info
|
|
2339
2340
|
};
|
|
2340
2341
|
}
|
|
2341
|
-
case
|
|
2342
|
+
case Y.DeleteApiKey: {
|
|
2342
2343
|
let e = V?.deleteActionLabel ?? "Delete", t = At ?? b.User;
|
|
2343
2344
|
return {
|
|
2344
2345
|
title: e,
|
|
2345
|
-
message: (V?.deleteApiKeyConfirmMessage ??
|
|
2346
|
+
message: (V?.deleteApiKeyConfirmMessage ?? br)(t),
|
|
2346
2347
|
consequences: void 0,
|
|
2347
2348
|
confirmLabel: e,
|
|
2348
2349
|
loadingStatusLabel: V?.deletingStatusLabel ?? "Deleting",
|
|
2349
|
-
variant:
|
|
2350
|
-
cardVariant:
|
|
2350
|
+
variant: ge.Danger,
|
|
2351
|
+
cardVariant: ge.Info
|
|
2351
2352
|
};
|
|
2352
2353
|
}
|
|
2353
2354
|
default: return null;
|
|
@@ -2359,75 +2360,75 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
2359
2360
|
V,
|
|
2360
2361
|
Wt,
|
|
2361
2362
|
Kt
|
|
2362
|
-
]), gn = hn != null, _n = Et ===
|
|
2363
|
+
]), gn = hn != null, _n = Et === Y.Unpublish && dr(Wt, Pt) == null, vn = gn || Ue || Z, yn = e.credentials == null ? "" : (V?.credentialsManagementTitle ?? yr)(e.credentials.authenticationType), bn = gn ? {
|
|
2363
2364
|
title: hn.title,
|
|
2364
2365
|
isBackDisabled: Ot,
|
|
2365
2366
|
onBack: Yt
|
|
2366
|
-
} :
|
|
2367
|
+
} : Ue ? {
|
|
2367
2368
|
title: fn,
|
|
2368
|
-
isBackDisabled:
|
|
2369
|
+
isBackDisabled: X.isSubmitting,
|
|
2369
2370
|
onBack: Qt
|
|
2370
|
-
} :
|
|
2371
|
+
} : Z ? {
|
|
2371
2372
|
title: yn,
|
|
2372
2373
|
isBackDisabled: !1,
|
|
2373
2374
|
onBack: Rt
|
|
2374
|
-
} : null,
|
|
2375
|
-
return /* @__PURE__ */
|
|
2376
|
-
style:
|
|
2377
|
-
className: M("fixed inset-0 z-50 transition-opacity duration-300",
|
|
2375
|
+
} : null, xn = bn?.title ?? cn;
|
|
2376
|
+
return /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("div", {
|
|
2377
|
+
style: Ie,
|
|
2378
|
+
className: M("fixed inset-0 z-50 transition-opacity duration-300", Dn.backdrop, n ? "opacity-100" : "pointer-events-none opacity-0"),
|
|
2378
2379
|
onClick: o,
|
|
2379
2380
|
"aria-hidden": "true"
|
|
2380
|
-
}), /* @__PURE__ */
|
|
2381
|
+
}), /* @__PURE__ */ K("div", {
|
|
2381
2382
|
role: "dialog",
|
|
2382
2383
|
"aria-modal": "true",
|
|
2383
|
-
"aria-label":
|
|
2384
|
-
style:
|
|
2385
|
-
className: M("fixed inset-y-0 end-0 z-50 flex flex-col overflow-hidden mobile:w-full", "desktop:rounded-ts-xl desktop:rounded-bs-xl desktop:w-[540px] desktop:border-s", "transition-transform duration-300",
|
|
2384
|
+
"aria-label": xn,
|
|
2385
|
+
style: Ie,
|
|
2386
|
+
className: M("fixed inset-y-0 end-0 z-50 flex flex-col overflow-hidden mobile:w-full", "desktop:rounded-ts-xl desktop:rounded-bs-xl desktop:w-[540px] desktop:border-s", "transition-transform duration-300", Dn.panel, n ? "translate-x-0" : "translate-x-full rtl:-translate-x-full"),
|
|
2386
2387
|
children: [
|
|
2387
|
-
/* @__PURE__ */
|
|
2388
|
+
/* @__PURE__ */ K("div", {
|
|
2388
2389
|
className: "flex shrink-0 items-center gap-2 px-6 py-3",
|
|
2389
|
-
children: [bn != null && /* @__PURE__ */
|
|
2390
|
-
icon: /* @__PURE__ */
|
|
2390
|
+
children: [bn != null && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(we, {
|
|
2391
|
+
icon: /* @__PURE__ */ G(Ye, {
|
|
2391
2392
|
className: "rtl:scale-x-[-1]",
|
|
2392
2393
|
stroke: B
|
|
2393
2394
|
}),
|
|
2394
2395
|
"aria-label": pn,
|
|
2395
2396
|
disabled: bn.isBackDisabled,
|
|
2396
2397
|
onClick: bn.onBack
|
|
2397
|
-
}), /* @__PURE__ */
|
|
2398
|
-
className: M("flex-1", ke,
|
|
2398
|
+
}), /* @__PURE__ */ G("span", {
|
|
2399
|
+
className: M("flex-1", ke, Dn.publishTitle),
|
|
2399
2400
|
children: bn.title
|
|
2400
|
-
})] }), bn == null && /* @__PURE__ */
|
|
2401
|
-
/* @__PURE__ */
|
|
2402
|
-
!a && c?.(e) !== !1 && /* @__PURE__ */
|
|
2401
|
+
})] }), bn == null && /* @__PURE__ */ K(W, { children: [
|
|
2402
|
+
/* @__PURE__ */ G("div", { className: "flex-1" }),
|
|
2403
|
+
!a && c?.(e) !== !1 && /* @__PURE__ */ G(Ht, {
|
|
2403
2404
|
isStarred: Re,
|
|
2404
2405
|
ariaLabel: dn,
|
|
2405
2406
|
onClick: nn
|
|
2406
2407
|
}),
|
|
2407
|
-
/* @__PURE__ */
|
|
2408
|
+
/* @__PURE__ */ G(he, {
|
|
2408
2409
|
onClose: o,
|
|
2409
|
-
size:
|
|
2410
|
-
ariaLabel:
|
|
2410
|
+
size: be.Standard,
|
|
2411
|
+
ariaLabel: ln
|
|
2411
2412
|
})
|
|
2412
2413
|
] })]
|
|
2413
2414
|
}),
|
|
2414
|
-
/* @__PURE__ */
|
|
2415
|
-
/* @__PURE__ */
|
|
2416
|
-
className: M("flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto",
|
|
2415
|
+
/* @__PURE__ */ G("div", { className: M("shrink-0", Dn.divider) }),
|
|
2416
|
+
/* @__PURE__ */ K("div", {
|
|
2417
|
+
className: M("flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto", Dn.content),
|
|
2417
2418
|
children: [
|
|
2418
|
-
gn && /* @__PURE__ */
|
|
2419
|
+
gn && /* @__PURE__ */ G(C, {
|
|
2419
2420
|
item: e,
|
|
2420
2421
|
message: hn.message,
|
|
2421
2422
|
consequences: hn.consequences,
|
|
2422
2423
|
variant: hn.cardVariant ?? hn.variant,
|
|
2423
|
-
messageClassName:
|
|
2424
|
+
messageClassName: Pe,
|
|
2424
2425
|
styles: { colors: {
|
|
2425
2426
|
messageText: H?.confirmMessageText,
|
|
2426
2427
|
consequenceText: H?.confirmConsequenceText,
|
|
2427
2428
|
cardBackground: H?.infoCardBackground,
|
|
2428
2429
|
cardDangerBackground: H?.infoCardDangerBackground
|
|
2429
2430
|
} },
|
|
2430
|
-
children: Et ===
|
|
2431
|
+
children: Et === Y.Unpublish && Wt.length > 1 && /* @__PURE__ */ G(Fe, {
|
|
2431
2432
|
ariaLabel: V?.unpublishFolderGroupAriaLabel ?? "Published folders",
|
|
2432
2433
|
value: Pt ?? void 0,
|
|
2433
2434
|
onChange: Ft,
|
|
@@ -2436,10 +2437,10 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
2436
2437
|
value: e.key,
|
|
2437
2438
|
label: Kt(e.key)
|
|
2438
2439
|
})),
|
|
2439
|
-
radioClassName:
|
|
2440
|
+
radioClassName: Pe
|
|
2440
2441
|
})
|
|
2441
2442
|
}),
|
|
2442
|
-
!gn && !
|
|
2443
|
+
!gn && !Ue && Z && /* @__PURE__ */ G(En, {
|
|
2443
2444
|
item: e,
|
|
2444
2445
|
onLogin: Te,
|
|
2445
2446
|
onRequestLogout: Bt,
|
|
@@ -2447,38 +2448,38 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
2447
2448
|
texts: V,
|
|
2448
2449
|
detailsStyles: De
|
|
2449
2450
|
}),
|
|
2450
|
-
!gn &&
|
|
2451
|
+
!gn && Ue && /* @__PURE__ */ G("div", {
|
|
2451
2452
|
className: "p-[22px]",
|
|
2452
|
-
children: /* @__PURE__ */
|
|
2453
|
+
children: /* @__PURE__ */ G(vt, {
|
|
2453
2454
|
resource: {
|
|
2454
2455
|
title: e.name,
|
|
2455
2456
|
version: e.version,
|
|
2456
2457
|
type: e.type,
|
|
2457
2458
|
iconUrl: e.iconUrl
|
|
2458
2459
|
},
|
|
2459
|
-
history:
|
|
2460
|
-
isHistoryLoading:
|
|
2461
|
-
hasHistoryError:
|
|
2462
|
-
folderItems:
|
|
2463
|
-
selectedFolderPath:
|
|
2464
|
-
onSelectedFolderPathChange:
|
|
2465
|
-
onCreateFolder:
|
|
2460
|
+
history: Ge,
|
|
2461
|
+
isHistoryLoading: qe,
|
|
2462
|
+
hasHistoryError: Xe,
|
|
2463
|
+
folderItems: X.folderItems,
|
|
2464
|
+
selectedFolderPath: X.selectedFolderPath,
|
|
2465
|
+
onSelectedFolderPathChange: X.setSelectedFolderPath,
|
|
2466
|
+
onCreateFolder: X.handleCreateFolder,
|
|
2466
2467
|
expandedPaths: v,
|
|
2467
2468
|
onExpandedPathsChange: y,
|
|
2468
2469
|
loadingPaths: w,
|
|
2469
|
-
hasExistingPublicationInFolder:
|
|
2470
|
-
hasWriteAccess:
|
|
2471
|
-
isSubmitting:
|
|
2472
|
-
hasSubmitError:
|
|
2473
|
-
author:
|
|
2474
|
-
onAuthorChange:
|
|
2475
|
-
publishCredentials:
|
|
2476
|
-
onPublishCredentialsChange:
|
|
2477
|
-
rules:
|
|
2478
|
-
onRulesChange:
|
|
2470
|
+
hasExistingPublicationInFolder: X.hasExistingPublicationInFolder,
|
|
2471
|
+
hasWriteAccess: X.hasWriteAccess,
|
|
2472
|
+
isSubmitting: X.isSubmitting,
|
|
2473
|
+
hasSubmitError: X.hasSubmitError,
|
|
2474
|
+
author: X.author,
|
|
2475
|
+
onAuthorChange: X.setAuthor,
|
|
2476
|
+
publishCredentials: X.publishCredentials,
|
|
2477
|
+
onPublishCredentialsChange: Ct ? X.setPublishCredentials : void 0,
|
|
2478
|
+
rules: X.rules,
|
|
2479
|
+
onRulesChange: X.setRules,
|
|
2479
2480
|
ruleSourceOptions: te,
|
|
2480
|
-
isRulesLoading:
|
|
2481
|
-
hasRulesLoadError:
|
|
2481
|
+
isRulesLoading: X.isRulesLoading,
|
|
2482
|
+
hasRulesLoadError: X.hasRulesLoadError,
|
|
2482
2483
|
labels: A,
|
|
2483
2484
|
styles: { colors: {
|
|
2484
2485
|
summaryVersionTagBorder: H?.versionTagBorder,
|
|
@@ -2487,32 +2488,32 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
2487
2488
|
} }
|
|
2488
2489
|
})
|
|
2489
2490
|
}),
|
|
2490
|
-
!vn && /* @__PURE__ */
|
|
2491
|
-
/* @__PURE__ */
|
|
2491
|
+
!vn && /* @__PURE__ */ K(W, { children: [
|
|
2492
|
+
/* @__PURE__ */ G(Rn, {
|
|
2492
2493
|
item: e,
|
|
2493
2494
|
onUseInChat: l,
|
|
2494
2495
|
isPrimaryActionVisible: u,
|
|
2495
2496
|
onShare: d,
|
|
2496
2497
|
shareOverlay: re,
|
|
2497
2498
|
isShareVisible: ie,
|
|
2498
|
-
isSharePrimary:
|
|
2499
|
+
isSharePrimary: N,
|
|
2499
2500
|
isPublishVisible: f,
|
|
2500
2501
|
isPublishPrimary: p,
|
|
2501
2502
|
onOpenPublish: Zt,
|
|
2502
|
-
isUnpublishVisible:
|
|
2503
|
+
isUnpublishVisible: Ce,
|
|
2503
2504
|
hasPublishedFolders: Gt,
|
|
2504
|
-
isPublishHistoryResolved: h == null ||
|
|
2505
|
-
onRequestPublishHistory:
|
|
2505
|
+
isPublishHistoryResolved: h == null || Qe,
|
|
2506
|
+
onRequestPublishHistory: q,
|
|
2506
2507
|
onOpenUnpublish: Se ? qt : void 0,
|
|
2507
|
-
onEdit:
|
|
2508
|
-
onDownload:
|
|
2509
|
-
isDownloadVisible:
|
|
2510
|
-
isDownloadPrimary:
|
|
2511
|
-
onDelete:
|
|
2512
|
-
onUnshare:
|
|
2508
|
+
onEdit: ae,
|
|
2509
|
+
onDownload: oe,
|
|
2510
|
+
isDownloadVisible: se,
|
|
2511
|
+
isDownloadPrimary: ce,
|
|
2512
|
+
onDelete: me ? zt : void 0,
|
|
2513
|
+
onUnshare: z ? Vt : void 0,
|
|
2513
2514
|
isUnshareVisible: _e,
|
|
2514
2515
|
onRevokeShare: ve ? Ut : void 0,
|
|
2515
|
-
onFetchRecipientsCount:
|
|
2516
|
+
onFetchRecipientsCount: ye,
|
|
2516
2517
|
isRevokeShareVisible: xe,
|
|
2517
2518
|
onLogin: Te,
|
|
2518
2519
|
onLogout: Ee,
|
|
@@ -2524,9 +2525,9 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
2524
2525
|
}),
|
|
2525
2526
|
e.credentials != null && (() => {
|
|
2526
2527
|
let t = m(e.credentials);
|
|
2527
|
-
return t != null && /* @__PURE__ */
|
|
2528
|
+
return t != null && /* @__PURE__ */ G("div", {
|
|
2528
2529
|
className: "px-6",
|
|
2529
|
-
children: /* @__PURE__ */
|
|
2530
|
+
children: /* @__PURE__ */ G(Sn, {
|
|
2530
2531
|
state: t,
|
|
2531
2532
|
authenticationType: e.credentials.authenticationType,
|
|
2532
2533
|
texts: V
|
|
@@ -2534,56 +2535,56 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
2534
2535
|
});
|
|
2535
2536
|
})(),
|
|
2536
2537
|
!a && n && pe?.(e),
|
|
2537
|
-
/* @__PURE__ */
|
|
2538
|
+
/* @__PURE__ */ K("div", {
|
|
2538
2539
|
className: "flex items-center px-6",
|
|
2539
|
-
children: [/* @__PURE__ */
|
|
2540
|
+
children: [/* @__PURE__ */ G(Be, {
|
|
2540
2541
|
tabs: rn,
|
|
2541
|
-
activeTabId:
|
|
2542
|
-
onTabChange:
|
|
2543
|
-
}), i && /* @__PURE__ */
|
|
2542
|
+
activeTabId: Ve,
|
|
2543
|
+
onTabChange: He
|
|
2544
|
+
}), i && /* @__PURE__ */ G("div", {
|
|
2544
2545
|
role: "status",
|
|
2545
2546
|
"aria-label": V?.detailsLoadingAriaLabel ?? "Loading details",
|
|
2546
2547
|
className: "shrink-0",
|
|
2547
|
-
children: /* @__PURE__ */
|
|
2548
|
+
children: /* @__PURE__ */ G(Le, {
|
|
2548
2549
|
showTitle: !1,
|
|
2549
2550
|
paragraph: {
|
|
2550
2551
|
rows: 1,
|
|
2551
2552
|
width: "72px"
|
|
2552
2553
|
},
|
|
2553
2554
|
active: !0,
|
|
2554
|
-
color:
|
|
2555
|
+
color: Dn.skeletonColor
|
|
2555
2556
|
})
|
|
2556
2557
|
})]
|
|
2557
2558
|
}),
|
|
2558
|
-
/* @__PURE__ */
|
|
2559
|
-
className: M("min-h-0 flex-1 overflow-y-auto",
|
|
2559
|
+
/* @__PURE__ */ K("div", {
|
|
2560
|
+
className: M("min-h-0 flex-1 overflow-y-auto", Ve !== J.Overview && "px-6"),
|
|
2560
2561
|
children: [
|
|
2561
|
-
|
|
2562
|
+
Ve === J.About && /* @__PURE__ */ G(zn, {
|
|
2562
2563
|
content: e.description,
|
|
2563
2564
|
topics: e.topics,
|
|
2564
2565
|
detailsStyles: De
|
|
2565
2566
|
}),
|
|
2566
|
-
|
|
2567
|
-
content:
|
|
2568
|
-
filePreview:
|
|
2569
|
-
filePreviewContent:
|
|
2567
|
+
Ve === J.Content && /* @__PURE__ */ G(Wn, {
|
|
2568
|
+
content: et?.content ?? "",
|
|
2569
|
+
filePreview: gt(),
|
|
2570
|
+
filePreviewContent: xt,
|
|
2570
2571
|
renderFileTree: fe,
|
|
2571
|
-
description:
|
|
2572
|
-
files:
|
|
2573
|
-
selectedFileId:
|
|
2574
|
-
onSelectFile: (e) => void
|
|
2575
|
-
isFileLoading:
|
|
2576
|
-
expandedFolderIds:
|
|
2577
|
-
onToggleFolder:
|
|
2578
|
-
isFileSelectorOpen:
|
|
2579
|
-
onFileSelectorOpenChange:
|
|
2572
|
+
description: et?.description ?? e.description,
|
|
2573
|
+
files: et?.files,
|
|
2574
|
+
selectedFileId: ht,
|
|
2575
|
+
onSelectFile: (e) => void mt(e),
|
|
2576
|
+
isFileLoading: it,
|
|
2577
|
+
expandedFolderIds: ot,
|
|
2578
|
+
onToggleFolder: pt,
|
|
2579
|
+
isFileSelectorOpen: ct,
|
|
2580
|
+
onFileSelectorOpenChange: lt,
|
|
2580
2581
|
fileSelectorAriaLabel: V?.contentFileSelectorAriaLabel,
|
|
2581
2582
|
fileCountLabel: V?.contentFileCountLabel,
|
|
2582
2583
|
fileLoadingLabel: V?.contentFileLoadingLabel,
|
|
2583
2584
|
fileUnsupportedLabel: V?.contentFileUnsupportedLabel,
|
|
2584
2585
|
detailsStyles: De
|
|
2585
2586
|
}),
|
|
2586
|
-
|
|
2587
|
+
Ve === J.Overview && /* @__PURE__ */ G(rr, {
|
|
2587
2588
|
sections: e.details?.overview?.sections,
|
|
2588
2589
|
sectionClassName: Ae,
|
|
2589
2590
|
labelClassName: je,
|
|
@@ -2592,16 +2593,16 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
2592
2593
|
yesLabel: on,
|
|
2593
2594
|
noLabel: sn
|
|
2594
2595
|
}),
|
|
2595
|
-
|
|
2596
|
+
Ve === J.Pricing && /* @__PURE__ */ G(ir, {
|
|
2596
2597
|
pricing: e.details?.pricing,
|
|
2597
2598
|
pricesSectionLabel: V?.pricingPricesSectionLabel,
|
|
2598
2599
|
limitsSectionLabel: V?.pricingLimitsSectionLabel
|
|
2599
2600
|
}),
|
|
2600
|
-
|
|
2601
|
+
Ve === J.Limits && /* @__PURE__ */ G(nr, {
|
|
2601
2602
|
limits: e.details?.limits,
|
|
2602
2603
|
footerNote: Oe
|
|
2603
2604
|
}),
|
|
2604
|
-
|
|
2605
|
+
Ve === J.Api && ur(e.details?.api) && /* @__PURE__ */ G(un, {
|
|
2605
2606
|
api: e.details?.api,
|
|
2606
2607
|
resourceSectionLabel: V?.apiResourceSectionLabel,
|
|
2607
2608
|
snippetSectionLabel: V?.apiSnippetSectionLabel,
|
|
@@ -2613,13 +2614,13 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
2613
2614
|
copyAriaLabel: V?.copyCodeAriaLabel,
|
|
2614
2615
|
copiedStatusLabel: V?.copiedCodeStatusLabel
|
|
2615
2616
|
}),
|
|
2616
|
-
|
|
2617
|
+
Ve === J.Tools && /* @__PURE__ */ G(cr, { tools: e.details?.tools })
|
|
2617
2618
|
]
|
|
2618
2619
|
})
|
|
2619
2620
|
] })
|
|
2620
2621
|
]
|
|
2621
2622
|
}),
|
|
2622
|
-
gn && /* @__PURE__ */
|
|
2623
|
+
gn && /* @__PURE__ */ G(S, {
|
|
2623
2624
|
confirmLabel: hn.confirmLabel,
|
|
2624
2625
|
cancelLabel: mn,
|
|
2625
2626
|
variant: hn.variant,
|
|
@@ -2630,18 +2631,18 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
2630
2631
|
onConfirm: Xt,
|
|
2631
2632
|
onCancel: Yt
|
|
2632
2633
|
}),
|
|
2633
|
-
!gn &&
|
|
2634
|
+
!gn && Ue && /* @__PURE__ */ G(_t, {
|
|
2634
2635
|
version: e.version,
|
|
2635
|
-
hasExistingPublicationInFolder:
|
|
2636
|
-
isSubmitDisabled:
|
|
2637
|
-
isSubmitLoading:
|
|
2636
|
+
hasExistingPublicationInFolder: X.hasExistingPublicationInFolder,
|
|
2637
|
+
isSubmitDisabled: wt.isSubmitDisabled,
|
|
2638
|
+
isSubmitLoading: wt.isSubmitLoading,
|
|
2638
2639
|
onCancel: Qt,
|
|
2639
|
-
onSubmit:
|
|
2640
|
+
onSubmit: $t,
|
|
2640
2641
|
labels: A
|
|
2641
2642
|
})
|
|
2642
2643
|
]
|
|
2643
2644
|
})] });
|
|
2644
|
-
},
|
|
2645
|
+
}, Cr = {
|
|
2645
2646
|
pageNav: "_pageNav_14qfn_1",
|
|
2646
2647
|
navBtn: "_navBtn_14qfn_6",
|
|
2647
2648
|
titleText: "_titleText_14qfn_23",
|
|
@@ -2656,45 +2657,45 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
2656
2657
|
favFadeIn: "_favFadeIn_14qfn_1",
|
|
2657
2658
|
cardLeaving: "_cardLeaving_14qfn_54",
|
|
2658
2659
|
cardFadeOut: "_cardFadeOut_14qfn_1"
|
|
2659
|
-
},
|
|
2660
|
-
let [m, h] =
|
|
2660
|
+
}, wr = ({ item: e, initialIsStarred: t = !0, onToggle: n, isFavoriteVisible: r, onClick: i, nameClassName: a, colors: o, versionClassName: s, lastUsedClassName: c, query: l, addToFavoritesAriaLabel: u = "Add to favorites", removeFromFavoritesAriaLabel: d = "Remove from favorites", isSelected: f = !1, credentialsBadgeLoggedOutLabel: p }) => {
|
|
2661
|
+
let [m, h] = R(t), [g, _] = R(!1), v = (t) => {
|
|
2661
2662
|
t.stopPropagation();
|
|
2662
2663
|
let r = !m;
|
|
2663
2664
|
h(r), r ? n?.(e.id, r) : _(!0);
|
|
2664
|
-
}, y = i && !g ? () => i(e) : void 0, b =
|
|
2665
|
+
}, y = i && !g ? () => i(e) : void 0, b = P((t) => {
|
|
2665
2666
|
!i || g || (t.key === "Enter" || t.key === " ") && (t.preventDefault(), i(e));
|
|
2666
2667
|
}, [
|
|
2667
2668
|
i,
|
|
2668
2669
|
e,
|
|
2669
2670
|
g
|
|
2670
2671
|
]);
|
|
2671
|
-
return /* @__PURE__ */
|
|
2672
|
+
return /* @__PURE__ */ K(pe, {
|
|
2672
2673
|
"data-card-id": e.id,
|
|
2673
2674
|
role: y == null ? void 0 : "button",
|
|
2674
2675
|
tabIndex: y == null ? void 0 : 0,
|
|
2675
2676
|
"aria-label": e.name,
|
|
2676
|
-
className: M("box-border min-w-0 cursor-pointer flex-row items-start gap-1 text-start", g &&
|
|
2677
|
+
className: M("box-border min-w-0 cursor-pointer flex-row items-start gap-1 text-start", g && Cr.cardLeaving, f && Cr.selectedCard, Et.favoriteCard),
|
|
2677
2678
|
onClick: y,
|
|
2678
2679
|
onKeyDown: b,
|
|
2679
2680
|
onAnimationEnd: g ? (t) => {
|
|
2680
2681
|
t.currentTarget === t.target && n?.(e.id, !1);
|
|
2681
2682
|
} : void 0,
|
|
2682
2683
|
children: [
|
|
2683
|
-
f && /* @__PURE__ */
|
|
2684
|
+
f && /* @__PURE__ */ G(qe, {
|
|
2684
2685
|
size: z.SM,
|
|
2685
|
-
className: M("absolute end-3 top-3 shrink-0",
|
|
2686
|
+
className: M("absolute end-3 top-3 shrink-0", Cr.selectedCheck),
|
|
2686
2687
|
"aria-hidden": !0,
|
|
2687
2688
|
stroke: B
|
|
2688
2689
|
}),
|
|
2689
|
-
/* @__PURE__ */
|
|
2690
|
+
/* @__PURE__ */ G("div", {
|
|
2690
2691
|
className: "flex min-w-0 flex-1 flex-col items-start gap-1",
|
|
2691
|
-
children: /* @__PURE__ */
|
|
2692
|
+
children: /* @__PURE__ */ G(Rt, {
|
|
2692
2693
|
icon: e.iconUrl,
|
|
2693
2694
|
type: e.type,
|
|
2694
2695
|
name: e.name,
|
|
2695
2696
|
version: e.version,
|
|
2696
2697
|
lastUsed: e.lastUsed,
|
|
2697
|
-
size:
|
|
2698
|
+
size: X.LG,
|
|
2698
2699
|
query: l,
|
|
2699
2700
|
className: "min-w-0 self-stretch",
|
|
2700
2701
|
styles: {
|
|
@@ -2705,22 +2706,22 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
2705
2706
|
lastUsedClassName: c
|
|
2706
2707
|
}
|
|
2707
2708
|
},
|
|
2708
|
-
iconOverlay: /* @__PURE__ */
|
|
2709
|
+
iconOverlay: /* @__PURE__ */ G(Bt, {
|
|
2709
2710
|
credentials: e.credentials,
|
|
2710
2711
|
loggedOutLabel: p
|
|
2711
2712
|
})
|
|
2712
2713
|
})
|
|
2713
2714
|
}),
|
|
2714
|
-
r?.(e) !== !1 && /* @__PURE__ */
|
|
2715
|
+
r?.(e) !== !1 && /* @__PURE__ */ G(Ht, {
|
|
2715
2716
|
isStarred: m,
|
|
2716
|
-
size:
|
|
2717
|
+
size: be.Small,
|
|
2717
2718
|
onClick: v,
|
|
2718
2719
|
ariaLabel: m ? d : u,
|
|
2719
2720
|
className: "self-end"
|
|
2720
2721
|
})
|
|
2721
2722
|
]
|
|
2722
2723
|
});
|
|
2723
|
-
},
|
|
2724
|
+
}, Tr = 2, Er = (e) => {
|
|
2724
2725
|
let t = e.getBoundingClientRect(), n = window.scrollX, r = window.scrollY, i = window.getComputedStyle(e).transform;
|
|
2725
2726
|
if (!i || i === "none") return new DOMRect(t.x + n, t.y + r, t.width, t.height);
|
|
2726
2727
|
try {
|
|
@@ -2729,7 +2730,7 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
2729
2730
|
} catch {
|
|
2730
2731
|
return new DOMRect(t.x + n, t.y + r, t.width, t.height);
|
|
2731
2732
|
}
|
|
2732
|
-
},
|
|
2733
|
+
}, Dr = ({ items: e, totalCount: t, title: n = "Your Favorites", onToggleFavorite: r, isFavoriteVisible: i, onItemClick: a, styles: o, isLeaving: s, onExitComplete: c, prevPageAriaLabel: l = "Previous page", nextPageAriaLabel: u = "Next page", addToFavoritesAriaLabel: d, removeFromFavoritesAriaLabel: f, selectedItemId: p, credentialsBadgeLoggedOutLabel: m }) => {
|
|
2733
2734
|
let h = o?.typography?.titleClassName ?? "dial-body-semi-text", g = o?.typography?.countClassName ?? "dial-tiny-semi-text", _ = j({
|
|
2734
2735
|
"--cat-fav-title-text": o?.colors?.titleText,
|
|
2735
2736
|
"--cat-fav-count-text": o?.colors?.countText,
|
|
@@ -2742,49 +2743,49 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
2742
2743
|
"--cat-fav-nav-btn-active-bg": o?.colors?.navButtonActiveBackground,
|
|
2743
2744
|
"--cat-fav-page-nav-border": o?.colors?.pageNavBorder,
|
|
2744
2745
|
"--cat-fav-page-nav-bg": o?.colors?.pageNavBackground
|
|
2745
|
-
}), v =
|
|
2746
|
+
}), v = I(() => [...e].sort((e, t) => (new Date(t.updatedAt || "").getTime() ?? 0) - (new Date(e.updatedAt || "").getTime() ?? 0)), [e]), [y, b] = R(1), x = Tt(), S = x * Tr, C = (y - 1) * S, w = I(() => v.slice(C, C + S), [
|
|
2746
2747
|
v,
|
|
2747
2748
|
C,
|
|
2748
2749
|
S
|
|
2749
|
-
]), T = Math.ceil(v.length / S), E = t ?? e.length, D =
|
|
2750
|
-
|
|
2750
|
+
]), T = Math.ceil(v.length / S), E = t ?? e.length, D = L(null), O = L(null), k = L(null), [A, te] = R(), [ne, re] = R(), ie = L(x);
|
|
2751
|
+
F(() => {
|
|
2751
2752
|
ie.current !== x && (ie.current = x, b(1), te(void 0), re(void 0));
|
|
2752
|
-
}, [x]),
|
|
2753
|
+
}, [x]), F(() => {
|
|
2753
2754
|
y > T && T > 0 && b(T);
|
|
2754
|
-
}, [y, T]),
|
|
2755
|
+
}, [y, T]), F(() => {
|
|
2755
2756
|
T <= 1 && (A !== void 0 || ne !== void 0) && (te(void 0), re(void 0));
|
|
2756
2757
|
}, [
|
|
2757
2758
|
T,
|
|
2758
2759
|
A,
|
|
2759
2760
|
ne
|
|
2760
|
-
]),
|
|
2761
|
+
]), se(() => {
|
|
2761
2762
|
!k.current || !O.current || T <= 1 || y !== 1 || A !== void 0 || (te(k.current.offsetHeight), re(O.current.offsetHeight));
|
|
2762
2763
|
}, [
|
|
2763
2764
|
T,
|
|
2764
2765
|
y,
|
|
2765
2766
|
A
|
|
2766
2767
|
]);
|
|
2767
|
-
let
|
|
2768
|
-
return
|
|
2768
|
+
let N = L(/* @__PURE__ */ new Map()), ae = L(y), P = L(x), oe = L(0), ce = L(!1);
|
|
2769
|
+
return se(() => {
|
|
2769
2770
|
if (!k.current || s) return;
|
|
2770
|
-
if (D.current && !
|
|
2771
|
+
if (D.current && !ce.current) {
|
|
2771
2772
|
let e = D.current;
|
|
2772
2773
|
e.style.height = "", e.style.transition = "";
|
|
2773
2774
|
}
|
|
2774
|
-
let e =
|
|
2775
|
-
|
|
2775
|
+
let e = ae.current !== y, t = P.current !== x;
|
|
2776
|
+
ae.current = y, P.current = x;
|
|
2776
2777
|
let n = k.current.querySelectorAll("[data-card-id]"), r = /* @__PURE__ */ new Map();
|
|
2777
2778
|
if (n.forEach((e) => {
|
|
2778
|
-
r.set(e.dataset.cardId,
|
|
2779
|
+
r.set(e.dataset.cardId, Er(e));
|
|
2779
2780
|
}), !e && !t) {
|
|
2780
|
-
let e = O.current, t =
|
|
2781
|
+
let e = O.current, t = oe.current, i = 0;
|
|
2781
2782
|
if (e) {
|
|
2782
2783
|
let t = e.style.height;
|
|
2783
2784
|
t && (e.style.height = ""), i = e.offsetHeight, t && (e.style.height = t);
|
|
2784
2785
|
}
|
|
2785
2786
|
let a = e != null && t > 0 && Math.abs(i - t) > 2, o = i > t ? 280 : 220, s = [];
|
|
2786
2787
|
if (n.forEach((e) => {
|
|
2787
|
-
let t = e.dataset.cardId, n =
|
|
2788
|
+
let t = e.dataset.cardId, n = N.current.get(t), i = r.get(t);
|
|
2788
2789
|
if (!n || !i) return;
|
|
2789
2790
|
let o = n.left - i.left, c = n.top - i.top;
|
|
2790
2791
|
!a && Math.abs(c) > .5 || Math.abs(o) < .5 && Math.abs(c) < .5 || (e.style.transition = "none", e.style.transform = `translate(${o}px, ${c}px)`, s.push(e));
|
|
@@ -2800,38 +2801,38 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
2800
2801
|
e.addEventListener("transitionend", t);
|
|
2801
2802
|
}
|
|
2802
2803
|
}
|
|
2803
|
-
if (
|
|
2804
|
+
if (N.current = r, O.current) {
|
|
2804
2805
|
let e = O.current, t = e.style.height ? parseFloat(e.style.height) : NaN;
|
|
2805
|
-
|
|
2806
|
+
oe.current = Number.isNaN(t) ? e.offsetHeight : t;
|
|
2806
2807
|
}
|
|
2807
2808
|
}, [
|
|
2808
2809
|
w,
|
|
2809
2810
|
y,
|
|
2810
2811
|
x,
|
|
2811
2812
|
s
|
|
2812
|
-
]),
|
|
2813
|
+
]), se(() => {
|
|
2813
2814
|
let e = D.current;
|
|
2814
2815
|
if (!e) return;
|
|
2815
2816
|
let t = e.offsetHeight;
|
|
2816
2817
|
if (t === 0) return;
|
|
2817
|
-
|
|
2818
|
+
ce.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`;
|
|
2818
2819
|
let n = (t) => {
|
|
2819
2820
|
t.target !== e || t.propertyName !== "height" || r();
|
|
2820
2821
|
}, r = () => {
|
|
2821
|
-
|
|
2822
|
+
ce.current = !1, parseFloat(e.style.height || "0") > 0 && (e.style.height = "", e.style.transition = ""), clearTimeout(i), e.removeEventListener("transitionend", n);
|
|
2822
2823
|
}, i = setTimeout(r, 400);
|
|
2823
2824
|
return e.addEventListener("transitionend", n), () => {
|
|
2824
2825
|
clearTimeout(i), e.removeEventListener("transitionend", n);
|
|
2825
2826
|
};
|
|
2826
|
-
}, []),
|
|
2827
|
+
}, []), se(() => {
|
|
2827
2828
|
if (!s || !D.current) return;
|
|
2828
2829
|
let e = D.current, t = e.offsetHeight;
|
|
2829
2830
|
t !== 0 && (e.style.height = `${t}px`, e.offsetHeight, e.style.transition = "height 260ms ease-in", e.style.height = "0px");
|
|
2830
|
-
}, [s]), /* @__PURE__ */
|
|
2831
|
+
}, [s]), /* @__PURE__ */ G("div", {
|
|
2831
2832
|
ref: D,
|
|
2832
|
-
children: /* @__PURE__ */
|
|
2833
|
+
children: /* @__PURE__ */ K("section", {
|
|
2833
2834
|
ref: O,
|
|
2834
|
-
className: M("flex flex-shrink-0 flex-col gap-4 pb-2 pt-2",
|
|
2835
|
+
className: M("flex flex-shrink-0 flex-col gap-4 pb-2 pt-2", Cr.section, s && Cr.sectionLeaving),
|
|
2835
2836
|
style: {
|
|
2836
2837
|
..._,
|
|
2837
2838
|
minHeight: ne
|
|
@@ -2839,42 +2840,42 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
2839
2840
|
onAnimationEnd: (e) => {
|
|
2840
2841
|
e.target === O.current && s && c?.();
|
|
2841
2842
|
},
|
|
2842
|
-
children: [/* @__PURE__ */
|
|
2843
|
+
children: [/* @__PURE__ */ G(ee, {
|
|
2843
2844
|
title: n,
|
|
2844
2845
|
postfix: E,
|
|
2845
|
-
titleClassName: M(h,
|
|
2846
|
-
postfixClassName: M(g,
|
|
2847
|
-
trailing: T > 1 ? /* @__PURE__ */
|
|
2848
|
-
className: M("inline-flex items-center gap-[2px] rounded-full px-[6px] py-[3px]",
|
|
2846
|
+
titleClassName: M(h, Cr.titleText),
|
|
2847
|
+
postfixClassName: M(g, Cr.countText),
|
|
2848
|
+
trailing: T > 1 ? /* @__PURE__ */ K("div", {
|
|
2849
|
+
className: M("inline-flex items-center gap-[2px] rounded-full px-[6px] py-[3px]", Cr.pageNav),
|
|
2849
2850
|
children: [
|
|
2850
|
-
/* @__PURE__ */
|
|
2851
|
-
size:
|
|
2851
|
+
/* @__PURE__ */ G(we, {
|
|
2852
|
+
size: be.Small,
|
|
2852
2853
|
"aria-label": l,
|
|
2853
2854
|
disabled: y === 1,
|
|
2854
2855
|
onClick: () => b((e) => e - 1),
|
|
2855
|
-
className: M("rounded-full",
|
|
2856
|
-
icon: /* @__PURE__ */
|
|
2856
|
+
className: M("rounded-full", Cr.navBtn),
|
|
2857
|
+
icon: /* @__PURE__ */ G(Ye, {
|
|
2857
2858
|
size: 14,
|
|
2858
2859
|
"aria-hidden": !0,
|
|
2859
2860
|
className: "rtl:scale-x-[-1]",
|
|
2860
2861
|
stroke: B
|
|
2861
2862
|
})
|
|
2862
2863
|
}),
|
|
2863
|
-
/* @__PURE__ */
|
|
2864
|
-
className: M("min-w-[32px] select-none px-1 text-center", g,
|
|
2864
|
+
/* @__PURE__ */ K("span", {
|
|
2865
|
+
className: M("min-w-[32px] select-none px-1 text-center", g, Cr.countText),
|
|
2865
2866
|
children: [
|
|
2866
2867
|
y,
|
|
2867
2868
|
" / ",
|
|
2868
2869
|
T
|
|
2869
2870
|
]
|
|
2870
2871
|
}),
|
|
2871
|
-
/* @__PURE__ */
|
|
2872
|
-
size:
|
|
2872
|
+
/* @__PURE__ */ G(we, {
|
|
2873
|
+
size: be.Small,
|
|
2873
2874
|
"aria-label": u,
|
|
2874
2875
|
disabled: y === T,
|
|
2875
2876
|
onClick: () => b((e) => e + 1),
|
|
2876
|
-
className: M("rounded-full",
|
|
2877
|
-
icon: /* @__PURE__ */
|
|
2877
|
+
className: M("rounded-full", Cr.navBtn),
|
|
2878
|
+
icon: /* @__PURE__ */ G(Xe, {
|
|
2878
2879
|
size: 14,
|
|
2879
2880
|
"aria-hidden": !0,
|
|
2880
2881
|
className: "rtl:scale-x-[-1]",
|
|
@@ -2883,14 +2884,14 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
2883
2884
|
})
|
|
2884
2885
|
]
|
|
2885
2886
|
}) : void 0
|
|
2886
|
-
}), /* @__PURE__ */
|
|
2887
|
+
}), /* @__PURE__ */ G("div", {
|
|
2887
2888
|
ref: k,
|
|
2888
|
-
className: M("grid content-start gap-5",
|
|
2889
|
+
className: M("grid content-start gap-5", Cr.gridPage),
|
|
2889
2890
|
style: {
|
|
2890
2891
|
gridTemplateColumns: `repeat(${x}, minmax(0, 1fr))`,
|
|
2891
2892
|
minHeight: A
|
|
2892
2893
|
},
|
|
2893
|
-
children: w.map((e) => /* @__PURE__ */
|
|
2894
|
+
children: w.map((e) => /* @__PURE__ */ G(wr, {
|
|
2894
2895
|
item: e,
|
|
2895
2896
|
onToggle: r,
|
|
2896
2897
|
isFavoriteVisible: i,
|
|
@@ -2903,7 +2904,7 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
2903
2904
|
})]
|
|
2904
2905
|
})
|
|
2905
2906
|
});
|
|
2906
|
-
},
|
|
2907
|
+
}, Or = {
|
|
2907
2908
|
listContainer: "_listContainer_lksnp_1",
|
|
2908
2909
|
gridClip: "_gridClip_lksnp_6",
|
|
2909
2910
|
favHeader: "_favHeader_lksnp_35",
|
|
@@ -2912,99 +2913,99 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
2912
2913
|
selectedCheck: "_selectedCheck_lksnp_47",
|
|
2913
2914
|
starToggleOff: "_starToggleOff_lksnp_51",
|
|
2914
2915
|
selectedRow: "_selectedRow_lksnp_64"
|
|
2915
|
-
},
|
|
2916
|
+
}, kr = ({ data: e }) => e ? /* @__PURE__ */ G("div", {
|
|
2916
2917
|
className: "flex h-full items-center",
|
|
2917
|
-
children: /* @__PURE__ */
|
|
2918
|
-
}) : null,
|
|
2918
|
+
children: /* @__PURE__ */ G(D, { type: e.type })
|
|
2919
|
+
}) : null, Ar = " / ", jr = ({ data: e, context: t }) => {
|
|
2919
2920
|
if (!e || e.folder.length === 0) return null;
|
|
2920
|
-
let n = e.folder.join(
|
|
2921
|
-
return /* @__PURE__ */
|
|
2921
|
+
let n = e.folder.join(Ar), r = e.folder[e.folder.length - 1], i = e.folder.length > 1, a = t?.typography?.folderClassName ?? "dial-small-text", o = t?.typography?.folderLastSegmentClassName ?? "dial-small-semi-text";
|
|
2922
|
+
return /* @__PURE__ */ K("div", {
|
|
2922
2923
|
className: "flex h-full w-full min-w-0 items-center gap-1.5",
|
|
2923
2924
|
children: [
|
|
2924
|
-
/* @__PURE__ */
|
|
2925
|
+
/* @__PURE__ */ G(et, {
|
|
2925
2926
|
size: z.SM,
|
|
2926
2927
|
stroke: B,
|
|
2927
|
-
className: M("shrink-0",
|
|
2928
|
+
className: M("shrink-0", Or.folderIcon),
|
|
2928
2929
|
"aria-hidden": !0
|
|
2929
2930
|
}),
|
|
2930
|
-
/* @__PURE__ */
|
|
2931
|
-
tooltip: /* @__PURE__ */
|
|
2931
|
+
/* @__PURE__ */ G(He, {
|
|
2932
|
+
tooltip: /* @__PURE__ */ G("span", {
|
|
2932
2933
|
className: a,
|
|
2933
2934
|
children: n
|
|
2934
2935
|
}),
|
|
2935
2936
|
hideTooltip: !i,
|
|
2936
2937
|
triggerClassName: "min-w-0 flex-1",
|
|
2937
|
-
children: /* @__PURE__ */
|
|
2938
|
+
children: /* @__PURE__ */ G(xe, {
|
|
2938
2939
|
text: r,
|
|
2939
2940
|
className: o,
|
|
2940
2941
|
hideTooltip: i
|
|
2941
2942
|
})
|
|
2942
2943
|
}),
|
|
2943
|
-
i && /* @__PURE__ */
|
|
2944
|
+
i && /* @__PURE__ */ G("span", {
|
|
2944
2945
|
className: "sr-only",
|
|
2945
2946
|
children: n
|
|
2946
2947
|
})
|
|
2947
2948
|
]
|
|
2948
2949
|
});
|
|
2949
|
-
},
|
|
2950
|
+
}, Mr = ({ data: e, context: t }) => {
|
|
2950
2951
|
let n = t?.searchQuery ?? "", r = t?.typography, i = r?.nameClassName ?? "dial-small-semi-text", a = r?.versionClassName ?? "dial-tiny-text", o = e != null && e.id === t?.selectedItemId;
|
|
2951
|
-
return e ? /* @__PURE__ */
|
|
2952
|
+
return e ? /* @__PURE__ */ K("div", {
|
|
2952
2953
|
className: "flex h-full w-full min-w-0 items-center gap-2.5",
|
|
2953
|
-
children: [/* @__PURE__ */
|
|
2954
|
+
children: [/* @__PURE__ */ K("div", {
|
|
2954
2955
|
className: "relative shrink-0",
|
|
2955
|
-
children: [/* @__PURE__ */
|
|
2956
|
+
children: [/* @__PURE__ */ G(T, {
|
|
2956
2957
|
src: e.iconUrl,
|
|
2957
2958
|
size: 36,
|
|
2958
2959
|
initialsName: e.name,
|
|
2959
2960
|
styles: { badgeClassName: "rounded-[10px]" }
|
|
2960
|
-
}), /* @__PURE__ */
|
|
2961
|
+
}), /* @__PURE__ */ G(Bt, {
|
|
2961
2962
|
credentials: e.credentials,
|
|
2962
2963
|
loggedOutLabel: t?.credentialsBadgeLoggedOutLabel
|
|
2963
2964
|
})]
|
|
2964
|
-
}), /* @__PURE__ */
|
|
2965
|
+
}), /* @__PURE__ */ G(ee, {
|
|
2965
2966
|
title: e.name,
|
|
2966
2967
|
postfix: e.version,
|
|
2967
2968
|
postfixClassName: a,
|
|
2968
2969
|
query: n,
|
|
2969
2970
|
titleClassName: i,
|
|
2970
2971
|
className: "min-w-0 flex-1 items-baseline gap-1.5",
|
|
2971
|
-
trailing: o ? /* @__PURE__ */
|
|
2972
|
+
trailing: o ? /* @__PURE__ */ G(qe, {
|
|
2972
2973
|
size: z.SM,
|
|
2973
|
-
className: M("shrink-0",
|
|
2974
|
+
className: M("shrink-0", Or.selectedCheck),
|
|
2974
2975
|
"aria-hidden": !0,
|
|
2975
2976
|
stroke: B
|
|
2976
2977
|
}) : void 0
|
|
2977
2978
|
})]
|
|
2978
2979
|
}) : null;
|
|
2979
|
-
},
|
|
2980
|
-
let [n, r] =
|
|
2981
|
-
return
|
|
2980
|
+
}, Nr = ({ data: e, context: t }) => {
|
|
2981
|
+
let [n, r] = R(e?.isStarred ?? !1);
|
|
2982
|
+
return F(() => {
|
|
2982
2983
|
r(e?.isStarred ?? !1);
|
|
2983
|
-
}, [e?.id, e?.isStarred]), !e || t?.isFavoriteVisible?.(e) === !1 ? null : /* @__PURE__ */
|
|
2984
|
+
}, [e?.id, e?.isStarred]), !e || t?.isFavoriteVisible?.(e) === !1 ? null : /* @__PURE__ */ G("div", {
|
|
2984
2985
|
className: "flex size-full items-center justify-end",
|
|
2985
|
-
children: /* @__PURE__ */
|
|
2986
|
+
children: /* @__PURE__ */ G(Ht, {
|
|
2986
2987
|
isStarred: n,
|
|
2987
2988
|
onClick: (i) => {
|
|
2988
2989
|
i.stopPropagation();
|
|
2989
2990
|
let a = !n;
|
|
2990
2991
|
r(a), t?.onToggleFavorite?.(e.id, a);
|
|
2991
2992
|
},
|
|
2992
|
-
className: n ? void 0 :
|
|
2993
|
+
className: n ? void 0 : Or.starToggleOff
|
|
2993
2994
|
})
|
|
2994
2995
|
});
|
|
2995
|
-
},
|
|
2996
|
+
}, Pr = ({ data: e }) => !e || e.topics.length === 0 ? null : /* @__PURE__ */ G("div", {
|
|
2996
2997
|
className: "flex h-full w-full min-w-0 items-center",
|
|
2997
|
-
children: /* @__PURE__ */
|
|
2998
|
-
}),
|
|
2998
|
+
children: /* @__PURE__ */ G(qt, { topics: e.topics })
|
|
2999
|
+
}), Fr = {
|
|
2999
3000
|
folder: (e) => e !== x.Model,
|
|
3000
3001
|
tags: () => !0,
|
|
3001
3002
|
favorite: () => !0
|
|
3002
|
-
},
|
|
3003
|
+
}, Ir = (e, t) => Object.fromEntries([
|
|
3003
3004
|
"folder",
|
|
3004
3005
|
"tags",
|
|
3005
3006
|
"favorite"
|
|
3006
|
-
].map((n) => [n, (t?.[n] ??
|
|
3007
|
-
let r =
|
|
3007
|
+
].map((n) => [n, (t?.[n] ?? Fr[n])(e)])), Lr = (e, t = !1, n) => {
|
|
3008
|
+
let r = Ir(e, n);
|
|
3008
3009
|
return [
|
|
3009
3010
|
{
|
|
3010
3011
|
headerName: "Name",
|
|
@@ -3012,7 +3013,7 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3012
3013
|
minWidth: 220,
|
|
3013
3014
|
field: "name",
|
|
3014
3015
|
filter: !1,
|
|
3015
|
-
cellRenderer:
|
|
3016
|
+
cellRenderer: Mr,
|
|
3016
3017
|
valueGetter: (e) => e.data?.name
|
|
3017
3018
|
},
|
|
3018
3019
|
{
|
|
@@ -3022,7 +3023,7 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3022
3023
|
field: "type",
|
|
3023
3024
|
filter: !1,
|
|
3024
3025
|
sortable: !1,
|
|
3025
|
-
cellRenderer:
|
|
3026
|
+
cellRenderer: kr,
|
|
3026
3027
|
valueGetter: (e) => e.data?.type
|
|
3027
3028
|
},
|
|
3028
3029
|
{
|
|
@@ -3032,7 +3033,7 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3032
3033
|
minWidth: 170,
|
|
3033
3034
|
filter: !1,
|
|
3034
3035
|
hide: !r.folder,
|
|
3035
|
-
cellRenderer:
|
|
3036
|
+
cellRenderer: jr,
|
|
3036
3037
|
valueGetter: (e) => e.data?.folder
|
|
3037
3038
|
},
|
|
3038
3039
|
{
|
|
@@ -3043,7 +3044,7 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3043
3044
|
filter: !1,
|
|
3044
3045
|
sortable: !1,
|
|
3045
3046
|
hide: !r.tags,
|
|
3046
|
-
cellRenderer:
|
|
3047
|
+
cellRenderer: Pr,
|
|
3047
3048
|
valueGetter: (e) => e.data?.topics
|
|
3048
3049
|
},
|
|
3049
3050
|
{
|
|
@@ -3055,15 +3056,15 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3055
3056
|
sortable: !1,
|
|
3056
3057
|
resizable: !1,
|
|
3057
3058
|
hide: t || !r.favorite,
|
|
3058
|
-
headerClass:
|
|
3059
|
-
cellRenderer:
|
|
3059
|
+
headerClass: Or.favHeader,
|
|
3060
|
+
cellRenderer: Nr
|
|
3060
3061
|
}
|
|
3061
3062
|
];
|
|
3062
|
-
},
|
|
3063
|
-
className:
|
|
3064
|
-
children: /* @__PURE__ */
|
|
3065
|
-
}) : /* @__PURE__ */
|
|
3066
|
-
let m = a?.typography ??
|
|
3063
|
+
}, Rr = 60, zr = {}, Br = (e) => e.id, Vr = (e) => e.items.length === 0 ? /* @__PURE__ */ G("div", {
|
|
3064
|
+
className: Ue("flex size-full flex-col items-center justify-center", Et.listView),
|
|
3065
|
+
children: /* @__PURE__ */ G(ne, { label: e.emptyStateTitle ?? "No results" })
|
|
3066
|
+
}) : /* @__PURE__ */ G(Hr, { ...e }), Hr = ({ items: e, type: t, query: n = "", ariaLabel: r = "Catalog", emptyStateTitle: i, styles: a, onToggleFavorite: o, isFavoriteVisible: s, onItemClick: c, stickyHeaderTop: l, selectedItemId: u, credentialsBadgeLoggedOutLabel: d, isReadonly: f = !1, columnVisibility: p }) => {
|
|
3067
|
+
let m = a?.typography ?? zr, h = a?.colors, g = {
|
|
3067
3068
|
"--cat-list-bg": h?.background,
|
|
3068
3069
|
"--cat-list-border": h?.border,
|
|
3069
3070
|
"--cat-list-header-bg": h?.headerBackground,
|
|
@@ -3075,15 +3076,15 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3075
3076
|
"--cat-list-selected-bg": h?.selectedRowBackground,
|
|
3076
3077
|
"--cat-list-selected-check": h?.selectedRowCheckIcon,
|
|
3077
3078
|
...l == null ? {} : { "--list-header-sticky-top": `${l}px` }
|
|
3078
|
-
}, _ =
|
|
3079
|
+
}, _ = L(null), v = P((e) => {
|
|
3079
3080
|
_.current = e;
|
|
3080
|
-
}, []), y =
|
|
3081
|
+
}, []), y = I(() => Lr(t, f, p), [
|
|
3081
3082
|
t,
|
|
3082
3083
|
f,
|
|
3083
3084
|
p
|
|
3084
|
-
]), b =
|
|
3085
|
+
]), b = I(() => ({
|
|
3085
3086
|
domLayout: "autoHeight",
|
|
3086
|
-
rowHeight:
|
|
3087
|
+
rowHeight: Rr,
|
|
3087
3088
|
animateRows: !1,
|
|
3088
3089
|
suppressAnimationFrame: !0,
|
|
3089
3090
|
suppressScrollOnNewData: !0,
|
|
@@ -3104,7 +3105,7 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3104
3105
|
e.column.getColDef().field !== "isStarred" && e.data && c(e.data);
|
|
3105
3106
|
} : void 0,
|
|
3106
3107
|
rowClass: c ? "cursor-pointer" : void 0,
|
|
3107
|
-
getRowClass: (e) => e.data?.id === u ?
|
|
3108
|
+
getRowClass: (e) => e.data?.id === u ? Or.selectedRow : void 0
|
|
3108
3109
|
}), [
|
|
3109
3110
|
n,
|
|
3110
3111
|
m,
|
|
@@ -3114,30 +3115,30 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3114
3115
|
d,
|
|
3115
3116
|
f,
|
|
3116
3117
|
c
|
|
3117
|
-
]), { containerRef: x, startRow: S, endRow: C } =
|
|
3118
|
+
]), { containerRef: x, startRow: S, endRow: C } = Pt(e.length, Rr), w = I(() => e.slice(S, C), [
|
|
3118
3119
|
e,
|
|
3119
3120
|
S,
|
|
3120
3121
|
C
|
|
3121
3122
|
]);
|
|
3122
|
-
return
|
|
3123
|
+
return F(() => {
|
|
3123
3124
|
_.current?.refreshCells({ force: !0 });
|
|
3124
|
-
}, [n]),
|
|
3125
|
+
}, [n]), F(() => {
|
|
3125
3126
|
_.current?.redrawRows();
|
|
3126
|
-
}, [u]), /* @__PURE__ */
|
|
3127
|
+
}, [u]), /* @__PURE__ */ G("div", {
|
|
3127
3128
|
style: g,
|
|
3128
|
-
className:
|
|
3129
|
-
children: /* @__PURE__ */
|
|
3129
|
+
className: Ue("w-full rounded-xl border", Or.listContainer, Et.listView),
|
|
3130
|
+
children: /* @__PURE__ */ K("div", {
|
|
3130
3131
|
ref: x,
|
|
3131
|
-
className:
|
|
3132
|
+
className: Ue("rounded-xl [&_.ag-cell.ag-column-first]:ps-4 [&_.ag-cell.ag-column-last]:pe-4 [&_.ag-header-cell.ag-column-first]:ps-4 [&_.ag-header-cell.ag-column-last]:pe-4", Or.gridClip),
|
|
3132
3133
|
children: [
|
|
3133
|
-
S > 0 && /* @__PURE__ */
|
|
3134
|
-
style: { height: S *
|
|
3134
|
+
S > 0 && /* @__PURE__ */ G("div", {
|
|
3135
|
+
style: { height: S * Rr },
|
|
3135
3136
|
"aria-hidden": !0
|
|
3136
3137
|
}),
|
|
3137
|
-
/* @__PURE__ */
|
|
3138
|
+
/* @__PURE__ */ G(xt, {
|
|
3138
3139
|
columnDefs: y,
|
|
3139
3140
|
rowData: w,
|
|
3140
|
-
getRowId:
|
|
3141
|
+
getRowId: Br,
|
|
3141
3142
|
withoutHeaderBorders: !0,
|
|
3142
3143
|
wrapCustomCellRenderers: !1,
|
|
3143
3144
|
onGridApiChange: v,
|
|
@@ -3145,14 +3146,14 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3145
3146
|
additionalGridOptions: b,
|
|
3146
3147
|
ariaLabel: r
|
|
3147
3148
|
}),
|
|
3148
|
-
C < e.length && /* @__PURE__ */
|
|
3149
|
-
style: { height: (e.length - C) *
|
|
3149
|
+
C < e.length && /* @__PURE__ */ G("div", {
|
|
3150
|
+
style: { height: (e.length - C) * Rr },
|
|
3150
3151
|
"aria-hidden": !0
|
|
3151
3152
|
})
|
|
3152
3153
|
]
|
|
3153
3154
|
})
|
|
3154
3155
|
});
|
|
3155
|
-
},
|
|
3156
|
+
}, Ur = {
|
|
3156
3157
|
filterBtn: "_filterBtn_5r8a5_7",
|
|
3157
3158
|
filterBtnActive: "_filterBtnActive_5r8a5_24",
|
|
3158
3159
|
filterBtnOpen: "_filterBtnOpen_5r8a5_28",
|
|
@@ -3164,14 +3165,14 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3164
3165
|
divider: "_divider_5r8a5_63",
|
|
3165
3166
|
sectionLabel: "_sectionLabel_5r8a5_67",
|
|
3166
3167
|
footer: "_footer_5r8a5_71"
|
|
3167
|
-
},
|
|
3168
|
+
}, Wr = (e, t, n, r, i) => {
|
|
3168
3169
|
let a = e.size > 0;
|
|
3169
3170
|
return n && a ? `${r} · ${e.size}` : n ? r : a ? p(e, t, i) : i;
|
|
3170
|
-
},
|
|
3171
|
+
}, Gr = (e, t) => {
|
|
3171
3172
|
let n = new Set(t);
|
|
3172
3173
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
3173
|
-
},
|
|
3174
|
-
let f = (r ?? !1) || e.size > 0, [p, m] =
|
|
3174
|
+
}, Kr = ({ checked: e, onChange: t, values: n, isMyAppsActive: r, onMyAppsChange: i, myAppsLabel: a = "My", topicsLabel: o = "Topics", defaultLabel: s = "From", clearLabel: c = "Clear", applyLabel: l = "Apply", typography: u, colors: d }) => {
|
|
3175
|
+
let f = (r ?? !1) || e.size > 0, [p, m] = R(!1), h = j({
|
|
3175
3176
|
"--cat-filter-btn-bg": d?.buttonBackground,
|
|
3176
3177
|
"--cat-filter-btn-border": d?.buttonBorder,
|
|
3177
3178
|
"--cat-filter-btn-border-hover": d?.buttonBorderHover,
|
|
@@ -3187,19 +3188,19 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3187
3188
|
"--cat-filter-section-label": d?.sectionLabel,
|
|
3188
3189
|
"--cat-filter-divider": d?.divider,
|
|
3189
3190
|
"--cat-filter-footer-border": d?.footerBorder
|
|
3190
|
-
}), g =
|
|
3191
|
-
|
|
3191
|
+
}), g = I(() => n == null ? [] : [...n].sort(), [n]), _ = Wr(e, n, r, a, s), [v, y] = R(() => new Set(e)), [b, x] = R(r ?? !1);
|
|
3192
|
+
F(() => {
|
|
3192
3193
|
p && (y(new Set(e)), x(r ?? !1));
|
|
3193
3194
|
}, [
|
|
3194
3195
|
p,
|
|
3195
3196
|
e,
|
|
3196
3197
|
r
|
|
3197
3198
|
]);
|
|
3198
|
-
let S = g.length + 1, [C, w] =
|
|
3199
|
+
let S = g.length + 1, [C, w] = R(-1), T = L([]), E = L(null), D = P((e) => {
|
|
3199
3200
|
let t = (e + S) % S;
|
|
3200
3201
|
w(t), T.current[t]?.focus();
|
|
3201
3202
|
}, [S]);
|
|
3202
|
-
|
|
3203
|
+
F(() => {
|
|
3203
3204
|
if (!p) {
|
|
3204
3205
|
w(-1);
|
|
3205
3206
|
return;
|
|
@@ -3218,13 +3219,13 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3218
3219
|
}, te = () => {
|
|
3219
3220
|
t(/* @__PURE__ */ new Set()), i?.(!1), O(!1);
|
|
3220
3221
|
};
|
|
3221
|
-
return /* @__PURE__ */
|
|
3222
|
+
return /* @__PURE__ */ G(ve, {
|
|
3222
3223
|
matchReferenceWidth: !1,
|
|
3223
3224
|
placement: "bottom-start",
|
|
3224
3225
|
open: p,
|
|
3225
3226
|
onOpenChange: O,
|
|
3226
3227
|
listClassName: "!bg-transparent !shadow-none !p-0",
|
|
3227
|
-
renderOverlay: () => /* @__PURE__ */
|
|
3228
|
+
renderOverlay: () => /* @__PURE__ */ K("div", {
|
|
3228
3229
|
role: "menu",
|
|
3229
3230
|
"aria-label": s,
|
|
3230
3231
|
tabIndex: -1,
|
|
@@ -3232,16 +3233,16 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3232
3233
|
...h,
|
|
3233
3234
|
maxHeight: "calc(var(--fui-available-height, 9999px) - 8px)"
|
|
3234
3235
|
},
|
|
3235
|
-
className: M("flex min-w-[360px] flex-col rounded-xl p-[6px]",
|
|
3236
|
+
className: M("flex min-w-[360px] flex-col rounded-xl p-[6px]", Ur.overlay),
|
|
3236
3237
|
onKeyDown: k,
|
|
3237
3238
|
children: [
|
|
3238
|
-
/* @__PURE__ */
|
|
3239
|
+
/* @__PURE__ */ G(ke, {
|
|
3239
3240
|
role: "menuitemcheckbox",
|
|
3240
3241
|
"aria-checked": b,
|
|
3241
|
-
mark:
|
|
3242
|
+
mark: Ae.Checkbox,
|
|
3242
3243
|
selected: b,
|
|
3243
3244
|
label: a,
|
|
3244
|
-
labelClassName: M(
|
|
3245
|
+
labelClassName: M(Ur.rowLabel, u?.filterButtonClassName ?? "dial-small-semi-text"),
|
|
3245
3246
|
className: "shrink-0",
|
|
3246
3247
|
tabIndex: C === 0 ? 0 : -1,
|
|
3247
3248
|
ref: (e) => {
|
|
@@ -3249,47 +3250,47 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3249
3250
|
},
|
|
3250
3251
|
onClick: () => x(!b)
|
|
3251
3252
|
}),
|
|
3252
|
-
g.length > 0 && /* @__PURE__ */
|
|
3253
|
-
/* @__PURE__ */
|
|
3253
|
+
g.length > 0 && /* @__PURE__ */ K(W, { children: [
|
|
3254
|
+
/* @__PURE__ */ G("div", {
|
|
3254
3255
|
role: "separator",
|
|
3255
|
-
className: M("my-1 h-px",
|
|
3256
|
+
className: M("my-1 h-px", Ur.divider),
|
|
3256
3257
|
"aria-hidden": !0
|
|
3257
3258
|
}),
|
|
3258
|
-
/* @__PURE__ */
|
|
3259
|
-
className: M("px-[10px] pb-1 pt-[10px]", u?.filterSectionLabelClassName ?? "dial-tiny-lead-semi-text",
|
|
3259
|
+
/* @__PURE__ */ G("div", {
|
|
3260
|
+
className: M("px-[10px] pb-1 pt-[10px]", u?.filterSectionLabelClassName ?? "dial-tiny-lead-semi-text", Ur.sectionLabel),
|
|
3260
3261
|
"aria-hidden": !0,
|
|
3261
3262
|
children: o
|
|
3262
3263
|
}),
|
|
3263
|
-
/* @__PURE__ */
|
|
3264
|
+
/* @__PURE__ */ G("div", {
|
|
3264
3265
|
className: M(re, "flex min-h-0 flex-col gap-1 overflow-y-auto"),
|
|
3265
3266
|
children: g.map((e, t) => {
|
|
3266
3267
|
let n = v.has(e), r = t + 1;
|
|
3267
|
-
return /* @__PURE__ */
|
|
3268
|
+
return /* @__PURE__ */ G(ke, {
|
|
3268
3269
|
role: "menuitemcheckbox",
|
|
3269
3270
|
"aria-checked": n,
|
|
3270
|
-
mark:
|
|
3271
|
+
mark: Ae.Checkbox,
|
|
3271
3272
|
selected: n,
|
|
3272
3273
|
label: e,
|
|
3273
|
-
labelClassName:
|
|
3274
|
+
labelClassName: Ur.rowLabel,
|
|
3274
3275
|
className: "shrink-0",
|
|
3275
3276
|
tabIndex: C === r ? 0 : -1,
|
|
3276
3277
|
ref: (e) => {
|
|
3277
3278
|
T.current[r] = e;
|
|
3278
3279
|
},
|
|
3279
|
-
onClick: () => y(
|
|
3280
|
+
onClick: () => y(Gr(e, v))
|
|
3280
3281
|
}, e);
|
|
3281
3282
|
})
|
|
3282
3283
|
})
|
|
3283
3284
|
] }),
|
|
3284
|
-
/* @__PURE__ */
|
|
3285
|
-
className: M("mt-1 flex shrink-0 items-center px-1 py-3",
|
|
3285
|
+
/* @__PURE__ */ K("div", {
|
|
3286
|
+
className: M("mt-1 flex shrink-0 items-center px-1 py-3", Ur.footer),
|
|
3286
3287
|
onKeyDown: (e) => {
|
|
3287
3288
|
(e.key === "ArrowUp" || e.key === "ArrowDown") && e.stopPropagation();
|
|
3288
3289
|
},
|
|
3289
|
-
children: [/* @__PURE__ */
|
|
3290
|
+
children: [/* @__PURE__ */ G(Ce, {
|
|
3290
3291
|
label: c,
|
|
3291
3292
|
onClick: te
|
|
3292
|
-
}), /* @__PURE__ */
|
|
3293
|
+
}), /* @__PURE__ */ G(Ne, {
|
|
3293
3294
|
label: l,
|
|
3294
3295
|
className: "ms-auto",
|
|
3295
3296
|
onClick: A
|
|
@@ -3297,44 +3298,44 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3297
3298
|
})
|
|
3298
3299
|
]
|
|
3299
3300
|
}),
|
|
3300
|
-
children: /* @__PURE__ */
|
|
3301
|
+
children: /* @__PURE__ */ G(le, {
|
|
3301
3302
|
ref: E,
|
|
3302
3303
|
"aria-haspopup": "menu",
|
|
3303
3304
|
"aria-expanded": p,
|
|
3304
3305
|
onKeyDown: ee,
|
|
3305
3306
|
style: h,
|
|
3306
|
-
iconBefore: /* @__PURE__ */
|
|
3307
|
+
iconBefore: /* @__PURE__ */ G(U, {
|
|
3307
3308
|
size: z.SM,
|
|
3308
3309
|
stroke: B,
|
|
3309
|
-
className: M("shrink-0",
|
|
3310
|
+
className: M("shrink-0", Ur.filterBtnFunnel),
|
|
3310
3311
|
"aria-hidden": !0
|
|
3311
3312
|
}),
|
|
3312
3313
|
label: _,
|
|
3313
|
-
textClassName: M(
|
|
3314
|
-
iconAfter: /* @__PURE__ */
|
|
3314
|
+
textClassName: M(Ur.filterBtnLabel, u?.filterButtonClassName ?? "dial-small-semi-text"),
|
|
3315
|
+
iconAfter: /* @__PURE__ */ G(Je, {
|
|
3315
3316
|
size: 14,
|
|
3316
3317
|
stroke: B,
|
|
3317
|
-
className: M("shrink-0 transition-transform duration-150",
|
|
3318
|
+
className: M("shrink-0 transition-transform duration-150", Ur.filterBtnChevron, p && "rotate-180"),
|
|
3318
3319
|
"aria-hidden": !0
|
|
3319
3320
|
}),
|
|
3320
|
-
className: M("h-12 shrink-0 gap-[7px] whitespace-nowrap !rounded-lg px-[18px]",
|
|
3321
|
+
className: M("h-12 shrink-0 gap-[7px] whitespace-nowrap !rounded-lg px-[18px]", Ur.filterBtn, f && Ur.filterBtnActive, p && Ur.filterBtnOpen)
|
|
3321
3322
|
})
|
|
3322
3323
|
});
|
|
3323
|
-
},
|
|
3324
|
+
}, qr = {
|
|
3324
3325
|
section: "_section_mh952_1",
|
|
3325
3326
|
divider: "_divider_mh952_5"
|
|
3326
|
-
},
|
|
3327
|
-
let w = a?.typography?.titleClassName ?? "dial-body-semi-text", T = a?.typography?.countClassName ?? "dial-tiny-semi-text", E =
|
|
3328
|
-
value:
|
|
3329
|
-
icon: /* @__PURE__ */
|
|
3327
|
+
}, Jr = ({ totalCount: e, viewMode: t, onViewModeChange: n, title: r = "Browse", browseHeaderRenderer: i, styles: a, query: o, onQueryChange: s, searchPlaceholder: c, gridViewLabel: l = "Grid view", listViewLabel: u = "List view", viewToggleLabel: d = "View mode", sortKey: f, sortOptions: p, onSortChange: m, sortLabel: h = "Sort", filters: g, onFiltersChange: _, filterValues: v, isMyAppsActive: y, onMyAppsChange: b, filterFromLabel: x, filterMyAppsLabel: S, filterTopicsLabel: C }) => {
|
|
3328
|
+
let w = a?.typography?.titleClassName ?? "dial-body-semi-text", T = a?.typography?.countClassName ?? "dial-tiny-semi-text", E = I(() => [{
|
|
3329
|
+
value: Ct.Grid,
|
|
3330
|
+
icon: /* @__PURE__ */ G(nt, {
|
|
3330
3331
|
size: z.SM,
|
|
3331
3332
|
"aria-hidden": !0,
|
|
3332
3333
|
stroke: B
|
|
3333
3334
|
}),
|
|
3334
3335
|
"aria-label": l
|
|
3335
3336
|
}, {
|
|
3336
|
-
value:
|
|
3337
|
-
icon: /* @__PURE__ */
|
|
3337
|
+
value: Ct.Cards,
|
|
3338
|
+
icon: /* @__PURE__ */ G(rt, {
|
|
3338
3339
|
size: z.SM,
|
|
3339
3340
|
"aria-hidden": !0,
|
|
3340
3341
|
stroke: B
|
|
@@ -3342,10 +3343,10 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3342
3343
|
"aria-label": u
|
|
3343
3344
|
}], [l, u]), D = (e) => {
|
|
3344
3345
|
s(e ?? "");
|
|
3345
|
-
}, O = p?.find((e) => e.value === f)?.label ?? h, k =
|
|
3346
|
+
}, O = p?.find((e) => e.value === f)?.label ?? h, k = I(() => (p ?? []).map((e) => ({
|
|
3346
3347
|
key: e.value,
|
|
3347
3348
|
label: e.label,
|
|
3348
|
-
mark:
|
|
3349
|
+
mark: Ae.Check,
|
|
3349
3350
|
checked: e.value === f,
|
|
3350
3351
|
onClick: () => m?.(e.value)
|
|
3351
3352
|
})), [
|
|
@@ -3353,11 +3354,11 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3353
3354
|
f,
|
|
3354
3355
|
m
|
|
3355
3356
|
]);
|
|
3356
|
-
return /* @__PURE__ */
|
|
3357
|
+
return /* @__PURE__ */ K("div", {
|
|
3357
3358
|
className: "flex flex-col gap-3",
|
|
3358
|
-
children: [/* @__PURE__ */
|
|
3359
|
+
children: [/* @__PURE__ */ K("div", {
|
|
3359
3360
|
className: "flex items-center gap-2",
|
|
3360
|
-
children: [i ?? /* @__PURE__ */
|
|
3361
|
+
children: [i ?? /* @__PURE__ */ G(ee, {
|
|
3361
3362
|
title: r,
|
|
3362
3363
|
postfix: e,
|
|
3363
3364
|
titleClassName: w,
|
|
@@ -3368,34 +3369,34 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3368
3369
|
title: a?.colors?.titleText,
|
|
3369
3370
|
count: a?.colors?.countText
|
|
3370
3371
|
}
|
|
3371
|
-
}), /* @__PURE__ */
|
|
3372
|
+
}), /* @__PURE__ */ K("div", {
|
|
3372
3373
|
className: "ms-auto flex shrink-0 items-center gap-2",
|
|
3373
|
-
children: [/* @__PURE__ */
|
|
3374
|
+
children: [/* @__PURE__ */ G(Ie, {
|
|
3374
3375
|
"aria-label": d,
|
|
3375
3376
|
value: t,
|
|
3376
3377
|
onChange: n,
|
|
3377
3378
|
items: E
|
|
3378
|
-
}), p != null && p.length > 0 && /* @__PURE__ */
|
|
3379
|
+
}), p != null && p.length > 0 && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("div", { className: M("h-4 w-px shrink-0", qr.divider) }), /* @__PURE__ */ G(de, {
|
|
3379
3380
|
items: k,
|
|
3380
3381
|
label: O,
|
|
3381
|
-
variant:
|
|
3382
|
-
appearance:
|
|
3382
|
+
variant: fe.Primary,
|
|
3383
|
+
appearance: ue.Ghost
|
|
3383
3384
|
})] })]
|
|
3384
3385
|
})]
|
|
3385
|
-
}), /* @__PURE__ */
|
|
3386
|
+
}), /* @__PURE__ */ K("div", {
|
|
3386
3387
|
className: "mb-5 flex items-center gap-3",
|
|
3387
|
-
children: [/* @__PURE__ */
|
|
3388
|
+
children: [/* @__PURE__ */ G("div", {
|
|
3388
3389
|
role: "search",
|
|
3389
3390
|
className: "flex-1",
|
|
3390
|
-
children: /* @__PURE__ */
|
|
3391
|
+
children: /* @__PURE__ */ G(H, {
|
|
3391
3392
|
value: o,
|
|
3392
3393
|
onChange: D,
|
|
3393
|
-
size:
|
|
3394
|
+
size: be.Large,
|
|
3394
3395
|
wrapperClassName: "dial-kit-input-large",
|
|
3395
3396
|
placeholder: c,
|
|
3396
3397
|
"aria-label": c
|
|
3397
3398
|
})
|
|
3398
|
-
}), /* @__PURE__ */
|
|
3399
|
+
}), /* @__PURE__ */ G(Kr, {
|
|
3399
3400
|
checked: g ?? /* @__PURE__ */ new Set(),
|
|
3400
3401
|
onChange: _ ?? (() => void 0),
|
|
3401
3402
|
values: v,
|
|
@@ -3408,12 +3409,12 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3408
3409
|
})]
|
|
3409
3410
|
})]
|
|
3410
3411
|
});
|
|
3411
|
-
},
|
|
3412
|
+
}, Yr = ({ query: e, onQueryChange: t, searchPlaceholder: n = "Search models, tools, agents…", styles: r, filters: i, onFiltersChange: a, filterValues: o, isMyAppsActive: s, onMyAppsChange: c, filterFromLabel: l, filterMyAppsLabel: u, filterTopicsLabel: d, gridViewLabel: f, listViewLabel: p, viewToggleLabel: m, sortKey: h, sortOptions: g, onSortChange: _, sortLabel: v, ...y }) => {
|
|
3412
3413
|
let b = { "--cat-browse-divider": r?.colors?.divider };
|
|
3413
|
-
return /* @__PURE__ */
|
|
3414
|
-
className: M("flex-shrink-0 px-4",
|
|
3414
|
+
return /* @__PURE__ */ G("section", {
|
|
3415
|
+
className: M("flex-shrink-0 px-4", qr.section, Et.toolbar),
|
|
3415
3416
|
style: b,
|
|
3416
|
-
children: /* @__PURE__ */
|
|
3417
|
+
children: /* @__PURE__ */ G(Jr, {
|
|
3417
3418
|
styles: r,
|
|
3418
3419
|
query: e,
|
|
3419
3420
|
onQueryChange: t,
|
|
@@ -3436,42 +3437,42 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3436
3437
|
...y
|
|
3437
3438
|
})
|
|
3438
3439
|
});
|
|
3439
|
-
},
|
|
3440
|
+
}, Xr = {
|
|
3440
3441
|
root: "_root_1h83l_1",
|
|
3441
3442
|
heading: "_heading_1h83l_5",
|
|
3442
3443
|
headingTitle: "_headingTitle_1h83l_9"
|
|
3443
|
-
},
|
|
3444
|
-
let s =
|
|
3445
|
-
return r ? /* @__PURE__ */
|
|
3444
|
+
}, Zr = ({ label: e, options: t, onClick: n, search: r, searchPlaceholder: i = "Search", searchClearLabel: a = "Clear search", noResultsLabel: o = "No results found" }) => {
|
|
3445
|
+
let s = L(null), [c, l] = R(!1);
|
|
3446
|
+
return r ? /* @__PURE__ */ G("div", {
|
|
3446
3447
|
ref: s,
|
|
3447
|
-
children: /* @__PURE__ */
|
|
3448
|
+
children: /* @__PURE__ */ G(ve, {
|
|
3448
3449
|
items: t?.length ? t : [{
|
|
3449
3450
|
key: "no-results",
|
|
3450
|
-
type:
|
|
3451
|
-
label: /* @__PURE__ */
|
|
3451
|
+
type: ye.PlainText,
|
|
3452
|
+
label: /* @__PURE__ */ G("span", {
|
|
3452
3453
|
role: "status",
|
|
3453
3454
|
children: o
|
|
3454
3455
|
})
|
|
3455
3456
|
}],
|
|
3456
|
-
menuHeader: /* @__PURE__ */
|
|
3457
|
+
menuHeader: /* @__PURE__ */ G("div", {
|
|
3457
3458
|
className: "px-2 pb-1 pt-2",
|
|
3458
|
-
children: /* @__PURE__ */
|
|
3459
|
+
children: /* @__PURE__ */ G(H, {
|
|
3459
3460
|
value: r.value,
|
|
3460
3461
|
placeholder: i,
|
|
3461
3462
|
"aria-label": i,
|
|
3462
3463
|
clearLabel: a,
|
|
3463
|
-
size:
|
|
3464
|
+
size: be.Small,
|
|
3464
3465
|
onChange: (e) => r.onChange(e ?? "")
|
|
3465
3466
|
})
|
|
3466
3467
|
}),
|
|
3467
3468
|
onOpenChange: (e) => {
|
|
3468
3469
|
l(e), e || r.onChange("");
|
|
3469
3470
|
},
|
|
3470
|
-
children: /* @__PURE__ */
|
|
3471
|
+
children: /* @__PURE__ */ G(le, {
|
|
3471
3472
|
label: e,
|
|
3472
|
-
variant:
|
|
3473
|
-
appearance:
|
|
3474
|
-
iconAfter: /* @__PURE__ */
|
|
3473
|
+
variant: fe.Primary,
|
|
3474
|
+
appearance: ue.Solid,
|
|
3475
|
+
iconAfter: /* @__PURE__ */ G(Je, {
|
|
3475
3476
|
size: z.SM,
|
|
3476
3477
|
stroke: B,
|
|
3477
3478
|
"aria-hidden": !0,
|
|
@@ -3481,24 +3482,24 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3481
3482
|
"aria-expanded": c
|
|
3482
3483
|
})
|
|
3483
3484
|
})
|
|
3484
|
-
}) : t?.length ? /* @__PURE__ */
|
|
3485
|
+
}) : t?.length ? /* @__PURE__ */ G("div", {
|
|
3485
3486
|
ref: s,
|
|
3486
|
-
children: /* @__PURE__ */
|
|
3487
|
-
appearance:
|
|
3487
|
+
children: /* @__PURE__ */ G(de, {
|
|
3488
|
+
appearance: ue.Solid,
|
|
3488
3489
|
label: e,
|
|
3489
|
-
variant:
|
|
3490
|
+
variant: fe.Primary,
|
|
3490
3491
|
items: t
|
|
3491
3492
|
})
|
|
3492
|
-
}) : /* @__PURE__ */
|
|
3493
|
+
}) : /* @__PURE__ */ G(Ne, {
|
|
3493
3494
|
label: e,
|
|
3494
|
-
iconBefore: /* @__PURE__ */
|
|
3495
|
+
iconBefore: /* @__PURE__ */ G(ct, {
|
|
3495
3496
|
size: z.SM,
|
|
3496
3497
|
stroke: B
|
|
3497
3498
|
}),
|
|
3498
3499
|
onClick: n
|
|
3499
3500
|
});
|
|
3500
|
-
},
|
|
3501
|
-
let { typography:
|
|
3501
|
+
}, Qr = 3, $r = 300, ei = ({ items: e, tabs: t, topicOptions: n, favorites: o, titles: c, browseHeaderRenderer: d, onToggleFavorite: p, isFavoriteVisible: m, columnVisibility: g, onUseInChat: v, isPrimaryActionVisible: y, onShare: b, isPublishVisible: x, isPublishPrimary: S, getPublishHistory: C, publishFolderItems: w, publishExpandedPaths: T, onPublishExpandedPathsChange: E, publishLoadingPaths: D, hasPublishWriteAccess: O, publishDefaultAuthor: ee, onPublish: k, onPublishSuccess: A, onPublishError: te, onCreatePublishFolder: ne, publishLabels: re, ruleSourceOptions: j, onFetchExistingRules: ie, shareOverlay: N, isShareVisible: oe, isSharePrimary: se, onFetchDetails: ce, renderCredentials: le, onEdit: ue, onDownload: de, isDownloadVisible: fe, isDownloadPrimary: pe, onLoadContentFile: me, onLoadContentFilePreview: he, renderContentFilePreview: ge, renderContentFileTree: z, onDelete: B, onUnshare: _e, isUnshareVisible: ve, onRevokeShare: ye, onFetchRecipientsCount: be, isRevokeShareVisible: xe, onUnpublish: Se, isUnpublishVisible: Ce, onLogin: we, onLogout: Te, onCreateClick: Ee, createOptions: V, createSearch: De, hideCreateButton: Oe = !1, hidePageTitle: ke = !1, isReadonly: Ae = !1, initialViewMode: je = Ct.Grid, isFullWidth: Me = !1, selectedItemId: Ne, onCardClick: Pe, isLoading: Fe, styles: H, detailsTexts: Ie, detailsLimitsFooterNote: Le, initialDetailsItemId: Re, sortKey: Ve, onSortChange: He, filterTopics: Ue, onFilterTopicsChange: We, isMyAppsActive: Ge, onMyAppsActiveChange: Ke, activeTab: qe, onActiveTabChange: Je, renderEmptyState: Ye }) => {
|
|
3502
|
+
let { typography: Xe } = H ?? {}, Ze = Dt(H), Qe = c?.pageTitle ?? "Catalog", $e = c?.createLabel ?? "Create", U = c?.favoritesTitle ?? "Your favorites", et = c?.browseTitle ?? "Browse", tt = c?.searchPlaceholder ?? "Search models, tools, agents…", nt = c?.noResultsTitle ?? ((e) => `No results for "${e}"`), rt = c?.featuredLabel ?? "Featured", it = c?.gridViewLabel ?? "Grid view", at = c?.listViewLabel ?? "List view", ot = c?.viewToggleLabel ?? "View mode", st = c?.ariaLabel ?? "Catalog", ct = c?.sortLabel ?? "Sort", lt = [
|
|
3502
3503
|
{
|
|
3503
3504
|
value: s.RecentlyUpdated,
|
|
3504
3505
|
label: c?.sortRecentlyUpdatedLabel ?? "Recently Updated"
|
|
@@ -3511,81 +3512,81 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3511
3512
|
value: s.NameAZ,
|
|
3512
3513
|
label: c?.sortNameAZLabel ?? "Name A-Z"
|
|
3513
3514
|
}
|
|
3514
|
-
], [
|
|
3515
|
+
], [ut, dt] = R(""), [ft, pt] = R(je), [mt, ht] = R(je === Ct.Cards ? "shown" : "unmounted"), [gt, _t] = R(s.RecentlyUpdated), [vt, yt] = R(/* @__PURE__ */ new Set()), [bt, xt] = R(!1), q = Ve ?? gt, J = Ue ?? vt, St = Ge ?? bt, Y = P((e) => {
|
|
3515
3516
|
let t = e;
|
|
3516
|
-
|
|
3517
|
-
}, [
|
|
3518
|
-
|
|
3519
|
-
}, [
|
|
3520
|
-
|
|
3521
|
-
}, [
|
|
3517
|
+
_t(t), He?.(t);
|
|
3518
|
+
}, [He]), X = P((e) => {
|
|
3519
|
+
yt(e), We?.(e);
|
|
3520
|
+
}, [We]), wt = P((e) => {
|
|
3521
|
+
xt(e), Ke?.(e);
|
|
3522
|
+
}, [Ke]), Z = I(() => e.filter((e) => !e.isHidden), [e]), Q = I(() => o.filter((e) => !e.isHidden), [o]), Tt = I(() => n ?? u(Z), [n, Z]), Ot = I(() => t ?? r(Z, c?.tabLabels), [
|
|
3522
3523
|
t,
|
|
3523
|
-
|
|
3524
|
+
Z,
|
|
3524
3525
|
c?.tabLabels
|
|
3525
|
-
]), kt = Ot[0]?.id ?? "", [At, jt] =
|
|
3526
|
-
|
|
3526
|
+
]), kt = Ot[0]?.id ?? "", [At, jt] = R(kt);
|
|
3527
|
+
F(() => {
|
|
3527
3528
|
jt((e) => e || kt);
|
|
3528
3529
|
}, [kt]);
|
|
3529
|
-
let Mt =
|
|
3530
|
-
jt(e),
|
|
3531
|
-
}, [
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
}, [
|
|
3535
|
-
let It =
|
|
3530
|
+
let Mt = qe ?? At, Nt = P((e) => {
|
|
3531
|
+
jt(e), Je?.(e);
|
|
3532
|
+
}, [Je]), [Pt, Ft] = R(Q.length > 0);
|
|
3533
|
+
F(() => {
|
|
3534
|
+
Q.length > 0 && !Pt && Ft(!0);
|
|
3535
|
+
}, [Q.length, Pt]);
|
|
3536
|
+
let It = P(() => {
|
|
3536
3537
|
Ft(!1);
|
|
3537
|
-
}, []), Lt = Pt &&
|
|
3538
|
+
}, []), Lt = Pt && Q.length === 0, [Rt, zt] = R(null), [Bt, Vt] = R(!1), [Ht, Ut] = R(void 0), [Wt, Gt] = R(!1), Kt = L(null), qt = L(0), Jt = P(async (e) => {
|
|
3538
3539
|
Kt.current = e.id;
|
|
3539
3540
|
let t = ++qt.current;
|
|
3540
|
-
if (
|
|
3541
|
+
if (ce) {
|
|
3541
3542
|
Gt(!0);
|
|
3542
3543
|
try {
|
|
3543
|
-
let n = await
|
|
3544
|
+
let n = await ce(e);
|
|
3544
3545
|
return qt.current === t && Ut(n), n;
|
|
3545
3546
|
} finally {
|
|
3546
3547
|
qt.current === t && Gt(!1);
|
|
3547
3548
|
}
|
|
3548
3549
|
}
|
|
3549
|
-
}, [
|
|
3550
|
-
for (let n = 0; n <
|
|
3550
|
+
}, [ce]), Yt = P(async (e) => (zt(e), Ut(void 0), Jt(e)), [Jt]), Xt = P(async (e, t) => {
|
|
3551
|
+
for (let n = 0; n < Qr; n++) {
|
|
3551
3552
|
if (Kt.current !== e.id || t(await Jt(e))) return;
|
|
3552
|
-
n <
|
|
3553
|
+
n < Qr - 1 && await h($r);
|
|
3553
3554
|
}
|
|
3554
|
-
}, [Jt]),
|
|
3555
|
-
|
|
3556
|
-
if (!
|
|
3557
|
-
|
|
3555
|
+
}, [Jt]), Zt = L(null);
|
|
3556
|
+
F(() => {
|
|
3557
|
+
if (!Re) {
|
|
3558
|
+
Zt.current = null;
|
|
3558
3559
|
return;
|
|
3559
3560
|
}
|
|
3560
|
-
if (
|
|
3561
|
-
let t = e.find((e) => e.id ===
|
|
3562
|
-
t && (
|
|
3561
|
+
if (Zt.current === Re) return;
|
|
3562
|
+
let t = e.find((e) => e.id === Re);
|
|
3563
|
+
t && (Zt.current = Re, Yt(t));
|
|
3563
3564
|
}, [
|
|
3564
|
-
|
|
3565
|
+
Re,
|
|
3565
3566
|
e,
|
|
3566
3567
|
Yt
|
|
3567
|
-
]),
|
|
3568
|
+
]), F(() => {
|
|
3568
3569
|
if (Rt == null) return;
|
|
3569
3570
|
let t = e.find((e) => e.id === Rt.id);
|
|
3570
3571
|
t && t !== Rt && zt(t);
|
|
3571
3572
|
}, [e, Rt]);
|
|
3572
|
-
let $t =
|
|
3573
|
-
await we?.(e, t),
|
|
3573
|
+
let $t = P(async (e, t) => {
|
|
3574
|
+
await we?.(e, t), ce && await Xt(e, (e) => f(e?.credentials, t.level));
|
|
3574
3575
|
}, [
|
|
3575
3576
|
we,
|
|
3576
|
-
|
|
3577
|
+
ce,
|
|
3577
3578
|
Xt
|
|
3578
|
-
]), en =
|
|
3579
|
-
await Te?.(e, t),
|
|
3579
|
+
]), en = P(async (e, t) => {
|
|
3580
|
+
await Te?.(e, t), ce && await Xt(e, (e) => !f(e?.credentials, t.level));
|
|
3580
3581
|
}, [
|
|
3581
3582
|
Te,
|
|
3582
|
-
|
|
3583
|
+
ce,
|
|
3583
3584
|
Xt
|
|
3584
|
-
]), tn =
|
|
3585
|
+
]), tn = P(() => {
|
|
3585
3586
|
Vt(!1), Kt.current = null, qt.current += 1, setTimeout(() => {
|
|
3586
3587
|
zt(null), Ut(void 0), Gt(!1);
|
|
3587
3588
|
}, 300);
|
|
3588
|
-
}, []), nn =
|
|
3589
|
+
}, []), nn = I(() => {
|
|
3589
3590
|
if (Rt == null) return null;
|
|
3590
3591
|
if (Ht == null) return Rt;
|
|
3591
3592
|
let { credentials: e, ...t } = Ht;
|
|
@@ -3594,12 +3595,12 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3594
3595
|
details: t,
|
|
3595
3596
|
credentials: e ?? Rt.credentials
|
|
3596
3597
|
};
|
|
3597
|
-
}, [Rt, Ht]), rn =
|
|
3598
|
-
|
|
3599
|
-
if (
|
|
3598
|
+
}, [Rt, Ht]), rn = I(() => l(Z, q), [Z, q]), an = I(() => a(rn, ut), [rn, ut]), on = I(() => J.size > 0 ? i(an, J) : an, [an, J]), sn = I(() => St ? _(on) : on, [on, St]), cn = I(() => Mt ? sn.filter((e) => e.type === Mt) : sn, [sn, Mt]);
|
|
3599
|
+
F(() => {
|
|
3600
|
+
if (mt !== "unmounted" || Fe || cn.length === 0) return;
|
|
3600
3601
|
let e = () => {
|
|
3601
|
-
|
|
3602
|
-
|
|
3602
|
+
ae(() => {
|
|
3603
|
+
ht((e) => e === "unmounted" ? "prepared" : e);
|
|
3603
3604
|
});
|
|
3604
3605
|
};
|
|
3605
3606
|
if (typeof window.requestIdleCallback == "function") {
|
|
@@ -3609,49 +3610,49 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3609
3610
|
let t = window.setTimeout(e, 200);
|
|
3610
3611
|
return () => window.clearTimeout(t);
|
|
3611
3612
|
}, [
|
|
3612
|
-
|
|
3613
|
+
mt,
|
|
3613
3614
|
Fe,
|
|
3614
3615
|
cn.length
|
|
3615
3616
|
]);
|
|
3616
|
-
let ln = Rt != null &&
|
|
3617
|
-
|
|
3617
|
+
let ln = Rt != null && Q.some((e) => e.id === Rt.id);
|
|
3618
|
+
F(() => {
|
|
3618
3619
|
if (Rt == null) return;
|
|
3619
3620
|
let e = requestAnimationFrame(() => Vt(!0));
|
|
3620
3621
|
return () => cancelAnimationFrame(e);
|
|
3621
3622
|
}, [Rt]);
|
|
3622
|
-
let un =
|
|
3623
|
-
e ===
|
|
3624
|
-
}, []), dn = !Oe && !Ae, fn = Pt && !Ae, pn =
|
|
3623
|
+
let un = P((e) => {
|
|
3624
|
+
e === Ct.Cards && ht("shown"), pt(e);
|
|
3625
|
+
}, []), dn = !Oe && !Ae, fn = Pt && !Ae, pn = ut ? nt(ut) : "No items", mn = I(() => ({
|
|
3625
3626
|
noResultsTitle: pn,
|
|
3626
|
-
featuredLabel:
|
|
3627
|
+
featuredLabel: rt,
|
|
3627
3628
|
credentialsBadgeLoggedOutLabel: Ie?.credentialsBadgeLoggedOutLabel
|
|
3628
3629
|
}), [
|
|
3629
3630
|
pn,
|
|
3630
|
-
|
|
3631
|
+
rt,
|
|
3631
3632
|
Ie?.credentialsBadgeLoggedOutLabel
|
|
3632
|
-
]), hn = !Fe && cn.length === 0 ?
|
|
3633
|
-
query:
|
|
3633
|
+
]), hn = !Fe && cn.length === 0 ? Ye?.({
|
|
3634
|
+
query: ut,
|
|
3634
3635
|
activeTab: Mt,
|
|
3635
|
-
hasTopicFilters:
|
|
3636
|
-
isMyAppsActive:
|
|
3636
|
+
hasTopicFilters: J.size > 0,
|
|
3637
|
+
isMyAppsActive: St
|
|
3637
3638
|
}) : void 0;
|
|
3638
|
-
return Fe ? /* @__PURE__ */
|
|
3639
|
+
return Fe ? /* @__PURE__ */ G("div", {
|
|
3639
3640
|
className: "flex size-full min-h-0 flex-1 items-center justify-center",
|
|
3640
|
-
children: /* @__PURE__ */
|
|
3641
|
-
}) : /* @__PURE__ */
|
|
3642
|
-
"aria-label":
|
|
3643
|
-
className: M("flex size-full min-h-0 flex-1 flex-col",
|
|
3644
|
-
style:
|
|
3641
|
+
children: /* @__PURE__ */ G(ze, {})
|
|
3642
|
+
}) : /* @__PURE__ */ K("section", {
|
|
3643
|
+
"aria-label": st,
|
|
3644
|
+
className: M("flex size-full min-h-0 flex-1 flex-col", Xr.root, Et.root),
|
|
3645
|
+
style: Ze,
|
|
3645
3646
|
children: [
|
|
3646
|
-
(!ke || dn) && /* @__PURE__ */
|
|
3647
|
-
className: M("shrink-0",
|
|
3648
|
-
children: /* @__PURE__ */
|
|
3647
|
+
(!ke || dn) && /* @__PURE__ */ G("div", {
|
|
3648
|
+
className: M("shrink-0", Xr.heading),
|
|
3649
|
+
children: /* @__PURE__ */ K("div", {
|
|
3649
3650
|
className: "flex h-[64px] w-full items-center justify-between px-8",
|
|
3650
|
-
children: [!ke && /* @__PURE__ */
|
|
3651
|
-
className: M(
|
|
3652
|
-
children:
|
|
3653
|
-
}), dn && /* @__PURE__ */
|
|
3654
|
-
label:
|
|
3651
|
+
children: [!ke && /* @__PURE__ */ G("h1", {
|
|
3652
|
+
className: M(Xe?.pageHeadingFontClassName ?? "dial-display2-text", Xr.headingTitle),
|
|
3653
|
+
children: Qe
|
|
3654
|
+
}), dn && /* @__PURE__ */ G(Zr, {
|
|
3655
|
+
label: $e,
|
|
3655
3656
|
options: V,
|
|
3656
3657
|
onClick: Ee,
|
|
3657
3658
|
search: De,
|
|
@@ -3661,15 +3662,15 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3661
3662
|
})]
|
|
3662
3663
|
})
|
|
3663
3664
|
}),
|
|
3664
|
-
/* @__PURE__ */
|
|
3665
|
+
/* @__PURE__ */ K("div", {
|
|
3665
3666
|
className: "flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto overflow-x-hidden",
|
|
3666
3667
|
children: [
|
|
3667
|
-
fn && /* @__PURE__ */
|
|
3668
|
+
fn && /* @__PURE__ */ G("div", {
|
|
3668
3669
|
className: "w-full px-8",
|
|
3669
|
-
children: /* @__PURE__ */
|
|
3670
|
-
items:
|
|
3671
|
-
totalCount:
|
|
3672
|
-
title:
|
|
3670
|
+
children: /* @__PURE__ */ G(Dr, {
|
|
3671
|
+
items: Q,
|
|
3672
|
+
totalCount: Q.length,
|
|
3673
|
+
title: U,
|
|
3673
3674
|
onToggleFavorite: p,
|
|
3674
3675
|
isFavoriteVisible: m,
|
|
3675
3676
|
onItemClick: Pe ?? Yt,
|
|
@@ -3679,37 +3680,37 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3679
3680
|
credentialsBadgeLoggedOutLabel: Ie?.credentialsBadgeLoggedOutLabel
|
|
3680
3681
|
})
|
|
3681
3682
|
}),
|
|
3682
|
-
/* @__PURE__ */
|
|
3683
|
+
/* @__PURE__ */ G("div", {
|
|
3683
3684
|
className: "w-full px-4 pt-6",
|
|
3684
|
-
children: /* @__PURE__ */
|
|
3685
|
+
children: /* @__PURE__ */ G(Yr, {
|
|
3685
3686
|
totalCount: sn.length,
|
|
3686
|
-
viewMode:
|
|
3687
|
+
viewMode: ft,
|
|
3687
3688
|
onViewModeChange: un,
|
|
3688
|
-
sortKey:
|
|
3689
|
-
query:
|
|
3690
|
-
onQueryChange:
|
|
3691
|
-
title:
|
|
3689
|
+
sortKey: q,
|
|
3690
|
+
query: ut,
|
|
3691
|
+
onQueryChange: dt,
|
|
3692
|
+
title: et,
|
|
3692
3693
|
browseHeaderRenderer: d,
|
|
3693
|
-
searchPlaceholder:
|
|
3694
|
-
gridViewLabel:
|
|
3695
|
-
listViewLabel:
|
|
3696
|
-
viewToggleLabel:
|
|
3697
|
-
sortOptions:
|
|
3698
|
-
onSortChange:
|
|
3699
|
-
sortLabel:
|
|
3700
|
-
filters:
|
|
3701
|
-
onFiltersChange:
|
|
3702
|
-
filterValues:
|
|
3703
|
-
isMyAppsActive:
|
|
3704
|
-
onMyAppsChange:
|
|
3694
|
+
searchPlaceholder: tt,
|
|
3695
|
+
gridViewLabel: it,
|
|
3696
|
+
listViewLabel: at,
|
|
3697
|
+
viewToggleLabel: ot,
|
|
3698
|
+
sortOptions: lt,
|
|
3699
|
+
onSortChange: Y,
|
|
3700
|
+
sortLabel: ct,
|
|
3701
|
+
filters: J,
|
|
3702
|
+
onFiltersChange: X,
|
|
3703
|
+
filterValues: Tt,
|
|
3704
|
+
isMyAppsActive: St,
|
|
3705
|
+
onMyAppsChange: wt,
|
|
3705
3706
|
filterFromLabel: c?.filterFromLabel,
|
|
3706
3707
|
filterMyAppsLabel: c?.filterMyAppsLabel,
|
|
3707
3708
|
filterTopicsLabel: c?.filterTopicsLabel
|
|
3708
3709
|
})
|
|
3709
3710
|
}),
|
|
3710
|
-
Ot.length > 1 && /* @__PURE__ */
|
|
3711
|
+
Ot.length > 1 && /* @__PURE__ */ G("div", {
|
|
3711
3712
|
className: "min-w-0 shrink-0 overflow-x-auto px-8",
|
|
3712
|
-
children: /* @__PURE__ */
|
|
3713
|
+
children: /* @__PURE__ */ G(Be, {
|
|
3713
3714
|
tabs: Ot.map((e) => ({
|
|
3714
3715
|
id: e.id,
|
|
3715
3716
|
label: typeof e.label == "string" ? e.label : String(e.label),
|
|
@@ -3719,14 +3720,14 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3719
3720
|
onTabChange: Nt
|
|
3720
3721
|
})
|
|
3721
3722
|
}),
|
|
3722
|
-
/* @__PURE__ */
|
|
3723
|
+
/* @__PURE__ */ G("div", {
|
|
3723
3724
|
className: M(cn.length > 0 ? ["min-h-full w-full px-8 py-6", !Me && "mx-auto max-w-[1180px]"] : "min-h-[180px] flex-1", cn.length === 0 && "px-8 py-6"),
|
|
3724
|
-
children: hn ?? /* @__PURE__ */
|
|
3725
|
-
inert:
|
|
3726
|
-
className: M(cn.length > 0 ? "pb-8" : "size-full flex-1",
|
|
3727
|
-
children: /* @__PURE__ */
|
|
3725
|
+
children: hn ?? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("div", {
|
|
3726
|
+
inert: ft !== Ct.Grid,
|
|
3727
|
+
className: M(cn.length > 0 ? "pb-8" : "size-full flex-1", ft !== Ct.Grid && "hidden"),
|
|
3728
|
+
children: /* @__PURE__ */ G(Qt, {
|
|
3728
3729
|
items: cn,
|
|
3729
|
-
query:
|
|
3730
|
+
query: ut,
|
|
3730
3731
|
onToggleFavorite: p,
|
|
3731
3732
|
isFavoriteVisible: m,
|
|
3732
3733
|
onItemClick: Pe ?? Yt,
|
|
@@ -3736,14 +3737,14 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3736
3737
|
isFullWidth: Me,
|
|
3737
3738
|
featuredChipStyle: H?.colors?.featuredChipStyle
|
|
3738
3739
|
})
|
|
3739
|
-
}),
|
|
3740
|
-
inert:
|
|
3741
|
-
className: M("pb-8",
|
|
3742
|
-
children: /* @__PURE__ */
|
|
3740
|
+
}), mt !== "unmounted" && /* @__PURE__ */ G("div", {
|
|
3741
|
+
inert: ft !== Ct.Cards,
|
|
3742
|
+
className: M("pb-8", ft !== Ct.Cards && (mt === "prepared" ? "invisible h-0 overflow-hidden p-0" : "hidden"), cn.length === 0 && ft === Ct.Cards && "h-full"),
|
|
3743
|
+
children: /* @__PURE__ */ G(Vr, {
|
|
3743
3744
|
type: Mt,
|
|
3744
3745
|
items: cn,
|
|
3745
|
-
query:
|
|
3746
|
-
ariaLabel:
|
|
3746
|
+
query: ut,
|
|
3747
|
+
ariaLabel: st,
|
|
3747
3748
|
emptyStateTitle: pn,
|
|
3748
3749
|
onToggleFavorite: p,
|
|
3749
3750
|
isFavoriteVisible: m,
|
|
@@ -3758,7 +3759,7 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3758
3759
|
})
|
|
3759
3760
|
]
|
|
3760
3761
|
}),
|
|
3761
|
-
nn != null && /* @__PURE__ */
|
|
3762
|
+
nn != null && /* @__PURE__ */ G(Sr, {
|
|
3762
3763
|
renderCredentials: le,
|
|
3763
3764
|
item: nn,
|
|
3764
3765
|
isOpen: Bt,
|
|
@@ -3787,18 +3788,18 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3787
3788
|
publishLabels: re,
|
|
3788
3789
|
ruleSourceOptions: j,
|
|
3789
3790
|
onFetchExistingRules: ie,
|
|
3790
|
-
shareOverlay:
|
|
3791
|
-
isShareVisible:
|
|
3792
|
-
isSharePrimary:
|
|
3791
|
+
shareOverlay: N,
|
|
3792
|
+
isShareVisible: oe,
|
|
3793
|
+
isSharePrimary: se,
|
|
3793
3794
|
onEdit: ue,
|
|
3794
3795
|
onDownload: de,
|
|
3795
3796
|
isDownloadVisible: fe,
|
|
3796
3797
|
isDownloadPrimary: pe,
|
|
3797
3798
|
onLoadContentFile: me,
|
|
3798
3799
|
onLoadContentFilePreview: he,
|
|
3799
|
-
renderContentFilePreview:
|
|
3800
|
-
renderContentFileTree:
|
|
3801
|
-
onDelete:
|
|
3800
|
+
renderContentFilePreview: ge,
|
|
3801
|
+
renderContentFileTree: z,
|
|
3802
|
+
onDelete: B,
|
|
3802
3803
|
onUnshare: _e,
|
|
3803
3804
|
isUnshareVisible: ve,
|
|
3804
3805
|
onRevokeShare: ye,
|
|
@@ -3814,10 +3815,10 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3814
3815
|
})
|
|
3815
3816
|
]
|
|
3816
3817
|
});
|
|
3817
|
-
},
|
|
3818
|
-
let [x, S] =
|
|
3818
|
+
}, ti = ({ selectedId: e, records: t, selectedLabel: n, placeholder: r, labels: i, onSelect: a, onBrowse: o, extraOptions: s = [], isLoading: c = !1, error: l, isDisabled: u = !1, isInvalid: d = !1, labelledById: f, ariaHasPopup: p = "listbox", className: m, panelClassName: h, iconAfter: g, renderPanel: _, open: v, onOpenChange: y, renderOverlay: b }) => {
|
|
3819
|
+
let [x, S] = R(!1), C = v ?? x, w = (e) => {
|
|
3819
3820
|
e && u || (v === void 0 && S(e), y?.(e));
|
|
3820
|
-
}, [T, E] =
|
|
3821
|
+
}, [T, E] = R(""), D = L(null), O = I(() => [...s, ...t].filter((e) => e.label.toLocaleLowerCase().includes(T.toLocaleLowerCase())), [
|
|
3821
3822
|
s,
|
|
3822
3823
|
t,
|
|
3823
3824
|
T
|
|
@@ -3825,50 +3826,50 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3825
3826
|
w(!1), requestAnimationFrame(() => D.current?.focus());
|
|
3826
3827
|
}, k = (e) => {
|
|
3827
3828
|
a(e), ee();
|
|
3828
|
-
}, A = _ ? _(ee) : /* @__PURE__ */
|
|
3829
|
+
}, A = _ ? _(ee) : /* @__PURE__ */ K("div", {
|
|
3829
3830
|
className: M("w-full min-w-0 max-w-full p-3", h),
|
|
3830
3831
|
children: [
|
|
3831
|
-
/* @__PURE__ */
|
|
3832
|
+
/* @__PURE__ */ G(H, {
|
|
3832
3833
|
value: T,
|
|
3833
3834
|
onChange: (e) => E(e ?? ""),
|
|
3834
3835
|
placeholder: i.searchPlaceholder,
|
|
3835
3836
|
"aria-label": i.searchAriaLabel
|
|
3836
3837
|
}),
|
|
3837
|
-
/* @__PURE__ */
|
|
3838
|
+
/* @__PURE__ */ G("div", {
|
|
3838
3839
|
role: "listbox",
|
|
3839
3840
|
className: "mt-2 max-h-[min(50dvh,320px)] min-w-0 overflow-y-auto",
|
|
3840
|
-
children: c ? /* @__PURE__ */
|
|
3841
|
+
children: c ? /* @__PURE__ */ G("span", {
|
|
3841
3842
|
role: "status",
|
|
3842
3843
|
children: i.searchPlaceholder
|
|
3843
|
-
}) : l ? /* @__PURE__ */
|
|
3844
|
+
}) : l ? /* @__PURE__ */ G("span", {
|
|
3844
3845
|
role: "alert",
|
|
3845
3846
|
children: i.errorLabel
|
|
3846
|
-
}) : O.length === 0 ? /* @__PURE__ */
|
|
3847
|
+
}) : O.length === 0 ? /* @__PURE__ */ G("span", {
|
|
3847
3848
|
role: "status",
|
|
3848
3849
|
children: i.emptyLabel
|
|
3849
|
-
}) : O.map((t) => /* @__PURE__ */
|
|
3850
|
+
}) : O.map((t) => /* @__PURE__ */ G(ke, {
|
|
3850
3851
|
role: "option",
|
|
3851
3852
|
"aria-selected": t.id === e,
|
|
3852
3853
|
selected: t.id === e,
|
|
3853
|
-
label: /* @__PURE__ */
|
|
3854
|
+
label: /* @__PURE__ */ K("span", {
|
|
3854
3855
|
className: "flex min-w-0 items-center gap-2",
|
|
3855
|
-
children: [t.icon && /* @__PURE__ */
|
|
3856
|
+
children: [t.icon && /* @__PURE__ */ G("span", {
|
|
3856
3857
|
"aria-hidden": !0,
|
|
3857
3858
|
children: t.icon
|
|
3858
|
-
}), /* @__PURE__ */
|
|
3859
|
+
}), /* @__PURE__ */ K("span", {
|
|
3859
3860
|
className: "flex min-w-0 flex-col",
|
|
3860
|
-
children: [/* @__PURE__ */
|
|
3861
|
+
children: [/* @__PURE__ */ G(Te, {
|
|
3861
3862
|
text: t.label,
|
|
3862
3863
|
query: T,
|
|
3863
3864
|
maxLines: 2
|
|
3864
|
-
}), t.description && /* @__PURE__ */
|
|
3865
|
+
}), t.description && /* @__PURE__ */ G("span", { children: t.description })]
|
|
3865
3866
|
})]
|
|
3866
3867
|
}),
|
|
3867
3868
|
onClick: () => k(t.id),
|
|
3868
3869
|
className: "h-auto max-w-full py-2"
|
|
3869
3870
|
}, t.id))
|
|
3870
3871
|
}),
|
|
3871
|
-
o && /* @__PURE__ */
|
|
3872
|
+
o && /* @__PURE__ */ G(Ce, {
|
|
3872
3873
|
className: "mt-2 min-h-11 max-w-full",
|
|
3873
3874
|
label: i.browseLabel ?? "",
|
|
3874
3875
|
onClick: () => {
|
|
@@ -3876,7 +3877,7 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3876
3877
|
}
|
|
3877
3878
|
})
|
|
3878
3879
|
]
|
|
3879
|
-
}), te = /* @__PURE__ */
|
|
3880
|
+
}), te = /* @__PURE__ */ G(De, {
|
|
3880
3881
|
onFocus: (e) => {
|
|
3881
3882
|
D.current = e.currentTarget;
|
|
3882
3883
|
},
|
|
@@ -3901,11 +3902,11 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3901
3902
|
className: "cursor-pointer",
|
|
3902
3903
|
iconAfter: g
|
|
3903
3904
|
});
|
|
3904
|
-
return b ? /* @__PURE__ */
|
|
3905
|
+
return b ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("div", {
|
|
3905
3906
|
className: "w-full min-w-0",
|
|
3906
3907
|
onClick: () => w(!C),
|
|
3907
3908
|
children: te
|
|
3908
|
-
}), b(A, C, ee)] }) : /* @__PURE__ */
|
|
3909
|
+
}), b(A, C, ee)] }) : /* @__PURE__ */ G(ve, {
|
|
3909
3910
|
open: C,
|
|
3910
3911
|
onOpenChange: w,
|
|
3911
3912
|
disabled: u,
|
|
@@ -3914,12 +3915,12 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3914
3915
|
renderOverlay: () => A,
|
|
3915
3916
|
children: te
|
|
3916
3917
|
});
|
|
3917
|
-
},
|
|
3918
|
-
let [i, a] =
|
|
3919
|
-
return /* @__PURE__ */
|
|
3918
|
+
}, ni = ({ service: e, texts: t, onLogin: n, onLogout: r }) => {
|
|
3919
|
+
let [i, a] = R(!1), [s, c] = R(!1), [l, u] = R(!1), [d, f] = R(), p = e.authenticationType === y.ApiKey, m = p ? t?.deleteActionLabel ?? "Delete" : t?.logoutActionLabel ?? "Log out", h = p ? t?.deleteApiKeyConfirmMessage?.(b.User) ?? "Are you sure you want to delete your personal API key?" : t?.logoutConfirmMessage ?? "Are you sure you want to log out?";
|
|
3920
|
+
return /* @__PURE__ */ K(wn, {
|
|
3920
3921
|
label: e.name,
|
|
3921
3922
|
description: e.description,
|
|
3922
|
-
icon: /* @__PURE__ */
|
|
3923
|
+
icon: /* @__PURE__ */ G(pt, {
|
|
3923
3924
|
size: z.SM,
|
|
3924
3925
|
"aria-hidden": !0,
|
|
3925
3926
|
stroke: B
|
|
@@ -3941,8 +3942,8 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3941
3942
|
errorClassName: "dial-caption-text",
|
|
3942
3943
|
keyCardTitleClassName: "dial-tiny-semi-text",
|
|
3943
3944
|
keyCardDescriptionClassName: "dial-tiny-text",
|
|
3944
|
-
deleteActionClassName:
|
|
3945
|
-
renderLoginOptions: e.canConsentToOfflineUsage ? (e) => /* @__PURE__ */
|
|
3945
|
+
deleteActionClassName: Cn.errorText,
|
|
3946
|
+
renderLoginOptions: e.canConsentToOfflineUsage ? (e) => /* @__PURE__ */ G(me, {
|
|
3946
3947
|
isSelected: i,
|
|
3947
3948
|
onChange: a,
|
|
3948
3949
|
disabled: e,
|
|
@@ -3950,37 +3951,37 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
3950
3951
|
caption: t?.offlineUsageConsentHint
|
|
3951
3952
|
}) : void 0,
|
|
3952
3953
|
children: [
|
|
3953
|
-
e.hint && /* @__PURE__ */
|
|
3954
|
-
className: M("dial-small-text break-words",
|
|
3954
|
+
e.hint && /* @__PURE__ */ G("p", {
|
|
3955
|
+
className: M("dial-small-text break-words", Cn.description),
|
|
3955
3956
|
children: e.hint
|
|
3956
3957
|
}),
|
|
3957
|
-
e.hasSharedCredentials && /* @__PURE__ */
|
|
3958
|
-
icon: /* @__PURE__ */
|
|
3958
|
+
e.hasSharedCredentials && /* @__PURE__ */ G(gn, {
|
|
3959
|
+
icon: /* @__PURE__ */ G(Ke, {
|
|
3959
3960
|
size: z.SM,
|
|
3960
3961
|
"aria-hidden": !0,
|
|
3961
3962
|
stroke: B
|
|
3962
3963
|
}),
|
|
3963
3964
|
title: t?.sharedCredentials ?? "Shared credentials are available for this service."
|
|
3964
3965
|
}),
|
|
3965
|
-
s && /* @__PURE__ */
|
|
3966
|
+
s && /* @__PURE__ */ K("div", {
|
|
3966
3967
|
className: "flex flex-col gap-3 pt-3",
|
|
3967
3968
|
children: [
|
|
3968
|
-
/* @__PURE__ */
|
|
3969
|
-
d && /* @__PURE__ */
|
|
3969
|
+
/* @__PURE__ */ G("p", { children: h }),
|
|
3970
|
+
d && /* @__PURE__ */ G("p", {
|
|
3970
3971
|
role: "alert",
|
|
3971
|
-
className:
|
|
3972
|
+
className: Cn.errorText,
|
|
3972
3973
|
children: d
|
|
3973
3974
|
}),
|
|
3974
|
-
/* @__PURE__ */
|
|
3975
|
+
/* @__PURE__ */ K("div", {
|
|
3975
3976
|
className: "flex flex-wrap justify-end gap-2",
|
|
3976
|
-
children: [/* @__PURE__ */
|
|
3977
|
+
children: [/* @__PURE__ */ G(je, {
|
|
3977
3978
|
className: "min-h-11",
|
|
3978
3979
|
label: t?.cancelLabel ?? "Cancel",
|
|
3979
3980
|
disabled: l,
|
|
3980
3981
|
onClick: () => {
|
|
3981
3982
|
c(!1), f(void 0);
|
|
3982
3983
|
}
|
|
3983
|
-
}), /* @__PURE__ */
|
|
3984
|
+
}), /* @__PURE__ */ G(_e, {
|
|
3984
3985
|
className: "min-h-11",
|
|
3985
3986
|
label: m,
|
|
3986
3987
|
disabled: l,
|
|
@@ -4002,39 +4003,39 @@ var yt = /* @__PURE__ */ function(e) {
|
|
|
4002
4003
|
})
|
|
4003
4004
|
]
|
|
4004
4005
|
});
|
|
4005
|
-
},
|
|
4006
|
+
}, ri = ({ services: e, isLoading: t = !1, hasError: n = !1, showEmptyState: r = !1, onRetry: i, onLogin: a, onLogout: o, texts: s }) => t && !e.length ? /* @__PURE__ */ G("p", {
|
|
4006
4007
|
role: "status",
|
|
4007
4008
|
className: "px-6 py-3",
|
|
4008
4009
|
children: s?.loading ?? "Loading…"
|
|
4009
|
-
}) : n ? /* @__PURE__ */
|
|
4010
|
+
}) : n ? /* @__PURE__ */ K("div", {
|
|
4010
4011
|
className: "flex flex-col gap-2 px-6 py-3",
|
|
4011
|
-
children: [/* @__PURE__ */
|
|
4012
|
+
children: [/* @__PURE__ */ G("p", {
|
|
4012
4013
|
role: "alert",
|
|
4013
4014
|
children: s?.loadError ?? "Unable to load credentials"
|
|
4014
|
-
}), /* @__PURE__ */
|
|
4015
|
+
}), /* @__PURE__ */ G(je, {
|
|
4015
4016
|
className: "min-h-11 self-start",
|
|
4016
4017
|
label: s?.retry ?? "Retry",
|
|
4017
4018
|
onClick: i
|
|
4018
4019
|
})]
|
|
4019
|
-
}) : e.length ? /* @__PURE__ */
|
|
4020
|
+
}) : e.length ? /* @__PURE__ */ K("section", {
|
|
4020
4021
|
"aria-label": s?.title ?? "Credentials",
|
|
4021
4022
|
className: "flex min-w-0 flex-col gap-5 px-6 py-4",
|
|
4022
|
-
children: [/* @__PURE__ */
|
|
4023
|
+
children: [/* @__PURE__ */ G("h2", {
|
|
4023
4024
|
className: "dial-h3-text",
|
|
4024
4025
|
children: s?.title ?? "Credentials"
|
|
4025
|
-
}), /* @__PURE__ */
|
|
4026
|
+
}), /* @__PURE__ */ G("div", {
|
|
4026
4027
|
className: "flex min-w-0 flex-col",
|
|
4027
|
-
children: e.map((e) => /* @__PURE__ */
|
|
4028
|
+
children: e.map((e) => /* @__PURE__ */ G(ni, {
|
|
4028
4029
|
service: e,
|
|
4029
4030
|
texts: s,
|
|
4030
4031
|
onLogin: a,
|
|
4031
4032
|
onLogout: o
|
|
4032
4033
|
}, e.id))
|
|
4033
4034
|
})]
|
|
4034
|
-
}) : r ? /* @__PURE__ */
|
|
4035
|
+
}) : r ? /* @__PURE__ */ G("p", {
|
|
4035
4036
|
role: "status",
|
|
4036
4037
|
className: "px-6 py-3",
|
|
4037
4038
|
children: s?.empty ?? "No credentials required"
|
|
4038
4039
|
}) : null;
|
|
4039
4040
|
//#endregion
|
|
4040
|
-
export {
|
|
4041
|
+
export { Rt as AppIdentity, ri as ApplicationCredentials, Et as CATALOG_CLASS, Xt as Card, Qt as CardGrid, Zt as CardRowRenderer, ei as Catalog, Z as CatalogContentNodeType, Q as CatalogContentPreviewType, J as CatalogDetailsTab, St as CatalogLimitStatus, s as CatalogSortKey, Ct as CatalogViewMode, q as CodeLanguage, Wn as ContentTab, o as CredentialStatus, Bt as CredentialsBadge, e as CredentialsBadgeState, b as CredentialsLevel, n as CredentialsUiState, ti as DeploymentSelectorField, X as DeploymentSize, Y as DetailsConfirmationKind, Sr as DetailsPanel, wr as FavoriteCard, Dr as Favorites, Kr as Filter, wt as LimitRowLayout, nr as LimitsTab, Vr as ListView, Yr as Toolbar, y as ToolsetAuthenticationType, Gt as TopicTag, r as buildCatalogTabs, a as filterCatalogItems, d as getCredentialsBadgeState, c as getCredentialsUiState, t as getSignedInLevel, u as getTopicOptions, l as sortCatalogItems, Tt as useFavColumns, Ft as useScrollVirtualizer };
|