reachat 1.0.6 → 1.1.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/README.md +2 -1
- package/dist/Chat.d.ts +7 -4
- package/dist/ChatContext.d.ts +2 -0
- package/dist/Markdown/CodeHighlighter.d.ts +4 -0
- package/dist/Markdown/themes/dark.d.ts +0 -1
- package/dist/docs.json +22 -3
- package/dist/index.js +33 -26
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +33 -26
- package/dist/index.umd.cjs.map +1 -1
- package/dist/theme.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/assets/send.svg?react","../src/assets/stop.svg?react","../src/assets/paperclip.svg?react","../src/ChatContext.ts","../src/ChatInput.tsx","../src/SessionMessages/SessionEmpty.tsx","../src/SessionMessages/SessionMessagesHeader.tsx","../src/assets/back.svg?react","../src/SessionMessages/SessionMessagePanel.tsx","../src/assets/copy.svg?react","../src/Markdown/themes/dark.ts","../src/Markdown/themes/light.ts","../src/Markdown/CodeHighlighter.tsx","../src/Markdown/Table.tsx","../src/Markdown/Markdown.tsx","../src/Markdown/plugins/remarkCve.ts","../src/SessionMessages/SessionMessage/MessageQuestion.tsx","../src/SessionMessages/SessionMessage/MessageResponse.tsx","../src/assets/file.svg?react","../src/SessionMessages/SessionMessage/MessageFile.tsx","../src/SessionMessages/SessionMessage/MessageFiles.tsx","../src/SessionMessages/SessionMessage/MessageSource.tsx","../src/SessionMessages/SessionMessage/MessageSources.tsx","../src/assets/thumbs-down.svg?react","../src/assets/thumbs-up.svg?react","../src/assets/refresh.svg?react","../src/SessionMessages/SessionMessage/MessageActions.tsx","../src/SessionMessages/SessionMessage/SessionMessage.tsx","../src/SessionMessages/SessionMessages.tsx","../src/theme.ts","../src/utils/useDimensions.ts","../src/Chat.tsx","../src/SessionsList/SessionsList.tsx","../src/assets/trash.svg?react","../src/assets/chat.svg?react","../src/SessionsList/SessionListItem.tsx","../src/assets/plus.svg?react","../src/SessionsList/NewSessionButton.tsx","../src/utils/grouping.ts","../src/SessionsList/SessionGroups.tsx","../src/SessionsList/SessionsGroup.tsx"],"sourcesContent":["import * as React from \"react\";\nconst SvgSend = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 17, height: 17, viewBox: \"0 0 17 17\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"g\", { id: \"send\" }, /* @__PURE__ */ React.createElement(\"path\", { id: \"Vector\", d: \"M14.6111 2.33327C14.5349 2.3339 14.4598 2.35194 14.3917 2.386L2.39168 8.386C2.31456 8.42456 2.24872 8.4824 2.20055 8.55391C2.15238 8.62543 2.12352 8.70818 2.11677 8.79414C2.11002 8.88009 2.12561 8.96634 2.16203 9.04449C2.19845 9.12264 2.25446 9.19005 2.32462 9.24017L4.52514 10.8124L5.47371 13.6581C5.50257 13.7447 5.55457 13.8217 5.62406 13.8808C5.69355 13.9399 5.7779 13.9789 5.86796 13.9935C5.95802 14.0082 6.05036 13.9979 6.13499 13.9638C6.21962 13.9297 6.2933 13.873 6.34806 13.8001L7.05249 12.8606L10.3207 15.2376C10.3843 15.2839 10.4579 15.3146 10.5355 15.3271C10.6132 15.3396 10.6927 15.3336 10.7676 15.3097C10.8425 15.2857 10.9107 15.2444 10.9667 15.1891C11.0226 15.1338 11.0647 15.0661 11.0896 14.9915L15.0896 2.99147C15.1148 2.91597 15.1216 2.83555 15.1094 2.7569C15.0972 2.67825 15.0665 2.60363 15.0197 2.53926C14.9729 2.47488 14.9114 2.42261 14.8403 2.38678C14.7693 2.35096 14.6907 2.33261 14.6111 2.33327ZM13.2478 5.35345L10.3565 14.0266L7.67293 12.0755L13.2478 5.35345ZM10.684 5.35801L4.934 9.87559L3.58113 8.90879L10.684 5.35801ZM11.2784 6.16205L6.56746 11.843C6.56681 11.8437 6.56616 11.8443 6.56551 11.845L6.56355 11.8476C6.55841 11.8538 6.55342 11.8601 6.54858 11.8665C6.54319 11.8733 6.53798 11.8802 6.53295 11.8873L6.12085 12.4361L5.53426 10.6751L11.2784 6.16205Z\", fill: \"currentColor\" })));\nexport default SvgSend;\n","import * as React from \"react\";\nconst SvgStop = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1, strokeLinecap: \"round\", strokeLinejoin: \"round\", className: \"lucide lucide-octagon-x\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"m15 9-6 6\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"m9 9 6 6\" }));\nexport default SvgStop;\n","import * as React from \"react\";\nconst SvgPaperclip = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1, strokeLinecap: \"round\", strokeLinejoin: \"round\", className: \"lucide lucide-paperclip\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48\" }));\nexport default SvgPaperclip;\n","import { createContext } from 'react';\nimport { Session } from './types';\nimport { ChatTheme } from './theme';\nimport { PluggableList } from 'react-markdown/lib';\n\nexport interface ChatContextProps {\n sessions: Session[];\n disabled?: boolean;\n activeSessionId: string | null;\n theme?: ChatTheme;\n isLoading?: boolean;\n isCompact?: boolean;\n activeSession?: Session | null;\n remarkPlugins?: PluggableList[];\n selectSession?: (sessionId: string) => void;\n deleteSession?: (sessionId: string) => void;\n createSession?: () => void;\n sendMessage?: (message: string) => void;\n stopMessage?: () => void;\n fileUpload?: (file: File) => void;\n}\n\nexport const ChatContext = createContext<ChatContextProps>({\n sessions: [],\n activeSessionId: null\n});\n","import {\n FC,\n useState,\n KeyboardEvent,\n ReactElement,\n useRef,\n ChangeEvent,\n useContext\n} from 'react';\nimport { Button, Textarea, cn } from 'reablocks';\nimport SendIcon from '@/assets/send.svg?react';\nimport StopIcon from '@/assets/stop.svg?react';\nimport AttachIcon from '@/assets/paperclip.svg?react';\nimport { ChatContext } from './ChatContext';\n\ninterface ChatInputProps {\n /**\n * Default value for the input field.\n */\n defaultValue?: string;\n\n /**\n * Allowed file types for upload.\n */\n allowedFiles?: string[];\n\n /**\n * Placeholder text for the input field.\n */\n placeholder?: string;\n\n /**\n * Icon to show for send.\n */\n sendIcon?: ReactElement;\n\n /**\n * Icon to show for send.\n */\n stopIcon?: ReactElement;\n\n /**\n * Icon to show for attach.\n */\n attachIcon?: ReactElement;\n}\n\nexport const ChatInput: FC<ChatInputProps> = ({\n allowedFiles,\n placeholder,\n defaultValue,\n sendIcon = <SendIcon />,\n stopIcon = <StopIcon />,\n attachIcon = <AttachIcon />\n}) => {\n const { theme, isLoading, disabled, sendMessage, stopMessage, fileUpload } =\n useContext(ChatContext);\n const [message, setMessage] = useState<string>('');\n const fileInputRef = useRef<HTMLInputElement>(null);\n\n const handleSendMessage = () => {\n if (message.trim()) {\n sendMessage?.(message);\n setMessage('');\n }\n };\n\n const handleKeyPress = (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n handleSendMessage();\n }\n };\n\n const handleFileUpload = (event: ChangeEvent<HTMLInputElement>) => {\n const file = event.target.files?.[0];\n if (file && fileUpload) {\n fileUpload(file);\n }\n };\n\n return (\n <div className={cn(theme.input.base)}>\n <Textarea\n containerClassName={cn(theme.input.input)}\n minRows={1}\n autoFocus\n value={message}\n onChange={e => setMessage(e.target.value)}\n defaultValue={defaultValue}\n onKeyPress={handleKeyPress}\n placeholder={placeholder}\n disabled={isLoading || disabled}\n />\n <div className={cn(theme.input.actions.base)}>\n {allowedFiles?.length > 0 && (\n <>\n <input\n type=\"file\"\n ref={fileInputRef}\n className=\"hidden\"\n accept={allowedFiles.join(',')}\n onChange={handleFileUpload}\n />\n <Button\n title=\"Upload\"\n variant=\"text\"\n disabled={isLoading || disabled}\n className={cn(theme.input.upload)}\n onClick={() => fileInputRef.current?.click()}\n >\n {attachIcon}\n </Button>\n </>\n )}\n {isLoading && (\n <Button\n title=\"Stop\"\n className={cn(theme.input.actions.stop)}\n onClick={stopMessage}\n disabled={disabled}\n >\n {stopIcon}\n </Button>\n )}\n <Button\n title=\"Send\"\n className={cn(theme.input.actions.send)}\n onClick={handleSendMessage}\n disabled={isLoading || disabled}\n >\n {sendIcon}\n </Button>\n </div>\n </div>\n );\n};\n","import { FC, PropsWithChildren, useContext } from 'react';\nimport { ChatContext } from '@/ChatContext';\nimport { cn } from 'reablocks';\n\ninterface SessionEmptyProps extends PropsWithChildren {\n}\n\nexport const SessionEmpty: FC<SessionEmptyProps> = ({\n children\n}) => {\n const { theme } = useContext(ChatContext);\n return <div className={cn(theme.empty)}>{children}</div>;\n};\n","import { ChatContext } from '@/ChatContext';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cn, Ellipsis, DateFormat } from 'reablocks';\nimport { FC, PropsWithChildren, useContext } from 'react';\n\nexport const SessionMessagesHeader: FC<PropsWithChildren> = ({ children }) => {\n const { activeSession, theme } = useContext(ChatContext);\n const Comp = children ? Slot : 'header';\n\n if (!activeSession) {\n return null;\n }\n\n return (\n <Comp className={cn(theme.messages.header)}>\n {children || (\n <>\n <h2 className={cn(theme.messages.title)}>\n <Ellipsis limit={125} value={activeSession.title} />\n </h2>\n <DateFormat\n className={cn(theme.messages.date)}\n date={activeSession.createdAt}\n />\n </>\n )}\n </Comp>\n );\n};\n","import * as React from \"react\";\nconst SvgBack = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1, strokeLinecap: \"round\", strokeLinejoin: \"round\", className: \"lucide lucide-chevron-left\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"m15 18-6-6 6-6\" }));\nexport default SvgBack;\n","import { FC, PropsWithChildren, useContext } from 'react';\nimport { Button, cn } from 'reablocks';\nimport { ChatContext } from '@/ChatContext';\nimport { motion } from 'framer-motion';\nimport BackIcon from '@/assets/back.svg?react';\n\nexport const SessionMessagePanel: FC<PropsWithChildren> = ({ children }) => {\n const { activeSessionId, theme, isCompact, selectSession } =\n useContext(ChatContext);\n const isVisible = isCompact && activeSessionId;\n\n return (\n (!isCompact || isVisible) && (\n <motion.div\n initial={{ translateX: '200%' }}\n animate={{\n translateX: '0%',\n transition: {\n type: 'tween',\n ease: 'linear',\n duration: 0.2,\n when: 'beforeChildren'\n }\n }}\n exit={{ translateX: '200%' }}\n className={cn(theme.messages.base, {\n [theme.messages.companion]: isCompact,\n [theme.messages.console]: !isCompact\n })}\n >\n <div className={cn(theme.messages.inner)}>\n {isCompact && (\n <Button\n variant=\"text\"\n size=\"small\"\n onClick={() => selectSession(null)}\n className={cn(theme.messages.back)}\n >\n <BackIcon />\n Back\n </Button>\n )}\n {children}\n </div>\n </motion.div>\n )\n );\n};\n","import * as React from \"react\";\nconst SvgCopy = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1, strokeLinecap: \"round\", strokeLinejoin: \"round\", className: \"lucide lucide-copy\", ...props }, /* @__PURE__ */ React.createElement(\"rect\", { width: 14, height: 14, x: 8, y: 8, rx: 2, ry: 2 }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\" }));\nexport default SvgCopy;\n","export const dark = {\n 'code[class*=\"language-\"]': {\n 'background': '#11111f',\n 'color': '#e2e8f0',\n 'textShadow': '0 1px rgba(0, 0, 0, 0.3)',\n 'fontFamily': '\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace',\n 'direction': 'ltr',\n 'textAlign': 'left',\n 'whiteSpace': 'pre',\n 'wordSpacing': 'normal',\n 'wordBreak': 'normal',\n 'lineHeight': '1.5',\n 'MozTabSize': '2',\n 'OTabSize': '2',\n 'tabSize': '2',\n 'WebkitHyphens': 'none',\n 'MozHyphens': 'none',\n 'msHyphens': 'none',\n 'hyphens': 'none'\n },\n 'pre[class*=\"language-\"]': {\n 'background': '#11111f',\n 'color': '#e2e8f0',\n 'textShadow': '0 1px rgba(0, 0, 0, 0.3)',\n 'fontFamily': '\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace',\n 'direction': 'ltr',\n 'textAlign': 'left',\n 'whiteSpace': 'pre',\n 'wordSpacing': 'normal',\n 'wordBreak': 'normal',\n 'lineHeight': '1.5',\n 'MozTabSize': '2',\n 'OTabSize': '2',\n 'tabSize': '2',\n 'WebkitHyphens': 'none',\n 'MozHyphens': 'none',\n 'msHyphens': 'none',\n 'hyphens': 'none',\n 'padding': '1em',\n 'margin': '0.5em 0',\n 'overflow': 'auto',\n 'borderRadius': '0.3em'\n },\n 'code[class*=\"language-\"]::-moz-selection': {\n 'background': '#1e293b',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'code[class*=\"language-\"] *::-moz-selection': {\n 'background': '#1e293b',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'pre[class*=\"language-\"] *::-moz-selection': {\n 'background': '#1e293b',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'code[class*=\"language-\"]::selection': {\n 'background': '#1e293b',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'code[class*=\"language-\"] *::selection': {\n 'background': '#1e293b',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'pre[class*=\"language-\"] *::selection': {\n 'background': '#1e293b',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n ':not(pre) > code[class*=\"language-\"]': {\n 'padding': '0.2em 0.3em',\n 'borderRadius': '0.3em',\n 'whiteSpace': 'normal'\n },\n 'comment': {\n 'color': '#64748b',\n 'fontStyle': 'italic'\n },\n 'prolog': {\n 'color': '#64748b'\n },\n 'cdata': {\n 'color': '#64748b'\n },\n 'doctype': {\n 'color': '#e2e8f0'\n },\n 'punctuation': {\n 'color': '#e2e8f0'\n },\n 'entity': {\n 'color': '#3b82f6',\n 'cursor': 'help'\n },\n 'attr-name': {\n 'color': '#f59e0b'\n },\n 'class-name': {\n 'color': '#f59e0b'\n },\n 'boolean': {\n 'color': '#3b82f6'\n },\n 'constant': {\n 'color': '#3b82f6'\n },\n 'number': {\n 'color': '#3b82f6'\n },\n 'atrule': {\n 'color': '#f59e0b'\n },\n 'keyword': {\n 'color': '#f472b6'\n },\n 'property': {\n 'color': '#3b82f6'\n },\n 'tag': {\n 'color': '#3b82f6'\n },\n 'symbol': {\n 'color': '#3b82f6'\n },\n 'deleted': {\n 'color': '#ef4444'\n },\n 'important': {\n 'color': '#f472b6'\n },\n 'selector': {\n 'color': '#10b981'\n },\n 'string': {\n 'color': '#10b981'\n },\n 'char': {\n 'color': '#10b981'\n },\n 'builtin': {\n 'color': '#10b981'\n },\n 'inserted': {\n 'color': '#10b981'\n },\n 'regex': {\n 'color': '#10b981'\n },\n 'attr-value': {\n 'color': '#10b981'\n },\n 'attr-value > .token.punctuation': {\n 'color': '#10b981'\n },\n 'variable': {\n 'color': '#60a5fa'\n },\n 'operator': {\n 'color': '#60a5fa'\n },\n 'function': {\n 'color': '#60a5fa'\n },\n 'url': {\n 'color': '#60a5fa'\n },\n 'attr-value > .token.punctuation.attr-equals': {\n 'color': '#e2e8f0'\n },\n 'special-attr > .token.attr-value > .token.value.css': {\n 'color': '#e2e8f0'\n },\n '.language-css .token.selector': {\n 'color': '#3b82f6'\n },\n '.language-css .token.property': {\n 'color': '#e2e8f0'\n },\n '.language-css .token.function': {\n 'color': '#60a5fa'\n },\n '.language-css .token.url > .token.function': {\n 'color': '#60a5fa'\n },\n '.language-css .token.url > .token.string.url': {\n 'color': '#10b981'\n },\n '.language-css .token.important': {\n 'color': '#f472b6'\n },\n '.language-css .token.atrule .token.rule': {\n 'color': '#f472b6'\n },\n '.language-javascript .token.operator': {\n 'color': '#f472b6'\n },\n '.language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation': {\n 'color': '#ef4444'\n },\n '.language-json .token.operator': {\n 'color': '#e2e8f0'\n },\n '.language-json .token.null.keyword': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.url': {\n 'color': '#e2e8f0'\n },\n '.language-markdown .token.url > .token.operator': {\n 'color': '#e2e8f0'\n },\n '.language-markdown .token.url-reference.url > .token.string': {\n 'color': '#e2e8f0'\n },\n '.language-markdown .token.url > .token.content': {\n 'color': '#60a5fa'\n },\n '.language-markdown .token.url > .token.url': {\n 'color': '#60a5fa'\n },\n '.language-markdown .token.url-reference.url': {\n 'color': '#60a5fa'\n },\n '.language-markdown .token.blockquote.punctuation': {\n 'color': '#64748b',\n 'fontStyle': 'italic'\n },\n '.language-markdown .token.hr.punctuation': {\n 'color': '#64748b',\n 'fontStyle': 'italic'\n },\n '.language-markdown .token.code-snippet': {\n 'color': '#10b981'\n },\n '.language-markdown .token.bold .token.content': {\n 'color': '#f59e0b'\n },\n '.language-markdown .token.italic .token.content': {\n 'color': '#f472b6'\n },\n '.language-markdown .token.strike .token.content': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.strike .token.punctuation': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.list.punctuation': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.title.important > .token.punctuation': {\n 'color': '#3b82f6'\n },\n 'bold': {\n 'fontWeight': 'bold'\n },\n 'italic': {\n 'fontStyle': 'italic'\n },\n 'namespace': {\n 'Opacity': '0.8'\n },\n 'token.tab:not(:empty):before': {\n 'color': '#64748b',\n 'textShadow': 'none'\n },\n 'token.cr:before': {\n 'color': '#64748b',\n 'textShadow': 'none'\n },\n 'token.lf:before': {\n 'color': '#64748b',\n 'textShadow': 'none'\n },\n 'token.space:before': {\n 'color': '#64748b',\n 'textShadow': 'none'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item': {\n 'marginRight': '0.4em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button': {\n 'background': '#1e293b',\n 'color': '#94a3b8',\n 'padding': '0.1em 0.4em',\n 'borderRadius': '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a': {\n 'background': '#1e293b',\n 'color': '#94a3b8',\n 'padding': '0.1em 0.4em',\n 'borderRadius': '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span': {\n 'background': '#1e293b',\n 'color': '#94a3b8',\n 'padding': '0.1em 0.4em',\n 'borderRadius': '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n '.line-highlight.line-highlight': {\n 'background': 'rgba(59, 130, 246, 0.08)'\n },\n '.line-highlight.line-highlight:before': {\n 'background': '#1e293b',\n 'color': '#e2e8f0',\n 'padding': '0.1em 0.6em',\n 'borderRadius': '0.3em',\n 'boxShadow': '0 2px 0 0 rgba(0, 0, 0, 0.2)'\n },\n '.line-highlight.line-highlight[data-end]:after': {\n 'background': '#1e293b',\n 'color': '#e2e8f0',\n 'padding': '0.1em 0.6em',\n 'borderRadius': '0.3em',\n 'boxShadow': '0 2px 0 0 rgba(0, 0, 0, 0.2)'\n },\n 'pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before': {\n 'backgroundColor': 'rgba(59, 130, 246, 0.08)'\n },\n '.line-numbers.line-numbers .line-numbers-rows': {\n 'borderRightColor': '#1e293b'\n },\n '.command-line .command-line-prompt': {\n 'borderRightColor': '#1e293b'\n },\n '.line-numbers .line-numbers-rows > span:before': {\n 'color': '#64748b'\n },\n '.command-line .command-line-prompt > span:before': {\n 'color': '#64748b'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-1': {\n 'color': '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-5': {\n 'color': '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-9': {\n 'color': '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-2': {\n 'color': '#10b981'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-6': {\n 'color': '#10b981'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-10': {\n 'color': '#10b981'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-3': {\n 'color': '#60a5fa'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-7': {\n 'color': '#60a5fa'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-11': {\n 'color': '#60a5fa'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-4': {\n 'color': '#f472b6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-8': {\n 'color': '#f472b6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-12': {\n 'color': '#f472b6'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.15)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.15)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.15)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.15)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.25)'\n },\n '.prism-previewer.prism-previewer:before': {\n 'borderColor': '#11111f'\n },\n '.prism-previewer-gradient.prism-previewer-gradient div': {\n 'borderColor': '#11111f',\n 'borderRadius': '0.3em'\n },\n '.prism-previewer-color.prism-previewer-color:before': {\n 'borderRadius': '0.3em'\n },\n '.prism-previewer-easing.prism-previewer-easing:before': {\n 'borderRadius': '0.3em'\n },\n '.prism-previewer.prism-previewer:after': {\n 'borderTopColor': '#11111f'\n },\n '.prism-previewer-flipped.prism-previewer-flipped.after': {\n 'borderBottomColor': '#11111f'\n },\n '.prism-previewer-angle.prism-previewer-angle:before': {\n 'background': '#1e293b'\n },\n '.prism-previewer-time.prism-previewer-time:before': {\n 'background': '#1e293b'\n },\n '.prism-previewer-easing.prism-previewer-easing': {\n 'background': '#1e293b'\n },\n '.prism-previewer-angle.prism-previewer-angle circle': {\n 'stroke': '#e2e8f0',\n 'strokeOpacity': '1'\n },\n '.prism-previewer-time.prism-previewer-time circle': {\n 'stroke': '#e2e8f0',\n 'strokeOpacity': '1'\n },\n '.prism-previewer-easing.prism-previewer-easing circle': {\n 'stroke': '#e2e8f0',\n 'fill': 'transparent'\n },\n '.prism-previewer-easing.prism-previewer-easing path': {\n 'stroke': '#e2e8f0'\n },\n '.prism-previewer-easing.prism-previewer-easing line': {\n 'stroke': '#e2e8f0'\n }\n}\n","export const light = {\n 'code[class*=\"language-\"]': {\n 'background': '#fff',\n 'color': '#1e293b',\n 'textShadow': 'none',\n 'fontFamily': '\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace',\n 'direction': 'ltr',\n 'textAlign': 'left',\n 'whiteSpace': 'pre',\n 'wordSpacing': 'normal',\n 'wordBreak': 'normal',\n 'lineHeight': '1.5',\n 'MozTabSize': '2',\n 'OTabSize': '2',\n 'tabSize': '2',\n 'WebkitHyphens': 'none',\n 'MozHyphens': 'none',\n 'msHyphens': 'none',\n 'hyphens': 'none'\n },\n 'pre[class*=\"language-\"]': {\n 'background': '#fff',\n 'color': '#1e293b',\n 'textShadow': 'none',\n 'fontFamily': '\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace',\n 'direction': 'ltr',\n 'textAlign': 'left',\n 'whiteSpace': 'pre',\n 'wordSpacing': 'normal',\n 'wordBreak': 'normal',\n 'lineHeight': '1.5',\n 'MozTabSize': '2',\n 'OTabSize': '2',\n 'tabSize': '2',\n 'WebkitHyphens': 'none',\n 'MozHyphens': 'none',\n 'msHyphens': 'none',\n 'hyphens': 'none',\n 'padding': '1em',\n 'margin': '0.5em 0',\n 'overflow': 'auto',\n 'borderRadius': '0.3em',\n 'border': '1px solid #e2e8f0'\n },\n 'code[class*=\"language-\"]::-moz-selection': {\n 'background': '#e2e8f0',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'code[class*=\"language-\"] *::-moz-selection': {\n 'background': '#e2e8f0',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'pre[class*=\"language-\"] *::-moz-selection': {\n 'background': '#e2e8f0',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'code[class*=\"language-\"]::selection': {\n 'background': '#e2e8f0',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'code[class*=\"language-\"] *::selection': {\n 'background': '#e2e8f0',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'pre[class*=\"language-\"] *::selection': {\n 'background': '#e2e8f0',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n ':not(pre) > code[class*=\"language-\"]': {\n 'padding': '0.2em 0.3em',\n 'borderRadius': '0.3em',\n 'whiteSpace': 'normal',\n 'background': '#f1f5f9'\n },\n 'comment': {\n 'color': '#64748b',\n 'fontStyle': 'italic'\n },\n 'prolog': {\n 'color': '#64748b'\n },\n 'cdata': {\n 'color': '#64748b'\n },\n 'doctype': {\n 'color': '#1e293b'\n },\n 'punctuation': {\n 'color': '#64748b'\n },\n 'entity': {\n 'color': '#3b82f6',\n 'cursor': 'help'\n },\n 'attr-name': {\n 'color': '#ea580c'\n },\n 'class-name': {\n 'color': '#ea580c'\n },\n 'boolean': {\n 'color': '#3b82f6'\n },\n 'constant': {\n 'color': '#3b82f6'\n },\n 'number': {\n 'color': '#3b82f6'\n },\n 'atrule': {\n 'color': '#ea580c'\n },\n 'keyword': {\n 'color': '#9333ea'\n },\n 'property': {\n 'color': '#3b82f6'\n },\n 'tag': {\n 'color': '#3b82f6'\n },\n 'symbol': {\n 'color': '#3b82f6'\n },\n 'deleted': {\n 'color': '#dc2626'\n },\n 'important': {\n 'color': '#9333ea'\n },\n 'selector': {\n 'color': '#16a34a'\n },\n 'string': {\n 'color': '#16a34a'\n },\n 'char': {\n 'color': '#16a34a'\n },\n 'builtin': {\n 'color': '#16a34a'\n },\n 'inserted': {\n 'color': '#16a34a'\n },\n 'regex': {\n 'color': '#16a34a'\n },\n 'attr-value': {\n 'color': '#16a34a'\n },\n 'attr-value > .token.punctuation': {\n 'color': '#16a34a'\n },\n 'variable': {\n 'color': '#3b82f6'\n },\n 'operator': {\n 'color': '#3b82f6'\n },\n 'function': {\n 'color': '#3b82f6'\n },\n 'url': {\n 'color': '#3b82f6'\n },\n 'attr-value > .token.punctuation.attr-equals': {\n 'color': '#64748b'\n },\n 'special-attr > .token.attr-value > .token.value.css': {\n 'color': '#1e293b'\n },\n '.language-css .token.selector': {\n 'color': '#3b82f6'\n },\n '.language-css .token.property': {\n 'color': '#1e293b'\n },\n '.language-css .token.function': {\n 'color': '#3b82f6'\n },\n '.language-css .token.url > .token.function': {\n 'color': '#3b82f6'\n },\n '.language-css .token.url > .token.string.url': {\n 'color': '#16a34a'\n },\n '.language-css .token.important': {\n 'color': '#9333ea'\n },\n '.language-css .token.atrule .token.rule': {\n 'color': '#9333ea'\n },\n '.language-javascript .token.operator': {\n 'color': '#9333ea'\n },\n '.language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation': {\n 'color': '#dc2626'\n },\n '.language-json .token.operator': {\n 'color': '#1e293b'\n },\n '.language-json .token.null.keyword': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.url': {\n 'color': '#1e293b'\n },\n '.language-markdown .token.url > .token.operator': {\n 'color': '#1e293b'\n },\n '.language-markdown .token.url-reference.url > .token.string': {\n 'color': '#1e293b'\n },\n '.language-markdown .token.url > .token.content': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.url > .token.url': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.url-reference.url': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.blockquote.punctuation': {\n 'color': '#64748b',\n 'fontStyle': 'italic'\n },\n '.language-markdown .token.hr.punctuation': {\n 'color': '#64748b',\n 'fontStyle': 'italic'\n },\n '.language-markdown .token.code-snippet': {\n 'color': '#16a34a'\n },\n '.language-markdown .token.bold .token.content': {\n 'color': '#ea580c'\n },\n '.language-markdown .token.italic .token.content': {\n 'color': '#9333ea'\n },\n '.language-markdown .token.strike .token.content': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.strike .token.punctuation': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.list.punctuation': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.title.important > .token.punctuation': {\n 'color': '#3b82f6'\n },\n 'bold': {\n 'fontWeight': 'bold'\n },\n 'italic': {\n 'fontStyle': 'italic'\n },\n 'namespace': {\n 'Opacity': '0.8'\n },\n 'token.tab:not(:empty):before': {\n 'color': '#94a3b8'\n },\n 'token.cr:before': {\n 'color': '#94a3b8'\n },\n 'token.lf:before': {\n 'color': '#94a3b8'\n },\n 'token.space:before': {\n 'color': '#94a3b8'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item': {\n 'marginRight': '0.4em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button': {\n 'background': '#f1f5f9',\n 'color': '#475569',\n 'padding': '0.1em 0.4em',\n 'borderRadius': '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a': {\n 'background': '#f1f5f9',\n 'color': '#475569',\n 'padding': '0.1em 0.4em',\n 'borderRadius': '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span': {\n 'background': '#f1f5f9',\n 'color': '#475569',\n 'padding': '0.1em 0.4em',\n 'borderRadius': '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n '.line-highlight.line-highlight': {\n 'background': 'rgba(59, 130, 246, 0.08)'\n },\n '.line-highlight.line-highlight:before': {\n 'background': '#f1f5f9',\n 'color': '#1e293b',\n 'padding': '0.1em 0.6em',\n 'borderRadius': '0.3em',\n 'boxShadow': '0 2px 0 0 rgba(0, 0, 0, 0.1)'\n },\n '.line-highlight.line-highlight[data-end]:after': {\n 'background': '#f1f5f9',\n 'color': '#1e293b',\n 'padding': '0.1em 0.6em',\n 'borderRadius': '0.3em',\n 'boxShadow': '0 2px 0 0 rgba(0, 0, 0, 0.1)'\n },\n 'pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before': {\n 'backgroundColor': 'rgba(59, 130, 246, 0.08)'\n },\n '.line-numbers.line-numbers .line-numbers-rows': {\n 'borderRightColor': '#e2e8f0'\n },\n '.command-line .command-line-prompt': {\n 'borderRightColor': '#e2e8f0'\n },\n '.line-numbers .line-numbers-rows > span:before': {\n 'color': '#94a3b8'\n },\n '.command-line .command-line-prompt > span:before': {\n 'color': '#94a3b8'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-1': {\n 'color': '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-5': {\n 'color': '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-9': {\n 'color': '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-2': {\n 'color': '#16a34a'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-6': {\n 'color': '#16a34a'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-10': {\n 'color': '#16a34a'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-3': {\n 'color': '#ea580c'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-7': {\n 'color': '#ea580c'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-11': {\n 'color': '#ea580c'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-4': {\n 'color': '#9333ea'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-8': {\n 'color': '#9333ea'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-12': {\n 'color': '#9333ea'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.15)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.15)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.15)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.15)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.25)'\n },\n '.prism-previewer.prism-previewer:before': {\n 'borderColor': '#fff'\n },\n '.prism-previewer-gradient.prism-previewer-gradient div': {\n 'borderColor': '#fff',\n 'borderRadius': '0.3em'\n },\n '.prism-previewer-color.prism-previewer-color:before': {\n 'borderRadius': '0.3em'\n },\n '.prism-previewer-easing.prism-previewer-easing:before': {\n 'borderRadius': '0.3em'\n },\n '.prism-previewer.prism-previewer:after': {\n 'borderTopColor': '#fff'\n },\n '.prism-previewer-flipped.prism-previewer-flipped.after': {\n 'borderBottomColor': '#fff'\n },\n '.prism-previewer-angle.prism-previewer-angle:before': {\n 'background': '#f1f5f9'\n },\n '.prism-previewer-time.prism-previewer-time:before': {\n 'background': '#f1f5f9'\n },\n '.prism-previewer-easing.prism-previewer-easing': {\n 'background': '#f1f5f9'\n },\n '.prism-previewer-angle.prism-previewer-angle circle': {\n 'stroke': '#1e293b',\n 'strokeOpacity': '1'\n },\n '.prism-previewer-time.prism-previewer-time circle': {\n 'stroke': '#1e293b',\n 'strokeOpacity': '1'\n },\n '.prism-previewer-easing.prism-previewer-easing circle': {\n 'stroke': '#1e293b',\n 'fill': 'transparent'\n },\n '.prism-previewer-easing.prism-previewer-easing path': {\n 'stroke': '#1e293b'\n },\n '.prism-previewer-easing.prism-previewer-easing line': {\n 'stroke': '#1e293b'\n }\n}\n","import React, { FC, PropsWithChildren, ReactElement } from 'react';\nimport { Button, cn } from 'reablocks';\nimport { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';\nimport CopyIcon from '@/assets/copy.svg?react';\nimport { dark } from './themes';\n\nexport interface CodeHighlighterProps extends PropsWithChildren {\n /**\n * The class name to apply to the code block.\n */\n className?: string;\n\n /**\n * The language of the code block.\n */\n language?: string;\n\n /**\n * The class name to apply to the copy button.\n */\n copyClassName?: string;\n\n /**\n * Icon to show for copy.\n */\n copyIcon?: ReactElement;\n\n /**\n * The theme to use for the code block.\n */\n theme?: Record<string, string>;\n}\n\nexport const CodeHighlighter: FC<CodeHighlighterProps> = ({\n className,\n children,\n copyClassName,\n copyIcon = <CopyIcon />,\n language,\n theme = dark\n}) => {\n const match = language?.match(/language-(\\w+)/);\n const lang = match ? match[1] : 'text';\n\n const handleCopy = (text: string) => {\n navigator.clipboard\n .writeText(text)\n .then(() => {\n console.log('Text copied to clipboard');\n })\n .catch(err => {\n console.error('Could not copy text: ', err);\n });\n };\n\n return (\n <div className={cn('relative', className)}>\n {copyIcon && (\n <Button\n className={cn(copyClassName)}\n size=\"small\"\n variant=\"text\"\n title=\"Copy code\"\n onClick={() => handleCopy(children as string)}\n >\n {copyIcon}\n </Button>\n )}\n <SyntaxHighlighter\n language={lang}\n style={theme}\n >\n {children}\n </SyntaxHighlighter>\n </div>\n );\n};\n","import React, { FC, PropsWithChildren } from 'react';\n\nexport const TableComponent: FC<PropsWithChildren<React.HTMLAttributes<HTMLTableElement>>> = ({ children, ...props }) => (\n <table {...props}>\n {children}\n </table>\n);\n\nexport const TableHeaderCell: FC<PropsWithChildren<React.HTMLAttributes<HTMLTableHeaderCellElement>>> = ({ children, ...props }) => (\n <th {...props}>\n {children}\n </th>\n);\n\nexport const TableDataCell: FC<PropsWithChildren<React.HTMLAttributes<HTMLTableDataCellElement>>> = ({ children, ...props }) => (\n <td {...props}>\n {children}\n </td>\n);\n","import { FC, PropsWithChildren, useContext } from 'react';\nimport ReactMarkdown from 'react-markdown';\nimport { PluggableList } from 'react-markdown/lib';\nimport remarkGfm from 'remark-gfm';\nimport { CodeHighlighter } from './CodeHighlighter';\nimport { cn } from 'reablocks';\nimport { TableComponent, TableHeaderCell, TableDataCell } from './Table';\nimport { ChatContext } from '@/ChatContext';\n\ninterface MarkdownWrapperProps extends PropsWithChildren {\n /**\n * Remark plugins to apply to the markdown content.\n */\n remarkPlugins?: PluggableList[];\n}\n\nexport const Markdown: FC<MarkdownWrapperProps> = ({\n children,\n remarkPlugins = [remarkGfm]\n}) => {\n const { theme } = useContext(ChatContext);\n\n return (\n <ReactMarkdown\n remarkPlugins={remarkPlugins as PluggableList}\n components={{\n code: ({ className, ...props }) => (\n <CodeHighlighter\n {...props}\n // Ref: https://github.com/remarkjs/react-markdown?tab=readme-ov-file#use-custom-components-syntax-highlight\n language={className}\n className={cn(theme.messages.message.markdown.code, className)}\n copyClassName={cn(theme.messages.message.markdown.copy)}\n />\n ),\n table: props => <TableComponent {...props} className={cn(theme.messages.message.markdown.table)} />,\n th: props => <TableHeaderCell {...props} className={cn(theme.messages.message.markdown.th)} />,\n td: props => <TableDataCell {...props} className={cn(theme.messages.message.markdown.td)} />,\n a: props => <a {...props} className={cn(theme.messages.message.markdown.a)} />,\n p: props => <p {...props} className={cn(theme.messages.message.markdown.p)} />,\n li: props => <li {...props} className={cn(theme.messages.message.markdown.li)} />,\n ul: props => <ul {...props} className={cn(theme.messages.message.markdown.ul)} />,\n ol: props => <ol {...props} className={cn(theme.messages.message.markdown.ol)} />\n }}\n >\n {children as string}\n </ReactMarkdown>\n );\n};\n","import { findAndReplace } from 'mdast-util-find-and-replace';\n\nconst CVE_REGEX = /(CVE-(19|20)\\d{2}-\\d{4,7})/gi;\n\nexport function remarkCve() {\n return (tree, _file) => {\n findAndReplace(tree, [[\n CVE_REGEX,\n replaceCve as unknown as any\n ]]);\n };\n\n function replaceCve(value, id) {\n return [\n {\n type: 'link',\n url: `https://cve.mitre.org/cgi-bin/cvename.cgi?name=${id}`,\n children: [\n { children: [{ type: 'text', value: value.trim() }] }\n ]\n }\n ];\n }\n}\n","import { ChatContext } from '@/ChatContext';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cn } from 'reablocks';\nimport { FC, PropsWithChildren, useContext } from 'react';\nimport { Markdown } from '@/Markdown';\nimport { PluggableList } from 'react-markdown/lib';\nimport remarkGfm from 'remark-gfm';\nimport remarkYoutube from 'remark-youtube';\n\nexport interface MessageQuestionProps extends PropsWithChildren {\n /**\n * Question to render.\n */\n question: string;\n}\n\nexport const MessageQuestion: FC<MessageQuestionProps> = ({\n question,\n children\n}) => {\n const { theme, remarkPlugins = [remarkGfm, remarkYoutube] } =\n useContext(ChatContext);\n const Comp = children ? Slot : 'div';\n return (\n <Comp className={cn(theme.messages.message.question)}>\n {children || (\n <Markdown remarkPlugins={remarkPlugins as PluggableList[]}>\n {question}\n </Markdown>\n )}\n </Comp>\n );\n};\n","import { ChatContext } from '@/ChatContext';\nimport { Slot } from '@radix-ui/react-slot';\nimport { motion } from 'framer-motion';\nimport { cn } from 'reablocks';\nimport { FC, PropsWithChildren, useContext } from 'react';\nimport { Markdown } from '@/Markdown';\nimport { PluggableList } from 'react-markdown/lib';\nimport remarkGfm from 'remark-gfm';\nimport remarkYoutube from 'remark-youtube';\n\nexport interface MessageResponseProps extends PropsWithChildren {\n /**\n * Response to render.\n */\n response: string;\n\n /**\n * Whether the response is loading.\n */\n isLoading?: boolean;\n}\n\nexport const MessageResponse: FC<MessageResponseProps> = ({\n response,\n isLoading,\n children\n}) => {\n const { theme, remarkPlugins = [remarkGfm, remarkYoutube] } =\n useContext(ChatContext);\n const Comp = children ? Slot : 'div';\n return (\n <Comp className={cn(theme.messages.message.response)}>\n {children || (\n <>\n <Markdown remarkPlugins={remarkPlugins as PluggableList[]}>\n {response}\n </Markdown>\n {isLoading && (\n <motion.div\n className={cn(theme.messages.message.cursor)}\n animate={{ opacity: [1, 0] }}\n transition={{\n duration: 0.7,\n repeat: Infinity,\n repeatType: 'reverse'\n }}\n />\n )}\n </>\n )}\n </Comp>\n );\n};\n","import * as React from \"react\";\nconst SvgFile = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, viewBox: \"0 0 16 16\", fill: \"currentColor\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M2.7036 1.37034C3.04741 1.02653 3.51373 0.833374 3.99996 0.833374H9.33329H9.33331C9.47275 0.833374 9.59885 0.890449 9.68954 0.98251L13.6843 4.97722C13.7763 5.0679 13.8333 5.19398 13.8333 5.33337L13.8333 5.3379V13.3334C13.8333 13.8196 13.6401 14.2859 13.2963 14.6297C12.9525 14.9736 12.4862 15.1667 12 15.1667H3.99996C3.51373 15.1667 3.04741 14.9736 2.7036 14.6297C2.35978 14.2859 2.16663 13.8196 2.16663 13.3334V2.66671C2.16663 2.18048 2.35978 1.71416 2.7036 1.37034ZM3.99996 1.83337H8.83331V5.33337C8.83331 5.60952 9.05717 5.83337 9.33331 5.83337H12.8333V13.3334C12.8333 13.5544 12.7455 13.7663 12.5892 13.9226C12.4329 14.0789 12.221 14.1667 12 14.1667H3.99996C3.77895 14.1667 3.56698 14.0789 3.4107 13.9226C3.25442 13.7663 3.16663 13.5544 3.16663 13.3334V2.66671C3.16663 2.44569 3.25442 2.23373 3.4107 2.07745C3.56698 1.92117 3.77895 1.83337 3.99996 1.83337ZM9.83331 2.5405L12.1262 4.83337H9.83331V2.5405ZM5.33331 8.16663C5.05717 8.16663 4.83331 8.39048 4.83331 8.66663C4.83331 8.94277 5.05717 9.16663 5.33331 9.16663H10.6666C10.9428 9.16663 11.1666 8.94277 11.1666 8.66663C11.1666 8.39048 10.9428 8.16663 10.6666 8.16663H5.33331ZM4.83331 11.3334C4.83331 11.0572 5.05717 10.8334 5.33331 10.8334H10.6666C10.9428 10.8334 11.1666 11.0572 11.1666 11.3334C11.1666 11.6095 10.9428 11.8334 10.6666 11.8334H5.33331C5.05717 11.8334 4.83331 11.6095 4.83331 11.3334ZM5.33331 5.5C5.05717 5.5 4.83331 5.72386 4.83331 6C4.83331 6.27614 5.05717 6.5 5.33331 6.5H6.66665C6.94279 6.5 7.16665 6.27614 7.16665 6C7.16665 5.72386 6.94279 5.5 6.66665 5.5H5.33331Z\" }));\nexport default SvgFile;\n","import { FC, useContext, ReactElement } from 'react';\nimport { ConversationFile } from '@/types';\nimport { ChatContext } from '@/ChatContext';\nimport { Ellipsis, cn } from 'reablocks';\nimport FileIcon from '@/assets/file.svg?react';\n\nexport interface MessageFileProps extends ConversationFile {\n /**\n * Icon to show for delete.\n */\n fileIcon?: ReactElement;\n\n /**\n * Limit for the name.\n */\n limit?: number;\n}\n\nexport const MessageFile: FC<MessageFileProps> = ({\n name,\n type,\n url,\n limit = 100,\n fileIcon = <FileIcon />\n}) => {\n const { theme } = useContext(ChatContext);\n const isImage = type?.startsWith('image/');\n\n return (\n <figure\n className={cn(theme.messages.message.files.file.base)}\n onClick={() => {\n window.open(url, '_blank');\n }}\n >\n {isImage ? (\n <>\n <img src={url} className=\"h-10 w-10\" />\n </>\n ) : (\n <>\n {fileIcon}\n </>\n )}\n {name && (\n <figcaption>\n {name && (\n <span className={cn(theme.messages.message.files.file.name)}>\n <Ellipsis value={name} limit={limit} />\n </span>\n )}\n </figcaption>\n )}\n </figure>\n );\n};\n","import { ChatContext } from '@/ChatContext';\nimport { ConversationFile } from '@/types';\nimport { cn } from 'reablocks';\nimport { FC, PropsWithChildren, useContext } from 'react';\nimport { MessageFile } from './MessageFile';\nimport { Slot } from '@radix-ui/react-slot';\n\ninterface MessageFilesProps extends PropsWithChildren {\n /**\n * Files to render.\n */\n files: ConversationFile[];\n}\n\nexport const MessageFiles: FC<MessageFilesProps> = ({ files, children }) => {\n const { theme } = useContext(ChatContext);\n const Comp = children ? Slot : MessageFile;\n\n if (!files || files.length === 0) {\n return null;\n }\n\n return (\n files.length > 0 && (\n <div className={cn(theme.messages.message.files.base)}>\n {files.map((file, index) => (\n <Comp key={index} {...file}>\n {children}\n </Comp>\n ))}\n </div>\n )\n );\n};\n","import { FC, useContext } from 'react';\nimport { ConversationSource } from '@/types';\nimport { ChatContext } from '@/ChatContext';\nimport { Ellipsis, cn } from 'reablocks';\n\nexport interface MessageSourceProps extends ConversationSource {\n /**\n * Limit for the title.\n */\n limit?: number;\n}\n\nexport const MessageSource: FC<MessageSourceProps> = ({ title, url, image, limit = 50 }) => {\n const { theme, isCompact } = useContext(ChatContext);\n\n return (\n <figure\n className={cn(theme.messages.message.sources.source.base, {\n [theme.messages.message.sources.source.companion]: isCompact\n })}\n onClick={() => {\n if (url) {\n window.open(url, '_blank');\n }\n }}\n >\n {image && <img src={image} alt={title} className={cn(theme.messages.message.sources.source.image)} />}\n {(title || url) && (\n <figcaption>\n {title && (\n <span className={cn(theme.messages.message.sources.source.title)}>\n <Ellipsis value={title} limit={limit} />\n </span>\n )}\n {url && (\n <a href={url} target=\"_blank\" rel=\"noopener noreferrer\" className={cn(theme.messages.message.sources.source.url)}>\n {url}\n </a>\n )}\n </figcaption>\n )}\n </figure>\n );\n};\n","import { ChatContext } from '@/ChatContext';\nimport { ConversationSource } from '@/types';\nimport { cn } from 'reablocks';\nimport { FC, PropsWithChildren, useContext } from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { MessageSource } from './MessageSource';\n\ninterface MessageSourcesProps extends PropsWithChildren {\n /**\n * Sources to render.\n */\n sources: ConversationSource[];\n}\n\nexport const MessageSources: FC<MessageSourcesProps> = ({\n sources,\n children\n}) => {\n const { theme } = useContext(ChatContext);\n const Comp = children ? Slot : MessageSource;\n\n if (!sources || sources.length === 0) {\n return null;\n }\n\n return (\n sources &&\n sources.length > 0 && (\n <div className={cn(theme.messages.message.sources.base)}>\n {sources.map((source, index) => (\n <Comp key={index} {...source}>\n {children}\n </Comp>\n ))}\n </div>\n )\n );\n};\n","import * as React from \"react\";\nconst SvgThumbsDown = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1, strokeLinecap: \"round\", strokeLinejoin: \"round\", className: \"lucide lucide-thumbs-down\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M17 14V2\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z\" }));\nexport default SvgThumbsDown;\n","import * as React from \"react\";\nconst SvgThumbsUp = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1, strokeLinecap: \"round\", strokeLinejoin: \"round\", className: \"lucide lucide-thumbs-up\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M7 10v12\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z\" }));\nexport default SvgThumbsUp;\n","import * as React from \"react\";\nconst SvgRefresh = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1, strokeLinecap: \"round\", strokeLinejoin: \"round\", className: \"lucide lucide-refresh-ccw\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M3 3v5h5\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M16 16h5v5\" }));\nexport default SvgRefresh;\n","import { ChatContext } from '@/ChatContext';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cn, IconButton } from 'reablocks';\nimport {\n FC,\n PropsWithChildren,\n ReactElement,\n ReactNode,\n useContext\n} from 'react';\nimport CopyIcon from '@/assets/copy.svg?react';\nimport ThumbsDownIcon from '@/assets/thumbs-down.svg?react';\nimport ThumbUpIcon from '@/assets/thumbs-up.svg?react';\nimport RefreshIcon from '@/assets/refresh.svg?react';\n\nexport interface MessageActionsProps extends PropsWithChildren {\n /**\n * Question to be copied\n */\n question: string;\n\n /**\n * Response to be copied\n */\n response?: string;\n\n /**\n * Icon to show for copy.\n */\n copyIcon?: ReactElement;\n\n /**\n * Icon to show for thumbs up.\n */\n thumbsUpIcon?: ReactElement;\n\n /**\n * Icon to show for thumbs down.\n */\n thumbsDownIcon?: ReactElement;\n\n /**\n * Icon to show for refresh.\n */\n refreshIcon?: ReactElement;\n\n /**\n * Callback function to handle copying.\n */\n onCopy?: () => void;\n\n /**\n * Callback function to handle upvoting.\n */\n onUpvote?: () => void;\n\n /**\n * Callback function to handle downvoting.\n */\n onDownvote?: () => void;\n\n /**\n * Callback function to handle refreshing.\n */\n onRefresh?: () => void;\n}\n\nexport const MessageActions: FC<MessageActionsProps> = ({\n children,\n ...props\n}) => {\n const { theme } = useContext(ChatContext);\n const {\n question,\n response,\n copyIcon = <CopyIcon />,\n thumbsUpIcon = <ThumbUpIcon />,\n thumbsDownIcon = <ThumbsDownIcon />,\n refreshIcon = <RefreshIcon />,\n onCopy,\n onUpvote,\n onDownvote,\n onRefresh\n } = props;\n const Comp = children ? Slot : 'div';\n\n const handleCopy = (text: string) => {\n navigator.clipboard\n .writeText(text)\n .then(() => {\n console.log('Text copied to clipboard');\n })\n .catch(err => {\n console.error('Could not copy text: ', err);\n });\n };\n\n return (\n (copyIcon || thumbsDownIcon || thumbsUpIcon || refreshIcon) && (\n <Comp className={cn(theme.messages.message.footer.base)}>\n {children || (\n <>\n {copyIcon && (\n <IconButton\n variant=\"text\"\n disablePadding\n title=\"Copy question and response\"\n className={cn(theme.messages.message.footer.copy)}\n onClick={\n onCopy ? onCopy : () => handleCopy(`${question}\\n${response}`)\n }\n >\n {copyIcon}\n </IconButton>\n )}\n {thumbsUpIcon && (\n <IconButton\n variant=\"text\"\n disablePadding\n title=\"Upvote\"\n className={cn(theme.messages.message.footer.upvote)}\n onClick={onUpvote}\n >\n {thumbsUpIcon}\n </IconButton>\n )}\n {thumbsDownIcon && (\n <IconButton\n variant=\"text\"\n disablePadding\n title=\"Downvote\"\n className={cn(theme.messages.message.footer.downvote)}\n onClick={onDownvote}\n >\n {thumbsDownIcon}\n </IconButton>\n )}\n {refreshIcon && (\n <IconButton\n variant=\"text\"\n disablePadding\n title=\"Refresh\"\n className={cn(theme.messages.message.footer.refresh)}\n onClick={onRefresh}\n >\n {refreshIcon}\n </IconButton>\n )}\n </>\n )}\n </Comp>\n )\n );\n};\n","import { FC, PropsWithChildren, useContext } from 'react';\nimport { ChatContext } from '@/ChatContext';\nimport { Card, cn, Divider } from 'reablocks';\nimport CopyIcon from '@/assets/copy.svg?react';\nimport ThumbsDownIcon from '@/assets/thumbs-down.svg?react';\nimport ThumbUpIcon from '@/assets/thumbs-up.svg?react';\nimport RefreshIcon from '@/assets/refresh.svg?react';\nimport { Conversation } from '@/types';\nimport { motion } from 'framer-motion';\nimport { MessageQuestion } from './MessageQuestion';\nimport { MessageResponse } from './MessageResponse';\nimport { MessageFiles } from './MessageFiles';\nimport { MessageSources } from './MessageSources';\nimport { MessageActions } from './MessageActions';\n\nconst messageVariants = {\n hidden: {\n opacity: 0,\n y: 20\n },\n visible: {\n opacity: 1,\n y: 0,\n transition: {\n duration: 0.3\n }\n }\n};\n\ninterface SessionMessageProps extends PropsWithChildren {\n /**\n * Conversation to render.\n */\n conversation: Conversation;\n\n /**\n * Whether the message is the last one in the list.\n * This let's the chat know when to show the loading cursor.\n */\n isLast?: boolean;\n}\n\nexport const SessionMessage: FC<SessionMessageProps> = ({\n conversation,\n isLast,\n children\n}) => {\n const { theme, isLoading } = useContext(ChatContext);\n\n return (\n <motion.div key={conversation.id} variants={messageVariants}>\n <Card className={cn(theme.messages.message.base)}>\n {children || (\n <>\n <MessageFiles files={conversation.files} />\n <MessageQuestion question={conversation.question} />\n <MessageResponse\n response={conversation.response}\n isLoading={isLast && isLoading}\n />\n <MessageSources sources={conversation.sources} />\n <MessageActions\n question={conversation.question}\n response={conversation.response}\n />\n </>\n )}\n </Card>\n {!isLast && (\n <Divider />\n )}\n </motion.div>\n );\n};\n","import React, {\n ReactNode,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState\n} from 'react';\nimport { SessionEmpty } from './SessionEmpty';\nimport { ChatContext } from '@/ChatContext';\nimport { Button, cn, useInfinityList } from 'reablocks';\nimport { AnimatePresence, motion } from 'framer-motion';\nimport { Conversation } from '@/types';\n\nconst containerVariants = {\n hidden: {},\n visible: {\n transition: {\n staggerChildren: 0.07,\n when: 'beforeChildren'\n }\n }\n};\n\ninterface SessionMessagesProps {\n /**\n * Content to display when there are no sessions selected or a new session is started.\n */\n newSessionContent?: string | ReactNode;\n\n /**\n * Limit the number of results returned. Clientside pagination.\n */\n limit?: number | null;\n\n /**\n * Text to display for the show more button.\n */\n showMoreText?: string;\n\n /**\n * Render function for the session messages.\n */\n children?: (conversations: Conversation[]) => ReactNode;\n}\n\nexport const SessionMessages: React.FC<SessionMessagesProps> = ({\n children,\n newSessionContent,\n limit = 10,\n showMoreText = 'Show more'\n}) => {\n const { activeSession, theme } = useContext(ChatContext);\n const contentRef = useRef<HTMLDivElement | null>(null);\n const [isAnimating, setIsAnimating] = useState(true);\n\n useEffect(() => {\n if (contentRef.current) {\n // Scroll to the bottom of the content in animation queue\n requestAnimationFrame(\n () => (contentRef.current.scrollTop = contentRef.current.scrollHeight)\n );\n }\n // If we update the active session or load the page initially ( onAnimationComplete )\n // let's scroll to the bottom of the page.\n }, [activeSession, isAnimating]);\n\n function handleShowMore() {\n showNext(10);\n requestAnimationFrame(() => (contentRef.current.scrollTop = 0));\n }\n\n // Reverse the conversations so the last one is the first one\n const reversedConvos = useMemo(\n () => [...(activeSession?.conversations ?? [])].reverse(),\n [activeSession]\n );\n\n const { data, hasMore, showNext } = useInfinityList({\n items: reversedConvos,\n limit\n });\n\n // Reverse the data to the last one last now\n const reReversedConvo = useMemo(() => [...data].reverse(), [data]);\n\n // If we are not paging, just return the conversations\n const convosToRender = limit ? reReversedConvo : activeSession?.conversations;\n\n if (!activeSession) {\n return <SessionEmpty>{newSessionContent}</SessionEmpty>;\n }\n\n return (\n <div className={cn(theme.messages.content)} ref={contentRef}>\n {hasMore && (\n <Button\n variant=\"outline\"\n className={cn(theme.messages.showMore)}\n fullWidth\n onClick={handleShowMore}\n >\n {showMoreText}\n </Button>\n )}\n <AnimatePresence>\n <motion.div\n variants={containerVariants}\n key={activeSession?.id}\n initial=\"hidden\"\n animate=\"visible\"\n onAnimationComplete={() => {\n setIsAnimating(false);\n }}\n >\n {children(convosToRender)}\n </motion.div>\n </AnimatePresence>\n </div>\n );\n};\n","export interface ChatTheme {\n base: string;\n console: string;\n companion: string;\n empty: string;\n sessions: {\n base: string;\n console: string;\n companion: string;\n create: string;\n group: string;\n session: {\n base: string;\n active: string;\n delete: string;\n };\n };\n messages: {\n base: string;\n console: string;\n companion: string;\n back: string;\n inner: string;\n title: string;\n date: string;\n content: string;\n header: string;\n showMore: string;\n message: {\n base: string;\n question: string;\n response: string;\n cursor: string;\n files: {\n base: string;\n file: {\n base: string;\n name: string;\n };\n };\n sources: {\n base: string;\n source: {\n base: string;\n companion: string;\n image: string;\n title: string;\n url: string;\n };\n };\n markdown: {\n p: string;\n a: string;\n table: string;\n th: string;\n td: string;\n code: string;\n li: string;\n ul: string;\n ol: string;\n copy: string;\n };\n footer: {\n base: string;\n copy: string;\n upvote: string;\n downvote: string;\n refresh: string;\n };\n };\n };\n input: {\n base: string;\n upload: string;\n input: string;\n actions: {\n base: string;\n send: string;\n stop: string;\n };\n };\n}\n\nexport const chatTheme: ChatTheme = {\n base: 'dark:text-white text-gray-500',\n console: 'flex w-full gap-10 h-full',\n companion: 'w-full h-full overflow-hidden',\n empty: 'text-center flex-1',\n sessions: {\n base: 'overflow-auto',\n console:\n 'min-w-[150px] w-[30%] max-w-[300px] dark:bg-[#11111F] bg-[#F2F3F7] p-5 rounded-3xl',\n companion: 'w-full h-full',\n group:\n 'text-xs dart:text-gray-400 text-gray-700 mt-4 hover:bg-transparent mb-1',\n create: 'relative mb-4 rounded-[10px] text-white',\n session: {\n base: [\n 'group my-1 rounded-[10px] p-2 text-gray-500 border border-transparent hover:bg-gray-300 hover:border-gray-400 [&_svg]:text-gray-500',\n 'dark:text-typography dark:text-gray-400 dark:hover:bg-gray-800/50 dark:hover:border-gray-700/50 dark:[&_svg]:text-gray-200'\n ].join(' '),\n active: [\n 'border border-gray-300 hover:border-gray-400 text-gray-700 bg-gray-200 hover:bg-gray-300 ',\n 'dark:text-gray-500 dark:bg-gray-800/70 dark:border-gray-700/50 dark:text-white dark:border-gray-700/70 dark:hover:bg-gray-800/50',\n '[&_button]:!opacity-100'\n ].join(' '),\n delete: '[&>svg]:w-4 [&>svg]:h-4 opacity-0 group-hover:!opacity-50'\n }\n },\n messages: {\n base: '',\n console: 'flex flex-col mr-5 flex-1 overflow-hidden',\n companion: 'flex w-full h-full',\n back: 'self-start p-0 my-2',\n inner: 'flex-1 h-full flex flex-col',\n title: ['text-base font-bold text-gray-500', 'dark:text-gray-200'].join(\n ' '\n ),\n date: 'text-xs whitespace-nowrap pt-2 text-gray-400',\n content: [\n 'mt-2 flex-1 overflow-auto [&_hr]:bg-gray-200',\n 'dark:[&_hr]:bg-gray-800/60'\n ].join(' '),\n header: 'flex justify-between items-start gap-2',\n showMore: 'mb-4',\n message: {\n base: 'mt-4 mb-4 flex flex-col p-0 rounded border-none bg-transparent',\n question: [\n 'font-semibold mb-4 px-4 py-4 pb-2 rounded-3xl rounded-br-none text-typography border bg-gray-200 border-gray-300 text-gray-900',\n 'dark:bg-gray-900/60 dark:border-gray-700/50 dark:text-gray-100'\n ].join(' '),\n response: ['text-gray-900', 'dark:text-gray-100'].join(' '),\n cursor: 'inline-block w-1 h-4 bg-current',\n files: {\n base: 'mb-2 flex flex-wrap gap-3 ',\n file: {\n base: [\n 'flex items-center gap-2 border border-gray-300 px-3 py-2 rounded-lg cursor-pointer',\n 'dark:border-gray-700'\n ].join(' '),\n name: ['text-sm text-gray-500', 'dark:text-gray-200'].join(' ')\n }\n },\n sources: {\n base: 'my-4 flex flex-wrap gap-3',\n source: {\n base: [\n 'flex gap-2 border border-gray-200 px-4 py-2 rounded-lg cursor-pointer',\n 'dark:border-gray-700'\n ].join(' '),\n companion: 'flex-1 px-3 py-1.5',\n image: 'max-w-10 max-h-10 rounded-md w-full h-fit self-center',\n title: 'text-md block',\n url: 'text-sm text-blue-400 underline'\n }\n },\n markdown: {\n copy: 'absolute right-0 top-0 [&>svg]:w-4 [&>svg]:h-4 opacity-50',\n p: 'mb-2',\n a: 'text-blue-400 underline',\n table: 'table-auto w-full m-2',\n th: 'px-4 py-2 text-left font-bold border-b border-gray-500',\n td: 'px-4 py-2',\n code: 'm-2 rounded',\n li: 'mb-2 ml-6',\n ul: 'mb-4 list-disc',\n ol: 'mb-4 list-decimal'\n },\n footer: {\n base: 'mt-3 flex gap-1.5 text-gray-400',\n copy: [\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:!opacity-100 hover:bg-gray-200 hover:text-gray-500',\n 'dark:hover:bg-gray-800 dark:hover:text-white'\n ].join(' '),\n upvote:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:!opacity-100 hover:bg-gray-700/40 hover:text-white',\n downvote:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:!opacity-100 hover:bg-gray-700/40 hover:text-white',\n refresh:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:!opacity-100 hover:bg-gray-700/40 hover:text-white'\n }\n }\n },\n input: {\n base: 'flex mt-4 relative',\n upload: ['px-5 py-2 text-gray-400 size-10', 'dark:gray-500'].join(' '),\n input: [\n 'w-full border rounded-3xl px-3 py-2 pr-16 text-gray-500 border-gray-200 hover:bg-blue-100 hover:border-blue-500 after:hidden after:!mx-10 bg-white [&>textarea]:w-full [&>textarea]:flex-none',\n 'dark:border-gray-700/50 dark:text-gray-200 dark:bg-gray-950 dark:hover:bg-blue-950/40'\n ].join(' '),\n actions: {\n base: 'absolute flex gap-2 items-center right-5 inset-y-1/2 -translate-y-1/2 z-10',\n send: [\n 'px-3 py-3 hover:bg-primary-hover rounded-full bg-gray-200 hover:bg-gray-300 text-gray-500',\n 'dark:text-white dark:bg-gray-800 hover:dark:bg-gray-700'\n ].join(' '),\n stop: 'px-2 py-2 bg-red-500 text-white rounded-full hover:bg-red-700 '\n }\n }\n};\n","import { useCallback, useEffect, useState } from 'react';\n\nexport const useDimensions = () => {\n const [ref, setRef] = useState<HTMLElement | null>(null);\n const [width, setWidth] = useState<number | undefined>(undefined);\n\n const observe = useCallback((element: HTMLElement | null) => {\n if (element) setRef(element);\n }, []);\n\n useEffect(() => {\n if (!ref) return;\n\n const resizeObserver = new ResizeObserver(entries => {\n for (let entry of entries) {\n setWidth(entry.contentRect.width);\n }\n });\n\n resizeObserver.observe(ref);\n\n return () => {\n resizeObserver.disconnect();\n };\n }, [ref]);\n\n return { width, observe };\n};\n","import {\n CSSProperties,\n FC,\n PropsWithChildren,\n useCallback,\n useEffect,\n useMemo,\n useState\n} from 'react';\nimport { useHotkeys } from 'reakeys';\nimport { cn, useComponentTheme } from 'reablocks';\nimport { Session } from './types';\nimport { ChatTheme, chatTheme } from './theme';\nimport { ChatContext } from './ChatContext';\nimport { PluggableList } from 'react-markdown/lib';\nimport { AnimatePresence } from 'framer-motion';\nimport { useDimensions } from './utils/useDimensions';\n\nexport interface ChatProps extends PropsWithChildren {\n /**\n * The style to apply to the root element.\n */\n style?: CSSProperties;\n\n /**\n * The class name to apply to the root element.\n */\n className?: string;\n\n /**\n * The type of prompt to display. Companion prompts are smaller and are\n * meant to be displayed alongside other content. Full prompts are larger\n * and are meant to be displayed on their own.\n */\n viewType?: 'companion' | 'console';\n\n /**\n * The list of sessions to display.\n */\n sessions: Session[];\n\n /**\n * The ID of the currently active session.\n */\n activeSessionId?: string;\n\n /**\n * Custom theme for the chat.\n */\n theme?: ChatTheme;\n\n /**\n * Remark plugins to apply to the request/response.\n */\n remarkPlugins?: PluggableList[];\n\n /**\n * Whether to display a loading state.\n */\n isLoading?: boolean;\n\n /**\n * Whether to disable the chat.\n */\n disabled?: boolean;\n\n /**\n * Callback function to handle when a session is selected.\n */\n onSelectSession?: (sessionId: string) => void;\n\n /**\n * Callback function to handle when a session is deleted.\n */\n onDeleteSession?: (sessionId: string) => void;\n\n /**\n * Callback function to handle creating a new session.\n */\n onNewSession?: () => void;\n\n /**\n * Callback function to handle sending a new message.\n */\n onSendMessage?: (message: string) => void;\n\n /**\n * Callback function to handle stopping the current action.\n */\n onStopMessage?: () => void;\n\n /**\n * Callback function to handle file upload.\n */\n onFileUpload?: (file: File) => void;\n}\n\nexport const Chat: FC<ChatProps> = ({\n children,\n viewType = 'console',\n sessions,\n onSelectSession,\n onDeleteSession,\n onSendMessage,\n onStopMessage,\n onFileUpload,\n isLoading,\n activeSessionId,\n theme: customTheme = chatTheme,\n onNewSession,\n remarkPlugins,\n disabled,\n style,\n className\n}) => {\n const theme = useComponentTheme<ChatTheme>('chat', customTheme);\n const [internalActiveSessionID, setInternalActiveSessionID] = useState<\n string | null\n >(activeSessionId);\n\n const { width, observe } = useDimensions();\n const isCompact = viewType === 'companion' || (width && width < 767);\n\n useEffect(() => {\n setInternalActiveSessionID(activeSessionId);\n }, [activeSessionId]);\n\n const handleSelectSession = useCallback(\n (sessionId: string) => {\n setInternalActiveSessionID(sessionId);\n onSelectSession?.(sessionId);\n },\n [onSelectSession]\n );\n\n const handleDeleteSession = useCallback(\n (sessionId: string) => {\n setInternalActiveSessionID(undefined);\n onDeleteSession?.(sessionId);\n },\n [onDeleteSession]\n );\n\n const handleCreateNewSession = useCallback(() => {\n setInternalActiveSessionID(undefined);\n onNewSession?.();\n }, [onNewSession]);\n\n useHotkeys([\n {\n name: 'Create new session',\n category: 'Chat',\n keys: 'meta+shift+s',\n callback: event => {\n event.preventDefault();\n handleCreateNewSession();\n }\n }\n ]);\n\n const activeSession = useMemo(\n () => sessions.find(session => session.id === internalActiveSessionID),\n [sessions, internalActiveSessionID]\n );\n\n const contextValue = useMemo(\n () => ({\n sessions,\n activeSession,\n remarkPlugins,\n theme,\n disabled,\n isLoading,\n isCompact,\n activeSessionId: internalActiveSessionID,\n selectSession: handleSelectSession,\n deleteSession: handleDeleteSession,\n createSession: handleCreateNewSession,\n sendMessage: onSendMessage,\n stopMessage: onStopMessage,\n fileUpload: onFileUpload\n }),\n [\n isLoading,\n isCompact,\n disabled,\n theme,\n remarkPlugins,\n sessions,\n activeSession,\n internalActiveSessionID,\n handleSelectSession,\n handleDeleteSession,\n handleCreateNewSession,\n onSendMessage,\n onStopMessage,\n onFileUpload\n ]\n );\n\n return (\n <ChatContext.Provider value={contextValue}>\n <AnimatePresence initial={false}>\n <div\n ref={observe}\n className={cn(className, theme.base, {\n [theme.companion]: isCompact,\n [theme.console]: !isCompact\n })}\n style={style}\n >\n {children}\n </div>\n </AnimatePresence>\n </ChatContext.Provider>\n );\n};\n","import { FC, PropsWithChildren, useContext } from 'react';\nimport { List, cn } from 'reablocks';\nimport { ChatContext } from '@/ChatContext';\nimport { motion } from 'framer-motion';\n\nexport const SessionsList: FC<PropsWithChildren> = ({ children }) => {\n const { theme, isCompact, activeSessionId } = useContext(ChatContext);\n const isVisible = isCompact && !activeSessionId;\n\n return (\n (!isCompact || isVisible) && (\n <motion.div\n initial={{ translateX: '-100%' }}\n animate={{\n translateX: '0%',\n transition: {\n type: 'tween',\n ease: 'linear',\n duration: 0.2,\n when: 'beforeChildren'\n }\n }}\n exit={{ translateX: '-100%' }}\n className={cn(theme.sessions.base, {\n [theme.sessions.companion]: isCompact,\n [theme.sessions.console]: !isCompact\n })}\n >\n <List>{children}</List>\n </motion.div>\n )\n );\n};\n","import * as React from \"react\";\nconst SvgTrash = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 14, height: 14, viewBox: \"0 0 14 14\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"g\", { id: \"Delete\" }, /* @__PURE__ */ React.createElement(\"path\", { id: \"Vector\", d: \"M5.97905 1.16666C5.90859 1.16576 5.83895 1.18189 5.77605 1.21368C5.71316 1.24547 5.65888 1.29199 5.61783 1.34926C5.57677 1.40654 5.55016 1.47288 5.54025 1.54265C5.53034 1.61242 5.53743 1.68355 5.56092 1.75H4.27007C3.7342 1.75 3.2324 2.01817 2.93535 2.46435L2.24492 3.5H2.18738C2.12941 3.49918 2.07185 3.50989 2.01805 3.5315C1.96425 3.55312 1.91529 3.58522 1.874 3.62593C1.83271 3.66663 1.79993 3.71514 1.77755 3.76863C1.75518 3.82211 1.74365 3.87952 1.74365 3.9375C1.74365 3.99548 1.75518 4.05288 1.77755 4.10636C1.79993 4.15985 1.83271 4.20836 1.874 4.24907C1.91529 4.28977 1.96425 4.32187 2.01805 4.34349C2.07185 4.3651 2.12941 4.37582 2.18738 4.375H2.41012C2.44765 4.38067 2.48576 4.38143 2.52348 4.37727L3.24468 11.1084C3.33169 11.9199 4.02367 12.5417 4.83973 12.5417H9.15947C9.97553 12.5417 10.6675 11.9199 10.7545 11.1084L11.4763 4.37727C11.5133 4.38124 11.5506 4.38047 11.5874 4.375H11.8124C11.8704 4.37582 11.9279 4.3651 11.9817 4.34349C12.0355 4.32187 12.0845 4.28977 12.1258 4.24907C12.1671 4.20836 12.1998 4.15985 12.2222 4.10636C12.2446 4.05288 12.2561 3.99548 12.2561 3.9375C12.2561 3.87952 12.2446 3.82211 12.2222 3.76863C12.1998 3.71514 12.1671 3.66663 12.1258 3.62593C12.0845 3.58522 12.0355 3.55312 11.9817 3.5315C11.9279 3.50989 11.8704 3.49918 11.8124 3.5H11.7548L11.0644 2.46435C10.7671 2.01841 10.2654 1.75 9.7297 1.75H8.43885C8.46234 1.68355 8.46943 1.61242 8.45952 1.54265C8.44961 1.47288 8.423 1.40654 8.38194 1.34926C8.34089 1.29199 8.2866 1.24547 8.22371 1.21368C8.16082 1.18189 8.09118 1.16576 8.02072 1.16666H5.97905ZM4.27007 2.625H9.7297C9.97394 2.625 10.2009 2.74639 10.3364 2.9497L10.7033 3.5H3.29651L3.66338 2.9497L3.66395 2.94913C3.79913 2.74608 4.02543 2.625 4.27007 2.625ZM3.40361 4.375H10.5962L9.88465 11.015C9.8445 11.3894 9.53575 11.6667 9.15947 11.6667H4.83973C4.46345 11.6667 4.15527 11.3894 4.11512 11.015L3.40361 4.375Z\", fill: \"currentColor\" })));\nexport default SvgTrash;\n","import * as React from \"react\";\nconst SvgChat = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 16, height: 17, viewBox: \"0 0 16 17\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M8 3C4.55375 3 1.75 5.23753 1.75 7.98828C1.75 9.70653 2.83659 11.2762 4.62109 12.188C4.11184 13.0465 3.62587 13.7378 3.62012 13.7461C3.50687 13.9071 3.49862 14.1196 3.59912 14.2891C3.69012 14.4418 3.8543 14.5342 4.0293 14.5342C4.0483 14.5342 4.06743 14.533 4.08643 14.5308C4.15168 14.5233 5.66214 14.3364 7.50439 12.9604C7.67239 12.9712 7.8385 12.9766 8 12.9766C11.4462 12.9766 14.25 10.739 14.25 7.98828C14.25 5.23753 11.4462 3 8 3ZM8 4C10.8948 4 13.25 5.78903 13.25 7.98828C13.25 10.1875 10.8948 11.9766 8 11.9766C7.8055 11.9766 7.60225 11.968 7.396 11.9497C7.271 11.9382 7.1454 11.9752 7.0459 12.0527C6.3589 12.5855 5.72033 12.9308 5.20508 13.1528C5.38383 12.8648 5.57691 12.5418 5.76416 12.2061C5.83416 12.0813 5.84705 11.9324 5.7998 11.7974C5.75255 11.6624 5.64983 11.5542 5.51758 11.5C3.81033 10.7993 2.75 9.45328 2.75 7.98828C2.75 5.78903 5.10525 4 8 4ZM5.5 7.25C5.08575 7.25 4.75 7.58575 4.75 8C4.75 8.41425 5.08575 8.75 5.5 8.75C5.91425 8.75 6.25 8.41425 6.25 8C6.25 7.58575 5.91425 7.25 5.5 7.25ZM8 7.25C7.58575 7.25 7.25 7.58575 7.25 8C7.25 8.41425 7.58575 8.75 8 8.75C8.41425 8.75 8.75 8.41425 8.75 8C8.75 7.58575 8.41425 7.25 8 7.25ZM10.5 7.25C10.0857 7.25 9.75 7.58575 9.75 8C9.75 8.41425 10.0857 8.75 10.5 8.75C10.9143 8.75 11.25 8.41425 11.25 8C11.25 7.58575 10.9143 7.25 10.5 7.25Z\", fill: \"currentColor\" }));\nexport default SvgChat;\n","import { FC, PropsWithChildren, ReactElement, useContext } from 'react';\nimport { ListItem, IconButton, cn, Ellipsis } from 'reablocks';\nimport { Session } from '@/types';\nimport TrashIcon from '@/assets/trash.svg?react';\nimport ChatIcon from '@/assets/chat.svg?react';\nimport { ChatContext } from '@/ChatContext';\nimport { Slot } from '@radix-ui/react-slot';\n\nexport interface SessionListItemProps extends PropsWithChildren {\n /**\n * Session to display.\n */\n session: Session;\n\n /**\n * Indicates whether the session is deletable.\n */\n deletable?: boolean;\n\n /**\n * Icon to show for delete.\n */\n deleteIcon?: ReactElement;\n\n /**\n * Icon to show for chat.\n */\n chatIcon?: ReactElement;\n\n /**\n * Limit for the ellipsis.\n */\n limit?: number;\n}\n\nexport const SessionListItem: FC<SessionListItemProps> = ({\n children,\n session,\n deletable = true,\n limit = 100,\n deleteIcon = <TrashIcon />,\n chatIcon = <ChatIcon className=\"mr-2\" />\n}) => {\n const { activeSessionId, selectSession, deleteSession, theme } =\n useContext(ChatContext);\n const Comp = children ? Slot : ListItem;\n\n return (\n <Comp\n dense\n disableGutters\n active={session.id === activeSessionId}\n className={cn(theme.sessions.session.base, {\n [theme.sessions.session.active]: session.id === activeSessionId\n })}\n onClick={() => selectSession?.(session.id)}\n start={chatIcon}\n end={\n <>\n {deletable && (\n <IconButton\n size=\"small\"\n variant=\"text\"\n onClick={e => {\n e.stopPropagation();\n deleteSession(session.id);\n }}\n className={cn(theme.sessions.session.delete)}\n >\n {deleteIcon}\n </IconButton>\n )}\n </>\n }\n >\n {children || <Ellipsis value={session.title} limit={limit} />}\n </Comp>\n );\n};\n","import * as React from \"react\";\nconst SvgPlus = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 17, height: 17, viewBox: \"0 0 17 17\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"g\", { id: \"add\" }, /* @__PURE__ */ React.createElement(\"path\", { id: \"Vector\", d: \"M13.1667 9.16658H9.16671V13.1666H7.83337V9.16658H3.83337V7.83325H7.83337V3.83325H9.16671V7.83325H13.1667V9.16658Z\", fill: \"currentColor\" })));\nexport default SvgPlus;\n","import { Button, cn } from 'reablocks';\nimport { FC, PropsWithChildren, ReactNode, useContext } from 'react';\nimport { ChatContext } from '@/ChatContext';\nimport { Slot } from '@radix-ui/react-slot';\n\nimport PlusIcon from '@/assets/plus.svg?react';\n\ninterface NewSessionButtonProps extends PropsWithChildren {\n /**\n * Text for the new session button.\n */\n newSessionText?: string | ReactNode;\n}\n\nexport const NewSessionButton: FC<NewSessionButtonProps> = ({\n children,\n newSessionText = 'New Session'\n}) => {\n const { theme, createSession, disabled } = useContext(ChatContext);\n const Comp = children ? Slot : Button;\n\n return (\n <>\n <Comp\n fullWidth\n disableMargins\n color=\"primary\"\n startAdornment={<PlusIcon />}\n className={cn(theme.sessions.create)}\n disabled={disabled}\n onClick={createSession}\n >\n {children || newSessionText}\n </Comp>\n </>\n );\n};\n","import { format, isToday, isYesterday, isThisWeek, isThisMonth, isThisYear, parseISO } from 'date-fns';\nimport { Session } from '@/types';\n\nexport interface GroupedSessions {\n heading: string;\n sessions: Session[];\n}\n\nconst sortOrder = [\n 'Today',\n 'Yesterday',\n 'Last Week',\n 'Last Month',\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n 'Last Year'\n];\n\nexport function groupSessionsByDate(sessions: Session[]): GroupedSessions[] {\n const grouped: any = {};\n\n sessions.forEach(session => {\n const createdAt = new Date(session.createdAt);\n\n if (isToday(createdAt)) {\n if (!grouped['Today']) grouped['Today'] = [];\n grouped['Today'].push(session);\n } else if (isYesterday(createdAt)) {\n if (!grouped['Yesterday']) grouped['Yesterday'] = [];\n grouped['Yesterday'].push(session);\n } else if (isThisWeek(createdAt)) {\n if (!grouped['Last Week']) grouped['Last Week'] = [];\n grouped['Last Week'].push(session);\n } else if (isThisMonth(createdAt)) {\n if (!grouped['Last Month']) grouped['Last Month'] = [];\n grouped['Last Month'].push(session);\n } else if (isThisYear(createdAt)) {\n const monthName = format(createdAt, 'MMMM');\n if (!grouped[monthName]) grouped[monthName] = [];\n grouped[monthName].push(session);\n } else {\n if (!grouped['Last Year']) grouped['Last Year'] = [];\n grouped['Last Year'].push(session);\n }\n });\n\n // Remove empty groups\n Object.keys(grouped).forEach(key => {\n if (grouped[key].length === 0) {\n delete grouped[key];\n }\n });\n\n // Sort groups\n const sortedGroups = Object.keys(grouped).sort((a, b) =>\n sortOrder.indexOf(a) - sortOrder.indexOf(b)\n );\n\n return sortedGroups.map(heading => ({\n heading,\n sessions: grouped[heading].sort((a, b) =>\n new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()\n )\n }));\n}\n","import { FC, ReactNode, useContext, useMemo } from 'react';\nimport { GroupedSessions, groupSessionsByDate } from '@/utils/grouping';\nimport { ChatContext } from '@/ChatContext';\n\nexport interface SessionGroupsProps {\n /**\n * Render function for the session groups.\n */\n children: (groups: GroupedSessions[]) => ReactNode;\n}\n\nexport const SessionGroups: FC<SessionGroupsProps> = ({ children }) => {\n const { sessions } = useContext(ChatContext);\n const groups = useMemo(() => groupSessionsByDate(sessions), [sessions]);\n\n return <>{children(groups)}</>;\n};\n","import { FC, PropsWithChildren, ReactNode, useContext } from 'react';\nimport { ChatContext } from '@/ChatContext';\nimport { ListItem, cn } from 'reablocks';\n\ninterface SessionsGroupProps extends PropsWithChildren {\n /**\n * Heading for the session group.\n */\n heading?: string | ReactNode;\n}\n\nexport const SessionsGroup: FC<SessionsGroupProps> = ({\n heading,\n children,\n}) => {\n const { theme } = useContext(ChatContext);\n return (\n <>\n {heading && (\n <ListItem\n disableGutters\n disablePadding\n className={cn(theme.sessions.group)}\n >\n {heading}\n </ListItem>\n )}\n {children}\n </>\n );\n};\n"],"names":["SendIcon","StopIcon","AttachIcon","BackIcon","CopyIcon","SyntaxHighlighter","FileIcon","ThumbUpIcon","ThumbsDownIcon","RefreshIcon","TrashIcon","ChatIcon","PlusIcon"],"mappings":";;;;;;;;;;;;;AACA,MAAM,UAAU,CAAC,UAA0B,sBAAM,cAAc,OAAO,EAAE,OAAO,IAAI,QAAQ,IAAI,SAAS,aAAa,MAAM,QAAQ,OAAO,8BAA8B,GAAG,MAAO,GA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K,OAAO,EAAE;AAAA,IAAK,CAAC,GAAG,MACjD,UAAU,QAAQ,CAAC,IAAI,UAAU,QAAQ,CAAC;AAAA,EAAA;AAGrC,SAAA,aAAa,IAAI,CAAY,aAAA;AAAA,IAClC;AAAA,IACA,UAAU,QAAQ,OAAO,EAAE;AAAA,MAAK,CAAC,GAAG,MAClC,IAAI,KAAK,EAAE,SAAS,EAAE,QAAA,IAAY,IAAI,KAAK,EAAE,SAAS,EAAE,QAAQ;AAAA,IAClE;AAAA,EACA,EAAA;AACJ;AC/DO,MAAM,gBAAwC,CAAC,EAAE,eAAe;AACrE,QAAM,EAAE,SAAA,IAAa,WAAW,WAAW;AACrC,QAAA,SAAS,QAAQ,MAAM,oBAAoB,QAAQ,GAAG,CAAC,QAAQ,CAAC;AAE/D,SAAA,oBAAA,UAAA,EAAG,UAAS,SAAA,MAAM,EAAE,CAAA;AAC7B;ACLO,MAAM,gBAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AACF,MAAM;AACJ,QAAM,EAAE,MAAA,IAAU,WAAW,WAAW;AACxC,SAEK,qBAAA,UAAA,EAAA,UAAA;AAAA,IACC,WAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,gBAAc;AAAA,QACd,gBAAc;AAAA,QACd,WAAW,GAAG,MAAM,SAAS,KAAK;AAAA,QAEjC,UAAA;AAAA,MAAA;AAAA,IACH;AAAA,IAED;AAAA,EACH,EAAA,CAAA;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/assets/send.svg?react","../src/assets/stop.svg?react","../src/assets/paperclip.svg?react","../src/ChatContext.ts","../src/ChatInput.tsx","../src/SessionMessages/SessionEmpty.tsx","../src/SessionMessages/SessionMessagesHeader.tsx","../src/assets/back.svg?react","../src/SessionMessages/SessionMessagePanel.tsx","../src/assets/copy.svg?react","../src/Markdown/themes/dark.ts","../src/Markdown/themes/light.ts","../src/Markdown/CodeHighlighter.tsx","../src/Markdown/Table.tsx","../src/Markdown/Markdown.tsx","../src/Markdown/plugins/remarkCve.ts","../src/SessionMessages/SessionMessage/MessageQuestion.tsx","../src/SessionMessages/SessionMessage/MessageResponse.tsx","../src/assets/file.svg?react","../src/SessionMessages/SessionMessage/MessageFile.tsx","../src/SessionMessages/SessionMessage/MessageFiles.tsx","../src/SessionMessages/SessionMessage/MessageSource.tsx","../src/SessionMessages/SessionMessage/MessageSources.tsx","../src/assets/thumbs-down.svg?react","../src/assets/thumbs-up.svg?react","../src/assets/refresh.svg?react","../src/SessionMessages/SessionMessage/MessageActions.tsx","../src/SessionMessages/SessionMessage/SessionMessage.tsx","../src/SessionMessages/SessionMessages.tsx","../src/theme.ts","../src/utils/useDimensions.ts","../src/Chat.tsx","../src/SessionsList/SessionsList.tsx","../src/assets/trash.svg?react","../src/assets/chat.svg?react","../src/SessionsList/SessionListItem.tsx","../src/assets/plus.svg?react","../src/SessionsList/NewSessionButton.tsx","../src/utils/grouping.ts","../src/SessionsList/SessionGroups.tsx","../src/SessionsList/SessionsGroup.tsx"],"sourcesContent":["import * as React from \"react\";\nconst SvgSend = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 17, height: 17, viewBox: \"0 0 17 17\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"g\", { id: \"send\" }, /* @__PURE__ */ React.createElement(\"path\", { id: \"Vector\", d: \"M14.6111 2.33327C14.5349 2.3339 14.4598 2.35194 14.3917 2.386L2.39168 8.386C2.31456 8.42456 2.24872 8.4824 2.20055 8.55391C2.15238 8.62543 2.12352 8.70818 2.11677 8.79414C2.11002 8.88009 2.12561 8.96634 2.16203 9.04449C2.19845 9.12264 2.25446 9.19005 2.32462 9.24017L4.52514 10.8124L5.47371 13.6581C5.50257 13.7447 5.55457 13.8217 5.62406 13.8808C5.69355 13.9399 5.7779 13.9789 5.86796 13.9935C5.95802 14.0082 6.05036 13.9979 6.13499 13.9638C6.21962 13.9297 6.2933 13.873 6.34806 13.8001L7.05249 12.8606L10.3207 15.2376C10.3843 15.2839 10.4579 15.3146 10.5355 15.3271C10.6132 15.3396 10.6927 15.3336 10.7676 15.3097C10.8425 15.2857 10.9107 15.2444 10.9667 15.1891C11.0226 15.1338 11.0647 15.0661 11.0896 14.9915L15.0896 2.99147C15.1148 2.91597 15.1216 2.83555 15.1094 2.7569C15.0972 2.67825 15.0665 2.60363 15.0197 2.53926C14.9729 2.47488 14.9114 2.42261 14.8403 2.38678C14.7693 2.35096 14.6907 2.33261 14.6111 2.33327ZM13.2478 5.35345L10.3565 14.0266L7.67293 12.0755L13.2478 5.35345ZM10.684 5.35801L4.934 9.87559L3.58113 8.90879L10.684 5.35801ZM11.2784 6.16205L6.56746 11.843C6.56681 11.8437 6.56616 11.8443 6.56551 11.845L6.56355 11.8476C6.55841 11.8538 6.55342 11.8601 6.54858 11.8665C6.54319 11.8733 6.53798 11.8802 6.53295 11.8873L6.12085 12.4361L5.53426 10.6751L11.2784 6.16205Z\", fill: \"currentColor\" })));\nexport default SvgSend;\n","import * as React from \"react\";\nconst SvgStop = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1, strokeLinecap: \"round\", strokeLinejoin: \"round\", className: \"lucide lucide-octagon-x\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"m15 9-6 6\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"m9 9 6 6\" }));\nexport default SvgStop;\n","import * as React from \"react\";\nconst SvgPaperclip = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1, strokeLinecap: \"round\", strokeLinejoin: \"round\", className: \"lucide lucide-paperclip\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48\" }));\nexport default SvgPaperclip;\n","import { createContext } from 'react';\nimport { Session } from './types';\nimport { ChatTheme } from './theme';\nimport { PluggableList } from 'react-markdown/lib';\n\nexport type ChatViewType = 'chat' | 'companion' | 'console';\n\nexport interface ChatContextProps {\n sessions: Session[];\n disabled?: boolean;\n activeSessionId: string | null;\n theme?: ChatTheme;\n isLoading?: boolean;\n isCompact?: boolean;\n viewType?: ChatViewType;\n activeSession?: Session | null;\n remarkPlugins?: PluggableList[];\n selectSession?: (sessionId: string) => void;\n deleteSession?: (sessionId: string) => void;\n createSession?: () => void;\n sendMessage?: (message: string) => void;\n stopMessage?: () => void;\n fileUpload?: (file: File) => void;\n}\n\nexport const ChatContext = createContext<ChatContextProps>({\n sessions: [],\n activeSessionId: null\n});\n","import {\n FC,\n useState,\n KeyboardEvent,\n ReactElement,\n useRef,\n ChangeEvent,\n useContext\n} from 'react';\nimport { Button, Textarea, cn } from 'reablocks';\nimport SendIcon from '@/assets/send.svg?react';\nimport StopIcon from '@/assets/stop.svg?react';\nimport AttachIcon from '@/assets/paperclip.svg?react';\nimport { ChatContext } from './ChatContext';\n\ninterface ChatInputProps {\n /**\n * Default value for the input field.\n */\n defaultValue?: string;\n\n /**\n * Allowed file types for upload.\n */\n allowedFiles?: string[];\n\n /**\n * Placeholder text for the input field.\n */\n placeholder?: string;\n\n /**\n * Icon to show for send.\n */\n sendIcon?: ReactElement;\n\n /**\n * Icon to show for send.\n */\n stopIcon?: ReactElement;\n\n /**\n * Icon to show for attach.\n */\n attachIcon?: ReactElement;\n}\n\nexport const ChatInput: FC<ChatInputProps> = ({\n allowedFiles,\n placeholder,\n defaultValue,\n sendIcon = <SendIcon />,\n stopIcon = <StopIcon />,\n attachIcon = <AttachIcon />\n}) => {\n const { theme, isLoading, disabled, sendMessage, stopMessage, fileUpload } =\n useContext(ChatContext);\n const [message, setMessage] = useState<string>('');\n const fileInputRef = useRef<HTMLInputElement>(null);\n\n const handleSendMessage = () => {\n if (message.trim()) {\n sendMessage?.(message);\n setMessage('');\n }\n };\n\n const handleKeyPress = (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n handleSendMessage();\n }\n };\n\n const handleFileUpload = (event: ChangeEvent<HTMLInputElement>) => {\n const file = event.target.files?.[0];\n if (file && fileUpload) {\n fileUpload(file);\n }\n };\n\n return (\n <div className={cn(theme.input.base)}>\n <Textarea\n containerClassName={cn(theme.input.input)}\n minRows={1}\n autoFocus\n value={message}\n onChange={e => setMessage(e.target.value)}\n defaultValue={defaultValue}\n onKeyPress={handleKeyPress}\n placeholder={placeholder}\n disabled={isLoading || disabled}\n />\n <div className={cn(theme.input.actions.base)}>\n {allowedFiles?.length > 0 && (\n <>\n <input\n type=\"file\"\n ref={fileInputRef}\n className=\"hidden\"\n accept={allowedFiles.join(',')}\n onChange={handleFileUpload}\n />\n <Button\n title=\"Upload\"\n variant=\"text\"\n disabled={isLoading || disabled}\n className={cn(theme.input.upload)}\n onClick={() => fileInputRef.current?.click()}\n >\n {attachIcon}\n </Button>\n </>\n )}\n {isLoading && (\n <Button\n title=\"Stop\"\n className={cn(theme.input.actions.stop)}\n onClick={stopMessage}\n disabled={disabled}\n >\n {stopIcon}\n </Button>\n )}\n <Button\n title=\"Send\"\n className={cn(theme.input.actions.send)}\n onClick={handleSendMessage}\n disabled={isLoading || disabled}\n >\n {sendIcon}\n </Button>\n </div>\n </div>\n );\n};\n","import { FC, PropsWithChildren, useContext } from 'react';\nimport { ChatContext } from '@/ChatContext';\nimport { cn } from 'reablocks';\n\ninterface SessionEmptyProps extends PropsWithChildren {\n}\n\nexport const SessionEmpty: FC<SessionEmptyProps> = ({\n children\n}) => {\n const { theme } = useContext(ChatContext);\n return <div className={cn(theme.empty)}>{children}</div>;\n};\n","import { ChatContext } from '@/ChatContext';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cn, Ellipsis, DateFormat } from 'reablocks';\nimport { FC, PropsWithChildren, useContext } from 'react';\n\nexport const SessionMessagesHeader: FC<PropsWithChildren> = ({ children }) => {\n const { activeSession, theme } = useContext(ChatContext);\n const Comp = children ? Slot : 'header';\n\n if (!activeSession) {\n return null;\n }\n\n return (\n <Comp className={cn(theme.messages.header)}>\n {children || (\n <>\n <h2 className={cn(theme.messages.title)}>\n <Ellipsis limit={125} value={activeSession.title} />\n </h2>\n <DateFormat\n className={cn(theme.messages.date)}\n date={activeSession.createdAt}\n />\n </>\n )}\n </Comp>\n );\n};\n","import * as React from \"react\";\nconst SvgBack = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1, strokeLinecap: \"round\", strokeLinejoin: \"round\", className: \"lucide lucide-chevron-left\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"m15 18-6-6 6-6\" }));\nexport default SvgBack;\n","import { FC, PropsWithChildren, useContext } from 'react';\nimport { Button, cn } from 'reablocks';\nimport { ChatContext } from '@/ChatContext';\nimport { motion } from 'framer-motion';\nimport BackIcon from '@/assets/back.svg?react';\n\nexport const SessionMessagePanel: FC<PropsWithChildren> = ({ children }) => {\n const { activeSessionId, theme, isCompact, selectSession, viewType } =\n useContext(ChatContext);\n const isVisible = (isCompact && activeSessionId) || viewType === 'chat' || !isCompact;\n\n return (\n isVisible && (\n <motion.div\n initial={{ translateX: '200%' }}\n animate={{\n translateX: '0%',\n transition: {\n type: 'tween',\n ease: 'linear',\n duration: 0.2,\n when: 'beforeChildren'\n }\n }}\n exit={{ translateX: '200%' }}\n className={cn(theme.messages.base, {\n [theme.messages.companion]: isCompact,\n [theme.messages.console]: !isCompact\n })}\n >\n <div className={cn(theme.messages.inner)}>\n {(isCompact && viewType !== 'chat') && (\n <Button\n variant=\"text\"\n size=\"small\"\n onClick={() => selectSession(null)}\n className={cn(theme.messages.back)}\n >\n <BackIcon />\n Back\n </Button>\n )}\n {children}\n </div>\n </motion.div>\n )\n );\n};\n","import * as React from \"react\";\nconst SvgCopy = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1, strokeLinecap: \"round\", strokeLinejoin: \"round\", className: \"lucide lucide-copy\", ...props }, /* @__PURE__ */ React.createElement(\"rect\", { width: 14, height: 14, x: 8, y: 8, rx: 2, ry: 2 }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\" }));\nexport default SvgCopy;\n","export const dark = {\n 'code[class*=\"language-\"]': {\n 'background': '#11111f',\n 'color': '#e2e8f0',\n 'textShadow': '0 1px rgba(0, 0, 0, 0.3)',\n 'fontFamily': '\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace',\n 'direction': 'ltr',\n 'textAlign': 'left',\n 'whiteSpace': 'pre',\n 'wordSpacing': 'normal',\n 'wordBreak': 'normal',\n 'lineHeight': '1.5',\n 'MozTabSize': '2',\n 'OTabSize': '2',\n 'tabSize': '2',\n 'WebkitHyphens': 'none',\n 'MozHyphens': 'none',\n 'msHyphens': 'none',\n 'hyphens': 'none'\n },\n 'pre[class*=\"language-\"]': {\n 'background': '#11111f',\n 'color': '#e2e8f0',\n 'textShadow': '0 1px rgba(0, 0, 0, 0.3)',\n 'fontFamily': '\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace',\n 'direction': 'ltr',\n 'textAlign': 'left',\n 'whiteSpace': 'pre',\n 'wordSpacing': 'normal',\n 'wordBreak': 'normal',\n 'lineHeight': '1.5',\n 'MozTabSize': '2',\n 'OTabSize': '2',\n 'tabSize': '2',\n 'WebkitHyphens': 'none',\n 'MozHyphens': 'none',\n 'msHyphens': 'none',\n 'hyphens': 'none',\n 'padding': '1em',\n 'margin': '0',\n 'overflow': 'auto'\n },\n 'code[class*=\"language-\"]::-moz-selection': {\n 'background': '#1e293b',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'code[class*=\"language-\"] *::-moz-selection': {\n 'background': '#1e293b',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'pre[class*=\"language-\"] *::-moz-selection': {\n 'background': '#1e293b',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'code[class*=\"language-\"]::selection': {\n 'background': '#1e293b',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'code[class*=\"language-\"] *::selection': {\n 'background': '#1e293b',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'pre[class*=\"language-\"] *::selection': {\n 'background': '#1e293b',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n ':not(pre) > code[class*=\"language-\"]': {\n 'padding': '0.2em 0.3em',\n 'borderRadius': '0.3em',\n 'whiteSpace': 'normal'\n },\n 'comment': {\n 'color': '#64748b',\n 'fontStyle': 'italic'\n },\n 'prolog': {\n 'color': '#64748b'\n },\n 'cdata': {\n 'color': '#64748b'\n },\n 'doctype': {\n 'color': '#e2e8f0'\n },\n 'punctuation': {\n 'color': '#e2e8f0'\n },\n 'entity': {\n 'color': '#3b82f6',\n 'cursor': 'help'\n },\n 'attr-name': {\n 'color': '#f59e0b'\n },\n 'class-name': {\n 'color': '#f59e0b'\n },\n 'boolean': {\n 'color': '#3b82f6'\n },\n 'constant': {\n 'color': '#3b82f6'\n },\n 'number': {\n 'color': '#3b82f6'\n },\n 'atrule': {\n 'color': '#f59e0b'\n },\n 'keyword': {\n 'color': '#f472b6'\n },\n 'property': {\n 'color': '#3b82f6'\n },\n 'tag': {\n 'color': '#3b82f6'\n },\n 'symbol': {\n 'color': '#3b82f6'\n },\n 'deleted': {\n 'color': '#ef4444'\n },\n 'important': {\n 'color': '#f472b6'\n },\n 'selector': {\n 'color': '#10b981'\n },\n 'string': {\n 'color': '#10b981'\n },\n 'char': {\n 'color': '#10b981'\n },\n 'builtin': {\n 'color': '#10b981'\n },\n 'inserted': {\n 'color': '#10b981'\n },\n 'regex': {\n 'color': '#10b981'\n },\n 'attr-value': {\n 'color': '#10b981'\n },\n 'attr-value > .token.punctuation': {\n 'color': '#10b981'\n },\n 'variable': {\n 'color': '#60a5fa'\n },\n 'operator': {\n 'color': '#60a5fa'\n },\n 'function': {\n 'color': '#60a5fa'\n },\n 'url': {\n 'color': '#60a5fa'\n },\n 'attr-value > .token.punctuation.attr-equals': {\n 'color': '#e2e8f0'\n },\n 'special-attr > .token.attr-value > .token.value.css': {\n 'color': '#e2e8f0'\n },\n '.language-css .token.selector': {\n 'color': '#3b82f6'\n },\n '.language-css .token.property': {\n 'color': '#e2e8f0'\n },\n '.language-css .token.function': {\n 'color': '#60a5fa'\n },\n '.language-css .token.url > .token.function': {\n 'color': '#60a5fa'\n },\n '.language-css .token.url > .token.string.url': {\n 'color': '#10b981'\n },\n '.language-css .token.important': {\n 'color': '#f472b6'\n },\n '.language-css .token.atrule .token.rule': {\n 'color': '#f472b6'\n },\n '.language-javascript .token.operator': {\n 'color': '#f472b6'\n },\n '.language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation': {\n 'color': '#ef4444'\n },\n '.language-json .token.operator': {\n 'color': '#e2e8f0'\n },\n '.language-json .token.null.keyword': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.url': {\n 'color': '#e2e8f0'\n },\n '.language-markdown .token.url > .token.operator': {\n 'color': '#e2e8f0'\n },\n '.language-markdown .token.url-reference.url > .token.string': {\n 'color': '#e2e8f0'\n },\n '.language-markdown .token.url > .token.content': {\n 'color': '#60a5fa'\n },\n '.language-markdown .token.url > .token.url': {\n 'color': '#60a5fa'\n },\n '.language-markdown .token.url-reference.url': {\n 'color': '#60a5fa'\n },\n '.language-markdown .token.blockquote.punctuation': {\n 'color': '#64748b',\n 'fontStyle': 'italic'\n },\n '.language-markdown .token.hr.punctuation': {\n 'color': '#64748b',\n 'fontStyle': 'italic'\n },\n '.language-markdown .token.code-snippet': {\n 'color': '#10b981'\n },\n '.language-markdown .token.bold .token.content': {\n 'color': '#f59e0b'\n },\n '.language-markdown .token.italic .token.content': {\n 'color': '#f472b6'\n },\n '.language-markdown .token.strike .token.content': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.strike .token.punctuation': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.list.punctuation': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.title.important > .token.punctuation': {\n 'color': '#3b82f6'\n },\n 'bold': {\n 'fontWeight': 'bold'\n },\n 'italic': {\n 'fontStyle': 'italic'\n },\n 'namespace': {\n 'Opacity': '0.8'\n },\n 'token.tab:not(:empty):before': {\n 'color': '#64748b',\n 'textShadow': 'none'\n },\n 'token.cr:before': {\n 'color': '#64748b',\n 'textShadow': 'none'\n },\n 'token.lf:before': {\n 'color': '#64748b',\n 'textShadow': 'none'\n },\n 'token.space:before': {\n 'color': '#64748b',\n 'textShadow': 'none'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item': {\n 'marginRight': '0.4em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button': {\n 'background': '#1e293b',\n 'color': '#94a3b8',\n 'padding': '0.1em 0.4em',\n 'borderRadius': '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a': {\n 'background': '#1e293b',\n 'color': '#94a3b8',\n 'padding': '0.1em 0.4em',\n 'borderRadius': '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span': {\n 'background': '#1e293b',\n 'color': '#94a3b8',\n 'padding': '0.1em 0.4em',\n 'borderRadius': '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n '.line-highlight.line-highlight': {\n 'background': 'rgba(59, 130, 246, 0.08)'\n },\n '.line-highlight.line-highlight:before': {\n 'background': '#1e293b',\n 'color': '#e2e8f0',\n 'padding': '0.1em 0.6em',\n 'borderRadius': '0.3em',\n 'boxShadow': '0 2px 0 0 rgba(0, 0, 0, 0.2)'\n },\n '.line-highlight.line-highlight[data-end]:after': {\n 'background': '#1e293b',\n 'color': '#e2e8f0',\n 'padding': '0.1em 0.6em',\n 'borderRadius': '0.3em',\n 'boxShadow': '0 2px 0 0 rgba(0, 0, 0, 0.2)'\n },\n 'pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before': {\n 'backgroundColor': 'rgba(59, 130, 246, 0.08)'\n },\n '.line-numbers.line-numbers .line-numbers-rows': {\n 'borderRightColor': '#1e293b'\n },\n '.command-line .command-line-prompt': {\n 'borderRightColor': '#1e293b'\n },\n '.line-numbers .line-numbers-rows > span:before': {\n 'color': '#64748b'\n },\n '.command-line .command-line-prompt > span:before': {\n 'color': '#64748b'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-1': {\n 'color': '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-5': {\n 'color': '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-9': {\n 'color': '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-2': {\n 'color': '#10b981'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-6': {\n 'color': '#10b981'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-10': {\n 'color': '#10b981'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-3': {\n 'color': '#60a5fa'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-7': {\n 'color': '#60a5fa'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-11': {\n 'color': '#60a5fa'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-4': {\n 'color': '#f472b6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-8': {\n 'color': '#f472b6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-12': {\n 'color': '#f472b6'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.15)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.15)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection': {\n 'backgroundColor': 'rgba(239, 68, 68, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.15)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.15)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection': {\n 'backgroundColor': 'rgba(16, 185, 129, 0.25)'\n },\n '.prism-previewer.prism-previewer:before': {\n 'borderColor': '#11111f'\n },\n '.prism-previewer-gradient.prism-previewer-gradient div': {\n 'borderColor': '#11111f',\n 'borderRadius': '0.3em'\n },\n '.prism-previewer-color.prism-previewer-color:before': {\n 'borderRadius': '0.3em'\n },\n '.prism-previewer-easing.prism-previewer-easing:before': {\n 'borderRadius': '0.3em'\n },\n '.prism-previewer.prism-previewer:after': {\n 'borderTopColor': '#11111f'\n },\n '.prism-previewer-flipped.prism-previewer-flipped.after': {\n 'borderBottomColor': '#11111f'\n },\n '.prism-previewer-angle.prism-previewer-angle:before': {\n 'background': '#1e293b'\n },\n '.prism-previewer-time.prism-previewer-time:before': {\n 'background': '#1e293b'\n },\n '.prism-previewer-easing.prism-previewer-easing': {\n 'background': '#1e293b'\n },\n '.prism-previewer-angle.prism-previewer-angle circle': {\n 'stroke': '#e2e8f0',\n 'strokeOpacity': '1'\n },\n '.prism-previewer-time.prism-previewer-time circle': {\n 'stroke': '#e2e8f0',\n 'strokeOpacity': '1'\n },\n '.prism-previewer-easing.prism-previewer-easing circle': {\n 'stroke': '#e2e8f0',\n 'fill': 'transparent'\n },\n '.prism-previewer-easing.prism-previewer-easing path': {\n 'stroke': '#e2e8f0'\n },\n '.prism-previewer-easing.prism-previewer-easing line': {\n 'stroke': '#e2e8f0'\n }\n}\n","export const light = {\n 'code[class*=\"language-\"]': {\n 'background': '#fff',\n 'color': '#1e293b',\n 'textShadow': 'none',\n 'fontFamily': '\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace',\n 'direction': 'ltr',\n 'textAlign': 'left',\n 'whiteSpace': 'pre',\n 'wordSpacing': 'normal',\n 'wordBreak': 'normal',\n 'lineHeight': '1.5',\n 'MozTabSize': '2',\n 'OTabSize': '2',\n 'tabSize': '2',\n 'WebkitHyphens': 'none',\n 'MozHyphens': 'none',\n 'msHyphens': 'none',\n 'hyphens': 'none'\n },\n 'pre[class*=\"language-\"]': {\n 'background': '#fff',\n 'color': '#1e293b',\n 'textShadow': 'none',\n 'fontFamily': '\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace',\n 'direction': 'ltr',\n 'textAlign': 'left',\n 'whiteSpace': 'pre',\n 'wordSpacing': 'normal',\n 'wordBreak': 'normal',\n 'lineHeight': '1.5',\n 'MozTabSize': '2',\n 'OTabSize': '2',\n 'tabSize': '2',\n 'WebkitHyphens': 'none',\n 'MozHyphens': 'none',\n 'msHyphens': 'none',\n 'hyphens': 'none',\n 'padding': '1em',\n 'margin': '0.5em 0',\n 'overflow': 'auto',\n 'borderRadius': '0.3em',\n 'border': '1px solid #e2e8f0'\n },\n 'code[class*=\"language-\"]::-moz-selection': {\n 'background': '#e2e8f0',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'code[class*=\"language-\"] *::-moz-selection': {\n 'background': '#e2e8f0',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'pre[class*=\"language-\"] *::-moz-selection': {\n 'background': '#e2e8f0',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'code[class*=\"language-\"]::selection': {\n 'background': '#e2e8f0',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'code[class*=\"language-\"] *::selection': {\n 'background': '#e2e8f0',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n 'pre[class*=\"language-\"] *::selection': {\n 'background': '#e2e8f0',\n 'color': 'inherit',\n 'textShadow': 'none'\n },\n ':not(pre) > code[class*=\"language-\"]': {\n 'padding': '0.2em 0.3em',\n 'borderRadius': '0.3em',\n 'whiteSpace': 'normal',\n 'background': '#f1f5f9'\n },\n 'comment': {\n 'color': '#64748b',\n 'fontStyle': 'italic'\n },\n 'prolog': {\n 'color': '#64748b'\n },\n 'cdata': {\n 'color': '#64748b'\n },\n 'doctype': {\n 'color': '#1e293b'\n },\n 'punctuation': {\n 'color': '#64748b'\n },\n 'entity': {\n 'color': '#3b82f6',\n 'cursor': 'help'\n },\n 'attr-name': {\n 'color': '#ea580c'\n },\n 'class-name': {\n 'color': '#ea580c'\n },\n 'boolean': {\n 'color': '#3b82f6'\n },\n 'constant': {\n 'color': '#3b82f6'\n },\n 'number': {\n 'color': '#3b82f6'\n },\n 'atrule': {\n 'color': '#ea580c'\n },\n 'keyword': {\n 'color': '#9333ea'\n },\n 'property': {\n 'color': '#3b82f6'\n },\n 'tag': {\n 'color': '#3b82f6'\n },\n 'symbol': {\n 'color': '#3b82f6'\n },\n 'deleted': {\n 'color': '#dc2626'\n },\n 'important': {\n 'color': '#9333ea'\n },\n 'selector': {\n 'color': '#16a34a'\n },\n 'string': {\n 'color': '#16a34a'\n },\n 'char': {\n 'color': '#16a34a'\n },\n 'builtin': {\n 'color': '#16a34a'\n },\n 'inserted': {\n 'color': '#16a34a'\n },\n 'regex': {\n 'color': '#16a34a'\n },\n 'attr-value': {\n 'color': '#16a34a'\n },\n 'attr-value > .token.punctuation': {\n 'color': '#16a34a'\n },\n 'variable': {\n 'color': '#3b82f6'\n },\n 'operator': {\n 'color': '#3b82f6'\n },\n 'function': {\n 'color': '#3b82f6'\n },\n 'url': {\n 'color': '#3b82f6'\n },\n 'attr-value > .token.punctuation.attr-equals': {\n 'color': '#64748b'\n },\n 'special-attr > .token.attr-value > .token.value.css': {\n 'color': '#1e293b'\n },\n '.language-css .token.selector': {\n 'color': '#3b82f6'\n },\n '.language-css .token.property': {\n 'color': '#1e293b'\n },\n '.language-css .token.function': {\n 'color': '#3b82f6'\n },\n '.language-css .token.url > .token.function': {\n 'color': '#3b82f6'\n },\n '.language-css .token.url > .token.string.url': {\n 'color': '#16a34a'\n },\n '.language-css .token.important': {\n 'color': '#9333ea'\n },\n '.language-css .token.atrule .token.rule': {\n 'color': '#9333ea'\n },\n '.language-javascript .token.operator': {\n 'color': '#9333ea'\n },\n '.language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation': {\n 'color': '#dc2626'\n },\n '.language-json .token.operator': {\n 'color': '#1e293b'\n },\n '.language-json .token.null.keyword': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.url': {\n 'color': '#1e293b'\n },\n '.language-markdown .token.url > .token.operator': {\n 'color': '#1e293b'\n },\n '.language-markdown .token.url-reference.url > .token.string': {\n 'color': '#1e293b'\n },\n '.language-markdown .token.url > .token.content': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.url > .token.url': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.url-reference.url': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.blockquote.punctuation': {\n 'color': '#64748b',\n 'fontStyle': 'italic'\n },\n '.language-markdown .token.hr.punctuation': {\n 'color': '#64748b',\n 'fontStyle': 'italic'\n },\n '.language-markdown .token.code-snippet': {\n 'color': '#16a34a'\n },\n '.language-markdown .token.bold .token.content': {\n 'color': '#ea580c'\n },\n '.language-markdown .token.italic .token.content': {\n 'color': '#9333ea'\n },\n '.language-markdown .token.strike .token.content': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.strike .token.punctuation': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.list.punctuation': {\n 'color': '#3b82f6'\n },\n '.language-markdown .token.title.important > .token.punctuation': {\n 'color': '#3b82f6'\n },\n 'bold': {\n 'fontWeight': 'bold'\n },\n 'italic': {\n 'fontStyle': 'italic'\n },\n 'namespace': {\n 'Opacity': '0.8'\n },\n 'token.tab:not(:empty):before': {\n 'color': '#94a3b8'\n },\n 'token.cr:before': {\n 'color': '#94a3b8'\n },\n 'token.lf:before': {\n 'color': '#94a3b8'\n },\n 'token.space:before': {\n 'color': '#94a3b8'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item': {\n 'marginRight': '0.4em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button': {\n 'background': '#f1f5f9',\n 'color': '#475569',\n 'padding': '0.1em 0.4em',\n 'borderRadius': '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a': {\n 'background': '#f1f5f9',\n 'color': '#475569',\n 'padding': '0.1em 0.4em',\n 'borderRadius': '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span': {\n 'background': '#f1f5f9',\n 'color': '#475569',\n 'padding': '0.1em 0.4em',\n 'borderRadius': '0.3em'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n 'div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus': {\n 'background': '#3b82f6',\n 'color': '#ffffff'\n },\n '.line-highlight.line-highlight': {\n 'background': 'rgba(59, 130, 246, 0.08)'\n },\n '.line-highlight.line-highlight:before': {\n 'background': '#f1f5f9',\n 'color': '#1e293b',\n 'padding': '0.1em 0.6em',\n 'borderRadius': '0.3em',\n 'boxShadow': '0 2px 0 0 rgba(0, 0, 0, 0.1)'\n },\n '.line-highlight.line-highlight[data-end]:after': {\n 'background': '#f1f5f9',\n 'color': '#1e293b',\n 'padding': '0.1em 0.6em',\n 'borderRadius': '0.3em',\n 'boxShadow': '0 2px 0 0 rgba(0, 0, 0, 0.1)'\n },\n 'pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before': {\n 'backgroundColor': 'rgba(59, 130, 246, 0.08)'\n },\n '.line-numbers.line-numbers .line-numbers-rows': {\n 'borderRightColor': '#e2e8f0'\n },\n '.command-line .command-line-prompt': {\n 'borderRightColor': '#e2e8f0'\n },\n '.line-numbers .line-numbers-rows > span:before': {\n 'color': '#94a3b8'\n },\n '.command-line .command-line-prompt > span:before': {\n 'color': '#94a3b8'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-1': {\n 'color': '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-5': {\n 'color': '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-9': {\n 'color': '#3b82f6'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-2': {\n 'color': '#16a34a'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-6': {\n 'color': '#16a34a'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-10': {\n 'color': '#16a34a'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-3': {\n 'color': '#ea580c'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-7': {\n 'color': '#ea580c'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-11': {\n 'color': '#ea580c'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-4': {\n 'color': '#9333ea'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-8': {\n 'color': '#9333ea'\n },\n '.rainbow-braces .token.token.punctuation.brace-level-12': {\n 'color': '#9333ea'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.15)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.15)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection': {\n 'backgroundColor': 'rgba(220, 38, 38, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.15)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.15)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.25)'\n },\n 'pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.25)'\n },\n 'pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection': {\n 'backgroundColor': 'rgba(22, 163, 74, 0.25)'\n },\n '.prism-previewer.prism-previewer:before': {\n 'borderColor': '#fff'\n },\n '.prism-previewer-gradient.prism-previewer-gradient div': {\n 'borderColor': '#fff',\n 'borderRadius': '0.3em'\n },\n '.prism-previewer-color.prism-previewer-color:before': {\n 'borderRadius': '0.3em'\n },\n '.prism-previewer-easing.prism-previewer-easing:before': {\n 'borderRadius': '0.3em'\n },\n '.prism-previewer.prism-previewer:after': {\n 'borderTopColor': '#fff'\n },\n '.prism-previewer-flipped.prism-previewer-flipped.after': {\n 'borderBottomColor': '#fff'\n },\n '.prism-previewer-angle.prism-previewer-angle:before': {\n 'background': '#f1f5f9'\n },\n '.prism-previewer-time.prism-previewer-time:before': {\n 'background': '#f1f5f9'\n },\n '.prism-previewer-easing.prism-previewer-easing': {\n 'background': '#f1f5f9'\n },\n '.prism-previewer-angle.prism-previewer-angle circle': {\n 'stroke': '#1e293b',\n 'strokeOpacity': '1'\n },\n '.prism-previewer-time.prism-previewer-time circle': {\n 'stroke': '#1e293b',\n 'strokeOpacity': '1'\n },\n '.prism-previewer-easing.prism-previewer-easing circle': {\n 'stroke': '#1e293b',\n 'fill': 'transparent'\n },\n '.prism-previewer-easing.prism-previewer-easing path': {\n 'stroke': '#1e293b'\n },\n '.prism-previewer-easing.prism-previewer-easing line': {\n 'stroke': '#1e293b'\n }\n}\n","import React, { FC, PropsWithChildren, ReactElement } from 'react';\nimport { Button, cn } from 'reablocks';\nimport { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';\nimport CopyIcon from '@/assets/copy.svg?react';\nimport { dark } from './themes';\n\nexport interface CodeHighlighterProps extends PropsWithChildren {\n /**\n * The class name to apply to the code block.\n */\n className?: string;\n\n /**\n * The language of the code block.\n */\n language?: string;\n\n /**\n * The class name to apply to the copy button.\n */\n copyClassName?: string;\n\n /**\n * The class name to apply to the toolbar.\n */\n toolbarClassName?: string;\n\n /**\n * Icon to show for copy.\n */\n copyIcon?: ReactElement;\n\n /**\n * The theme to use for the code block.\n */\n theme?: Record<string, string>;\n}\n\nexport const CodeHighlighter: FC<CodeHighlighterProps> = ({\n className,\n children,\n copyClassName,\n copyIcon = <CopyIcon />,\n language,\n toolbarClassName,\n theme = dark\n}) => {\n const match = language?.match(/language-(\\w+)/);\n const lang = match ? match[1] : 'text';\n\n const handleCopy = (text: string) => {\n navigator.clipboard\n .writeText(text)\n .then(() => {\n console.log('Text copied to clipboard');\n })\n .catch(err => {\n console.error('Could not copy text: ', err);\n });\n };\n\n return (\n <div className={cn('relative', className)}>\n <div className={cn(toolbarClassName)}>\n <div>\n {lang}\n </div>\n {copyIcon && (\n <Button\n className={cn(copyClassName)}\n size=\"small\"\n variant=\"text\"\n title=\"Copy code\"\n onClick={() => handleCopy(children as string)}\n >\n {copyIcon}\n </Button>\n )}\n </div>\n <SyntaxHighlighter\n language={lang}\n style={theme}\n >\n {children}\n </SyntaxHighlighter>\n </div>\n );\n};\n","import React, { FC, PropsWithChildren } from 'react';\n\nexport const TableComponent: FC<PropsWithChildren<React.HTMLAttributes<HTMLTableElement>>> = ({ children, ...props }) => (\n <table {...props}>\n {children}\n </table>\n);\n\nexport const TableHeaderCell: FC<PropsWithChildren<React.HTMLAttributes<HTMLTableHeaderCellElement>>> = ({ children, ...props }) => (\n <th {...props}>\n {children}\n </th>\n);\n\nexport const TableDataCell: FC<PropsWithChildren<React.HTMLAttributes<HTMLTableDataCellElement>>> = ({ children, ...props }) => (\n <td {...props}>\n {children}\n </td>\n);\n","import { FC, PropsWithChildren, useContext } from 'react';\nimport ReactMarkdown from 'react-markdown';\nimport { PluggableList } from 'react-markdown/lib';\nimport remarkGfm from 'remark-gfm';\nimport { CodeHighlighter } from './CodeHighlighter';\nimport { cn } from 'reablocks';\nimport { TableComponent, TableHeaderCell, TableDataCell } from './Table';\nimport { ChatContext } from '@/ChatContext';\n\ninterface MarkdownWrapperProps extends PropsWithChildren {\n /**\n * Remark plugins to apply to the markdown content.\n */\n remarkPlugins?: PluggableList[];\n}\n\nexport const Markdown: FC<MarkdownWrapperProps> = ({\n children,\n remarkPlugins = [remarkGfm]\n}) => {\n const { theme } = useContext(ChatContext);\n\n return (\n <ReactMarkdown\n remarkPlugins={remarkPlugins as PluggableList}\n components={{\n code: ({ className, ...props }) => (\n <CodeHighlighter\n {...props}\n // Ref: https://github.com/remarkjs/react-markdown?tab=readme-ov-file#use-custom-components-syntax-highlight\n language={className}\n className={cn(theme.messages.message.markdown.code, className)}\n copyClassName={cn(theme.messages.message.markdown.copy)}\n toolbarClassName={cn(theme.messages.message.markdown.toolbar)}\n />\n ),\n table: props => <TableComponent {...props} className={cn(theme.messages.message.markdown.table)} />,\n th: props => <TableHeaderCell {...props} className={cn(theme.messages.message.markdown.th)} />,\n td: props => <TableDataCell {...props} className={cn(theme.messages.message.markdown.td)} />,\n a: props => <a {...props} className={cn(theme.messages.message.markdown.a)} />,\n p: props => <p {...props} className={cn(theme.messages.message.markdown.p)} />,\n li: props => <li {...props} className={cn(theme.messages.message.markdown.li)} />,\n ul: props => <ul {...props} className={cn(theme.messages.message.markdown.ul)} />,\n ol: props => <ol {...props} className={cn(theme.messages.message.markdown.ol)} />\n }}\n >\n {children as string}\n </ReactMarkdown>\n );\n};\n","import { findAndReplace } from 'mdast-util-find-and-replace';\n\nconst CVE_REGEX = /(CVE-(19|20)\\d{2}-\\d{4,7})/gi;\n\nexport function remarkCve() {\n return (tree, _file) => {\n findAndReplace(tree, [[\n CVE_REGEX,\n replaceCve as unknown as any\n ]]);\n };\n\n function replaceCve(value, id) {\n return [\n {\n type: 'link',\n url: `https://cve.mitre.org/cgi-bin/cvename.cgi?name=${id}`,\n children: [\n { children: [{ type: 'text', value: value.trim() }] }\n ]\n }\n ];\n }\n}\n","import { ChatContext } from '@/ChatContext';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cn } from 'reablocks';\nimport { FC, PropsWithChildren, useContext } from 'react';\nimport { Markdown } from '@/Markdown';\nimport { PluggableList } from 'react-markdown/lib';\nimport remarkGfm from 'remark-gfm';\nimport remarkYoutube from 'remark-youtube';\n\nexport interface MessageQuestionProps extends PropsWithChildren {\n /**\n * Question to render.\n */\n question: string;\n}\n\nexport const MessageQuestion: FC<MessageQuestionProps> = ({\n question,\n children\n}) => {\n const { theme, remarkPlugins = [remarkGfm, remarkYoutube] } =\n useContext(ChatContext);\n const Comp = children ? Slot : 'div';\n return (\n <Comp className={cn(theme.messages.message.question)}>\n {children || (\n <Markdown remarkPlugins={remarkPlugins as PluggableList[]}>\n {question}\n </Markdown>\n )}\n </Comp>\n );\n};\n","import { ChatContext } from '@/ChatContext';\nimport { Slot } from '@radix-ui/react-slot';\nimport { motion } from 'framer-motion';\nimport { cn } from 'reablocks';\nimport { FC, PropsWithChildren, useContext } from 'react';\nimport { Markdown } from '@/Markdown';\nimport { PluggableList } from 'react-markdown/lib';\nimport remarkGfm from 'remark-gfm';\nimport remarkYoutube from 'remark-youtube';\n\nexport interface MessageResponseProps extends PropsWithChildren {\n /**\n * Response to render.\n */\n response: string;\n\n /**\n * Whether the response is loading.\n */\n isLoading?: boolean;\n}\n\nexport const MessageResponse: FC<MessageResponseProps> = ({\n response,\n isLoading,\n children\n}) => {\n const { theme, remarkPlugins = [remarkGfm, remarkYoutube] } =\n useContext(ChatContext);\n const Comp = children ? Slot : 'div';\n return (\n <Comp className={cn(theme.messages.message.response)}>\n {children || (\n <>\n <Markdown remarkPlugins={remarkPlugins as PluggableList[]}>\n {response}\n </Markdown>\n {isLoading && (\n <motion.div\n className={cn(theme.messages.message.cursor)}\n animate={{ opacity: [1, 0] }}\n transition={{\n duration: 0.7,\n repeat: Infinity,\n repeatType: 'reverse'\n }}\n />\n )}\n </>\n )}\n </Comp>\n );\n};\n","import * as React from \"react\";\nconst SvgFile = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, viewBox: \"0 0 16 16\", fill: \"currentColor\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M2.7036 1.37034C3.04741 1.02653 3.51373 0.833374 3.99996 0.833374H9.33329H9.33331C9.47275 0.833374 9.59885 0.890449 9.68954 0.98251L13.6843 4.97722C13.7763 5.0679 13.8333 5.19398 13.8333 5.33337L13.8333 5.3379V13.3334C13.8333 13.8196 13.6401 14.2859 13.2963 14.6297C12.9525 14.9736 12.4862 15.1667 12 15.1667H3.99996C3.51373 15.1667 3.04741 14.9736 2.7036 14.6297C2.35978 14.2859 2.16663 13.8196 2.16663 13.3334V2.66671C2.16663 2.18048 2.35978 1.71416 2.7036 1.37034ZM3.99996 1.83337H8.83331V5.33337C8.83331 5.60952 9.05717 5.83337 9.33331 5.83337H12.8333V13.3334C12.8333 13.5544 12.7455 13.7663 12.5892 13.9226C12.4329 14.0789 12.221 14.1667 12 14.1667H3.99996C3.77895 14.1667 3.56698 14.0789 3.4107 13.9226C3.25442 13.7663 3.16663 13.5544 3.16663 13.3334V2.66671C3.16663 2.44569 3.25442 2.23373 3.4107 2.07745C3.56698 1.92117 3.77895 1.83337 3.99996 1.83337ZM9.83331 2.5405L12.1262 4.83337H9.83331V2.5405ZM5.33331 8.16663C5.05717 8.16663 4.83331 8.39048 4.83331 8.66663C4.83331 8.94277 5.05717 9.16663 5.33331 9.16663H10.6666C10.9428 9.16663 11.1666 8.94277 11.1666 8.66663C11.1666 8.39048 10.9428 8.16663 10.6666 8.16663H5.33331ZM4.83331 11.3334C4.83331 11.0572 5.05717 10.8334 5.33331 10.8334H10.6666C10.9428 10.8334 11.1666 11.0572 11.1666 11.3334C11.1666 11.6095 10.9428 11.8334 10.6666 11.8334H5.33331C5.05717 11.8334 4.83331 11.6095 4.83331 11.3334ZM5.33331 5.5C5.05717 5.5 4.83331 5.72386 4.83331 6C4.83331 6.27614 5.05717 6.5 5.33331 6.5H6.66665C6.94279 6.5 7.16665 6.27614 7.16665 6C7.16665 5.72386 6.94279 5.5 6.66665 5.5H5.33331Z\" }));\nexport default SvgFile;\n","import { FC, useContext, ReactElement } from 'react';\nimport { ConversationFile } from '@/types';\nimport { ChatContext } from '@/ChatContext';\nimport { Ellipsis, cn } from 'reablocks';\nimport FileIcon from '@/assets/file.svg?react';\n\nexport interface MessageFileProps extends ConversationFile {\n /**\n * Icon to show for delete.\n */\n fileIcon?: ReactElement;\n\n /**\n * Limit for the name.\n */\n limit?: number;\n}\n\nexport const MessageFile: FC<MessageFileProps> = ({\n name,\n type,\n url,\n limit = 100,\n fileIcon = <FileIcon />\n}) => {\n const { theme } = useContext(ChatContext);\n const isImage = type?.startsWith('image/');\n\n return (\n <figure\n className={cn(theme.messages.message.files.file.base)}\n onClick={() => {\n window.open(url, '_blank');\n }}\n >\n {isImage ? (\n <>\n <img src={url} className=\"h-10 w-10\" />\n </>\n ) : (\n <>\n {fileIcon}\n </>\n )}\n {name && (\n <figcaption>\n {name && (\n <span className={cn(theme.messages.message.files.file.name)}>\n <Ellipsis value={name} limit={limit} />\n </span>\n )}\n </figcaption>\n )}\n </figure>\n );\n};\n","import { ChatContext } from '@/ChatContext';\nimport { ConversationFile } from '@/types';\nimport { cn } from 'reablocks';\nimport { FC, PropsWithChildren, useContext } from 'react';\nimport { MessageFile } from './MessageFile';\nimport { Slot } from '@radix-ui/react-slot';\n\ninterface MessageFilesProps extends PropsWithChildren {\n /**\n * Files to render.\n */\n files: ConversationFile[];\n}\n\nexport const MessageFiles: FC<MessageFilesProps> = ({ files, children }) => {\n const { theme } = useContext(ChatContext);\n const Comp = children ? Slot : MessageFile;\n\n if (!files || files.length === 0) {\n return null;\n }\n\n return (\n files.length > 0 && (\n <div className={cn(theme.messages.message.files.base)}>\n {files.map((file, index) => (\n <Comp key={index} {...file}>\n {children}\n </Comp>\n ))}\n </div>\n )\n );\n};\n","import { FC, useContext } from 'react';\nimport { ConversationSource } from '@/types';\nimport { ChatContext } from '@/ChatContext';\nimport { Ellipsis, cn } from 'reablocks';\n\nexport interface MessageSourceProps extends ConversationSource {\n /**\n * Limit for the title.\n */\n limit?: number;\n}\n\nexport const MessageSource: FC<MessageSourceProps> = ({ title, url, image, limit = 50 }) => {\n const { theme, isCompact } = useContext(ChatContext);\n\n return (\n <figure\n className={cn(theme.messages.message.sources.source.base, {\n [theme.messages.message.sources.source.companion]: isCompact\n })}\n onClick={() => {\n if (url) {\n window.open(url, '_blank');\n }\n }}\n >\n {image && <img src={image} alt={title} className={cn(theme.messages.message.sources.source.image)} />}\n {(title || url) && (\n <figcaption>\n {title && (\n <span className={cn(theme.messages.message.sources.source.title)}>\n <Ellipsis value={title} limit={limit} />\n </span>\n )}\n {url && (\n <a href={url} target=\"_blank\" rel=\"noopener noreferrer\" className={cn(theme.messages.message.sources.source.url)}>\n {url}\n </a>\n )}\n </figcaption>\n )}\n </figure>\n );\n};\n","import { ChatContext } from '@/ChatContext';\nimport { ConversationSource } from '@/types';\nimport { cn } from 'reablocks';\nimport { FC, PropsWithChildren, useContext } from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { MessageSource } from './MessageSource';\n\ninterface MessageSourcesProps extends PropsWithChildren {\n /**\n * Sources to render.\n */\n sources: ConversationSource[];\n}\n\nexport const MessageSources: FC<MessageSourcesProps> = ({\n sources,\n children\n}) => {\n const { theme } = useContext(ChatContext);\n const Comp = children ? Slot : MessageSource;\n\n if (!sources || sources.length === 0) {\n return null;\n }\n\n return (\n sources &&\n sources.length > 0 && (\n <div className={cn(theme.messages.message.sources.base)}>\n {sources.map((source, index) => (\n <Comp key={index} {...source}>\n {children}\n </Comp>\n ))}\n </div>\n )\n );\n};\n","import * as React from \"react\";\nconst SvgThumbsDown = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1, strokeLinecap: \"round\", strokeLinejoin: \"round\", className: \"lucide lucide-thumbs-down\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M17 14V2\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z\" }));\nexport default SvgThumbsDown;\n","import * as React from \"react\";\nconst SvgThumbsUp = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1, strokeLinecap: \"round\", strokeLinejoin: \"round\", className: \"lucide lucide-thumbs-up\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M7 10v12\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z\" }));\nexport default SvgThumbsUp;\n","import * as React from \"react\";\nconst SvgRefresh = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1, strokeLinecap: \"round\", strokeLinejoin: \"round\", className: \"lucide lucide-refresh-ccw\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M3 3v5h5\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M16 16h5v5\" }));\nexport default SvgRefresh;\n","import { ChatContext } from '@/ChatContext';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cn, IconButton } from 'reablocks';\nimport {\n FC,\n PropsWithChildren,\n ReactElement,\n ReactNode,\n useContext\n} from 'react';\nimport CopyIcon from '@/assets/copy.svg?react';\nimport ThumbsDownIcon from '@/assets/thumbs-down.svg?react';\nimport ThumbUpIcon from '@/assets/thumbs-up.svg?react';\nimport RefreshIcon from '@/assets/refresh.svg?react';\n\nexport interface MessageActionsProps extends PropsWithChildren {\n /**\n * Question to be copied\n */\n question: string;\n\n /**\n * Response to be copied\n */\n response?: string;\n\n /**\n * Icon to show for copy.\n */\n copyIcon?: ReactElement;\n\n /**\n * Icon to show for thumbs up.\n */\n thumbsUpIcon?: ReactElement;\n\n /**\n * Icon to show for thumbs down.\n */\n thumbsDownIcon?: ReactElement;\n\n /**\n * Icon to show for refresh.\n */\n refreshIcon?: ReactElement;\n\n /**\n * Callback function to handle copying.\n */\n onCopy?: () => void;\n\n /**\n * Callback function to handle upvoting.\n */\n onUpvote?: () => void;\n\n /**\n * Callback function to handle downvoting.\n */\n onDownvote?: () => void;\n\n /**\n * Callback function to handle refreshing.\n */\n onRefresh?: () => void;\n}\n\nexport const MessageActions: FC<MessageActionsProps> = ({\n children,\n ...props\n}) => {\n const { theme } = useContext(ChatContext);\n const {\n question,\n response,\n copyIcon = <CopyIcon />,\n thumbsUpIcon = <ThumbUpIcon />,\n thumbsDownIcon = <ThumbsDownIcon />,\n refreshIcon = <RefreshIcon />,\n onCopy,\n onUpvote,\n onDownvote,\n onRefresh\n } = props;\n const Comp = children ? Slot : 'div';\n\n const handleCopy = (text: string) => {\n navigator.clipboard\n .writeText(text)\n .then(() => {\n console.log('Text copied to clipboard');\n })\n .catch(err => {\n console.error('Could not copy text: ', err);\n });\n };\n\n return (\n (copyIcon || thumbsDownIcon || thumbsUpIcon || refreshIcon) && (\n <Comp className={cn(theme.messages.message.footer.base)}>\n {children || (\n <>\n {copyIcon && (\n <IconButton\n variant=\"text\"\n disablePadding\n title=\"Copy question and response\"\n className={cn(theme.messages.message.footer.copy)}\n onClick={\n onCopy ? onCopy : () => handleCopy(`${question}\\n${response}`)\n }\n >\n {copyIcon}\n </IconButton>\n )}\n {thumbsUpIcon && (\n <IconButton\n variant=\"text\"\n disablePadding\n title=\"Upvote\"\n className={cn(theme.messages.message.footer.upvote)}\n onClick={onUpvote}\n >\n {thumbsUpIcon}\n </IconButton>\n )}\n {thumbsDownIcon && (\n <IconButton\n variant=\"text\"\n disablePadding\n title=\"Downvote\"\n className={cn(theme.messages.message.footer.downvote)}\n onClick={onDownvote}\n >\n {thumbsDownIcon}\n </IconButton>\n )}\n {refreshIcon && (\n <IconButton\n variant=\"text\"\n disablePadding\n title=\"Refresh\"\n className={cn(theme.messages.message.footer.refresh)}\n onClick={onRefresh}\n >\n {refreshIcon}\n </IconButton>\n )}\n </>\n )}\n </Comp>\n )\n );\n};\n","import { FC, PropsWithChildren, useContext } from 'react';\nimport { ChatContext } from '@/ChatContext';\nimport { Card, cn, Divider } from 'reablocks';\nimport CopyIcon from '@/assets/copy.svg?react';\nimport ThumbsDownIcon from '@/assets/thumbs-down.svg?react';\nimport ThumbUpIcon from '@/assets/thumbs-up.svg?react';\nimport RefreshIcon from '@/assets/refresh.svg?react';\nimport { Conversation } from '@/types';\nimport { motion } from 'framer-motion';\nimport { MessageQuestion } from './MessageQuestion';\nimport { MessageResponse } from './MessageResponse';\nimport { MessageFiles } from './MessageFiles';\nimport { MessageSources } from './MessageSources';\nimport { MessageActions } from './MessageActions';\n\nconst messageVariants = {\n hidden: {\n opacity: 0,\n y: 20\n },\n visible: {\n opacity: 1,\n y: 0,\n transition: {\n duration: 0.3\n }\n }\n};\n\ninterface SessionMessageProps extends PropsWithChildren {\n /**\n * Conversation to render.\n */\n conversation: Conversation;\n\n /**\n * Whether the message is the last one in the list.\n * This let's the chat know when to show the loading cursor.\n */\n isLast?: boolean;\n}\n\nexport const SessionMessage: FC<SessionMessageProps> = ({\n conversation,\n isLast,\n children\n}) => {\n const { theme, isLoading } = useContext(ChatContext);\n\n return (\n <motion.div key={conversation.id} variants={messageVariants}>\n <Card className={cn(theme.messages.message.base)}>\n {children || (\n <>\n <MessageFiles files={conversation.files} />\n <MessageQuestion question={conversation.question} />\n <MessageResponse\n response={conversation.response}\n isLoading={isLast && isLoading}\n />\n <MessageSources sources={conversation.sources} />\n <MessageActions\n question={conversation.question}\n response={conversation.response}\n />\n </>\n )}\n </Card>\n {!isLast && (\n <Divider />\n )}\n </motion.div>\n );\n};\n","import React, {\n ReactNode,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState\n} from 'react';\nimport { SessionEmpty } from './SessionEmpty';\nimport { ChatContext } from '@/ChatContext';\nimport { Button, cn, useInfinityList } from 'reablocks';\nimport { AnimatePresence, motion } from 'framer-motion';\nimport { Conversation } from '@/types';\n\nconst containerVariants = {\n hidden: {},\n visible: {\n transition: {\n staggerChildren: 0.07,\n when: 'beforeChildren'\n }\n }\n};\n\ninterface SessionMessagesProps {\n /**\n * Content to display when there are no sessions selected or a new session is started.\n */\n newSessionContent?: string | ReactNode;\n\n /**\n * Limit the number of results returned. Clientside pagination.\n */\n limit?: number | null;\n\n /**\n * Text to display for the show more button.\n */\n showMoreText?: string;\n\n /**\n * Render function for the session messages.\n */\n children?: (conversations: Conversation[]) => ReactNode;\n}\n\nexport const SessionMessages: React.FC<SessionMessagesProps> = ({\n children,\n newSessionContent,\n limit = 10,\n showMoreText = 'Show more'\n}) => {\n const { activeSession, theme } = useContext(ChatContext);\n const contentRef = useRef<HTMLDivElement | null>(null);\n const [isAnimating, setIsAnimating] = useState(true);\n\n useEffect(() => {\n if (contentRef.current) {\n // Scroll to the bottom of the content in animation queue\n requestAnimationFrame(\n () => (contentRef.current.scrollTop = contentRef.current.scrollHeight)\n );\n }\n // If we update the active session or load the page initially ( onAnimationComplete )\n // let's scroll to the bottom of the page.\n }, [activeSession, isAnimating]);\n\n function handleShowMore() {\n showNext(limit);\n requestAnimationFrame(() => (contentRef.current.scrollTop = 0));\n }\n\n // Reverse the conversations so the last one is the first one\n const reversedConvos = useMemo(\n () => [...(activeSession?.conversations ?? [])].reverse(),\n [activeSession]\n );\n\n const { data, hasMore, showNext } = useInfinityList({\n items: reversedConvos,\n size: limit\n });\n\n // Reverse the data to the last one last now\n const reReversedConvo = useMemo(() => [...data].reverse(), [data]);\n\n // If we are not paging, just return the conversations\n const convosToRender = limit ? reReversedConvo : activeSession?.conversations;\n\n if (!activeSession) {\n return <SessionEmpty>{newSessionContent}</SessionEmpty>;\n }\n\n return (\n <div className={cn(theme.messages.content)} ref={contentRef}>\n {hasMore && (\n <Button\n variant=\"outline\"\n className={cn(theme.messages.showMore)}\n fullWidth\n onClick={handleShowMore}\n >\n {showMoreText}\n </Button>\n )}\n <AnimatePresence>\n <motion.div\n variants={containerVariants}\n key={activeSession?.id}\n initial=\"hidden\"\n animate=\"visible\"\n onAnimationComplete={() => {\n requestAnimationFrame(() => setIsAnimating(false));\n }}\n >\n {children(convosToRender)}\n </motion.div>\n </AnimatePresence>\n </div>\n );\n};\n","export interface ChatTheme {\n base: string;\n console: string;\n companion: string;\n empty: string;\n sessions: {\n base: string;\n console: string;\n companion: string;\n create: string;\n group: string;\n session: {\n base: string;\n active: string;\n delete: string;\n };\n };\n messages: {\n base: string;\n console: string;\n companion: string;\n back: string;\n inner: string;\n title: string;\n date: string;\n content: string;\n header: string;\n showMore: string;\n message: {\n base: string;\n question: string;\n response: string;\n cursor: string;\n files: {\n base: string;\n file: {\n base: string;\n name: string;\n };\n };\n sources: {\n base: string;\n source: {\n base: string;\n companion: string;\n image: string;\n title: string;\n url: string;\n };\n };\n markdown: {\n p: string;\n a: string;\n table: string;\n th: string;\n td: string;\n code: string;\n toolbar: string;\n li: string;\n ul: string;\n ol: string;\n copy: string;\n };\n footer: {\n base: string;\n copy: string;\n upvote: string;\n downvote: string;\n refresh: string;\n };\n };\n };\n input: {\n base: string;\n upload: string;\n input: string;\n actions: {\n base: string;\n send: string;\n stop: string;\n };\n };\n}\n\nexport const chatTheme: ChatTheme = {\n base: 'dark:text-white text-gray-500',\n console: 'flex w-full gap-4 h-full',\n companion: 'w-full h-full overflow-hidden',\n empty: 'text-center flex-1',\n sessions: {\n base: 'overflow-auto',\n console:\n 'min-w-[150px] w-[30%] max-w-[300px] dark:bg-[#11111F] bg-[#F2F3F7] p-5 rounded-3xl',\n companion: 'w-full h-full',\n group:\n 'text-xs dart:text-gray-400 text-gray-700 mt-4 hover:bg-transparent mb-1',\n create: 'relative mb-4 rounded-[10px] text-white',\n session: {\n base: [\n 'group my-1 rounded-[10px] p-2 text-gray-500 border border-transparent hover:bg-gray-300 hover:border-gray-400 [&_svg]:text-gray-500',\n 'dark:text-typography dark:text-gray-400 dark:hover:bg-gray-800/50 dark:hover:border-gray-700/50 dark:[&_svg]:text-gray-200'\n ].join(' '),\n active: [\n 'border border-gray-300 hover:border-gray-400 text-gray-700 bg-gray-200 hover:bg-gray-300 ',\n 'dark:text-gray-500 dark:bg-gray-800/70 dark:border-gray-700/50 dark:text-white dark:border-gray-700/70 dark:hover:bg-gray-800/50',\n '[&_button]:!opacity-100'\n ].join(' '),\n delete: '[&>svg]:w-4 [&>svg]:h-4 opacity-0 group-hover:!opacity-50'\n }\n },\n messages: {\n base: '',\n console: 'flex flex-col mx-5 flex-1 overflow-hidden',\n companion: 'flex w-full h-full',\n back: 'self-start p-0 my-2',\n inner: 'flex-1 h-full flex flex-col',\n title: ['text-base font-bold text-gray-500', 'dark:text-gray-200'].join(\n ' '\n ),\n date: 'text-xs whitespace-nowrap pt-2 text-gray-400',\n content: [\n 'mt-2 flex-1 overflow-auto [&_hr]:bg-gray-200',\n 'dark:[&_hr]:bg-gray-800/60'\n ].join(' '),\n header: 'flex justify-between items-start gap-2',\n showMore: 'mb-4',\n message: {\n base: 'mt-4 mb-4 flex flex-col p-0 rounded border-none bg-transparent',\n question: [\n 'font-semibold mb-4 px-4 py-4 pb-2 rounded-3xl rounded-br-none text-typography border bg-gray-200 border-gray-300 text-gray-900',\n 'dark:bg-gray-900/60 dark:border-gray-700/50 dark:text-gray-100'\n ].join(' '),\n response: ['text-gray-900', 'dark:text-gray-100'].join(' '),\n cursor: 'inline-block w-1 h-4 bg-current',\n files: {\n base: 'mb-2 flex flex-wrap gap-3 ',\n file: {\n base: [\n 'flex items-center gap-2 border border-gray-300 px-3 py-2 rounded-lg cursor-pointer',\n 'dark:border-gray-700'\n ].join(' '),\n name: ['text-sm text-gray-500', 'dark:text-gray-200'].join(' ')\n }\n },\n sources: {\n base: 'my-4 flex flex-wrap gap-3',\n source: {\n base: [\n 'flex gap-2 border border-gray-200 px-4 py-2 rounded-lg cursor-pointer',\n 'dark:border-gray-700'\n ].join(' '),\n companion: 'flex-1 px-3 py-1.5',\n image: 'max-w-10 max-h-10 rounded-md w-full h-fit self-center',\n title: 'text-md block',\n url: 'text-sm text-blue-400 underline'\n }\n },\n markdown: {\n copy: 'sticky py-1 [&>svg]:w-4 [&>svg]:h-4 opacity-50',\n p: 'mb-2',\n a: 'text-blue-400 underline',\n table: 'table-auto w-full m-2',\n th: 'px-4 py-2 text-left font-bold border-b border-gray-500',\n td: 'px-4 py-2',\n code: 'm-2 rounded-b relative',\n toolbar: 'text-xs dark:bg-gray-700/50 flex items-center justify-between px-2 py-1 rounded-t sticky top-0 backdrop-blur-md bg-gray-200 ',\n li: 'mb-2 ml-6',\n ul: 'mb-4 list-disc',\n ol: 'mb-4 list-decimal'\n },\n footer: {\n base: 'mt-3 flex gap-1.5 text-gray-400',\n copy: [\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:!opacity-100 hover:bg-gray-200 hover:text-gray-500',\n 'dark:hover:bg-gray-800 dark:hover:text-white'\n ].join(' '),\n upvote:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:!opacity-100 hover:bg-gray-700/40 hover:text-white',\n downvote:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:!opacity-100 hover:bg-gray-700/40 hover:text-white',\n refresh:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:!opacity-100 hover:bg-gray-700/40 hover:text-white'\n }\n }\n },\n input: {\n base: 'flex mt-4 relative',\n upload: ['px-5 py-2 text-gray-400 size-10', 'dark:gray-500'].join(' '),\n input: [\n 'w-full border rounded-3xl px-3 py-2 pr-16 text-gray-500 border-gray-200 hover:bg-blue-100 hover:border-blue-500 after:hidden after:!mx-10 bg-white [&>textarea]:w-full [&>textarea]:flex-none',\n 'dark:border-gray-700/50 dark:text-gray-200 dark:bg-gray-950 dark:hover:bg-blue-950/40'\n ].join(' '),\n actions: {\n base: 'absolute flex gap-2 items-center right-5 inset-y-1/2 -translate-y-1/2 z-10',\n send: [\n 'px-3 py-3 hover:bg-primary-hover rounded-full bg-gray-200 hover:bg-gray-300 text-gray-500',\n 'dark:text-white dark:bg-gray-800 hover:dark:bg-gray-700'\n ].join(' '),\n stop: 'px-2 py-2 bg-red-500 text-white rounded-full hover:bg-red-700 '\n }\n }\n};\n","import { useCallback, useEffect, useState } from 'react';\n\nexport const useDimensions = () => {\n const [ref, setRef] = useState<HTMLElement | null>(null);\n const [width, setWidth] = useState<number | undefined>(undefined);\n\n const observe = useCallback((element: HTMLElement | null) => {\n if (element) setRef(element);\n }, []);\n\n useEffect(() => {\n if (!ref) return;\n\n const resizeObserver = new ResizeObserver(entries => {\n for (let entry of entries) {\n setWidth(entry.contentRect.width);\n }\n });\n\n resizeObserver.observe(ref);\n\n return () => {\n resizeObserver.disconnect();\n };\n }, [ref]);\n\n return { width, observe };\n};\n","import {\n CSSProperties,\n FC,\n PropsWithChildren,\n useCallback,\n useEffect,\n useMemo,\n useState\n} from 'react';\nimport { useHotkeys } from 'reakeys';\nimport { cn, useComponentTheme } from 'reablocks';\nimport { Session } from './types';\nimport { ChatTheme, chatTheme } from './theme';\nimport { ChatContext, ChatViewType } from './ChatContext';\nimport { PluggableList } from 'react-markdown/lib';\nimport { AnimatePresence } from 'framer-motion';\nimport { useDimensions } from './utils/useDimensions';\n\nexport interface ChatProps extends PropsWithChildren {\n /**\n * The style to apply to the root element.\n */\n style?: CSSProperties;\n\n /**\n * The class name to apply to the root element.\n */\n className?: string;\n\n /**\n * The type of prompt to display.\n *\n * - Companion: Smaller prompt screen with session lists.\n * - Console: Full screen experience.\n * - Chat: Only chat, no sessions.\n */\n viewType?: ChatViewType;\n\n /**\n * The list of sessions to display.\n */\n sessions: Session[];\n\n /**\n * The ID of the currently active session.\n */\n activeSessionId?: string;\n\n /**\n * Custom theme for the chat.\n */\n theme?: ChatTheme;\n\n /**\n * Remark plugins to apply to the request/response.\n */\n remarkPlugins?: PluggableList[];\n\n /**\n * Whether to display a loading state.\n */\n isLoading?: boolean;\n\n /**\n * Whether to disable the chat.\n */\n disabled?: boolean;\n\n /**\n * Callback function to handle when a session is selected.\n */\n onSelectSession?: (sessionId: string) => void;\n\n /**\n * Callback function to handle when a session is deleted.\n */\n onDeleteSession?: (sessionId: string) => void;\n\n /**\n * Callback function to handle creating a new session.\n */\n onNewSession?: () => void;\n\n /**\n * Callback function to handle sending a new message.\n */\n onSendMessage?: (message: string) => void;\n\n /**\n * Callback function to handle stopping the current action.\n */\n onStopMessage?: () => void;\n\n /**\n * Callback function to handle file upload.\n */\n onFileUpload?: (file: File) => void;\n}\n\nexport const Chat: FC<ChatProps> = ({\n children,\n viewType = 'console',\n sessions,\n onSelectSession,\n onDeleteSession,\n onSendMessage,\n onStopMessage,\n onFileUpload,\n isLoading,\n activeSessionId,\n theme: customTheme = chatTheme,\n onNewSession,\n remarkPlugins,\n disabled,\n style,\n className\n}) => {\n const theme = useComponentTheme<ChatTheme>('chat', customTheme);\n const [internalActiveSessionID, setInternalActiveSessionID] = useState<\n string | null\n >(activeSessionId);\n\n const { width, observe } = useDimensions();\n const isCompact = viewType === 'companion' || (width && width < 767);\n\n useEffect(() => {\n setInternalActiveSessionID(activeSessionId);\n }, [activeSessionId]);\n\n const handleSelectSession = useCallback(\n (sessionId: string) => {\n setInternalActiveSessionID(sessionId);\n onSelectSession?.(sessionId);\n },\n [onSelectSession]\n );\n\n const handleDeleteSession = useCallback(\n (sessionId: string) => {\n setInternalActiveSessionID(undefined);\n onDeleteSession?.(sessionId);\n },\n [onDeleteSession]\n );\n\n const handleCreateNewSession = useCallback(() => {\n setInternalActiveSessionID(undefined);\n onNewSession?.();\n }, [onNewSession]);\n\n useHotkeys([\n {\n name: 'Create new session',\n category: 'Chat',\n keys: 'meta+shift+s',\n callback: event => {\n event.preventDefault();\n handleCreateNewSession();\n }\n }\n ]);\n\n const activeSession = useMemo(\n () => sessions.find(session => session.id === internalActiveSessionID),\n [sessions, internalActiveSessionID]\n );\n\n const contextValue = useMemo(\n () => ({\n sessions,\n activeSession,\n remarkPlugins,\n theme,\n disabled,\n isLoading,\n isCompact,\n viewType,\n activeSessionId: internalActiveSessionID,\n selectSession: handleSelectSession,\n deleteSession: handleDeleteSession,\n createSession: handleCreateNewSession,\n sendMessage: onSendMessage,\n stopMessage: onStopMessage,\n fileUpload: onFileUpload\n }),\n [\n isLoading,\n isCompact,\n viewType,\n disabled,\n theme,\n remarkPlugins,\n sessions,\n activeSession,\n internalActiveSessionID,\n handleSelectSession,\n handleDeleteSession,\n handleCreateNewSession,\n onSendMessage,\n onStopMessage,\n onFileUpload\n ]\n );\n\n return (\n <ChatContext.Provider value={contextValue}>\n <AnimatePresence initial={false}>\n <div\n ref={observe}\n className={cn(className, theme.base, {\n [theme.companion]: isCompact,\n [theme.console]: !isCompact\n })}\n style={style}\n >\n {children}\n </div>\n </AnimatePresence>\n </ChatContext.Provider>\n );\n};\n","import { FC, PropsWithChildren, useContext } from 'react';\nimport { List, cn } from 'reablocks';\nimport { ChatContext } from '@/ChatContext';\nimport { motion } from 'framer-motion';\n\nexport const SessionsList: FC<PropsWithChildren> = ({ children }) => {\n const { theme, isCompact, activeSessionId } = useContext(ChatContext);\n const isVisible = isCompact && !activeSessionId;\n\n return (\n (!isCompact || isVisible) && (\n <motion.div\n initial={{ translateX: '-100%' }}\n animate={{\n translateX: '0%',\n transition: {\n type: 'tween',\n ease: 'linear',\n duration: 0.2,\n when: 'beforeChildren'\n }\n }}\n exit={{ translateX: '-100%' }}\n className={cn(theme.sessions.base, {\n [theme.sessions.companion]: isCompact,\n [theme.sessions.console]: !isCompact\n })}\n >\n <List>{children}</List>\n </motion.div>\n )\n );\n};\n","import * as React from \"react\";\nconst SvgTrash = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 14, height: 14, viewBox: \"0 0 14 14\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"g\", { id: \"Delete\" }, /* @__PURE__ */ React.createElement(\"path\", { id: \"Vector\", d: \"M5.97905 1.16666C5.90859 1.16576 5.83895 1.18189 5.77605 1.21368C5.71316 1.24547 5.65888 1.29199 5.61783 1.34926C5.57677 1.40654 5.55016 1.47288 5.54025 1.54265C5.53034 1.61242 5.53743 1.68355 5.56092 1.75H4.27007C3.7342 1.75 3.2324 2.01817 2.93535 2.46435L2.24492 3.5H2.18738C2.12941 3.49918 2.07185 3.50989 2.01805 3.5315C1.96425 3.55312 1.91529 3.58522 1.874 3.62593C1.83271 3.66663 1.79993 3.71514 1.77755 3.76863C1.75518 3.82211 1.74365 3.87952 1.74365 3.9375C1.74365 3.99548 1.75518 4.05288 1.77755 4.10636C1.79993 4.15985 1.83271 4.20836 1.874 4.24907C1.91529 4.28977 1.96425 4.32187 2.01805 4.34349C2.07185 4.3651 2.12941 4.37582 2.18738 4.375H2.41012C2.44765 4.38067 2.48576 4.38143 2.52348 4.37727L3.24468 11.1084C3.33169 11.9199 4.02367 12.5417 4.83973 12.5417H9.15947C9.97553 12.5417 10.6675 11.9199 10.7545 11.1084L11.4763 4.37727C11.5133 4.38124 11.5506 4.38047 11.5874 4.375H11.8124C11.8704 4.37582 11.9279 4.3651 11.9817 4.34349C12.0355 4.32187 12.0845 4.28977 12.1258 4.24907C12.1671 4.20836 12.1998 4.15985 12.2222 4.10636C12.2446 4.05288 12.2561 3.99548 12.2561 3.9375C12.2561 3.87952 12.2446 3.82211 12.2222 3.76863C12.1998 3.71514 12.1671 3.66663 12.1258 3.62593C12.0845 3.58522 12.0355 3.55312 11.9817 3.5315C11.9279 3.50989 11.8704 3.49918 11.8124 3.5H11.7548L11.0644 2.46435C10.7671 2.01841 10.2654 1.75 9.7297 1.75H8.43885C8.46234 1.68355 8.46943 1.61242 8.45952 1.54265C8.44961 1.47288 8.423 1.40654 8.38194 1.34926C8.34089 1.29199 8.2866 1.24547 8.22371 1.21368C8.16082 1.18189 8.09118 1.16576 8.02072 1.16666H5.97905ZM4.27007 2.625H9.7297C9.97394 2.625 10.2009 2.74639 10.3364 2.9497L10.7033 3.5H3.29651L3.66338 2.9497L3.66395 2.94913C3.79913 2.74608 4.02543 2.625 4.27007 2.625ZM3.40361 4.375H10.5962L9.88465 11.015C9.8445 11.3894 9.53575 11.6667 9.15947 11.6667H4.83973C4.46345 11.6667 4.15527 11.3894 4.11512 11.015L3.40361 4.375Z\", fill: \"currentColor\" })));\nexport default SvgTrash;\n","import * as React from \"react\";\nconst SvgChat = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 16, height: 17, viewBox: \"0 0 16 17\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M8 3C4.55375 3 1.75 5.23753 1.75 7.98828C1.75 9.70653 2.83659 11.2762 4.62109 12.188C4.11184 13.0465 3.62587 13.7378 3.62012 13.7461C3.50687 13.9071 3.49862 14.1196 3.59912 14.2891C3.69012 14.4418 3.8543 14.5342 4.0293 14.5342C4.0483 14.5342 4.06743 14.533 4.08643 14.5308C4.15168 14.5233 5.66214 14.3364 7.50439 12.9604C7.67239 12.9712 7.8385 12.9766 8 12.9766C11.4462 12.9766 14.25 10.739 14.25 7.98828C14.25 5.23753 11.4462 3 8 3ZM8 4C10.8948 4 13.25 5.78903 13.25 7.98828C13.25 10.1875 10.8948 11.9766 8 11.9766C7.8055 11.9766 7.60225 11.968 7.396 11.9497C7.271 11.9382 7.1454 11.9752 7.0459 12.0527C6.3589 12.5855 5.72033 12.9308 5.20508 13.1528C5.38383 12.8648 5.57691 12.5418 5.76416 12.2061C5.83416 12.0813 5.84705 11.9324 5.7998 11.7974C5.75255 11.6624 5.64983 11.5542 5.51758 11.5C3.81033 10.7993 2.75 9.45328 2.75 7.98828C2.75 5.78903 5.10525 4 8 4ZM5.5 7.25C5.08575 7.25 4.75 7.58575 4.75 8C4.75 8.41425 5.08575 8.75 5.5 8.75C5.91425 8.75 6.25 8.41425 6.25 8C6.25 7.58575 5.91425 7.25 5.5 7.25ZM8 7.25C7.58575 7.25 7.25 7.58575 7.25 8C7.25 8.41425 7.58575 8.75 8 8.75C8.41425 8.75 8.75 8.41425 8.75 8C8.75 7.58575 8.41425 7.25 8 7.25ZM10.5 7.25C10.0857 7.25 9.75 7.58575 9.75 8C9.75 8.41425 10.0857 8.75 10.5 8.75C10.9143 8.75 11.25 8.41425 11.25 8C11.25 7.58575 10.9143 7.25 10.5 7.25Z\", fill: \"currentColor\" }));\nexport default SvgChat;\n","import { FC, PropsWithChildren, ReactElement, useContext } from 'react';\nimport { ListItem, IconButton, cn, Ellipsis } from 'reablocks';\nimport { Session } from '@/types';\nimport TrashIcon from '@/assets/trash.svg?react';\nimport ChatIcon from '@/assets/chat.svg?react';\nimport { ChatContext } from '@/ChatContext';\nimport { Slot } from '@radix-ui/react-slot';\n\nexport interface SessionListItemProps extends PropsWithChildren {\n /**\n * Session to display.\n */\n session: Session;\n\n /**\n * Indicates whether the session is deletable.\n */\n deletable?: boolean;\n\n /**\n * Icon to show for delete.\n */\n deleteIcon?: ReactElement;\n\n /**\n * Icon to show for chat.\n */\n chatIcon?: ReactElement;\n\n /**\n * Limit for the ellipsis.\n */\n limit?: number;\n}\n\nexport const SessionListItem: FC<SessionListItemProps> = ({\n children,\n session,\n deletable = true,\n limit = 100,\n deleteIcon = <TrashIcon />,\n chatIcon = <ChatIcon className=\"mr-2\" />\n}) => {\n const { activeSessionId, selectSession, deleteSession, theme } =\n useContext(ChatContext);\n const Comp = children ? Slot : ListItem;\n\n return (\n <Comp\n dense\n disableGutters\n active={session.id === activeSessionId}\n className={cn(theme.sessions.session.base, {\n [theme.sessions.session.active]: session.id === activeSessionId\n })}\n onClick={() => selectSession?.(session.id)}\n start={chatIcon}\n end={\n <>\n {deletable && (\n <IconButton\n size=\"small\"\n variant=\"text\"\n onClick={e => {\n e.stopPropagation();\n deleteSession(session.id);\n }}\n className={cn(theme.sessions.session.delete)}\n >\n {deleteIcon}\n </IconButton>\n )}\n </>\n }\n >\n {children || <Ellipsis value={session.title} limit={limit} />}\n </Comp>\n );\n};\n","import * as React from \"react\";\nconst SvgPlus = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 17, height: 17, viewBox: \"0 0 17 17\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"g\", { id: \"add\" }, /* @__PURE__ */ React.createElement(\"path\", { id: \"Vector\", d: \"M13.1667 9.16658H9.16671V13.1666H7.83337V9.16658H3.83337V7.83325H7.83337V3.83325H9.16671V7.83325H13.1667V9.16658Z\", fill: \"currentColor\" })));\nexport default SvgPlus;\n","import { Button, cn } from 'reablocks';\nimport { FC, PropsWithChildren, ReactNode, useContext } from 'react';\nimport { ChatContext } from '@/ChatContext';\nimport { Slot } from '@radix-ui/react-slot';\n\nimport PlusIcon from '@/assets/plus.svg?react';\n\ninterface NewSessionButtonProps extends PropsWithChildren {\n /**\n * Text for the new session button.\n */\n newSessionText?: string | ReactNode;\n}\n\nexport const NewSessionButton: FC<NewSessionButtonProps> = ({\n children,\n newSessionText = 'New Session'\n}) => {\n const { theme, createSession, disabled } = useContext(ChatContext);\n const Comp = children ? Slot : Button;\n\n return (\n <>\n <Comp\n fullWidth\n disableMargins\n color=\"primary\"\n startAdornment={<PlusIcon />}\n className={cn(theme.sessions.create)}\n disabled={disabled}\n onClick={createSession}\n >\n {children || newSessionText}\n </Comp>\n </>\n );\n};\n","import { format, isToday, isYesterday, isThisWeek, isThisMonth, isThisYear, parseISO } from 'date-fns';\nimport { Session } from '@/types';\n\nexport interface GroupedSessions {\n heading: string;\n sessions: Session[];\n}\n\nconst sortOrder = [\n 'Today',\n 'Yesterday',\n 'Last Week',\n 'Last Month',\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n 'Last Year'\n];\n\nexport function groupSessionsByDate(sessions: Session[]): GroupedSessions[] {\n const grouped: any = {};\n\n sessions.forEach(session => {\n const createdAt = new Date(session.createdAt);\n\n if (isToday(createdAt)) {\n if (!grouped['Today']) grouped['Today'] = [];\n grouped['Today'].push(session);\n } else if (isYesterday(createdAt)) {\n if (!grouped['Yesterday']) grouped['Yesterday'] = [];\n grouped['Yesterday'].push(session);\n } else if (isThisWeek(createdAt)) {\n if (!grouped['Last Week']) grouped['Last Week'] = [];\n grouped['Last Week'].push(session);\n } else if (isThisMonth(createdAt)) {\n if (!grouped['Last Month']) grouped['Last Month'] = [];\n grouped['Last Month'].push(session);\n } else if (isThisYear(createdAt)) {\n const monthName = format(createdAt, 'MMMM');\n if (!grouped[monthName]) grouped[monthName] = [];\n grouped[monthName].push(session);\n } else {\n if (!grouped['Last Year']) grouped['Last Year'] = [];\n grouped['Last Year'].push(session);\n }\n });\n\n // Remove empty groups\n Object.keys(grouped).forEach(key => {\n if (grouped[key].length === 0) {\n delete grouped[key];\n }\n });\n\n // Sort groups\n const sortedGroups = Object.keys(grouped).sort((a, b) =>\n sortOrder.indexOf(a) - sortOrder.indexOf(b)\n );\n\n return sortedGroups.map(heading => ({\n heading,\n sessions: grouped[heading].sort((a, b) =>\n new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()\n )\n }));\n}\n","import { FC, ReactNode, useContext, useMemo } from 'react';\nimport { GroupedSessions, groupSessionsByDate } from '@/utils/grouping';\nimport { ChatContext } from '@/ChatContext';\n\nexport interface SessionGroupsProps {\n /**\n * Render function for the session groups.\n */\n children: (groups: GroupedSessions[]) => ReactNode;\n}\n\nexport const SessionGroups: FC<SessionGroupsProps> = ({ children }) => {\n const { sessions } = useContext(ChatContext);\n const groups = useMemo(() => groupSessionsByDate(sessions), [sessions]);\n\n return <>{children(groups)}</>;\n};\n","import { FC, PropsWithChildren, ReactNode, useContext } from 'react';\nimport { ChatContext } from '@/ChatContext';\nimport { ListItem, cn } from 'reablocks';\n\ninterface SessionsGroupProps extends PropsWithChildren {\n /**\n * Heading for the session group.\n */\n heading?: string | ReactNode;\n}\n\nexport const SessionsGroup: FC<SessionsGroupProps> = ({\n heading,\n children,\n}) => {\n const { theme } = useContext(ChatContext);\n return (\n <>\n {heading && (\n <ListItem\n disableGutters\n disablePadding\n className={cn(theme.sessions.group)}\n >\n {heading}\n </ListItem>\n )}\n {children}\n </>\n );\n};\n"],"names":["SendIcon","StopIcon","AttachIcon","BackIcon","CopyIcon","SyntaxHighlighter","FileIcon","ThumbUpIcon","ThumbsDownIcon","RefreshIcon","TrashIcon","ChatIcon","PlusIcon"],"mappings":";;;;;;;;;;;;;AACA,MAAM,UAAU,CAAC,UAA0B,sBAAM,cAAc,OAAO,EAAE,OAAO,IAAI,QAAQ,IAAI,SAAS,aAAa,MAAM,QAAQ,OAAO,8BAA8B,GAAG,MAAO,GAAkB,sBAAM,cAAc,KAAK,EAAE,IAAI,OAAM,GAAoB,sBAAM,cAAc,QAAQ,EAAE,IAAI,UAAU,GAAG,wwCAAwwC,MAAM,eAAgB,CAAA,CAAC,CAAC;ACA5kD,MAAM,UAAU,CAAC,UAA0B,sBAAM,cAAc,OAAO,EAAE,OAAO,8BAA8B,OAAO,IAAI,QAAQ,IAAI,SAAS,aAAa,MAAM,QAAQ,QAAQ,gBAAgB,aAAa,GAAG,eAAe,SAAS,gBAAgB,SAAS,WAAW,2BAA2B,GAAG,MAAO,GAAkB,sBAAM,cAAc,QAAQ,EAAE,GAAG,YAAa,CAAA,GAAmB,sBAAM,cAAc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