@jrapps/my_tickets_chat_ui 0.2.0 → 0.2.2

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts", "../../src/components/SiteChatComponent/SiteChatComponent.tsx", "../../src/components/SiteChatComponent/useSiteChatComponent.ts", "../../src/components/SiteChatComponent/FabButton/FabButton.tsx", "../../src/components/SiteChatComponent/Footer/Footer.tsx", "../../src/components/SiteChatComponent/Footer/send-button/send-button.tsx", "../../src/components/SiteChatComponent/Footer/attachment-list/attachment-list.tsx", "../../src/components/SiteChatComponent/Footer/message-input/message-input.tsx", "../../src/components/SiteChatComponent/Footer/message-input/open-file-picker.ts", "../../src/components/SiteChatComponent/Header/Header.tsx", "../../src/components/SiteChatComponent/MessageContainer/MessageContainer.tsx", "../../src/components/SiteChatComponent/MessageContainer/messages/messages-wrapper.tsx", "../../src/components/SiteChatComponent/MessageContainer/messages/attachment.tsx", "../../src/components/SiteChatComponent/SiteChatComponent.css", "../../src/components/SiteChatComponentNew/SiteChatComponentNew.tsx", "../../src/components/SiteChatComponentNew/useSiteChatComponentNew.ts", "../../src/components/SiteChatComponentNew/utils/theme.ts", "../../src/components/SiteChatComponentNew/utils/systemMessages.ts", "../../src/components/SiteChatComponentNew/utils/format.ts", "../../src/components/SiteChatComponentNew/Header/Header.css", "../../src/components/SiteChatComponentNew/Header/Header.tsx", "../../src/components/SiteChatComponentNew/Footer/Footer.tsx", "../../src/components/SiteChatComponentNew/Footer/Footer.css", "../../src/components/SiteChatComponentNew/hooks/useAutoScroll.ts", "../../src/components/SiteChatComponentNew/hooks/useOfflineForm.ts", "../../src/components/SiteChatComponentNew/Messages/UserMessage.css", "../../src/components/SiteChatComponentNew/Messages/UserMessage.tsx", "../../src/components/SiteChatComponentNew/Shared/Avatar.css", "../../src/components/SiteChatComponentNew/Shared/Avatar.tsx", "../../src/components/SiteChatComponentNew/Shared/Button.css", "../../src/components/SiteChatComponentNew/Shared/Button.tsx", "../../src/components/SiteChatComponentNew/Messages/AgentMessage.css", "../../src/components/SiteChatComponentNew/Messages/AgentMessage.tsx", "../../src/components/SiteChatComponentNew/Messages/SystemMessage.css", "../../src/components/SiteChatComponentNew/Messages/SystemMessage.tsx", "../../src/components/SiteChatComponentNew/Messages/AttachmentMessage.css", "../../src/components/SiteChatComponentNew/Messages/AttachmentMessage.tsx", "../../src/components/SiteChatComponentNew/Messages/MessageRenderer.tsx", "../../src/components/SiteChatComponentNew/Messages/MessageList.css", "../../src/components/SiteChatComponentNew/Messages/MessageList.tsx", "../../src/components/SiteChatComponentNew/Messages/TypingIndicator.css", "../../src/components/SiteChatComponentNew/Messages/TypingIndicator.tsx", "../../src/components/SiteChatComponentNew/States/LoadingState.css", "../../src/components/SiteChatComponentNew/States/LoadingState.tsx", "../../src/components/SiteChatComponentNew/States/StartChatState.css", "../../src/components/SiteChatComponentNew/States/StartChatState.tsx", "../../src/components/SiteChatComponentNew/OfflineForm/OfflineForm.css", "../../src/components/SiteChatComponentNew/OfflineForm/OfflineForm.tsx", "../../src/components/SiteChatComponentNew/States/OfflineState.css", "../../src/components/SiteChatComponentNew/States/OfflineState.tsx", "../../src/components/SiteChatComponentNew/States/ChatEndedState.css", "../../src/components/SiteChatComponentNew/States/ChatEndedState.tsx", "../../src/components/SiteChatComponentNew/SiteChatComponentNew.css"],
4
- "sourcesContent": ["export * from './components';", "import React from 'react';\nimport { Box, Text } from '@wix/design-system';\nimport '@wix/design-system/styles.global.css';\nimport type { SiteChatComponentProps } from './SiteChatComponent.types';\nimport { useSiteChatComponent } from './useSiteChatComponent';\nimport { FabButton } from './FabButton/FabButton';\nimport { Footer } from './Footer/Footer';\nimport { Header } from './Header/Header';\nimport { MessageContainer } from './MessageContainer/MessageContainer';\nimport './SiteChatComponent.css';\n\nconst SiteChatComponentRoot = React.forwardRef<HTMLDivElement, SiteChatComponentProps>(\n (\n {\n children,\n viewMode,\n editorShowChatPanel,\n handleToggle,\n buttonTextValue,\n isOpen,\n },\n _ref,\n ) => {\n useSiteChatComponent();\n\n if (viewMode === 'Editor') {\n if (typeof editorShowChatPanel === 'undefined') {\n return (\n <Box align=\"center\" verticalAlign=\"middle\" height=\"100%\" width=\"100%\">\n <Text>\n Editor view mode detected but editorShowChatPanel prop is not provided\n </Text>\n </Box>\n );\n }\n\n return (\n <Box>\n <FabButton onClick={handleToggle} text={buttonTextValue} />\n <Box className={`site-chat-component-panel ${editorShowChatPanel ? 'open' : ''}`}>\n {children}\n </Box>\n </Box>\n );\n }\n\n return (\n <Box>\n <FabButton onClick={handleToggle} text={buttonTextValue} />\n <Box className={`site-chat-component-panel ${isOpen ? 'open' : ''}`}>\n {children}\n </Box>\n </Box>\n );\n },\n);\n\nSiteChatComponentRoot.displayName = 'SiteChatComponent';\n\nexport const SiteChatComponent = Object.assign(SiteChatComponentRoot, {\n Header,\n MessageContainer,\n Footer,\n FabButton,\n});", "/**\n * useSiteChatComponent\n *\n * Internal hook that encapsulates the logic for SiteChatComponent.\n * Keep this file focused on state and side-effects; keep JSX in SiteChatComponent.tsx.\n */\nexport function useSiteChatComponent() {\n // Add state and derived values here\n\n return {};\n}\n", "import React from 'react';\nimport type { FabButtonProps } from './FabButton.types';\nimport { Box } from '@wix/design-system';\nimport { WixChat } from '@wix/wix-ui-icons-common';\n\nexport const FabButton = React.forwardRef<HTMLDivElement, FabButtonProps>(\n ({\n className,\n children,\n onClick,\n type = 'textIcon',\n icon = <WixChat />,\n text,\n ...rest\n }, ref) => {\n return (\n <div ref={ref}>\n <button\n className=\"site-chat-component-fab\"\n onClick={onClick}\n >\n {type === 'textIcon' ? <span className='site-chat-component-fab-fab-button-icon'><Box height=\"100%\">{icon}</Box></span> : null}\n {type === 'textIcon' || type === 'text' ? <span className='site-chat-component-fab-fab-button-text'><span className='site-chat-component-fab-fab-button-label'>{text}</span></span> : null}\n {type === 'icon' ? <span className='site-chat-component-fab-fab-button-icon'><Box height=\"100%\" width='max-content'>{icon}</Box></span> : null}\n </button>\n </div>\n );\n }\n);\n\nFabButton.displayName = 'SiteChatComponent.FabButton';\n", "import React from 'react';\nimport type { FooterProps } from './Footer.types';\nimport { Box, IconButton } from '@wix/design-system';\nimport SendButton from './send-button/send-button';\nimport { AttachmentSmall } from '@wix/wix-ui-icons-common';\nimport AttachmentList from './attachment-list/attachment-list';\nimport MessageInput from './message-input/message-input';\n\nexport const Footer = React.forwardRef<HTMLDivElement, FooterProps>(\n ({\n className,\n children,\n sendButtonConfig,\n attachmentListConfig,\n messageInputConfig,\n onAttachmentAdded,\n ...rest\n }, ref) => {\n const handleSendMessage = (text: string, messageType: 'TEXT' | 'ATTACHMENT', attachment?: { id: string; name: string; url: string }) => {\n if (sendButtonConfig?.onClick) {\n sendButtonConfig.onClick(text, messageType, attachment);\n } else {\n console.warn('handleSendMessage function is not provided in sendButtonConfig');\n }\n };\n return (\n <Box ref={ref} className=\"site-chat-component-footer-message-input-container\" direction=\"vertical\" gap={1} verticalAlign=\"middle\">\n <Box width=\"100%\">\n <AttachmentList items={attachmentListConfig?.items || []} onRemove={attachmentListConfig?.onRemove} onClick={attachmentListConfig?.onClick} onFilesSent={attachmentListConfig?.onFilesSent} />\n </Box>\n <Box alignContent=\"bottom\" width=\"100%\" direction=\"horizontal\" gap={2} verticalAlign=\"middle\">\n <MessageInput\n placeholder={messageInputConfig?.placeholder || 'Type your message here...'}\n className={messageInputConfig?.className || 'message-input'}\n value={messageInputConfig?.value || ''}\n onChange={messageInputConfig?.onChange}\n onKeyDown={messageInputConfig?.onKeyDown}\n disabled={messageInputConfig?.disabled}\n onAttachmentAdded={onAttachmentAdded}\n />\n <SendButton\n onClick={() => handleSendMessage(messageInputConfig?.value || '', attachmentListConfig?.items ? 'ATTACHMENT' : 'TEXT')}\n disabled={sendButtonConfig?.disabled}\n text={sendButtonConfig?.buttonText || 'Send'}\n />\n </Box>\n </Box>\n );\n }\n);\n\nFooter.displayName = 'SiteChatComponent.Footer';\n", "import React from 'react';\n\ninterface SendButtonProps {\n text?: string;\n className?: string;\n onClick?: () => void;\n disabled?: boolean;\n}\n\nconst SendButton: React.FC<SendButtonProps> = ({\n text = 'Send',\n className = '',\n onClick,\n disabled = false,\n}) => {\n return (\n <button \n className={`site-chat-component-footer-my-tickets-chat-widget-send-button ${className}`}\n onClick={onClick}\n disabled={disabled}\n >\n {text}\n </button>\n )\n}\n\nexport default SendButton;", "import { type FC, useState, useEffect } from 'react';\n\nimport { IconButton, Box } from '@wix/design-system';\nimport {\n Page as PageSmallIcon,\n DismissSmall as DismissIcon\n} from '@wix/wix-ui-icons-common';\nimport type { AttachmentListWrapperProps } from '@jrapps/my_tickets_common_types'\n\nconst AttachmentList: FC<AttachmentListWrapperProps> = ({ items, onRemove, onClick, onFilesSent }) => {\n const [localItems, setLocalItems] = useState(items);\n\n useEffect(() => {\n setLocalItems(items);\n }, [items]);\n\n const handleOnRemove = (id: string) => {\n if (onRemove) {\n onRemove(id);\n }\n setLocalItems(prev => prev.filter(item => item.id !== id));\n }\n\n const handleSendFiles = () => {\n if (onFilesSent && localItems.length > 0) {\n onFilesSent(localItems);\n setLocalItems([]);\n }\n };\n\n return (\n <Box direction='horizontal' gap={2} maxWidth='100%' minWidth=\"100%\" overflowY='hidden' boxSizing='border-box' scrollbarWidth='thin' overflowX='auto'>\n {localItems.map(item => (\n <div className='site-chat-component-footer-file-item-container' key={item.id} onClick={() => onClick && onClick(item.id, item.url)}>\n <PageSmallIcon size={'15px'} />\n <span className='site-chat-component-footer-file-name'>{item.name}</span>\n <IconButton size='tiny' onClick={() => handleOnRemove(item.id)}><DismissIcon /></IconButton>\n </div>\n ))}\n </Box>\n );\n}\n\nexport default AttachmentList;", "import React from 'react';\nimport { IconButton } from '@wix/design-system';\nimport { AttachmentSmall } from '@wix/wix-ui-icons-common';\nimport { openFilePicker } from './open-file-picker';\n\ninterface MessageInputProps {\n placeholder?: string;\n disabled?: boolean;\n className?: string;\n suffix?: React.ReactNode;\n value?: string;\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;\n onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\n onAttachmentAdded?: (file: { id: string; name: string; url: string }) => void;\n}\n\nconst MessageInput: React.FC<MessageInputProps> = ({\n placeholder = 'Type a message...',\n disabled = false,\n className = '',\n suffix,\n value = '',\n onChange,\n onKeyDown,\n onAttachmentAdded,\n}) => {\n\n const handleAttachmentOnClick = async () => {\n try {\n await openFilePicker({ multiple: false }).then(file => {\n if (file && onAttachmentAdded) {\n onAttachmentAdded(file);\n }\n });\n } catch (error: any) {\n console.error('Error opening file picker:', error);\n }\n }\n\n return (\n <div className={`site-chat-component-footer-input-wrapper ${className}`}>\n <input\n name='messageInput'\n className='site-chat-component-footer-chat-input'\n placeholder={placeholder}\n disabled={disabled}\n value={value}\n onChange={onChange}\n onKeyDown={onKeyDown}\n />\n <sub className=\"site-chat-component-footer-suffix\"><IconButton onClick={handleAttachmentOnClick} className='attachment-icon-button'><AttachmentSmall /></IconButton></sub>\n </div>\n )\n};\n\nexport default MessageInput;", "import { httpClient }from '@wix/essentials';\n\ninterface WindowWithFilePicker extends Window {\n showOpenFilePicker?: (options?: { multiple?: boolean }) => Promise<FileSystemFileHandle[]>;\n}\n\ninterface OpenFilePickerOptions {\n multiple?: boolean;\n}\n\nconst uploadFile = async (file: File) => {\n try {\n const baseApiUrl = new URL(import.meta.url).origin;\n\n const response = await httpClient.fetchWithAuth(`${baseApiUrl}/api/widget/chat/upload-attachment`, {\n method: 'POST',\n headers: {\n 'Content-Type': file.type || 'application/octet-stream',\n 'x-file-name': encodeURIComponent(file.name),\n 'x-file-type': file.type || 'application/octet-stream',\n },\n body: file,\n });\n\n const data = await response.json();\n if (!response.ok) {\n throw new Error(data.error || 'Failed to upload file');\n }\n\n if (!data.file?.id || !data.file.displayName || !data.file.url) {\n throw new Error('Invalid response format from upload endpoint');\n }\n\n return data.file as { id: string; displayName: string; url: string };\n } catch (error) {\n console.error('Error uploading file:', error);\n return null;\n }\n}\n\nexport const openFilePicker = async (options?: OpenFilePickerOptions) => {\n const win = window as WindowWithFilePicker;\n if (!win.showOpenFilePicker) {\n console.error('File Picker API is not supported in this browser.');\n return;\n }\n\n try {\n const fileHandles = await win.showOpenFilePicker(options);\n const fileHandle = fileHandles[0];\n const file = await fileHandle.getFile();\n const uploadedFile = await uploadFile(file);\n\n if (!uploadedFile) {\n console.error('Failed to upload file.');\n return;\n }\n\n return {\n id: uploadedFile.id,\n name: uploadedFile.displayName,\n url: uploadedFile.url\n }\n } catch (error) {\n console.error('Error opening file picker:', error);\n return null;\n }\n};", "import React from 'react';\nimport { Box } from '@wix/design-system';\nimport type { HeaderProps } from './Header.types';\n\nexport const Header = React.forwardRef<HTMLDivElement, HeaderProps>(\n ({\n className,\n children,\n title,\n subtitle,\n image,\n onClose,\n ...rest\n }, ref) => {\n return (\n <Box ref={ref} className=\"site-chat-component-header-container\" verticalAlign='middle'>\n <Box width='100%' direction='horizontal' align='center' gap='10px'>\n {image && (\n <Box className='site-chat-component-header-image' width='60px' height='50px' borderRadius='999px'>\n <img style={{ borderRadius: '999px' }} width={'100%'} height={'100%'} src={String(image)} alt=\"Business Logo\" />\n </Box>\n )}\n <Box direction='vertical' className='site-chat-component-header-text-section'>\n <Box className=\"site-chat-component-header-top-section\">\n <Box className=\"site-chat-component-header-top\" verticalAlign='middle' WebkitJustifyContent='space-between' width=\"100%\">\n {title && (<h2 className='site-chat-component-header-title'>{title}</h2>)}\n <button\n onClick={onClose}\n aria-label=\"Close\"\n className=\"site-chat-component-header-close-button\"\n >\n \u2715\n </button>\n </Box>\n </Box>\n\n <Box className=\"site-chat-component-header-bottom-section\">\n {subtitle && (<h3 className=\"site-chat-component-header-subtitle\">{subtitle}</h3>)}\n </Box>\n </Box>\n </Box>\n </Box>\n\n );\n }\n);\n\nHeader.displayName = 'SiteChatComponent.Header';\n", "import React from 'react';\nimport type { MessageContainerProps } from './MessageContainer.types';\nimport { Box } from '@wix/design-system';\nimport MessageWrapper from './messages/messages-wrapper';\n\nexport const MessageContainer = React.forwardRef<HTMLDivElement, MessageContainerProps>(\n ({\n className,\n children,\n messages,\n loading,\n ...rest\n }, ref) => {\n return (\n <Box ref={ref} className=\"site-chat-component-message-container\">\n {loading && (\n <Box className=\"site-chat-component-message-container-loading-state\">\n <p>Loading messages...</p>\n </Box>\n )}\n {messages.length === 0 && !loading && (\n <Box className=\"site-chat-component-message-container-empty-state\">\n <p>No messages yet. Start a conversation</p>\n </Box>\n )}\n {messages.length > 0 && <MessageWrapper messages={messages} />}\n </Box>\n\n );\n }\n);\n\nMessageContainer.displayName = 'SiteChatComponent.MessageContainer';\n", "import { type FC } from 'react';\nimport { useRef, useEffect } from 'react';\nimport { Avatar } from '@wix/design-system';\nimport Attachment from './attachment';\nimport type { MessagesWrapperProps, MessageProps } from '@jrapps/my_tickets_common_types'\n\nconst AGENT_MESSAGE_GAP = '10px';\nconst AGENT_MESSAGE_WIDTH = '75%';\nconst AGENT_MESSAGE_INNER_GAP = '4px';\n\nconst ONE_MINUTE_MS = 60_000;\nconst ONE_DAY_MS = 86_400_000;\nconst DAYS_IN_WEEK = 7;\n\nconst formatTimestamp = (timestamp?: number): string => {\n if (!timestamp) return '';\n const date = new Date(timestamp);\n const now = new Date();\n\n if (now.getTime() - date.getTime() < ONE_MINUTE_MS) return 'Just now';\n\n const time = date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });\n const startOfToday = new Date(now.getFullYear(), now.getMonth(), now.getDate());\n const startOfDay = new Date(date.getFullYear(), date.getMonth(), date.getDate());\n const diffDays = Math.floor((startOfToday.getTime() - startOfDay.getTime()) / ONE_DAY_MS);\n\n if (diffDays === 0) return `Today at ${time}`;\n if (diffDays === 1) return `Yesterday at ${time}`;\n if (diffDays < DAYS_IN_WEEK && date.getDay() < now.getDay())\n return `${date.toLocaleDateString([], { weekday: 'short' })} at ${time}`;\n return `${date.toLocaleDateString([], { month: 'short', day: 'numeric', year: 'numeric' })} at ${time}`;\n};\n\nconst MessagesWrapper: FC<MessagesWrapperProps> = ({ messages = [] }) => {\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (wrapperRef.current) {\n wrapperRef.current.scrollTop = wrapperRef.current.scrollHeight;\n }\n }, [messages]);\n\n return (\n <div className=\"site-chat-component-message-container-messages-wrapper\" ref={wrapperRef}>\n {messages.map(({ _id, message, attachment, timestamp, senderType, senderName }: MessageProps, index: any) => (\n <div key={_id || index} className={`message-item ${senderType}`}>\n {senderType === 'agent' ? (\n <AgentMessageWrapper message={message} attachment={attachment ? (Array.isArray(attachment) ? attachment[0] : attachment) : undefined} timestamp={timestamp} agentName={senderName} />\n ) : senderType === 'user' ? (\n <UserMessageWrapper message={message} attachment={attachment ? (Array.isArray(attachment) ? attachment[0] : attachment) : undefined} timestamp={timestamp} />\n ) : (\n <SystemMessageWrapper message={message} timestamp={timestamp} />\n )}\n </div>\n ))}\n </div>\n )\n}\n\nconst GetSystemMessage: FC<{ type: string | undefined }> = ({ type }) => {\n switch (type) {\n case 'AGENT_JOINED':\n return <div className='site-chat-component-message-container-system-message-message'>An agent has joined the chat.</div>;\n case 'AGENT_LEFT':\n return <div className='site-chat-component-message-container-system-message-message'>An agent has left the chat.</div>;\n case 'USER_JOINED':\n return <div className='site-chat-component-message-container-system-message-message'>A user has joined the chat.</div>;\n case 'USER_LEFT':\n return <div className='site-chat-component-message-container-system-message-message'>A user has left the chat.</div>;\n case 'CHAT_ENDED':\n return <div className='site-chat-component-message-container-system-message-message'>The chat has ended.</div>;\n case 'CHAT_REOPENED':\n return <div className='site-chat-component-message-container-system-message-message'>The chat has been reopened.</div>;\n case 'CHAT_TRANSFERRED':\n return <div className='site-chat-component-message-container-system-message-message'>The chat has been transferred to another agent.</div>;\n case 'WAITING_FOR_AGENT':\n return <div className='site-chat-component-message-container-system-message-message'>Waiting for an agent to join the chat...</div>;\n default:\n return <div className='site-chat-component-message-container-system-message-message'>System message</div>;\n }\n}\n\nconst SystemMessageWrapper: FC<{ message: string | undefined; timestamp?: number }> = ({ message, timestamp }) => {\n return (\n <div className=\"site-chat-component-message-container-system-message-wrapper\">\n <div className=\"site-chat-component-message-container-system-message\">\n <hr className=\"dashed\" />\n <GetSystemMessage type={message} />\n <hr className=\"dashed\" />\n </div>\n </div>\n )\n}\n\nconst AgentMessageWrapper: FC<{ message?: string; attachment?: { id: string; name: string; url: string }; timestamp?: number; agentName?: string }> = ({ message, attachment, timestamp, agentName }) => {\n return (\n <div style={{ display: 'flex', flexDirection: 'row', gap: AGENT_MESSAGE_GAP }}>\n <Avatar size=\"size24\" className=\"site-chat-component-message-container-agent-message-avatar\" name={agentName} />\n <div style={{ width: AGENT_MESSAGE_WIDTH, gap: AGENT_MESSAGE_INNER_GAP, display: 'flex', flexDirection: 'column' }}>\n {agentName && <div className='site-chat-component-message-container-agent-name-time-container'><div className=\"site-chat-component-message-container-agent-name\">{agentName}</div><div className='site-chat-component-message-container-agent-message-timestamp'>{formatTimestamp(timestamp)}</div></div>}\n <div className={`site-chat-component-message-container-agent-message-wrapper${attachment ? '-attachment' : ''}`}>\n <div className=\"site-chat-component-message-container-agent-message\">\n {message && message}\n {attachment && <Attachment item={attachment} />}\n </div>\n </div>\n </div>\n </div>\n )\n}\n\nconst UserMessageWrapper: FC<{ message?: string; attachment?: { id: string; name: string; url: string }; timestamp?: number }> = ({ message, attachment, timestamp }) => {\n return (\n <div style={{ display: 'flex', flexDirection: 'column', alignItems: 'flex-end', gap: '4px' }}>\n {!attachment && <div className='site-chat-component-message-container-user-name'>Me</div>}\n <div className={`site-chat-component-message-container-user-message-wrapper${attachment ? '-attachment' : ''}`}>\n <div className=\"site-chat-component-message-container-user-message\">\n {message && message}\n {attachment && <Attachment item={attachment} />}\n </div>\n </div>\n </div>\n )\n}\n\nexport default MessagesWrapper;", "import { type FC } from 'react';\n\nimport { TextButton, Box } from '@wix/design-system';\nimport {\n Page as PageSmallIcon\n} from '@wix/wix-ui-icons-common';\nimport { ArrowTopRight as ArrowTopRightIcon, } from '@wix/wix-ui-icons-common/on-stage';\nimport type { AttachmentWrapperProps } from '@jrapps/my_tickets_common_types'\n\n\nconst Attachment: FC<AttachmentWrapperProps> = ({ item }) => {\n return (\n <Box direction='horizontal' maxWidth='100%' boxSizing='border-box' className='site-chat-component-message-container-in-chat-file-item-wrapper-box'>\n {item && (\n <div className='site-chat-component-message-container-in-chat-file-item-container' key={item.id}>\n <PageSmallIcon className='site-chat-component-message-container-in-chat-file-icon' width={'20px'} height={'20px'} />\n <div className='site-chat-component-message-container-in-chat-file-names-container'>\n <span className='site-chat-component-message-container-in-chat-file-name'>{item.name}</span>\n <span className='site-chat-component-message-container-in-chat-file-sub-name'>Attachment</span>\n </div>\n <TextButton size='tiny' onClick={() => window.open(item.url, '_blank')} suffixIcon={<ArrowTopRightIcon size={'tiny'} />}>Open</TextButton>\n </div>\n )}\n </Box>\n );\n}\n\nexport default Attachment;", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-3c48ccde\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-3c48ccde\";\n s.textContent = \".site-chat-component {\\n /* SiteChatComponent base styles */\\n}\\n\\n/* ---------- Header styles ---------- */\\n\\n.site-chat-component-header-container {\\n background: var(--my-tickets-chat-widget-panel-header-background-color);\\n padding: 10px;\\n border-top-right-radius: inherit;\\n border-top-left-radius: inherit;\\n}\\n\\n.site-chat-component-header-container .site-chat-component-header-text-section {\\n width: 100%;\\n}\\n\\n.site-chat-component-header-title {\\n font-style: var(--my-tickets-chat-widget-panel-header-title-font-style);\\n margin-bottom: 0 !important;\\n color: var(--my-tickets-chat-widget-panel-header-title-color);\\n}\\n\\n.site-chat-component-header-subtitle {\\n font-style: var(--my-tickets-chat-widget-panel-header-subtitle-font-style);\\n font-weight: normal !important;\\n margin-top: 0 !important;\\n color: var(--my-tickets-chat-widget-panel-header-subtitle-color);\\n}\\n\\n.site-chat-component-header-close-button {\\n cursor: pointer !important;\\n background: none;\\n border: none;\\n padding: 4px;\\n color: var(--my-tickets-chat-widget-panel-header-button-color);\\n font-size: 1.25rem;\\n line-height: 1;\\n border-radius: 4px;\\n transition: opacity 0.15s;\\n}\\n\\n.site-chat-component-header-close-button:hover {\\n opacity: 0.8;\\n}\\n\\n/* ---------- Footer styles ---------- */\\n\\n.site-chat-component-footer-message-input-container {\\n padding: var(--cw-space-md, 16px);\\n background: var(--my-tickets-chat-widget-panel-footer-background-color);\\n font-family: var(--cw-font, sans-serif);\\n border-radius: 0 0 var(--cw-radius-panel, 16px) var(--cw-radius-panel, 16px);\\n}\\n\\n.site-chat-component-footer-attachment-icon-button {\\n width: 20px;\\n height: 20px;\\n}\\n\\n.site-chat-component-footer-my-tickets-chat-widget-send-button {\\n background: var(--my-tickets-chat-widget-panel-footer-button-color);\\n border: 1px solid var(--my-tickets-chat-widget-panel-footer-button-border-color);\\n color: var(--my-tickets-chat-widget-panel-footer-button-text-color);\\n padding: 6px;\\n border-radius: 4px;\\n width: 80px;\\n cursor: pointer;\\n}\\n\\n.site-chat-component-footer-my-tickets-chat-widget-send-button:disabled {\\n opacity: 0.5;\\n cursor: default;\\n}\\n\\n.site-chat-component-footer-file-item-container {\\n display: flex;\\n align-items: center;\\n gap: 8px;\\n padding: 2px 4px;\\n border-radius: var(--wds-input-area-border-radius-default-medium, 6px);\\n background-color: var(--wds-color-surface, var(--wsr-color-surface, #FFFFFF));\\n border: 1px solid var(--wds-input-border-color, var(--wsr-color-B40, #D6E6FE));\\n box-sizing: border-box;\\n}\\n\\n.site-chat-component-footer-file-name {\\n font-family: var(--wds-font-family-default, var(--wsr-font-family, Madefor, \\\"Helvetica Neue\\\", Helvetica, Arial, \\\"\\\\30E1\\\\30A4\\\\30EA\\\\30AA\\\", \\\"meiryo\\\", \\\"\\\\30D2\\\\30E9\\\\30AE\\\\30CE\\\\89D2\\\\30B4 pro w3\\\", \\\"hiragino kaku gothic pro\\\", sans-serif));\\n font-size: var(--wds-font-size-body-small, var(--wsr-text-font-size-small, 14px));\\n font-weight: var(--wds-font-weight-regular, var(--wsr-font-weight-regular, 400));\\n line-height: var(--wds-font-line-height-body-small, var(--wsr-text-line-height-small, 20px));\\n letter-spacing: var(--wds-font-letter-spacing-0, unset);\\n white-space: nowrap;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n max-width: 115px;\\n}\\n\\n.site-chat-component-footer-input-wrapper {\\n padding: 5px;\\n box-sizing: border-box;\\n width: inherit;\\n display: flex;\\n justify-content: center;\\n flex-direction: row;\\n gap: 10px;\\n border-radius: 4px;\\n background: var(--my-tickets-chat-widget-panel-footer-input-background-color);\\n border: 2px solid var(--my-tickets-chat-widget-panel-footer-input-border-color);\\n color: var(--my-tickets-chat-widget-panel-footer-input-text-color);\\n font-size: var(--my-tickets-chat-widget-panel-footer-input-text-size);\\n font-family: 'Arial', sans-serif;\\n}\\n\\n.site-chat-component-footer-suffix {\\n background: inherit;\\n width: max-content;\\n min-height: 100%;\\n max-height: 100%;\\n align-items: center;\\n justify-content: center;\\n display: flex;\\n font-size: inherit;\\n padding: 0px;\\n margin: 0px;\\n font-family: inherit;\\n color: inherit;\\n box-sizing: border-box;\\n}\\n\\n.site-chat-component-footer-chat-input {\\n background: inherit;\\n border: none;\\n font-size: inherit;\\n font-family: inherit;\\n color: inherit;\\n width: inherit;\\n}\\n\\n.site-chat-component-footer-chat-input::placeholder {\\n background: inherit;\\n border: none;\\n font-size: inherit;\\n font-family: inherit;\\n color: inherit;\\n opacity: 0.5;\\n}\\n\\n.site-chat-component-footer-chat-input:focus {\\n outline: none;\\n}\\n\\n/* ---------- Messages styles ---------- */\\n/* Message Container */\\n.site-chat-component-message-container {\\n display: flex !important;\\n flex-direction: column !important;\\n padding: var(--cw-space-md, 16px) !important;\\n background: var(--my-tickets-chat-widget-panel-messages-background-color) !important;\\n flex: 1 !important;\\n min-height: 0;\\n overflow-y: auto !important;\\n}\\n\\n.site-chat-component-message-container-messages-wrapper {\\n display: flex;\\n flex-direction: column;\\n gap: var(--cw-space-sm, 8px);\\n}\\n\\n.site-chat-component-message-container-agent-message-wrapper,\\n.site-chat-component-message-container-user-message-wrapper {\\n display: flex;\\n padding: 10px 14px;\\n border-radius: var(--cw-radius-bubble, 12px);\\n width: max-content;\\n max-width: 80%;\\n font-family: var(--cw-font, sans-serif);\\n}\\n\\n.site-chat-component-message-container-agent-name {\\n color: var(--my-tickets-chat-widget-panel-messages-agent-name-text-color);\\n font-size: var(--my-tickets-chat-widget-panel-messages-agent-name-text-size);\\n font-weight: 500;\\n}\\n\\n.site-chat-component-message-container-user-name {\\n color: var(--my-tickets-chat-widget-panel-messages-user-name-text-color);\\n font-size: var(--my-tickets-chat-widget-panel-messages-user-name-text-size);\\n font-weight: 500;\\n display: var(--my-tickets-chat-widget-panel-messages-user-name-text-visible);\\n}\\n\\n.site-chat-component-message-container-agent-message-avatar {\\n margin-top: 20px;\\n display: var(--my-tickets-chat-widget-panel-messages-agent-icon-visible);\\n}\\n\\n.site-chat-component-message-container-user-message,\\n.site-chat-component-message-container-agent-message {\\n line-height: 1.5;\\n word-wrap: break-word;\\n}\\n\\n.site-chat-component-message-container-agent-message {\\n font-size: var(--my-tickets-chat-widget-panel-messages-agent-text-size);\\n}\\n\\n.site-chat-component-message-container-user-message {\\n font-size: var(--my-tickets-chat-widget-panel-messages-user-text-size);\\n}\\n\\n.site-chat-component-message-container-agent-message-wrapper {\\n justify-content: flex-start;\\n align-self: flex-start;\\n background-color: var(--my-tickets-chat-widget-panel-messages-agent-bubble-color);\\n color: var(--my-tickets-chat-widget-panel-messages-agent-text-color);\\n}\\n\\n.site-chat-component-message-container-user-message-wrapper {\\n justify-content: flex-end;\\n align-self: flex-end;\\n margin-left: auto;\\n background-color: var(--my-tickets-chat-widget-panel-messages-user-bubble-color);\\n color: var(--my-tickets-chat-widget-panel-messages-user-text-color);\\n}\\n\\n.site-chat-component-message-container-agent-name-time-container {\\n gap: 8px;\\n display: flex;\\n align-items: center;\\n font-family: 'Madefor';\\n font-size: 13px;\\n}\\n\\n/* System Messages */\\n\\n.site-chat-component-message-container-system-message {\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n width: 100%;\\n gap: var(--cw-space-sm, 8px);\\n}\\n\\n.site-chat-component-message-container-system-message .dashed {\\n flex: 1;\\n border: none;\\n border-top: 1px dashed var(--my-tickets-chat-widget-panel-messages-system-color);\\n margin: 0;\\n}\\n\\n.site-chat-component-message-container-system-message-message {\\n color: var(--my-tickets-chat-widget-panel-messages-system-color);\\n font-family: var(--cw-font, sans-serif);\\n font-size: var(--my-tickets-chat-widget-panel-messages-system-size);\\n font-weight: 500;\\n white-space: nowrap;\\n}\\n\\n/* Empty and Loading States */\\n\\n.site-chat-component-message-container-empty-state {\\n display: flex;\\n flex: 1;\\n align-items: center;\\n justify-content: center;\\n}\\n\\n.site-chat-component-message-container-empty-state p {\\n font-family: var(--cw-font, sans-serif);\\n font-size: 14px;\\n color: var(--my-tickets-chat-widget-panel-messages-system-color);\\n}\\n\\n.site-chat-component-message-container-loading-state {\\n display: flex;\\n flex: 1;\\n align-items: center;\\n justify-content: center;\\n}\\n\\n.site-chat-component-message-container-loading-state p {\\n font-family: var(--cw-font, sans-serif);\\n font-size: 14px;\\n color: var(--my-tickets-chat-widget-panel-messages-system-color);\\n}\\n\\n.site-chat-component-message-container-in-chat-file-item-container {\\n display: flex;\\n align-items: center;\\n gap: 8px;\\n padding: 4px 8px;\\n border-radius: var(--wds-input-area-border-radius-default-medium, 6px);\\n background-color: var(--wds-color-surface, var(--wsr-color-surface, #FFFFFF));\\n border: 1px solid var(--wds-input-border-color, var(--wsr-color-B40, #D6E6FE));\\n box-sizing: border-box;\\n}\\n\\n.site-chat-component-message-container-in-chat-file-name {\\n font-family: var(--wds-font-family-default, var(--wsr-font-family, Madefor, \\\"Helvetica Neue\\\", Helvetica, Arial, \\\"\\\\30E1\\\\30A4\\\\30EA\\\\30AA\\\", \\\"meiryo\\\", \\\"\\\\30D2\\\\30E9\\\\30AE\\\\30CE\\\\89D2\\\\30B4 pro w3\\\", \\\"hiragino kaku gothic pro\\\", sans-serif));\\n font-size: var(--wds-font-size-body-tiny, var(--wsr-text-font-size-tiny, 10px));\\n font-weight: var(--wds-font-weight-regular, var(--wsr-font-weight-regular, 400));\\n line-height: var(--wds-font-line-height-body-tiny, var(--wsr-text-line-height-tiny, 12px));\\n letter-spacing: var(--wds-font-letter-spacing-0, unset);\\n white-space: nowrap;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n max-width: 150px;\\n color: black;\\n}\\n\\n.site-chat-component-message-container-in-chat-file-sub-name {\\n font-family: var(--wds-font-family-default, var(--wsr-font-family, Madefor, \\\"Helvetica Neue\\\", Helvetica, Arial, \\\"\\\\30E1\\\\30A4\\\\30EA\\\\30AA\\\", \\\"meiryo\\\", \\\"\\\\30D2\\\\30E9\\\\30AE\\\\30CE\\\\89D2\\\\30B4 pro w3\\\", \\\"hiragino kaku gothic pro\\\", sans-serif));\\n font-size: var(--wds-font-size-body-tiny, var(--wsr-text-font-size-tiny, 10px));\\n font-weight: var(--wds-font-weight-regular, var(--wsr-font-weight-regular, 400));\\n line-height: var(--wds-font-line-height-body-tiny, var(--wsr-text-line-height-tiny, 12px));\\n letter-spacing: var(--wds-font-letter-spacing-0, unset);\\n color: var(--wds-color-text-secondary, var(--wsr-color-text-secondary, #6B6B6B));\\n}\\n\\n.site-chat-component-message-container-in-chat-file-icon {\\n fill: black !important;\\n}\\n\\n.site-chat-component-message-container-in-chat-file-names-container {\\n display: flex;\\n flex-direction: column;\\n gap: 0px;\\n}\\n\\n.site-chat-component-message-container-user-message-wrapper-attachment .site-chat-component-message-container-in-chat-file-item-wrapper-box {\\n align-items: flex-end;\\n display: flex;\\n flex-direction: column;\\n}\\n\\n.site-chat-component-message-container-agent-message-wrapper-attachment .site-chat-component-message-container-in-chat-file-item-wrapper-box {\\n align-items: flex-start;\\n display: flex;\\n flex-direction: column;\\n}\\n\\n/* FAB */\\n.site-chat-component-fab {\\n position: fixed;\\n bottom: 24px;\\n right: 24px;\\n gap: 4.5px;\\n cursor: pointer;\\n z-index: 100;\\n user-select: none;\\n border-radius: 99px;\\n padding: 9px 25px;\\n transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n flex-direction: row;\\n\\n font-size: var(--my-tickets-chat-widget-button-text-size) !important;\\n background-color: var(--my-tickets-chat-widget-button-color);\\n border: 1px solid var(--my-tickets-chat-widget-button-border-color);\\n color: var(--my-tickets-chat-widget-button-text-color);\\n font: var(--my-tickets-chat-widget-button-text-font);\\n}\\n\\n.site-chat-component-fab-fab-button-label {\\n margin: 0;\\n padding: 0;\\n line-height: 1;\\n display: inline-flex;\\n align-items: center;\\n margin-top: 2px;\\n}\\n\\n.site-chat-component-fab-fab-button-icon,\\n.site-chat-component-fab-fab-button-text {\\n display: inline-flex;\\n align-items: center;\\n height: 100%;\\n}\\n\\n.site-chat-component-fab-fab-button-icon svg {\\n width: var(--my-tickets-chat-widget-button-icon-size);\\n height: var(--my-tickets-chat-widget-button-icon-size);\\n font-weight: inherit;\\n}\\n\\n/* \u2500\u2500 Design Tokens \u2500\u2500 */\\n:host {\\n --cw-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\\n\\n /* Primary palette */\\n --cw-primary: #3B82F6;\\n --cw-primary-hover: #2563EB;\\n --cw-primary-light: #EFF6FF;\\n --cw-primary-shadow: rgba(59, 130, 246, 0.35);\\n --cw-primary-shadow-hover: rgba(59, 130, 246, 0.5);\\n\\n /* Neutrals */\\n --cw-bg: #F8FAFC;\\n --cw-surface: #FFFFFF;\\n --cw-border: #E2E8F0;\\n\\n /* Text */\\n --cw-text: #1E293B;\\n --cw-text-muted: #64748B;\\n --cw-text-inverse: #FFFFFF;\\n\\n /* Message bubbles */\\n --cw-bubble-user: var(--cw-primary);\\n --cw-bubble-user-text: var(--cw-text-inverse);\\n --cw-bubble-agent: #F1F5F9;\\n --cw-bubble-agent-text: var(--cw-text);\\n\\n /* Radii */\\n --cw-radius-panel: 16px;\\n --cw-radius-bubble: 12px;\\n --cw-radius-pill: 50px;\\n\\n /* Spacing */\\n --cw-space-xs: 4px;\\n --cw-space-sm: 8px;\\n --cw-space-md: 16px;\\n --cw-space-lg: 24px;\\n\\n /* Shadows */\\n --cw-shadow-panel: 0 20px 60px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.05);\\n --cw-shadow-fab: 0 8px 24px var(--cw-primary-shadow);\\n --cw-shadow-fab-hover: 0 12px 32px var(--cw-primary-shadow-hover);\\n}\\n\\n/* \u2500\u2500 Hide toggle \u2500\u2500 */\\n#site-chat-component-chat-toggle {\\n display: none;\\n}\\n\\n/* \u2500\u2500 Panel \u2500\u2500 */\\n.site-chat-component-panel {\\n position: fixed !important;\\n bottom: 60px;\\n right: 30px;\\n width: min(340px, 100vw);\\n max-height: 50vh;\\n max-height: 50dvh;\\n background: var(--cw-surface);\\n border-radius: var(--cw-radius-panel, 16px) !important;\\n box-shadow: var(--cw-shadow-panel);\\n transform: scale(0.85) translateY(16px);\\n transform-origin: bottom right;\\n opacity: 0;\\n pointer-events: none;\\n transition: transform 0.3s cubic-bezier(.175, .885, .32, 1.275), opacity 0.25s ease;\\n z-index: 99;\\n display: flex !important;\\n flex-direction: column !important;\\n min-height: 450px;\\n font-family: var(--cw-font);\\n overflow: hidden;\\n border: 0px solid var(--wst-color-line);\\n box-shadow: 0 2px 6px var(--wst-color-line), 0 0 0 1px var(--wst-color-line);\\n}\\n\\n.site-chat-component-panel.open {\\n transform: scale(1) translateY(0);\\n opacity: 1;\\n pointer-events: all;\\n z-index: 101;\\n bottom: 10px;\\n}\\n\\n/* \u2500\u2500 Mobile: fill screen \u2500\u2500 */\\n@media (max-width: 480px) {\\n .site-chat-component-panel {\\n width: 100vw;\\n height: 100vh;\\n height: 100dvh;\\n min-height: 0;\\n max-height: none;\\n bottom: 0;\\n right: 0;\\n }\\n\\n .site-chat-component-panel.open {\\n top: 0;\\n left: 0;\\n right: 0;\\n bottom: 0;\\n }\\n}\\n\\n/* \u2500\u2500 Small tablets \u2500\u2500 */\\n@media (min-width: 481px) and (max-width: 768px) {\\n .site-chat-component-panel {\\n width: min(380px, calc(100vw - 24px));\\n max-height: 70vh;\\n max-height: 70dvh;\\n }\\n}\\n\\n/* \u2500\u2500 Large screens \u2500\u2500 */\\n@media (min-width: 1200px) {\\n .site-chat-component-panel {\\n width: 350px;\\n max-height: 70vh;\\n max-height: 70dvh;\\n }\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { ChatWidgetProps } from './SiteChatComponentNew.types';\nimport { useSiteChatComponentNew } from './useSiteChatComponentNew';\nimport { buildThemeVars } from './utils';\nimport Header from './Header/Header';\nimport Footer from './Footer/Footer';\nimport { MessageList } from './Messages';\nimport { LoadingState, StartChatState, OfflineState, ChatEndedState } from './States';\nimport './SiteChatComponentNew.css';\n\nexport const SiteChatComponentNew = React.forwardRef<HTMLDivElement, ChatWidgetProps>(({\n title,\n subtitle,\n image,\n theme,\n messages,\n offlineForm,\n defaultOpen = false,\n loading = false,\n chatEnded = false,\n onSend,\n onAttachment,\n onOfflineSubmit,\n onClose,\n}, ref) => {\n const { open, openWidget, closeWidget } = useSiteChatComponentNew(defaultOpen);\n const themeVars = buildThemeVars(theme);\n\n const handleClose = () => {\n closeWidget();\n onClose?.();\n };\n\n /**\n * Derive what to render from data:\n * loading=true \u2192 spinner\n * offlineForm provided \u2192 offline form\n * no messages yet \u2192 Start Chat screen\n * messages present \u2192 conversation (+ optional ended banner)\n */\n const renderBody = () => {\n if (loading) {\n return <LoadingState />;\n }\n\n if (offlineForm) {\n return <OfflineState form={offlineForm} onSubmit={onOfflineSubmit} />;\n }\n\n if (messages.length === 0) {\n return (\n <StartChatState\n image={image}\n title={title}\n description={subtitle}\n onStart={() => onSend('__start_chat__')}\n />\n );\n }\n\n return (\n <>\n <MessageList messages={messages} />\n {chatEnded ? <ChatEndedState /> : <Footer onSend={onSend} onAttachment={onAttachment} />}\n </>\n );\n };\n\n return (\n <div ref={ref} className=\"cw-root\" style={themeVars as React.CSSProperties}>\n {/* Chat panel */}\n {open && (\n <div\n className=\"cw-widget\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={`${title} chat widget`}\n >\n <Header\n image={image}\n title={title}\n subtitle={subtitle}\n onClose={handleClose}\n />\n <div className=\"cw-widget__body\">{renderBody()}</div>\n </div>\n )}\n\n {/* Launcher button \u2014 only visible when the panel is closed */}\n {!open && (\n <button\n className=\"cw-launcher\"\n onClick={openWidget}\n aria-label=\"Open chat\"\n aria-haspopup=\"dialog\"\n type=\"button\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"26\"\n height=\"26\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path d=\"M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z\" />\n </svg>\n </button>\n )}\n </div>\n );\n});\n\nSiteChatComponentNew.displayName = 'SiteChatComponentNew';\n\n\n", "import { useState, useCallback } from 'react';\nimport { UseChatWidgetReturn } from './SiteChatComponentNew.types';\n\nexport function useSiteChatComponentNew(defaultOpen = false): UseChatWidgetReturn {\n const [open, setOpen] = useState(defaultOpen);\n\n const openWidget = useCallback(() => setOpen(true), []);\n const closeWidget = useCallback(() => setOpen(false), []);\n\n return { open, openWidget, closeWidget };\n}\n", "import { ChatTheme } from '../SiteChatComponentNew.types';\n\n// \u2500\u2500\u2500 Fixed layout / typography constants \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n// These are intentionally not themeable \u2014 only colours and border widths change.\nconst FONT_FAMILY =\n \"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif\";\nconst FONT_SIZE = '14px';\nconst SHADOW = '0 4px 24px rgba(0,0,0,0.12)';\nconst WIDTH = '400px';\nconst HEIGHT = '600px';\nconst HEADER_HEIGHT = '64px';\n\n// \u2500\u2500\u2500 Default colour theme \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport const defaultTheme: ChatTheme = {\n primary: '#4f46e5',\n background: '#ffffff',\n surface: '#f9fafb',\n border: '#e5e7eb',\n userBubble: '#4f46e5',\n userText: '#ffffff',\n agentBubble: '#f3f4f6',\n agentText: '#111827',\n systemText: '#6b7280',\n inputBackground: '#ffffff',\n inputBorder: '#d1d5db',\n buttonRadius: 8,\n borderRadius: 12,\n};\n\n/**\n * Merges a partial user theme with the defaults and returns a style object\n * containing CSS custom properties. Layout/font values are always fixed.\n */\nexport function buildThemeVars(\n partial?: Partial<ChatTheme>,\n): Record<string, string> {\n const theme: ChatTheme = { ...defaultTheme, ...partial };\n\n return {\n // Colours\n '--cw-primary': theme.primary,\n '--cw-background': theme.background,\n '--cw-surface': theme.surface,\n '--cw-border': theme.border,\n '--cw-user-bubble': theme.userBubble,\n '--cw-user-text': theme.userText,\n '--cw-agent-bubble': theme.agentBubble,\n '--cw-agent-text': theme.agentText,\n '--cw-system-text': theme.systemText,\n '--cw-input-background': theme.inputBackground,\n '--cw-input-border': theme.inputBorder,\n // Border radii\n '--cw-button-radius': `${theme.buttonRadius}px`,\n '--cw-border-radius': `${theme.borderRadius}px`,\n // Fixed constants \u2014 not exposed as theme props\n '--cw-font-family': FONT_FAMILY,\n '--cw-font-size': FONT_SIZE,\n '--cw-shadow': SHADOW,\n '--cw-width': WIDTH,\n '--cw-height': HEIGHT,\n '--cw-header-height': HEADER_HEIGHT,\n };\n}\n", "import { SystemEventType } from '../SiteChatComponentNew.types';\n\nconst systemEventLabels: Record<SystemEventType, string> = {\n AGENT_JOINED: 'Agent joined',\n AGENT_LEFT: 'Agent left',\n USER_JOINED: 'You joined',\n USER_LEFT: 'You left',\n CHAT_ENDED: 'Chat ended',\n CHAT_REOPENED: 'Chat reopened',\n CHAT_TRANSFERRED: 'Chat transferred',\n WAITING_FOR_AGENT: 'Waiting for an agent',\n};\n\nexport function getSystemLabel(event: string): string {\n return systemEventLabels[event as SystemEventType] ?? event;\n}\n\nexport function isSystemEventType(value: string): value is SystemEventType {\n return value in systemEventLabels;\n}\n", "/**\n * Format a Unix timestamp (ms) into a human-readable time string, e.g. \"2:34 PM\".\n */\nexport function formatTime(timestamp: number): string {\n return new Date(timestamp).toLocaleTimeString([], {\n hour: '2-digit',\n minute: '2-digit',\n });\n}\n\n/**\n * Generate a simple unique id.\n */\nexport function generateId(): string {\n return `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;\n}\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-45eba566\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-45eba566\";\n s.textContent = \".cw-header {\\n display: flex;\\n align-items: center;\\n justify-content: space-between;\\n padding: 0 16px;\\n height: var(--cw-header-height);\\n background-color: var(--cw-primary);\\n color: #ffffff;\\n flex-shrink: 0;\\n border-radius: var(--cw-border-radius) var(--cw-border-radius) 0 0;\\n}\\n\\n.cw-header__identity {\\n display: flex;\\n align-items: center;\\n gap: 12px;\\n min-width: 0;\\n}\\n\\n.cw-header__avatar {\\n width: 40px;\\n height: 40px;\\n border-radius: 50%;\\n object-fit: cover;\\n flex-shrink: 0;\\n border: 2px solid rgba(255, 255, 255, 0.4);\\n}\\n\\n.cw-header__text {\\n display: flex;\\n flex-direction: column;\\n min-width: 0;\\n}\\n\\n.cw-header__title {\\n font-size: 15px;\\n font-weight: 600;\\n white-space: nowrap;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n line-height: 1.3;\\n}\\n\\n.cw-header__subtitle {\\n font-size: 12px;\\n opacity: 0.85;\\n white-space: nowrap;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n line-height: 1.3;\\n}\\n\\n.cw-header__close {\\n background: none;\\n border: none;\\n cursor: pointer;\\n color: #ffffff;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n padding: 6px;\\n border-radius: 50%;\\n flex-shrink: 0;\\n transition: background-color 0.15s ease;\\n}\\n\\n.cw-header__close:hover {\\n background-color: rgba(255, 255, 255, 0.15);\\n}\\n\\n.cw-header__close:focus-visible {\\n outline: 2px solid #ffffff;\\n outline-offset: 2px;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { HeaderProps } from '../SiteChatComponentNew.types';\nimport './Header.css';\n\nconst Header: React.FC<HeaderProps> = ({ image, title, subtitle, onClose }) => {\n return (\n <header className=\"cw-header\" role=\"banner\">\n <div className=\"cw-header__identity\">\n {image && (\n <img\n src={image}\n alt={`${title} avatar`}\n className=\"cw-header__avatar\"\n />\n )}\n <div className=\"cw-header__text\">\n <span className=\"cw-header__title\">{title}</span>\n {subtitle && (\n <span className=\"cw-header__subtitle\">{subtitle}</span>\n )}\n </div>\n </div>\n <button\n className=\"cw-header__close\"\n onClick={onClose}\n aria-label=\"Close chat\"\n type=\"button\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </button>\n </header>\n );\n};\n\nexport default Header;\n", "import React, { useRef, useState, useCallback } from 'react';\nimport { FooterProps } from '../SiteChatComponentNew.types';\nimport './Footer.css';\n\nconst Footer: React.FC<FooterProps> = ({ onSend, onAttachment, disabled }) => {\n const [text, setText] = useState('');\n const fileInputRef = useRef<HTMLInputElement | null>(null);\n const textareaRef = useRef<HTMLTextAreaElement | null>(null);\n\n const isEmpty = text.trim().length === 0;\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n if (!isEmpty && !disabled) {\n onSend(text.trim());\n setText('');\n // Reset textarea height\n if (textareaRef.current) {\n textareaRef.current.style.height = 'auto';\n }\n }\n }\n },\n [isEmpty, disabled, onSend, text],\n );\n\n const handleSend = useCallback(() => {\n if (!isEmpty && !disabled) {\n onSend(text.trim());\n setText('');\n if (textareaRef.current) {\n textareaRef.current.style.height = 'auto';\n textareaRef.current.focus();\n }\n }\n }, [isEmpty, disabled, onSend, text]);\n\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n setText(e.target.value);\n // Auto-grow textarea up to ~120px\n const el = e.target;\n el.style.height = 'auto';\n el.style.height = `${Math.min(el.scrollHeight, 120)}px`;\n },\n [],\n );\n\n const handleAttachmentClick = useCallback(() => {\n fileInputRef.current?.click();\n }, []);\n\n const handleFileChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const file = e.target.files?.[0];\n if (file) {\n onAttachment(file);\n }\n // Reset the file input so same file can be re-selected\n if (fileInputRef.current) {\n fileInputRef.current.value = '';\n }\n },\n [onAttachment],\n );\n\n return (\n <footer className=\"cw-footer\" role=\"contentinfo\">\n <button\n className=\"cw-footer__attach-btn\"\n onClick={handleAttachmentClick}\n aria-label=\"Attach file\"\n type=\"button\"\n disabled={disabled}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48\" />\n </svg>\n </button>\n\n <textarea\n ref={textareaRef}\n className=\"cw-footer__input\"\n value={text}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n placeholder=\"Type a message\u2026\"\n aria-label=\"Message input\"\n rows={1}\n disabled={disabled}\n />\n\n <button\n className={`cw-footer__send-btn${isEmpty || disabled ? ' cw-footer__send-btn--disabled' : ''}`}\n onClick={handleSend}\n aria-label=\"Send message\"\n type=\"button\"\n disabled={isEmpty || disabled}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path d=\"M2.01 21L23 12 2.01 3 2 10l15 2-15 2z\" />\n </svg>\n </button>\n\n {/* Hidden file input */}\n <input\n ref={fileInputRef}\n type=\"file\"\n className=\"cw-footer__file-input\"\n onChange={handleFileChange}\n aria-hidden=\"true\"\n tabIndex={-1}\n />\n </footer>\n );\n};\n\nexport default Footer;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-ebcf221d\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-ebcf221d\";\n s.textContent = \".cw-footer {\\n display: flex;\\n align-items: flex-end;\\n gap: 8px;\\n padding: 10px 12px;\\n background-color: var(--cw-background);\\n border-top: 1px solid var(--cw-border);\\n flex-shrink: 0;\\n}\\n\\n.cw-footer__input {\\n flex: 1;\\n resize: none;\\n border: 1px solid var(--cw-input-border);\\n border-radius: var(--cw-button-radius);\\n background-color: var(--cw-input-background);\\n font-family: var(--cw-font-family);\\n font-size: var(--cw-font-size);\\n color: inherit;\\n padding: 8px 12px;\\n line-height: 1.5;\\n min-height: 38px;\\n max-height: 120px;\\n overflow-y: auto;\\n transition: border-color 0.15s ease;\\n}\\n\\n.cw-footer__input:focus {\\n outline: none;\\n border-color: var(--cw-primary);\\n box-shadow: 0 0 0 2px color-mix(in srgb, var(--cw-primary) 20%, transparent);\\n}\\n\\n.cw-footer__input:disabled {\\n opacity: 0.5;\\n cursor: not-allowed;\\n}\\n\\n.cw-footer__attach-btn,\\n.cw-footer__send-btn {\\n background: none;\\n border: none;\\n cursor: pointer;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n padding: 8px;\\n border-radius: 50%;\\n flex-shrink: 0;\\n transition: background-color 0.15s ease, color 0.15s ease;\\n color: var(--cw-primary);\\n margin-bottom: 1px;\\n}\\n\\n.cw-footer__attach-btn:hover,\\n.cw-footer__send-btn:not(.cw-footer__send-btn--disabled):hover {\\n background-color: color-mix(in srgb, var(--cw-primary) 10%, transparent);\\n}\\n\\n.cw-footer__attach-btn:focus-visible,\\n.cw-footer__send-btn:focus-visible {\\n outline: 2px solid var(--cw-primary);\\n outline-offset: 2px;\\n}\\n\\n.cw-footer__attach-btn:disabled {\\n opacity: 0.4;\\n cursor: not-allowed;\\n}\\n\\n.cw-footer__send-btn--disabled {\\n opacity: 0.35;\\n cursor: not-allowed;\\n}\\n\\n.cw-footer__file-input {\\n display: none;\\n}\\n\";\n document.head.appendChild(s);\n}", "import { useEffect, useRef, useState } from 'react';\n\n/**\n * Attaches a ref to a scrollable container. Automatically scrolls to the\n * bottom when new content is added, unless the user has manually scrolled up.\n */\nexport function useAutoScroll<T extends HTMLElement>(\n dependency: unknown,\n): React.MutableRefObject<T | null> {\n const ref = useRef<T | null>(null);\n const userScrolledUp = useRef(false);\n\n useEffect(() => {\n const el = ref.current;\n if (!el) return;\n\n const handleScroll = () => {\n const atBottom =\n el.scrollHeight - el.scrollTop - el.clientHeight < 64;\n userScrolledUp.current = !atBottom;\n };\n\n el.addEventListener('scroll', handleScroll, { passive: true });\n return () => el.removeEventListener('scroll', handleScroll);\n }, []);\n\n useEffect(() => {\n const el = ref.current;\n if (!el || userScrolledUp.current) return;\n\n el.scrollTo({ top: el.scrollHeight, behavior: 'smooth' });\n }, [dependency]);\n\n return ref;\n}\n\n/**\n * Expose a way for the consumer to force-scroll to bottom (e.g. when\n * the user clicks a \"scroll to bottom\" button).\n */\nexport function useAutoScrollWithControl<T extends HTMLElement>(\n dependency: unknown,\n): {\n ref: React.MutableRefObject<T | null>;\n scrollToBottom: () => void;\n isScrolledUp: boolean;\n} {\n const ref = useRef<T | null>(null);\n const userScrolledUp = useRef(false);\n const [isScrolledUp, setIsScrolledUp] = useState(false);\n\n useEffect(() => {\n const el = ref.current;\n if (!el) return;\n\n const handleScroll = () => {\n const atBottom =\n el.scrollHeight - el.scrollTop - el.clientHeight < 64;\n userScrolledUp.current = !atBottom;\n setIsScrolledUp(!atBottom);\n };\n\n el.addEventListener('scroll', handleScroll, { passive: true });\n return () => el.removeEventListener('scroll', handleScroll);\n }, []);\n\n useEffect(() => {\n const el = ref.current;\n if (!el || userScrolledUp.current) return;\n el.scrollTo({ top: el.scrollHeight, behavior: 'smooth' });\n }, [dependency]);\n\n const scrollToBottom = () => {\n const el = ref.current;\n if (!el) return;\n userScrolledUp.current = false;\n setIsScrolledUp(false);\n el.scrollTo({ top: el.scrollHeight, behavior: 'smooth' });\n };\n\n return { ref, scrollToBottom, isScrolledUp };\n}\n", "import { useState, useCallback } from 'react';\nimport { OfflineField, OfflineFormSchema } from '../SiteChatComponentNew.types';\n\ntype FieldValues = Record<string, unknown>;\ntype FieldErrors = Record<string, string>;\n\nfunction validateField(field: OfflineField, value: unknown): string {\n if (field.required) {\n if (field.type === 'checkbox' && !value) {\n return `${field.label} is required.`;\n }\n if (\n field.type !== 'checkbox' &&\n (value === undefined || value === null || String(value).trim() === '')\n ) {\n return `${field.label} is required.`;\n }\n }\n\n if (field.type === 'email') {\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n if (value && !emailRegex.test(String(value))) {\n return 'Please enter a valid email address.';\n }\n }\n\n if (field.type === 'phone') {\n const phoneRegex = /^\\+?[\\d\\s\\-().]{7,20}$/;\n if (value && !phoneRegex.test(String(value))) {\n return 'Please enter a valid phone number.';\n }\n }\n\n return '';\n}\n\nexport function useOfflineForm(schema: OfflineFormSchema) {\n const initialValues: FieldValues = {};\n for (const field of schema.fields) {\n initialValues[field.id] = field.type === 'checkbox' ? false : '';\n }\n\n const [values, setValues] = useState<FieldValues>(initialValues);\n const [errors, setErrors] = useState<FieldErrors>({});\n const [submitted, setSubmitted] = useState(false);\n\n const setValue = useCallback(\n (id: string, value: unknown) => {\n setValues((prev) => ({ ...prev, [id]: value }));\n\n if (submitted) {\n const field = schema.fields.find((f) => f.id === id);\n if (field) {\n const error = validateField(field, value);\n setErrors((prev) => ({ ...prev, [id]: error }));\n }\n }\n },\n [schema.fields, submitted],\n );\n\n const validate = useCallback((): boolean => {\n const newErrors: FieldErrors = {};\n let valid = true;\n\n for (const field of schema.fields) {\n const error = validateField(field, values[field.id]);\n newErrors[field.id] = error;\n if (error) valid = false;\n }\n\n setErrors(newErrors);\n return valid;\n }, [schema.fields, values]);\n\n const handleSubmit = useCallback(\n (onSubmit: (values: FieldValues) => void) => {\n setSubmitted(true);\n if (validate()) {\n onSubmit(values);\n }\n },\n [validate, values],\n );\n\n const reset = useCallback(() => {\n setValues(initialValues);\n setErrors({});\n setSubmitted(false);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return { values, errors, setValue, handleSubmit, reset };\n}\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-aed321e0\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-aed321e0\";\n s.textContent = \".cw-user-message {\\n display: flex;\\n flex-direction: column;\\n align-items: flex-end;\\n max-width: 75%;\\n align-self: flex-end;\\n gap: 3px;\\n}\\n\\n.cw-user-message__bubble {\\n background-color: var(--cw-user-bubble);\\n color: var(--cw-user-text);\\n padding: 10px 14px;\\n border-radius: 18px 18px 4px 18px;\\n font-size: var(--cw-font-size);\\n line-height: 1.5;\\n word-break: break-word;\\n white-space: pre-wrap;\\n}\\n\\n.cw-user-message__time {\\n font-size: 11px;\\n color: var(--cw-system-text);\\n padding-right: 2px;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { MessageProps } from '../SiteChatComponentNew.types';\nimport { formatTime } from '../utils';\nimport './UserMessage.css';\n\ninterface UserMessageProps {\n message: MessageProps;\n}\n\nconst UserMessage: React.FC<UserMessageProps> = ({ message }) => {\n return (\n <div className=\"cw-user-message\" role=\"listitem\" aria-label=\"Your message\">\n <div className=\"cw-user-message__bubble\">{message.message}</div>\n {message.timestamp !== undefined && (\n <span className=\"cw-user-message__time\">\n {formatTime(message.timestamp)}\n </span>\n )}\n </div>\n );\n};\n\nexport default UserMessage;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-ce14fbec\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-ce14fbec\";\n s.textContent = \".cw-avatar {\\n border-radius: 50%;\\n flex-shrink: 0;\\n display: inline-flex;\\n align-items: center;\\n justify-content: center;\\n}\\n\\n.cw-avatar--image {\\n object-fit: cover;\\n}\\n\\n.cw-avatar--initials {\\n background-color: var(--cw-primary);\\n color: #ffffff;\\n font-weight: 600;\\n user-select: none;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport './Avatar.css';\n\ninterface AvatarProps {\n src?: string;\n name?: string;\n size?: number;\n}\n\nfunction getInitials(name: string): string {\n return name\n .split(' ')\n .slice(0, 2)\n .map((w) => w[0])\n .join('')\n .toUpperCase();\n}\n\nconst Avatar: React.FC<AvatarProps> = ({ src, name, size = 32 }) => {\n const style = {\n width: `${size}px`,\n height: `${size}px`,\n fontSize: `${Math.round(size * 0.38)}px`,\n };\n\n if (src) {\n return (\n <img\n src={src}\n alt={name ? `${name} avatar` : 'Agent avatar'}\n className=\"cw-avatar cw-avatar--image\"\n style={style}\n />\n );\n }\n\n return (\n <span\n className=\"cw-avatar cw-avatar--initials\"\n aria-label={name ? `${name} avatar` : 'Agent avatar'}\n style={style}\n >\n {name ? getInitials(name) : 'A'}\n </span>\n );\n};\n\nexport default Avatar;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-2aa106ea\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-2aa106ea\";\n s.textContent = \".cw-button {\\n display: inline-flex;\\n align-items: center;\\n justify-content: center;\\n gap: 8px;\\n padding: 10px 20px;\\n border: none;\\n border-radius: var(--cw-button-radius);\\n font-family: var(--cw-font-family);\\n font-size: var(--cw-font-size);\\n font-weight: 600;\\n cursor: pointer;\\n transition: opacity 0.15s ease, transform 0.1s ease;\\n white-space: nowrap;\\n}\\n\\n.cw-button:focus-visible {\\n outline: 2px solid var(--cw-primary);\\n outline-offset: 3px;\\n}\\n\\n.cw-button:active:not(:disabled) {\\n transform: scale(0.98);\\n}\\n\\n.cw-button:disabled {\\n opacity: 0.45;\\n cursor: not-allowed;\\n}\\n\\n.cw-button--primary {\\n background-color: var(--cw-primary);\\n color: #ffffff;\\n}\\n\\n.cw-button--primary:hover:not(:disabled) {\\n opacity: 0.88;\\n}\\n\\n.cw-button--secondary {\\n background-color: var(--cw-surface);\\n color: var(--cw-primary);\\n border: 1px solid var(--cw-border);\\n}\\n\\n.cw-button--secondary:hover:not(:disabled) {\\n background-color: var(--cw-border);\\n}\\n\\n.cw-button--full {\\n width: 100%;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport './Button.css';\n\ninterface ButtonProps {\n children: React.ReactNode;\n onClick?: () => void;\n variant?: 'primary' | 'secondary';\n disabled?: boolean;\n type?: 'button' | 'submit' | 'reset';\n fullWidth?: boolean;\n ariaLabel?: string;\n}\n\nconst Button: React.FC<ButtonProps> = ({\n children,\n onClick,\n variant = 'primary',\n disabled = false,\n type = 'button',\n fullWidth = false,\n ariaLabel,\n}) => {\n return (\n <button\n className={`cw-button cw-button--${variant}${fullWidth ? ' cw-button--full' : ''}`}\n onClick={onClick}\n disabled={disabled}\n type={type}\n aria-label={ariaLabel}\n >\n {children}\n </button>\n );\n};\n\nexport default Button;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-5df522b1\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-5df522b1\";\n s.textContent = \".cw-agent-message {\\n display: flex;\\n align-items: flex-end;\\n gap: 8px;\\n max-width: 75%;\\n align-self: flex-start;\\n}\\n\\n.cw-agent-message__content {\\n display: flex;\\n flex-direction: column;\\n gap: 3px;\\n}\\n\\n.cw-agent-message__name {\\n font-size: 11px;\\n font-weight: 600;\\n color: var(--cw-system-text);\\n padding-left: 2px;\\n}\\n\\n.cw-agent-message__bubble {\\n background-color: var(--cw-agent-bubble);\\n color: var(--cw-agent-text);\\n padding: 10px 14px;\\n border-radius: 18px 18px 18px 4px;\\n font-size: var(--cw-font-size);\\n line-height: 1.5;\\n word-break: break-word;\\n white-space: pre-wrap;\\n}\\n\\n.cw-agent-message__time {\\n font-size: 11px;\\n color: var(--cw-system-text);\\n padding-left: 2px;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { MessageProps } from '../SiteChatComponentNew.types';\nimport { formatTime } from '../utils';\nimport { Avatar } from '../Shared';\nimport './AgentMessage.css';\n\ninterface AgentMessageProps {\n message: MessageProps;\n}\n\nconst AgentMessage: React.FC<AgentMessageProps> = ({ message }) => {\n return (\n <div\n className=\"cw-agent-message\"\n role=\"listitem\"\n aria-label={`Message from ${message.senderName ?? 'Agent'}`}\n >\n <Avatar name={message.senderName} size={32} />\n <div className=\"cw-agent-message__content\">\n {message.senderName && (\n <span className=\"cw-agent-message__name\">{message.senderName}</span>\n )}\n <div className=\"cw-agent-message__bubble\">{message.message}</div>\n {message.timestamp !== undefined && (\n <span className=\"cw-agent-message__time\">\n {formatTime(message.timestamp)}\n </span>\n )}\n </div>\n </div>\n );\n};\n\nexport default AgentMessage;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-464a3601\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-464a3601\";\n s.textContent = \".cw-system-message {\\n display: flex;\\n align-items: center;\\n gap: 10px;\\n align-self: stretch;\\n padding: 4px 8px;\\n}\\n\\n.cw-system-message__line {\\n flex: 1;\\n border-top: 1px dashed var(--cw-border);\\n}\\n\\n.cw-system-message__text {\\n font-size: 11px;\\n color: var(--cw-system-text);\\n white-space: nowrap;\\n flex-shrink: 0;\\n font-style: italic;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { MessageProps } from '../SiteChatComponentNew.types';\nimport { getSystemLabel } from '../utils';\nimport './SystemMessage.css';\n\ninterface SystemMessageProps {\n message: MessageProps;\n}\n\nconst SystemMessage: React.FC<SystemMessageProps> = ({ message }) => {\n const label = message.message\n ? getSystemLabel(message.message)\n : message.message ?? '';\n\n return (\n <div\n className=\"cw-system-message\"\n role=\"listitem\"\n aria-label={`System notification: ${label}`}\n >\n <span className=\"cw-system-message__line\" aria-hidden=\"true\" />\n <span className=\"cw-system-message__text\">{label}</span>\n <span className=\"cw-system-message__line\" aria-hidden=\"true\" />\n </div>\n );\n};\n\nexport default SystemMessage;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-dd846dee\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-dd846dee\";\n s.textContent = \".cw-attachment-message {\\n display: flex;\\n flex-direction: column;\\n gap: 3px;\\n align-self: flex-start;\\n max-width: 80%;\\n}\\n\\n.cw-attachment-message--user {\\n align-self: flex-end;\\n align-items: flex-end;\\n}\\n\\n.cw-attachment-message__card {\\n display: flex;\\n align-items: center;\\n gap: 10px;\\n background-color: var(--cw-agent-bubble);\\n border: 1px solid var(--cw-border);\\n border-radius: 12px;\\n padding: 10px 14px;\\n}\\n\\n.cw-attachment-message--user .cw-attachment-message__card {\\n background-color: var(--cw-user-bubble);\\n border-color: transparent;\\n color: var(--cw-user-text);\\n}\\n\\n.cw-attachment-message__icon {\\n flex-shrink: 0;\\n opacity: 0.75;\\n display: flex;\\n align-items: center;\\n}\\n\\n.cw-attachment-message__info {\\n display: flex;\\n flex-direction: column;\\n min-width: 0;\\n flex: 1;\\n}\\n\\n.cw-attachment-message__name {\\n font-size: 13px;\\n font-weight: 600;\\n white-space: nowrap;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n}\\n\\n.cw-attachment-message__label {\\n font-size: 11px;\\n opacity: 0.65;\\n}\\n\\n.cw-attachment-message__open-btn {\\n background-color: var(--cw-primary);\\n color: #ffffff;\\n border: none;\\n border-radius: 6px;\\n padding: 5px 12px;\\n font-family: var(--cw-font-family);\\n font-size: 12px;\\n font-weight: 600;\\n cursor: pointer;\\n flex-shrink: 0;\\n transition: opacity 0.15s ease;\\n}\\n\\n.cw-attachment-message--user .cw-attachment-message__open-btn {\\n background-color: rgba(255, 255, 255, 0.25);\\n color: #ffffff;\\n}\\n\\n.cw-attachment-message__open-btn:hover {\\n opacity: 0.85;\\n}\\n\\n.cw-attachment-message__open-btn:focus-visible {\\n outline: 2px solid var(--cw-primary);\\n outline-offset: 2px;\\n}\\n\\n.cw-attachment-message__time {\\n font-size: 11px;\\n color: var(--cw-system-text);\\n padding-left: 2px;\\n}\\n\\n.cw-attachment-message__time--right {\\n padding-left: 0;\\n padding-right: 2px;\\n align-self: flex-end;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { MessageProps } from '../SiteChatComponentNew.types';\nimport { formatTime } from '../utils';\nimport './AttachmentMessage.css';\n\ninterface AttachmentMessageProps {\n message: MessageProps;\n}\n\nconst AttachmentMessage: React.FC<AttachmentMessageProps> = ({ message }) => {\n // Support both `item` (new) and `attachment` (legacy) field names\n const attachment = message.item ?? message.attachment;\n if (!attachment) return null;\n\n const handleOpen = () => {\n window.open(attachment.url, '_blank', 'noopener,noreferrer');\n };\n\n return (\n <div\n className={`cw-attachment-message${message.senderType === 'user' ? ' cw-attachment-message--user' : ''}`}\n role=\"listitem\"\n aria-label={`Attachment: ${attachment.name}`}\n >\n <div className=\"cw-attachment-message__card\">\n <div className=\"cw-attachment-message__icon\" aria-hidden=\"true\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z\" />\n <polyline points=\"14 2 14 8 20 8\" />\n </svg>\n </div>\n <div className=\"cw-attachment-message__info\">\n <span className=\"cw-attachment-message__name\">{attachment.name}</span>\n <span className=\"cw-attachment-message__label\">Attachment</span>\n </div>\n <button\n className=\"cw-attachment-message__open-btn\"\n onClick={handleOpen}\n aria-label={`Open attachment ${attachment.name}`}\n type=\"button\"\n >\n Open\n </button>\n </div>\n {message.timestamp !== undefined && (\n <span\n className={`cw-attachment-message__time${message.senderType === 'user' ? ' cw-attachment-message__time--right' : ''}`}\n >\n {formatTime(message.timestamp)}\n </span>\n )}\n </div>\n );\n};\n\nexport default AttachmentMessage;\n", "import React from 'react';\nimport { MessageProps } from '../SiteChatComponentNew.types';\nimport UserMessage from './UserMessage';\nimport AgentMessage from './AgentMessage';\nimport SystemMessage from './SystemMessage';\nimport AttachmentMessage from './AttachmentMessage';\n\ninterface MessageRendererProps {\n message: MessageProps;\n}\n\nconst MessageRenderer: React.FC<MessageRendererProps> = ({ message }) => {\n if (message.messageType === 'ATTACHMENT') {\n return <AttachmentMessage message={message} />;\n }\n\n switch (message.senderType) {\n case 'user':\n return <UserMessage message={message} />;\n case 'agent':\n return <AgentMessage message={message} />;\n case 'system':\n return <SystemMessage message={message} />;\n default:\n return null;\n }\n};\n\nexport default MessageRenderer;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-15ae1a6b\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-15ae1a6b\";\n s.textContent = \".cw-message-list {\\n flex: 1;\\n display: flex;\\n flex-direction: column;\\n gap: 10px;\\n overflow-y: auto;\\n padding: 16px;\\n background-color: var(--cw-background);\\n scroll-behavior: smooth;\\n}\\n\\n/* Scrollbar styling */\\n.cw-message-list::-webkit-scrollbar {\\n width: 5px;\\n}\\n\\n.cw-message-list::-webkit-scrollbar-track {\\n background: transparent;\\n}\\n\\n.cw-message-list::-webkit-scrollbar-thumb {\\n background-color: var(--cw-border);\\n border-radius: 10px;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { MessageProps } from '../SiteChatComponentNew.types';\nimport { useAutoScroll } from '../hooks';\nimport MessageRenderer from './MessageRenderer';\nimport './MessageList.css';\n\ninterface MessageListProps {\n messages: MessageProps[];\n}\n\nconst MessageList: React.FC<MessageListProps> = ({ messages }) => {\n const scrollRef = useAutoScroll<HTMLDivElement>(messages);\n\n return (\n <div\n ref={scrollRef}\n className=\"cw-message-list\"\n role=\"list\"\n aria-label=\"Chat messages\"\n aria-live=\"polite\"\n aria-relevant=\"additions\"\n >\n {messages.map((msg, index) => (\n <MessageRenderer\n key={msg._id ?? `${msg.timestamp ?? index}-${index}`}\n message={msg}\n />\n ))}\n {/* TypingIndicator removed \u2014 no longer part of the public API */}\n </div>\n );\n};\n\nexport default MessageList;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-4b0ca05b\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-4b0ca05b\";\n s.textContent = \"@keyframes cw-bounce {\\n 0%, 60%, 100% {\\n transform: translateY(0);\\n }\\n 30% {\\n transform: translateY(-6px);\\n }\\n}\\n\\n.cw-typing-indicator {\\n align-self: flex-start;\\n}\\n\\n.cw-typing-indicator__bubble {\\n display: inline-flex;\\n align-items: center;\\n gap: 4px;\\n background-color: var(--cw-agent-bubble);\\n border-radius: 18px 18px 18px 4px;\\n padding: 10px 14px;\\n}\\n\\n.cw-typing-indicator__dot {\\n display: block;\\n width: 7px;\\n height: 7px;\\n border-radius: 50%;\\n background-color: var(--cw-system-text);\\n animation: cw-bounce 1.2s infinite ease-in-out;\\n}\\n\\n.cw-typing-indicator__dot:nth-child(2) {\\n animation-delay: 0.2s;\\n}\\n\\n.cw-typing-indicator__dot:nth-child(3) {\\n animation-delay: 0.4s;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport './TypingIndicator.css';\n\nconst TypingIndicator: React.FC = () => {\n return (\n <div\n className=\"cw-typing-indicator\"\n role=\"status\"\n aria-label=\"Agent is typing\"\n >\n <div className=\"cw-typing-indicator__bubble\">\n <span className=\"cw-typing-indicator__dot\" />\n <span className=\"cw-typing-indicator__dot\" />\n <span className=\"cw-typing-indicator__dot\" />\n </div>\n </div>\n );\n};\n\nexport default TypingIndicator;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-7a5a4f05\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-7a5a4f05\";\n s.textContent = \"@keyframes cw-spin {\\n to {\\n transform: rotate(360deg);\\n }\\n}\\n\\n.cw-loading-state {\\n flex: 1;\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n justify-content: center;\\n padding: 32px;\\n background-color: var(--cw-background);\\n text-align: center;\\n gap: 12px;\\n}\\n\\n.cw-loading-state__spinner {\\n width: 48px;\\n height: 48px;\\n}\\n\\n.cw-loading-state__spinner-ring {\\n width: 48px;\\n height: 48px;\\n border-radius: 50%;\\n border: 3px solid var(--cw-border);\\n border-top-color: var(--cw-primary);\\n animation: cw-spin 0.8s linear infinite;\\n}\\n\\n.cw-loading-state__title {\\n font-size: 16px;\\n font-weight: 600;\\n color: var(--cw-agent-text);\\n margin: 0;\\n}\\n\\n.cw-loading-state__subtitle {\\n font-size: 13px;\\n color: var(--cw-system-text);\\n margin: 0;\\n max-width: 240px;\\n line-height: 1.5;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport './LoadingState.css';\n\nconst LoadingState: React.FC = () => {\n return (\n <div\n className=\"cw-loading-state\"\n role=\"status\"\n aria-label=\"Connecting to chat\"\n >\n <div className=\"cw-loading-state__spinner\" aria-hidden=\"true\">\n <div className=\"cw-loading-state__spinner-ring\" />\n </div>\n <p className=\"cw-loading-state__title\">Connecting\u2026</p>\n <p className=\"cw-loading-state__subtitle\">\n Please wait while we connect you to an available agent.\n </p>\n </div>\n );\n};\n\nexport default LoadingState;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-3e05ef30\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-3e05ef30\";\n s.textContent = \".cw-start-chat-state {\\n flex: 1;\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n justify-content: center;\\n padding: 32px 24px;\\n background-color: var(--cw-background);\\n text-align: center;\\n gap: 14px;\\n}\\n\\n.cw-start-chat-state__image {\\n width: 80px;\\n height: 80px;\\n object-fit: contain;\\n border-radius: 50%;\\n margin-bottom: 4px;\\n}\\n\\n.cw-start-chat-state__title {\\n font-size: 20px;\\n font-weight: 700;\\n color: var(--cw-agent-text);\\n margin: 0;\\n}\\n\\n.cw-start-chat-state__description {\\n font-size: 14px;\\n color: var(--cw-system-text);\\n margin: 0;\\n max-width: 260px;\\n line-height: 1.6;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { Button } from '../Shared';\nimport './StartChatState.css';\n\ninterface StartChatStateProps {\n image?: string;\n title: string;\n description?: string;\n onStart: () => void;\n}\n\nconst StartChatState: React.FC<StartChatStateProps> = ({\n image,\n title,\n description,\n onStart,\n}) => {\n return (\n <div\n className=\"cw-start-chat-state\"\n role=\"main\"\n aria-label=\"Start a chat\"\n >\n {image && (\n <img\n src={image}\n alt=\"Support illustration\"\n className=\"cw-start-chat-state__image\"\n />\n )}\n <h2 className=\"cw-start-chat-state__title\">{title}</h2>\n {description && (\n <p className=\"cw-start-chat-state__description\">{description}</p>\n )}\n <Button onClick={onStart} ariaLabel=\"Start chat\">\n Start Chat\n </Button>\n </div>\n );\n};\n\nexport default StartChatState;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-d9ff3956\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-d9ff3956\";\n s.textContent = \".cw-offline-form {\\n display: flex;\\n flex-direction: column;\\n gap: 14px;\\n}\\n\\n.cw-offline-form__title {\\n font-size: 15px;\\n font-weight: 600;\\n color: var(--cw-agent-text);\\n margin: 0 0 4px;\\n}\\n\\n/* Field wrapper */\\n.cw-offline-form__field {\\n display: flex;\\n flex-direction: column;\\n gap: 5px;\\n}\\n\\n.cw-offline-form__field--checkbox {\\n gap: 4px;\\n}\\n\\n/* Label */\\n.cw-offline-form__label {\\n font-size: 13px;\\n font-weight: 500;\\n color: var(--cw-agent-text);\\n}\\n\\n.cw-offline-form__required {\\n color: #ef4444;\\n}\\n\\n/* Text input */\\n.cw-offline-form__input {\\n width: 100%;\\n padding: 8px 12px;\\n border: 1px solid var(--cw-input-border);\\n border-radius: var(--cw-button-radius);\\n background-color: var(--cw-input-background);\\n font-family: var(--cw-font-family);\\n font-size: var(--cw-font-size);\\n color: inherit;\\n box-sizing: border-box;\\n transition: border-color 0.15s ease;\\n}\\n\\n.cw-offline-form__input:focus {\\n outline: none;\\n border-color: var(--cw-primary);\\n box-shadow: 0 0 0 2px color-mix(in srgb, var(--cw-primary) 20%, transparent);\\n}\\n\\n.cw-offline-form__input--error {\\n border-color: #ef4444;\\n}\\n\\n/* Textarea */\\n.cw-offline-form__textarea {\\n width: 100%;\\n padding: 8px 12px;\\n border: 1px solid var(--cw-input-border);\\n border-radius: var(--cw-button-radius);\\n background-color: var(--cw-input-background);\\n font-family: var(--cw-font-family);\\n font-size: var(--cw-font-size);\\n color: inherit;\\n resize: vertical;\\n box-sizing: border-box;\\n transition: border-color 0.15s ease;\\n}\\n\\n.cw-offline-form__textarea:focus {\\n outline: none;\\n border-color: var(--cw-primary);\\n box-shadow: 0 0 0 2px color-mix(in srgb, var(--cw-primary) 20%, transparent);\\n}\\n\\n.cw-offline-form__textarea--error {\\n border-color: #ef4444;\\n}\\n\\n/* Select */\\n.cw-offline-form__select {\\n width: 100%;\\n padding: 8px 12px;\\n border: 1px solid var(--cw-input-border);\\n border-radius: var(--cw-button-radius);\\n background-color: var(--cw-input-background);\\n font-family: var(--cw-font-family);\\n font-size: var(--cw-font-size);\\n color: inherit;\\n box-sizing: border-box;\\n appearance: none;\\n background-image: url(\\\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E\\\");\\n background-repeat: no-repeat;\\n background-position: right 12px center;\\n padding-right: 32px;\\n cursor: pointer;\\n transition: border-color 0.15s ease;\\n}\\n\\n.cw-offline-form__select:focus {\\n outline: none;\\n border-color: var(--cw-primary);\\n box-shadow: 0 0 0 2px color-mix(in srgb, var(--cw-primary) 20%, transparent);\\n}\\n\\n.cw-offline-form__select--error {\\n border-color: #ef4444;\\n}\\n\\n/* Checkbox */\\n.cw-offline-form__checkbox-label {\\n display: flex;\\n align-items: flex-start;\\n gap: 8px;\\n cursor: pointer;\\n font-size: 13px;\\n color: var(--cw-agent-text);\\n}\\n\\n.cw-offline-form__checkbox {\\n width: 16px;\\n height: 16px;\\n accent-color: var(--cw-primary);\\n flex-shrink: 0;\\n margin-top: 1px;\\n cursor: pointer;\\n}\\n\\n.cw-offline-form__checkbox:focus-visible {\\n outline: 2px solid var(--cw-primary);\\n outline-offset: 2px;\\n}\\n\\n.cw-offline-form__checkbox-text {\\n line-height: 1.4;\\n}\\n\\n/* Error message */\\n.cw-offline-form__error {\\n font-size: 12px;\\n color: #ef4444;\\n font-weight: 500;\\n}\\n\\n/* Actions */\\n.cw-offline-form__actions {\\n margin-top: 4px;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { OfflineField, OfflineFormSchema } from '../SiteChatComponentNew.types';\nimport { useOfflineForm } from '../hooks';\nimport { Button } from '../Shared';\nimport './OfflineForm.css';\n\ninterface OfflineFormProps {\n schema: OfflineFormSchema;\n onSubmit: (values: Record<string, unknown>) => void;\n}\n\ninterface FieldRendererProps {\n field: OfflineField;\n value: unknown;\n error: string;\n onChange: (id: string, value: unknown) => void;\n}\n\nconst FieldRenderer: React.FC<FieldRendererProps> = ({\n field,\n value,\n error,\n onChange,\n}) => {\n const hasError = error.length > 0;\n const fieldId = `cw-offline-field-${field.id}`;\n const errorId = `${fieldId}-error`;\n\n const commonProps = {\n id: fieldId,\n className: `cw-offline-form__input${hasError ? ' cw-offline-form__input--error' : ''}`,\n 'aria-invalid': hasError,\n 'aria-describedby': hasError ? errorId : undefined,\n required: field.required,\n };\n\n if (field.type === 'textarea') {\n return (\n <div className=\"cw-offline-form__field\">\n <label htmlFor={fieldId} className=\"cw-offline-form__label\">\n {field.label}\n {field.required && (\n <span className=\"cw-offline-form__required\" aria-hidden=\"true\">\n {' '}*\n </span>\n )}\n </label>\n <textarea\n {...commonProps}\n value={String(value ?? '')}\n placeholder={field.placeholder}\n rows={3}\n onChange={(e) => onChange(field.id, e.target.value)}\n className={`cw-offline-form__textarea${hasError ? ' cw-offline-form__textarea--error' : ''}`}\n />\n {hasError && (\n <span id={errorId} className=\"cw-offline-form__error\" role=\"alert\">\n {error}\n </span>\n )}\n </div>\n );\n }\n\n if (field.type === 'select') {\n return (\n <div className=\"cw-offline-form__field\">\n <label htmlFor={fieldId} className=\"cw-offline-form__label\">\n {field.label}\n {field.required && (\n <span className=\"cw-offline-form__required\" aria-hidden=\"true\">\n {' '}*\n </span>\n )}\n </label>\n <select\n {...commonProps}\n value={String(value ?? '')}\n onChange={(e) => onChange(field.id, e.target.value)}\n className={`cw-offline-form__select${hasError ? ' cw-offline-form__select--error' : ''}`}\n >\n <option value=\"\">\n {field.placeholder ?? `Select ${field.label}`}\n </option>\n {field.options?.map((opt) => (\n <option key={opt.value} value={opt.value}>\n {opt.label}\n </option>\n ))}\n </select>\n {hasError && (\n <span id={errorId} className=\"cw-offline-form__error\" role=\"alert\">\n {error}\n </span>\n )}\n </div>\n );\n }\n\n if (field.type === 'checkbox') {\n return (\n <div className=\"cw-offline-form__field cw-offline-form__field--checkbox\">\n <label className=\"cw-offline-form__checkbox-label\" htmlFor={fieldId}>\n <input\n type=\"checkbox\"\n id={fieldId}\n checked={Boolean(value)}\n onChange={(e) => onChange(field.id, e.target.checked)}\n className=\"cw-offline-form__checkbox\"\n aria-invalid={hasError}\n aria-describedby={hasError ? errorId : undefined}\n required={field.required}\n />\n <span className=\"cw-offline-form__checkbox-text\">\n {field.label}\n {field.required && (\n <span className=\"cw-offline-form__required\" aria-hidden=\"true\">\n {' '}*\n </span>\n )}\n </span>\n </label>\n {hasError && (\n <span id={errorId} className=\"cw-offline-form__error\" role=\"alert\">\n {error}\n </span>\n )}\n </div>\n );\n }\n\n // text | email | phone\n return (\n <div className=\"cw-offline-form__field\">\n <label htmlFor={fieldId} className=\"cw-offline-form__label\">\n {field.label}\n {field.required && (\n <span className=\"cw-offline-form__required\" aria-hidden=\"true\">\n {' '}*\n </span>\n )}\n </label>\n <input\n {...commonProps}\n type={field.type}\n value={String(value ?? '')}\n placeholder={field.placeholder}\n onChange={(e) => onChange(field.id, e.target.value)}\n />\n {hasError && (\n <span id={errorId} className=\"cw-offline-form__error\" role=\"alert\">\n {error}\n </span>\n )}\n </div>\n );\n};\n\nconst OfflineForm: React.FC<OfflineFormProps> = ({ schema, onSubmit }) => {\n const { values, errors, setValue, handleSubmit } = useOfflineForm(schema);\n\n const onFormSubmit = (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault();\n handleSubmit(onSubmit);\n };\n\n return (\n <form\n className=\"cw-offline-form\"\n onSubmit={onFormSubmit}\n aria-label={schema.title}\n noValidate\n >\n <h3 className=\"cw-offline-form__title\">{schema.title}</h3>\n\n {schema.fields.map((field) => (\n <FieldRenderer\n key={field.id}\n field={field}\n value={values[field.id]}\n error={errors[field.id] ?? ''}\n onChange={setValue}\n />\n ))}\n\n <div className=\"cw-offline-form__actions\">\n <Button type=\"submit\" fullWidth>\n {schema.submitButtonText}\n </Button>\n </div>\n </form>\n );\n};\n\nexport default OfflineForm;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-8b15ae78\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-8b15ae78\";\n s.textContent = \".cw-offline-state {\\n flex: 1;\\n display: flex;\\n flex-direction: column;\\n background-color: var(--cw-background);\\n overflow-y: auto;\\n}\\n\\n.cw-offline-state__header {\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n text-align: center;\\n padding: 28px 24px 16px;\\n gap: 8px;\\n}\\n\\n.cw-offline-state__icon {\\n width: 56px;\\n height: 56px;\\n border-radius: 50%;\\n background-color: color-mix(in srgb, var(--cw-primary) 10%, transparent);\\n color: var(--cw-primary);\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n margin-bottom: 4px;\\n}\\n\\n.cw-offline-state__title {\\n font-size: 17px;\\n font-weight: 700;\\n color: var(--cw-agent-text);\\n margin: 0;\\n}\\n\\n.cw-offline-state__subtitle {\\n font-size: 13px;\\n color: var(--cw-system-text);\\n margin: 0;\\n line-height: 1.6;\\n max-width: 280px;\\n}\\n\\n.cw-offline-state__form-wrapper {\\n padding: 0 16px 16px;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { OfflineFormSchema } from '../SiteChatComponentNew.types';\nimport OfflineForm from '../OfflineForm/OfflineForm';\nimport './OfflineState.css';\n\ninterface OfflineStateProps {\n form?: OfflineFormSchema;\n onSubmit: (values: Record<string, unknown>) => void;\n}\n\nconst OfflineState: React.FC<OfflineStateProps> = ({ form, onSubmit }) => {\n return (\n <div\n className=\"cw-offline-state\"\n role=\"main\"\n aria-label=\"Business is offline\"\n >\n <div className=\"cw-offline-state__header\">\n <div className=\"cw-offline-state__icon\" aria-hidden=\"true\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"32\"\n height=\"32\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z\" />\n </svg>\n </div>\n <h2 className=\"cw-offline-state__title\">We're currently offline</h2>\n <p className=\"cw-offline-state__subtitle\">\n Please leave us a message and we'll get back to you as soon as possible.\n </p>\n </div>\n\n {form && (\n <div className=\"cw-offline-state__form-wrapper\">\n <OfflineForm schema={form} onSubmit={onSubmit} />\n </div>\n )}\n </div>\n );\n};\n\nexport default OfflineState;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-59a49fdf\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-59a49fdf\";\n s.textContent = \".cw-chat-ended-state {\\n flex: 1;\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n justify-content: center;\\n padding: 32px 24px;\\n background-color: var(--cw-background);\\n text-align: center;\\n gap: 12px;\\n}\\n\\n.cw-chat-ended-state__icon {\\n width: 56px;\\n height: 56px;\\n border-radius: 50%;\\n background-color: color-mix(in srgb, var(--cw-primary) 10%, transparent);\\n color: var(--cw-primary);\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n}\\n\\n.cw-chat-ended-state__title {\\n font-size: 17px;\\n font-weight: 700;\\n color: var(--cw-agent-text);\\n margin: 0;\\n}\\n\\n.cw-chat-ended-state__subtitle {\\n font-size: 13px;\\n color: var(--cw-system-text);\\n margin: 0;\\n max-width: 240px;\\n line-height: 1.6;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport './ChatEndedState.css';\n\nconst ChatEndedState: React.FC = () => {\n return (\n <div\n className=\"cw-chat-ended-state\"\n role=\"status\"\n aria-label=\"Chat has ended\"\n >\n <div className=\"cw-chat-ended-state__icon\" aria-hidden=\"true\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"32\"\n height=\"32\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n </div>\n <p className=\"cw-chat-ended-state__title\">Chat Ended</p>\n <p className=\"cw-chat-ended-state__subtitle\">\n Your chat session has ended. Thank you for reaching out!\n </p>\n </div>\n );\n};\n\nexport default ChatEndedState;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-871af89c\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-871af89c\";\n s.textContent = \"/* \u2500\u2500\u2500 Root container \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\\n * Fixed to bottom-right by default so it works out-of-the-box.\\n * Override with your own positioning class if embedding differently.\\n * \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\\n.cw-root {\\n position: fixed;\\n bottom: max(24px, env(safe-area-inset-bottom));\\n right: max(24px, env(safe-area-inset-right));\\n display: flex;\\n flex-direction: column;\\n align-items: flex-end;\\n gap: 12px;\\n z-index: 9999;\\n /* Scope CSS vars and stacking context */\\n isolation: isolate;\\n font-family: var(--cw-font-family);\\n font-size: var(--cw-font-size);\\n}\\n\\n/* \u2500\u2500\u2500 Widget Panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\\n\\n.cw-widget {\\n display: flex;\\n flex-direction: column;\\n width: var(--cw-width);\\n height: var(--cw-height);\\n /* Clamp so it never overflows the viewport on small screens */\\n max-width: calc(100vw - 48px);\\n max-height: calc(100dvh - 96px);\\n background-color: var(--cw-background);\\n border-radius: var(--cw-border-radius);\\n box-shadow: var(--cw-shadow);\\n overflow: hidden;\\n /* Entry animation */\\n animation: cw-panel-in 0.22s ease;\\n transform-origin: bottom right;\\n}\\n\\n@keyframes cw-panel-in {\\n from {\\n opacity: 0;\\n transform: scale(0.92) translateY(10px);\\n }\\n to {\\n opacity: 1;\\n transform: scale(1) translateY(0);\\n }\\n}\\n\\n.cw-widget__body {\\n display: flex;\\n flex-direction: column;\\n flex: 1;\\n overflow: hidden;\\n}\\n\\n/* \u2500\u2500\u2500 Launcher Button \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\\n\\n.cw-launcher {\\n width: 56px;\\n height: 56px;\\n border-radius: 50%;\\n border: none;\\n background-color: var(--cw-primary);\\n color: #ffffff;\\n cursor: pointer;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);\\n flex-shrink: 0;\\n transition: transform 0.15s ease, box-shadow 0.15s ease;\\n}\\n\\n.cw-launcher:hover {\\n transform: scale(1.07);\\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.26);\\n}\\n\\n.cw-launcher:focus-visible {\\n outline: 3px solid var(--cw-primary);\\n outline-offset: 3px;\\n}\\n\\n.cw-launcher:active {\\n transform: scale(0.96);\\n}\\n\\n/* \u2500\u2500\u2500 Tablet (481px \u2013 768px): panel floats, slightly narrower margin \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\\n\\n@media (min-width: 481px) and (max-width: 768px) {\\n .cw-root {\\n bottom: max(16px, env(safe-area-inset-bottom));\\n right: max(16px, env(safe-area-inset-right));\\n }\\n\\n .cw-widget {\\n max-width: calc(100vw - 32px);\\n max-height: calc(100dvh - 80px);\\n }\\n}\\n\\n/* \u2500\u2500\u2500 Mobile (\u2264 480px): full-screen panel, launcher stays fixed \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\\n\\n@media (max-width: 480px) {\\n .cw-root {\\n bottom: 0;\\n right: 0;\\n gap: 0;\\n }\\n\\n .cw-root > .cw-launcher {\\n position: fixed;\\n bottom: max(20px, env(safe-area-inset-bottom));\\n right: max(20px, env(safe-area-inset-right));\\n }\\n\\n .cw-widget {\\n width: 100vw;\\n max-width: 100vw;\\n height: 100dvh;\\n max-height: 100dvh;\\n border-radius: 0;\\n trans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S,MAAM,OAAO,gBAAgB;AAAA;AAAA,MACxC;AAAA,IAEJ;AAEA,WACE,gFACE;AAAA,oDAAC,uBAAY,UAAoB;AAAA,MAChC,YAAY,8CAAC,0BAAe,IAAK,8CAAC,kBAAO,QAAgB,cAA4B;AAAA,OACxF;AAAA,EAEJ;AAEA,SACE,+CAAC,SAAI,KAAU,WAAU,WAAU,OAAO,WAEvC;AAAA,YACC;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,MAAK;AAAA,QACL,cAAW;AAAA,QACX,cAAY,GAAG,KAAK;AAAA,QAEpB;AAAA;AAAA,YAAC;AAAA;AAAA,cACC;AAAA,cACA;AAAA,cACA;AAAA,cACA,SAAS;AAAA;AAAA,UACX;AAAA,UACA,8CAAC,SAAI,WAAU,mBAAmB,qBAAW,GAAE;AAAA;AAAA;AAAA,IACjD;AAAA,IAID,CAAC,QACA;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,SAAS;AAAA,QACT,cAAW;AAAA,QACX,iBAAc;AAAA,QACd,MAAK;AAAA,QAEL;AAAA,UAAC;AAAA;AAAA,YACC,OAAM;AAAA,YACN,OAAM;AAAA,YACN,QAAO;AAAA,YACP,SAAQ;AAAA,YACR,MAAK;AAAA,YACL,eAAY;AAAA,YAEZ,wDAAC,UAAK,GAAE,sEAAqE;AAAA;AAAA,QAC/E;AAAA;AAAA,IACF;AAAA,KAEJ;AAEJ,CAAC;AAED,qBAAqB,cAAc;",
4
+ "sourcesContent": ["export * from './components';", "import React from 'react';\nimport { Box, Text } from '@wix/design-system';\nimport '@wix/design-system/styles.global.css';\nimport type { SiteChatComponentProps } from './SiteChatComponent.types';\nimport { useSiteChatComponent } from './useSiteChatComponent';\nimport { FabButton } from './FabButton/FabButton';\nimport { Footer } from './Footer/Footer';\nimport { Header } from './Header/Header';\nimport { MessageContainer } from './MessageContainer/MessageContainer';\nimport './SiteChatComponent.css';\n\nconst SiteChatComponentRoot = React.forwardRef<HTMLDivElement, SiteChatComponentProps>(\n (\n {\n children,\n viewMode,\n editorShowChatPanel,\n handleToggle,\n buttonTextValue,\n isOpen,\n },\n _ref,\n ) => {\n useSiteChatComponent();\n\n if (viewMode === 'Editor') {\n if (typeof editorShowChatPanel === 'undefined') {\n return (\n <Box align=\"center\" verticalAlign=\"middle\" height=\"100%\" width=\"100%\">\n <Text>\n Editor view mode detected but editorShowChatPanel prop is not provided\n </Text>\n </Box>\n );\n }\n\n return (\n <Box>\n <FabButton onClick={handleToggle} text={buttonTextValue} />\n <Box className={`site-chat-component-panel ${editorShowChatPanel ? 'open' : ''}`}>\n {children}\n </Box>\n </Box>\n );\n }\n\n return (\n <Box>\n <FabButton onClick={handleToggle} text={buttonTextValue} />\n <Box className={`site-chat-component-panel ${isOpen ? 'open' : ''}`}>\n {children}\n </Box>\n </Box>\n );\n },\n);\n\nSiteChatComponentRoot.displayName = 'SiteChatComponent';\n\nexport const SiteChatComponent = Object.assign(SiteChatComponentRoot, {\n Header,\n MessageContainer,\n Footer,\n FabButton,\n});", "/**\n * useSiteChatComponent\n *\n * Internal hook that encapsulates the logic for SiteChatComponent.\n * Keep this file focused on state and side-effects; keep JSX in SiteChatComponent.tsx.\n */\nexport function useSiteChatComponent() {\n // Add state and derived values here\n\n return {};\n}\n", "import React from 'react';\nimport type { FabButtonProps } from './FabButton.types';\nimport { Box } from '@wix/design-system';\nimport { WixChat } from '@wix/wix-ui-icons-common';\n\nexport const FabButton = React.forwardRef<HTMLDivElement, FabButtonProps>(\n ({\n className,\n children,\n onClick,\n type = 'textIcon',\n icon = <WixChat />,\n text,\n ...rest\n }, ref) => {\n return (\n <div ref={ref}>\n <button\n className=\"site-chat-component-fab\"\n onClick={onClick}\n >\n {type === 'textIcon' ? <span className='site-chat-component-fab-fab-button-icon'><Box height=\"100%\">{icon}</Box></span> : null}\n {type === 'textIcon' || type === 'text' ? <span className='site-chat-component-fab-fab-button-text'><span className='site-chat-component-fab-fab-button-label'>{text}</span></span> : null}\n {type === 'icon' ? <span className='site-chat-component-fab-fab-button-icon'><Box height=\"100%\" width='max-content'>{icon}</Box></span> : null}\n </button>\n </div>\n );\n }\n);\n\nFabButton.displayName = 'SiteChatComponent.FabButton';\n", "import React from 'react';\nimport type { FooterProps } from './Footer.types';\nimport { Box, IconButton } from '@wix/design-system';\nimport SendButton from './send-button/send-button';\nimport { AttachmentSmall } from '@wix/wix-ui-icons-common';\nimport AttachmentList from './attachment-list/attachment-list';\nimport MessageInput from './message-input/message-input';\n\nexport const Footer = React.forwardRef<HTMLDivElement, FooterProps>(\n ({\n className,\n children,\n sendButtonConfig,\n attachmentListConfig,\n messageInputConfig,\n onAttachmentAdded,\n ...rest\n }, ref) => {\n const handleSendMessage = (text: string, messageType: 'TEXT' | 'ATTACHMENT', attachment?: { id: string; name: string; url: string }) => {\n if (sendButtonConfig?.onClick) {\n sendButtonConfig.onClick(text, messageType, attachment);\n } else {\n console.warn('handleSendMessage function is not provided in sendButtonConfig');\n }\n };\n return (\n <Box ref={ref} className=\"site-chat-component-footer-message-input-container\" direction=\"vertical\" gap={1} verticalAlign=\"middle\">\n <Box width=\"100%\">\n <AttachmentList items={attachmentListConfig?.items || []} onRemove={attachmentListConfig?.onRemove} onClick={attachmentListConfig?.onClick} onFilesSent={attachmentListConfig?.onFilesSent} />\n </Box>\n <Box alignContent=\"bottom\" width=\"100%\" direction=\"horizontal\" gap={2} verticalAlign=\"middle\">\n <MessageInput\n placeholder={messageInputConfig?.placeholder || 'Type your message here...'}\n className={messageInputConfig?.className || 'message-input'}\n value={messageInputConfig?.value || ''}\n onChange={messageInputConfig?.onChange}\n onKeyDown={messageInputConfig?.onKeyDown}\n disabled={messageInputConfig?.disabled}\n onAttachmentAdded={onAttachmentAdded}\n />\n <SendButton\n onClick={() => handleSendMessage(messageInputConfig?.value || '', attachmentListConfig?.items ? 'ATTACHMENT' : 'TEXT')}\n disabled={sendButtonConfig?.disabled}\n text={sendButtonConfig?.buttonText || 'Send'}\n />\n </Box>\n </Box>\n );\n }\n);\n\nFooter.displayName = 'SiteChatComponent.Footer';\n", "import React from 'react';\n\ninterface SendButtonProps {\n text?: string;\n className?: string;\n onClick?: () => void;\n disabled?: boolean;\n}\n\nconst SendButton: React.FC<SendButtonProps> = ({\n text = 'Send',\n className = '',\n onClick,\n disabled = false,\n}) => {\n return (\n <button \n className={`site-chat-component-footer-my-tickets-chat-widget-send-button ${className}`}\n onClick={onClick}\n disabled={disabled}\n >\n {text}\n </button>\n )\n}\n\nexport default SendButton;", "import { type FC, useState, useEffect } from 'react';\n\nimport { IconButton, Box } from '@wix/design-system';\nimport {\n Page as PageSmallIcon,\n DismissSmall as DismissIcon\n} from '@wix/wix-ui-icons-common';\nimport type { AttachmentListWrapperProps } from '@jrapps/my_tickets_common_types'\n\nconst AttachmentList: FC<AttachmentListWrapperProps> = ({ items, onRemove, onClick, onFilesSent }) => {\n const [localItems, setLocalItems] = useState(items);\n\n useEffect(() => {\n setLocalItems(items);\n }, [items]);\n\n const handleOnRemove = (id: string) => {\n if (onRemove) {\n onRemove(id);\n }\n setLocalItems(prev => prev.filter(item => item.id !== id));\n }\n\n const handleSendFiles = () => {\n if (onFilesSent && localItems.length > 0) {\n onFilesSent(localItems);\n setLocalItems([]);\n }\n };\n\n return (\n <Box direction='horizontal' gap={2} maxWidth='100%' minWidth=\"100%\" overflowY='hidden' boxSizing='border-box' scrollbarWidth='thin' overflowX='auto'>\n {localItems.map(item => (\n <div className='site-chat-component-footer-file-item-container' key={item.id} onClick={() => onClick && onClick(item.id, item.url)}>\n <PageSmallIcon size={'15px'} />\n <span className='site-chat-component-footer-file-name'>{item.name}</span>\n <IconButton size='tiny' onClick={() => handleOnRemove(item.id)}><DismissIcon /></IconButton>\n </div>\n ))}\n </Box>\n );\n}\n\nexport default AttachmentList;", "import React from 'react';\nimport { IconButton } from '@wix/design-system';\nimport { AttachmentSmall } from '@wix/wix-ui-icons-common';\nimport { openFilePicker } from './open-file-picker';\n\ninterface MessageInputProps {\n placeholder?: string;\n disabled?: boolean;\n className?: string;\n suffix?: React.ReactNode;\n value?: string;\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;\n onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\n onAttachmentAdded?: (file: { id: string; name: string; url: string }) => void;\n}\n\nconst MessageInput: React.FC<MessageInputProps> = ({\n placeholder = 'Type a message...',\n disabled = false,\n className = '',\n suffix,\n value = '',\n onChange,\n onKeyDown,\n onAttachmentAdded,\n}) => {\n\n const handleAttachmentOnClick = async () => {\n try {\n await openFilePicker({ multiple: false }).then(file => {\n if (file && onAttachmentAdded) {\n onAttachmentAdded(file);\n }\n });\n } catch (error: any) {\n console.error('Error opening file picker:', error);\n }\n }\n\n return (\n <div className={`site-chat-component-footer-input-wrapper ${className}`}>\n <input\n name='messageInput'\n className='site-chat-component-footer-chat-input'\n placeholder={placeholder}\n disabled={disabled}\n value={value}\n onChange={onChange}\n onKeyDown={onKeyDown}\n />\n <sub className=\"site-chat-component-footer-suffix\"><IconButton onClick={handleAttachmentOnClick} className='attachment-icon-button'><AttachmentSmall /></IconButton></sub>\n </div>\n )\n};\n\nexport default MessageInput;", "import { httpClient }from '@wix/essentials';\n\ninterface WindowWithFilePicker extends Window {\n showOpenFilePicker?: (options?: { multiple?: boolean }) => Promise<FileSystemFileHandle[]>;\n}\n\ninterface OpenFilePickerOptions {\n multiple?: boolean;\n}\n\nconst uploadFile = async (file: File) => {\n try {\n const baseApiUrl = new URL(import.meta.url).origin;\n\n const response = await httpClient.fetchWithAuth(`${baseApiUrl}/api/widget/chat/upload-attachment`, {\n method: 'POST',\n headers: {\n 'Content-Type': file.type || 'application/octet-stream',\n 'x-file-name': encodeURIComponent(file.name),\n 'x-file-type': file.type || 'application/octet-stream',\n },\n body: file,\n });\n\n const data = await response.json();\n if (!response.ok) {\n throw new Error(data.error || 'Failed to upload file');\n }\n\n if (!data.file?.id || !data.file.displayName || !data.file.url) {\n throw new Error('Invalid response format from upload endpoint');\n }\n\n return data.file as { id: string; displayName: string; url: string };\n } catch (error) {\n console.error('Error uploading file:', error);\n return null;\n }\n}\n\nexport const openFilePicker = async (options?: OpenFilePickerOptions) => {\n const win = window as WindowWithFilePicker;\n if (!win.showOpenFilePicker) {\n console.error('File Picker API is not supported in this browser.');\n return;\n }\n\n try {\n const fileHandles = await win.showOpenFilePicker(options);\n const fileHandle = fileHandles[0];\n const file = await fileHandle.getFile();\n const uploadedFile = await uploadFile(file);\n\n if (!uploadedFile) {\n console.error('Failed to upload file.');\n return;\n }\n\n return {\n id: uploadedFile.id,\n name: uploadedFile.displayName,\n url: uploadedFile.url\n }\n } catch (error) {\n console.error('Error opening file picker:', error);\n return null;\n }\n};", "import React from 'react';\nimport { Box } from '@wix/design-system';\nimport type { HeaderProps } from './Header.types';\n\nexport const Header = React.forwardRef<HTMLDivElement, HeaderProps>(\n ({\n className,\n children,\n title,\n subtitle,\n image,\n onClose,\n ...rest\n }, ref) => {\n return (\n <Box ref={ref} className=\"site-chat-component-header-container\" verticalAlign='middle'>\n <Box width='100%' direction='horizontal' align='center' gap='10px'>\n {image && (\n <Box className='site-chat-component-header-image' width='60px' height='50px' borderRadius='999px'>\n <img style={{ borderRadius: '999px' }} width={'100%'} height={'100%'} src={String(image)} alt=\"Business Logo\" />\n </Box>\n )}\n <Box direction='vertical' className='site-chat-component-header-text-section'>\n <Box className=\"site-chat-component-header-top-section\">\n <Box className=\"site-chat-component-header-top\" verticalAlign='middle' WebkitJustifyContent='space-between' width=\"100%\">\n {title && (<h2 className='site-chat-component-header-title'>{title}</h2>)}\n <button\n onClick={onClose}\n aria-label=\"Close\"\n className=\"site-chat-component-header-close-button\"\n >\n \u2715\n </button>\n </Box>\n </Box>\n\n <Box className=\"site-chat-component-header-bottom-section\">\n {subtitle && (<h3 className=\"site-chat-component-header-subtitle\">{subtitle}</h3>)}\n </Box>\n </Box>\n </Box>\n </Box>\n\n );\n }\n);\n\nHeader.displayName = 'SiteChatComponent.Header';\n", "import React from 'react';\nimport type { MessageContainerProps } from './MessageContainer.types';\nimport { Box } from '@wix/design-system';\nimport MessageWrapper from './messages/messages-wrapper';\n\nexport const MessageContainer = React.forwardRef<HTMLDivElement, MessageContainerProps>(\n ({\n className,\n children,\n messages,\n loading,\n ...rest\n }, ref) => {\n return (\n <Box ref={ref} className=\"site-chat-component-message-container\">\n {loading && (\n <Box className=\"site-chat-component-message-container-loading-state\">\n <p>Loading messages...</p>\n </Box>\n )}\n {messages.length === 0 && !loading && (\n <Box className=\"site-chat-component-message-container-empty-state\">\n <p>No messages yet. Start a conversation</p>\n </Box>\n )}\n {messages.length > 0 && <MessageWrapper messages={messages} />}\n </Box>\n\n );\n }\n);\n\nMessageContainer.displayName = 'SiteChatComponent.MessageContainer';\n", "import { type FC } from 'react';\nimport { useRef, useEffect } from 'react';\nimport { Avatar } from '@wix/design-system';\nimport Attachment from './attachment';\nimport type { MessagesWrapperProps, MessageProps } from '@jrapps/my_tickets_common_types'\n\nconst AGENT_MESSAGE_GAP = '10px';\nconst AGENT_MESSAGE_WIDTH = '75%';\nconst AGENT_MESSAGE_INNER_GAP = '4px';\n\nconst ONE_MINUTE_MS = 60_000;\nconst ONE_DAY_MS = 86_400_000;\nconst DAYS_IN_WEEK = 7;\n\nconst formatTimestamp = (timestamp?: number): string => {\n if (!timestamp) return '';\n const date = new Date(timestamp);\n const now = new Date();\n\n if (now.getTime() - date.getTime() < ONE_MINUTE_MS) return 'Just now';\n\n const time = date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });\n const startOfToday = new Date(now.getFullYear(), now.getMonth(), now.getDate());\n const startOfDay = new Date(date.getFullYear(), date.getMonth(), date.getDate());\n const diffDays = Math.floor((startOfToday.getTime() - startOfDay.getTime()) / ONE_DAY_MS);\n\n if (diffDays === 0) return `Today at ${time}`;\n if (diffDays === 1) return `Yesterday at ${time}`;\n if (diffDays < DAYS_IN_WEEK && date.getDay() < now.getDay())\n return `${date.toLocaleDateString([], { weekday: 'short' })} at ${time}`;\n return `${date.toLocaleDateString([], { month: 'short', day: 'numeric', year: 'numeric' })} at ${time}`;\n};\n\nconst MessagesWrapper: FC<MessagesWrapperProps> = ({ messages = [] }) => {\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (wrapperRef.current) {\n wrapperRef.current.scrollTop = wrapperRef.current.scrollHeight;\n }\n }, [messages]);\n\n return (\n <div className=\"site-chat-component-message-container-messages-wrapper\" ref={wrapperRef}>\n {messages.map(({ _id, message, attachment, timestamp, senderType, senderName }: MessageProps, index: any) => (\n <div key={_id || index} className={`message-item ${senderType}`}>\n {senderType === 'agent' ? (\n <AgentMessageWrapper message={message} attachment={attachment ? (Array.isArray(attachment) ? attachment[0] : attachment) : undefined} timestamp={timestamp} agentName={senderName} />\n ) : senderType === 'user' ? (\n <UserMessageWrapper message={message} attachment={attachment ? (Array.isArray(attachment) ? attachment[0] : attachment) : undefined} timestamp={timestamp} />\n ) : (\n <SystemMessageWrapper message={message} timestamp={timestamp} />\n )}\n </div>\n ))}\n </div>\n )\n}\n\nconst GetSystemMessage: FC<{ type: string | undefined }> = ({ type }) => {\n switch (type) {\n case 'AGENT_JOINED':\n return <div className='site-chat-component-message-container-system-message-message'>An agent has joined the chat.</div>;\n case 'AGENT_LEFT':\n return <div className='site-chat-component-message-container-system-message-message'>An agent has left the chat.</div>;\n case 'USER_JOINED':\n return <div className='site-chat-component-message-container-system-message-message'>A user has joined the chat.</div>;\n case 'USER_LEFT':\n return <div className='site-chat-component-message-container-system-message-message'>A user has left the chat.</div>;\n case 'CHAT_ENDED':\n return <div className='site-chat-component-message-container-system-message-message'>The chat has ended.</div>;\n case 'CHAT_REOPENED':\n return <div className='site-chat-component-message-container-system-message-message'>The chat has been reopened.</div>;\n case 'CHAT_TRANSFERRED':\n return <div className='site-chat-component-message-container-system-message-message'>The chat has been transferred to another agent.</div>;\n case 'WAITING_FOR_AGENT':\n return <div className='site-chat-component-message-container-system-message-message'>Waiting for an agent to join the chat...</div>;\n default:\n return <div className='site-chat-component-message-container-system-message-message'>System message</div>;\n }\n}\n\nconst SystemMessageWrapper: FC<{ message: string | undefined; timestamp?: number }> = ({ message, timestamp }) => {\n return (\n <div className=\"site-chat-component-message-container-system-message-wrapper\">\n <div className=\"site-chat-component-message-container-system-message\">\n <hr className=\"dashed\" />\n <GetSystemMessage type={message} />\n <hr className=\"dashed\" />\n </div>\n </div>\n )\n}\n\nconst AgentMessageWrapper: FC<{ message?: string; attachment?: { id: string; name: string; url: string }; timestamp?: number; agentName?: string }> = ({ message, attachment, timestamp, agentName }) => {\n return (\n <div style={{ display: 'flex', flexDirection: 'row', gap: AGENT_MESSAGE_GAP }}>\n <Avatar size=\"size24\" className=\"site-chat-component-message-container-agent-message-avatar\" name={agentName} />\n <div style={{ width: AGENT_MESSAGE_WIDTH, gap: AGENT_MESSAGE_INNER_GAP, display: 'flex', flexDirection: 'column' }}>\n {agentName && <div className='site-chat-component-message-container-agent-name-time-container'><div className=\"site-chat-component-message-container-agent-name\">{agentName}</div><div className='site-chat-component-message-container-agent-message-timestamp'>{formatTimestamp(timestamp)}</div></div>}\n <div className={`site-chat-component-message-container-agent-message-wrapper${attachment ? '-attachment' : ''}`}>\n <div className=\"site-chat-component-message-container-agent-message\">\n {message && message}\n {attachment && <Attachment item={attachment} />}\n </div>\n </div>\n </div>\n </div>\n )\n}\n\nconst UserMessageWrapper: FC<{ message?: string; attachment?: { id: string; name: string; url: string }; timestamp?: number }> = ({ message, attachment, timestamp }) => {\n return (\n <div style={{ display: 'flex', flexDirection: 'column', alignItems: 'flex-end', gap: '4px' }}>\n {!attachment && <div className='site-chat-component-message-container-user-name'>Me</div>}\n <div className={`site-chat-component-message-container-user-message-wrapper${attachment ? '-attachment' : ''}`}>\n <div className=\"site-chat-component-message-container-user-message\">\n {message && message}\n {attachment && <Attachment item={attachment} />}\n </div>\n </div>\n </div>\n )\n}\n\nexport default MessagesWrapper;", "import { type FC } from 'react';\n\nimport { TextButton, Box } from '@wix/design-system';\nimport {\n Page as PageSmallIcon\n} from '@wix/wix-ui-icons-common';\nimport { ArrowTopRight as ArrowTopRightIcon, } from '@wix/wix-ui-icons-common/on-stage';\nimport type { AttachmentWrapperProps } from '@jrapps/my_tickets_common_types'\n\n\nconst Attachment: FC<AttachmentWrapperProps> = ({ item }) => {\n return (\n <Box direction='horizontal' maxWidth='100%' boxSizing='border-box' className='site-chat-component-message-container-in-chat-file-item-wrapper-box'>\n {item && (\n <div className='site-chat-component-message-container-in-chat-file-item-container' key={item.id}>\n <PageSmallIcon className='site-chat-component-message-container-in-chat-file-icon' width={'20px'} height={'20px'} />\n <div className='site-chat-component-message-container-in-chat-file-names-container'>\n <span className='site-chat-component-message-container-in-chat-file-name'>{item.name}</span>\n <span className='site-chat-component-message-container-in-chat-file-sub-name'>Attachment</span>\n </div>\n <TextButton size='tiny' onClick={() => window.open(item.url, '_blank')} suffixIcon={<ArrowTopRightIcon size={'tiny'} />}>Open</TextButton>\n </div>\n )}\n </Box>\n );\n}\n\nexport default Attachment;", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-3c48ccde\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-3c48ccde\";\n s.textContent = \".site-chat-component {\\n /* SiteChatComponent base styles */\\n}\\n\\n/* ---------- Header styles ---------- */\\n\\n.site-chat-component-header-container {\\n background: var(--my-tickets-chat-widget-panel-header-background-color);\\n padding: 10px;\\n border-top-right-radius: inherit;\\n border-top-left-radius: inherit;\\n}\\n\\n.site-chat-component-header-container .site-chat-component-header-text-section {\\n width: 100%;\\n}\\n\\n.site-chat-component-header-title {\\n font-style: var(--my-tickets-chat-widget-panel-header-title-font-style);\\n margin-bottom: 0 !important;\\n color: var(--my-tickets-chat-widget-panel-header-title-color);\\n}\\n\\n.site-chat-component-header-subtitle {\\n font-style: var(--my-tickets-chat-widget-panel-header-subtitle-font-style);\\n font-weight: normal !important;\\n margin-top: 0 !important;\\n color: var(--my-tickets-chat-widget-panel-header-subtitle-color);\\n}\\n\\n.site-chat-component-header-close-button {\\n cursor: pointer !important;\\n background: none;\\n border: none;\\n padding: 4px;\\n color: var(--my-tickets-chat-widget-panel-header-button-color);\\n font-size: 1.25rem;\\n line-height: 1;\\n border-radius: 4px;\\n transition: opacity 0.15s;\\n}\\n\\n.site-chat-component-header-close-button:hover {\\n opacity: 0.8;\\n}\\n\\n/* ---------- Footer styles ---------- */\\n\\n.site-chat-component-footer-message-input-container {\\n padding: var(--cw-space-md, 16px);\\n background: var(--my-tickets-chat-widget-panel-footer-background-color);\\n font-family: var(--cw-font, sans-serif);\\n border-radius: 0 0 var(--cw-radius-panel, 16px) var(--cw-radius-panel, 16px);\\n}\\n\\n.site-chat-component-footer-attachment-icon-button {\\n width: 20px;\\n height: 20px;\\n}\\n\\n.site-chat-component-footer-my-tickets-chat-widget-send-button {\\n background: var(--my-tickets-chat-widget-panel-footer-button-color);\\n border: 1px solid var(--my-tickets-chat-widget-panel-footer-button-border-color);\\n color: var(--my-tickets-chat-widget-panel-footer-button-text-color);\\n padding: 6px;\\n border-radius: 4px;\\n width: 80px;\\n cursor: pointer;\\n}\\n\\n.site-chat-component-footer-my-tickets-chat-widget-send-button:disabled {\\n opacity: 0.5;\\n cursor: default;\\n}\\n\\n.site-chat-component-footer-file-item-container {\\n display: flex;\\n align-items: center;\\n gap: 8px;\\n padding: 2px 4px;\\n border-radius: var(--wds-input-area-border-radius-default-medium, 6px);\\n background-color: var(--wds-color-surface, var(--wsr-color-surface, #FFFFFF));\\n border: 1px solid var(--wds-input-border-color, var(--wsr-color-B40, #D6E6FE));\\n box-sizing: border-box;\\n}\\n\\n.site-chat-component-footer-file-name {\\n font-family: var(--wds-font-family-default, var(--wsr-font-family, Madefor, \\\"Helvetica Neue\\\", Helvetica, Arial, \\\"\\\\30E1\\\\30A4\\\\30EA\\\\30AA\\\", \\\"meiryo\\\", \\\"\\\\30D2\\\\30E9\\\\30AE\\\\30CE\\\\89D2\\\\30B4 pro w3\\\", \\\"hiragino kaku gothic pro\\\", sans-serif));\\n font-size: var(--wds-font-size-body-small, var(--wsr-text-font-size-small, 14px));\\n font-weight: var(--wds-font-weight-regular, var(--wsr-font-weight-regular, 400));\\n line-height: var(--wds-font-line-height-body-small, var(--wsr-text-line-height-small, 20px));\\n letter-spacing: var(--wds-font-letter-spacing-0, unset);\\n white-space: nowrap;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n max-width: 115px;\\n}\\n\\n.site-chat-component-footer-input-wrapper {\\n padding: 5px;\\n box-sizing: border-box;\\n width: inherit;\\n display: flex;\\n justify-content: center;\\n flex-direction: row;\\n gap: 10px;\\n border-radius: 4px;\\n background: var(--my-tickets-chat-widget-panel-footer-input-background-color);\\n border: 2px solid var(--my-tickets-chat-widget-panel-footer-input-border-color);\\n color: var(--my-tickets-chat-widget-panel-footer-input-text-color);\\n font-size: var(--my-tickets-chat-widget-panel-footer-input-text-size);\\n font-family: 'Arial', sans-serif;\\n}\\n\\n.site-chat-component-footer-suffix {\\n background: inherit;\\n width: max-content;\\n min-height: 100%;\\n max-height: 100%;\\n align-items: center;\\n justify-content: center;\\n display: flex;\\n font-size: inherit;\\n padding: 0px;\\n margin: 0px;\\n font-family: inherit;\\n color: inherit;\\n box-sizing: border-box;\\n}\\n\\n.site-chat-component-footer-chat-input {\\n background: inherit;\\n border: none;\\n font-size: inherit;\\n font-family: inherit;\\n color: inherit;\\n width: inherit;\\n}\\n\\n.site-chat-component-footer-chat-input::placeholder {\\n background: inherit;\\n border: none;\\n font-size: inherit;\\n font-family: inherit;\\n color: inherit;\\n opacity: 0.5;\\n}\\n\\n.site-chat-component-footer-chat-input:focus {\\n outline: none;\\n}\\n\\n/* ---------- Messages styles ---------- */\\n/* Message Container */\\n.site-chat-component-message-container {\\n display: flex !important;\\n flex-direction: column !important;\\n padding: var(--cw-space-md, 16px) !important;\\n background: var(--my-tickets-chat-widget-panel-messages-background-color) !important;\\n flex: 1 !important;\\n min-height: 0;\\n overflow-y: auto !important;\\n}\\n\\n.site-chat-component-message-container-messages-wrapper {\\n display: flex;\\n flex-direction: column;\\n gap: var(--cw-space-sm, 8px);\\n}\\n\\n.site-chat-component-message-container-agent-message-wrapper,\\n.site-chat-component-message-container-user-message-wrapper {\\n display: flex;\\n padding: 10px 14px;\\n border-radius: var(--cw-radius-bubble, 12px);\\n width: max-content;\\n max-width: 80%;\\n font-family: var(--cw-font, sans-serif);\\n}\\n\\n.site-chat-component-message-container-agent-name {\\n color: var(--my-tickets-chat-widget-panel-messages-agent-name-text-color);\\n font-size: var(--my-tickets-chat-widget-panel-messages-agent-name-text-size);\\n font-weight: 500;\\n}\\n\\n.site-chat-component-message-container-user-name {\\n color: var(--my-tickets-chat-widget-panel-messages-user-name-text-color);\\n font-size: var(--my-tickets-chat-widget-panel-messages-user-name-text-size);\\n font-weight: 500;\\n display: var(--my-tickets-chat-widget-panel-messages-user-name-text-visible);\\n}\\n\\n.site-chat-component-message-container-agent-message-avatar {\\n margin-top: 20px;\\n display: var(--my-tickets-chat-widget-panel-messages-agent-icon-visible);\\n}\\n\\n.site-chat-component-message-container-user-message,\\n.site-chat-component-message-container-agent-message {\\n line-height: 1.5;\\n word-wrap: break-word;\\n}\\n\\n.site-chat-component-message-container-agent-message {\\n font-size: var(--my-tickets-chat-widget-panel-messages-agent-text-size);\\n}\\n\\n.site-chat-component-message-container-user-message {\\n font-size: var(--my-tickets-chat-widget-panel-messages-user-text-size);\\n}\\n\\n.site-chat-component-message-container-agent-message-wrapper {\\n justify-content: flex-start;\\n align-self: flex-start;\\n background-color: var(--my-tickets-chat-widget-panel-messages-agent-bubble-color);\\n color: var(--my-tickets-chat-widget-panel-messages-agent-text-color);\\n}\\n\\n.site-chat-component-message-container-user-message-wrapper {\\n justify-content: flex-end;\\n align-self: flex-end;\\n margin-left: auto;\\n background-color: var(--my-tickets-chat-widget-panel-messages-user-bubble-color);\\n color: var(--my-tickets-chat-widget-panel-messages-user-text-color);\\n}\\n\\n.site-chat-component-message-container-agent-name-time-container {\\n gap: 8px;\\n display: flex;\\n align-items: center;\\n font-family: 'Madefor';\\n font-size: 13px;\\n}\\n\\n/* System Messages */\\n\\n.site-chat-component-message-container-system-message {\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n width: 100%;\\n gap: var(--cw-space-sm, 8px);\\n}\\n\\n.site-chat-component-message-container-system-message .dashed {\\n flex: 1;\\n border: none;\\n border-top: 1px dashed var(--my-tickets-chat-widget-panel-messages-system-color);\\n margin: 0;\\n}\\n\\n.site-chat-component-message-container-system-message-message {\\n color: var(--my-tickets-chat-widget-panel-messages-system-color);\\n font-family: var(--cw-font, sans-serif);\\n font-size: var(--my-tickets-chat-widget-panel-messages-system-size);\\n font-weight: 500;\\n white-space: nowrap;\\n}\\n\\n/* Empty and Loading States */\\n\\n.site-chat-component-message-container-empty-state {\\n display: flex;\\n flex: 1;\\n align-items: center;\\n justify-content: center;\\n}\\n\\n.site-chat-component-message-container-empty-state p {\\n font-family: var(--cw-font, sans-serif);\\n font-size: 14px;\\n color: var(--my-tickets-chat-widget-panel-messages-system-color);\\n}\\n\\n.site-chat-component-message-container-loading-state {\\n display: flex;\\n flex: 1;\\n align-items: center;\\n justify-content: center;\\n}\\n\\n.site-chat-component-message-container-loading-state p {\\n font-family: var(--cw-font, sans-serif);\\n font-size: 14px;\\n color: var(--my-tickets-chat-widget-panel-messages-system-color);\\n}\\n\\n.site-chat-component-message-container-in-chat-file-item-container {\\n display: flex;\\n align-items: center;\\n gap: 8px;\\n padding: 4px 8px;\\n border-radius: var(--wds-input-area-border-radius-default-medium, 6px);\\n background-color: var(--wds-color-surface, var(--wsr-color-surface, #FFFFFF));\\n border: 1px solid var(--wds-input-border-color, var(--wsr-color-B40, #D6E6FE));\\n box-sizing: border-box;\\n}\\n\\n.site-chat-component-message-container-in-chat-file-name {\\n font-family: var(--wds-font-family-default, var(--wsr-font-family, Madefor, \\\"Helvetica Neue\\\", Helvetica, Arial, \\\"\\\\30E1\\\\30A4\\\\30EA\\\\30AA\\\", \\\"meiryo\\\", \\\"\\\\30D2\\\\30E9\\\\30AE\\\\30CE\\\\89D2\\\\30B4 pro w3\\\", \\\"hiragino kaku gothic pro\\\", sans-serif));\\n font-size: var(--wds-font-size-body-tiny, var(--wsr-text-font-size-tiny, 10px));\\n font-weight: var(--wds-font-weight-regular, var(--wsr-font-weight-regular, 400));\\n line-height: var(--wds-font-line-height-body-tiny, var(--wsr-text-line-height-tiny, 12px));\\n letter-spacing: var(--wds-font-letter-spacing-0, unset);\\n white-space: nowrap;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n max-width: 150px;\\n color: black;\\n}\\n\\n.site-chat-component-message-container-in-chat-file-sub-name {\\n font-family: var(--wds-font-family-default, var(--wsr-font-family, Madefor, \\\"Helvetica Neue\\\", Helvetica, Arial, \\\"\\\\30E1\\\\30A4\\\\30EA\\\\30AA\\\", \\\"meiryo\\\", \\\"\\\\30D2\\\\30E9\\\\30AE\\\\30CE\\\\89D2\\\\30B4 pro w3\\\", \\\"hiragino kaku gothic pro\\\", sans-serif));\\n font-size: var(--wds-font-size-body-tiny, var(--wsr-text-font-size-tiny, 10px));\\n font-weight: var(--wds-font-weight-regular, var(--wsr-font-weight-regular, 400));\\n line-height: var(--wds-font-line-height-body-tiny, var(--wsr-text-line-height-tiny, 12px));\\n letter-spacing: var(--wds-font-letter-spacing-0, unset);\\n color: var(--wds-color-text-secondary, var(--wsr-color-text-secondary, #6B6B6B));\\n}\\n\\n.site-chat-component-message-container-in-chat-file-icon {\\n fill: black !important;\\n}\\n\\n.site-chat-component-message-container-in-chat-file-names-container {\\n display: flex;\\n flex-direction: column;\\n gap: 0px;\\n}\\n\\n.site-chat-component-message-container-user-message-wrapper-attachment .site-chat-component-message-container-in-chat-file-item-wrapper-box {\\n align-items: flex-end;\\n display: flex;\\n flex-direction: column;\\n}\\n\\n.site-chat-component-message-container-agent-message-wrapper-attachment .site-chat-component-message-container-in-chat-file-item-wrapper-box {\\n align-items: flex-start;\\n display: flex;\\n flex-direction: column;\\n}\\n\\n/* FAB */\\n.site-chat-component-fab {\\n position: fixed;\\n bottom: 24px;\\n right: 24px;\\n gap: 4.5px;\\n cursor: pointer;\\n z-index: 100;\\n user-select: none;\\n border-radius: 99px;\\n padding: 9px 25px;\\n transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n flex-direction: row;\\n\\n font-size: var(--my-tickets-chat-widget-button-text-size) !important;\\n background-color: var(--my-tickets-chat-widget-button-color);\\n border: 1px solid var(--my-tickets-chat-widget-button-border-color);\\n color: var(--my-tickets-chat-widget-button-text-color);\\n font: var(--my-tickets-chat-widget-button-text-font);\\n}\\n\\n.site-chat-component-fab-fab-button-label {\\n margin: 0;\\n padding: 0;\\n line-height: 1;\\n display: inline-flex;\\n align-items: center;\\n margin-top: 2px;\\n}\\n\\n.site-chat-component-fab-fab-button-icon,\\n.site-chat-component-fab-fab-button-text {\\n display: inline-flex;\\n align-items: center;\\n height: 100%;\\n}\\n\\n.site-chat-component-fab-fab-button-icon svg {\\n width: var(--my-tickets-chat-widget-button-icon-size);\\n height: var(--my-tickets-chat-widget-button-icon-size);\\n font-weight: inherit;\\n}\\n\\n/* \u2500\u2500 Design Tokens \u2500\u2500 */\\n:host {\\n --cw-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\\n\\n /* Primary palette */\\n --cw-primary: #3B82F6;\\n --cw-primary-hover: #2563EB;\\n --cw-primary-light: #EFF6FF;\\n --cw-primary-shadow: rgba(59, 130, 246, 0.35);\\n --cw-primary-shadow-hover: rgba(59, 130, 246, 0.5);\\n\\n /* Neutrals */\\n --cw-bg: #F8FAFC;\\n --cw-surface: #FFFFFF;\\n --cw-border: #E2E8F0;\\n\\n /* Text */\\n --cw-text: #1E293B;\\n --cw-text-muted: #64748B;\\n --cw-text-inverse: #FFFFFF;\\n\\n /* Message bubbles */\\n --cw-bubble-user: var(--cw-primary);\\n --cw-bubble-user-text: var(--cw-text-inverse);\\n --cw-bubble-agent: #F1F5F9;\\n --cw-bubble-agent-text: var(--cw-text);\\n\\n /* Radii */\\n --cw-radius-panel: 16px;\\n --cw-radius-bubble: 12px;\\n --cw-radius-pill: 50px;\\n\\n /* Spacing */\\n --cw-space-xs: 4px;\\n --cw-space-sm: 8px;\\n --cw-space-md: 16px;\\n --cw-space-lg: 24px;\\n\\n /* Shadows */\\n --cw-shadow-panel: 0 20px 60px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.05);\\n --cw-shadow-fab: 0 8px 24px var(--cw-primary-shadow);\\n --cw-shadow-fab-hover: 0 12px 32px var(--cw-primary-shadow-hover);\\n}\\n\\n/* \u2500\u2500 Hide toggle \u2500\u2500 */\\n#site-chat-component-chat-toggle {\\n display: none;\\n}\\n\\n/* \u2500\u2500 Panel \u2500\u2500 */\\n.site-chat-component-panel {\\n position: fixed !important;\\n bottom: 60px;\\n right: 30px;\\n width: min(340px, 100vw);\\n max-height: 50vh;\\n max-height: 50dvh;\\n background: var(--cw-surface);\\n border-radius: var(--cw-radius-panel, 16px) !important;\\n box-shadow: var(--cw-shadow-panel);\\n transform: scale(0.85) translateY(16px);\\n transform-origin: bottom right;\\n opacity: 0;\\n pointer-events: none;\\n transition: transform 0.3s cubic-bezier(.175, .885, .32, 1.275), opacity 0.25s ease;\\n z-index: 99;\\n display: flex !important;\\n flex-direction: column !important;\\n min-height: 450px;\\n font-family: var(--cw-font);\\n overflow: hidden;\\n border: 0px solid var(--wst-color-line);\\n box-shadow: 0 2px 6px var(--wst-color-line), 0 0 0 1px var(--wst-color-line);\\n}\\n\\n.site-chat-component-panel.open {\\n transform: scale(1) translateY(0);\\n opacity: 1;\\n pointer-events: all;\\n z-index: 101;\\n bottom: 10px;\\n}\\n\\n/* \u2500\u2500 Mobile: fill screen \u2500\u2500 */\\n@media (max-width: 480px) {\\n .site-chat-component-panel {\\n width: 100vw;\\n height: 100vh;\\n height: 100dvh;\\n min-height: 0;\\n max-height: none;\\n bottom: 0;\\n right: 0;\\n }\\n\\n .site-chat-component-panel.open {\\n top: 0;\\n left: 0;\\n right: 0;\\n bottom: 0;\\n }\\n}\\n\\n/* \u2500\u2500 Small tablets \u2500\u2500 */\\n@media (min-width: 481px) and (max-width: 768px) {\\n .site-chat-component-panel {\\n width: min(380px, calc(100vw - 24px));\\n max-height: 70vh;\\n max-height: 70dvh;\\n }\\n}\\n\\n/* \u2500\u2500 Large screens \u2500\u2500 */\\n@media (min-width: 1200px) {\\n .site-chat-component-panel {\\n width: 350px;\\n max-height: 70vh;\\n max-height: 70dvh;\\n }\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { ChatWidgetProps } from './SiteChatComponentNew.types';\nimport { useSiteChatComponentNew } from './useSiteChatComponentNew';\nimport { buildThemeVars } from './utils';\nimport Header from './Header/Header';\nimport Footer from './Footer/Footer';\nimport { MessageList } from './Messages';\nimport { LoadingState, StartChatState, OfflineState, ChatEndedState } from './States';\nimport './SiteChatComponentNew.css';\n\nexport const SiteChatComponentNew = React.forwardRef<HTMLDivElement, ChatWidgetProps>(({\n title,\n subtitle,\n image,\n theme,\n messages,\n offlineForm,\n defaultOpen = false,\n loading = false,\n chatEnded = false,\n width,\n height,\n onSend,\n onAttachment,\n onOfflineSubmit,\n onClose,\n}, ref) => {\n const { open, openWidget, closeWidget } = useSiteChatComponentNew(defaultOpen);\n const themeVars = buildThemeVars(theme, width, height);\n\n const handleClose = () => {\n closeWidget();\n onClose?.();\n };\n\n /**\n * Derive what to render from data:\n * loading=true \u2192 spinner\n * offlineForm provided \u2192 offline form\n * no messages yet \u2192 Start Chat screen\n * messages present \u2192 conversation (+ optional ended banner)\n */\n const renderBody = () => {\n if (loading) {\n return <LoadingState />;\n }\n\n if (offlineForm) {\n return <OfflineState form={offlineForm} onSubmit={onOfflineSubmit} />;\n }\n\n if (messages.length === 0) {\n return (\n <StartChatState\n image={image}\n title={title}\n description={subtitle}\n onStart={() => onSend('__start_chat__')}\n />\n );\n }\n\n return (\n <>\n <MessageList messages={messages} />\n {chatEnded ? <ChatEndedState /> : <Footer onSend={onSend} onAttachment={onAttachment} />}\n </>\n );\n };\n\n return (\n <div ref={ref} className=\"cw-root\" style={themeVars as React.CSSProperties}>\n {/* Chat panel */}\n {open && (\n <div\n className=\"cw-widget\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={`${title} chat widget`}\n >\n <Header\n image={image}\n title={title}\n subtitle={subtitle}\n onClose={handleClose}\n />\n <div className=\"cw-widget__body\">{renderBody()}</div>\n </div>\n )}\n\n {/* Launcher button \u2014 only visible when the panel is closed */}\n {!open && (\n <button\n className=\"cw-launcher\"\n onClick={openWidget}\n aria-label=\"Open chat\"\n aria-haspopup=\"dialog\"\n type=\"button\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"26\"\n height=\"26\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path d=\"M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z\" />\n </svg>\n </button>\n )}\n </div>\n );\n});\n\nSiteChatComponentNew.displayName = 'SiteChatComponentNew';\n\n\n", "import { useState, useCallback } from 'react';\nimport { UseChatWidgetReturn } from './SiteChatComponentNew.types';\n\nexport function useSiteChatComponentNew(defaultOpen = false): UseChatWidgetReturn {\n const [open, setOpen] = useState(defaultOpen);\n\n const openWidget = useCallback(() => setOpen(true), []);\n const closeWidget = useCallback(() => setOpen(false), []);\n\n return { open, openWidget, closeWidget };\n}\n", "import { ChatTheme } from '../SiteChatComponentNew.types';\n\n// \u2500\u2500\u2500 Fixed layout / typography constants \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n// These are intentionally not themeable \u2014 only colours and border widths change.\nconst FONT_FAMILY =\n \"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif\";\nconst FONT_SIZE = '14px';\nconst SHADOW = '0 4px 24px rgba(0,0,0,0.12)';\nconst WIDTH = '400px';\nconst HEIGHT = '600px';\nconst HEADER_HEIGHT = '64px';\n\n// \u2500\u2500\u2500 Default colour theme \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport const defaultTheme: ChatTheme = {\n primary: '#4f46e5',\n background: '#ffffff',\n surface: '#f9fafb',\n border: '#e5e7eb',\n userBubble: '#4f46e5',\n userText: '#ffffff',\n agentBubble: '#f3f4f6',\n agentText: '#111827',\n systemText: '#6b7280',\n inputBackground: '#ffffff',\n inputBorder: '#d1d5db',\n buttonRadius: 8,\n borderRadius: 12,\n};\n\n/**\n * Merges a partial user theme with the defaults and returns a style object\n * containing CSS custom properties. Layout/font values are always fixed.\n */\nexport function buildThemeVars(\n partial?: Partial<ChatTheme>,\n width?: number | string,\n height?: number | string,\n): Record<string, string> {\n const theme: ChatTheme = { ...defaultTheme, ...partial };\n\n return {\n // Colours\n '--cw-primary': theme.primary,\n '--cw-background': theme.background,\n '--cw-surface': theme.surface,\n '--cw-border': theme.border,\n '--cw-user-bubble': theme.userBubble,\n '--cw-user-text': theme.userText,\n '--cw-agent-bubble': theme.agentBubble,\n '--cw-agent-text': theme.agentText,\n '--cw-system-text': theme.systemText,\n '--cw-input-background': theme.inputBackground,\n '--cw-input-border': theme.inputBorder,\n // Border radii\n '--cw-button-radius': `${theme.buttonRadius}px`,\n '--cw-border-radius': `${theme.borderRadius}px`,\n // Fixed constants \u2014 not exposed as theme props\n '--cw-font-family': FONT_FAMILY,\n '--cw-font-size': FONT_SIZE,\n '--cw-shadow': SHADOW,\n '--cw-width': width !== undefined ? (typeof width === 'number' ? `${width}px` : width) : WIDTH,\n '--cw-height': height !== undefined ? (typeof height === 'number' ? `${height}px` : height) : HEIGHT,\n '--cw-header-height': HEADER_HEIGHT,\n };\n}\n", "import { SystemEventType } from '../SiteChatComponentNew.types';\n\nconst systemEventLabels: Record<SystemEventType, string> = {\n AGENT_JOINED: 'Agent joined',\n AGENT_LEFT: 'Agent left',\n USER_JOINED: 'You joined',\n USER_LEFT: 'You left',\n CHAT_ENDED: 'Chat ended',\n CHAT_REOPENED: 'Chat reopened',\n CHAT_TRANSFERRED: 'Chat transferred',\n WAITING_FOR_AGENT: 'Waiting for an agent',\n};\n\nexport function getSystemLabel(event: string): string {\n return systemEventLabels[event as SystemEventType] ?? event;\n}\n\nexport function isSystemEventType(value: string): value is SystemEventType {\n return value in systemEventLabels;\n}\n", "/**\n * Format a Unix timestamp (ms) into a human-readable time string, e.g. \"2:34 PM\".\n */\nexport function formatTime(timestamp: number): string {\n return new Date(timestamp).toLocaleTimeString([], {\n hour: '2-digit',\n minute: '2-digit',\n });\n}\n\n/**\n * Generate a simple unique id.\n */\nexport function generateId(): string {\n return `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;\n}\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-45eba566\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-45eba566\";\n s.textContent = \".cw-header {\\n display: flex;\\n align-items: center;\\n justify-content: space-between;\\n padding: 0 16px;\\n height: var(--cw-header-height);\\n background-color: var(--cw-primary);\\n color: #ffffff;\\n flex-shrink: 0;\\n border-radius: var(--cw-border-radius) var(--cw-border-radius) 0 0;\\n}\\n\\n.cw-header__identity {\\n display: flex;\\n align-items: center;\\n gap: 12px;\\n min-width: 0;\\n}\\n\\n.cw-header__avatar {\\n width: 40px;\\n height: 40px;\\n border-radius: 50%;\\n object-fit: cover;\\n flex-shrink: 0;\\n border: 2px solid rgba(255, 255, 255, 0.4);\\n}\\n\\n.cw-header__text {\\n display: flex;\\n flex-direction: column;\\n min-width: 0;\\n}\\n\\n.cw-header__title {\\n font-size: 15px;\\n font-weight: 600;\\n white-space: nowrap;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n line-height: 1.3;\\n}\\n\\n.cw-header__subtitle {\\n font-size: 12px;\\n opacity: 0.85;\\n white-space: nowrap;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n line-height: 1.3;\\n}\\n\\n.cw-header__close {\\n background: none;\\n border: none;\\n cursor: pointer;\\n color: #ffffff;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n padding: 6px;\\n border-radius: 50%;\\n flex-shrink: 0;\\n transition: background-color 0.15s ease;\\n}\\n\\n.cw-header__close:hover {\\n background-color: rgba(255, 255, 255, 0.15);\\n}\\n\\n.cw-header__close:focus-visible {\\n outline: 2px solid #ffffff;\\n outline-offset: 2px;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { HeaderProps } from '../SiteChatComponentNew.types';\nimport './Header.css';\n\nconst Header: React.FC<HeaderProps> = ({ image, title, subtitle, onClose }) => {\n return (\n <header className=\"cw-header\" role=\"banner\">\n <div className=\"cw-header__identity\">\n {image && (\n <img\n src={image}\n alt={`${title} avatar`}\n className=\"cw-header__avatar\"\n />\n )}\n <div className=\"cw-header__text\">\n <span className=\"cw-header__title\">{title}</span>\n {subtitle && (\n <span className=\"cw-header__subtitle\">{subtitle}</span>\n )}\n </div>\n </div>\n <button\n className=\"cw-header__close\"\n onClick={onClose}\n aria-label=\"Close chat\"\n type=\"button\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </button>\n </header>\n );\n};\n\nexport default Header;\n", "import React, { useRef, useState, useCallback } from 'react';\nimport { FooterProps } from '../SiteChatComponentNew.types';\nimport './Footer.css';\n\nconst Footer: React.FC<FooterProps> = ({ onSend, onAttachment, disabled }) => {\n const [text, setText] = useState('');\n const fileInputRef = useRef<HTMLInputElement | null>(null);\n const textareaRef = useRef<HTMLTextAreaElement | null>(null);\n\n const isEmpty = text.trim().length === 0;\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n if (!isEmpty && !disabled) {\n onSend(text.trim());\n setText('');\n // Reset textarea height\n if (textareaRef.current) {\n textareaRef.current.style.height = 'auto';\n }\n }\n }\n },\n [isEmpty, disabled, onSend, text],\n );\n\n const handleSend = useCallback(() => {\n if (!isEmpty && !disabled) {\n onSend(text.trim());\n setText('');\n if (textareaRef.current) {\n textareaRef.current.style.height = 'auto';\n textareaRef.current.focus();\n }\n }\n }, [isEmpty, disabled, onSend, text]);\n\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n setText(e.target.value);\n // Auto-grow textarea up to ~120px\n const el = e.target;\n el.style.height = 'auto';\n el.style.height = `${Math.min(el.scrollHeight, 120)}px`;\n },\n [],\n );\n\n const handleAttachmentClick = useCallback(() => {\n fileInputRef.current?.click();\n }, []);\n\n const handleFileChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const file = e.target.files?.[0];\n if (file) {\n onAttachment(file);\n }\n // Reset the file input so same file can be re-selected\n if (fileInputRef.current) {\n fileInputRef.current.value = '';\n }\n },\n [onAttachment],\n );\n\n return (\n <footer className=\"cw-footer\" role=\"contentinfo\">\n <button\n className=\"cw-footer__attach-btn\"\n onClick={handleAttachmentClick}\n aria-label=\"Attach file\"\n type=\"button\"\n disabled={disabled}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48\" />\n </svg>\n </button>\n\n <textarea\n ref={textareaRef}\n className=\"cw-footer__input\"\n value={text}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n placeholder=\"Type a message\u2026\"\n aria-label=\"Message input\"\n rows={1}\n disabled={disabled}\n />\n\n <button\n className={`cw-footer__send-btn${isEmpty || disabled ? ' cw-footer__send-btn--disabled' : ''}`}\n onClick={handleSend}\n aria-label=\"Send message\"\n type=\"button\"\n disabled={isEmpty || disabled}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path d=\"M2.01 21L23 12 2.01 3 2 10l15 2-15 2z\" />\n </svg>\n </button>\n\n {/* Hidden file input */}\n <input\n ref={fileInputRef}\n type=\"file\"\n className=\"cw-footer__file-input\"\n onChange={handleFileChange}\n aria-hidden=\"true\"\n tabIndex={-1}\n />\n </footer>\n );\n};\n\nexport default Footer;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-ebcf221d\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-ebcf221d\";\n s.textContent = \".cw-footer {\\n display: flex;\\n align-items: flex-end;\\n gap: 8px;\\n padding: 10px 12px;\\n background-color: var(--cw-background);\\n border-top: 1px solid var(--cw-border);\\n flex-shrink: 0;\\n}\\n\\n.cw-footer__input {\\n flex: 1;\\n resize: none;\\n border: 1px solid var(--cw-input-border);\\n border-radius: var(--cw-button-radius);\\n background-color: var(--cw-input-background);\\n font-family: var(--cw-font-family);\\n font-size: var(--cw-font-size);\\n color: inherit;\\n padding: 8px 12px;\\n line-height: 1.5;\\n min-height: 38px;\\n max-height: 120px;\\n overflow-y: auto;\\n transition: border-color 0.15s ease;\\n}\\n\\n.cw-footer__input:focus {\\n outline: none;\\n border-color: var(--cw-primary);\\n box-shadow: 0 0 0 2px color-mix(in srgb, var(--cw-primary) 20%, transparent);\\n}\\n\\n.cw-footer__input:disabled {\\n opacity: 0.5;\\n cursor: not-allowed;\\n}\\n\\n.cw-footer__attach-btn,\\n.cw-footer__send-btn {\\n background: none;\\n border: none;\\n cursor: pointer;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n padding: 8px;\\n border-radius: 50%;\\n flex-shrink: 0;\\n transition: background-color 0.15s ease, color 0.15s ease;\\n color: var(--cw-primary);\\n margin-bottom: 1px;\\n}\\n\\n.cw-footer__attach-btn:hover,\\n.cw-footer__send-btn:not(.cw-footer__send-btn--disabled):hover {\\n background-color: color-mix(in srgb, var(--cw-primary) 10%, transparent);\\n}\\n\\n.cw-footer__attach-btn:focus-visible,\\n.cw-footer__send-btn:focus-visible {\\n outline: 2px solid var(--cw-primary);\\n outline-offset: 2px;\\n}\\n\\n.cw-footer__attach-btn:disabled {\\n opacity: 0.4;\\n cursor: not-allowed;\\n}\\n\\n.cw-footer__send-btn--disabled {\\n opacity: 0.35;\\n cursor: not-allowed;\\n}\\n\\n.cw-footer__file-input {\\n display: none;\\n}\\n\";\n document.head.appendChild(s);\n}", "import { useEffect, useRef, useState } from 'react';\n\n/**\n * Attaches a ref to a scrollable container. Automatically scrolls to the\n * bottom when new content is added, unless the user has manually scrolled up.\n */\nexport function useAutoScroll<T extends HTMLElement>(\n dependency: unknown,\n): React.MutableRefObject<T | null> {\n const ref = useRef<T | null>(null);\n const userScrolledUp = useRef(false);\n\n useEffect(() => {\n const el = ref.current;\n if (!el) return;\n\n const handleScroll = () => {\n const atBottom =\n el.scrollHeight - el.scrollTop - el.clientHeight < 64;\n userScrolledUp.current = !atBottom;\n };\n\n el.addEventListener('scroll', handleScroll, { passive: true });\n return () => el.removeEventListener('scroll', handleScroll);\n }, []);\n\n useEffect(() => {\n const el = ref.current;\n if (!el || userScrolledUp.current) return;\n\n el.scrollTo({ top: el.scrollHeight, behavior: 'smooth' });\n }, [dependency]);\n\n return ref;\n}\n\n/**\n * Expose a way for the consumer to force-scroll to bottom (e.g. when\n * the user clicks a \"scroll to bottom\" button).\n */\nexport function useAutoScrollWithControl<T extends HTMLElement>(\n dependency: unknown,\n): {\n ref: React.MutableRefObject<T | null>;\n scrollToBottom: () => void;\n isScrolledUp: boolean;\n} {\n const ref = useRef<T | null>(null);\n const userScrolledUp = useRef(false);\n const [isScrolledUp, setIsScrolledUp] = useState(false);\n\n useEffect(() => {\n const el = ref.current;\n if (!el) return;\n\n const handleScroll = () => {\n const atBottom =\n el.scrollHeight - el.scrollTop - el.clientHeight < 64;\n userScrolledUp.current = !atBottom;\n setIsScrolledUp(!atBottom);\n };\n\n el.addEventListener('scroll', handleScroll, { passive: true });\n return () => el.removeEventListener('scroll', handleScroll);\n }, []);\n\n useEffect(() => {\n const el = ref.current;\n if (!el || userScrolledUp.current) return;\n el.scrollTo({ top: el.scrollHeight, behavior: 'smooth' });\n }, [dependency]);\n\n const scrollToBottom = () => {\n const el = ref.current;\n if (!el) return;\n userScrolledUp.current = false;\n setIsScrolledUp(false);\n el.scrollTo({ top: el.scrollHeight, behavior: 'smooth' });\n };\n\n return { ref, scrollToBottom, isScrolledUp };\n}\n", "import { useState, useCallback } from 'react';\nimport { OfflineField, OfflineFormSchema } from '../SiteChatComponentNew.types';\n\ntype FieldValues = Record<string, unknown>;\ntype FieldErrors = Record<string, string>;\n\nfunction validateField(field: OfflineField, value: unknown): string {\n if (field.required) {\n if (field.type === 'checkbox' && !value) {\n return `${field.label} is required.`;\n }\n if (\n field.type !== 'checkbox' &&\n (value === undefined || value === null || String(value).trim() === '')\n ) {\n return `${field.label} is required.`;\n }\n }\n\n if (field.type === 'email') {\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n if (value && !emailRegex.test(String(value))) {\n return 'Please enter a valid email address.';\n }\n }\n\n if (field.type === 'phone') {\n const phoneRegex = /^\\+?[\\d\\s\\-().]{7,20}$/;\n if (value && !phoneRegex.test(String(value))) {\n return 'Please enter a valid phone number.';\n }\n }\n\n return '';\n}\n\nexport function useOfflineForm(schema: OfflineFormSchema) {\n const initialValues: FieldValues = {};\n for (const field of schema.fields) {\n initialValues[field.id] = field.type === 'checkbox' ? false : '';\n }\n\n const [values, setValues] = useState<FieldValues>(initialValues);\n const [errors, setErrors] = useState<FieldErrors>({});\n const [submitted, setSubmitted] = useState(false);\n\n const setValue = useCallback(\n (id: string, value: unknown) => {\n setValues((prev) => ({ ...prev, [id]: value }));\n\n if (submitted) {\n const field = schema.fields.find((f) => f.id === id);\n if (field) {\n const error = validateField(field, value);\n setErrors((prev) => ({ ...prev, [id]: error }));\n }\n }\n },\n [schema.fields, submitted],\n );\n\n const validate = useCallback((): boolean => {\n const newErrors: FieldErrors = {};\n let valid = true;\n\n for (const field of schema.fields) {\n const error = validateField(field, values[field.id]);\n newErrors[field.id] = error;\n if (error) valid = false;\n }\n\n setErrors(newErrors);\n return valid;\n }, [schema.fields, values]);\n\n const handleSubmit = useCallback(\n (onSubmit: (values: FieldValues) => void) => {\n setSubmitted(true);\n if (validate()) {\n onSubmit(values);\n }\n },\n [validate, values],\n );\n\n const reset = useCallback(() => {\n setValues(initialValues);\n setErrors({});\n setSubmitted(false);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return { values, errors, setValue, handleSubmit, reset };\n}\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-aed321e0\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-aed321e0\";\n s.textContent = \".cw-user-message {\\n display: flex;\\n flex-direction: column;\\n align-items: flex-end;\\n max-width: 75%;\\n align-self: flex-end;\\n gap: 3px;\\n}\\n\\n.cw-user-message__bubble {\\n background-color: var(--cw-user-bubble);\\n color: var(--cw-user-text);\\n padding: 10px 14px;\\n border-radius: 18px 18px 4px 18px;\\n font-size: var(--cw-font-size);\\n line-height: 1.5;\\n word-break: break-word;\\n white-space: pre-wrap;\\n}\\n\\n.cw-user-message__time {\\n font-size: 11px;\\n color: var(--cw-system-text);\\n padding-right: 2px;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { MessageProps } from '../SiteChatComponentNew.types';\nimport { formatTime } from '../utils';\nimport './UserMessage.css';\n\ninterface UserMessageProps {\n message: MessageProps;\n}\n\nconst UserMessage: React.FC<UserMessageProps> = ({ message }) => {\n return (\n <div className=\"cw-user-message\" role=\"listitem\" aria-label=\"Your message\">\n <div className=\"cw-user-message__bubble\">{message.message}</div>\n {message.timestamp !== undefined && (\n <span className=\"cw-user-message__time\">\n {formatTime(message.timestamp)}\n </span>\n )}\n </div>\n );\n};\n\nexport default UserMessage;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-ce14fbec\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-ce14fbec\";\n s.textContent = \".cw-avatar {\\n border-radius: 50%;\\n flex-shrink: 0;\\n display: inline-flex;\\n align-items: center;\\n justify-content: center;\\n}\\n\\n.cw-avatar--image {\\n object-fit: cover;\\n}\\n\\n.cw-avatar--initials {\\n background-color: var(--cw-primary);\\n color: #ffffff;\\n font-weight: 600;\\n user-select: none;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport './Avatar.css';\n\ninterface AvatarProps {\n src?: string;\n name?: string;\n size?: number;\n}\n\nfunction getInitials(name: string): string {\n return name\n .split(' ')\n .slice(0, 2)\n .map((w) => w[0])\n .join('')\n .toUpperCase();\n}\n\nconst Avatar: React.FC<AvatarProps> = ({ src, name, size = 32 }) => {\n const style = {\n width: `${size}px`,\n height: `${size}px`,\n fontSize: `${Math.round(size * 0.38)}px`,\n };\n\n if (src) {\n return (\n <img\n src={src}\n alt={name ? `${name} avatar` : 'Agent avatar'}\n className=\"cw-avatar cw-avatar--image\"\n style={style}\n />\n );\n }\n\n return (\n <span\n className=\"cw-avatar cw-avatar--initials\"\n aria-label={name ? `${name} avatar` : 'Agent avatar'}\n style={style}\n >\n {name ? getInitials(name) : 'A'}\n </span>\n );\n};\n\nexport default Avatar;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-2aa106ea\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-2aa106ea\";\n s.textContent = \".cw-button {\\n display: inline-flex;\\n align-items: center;\\n justify-content: center;\\n gap: 8px;\\n padding: 10px 20px;\\n border: none;\\n border-radius: var(--cw-button-radius);\\n font-family: var(--cw-font-family);\\n font-size: var(--cw-font-size);\\n font-weight: 600;\\n cursor: pointer;\\n transition: opacity 0.15s ease, transform 0.1s ease;\\n white-space: nowrap;\\n}\\n\\n.cw-button:focus-visible {\\n outline: 2px solid var(--cw-primary);\\n outline-offset: 3px;\\n}\\n\\n.cw-button:active:not(:disabled) {\\n transform: scale(0.98);\\n}\\n\\n.cw-button:disabled {\\n opacity: 0.45;\\n cursor: not-allowed;\\n}\\n\\n.cw-button--primary {\\n background-color: var(--cw-primary);\\n color: #ffffff;\\n}\\n\\n.cw-button--primary:hover:not(:disabled) {\\n opacity: 0.88;\\n}\\n\\n.cw-button--secondary {\\n background-color: var(--cw-surface);\\n color: var(--cw-primary);\\n border: 1px solid var(--cw-border);\\n}\\n\\n.cw-button--secondary:hover:not(:disabled) {\\n background-color: var(--cw-border);\\n}\\n\\n.cw-button--full {\\n width: 100%;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport './Button.css';\n\ninterface ButtonProps {\n children: React.ReactNode;\n onClick?: () => void;\n variant?: 'primary' | 'secondary';\n disabled?: boolean;\n type?: 'button' | 'submit' | 'reset';\n fullWidth?: boolean;\n ariaLabel?: string;\n}\n\nconst Button: React.FC<ButtonProps> = ({\n children,\n onClick,\n variant = 'primary',\n disabled = false,\n type = 'button',\n fullWidth = false,\n ariaLabel,\n}) => {\n return (\n <button\n className={`cw-button cw-button--${variant}${fullWidth ? ' cw-button--full' : ''}`}\n onClick={onClick}\n disabled={disabled}\n type={type}\n aria-label={ariaLabel}\n >\n {children}\n </button>\n );\n};\n\nexport default Button;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-5df522b1\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-5df522b1\";\n s.textContent = \".cw-agent-message {\\n display: flex;\\n align-items: flex-end;\\n gap: 8px;\\n max-width: 75%;\\n align-self: flex-start;\\n}\\n\\n.cw-agent-message__content {\\n display: flex;\\n flex-direction: column;\\n gap: 3px;\\n}\\n\\n.cw-agent-message__name {\\n font-size: 11px;\\n font-weight: 600;\\n color: var(--cw-system-text);\\n padding-left: 2px;\\n}\\n\\n.cw-agent-message__bubble {\\n background-color: var(--cw-agent-bubble);\\n color: var(--cw-agent-text);\\n padding: 10px 14px;\\n border-radius: 18px 18px 18px 4px;\\n font-size: var(--cw-font-size);\\n line-height: 1.5;\\n word-break: break-word;\\n white-space: pre-wrap;\\n}\\n\\n.cw-agent-message__time {\\n font-size: 11px;\\n color: var(--cw-system-text);\\n padding-left: 2px;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { MessageProps } from '../SiteChatComponentNew.types';\nimport { formatTime } from '../utils';\nimport { Avatar } from '../Shared';\nimport './AgentMessage.css';\n\ninterface AgentMessageProps {\n message: MessageProps;\n}\n\nconst AgentMessage: React.FC<AgentMessageProps> = ({ message }) => {\n return (\n <div\n className=\"cw-agent-message\"\n role=\"listitem\"\n aria-label={`Message from ${message.senderName ?? 'Agent'}`}\n >\n <Avatar name={message.senderName} size={32} />\n <div className=\"cw-agent-message__content\">\n {message.senderName && (\n <span className=\"cw-agent-message__name\">{message.senderName}</span>\n )}\n <div className=\"cw-agent-message__bubble\">{message.message}</div>\n {message.timestamp !== undefined && (\n <span className=\"cw-agent-message__time\">\n {formatTime(message.timestamp)}\n </span>\n )}\n </div>\n </div>\n );\n};\n\nexport default AgentMessage;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-464a3601\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-464a3601\";\n s.textContent = \".cw-system-message {\\n display: flex;\\n align-items: center;\\n gap: 10px;\\n align-self: stretch;\\n padding: 4px 8px;\\n}\\n\\n.cw-system-message__line {\\n flex: 1;\\n border-top: 1px dashed var(--cw-border);\\n}\\n\\n.cw-system-message__text {\\n font-size: 11px;\\n color: var(--cw-system-text);\\n white-space: nowrap;\\n flex-shrink: 0;\\n font-style: italic;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { MessageProps } from '../SiteChatComponentNew.types';\nimport { getSystemLabel } from '../utils';\nimport './SystemMessage.css';\n\ninterface SystemMessageProps {\n message: MessageProps;\n}\n\nconst SystemMessage: React.FC<SystemMessageProps> = ({ message }) => {\n const label = message.message\n ? getSystemLabel(message.message)\n : message.message ?? '';\n\n return (\n <div\n className=\"cw-system-message\"\n role=\"listitem\"\n aria-label={`System notification: ${label}`}\n >\n <span className=\"cw-system-message__line\" aria-hidden=\"true\" />\n <span className=\"cw-system-message__text\">{label}</span>\n <span className=\"cw-system-message__line\" aria-hidden=\"true\" />\n </div>\n );\n};\n\nexport default SystemMessage;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-dd846dee\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-dd846dee\";\n s.textContent = \".cw-attachment-message {\\n display: flex;\\n flex-direction: column;\\n gap: 3px;\\n align-self: flex-start;\\n max-width: 80%;\\n}\\n\\n.cw-attachment-message--user {\\n align-self: flex-end;\\n align-items: flex-end;\\n}\\n\\n.cw-attachment-message__card {\\n display: flex;\\n align-items: center;\\n gap: 10px;\\n background-color: var(--cw-agent-bubble);\\n border: 1px solid var(--cw-border);\\n border-radius: 12px;\\n padding: 10px 14px;\\n}\\n\\n.cw-attachment-message--user .cw-attachment-message__card {\\n background-color: var(--cw-user-bubble);\\n border-color: transparent;\\n color: var(--cw-user-text);\\n}\\n\\n.cw-attachment-message__icon {\\n flex-shrink: 0;\\n opacity: 0.75;\\n display: flex;\\n align-items: center;\\n}\\n\\n.cw-attachment-message__info {\\n display: flex;\\n flex-direction: column;\\n min-width: 0;\\n flex: 1;\\n}\\n\\n.cw-attachment-message__name {\\n font-size: 13px;\\n font-weight: 600;\\n white-space: nowrap;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n}\\n\\n.cw-attachment-message__label {\\n font-size: 11px;\\n opacity: 0.65;\\n}\\n\\n.cw-attachment-message__open-btn {\\n background-color: var(--cw-primary);\\n color: #ffffff;\\n border: none;\\n border-radius: 6px;\\n padding: 5px 12px;\\n font-family: var(--cw-font-family);\\n font-size: 12px;\\n font-weight: 600;\\n cursor: pointer;\\n flex-shrink: 0;\\n transition: opacity 0.15s ease;\\n}\\n\\n.cw-attachment-message--user .cw-attachment-message__open-btn {\\n background-color: rgba(255, 255, 255, 0.25);\\n color: #ffffff;\\n}\\n\\n.cw-attachment-message__open-btn:hover {\\n opacity: 0.85;\\n}\\n\\n.cw-attachment-message__open-btn:focus-visible {\\n outline: 2px solid var(--cw-primary);\\n outline-offset: 2px;\\n}\\n\\n.cw-attachment-message__time {\\n font-size: 11px;\\n color: var(--cw-system-text);\\n padding-left: 2px;\\n}\\n\\n.cw-attachment-message__time--right {\\n padding-left: 0;\\n padding-right: 2px;\\n align-self: flex-end;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { MessageProps } from '../SiteChatComponentNew.types';\nimport { formatTime } from '../utils';\nimport './AttachmentMessage.css';\n\ninterface AttachmentMessageProps {\n message: MessageProps;\n}\n\nconst AttachmentMessage: React.FC<AttachmentMessageProps> = ({ message }) => {\n // Support both `item` (new) and `attachment` (legacy) field names\n const attachment = message.item ?? message.attachment;\n if (!attachment) return null;\n\n const handleOpen = () => {\n window.open(attachment.url, '_blank', 'noopener,noreferrer');\n };\n\n return (\n <div\n className={`cw-attachment-message${message.senderType === 'user' ? ' cw-attachment-message--user' : ''}`}\n role=\"listitem\"\n aria-label={`Attachment: ${attachment.name}`}\n >\n <div className=\"cw-attachment-message__card\">\n <div className=\"cw-attachment-message__icon\" aria-hidden=\"true\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z\" />\n <polyline points=\"14 2 14 8 20 8\" />\n </svg>\n </div>\n <div className=\"cw-attachment-message__info\">\n <span className=\"cw-attachment-message__name\">{attachment.name}</span>\n <span className=\"cw-attachment-message__label\">Attachment</span>\n </div>\n <button\n className=\"cw-attachment-message__open-btn\"\n onClick={handleOpen}\n aria-label={`Open attachment ${attachment.name}`}\n type=\"button\"\n >\n Open\n </button>\n </div>\n {message.timestamp !== undefined && (\n <span\n className={`cw-attachment-message__time${message.senderType === 'user' ? ' cw-attachment-message__time--right' : ''}`}\n >\n {formatTime(message.timestamp)}\n </span>\n )}\n </div>\n );\n};\n\nexport default AttachmentMessage;\n", "import React from 'react';\nimport { MessageProps } from '../SiteChatComponentNew.types';\nimport UserMessage from './UserMessage';\nimport AgentMessage from './AgentMessage';\nimport SystemMessage from './SystemMessage';\nimport AttachmentMessage from './AttachmentMessage';\n\ninterface MessageRendererProps {\n message: MessageProps;\n}\n\nconst MessageRenderer: React.FC<MessageRendererProps> = ({ message }) => {\n if (message.messageType === 'ATTACHMENT') {\n return <AttachmentMessage message={message} />;\n }\n\n switch (message.senderType) {\n case 'user':\n return <UserMessage message={message} />;\n case 'agent':\n return <AgentMessage message={message} />;\n case 'system':\n return <SystemMessage message={message} />;\n default:\n return null;\n }\n};\n\nexport default MessageRenderer;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-15ae1a6b\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-15ae1a6b\";\n s.textContent = \".cw-message-list {\\n flex: 1;\\n display: flex;\\n flex-direction: column;\\n gap: 10px;\\n overflow-y: auto;\\n padding: 16px;\\n background-color: var(--cw-background);\\n scroll-behavior: smooth;\\n}\\n\\n/* Scrollbar styling */\\n.cw-message-list::-webkit-scrollbar {\\n width: 5px;\\n}\\n\\n.cw-message-list::-webkit-scrollbar-track {\\n background: transparent;\\n}\\n\\n.cw-message-list::-webkit-scrollbar-thumb {\\n background-color: var(--cw-border);\\n border-radius: 10px;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { MessageProps } from '../SiteChatComponentNew.types';\nimport { useAutoScroll } from '../hooks';\nimport MessageRenderer from './MessageRenderer';\nimport './MessageList.css';\n\ninterface MessageListProps {\n messages: MessageProps[];\n}\n\nconst MessageList: React.FC<MessageListProps> = ({ messages }) => {\n const scrollRef = useAutoScroll<HTMLDivElement>(messages);\n\n return (\n <div\n ref={scrollRef}\n className=\"cw-message-list\"\n role=\"list\"\n aria-label=\"Chat messages\"\n aria-live=\"polite\"\n aria-relevant=\"additions\"\n >\n {messages.map((msg, index) => (\n <MessageRenderer\n key={msg._id ?? `${msg.timestamp ?? index}-${index}`}\n message={msg}\n />\n ))}\n {/* TypingIndicator removed \u2014 no longer part of the public API */}\n </div>\n );\n};\n\nexport default MessageList;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-4b0ca05b\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-4b0ca05b\";\n s.textContent = \"@keyframes cw-bounce {\\n 0%, 60%, 100% {\\n transform: translateY(0);\\n }\\n 30% {\\n transform: translateY(-6px);\\n }\\n}\\n\\n.cw-typing-indicator {\\n align-self: flex-start;\\n}\\n\\n.cw-typing-indicator__bubble {\\n display: inline-flex;\\n align-items: center;\\n gap: 4px;\\n background-color: var(--cw-agent-bubble);\\n border-radius: 18px 18px 18px 4px;\\n padding: 10px 14px;\\n}\\n\\n.cw-typing-indicator__dot {\\n display: block;\\n width: 7px;\\n height: 7px;\\n border-radius: 50%;\\n background-color: var(--cw-system-text);\\n animation: cw-bounce 1.2s infinite ease-in-out;\\n}\\n\\n.cw-typing-indicator__dot:nth-child(2) {\\n animation-delay: 0.2s;\\n}\\n\\n.cw-typing-indicator__dot:nth-child(3) {\\n animation-delay: 0.4s;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport './TypingIndicator.css';\n\nconst TypingIndicator: React.FC = () => {\n return (\n <div\n className=\"cw-typing-indicator\"\n role=\"status\"\n aria-label=\"Agent is typing\"\n >\n <div className=\"cw-typing-indicator__bubble\">\n <span className=\"cw-typing-indicator__dot\" />\n <span className=\"cw-typing-indicator__dot\" />\n <span className=\"cw-typing-indicator__dot\" />\n </div>\n </div>\n );\n};\n\nexport default TypingIndicator;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-7a5a4f05\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-7a5a4f05\";\n s.textContent = \"@keyframes cw-spin {\\n to {\\n transform: rotate(360deg);\\n }\\n}\\n\\n.cw-loading-state {\\n flex: 1;\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n justify-content: center;\\n padding: 32px;\\n background-color: var(--cw-background);\\n text-align: center;\\n gap: 12px;\\n}\\n\\n.cw-loading-state__spinner {\\n width: 48px;\\n height: 48px;\\n}\\n\\n.cw-loading-state__spinner-ring {\\n width: 48px;\\n height: 48px;\\n border-radius: 50%;\\n border: 3px solid var(--cw-border);\\n border-top-color: var(--cw-primary);\\n animation: cw-spin 0.8s linear infinite;\\n}\\n\\n.cw-loading-state__title {\\n font-size: 16px;\\n font-weight: 600;\\n color: var(--cw-agent-text);\\n margin: 0;\\n}\\n\\n.cw-loading-state__subtitle {\\n font-size: 13px;\\n color: var(--cw-system-text);\\n margin: 0;\\n max-width: 240px;\\n line-height: 1.5;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport './LoadingState.css';\n\nconst LoadingState: React.FC = () => {\n return (\n <div\n className=\"cw-loading-state\"\n role=\"status\"\n aria-label=\"Connecting to chat\"\n >\n <div className=\"cw-loading-state__spinner\" aria-hidden=\"true\">\n <div className=\"cw-loading-state__spinner-ring\" />\n </div>\n <p className=\"cw-loading-state__title\">Connecting\u2026</p>\n <p className=\"cw-loading-state__subtitle\">\n Please wait while we connect you to an available agent.\n </p>\n </div>\n );\n};\n\nexport default LoadingState;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-3e05ef30\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-3e05ef30\";\n s.textContent = \".cw-start-chat-state {\\n flex: 1;\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n justify-content: center;\\n padding: 32px 24px;\\n background-color: var(--cw-background);\\n text-align: center;\\n gap: 14px;\\n}\\n\\n.cw-start-chat-state__image {\\n width: 80px;\\n height: 80px;\\n object-fit: contain;\\n border-radius: 50%;\\n margin-bottom: 4px;\\n}\\n\\n.cw-start-chat-state__title {\\n font-size: 20px;\\n font-weight: 700;\\n color: var(--cw-agent-text);\\n margin: 0;\\n}\\n\\n.cw-start-chat-state__description {\\n font-size: 14px;\\n color: var(--cw-system-text);\\n margin: 0;\\n max-width: 260px;\\n line-height: 1.6;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { Button } from '../Shared';\nimport './StartChatState.css';\n\ninterface StartChatStateProps {\n image?: string;\n title: string;\n description?: string;\n onStart: () => void;\n}\n\nconst StartChatState: React.FC<StartChatStateProps> = ({\n image,\n title,\n description,\n onStart,\n}) => {\n return (\n <div\n className=\"cw-start-chat-state\"\n role=\"main\"\n aria-label=\"Start a chat\"\n >\n {image && (\n <img\n src={image}\n alt=\"Support illustration\"\n className=\"cw-start-chat-state__image\"\n />\n )}\n <h2 className=\"cw-start-chat-state__title\">{title}</h2>\n {description && (\n <p className=\"cw-start-chat-state__description\">{description}</p>\n )}\n <Button onClick={onStart} ariaLabel=\"Start chat\">\n Start Chat\n </Button>\n </div>\n );\n};\n\nexport default StartChatState;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-d9ff3956\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-d9ff3956\";\n s.textContent = \".cw-offline-form {\\n display: flex;\\n flex-direction: column;\\n gap: 14px;\\n}\\n\\n.cw-offline-form__title {\\n font-size: 15px;\\n font-weight: 600;\\n color: var(--cw-agent-text);\\n margin: 0 0 4px;\\n}\\n\\n/* Field wrapper */\\n.cw-offline-form__field {\\n display: flex;\\n flex-direction: column;\\n gap: 5px;\\n}\\n\\n.cw-offline-form__field--checkbox {\\n gap: 4px;\\n}\\n\\n/* Label */\\n.cw-offline-form__label {\\n font-size: 13px;\\n font-weight: 500;\\n color: var(--cw-agent-text);\\n}\\n\\n.cw-offline-form__required {\\n color: #ef4444;\\n}\\n\\n/* Text input */\\n.cw-offline-form__input {\\n width: 100%;\\n padding: 8px 12px;\\n border: 1px solid var(--cw-input-border);\\n border-radius: var(--cw-button-radius);\\n background-color: var(--cw-input-background);\\n font-family: var(--cw-font-family);\\n font-size: var(--cw-font-size);\\n color: inherit;\\n box-sizing: border-box;\\n transition: border-color 0.15s ease;\\n}\\n\\n.cw-offline-form__input:focus {\\n outline: none;\\n border-color: var(--cw-primary);\\n box-shadow: 0 0 0 2px color-mix(in srgb, var(--cw-primary) 20%, transparent);\\n}\\n\\n.cw-offline-form__input--error {\\n border-color: #ef4444;\\n}\\n\\n/* Textarea */\\n.cw-offline-form__textarea {\\n width: 100%;\\n padding: 8px 12px;\\n border: 1px solid var(--cw-input-border);\\n border-radius: var(--cw-button-radius);\\n background-color: var(--cw-input-background);\\n font-family: var(--cw-font-family);\\n font-size: var(--cw-font-size);\\n color: inherit;\\n resize: vertical;\\n box-sizing: border-box;\\n transition: border-color 0.15s ease;\\n}\\n\\n.cw-offline-form__textarea:focus {\\n outline: none;\\n border-color: var(--cw-primary);\\n box-shadow: 0 0 0 2px color-mix(in srgb, var(--cw-primary) 20%, transparent);\\n}\\n\\n.cw-offline-form__textarea--error {\\n border-color: #ef4444;\\n}\\n\\n/* Select */\\n.cw-offline-form__select {\\n width: 100%;\\n padding: 8px 12px;\\n border: 1px solid var(--cw-input-border);\\n border-radius: var(--cw-button-radius);\\n background-color: var(--cw-input-background);\\n font-family: var(--cw-font-family);\\n font-size: var(--cw-font-size);\\n color: inherit;\\n box-sizing: border-box;\\n appearance: none;\\n background-image: url(\\\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E\\\");\\n background-repeat: no-repeat;\\n background-position: right 12px center;\\n padding-right: 32px;\\n cursor: pointer;\\n transition: border-color 0.15s ease;\\n}\\n\\n.cw-offline-form__select:focus {\\n outline: none;\\n border-color: var(--cw-primary);\\n box-shadow: 0 0 0 2px color-mix(in srgb, var(--cw-primary) 20%, transparent);\\n}\\n\\n.cw-offline-form__select--error {\\n border-color: #ef4444;\\n}\\n\\n/* Checkbox */\\n.cw-offline-form__checkbox-label {\\n display: flex;\\n align-items: flex-start;\\n gap: 8px;\\n cursor: pointer;\\n font-size: 13px;\\n color: var(--cw-agent-text);\\n}\\n\\n.cw-offline-form__checkbox {\\n width: 16px;\\n height: 16px;\\n accent-color: var(--cw-primary);\\n flex-shrink: 0;\\n margin-top: 1px;\\n cursor: pointer;\\n}\\n\\n.cw-offline-form__checkbox:focus-visible {\\n outline: 2px solid var(--cw-primary);\\n outline-offset: 2px;\\n}\\n\\n.cw-offline-form__checkbox-text {\\n line-height: 1.4;\\n}\\n\\n/* Error message */\\n.cw-offline-form__error {\\n font-size: 12px;\\n color: #ef4444;\\n font-weight: 500;\\n}\\n\\n/* Actions */\\n.cw-offline-form__actions {\\n margin-top: 4px;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { OfflineField, OfflineFormSchema } from '../SiteChatComponentNew.types';\nimport { useOfflineForm } from '../hooks';\nimport { Button } from '../Shared';\nimport './OfflineForm.css';\n\ninterface OfflineFormProps {\n schema: OfflineFormSchema;\n onSubmit: (values: Record<string, unknown>) => void;\n}\n\ninterface FieldRendererProps {\n field: OfflineField;\n value: unknown;\n error: string;\n onChange: (id: string, value: unknown) => void;\n}\n\nconst FieldRenderer: React.FC<FieldRendererProps> = ({\n field,\n value,\n error,\n onChange,\n}) => {\n const hasError = error.length > 0;\n const fieldId = `cw-offline-field-${field.id}`;\n const errorId = `${fieldId}-error`;\n\n const commonProps = {\n id: fieldId,\n className: `cw-offline-form__input${hasError ? ' cw-offline-form__input--error' : ''}`,\n 'aria-invalid': hasError,\n 'aria-describedby': hasError ? errorId : undefined,\n required: field.required,\n };\n\n if (field.type === 'textarea') {\n return (\n <div className=\"cw-offline-form__field\">\n <label htmlFor={fieldId} className=\"cw-offline-form__label\">\n {field.label}\n {field.required && (\n <span className=\"cw-offline-form__required\" aria-hidden=\"true\">\n {' '}*\n </span>\n )}\n </label>\n <textarea\n {...commonProps}\n value={String(value ?? '')}\n placeholder={field.placeholder}\n rows={3}\n onChange={(e) => onChange(field.id, e.target.value)}\n className={`cw-offline-form__textarea${hasError ? ' cw-offline-form__textarea--error' : ''}`}\n />\n {hasError && (\n <span id={errorId} className=\"cw-offline-form__error\" role=\"alert\">\n {error}\n </span>\n )}\n </div>\n );\n }\n\n if (field.type === 'select') {\n return (\n <div className=\"cw-offline-form__field\">\n <label htmlFor={fieldId} className=\"cw-offline-form__label\">\n {field.label}\n {field.required && (\n <span className=\"cw-offline-form__required\" aria-hidden=\"true\">\n {' '}*\n </span>\n )}\n </label>\n <select\n {...commonProps}\n value={String(value ?? '')}\n onChange={(e) => onChange(field.id, e.target.value)}\n className={`cw-offline-form__select${hasError ? ' cw-offline-form__select--error' : ''}`}\n >\n <option value=\"\">\n {field.placeholder ?? `Select ${field.label}`}\n </option>\n {field.options?.map((opt) => (\n <option key={opt.value} value={opt.value}>\n {opt.label}\n </option>\n ))}\n </select>\n {hasError && (\n <span id={errorId} className=\"cw-offline-form__error\" role=\"alert\">\n {error}\n </span>\n )}\n </div>\n );\n }\n\n if (field.type === 'checkbox') {\n return (\n <div className=\"cw-offline-form__field cw-offline-form__field--checkbox\">\n <label className=\"cw-offline-form__checkbox-label\" htmlFor={fieldId}>\n <input\n type=\"checkbox\"\n id={fieldId}\n checked={Boolean(value)}\n onChange={(e) => onChange(field.id, e.target.checked)}\n className=\"cw-offline-form__checkbox\"\n aria-invalid={hasError}\n aria-describedby={hasError ? errorId : undefined}\n required={field.required}\n />\n <span className=\"cw-offline-form__checkbox-text\">\n {field.label}\n {field.required && (\n <span className=\"cw-offline-form__required\" aria-hidden=\"true\">\n {' '}*\n </span>\n )}\n </span>\n </label>\n {hasError && (\n <span id={errorId} className=\"cw-offline-form__error\" role=\"alert\">\n {error}\n </span>\n )}\n </div>\n );\n }\n\n // text | email | phone\n return (\n <div className=\"cw-offline-form__field\">\n <label htmlFor={fieldId} className=\"cw-offline-form__label\">\n {field.label}\n {field.required && (\n <span className=\"cw-offline-form__required\" aria-hidden=\"true\">\n {' '}*\n </span>\n )}\n </label>\n <input\n {...commonProps}\n type={field.type}\n value={String(value ?? '')}\n placeholder={field.placeholder}\n onChange={(e) => onChange(field.id, e.target.value)}\n />\n {hasError && (\n <span id={errorId} className=\"cw-offline-form__error\" role=\"alert\">\n {error}\n </span>\n )}\n </div>\n );\n};\n\nconst OfflineForm: React.FC<OfflineFormProps> = ({ schema, onSubmit }) => {\n const { values, errors, setValue, handleSubmit } = useOfflineForm(schema);\n\n const onFormSubmit = (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault();\n handleSubmit(onSubmit);\n };\n\n return (\n <form\n className=\"cw-offline-form\"\n onSubmit={onFormSubmit}\n aria-label={schema.title}\n noValidate\n >\n <h3 className=\"cw-offline-form__title\">{schema.title}</h3>\n\n {schema.fields.map((field) => (\n <FieldRenderer\n key={field.id}\n field={field}\n value={values[field.id]}\n error={errors[field.id] ?? ''}\n onChange={setValue}\n />\n ))}\n\n <div className=\"cw-offline-form__actions\">\n <Button type=\"submit\" fullWidth>\n {schema.submitButtonText}\n </Button>\n </div>\n </form>\n );\n};\n\nexport default OfflineForm;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-8b15ae78\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-8b15ae78\";\n s.textContent = \".cw-offline-state {\\n flex: 1;\\n display: flex;\\n flex-direction: column;\\n background-color: var(--cw-background);\\n overflow-y: auto;\\n}\\n\\n.cw-offline-state__header {\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n text-align: center;\\n padding: 28px 24px 16px;\\n gap: 8px;\\n}\\n\\n.cw-offline-state__icon {\\n width: 56px;\\n height: 56px;\\n border-radius: 50%;\\n background-color: color-mix(in srgb, var(--cw-primary) 10%, transparent);\\n color: var(--cw-primary);\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n margin-bottom: 4px;\\n}\\n\\n.cw-offline-state__title {\\n font-size: 17px;\\n font-weight: 700;\\n color: var(--cw-agent-text);\\n margin: 0;\\n}\\n\\n.cw-offline-state__subtitle {\\n font-size: 13px;\\n color: var(--cw-system-text);\\n margin: 0;\\n line-height: 1.6;\\n max-width: 280px;\\n}\\n\\n.cw-offline-state__form-wrapper {\\n padding: 0 16px 16px;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { OfflineFormSchema } from '../SiteChatComponentNew.types';\nimport OfflineForm from '../OfflineForm/OfflineForm';\nimport './OfflineState.css';\n\ninterface OfflineStateProps {\n form?: OfflineFormSchema;\n onSubmit: (values: Record<string, unknown>) => void;\n}\n\nconst OfflineState: React.FC<OfflineStateProps> = ({ form, onSubmit }) => {\n return (\n <div\n className=\"cw-offline-state\"\n role=\"main\"\n aria-label=\"Business is offline\"\n >\n <div className=\"cw-offline-state__header\">\n <div className=\"cw-offline-state__icon\" aria-hidden=\"true\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"32\"\n height=\"32\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z\" />\n </svg>\n </div>\n <h2 className=\"cw-offline-state__title\">We're currently offline</h2>\n <p className=\"cw-offline-state__subtitle\">\n Please leave us a message and we'll get back to you as soon as possible.\n </p>\n </div>\n\n {form && (\n <div className=\"cw-offline-state__form-wrapper\">\n <OfflineForm schema={form} onSubmit={onSubmit} />\n </div>\n )}\n </div>\n );\n};\n\nexport default OfflineState;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-59a49fdf\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-59a49fdf\";\n s.textContent = \".cw-chat-ended-state {\\n flex: 1;\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n justify-content: center;\\n padding: 32px 24px;\\n background-color: var(--cw-background);\\n text-align: center;\\n gap: 12px;\\n}\\n\\n.cw-chat-ended-state__icon {\\n width: 56px;\\n height: 56px;\\n border-radius: 50%;\\n background-color: color-mix(in srgb, var(--cw-primary) 10%, transparent);\\n color: var(--cw-primary);\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n}\\n\\n.cw-chat-ended-state__title {\\n font-size: 17px;\\n font-weight: 700;\\n color: var(--cw-agent-text);\\n margin: 0;\\n}\\n\\n.cw-chat-ended-state__subtitle {\\n font-size: 13px;\\n color: var(--cw-system-text);\\n margin: 0;\\n max-width: 240px;\\n line-height: 1.6;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport './ChatEndedState.css';\n\nconst ChatEndedState: React.FC = () => {\n return (\n <div\n className=\"cw-chat-ended-state\"\n role=\"status\"\n aria-label=\"Chat has ended\"\n >\n <div className=\"cw-chat-ended-state__icon\" aria-hidden=\"true\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"32\"\n height=\"32\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n </div>\n <p className=\"cw-chat-ended-state__title\">Chat Ended</p>\n <p className=\"cw-chat-ended-state__subtitle\">\n Your chat session has ended. Thank you for reaching out!\n </p>\n </div>\n );\n};\n\nexport default ChatEndedState;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-871af89c\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-871af89c\";\n s.textContent = \"/* \u2500\u2500\u2500 Root container \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\\n * Fixed to bottom-right by default so it works out-of-the-box.\\n * Override with your own positioning class if embedding differently.\\n * \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\\n.cw-root {\\n position: fixed;\\n bottom: max(24px, env(safe-area-inset-bottom));\\n right: max(24px, env(safe-area-inset-right));\\n display: flex;\\n flex-direction: column;\\n align-items: flex-end;\\n gap: 12px;\\n z-index: 9999;\\n /* Scope CSS vars and stacking context */\\n isolation: isolate;\\n font-family: var(--cw-font-family);\\n font-size: var(--cw-font-size);\\n}\\n\\n/* \u2500\u2500\u2500 Widget Panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\\n\\n.cw-widget {\\n display: flex;\\n flex-direction: column;\\n width: var(--cw-width);\\n height: var(--cw-height);\\n /* Clamp so it never overflows the viewport on small screens */\\n max-width: calc(100vw - 48px);\\n max-height: calc(100dvh - 96px);\\n background-color: var(--cw-background);\\n border-radius: var(--cw-border-radius);\\n box-shadow: var(--cw-shadow);\\n overflow: hidden;\\n /* Entry animation */\\n animation: cw-panel-in 0.22s ease;\\n transform-origin: bottom right;\\n}\\n\\n@keyframes cw-panel-in {\\n from {\\n opacity: 0;\\n transform: scale(0.92) translateY(10px);\\n }\\n to {\\n opacity: 1;\\n transform: scale(1) translateY(0);\\n }\\n}\\n\\n.cw-widget__body {\\n display: flex;\\n flex-direction: column;\\n flex: 1;\\n overflow: hidden;\\n}\\n\\n/* \u2500\u2500\u2500 Launcher Button \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\\n\\n.cw-launcher {\\n width: 56px;\\n height: 56px;\\n border-radius: 50%;\\n border: none;\\n background-color: var(--cw-primary);\\n color: #ffffff;\\n cursor: pointer;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);\\n flex-shrink: 0;\\n transition: transform 0.15s ease, box-shadow 0.15s ease;\\n}\\n\\n.cw-launcher:hover {\\n transform: scale(1.07);\\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.26);\\n}\\n\\n.cw-launcher:focus-visible {\\n outline: 3px solid var(--cw-primary);\\n outline-offset: 3px;\\n}\\n\\n.cw-launcher:active {\\n transform: scale(0.96);\\n}\\n\\n/* \u2500\u2500\u2500 Tablet (481px \u2013 768px): panel floats, slightly narrower margin \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\\n\\n@media (min-width: 481px) and (max-width: 768px) {\\n .cw-root {\\n bottom: max(16px, env(safe-area-inset-bottom));\\n right: max(16px, env(safe-area-inset-right));\\n }\\n\\n .cw-widget {\\n max-width: calc(100vw - 32px);\\n max-height: calc(100dvh - 80px);\\n }\\n}\\n\\n/* \u2500\u2500\u2500 Mobile (\u2264 480px): full-screen panel, launcher stays fixed \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\\n\\n@media (max-width: 480px) {\\n .cw-root {\\n bottom: 0;\\n right: 0;\\n gap: 0;\\n }\\n\\n .cw-root > .cw-launcher {\\n position: fixed;\\n bottom: max(20px, env(safe-area-inset-bottom));\\n right: max(20px, env(safe-area-inset-right));\\n }\\n\\n .cw-widget {\\n width: 100vw;\\n max-width: 100vw;\\n height: 100dvh;\\n max-height: 100dvh;\\n border-radius: 0;\\n transform-origin: bottom center;\\n }\\n}\\n\";\n document.head.appendChild(s);\n}"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAAkB;AAClB,IAAAC,wBAA0B;AAC1B,2BAAO;;;ACIA,SAAS,uBAAuB;AAGrC,SAAO,CAAC;AACV;;;ACVA,mBAAkB;AAElB,2BAAoB;AACpB,iCAAwB;AAQT;AANR,IAAM,YAAY,aAAAC,QAAM;AAAA,EAC3B,CAAC;AAAA,IACG;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP,OAAO,4CAAC,sCAAQ;AAAA,IAChB;AAAA,IACA,GAAG;AAAA,EACP,GAAG,QAAQ;AACP,WACI,4CAAC,SAAI,KACD;AAAA,MAAC;AAAA;AAAA,QACG,WAAU;AAAA,QACV;AAAA,QAEC;AAAA,mBAAS,aAAa,4CAAC,UAAK,WAAU,2CAA0C,sDAAC,4BAAI,QAAO,QAAQ,gBAAK,GAAM,IAAU;AAAA,UACzH,SAAS,cAAc,SAAS,SAAS,4CAAC,UAAK,WAAU,2CAA0C,sDAAC,UAAK,WAAU,4CAA4C,gBAAK,GAAO,IAAU;AAAA,UACrL,SAAS,SAAS,4CAAC,UAAK,WAAU,2CAA0C,sDAAC,4BAAI,QAAO,QAAO,OAAM,eAAe,gBAAK,GAAM,IAAU;AAAA;AAAA;AAAA,IAC9I,GACJ;AAAA,EAER;AACJ;AAEA,UAAU,cAAc;;;AC9BxB,IAAAC,gBAAkB;AAElB,IAAAC,wBAAgC;;;ACcxB,IAAAC,sBAAA;AAPR,IAAM,aAAwC,CAAC;AAAA,EAC3C,OAAO;AAAA,EACP,YAAY;AAAA,EACZ;AA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"React", "import_react", "import_design_system", "import_jsx_runtime", "import_react", "import_design_system", "import_wix_ui_icons_common", "import_jsx_runtime", "PageSmallIcon", "DismissIcon", "import_design_system", "import_wix_ui_icons_common", "import_jsx_runtime", "import_jsx_runtime", "React", "import_react", "import_design_system", "import_jsx_runtime", "React", "import_react", "import_design_system", "import_react", "import_design_system", "import_design_system", "import_wix_ui_icons_common", "import_jsx_runtime", "PageSmallIcon", "ArrowTopRightIcon", "import_jsx_runtime", "import_jsx_runtime", "React", "import_jsx_runtime", "React", "import_react", "import_react", "import_jsx_runtime", "Header", "import_react", "import_jsx_runtime", "Footer", "import_react", "import_react", "import_jsx_runtime", "import_jsx_runtime", "Avatar", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime", "React"]
7
7
  }