@arcadeai/design-system 3.33.2 → 3.34.0
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/dist/components/index.js +595 -567
- package/dist/components/ui/atoms/avatar-notification-badge.d.ts +34 -0
- package/dist/components/ui/atoms/avatar-notification-badge.d.ts.map +1 -0
- package/dist/components/ui/atoms/avatar-notification-badge.js +78 -0
- package/dist/components/ui/atoms/index.d.ts +3 -0
- package/dist/components/ui/atoms/index.d.ts.map +1 -1
- package/dist/components/ui/atoms/index.js +512 -504
- package/dist/components/ui/atoms/json-highlight.d.ts +60 -0
- package/dist/components/ui/atoms/json-highlight.d.ts.map +1 -0
- package/dist/components/ui/atoms/json-highlight.js +77 -0
- package/dist/components/ui/atoms/scroll-button.js +8 -8
- package/dist/components/ui/atoms/view-tools-control.d.ts +1 -1
- package/dist/components/ui/atoms/view-tools-control.d.ts.map +1 -1
- package/dist/components/ui/atoms/view-tools-control.js +20 -19
- package/dist/components/ui/index.js +595 -567
- package/dist/components/ui/molecules/chat-message-list.d.ts +5 -2
- package/dist/components/ui/molecules/chat-message-list.d.ts.map +1 -1
- package/dist/components/ui/molecules/chat-message-list.js +2 -2
- package/dist/components/ui/molecules/index.d.ts +8 -0
- package/dist/components/ui/molecules/index.d.ts.map +1 -1
- package/dist/components/ui/molecules/index.js +48 -28
- package/dist/components/ui/molecules/prompt-input.js +20 -20
- package/dist/components/ui/molecules/requirement-badges.js +8 -4
- package/dist/components/ui/molecules/switcher.d.ts +83 -0
- package/dist/components/ui/molecules/switcher.d.ts.map +1 -0
- package/dist/components/ui/molecules/switcher.js +164 -0
- package/dist/components/ui/molecules/tool-authorization.d.ts +56 -0
- package/dist/components/ui/molecules/tool-authorization.d.ts.map +1 -0
- package/dist/components/ui/molecules/tool-authorization.js +160 -0
- package/dist/components/ui/molecules/tool-call-accordion.d.ts +36 -0
- package/dist/components/ui/molecules/tool-call-accordion.d.ts.map +1 -0
- package/dist/components/ui/molecules/tool-call-accordion.js +301 -0
- package/dist/components/ui/molecules/toolkit-card.js +1 -1
- package/dist/components/ui/molecules/user-nav.d.ts +65 -0
- package/dist/components/ui/molecules/user-nav.d.ts.map +1 -0
- package/dist/components/ui/molecules/user-nav.js +154 -0
- package/dist/components/ui/pages/chat-page.d.ts +18 -10
- package/dist/components/ui/pages/chat-page.d.ts.map +1 -1
- package/dist/components/ui/pages/chat-page.js +328 -243
- package/dist/components/ui/templates/chat-template.d.ts +1 -1
- package/dist/components/ui/templates/chat-template.d.ts.map +1 -1
- package/dist/components/ui/templates/chat-template.js +11 -11
- package/dist/main.js +621 -593
- package/dist/{toolkit-card-k8jio69G.js → toolkit-card-DAgQXF93.js} +13 -10
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ export type ChatMessageItem = {
|
|
|
7
7
|
/** Unique identifier for the message */
|
|
8
8
|
id: string;
|
|
9
9
|
/** Role of the message sender */
|
|
10
|
-
role: "user" | "assistant";
|
|
10
|
+
role: "user" | "assistant" | "system";
|
|
11
11
|
/** Text content of the message */
|
|
12
12
|
content: string;
|
|
13
13
|
};
|
|
@@ -35,9 +35,12 @@ export type ChatMessageListProps = {
|
|
|
35
35
|
* of simple text-based conversations. Use `renderMessage` to customize.
|
|
36
36
|
*/
|
|
37
37
|
export declare function ChatMessageList({ messages, isStreaming, renderMessage, loadingIndicator, children, className, ...props }: ChatMessageListProps): import("react/jsx-runtime").JSX.Element | null;
|
|
38
|
-
export type ChatUserMessageProps = React.ComponentProps<"div"
|
|
38
|
+
export type ChatUserMessageProps = Omit<React.ComponentProps<"div">, "children"> & {
|
|
39
|
+
children: string;
|
|
40
|
+
};
|
|
39
41
|
/**
|
|
40
42
|
* Pre-styled user message bubble. Right-aligned with primary-colored background.
|
|
43
|
+
* Accepts only string children — use `ChatAssistantMessage` for rich content.
|
|
41
44
|
*/
|
|
42
45
|
export declare function ChatUserMessage({ children, className, ...props }: ChatUserMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
43
46
|
export type ChatAssistantMessageProps = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-message-list.d.ts","sourceRoot":"","sources":["../../../../lib/components/ui/molecules/chat-message-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAQpC;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,iCAAiC;IACjC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"chat-message-list.d.ts","sourceRoot":"","sources":["../../../../lib/components/ui/molecules/chat-message-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAQpC;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,iCAAiC;IACjC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;IACtC,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAC;IAC7B,8DAA8D;IAC9D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,mFAAmF;IACnF,aAAa,CAAC,EAAE,CACd,OAAO,EAAE,eAAe,EACxB,OAAO,EAAE;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,WAAW,EAAE,OAAO,CAAA;KAAE,KAC/C,KAAK,CAAC,SAAS,CAAC;IACrB,yEAAyE;IACzE,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACpC,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAIhC;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,WAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,oBAAoB,kDA0EtB;AAID,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACrC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAC3B,UAAU,CACX,GAAG;IACF,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,oBAAoB,2CAYtB;AAID,MAAM,MAAM,yBAAyB,GAAG;IACtC,iEAAiE;IACjE,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAEhC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,WAAW,EACX,SAAS,EACT,GAAG,KAAK,EACT,EAAE,yBAAyB,2CAoB3B;AAID,MAAM,MAAM,2BAA2B,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAEtE;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,2BAA2B,2CAU7B"}
|
|
@@ -42,10 +42,10 @@ function A({
|
|
|
42
42
|
children: [
|
|
43
43
|
t.map((n) => {
|
|
44
44
|
const u = n.role === "user", s = n === o;
|
|
45
|
-
return
|
|
45
|
+
return e ? /* @__PURE__ */ a(v, { children: e(n, {
|
|
46
46
|
isLast: s,
|
|
47
47
|
isStreaming: s && r
|
|
48
|
-
}) }, n.id) : u ? /* @__PURE__ */ a(N, { children: n.content }, n.id) : /* @__PURE__ */ a(
|
|
48
|
+
}) }, n.id) : u || n.content ? u ? /* @__PURE__ */ a(N, { children: n.content }, n.id) : /* @__PURE__ */ a(
|
|
49
49
|
w,
|
|
50
50
|
{
|
|
51
51
|
isAnimating: s && r,
|
|
@@ -12,6 +12,14 @@ export type { Step, StepStatus, StepsProgressProps } from './steps-progress';
|
|
|
12
12
|
export { StepsProgress } from './steps-progress';
|
|
13
13
|
export type { SuggestionCardProps } from './suggestion-card';
|
|
14
14
|
export { SuggestionCard } from './suggestion-card';
|
|
15
|
+
export type { SwitcherContentProps, SwitcherInputProps, SwitcherItemProps, SwitcherProps, SwitcherTriggerProps, } from './switcher';
|
|
16
|
+
export { Switcher, SwitcherContent, SwitcherInput, SwitcherItem, SwitcherTrigger, useSwitcher, } from './switcher';
|
|
17
|
+
export type { ToolAuthorizationArgsProps, ToolAuthorizationHeaderProps, ToolAuthorizationMessageProps, ToolAuthorizationProps, ToolAuthorizationStatus, } from './tool-authorization';
|
|
18
|
+
export { ToolAuthorization, ToolAuthorizationArgs, ToolAuthorizationContent, ToolAuthorizationHeader, ToolAuthorizationMessage, } from './tool-authorization';
|
|
19
|
+
export type { ToolCallAccordionContentProps, ToolCallAccordionItemProps, ToolCallAccordionProps, ToolCallAccordionTriggerProps, ToolCallState, ToolCallView, } from './tool-call-accordion';
|
|
20
|
+
export { ToolCallAccordion, ToolCallAccordionContent, ToolCallAccordionItem, ToolCallAccordionTrigger, } from './tool-call-accordion';
|
|
15
21
|
export { ToolCard } from './tool-card';
|
|
16
22
|
export { ToolkitCard } from './toolkit-card';
|
|
23
|
+
export type { UserNavProps, UserNavSize } from './user-nav';
|
|
24
|
+
export { UserNav } from './user-nav';
|
|
17
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/components/ui/molecules/index.ts"],"names":[],"mappings":"AAAA,+GAA+G;AAE/G,YAAY,EACV,yBAAyB,EACzB,eAAe,EACf,oBAAoB,EACpB,2BAA2B,EAC3B,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,YAAY,EACV,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,YAAY,GACb,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,OAAO,EACP,aAAa,EACb,cAAc,EACd,aAAa,EACb,cAAc,GACf,MAAM,WAAW,CAAC;AACnB,YAAY,EACV,sBAAsB,EACtB,uBAAuB,EACvB,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/components/ui/molecules/index.ts"],"names":[],"mappings":"AAAA,+GAA+G;AAE/G,YAAY,EACV,yBAAyB,EACzB,eAAe,EACf,oBAAoB,EACpB,2BAA2B,EAC3B,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,oBAA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B,aAAa,EACb,YAAY,GACb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1,31 +1,51 @@
|
|
|
1
|
-
import { ChatAssistantMessage as
|
|
2
|
-
import { DateTimePicker as
|
|
3
|
-
import { EmptyState as
|
|
4
|
-
import { Message as
|
|
5
|
-
import { PromptInput as
|
|
6
|
-
import { R as
|
|
7
|
-
import { StepsProgress as
|
|
8
|
-
import { SuggestionCard as
|
|
9
|
-
import {
|
|
1
|
+
import { ChatAssistantMessage as e, ChatMessageList as r, ChatStreamingIndicator as a, ChatUserMessage as i } from "./chat-message-list.js";
|
|
2
|
+
import { DateTimePicker as n } from "./date-time-picker.js";
|
|
3
|
+
import { EmptyState as m } from "./empty-state.js";
|
|
4
|
+
import { Message as g, MessageAction as l, MessageActions as A, MessageAvatar as T, MessageContent as h } from "./message.js";
|
|
5
|
+
import { PromptInput as x, PromptInputAction as f, PromptInputActions as u, PromptInputTextarea as d } from "./prompt-input.js";
|
|
6
|
+
import { R as M, T as I } from "../../../toolkit-card-DAgQXF93.js";
|
|
7
|
+
import { StepsProgress as P } from "./steps-progress.js";
|
|
8
|
+
import { SuggestionCard as k } from "./suggestion-card.js";
|
|
9
|
+
import { Switcher as R, SwitcherContent as U, SwitcherInput as q, SwitcherItem as y, SwitcherTrigger as B, useSwitcher as D } from "./switcher.js";
|
|
10
|
+
import { ToolAuthorization as H, ToolAuthorizationArgs as L, ToolAuthorizationContent as N, ToolAuthorizationHeader as b, ToolAuthorizationMessage as j } from "./tool-authorization.js";
|
|
11
|
+
import { ToolCallAccordion as G, ToolCallAccordionContent as J, ToolCallAccordionItem as K, ToolCallAccordionTrigger as O } from "./tool-call-accordion.js";
|
|
12
|
+
import { ToolCard as V } from "./tool-card.js";
|
|
13
|
+
import { UserNav as X } from "./user-nav.js";
|
|
10
14
|
export {
|
|
11
|
-
|
|
15
|
+
e as ChatAssistantMessage,
|
|
12
16
|
r as ChatMessageList,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
17
|
+
a as ChatStreamingIndicator,
|
|
18
|
+
i as ChatUserMessage,
|
|
19
|
+
n as DateTimePicker,
|
|
20
|
+
m as EmptyState,
|
|
21
|
+
g as Message,
|
|
22
|
+
l as MessageAction,
|
|
23
|
+
A as MessageActions,
|
|
24
|
+
T as MessageAvatar,
|
|
25
|
+
h as MessageContent,
|
|
26
|
+
x as PromptInput,
|
|
27
|
+
f as PromptInputAction,
|
|
28
|
+
u as PromptInputActions,
|
|
29
|
+
d as PromptInputTextarea,
|
|
30
|
+
M as RequirementBadges,
|
|
31
|
+
P as StepsProgress,
|
|
32
|
+
k as SuggestionCard,
|
|
33
|
+
R as Switcher,
|
|
34
|
+
U as SwitcherContent,
|
|
35
|
+
q as SwitcherInput,
|
|
36
|
+
y as SwitcherItem,
|
|
37
|
+
B as SwitcherTrigger,
|
|
38
|
+
H as ToolAuthorization,
|
|
39
|
+
L as ToolAuthorizationArgs,
|
|
40
|
+
N as ToolAuthorizationContent,
|
|
41
|
+
b as ToolAuthorizationHeader,
|
|
42
|
+
j as ToolAuthorizationMessage,
|
|
43
|
+
G as ToolCallAccordion,
|
|
44
|
+
J as ToolCallAccordionContent,
|
|
45
|
+
K as ToolCallAccordionItem,
|
|
46
|
+
O as ToolCallAccordionTrigger,
|
|
47
|
+
V as ToolCard,
|
|
48
|
+
I as ToolkitCard,
|
|
49
|
+
X as UserNav,
|
|
50
|
+
D as useSwitcher
|
|
31
51
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as a, jsxs as w } from "react/jsx-runtime";
|
|
2
|
+
import y, { createContext as _, useState as C, useRef as k, useLayoutEffect as P, useContext as H } from "react";
|
|
3
3
|
import { Textarea as I } from "../atoms/textarea.js";
|
|
4
4
|
import { TooltipProvider as R, Tooltip as T, TooltipTrigger as $, TooltipContent as D } from "../atoms/tooltip.js";
|
|
5
5
|
import { cn as x } from "../../../lib/utils.js";
|
|
@@ -11,14 +11,14 @@ const b = _({
|
|
|
11
11
|
maxHeight: 240,
|
|
12
12
|
onSubmit: void 0,
|
|
13
13
|
disabled: !1,
|
|
14
|
-
textareaRef:
|
|
14
|
+
textareaRef: y.createRef()
|
|
15
15
|
});
|
|
16
16
|
function v() {
|
|
17
17
|
return H(b);
|
|
18
18
|
}
|
|
19
19
|
function V({
|
|
20
|
-
className:
|
|
21
|
-
isLoading:
|
|
20
|
+
className: o,
|
|
21
|
+
isLoading: r = !1,
|
|
22
22
|
maxHeight: n = 240,
|
|
23
23
|
value: s,
|
|
24
24
|
onValueChange: i,
|
|
@@ -37,7 +37,7 @@ function V({
|
|
|
37
37
|
b.Provider,
|
|
38
38
|
{
|
|
39
39
|
value: {
|
|
40
|
-
isLoading:
|
|
40
|
+
isLoading: r,
|
|
41
41
|
value: s ?? f,
|
|
42
42
|
setValue: i ?? g,
|
|
43
43
|
maxHeight: n,
|
|
@@ -49,8 +49,8 @@ function V({
|
|
|
49
49
|
"div",
|
|
50
50
|
{
|
|
51
51
|
className: x(
|
|
52
|
-
"cursor-text rounded-lg border border-input bg-background p-2 shadow-xs transition-[box-shadow,border-color] focus-within:border-
|
|
53
|
-
|
|
52
|
+
"cursor-text rounded-lg border border-input bg-background p-2 shadow-xs transition-[box-shadow,border-color] focus-within:border focus-within:border-muted-foreground focus-within:shadow-[0_0_4px_color-mix(in_oklch,var(--ring)_4%,transparent)] dark:focus-within:shadow-[0_0_4px_color-mix(in_oklch,var(--ring)_8%,transparent)]",
|
|
53
|
+
o
|
|
54
54
|
),
|
|
55
55
|
onClick: t,
|
|
56
56
|
...u,
|
|
@@ -61,8 +61,8 @@ function V({
|
|
|
61
61
|
) });
|
|
62
62
|
}
|
|
63
63
|
function E({
|
|
64
|
-
className:
|
|
65
|
-
onKeyDown:
|
|
64
|
+
className: o,
|
|
65
|
+
onKeyDown: r,
|
|
66
66
|
disableAutosize: n = !1,
|
|
67
67
|
...s
|
|
68
68
|
}) {
|
|
@@ -80,14 +80,14 @@ function E({
|
|
|
80
80
|
const h = (t) => {
|
|
81
81
|
f(t.target), l(t.target.value);
|
|
82
82
|
}, g = (t) => {
|
|
83
|
-
t.key === "Enter" && !t.shiftKey && (t.preventDefault(), d || c?.()),
|
|
83
|
+
t.key === "Enter" && !t.shiftKey && (t.preventDefault(), d || c?.()), r?.(t);
|
|
84
84
|
};
|
|
85
85
|
return /* @__PURE__ */ a(
|
|
86
86
|
I,
|
|
87
87
|
{
|
|
88
88
|
className: x(
|
|
89
89
|
"min-h-[44px] w-full resize-none border-none bg-transparent text-foreground shadow-none outline-none focus-visible:ring-0 focus-visible:ring-offset-0 dark:bg-transparent",
|
|
90
|
-
|
|
90
|
+
o
|
|
91
91
|
),
|
|
92
92
|
onChange: h,
|
|
93
93
|
onKeyDown: g,
|
|
@@ -99,21 +99,21 @@ function E({
|
|
|
99
99
|
);
|
|
100
100
|
}
|
|
101
101
|
function L({
|
|
102
|
-
children:
|
|
103
|
-
className:
|
|
102
|
+
children: o,
|
|
103
|
+
className: r,
|
|
104
104
|
...n
|
|
105
105
|
}) {
|
|
106
|
-
return /* @__PURE__ */ a("div", { className: x("flex items-center gap-2",
|
|
106
|
+
return /* @__PURE__ */ a("div", { className: x("flex items-center gap-2", r), ...n, children: o });
|
|
107
107
|
}
|
|
108
108
|
function q({
|
|
109
|
-
tooltip:
|
|
110
|
-
children:
|
|
109
|
+
tooltip: o,
|
|
110
|
+
children: r,
|
|
111
111
|
className: n,
|
|
112
112
|
side: s = "top",
|
|
113
113
|
...i
|
|
114
114
|
}) {
|
|
115
115
|
const { disabled: l } = v();
|
|
116
|
-
return /* @__PURE__ */
|
|
116
|
+
return /* @__PURE__ */ w(T, { ...i, children: [
|
|
117
117
|
/* @__PURE__ */ a(
|
|
118
118
|
$,
|
|
119
119
|
{
|
|
@@ -121,10 +121,10 @@ function q({
|
|
|
121
121
|
disabled: l,
|
|
122
122
|
onClick: (e) => e.stopPropagation(),
|
|
123
123
|
onMouseDown: (e) => e.preventDefault(),
|
|
124
|
-
children:
|
|
124
|
+
children: r
|
|
125
125
|
}
|
|
126
126
|
),
|
|
127
|
-
/* @__PURE__ */ a(D, { className: n, side: s, children:
|
|
127
|
+
/* @__PURE__ */ a(D, { className: n, side: s, children: o })
|
|
128
128
|
] });
|
|
129
129
|
}
|
|
130
130
|
export {
|
|
@@ -5,19 +5,23 @@ import "../../../lib/utils.js";
|
|
|
5
5
|
import "../atoms/badge.js";
|
|
6
6
|
import "../atoms/byoc-badge.js";
|
|
7
7
|
import "../atoms/chart.js";
|
|
8
|
+
import "../atoms/json-highlight.js";
|
|
8
9
|
import "../../../markdown-9KGBuupR.js";
|
|
9
10
|
import "../atoms/mobile-tooltip.js";
|
|
10
11
|
import "../atoms/pro-badge.js";
|
|
11
12
|
import "../../../react-resizable-panels.browser-DYl0LXfw.js";
|
|
12
13
|
import "../atoms/tooltip.js";
|
|
13
14
|
import "../atoms/sidebar.js";
|
|
15
|
+
import "../atoms/view-tools-control.js";
|
|
14
16
|
import "./date-time-picker.js";
|
|
15
17
|
import "./prompt-input.js";
|
|
16
|
-
import { O as
|
|
18
|
+
import { O as b, R as j, S as k } from "../../../toolkit-card-DAgQXF93.js";
|
|
19
|
+
import "./switcher.js";
|
|
20
|
+
import "./tool-call-accordion.js";
|
|
17
21
|
import "./tool-card.js";
|
|
18
22
|
import "../utils/memo.js";
|
|
19
23
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
b as OAuthBadge,
|
|
25
|
+
j as RequirementBadges,
|
|
26
|
+
k as SecretsBadge
|
|
23
27
|
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DropdownMenuContent } from '../atoms/dropdown-menu';
|
|
3
|
+
/**
|
|
4
|
+
* Access the switcher context from a child component.
|
|
5
|
+
*
|
|
6
|
+
* Read `searchQuery` to filter items and conditionally render empty states.
|
|
7
|
+
*/
|
|
8
|
+
declare function useSwitcher(): {
|
|
9
|
+
searchQuery: string;
|
|
10
|
+
open: boolean;
|
|
11
|
+
setOpen: (open: boolean) => void;
|
|
12
|
+
selectedValue: string | null | undefined;
|
|
13
|
+
};
|
|
14
|
+
type SwitcherRootProps = {
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
/** Currently selected item value. */
|
|
17
|
+
value?: string | null;
|
|
18
|
+
/** Called when the user selects an item. Receives the item's `value` string. */
|
|
19
|
+
onValueChange: (value: string) => void;
|
|
20
|
+
/** Controlled open state. When omitted the component manages its own state. */
|
|
21
|
+
open?: boolean;
|
|
22
|
+
/** Called when open state changes. Works with both controlled and uncontrolled modes. */
|
|
23
|
+
onOpenChange?: (open: boolean) => void;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Composable searchable dropdown for selecting an item from a list.
|
|
27
|
+
*
|
|
28
|
+
* Built as compound components — combine `SwitcherTrigger`, `SwitcherContent`,
|
|
29
|
+
* `SwitcherInput`, and `SwitcherItem` to build any picker UI.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* <Switcher value={activeOrg.id} onValueChange={handleSelect}>
|
|
34
|
+
* <SwitcherTrigger>
|
|
35
|
+
* <Button variant="outline">{activeOrg.name}</Button>
|
|
36
|
+
* </SwitcherTrigger>
|
|
37
|
+
* <SwitcherContent>
|
|
38
|
+
* <SwitcherInput placeholder="Search…" />
|
|
39
|
+
* <OrgItems orgs={orgs} />
|
|
40
|
+
* </SwitcherContent>
|
|
41
|
+
* </Switcher>
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
declare function Switcher({ children, value, onValueChange, open: controlledOpen, onOpenChange, }: SwitcherRootProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
type SwitcherTriggerProps = {
|
|
46
|
+
children: ReactNode;
|
|
47
|
+
className?: string;
|
|
48
|
+
};
|
|
49
|
+
declare function SwitcherTrigger({ children, className }: SwitcherTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
type SwitcherContentProps = {
|
|
51
|
+
children: ReactNode;
|
|
52
|
+
className?: string;
|
|
53
|
+
} & Omit<React.ComponentProps<typeof DropdownMenuContent>, "children" | "className">;
|
|
54
|
+
declare function SwitcherContent({ children, className, ...props }: SwitcherContentProps): import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
type SwitcherInputProps = {
|
|
56
|
+
/** @default "Search…" */
|
|
57
|
+
placeholder?: string;
|
|
58
|
+
};
|
|
59
|
+
declare function SwitcherInput({ placeholder }: SwitcherInputProps): import("react/jsx-runtime").JSX.Element;
|
|
60
|
+
type SwitcherItemProps = {
|
|
61
|
+
/** Unique value — passed to root `onValueChange` when selected. */
|
|
62
|
+
value: string;
|
|
63
|
+
/**
|
|
64
|
+
* Text used for search filtering. When the search query doesn't match this
|
|
65
|
+
* text the item is hidden. Omit to make the item always visible.
|
|
66
|
+
*/
|
|
67
|
+
textValue?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Called on select *instead of* the root `onValueChange`.
|
|
70
|
+
* Use for items that trigger side-effects (opening dialogs, navigation)
|
|
71
|
+
* rather than changing the selected value.
|
|
72
|
+
*/
|
|
73
|
+
onSelect?: () => void;
|
|
74
|
+
/** Render children directly, or use a render function to access `isSelected`. */
|
|
75
|
+
children: ReactNode | ((props: {
|
|
76
|
+
isSelected: boolean;
|
|
77
|
+
}) => ReactNode);
|
|
78
|
+
className?: string;
|
|
79
|
+
};
|
|
80
|
+
declare function SwitcherItem({ value, textValue, onSelect: itemOnSelect, children, className, }: SwitcherItemProps): import("react/jsx-runtime").JSX.Element | null;
|
|
81
|
+
export { Switcher, SwitcherContent, SwitcherInput, SwitcherItem, SwitcherTrigger, useSwitcher, };
|
|
82
|
+
export type { SwitcherContentProps, SwitcherInputProps, SwitcherItemProps, SwitcherRootProps as SwitcherProps, SwitcherTriggerProps, };
|
|
83
|
+
//# sourceMappingURL=switcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switcher.d.ts","sourceRoot":"","sources":["../../../../lib/components/ui/molecules/switcher.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAUlD,OAAO,EAEL,mBAAmB,EAGpB,MAAM,qCAAqC,CAAC;AA6B7C;;;;GAIG;AACH,iBAAS,WAAW;;;oBA1BF,OAAO,KAAK,IAAI;;EAkCjC;AAID,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,SAAS,CAAC;IACpB,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,gFAAgF;IAChF,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,+EAA+E;IAC/E,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,yFAAyF;IACzF,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,iBAAS,QAAQ,CAAC,EAChB,QAAQ,EACR,KAAK,EACL,aAAa,EACb,IAAI,EAAE,cAAc,EACpB,YAAY,GACb,EAAE,iBAA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,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,IAAI,aAAa,EAClC,oBAAoB,GACrB,CAAC"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { jsx as i, jsxs as C } from "react/jsx-runtime";
|
|
2
|
+
import { Search as D } from "lucide-react";
|
|
3
|
+
import { createContext as x, useState as y, useRef as S, useCallback as I, useMemo as k, useEffect as R, useContext as Q } from "react";
|
|
4
|
+
import { DropdownMenu as T, DropdownMenuContent as E, DropdownMenuItem as M, DropdownMenuTrigger as N } from "../atoms/dropdown-menu.js";
|
|
5
|
+
import { Input as V } from "../atoms/input.js";
|
|
6
|
+
import { cn as g } from "../../../lib/utils.js";
|
|
7
|
+
const b = x(null);
|
|
8
|
+
function m() {
|
|
9
|
+
const t = Q(b);
|
|
10
|
+
if (!t)
|
|
11
|
+
throw new Error(
|
|
12
|
+
"Switcher compound components must be used within <Switcher>"
|
|
13
|
+
);
|
|
14
|
+
return t;
|
|
15
|
+
}
|
|
16
|
+
function F() {
|
|
17
|
+
const t = m();
|
|
18
|
+
return {
|
|
19
|
+
searchQuery: t.searchQuery,
|
|
20
|
+
open: t.open,
|
|
21
|
+
setOpen: t.setOpen,
|
|
22
|
+
selectedValue: t.selectedValue
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function U({
|
|
26
|
+
children: t,
|
|
27
|
+
value: r,
|
|
28
|
+
onValueChange: o,
|
|
29
|
+
open: n,
|
|
30
|
+
onOpenChange: s
|
|
31
|
+
}) {
|
|
32
|
+
const [a, c] = y(!1), [l, e] = y(""), f = S(null), w = S(null), p = n !== void 0, u = p ? n : a, h = I(
|
|
33
|
+
(d) => {
|
|
34
|
+
p || c(d), s?.(d), d && e("");
|
|
35
|
+
},
|
|
36
|
+
[p, s]
|
|
37
|
+
), v = k(
|
|
38
|
+
() => ({
|
|
39
|
+
open: u,
|
|
40
|
+
setOpen: h,
|
|
41
|
+
searchQuery: l,
|
|
42
|
+
setSearchQuery: e,
|
|
43
|
+
selectedValue: r,
|
|
44
|
+
onValueChange: o,
|
|
45
|
+
searchInputRef: f,
|
|
46
|
+
contentRef: w
|
|
47
|
+
}),
|
|
48
|
+
[u, h, l, r, o]
|
|
49
|
+
);
|
|
50
|
+
return /* @__PURE__ */ i(b.Provider, { value: v, children: /* @__PURE__ */ i(T, { onOpenChange: h, open: u, children: t }) });
|
|
51
|
+
}
|
|
52
|
+
function z({ children: t, className: r }) {
|
|
53
|
+
return /* @__PURE__ */ i(N, { asChild: !0, className: r, "data-slot": "switcher", children: t });
|
|
54
|
+
}
|
|
55
|
+
function Y({
|
|
56
|
+
children: t,
|
|
57
|
+
className: r,
|
|
58
|
+
...o
|
|
59
|
+
}) {
|
|
60
|
+
const { contentRef: n } = m();
|
|
61
|
+
return /* @__PURE__ */ i(
|
|
62
|
+
E,
|
|
63
|
+
{
|
|
64
|
+
className: g(
|
|
65
|
+
"max-h-[var(--radix-dropdown-menu-content-available-height)] w-80 overflow-y-auto p-2",
|
|
66
|
+
r
|
|
67
|
+
),
|
|
68
|
+
"data-switcher-content": !0,
|
|
69
|
+
ref: n,
|
|
70
|
+
...o,
|
|
71
|
+
children: t
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
const A = 100;
|
|
76
|
+
function _({ placeholder: t = "Search…" }) {
|
|
77
|
+
const {
|
|
78
|
+
open: r,
|
|
79
|
+
searchQuery: o,
|
|
80
|
+
setSearchQuery: n,
|
|
81
|
+
setOpen: s,
|
|
82
|
+
contentRef: a,
|
|
83
|
+
searchInputRef: c
|
|
84
|
+
} = m();
|
|
85
|
+
R(() => {
|
|
86
|
+
if (r && c.current) {
|
|
87
|
+
const e = setTimeout(
|
|
88
|
+
() => c.current?.focus(),
|
|
89
|
+
A
|
|
90
|
+
);
|
|
91
|
+
return () => clearTimeout(e);
|
|
92
|
+
}
|
|
93
|
+
}, [r, c]);
|
|
94
|
+
function l(e) {
|
|
95
|
+
const f = () => a.current?.querySelector(
|
|
96
|
+
"[data-switcher-item]"
|
|
97
|
+
);
|
|
98
|
+
if (e.key === "Tab") {
|
|
99
|
+
s(!1);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
e.key === "ArrowDown" ? (e.preventDefault(), f()?.focus()) : e.key === "Enter" ? (e.preventDefault(), f()?.click()) : e.key === "Escape" && (e.preventDefault(), s(!1)), e.stopPropagation();
|
|
103
|
+
}
|
|
104
|
+
return /* @__PURE__ */ C("div", { className: "relative sticky top-0 z-10 border-border/60 border-b bg-popover pb-2", children: [
|
|
105
|
+
/* @__PURE__ */ i(D, { className: "absolute top-2.5 left-2 h-4 w-4 text-muted-foreground" }),
|
|
106
|
+
/* @__PURE__ */ i(
|
|
107
|
+
V,
|
|
108
|
+
{
|
|
109
|
+
className: "h-9 border-0 pl-8 focus-visible:ring-1",
|
|
110
|
+
onChange: (e) => n(e.target.value),
|
|
111
|
+
onClick: (e) => e.stopPropagation(),
|
|
112
|
+
onFocus: (e) => e.stopPropagation(),
|
|
113
|
+
onKeyDown: l,
|
|
114
|
+
placeholder: t,
|
|
115
|
+
ref: c,
|
|
116
|
+
value: o
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
] });
|
|
120
|
+
}
|
|
121
|
+
function B({
|
|
122
|
+
value: t,
|
|
123
|
+
textValue: r,
|
|
124
|
+
onSelect: o,
|
|
125
|
+
children: n,
|
|
126
|
+
className: s
|
|
127
|
+
}) {
|
|
128
|
+
const {
|
|
129
|
+
searchQuery: a,
|
|
130
|
+
selectedValue: c,
|
|
131
|
+
onValueChange: l,
|
|
132
|
+
searchInputRef: e,
|
|
133
|
+
contentRef: f
|
|
134
|
+
} = m();
|
|
135
|
+
if (!(!a || r === void 0 || r.toLowerCase().includes(a.toLowerCase())))
|
|
136
|
+
return null;
|
|
137
|
+
const p = t === c;
|
|
138
|
+
return /* @__PURE__ */ i(
|
|
139
|
+
M,
|
|
140
|
+
{
|
|
141
|
+
className: g(
|
|
142
|
+
"group flex cursor-pointer items-center gap-2.5 px-3 py-2.5 hover:bg-accent/50 focus:bg-accent",
|
|
143
|
+
s
|
|
144
|
+
),
|
|
145
|
+
"data-switcher-item": !0,
|
|
146
|
+
"data-value": t,
|
|
147
|
+
onClick: () => o ? o() : l(t),
|
|
148
|
+
onKeyDown: (u) => {
|
|
149
|
+
u.key === "ArrowUp" && f.current?.querySelectorAll(
|
|
150
|
+
"[data-switcher-item]"
|
|
151
|
+
)?.[0] === u.currentTarget && (u.preventDefault(), e.current?.focus());
|
|
152
|
+
},
|
|
153
|
+
children: typeof n == "function" ? n({ isSelected: p }) : n
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
export {
|
|
158
|
+
U as Switcher,
|
|
159
|
+
Y as SwitcherContent,
|
|
160
|
+
_ as SwitcherInput,
|
|
161
|
+
B as SwitcherItem,
|
|
162
|
+
z as SwitcherTrigger,
|
|
163
|
+
F as useSwitcher
|
|
164
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { Card } from '../atoms/card';
|
|
3
|
+
import { ClassProp } from 'class-variance-authority/types';
|
|
4
|
+
import type * as React from "react";
|
|
5
|
+
export type ToolAuthorizationStatus = "loading" | "pending" | "completed" | "failed";
|
|
6
|
+
declare const toolAuthorizationVariants: (props?: ({
|
|
7
|
+
status?: "loading" | "pending" | "completed" | "failed" | null | undefined;
|
|
8
|
+
} & ClassProp) | undefined) => string;
|
|
9
|
+
declare const toolAuthorizationMessageVariants: (props?: ({
|
|
10
|
+
status?: "loading" | "pending" | "completed" | "failed" | null | undefined;
|
|
11
|
+
} & ClassProp) | undefined) => string;
|
|
12
|
+
export type ToolAuthorizationProps = React.ComponentProps<typeof Card> & VariantProps<typeof toolAuthorizationVariants>;
|
|
13
|
+
export type ToolAuthorizationHeaderProps = Omit<React.ComponentProps<"div">, "title"> & {
|
|
14
|
+
status?: ToolAuthorizationStatus;
|
|
15
|
+
icon?: React.ComponentType<{
|
|
16
|
+
className?: string;
|
|
17
|
+
}>;
|
|
18
|
+
/** Optional toolkit brand icon rendered next to the title text. */
|
|
19
|
+
toolkitIcon?: React.ComponentType<{
|
|
20
|
+
className?: string;
|
|
21
|
+
}>;
|
|
22
|
+
title?: React.ReactNode;
|
|
23
|
+
description?: React.ReactNode;
|
|
24
|
+
};
|
|
25
|
+
export type ToolAuthorizationMessageProps = React.ComponentProps<"div"> & VariantProps<typeof toolAuthorizationMessageVariants>;
|
|
26
|
+
export type ToolAuthorizationArgsProps = {
|
|
27
|
+
args: Record<string, unknown>;
|
|
28
|
+
} & React.ComponentProps<"div">;
|
|
29
|
+
/**
|
|
30
|
+
* Root card wrapper. Accepts a `status` prop that controls the border colour.
|
|
31
|
+
*/
|
|
32
|
+
declare function ToolAuthorization({ className, status, ...props }: ToolAuthorizationProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
/**
|
|
34
|
+
* Header row with built-in icon wrapper, title, and description.
|
|
35
|
+
*
|
|
36
|
+
* Pass `icon` (a component reference like `CheckCircle2`), `title`,
|
|
37
|
+
* `description`, and the same `status` used on `ToolAuthorization` to get the
|
|
38
|
+
* standard layout with correct status colours applied automatically.
|
|
39
|
+
*/
|
|
40
|
+
declare function ToolAuthorizationHeader({ className, status, icon: Icon, toolkitIcon: ToolkitIcon, title, description, children, ...props }: ToolAuthorizationHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
/**
|
|
42
|
+
* Main body area below the header. Renders a vertical flex column.
|
|
43
|
+
*/
|
|
44
|
+
declare function ToolAuthorizationContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
/**
|
|
46
|
+
* Coloured message/callout block inside the content area.
|
|
47
|
+
* Use the same `status` as the root `ToolAuthorization`.
|
|
48
|
+
*/
|
|
49
|
+
declare function ToolAuthorizationMessage({ className, status, ...props }: ToolAuthorizationMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
/**
|
|
51
|
+
* Renders tool arguments as a formatted JSON pre block.
|
|
52
|
+
* Renders nothing when `args` is empty.
|
|
53
|
+
*/
|
|
54
|
+
declare function ToolAuthorizationArgs({ args, className, ...props }: ToolAuthorizationArgsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
55
|
+
export { ToolAuthorization, ToolAuthorizationHeader, ToolAuthorizationContent, ToolAuthorizationMessage, ToolAuthorizationArgs, };
|
|
56
|
+
//# sourceMappingURL=tool-authorization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-authorization.d.ts","sourceRoot":"","sources":["../../../../lib/components/ui/molecules/tool-authorization.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,IAAI,EAA2B,MAAM,4BAA4B,CAAC;AAQ3E,MAAM,MAAM,uBAAuB,GAC/B,SAAS,GACT,SAAS,GACT,WAAW,GACX,QAAQ,CAAC;AAMb,QAAA,MAAM,yBAAyB;;8EAU7B,CAAC;AA0BH,QAAA,MAAM,gCAAgC;;8EAerC,CAAC;AAMF,MAAM,MAAM,sBAAsB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,GACpE,YAAY,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAEjD,MAAM,MAAM,4BAA4B,GAAG,IAAI,CAC7C,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAC3B,OAAO,CACR,GAAG;IACF,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnD,mEAAmE;IACnE,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAA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