@epam/ai-dial-catalog 1.2.0-dev.336 → 1.2.0-dev.339
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/CardGrid/Card.d.ts.map +1 -1
- package/components/Details/DetailsPanel.d.ts.map +1 -1
- package/components/Details/TabsContent/Overview.d.ts +2 -0
- package/components/Details/TabsContent/Overview.d.ts.map +1 -1
- package/components/Details/TabsContent/Tools/Tools.d.ts +7 -2
- package/components/Details/TabsContent/Tools/Tools.d.ts.map +1 -1
- package/hooks/useIsVerticallyClamped/useIsVerticallyClamped.d.ts +16 -0
- package/hooks/useIsVerticallyClamped/useIsVerticallyClamped.d.ts.map +1 -0
- package/index.css +2 -2
- package/index.js +703 -622
- package/models/item-details-data.d.ts +9 -1
- package/models/item-details-data.d.ts.map +1 -1
- package/models/item-details-props.d.ts +10 -0
- package/models/item-details-props.d.ts.map +1 -1
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -17,56 +17,56 @@ var X = /* @__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
|
}({}), Ot = /* @__PURE__ */ function(e) {
|
|
19
19
|
return e.SM = "sm", e.LG = "lg", e;
|
|
20
|
-
}({}),
|
|
20
|
+
}({}), Q = /* @__PURE__ */ function(e) {
|
|
21
21
|
return e.Grid = "grid", e.Cards = "cards", e;
|
|
22
|
-
}({}),
|
|
22
|
+
}({}), kt = /* @__PURE__ */ function(e) {
|
|
23
23
|
return e.Single = "single", e.Multiple = "multiple", e;
|
|
24
|
-
}({}),
|
|
24
|
+
}({}), At = /* @__PURE__ */ function(e) {
|
|
25
25
|
return e.Inline = "inline", e.Stacked = "stacked", e;
|
|
26
|
-
}({}),
|
|
26
|
+
}({}), jt = /* @__PURE__ */ function(e) {
|
|
27
27
|
return e.File = "file", e.Folder = "folder", e;
|
|
28
|
-
}({}),
|
|
28
|
+
}({}), Mt = /* @__PURE__ */ function(e) {
|
|
29
29
|
return e.Markdown = "markdown", e.Text = "text", e.Image = "image", e.Unsupported = "unsupported", e;
|
|
30
|
-
}({}),
|
|
30
|
+
}({}), Nt = () => {
|
|
31
31
|
let [e, t] = z(() => window.innerWidth);
|
|
32
32
|
return I(() => {
|
|
33
33
|
let e = () => t(window.innerWidth);
|
|
34
34
|
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
35
35
|
}, []), e >= 1024 ? 4 : e >= 640 ? 2 : 1;
|
|
36
|
-
},
|
|
36
|
+
}, Pt = {
|
|
37
37
|
root: "dial-catalog-root",
|
|
38
38
|
toolbar: "dial-catalog-toolbar",
|
|
39
39
|
card: "dial-catalog-card",
|
|
40
40
|
favoriteCard: "dial-catalog-favorite-card",
|
|
41
41
|
listView: "dial-catalog-list-view"
|
|
42
|
-
},
|
|
42
|
+
}, Ft = (e) => ({
|
|
43
43
|
codeBlockCopyLabel: e?.copyCodeAriaLabel,
|
|
44
44
|
codeBlockCopiedLabel: e?.copiedCodeStatusLabel,
|
|
45
45
|
codeBlockDownloadLabel: e?.downloadCodeAriaLabel,
|
|
46
46
|
tableScrollRegionAriaLabel: e?.tableScrollRegionAriaLabel,
|
|
47
47
|
mathScrollRegionAriaLabel: e?.mathScrollRegionAriaLabel
|
|
48
|
-
}),
|
|
48
|
+
}), It = (e) => {
|
|
49
49
|
let { colors: t } = e ?? {};
|
|
50
50
|
return ie({
|
|
51
51
|
"--cat-bg": t?.background,
|
|
52
52
|
"--cat-heading-title-text": t?.headingTitleText
|
|
53
53
|
});
|
|
54
|
-
},
|
|
54
|
+
}, Lt = 1180, Rt = (e) => e >= 1280 ? 4 : e >= 966 ? 3 : e >= 620 ? 2 : 1, zt = (e) => {
|
|
55
55
|
if (!e || e === document.body) return document.documentElement;
|
|
56
56
|
let { overflow: t, overflowY: n } = getComputedStyle(e);
|
|
57
|
-
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e :
|
|
58
|
-
},
|
|
57
|
+
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : zt(e.parentElement);
|
|
58
|
+
}, Bt = 10, Vt = 10, Ht = 30, Ut = (e, t, n = Bt) => {
|
|
59
59
|
let r = R(null), [i, a] = z({
|
|
60
60
|
start: 0,
|
|
61
|
-
end:
|
|
61
|
+
end: Ht
|
|
62
62
|
});
|
|
63
63
|
I(() => {
|
|
64
64
|
let i = r.current;
|
|
65
65
|
if (!i) return;
|
|
66
|
-
let o =
|
|
66
|
+
let o = zt(i.parentElement), s = () => {
|
|
67
67
|
let r = o.clientHeight;
|
|
68
68
|
if (r === 0 || i.clientWidth === 0 || getComputedStyle(i).visibility === "hidden") return;
|
|
69
|
-
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) /
|
|
69
|
+
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) / Vt) * Vt), p = Math.min(e, Math.ceil((u + d + n) / Vt) * Vt);
|
|
70
70
|
a((e) => e.start === f && e.end === p ? e : {
|
|
71
71
|
start: f,
|
|
72
72
|
end: p
|
|
@@ -82,15 +82,15 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
82
82
|
t,
|
|
83
83
|
n
|
|
84
84
|
]);
|
|
85
|
-
let o = Math.max(0, Math.floor((e - 1) /
|
|
85
|
+
let o = Math.max(0, Math.floor((e - 1) / Vt) * Vt), s = Math.min(i.start, o);
|
|
86
86
|
return {
|
|
87
87
|
containerRef: r,
|
|
88
88
|
startRow: s,
|
|
89
|
-
endRow: Math.min(e, Math.max(i.end, s +
|
|
89
|
+
endRow: Math.min(e, Math.max(i.end, s + Vt))
|
|
90
90
|
};
|
|
91
|
-
},
|
|
91
|
+
}, Wt = (e, { overscan: t = 3, isFullWidth: n = !1 } = {}) => {
|
|
92
92
|
let r = R(null), [i, a] = z(() => {
|
|
93
|
-
let t = typeof window < "u" ? window.innerWidth : 1440, r = Math.max(0, t - (t >= D ? 60 : 0)), i =
|
|
93
|
+
let t = typeof window < "u" ? window.innerWidth : 1440, r = Math.max(0, t - (t >= D ? 60 : 0)), i = Rt((n ? r : Math.min(Lt, r)) - 64), a = Math.ceil(e / i);
|
|
94
94
|
return {
|
|
95
95
|
startRow: 0,
|
|
96
96
|
endRow: Math.min(a, 12),
|
|
@@ -100,10 +100,10 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
100
100
|
I(() => {
|
|
101
101
|
let n = r.current;
|
|
102
102
|
if (!n) return;
|
|
103
|
-
let i =
|
|
103
|
+
let i = zt(n.parentElement), o = () => {
|
|
104
104
|
let r = n.clientWidth, o = i.clientHeight;
|
|
105
105
|
if (r === 0 || o === 0) return;
|
|
106
|
-
let s = n.getBoundingClientRect(), c = i.getBoundingClientRect(), l =
|
|
106
|
+
let s = n.getBoundingClientRect(), c = i.getBoundingClientRect(), l = Rt(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);
|
|
107
107
|
a((e) => e.startRow === f && e.endRow === p && e.columnCount === l ? e : {
|
|
108
108
|
startRow: f,
|
|
109
109
|
endRow: p,
|
|
@@ -125,7 +125,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
125
125
|
rowCount: o,
|
|
126
126
|
totalHeight: o * 268
|
|
127
127
|
};
|
|
128
|
-
},
|
|
128
|
+
}, Gt = {
|
|
129
129
|
skeletonColor: "var(--cg-skeleton-color, var(--bg-control-disable-primary, #dce0e8))",
|
|
130
130
|
card: "_card_18c2b_2",
|
|
131
131
|
emptyStarHidden: "_emptyStarHidden_18c2b_2",
|
|
@@ -135,11 +135,26 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
135
135
|
selectedCard: "_selectedCard_18c2b_37",
|
|
136
136
|
checkIcon: "_checkIcon_18c2b_42",
|
|
137
137
|
footer: "_footer_18c2b_46"
|
|
138
|
-
}, qt = {
|
|
138
|
+
}, Kt = 1, qt = (e) => {
|
|
139
|
+
let t = R(null), [n, r] = z(!1), i = F(() => {
|
|
140
|
+
let e = t.current;
|
|
141
|
+
e && r(e.scrollHeight - e.clientHeight > Kt);
|
|
142
|
+
}, []);
|
|
143
|
+
return fe(() => {
|
|
144
|
+
i();
|
|
145
|
+
let e = t.current;
|
|
146
|
+
if (!e || typeof ResizeObserver > "u") return;
|
|
147
|
+
let n = new ResizeObserver(i);
|
|
148
|
+
return n.observe(e), () => n.disconnect();
|
|
149
|
+
}, [i, e]), {
|
|
150
|
+
ref: t,
|
|
151
|
+
isClamped: n
|
|
152
|
+
};
|
|
153
|
+
}, Jt = {
|
|
139
154
|
name: "_name_188yo_1",
|
|
140
155
|
lastUsed: "_lastUsed_188yo_5",
|
|
141
156
|
version: "_version_188yo_9"
|
|
142
|
-
},
|
|
157
|
+
}, Yt = ({ icon: e, type: t, name: n, version: r, lastUsed: i, size: a, query: o, className: s, styles: c, lastUsedTrailing: l, iconClassName: u, iconOverlay: d }) => {
|
|
143
158
|
let f = c?.colors, p = c?.typography ?? {}, m = a === Ot.LG, h = m ? "size-[52px] rounded-[14px]" : "size-[44px] rounded-lg", g = m ? 54 : 44, _ = ie({
|
|
144
159
|
"--ai-name-text": f?.nameColor,
|
|
145
160
|
"--ai-last-used-text": f?.lastUsedColor,
|
|
@@ -173,22 +188,22 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
173
188
|
text: n,
|
|
174
189
|
query: o
|
|
175
190
|
}) : n,
|
|
176
|
-
className: P("min-w-0 flex-1", p?.nameClassName ?? "dial-body-semi-text",
|
|
191
|
+
className: P("min-w-0 flex-1", p?.nameClassName ?? "dial-body-semi-text", Jt.name)
|
|
177
192
|
}), r && /* @__PURE__ */ J(Te, {
|
|
178
193
|
text: r,
|
|
179
|
-
className: P("min-w-0 text-end tabular-nums", p?.versionClassName ?? "dial-tiny-text",
|
|
194
|
+
className: P("min-w-0 text-end tabular-nums", p?.versionClassName ?? "dial-tiny-text", Jt.version)
|
|
180
195
|
})]
|
|
181
196
|
}), m && i != null && /* @__PURE__ */ Y("div", {
|
|
182
197
|
className: "flex items-center gap-2",
|
|
183
198
|
children: [/* @__PURE__ */ J("span", {
|
|
184
|
-
className: P("tabular-nums", p?.lastUsedClassName ?? "dial-tiny-text",
|
|
199
|
+
className: P("tabular-nums", p?.lastUsedClassName ?? "dial-tiny-text", Jt.lastUsed),
|
|
185
200
|
children: i
|
|
186
201
|
}), l]
|
|
187
202
|
})]
|
|
188
203
|
})]
|
|
189
204
|
})]
|
|
190
205
|
});
|
|
191
|
-
},
|
|
206
|
+
}, Xt = { icon: "_icon_a0p4u_1" }, Zt = ({ credentials: e, loggedOutLabel: t = "Authorize to use this toolset.", className: n, colors: r }) => e == null || p(e) == null ? null : /* @__PURE__ */ J(G, {
|
|
192
207
|
tooltip: t,
|
|
193
208
|
asChild: !0,
|
|
194
209
|
children: /* @__PURE__ */ J("span", {
|
|
@@ -201,14 +216,14 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
201
216
|
className: P("absolute -bottom-1 -end-1 shrink-0", n),
|
|
202
217
|
children: /* @__PURE__ */ J(qe, {
|
|
203
218
|
size: B.SM,
|
|
204
|
-
className:
|
|
219
|
+
className: Xt.icon,
|
|
205
220
|
"aria-hidden": !0
|
|
206
221
|
})
|
|
207
222
|
})
|
|
208
|
-
}),
|
|
223
|
+
}), Qt = {
|
|
209
224
|
starFilledIcon: "_starFilledIcon_po6zj_1",
|
|
210
225
|
starPop: "_starPop_po6zj_1"
|
|
211
|
-
},
|
|
226
|
+
}, $t = ({ isStarred: e, onClick: t, size: n, ariaLabel: r = "Toggle favorite", className: i, starFilledColor: a }) => /* @__PURE__ */ J(Ke, {
|
|
212
227
|
size: n,
|
|
213
228
|
style: ie({ "--cat-star-filled": a }),
|
|
214
229
|
className: i,
|
|
@@ -220,12 +235,12 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
220
235
|
}),
|
|
221
236
|
selectedIcon: /* @__PURE__ */ J(mt, {
|
|
222
237
|
size: B.SM,
|
|
223
|
-
className:
|
|
238
|
+
className: Qt.starFilledIcon,
|
|
224
239
|
"aria-hidden": !0
|
|
225
240
|
}),
|
|
226
241
|
"aria-label": r,
|
|
227
242
|
onClick: t
|
|
228
|
-
}),
|
|
243
|
+
}), en = { tag: "_tag_iqin5_3" }, tn = ({ label: e, className: t, badgeClassName: n = "dial-tiny-text", colors: r }) => /* @__PURE__ */ J(pe, {
|
|
229
244
|
label: e,
|
|
230
245
|
textClassName: n,
|
|
231
246
|
style: ie({
|
|
@@ -233,12 +248,12 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
233
248
|
"--cat-card-tag-text": r?.text,
|
|
234
249
|
"--cat-card-tag-border": r?.border
|
|
235
250
|
}),
|
|
236
|
-
className: P(
|
|
237
|
-
}),
|
|
251
|
+
className: P(en.tag, t)
|
|
252
|
+
}), nn = ({ label: e, className: t = "dial-tiny-text", colors: n }) => /* @__PURE__ */ J(tn, {
|
|
238
253
|
label: e,
|
|
239
254
|
badgeClassName: t,
|
|
240
255
|
colors: n
|
|
241
|
-
}),
|
|
256
|
+
}), rn = 8, an = ({ topics: e, overflowAriaLabel: t, className: n }) => {
|
|
242
257
|
let r = R(null), i = R([]), a = R([]), o = R(null), s = R(Infinity), [c, l] = z(e.length), u = e.join("\0"), d = F(() => {
|
|
243
258
|
let t = r.current;
|
|
244
259
|
if (!t || e.length === 0) return;
|
|
@@ -250,8 +265,8 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
250
265
|
let u = o.current?.offsetWidth ?? 0, d = 0, f = 0;
|
|
251
266
|
for (let t = 0; t < e.length; t++) {
|
|
252
267
|
let r = e.length - (t + 1) > 0;
|
|
253
|
-
if (d + (t > 0 ?
|
|
254
|
-
d += (t > 0 ?
|
|
268
|
+
if (d + (t > 0 ? rn : 0) + c[t] + (r ? rn + u : 0) > n) break;
|
|
269
|
+
d += (t > 0 ? rn : 0) + c[t], f = t + 1;
|
|
255
270
|
}
|
|
256
271
|
l(Math.min(f, s.current));
|
|
257
272
|
}, [e.length]);
|
|
@@ -282,39 +297,59 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
282
297
|
ref: (e) => {
|
|
283
298
|
i.current[t] = e;
|
|
284
299
|
},
|
|
285
|
-
children: /* @__PURE__ */ J(
|
|
300
|
+
children: /* @__PURE__ */ J(nn, { label: e })
|
|
286
301
|
}, e)),
|
|
287
302
|
f > 0 && /* @__PURE__ */ J(G, {
|
|
288
303
|
tooltip: e.slice(c).join(", "),
|
|
289
304
|
children: /* @__PURE__ */ J("span", {
|
|
290
305
|
"aria-label": t?.(f) ?? `and ${f} more topics`,
|
|
291
|
-
children: /* @__PURE__ */ J(
|
|
306
|
+
children: /* @__PURE__ */ J(nn, { label: `+${f}` })
|
|
292
307
|
})
|
|
293
308
|
}),
|
|
294
309
|
/* @__PURE__ */ J("div", {
|
|
295
310
|
ref: o,
|
|
296
311
|
"aria-hidden": !0,
|
|
297
312
|
className: "invisible absolute start-0 top-0",
|
|
298
|
-
children: /* @__PURE__ */ J(
|
|
313
|
+
children: /* @__PURE__ */ J(nn, { label: `+${e.length}` })
|
|
299
314
|
})
|
|
300
315
|
]
|
|
301
316
|
});
|
|
302
|
-
},
|
|
317
|
+
}, on = { img: () => null }, sn = "dial-small-text", cn = {
|
|
318
|
+
p: sn,
|
|
319
|
+
ul: sn,
|
|
320
|
+
ol: sn,
|
|
321
|
+
h1: sn,
|
|
322
|
+
h2: sn,
|
|
323
|
+
h3: sn,
|
|
324
|
+
h4: sn,
|
|
325
|
+
h5: sn,
|
|
326
|
+
h6: sn,
|
|
327
|
+
strong: "dial-small-semi-text"
|
|
328
|
+
}, ln = {
|
|
329
|
+
img: () => null,
|
|
330
|
+
a: ({ children: e }) => /* @__PURE__ */ J("span", { children: e })
|
|
331
|
+
}, un = {
|
|
332
|
+
blockquoteText: "currentColor",
|
|
333
|
+
tableHeaderText: "currentColor",
|
|
334
|
+
headingSixText: "currentColor",
|
|
335
|
+
inlineCodeBackground: "transparent",
|
|
336
|
+
inlineCodeText: "currentColor"
|
|
337
|
+
}, dn = (e) => e.target instanceof Element && e.target.closest("a") !== null, fn = ({ 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, markdownLabels: m }) => {
|
|
303
338
|
let [h, g] = z(r);
|
|
304
339
|
I(() => {
|
|
305
340
|
g(r);
|
|
306
341
|
}, [e.id, r]);
|
|
307
|
-
let _ = d?.typography?.descriptionClassName ?? "dial-small-paragraph-text",
|
|
342
|
+
let { ref: _, isClamped: v } = qt(e.description), y = d?.typography?.descriptionClassName ?? "dial-small-paragraph-text", b = d?.typography?.featuredChipClassName, x = d?.typography?.folderLabelClassName ?? "dial-tiny-text", S = d?.typography?.folderLeafClassName ?? "dial-tiny-semi-text", C = ie({
|
|
308
343
|
"--cg-description-text": d?.colors?.textSecondary,
|
|
309
344
|
"--cg-selected-border": d?.colors?.selectedBorder,
|
|
310
345
|
"--cg-selected-bg": d?.colors?.selectedBackground,
|
|
311
346
|
"--cg-check-icon": d?.colors?.checkIcon,
|
|
312
347
|
"--cg-footer-border": d?.colors?.footerBorder
|
|
313
|
-
}),
|
|
314
|
-
|
|
315
|
-
} : void 0,
|
|
316
|
-
!n ||
|
|
317
|
-
}, [n, e]),
|
|
348
|
+
}), w = !p && e.isFeatured === !0, T = !p && a?.(e) !== !1, E = !p || e.folder.length > 0, D = n ? (t) => {
|
|
349
|
+
dn(t) || n(e);
|
|
350
|
+
} : void 0, O = F((t) => {
|
|
351
|
+
!n || dn(t) || (t.key === "Enter" || t.key === " ") && (t.preventDefault(), n(e));
|
|
352
|
+
}, [n, e]), k = F((t) => {
|
|
318
353
|
t.stopPropagation();
|
|
319
354
|
let n = !h;
|
|
320
355
|
g(n), i?.(e.id, n);
|
|
@@ -327,87 +362,100 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
327
362
|
...n ? {
|
|
328
363
|
role: "button",
|
|
329
364
|
tabIndex: 0,
|
|
330
|
-
onClick:
|
|
331
|
-
onKeyDown:
|
|
365
|
+
onClick: D,
|
|
366
|
+
onKeyDown: O
|
|
332
367
|
} : {},
|
|
333
368
|
"aria-label": e.name,
|
|
334
|
-
style:
|
|
335
|
-
className: P("box-border cursor-pointer gap-3",
|
|
369
|
+
style: C,
|
|
370
|
+
className: P("box-border cursor-pointer gap-3", Gt.card, w ? Gt.featuredCard : void 0, l ? Gt.selectedCard : void 0, u, Pt.card),
|
|
336
371
|
children: [
|
|
337
|
-
|
|
372
|
+
w && /* @__PURE__ */ J("div", {
|
|
338
373
|
className: "absolute end-[22px] top-0 -translate-y-1/2",
|
|
339
374
|
children: /* @__PURE__ */ J(A, {
|
|
340
375
|
label: o,
|
|
341
376
|
type: e.type,
|
|
342
|
-
className:
|
|
377
|
+
className: b,
|
|
343
378
|
style: d?.colors?.featuredChipStyle
|
|
344
379
|
})
|
|
345
380
|
}),
|
|
346
381
|
l && /* @__PURE__ */ J(Xe, {
|
|
347
382
|
size: B.SM,
|
|
348
|
-
className: P("absolute end-3 top-3 shrink-0",
|
|
383
|
+
className: P("absolute end-3 top-3 shrink-0", Gt.checkIcon),
|
|
349
384
|
"aria-hidden": !0,
|
|
350
385
|
stroke: V
|
|
351
386
|
}),
|
|
352
|
-
/* @__PURE__ */ J(
|
|
387
|
+
/* @__PURE__ */ J(Yt, {
|
|
353
388
|
icon: e.iconUrl,
|
|
354
389
|
type: e.type,
|
|
355
390
|
name: e.name,
|
|
356
391
|
version: e.version,
|
|
357
392
|
size: Ot.SM,
|
|
358
393
|
query: t,
|
|
359
|
-
iconClassName:
|
|
360
|
-
iconOverlay: /* @__PURE__ */ J(
|
|
394
|
+
iconClassName: Gt.cardIcon,
|
|
395
|
+
iconOverlay: /* @__PURE__ */ J(Zt, {
|
|
361
396
|
credentials: e.credentials,
|
|
362
397
|
loggedOutLabel: f
|
|
363
398
|
})
|
|
364
399
|
}),
|
|
365
|
-
/* @__PURE__ */ J(
|
|
366
|
-
|
|
367
|
-
|
|
400
|
+
/* @__PURE__ */ J(G, {
|
|
401
|
+
asChild: !0,
|
|
402
|
+
hideTooltip: !v,
|
|
403
|
+
contentClassName: "whitespace-normal",
|
|
404
|
+
tooltip: e.description && /* @__PURE__ */ J(ne, {
|
|
368
405
|
content: e.description,
|
|
369
|
-
classNames:
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
ol: _,
|
|
373
|
-
h1: _,
|
|
374
|
-
h2: _,
|
|
375
|
-
h3: _,
|
|
376
|
-
h4: _,
|
|
377
|
-
h5: _,
|
|
378
|
-
h6: _
|
|
379
|
-
},
|
|
380
|
-
components: an,
|
|
406
|
+
classNames: cn,
|
|
407
|
+
colors: un,
|
|
408
|
+
components: ln,
|
|
381
409
|
...m
|
|
410
|
+
}),
|
|
411
|
+
children: /* @__PURE__ */ J("div", {
|
|
412
|
+
ref: _,
|
|
413
|
+
className: P("line-clamp-2 min-h-[2lh] break-words", Gt.description),
|
|
414
|
+
children: e.description && /* @__PURE__ */ J(ne, {
|
|
415
|
+
content: e.description,
|
|
416
|
+
classNames: {
|
|
417
|
+
p: y,
|
|
418
|
+
ul: y,
|
|
419
|
+
ol: y,
|
|
420
|
+
h1: y,
|
|
421
|
+
h2: y,
|
|
422
|
+
h3: y,
|
|
423
|
+
h4: y,
|
|
424
|
+
h5: y,
|
|
425
|
+
h6: y
|
|
426
|
+
},
|
|
427
|
+
components: on,
|
|
428
|
+
...m
|
|
429
|
+
})
|
|
382
430
|
})
|
|
383
431
|
}),
|
|
384
432
|
/* @__PURE__ */ J("div", {
|
|
385
433
|
className: "mt-auto flex items-center gap-2",
|
|
386
|
-
children: /* @__PURE__ */ J(
|
|
434
|
+
children: /* @__PURE__ */ J(an, { topics: e.topics })
|
|
387
435
|
}),
|
|
388
|
-
|
|
389
|
-
className: P("pt-3", !p && P("border-t",
|
|
436
|
+
E && /* @__PURE__ */ J("div", {
|
|
437
|
+
className: P("pt-3", !p && P("border-t", Gt.footer)),
|
|
390
438
|
children: /* @__PURE__ */ Y("div", {
|
|
391
439
|
className: "flex items-center gap-2",
|
|
392
440
|
children: [/* @__PURE__ */ J("div", {
|
|
393
441
|
className: "min-w-0 flex-1",
|
|
394
442
|
children: e.folder.length > 0 && /* @__PURE__ */ J(Ee, {
|
|
395
443
|
segments: e.folder,
|
|
396
|
-
labelClassName:
|
|
397
|
-
leafClassName:
|
|
444
|
+
labelClassName: x,
|
|
445
|
+
leafClassName: S
|
|
398
446
|
})
|
|
399
|
-
}),
|
|
447
|
+
}), T && /* @__PURE__ */ J($t, {
|
|
400
448
|
isStarred: h,
|
|
401
449
|
size: H.Small,
|
|
402
|
-
onClick:
|
|
450
|
+
onClick: k,
|
|
403
451
|
ariaLabel: h ? c : s,
|
|
404
|
-
className: P(
|
|
452
|
+
className: P(Gt.starBtn, !h && Gt.emptyStarHidden)
|
|
405
453
|
})]
|
|
406
454
|
})
|
|
407
455
|
})
|
|
408
456
|
]
|
|
409
457
|
});
|
|
410
|
-
},
|
|
458
|
+
}, pn = ce(({ 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, markdownLabels: m }) => {
|
|
411
459
|
let h = e * n, g = t.slice(h, h + n);
|
|
412
460
|
return /* @__PURE__ */ J("div", {
|
|
413
461
|
style: {
|
|
@@ -419,7 +467,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
419
467
|
let n = g[t];
|
|
420
468
|
return /* @__PURE__ */ J("div", {
|
|
421
469
|
className: "h-full min-w-0 flex-1",
|
|
422
|
-
children: n && /* @__PURE__ */ J(
|
|
470
|
+
children: n && /* @__PURE__ */ J(fn, {
|
|
423
471
|
item: n,
|
|
424
472
|
query: r,
|
|
425
473
|
initialIsStarred: n.isStarred,
|
|
@@ -439,8 +487,8 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
439
487
|
}, n?.id ?? `spacer-${t}`);
|
|
440
488
|
})
|
|
441
489
|
});
|
|
442
|
-
}),
|
|
443
|
-
let m = a?.noResultsTitle ?? "No results", h = a?.featuredLabel ?? "Featured", g = a?.addToFavoritesAriaLabel ?? "Add to favorites", _ = a?.removeFromFavoritesAriaLabel ?? "Remove from favorites", v = a?.credentialsBadgeLoggedOutLabel ?? "Authorize to use this toolset.", { containerRef: y, startRow: b, endRow: x, columnCount: S, totalHeight: C } =
|
|
490
|
+
}), mn = ce(({ items: e, query: t = "", onToggleFavorite: n, isFavoriteVisible: r, onItemClick: i, titles: a, isLoading: o, selectedItemId: s, skeletonColor: c = Gt.skeletonColor, skeletonCardBackground: l, isReadonly: u = !1, isFullWidth: d = !1, featuredChipStyle: f, markdownLabels: p }) => {
|
|
491
|
+
let m = a?.noResultsTitle ?? "No results", h = a?.featuredLabel ?? "Featured", g = a?.addToFavoritesAriaLabel ?? "Add to favorites", _ = a?.removeFromFavoritesAriaLabel ?? "Remove from favorites", v = a?.credentialsBadgeLoggedOutLabel ?? "Authorize to use this toolset.", { containerRef: y, startRow: b, endRow: x, columnCount: S, totalHeight: C } = Wt(e.length, { isFullWidth: d }), w = L(() => ({
|
|
444
492
|
items: e,
|
|
445
493
|
columnCount: S,
|
|
446
494
|
query: t,
|
|
@@ -478,7 +526,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
478
526
|
...ie({ "--cg-skeleton-card-bg": l })
|
|
479
527
|
},
|
|
480
528
|
children: Array.from({ length: S * 3 }, (e, t) => /* @__PURE__ */ J("div", {
|
|
481
|
-
className: P("rounded-md border p-4",
|
|
529
|
+
className: P("rounded-md border p-4", Gt.skeletonCard),
|
|
482
530
|
style: { height: 248 },
|
|
483
531
|
children: /* @__PURE__ */ J(He, {
|
|
484
532
|
avatar: {
|
|
@@ -500,26 +548,26 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
500
548
|
style: { height: C },
|
|
501
549
|
children: Array.from({ length: x - b }, (e, t) => {
|
|
502
550
|
let n = b + t;
|
|
503
|
-
return /* @__PURE__ */ J(
|
|
551
|
+
return /* @__PURE__ */ J(pn, {
|
|
504
552
|
rowIndex: n,
|
|
505
553
|
...w
|
|
506
554
|
}, n);
|
|
507
555
|
})
|
|
508
556
|
});
|
|
509
|
-
}),
|
|
557
|
+
}), hn = (e) => e.reduce((e, t) => t.type === jt.File ? e + 1 : e + hn(t.items), 0), gn = (e) => {
|
|
510
558
|
let t = /* @__PURE__ */ new Set(), n = (e) => {
|
|
511
|
-
for (let r of e) r.type ===
|
|
559
|
+
for (let r of e) r.type === jt.Folder && (t.add(r.id), n(r.items));
|
|
512
560
|
};
|
|
513
561
|
return n(e), t;
|
|
514
|
-
},
|
|
562
|
+
}, _n = (e, t) => {
|
|
515
563
|
if (t != null) for (let n of e) {
|
|
516
564
|
if (n.id === t) return n.name;
|
|
517
|
-
if (n.type ===
|
|
518
|
-
let e =
|
|
565
|
+
if (n.type === jt.Folder) {
|
|
566
|
+
let e = _n(n.items, t);
|
|
519
567
|
if (e != null) return e;
|
|
520
568
|
}
|
|
521
569
|
}
|
|
522
|
-
},
|
|
570
|
+
}, vn = {
|
|
523
571
|
sectionHeading: "_sectionHeading_jnq93_1",
|
|
524
572
|
rowAlt: "_rowAlt_jnq93_5",
|
|
525
573
|
label: "_label_jnq93_9",
|
|
@@ -527,19 +575,19 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
527
575
|
valueTrue: "_valueTrue_jnq93_17",
|
|
528
576
|
valueFalse: "_valueFalse_jnq93_21",
|
|
529
577
|
valueText: "_valueText_jnq93_25"
|
|
530
|
-
},
|
|
578
|
+
}, yn = ({ value: e, valueClassName: t, valueTrueClassName: n, checkIconClassName: r, yesLabel: i, noLabel: a }) => e === !0 ? /* @__PURE__ */ Y(bt, { children: [/* @__PURE__ */ J(et, {
|
|
531
579
|
size: B.MD,
|
|
532
|
-
className: P(r,
|
|
580
|
+
className: P(r, vn.checkIcon)
|
|
533
581
|
}), /* @__PURE__ */ J("span", {
|
|
534
|
-
className: P(n,
|
|
582
|
+
className: P(n, vn.valueTrue),
|
|
535
583
|
children: i
|
|
536
584
|
})] }) : e === !1 ? /* @__PURE__ */ J("span", {
|
|
537
|
-
className: P(t,
|
|
585
|
+
className: P(t, vn.valueFalse),
|
|
538
586
|
children: a
|
|
539
587
|
}) : /* @__PURE__ */ J("span", {
|
|
540
|
-
className: P("min-w-0 break-words", t,
|
|
588
|
+
className: P("min-w-0 break-words", t, vn.valueText),
|
|
541
589
|
children: e
|
|
542
|
-
}),
|
|
590
|
+
}), bn = ({ 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__ */ J("div", {
|
|
543
591
|
className: "flex flex-col",
|
|
544
592
|
style: ie({
|
|
545
593
|
"--tv-section-heading": l?.sectionHeading,
|
|
@@ -551,18 +599,18 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
551
599
|
"--tv-value-text": l?.valueText
|
|
552
600
|
}),
|
|
553
601
|
children: t != null && t.length > 0 && /* @__PURE__ */ Y("section", { children: [/* @__PURE__ */ J("p", {
|
|
554
|
-
className: P("mb-3 mt-0", o,
|
|
602
|
+
className: P("mb-3 mt-0", o, vn.sectionHeading),
|
|
555
603
|
children: e
|
|
556
604
|
}), /* @__PURE__ */ J("ul", {
|
|
557
605
|
className: "m-0 list-none p-0",
|
|
558
606
|
children: t.map((e, t) => /* @__PURE__ */ Y("li", {
|
|
559
|
-
className: P("flex items-center rounded px-3 py-2", t % 2 == 0 ?
|
|
607
|
+
className: P("flex items-center rounded px-3 py-2", t % 2 == 0 ? vn.rowAlt : void 0),
|
|
560
608
|
children: [/* @__PURE__ */ J("span", {
|
|
561
|
-
className: P(n,
|
|
609
|
+
className: P(n, vn.label, "w-2/5 shrink-0"),
|
|
562
610
|
children: e.label
|
|
563
611
|
}), /* @__PURE__ */ J("div", {
|
|
564
612
|
className: "flex w-3/5 min-w-0 items-center gap-1",
|
|
565
|
-
children: /* @__PURE__ */ J(
|
|
613
|
+
children: /* @__PURE__ */ J(yn, {
|
|
566
614
|
value: e.value,
|
|
567
615
|
valueClassName: r,
|
|
568
616
|
valueTrueClassName: i,
|
|
@@ -573,30 +621,30 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
573
621
|
})]
|
|
574
622
|
}, e.label))
|
|
575
623
|
})] })
|
|
576
|
-
}),
|
|
624
|
+
}), xn = { sectionHeading: "_sectionHeading_148lj_1" }, Sn = {
|
|
577
625
|
[X.Python]: "Python",
|
|
578
626
|
[X.Curl]: "cURL",
|
|
579
627
|
[X.JavaScript]: "JavaScript"
|
|
580
|
-
},
|
|
628
|
+
}, Cn = {
|
|
581
629
|
[X.Python]: "python",
|
|
582
630
|
[X.Curl]: "bash",
|
|
583
631
|
[X.JavaScript]: "javascript"
|
|
584
|
-
},
|
|
632
|
+
}, wn = ({ 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" }) => {
|
|
585
633
|
let [s, c] = z(e[0]?.language ?? X.Python);
|
|
586
634
|
I(() => {
|
|
587
635
|
c(e[0]?.language ?? X.Python);
|
|
588
636
|
}, [e]);
|
|
589
637
|
let l = L(() => e.map((e) => ({
|
|
590
638
|
key: e.language,
|
|
591
|
-
label:
|
|
639
|
+
label: Sn[e.language] ?? e.language,
|
|
592
640
|
onClick: () => c(e.language)
|
|
593
641
|
})), [e]), u = e.find((e) => e.language === s)?.code ?? "", d = e.length > 1;
|
|
594
642
|
return /* @__PURE__ */ Y("section", { children: [t != null && /* @__PURE__ */ J("p", {
|
|
595
|
-
className: P("mb-3 mt-0", o,
|
|
643
|
+
className: P("mb-3 mt-0", o, xn.sectionHeading),
|
|
596
644
|
children: t
|
|
597
645
|
}), /* @__PURE__ */ J(j, {
|
|
598
|
-
language:
|
|
599
|
-
title:
|
|
646
|
+
language: Cn[s] ?? s,
|
|
647
|
+
title: Sn[s] ?? s,
|
|
600
648
|
value: u,
|
|
601
649
|
copyLabel: n,
|
|
602
650
|
copiedLabel: r,
|
|
@@ -611,7 +659,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
611
659
|
selectedKey: s
|
|
612
660
|
}) : void 0
|
|
613
661
|
})] });
|
|
614
|
-
},
|
|
662
|
+
}, Tn = ({ 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" }) => {
|
|
615
663
|
let [h, g] = z(0), _ = L(() => e.endpoints ?? [], [e.endpoints]), v = _.length > 0, y = _[h] ?? null, b = L(() => _.map((e, t) => ({
|
|
616
664
|
key: e.url,
|
|
617
665
|
label: e.label,
|
|
@@ -625,7 +673,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
625
673
|
return /* @__PURE__ */ Y("div", {
|
|
626
674
|
className: "flex flex-col gap-6",
|
|
627
675
|
children: [
|
|
628
|
-
C && /* @__PURE__ */ J(
|
|
676
|
+
C && /* @__PURE__ */ J(bn, {
|
|
629
677
|
sectionLabel: t,
|
|
630
678
|
values: x,
|
|
631
679
|
labelClassName: u,
|
|
@@ -643,7 +691,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
643
691
|
}),
|
|
644
692
|
v && /* @__PURE__ */ Y("section", { children: [
|
|
645
693
|
/* @__PURE__ */ J("p", {
|
|
646
|
-
className: P("mb-3 mt-0", m,
|
|
694
|
+
className: P("mb-3 mt-0", m, xn.sectionHeading),
|
|
647
695
|
children: n
|
|
648
696
|
}),
|
|
649
697
|
y != null && /* @__PURE__ */ J(j, {
|
|
@@ -664,7 +712,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
664
712
|
}, h),
|
|
665
713
|
y?.snippets != null && y.snippets.length > 0 && /* @__PURE__ */ J("div", {
|
|
666
714
|
className: "mt-4",
|
|
667
|
-
children: /* @__PURE__ */ J(
|
|
715
|
+
children: /* @__PURE__ */ J(wn, {
|
|
668
716
|
snippets: y.snippets,
|
|
669
717
|
copyAriaLabel: c,
|
|
670
718
|
copiedStatusLabel: l,
|
|
@@ -674,7 +722,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
674
722
|
}, h)
|
|
675
723
|
})
|
|
676
724
|
] }),
|
|
677
|
-
!v && T && /* @__PURE__ */ J(
|
|
725
|
+
!v && T && /* @__PURE__ */ J(wn, {
|
|
678
726
|
snippets: e.snippets ?? [],
|
|
679
727
|
sectionLabel: r,
|
|
680
728
|
copyAriaLabel: c,
|
|
@@ -684,7 +732,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
684
732
|
sectionClassName: m
|
|
685
733
|
}),
|
|
686
734
|
E && /* @__PURE__ */ Y("section", { children: [/* @__PURE__ */ J("p", {
|
|
687
|
-
className: P("mb-3 mt-0", m,
|
|
735
|
+
className: P("mb-3 mt-0", m, xn.sectionHeading),
|
|
688
736
|
children: o
|
|
689
737
|
}), /* @__PURE__ */ J(j, {
|
|
690
738
|
language: "bash",
|
|
@@ -695,7 +743,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
695
743
|
hideDownload: !0
|
|
696
744
|
})] }),
|
|
697
745
|
D && /* @__PURE__ */ Y("section", { children: [/* @__PURE__ */ J("p", {
|
|
698
|
-
className: P("mb-3 mt-0", m,
|
|
746
|
+
className: P("mb-3 mt-0", m, xn.sectionHeading),
|
|
699
747
|
children: s
|
|
700
748
|
}), /* @__PURE__ */ J(j, {
|
|
701
749
|
language: "json",
|
|
@@ -707,26 +755,26 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
707
755
|
})] })
|
|
708
756
|
]
|
|
709
757
|
});
|
|
710
|
-
},
|
|
758
|
+
}, En = {
|
|
711
759
|
sunkenBox: "_sunkenBox_1lqi3_1",
|
|
712
760
|
raisedBox: "_raisedBox_1lqi3_5",
|
|
713
761
|
activeIcon: "_activeIcon_1lqi3_9"
|
|
714
|
-
},
|
|
762
|
+
}, Dn = /* @__PURE__ */ function(e) {
|
|
715
763
|
return e.Sunken = "sunken", e.Raised = "raised", e;
|
|
716
|
-
}({}),
|
|
717
|
-
sunken:
|
|
718
|
-
raised:
|
|
719
|
-
},
|
|
764
|
+
}({}), On = {
|
|
765
|
+
sunken: En.sunkenBox,
|
|
766
|
+
raised: En.raisedBox
|
|
767
|
+
}, kn = ({ icon: e, isActive: t = !1, surface: n = "sunken", statusLabel: r }) => /* @__PURE__ */ Y("span", {
|
|
720
768
|
className: "relative inline-flex shrink-0",
|
|
721
769
|
children: [
|
|
722
770
|
/* @__PURE__ */ J("span", {
|
|
723
|
-
className: P("flex size-8 items-center justify-center rounded-lg",
|
|
771
|
+
className: P("flex size-8 items-center justify-center rounded-lg", On[n]),
|
|
724
772
|
children: e
|
|
725
773
|
}),
|
|
726
774
|
t && /* @__PURE__ */ J(et, {
|
|
727
775
|
size: B.MD,
|
|
728
776
|
"aria-hidden": !0,
|
|
729
|
-
className: P("absolute -end-2 -top-2",
|
|
777
|
+
className: P("absolute -end-2 -top-2", En.activeIcon)
|
|
730
778
|
}),
|
|
731
779
|
r != null && /* @__PURE__ */ J("span", {
|
|
732
780
|
role: "status",
|
|
@@ -734,27 +782,27 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
734
782
|
children: r
|
|
735
783
|
})
|
|
736
784
|
]
|
|
737
|
-
}),
|
|
785
|
+
}), An = {
|
|
738
786
|
card: "_card_tqnz7_1",
|
|
739
787
|
icon: "_icon_tqnz7_6",
|
|
740
788
|
title: "_title_tqnz7_10",
|
|
741
789
|
description: "_description_tqnz7_14"
|
|
742
|
-
},
|
|
790
|
+
}, jn = ({ icon: e, title: t, description: n, action: r, titleClassName: i = "dial-small-semi-text", descriptionClassName: a = "dial-small-text" }) => /* @__PURE__ */ Y("div", {
|
|
743
791
|
role: "status",
|
|
744
792
|
"aria-live": "polite",
|
|
745
|
-
className: P("flex items-center gap-3 rounded-xl p-3",
|
|
793
|
+
className: P("flex items-center gap-3 rounded-xl p-3", An.card),
|
|
746
794
|
children: [/* @__PURE__ */ J("span", {
|
|
747
|
-
className: P("shrink-0",
|
|
795
|
+
className: P("shrink-0", An.icon, n != null && "mt-0.5"),
|
|
748
796
|
children: e
|
|
749
797
|
}), /* @__PURE__ */ Y("div", {
|
|
750
798
|
className: "flex min-w-0 flex-1 items-center justify-between gap-2",
|
|
751
799
|
children: [/* @__PURE__ */ Y("div", {
|
|
752
800
|
className: "flex min-w-0 flex-col gap-1",
|
|
753
801
|
children: [/* @__PURE__ */ J("span", {
|
|
754
|
-
className: P(i,
|
|
802
|
+
className: P(i, An.title),
|
|
755
803
|
children: t
|
|
756
804
|
}), n != null && /* @__PURE__ */ J("span", {
|
|
757
|
-
className: P(a,
|
|
805
|
+
className: P(a, An.description),
|
|
758
806
|
children: n
|
|
759
807
|
})]
|
|
760
808
|
}), r != null && /* @__PURE__ */ J("div", {
|
|
@@ -762,53 +810,53 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
762
810
|
children: r
|
|
763
811
|
})]
|
|
764
812
|
})]
|
|
765
|
-
}),
|
|
813
|
+
}), Mn = (e) => e === x.ApiKey ? "You are currently using organization API key to access this toolset." : "You are currently using organization credentials to access this toolset.", Nn = (e) => e === x.ApiKey ? "Configure your personal API key to have access to your data." : "Login using personal account to have access to your data.", Pn = (e) => e === x.ApiKey ? "Signed in with organization API key." : "Signed in with organization credentials.", Fn = (e) => e === x.ApiKey ? "Signed in with personal API key." : "Signed in with personal credentials.", In = 20, Ln = ({ state: e, authenticationType: t, texts: n }) => {
|
|
766
814
|
let r = /* @__PURE__ */ J(Ye, {
|
|
767
|
-
size:
|
|
815
|
+
size: In,
|
|
768
816
|
"aria-hidden": !0,
|
|
769
817
|
stroke: V
|
|
770
818
|
});
|
|
771
819
|
if (e === S.PersonalCredentialsActive) {
|
|
772
|
-
let e = (n?.personalCredentialsActiveBannerTitle ??
|
|
773
|
-
return /* @__PURE__ */ J(
|
|
774
|
-
icon: /* @__PURE__ */ J(
|
|
820
|
+
let e = (n?.personalCredentialsActiveBannerTitle ?? Fn)(t);
|
|
821
|
+
return /* @__PURE__ */ J(jn, {
|
|
822
|
+
icon: /* @__PURE__ */ J(kn, {
|
|
775
823
|
icon: /* @__PURE__ */ J(gt, {
|
|
776
824
|
size: B.SM,
|
|
777
825
|
"aria-hidden": !0,
|
|
778
826
|
stroke: V
|
|
779
827
|
}),
|
|
780
828
|
isActive: !0,
|
|
781
|
-
surface:
|
|
829
|
+
surface: Dn.Raised
|
|
782
830
|
}),
|
|
783
831
|
title: e
|
|
784
832
|
});
|
|
785
833
|
}
|
|
786
834
|
if (e === S.OrgCredentialsActive) {
|
|
787
|
-
let e = (n?.orgCredentialsActiveBannerTitle ??
|
|
788
|
-
return /* @__PURE__ */ J(
|
|
789
|
-
icon: /* @__PURE__ */ J(
|
|
835
|
+
let e = (n?.orgCredentialsActiveBannerTitle ?? Pn)(t);
|
|
836
|
+
return /* @__PURE__ */ J(jn, {
|
|
837
|
+
icon: /* @__PURE__ */ J(kn, {
|
|
790
838
|
icon: /* @__PURE__ */ J(Ye, {
|
|
791
839
|
size: B.SM,
|
|
792
840
|
"aria-hidden": !0,
|
|
793
841
|
stroke: V
|
|
794
842
|
}),
|
|
795
843
|
isActive: !0,
|
|
796
|
-
surface:
|
|
844
|
+
surface: Dn.Raised
|
|
797
845
|
}),
|
|
798
846
|
title: e
|
|
799
847
|
});
|
|
800
848
|
}
|
|
801
|
-
return /* @__PURE__ */ J(
|
|
849
|
+
return /* @__PURE__ */ J(jn, {
|
|
802
850
|
icon: r,
|
|
803
|
-
title: (n?.orgFallbackBannerTitle ??
|
|
804
|
-
description: (n?.orgFallbackBannerDescription ??
|
|
851
|
+
title: (n?.orgFallbackBannerTitle ?? Mn)(t),
|
|
852
|
+
description: (n?.orgFallbackBannerDescription ?? Nn)(t)
|
|
805
853
|
});
|
|
806
|
-
},
|
|
854
|
+
}, Rn = {
|
|
807
855
|
surface: "_surface_1q3s8_1",
|
|
808
856
|
description: "_description_1q3s8_5",
|
|
809
857
|
rowDescription: "_rowDescription_1q3s8_9",
|
|
810
858
|
errorText: "_errorText_1q3s8_13"
|
|
811
|
-
},
|
|
859
|
+
}, zn = ({ label: e, description: t, icon: n, status: r, isActive: i, authenticationType: a, apiKeyAddedWhen: o, apiKeyHeader: s, onLogin: c, onRequestLogout: l, onRequestDeleteApiKey: u, texts: d, labelClassName: f, descriptionClassName: p, errorClassName: m, keyCardTitleClassName: h, keyCardDescriptionClassName: g, deleteActionClassName: _, disabled: v = !1, isPending: y = !1, renderLoginOptions: b, children: S }) => {
|
|
812
860
|
let w = de(), [T, E] = z(), [D, O] = z(""), [k, ee] = z(!1), [A, te] = z(!1), j = r === C.SignedIn, ne = F((e) => {
|
|
813
861
|
O(e ?? ""), ee(!1), E(void 0);
|
|
814
862
|
}, []), re = async () => {
|
|
@@ -832,7 +880,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
832
880
|
"aria-label": e,
|
|
833
881
|
"aria-busy": A || y,
|
|
834
882
|
className: "flex min-w-0 items-start gap-3 rounded-xl p-3",
|
|
835
|
-
children: [/* @__PURE__ */ J(
|
|
883
|
+
children: [/* @__PURE__ */ J(kn, {
|
|
836
884
|
icon: n,
|
|
837
885
|
isActive: i,
|
|
838
886
|
statusLabel: i ? oe : se
|
|
@@ -847,7 +895,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
847
895
|
className: f,
|
|
848
896
|
children: e
|
|
849
897
|
}), /* @__PURE__ */ J("span", {
|
|
850
|
-
className: P(p,
|
|
898
|
+
className: P(p, Rn.rowDescription),
|
|
851
899
|
children: t
|
|
852
900
|
})]
|
|
853
901
|
}), a === x.OAuth && (j ? l && /* @__PURE__ */ J(Se, {
|
|
@@ -898,19 +946,19 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
898
946
|
}),
|
|
899
947
|
I && /* @__PURE__ */ J("span", {
|
|
900
948
|
id: ue,
|
|
901
|
-
className: P(p,
|
|
949
|
+
className: P(p, Rn.rowDescription),
|
|
902
950
|
children: I
|
|
903
951
|
}),
|
|
904
952
|
k && /* @__PURE__ */ J("span", {
|
|
905
953
|
role: "alert",
|
|
906
|
-
className: P(m,
|
|
954
|
+
className: P(m, Rn.errorText),
|
|
907
955
|
children: d?.apiKeyRequiredErrorMessage ?? "API key is required."
|
|
908
956
|
})
|
|
909
957
|
]
|
|
910
958
|
}),
|
|
911
959
|
a === x.ApiKey && j && /* @__PURE__ */ J("div", {
|
|
912
960
|
className: "animate-fadeIn pt-1",
|
|
913
|
-
children: /* @__PURE__ */ J(
|
|
961
|
+
children: /* @__PURE__ */ J(jn, {
|
|
914
962
|
icon: /* @__PURE__ */ J(at, {
|
|
915
963
|
size: B.SM,
|
|
916
964
|
"aria-hidden": !0,
|
|
@@ -931,23 +979,23 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
931
979
|
!j && b?.(A || v),
|
|
932
980
|
T && /* @__PURE__ */ J("p", {
|
|
933
981
|
role: "alert",
|
|
934
|
-
className: P(m,
|
|
982
|
+
className: P(m, Rn.errorText),
|
|
935
983
|
children: T
|
|
936
984
|
}),
|
|
937
985
|
S
|
|
938
986
|
]
|
|
939
987
|
})]
|
|
940
988
|
});
|
|
941
|
-
},
|
|
989
|
+
}, Bn = (e) => e === x.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.", Vn = ({ item: e, onLogin: n, onRequestLogout: r, onRequestDeleteApiKey: i, texts: a, detailsStyles: o, deleteActionClassName: s = "text-error" }) => {
|
|
942
990
|
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" } = o?.typography ?? {}, m = e.credentials;
|
|
943
991
|
if (m == null) return null;
|
|
944
|
-
let h = (a?.credentialsManagementDescription ??
|
|
992
|
+
let h = (a?.credentialsManagementDescription ?? Bn)(m.authenticationType), g = m.userStatus === C.SignedIn, _ = !g && m.globalStatus === C.SignedIn;
|
|
945
993
|
return /* @__PURE__ */ Y("div", {
|
|
946
994
|
className: "flex flex-col",
|
|
947
995
|
children: [/* @__PURE__ */ J("div", {
|
|
948
996
|
className: "px-6 py-4",
|
|
949
997
|
children: /* @__PURE__ */ J("div", {
|
|
950
|
-
className: P("rounded-xl p-3",
|
|
998
|
+
className: P("rounded-xl p-3", Rn.surface),
|
|
951
999
|
children: /* @__PURE__ */ J(k, {
|
|
952
1000
|
item: e,
|
|
953
1001
|
iconSize: 40,
|
|
@@ -957,11 +1005,11 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
957
1005
|
}), /* @__PURE__ */ Y("div", {
|
|
958
1006
|
className: "flex flex-col gap-5 px-6 py-4",
|
|
959
1007
|
children: [/* @__PURE__ */ J("span", {
|
|
960
|
-
className: P(c,
|
|
1008
|
+
className: P(c, Rn.description),
|
|
961
1009
|
children: h
|
|
962
1010
|
}), /* @__PURE__ */ Y("div", {
|
|
963
1011
|
className: "flex flex-col",
|
|
964
|
-
children: [/* @__PURE__ */ J(
|
|
1012
|
+
children: [/* @__PURE__ */ J(zn, {
|
|
965
1013
|
label: a?.personalCredentialsLabel ?? "Personal credentials",
|
|
966
1014
|
description: a?.personalCredentialsDescription ?? "These credentials apply only to your account.",
|
|
967
1015
|
icon: /* @__PURE__ */ J(gt, {
|
|
@@ -987,7 +1035,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
987
1035
|
keyCardTitleClassName: f,
|
|
988
1036
|
keyCardDescriptionClassName: p,
|
|
989
1037
|
deleteActionClassName: s
|
|
990
|
-
}), /* @__PURE__ */ J(
|
|
1038
|
+
}), /* @__PURE__ */ J(zn, {
|
|
991
1039
|
label: a?.organizationCredentialsLabel ?? "Organization credentials",
|
|
992
1040
|
description: a?.organizationCredentialsDescription ?? "Once added, these credentials will grant all users in your organization access to this toolset.",
|
|
993
1041
|
icon: /* @__PURE__ */ J(Ye, {
|
|
@@ -1017,19 +1065,19 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1017
1065
|
})]
|
|
1018
1066
|
})]
|
|
1019
1067
|
});
|
|
1020
|
-
},
|
|
1068
|
+
}, Hn = {
|
|
1021
1069
|
skeletonColor: "var(--cat-details-skeleton, var(--bg-control-disable-primary, #dce0e8))",
|
|
1022
1070
|
backdrop: "_backdrop_1i04q_7",
|
|
1023
1071
|
panel: "_panel_1i04q_11",
|
|
1024
1072
|
divider: "_divider_1i04q_16",
|
|
1025
1073
|
content: "_content_1i04q_20",
|
|
1026
1074
|
publishTitle: "_publishTitle_1i04q_25"
|
|
1027
|
-
},
|
|
1075
|
+
}, Un = /* @__PURE__ */ function(e) {
|
|
1028
1076
|
return e.Idle = "idle", e.Loading = "loading", e.Resolved = "resolved", e.Unknown = "unknown", e;
|
|
1029
|
-
}({}),
|
|
1077
|
+
}({}), Wn = {
|
|
1030
1078
|
divider: "_divider_1ae8j_1",
|
|
1031
1079
|
hint: "_hint_1ae8j_5"
|
|
1032
|
-
},
|
|
1080
|
+
}, Gn = 16, Kn = ({ item: e, level: t, status: n, apiKeyAddedWhen: r, apiKeyHeader: i, onLogin: a, onLogout: o, onClose: s, texts: c, colors: l, deleteActionClassName: u = "text-error" }) => {
|
|
1033
1081
|
let [d, f] = z(""), [p, m] = z(!1), [h, g] = z(!1), [_, v] = z(!1), y = n === C.SignedIn, b = F((e) => {
|
|
1034
1082
|
f(e ?? ""), m(!1);
|
|
1035
1083
|
}, []), x = F(async () => {
|
|
@@ -1083,7 +1131,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1083
1131
|
children: w
|
|
1084
1132
|
})
|
|
1085
1133
|
}),
|
|
1086
|
-
/* @__PURE__ */ J("div", { className: P("mx-4 h-px",
|
|
1134
|
+
/* @__PURE__ */ J("div", { className: P("mx-4 h-px", Wn.divider) }),
|
|
1087
1135
|
!y && /* @__PURE__ */ Y("div", {
|
|
1088
1136
|
className: "flex animate-fadeIn flex-col gap-1 px-4 py-3.5",
|
|
1089
1137
|
children: [
|
|
@@ -1104,7 +1152,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1104
1152
|
label: h ? void 0 : T,
|
|
1105
1153
|
"aria-label": h ? D : void 0,
|
|
1106
1154
|
iconBefore: h ? /* @__PURE__ */ J(We, {
|
|
1107
|
-
size:
|
|
1155
|
+
size: Gn,
|
|
1108
1156
|
ariaLabel: D
|
|
1109
1157
|
}) : void 0,
|
|
1110
1158
|
onClick: x,
|
|
@@ -1113,7 +1161,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1113
1161
|
}),
|
|
1114
1162
|
j && /* @__PURE__ */ J("span", {
|
|
1115
1163
|
id: te,
|
|
1116
|
-
className: P("dial-caption-text",
|
|
1164
|
+
className: P("dial-caption-text", Wn.hint),
|
|
1117
1165
|
children: j
|
|
1118
1166
|
}),
|
|
1119
1167
|
p && /* @__PURE__ */ J("span", {
|
|
@@ -1124,7 +1172,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1124
1172
|
}),
|
|
1125
1173
|
y && /* @__PURE__ */ J("div", {
|
|
1126
1174
|
className: "animate-fadeIn px-4 py-3.5",
|
|
1127
|
-
children: /* @__PURE__ */ J(
|
|
1175
|
+
children: /* @__PURE__ */ J(jn, {
|
|
1128
1176
|
icon: /* @__PURE__ */ J(at, {
|
|
1129
1177
|
size: 20,
|
|
1130
1178
|
"aria-hidden": !0,
|
|
@@ -1136,7 +1184,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1136
1184
|
label: _ ? void 0 : E,
|
|
1137
1185
|
"aria-label": _ ? O : void 0,
|
|
1138
1186
|
iconBefore: _ ? /* @__PURE__ */ J(We, {
|
|
1139
|
-
size:
|
|
1187
|
+
size: Gn,
|
|
1140
1188
|
ariaLabel: O
|
|
1141
1189
|
}) : void 0,
|
|
1142
1190
|
className: u,
|
|
@@ -1147,7 +1195,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1147
1195
|
})
|
|
1148
1196
|
]
|
|
1149
1197
|
});
|
|
1150
|
-
},
|
|
1198
|
+
}, qn = { name: "_name_gfs1p_1" }, Jn = (e) => e.isMyApp === !0, Yn = ({ item: e, onShare: t, shareOverlay: n, isShareVisible: r, label: i = "Share" }) => {
|
|
1151
1199
|
let [a, o] = z(!1), s = F(() => {
|
|
1152
1200
|
if (n) {
|
|
1153
1201
|
o((e) => !e);
|
|
@@ -1159,7 +1207,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1159
1207
|
t,
|
|
1160
1208
|
n
|
|
1161
1209
|
]);
|
|
1162
|
-
if (!
|
|
1210
|
+
if (!Jn(e) || r && !r(e)) return null;
|
|
1163
1211
|
let c = /* @__PURE__ */ J(W, {
|
|
1164
1212
|
label: i,
|
|
1165
1213
|
iconBefore: /* @__PURE__ */ J(ft, {
|
|
@@ -1184,14 +1232,14 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1184
1232
|
renderOverlay: () => n(e, () => o(!1)),
|
|
1185
1233
|
children: c
|
|
1186
1234
|
}) : c;
|
|
1187
|
-
},
|
|
1235
|
+
}, Xn = (e) => e === x.ApiKey ? "Manage API keys" : "Manage credentials", Zn = {
|
|
1188
1236
|
[Et.LimitReached]: "bg-error text-error",
|
|
1189
1237
|
[Et.RunningLow]: "bg-warning text-warning"
|
|
1190
|
-
},
|
|
1191
|
-
className: P("flex h-[24px] items-center justify-center gap-1 whitespace-nowrap rounded-2xl px-2", "dial-caption-lead-semi-text",
|
|
1238
|
+
}, Qn = ({ status: e, label: t }) => /* @__PURE__ */ J("div", {
|
|
1239
|
+
className: P("flex h-[24px] items-center justify-center gap-1 whitespace-nowrap rounded-2xl px-2", "dial-caption-lead-semi-text", Zn[e]),
|
|
1192
1240
|
children: t
|
|
1193
|
-
}),
|
|
1194
|
-
let { nameClassName: ie = "dial-body-semi-text", folderLabelClassName: ae = "dial-tiny-text", folderLeafClassName: oe = "dial-tiny-semi-text" } = D?.typography ?? {}, se = n.details?.limits?.status, ce = se == null ? void 0 : /* @__PURE__ */ J(
|
|
1241
|
+
}), $n = ({ item: n, onUseInChat: r, isPrimaryActionVisible: i, onShare: a, shareOverlay: o, isShareVisible: s, isSharePrimary: c, onEdit: l, onDownload: d, isDownloadVisible: f, isDownloadPrimary: p, onDelete: m, onUnshare: h, isUnshareVisible: g, onRevokeShare: _, onFetchRecipientsCount: v, isRevokeShareVisible: y, onLogin: b, onLogout: S, onOpenCredentialsManagement: C, onRequestLogout: T, texts: E, detailsStyles: D, isPublishVisible: O, isPublishPrimary: ee, onOpenPublish: A, isUnpublishVisible: te, hasPublishedFolders: j = !1, isPublishHistoryResolved: ne = !0, onRequestPublishHistory: re, onOpenUnpublish: M, isReadonly: N = !1 }) => {
|
|
1242
|
+
let { nameClassName: ie = "dial-body-semi-text", folderLabelClassName: ae = "dial-tiny-text", folderLeafClassName: oe = "dial-tiny-semi-text" } = D?.typography ?? {}, se = n.details?.limits?.status, ce = se == null ? void 0 : /* @__PURE__ */ J(Qn, {
|
|
1195
1243
|
status: se,
|
|
1196
1244
|
label: se === Et.LimitReached ? E?.limitReachedLabel ?? "Limit reached" : E?.limitRunningLowLabel ?? "Running low"
|
|
1197
1245
|
}), le = F(() => {
|
|
@@ -1242,21 +1290,21 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1242
1290
|
m?.(n);
|
|
1243
1291
|
}, [n, m]), H = F(() => {
|
|
1244
1292
|
_?.(n);
|
|
1245
|
-
}, [n, _]), [Te, De] = z(
|
|
1293
|
+
}, [n, _]), [Te, De] = z(Un.Idle), [Oe, ke] = z(void 0), Ae = R(null);
|
|
1246
1294
|
I(() => {
|
|
1247
|
-
Ae.current = null, De(
|
|
1295
|
+
Ae.current = null, De(Un.Idle), ke(void 0);
|
|
1248
1296
|
}, [n.id]);
|
|
1249
1297
|
let je = F(() => {
|
|
1250
1298
|
if (!v || Ae.current === n.id || !_ || n.isMyApp !== !0 || y?.(n) === !1) return;
|
|
1251
1299
|
let e = n.id;
|
|
1252
|
-
Ae.current = e, De(
|
|
1300
|
+
Ae.current = e, De(Un.Loading), (async () => {
|
|
1253
1301
|
try {
|
|
1254
1302
|
let t = await v(n);
|
|
1255
1303
|
if (Ae.current !== e) return;
|
|
1256
|
-
ke(t), De(t == null ?
|
|
1304
|
+
ke(t), De(t == null ? Un.Unknown : Un.Resolved);
|
|
1257
1305
|
} catch {
|
|
1258
1306
|
if (Ae.current !== e) return;
|
|
1259
|
-
ke(void 0), De(
|
|
1307
|
+
ke(void 0), De(Un.Unknown);
|
|
1260
1308
|
}
|
|
1261
1309
|
})();
|
|
1262
1310
|
}, [
|
|
@@ -1274,7 +1322,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1274
1322
|
je(), re?.();
|
|
1275
1323
|
}, [je, re]), Le = F(() => {
|
|
1276
1324
|
re?.();
|
|
1277
|
-
}, [re]), Re = E?.hasPrimaryAction !== !1 && (i?.(n) ?? (n.type === w.Model || n.type === w.Agent || n.type === w.Prompt)), ze = !N && !!M && j && (te?.(n) ?? !0), Be = !N && !!M && !ne && te?.(n) === !0, Ve = !N && !ze && (O?.(n) ?? (n.type === w.Model || n.type === w.Toolset || n.type === w.Agent)), He = !N && !!l && !!n.isEditable, Ue = !N && n.isMyApp === !0 && (s?.(n) ?? !0), Ge = c?.(n) ?? !0, Ke = ee?.(n) ?? !1, G = n.credentials?.authenticationType ?? x.None, K = n.credentials != null && G !== x.None ? u(n.credentials) : void 0, qe = !N && K != null && (!!b || !!S), Ye = n.type === w.Toolset && qe, Xe = !!d && (f?.(n) ?? !0), Qe = Xe && !Ye && (p?.(n) ?? (n.type === w.Skill && !Re)), $e = Xe && !Qe, et = !N && n.isMyApp, rt = !N && !!h && n.isMyApp !== !0 && n.sharedWithMe === !0 && (g?.(n) ?? !0), it = !N && !!_ && n.isMyApp === !0 && (!v || Te ===
|
|
1325
|
+
}, [re]), Re = E?.hasPrimaryAction !== !1 && (i?.(n) ?? (n.type === w.Model || n.type === w.Agent || n.type === w.Prompt)), ze = !N && !!M && j && (te?.(n) ?? !0), Be = !N && !!M && !ne && te?.(n) === !0, Ve = !N && !ze && (O?.(n) ?? (n.type === w.Model || n.type === w.Toolset || n.type === w.Agent)), He = !N && !!l && !!n.isEditable, Ue = !N && n.isMyApp === !0 && (s?.(n) ?? !0), Ge = c?.(n) ?? !0, Ke = ee?.(n) ?? !1, G = n.credentials?.authenticationType ?? x.None, K = n.credentials != null && G !== x.None ? u(n.credentials) : void 0, qe = !N && K != null && (!!b || !!S), Ye = n.type === w.Toolset && qe, Xe = !!d && (f?.(n) ?? !0), Qe = Xe && !Ye && (p?.(n) ?? (n.type === w.Skill && !Re)), $e = Xe && !Qe, et = !N && n.isMyApp, rt = !N && !!h && n.isMyApp !== !0 && n.sharedWithMe === !0 && (g?.(n) ?? !0), it = !N && !!_ && n.isMyApp === !0 && (!v || Te === Un.Unknown || Te === Un.Resolved && (Oe ?? 0) > 0) && (y?.(n) ?? !0), ot = L(() => {
|
|
1278
1326
|
let e = [];
|
|
1279
1327
|
if (!Ge && Ue && e.push({
|
|
1280
1328
|
key: "share",
|
|
@@ -1381,7 +1429,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1381
1429
|
b,
|
|
1382
1430
|
C,
|
|
1383
1431
|
T
|
|
1384
|
-
]), Dt = K === e.ManageCredentials ? (E?.manageCredentialsActionLabel ??
|
|
1432
|
+
]), Dt = K === e.ManageCredentials ? (E?.manageCredentialsActionLabel ?? Xn)(G) : G === x.ApiKey ? K === e.LogOut ? E?.changeApiKeyActionLabel ?? "Change API key" : E?.apiKeyActionLabel ?? "API key" : K === e.LogOut ? E?.logoutActionLabel ?? "Log out" : E?.loginActionLabel ?? "Log in", Z = K === e.ManageCredentials || G === x.ApiKey ? /* @__PURE__ */ J(at, {
|
|
1385
1433
|
size: B.MD,
|
|
1386
1434
|
stroke: V
|
|
1387
1435
|
}) : K === e.LogOut ? /* @__PURE__ */ J(lt, {
|
|
@@ -1397,7 +1445,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1397
1445
|
}) : Ct ? /* @__PURE__ */ J(Ze, {
|
|
1398
1446
|
size: B.MD,
|
|
1399
1447
|
stroke: V
|
|
1400
|
-
}) : void 0,
|
|
1448
|
+
}) : void 0, Q = (e) => {
|
|
1401
1449
|
let r = /* @__PURE__ */ J(e, {
|
|
1402
1450
|
label: Dt,
|
|
1403
1451
|
iconBefore: Z,
|
|
@@ -1413,7 +1461,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1413
1461
|
onOpenChange: St,
|
|
1414
1462
|
trigger: [],
|
|
1415
1463
|
outsideClosable: !0,
|
|
1416
|
-
renderOverlay: () => /* @__PURE__ */ J(
|
|
1464
|
+
renderOverlay: () => /* @__PURE__ */ J(Kn, {
|
|
1417
1465
|
item: n,
|
|
1418
1466
|
level: t.User,
|
|
1419
1467
|
status: n.credentials?.userStatus,
|
|
@@ -1427,7 +1475,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1427
1475
|
}),
|
|
1428
1476
|
children: r
|
|
1429
1477
|
});
|
|
1430
|
-
},
|
|
1478
|
+
}, kt = ({ key: e, label: t, Icon: r, danger: i, onClick: c }) => e === "share" ? /* @__PURE__ */ J(Yn, {
|
|
1431
1479
|
item: n,
|
|
1432
1480
|
onShare: a,
|
|
1433
1481
|
shareOverlay: o,
|
|
@@ -1441,7 +1489,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1441
1489
|
stroke: V
|
|
1442
1490
|
}),
|
|
1443
1491
|
onClick: c
|
|
1444
|
-
}),
|
|
1492
|
+
}), At = () => {
|
|
1445
1493
|
let e = /* @__PURE__ */ J(Ce, {
|
|
1446
1494
|
items: st,
|
|
1447
1495
|
placement: "bottom-end",
|
|
@@ -1469,13 +1517,13 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1469
1517
|
renderOverlay: () => o(n, be),
|
|
1470
1518
|
children: e
|
|
1471
1519
|
});
|
|
1472
|
-
},
|
|
1520
|
+
}, jt = Ye || Re || Qe || Ge && Ue || Ke && ze || Ke && Ve || qe && !Ye || st.length > 0 || Be;
|
|
1473
1521
|
return /* @__PURE__ */ Y("div", {
|
|
1474
1522
|
className: "flex flex-col gap-3 px-6 py-4",
|
|
1475
1523
|
children: [/* @__PURE__ */ J(k, {
|
|
1476
1524
|
item: n,
|
|
1477
1525
|
iconSize: 52,
|
|
1478
|
-
nameClassName: P(ie,
|
|
1526
|
+
nameClassName: P(ie, qn.name),
|
|
1479
1527
|
featuredLabel: E?.featuredLabel ?? "Featured",
|
|
1480
1528
|
typeLabel: E?.entityTypeLabels?.[n.type],
|
|
1481
1529
|
featuredChipStyle: D?.colors?.featuredChipStyle,
|
|
@@ -1485,10 +1533,10 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1485
1533
|
labelClassName: ae,
|
|
1486
1534
|
leafClassName: oe
|
|
1487
1535
|
}) : void 0
|
|
1488
|
-
}),
|
|
1536
|
+
}), jt && /* @__PURE__ */ Y("div", {
|
|
1489
1537
|
className: "flex flex-wrap items-center gap-2 ps-[60px]",
|
|
1490
1538
|
children: [
|
|
1491
|
-
Ye &&
|
|
1539
|
+
Ye && Q(wt || Tt ? W : Ie),
|
|
1492
1540
|
Re && /* @__PURE__ */ J(Ie, {
|
|
1493
1541
|
label: E?.primaryActionLabel ?? "Use in chat",
|
|
1494
1542
|
iconBefore: /* @__PURE__ */ J(dt, { size: B.MD }),
|
|
@@ -1514,7 +1562,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1514
1562
|
className: "sr-only",
|
|
1515
1563
|
children: E?.downloadingStatusLabel ?? "Downloading"
|
|
1516
1564
|
})] }),
|
|
1517
|
-
Ge && Ue && /* @__PURE__ */ J(
|
|
1565
|
+
Ge && Ue && /* @__PURE__ */ J(Yn, {
|
|
1518
1566
|
item: n,
|
|
1519
1567
|
onShare: a,
|
|
1520
1568
|
shareOverlay: o,
|
|
@@ -1543,12 +1591,12 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1543
1591
|
onMouseEnter: Le,
|
|
1544
1592
|
onFocus: Le
|
|
1545
1593
|
}),
|
|
1546
|
-
qe && !Ye &&
|
|
1547
|
-
gt ?
|
|
1594
|
+
qe && !Ye && Q(W),
|
|
1595
|
+
gt ? kt(gt) : (st.length > 0 || Be) && At()
|
|
1548
1596
|
]
|
|
1549
1597
|
})]
|
|
1550
1598
|
});
|
|
1551
|
-
},
|
|
1599
|
+
}, er = ({ topics: e, content: t, detailsStyles: n, markdownLabels: r }) => {
|
|
1552
1600
|
let i = n?.typography?.contentHeadingClassName ?? "dial-small-semi-text", a = n?.typography?.contentClassName ?? "dial-small-text";
|
|
1553
1601
|
return /* @__PURE__ */ Y("div", {
|
|
1554
1602
|
className: "flex flex-col gap-5",
|
|
@@ -1568,21 +1616,21 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1568
1616
|
...r
|
|
1569
1617
|
}), e && e.length > 0 && /* @__PURE__ */ J("div", {
|
|
1570
1618
|
className: "flex flex-wrap gap-2",
|
|
1571
|
-
children: e.map((e) => /* @__PURE__ */ J(
|
|
1619
|
+
children: e.map((e) => /* @__PURE__ */ J(nn, { label: e }, e))
|
|
1572
1620
|
})]
|
|
1573
1621
|
});
|
|
1574
|
-
},
|
|
1622
|
+
}, tr = {
|
|
1575
1623
|
divider: "_divider_1gzl9_1",
|
|
1576
1624
|
fileCount: "_fileCount_1gzl9_5",
|
|
1577
1625
|
body: "_body_1gzl9_9"
|
|
1578
|
-
},
|
|
1626
|
+
}, nr = (e, t, n = void 0) => e.flatMap((e) => {
|
|
1579
1627
|
let r = {
|
|
1580
1628
|
node: e,
|
|
1581
1629
|
parentId: n
|
|
1582
1630
|
};
|
|
1583
|
-
return e.type ===
|
|
1584
|
-
}),
|
|
1585
|
-
let c = L(() =>
|
|
1631
|
+
return e.type === jt.File || !t.has(e.id) ? [r] : [r, ...nr(e.items, t, e.id)];
|
|
1632
|
+
}), rr = ({ nodes: e, selectedFileId: t, expandedFolderIds: n, onToggleFolder: r, onSelectFile: i, onClose: a, ariaLabel: o = "Select file", rowNameClassName: s = "dial-small-text" }) => {
|
|
1633
|
+
let c = L(() => nr(e, n), [e, n]), l = R({}), [u, d] = z(() => t ?? c[0]?.node.id);
|
|
1586
1634
|
I(() => {
|
|
1587
1635
|
u != null && l.current[u]?.focus();
|
|
1588
1636
|
}, []);
|
|
@@ -1606,14 +1654,14 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1606
1654
|
break;
|
|
1607
1655
|
}
|
|
1608
1656
|
case "ArrowRight":
|
|
1609
|
-
e.preventDefault(), o.node.type ===
|
|
1657
|
+
e.preventDefault(), o.node.type === jt.Folder && !n.has(o.node.id) && r(o.node.id);
|
|
1610
1658
|
break;
|
|
1611
1659
|
case "ArrowLeft":
|
|
1612
|
-
e.preventDefault(), o.node.type ===
|
|
1660
|
+
e.preventDefault(), o.node.type === jt.Folder && n.has(o.node.id) ? r(o.node.id) : o.parentId != null && f(o.parentId);
|
|
1613
1661
|
break;
|
|
1614
1662
|
case "Enter":
|
|
1615
1663
|
case " ":
|
|
1616
|
-
e.preventDefault(), o.node.type ===
|
|
1664
|
+
e.preventDefault(), o.node.type === jt.Folder ? r(o.node.id) : i(o.node.id);
|
|
1617
1665
|
break;
|
|
1618
1666
|
case "Escape":
|
|
1619
1667
|
e.preventDefault(), a();
|
|
@@ -1622,7 +1670,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1622
1670
|
}
|
|
1623
1671
|
}, m = (e) => P("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) => {
|
|
1624
1672
|
let a = e.id === u;
|
|
1625
|
-
if (e.type ===
|
|
1673
|
+
if (e.type === jt.File) {
|
|
1626
1674
|
let n = e.id === t;
|
|
1627
1675
|
return /* @__PURE__ */ J("div", {
|
|
1628
1676
|
ref: (t) => {
|
|
@@ -1681,8 +1729,8 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1681
1729
|
onKeyDown: p,
|
|
1682
1730
|
children: e.map((e) => h(e))
|
|
1683
1731
|
});
|
|
1684
|
-
},
|
|
1685
|
-
let y = _?.typography?.contentClassName ?? "dial-small-text", b = _?.typography?.contentHeadingClassName ?? "dial-small-semi-text", x = _?.typography?.contentFileCountClassName ?? "dial-tiny-text", S = de(), C = t != null && t !== "", w = n ?? [], T =
|
|
1732
|
+
}, ir = () => void 0, ar = ({ content: e, description: t, files: n, selectedFileId: r, onSelectFile: i, isFileLoading: a = !1, expandedFolderIds: o = /* @__PURE__ */ new Set(), onToggleFolder: s = ir, isFileSelectorOpen: c = !1, onFileSelectorOpenChange: l = ir, fileSelectorAriaLabel: u = "Select file", fileCountLabel: d = (e) => `${e} files`, fileLoadingLabel: f = "Loading file", fileUnsupportedLabel: p = "Preview is not supported for this file", filePreview: m, filePreviewContent: h, renderFileTree: g, detailsStyles: _, markdownLabels: v }) => {
|
|
1733
|
+
let y = _?.typography?.contentClassName ?? "dial-small-text", b = _?.typography?.contentHeadingClassName ?? "dial-small-semi-text", x = _?.typography?.contentFileCountClassName ?? "dial-tiny-text", S = de(), C = t != null && t !== "", w = n ?? [], T = hn(w) > 1, E = _n(w, r) ?? "", D = {
|
|
1686
1734
|
nodes: w,
|
|
1687
1735
|
selectedFileId: r,
|
|
1688
1736
|
expandedFolderIds: o,
|
|
@@ -1694,10 +1742,10 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1694
1742
|
ariaLabel: u,
|
|
1695
1743
|
rowNameClassName: y
|
|
1696
1744
|
}, O = a ? {
|
|
1697
|
-
type:
|
|
1745
|
+
type: Mt.Text,
|
|
1698
1746
|
text: ""
|
|
1699
1747
|
} : m ?? {
|
|
1700
|
-
type:
|
|
1748
|
+
type: Mt.Markdown,
|
|
1701
1749
|
text: e
|
|
1702
1750
|
};
|
|
1703
1751
|
return /* @__PURE__ */ Y("div", {
|
|
@@ -1712,7 +1760,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1712
1760
|
matchReferenceWidth: !1,
|
|
1713
1761
|
listClassName: "w-[280px] shadow-md",
|
|
1714
1762
|
placement: "bottom-start",
|
|
1715
|
-
renderOverlay: () => g ? g(D) : /* @__PURE__ */ J(
|
|
1763
|
+
renderOverlay: () => g ? g(D) : /* @__PURE__ */ J(rr, { ...D }),
|
|
1716
1764
|
children: /* @__PURE__ */ J(je, {
|
|
1717
1765
|
id: S,
|
|
1718
1766
|
label: E,
|
|
@@ -1721,18 +1769,18 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1721
1769
|
onClick: () => l(!c)
|
|
1722
1770
|
})
|
|
1723
1771
|
}), /* @__PURE__ */ J("span", {
|
|
1724
|
-
className: P("shrink-0", x,
|
|
1725
|
-
children: d(
|
|
1772
|
+
className: P("shrink-0", x, tr.fileCount),
|
|
1773
|
+
children: d(hn(w))
|
|
1726
1774
|
})]
|
|
1727
1775
|
}),
|
|
1728
1776
|
C && /* @__PURE__ */ Y(bt, { children: [/* @__PURE__ */ J("p", {
|
|
1729
1777
|
className: P("m-0", y),
|
|
1730
1778
|
children: t
|
|
1731
|
-
}), /* @__PURE__ */ J("div", { className: P("shrink-0",
|
|
1779
|
+
}), /* @__PURE__ */ J("div", { className: P("shrink-0", tr.divider) })] }),
|
|
1732
1780
|
/* @__PURE__ */ Y("div", {
|
|
1733
1781
|
role: T ? "region" : void 0,
|
|
1734
1782
|
"aria-labelledby": T ? S : void 0,
|
|
1735
|
-
className: P("min-h-0 flex-1 text-start", h == null ? "overflow-auto break-words" : "overflow-hidden", h == null &&
|
|
1783
|
+
className: P("min-h-0 flex-1 text-start", h == null ? "overflow-auto break-words" : "overflow-hidden", h == null && tr.body, h == null && y),
|
|
1736
1784
|
children: [a && /* @__PURE__ */ J("span", {
|
|
1737
1785
|
role: "status",
|
|
1738
1786
|
className: "sr-only",
|
|
@@ -1740,24 +1788,24 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1740
1788
|
}), (() => {
|
|
1741
1789
|
if (h != null) return h;
|
|
1742
1790
|
switch (O.type) {
|
|
1743
|
-
case
|
|
1791
|
+
case Mt.Markdown: return /* @__PURE__ */ J(re, {
|
|
1744
1792
|
content: O.text,
|
|
1745
1793
|
headingClassName: b,
|
|
1746
1794
|
...v
|
|
1747
1795
|
});
|
|
1748
|
-
case
|
|
1796
|
+
case Mt.Text: return /* @__PURE__ */ J(j, {
|
|
1749
1797
|
language: O.language ?? "",
|
|
1750
1798
|
value: O.text,
|
|
1751
1799
|
copyLabel: v?.codeBlockCopyLabel,
|
|
1752
1800
|
copiedLabel: v?.codeBlockCopiedLabel,
|
|
1753
1801
|
hideDownload: !0
|
|
1754
1802
|
});
|
|
1755
|
-
case
|
|
1803
|
+
case Mt.Image: return /* @__PURE__ */ J("img", {
|
|
1756
1804
|
src: O.url,
|
|
1757
1805
|
alt: E,
|
|
1758
1806
|
className: "max-w-full"
|
|
1759
1807
|
});
|
|
1760
|
-
case
|
|
1808
|
+
case Mt.Unsupported: return /* @__PURE__ */ J("p", {
|
|
1761
1809
|
className: "m-0",
|
|
1762
1810
|
children: p
|
|
1763
1811
|
});
|
|
@@ -1766,10 +1814,10 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1766
1814
|
})
|
|
1767
1815
|
]
|
|
1768
1816
|
});
|
|
1769
|
-
},
|
|
1817
|
+
}, or = new Intl.NumberFormat(void 0, { maximumFractionDigits: 2 }), sr = /* @__PURE__ */ function(e) {
|
|
1770
1818
|
return e.Default = "default", e.Warning = "warning", e.Danger = "danger", e;
|
|
1771
|
-
}({}),
|
|
1772
|
-
let t =
|
|
1819
|
+
}({}), cr = (e) => !Number.isFinite(e.used) || !Number.isFinite(e.total) ? 0 : Math.min(Math.max(e.used, 0), Math.max(e.total, 0)), lr = (e) => Number.isFinite(e) && e > 0 ? e : 1, ur = ({ used: e, total: t, valueLabel: n }) => n ?? `${or.format(e)} / ${or.format(t)}`, dr = ({ total: e }) => Number.isFinite(e) && e > 0, fr = (e) => e.isUnlimited !== !0 && dr(e), pr = (e) => dr(e) ? Math.max(e.used, 0) / e.total : 0, mr = (e) => {
|
|
1820
|
+
let t = pr(e);
|
|
1773
1821
|
return t >= 1 ? "danger" : t >= .75 ? "warning" : "default";
|
|
1774
1822
|
}, $ = {
|
|
1775
1823
|
sectionHeading: "_sectionHeading_1v3yh_2",
|
|
@@ -1782,12 +1830,12 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1782
1830
|
progressFillDanger: "_progressFillDanger_1v3yh_33",
|
|
1783
1831
|
resetLabel: "_resetLabel_1v3yh_38",
|
|
1784
1832
|
valueDanger: "_valueDanger_1v3yh_43"
|
|
1785
|
-
},
|
|
1786
|
-
let s =
|
|
1787
|
-
value:
|
|
1788
|
-
max:
|
|
1833
|
+
}, hr = ({ row: e, layout: t, labelClassName: n, captionClassName: r, valueClassName: i, noteValueClassName: a, noteClassName: o }) => {
|
|
1834
|
+
let s = ur(e), c = mr(e), l = /* @__PURE__ */ J(Le, {
|
|
1835
|
+
value: cr(e),
|
|
1836
|
+
max: lr(e.total),
|
|
1789
1837
|
size: H.Small,
|
|
1790
|
-
className: P("!h-1 w-full", $.progressTrack, c ===
|
|
1838
|
+
className: P("!h-1 w-full", $.progressTrack, c === sr.Default && $.progressFillDefault, c === sr.Warning && $.progressFillWarning, c === sr.Danger && $.progressFillDanger),
|
|
1791
1839
|
"aria-label": e.label,
|
|
1792
1840
|
"aria-valuetext": e.ariaLabel ?? s
|
|
1793
1841
|
}), u = e.captionLabel != null && /* @__PURE__ */ J("span", {
|
|
@@ -1802,7 +1850,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1802
1850
|
className: "sr-only",
|
|
1803
1851
|
children: e.resetAriaLabel
|
|
1804
1852
|
})] });
|
|
1805
|
-
return t ===
|
|
1853
|
+
return t === At.Stacked ? /* @__PURE__ */ Y("li", {
|
|
1806
1854
|
className: P("flex flex-col gap-2 border-b py-3 first:pt-0 last:border-b-0 last:pb-0", $.divider),
|
|
1807
1855
|
children: [
|
|
1808
1856
|
/* @__PURE__ */ Y("div", {
|
|
@@ -1811,12 +1859,12 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1811
1859
|
className: P("min-w-0 break-words", n, $.valuePrimary),
|
|
1812
1860
|
children: e.label
|
|
1813
1861
|
}), /* @__PURE__ */ J("span", {
|
|
1814
|
-
className: P("shrink-0", i, c ===
|
|
1862
|
+
className: P("shrink-0", i, c === sr.Danger ? $.valueDanger : $.valuePrimary),
|
|
1815
1863
|
children: s
|
|
1816
1864
|
})]
|
|
1817
1865
|
}),
|
|
1818
1866
|
u,
|
|
1819
|
-
|
|
1867
|
+
fr(e) ? l : e.noteLabel != null && /* @__PURE__ */ J("span", {
|
|
1820
1868
|
className: P(o, $.label),
|
|
1821
1869
|
children: e.noteLabel
|
|
1822
1870
|
}),
|
|
@@ -1834,7 +1882,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1834
1882
|
u,
|
|
1835
1883
|
d
|
|
1836
1884
|
]
|
|
1837
|
-
}),
|
|
1885
|
+
}), fr(e) ? /* @__PURE__ */ Y("div", {
|
|
1838
1886
|
className: "flex w-32 shrink-0 flex-col items-end gap-2",
|
|
1839
1887
|
children: [/* @__PURE__ */ J("div", {
|
|
1840
1888
|
className: P("flex gap-1", i),
|
|
@@ -1860,12 +1908,12 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1860
1908
|
})]
|
|
1861
1909
|
})]
|
|
1862
1910
|
});
|
|
1863
|
-
},
|
|
1911
|
+
}, gr = ({ group: e, sectionClassName: t, layout: n, labelClassName: r, captionClassName: i, valueClassName: a, noteValueClassName: o, noteClassName: s }) => /* @__PURE__ */ Y("section", { children: [/* @__PURE__ */ J("p", {
|
|
1864
1912
|
className: P("mb-3 mt-0", t, $.sectionHeading),
|
|
1865
1913
|
children: e.label
|
|
1866
1914
|
}), /* @__PURE__ */ J("ul", {
|
|
1867
1915
|
className: "m-0 flex list-none flex-col p-0",
|
|
1868
|
-
children: e.rows.map((e) => /* @__PURE__ */ J(
|
|
1916
|
+
children: e.rows.map((e) => /* @__PURE__ */ J(hr, {
|
|
1869
1917
|
row: e,
|
|
1870
1918
|
layout: n,
|
|
1871
1919
|
labelClassName: r,
|
|
@@ -1874,7 +1922,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1874
1922
|
noteValueClassName: o,
|
|
1875
1923
|
noteClassName: s
|
|
1876
1924
|
}, e.label))
|
|
1877
|
-
})] }),
|
|
1925
|
+
})] }), _r = ({ limits: e, layout: t = At.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 }) => {
|
|
1878
1926
|
let d = e?.groups.filter((e) => e.rows.length > 0);
|
|
1879
1927
|
return d == null || d.length === 0 ? null : /* @__PURE__ */ Y("div", {
|
|
1880
1928
|
className: "flex flex-col gap-6",
|
|
@@ -1889,7 +1937,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1889
1937
|
"--lt-progress-fill-warning": u?.progressFillWarning,
|
|
1890
1938
|
"--lt-progress-fill-danger": u?.progressFillDanger
|
|
1891
1939
|
}),
|
|
1892
|
-
children: [d.map((e) => /* @__PURE__ */ J(
|
|
1940
|
+
children: [d.map((e) => /* @__PURE__ */ J(gr, {
|
|
1893
1941
|
group: e,
|
|
1894
1942
|
layout: t,
|
|
1895
1943
|
sectionClassName: s,
|
|
@@ -1903,13 +1951,13 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1903
1951
|
children: l
|
|
1904
1952
|
})]
|
|
1905
1953
|
});
|
|
1906
|
-
},
|
|
1954
|
+
}, vr = ({ sections: e, sectionClassName: t, labelClassName: n, valueClassName: r, valueTrueClassName: i, yesLabel: a, noLabel: o, sectionContainerClassName: s = "px-6" }) => e ? /* @__PURE__ */ J("div", {
|
|
1907
1955
|
className: "flex flex-col gap-4",
|
|
1908
|
-
children: e.map((e,
|
|
1956
|
+
children: e.map((e, c) => /* @__PURE__ */ Y("div", {
|
|
1909
1957
|
className: "flex flex-col gap-4",
|
|
1910
|
-
children: [
|
|
1911
|
-
className:
|
|
1912
|
-
children: /* @__PURE__ */ J(
|
|
1958
|
+
children: [c > 0 && /* @__PURE__ */ J("div", { className: P("shrink-0 border-b", Hn.divider) }), /* @__PURE__ */ J("div", {
|
|
1959
|
+
className: s,
|
|
1960
|
+
children: /* @__PURE__ */ J(bn, {
|
|
1913
1961
|
sectionLabel: e.title,
|
|
1914
1962
|
values: e.specs,
|
|
1915
1963
|
sectionClassName: t,
|
|
@@ -1920,8 +1968,8 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1920
1968
|
noLabel: o
|
|
1921
1969
|
})
|
|
1922
1970
|
})]
|
|
1923
|
-
},
|
|
1924
|
-
}) : null,
|
|
1971
|
+
}, c))
|
|
1972
|
+
}) : null, yr = ({ pricing: e, pricesSectionLabel: t = "Token pricing", characterPricesSectionLabel: n = "Character pricing", limitsSectionLabel: r = "Usage limits", labelClassName: i = "dial-small-semi-text", valueClassName: a = "dial-small-text", sectionClassName: o = "dial-caption-text" }) => {
|
|
1925
1973
|
if (e == null) return null;
|
|
1926
1974
|
let s = e.prices?.map((e) => ({
|
|
1927
1975
|
label: e.label,
|
|
@@ -1932,13 +1980,13 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1932
1980
|
}));
|
|
1933
1981
|
return /* @__PURE__ */ Y("div", {
|
|
1934
1982
|
className: "flex flex-col gap-4",
|
|
1935
|
-
children: [/* @__PURE__ */ J(
|
|
1983
|
+
children: [/* @__PURE__ */ J(bn, {
|
|
1936
1984
|
sectionLabel: e.unit === Dt.Character ? n : t,
|
|
1937
1985
|
values: s ?? [],
|
|
1938
1986
|
labelClassName: i,
|
|
1939
1987
|
valueClassName: a,
|
|
1940
1988
|
sectionClassName: o
|
|
1941
|
-
}), /* @__PURE__ */ J(
|
|
1989
|
+
}), /* @__PURE__ */ J(bn, {
|
|
1942
1990
|
sectionLabel: r,
|
|
1943
1991
|
values: c ?? [],
|
|
1944
1992
|
labelClassName: i,
|
|
@@ -1946,104 +1994,130 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1946
1994
|
sectionClassName: o
|
|
1947
1995
|
})]
|
|
1948
1996
|
});
|
|
1949
|
-
},
|
|
1997
|
+
}, br = {
|
|
1950
1998
|
container: "_container_ddi3i_1",
|
|
1951
1999
|
header: "_header_ddi3i_5",
|
|
1952
2000
|
cell: "_cell_ddi3i_10",
|
|
1953
2001
|
evenRow: "_evenRow_ddi3i_17"
|
|
1954
|
-
},
|
|
2002
|
+
}, xr = ({ columns: e, rows: t, columnsTemplate: n, headingClassName: r = "dial-caption-lead-semi-text", cellClassName: i = "dial-tiny-text" }) => {
|
|
1955
2003
|
let a = n ?? `repeat(${e.length}, 1fr)`;
|
|
1956
2004
|
return /* @__PURE__ */ Y("div", {
|
|
1957
|
-
className: P(
|
|
2005
|
+
className: P(br.container, "grid overflow-hidden rounded-md"),
|
|
1958
2006
|
style: { gridTemplateColumns: a },
|
|
1959
2007
|
children: [e.map((e) => /* @__PURE__ */ J("div", {
|
|
1960
|
-
className: P("px-2 py-1 text-start", r,
|
|
2008
|
+
className: P("px-2 py-1 text-start", r, br.header),
|
|
1961
2009
|
children: e
|
|
1962
2010
|
}, e)), t.map((e, t) => /* @__PURE__ */ J(oe, { children: e.map((e, n) => /* @__PURE__ */ J("div", {
|
|
1963
|
-
className: P("px-2 py-1.5", i,
|
|
2011
|
+
className: P("px-2 py-1.5", i, br.cell, t % 2 == 1 ? br.evenRow : void 0),
|
|
1964
2012
|
children: e
|
|
1965
2013
|
}, n)) }, t))]
|
|
1966
2014
|
});
|
|
1967
|
-
},
|
|
1968
|
-
divider: "
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
2015
|
+
}, Sr = {
|
|
2016
|
+
divider: "_divider_4udep_1",
|
|
2017
|
+
count: "_count_4udep_5",
|
|
2018
|
+
description: "_description_4udep_9",
|
|
2019
|
+
code: "_code_4udep_13"
|
|
2020
|
+
}, Cr = {
|
|
1972
2021
|
inputName: "Name",
|
|
1973
2022
|
inputType: "Type",
|
|
1974
2023
|
inputRequired: "Required",
|
|
1975
2024
|
annotationKey: "Key",
|
|
1976
|
-
annotationValue: "Value"
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
2025
|
+
annotationValue: "Value",
|
|
2026
|
+
searchPlaceholder: "Search...",
|
|
2027
|
+
searchClearLabel: "Clear search",
|
|
2028
|
+
toolCount: (e) => `${e} tools`,
|
|
2029
|
+
noResults: "No results found"
|
|
2030
|
+
}, wr = (e, t) => e.name.toLowerCase().includes(t) || (e.description?.toLowerCase().includes(t) ?? !1), Tr = ({ tools: e, toolNameClassName: t = "dial-small-semi-text", descriptionClassName: n = "dial-small-text", tableHeadingClassName: r = "dial-caption-text", tableCellClassName: i = "dial-tiny-text", countClassName: a = "dial-tiny-text", labels: o }) => {
|
|
2031
|
+
let s = {
|
|
2032
|
+
...Cr,
|
|
2033
|
+
...o
|
|
2034
|
+
}, [c, l] = z(""), u = L(() => {
|
|
2035
|
+
let t = c.trim().toLowerCase(), n = e?.tools ?? [];
|
|
2036
|
+
return t === "" ? n : n.filter((e) => wr(e, t));
|
|
2037
|
+
}, [e, c]);
|
|
2038
|
+
return e == null ? null : /* @__PURE__ */ Y("div", {
|
|
1983
2039
|
className: "flex flex-col",
|
|
1984
|
-
children:
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
/* @__PURE__ */
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2040
|
+
children: [
|
|
2041
|
+
/* @__PURE__ */ Y("div", {
|
|
2042
|
+
className: "flex flex-col gap-3 pb-2 pt-4",
|
|
2043
|
+
children: [/* @__PURE__ */ J(ze, {
|
|
2044
|
+
value: c,
|
|
2045
|
+
placeholder: s.searchPlaceholder,
|
|
2046
|
+
"aria-label": s.searchPlaceholder,
|
|
2047
|
+
clearLabel: s.searchClearLabel,
|
|
2048
|
+
onChange: (e) => l(e ?? "")
|
|
2049
|
+
}), /* @__PURE__ */ J("span", {
|
|
2050
|
+
role: "status",
|
|
2051
|
+
"aria-live": "polite",
|
|
2052
|
+
className: P(a, Sr.count),
|
|
2053
|
+
children: s.toolCount(u.length)
|
|
2054
|
+
})]
|
|
2055
|
+
}),
|
|
2056
|
+
u.length === 0 && c.trim() !== "" && /* @__PURE__ */ J(M, { label: s.noResults }),
|
|
2057
|
+
u.map((e, a) => /* @__PURE__ */ Y("div", {
|
|
2058
|
+
className: P("flex flex-col gap-3 px-[22px] py-4", a > 0 ? Sr.divider : void 0),
|
|
2059
|
+
children: [
|
|
2060
|
+
/* @__PURE__ */ Y("div", {
|
|
2061
|
+
className: "flex flex-col gap-1",
|
|
2062
|
+
children: [/* @__PURE__ */ J("span", {
|
|
2063
|
+
className: t,
|
|
2007
2064
|
children: e.name
|
|
2008
|
-
}, "
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2065
|
+
}), e.description != null && /* @__PURE__ */ J("p", {
|
|
2066
|
+
className: P("m-0", n, Sr.description),
|
|
2067
|
+
children: e.description
|
|
2068
|
+
})]
|
|
2069
|
+
}),
|
|
2070
|
+
e.inputParams != null && e.inputParams.length > 0 && /* @__PURE__ */ J(xr, {
|
|
2071
|
+
columns: [
|
|
2072
|
+
s.inputName,
|
|
2073
|
+
s.inputType,
|
|
2074
|
+
s.inputRequired
|
|
2075
|
+
],
|
|
2076
|
+
columnsTemplate: "1fr 1fr auto",
|
|
2077
|
+
rows: e.inputParams.map((e) => [
|
|
2078
|
+
/* @__PURE__ */ J("code", {
|
|
2079
|
+
className: P("text-inherit border-none bg-transparent p-0", Sr.code),
|
|
2080
|
+
children: e.name
|
|
2081
|
+
}, "name"),
|
|
2082
|
+
/* @__PURE__ */ J("code", {
|
|
2083
|
+
className: P("text-inherit border-none bg-transparent p-0", Sr.code),
|
|
2084
|
+
children: e.type
|
|
2085
|
+
}, "type"),
|
|
2086
|
+
e.isRequired ? "✓" : "—"
|
|
2087
|
+
]),
|
|
2088
|
+
headingClassName: r,
|
|
2089
|
+
cellClassName: i
|
|
2090
|
+
}),
|
|
2091
|
+
e.annotations != null && e.annotations.length > 0 && /* @__PURE__ */ J(xr, {
|
|
2092
|
+
columns: [s.annotationKey, s.annotationValue],
|
|
2093
|
+
rows: e.annotations.map((e) => [/* @__PURE__ */ J("code", {
|
|
2094
|
+
className: P("text-inherit border-none bg-transparent p-0", Sr.code),
|
|
2095
|
+
children: e.key
|
|
2096
|
+
}, "key"), e.value]),
|
|
2097
|
+
headingClassName: r,
|
|
2098
|
+
cellClassName: i
|
|
2099
|
+
})
|
|
2100
|
+
]
|
|
2101
|
+
}, e.name))
|
|
2102
|
+
]
|
|
2029
2103
|
});
|
|
2030
|
-
},
|
|
2104
|
+
}, Er = (e, t) => t == null ? e.length === 1 ? e[0] : void 0 : e.find((e) => e.key === t), Dr = async () => void 0, Or = [], kr = [], Ar = [
|
|
2031
2105
|
"All shared configurations will be lost",
|
|
2032
2106
|
"Users who rely on it will lose access",
|
|
2033
2107
|
"Cannot be undone"
|
|
2034
|
-
],
|
|
2108
|
+
], jr = [
|
|
2035
2109
|
"You will lose access to this item",
|
|
2036
2110
|
"Other people keep their access",
|
|
2037
2111
|
"You will need a new invitation to get it back"
|
|
2038
|
-
],
|
|
2112
|
+
], Mr = [
|
|
2039
2113
|
"Everyone loses access to the published copy",
|
|
2040
2114
|
"Your own copy is not deleted",
|
|
2041
2115
|
"You can publish it again later"
|
|
2042
|
-
],
|
|
2116
|
+
], Nr = [
|
|
2043
2117
|
"Everyone you shared it with loses access",
|
|
2044
2118
|
"Existing share links stop working",
|
|
2045
2119
|
"You keep full access — nothing is deleted"
|
|
2046
|
-
],
|
|
2120
|
+
], Pr = (e) => e === x.ApiKey ? "Toolset API keys" : "Toolset credentials", Fr = (e) => e === t.Global ? "Are you sure you want to delete the organization API key?" : "Are you sure you want to delete your personal API key?", Ir = new Set([Z.Delete, Z.Unshare]), Lr = ({ item: e, isOpen: i, isStarred: o = !1, isDetailsLoading: s = !1, isReadonly: c = !1, onClose: l, onToggleFavorite: u, isFavoriteVisible: f, onUseInChat: p, isPrimaryActionVisible: m, onShare: h, isPublishVisible: _, isPublishPrimary: y, getPublishHistory: b, publishFolderItems: x = Or, publishExpandedPaths: S, onPublishExpandedPathsChange: C, publishLoadingPaths: D, hasPublishWriteAccess: O, publishDefaultAuthor: k, onPublish: ee, onPublishSuccess: A, onPublishError: te, onCreatePublishFolder: j, publishLabels: ne, ruleSourceOptions: re = kr, onFetchExistingRules: M, shareOverlay: N, isShareVisible: ae, isSharePrimary: oe, onEdit: se, onDownload: ce, isDownloadVisible: le, isDownloadPrimary: ue, onLoadContentFile: de, onLoadContentFilePreview: fe, renderContentFilePreview: pe, renderContentFileTree: me, renderCredentials: he, onDelete: ge, onUnshare: _e, isUnshareVisible: ve, onRevokeShare: ye, onFetchRecipientsCount: be, isRevokeShareVisible: B, onUnpublish: V, isUnpublishVisible: Se, onLogin: Ce, onLogout: we, texts: H, styles: Te, limitsFooterNote: Ee }) => {
|
|
2047
2121
|
let { subViewTitleClassName: De = "dial-body-semi-text", overviewSectionClassName: Oe = "dial-caption-text", overviewLabelClassName: ke = "dial-small-semi-text", overviewValueClassName: Ae = "dial-small-text", overviewValueTrueClassName: je = "dial-small-text", confirmMessageClassName: Me = "dial-small-text" } = Te?.typography ?? {}, U = Te?.colors, Ne = ie({
|
|
2048
2122
|
"--cat-details-backdrop": U?.backdrop,
|
|
2049
2123
|
"--cat-details-bg": U?.background,
|
|
@@ -2059,6 +2133,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2059
2133
|
"--cat-api-heading-text": U?.apiHeadingText,
|
|
2060
2134
|
"--cat-tools-divider": U?.toolsDivider,
|
|
2061
2135
|
"--cat-tools-description-text": U?.toolsDescriptionText,
|
|
2136
|
+
"--cat-tools-count-text": U?.toolsCountText,
|
|
2062
2137
|
"--cat-grid-border": U?.gridBorder,
|
|
2063
2138
|
"--cat-grid-header-text": U?.gridHeaderText,
|
|
2064
2139
|
"--cat-grid-header-bg": U?.gridHeaderBackground,
|
|
@@ -2076,11 +2151,11 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2076
2151
|
"--cat-cred-card-title-text": U?.credentialsCardTitleText,
|
|
2077
2152
|
"--cat-cred-card-description-text": U?.credentialsCardDescriptionText
|
|
2078
2153
|
}), [Pe, W] = z(o), [Fe, Ie] = z(""), [Le, ze] = z(!1), [Be, Ue] = z([]), [We, Ke] = z(!1), G = R(null), K = e.details?.promptContent, qe = K?.selectedFileId, [Je, Ye] = z(null), [Xe, Ze] = z(!1), [Qe, $e] = z(/* @__PURE__ */ new Set()), [et, tt] = z(!1), nt = R(null), rt = R(0), it = F((e) => {
|
|
2079
|
-
let t = nt.current, n = e?.preview?.type ===
|
|
2154
|
+
let t = nt.current, n = e?.preview?.type === Mt.Image ? e.preview.url : null;
|
|
2080
2155
|
t != null && t !== n && t.startsWith("blob:") && URL.revokeObjectURL(t), nt.current = n, Ye(e);
|
|
2081
2156
|
}, []);
|
|
2082
2157
|
I(() => {
|
|
2083
|
-
rt.current += 1, it(null), Ze(!1), $e(
|
|
2158
|
+
rt.current += 1, it(null), Ze(!1), $e(gn(K?.files ?? [])), tt(!1);
|
|
2084
2159
|
}, [e.id, qe]), I(() => () => {
|
|
2085
2160
|
let e = nt.current;
|
|
2086
2161
|
e != null && e.startsWith("blob:") && URL.revokeObjectURL(e);
|
|
@@ -2110,11 +2185,11 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2110
2185
|
}), Ze(!0);
|
|
2111
2186
|
try {
|
|
2112
2187
|
let n = fe == null ? await de?.(e).then((e) => e == null ? void 0 : {
|
|
2113
|
-
type:
|
|
2188
|
+
type: Mt.Markdown,
|
|
2114
2189
|
text: e
|
|
2115
2190
|
}) : await fe(e);
|
|
2116
2191
|
if (rt.current !== t) {
|
|
2117
|
-
n?.type ===
|
|
2192
|
+
n?.type === Mt.Image && n.url.startsWith("blob:") && URL.revokeObjectURL(n.url);
|
|
2118
2193
|
return;
|
|
2119
2194
|
}
|
|
2120
2195
|
it({
|
|
@@ -2137,9 +2212,9 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2137
2212
|
pe,
|
|
2138
2213
|
it
|
|
2139
2214
|
]), st = Je?.id ?? qe, ct = () => Je == null ? null : Je.preview == null ? {
|
|
2140
|
-
type:
|
|
2215
|
+
type: Mt.Text,
|
|
2141
2216
|
text: H?.contentFileErrorLabel ?? "Failed to load this file."
|
|
2142
|
-
} : Je.preview, lt = Je != null && pe != null ? pe(Je.id,
|
|
2217
|
+
} : Je.preview, lt = Je != null && pe != null ? pe(Je.id, _n(K?.files ?? [], Je.id) ?? "") : void 0, ut = F(() => {
|
|
2143
2218
|
if (!b || G.current === e.id) return;
|
|
2144
2219
|
let t = e.id;
|
|
2145
2220
|
G.current = t, (async () => {
|
|
@@ -2165,7 +2240,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2165
2240
|
hasWriteAccess: O,
|
|
2166
2241
|
defaultAuthor: k,
|
|
2167
2242
|
onCreateFolder: j,
|
|
2168
|
-
onPublish: ee ??
|
|
2243
|
+
onPublish: ee ?? Dr,
|
|
2169
2244
|
onPublishSuccess: dt,
|
|
2170
2245
|
onPublishError: te,
|
|
2171
2246
|
onFetchExistingRules: M
|
|
@@ -2181,25 +2256,25 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2181
2256
|
q.hasWriteAccess,
|
|
2182
2257
|
q.isSubmitting,
|
|
2183
2258
|
q.hasSubmitError
|
|
2184
|
-
]), [mt, ht] = z(!1), [gt, _t] = z(null), [vt, yt] = z(!1), [Tt, X] = z(null), [Et, Dt] = z(null), [Ot,
|
|
2259
|
+
]), [mt, ht] = z(!1), [gt, _t] = z(null), [vt, yt] = z(!1), [Tt, X] = z(null), [Et, Dt] = z(null), [Ot, Q] = z(null);
|
|
2185
2260
|
I(() => {
|
|
2186
2261
|
W(o);
|
|
2187
2262
|
}, [e.id, o]), I(() => {
|
|
2188
|
-
Ie(""), ze(!1), q.reset(), Ue([]), Ke(!1), G.current = null,
|
|
2263
|
+
Ie(""), ze(!1), q.reset(), Ue([]), Ke(!1), G.current = null, Q(null), ht(!1), _t(null), yt(!1), X(null), Dt(null);
|
|
2189
2264
|
}, [e.id]);
|
|
2190
|
-
let
|
|
2265
|
+
let kt = !c && !!V && Se?.(e) === !0;
|
|
2191
2266
|
I(() => {
|
|
2192
|
-
|
|
2193
|
-
}, [
|
|
2194
|
-
let
|
|
2267
|
+
kt && ut();
|
|
2268
|
+
}, [kt, ut]);
|
|
2269
|
+
let At = F(() => ht(!0), []), jt = F(() => ht(!1), []), Nt = F(() => {
|
|
2195
2270
|
_t(Z.Delete);
|
|
2196
|
-
}, []),
|
|
2271
|
+
}, []), Pt = F((t) => {
|
|
2197
2272
|
Dt(t ?? (e.credentials == null ? null : r(e.credentials))), _t(Z.Logout);
|
|
2198
|
-
}, [e.credentials]),
|
|
2273
|
+
}, [e.credentials]), It = F(() => {
|
|
2199
2274
|
_t(Z.Unshare);
|
|
2200
|
-
}, []),
|
|
2275
|
+
}, []), Lt = F(() => {
|
|
2201
2276
|
_t(Z.RevokeAccess);
|
|
2202
|
-
}, []),
|
|
2277
|
+
}, []), Rt = L(() => {
|
|
2203
2278
|
let e = /* @__PURE__ */ new Set(), t = [];
|
|
2204
2279
|
for (let n of Be) {
|
|
2205
2280
|
let r = n.folderPath.join("/");
|
|
@@ -2209,13 +2284,13 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2209
2284
|
}));
|
|
2210
2285
|
}
|
|
2211
2286
|
return t;
|
|
2212
|
-
}, [Be]),
|
|
2287
|
+
}, [Be]), zt = We && Rt.length > 0, Bt = F((e) => e || (ne?.rootFolderLabel ?? "Organization"), [ne]), Vt = F(() => {
|
|
2213
2288
|
_t(Z.Unpublish);
|
|
2214
|
-
}, []),
|
|
2289
|
+
}, []), Ht = F((e) => {
|
|
2215
2290
|
X(e), _t(Z.DeleteApiKey);
|
|
2216
|
-
}, []),
|
|
2217
|
-
vt || (_t(null), X(null), Dt(null),
|
|
2218
|
-
}, [vt]),
|
|
2291
|
+
}, []), Ut = F(() => {
|
|
2292
|
+
vt || (_t(null), X(null), Dt(null), Q(null));
|
|
2293
|
+
}, [vt]), Wt = F(async () => {
|
|
2219
2294
|
if (!(vt || gt == null)) {
|
|
2220
2295
|
yt(!0);
|
|
2221
2296
|
try {
|
|
@@ -2236,14 +2311,14 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2236
2311
|
Tt != null && await we?.(e, { level: Tt });
|
|
2237
2312
|
break;
|
|
2238
2313
|
case Z.Unpublish: {
|
|
2239
|
-
let t =
|
|
2314
|
+
let t = Er(Rt, Ot);
|
|
2240
2315
|
t != null && await V?.(e, t.segments);
|
|
2241
2316
|
break;
|
|
2242
2317
|
}
|
|
2243
2318
|
}
|
|
2244
|
-
_t(null), X(null), Dt(null),
|
|
2319
|
+
_t(null), X(null), Dt(null), Q(null), Ir.has(gt) && l();
|
|
2245
2320
|
} catch {
|
|
2246
|
-
_t(null), X(null), Dt(null),
|
|
2321
|
+
_t(null), X(null), Dt(null), Q(null);
|
|
2247
2322
|
} finally {
|
|
2248
2323
|
yt(!1);
|
|
2249
2324
|
}
|
|
@@ -2259,33 +2334,33 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2259
2334
|
ye,
|
|
2260
2335
|
V,
|
|
2261
2336
|
Ot,
|
|
2262
|
-
|
|
2337
|
+
Rt,
|
|
2263
2338
|
we,
|
|
2264
2339
|
l
|
|
2265
2340
|
]);
|
|
2266
2341
|
I(() => {
|
|
2267
2342
|
if (!i || gt == null) return;
|
|
2268
2343
|
let e = (e) => {
|
|
2269
|
-
e.key === "Escape" && (e.stopPropagation(),
|
|
2344
|
+
e.key === "Escape" && (e.stopPropagation(), Ut());
|
|
2270
2345
|
};
|
|
2271
2346
|
return document.addEventListener("keydown", e, !0), () => document.removeEventListener("keydown", e, !0);
|
|
2272
2347
|
}, [
|
|
2273
2348
|
i,
|
|
2274
2349
|
gt,
|
|
2275
|
-
|
|
2350
|
+
Ut
|
|
2276
2351
|
]);
|
|
2277
|
-
let
|
|
2352
|
+
let Gt = F(() => ze(!0), []), Kt = F(() => {
|
|
2278
2353
|
ze(!1), q.reset();
|
|
2279
|
-
}, [q]),
|
|
2280
|
-
await q.handleSubmit() &&
|
|
2281
|
-
}, [q,
|
|
2354
|
+
}, [q]), qt = F(async () => {
|
|
2355
|
+
await q.handleSubmit() && Kt();
|
|
2356
|
+
}, [q, Kt]), Jt = F(() => {
|
|
2282
2357
|
let t = !Pe;
|
|
2283
2358
|
W(t), u?.(e.id, t);
|
|
2284
2359
|
}, [
|
|
2285
2360
|
Pe,
|
|
2286
2361
|
e.id,
|
|
2287
2362
|
u
|
|
2288
|
-
]),
|
|
2363
|
+
]), Yt = L(() => {
|
|
2289
2364
|
let t = {
|
|
2290
2365
|
[n.About]: H?.tabAboutLabel ?? "About",
|
|
2291
2366
|
[n.Content]: H?.tabContentLabel ?? "Details",
|
|
@@ -2299,16 +2374,19 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2299
2374
|
id: e,
|
|
2300
2375
|
label: t[e]
|
|
2301
2376
|
}));
|
|
2302
|
-
}, [e, H]),
|
|
2377
|
+
}, [e, H]), Xt = R(null);
|
|
2303
2378
|
I(() => {
|
|
2304
|
-
let t =
|
|
2305
|
-
|
|
2379
|
+
let t = Xt.current !== e.id;
|
|
2380
|
+
Xt.current = e.id, (t || !Yt.some((e) => e.id === Fe)) && Ie(Yt[0]?.id ?? "");
|
|
2306
2381
|
}, [
|
|
2307
2382
|
e.id,
|
|
2308
|
-
|
|
2383
|
+
Yt,
|
|
2309
2384
|
Fe
|
|
2310
2385
|
]);
|
|
2311
|
-
let
|
|
2386
|
+
let Zt = L(() => Ft(H), [H]), Qt = L(() => {
|
|
2387
|
+
let e = {};
|
|
2388
|
+
return H?.toolsSearchPlaceholder != null && (e.searchPlaceholder = H.toolsSearchPlaceholder), H?.toolsSearchClearLabel != null && (e.searchClearLabel = H.toolsSearchClearLabel), H?.toolsCountLabel != null && (e.toolCount = H.toolsCountLabel), H?.toolsNoResultsLabel != null && (e.noResults = H.toolsNoResultsLabel), e;
|
|
2389
|
+
}, [H]), en = H?.overviewYesLabel ?? "Yes", tn = H?.overviewNoLabel ?? "No", nn = H?.ariaLabel ?? "Item details", rn = H?.closeAriaLabel ?? "Close", an = Pe ? H?.removeFromFavoritesAriaLabel ?? "Remove from favorites" : H?.addToFavoritesAriaLabel ?? "Add to favorites", on = H?.publishTitle ?? "Publish", sn = H?.backToDetailsAriaLabel ?? "Back", cn = H?.cancelLabel ?? "Cancel", ln = L(() => {
|
|
2312
2390
|
switch (gt) {
|
|
2313
2391
|
case Z.Delete: {
|
|
2314
2392
|
let t = H?.deleteActionLabel ?? "Delete";
|
|
@@ -2319,7 +2397,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2319
2397
|
/* @__PURE__ */ J("strong", { children: e.name }),
|
|
2320
2398
|
"? This action is permanent and cannot be undone."
|
|
2321
2399
|
] }),
|
|
2322
|
-
consequences: H?.deleteConfirmConsequences ??
|
|
2400
|
+
consequences: H?.deleteConfirmConsequences ?? Ar,
|
|
2323
2401
|
confirmLabel: t,
|
|
2324
2402
|
loadingStatusLabel: H?.deletingStatusLabel ?? "Deleting",
|
|
2325
2403
|
variant: xe.Danger
|
|
@@ -2334,7 +2412,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2334
2412
|
/* @__PURE__ */ J("strong", { children: e.name }),
|
|
2335
2413
|
" from your list? You'll need a new invitation to access it again."
|
|
2336
2414
|
] }),
|
|
2337
|
-
consequences: H?.unshareConfirmConsequences ??
|
|
2415
|
+
consequences: H?.unshareConfirmConsequences ?? jr,
|
|
2338
2416
|
confirmLabel: t,
|
|
2339
2417
|
loadingStatusLabel: H?.unsharingStatusLabel ?? "Removing",
|
|
2340
2418
|
variant: xe.Info
|
|
@@ -2349,14 +2427,14 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2349
2427
|
/* @__PURE__ */ J("strong", { children: e.name }),
|
|
2350
2428
|
"? Anyone you shared it with will lose access."
|
|
2351
2429
|
] }),
|
|
2352
|
-
consequences: H?.revokeShareConfirmConsequences ??
|
|
2430
|
+
consequences: H?.revokeShareConfirmConsequences ?? Nr,
|
|
2353
2431
|
confirmLabel: t,
|
|
2354
2432
|
loadingStatusLabel: H?.revokingShareStatusLabel ?? "Revoking access",
|
|
2355
2433
|
variant: xe.Danger
|
|
2356
2434
|
};
|
|
2357
2435
|
}
|
|
2358
2436
|
case Z.Unpublish: {
|
|
2359
|
-
let t = H?.unpublishLabel ?? "Unpublish", n =
|
|
2437
|
+
let t = H?.unpublishLabel ?? "Unpublish", n = Rt.length === 1, r = n ? Bt(Rt[0].key) : "", i = H?.unpublishConfirmMessage?.(e.name, r) ?? /* @__PURE__ */ Y(bt, { children: [
|
|
2360
2438
|
"Unpublish ",
|
|
2361
2439
|
/* @__PURE__ */ J("strong", { children: e.name }),
|
|
2362
2440
|
" from \"",
|
|
@@ -2370,7 +2448,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2370
2448
|
return {
|
|
2371
2449
|
title: H?.unpublishConfirmTitle ?? t,
|
|
2372
2450
|
message: n ? i : a,
|
|
2373
|
-
consequences: H?.unpublishConfirmConsequences ??
|
|
2451
|
+
consequences: H?.unpublishConfirmConsequences ?? Mr,
|
|
2374
2452
|
confirmLabel: t,
|
|
2375
2453
|
loadingStatusLabel: H?.unpublishingStatusLabel ?? "Requesting unpublish",
|
|
2376
2454
|
variant: xe.Danger
|
|
@@ -2391,7 +2469,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2391
2469
|
let e = H?.deleteActionLabel ?? "Delete", n = Tt ?? t.User;
|
|
2392
2470
|
return {
|
|
2393
2471
|
title: e,
|
|
2394
|
-
message: (H?.deleteApiKeyConfirmMessage ??
|
|
2472
|
+
message: (H?.deleteApiKeyConfirmMessage ?? Fr)(n),
|
|
2395
2473
|
consequences: void 0,
|
|
2396
2474
|
confirmLabel: e,
|
|
2397
2475
|
loadingStatusLabel: H?.deletingStatusLabel ?? "Deleting",
|
|
@@ -2406,48 +2484,48 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2406
2484
|
e.name,
|
|
2407
2485
|
Tt,
|
|
2408
2486
|
H,
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
]),
|
|
2487
|
+
Rt,
|
|
2488
|
+
Bt
|
|
2489
|
+
]), un = ln != null, dn = gt === Z.Unpublish && Er(Rt, Ot) == null, fn = un || Le || mt, pn = e.credentials == null ? "" : (H?.credentialsManagementTitle ?? Pr)(e.credentials.authenticationType), mn = un ? {
|
|
2412
2490
|
title: ln.title,
|
|
2413
2491
|
isBackDisabled: vt,
|
|
2414
|
-
onBack:
|
|
2492
|
+
onBack: Ut
|
|
2415
2493
|
} : Le ? {
|
|
2416
2494
|
title: on,
|
|
2417
2495
|
isBackDisabled: q.isSubmitting,
|
|
2418
|
-
onBack:
|
|
2496
|
+
onBack: Kt
|
|
2419
2497
|
} : mt ? {
|
|
2420
|
-
title:
|
|
2498
|
+
title: pn,
|
|
2421
2499
|
isBackDisabled: !1,
|
|
2422
|
-
onBack:
|
|
2423
|
-
} : null,
|
|
2500
|
+
onBack: jt
|
|
2501
|
+
} : null, hn = mn?.title ?? nn;
|
|
2424
2502
|
return /* @__PURE__ */ Y(Ve, {
|
|
2425
2503
|
open: i,
|
|
2426
2504
|
onClose: l,
|
|
2427
|
-
header:
|
|
2428
|
-
ariaLabel:
|
|
2429
|
-
onBack:
|
|
2505
|
+
header: mn?.title,
|
|
2506
|
+
ariaLabel: hn,
|
|
2507
|
+
onBack: mn?.onBack,
|
|
2430
2508
|
backAriaLabel: sn,
|
|
2431
|
-
backDisabled:
|
|
2432
|
-
hideClose:
|
|
2509
|
+
backDisabled: mn?.isBackDisabled,
|
|
2510
|
+
hideClose: mn != null,
|
|
2433
2511
|
closeAriaLabel: rn,
|
|
2434
|
-
headerActions:
|
|
2512
|
+
headerActions: mn == null && !c && f?.(e) !== !1 ? /* @__PURE__ */ J($t, {
|
|
2435
2513
|
isStarred: Pe,
|
|
2436
2514
|
ariaLabel: an,
|
|
2437
|
-
onClick:
|
|
2515
|
+
onClick: Jt
|
|
2438
2516
|
}) : void 0,
|
|
2439
2517
|
style: Ne,
|
|
2440
2518
|
overlayStyle: Ne,
|
|
2441
|
-
className:
|
|
2442
|
-
overlayClassName:
|
|
2443
|
-
headerClassName:
|
|
2444
|
-
titleClassName: P(De,
|
|
2519
|
+
className: Hn.panel,
|
|
2520
|
+
overlayClassName: Hn.backdrop,
|
|
2521
|
+
headerClassName: Hn.divider,
|
|
2522
|
+
titleClassName: P(De, Hn.publishTitle),
|
|
2445
2523
|
bodyClassName: "flex flex-col overflow-hidden",
|
|
2446
2524
|
children: [
|
|
2447
2525
|
/* @__PURE__ */ Y("div", {
|
|
2448
|
-
className: P("flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto",
|
|
2526
|
+
className: P("flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto", Hn.content),
|
|
2449
2527
|
children: [
|
|
2450
|
-
|
|
2528
|
+
un && /* @__PURE__ */ J(E, {
|
|
2451
2529
|
item: e,
|
|
2452
2530
|
message: ln.message,
|
|
2453
2531
|
consequences: ln.consequences,
|
|
@@ -2459,27 +2537,27 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2459
2537
|
cardBackground: U?.infoCardBackground,
|
|
2460
2538
|
cardDangerBackground: U?.infoCardDangerBackground
|
|
2461
2539
|
} },
|
|
2462
|
-
children: gt === Z.Unpublish &&
|
|
2540
|
+
children: gt === Z.Unpublish && Rt.length > 1 && /* @__PURE__ */ J(Re, {
|
|
2463
2541
|
ariaLabel: H?.unpublishFolderGroupAriaLabel ?? "Published folders",
|
|
2464
2542
|
value: Ot ?? void 0,
|
|
2465
|
-
onChange:
|
|
2543
|
+
onChange: Q,
|
|
2466
2544
|
disabled: vt,
|
|
2467
|
-
items:
|
|
2545
|
+
items: Rt.map((e) => ({
|
|
2468
2546
|
value: e.key,
|
|
2469
|
-
label:
|
|
2547
|
+
label: Bt(e.key)
|
|
2470
2548
|
})),
|
|
2471
2549
|
radioClassName: Me
|
|
2472
2550
|
})
|
|
2473
2551
|
}),
|
|
2474
|
-
!
|
|
2552
|
+
!un && !Le && mt && /* @__PURE__ */ J(Vn, {
|
|
2475
2553
|
item: e,
|
|
2476
2554
|
onLogin: Ce,
|
|
2477
|
-
onRequestLogout:
|
|
2478
|
-
onRequestDeleteApiKey:
|
|
2555
|
+
onRequestLogout: Pt,
|
|
2556
|
+
onRequestDeleteApiKey: Ht,
|
|
2479
2557
|
texts: H,
|
|
2480
2558
|
detailsStyles: Te
|
|
2481
2559
|
}),
|
|
2482
|
-
!
|
|
2560
|
+
!un && Le && /* @__PURE__ */ J("div", {
|
|
2483
2561
|
className: "p-[22px]",
|
|
2484
2562
|
children: /* @__PURE__ */ J(St, {
|
|
2485
2563
|
resource: {
|
|
@@ -2516,8 +2594,8 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2516
2594
|
} }
|
|
2517
2595
|
})
|
|
2518
2596
|
}),
|
|
2519
|
-
!
|
|
2520
|
-
/* @__PURE__ */ J(
|
|
2597
|
+
!fn && /* @__PURE__ */ Y(bt, { children: [
|
|
2598
|
+
/* @__PURE__ */ J($n, {
|
|
2521
2599
|
item: e,
|
|
2522
2600
|
onUseInChat: p,
|
|
2523
2601
|
isPrimaryActionVisible: m,
|
|
@@ -2527,26 +2605,26 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2527
2605
|
isSharePrimary: oe,
|
|
2528
2606
|
isPublishVisible: _,
|
|
2529
2607
|
isPublishPrimary: y,
|
|
2530
|
-
onOpenPublish:
|
|
2608
|
+
onOpenPublish: Gt,
|
|
2531
2609
|
isUnpublishVisible: Se,
|
|
2532
|
-
hasPublishedFolders:
|
|
2610
|
+
hasPublishedFolders: zt,
|
|
2533
2611
|
isPublishHistoryResolved: b == null || We,
|
|
2534
2612
|
onRequestPublishHistory: ut,
|
|
2535
|
-
onOpenUnpublish: V ?
|
|
2613
|
+
onOpenUnpublish: V ? Vt : void 0,
|
|
2536
2614
|
onEdit: se,
|
|
2537
2615
|
onDownload: ce,
|
|
2538
2616
|
isDownloadVisible: le,
|
|
2539
2617
|
isDownloadPrimary: ue,
|
|
2540
|
-
onDelete: ge ?
|
|
2541
|
-
onUnshare: _e ?
|
|
2618
|
+
onDelete: ge ? Nt : void 0,
|
|
2619
|
+
onUnshare: _e ? It : void 0,
|
|
2542
2620
|
isUnshareVisible: ve,
|
|
2543
|
-
onRevokeShare: ye ?
|
|
2621
|
+
onRevokeShare: ye ? Lt : void 0,
|
|
2544
2622
|
onFetchRecipientsCount: be,
|
|
2545
2623
|
isRevokeShareVisible: B,
|
|
2546
2624
|
onLogin: Ce,
|
|
2547
2625
|
onLogout: we,
|
|
2548
|
-
onOpenCredentialsManagement:
|
|
2549
|
-
onRequestLogout:
|
|
2626
|
+
onOpenCredentialsManagement: At,
|
|
2627
|
+
onRequestLogout: Pt,
|
|
2550
2628
|
texts: H,
|
|
2551
2629
|
detailsStyles: Te,
|
|
2552
2630
|
isReadonly: c
|
|
@@ -2555,7 +2633,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2555
2633
|
let t = g(e.credentials);
|
|
2556
2634
|
return t != null && /* @__PURE__ */ J("div", {
|
|
2557
2635
|
className: "px-6",
|
|
2558
|
-
children: /* @__PURE__ */ J(
|
|
2636
|
+
children: /* @__PURE__ */ J(Ln, {
|
|
2559
2637
|
state: t,
|
|
2560
2638
|
authenticationType: e.credentials.authenticationType,
|
|
2561
2639
|
texts: H
|
|
@@ -2566,7 +2644,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2566
2644
|
/* @__PURE__ */ Y("div", {
|
|
2567
2645
|
className: "flex items-center px-6",
|
|
2568
2646
|
children: [/* @__PURE__ */ J(Ge, {
|
|
2569
|
-
tabs:
|
|
2647
|
+
tabs: Yt,
|
|
2570
2648
|
activeTabId: Fe,
|
|
2571
2649
|
onTabChange: Ie
|
|
2572
2650
|
}), s && /* @__PURE__ */ J("div", {
|
|
@@ -2580,20 +2658,20 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2580
2658
|
width: "72px"
|
|
2581
2659
|
},
|
|
2582
2660
|
active: !0,
|
|
2583
|
-
color:
|
|
2661
|
+
color: Hn.skeletonColor
|
|
2584
2662
|
})
|
|
2585
2663
|
})]
|
|
2586
2664
|
}),
|
|
2587
2665
|
/* @__PURE__ */ Y("div", {
|
|
2588
2666
|
className: P("min-h-0 flex-1 overflow-y-auto", Fe !== n.Overview && "px-6"),
|
|
2589
2667
|
children: [
|
|
2590
|
-
Fe === n.About && /* @__PURE__ */ J(
|
|
2668
|
+
Fe === n.About && /* @__PURE__ */ J(er, {
|
|
2591
2669
|
content: e.description,
|
|
2592
2670
|
topics: e.topics,
|
|
2593
2671
|
detailsStyles: Te,
|
|
2594
|
-
markdownLabels:
|
|
2672
|
+
markdownLabels: Zt
|
|
2595
2673
|
}),
|
|
2596
|
-
Fe === n.Content && /* @__PURE__ */ J(
|
|
2674
|
+
Fe === n.Content && /* @__PURE__ */ J(ar, {
|
|
2597
2675
|
content: K?.content ?? "",
|
|
2598
2676
|
filePreview: ct(),
|
|
2599
2677
|
filePreviewContent: lt,
|
|
@@ -2612,9 +2690,9 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2612
2690
|
fileLoadingLabel: H?.contentFileLoadingLabel,
|
|
2613
2691
|
fileUnsupportedLabel: H?.contentFileUnsupportedLabel,
|
|
2614
2692
|
detailsStyles: Te,
|
|
2615
|
-
markdownLabels:
|
|
2693
|
+
markdownLabels: Zt
|
|
2616
2694
|
}),
|
|
2617
|
-
Fe === n.Overview && /* @__PURE__ */ J(
|
|
2695
|
+
Fe === n.Overview && /* @__PURE__ */ J(vr, {
|
|
2618
2696
|
sections: e.details?.overview?.sections,
|
|
2619
2697
|
sectionClassName: Oe,
|
|
2620
2698
|
labelClassName: ke,
|
|
@@ -2623,17 +2701,17 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2623
2701
|
yesLabel: en,
|
|
2624
2702
|
noLabel: tn
|
|
2625
2703
|
}),
|
|
2626
|
-
Fe === n.Pricing && /* @__PURE__ */ J(
|
|
2704
|
+
Fe === n.Pricing && /* @__PURE__ */ J(yr, {
|
|
2627
2705
|
pricing: e.details?.pricing,
|
|
2628
2706
|
pricesSectionLabel: H?.pricingPricesSectionLabel,
|
|
2629
2707
|
characterPricesSectionLabel: H?.pricingCharacterPricesSectionLabel,
|
|
2630
2708
|
limitsSectionLabel: H?.pricingLimitsSectionLabel
|
|
2631
2709
|
}),
|
|
2632
|
-
Fe === n.Limits && /* @__PURE__ */ J(
|
|
2710
|
+
Fe === n.Limits && /* @__PURE__ */ J(_r, {
|
|
2633
2711
|
limits: e.details?.limits,
|
|
2634
2712
|
footerNote: Ee
|
|
2635
2713
|
}),
|
|
2636
|
-
Fe === n.Api && d(e.details?.api) && /* @__PURE__ */ J(
|
|
2714
|
+
Fe === n.Api && d(e.details?.api) && /* @__PURE__ */ J(Tn, {
|
|
2637
2715
|
api: e.details?.api,
|
|
2638
2716
|
resourceSectionLabel: H?.apiResourceSectionLabel,
|
|
2639
2717
|
snippetSectionLabel: H?.apiSnippetSectionLabel,
|
|
@@ -2645,35 +2723,38 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2645
2723
|
copyAriaLabel: H?.copyCodeAriaLabel,
|
|
2646
2724
|
copiedStatusLabel: H?.copiedCodeStatusLabel
|
|
2647
2725
|
}),
|
|
2648
|
-
Fe === n.Tools && /* @__PURE__ */ J(
|
|
2726
|
+
Fe === n.Tools && /* @__PURE__ */ J(Tr, {
|
|
2727
|
+
tools: e.details?.tools,
|
|
2728
|
+
labels: Qt
|
|
2729
|
+
})
|
|
2649
2730
|
]
|
|
2650
2731
|
})
|
|
2651
2732
|
] })
|
|
2652
2733
|
]
|
|
2653
2734
|
}),
|
|
2654
|
-
|
|
2735
|
+
un && /* @__PURE__ */ J(T, {
|
|
2655
2736
|
confirmLabel: ln.confirmLabel,
|
|
2656
2737
|
cancelLabel: cn,
|
|
2657
2738
|
variant: ln.variant,
|
|
2658
2739
|
isLoading: vt,
|
|
2659
|
-
isConfirmDisabled:
|
|
2740
|
+
isConfirmDisabled: dn,
|
|
2660
2741
|
loadingStatusLabel: ln.loadingStatusLabel,
|
|
2661
2742
|
styles: { colors: { border: U?.confirmFooterBorder } },
|
|
2662
|
-
onConfirm:
|
|
2663
|
-
onCancel:
|
|
2743
|
+
onConfirm: Wt,
|
|
2744
|
+
onCancel: Ut
|
|
2664
2745
|
}),
|
|
2665
|
-
!
|
|
2746
|
+
!un && Le && /* @__PURE__ */ J(xt, {
|
|
2666
2747
|
version: e.version,
|
|
2667
2748
|
hasExistingPublicationInFolder: q.hasExistingPublicationInFolder,
|
|
2668
2749
|
isSubmitDisabled: pt.isSubmitDisabled,
|
|
2669
2750
|
isSubmitLoading: pt.isSubmitLoading,
|
|
2670
|
-
onCancel:
|
|
2671
|
-
onSubmit:
|
|
2751
|
+
onCancel: Kt,
|
|
2752
|
+
onSubmit: qt,
|
|
2672
2753
|
labels: ne
|
|
2673
2754
|
})
|
|
2674
2755
|
]
|
|
2675
2756
|
});
|
|
2676
|
-
},
|
|
2757
|
+
}, Rr = {
|
|
2677
2758
|
pageNav: "_pageNav_14qfn_1",
|
|
2678
2759
|
navBtn: "_navBtn_14qfn_6",
|
|
2679
2760
|
titleText: "_titleText_14qfn_23",
|
|
@@ -2688,7 +2769,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2688
2769
|
favFadeIn: "_favFadeIn_14qfn_1",
|
|
2689
2770
|
cardLeaving: "_cardLeaving_14qfn_54",
|
|
2690
2771
|
cardFadeOut: "_cardFadeOut_14qfn_1"
|
|
2691
|
-
},
|
|
2772
|
+
}, zr = ({ 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 }) => {
|
|
2692
2773
|
let [m, h] = z(t), [g, _] = z(!1), v = (t) => {
|
|
2693
2774
|
t.stopPropagation();
|
|
2694
2775
|
let r = !m;
|
|
@@ -2705,7 +2786,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2705
2786
|
role: y == null ? void 0 : "button",
|
|
2706
2787
|
tabIndex: y == null ? void 0 : 0,
|
|
2707
2788
|
"aria-label": e.name,
|
|
2708
|
-
className: P("box-border min-w-0 cursor-pointer flex-row items-start gap-1 text-start", g &&
|
|
2789
|
+
className: P("box-border min-w-0 cursor-pointer flex-row items-start gap-1 text-start", g && Rr.cardLeaving, f && Rr.selectedCard, Pt.favoriteCard),
|
|
2709
2790
|
onClick: y,
|
|
2710
2791
|
onKeyDown: b,
|
|
2711
2792
|
onAnimationEnd: g ? (t) => {
|
|
@@ -2714,13 +2795,13 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2714
2795
|
children: [
|
|
2715
2796
|
f && /* @__PURE__ */ J(Xe, {
|
|
2716
2797
|
size: B.SM,
|
|
2717
|
-
className: P("absolute end-3 top-3 shrink-0",
|
|
2798
|
+
className: P("absolute end-3 top-3 shrink-0", Rr.selectedCheck),
|
|
2718
2799
|
"aria-hidden": !0,
|
|
2719
2800
|
stroke: V
|
|
2720
2801
|
}),
|
|
2721
2802
|
/* @__PURE__ */ J("div", {
|
|
2722
2803
|
className: "flex min-w-0 flex-1 flex-col items-start gap-1",
|
|
2723
|
-
children: /* @__PURE__ */ J(
|
|
2804
|
+
children: /* @__PURE__ */ J(Yt, {
|
|
2724
2805
|
icon: e.iconUrl,
|
|
2725
2806
|
type: e.type,
|
|
2726
2807
|
name: e.name,
|
|
@@ -2737,13 +2818,13 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2737
2818
|
lastUsedClassName: c
|
|
2738
2819
|
}
|
|
2739
2820
|
},
|
|
2740
|
-
iconOverlay: /* @__PURE__ */ J(
|
|
2821
|
+
iconOverlay: /* @__PURE__ */ J(Zt, {
|
|
2741
2822
|
credentials: e.credentials,
|
|
2742
2823
|
loggedOutLabel: p
|
|
2743
2824
|
})
|
|
2744
2825
|
})
|
|
2745
2826
|
}),
|
|
2746
|
-
r?.(e) !== !1 && /* @__PURE__ */ J(
|
|
2827
|
+
r?.(e) !== !1 && /* @__PURE__ */ J($t, {
|
|
2747
2828
|
isStarred: m,
|
|
2748
2829
|
size: H.Small,
|
|
2749
2830
|
onClick: v,
|
|
@@ -2752,7 +2833,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2752
2833
|
})
|
|
2753
2834
|
]
|
|
2754
2835
|
});
|
|
2755
|
-
},
|
|
2836
|
+
}, Br = 2, Vr = (e) => {
|
|
2756
2837
|
let t = e.getBoundingClientRect(), n = window.scrollX, r = window.scrollY, i = window.getComputedStyle(e).transform;
|
|
2757
2838
|
if (!i || i === "none") return new DOMRect(t.x + n, t.y + r, t.width, t.height);
|
|
2758
2839
|
try {
|
|
@@ -2761,7 +2842,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2761
2842
|
} catch {
|
|
2762
2843
|
return new DOMRect(t.x + n, t.y + r, t.width, t.height);
|
|
2763
2844
|
}
|
|
2764
|
-
},
|
|
2845
|
+
}, Hr = ({ 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 }) => {
|
|
2765
2846
|
let h = o?.typography?.titleClassName ?? "dial-body-semi-text", g = o?.typography?.countClassName ?? "dial-tiny-semi-text", _ = ie({
|
|
2766
2847
|
"--cat-fav-title-text": o?.colors?.titleText,
|
|
2767
2848
|
"--cat-fav-count-text": o?.colors?.countText,
|
|
@@ -2774,7 +2855,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2774
2855
|
"--cat-fav-nav-btn-active-bg": o?.colors?.navButtonActiveBackground,
|
|
2775
2856
|
"--cat-fav-page-nav-border": o?.colors?.pageNavBorder,
|
|
2776
2857
|
"--cat-fav-page-nav-bg": o?.colors?.pageNavBackground
|
|
2777
|
-
}), v = L(() => [...e].sort((e, t) => (new Date(t.updatedAt || "").getTime() ?? 0) - (new Date(e.updatedAt || "").getTime() ?? 0)), [e]), [y, b] = z(1), x =
|
|
2858
|
+
}), v = L(() => [...e].sort((e, t) => (new Date(t.updatedAt || "").getTime() ?? 0) - (new Date(e.updatedAt || "").getTime() ?? 0)), [e]), [y, b] = z(1), x = Nt(), S = x * Br, C = (y - 1) * S, w = L(() => v.slice(C, C + S), [
|
|
2778
2859
|
v,
|
|
2779
2860
|
C,
|
|
2780
2861
|
S
|
|
@@ -2807,7 +2888,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2807
2888
|
N.current = y, ae.current = x;
|
|
2808
2889
|
let n = k.current.querySelectorAll("[data-card-id]"), r = /* @__PURE__ */ new Map();
|
|
2809
2890
|
if (n.forEach((e) => {
|
|
2810
|
-
r.set(e.dataset.cardId,
|
|
2891
|
+
r.set(e.dataset.cardId, Vr(e));
|
|
2811
2892
|
}), !e && !t) {
|
|
2812
2893
|
let e = O.current, t = oe.current, i = 0;
|
|
2813
2894
|
if (e) {
|
|
@@ -2863,7 +2944,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2863
2944
|
ref: D,
|
|
2864
2945
|
children: /* @__PURE__ */ Y("section", {
|
|
2865
2946
|
ref: O,
|
|
2866
|
-
className: P("flex flex-shrink-0 flex-col gap-4 pb-2 pt-2",
|
|
2947
|
+
className: P("flex flex-shrink-0 flex-col gap-4 pb-2 pt-2", Rr.section, s && Rr.sectionLeaving),
|
|
2867
2948
|
style: {
|
|
2868
2949
|
..._,
|
|
2869
2950
|
minHeight: j
|
|
@@ -2874,17 +2955,17 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2874
2955
|
children: [/* @__PURE__ */ J(te, {
|
|
2875
2956
|
title: n,
|
|
2876
2957
|
postfix: E,
|
|
2877
|
-
titleClassName: P(h,
|
|
2878
|
-
postfixClassName: P(g,
|
|
2958
|
+
titleClassName: P(h, Rr.titleText),
|
|
2959
|
+
postfixClassName: P(g, Rr.countText),
|
|
2879
2960
|
trailing: T > 1 ? /* @__PURE__ */ Y("div", {
|
|
2880
|
-
className: P("inline-flex items-center gap-[2px] rounded-full px-[6px] py-[3px]",
|
|
2961
|
+
className: P("inline-flex items-center gap-[2px] rounded-full px-[6px] py-[3px]", Rr.pageNav),
|
|
2881
2962
|
children: [
|
|
2882
2963
|
/* @__PURE__ */ J(Oe, {
|
|
2883
2964
|
size: H.Small,
|
|
2884
2965
|
"aria-label": l,
|
|
2885
2966
|
disabled: y === 1,
|
|
2886
2967
|
onClick: () => b((e) => e - 1),
|
|
2887
|
-
className: P("rounded-full",
|
|
2968
|
+
className: P("rounded-full", Rr.navBtn),
|
|
2888
2969
|
icon: /* @__PURE__ */ J(Qe, {
|
|
2889
2970
|
size: 14,
|
|
2890
2971
|
"aria-hidden": !0,
|
|
@@ -2893,7 +2974,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2893
2974
|
})
|
|
2894
2975
|
}),
|
|
2895
2976
|
/* @__PURE__ */ Y("span", {
|
|
2896
|
-
className: P("min-w-[32px] select-none px-1 text-center", g,
|
|
2977
|
+
className: P("min-w-[32px] select-none px-1 text-center", g, Rr.countText),
|
|
2897
2978
|
children: [
|
|
2898
2979
|
y,
|
|
2899
2980
|
" / ",
|
|
@@ -2905,7 +2986,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2905
2986
|
"aria-label": u,
|
|
2906
2987
|
disabled: y === T,
|
|
2907
2988
|
onClick: () => b((e) => e + 1),
|
|
2908
|
-
className: P("rounded-full",
|
|
2989
|
+
className: P("rounded-full", Rr.navBtn),
|
|
2909
2990
|
icon: /* @__PURE__ */ J($e, {
|
|
2910
2991
|
size: 14,
|
|
2911
2992
|
"aria-hidden": !0,
|
|
@@ -2917,12 +2998,12 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2917
2998
|
}) : void 0
|
|
2918
2999
|
}), /* @__PURE__ */ J("div", {
|
|
2919
3000
|
ref: k,
|
|
2920
|
-
className: P("grid content-start gap-5",
|
|
3001
|
+
className: P("grid content-start gap-5", Rr.gridPage),
|
|
2921
3002
|
style: {
|
|
2922
3003
|
gridTemplateColumns: `repeat(${x}, minmax(0, 1fr))`,
|
|
2923
3004
|
minHeight: ee
|
|
2924
3005
|
},
|
|
2925
|
-
children: w.map((e) => /* @__PURE__ */ J(
|
|
3006
|
+
children: w.map((e) => /* @__PURE__ */ J(zr, {
|
|
2926
3007
|
item: e,
|
|
2927
3008
|
onToggle: r,
|
|
2928
3009
|
isFavoriteVisible: i,
|
|
@@ -2935,15 +3016,15 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2935
3016
|
})]
|
|
2936
3017
|
})
|
|
2937
3018
|
});
|
|
2938
|
-
},
|
|
3019
|
+
}, Ur = (e, t) => {
|
|
2939
3020
|
let n = new Set(e);
|
|
2940
3021
|
return n.has(t) ? n.delete(t) : n.add(t), n;
|
|
2941
|
-
},
|
|
3022
|
+
}, Wr = (e, t) => {
|
|
2942
3023
|
let n = new Set(e), r = t.length > 0 && t.every((t) => e.has(t));
|
|
2943
3024
|
return t.forEach((e) => {
|
|
2944
3025
|
r ? n.delete(e) : n.add(e);
|
|
2945
3026
|
}), n;
|
|
2946
|
-
},
|
|
3027
|
+
}, Gr = {
|
|
2947
3028
|
listContainer: "_listContainer_uwfwj_1",
|
|
2948
3029
|
gridClip: "_gridClip_uwfwj_6",
|
|
2949
3030
|
favHeader: "_favHeader_uwfwj_35",
|
|
@@ -2952,19 +3033,19 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2952
3033
|
selectedCheck: "_selectedCheck_uwfwj_47",
|
|
2953
3034
|
starToggleOff: "_starToggleOff_uwfwj_51",
|
|
2954
3035
|
selectedRow: "_selectedRow_uwfwj_64"
|
|
2955
|
-
},
|
|
3036
|
+
}, Kr = ({ data: e }) => e ? /* @__PURE__ */ J("div", {
|
|
2956
3037
|
className: "flex h-full items-center",
|
|
2957
3038
|
children: /* @__PURE__ */ J(ee, { type: e.type })
|
|
2958
|
-
}) : null,
|
|
3039
|
+
}) : null, qr = " / ", Jr = ({ data: e, context: t }) => {
|
|
2959
3040
|
if (!e || e.folder.length === 0) return null;
|
|
2960
|
-
let n = e.folder.join(
|
|
3041
|
+
let n = e.folder.join(qr), 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";
|
|
2961
3042
|
return /* @__PURE__ */ Y("div", {
|
|
2962
3043
|
className: "flex h-full w-full min-w-0 items-center gap-1.5",
|
|
2963
3044
|
children: [
|
|
2964
3045
|
/* @__PURE__ */ J(it, {
|
|
2965
3046
|
size: B.SM,
|
|
2966
3047
|
stroke: V,
|
|
2967
|
-
className: P("shrink-0",
|
|
3048
|
+
className: P("shrink-0", Gr.folderIcon),
|
|
2968
3049
|
"aria-hidden": !0
|
|
2969
3050
|
}),
|
|
2970
3051
|
/* @__PURE__ */ J(G, {
|
|
@@ -2986,7 +3067,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2986
3067
|
})
|
|
2987
3068
|
]
|
|
2988
3069
|
});
|
|
2989
|
-
},
|
|
3070
|
+
}, Yr = ({ data: e, context: t }) => {
|
|
2990
3071
|
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;
|
|
2991
3072
|
return e ? /* @__PURE__ */ Y("div", {
|
|
2992
3073
|
className: "flex h-full w-full min-w-0 items-center gap-2.5",
|
|
@@ -2997,7 +3078,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2997
3078
|
size: 36,
|
|
2998
3079
|
initialsName: e.name,
|
|
2999
3080
|
styles: { badgeClassName: "rounded-[10px]" }
|
|
3000
|
-
}), /* @__PURE__ */ J(
|
|
3081
|
+
}), /* @__PURE__ */ J(Zt, {
|
|
3001
3082
|
credentials: e.credentials,
|
|
3002
3083
|
loggedOutLabel: t?.credentialsBadgeLoggedOutLabel
|
|
3003
3084
|
})]
|
|
@@ -3010,18 +3091,18 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3010
3091
|
className: "min-w-0 flex-1 items-baseline gap-1.5",
|
|
3011
3092
|
trailing: o ? /* @__PURE__ */ J(Xe, {
|
|
3012
3093
|
size: B.SM,
|
|
3013
|
-
className: P("shrink-0",
|
|
3094
|
+
className: P("shrink-0", Gr.selectedCheck),
|
|
3014
3095
|
"aria-hidden": !0,
|
|
3015
3096
|
stroke: V
|
|
3016
3097
|
}) : void 0
|
|
3017
3098
|
})]
|
|
3018
3099
|
}) : null;
|
|
3019
|
-
},
|
|
3020
|
-
let e = ue(
|
|
3100
|
+
}, Xr = se(null), Zr = () => {
|
|
3101
|
+
let e = ue(Xr);
|
|
3021
3102
|
if (e == null) throw Error("useListSelection must be used inside a ListView in multiple selection mode.");
|
|
3022
3103
|
return e;
|
|
3023
|
-
},
|
|
3024
|
-
let { selectedIds: t, toggle: n, getRowAriaLabel: r } =
|
|
3104
|
+
}, Qr = ({ data: e }) => {
|
|
3105
|
+
let { selectedIds: t, toggle: n, getRowAriaLabel: r } = Zr();
|
|
3025
3106
|
return e ? /* @__PURE__ */ J("div", {
|
|
3026
3107
|
className: "flex size-full items-center",
|
|
3027
3108
|
children: /* @__PURE__ */ J(be, {
|
|
@@ -3030,8 +3111,8 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3030
3111
|
onChange: () => n(e.id)
|
|
3031
3112
|
})
|
|
3032
3113
|
}) : null;
|
|
3033
|
-
},
|
|
3034
|
-
let { isAllSelected: e, isSomeSelected: t, hasItems: n, toggleAll: r, selectAllAriaLabel: i } =
|
|
3114
|
+
}, $r = () => {
|
|
3115
|
+
let { isAllSelected: e, isSomeSelected: t, hasItems: n, toggleAll: r, selectAllAriaLabel: i } = Zr();
|
|
3035
3116
|
return /* @__PURE__ */ J("div", {
|
|
3036
3117
|
className: "flex size-full items-center",
|
|
3037
3118
|
children: /* @__PURE__ */ J(be, {
|
|
@@ -3042,48 +3123,48 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3042
3123
|
onChange: r
|
|
3043
3124
|
})
|
|
3044
3125
|
});
|
|
3045
|
-
},
|
|
3126
|
+
}, ei = ({ data: e, context: t }) => {
|
|
3046
3127
|
let [n, r] = z(e?.isStarred ?? !1);
|
|
3047
3128
|
return I(() => {
|
|
3048
3129
|
r(e?.isStarred ?? !1);
|
|
3049
3130
|
}, [e?.id, e?.isStarred]), !e || t?.isFavoriteVisible?.(e) === !1 ? null : /* @__PURE__ */ J("div", {
|
|
3050
3131
|
className: "flex size-full items-center justify-end",
|
|
3051
|
-
children: /* @__PURE__ */ J(
|
|
3132
|
+
children: /* @__PURE__ */ J($t, {
|
|
3052
3133
|
isStarred: n,
|
|
3053
3134
|
onClick: (i) => {
|
|
3054
3135
|
i.stopPropagation();
|
|
3055
3136
|
let a = !n;
|
|
3056
3137
|
r(a), t?.onToggleFavorite?.(e.id, a);
|
|
3057
3138
|
},
|
|
3058
|
-
className: n ? void 0 :
|
|
3139
|
+
className: n ? void 0 : Gr.starToggleOff
|
|
3059
3140
|
})
|
|
3060
3141
|
});
|
|
3061
|
-
},
|
|
3142
|
+
}, ti = ({ data: e }) => !e || e.topics.length === 0 ? null : /* @__PURE__ */ J("div", {
|
|
3062
3143
|
className: "flex h-full w-full min-w-0 items-center",
|
|
3063
|
-
children: /* @__PURE__ */ J(
|
|
3064
|
-
}),
|
|
3144
|
+
children: /* @__PURE__ */ J(an, { topics: e.topics })
|
|
3145
|
+
}), ni = "selection", ri = 52, ii = {
|
|
3065
3146
|
folder: (e) => e !== w.Model,
|
|
3066
3147
|
tags: () => !0,
|
|
3067
3148
|
favorite: () => !0
|
|
3068
|
-
},
|
|
3149
|
+
}, ai = (e, t) => Object.fromEntries([
|
|
3069
3150
|
"folder",
|
|
3070
3151
|
"tags",
|
|
3071
3152
|
"favorite"
|
|
3072
|
-
].map((n) => [n, (t?.[n] ??
|
|
3073
|
-
let i =
|
|
3153
|
+
].map((n) => [n, (t?.[n] ?? ii[n])(e)])), oi = (e, t = !1, n, r = !1) => {
|
|
3154
|
+
let i = ai(e, n);
|
|
3074
3155
|
return [
|
|
3075
3156
|
...r ? [{
|
|
3076
|
-
colId:
|
|
3157
|
+
colId: ni,
|
|
3077
3158
|
headerName: "",
|
|
3078
|
-
width:
|
|
3079
|
-
minWidth:
|
|
3080
|
-
maxWidth:
|
|
3159
|
+
width: ri,
|
|
3160
|
+
minWidth: ri,
|
|
3161
|
+
maxWidth: ri,
|
|
3081
3162
|
filter: !1,
|
|
3082
3163
|
sortable: !1,
|
|
3083
3164
|
resizable: !1,
|
|
3084
3165
|
suppressMovable: !0,
|
|
3085
|
-
headerComponent:
|
|
3086
|
-
cellRenderer:
|
|
3166
|
+
headerComponent: $r,
|
|
3167
|
+
cellRenderer: Qr
|
|
3087
3168
|
}] : [],
|
|
3088
3169
|
{
|
|
3089
3170
|
headerName: "Name",
|
|
@@ -3091,7 +3172,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3091
3172
|
minWidth: 220,
|
|
3092
3173
|
field: "name",
|
|
3093
3174
|
filter: !1,
|
|
3094
|
-
cellRenderer:
|
|
3175
|
+
cellRenderer: Yr,
|
|
3095
3176
|
valueGetter: (e) => e.data?.name
|
|
3096
3177
|
},
|
|
3097
3178
|
{
|
|
@@ -3101,7 +3182,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3101
3182
|
field: "type",
|
|
3102
3183
|
filter: !1,
|
|
3103
3184
|
sortable: !1,
|
|
3104
|
-
cellRenderer:
|
|
3185
|
+
cellRenderer: Kr,
|
|
3105
3186
|
valueGetter: (e) => e.data?.type
|
|
3106
3187
|
},
|
|
3107
3188
|
{
|
|
@@ -3111,7 +3192,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3111
3192
|
minWidth: 170,
|
|
3112
3193
|
filter: !1,
|
|
3113
3194
|
hide: !i.folder,
|
|
3114
|
-
cellRenderer:
|
|
3195
|
+
cellRenderer: Jr,
|
|
3115
3196
|
valueGetter: (e) => e.data?.folder
|
|
3116
3197
|
},
|
|
3117
3198
|
{
|
|
@@ -3122,7 +3203,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3122
3203
|
filter: !1,
|
|
3123
3204
|
sortable: !1,
|
|
3124
3205
|
hide: !i.tags,
|
|
3125
|
-
cellRenderer:
|
|
3206
|
+
cellRenderer: ti,
|
|
3126
3207
|
valueGetter: (e) => e.data?.topics
|
|
3127
3208
|
},
|
|
3128
3209
|
{
|
|
@@ -3134,15 +3215,15 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3134
3215
|
sortable: !1,
|
|
3135
3216
|
resizable: !1,
|
|
3136
3217
|
hide: t || !i.favorite,
|
|
3137
|
-
headerClass:
|
|
3138
|
-
cellRenderer:
|
|
3218
|
+
headerClass: Gr.favHeader,
|
|
3219
|
+
cellRenderer: ei
|
|
3139
3220
|
}
|
|
3140
3221
|
];
|
|
3141
|
-
},
|
|
3142
|
-
className: K("flex size-full flex-col items-center justify-center",
|
|
3222
|
+
}, si = 60, ci = {}, li = /* @__PURE__ */ new Set(), ui = "Select all", di = (e) => e.id, fi = (e) => `Select ${e.name}`, pi = (e) => e.items.length === 0 ? /* @__PURE__ */ J("div", {
|
|
3223
|
+
className: K("flex size-full flex-col items-center justify-center", Pt.listView),
|
|
3143
3224
|
children: /* @__PURE__ */ J(M, { label: e.emptyStateTitle ?? "No results" })
|
|
3144
|
-
}) : /* @__PURE__ */ J(
|
|
3145
|
-
let y = m ===
|
|
3225
|
+
}) : /* @__PURE__ */ J(mi, { ...e }), mi = ({ 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, selectionMode: m = kt.Single, selectedItemIds: h = li, onSelectionChange: g, selectRowAriaLabel: _ = fi, selectAllAriaLabel: v = ui }) => {
|
|
3226
|
+
let y = m === kt.Multiple, b = y ? void 0 : u, x = a?.typography ?? ci, S = a?.colors, C = {
|
|
3146
3227
|
"--cat-list-bg": S?.background,
|
|
3147
3228
|
"--cat-list-border": S?.border,
|
|
3148
3229
|
"--cat-list-header-bg": S?.headerBackground,
|
|
@@ -3156,12 +3237,12 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3156
3237
|
...l == null ? {} : { "--list-header-sticky-top": `${l}px` }
|
|
3157
3238
|
}, w = R(null), T = F((e) => {
|
|
3158
3239
|
w.current = e;
|
|
3159
|
-
}, []), E = L(() =>
|
|
3240
|
+
}, []), E = L(() => oi(t, f, p, y), [
|
|
3160
3241
|
t,
|
|
3161
3242
|
f,
|
|
3162
3243
|
p,
|
|
3163
3244
|
y
|
|
3164
|
-
]), D = L(() => e.map(
|
|
3245
|
+
]), D = L(() => e.map(di), [e]), O = L(() => D.filter((e) => h.has(e)).length, [D, h]), k = F((e) => g?.(Ur(h, e)), [g, h]), ee = F(() => g?.(Wr(h, D)), [
|
|
3165
3246
|
g,
|
|
3166
3247
|
h,
|
|
3167
3248
|
D
|
|
@@ -3191,7 +3272,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3191
3272
|
t != null && (e.preventDefault(), k(t));
|
|
3192
3273
|
}, [k]), ne = L(() => ({
|
|
3193
3274
|
domLayout: "autoHeight",
|
|
3194
|
-
rowHeight:
|
|
3275
|
+
rowHeight: si,
|
|
3195
3276
|
animateRows: !1,
|
|
3196
3277
|
suppressAnimationFrame: !0,
|
|
3197
3278
|
suppressScrollOnNewData: !0,
|
|
@@ -3213,7 +3294,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3213
3294
|
t.field !== "isStarred" && t.colId !== "selection" && e.data && (y && te.current(e.data.id), c?.(e.data));
|
|
3214
3295
|
} : void 0,
|
|
3215
3296
|
rowClass: c || y ? "cursor-pointer" : void 0,
|
|
3216
|
-
getRowClass: (e) => e.data?.id === b ?
|
|
3297
|
+
getRowClass: (e) => e.data?.id === b ? Gr.selectedRow : void 0
|
|
3217
3298
|
}), [
|
|
3218
3299
|
n,
|
|
3219
3300
|
x,
|
|
@@ -3224,7 +3305,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3224
3305
|
f,
|
|
3225
3306
|
c,
|
|
3226
3307
|
y
|
|
3227
|
-
]), { containerRef: re, startRow: M, endRow: N } =
|
|
3308
|
+
]), { containerRef: re, startRow: M, endRow: N } = Ut(e.length, si), ie = L(() => e.slice(M, N), [
|
|
3228
3309
|
e,
|
|
3229
3310
|
M,
|
|
3230
3311
|
N
|
|
@@ -3235,22 +3316,22 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3235
3316
|
w.current?.redrawRows();
|
|
3236
3317
|
}, [b]), /* @__PURE__ */ J("div", {
|
|
3237
3318
|
style: C,
|
|
3238
|
-
className: K("w-full rounded-xl border",
|
|
3319
|
+
className: K("w-full rounded-xl border", Gr.listContainer, Pt.listView),
|
|
3239
3320
|
children: /* @__PURE__ */ Y("div", {
|
|
3240
3321
|
ref: re,
|
|
3241
3322
|
onKeyDown: y ? j : void 0,
|
|
3242
|
-
className: K("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",
|
|
3323
|
+
className: K("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", Gr.gridClip),
|
|
3243
3324
|
children: [
|
|
3244
3325
|
M > 0 && /* @__PURE__ */ J("div", {
|
|
3245
|
-
style: { height: M *
|
|
3326
|
+
style: { height: M * si },
|
|
3246
3327
|
"aria-hidden": !0
|
|
3247
3328
|
}),
|
|
3248
|
-
/* @__PURE__ */ J(
|
|
3329
|
+
/* @__PURE__ */ J(Xr.Provider, {
|
|
3249
3330
|
value: A,
|
|
3250
3331
|
children: /* @__PURE__ */ J(Tt, {
|
|
3251
3332
|
columnDefs: E,
|
|
3252
3333
|
rowData: ie,
|
|
3253
|
-
getRowId:
|
|
3334
|
+
getRowId: di,
|
|
3254
3335
|
withoutHeaderBorders: !0,
|
|
3255
3336
|
wrapCustomCellRenderers: !1,
|
|
3256
3337
|
onGridApiChange: T,
|
|
@@ -3260,13 +3341,13 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3260
3341
|
})
|
|
3261
3342
|
}),
|
|
3262
3343
|
N < e.length && /* @__PURE__ */ J("div", {
|
|
3263
|
-
style: { height: (e.length - N) *
|
|
3344
|
+
style: { height: (e.length - N) * si },
|
|
3264
3345
|
"aria-hidden": !0
|
|
3265
3346
|
})
|
|
3266
3347
|
]
|
|
3267
3348
|
})
|
|
3268
3349
|
});
|
|
3269
|
-
},
|
|
3350
|
+
}, hi = {
|
|
3270
3351
|
filterBtn: "_filterBtn_5r8a5_7",
|
|
3271
3352
|
filterBtnActive: "_filterBtnActive_5r8a5_24",
|
|
3272
3353
|
filterBtnOpen: "_filterBtnOpen_5r8a5_28",
|
|
@@ -3278,13 +3359,13 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3278
3359
|
divider: "_divider_5r8a5_63",
|
|
3279
3360
|
sectionLabel: "_sectionLabel_5r8a5_67",
|
|
3280
3361
|
footer: "_footer_5r8a5_71"
|
|
3281
|
-
},
|
|
3362
|
+
}, gi = (e, t, n, r, i) => {
|
|
3282
3363
|
let a = e.size > 0;
|
|
3283
3364
|
return n && a ? `${r} · ${e.size}` : n ? r : a ? l(e, t, i) : i;
|
|
3284
|
-
},
|
|
3365
|
+
}, _i = (e, t) => {
|
|
3285
3366
|
let n = new Set(t);
|
|
3286
3367
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
3287
|
-
},
|
|
3368
|
+
}, vi = ({ 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 }) => {
|
|
3288
3369
|
let f = (r ?? !1) || e.size > 0, [p, m] = z(!1), h = ie({
|
|
3289
3370
|
"--cat-filter-btn-bg": d?.buttonBackground,
|
|
3290
3371
|
"--cat-filter-btn-border": d?.buttonBorder,
|
|
@@ -3301,7 +3382,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3301
3382
|
"--cat-filter-section-label": d?.sectionLabel,
|
|
3302
3383
|
"--cat-filter-divider": d?.divider,
|
|
3303
3384
|
"--cat-filter-footer-border": d?.footerBorder
|
|
3304
|
-
}), g = L(() => n == null ? [] : [...n].sort(), [n]), _ =
|
|
3385
|
+
}), g = L(() => n == null ? [] : [...n].sort(), [n]), _ = gi(e, n, r, a, s), [v, y] = z(() => new Set(e)), [b, x] = z(r ?? !1);
|
|
3305
3386
|
I(() => {
|
|
3306
3387
|
p && (y(new Set(e)), x(r ?? !1));
|
|
3307
3388
|
}, [
|
|
@@ -3346,7 +3427,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3346
3427
|
...h,
|
|
3347
3428
|
maxHeight: "calc(var(--fui-available-height, 9999px) - 8px)"
|
|
3348
3429
|
},
|
|
3349
|
-
className: P("flex min-w-[360px] flex-col rounded-xl p-[6px]",
|
|
3430
|
+
className: P("flex min-w-[360px] flex-col rounded-xl p-[6px]", hi.overlay),
|
|
3350
3431
|
onKeyDown: ee,
|
|
3351
3432
|
children: [
|
|
3352
3433
|
/* @__PURE__ */ J(Ne, {
|
|
@@ -3355,7 +3436,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3355
3436
|
mark: Pe.Checkbox,
|
|
3356
3437
|
selected: b,
|
|
3357
3438
|
label: a,
|
|
3358
|
-
labelClassName: P(
|
|
3439
|
+
labelClassName: P(hi.rowLabel, u?.filterButtonClassName ?? "dial-small-semi-text"),
|
|
3359
3440
|
className: "shrink-0",
|
|
3360
3441
|
tabIndex: C === 0 ? 0 : -1,
|
|
3361
3442
|
ref: (e) => {
|
|
@@ -3366,11 +3447,11 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3366
3447
|
g.length > 0 && /* @__PURE__ */ Y(bt, { children: [
|
|
3367
3448
|
/* @__PURE__ */ J("div", {
|
|
3368
3449
|
role: "separator",
|
|
3369
|
-
className: P("my-1 h-px",
|
|
3450
|
+
className: P("my-1 h-px", hi.divider),
|
|
3370
3451
|
"aria-hidden": !0
|
|
3371
3452
|
}),
|
|
3372
3453
|
/* @__PURE__ */ J("div", {
|
|
3373
|
-
className: P("px-[10px] pb-1 pt-[10px]", u?.filterSectionLabelClassName ?? "dial-tiny-lead-semi-text",
|
|
3454
|
+
className: P("px-[10px] pb-1 pt-[10px]", u?.filterSectionLabelClassName ?? "dial-tiny-lead-semi-text", hi.sectionLabel),
|
|
3374
3455
|
"aria-hidden": !0,
|
|
3375
3456
|
children: o
|
|
3376
3457
|
}),
|
|
@@ -3384,19 +3465,19 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3384
3465
|
mark: Pe.Checkbox,
|
|
3385
3466
|
selected: n,
|
|
3386
3467
|
label: e,
|
|
3387
|
-
labelClassName:
|
|
3468
|
+
labelClassName: hi.rowLabel,
|
|
3388
3469
|
className: "shrink-0",
|
|
3389
3470
|
tabIndex: C === r ? 0 : -1,
|
|
3390
3471
|
ref: (e) => {
|
|
3391
3472
|
T.current[r] = e;
|
|
3392
3473
|
},
|
|
3393
|
-
onClick: () => y(
|
|
3474
|
+
onClick: () => y(_i(e, v))
|
|
3394
3475
|
}, e);
|
|
3395
3476
|
})
|
|
3396
3477
|
})
|
|
3397
3478
|
] }),
|
|
3398
3479
|
/* @__PURE__ */ Y("div", {
|
|
3399
|
-
className: P("mt-1 flex shrink-0 items-center px-1 py-3",
|
|
3480
|
+
className: P("mt-1 flex shrink-0 items-center px-1 py-3", hi.footer),
|
|
3400
3481
|
onKeyDown: (e) => {
|
|
3401
3482
|
(e.key === "ArrowUp" || e.key === "ArrowDown") && e.stopPropagation();
|
|
3402
3483
|
},
|
|
@@ -3420,26 +3501,26 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3420
3501
|
iconBefore: /* @__PURE__ */ J(rt, {
|
|
3421
3502
|
size: B.SM,
|
|
3422
3503
|
stroke: V,
|
|
3423
|
-
className: P("shrink-0",
|
|
3504
|
+
className: P("shrink-0", hi.filterBtnFunnel),
|
|
3424
3505
|
"aria-hidden": !0
|
|
3425
3506
|
}),
|
|
3426
3507
|
label: _,
|
|
3427
|
-
textClassName: P(
|
|
3508
|
+
textClassName: P(hi.filterBtnLabel, u?.filterButtonClassName ?? "dial-small-semi-text"),
|
|
3428
3509
|
iconAfter: /* @__PURE__ */ J(Ze, {
|
|
3429
3510
|
size: 14,
|
|
3430
3511
|
stroke: V,
|
|
3431
|
-
className: P("shrink-0 transition-transform duration-150",
|
|
3512
|
+
className: P("shrink-0 transition-transform duration-150", hi.filterBtnChevron, p && "rotate-180"),
|
|
3432
3513
|
"aria-hidden": !0
|
|
3433
3514
|
}),
|
|
3434
|
-
className: P("h-12 shrink-0 gap-[7px] whitespace-nowrap !rounded-lg px-[18px]",
|
|
3515
|
+
className: P("h-12 shrink-0 gap-[7px] whitespace-nowrap !rounded-lg px-[18px]", hi.filterBtn, f && hi.filterBtnActive, p && hi.filterBtnOpen)
|
|
3435
3516
|
})
|
|
3436
3517
|
});
|
|
3437
|
-
},
|
|
3518
|
+
}, yi = {
|
|
3438
3519
|
section: "_section_mh952_1",
|
|
3439
3520
|
divider: "_divider_mh952_5"
|
|
3440
|
-
},
|
|
3521
|
+
}, bi = ({ 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 }) => {
|
|
3441
3522
|
let w = a?.typography?.titleClassName ?? "dial-body-semi-text", T = a?.typography?.countClassName ?? "dial-tiny-semi-text", E = L(() => [{
|
|
3442
|
-
value:
|
|
3523
|
+
value: Q.Grid,
|
|
3443
3524
|
icon: /* @__PURE__ */ J(ot, {
|
|
3444
3525
|
size: B.SM,
|
|
3445
3526
|
"aria-hidden": !0,
|
|
@@ -3447,7 +3528,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3447
3528
|
}),
|
|
3448
3529
|
"aria-label": l
|
|
3449
3530
|
}, {
|
|
3450
|
-
value:
|
|
3531
|
+
value: Q.Cards,
|
|
3451
3532
|
icon: /* @__PURE__ */ J(st, {
|
|
3452
3533
|
size: B.SM,
|
|
3453
3534
|
"aria-hidden": !0,
|
|
@@ -3489,7 +3570,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3489
3570
|
value: t,
|
|
3490
3571
|
onChange: n,
|
|
3491
3572
|
items: E
|
|
3492
|
-
}), p != null && p.length > 0 && /* @__PURE__ */ Y(bt, { children: [/* @__PURE__ */ J("div", { className: P("h-4 w-px shrink-0",
|
|
3573
|
+
}), p != null && p.length > 0 && /* @__PURE__ */ Y(bt, { children: [/* @__PURE__ */ J("div", { className: P("h-4 w-px shrink-0", yi.divider) }), /* @__PURE__ */ J(_e, {
|
|
3493
3574
|
items: k,
|
|
3494
3575
|
label: O,
|
|
3495
3576
|
variant: ve.Primary,
|
|
@@ -3509,7 +3590,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3509
3590
|
placeholder: c,
|
|
3510
3591
|
"aria-label": c
|
|
3511
3592
|
})
|
|
3512
|
-
}), /* @__PURE__ */ J(
|
|
3593
|
+
}), /* @__PURE__ */ J(vi, {
|
|
3513
3594
|
checked: g ?? /* @__PURE__ */ new Set(),
|
|
3514
3595
|
onChange: _ ?? (() => void 0),
|
|
3515
3596
|
values: v,
|
|
@@ -3522,12 +3603,12 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3522
3603
|
})]
|
|
3523
3604
|
})]
|
|
3524
3605
|
});
|
|
3525
|
-
},
|
|
3606
|
+
}, xi = ({ 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 }) => {
|
|
3526
3607
|
let b = { "--cat-browse-divider": r?.colors?.divider };
|
|
3527
3608
|
return /* @__PURE__ */ J("section", {
|
|
3528
|
-
className: P("flex-shrink-0 px-4",
|
|
3609
|
+
className: P("flex-shrink-0 px-4", yi.section, Pt.toolbar),
|
|
3529
3610
|
style: b,
|
|
3530
|
-
children: /* @__PURE__ */ J(
|
|
3611
|
+
children: /* @__PURE__ */ J(bi, {
|
|
3531
3612
|
styles: r,
|
|
3532
3613
|
query: e,
|
|
3533
3614
|
onQueryChange: t,
|
|
@@ -3550,20 +3631,20 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3550
3631
|
...y
|
|
3551
3632
|
})
|
|
3552
3633
|
});
|
|
3553
|
-
},
|
|
3634
|
+
}, Si = {
|
|
3554
3635
|
root: "_root_1h83l_1",
|
|
3555
3636
|
heading: "_heading_1h83l_5",
|
|
3556
3637
|
headingTitle: "_headingTitle_1h83l_9"
|
|
3557
|
-
},
|
|
3638
|
+
}, Ci = "w-[320px]", wi = (e, t) => e.map((e) => ({
|
|
3558
3639
|
...e,
|
|
3559
3640
|
label: typeof e.label == "string" ? /* @__PURE__ */ J(ke, {
|
|
3560
3641
|
text: e.label,
|
|
3561
3642
|
query: t,
|
|
3562
3643
|
maxLines: 1
|
|
3563
3644
|
}) : e.label,
|
|
3564
|
-
children: e.children ?
|
|
3565
|
-
})),
|
|
3566
|
-
let [u, d] = z(null), f = u ? r.find((e) => e.key === u) : void 0, p = f?.children ?? r, m = i ?
|
|
3645
|
+
children: e.children ? wi(e.children, t) : void 0
|
|
3646
|
+
})), Ti = ({ open: e, onClose: t, title: n, options: r, search: i, searchPlaceholder: a, searchClearLabel: o, noResultsLabel: s, backLabel: c, closeLabel: l }) => {
|
|
3647
|
+
let [u, d] = z(null), f = u ? r.find((e) => e.key === u) : void 0, p = f?.children ?? r, m = i ? wi(p, i.value) : p, h = () => {
|
|
3567
3648
|
d(null), t();
|
|
3568
3649
|
}, g = (e, t) => {
|
|
3569
3650
|
if (e.children?.length) {
|
|
@@ -3616,7 +3697,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3616
3697
|
children: s
|
|
3617
3698
|
})]
|
|
3618
3699
|
});
|
|
3619
|
-
},
|
|
3700
|
+
}, Ei = ({ label: e, options: t, onClick: n, search: r, searchPlaceholder: i = "Search", searchClearLabel: a = "Clear search", noResultsLabel: o = "No results found", backLabel: s = "Back", closeLabel: c = "Close" }) => {
|
|
3620
3701
|
let l = R(null), [u, d] = z(!1), f = ae(), p = /* @__PURE__ */ J(Ze, {
|
|
3621
3702
|
size: B.SM,
|
|
3622
3703
|
stroke: V,
|
|
@@ -3631,7 +3712,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3631
3712
|
"aria-haspopup": "dialog",
|
|
3632
3713
|
"aria-expanded": u,
|
|
3633
3714
|
onClick: () => d(!0)
|
|
3634
|
-
}), /* @__PURE__ */ J(
|
|
3715
|
+
}), /* @__PURE__ */ J(Ti, {
|
|
3635
3716
|
open: u,
|
|
3636
3717
|
onClose: () => {
|
|
3637
3718
|
d(!1), r?.onChange("");
|
|
@@ -3647,7 +3728,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3647
3728
|
})] }) : r ? /* @__PURE__ */ J("div", {
|
|
3648
3729
|
ref: l,
|
|
3649
3730
|
children: /* @__PURE__ */ J(Ce, {
|
|
3650
|
-
items: t?.length ?
|
|
3731
|
+
items: t?.length ? wi(t, r.value) : [{
|
|
3651
3732
|
key: "no-results",
|
|
3652
3733
|
type: we.PlainText,
|
|
3653
3734
|
label: /* @__PURE__ */ J("span", {
|
|
@@ -3658,7 +3739,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3658
3739
|
maxDropdownHeight: 344,
|
|
3659
3740
|
placement: "bottom-end",
|
|
3660
3741
|
matchReferenceWidth: !1,
|
|
3661
|
-
listClassName:
|
|
3742
|
+
listClassName: Ci,
|
|
3662
3743
|
menuHeader: /* @__PURE__ */ J("div", {
|
|
3663
3744
|
className: "sticky -top-1 z-10 bg-layer-raised px-2 pb-1 pt-2",
|
|
3664
3745
|
children: /* @__PURE__ */ J(ze, {
|
|
@@ -3698,8 +3779,8 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3698
3779
|
}),
|
|
3699
3780
|
onClick: n
|
|
3700
3781
|
});
|
|
3701
|
-
},
|
|
3702
|
-
let { typography: K } = Pe ?? {}, qe =
|
|
3782
|
+
}, Di = 3, Oi = 300, ki = ({ items: e, tabs: t, topicOptions: n, favorites: r, titles: i, browseHeaderRenderer: a, onToggleFavorite: l, isFavoriteVisible: u, columnVisibility: d, onUseInChat: p, isPrimaryActionVisible: g, onShare: v, isPublishVisible: x, isPublishPrimary: S, getPublishHistory: C, publishFolderItems: w, publishExpandedPaths: T, onPublishExpandedPathsChange: E, publishLoadingPaths: D, hasPublishWriteAccess: O, publishDefaultAuthor: k, onPublish: ee, onPublishSuccess: A, onPublishError: te, onCreatePublishFolder: j, publishLabels: ne, ruleSourceOptions: re, onFetchExistingRules: M, shareOverlay: N, isShareVisible: ie, isSharePrimary: ae, onFetchDetails: oe, renderCredentials: se, onEdit: ce, onDownload: ue, isDownloadVisible: de, isDownloadPrimary: fe, onLoadContentFile: pe, onLoadContentFilePreview: me, renderContentFilePreview: he, renderContentFileTree: ge, onDelete: _e, onUnshare: ve, isUnshareVisible: ye, onRevokeShare: be, onFetchRecipientsCount: xe, isRevokeShareVisible: B, onUnpublish: V, isUnpublishVisible: Se, onLogin: Ce, onLogout: we, onCreateClick: H, createOptions: Te, createSearch: Ee, hideCreateButton: De = !1, hidePageTitle: Oe = !1, isReadonly: ke = !1, initialViewMode: Ae = Q.Grid, isFullWidth: je = !1, selectedItemId: Me, onCardClick: U, isLoading: Ne, styles: Pe, detailsTexts: W, detailsLimitsFooterNote: Fe, initialDetailsItemId: Ie, sortKey: Le, onSortChange: Re, filterTopics: ze, onFilterTopicsChange: Be, isMyAppsActive: Ve, onMyAppsActiveChange: He, activeTab: Ue, onActiveTabChange: Ke, renderEmptyState: G }) => {
|
|
3783
|
+
let { typography: K } = Pe ?? {}, qe = It(Pe), Je = i?.pageTitle ?? "Catalog", Ye = i?.createLabel ?? "Create", Xe = i?.favoritesTitle ?? "Your favorites", Ze = i?.browseTitle ?? "Browse", Qe = i?.searchPlaceholder ?? "Search models, tools, agents…", $e = i?.noResultsTitle ?? ((e) => `No results for "${e}"`), et = i?.featuredLabel ?? "Featured", tt = i?.gridViewLabel ?? "Grid view", nt = i?.listViewLabel ?? "List view", rt = i?.viewToggleLabel ?? "View mode", it = i?.ariaLabel ?? "Catalog", at = i?.sortLabel ?? "Sort", ot = [
|
|
3703
3784
|
{
|
|
3704
3785
|
value: b.RecentlyUpdated,
|
|
3705
3786
|
label: i?.sortRecentlyUpdatedLabel ?? "Recently Updated"
|
|
@@ -3712,7 +3793,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3712
3793
|
value: b.NameAZ,
|
|
3713
3794
|
label: i?.sortNameAZLabel ?? "Name A-Z"
|
|
3714
3795
|
}
|
|
3715
|
-
], [st, ct] = z(""), [lt, ut] = z(Ae), [dt, q] = z(Ae ===
|
|
3796
|
+
], [st, ct] = z(""), [lt, ut] = z(Ae), [dt, q] = z(Ae === Q.Cards ? "shown" : "unmounted"), [ft, pt] = z(b.RecentlyUpdated), [mt, ht] = z(/* @__PURE__ */ new Set()), [gt, _t] = z(!1), vt = Le ?? ft, yt = ze ?? mt, xt = Ve ?? gt, St = F((e) => {
|
|
3716
3797
|
let t = e;
|
|
3717
3798
|
pt(t), Re?.(t);
|
|
3718
3799
|
}, [Re]), Ct = F((e) => {
|
|
@@ -3723,81 +3804,81 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3723
3804
|
t,
|
|
3724
3805
|
Tt,
|
|
3725
3806
|
i?.tabLabels
|
|
3726
|
-
]), Z = Dt[0]?.id ?? "", [Ot,
|
|
3807
|
+
]), Z = Dt[0]?.id ?? "", [Ot, kt] = z(Z);
|
|
3727
3808
|
I(() => {
|
|
3728
|
-
|
|
3809
|
+
kt((e) => e || Z);
|
|
3729
3810
|
}, [Z]);
|
|
3730
|
-
let
|
|
3731
|
-
|
|
3732
|
-
}, [Ke]), [
|
|
3811
|
+
let At = Ue ?? Ot, jt = F((e) => {
|
|
3812
|
+
kt(e), Ke?.(e);
|
|
3813
|
+
}, [Ke]), [Mt, Nt] = z(X.length > 0);
|
|
3733
3814
|
I(() => {
|
|
3734
|
-
X.length > 0 && !
|
|
3735
|
-
}, [X.length,
|
|
3736
|
-
let
|
|
3737
|
-
|
|
3738
|
-
}, []),
|
|
3739
|
-
|
|
3740
|
-
let t = ++
|
|
3815
|
+
X.length > 0 && !Mt && Nt(!0);
|
|
3816
|
+
}, [X.length, Mt]);
|
|
3817
|
+
let Lt = F(() => {
|
|
3818
|
+
Nt(!1);
|
|
3819
|
+
}, []), Rt = Mt && X.length === 0, [zt, Bt] = z(null), [Vt, Ht] = z(!1), [Ut, Wt] = z(void 0), [Gt, Kt] = z(!1), qt = R(null), Jt = R(0), Yt = F(async (e) => {
|
|
3820
|
+
qt.current = e.id;
|
|
3821
|
+
let t = ++Jt.current;
|
|
3741
3822
|
if (oe) {
|
|
3742
|
-
|
|
3823
|
+
Kt(!0);
|
|
3743
3824
|
try {
|
|
3744
3825
|
let n = await oe(e);
|
|
3745
|
-
return
|
|
3826
|
+
return Jt.current === t && Wt(n), n;
|
|
3746
3827
|
} finally {
|
|
3747
|
-
|
|
3828
|
+
Jt.current === t && Kt(!1);
|
|
3748
3829
|
}
|
|
3749
3830
|
}
|
|
3750
|
-
}, [oe]),
|
|
3751
|
-
for (let n = 0; n <
|
|
3752
|
-
if (
|
|
3753
|
-
n <
|
|
3831
|
+
}, [oe]), Xt = F(async (e) => (Bt(e), Wt(void 0), Yt(e)), [Yt]), Zt = F(async (e, t) => {
|
|
3832
|
+
for (let n = 0; n < Di; n++) {
|
|
3833
|
+
if (qt.current !== e.id || t(await Yt(e))) return;
|
|
3834
|
+
n < Di - 1 && await _(Oi);
|
|
3754
3835
|
}
|
|
3755
|
-
}, [
|
|
3836
|
+
}, [Yt]), Qt = R(null);
|
|
3756
3837
|
I(() => {
|
|
3757
3838
|
if (!Ie) {
|
|
3758
|
-
|
|
3839
|
+
Qt.current = null;
|
|
3759
3840
|
return;
|
|
3760
3841
|
}
|
|
3761
|
-
if (
|
|
3842
|
+
if (Qt.current === Ie) return;
|
|
3762
3843
|
let t = e.find((e) => e.id === Ie);
|
|
3763
|
-
t && (
|
|
3844
|
+
t && (Qt.current = Ie, Xt(t));
|
|
3764
3845
|
}, [
|
|
3765
3846
|
Ie,
|
|
3766
3847
|
e,
|
|
3767
|
-
|
|
3848
|
+
Xt
|
|
3768
3849
|
]), I(() => {
|
|
3769
|
-
if (
|
|
3770
|
-
let t = e.find((e) => e.id ===
|
|
3771
|
-
t && t !==
|
|
3772
|
-
}, [e,
|
|
3773
|
-
let
|
|
3774
|
-
await Ce?.(e, t), oe && await
|
|
3850
|
+
if (zt == null) return;
|
|
3851
|
+
let t = e.find((e) => e.id === zt.id);
|
|
3852
|
+
t && t !== zt && Bt(t);
|
|
3853
|
+
}, [e, zt]);
|
|
3854
|
+
let $t = F(async (e, t) => {
|
|
3855
|
+
await Ce?.(e, t), oe && await Zt(e, (e) => m(e?.credentials, t.level));
|
|
3775
3856
|
}, [
|
|
3776
3857
|
Ce,
|
|
3777
3858
|
oe,
|
|
3778
|
-
|
|
3779
|
-
]),
|
|
3780
|
-
await we?.(e, t), oe && await
|
|
3859
|
+
Zt
|
|
3860
|
+
]), en = F(async (e, t) => {
|
|
3861
|
+
await we?.(e, t), oe && await Zt(e, (e) => !m(e?.credentials, t.level));
|
|
3781
3862
|
}, [
|
|
3782
3863
|
we,
|
|
3783
3864
|
oe,
|
|
3784
|
-
|
|
3785
|
-
]),
|
|
3786
|
-
|
|
3787
|
-
|
|
3865
|
+
Zt
|
|
3866
|
+
]), tn = F(() => {
|
|
3867
|
+
Ht(!1), qt.current = null, Jt.current += 1, setTimeout(() => {
|
|
3868
|
+
Bt(null), Wt(void 0), Kt(!1);
|
|
3788
3869
|
}, 300);
|
|
3789
|
-
}, []),
|
|
3790
|
-
if (
|
|
3791
|
-
if (
|
|
3792
|
-
let { credentials: e, ...t } =
|
|
3870
|
+
}, []), nn = L(() => {
|
|
3871
|
+
if (zt == null) return null;
|
|
3872
|
+
if (Ut == null) return zt;
|
|
3873
|
+
let { credentials: e, ...t } = Ut;
|
|
3793
3874
|
return {
|
|
3794
|
-
...
|
|
3875
|
+
...zt,
|
|
3795
3876
|
details: t,
|
|
3796
|
-
credentials: e ??
|
|
3877
|
+
credentials: e ?? zt.credentials
|
|
3797
3878
|
};
|
|
3798
|
-
}, [
|
|
3879
|
+
}, [zt, Ut]), rn = L(() => o(Tt, vt), [Tt, vt]), an = L(() => f(rn, st), [rn, st]), on = L(() => yt.size > 0 ? h(an, yt) : an, [an, yt]), sn = L(() => xt ? s(on) : on, [on, xt]), cn = L(() => At ? sn.filter((e) => e.type === At) : sn, [sn, At]);
|
|
3799
3880
|
I(() => {
|
|
3800
|
-
if (dt !== "unmounted" || Ne ||
|
|
3881
|
+
if (dt !== "unmounted" || Ne || cn.length === 0) return;
|
|
3801
3882
|
let e = () => {
|
|
3802
3883
|
le(() => {
|
|
3803
3884
|
q((e) => e === "unmounted" ? "prepared" : e);
|
|
@@ -3812,17 +3893,17 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3812
3893
|
}, [
|
|
3813
3894
|
dt,
|
|
3814
3895
|
Ne,
|
|
3815
|
-
|
|
3896
|
+
cn.length
|
|
3816
3897
|
]);
|
|
3817
|
-
let
|
|
3898
|
+
let ln = zt != null && X.some((e) => e.id === zt.id);
|
|
3818
3899
|
I(() => {
|
|
3819
|
-
if (
|
|
3820
|
-
let e = requestAnimationFrame(() =>
|
|
3900
|
+
if (zt == null) return;
|
|
3901
|
+
let e = requestAnimationFrame(() => Ht(!0));
|
|
3821
3902
|
return () => cancelAnimationFrame(e);
|
|
3822
|
-
}, [
|
|
3823
|
-
let
|
|
3824
|
-
e ===
|
|
3825
|
-
}, []),
|
|
3903
|
+
}, [zt]);
|
|
3904
|
+
let un = F((e) => {
|
|
3905
|
+
e === Q.Cards && q("shown"), ut(e);
|
|
3906
|
+
}, []), dn = !De && !ke, fn = Mt && !ke, pn = st ? $e(st) : "No items", { copyCodeAriaLabel: hn, copiedCodeStatusLabel: gn, downloadCodeAriaLabel: _n, tableScrollRegionAriaLabel: vn, mathScrollRegionAriaLabel: yn } = W ?? {}, bn = L(() => Ft({
|
|
3826
3907
|
copyCodeAriaLabel: hn,
|
|
3827
3908
|
copiedCodeStatusLabel: gn,
|
|
3828
3909
|
downloadCodeAriaLabel: _n,
|
|
@@ -3835,16 +3916,16 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3835
3916
|
vn,
|
|
3836
3917
|
yn
|
|
3837
3918
|
]), xn = L(() => ({
|
|
3838
|
-
noResultsTitle:
|
|
3919
|
+
noResultsTitle: pn,
|
|
3839
3920
|
featuredLabel: et,
|
|
3840
3921
|
credentialsBadgeLoggedOutLabel: W?.credentialsBadgeLoggedOutLabel
|
|
3841
3922
|
}), [
|
|
3842
|
-
|
|
3923
|
+
pn,
|
|
3843
3924
|
et,
|
|
3844
3925
|
W?.credentialsBadgeLoggedOutLabel
|
|
3845
|
-
]), Sn = !Ne &&
|
|
3926
|
+
]), Sn = !Ne && cn.length === 0 ? G?.({
|
|
3846
3927
|
query: st,
|
|
3847
|
-
activeTab:
|
|
3928
|
+
activeTab: At,
|
|
3848
3929
|
hasTopicFilters: yt.size > 0,
|
|
3849
3930
|
isMyAppsActive: xt
|
|
3850
3931
|
}) : void 0;
|
|
@@ -3853,17 +3934,17 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3853
3934
|
children: /* @__PURE__ */ J(We, {})
|
|
3854
3935
|
}) : /* @__PURE__ */ Y("section", {
|
|
3855
3936
|
"aria-label": it,
|
|
3856
|
-
className: P("flex size-full min-h-0 flex-1 flex-col",
|
|
3937
|
+
className: P("flex size-full min-h-0 flex-1 flex-col", Si.root, Pt.root),
|
|
3857
3938
|
style: qe,
|
|
3858
3939
|
children: [
|
|
3859
|
-
(!Oe ||
|
|
3860
|
-
className: P("shrink-0",
|
|
3940
|
+
(!Oe || dn) && /* @__PURE__ */ J("div", {
|
|
3941
|
+
className: P("shrink-0", Si.heading),
|
|
3861
3942
|
children: /* @__PURE__ */ Y("div", {
|
|
3862
3943
|
className: "flex h-[64px] w-full items-center justify-between px-8",
|
|
3863
3944
|
children: [!Oe && /* @__PURE__ */ J("h1", {
|
|
3864
|
-
className: P(K?.pageHeadingFontClassName ?? "dial-display2-text",
|
|
3945
|
+
className: P(K?.pageHeadingFontClassName ?? "dial-display2-text", Si.headingTitle),
|
|
3865
3946
|
children: Je
|
|
3866
|
-
}),
|
|
3947
|
+
}), dn && /* @__PURE__ */ J(Ei, {
|
|
3867
3948
|
label: Ye,
|
|
3868
3949
|
options: Te,
|
|
3869
3950
|
onClick: H,
|
|
@@ -3879,27 +3960,27 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3879
3960
|
/* @__PURE__ */ Y("div", {
|
|
3880
3961
|
className: "flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto overflow-x-hidden",
|
|
3881
3962
|
children: [
|
|
3882
|
-
|
|
3963
|
+
fn && /* @__PURE__ */ J("div", {
|
|
3883
3964
|
className: "w-full px-8",
|
|
3884
|
-
children: /* @__PURE__ */ J(
|
|
3965
|
+
children: /* @__PURE__ */ J(Hr, {
|
|
3885
3966
|
items: X,
|
|
3886
3967
|
totalCount: X.length,
|
|
3887
3968
|
title: Xe,
|
|
3888
3969
|
onToggleFavorite: l,
|
|
3889
3970
|
isFavoriteVisible: u,
|
|
3890
|
-
onItemClick: U ??
|
|
3891
|
-
isLeaving:
|
|
3892
|
-
onExitComplete:
|
|
3971
|
+
onItemClick: U ?? Xt,
|
|
3972
|
+
isLeaving: Rt,
|
|
3973
|
+
onExitComplete: Lt,
|
|
3893
3974
|
selectedItemId: Me,
|
|
3894
3975
|
credentialsBadgeLoggedOutLabel: W?.credentialsBadgeLoggedOutLabel
|
|
3895
3976
|
})
|
|
3896
3977
|
}),
|
|
3897
3978
|
/* @__PURE__ */ J("div", {
|
|
3898
3979
|
className: "w-full px-4 pt-6",
|
|
3899
|
-
children: /* @__PURE__ */ J(
|
|
3900
|
-
totalCount:
|
|
3980
|
+
children: /* @__PURE__ */ J(xi, {
|
|
3981
|
+
totalCount: sn.length,
|
|
3901
3982
|
viewMode: lt,
|
|
3902
|
-
onViewModeChange:
|
|
3983
|
+
onViewModeChange: un,
|
|
3903
3984
|
sortKey: vt,
|
|
3904
3985
|
query: st,
|
|
3905
3986
|
onQueryChange: ct,
|
|
@@ -3928,23 +4009,23 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3928
4009
|
tabs: Dt.map((e) => ({
|
|
3929
4010
|
id: e.id,
|
|
3930
4011
|
label: typeof e.label == "string" ? e.label : String(e.label),
|
|
3931
|
-
count:
|
|
4012
|
+
count: sn.filter((t) => t.type === e.id).length
|
|
3932
4013
|
})),
|
|
3933
|
-
activeTabId:
|
|
3934
|
-
onTabChange:
|
|
4014
|
+
activeTabId: At,
|
|
4015
|
+
onTabChange: jt
|
|
3935
4016
|
})
|
|
3936
4017
|
}),
|
|
3937
4018
|
/* @__PURE__ */ J("div", {
|
|
3938
|
-
className: P(
|
|
4019
|
+
className: P(cn.length > 0 ? ["w-full flex-1 px-8 py-6", !je && "mx-auto max-w-[1180px]"] : "min-h-[180px] flex-1", cn.length === 0 && "px-8 py-6"),
|
|
3939
4020
|
children: Sn ?? /* @__PURE__ */ Y(bt, { children: [/* @__PURE__ */ J("div", {
|
|
3940
|
-
inert: lt !==
|
|
3941
|
-
className: P(
|
|
3942
|
-
children: /* @__PURE__ */ J(
|
|
3943
|
-
items:
|
|
4021
|
+
inert: lt !== Q.Grid,
|
|
4022
|
+
className: P(cn.length > 0 ? "pb-8" : "size-full flex-1", lt !== Q.Grid && "hidden"),
|
|
4023
|
+
children: /* @__PURE__ */ J(mn, {
|
|
4024
|
+
items: cn,
|
|
3944
4025
|
query: st,
|
|
3945
4026
|
onToggleFavorite: l,
|
|
3946
4027
|
isFavoriteVisible: u,
|
|
3947
|
-
onItemClick: U ??
|
|
4028
|
+
onItemClick: U ?? Xt,
|
|
3948
4029
|
titles: xn,
|
|
3949
4030
|
selectedItemId: Me,
|
|
3950
4031
|
isReadonly: ke,
|
|
@@ -3953,18 +4034,18 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3953
4034
|
markdownLabels: bn
|
|
3954
4035
|
})
|
|
3955
4036
|
}), dt !== "unmounted" && /* @__PURE__ */ J("div", {
|
|
3956
|
-
inert: lt !==
|
|
3957
|
-
className: P("pb-8", lt !==
|
|
3958
|
-
children: /* @__PURE__ */ J(
|
|
3959
|
-
type:
|
|
3960
|
-
items:
|
|
4037
|
+
inert: lt !== Q.Cards,
|
|
4038
|
+
className: P("pb-8", lt !== Q.Cards && (dt === "prepared" ? "invisible h-0 overflow-hidden p-0" : "hidden"), cn.length === 0 && lt === Q.Cards && "h-full"),
|
|
4039
|
+
children: /* @__PURE__ */ J(pi, {
|
|
4040
|
+
type: At,
|
|
4041
|
+
items: cn,
|
|
3961
4042
|
query: st,
|
|
3962
4043
|
ariaLabel: it,
|
|
3963
|
-
emptyStateTitle:
|
|
4044
|
+
emptyStateTitle: pn,
|
|
3964
4045
|
onToggleFavorite: l,
|
|
3965
4046
|
isFavoriteVisible: u,
|
|
3966
4047
|
columnVisibility: d,
|
|
3967
|
-
onItemClick: U ??
|
|
4048
|
+
onItemClick: U ?? Xt,
|
|
3968
4049
|
stickyHeaderTop: 0,
|
|
3969
4050
|
selectedItemId: Me,
|
|
3970
4051
|
credentialsBadgeLoggedOutLabel: W?.credentialsBadgeLoggedOutLabel,
|
|
@@ -3974,14 +4055,14 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3974
4055
|
})
|
|
3975
4056
|
]
|
|
3976
4057
|
}),
|
|
3977
|
-
|
|
4058
|
+
nn != null && /* @__PURE__ */ J(Lr, {
|
|
3978
4059
|
renderCredentials: se,
|
|
3979
|
-
item:
|
|
3980
|
-
isOpen:
|
|
3981
|
-
isStarred:
|
|
3982
|
-
isDetailsLoading:
|
|
4060
|
+
item: nn,
|
|
4061
|
+
isOpen: Vt,
|
|
4062
|
+
isStarred: ln,
|
|
4063
|
+
isDetailsLoading: Gt,
|
|
3983
4064
|
isReadonly: ke,
|
|
3984
|
-
onClose:
|
|
4065
|
+
onClose: tn,
|
|
3985
4066
|
onToggleFavorite: l,
|
|
3986
4067
|
isFavoriteVisible: u,
|
|
3987
4068
|
onUseInChat: p,
|
|
@@ -4022,15 +4103,15 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
4022
4103
|
isRevokeShareVisible: B,
|
|
4023
4104
|
onUnpublish: V,
|
|
4024
4105
|
isUnpublishVisible: Se,
|
|
4025
|
-
onLogin:
|
|
4026
|
-
onLogout:
|
|
4106
|
+
onLogin: $t,
|
|
4107
|
+
onLogout: en,
|
|
4027
4108
|
texts: W,
|
|
4028
4109
|
limitsFooterNote: Fe,
|
|
4029
4110
|
styles: { colors: { featuredChipStyle: Pe?.colors?.featuredChipStyle } }
|
|
4030
4111
|
})
|
|
4031
4112
|
]
|
|
4032
4113
|
});
|
|
4033
|
-
},
|
|
4114
|
+
}, Ai = ({ 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 }) => {
|
|
4034
4115
|
let [x, S] = z(!1), C = v ?? x, w = (e) => {
|
|
4035
4116
|
e && u || (v === void 0 && S(e), y?.(e));
|
|
4036
4117
|
}, [T, E] = z(""), D = R(null), O = L(() => [...s, ...t].filter((e) => e.label.toLocaleLowerCase().includes(T.toLocaleLowerCase())), [
|
|
@@ -4130,9 +4211,9 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
4130
4211
|
renderOverlay: () => A,
|
|
4131
4212
|
children: te
|
|
4132
4213
|
});
|
|
4133
|
-
},
|
|
4214
|
+
}, ji = ({ service: e, texts: n, onLogin: r, onLogout: i }) => {
|
|
4134
4215
|
let [a, o] = z(!1), [s, c] = z(!1), [l, u] = z(!1), [d, f] = z(), p = e.authenticationType === x.ApiKey, m = p ? n?.deleteActionLabel ?? "Delete" : n?.logoutActionLabel ?? "Log out", h = p ? n?.deleteApiKeyConfirmMessage?.(t.User) ?? "Are you sure you want to delete your personal API key?" : n?.logoutConfirmMessage ?? "Are you sure you want to log out?";
|
|
4135
|
-
return /* @__PURE__ */ Y(
|
|
4216
|
+
return /* @__PURE__ */ Y(zn, {
|
|
4136
4217
|
label: e.name,
|
|
4137
4218
|
description: e.description,
|
|
4138
4219
|
icon: /* @__PURE__ */ J(gt, {
|
|
@@ -4157,7 +4238,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
4157
4238
|
errorClassName: "dial-caption-text",
|
|
4158
4239
|
keyCardTitleClassName: "dial-tiny-semi-text",
|
|
4159
4240
|
keyCardDescriptionClassName: "dial-tiny-text",
|
|
4160
|
-
deleteActionClassName:
|
|
4241
|
+
deleteActionClassName: Rn.errorText,
|
|
4161
4242
|
renderLoginOptions: e.canConsentToOfflineUsage ? (e) => /* @__PURE__ */ J(be, {
|
|
4162
4243
|
isSelected: a,
|
|
4163
4244
|
onChange: o,
|
|
@@ -4167,10 +4248,10 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
4167
4248
|
}) : void 0,
|
|
4168
4249
|
children: [
|
|
4169
4250
|
e.hint && /* @__PURE__ */ J("p", {
|
|
4170
|
-
className: P("dial-small-text break-words",
|
|
4251
|
+
className: P("dial-small-text break-words", Rn.description),
|
|
4171
4252
|
children: e.hint
|
|
4172
4253
|
}),
|
|
4173
|
-
e.hasSharedCredentials && /* @__PURE__ */ J(
|
|
4254
|
+
e.hasSharedCredentials && /* @__PURE__ */ J(jn, {
|
|
4174
4255
|
icon: /* @__PURE__ */ J(Ye, {
|
|
4175
4256
|
size: B.SM,
|
|
4176
4257
|
"aria-hidden": !0,
|
|
@@ -4184,7 +4265,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
4184
4265
|
/* @__PURE__ */ J("p", { children: h }),
|
|
4185
4266
|
d && /* @__PURE__ */ J("p", {
|
|
4186
4267
|
role: "alert",
|
|
4187
|
-
className:
|
|
4268
|
+
className: Rn.errorText,
|
|
4188
4269
|
children: d
|
|
4189
4270
|
}),
|
|
4190
4271
|
/* @__PURE__ */ Y("div", {
|
|
@@ -4218,7 +4299,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
4218
4299
|
})
|
|
4219
4300
|
]
|
|
4220
4301
|
});
|
|
4221
|
-
},
|
|
4302
|
+
}, Mi = ({ services: e, isLoading: t = !1, hasError: n = !1, showEmptyState: r = !1, onRetry: i, onLogin: a, onLogout: o, texts: s }) => t && !e.length ? /* @__PURE__ */ J("p", {
|
|
4222
4303
|
role: "status",
|
|
4223
4304
|
className: "px-6 py-3",
|
|
4224
4305
|
children: s?.loading ?? "Loading…"
|
|
@@ -4240,7 +4321,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
4240
4321
|
children: s?.title ?? "Credentials"
|
|
4241
4322
|
}), /* @__PURE__ */ J("div", {
|
|
4242
4323
|
className: "flex min-w-0 flex-col",
|
|
4243
|
-
children: e.map((e) => /* @__PURE__ */ J(
|
|
4324
|
+
children: e.map((e) => /* @__PURE__ */ J(ji, {
|
|
4244
4325
|
service: e,
|
|
4245
4326
|
texts: s,
|
|
4246
4327
|
onLogin: a,
|
|
@@ -4253,4 +4334,4 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
4253
4334
|
children: s?.empty ?? "No credentials required"
|
|
4254
4335
|
}) : null;
|
|
4255
4336
|
//#endregion
|
|
4256
|
-
export {
|
|
4337
|
+
export { er as AboutTab, Tn as ApiTab, Yt as AppIdentity, Mi as ApplicationCredentials, Pt as CATALOG_CLASS, fn as Card, mn as CardGrid, pn as CardRowRenderer, ki as Catalog, jt as CatalogContentNodeType, Mt as CatalogContentPreviewType, n as CatalogDetailsTab, Et as CatalogLimitStatus, Dt as CatalogPricingUnit, kt as CatalogSelectionMode, b as CatalogSortKey, Q as CatalogViewMode, X as CodeLanguage, ar as ContentTab, C as CredentialStatus, Kn as CredentialsApiKeyOverlay, Zt as CredentialsBadge, i as CredentialsBadgeState, Ln as CredentialsBanner, S as CredentialsBannerState, t as CredentialsLevel, Vn as CredentialsManagementPanel, e as CredentialsUiState, Ai as DeploymentSelectorField, Ot as DeploymentSize, Z as DetailsConfirmationKind, $n as DetailsHeader, Lr as DetailsPanel, zr as FavoriteCard, Hr as Favorites, vi as Filter, At as LimitRowLayout, _r as LimitsTab, pi as ListView, vr as OverviewTab, yr as PricingTab, xi as Toolbar, Tr as ToolsTab, x as ToolsetAuthenticationType, nn as TopicTag, y as buildCatalogTabs, f as filterCatalogItems, a as getCatalogDetailsTabs, p as getCredentialsBadgeState, g as getCredentialsBannerState, u as getCredentialsUiState, r as getSignedInLevel, c as getTopicOptions, o as sortCatalogItems, Nt as useFavColumns, Wt as useScrollVirtualizer };
|