@moldable-ai/ui 0.2.6 → 0.2.8
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/LICENSE +75 -71
- package/dist/components/chat/chat-input.d.ts +16 -3
- package/dist/components/chat/chat-input.d.ts.map +1 -1
- package/dist/components/chat/chat-input.js +25 -8
- package/dist/components/chat/chat-message.d.ts +11 -0
- package/dist/components/chat/chat-message.d.ts.map +1 -1
- package/dist/components/chat/chat-message.js +503 -158
- package/dist/components/chat/chat-panel.d.ts +26 -2
- package/dist/components/chat/chat-panel.d.ts.map +1 -1
- package/dist/components/chat/chat-panel.js +69 -33
- package/dist/components/chat/conversation-history.d.ts +6 -1
- package/dist/components/chat/conversation-history.d.ts.map +1 -1
- package/dist/components/chat/conversation-history.js +6 -6
- package/dist/components/chat/index.d.ts +2 -2
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +1 -1
- package/dist/components/chat/model-selector.d.ts +3 -1
- package/dist/components/chat/model-selector.d.ts.map +1 -1
- package/dist/components/chat/model-selector.js +2 -2
- package/dist/components/chat/reasoning-effort-selector.d.ts +4 -1
- package/dist/components/chat/reasoning-effort-selector.d.ts.map +1 -1
- package/dist/components/chat/reasoning-effort-selector.js +6 -6
- package/dist/components/chat/tool-handlers.d.ts.map +1 -1
- package/dist/components/chat/tool-handlers.js +62 -6
- package/dist/components/markdown.js +2 -2
- package/dist/components/ui/command.d.ts +2 -1
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +2 -2
- package/dist/components/ui/scroll-area.d.ts +1 -1
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +5 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/commands.d.ts +57 -0
- package/dist/lib/commands.d.ts.map +1 -1
- package/dist/lib/commands.js +74 -0
- package/package.json +2 -2
- package/src/styles/index.css +1 -1
package/LICENSE
CHANGED
|
@@ -1,101 +1,105 @@
|
|
|
1
|
-
|
|
1
|
+
# Functional Source License, Version 1.1, ALv2 Future License
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Abbreviation
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
under the original license provided by the owner of the applicable component.
|
|
7
|
-
- All other content is available under the "Elastic License 2.0" license as defined below.
|
|
5
|
+
FSL-1.1-ALv2
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
## Notice
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
Copyright 2026 Desiderata LLC
|
|
12
10
|
|
|
13
|
-
##
|
|
11
|
+
## Terms and Conditions
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
### Licensor ("We")
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
18
16
|
|
|
19
|
-
The
|
|
20
|
-
non-sublicensable, non-transferable license to use, copy, distribute, make
|
|
21
|
-
available, and prepare derivative works of the software, in each case subject to
|
|
22
|
-
the limitations and conditions below.
|
|
17
|
+
### The Software
|
|
23
18
|
|
|
24
|
-
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
25
22
|
|
|
26
|
-
|
|
27
|
-
service, where the service provides users with access to any substantial set of
|
|
28
|
-
the features or functionality of the software.
|
|
23
|
+
### License Grant
|
|
29
24
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
+
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
+
and redistribute the Software for any Permitted Purpose identified below.
|
|
33
29
|
|
|
34
|
-
|
|
35
|
-
of the licensor in the software. Any use of the licensor's trademarks is subject
|
|
36
|
-
to applicable law.
|
|
30
|
+
### Permitted Purpose
|
|
37
31
|
|
|
38
|
-
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or
|
|
34
|
+
service that:
|
|
39
35
|
|
|
40
|
-
|
|
41
|
-
license, or becomes able to license, to make, have made, use, sell, offer for
|
|
42
|
-
sale, import and have imported the software, in each case subject to the
|
|
43
|
-
limitations and conditions in this license. This license does not cover any
|
|
44
|
-
patent claims that you cause to be infringed by modifications or additions to
|
|
45
|
-
the software. If you or your company make any written claim that the software
|
|
46
|
-
infringes or contributes to infringement of any patent, your patent license for
|
|
47
|
-
the software granted under these terms ends immediately. If your company makes
|
|
48
|
-
such a claim, your patent license ends immediately for work on behalf of your
|
|
49
|
-
company.
|
|
36
|
+
1. substitutes for the Software;
|
|
50
37
|
|
|
51
|
-
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software
|
|
39
|
+
that exists as of the date we make the Software available; or
|
|
52
40
|
|
|
53
|
-
|
|
54
|
-
also gets a copy of these terms.
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
55
42
|
|
|
56
|
-
|
|
57
|
-
software prominent notices stating that you have modified the software.
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
58
44
|
|
|
59
|
-
|
|
45
|
+
1. for your internal use and access;
|
|
60
46
|
|
|
61
|
-
|
|
62
|
-
these terms.
|
|
47
|
+
2. for non-commercial education;
|
|
63
48
|
|
|
64
|
-
|
|
49
|
+
3. for non-commercial research; and
|
|
65
50
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
with a notice of your violation, and you cease all violation of this license no
|
|
69
|
-
later than 30 days after you receive that notice, your licenses will be
|
|
70
|
-
reinstated retroactively. However, if you violate these terms after such
|
|
71
|
-
reinstatement, any additional violation of these terms will cause your licenses
|
|
72
|
-
to terminate automatically and permanently.
|
|
51
|
+
4. in connection with professional services that you provide to a licensee
|
|
52
|
+
using the Software in accordance with these Terms and Conditions.
|
|
73
53
|
|
|
74
|
-
|
|
54
|
+
### Patents
|
|
75
55
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to
|
|
59
|
+
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
80
61
|
|
|
81
|
-
|
|
62
|
+
### Redistribution
|
|
82
63
|
|
|
83
|
-
The
|
|
84
|
-
|
|
85
|
-
of it.
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
86
66
|
|
|
87
|
-
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
+
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
+
remove any copyright notices provided in or with the Software.
|
|
88
70
|
|
|
89
|
-
|
|
90
|
-
organization that you work for, plus all organizations that have control over,
|
|
91
|
-
are under the control of, or are under common control with that
|
|
92
|
-
organization. **control** means ownership of substantially all the assets of an
|
|
93
|
-
entity, or the power to direct its management and policies by vote, contract, or
|
|
94
|
-
otherwise. Control can be direct or indirect.
|
|
71
|
+
### Disclaimer
|
|
95
72
|
|
|
96
|
-
|
|
97
|
-
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
98
76
|
|
|
99
|
-
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
100
80
|
|
|
101
|
-
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
+
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
+
the Apache License, Version 2.0 that is effective on the second anniversary of
|
|
91
|
+
the date we make the Software available. On or after that date, you may use the
|
|
92
|
+
Software under the Apache License, Version 2.0, in which case the following
|
|
93
|
+
will apply:
|
|
94
|
+
|
|
95
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
96
|
+
this file except in compliance with the License.
|
|
97
|
+
|
|
98
|
+
You may obtain a copy of the License at
|
|
99
|
+
|
|
100
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
101
|
+
|
|
102
|
+
Unless required by applicable law or agreed to in writing, software distributed
|
|
103
|
+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
104
|
+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
105
|
+
specific language governing permissions and limitations under the License.
|
|
@@ -1,14 +1,27 @@
|
|
|
1
|
-
import type { ChangeEvent, FormEvent, RefObject } from 'react';
|
|
1
|
+
import type { ChangeEvent, FormEvent, ReactNode, RefObject } from 'react';
|
|
2
|
+
export type ChatSubmitMode = 'send' | 'steer' | 'queue';
|
|
3
|
+
export type ChatImageAttachment = {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
path: string;
|
|
7
|
+
mediaType: string;
|
|
8
|
+
previewUrl?: string;
|
|
9
|
+
};
|
|
2
10
|
type ChatInputProps = {
|
|
3
11
|
input: string;
|
|
4
12
|
onInputChange: (e: ChangeEvent<HTMLTextAreaElement>) => void;
|
|
5
|
-
onSubmit: (e: FormEvent<HTMLFormElement>) => void;
|
|
13
|
+
onSubmit: (e: FormEvent<HTMLFormElement> | undefined, mode?: ChatSubmitMode) => void;
|
|
6
14
|
isResponding: boolean;
|
|
7
15
|
placeholder?: string;
|
|
8
16
|
inputRef?: RefObject<HTMLTextAreaElement | null>;
|
|
9
17
|
onStop?: () => void;
|
|
10
18
|
compact?: boolean;
|
|
19
|
+
imageAttachments?: ChatImageAttachment[];
|
|
20
|
+
onRemoveImageAttachment?: (id: string) => void;
|
|
21
|
+
footerStartControls?: ReactNode;
|
|
22
|
+
footerControls?: ReactNode;
|
|
23
|
+
submitDisabled?: boolean;
|
|
11
24
|
};
|
|
12
|
-
export declare function ChatInput({ input, onInputChange, onSubmit, isResponding, placeholder, inputRef, onStop, compact, }: ChatInputProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function ChatInput({ input, onInputChange, onSubmit, isResponding, placeholder, inputRef, onStop, compact, imageAttachments, onRemoveImageAttachment, footerStartControls, footerControls, submitDisabled, }: ChatInputProps): import("react/jsx-runtime").JSX.Element;
|
|
13
26
|
export {};
|
|
14
27
|
//# sourceMappingURL=chat-input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-input.d.ts","sourceRoot":"","sources":["../../../src/components/chat/chat-input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EAGT,SAAS,EACV,MAAM,OAAO,CAAA;AAKd,KAAK,cAAc,GAAG;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAA;IAC5D,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"chat-input.d.ts","sourceRoot":"","sources":["../../../src/components/chat/chat-input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EAGT,SAAS,EACT,SAAS,EACV,MAAM,OAAO,CAAA;AAKd,MAAM,MAAM,cAA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xs } from "react/jsx-runtime";
|
|
2
|
-
import { ArrowUp, Square } from 'lucide-react';
|
|
2
|
+
import { ArrowUp, Image as ImageIcon, Square, X } from 'lucide-react';
|
|
3
3
|
import { cn } from '../../lib/utils';
|
|
4
4
|
import { Button } from '../ui/button';
|
|
5
5
|
import { Textarea } from '../ui/textarea';
|
|
6
|
-
export function ChatInput({ input, onInputChange, onSubmit, isResponding, placeholder = 'Ask anything...', inputRef, onStop, compact = false, }) {
|
|
6
|
+
export function ChatInput({ input, onInputChange, onSubmit, isResponding, placeholder = 'Ask anything...', inputRef, onStop, compact = false, imageAttachments = [], onRemoveImageAttachment, footerStartControls, footerControls, submitDisabled = false, }) {
|
|
7
7
|
const hasInput = input.trim().length > 0;
|
|
8
|
+
const hasAttachments = imageAttachments.length > 0;
|
|
9
|
+
const canSubmit = !submitDisabled && (hasInput || hasAttachments);
|
|
8
10
|
const handleKeyDown = (e) => {
|
|
9
11
|
if (e.key === 'Enter') {
|
|
10
12
|
if (e.shiftKey) {
|
|
@@ -13,18 +15,23 @@ export function ChatInput({ input, onInputChange, onSubmit, isResponding, placeh
|
|
|
13
15
|
}
|
|
14
16
|
// Submit on plain Enter (if there's input)
|
|
15
17
|
e.preventDefault();
|
|
16
|
-
if (
|
|
17
|
-
|
|
18
|
-
onSubmit(e);
|
|
18
|
+
if (canSubmit) {
|
|
19
|
+
onSubmit(undefined, isResponding ? 'queue' : 'send');
|
|
19
20
|
}
|
|
20
21
|
else if (isResponding && onStop) {
|
|
21
22
|
// If no input but streaming, just stop
|
|
22
23
|
onStop();
|
|
23
24
|
}
|
|
24
25
|
}
|
|
26
|
+
else if (e.key === 'Tab' && !e.shiftKey && !e.metaKey && !e.ctrlKey) {
|
|
27
|
+
if (!canSubmit)
|
|
28
|
+
return;
|
|
29
|
+
e.preventDefault();
|
|
30
|
+
onSubmit(undefined, isResponding ? 'queue' : 'send');
|
|
31
|
+
}
|
|
25
32
|
};
|
|
26
|
-
//
|
|
27
|
-
const showStopButton = isResponding
|
|
33
|
+
// Keep the stop control available while a response is in progress.
|
|
34
|
+
const showStopButton = isResponding;
|
|
28
35
|
const handleButtonClick = (e) => {
|
|
29
36
|
// When rendered as stop button (type="button"), always call onStop
|
|
30
37
|
// Don't re-check conditions - trust the render decision to avoid race conditions
|
|
@@ -34,5 +41,15 @@ export function ChatInput({ input, onInputChange, onSubmit, isResponding, placeh
|
|
|
34
41
|
}
|
|
35
42
|
// If type="submit", form handles submission
|
|
36
43
|
};
|
|
37
|
-
return (_jsx("div", { className: cn('isolate w-full p-2'), "data-chat-input-wrapper": true, children: _jsx("div", { className: "mx-auto max-w-5xl", children: _jsx("form", { onSubmit:
|
|
44
|
+
return (_jsx("div", { className: cn('isolate w-full p-2'), "data-chat-input-wrapper": true, children: _jsx("div", { className: "mx-auto max-w-5xl", children: _jsx("form", { onSubmit: (e) => {
|
|
45
|
+
if (submitDisabled && !isResponding) {
|
|
46
|
+
e.preventDefault();
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
onSubmit(e, isResponding ? 'queue' : 'send');
|
|
50
|
+
}, children: _jsxs("div", { className: cn('bg-background relative flex w-full flex-col rounded-3xl border', compact && !hasAttachments && 'h-14'), children: [!compact && hasAttachments && (_jsx("div", { className: "flex max-h-32 gap-2 overflow-x-auto px-3 pt-3", children: imageAttachments.map((attachment) => (_jsxs("div", { className: "bg-muted/70 border-border flex max-w-48 shrink-0 items-center gap-2 rounded-xl border p-1.5 pr-2", children: [_jsx("div", { className: "bg-background flex size-9 shrink-0 items-center justify-center overflow-hidden rounded-lg border", children: attachment.previewUrl ? (_jsx("img", { src: attachment.previewUrl, alt: "", className: "size-full object-cover", draggable: false })) : (_jsx(ImageIcon, { className: "text-muted-foreground size-4" })) }), _jsx("span", { className: "min-w-0 truncate text-xs font-medium", title: attachment.path, children: attachment.name }), onRemoveImageAttachment && (_jsx("button", { type: "button", onClick: () => onRemoveImageAttachment(attachment.id), className: "text-muted-foreground hover:bg-accent hover:text-foreground flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-md transition-colors", "aria-label": `Remove ${attachment.name}`, children: _jsx(X, { className: "size-3.5" }) }))] }, attachment.id))) })), _jsx("div", { className: cn('w-full px-5', compact ? 'py-4' : 'pb-2 pt-4'), children: _jsx(Textarea, { ref: inputRef, value: input, placeholder: placeholder, onChange: onInputChange, onKeyDown: handleKeyDown, className: cn('max-h-32 min-h-[24px] resize-none rounded-none border-0 !bg-transparent p-0 text-sm shadow-none focus:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 dark:!bg-transparent', compact && 'max-h-6 min-h-6') }) }), !compact && (_jsxs("div", { className: "flex min-h-11 items-center justify-between gap-3 px-3 pb-3", children: [_jsx("div", { className: "flex min-w-0 shrink-0 items-center justify-start gap-1", children: footerStartControls }), _jsx("div", { className: "min-w-0 flex-1" }), _jsx("div", { className: "flex min-w-0 shrink-0 items-center justify-end gap-1.5", children: footerControls }), _jsxs(Button, { type: showStopButton ? 'button' : 'submit', size: "icon", className: "bg-primary text-primary-foreground size-8 cursor-pointer rounded-full hover:opacity-70 disabled:opacity-30", disabled: !canSubmit && !isResponding, onClick: handleButtonClick, children: [showStopButton ? (_jsx(Square, { className: "fill-primary-foreground size-4 animate-pulse" })) : (_jsx(ArrowUp, { className: "size-4" })), _jsx("span", { className: "sr-only", children: showStopButton
|
|
51
|
+
? 'Stop generating'
|
|
52
|
+
: isResponding
|
|
53
|
+
? 'Steer response'
|
|
54
|
+
: 'Send message' })] })] }))] }) }) }) }));
|
|
38
55
|
}
|
|
@@ -4,6 +4,12 @@ export type ChatMessagePart = {
|
|
|
4
4
|
} | {
|
|
5
5
|
type: 'reasoning';
|
|
6
6
|
text: string;
|
|
7
|
+
} | {
|
|
8
|
+
type: 'file';
|
|
9
|
+
mediaType: string;
|
|
10
|
+
filename?: string;
|
|
11
|
+
url: string;
|
|
12
|
+
previewUrl?: string;
|
|
7
13
|
} | {
|
|
8
14
|
type: 'tool-invocation';
|
|
9
15
|
toolCallId?: string;
|
|
@@ -21,6 +27,11 @@ export type ChatMessage = {
|
|
|
21
27
|
role: 'user' | 'assistant' | 'system';
|
|
22
28
|
content?: string;
|
|
23
29
|
parts?: ChatMessagePart[];
|
|
30
|
+
turn?: {
|
|
31
|
+
userMessageId?: string;
|
|
32
|
+
startedAtMs?: number;
|
|
33
|
+
completedAtMs?: number;
|
|
34
|
+
};
|
|
24
35
|
};
|
|
25
36
|
type MessageProps = {
|
|
26
37
|
message: ChatMessage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-message.d.ts","sourceRoot":"","sources":["../../../src/components/chat/chat-message.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chat-message.d.ts","sourceRoot":"","sources":["../../../src/components/chat/chat-message.tsx"],"names":[],"mappings":"AA+BA,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACnC;IACE,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,GACD;IACE,IAAI,EAAE,iBAAiB,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB,QAAQ,CAAC,EAAE;QACT,EAAE,EAAE,MAAM,CAAA;QACV,QAAQ,CAAC,EAAE,OAAO,CAAA;KACnB,CAAA;CACF,CAAA;AAEL,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE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