diff --git a/chuan-next/src/app/api/room-info/route.ts b/chuan-next/src/app/api/room-info/route.ts new file mode 100644 index 0000000..68ef2e3 --- /dev/null +++ b/chuan-next/src/app/api/room-info/route.ts @@ -0,0 +1,31 @@ +import { NextRequest, NextResponse } from 'next/server'; + +const GO_BACKEND_URL = process.env.GO_BACKEND_URL || 'http://localhost:8080'; + +export async function GET(request: NextRequest) { + try { + const { searchParams } = new URL(request.url); + const code = searchParams.get('code'); + + console.log('API Route: Getting room info, proxying to:', `${GO_BACKEND_URL}/api/room-info?code=${code}`); + + const response = await fetch(`${GO_BACKEND_URL}/api/room-info?code=${code}`, { + method: 'GET', + headers: { + 'Content-Type': 'application/json', + }, + }); + + const data = await response.json(); + + console.log('Backend response:', response.status, data); + + return NextResponse.json(data, { status: response.status }); + } catch (error) { + console.error('API Route Error:', error); + return NextResponse.json( + { error: 'Failed to get room info', details: error instanceof Error ? error.message : 'Unknown error' }, + { status: 500 } + ); + } +} diff --git a/chuan-next/src/components/WebRTCFileTransfer.tsx b/chuan-next/src/components/WebRTCFileTransfer.tsx index da7eac1..0466a04 100644 --- a/chuan-next/src/components/WebRTCFileTransfer.tsx +++ b/chuan-next/src/components/WebRTCFileTransfer.tsx @@ -4,7 +4,7 @@ import React, { useState, useEffect, useRef, useCallback } from 'react'; import { useSearchParams, useRouter } from 'next/navigation'; import { useWebRTCTransfer } from '@/hooks/useWebRTCTransfer'; import { Button } from '@/components/ui/button'; -import { toast } from '@/hooks/use-toast'; +import { useToast } from '@/components/ui/toast-simple'; import { Upload, Download } from 'lucide-react'; import { WebRTCFileUpload } from '@/components/webrtc/WebRTCFileUpload'; import { WebRTCFileReceive } from '@/components/webrtc/WebRTCFileReceive'; @@ -21,11 +21,17 @@ interface FileInfo { export const WebRTCFileTransfer: React.FC = () => { const searchParams = useSearchParams(); const router = useRouter(); + const { showToast } = useToast(); // 独立的文件状态 const [selectedFiles, setSelectedFiles] = useState([]); const [fileList, setFileList] = useState([]); const [downloadedFiles, setDownloadedFiles] = useState>(new Map()); + const [currentTransferFile, setCurrentTransferFile] = useState<{ + fileId: string; + fileName: string; + progress: number; + } | null>(null); // 房间状态 const [pickupCode, setPickupCode] = useState(''); @@ -34,9 +40,8 @@ export const WebRTCFileTransfer: React.FC = () => { const { isConnected, - isTransferring, + isConnecting, isWebSocketConnected, - transferProgress, error, connect, disconnect, @@ -45,7 +50,8 @@ export const WebRTCFileTransfer: React.FC = () => { requestFile: requestFileFromHook, onFileReceived, onFileListReceived, - onFileRequested + onFileRequested, + onFileProgress } = useWebRTCTransfer(); // 从URL参数中获取初始模式 @@ -112,11 +118,7 @@ export const WebRTCFileTransfer: React.FC = () => { // 创建房间 (发送模式) const generateCode = async () => { if (selectedFiles.length === 0) { - toast({ - title: "请先选择文件", - description: "需要选择文件才能创建传输房间", - variant: "destructive", - }); + showToast("需要选择文件才能创建传输房间", "error"); return; } @@ -154,17 +156,10 @@ export const WebRTCFileTransfer: React.FC = () => { // 连接WebRTC作为发送方 connect(code, 'sender'); - toast({ - title: "房间创建成功", - description: `取件码: ${code}`, - }); + showToast(`房间创建成功,取件码: ${code}`, "success"); } catch (error) { console.error('创建房间失败:', error); - toast({ - title: "创建房间失败", - description: error instanceof Error ? error.message : '网络错误,请重试', - variant: "destructive", - }); + showToast(error instanceof Error ? error.message : '网络错误,请重试', "error"); } }; @@ -176,10 +171,27 @@ export const WebRTCFileTransfer: React.FC = () => { setPickupCode(code.trim()); connect(code.trim(), 'receiver'); - toast({ - title: "正在连接...", - description: `尝试连接到房间: ${code}`, - }); + showToast(`正在连接到房间: ${code}`, "info"); + }; + + // 重置连接状态 (用于连接失败后重新输入) + const resetConnection = () => { + console.log('=== 重置连接状态 ==='); + + // 断开当前连接 + disconnect(); + + // 清空状态 + setPickupCode(''); + setFileList([]); + setDownloadedFiles(new Map()); + + // 如果是接收模式,更新URL移除code参数 + if (mode === 'receive') { + const params = new URLSearchParams(searchParams.toString()); + params.delete('code'); + router.push(`?${params.toString()}`, { scroll: false }); + } }; // 处理文件列表更新 @@ -197,6 +209,17 @@ export const WebRTCFileTransfer: React.FC = () => { return cleanup; }, [onFileListReceived, mode]); + // 处理连接错误 + useEffect(() => { + if (error && mode === 'receive') { + console.log('=== 连接错误处理 ==='); + console.log('错误信息:', error); + + // 显示错误提示 + showToast(`连接失败: ${error}`, "error"); + } + }, [error, mode, showToast]); + // 处理文件接收 useEffect(() => { const cleanup = onFileReceived((fileData: { id: string; file: File }) => { @@ -213,31 +236,51 @@ export const WebRTCFileTransfer: React.FC = () => { : item )); - toast({ - title: "文件下载完成", - description: `${fileData.file.name} 已准备好下载`, - }); + showToast(`${fileData.file.name} 已准备好下载`, "success"); }); return cleanup; - }, [onFileReceived]); + }, [onFileReceived, showToast]); - // 实时更新传输进度 + // 监听文件级别的进度更新 useEffect(() => { - console.log('=== 进度更新 ==='); - console.log('传输中:', isTransferring, '进度:', transferProgress); - - if (isTransferring && transferProgress > 0) { - console.log('更新文件传输进度:', transferProgress); + const cleanup = onFileProgress((progressInfo) => { + console.log('=== 文件进度更新 ==='); + console.log('文件:', progressInfo.fileName, 'ID:', progressInfo.fileId, '进度:', progressInfo.progress); + + // 更新当前传输文件信息 + setCurrentTransferFile({ + fileId: progressInfo.fileId, + fileName: progressInfo.fileName, + progress: progressInfo.progress + }); + + // 更新文件列表中对应文件的进度 setFileList(prev => prev.map(item => { - if (item.status === 'downloading') { - console.log(`更新文件 ${item.name} 进度从 ${item.progress} 到 ${transferProgress}`); - return { ...item, progress: transferProgress }; + if (item.id === progressInfo.fileId || item.name === progressInfo.fileName) { + const newProgress = progressInfo.progress; + const newStatus = newProgress >= 100 ? 'completed' as const : 'downloading' as const; + + console.log(`更新文件 ${item.name} 进度: ${item.progress} -> ${newProgress}`); + return { ...item, progress: newProgress, status: newStatus }; } return item; })); - } - }, [isTransferring, transferProgress]); + + // 当传输完成时显示提示 + if (progressInfo.progress >= 100 && mode === 'send') { + showToast(`文件发送完成: ${progressInfo.fileName}`, "success"); + setCurrentTransferFile(null); + } + }); + + return cleanup; + }, [onFileProgress, mode, showToast]); + + // 实时更新传输进度(旧逻辑 - 删除) + // useEffect(() => { + // ...已删除的旧代码... + // }, [...]); // 处理文件请求(发送方监听) useEffect(() => { @@ -254,25 +297,31 @@ export const WebRTCFileTransfer: React.FC = () => { if (!file) { console.error('找不到匹配的文件:', fileName); console.log('可用文件:', selectedFiles.map(f => `${f.name} (${f.size} bytes)`)); - toast({ - title: "文件不存在", - description: `无法找到文件: ${fileName}`, - variant: "destructive", - }); + showToast(`无法找到文件: ${fileName}`, "error"); return; } console.log('找到匹配文件,开始发送:', file.name, 'ID:', fileId, '文件大小:', file.size); + // 更新发送方文件状态为downloading + setFileList(prev => prev.map(item => + item.id === fileId || item.name === fileName + ? { ...item, status: 'downloading' as const, progress: 0 } + : item + )); + // 发送文件 sendFile(file, fileId); + + // 显示开始传输的提示 + showToast(`开始发送文件: ${fileName}`, "info"); } else { console.warn('接收模式下收到文件请求,忽略'); } }); return cleanup; - }, [onFileRequested, mode, selectedFiles, sendFile, toast]); + }, [onFileRequested, mode, selectedFiles, sendFile, showToast]); // 连接状态变化时同步文件列表 useEffect(() => { @@ -328,7 +377,7 @@ export const WebRTCFileTransfer: React.FC = () => { console.log('=== 开始请求文件 ==='); console.log('文件信息:', { name: fileInfo.name, id: fileId, size: fileInfo.size }); console.log('当前文件状态:', fileInfo.status); - console.log('WebRTC连接状态:', { isConnected, isTransferring }); + console.log('WebRTC连接状态:', { isConnected, isTransferring: !!currentTransferFile }); // 更新文件状态为下载中 setFileList(prev => { @@ -345,29 +394,20 @@ export const WebRTCFileTransfer: React.FC = () => { console.log('调用hook的requestFile...'); requestFileFromHook(fileId, fileInfo.name); - toast({ - title: "请求文件", - description: `正在请求文件: ${fileInfo.name}`, - }); + showToast(`正在请求文件: ${fileInfo.name}`, "info"); }; // 复制取件码 const copyCode = () => { navigator.clipboard.writeText(pickupCode); - toast({ - title: "取件码已复制", - description: "取件码已复制到剪贴板", - }); + showToast("取件码已复制到剪贴板", "success"); }; // 复制链接 const copyLink = () => { const link = `${window.location.origin}?type=webrtc&mode=receive&code=${pickupCode}`; navigator.clipboard.writeText(link); - toast({ - title: "取件链接已复制", - description: "取件链接已复制到剪贴板", - }); + showToast("取件链接已复制到剪贴板", "success"); }; // 重置状态 @@ -409,10 +449,7 @@ export const WebRTCFileTransfer: React.FC = () => { document.body.removeChild(a); URL.revokeObjectURL(url); - toast({ - title: "文件已保存", - description: `${file.name} 已保存到下载文件夹`, - }); + showToast(`${file.name} 已保存到下载文件夹`, "success"); }; // 处理下载请求(接收模式) @@ -432,13 +469,9 @@ export const WebRTCFileTransfer: React.FC = () => { // 显示错误信息 useEffect(() => { if (error) { - toast({ - title: "连接错误", - description: error, - variant: "destructive", - }); + showToast(error, "error"); } - }, [error]); + }, [error, showToast]); return (
@@ -468,6 +501,7 @@ export const WebRTCFileTransfer: React.FC = () => {
{ onRemoveFile={setSelectedFiles} onClearFiles={clearFiles} onReset={resetRoom} - disabled={isTransferring} + disabled={!!currentTransferFile} isConnected={isConnected} isWebSocketConnected={isWebSocketConnected} /> @@ -489,12 +523,12 @@ export const WebRTCFileTransfer: React.FC = () => { onJoinRoom={joinRoom} files={fileList} onDownloadFile={handleDownloadRequest} - transferProgress={transferProgress} - isTransferring={isTransferring} isConnected={isConnected} - isConnecting={!!pickupCode && !isConnected} + isConnecting={isConnecting} isWebSocketConnected={isWebSocketConnected} downloadedFiles={downloadedFiles} + error={error} + onReset={resetConnection} />
)} diff --git a/chuan-next/src/components/webrtc/WebRTCFileReceive.tsx b/chuan-next/src/components/webrtc/WebRTCFileReceive.tsx index 8886e50..689d18b 100644 --- a/chuan-next/src/components/webrtc/WebRTCFileReceive.tsx +++ b/chuan-next/src/components/webrtc/WebRTCFileReceive.tsx @@ -4,6 +4,7 @@ import React, { useState, useCallback } from 'react'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Download, FileText, Image, Video, Music, Archive } from 'lucide-react'; +import { useToast } from '@/components/ui/toast-simple'; interface FileInfo { id: string; @@ -34,31 +35,76 @@ interface WebRTCFileReceiveProps { onJoinRoom: (code: string) => void; files: FileInfo[]; onDownloadFile: (fileId: string) => void; - transferProgress: number; - isTransferring: boolean; isConnected: boolean; isConnecting: boolean; isWebSocketConnected?: boolean; downloadedFiles?: Map; + error?: string | null; + onReset?: () => void; } export function WebRTCFileReceive({ onJoinRoom, files, onDownloadFile, - transferProgress, - isTransferring, isConnected, isConnecting, isWebSocketConnected = false, - downloadedFiles + downloadedFiles, + error = null, + onReset }: WebRTCFileReceiveProps) { const [pickupCode, setPickupCode] = useState(''); + const [isValidating, setIsValidating] = useState(false); + const { showToast } = useToast(); - const handleSubmit = useCallback((e: React.FormEvent) => { + // 验证取件码是否存在 + const validatePickupCode = async (code: string): Promise => { + try { + setIsValidating(true); + + console.log('开始验证取件码:', code); + const response = await fetch(`/api/room-info?code=${code}`); + const data = await response.json(); + + console.log('验证响应:', { status: response.status, data }); + + if (!response.ok || !data.success) { + const errorMessage = data.message || '取件码验证失败'; + + // 显示toast错误提示 + showToast(errorMessage, 'error'); + + console.log('验证失败:', errorMessage); + return false; + } + + console.log('取件码验证成功:', data.room); + return true; + } catch (error) { + console.error('验证取件码时发生错误:', error); + const errorMessage = '网络错误,请检查连接后重试'; + + // 显示toast错误提示 + showToast(errorMessage, 'error'); + + return false; + } finally { + setIsValidating(false); + } + }; + + const handleSubmit = useCallback(async (e: React.FormEvent) => { e.preventDefault(); if (pickupCode.length === 6) { - onJoinRoom(pickupCode.toUpperCase()); + const code = pickupCode.toUpperCase(); + + // 先验证取件码是否存在 + const isValid = await validatePickupCode(code); + if (isValid) { + // 验证成功后再进行WebRTC连接 + onJoinRoom(code); + } } }, [pickupCode, onJoinRoom]); @@ -69,6 +115,19 @@ export function WebRTCFileReceive({ } }, []); + // 当验证失败时重置输入状态 + React.useEffect(() => { + if (error && !isConnecting && !isConnected && !isValidating) { + // 延迟重置,确保用户能看到错误信息 + const timer = setTimeout(() => { + console.log('重置取件码输入'); + setPickupCode(''); + }, 3000); // 3秒后重置 + + return () => clearTimeout(timer); + } + }, [error, isConnecting, isConnected, isValidating]); + // 如果已经连接但没有文件,显示等待界面 if ((isConnected || isConnecting) && files.length === 0) { return ( @@ -237,15 +296,13 @@ export function WebRTCFileReceive({ const isDownloading = file.status === 'downloading'; const isCompleted = file.status === 'completed'; const hasDownloadedFile = downloadedFiles?.has(file.id); - const currentProgress = isDownloading && isTransferring ? transferProgress : file.progress; + const currentProgress = file.progress; console.log('文件状态:', { fileName: file.name, status: file.status, progress: file.progress, isDownloading, - isTransferring, - transferProgress, currentProgress }); @@ -262,24 +319,24 @@ export function WebRTCFileReceive({ {hasDownloadedFile && (

✅ 传输完成,点击保存

)} - {isDownloading && isTransferring && ( + {isDownloading && (

⏳ 传输中...{currentProgress.toFixed(1)}%

)}
@@ -387,7 +444,7 @@ export function WebRTCFileReceive({ placeholder="请输入取件码" className="text-center text-2xl sm:text-3xl tracking-[0.3em] sm:tracking-[0.5em] font-mono h-12 sm:h-16 border-2 border-slate-200 rounded-xl focus:border-emerald-500 focus:ring-emerald-500 bg-white/80 backdrop-blur-sm pb-2 sm:pb-4" maxLength={6} - disabled={isConnecting} + disabled={isValidating || isConnecting} />
{[...Array(6)].map((_, i) => ( @@ -411,9 +468,14 @@ export function WebRTCFileReceive({ -
- ))} +
+
+
+ {getFileIcon(file.type)} +
+
+

{file.name}

+
+

{formatFileSize(file.size)}

+ {fileStatus === 'downloading' && ( +
+
+ 传输中 +
+ )} + {fileStatus === 'completed' && ( +
+
+ 已完成 +
+ )} +
+
+
+ +
+ + {/* 传输进度条 */} + {(fileStatus === 'downloading' || fileStatus === 'completed') && currentProgress > 0 && ( +
+
+
+ {fileStatus === 'downloading' ? '正在发送...' : '发送完成'} + {currentProgress.toFixed(1)}% +
+
+
+
+
+
+ )} + + ); + })} {/* 操作按钮 */} diff --git a/chuan-next/src/hooks/useWebRTCTransfer.ts b/chuan-next/src/hooks/useWebRTCTransfer.ts index 4b1e8da..be07b30 100644 --- a/chuan-next/src/hooks/useWebRTCTransfer.ts +++ b/chuan-next/src/hooks/useWebRTCTransfer.ts @@ -141,6 +141,7 @@ export function useWebRTCTransfer() { // 回调注册 onFileRequested: fileTransfer.onFileRequested, onFileReceived: fileTransfer.onFileReceived, + onFileProgress: fileTransfer.onFileProgress, onFileListReceived, }; } diff --git a/chuan-next/src/hooks/webrtc/useFileTransfer.ts b/chuan-next/src/hooks/webrtc/useFileTransfer.ts index 972f154..1b5e074 100644 --- a/chuan-next/src/hooks/webrtc/useFileTransfer.ts +++ b/chuan-next/src/hooks/webrtc/useFileTransfer.ts @@ -7,6 +7,12 @@ interface FileTransferState { error: string | null; } +interface FileProgressInfo { + fileId: string; + fileName: string; + progress: number; +} + interface FileChunk { fileId: string; chunkIndex: number; @@ -21,7 +27,7 @@ interface FileMetadata { type: string; } -const CHUNK_SIZE = 16 * 1024; // 16KB chunks +const CHUNK_SIZE = 256 * 1024; // 256KB chunks - 平衡传输效率和内存使用 export function useFileTransfer() { const [state, setState] = useState({ @@ -39,9 +45,17 @@ export function useFileTransfer() { totalChunks: number; }>>(new Map()); + // 存储当前正在接收的块信息 + const expectedChunk = useRef<{ + fileId: string; + chunkIndex: number; + totalChunks: number; + } | null>(null); + // 文件请求回调 const fileRequestCallbacks = useRef void>>([]); const fileReceivedCallbacks = useRef void>>([]); + const fileProgressCallbacks = useRef void>>([]); const updateState = useCallback((updates: Partial) => { setState(prev => ({ ...prev, ...updates })); @@ -107,27 +121,54 @@ export function useFileTransfer() { if (event.target?.result && dataChannel.readyState === 'open') { const arrayBuffer = event.target.result as ArrayBuffer; - // 发送分块数据 - const chunkMessage = JSON.stringify({ - type: 'file-chunk', - payload: { - fileId, - chunkIndex: sentChunks, - totalChunks - } - }); - - dataChannel.send(chunkMessage); - dataChannel.send(arrayBuffer); + // 检查缓冲区状态,避免过度缓冲 + if (dataChannel.bufferedAmount > 1024 * 1024) { // 1MB 缓冲区限制 + console.log('数据通道缓冲区满,等待清空...'); + // 等待缓冲区清空后再发送 + const waitForBuffer = () => { + if (dataChannel.bufferedAmount < 256 * 1024) { // 等到缓冲区低于 256KB + sendChunkData(); + } else { + setTimeout(waitForBuffer, 10); + } + }; + waitForBuffer(); + } else { + sendChunkData(); + } - sentChunks++; - const progress = (sentChunks / totalChunks) * 100; - updateState({ transferProgress: progress }); + function sendChunkData() { + // 发送分块数据 + const chunkMessage = JSON.stringify({ + type: 'file-chunk', + payload: { + fileId, + chunkIndex: sentChunks, + totalChunks + } + }); + + dataChannel.send(chunkMessage); + dataChannel.send(arrayBuffer); - console.log(`发送进度: ${progress.toFixed(1)}%, 块: ${sentChunks}/${totalChunks}`); + sentChunks++; + const progress = (sentChunks / totalChunks) * 100; + updateState({ transferProgress: progress }); - // 短暂延迟,避免阻塞 - setTimeout(sendNextChunk, 10); + // 通知文件级别的进度 + fileProgressCallbacks.current.forEach(callback => { + callback({ + fileId, + fileName: file.name, + progress + }); + }); + + console.log(`发送进度: ${progress.toFixed(1)}%, 块: ${sentChunks}/${totalChunks}, 文件: ${file.name}, 缓冲区: ${dataChannel.bufferedAmount} bytes`); + + // 立即发送下一个块,不等待 + sendNextChunk(); + } } }; @@ -179,7 +220,15 @@ export function useFileTransfer() { case 'file-chunk': const chunkInfo = message.payload; - console.log(`接收文件块: ${chunkInfo.chunkIndex + 1}/${chunkInfo.totalChunks}`); + const { fileId: chunkFileId, chunkIndex, totalChunks } = chunkInfo; + console.log(`接收文件块信息: ${chunkIndex + 1}/${totalChunks}, 文件ID: ${chunkFileId}`); + + // 设置期望的下一个块 + expectedChunk.current = { + fileId: chunkFileId, + chunkIndex, + totalChunks + }; break; case 'file-end': @@ -229,18 +278,37 @@ export function useFileTransfer() { const arrayBuffer = event.data; console.log('收到文件块数据:', arrayBuffer.byteLength, 'bytes'); - // 找到最近开始接收的文件(简化逻辑) - for (const [fileId, fileInfo] of receivingFiles.current.entries()) { - if (fileInfo.receivedChunks < fileInfo.totalChunks) { - fileInfo.chunks.push(arrayBuffer); - fileInfo.receivedChunks++; + // 检查是否有期望的块信息 + if (expectedChunk.current) { + const { fileId, chunkIndex } = expectedChunk.current; + const fileInfo = receivingFiles.current.get(fileId); + + if (fileInfo) { + // 确保chunks数组足够大 + if (!fileInfo.chunks[chunkIndex]) { + fileInfo.chunks[chunkIndex] = arrayBuffer; + fileInfo.receivedChunks++; - const progress = (fileInfo.receivedChunks / fileInfo.totalChunks) * 100; - updateState({ transferProgress: progress }); + const progress = (fileInfo.receivedChunks / fileInfo.totalChunks) * 100; + updateState({ transferProgress: progress }); - console.log(`文件接收进度: ${progress.toFixed(1)}%, 块: ${fileInfo.receivedChunks}/${fileInfo.totalChunks}`); - break; + // 通知文件级别的进度 + fileProgressCallbacks.current.forEach(callback => { + callback({ + fileId, + fileName: fileInfo.metadata.name, + progress + }); + }); + + console.log(`文件接收进度: ${progress.toFixed(1)}%, 块: ${fileInfo.receivedChunks}/${fileInfo.totalChunks}, 文件: ${fileInfo.metadata.name}`); + } + + // 清除期望的块信息 + expectedChunk.current = null; } + } else { + console.warn('收到块数据但没有对应的块信息'); } } }, [updateState]); @@ -288,6 +356,19 @@ export function useFileTransfer() { }; }, []); + // 注册文件进度回调 + const onFileProgress = useCallback((callback: (progressInfo: FileProgressInfo) => void) => { + fileProgressCallbacks.current.push(callback); + + // 返回清理函数 + return () => { + const index = fileProgressCallbacks.current.indexOf(callback); + if (index > -1) { + fileProgressCallbacks.current.splice(index, 1); + } + }; + }, []); + return { ...state, sendFile, @@ -295,5 +376,6 @@ export function useFileTransfer() { handleMessage, onFileRequested, onFileReceived, + onFileProgress, }; } diff --git a/chuan-next/src/hooks/webrtc/useWebRTCConnection.ts b/chuan-next/src/hooks/webrtc/useWebRTCConnection.ts index 7709a15..447ba04 100644 --- a/chuan-next/src/hooks/webrtc/useWebRTCConnection.ts +++ b/chuan-next/src/hooks/webrtc/useWebRTCConnection.ts @@ -1,3 +1,4 @@ +import { url } from 'inspector'; import { useState, useRef, useCallback } from 'react'; interface WebRTCConnectionState { @@ -22,6 +23,7 @@ export function useWebRTCConnection() { const wsRef = useRef(null); const pcRef = useRef(null); const dcRef = useRef(null); + const timeoutRef = useRef(null); const STUN_SERVERS = [ { urls: 'stun:stun.l.google.com:19302' }, @@ -29,29 +31,78 @@ export function useWebRTCConnection() { { urls: 'stun:stun2.l.google.com:19302' }, ]; + // 连接超时时间(30秒) + const CONNECTION_TIMEOUT = 30000; + const updateState = useCallback((updates: Partial) => { setState(prev => ({ ...prev, ...updates })); }, []); + // 清理超时定时器 + const clearConnectionTimeout = useCallback(() => { + if (timeoutRef.current) { + clearTimeout(timeoutRef.current); + timeoutRef.current = null; + } + }, []); + + // 处理连接超时 + const handleConnectionTimeout = useCallback(() => { + console.warn('WebRTC连接超时'); + updateState({ + error: '连接超时,请检查取件码是否正确或稍后重试', + isConnecting: false + }); + + // 清理连接 + if (wsRef.current) { + wsRef.current.close(); + } + if (pcRef.current) { + pcRef.current.close(); + } + }, [updateState]); + const connect = useCallback(async (roomCode: string, role: 'sender' | 'receiver') => { console.log('=== 开始WebRTC连接 ==='); console.log('房间代码:', roomCode, '角色:', role); + // 清理之前的超时定时器 + clearConnectionTimeout(); + updateState({ isConnecting: true, error: null }); + // 设置连接超时 + timeoutRef.current = setTimeout(() => { + handleConnectionTimeout(); + }, CONNECTION_TIMEOUT); + try { // 创建PeerConnection const pc = new RTCPeerConnection({ iceServers: STUN_SERVERS }); pcRef.current = pc; // 连接WebSocket信令服务器 - const ws = new WebSocket(`ws://localhost:8080/ws/webrtc?room=${roomCode}&role=${role}`); + const ws = new WebSocket(`ws://localhost:8080/ws/webrtc?code=${roomCode}&role=${role}`); wsRef.current = ws; // WebSocket事件处理 - ws.onopen = () => { + ws.onopen = async () => { console.log('WebSocket连接已建立'); updateState({ isWebSocketConnected: true }); + + // 如果是发送方,在WebSocket连接建立后创建offer + if (role === 'sender') { + try { + const offer = await pc.createOffer(); + await pc.setLocalDescription(offer); + ws.send(JSON.stringify({ type: 'offer', payload: offer })); + console.log('已发送offer'); + } catch (error) { + console.error('创建offer失败:', error); + updateState({ error: '创建连接失败', isConnecting: false }); + } + } }; ws.onmessage = async (event) => { @@ -61,19 +112,26 @@ export function useWebRTCConnection() { switch (message.type) { case 'offer': - await pc.setRemoteDescription(new RTCSessionDescription(message.offer)); - const answer = await pc.createAnswer(); - await pc.setLocalDescription(answer); - ws.send(JSON.stringify({ type: 'answer', answer })); + if (message.payload) { + await pc.setRemoteDescription(new RTCSessionDescription(message.payload)); + const answer = await pc.createAnswer(); + await pc.setLocalDescription(answer); + if (ws.readyState === WebSocket.OPEN) { + ws.send(JSON.stringify({ type: 'answer', payload: answer })); + console.log('已发送answer'); + } + } break; case 'answer': - await pc.setRemoteDescription(new RTCSessionDescription(message.answer)); + if (message.payload) { + await pc.setRemoteDescription(new RTCSessionDescription(message.payload)); + } break; case 'ice-candidate': - if (message.candidate) { - await pc.addIceCandidate(new RTCIceCandidate(message.candidate)); + if (message.payload) { + await pc.addIceCandidate(new RTCIceCandidate(message.payload)); } break; @@ -104,7 +162,7 @@ export function useWebRTCConnection() { console.log('发送ICE候选:', event.candidate); ws.send(JSON.stringify({ type: 'ice-candidate', - candidate: event.candidate + payload: event.candidate })); } }; @@ -113,12 +171,19 @@ export function useWebRTCConnection() { pc.onconnectionstatechange = () => { console.log('连接状态:', pc.connectionState); const isConnected = pc.connectionState === 'connected'; + + if (isConnected) { + // 连接成功,清理超时定时器 + clearConnectionTimeout(); + } + updateState({ isConnected, isConnecting: !isConnected && pc.connectionState !== 'failed' }); if (pc.connectionState === 'failed') { + clearConnectionTimeout(); updateState({ error: '连接失败', isConnecting: false }); } }; @@ -126,19 +191,27 @@ export function useWebRTCConnection() { // 如果是发送方,创建数据通道 if (role === 'sender') { const dataChannel = pc.createDataChannel('fileTransfer', { - ordered: true + ordered: true, + maxPacketLifeTime: undefined, + maxRetransmits: undefined }); dcRef.current = dataChannel; + // 设置缓冲区管理 + dataChannel.bufferedAmountLowThreshold = 256 * 1024; // 256KB + dataChannel.onopen = () => { console.log('数据通道已打开 (发送方)'); + console.log('数据通道配置:', { + id: dataChannel.id, + label: dataChannel.label, + maxPacketLifeTime: dataChannel.maxPacketLifeTime, + maxRetransmits: dataChannel.maxRetransmits, + ordered: dataChannel.ordered, + bufferedAmountLowThreshold: dataChannel.bufferedAmountLowThreshold + }); updateState({ localDataChannel: dataChannel }); }; - - // 创建offer - const offer = await pc.createOffer(); - await pc.setLocalDescription(offer); - ws.send(JSON.stringify({ type: 'offer', offer })); } else { // 接收方等待数据通道 pc.ondatachannel = (event) => { @@ -155,16 +228,20 @@ export function useWebRTCConnection() { } catch (error) { console.error('连接失败:', error); + clearConnectionTimeout(); updateState({ error: error instanceof Error ? error.message : '连接失败', isConnecting: false }); } - }, [updateState]); + }, [updateState, clearConnectionTimeout, handleConnectionTimeout]); const disconnect = useCallback(() => { console.log('断开WebRTC连接'); + // 清理超时定时器 + clearConnectionTimeout(); + if (dcRef.current) { dcRef.current.close(); dcRef.current = null; @@ -188,7 +265,7 @@ export function useWebRTCConnection() { localDataChannel: null, remoteDataChannel: null, }); - }, []); + }, [clearConnectionTimeout]); const getDataChannel = useCallback(() => { return dcRef.current; diff --git a/cmd/main.go b/cmd/main.go index 2b89273..1db3c7e 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -58,6 +58,10 @@ func main() { r.Post("/api/create-text-room", h.CreateTextRoomHandler) r.Get("/api/get-text-content", h.GetTextContentHandler) + // 文件传输API路由 + r.Post("/api/create-room", h.CreateRoomHandler) + r.Get("/api/room-info", h.RoomInfoHandler) + // 启动服务器 srv := &http.Server{ Addr: ":8080", diff --git a/internal/handlers/handlers.go b/internal/handlers/handlers.go index 742f657..7ea1e20 100644 --- a/internal/handlers/handlers.go +++ b/internal/handlers/handlers.go @@ -2,10 +2,13 @@ package handlers import ( "encoding/json" + "fmt" "html/template" "net/http" "path/filepath" + "time" + "chuan/internal/models" "chuan/internal/services" ) @@ -139,3 +142,140 @@ func (h *Handler) GetTextContentHandler(w http.ResponseWriter, r *http.Request) func (h *Handler) HandleWebRTCWebSocket(w http.ResponseWriter, r *http.Request) { h.webrtcService.HandleWebSocket(w, r) } + +// CreateRoomHandler 创建文件传输房间API +func (h *Handler) CreateRoomHandler(w http.ResponseWriter, r *http.Request) { + // 设置响应为JSON格式 + w.Header().Set("Content-Type", "application/json") + + if r.Method != http.MethodPost { + w.WriteHeader(http.StatusMethodNotAllowed) + json.NewEncoder(w).Encode(map[string]interface{}{ + "success": false, + "message": "方法不允许", + }) + return + } + + var req struct { + Files []struct { + Name string `json:"name"` + Size int64 `json:"size"` + Type string `json:"type"` + LastModified int64 `json:"lastModified"` + } `json:"files"` + } + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + w.WriteHeader(http.StatusBadRequest) + json.NewEncoder(w).Encode(map[string]interface{}{ + "success": false, + "message": "解析请求失败", + "error": err.Error(), + }) + return + } + + if len(req.Files) == 0 { + w.WriteHeader(http.StatusBadRequest) + json.NewEncoder(w).Encode(map[string]interface{}{ + "success": false, + "message": "至少需要选择一个文件", + }) + return + } + + // 验证文件信息 + for _, file := range req.Files { + if file.Name == "" { + w.WriteHeader(http.StatusBadRequest) + json.NewEncoder(w).Encode(map[string]interface{}{ + "success": false, + "message": "文件名不能为空", + }) + return + } + if file.Size <= 0 { + w.WriteHeader(http.StatusBadRequest) + json.NewEncoder(w).Encode(map[string]interface{}{ + "success": false, + "message": "文件大小必须大于0", + }) + return + } + + } + + // 转换文件信息 + var fileInfos []models.FileTransferInfo + for i, file := range req.Files { + fileInfos = append(fileInfos, models.FileTransferInfo{ + ID: fmt.Sprintf("file_%d_%d", time.Now().Unix(), i), + Name: file.Name, + Size: file.Size, + Type: file.Type, + LastModified: file.LastModified, + }) + } + + // 创建文件传输房间 + code := h.p2pService.CreateRoom(fileInfos) + + response := map[string]interface{}{ + "success": true, + "code": code, + "message": "文件传输房间创建成功", + "files": fileInfos, + } + + json.NewEncoder(w).Encode(response) +} + +// RoomInfoHandler 获取房间信息API +func (h *Handler) RoomInfoHandler(w http.ResponseWriter, r *http.Request) { + // 设置响应为JSON格式 + w.Header().Set("Content-Type", "application/json") + + if r.Method != http.MethodGet { + json.NewEncoder(w).Encode(map[string]interface{}{ + "success": false, + "message": "方法不允许", + }) + return + } + + code := r.URL.Query().Get("code") + if code == "" || len(code) != 6 { + + json.NewEncoder(w).Encode(map[string]interface{}{ + "success": false, + "message": "请提供正确的6位房间码", + }) + return + } + + // 获取房间信息 + room, exists := h.p2pService.GetRoomByCode(code) + if !exists { + json.NewEncoder(w).Encode(map[string]interface{}{ + "success": false, + "message": "房间不存在或已过期", + }) + return + } + + // 构建响应 + response := map[string]interface{}{ + "success": true, + "message": "房间信息获取成功", + "room": map[string]interface{}{ + "code": room.Code, + "files": room.Files, + "file_count": len(room.Files), + "is_text_room": room.IsTextRoom, + "created_at": room.CreatedAt, + }, + } + + json.NewEncoder(w).Encode(response) +} diff --git a/internal/web/frontend/404.html b/internal/web/frontend/404.html index a44aa32..8c92a02 100644 --- a/internal/web/frontend/404.html +++ b/internal/web/frontend/404.html @@ -1 +1 @@ -404: This page could not be found.文件快传

404

This page could not be found.

\ No newline at end of file +404: This page could not be found.文件快传

404

This page could not be found.

\ No newline at end of file diff --git a/internal/web/frontend/404/index.html b/internal/web/frontend/404/index.html index a44aa32..8c92a02 100644 --- a/internal/web/frontend/404/index.html +++ b/internal/web/frontend/404/index.html @@ -1 +1 @@ -404: This page could not be found.文件快传

404

This page could not be found.

\ No newline at end of file +404: This page could not be found.文件快传

404

This page could not be found.

\ No newline at end of file diff --git a/internal/web/frontend/_next/static/dIaE9ChLg6gKLX3iG0ErS/_buildManifest.js b/internal/web/frontend/_next/static/8bbWAyBmnmNj0Jk5ryXl4/_buildManifest.js similarity index 100% rename from internal/web/frontend/_next/static/dIaE9ChLg6gKLX3iG0ErS/_buildManifest.js rename to internal/web/frontend/_next/static/8bbWAyBmnmNj0Jk5ryXl4/_buildManifest.js diff --git a/internal/web/frontend/_next/static/dIaE9ChLg6gKLX3iG0ErS/_ssgManifest.js b/internal/web/frontend/_next/static/8bbWAyBmnmNj0Jk5ryXl4/_ssgManifest.js similarity index 100% rename from internal/web/frontend/_next/static/dIaE9ChLg6gKLX3iG0ErS/_ssgManifest.js rename to internal/web/frontend/_next/static/8bbWAyBmnmNj0Jk5ryXl4/_ssgManifest.js diff --git a/internal/web/frontend/_next/static/chunks/423-3db9dd818e8fd852.js b/internal/web/frontend/_next/static/chunks/423-3db9dd818e8fd852.js new file mode 100644 index 0000000..ec50583 --- /dev/null +++ b/internal/web/frontend/_next/static/chunks/423-3db9dd818e8fd852.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[423],{227:(e,t,r)=>{r.d(t,{A:()=>o});let o=(0,r(9946).A)("music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]])},1497:(e,t,r)=>{r.d(t,{A:()=>o});let o=(0,r(9946).A)("message-square",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]])},1788:(e,t,r)=>{r.d(t,{A:()=>o});let o=(0,r(9946).A)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]])},2085:(e,t,r)=>{r.d(t,{F:()=>l});var o=r(2596);let n=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,a=o.$,l=(e,t)=>r=>{var o;if((null==t?void 0:t.variants)==null)return a(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:l,defaultVariants:i}=t,s=Object.keys(l).map(e=>{let t=null==r?void 0:r[e],o=null==i?void 0:i[e];if(null===t)return null;let a=n(t)||n(o);return l[e][a]}),d=r&&Object.entries(r).reduce((e,t)=>{let[r,o]=t;return void 0===o||(e[r]=o),e},{});return a(e,s,null==t||null==(o=t.compoundVariants)?void 0:o.reduce((e,t)=>{let{class:r,className:o,...n}=t;return Object.entries(n).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...i,...d}[t]):({...i,...d})[t]===r})?[...e,r,o]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}},2486:(e,t,r)=>{r.d(t,{A:()=>o});let o=(0,r(9946).A)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},2596:(e,t,r)=>{r.d(t,{$:()=>o});function o(){for(var e,t,r=0,o="",n=arguments.length;r{r.d(t,{A:()=>o});let o=(0,r(9946).A)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},3559:(e,t,r)=>{r.d(t,{UC:()=>es,B8:()=>el,bL:()=>ea,l9:()=>ei});var o,n=r(2115),a=r.t(n,2);function l(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),!1===r||!o.defaultPrevented)return t?.(o)}}var i=r(5155);function s(e,t=[]){let r=[],o=()=>{let t=r.map(e=>n.createContext(e));return function(r){let o=r?.[e]||t;return n.useMemo(()=>({[`__scope${e}`]:{...r,[e]:o}}),[r,o])}};return o.scopeName=e,[function(t,o){let a=n.createContext(o),l=r.length;r=[...r,o];let s=t=>{let{scope:r,children:o,...s}=t,d=r?.[e]?.[l]||a,c=n.useMemo(()=>s,Object.values(s));return(0,i.jsx)(d.Provider,{value:c,children:o})};return s.displayName=t+"Provider",[s,function(r,i){let s=i?.[e]?.[l]||a,d=n.useContext(s);if(d)return d;if(void 0!==o)return o;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let o=r.reduce((t,{useScope:r,scopeName:o})=>{let n=r(e)[`__scope${o}`];return{...t,...n}},{});return n.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}(o,...t)]}function d(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function c(e,t){var r=d(e,t,"get");return r.get?r.get.call(e):r.value}function u(e,t,r){var o=d(e,t,"set");if(o.set)o.set.call(e,r);else{if(!o.writable)throw TypeError("attempted to set read only private field");o.value=r}return r}var f=r(6101),m=r(9708),p=new WeakMap;function h(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let r=function(e,t){let r=e.length,o=b(t),n=o>=0?o:r+o;return n<0||n>=r?-1:n}(e,t);return -1===r?void 0:e[r]}function b(e){return e!=e||0===e?0:Math.trunc(e)}o=new WeakMap,class e extends Map{set(e,t){return p.get(this)&&(this.has(e)?c(this,o)[c(this,o).indexOf(e)]=e:c(this,o).push(e)),super.set(e,t),this}insert(e,t,r){let n,a=this.has(t),l=c(this,o).length,i=b(e),s=i>=0?i:l+i,d=s<0||s>=l?-1:s;if(d===this.size||a&&d===this.size-1||-1===d)return this.set(t,r),this;let u=this.size+ +!a;i<0&&s++;let f=[...c(this,o)],m=!1;for(let e=s;e=this.size&&(o=this.size-1),this.at(o)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let o=r+t;return o<0&&(o=0),o>=this.size&&(o=this.size-1),this.keyAt(o)}find(e,t){let r=0;for(let o of this){if(Reflect.apply(e,t,[o,r,this]))return o;r++}}findIndex(e,t){let r=0;for(let o of this){if(Reflect.apply(e,t,[o,r,this]))return r;r++}return -1}filter(t,r){let o=[],n=0;for(let e of this)Reflect.apply(t,r,[e,n,this])&&o.push(e),n++;return new e(o)}map(t,r){let o=[],n=0;for(let e of this)o.push([e[0],Reflect.apply(t,r,[e,n,this])]),n++;return new e(o)}reduce(){for(var e=arguments.length,t=Array(e),r=0;r=0;e--){let r=this.at(e);a=e===this.size-1&&1===t.length?r:Reflect.apply(o,this,[a,r,e,this])}return a}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),o=this.get(r);t.set(r,o)}return t}toSpliced(){for(var t=arguments.length,r=Array(t),o=0;o0&&(n=r-1);for(let e=t;e<=n;e++){let t=this.keyAt(e),r=this.get(t);o.set(t,r)}return o}every(e,t){let r=0;for(let o of this){if(!Reflect.apply(e,t,[o,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let o of this){if(Reflect.apply(e,t,[o,r,this]))return!0;r++}return!1}constructor(e){super(e),function(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}(this,o,{writable:!0,value:void 0}),u(this,o,[...super.keys()]),p.set(this,!0)}};var g=globalThis?.document?n.useLayoutEffect:()=>{},y=a[" useId ".trim().toString()]||(()=>void 0),v=0;function w(e){let[t,r]=n.useState(y());return g(()=>{e||r(e=>e??String(v++))},[e]),e||(t?`radix-${t}`:"")}r(7650);var k=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=(0,m.TL)(`Primitive.${t}`),o=n.forwardRef((e,o)=>{let{asChild:n,...a}=e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(n?r:t,{...a,ref:o})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),x=a[" useInsertionEffect ".trim().toString()]||g;function A({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){let[a,l,i]=function({defaultProp:e,onChange:t}){let[r,o]=n.useState(e),a=n.useRef(r),l=n.useRef(t);return x(()=>{l.current=t},[t]),n.useEffect(()=>{a.current!==r&&(l.current?.(r),a.current=r)},[r,a]),[r,o,l]}({defaultProp:t,onChange:r}),s=void 0!==e,d=s?e:a;{let t=n.useRef(void 0!==e);n.useEffect(()=>{let e=t.current;if(e!==s){let t=s?"controlled":"uncontrolled";console.warn(`${o} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=s},[s,o])}return[d,n.useCallback(t=>{if(s){let r="function"==typeof t?t(e):t;r!==e&&i.current?.(r)}else l(t)},[s,e,l,i])]}Symbol("RADIX:SYNC_STATE");var z=n.createContext(void 0);function M(e){let t=n.useContext(z);return e||t||"ltr"}var N="rovingFocusGroup.onEntryFocus",R={bubbles:!1,cancelable:!0},j="RovingFocusGroup",[C,E,I]=function(e){let t=e+"CollectionProvider",[r,o]=s(t),[a,l]=r(t,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:t,children:r}=e,o=n.useRef(null),l=n.useRef(new Map).current;return(0,i.jsx)(a,{scope:t,itemMap:l,collectionRef:o,children:r})};d.displayName=t;let c=e+"CollectionSlot",u=(0,m.TL)(c),p=n.forwardRef((e,t)=>{let{scope:r,children:o}=e,n=l(c,r),a=(0,f.s)(t,n.collectionRef);return(0,i.jsx)(u,{ref:a,children:o})});p.displayName=c;let h=e+"CollectionItemSlot",b="data-radix-collection-item",g=(0,m.TL)(h),y=n.forwardRef((e,t)=>{let{scope:r,children:o,...a}=e,s=n.useRef(null),d=(0,f.s)(t,s),c=l(h,r);return n.useEffect(()=>(c.itemMap.set(s,{ref:s,...a}),()=>void c.itemMap.delete(s))),(0,i.jsx)(g,{...{[b]:""},ref:d,children:o})});return y.displayName=h,[{Provider:d,Slot:p,ItemSlot:y},function(t){let r=l(e+"CollectionConsumer",t);return n.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll("[".concat(b,"]")));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},o]}(j),[S,T]=s(j,[I]),[O,P]=S(j),D=n.forwardRef((e,t)=>(0,i.jsx)(C.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,i.jsx)(C.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,i.jsx)(_,{...e,ref:t})})}));D.displayName=j;var _=n.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:o,loop:a=!1,dir:s,currentTabStopId:d,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:m,preventScrollOnEntryFocus:p=!1,...h}=e,b=n.useRef(null),g=(0,f.s)(t,b),y=M(s),[v,w]=A({prop:d,defaultProp:null!=c?c:null,onChange:u,caller:j}),[x,z]=n.useState(!1),C=function(e){let t=n.useRef(e);return n.useEffect(()=>{t.current=e}),n.useMemo(()=>(...e)=>t.current?.(...e),[])}(m),I=E(r),S=n.useRef(!1),[T,P]=n.useState(0);return n.useEffect(()=>{let e=b.current;if(e)return e.addEventListener(N,C),()=>e.removeEventListener(N,C)},[C]),(0,i.jsx)(O,{scope:r,orientation:o,dir:y,loop:a,currentTabStopId:v,onItemFocus:n.useCallback(e=>w(e),[w]),onItemShiftTab:n.useCallback(()=>z(!0),[]),onFocusableItemAdd:n.useCallback(()=>P(e=>e+1),[]),onFocusableItemRemove:n.useCallback(()=>P(e=>e-1),[]),children:(0,i.jsx)(k.div,{tabIndex:x||0===T?-1:0,"data-orientation":o,...h,ref:g,style:{outline:"none",...e.style},onMouseDown:l(e.onMouseDown,()=>{S.current=!0}),onFocus:l(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!x){let t=new CustomEvent(N,R);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=I().filter(e=>e.focusable);U([e.find(e=>e.active),e.find(e=>e.id===v),...e].filter(Boolean).map(e=>e.ref.current),p)}}S.current=!1}),onBlur:l(e.onBlur,()=>z(!1))})})}),F="RovingFocusGroupItem",$=n.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:o=!0,active:a=!1,tabStopId:s,children:d,...c}=e,u=w(),f=s||u,m=P(F,r),p=m.currentTabStopId===f,h=E(r),{onFocusableItemAdd:b,onFocusableItemRemove:g,currentTabStopId:y}=m;return n.useEffect(()=>{if(o)return b(),()=>g()},[o,b,g]),(0,i.jsx)(C.ItemSlot,{scope:r,id:f,focusable:o,active:a,children:(0,i.jsx)(k.span,{tabIndex:p?0:-1,"data-orientation":m.orientation,...c,ref:t,onMouseDown:l(e.onMouseDown,e=>{o?m.onItemFocus(f):e.preventDefault()}),onFocus:l(e.onFocus,()=>m.onItemFocus(f)),onKeyDown:l(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void m.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var o;let n=(o=e.key,"rtl"!==r?o:"ArrowLeft"===o?"ArrowRight":"ArrowRight"===o?"ArrowLeft":o);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(n))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)))return L[n]}(e,m.orientation,m.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let r=h().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)r.reverse();else if("prev"===t||"next"===t){"prev"===t&&r.reverse();let o=r.indexOf(e.currentTarget);r=m.loop?function(e,t){return e.map((r,o)=>e[(t+o)%e.length])}(r,o+1):r.slice(o+1)}setTimeout(()=>U(r))}}),children:"function"==typeof d?d({isCurrentTabStop:p,hasTabStop:null!=y}):d})})});$.displayName=F;var L={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function U(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=document.activeElement;for(let o of e)if(o===r||(o.focus({preventScroll:t}),document.activeElement!==r))return}var V=e=>{let{present:t,children:r}=e,o=function(e){var t,r;let[o,a]=n.useState(),l=n.useRef(null),i=n.useRef(e),s=n.useRef("none"),[d,c]=(t=e?"mounted":"unmounted",r={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},n.useReducer((e,t)=>{let o=r[e][t];return null!=o?o:e},t));return n.useEffect(()=>{let e=W(l.current);s.current="mounted"===d?e:"none"},[d]),g(()=>{let t=l.current,r=i.current;if(r!==e){let o=s.current,n=W(t);e?c("MOUNT"):"none"===n||(null==t?void 0:t.display)==="none"?c("UNMOUNT"):r&&o!==n?c("ANIMATION_OUT"):c("UNMOUNT"),i.current=e}},[e,c]),g(()=>{if(o){var e;let t,r=null!=(e=o.ownerDocument.defaultView)?e:window,n=e=>{let n=W(l.current).includes(e.animationName);if(e.target===o&&n&&(c("ANIMATION_END"),!i.current)){let e=o.style.animationFillMode;o.style.animationFillMode="forwards",t=r.setTimeout(()=>{"forwards"===o.style.animationFillMode&&(o.style.animationFillMode=e)})}},a=e=>{e.target===o&&(s.current=W(l.current))};return o.addEventListener("animationstart",a),o.addEventListener("animationcancel",n),o.addEventListener("animationend",n),()=>{r.clearTimeout(t),o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",n),o.removeEventListener("animationend",n)}}c("ANIMATION_END")},[o,c]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:n.useCallback(e=>{l.current=e?getComputedStyle(e):null,a(e)},[])}}(t),a="function"==typeof r?r({present:o.isPresent}):n.Children.only(r),l=(0,f.s)(o.ref,function(e){var t,r;let o=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,n=o&&"isReactWarning"in o&&o.isReactWarning;return n?e.ref:(n=(o=null==(r=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:r.get)&&"isReactWarning"in o&&o.isReactWarning)?e.props.ref:e.props.ref||e.ref}(a));return"function"==typeof r||o.isPresent?n.cloneElement(a,{ref:l}):null};function W(e){return(null==e?void 0:e.animationName)||"none"}V.displayName="Presence";var G="Tabs",[q,K]=s(G,[T]),H=T(),[B,Z]=q(G),X=n.forwardRef((e,t)=>{let{__scopeTabs:r,value:o,onValueChange:n,defaultValue:a,orientation:l="horizontal",dir:s,activationMode:d="automatic",...c}=e,u=M(s),[f,m]=A({prop:o,onChange:n,defaultProp:null!=a?a:"",caller:G});return(0,i.jsx)(B,{scope:r,baseId:w(),value:f,onValueChange:m,orientation:l,dir:u,activationMode:d,children:(0,i.jsx)(k.div,{dir:u,"data-orientation":l,...c,ref:t})})});X.displayName=G;var Q="TabsList",Y=n.forwardRef((e,t)=>{let{__scopeTabs:r,loop:o=!0,...n}=e,a=Z(Q,r),l=H(r);return(0,i.jsx)(D,{asChild:!0,...l,orientation:a.orientation,dir:a.dir,loop:o,children:(0,i.jsx)(k.div,{role:"tablist","aria-orientation":a.orientation,...n,ref:t})})});Y.displayName=Q;var J="TabsTrigger",ee=n.forwardRef((e,t)=>{let{__scopeTabs:r,value:o,disabled:n=!1,...a}=e,s=Z(J,r),d=H(r),c=eo(s.baseId,o),u=en(s.baseId,o),f=o===s.value;return(0,i.jsx)($,{asChild:!0,...d,focusable:!n,active:f,children:(0,i.jsx)(k.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":n?"":void 0,disabled:n,id:c,...a,ref:t,onMouseDown:l(e.onMouseDown,e=>{n||0!==e.button||!1!==e.ctrlKey?e.preventDefault():s.onValueChange(o)}),onKeyDown:l(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&s.onValueChange(o)}),onFocus:l(e.onFocus,()=>{let e="manual"!==s.activationMode;f||n||!e||s.onValueChange(o)})})})});ee.displayName=J;var et="TabsContent",er=n.forwardRef((e,t)=>{let{__scopeTabs:r,value:o,forceMount:a,children:l,...s}=e,d=Z(et,r),c=eo(d.baseId,o),u=en(d.baseId,o),f=o===d.value,m=n.useRef(f);return n.useEffect(()=>{let e=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,i.jsx)(V,{present:a||f,children:r=>{let{present:o}=r;return(0,i.jsx)(k.div,{"data-state":f?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":c,hidden:!o,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:o&&l})}})});function eo(e,t){return"".concat(e,"-trigger-").concat(t)}function en(e,t){return"".concat(e,"-content-").concat(t)}er.displayName=et;var ea=X,el=Y,ei=ee,es=er},4357:(e,t,r)=>{r.d(t,{A:()=>o});let o=(0,r(9946).A)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},4416:(e,t,r)=>{r.d(t,{A:()=>o});let o=(0,r(9946).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},4738:(e,t,r)=>{r.d(t,{A:()=>o});let o=(0,r(9946).A)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]])},5690:(e,t,r)=>{r.d(t,{A:()=>o});let o=(0,r(9946).A)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]])},5695:(e,t,r)=>{var o=r(8999);r.o(o,"useRouter")&&r.d(t,{useRouter:function(){return o.useRouter}}),r.o(o,"useSearchParams")&&r.d(t,{useSearchParams:function(){return o.useSearchParams}})},6101:(e,t,r)=>{r.d(t,{s:()=>l,t:()=>a});var o=r(2115);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function a(...e){return t=>{let r=!1,o=e.map(e=>{let o=n(e,t);return r||"function"!=typeof o||(r=!0),o});if(r)return()=>{for(let t=0;t{r.d(t,{A:()=>o});let o=(0,r(9946).A)("share",[["path",{d:"M12 2v13",key:"1km8f5"}],["path",{d:"m16 6-4-4-4 4",key:"13yo43"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}]])},7213:(e,t,r)=>{r.d(t,{A:()=>o});let o=(0,r(9946).A)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]])},7434:(e,t,r)=>{r.d(t,{A:()=>o});let o=(0,r(9946).A)("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},8164:(e,t,r)=>{r.d(t,{A:()=>o});let o=(0,r(9946).A)("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]])},8979:(e,t,r)=>{r.d(t,{A:()=>o});let o=(0,r(9946).A)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]])},9022:(e,t,r)=>{r.d(t,{A:()=>o});let o=(0,r(9946).A)("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]])},9688:(e,t,r)=>{r.d(t,{QP:()=>ee});let o=(e,t)=>{if(0===e.length)return t.classGroupId;let r=e[0],n=t.nextPart.get(r),a=n?o(e.slice(1),n):void 0;if(a)return a;if(0===t.validators.length)return;let l=e.join("-");return t.validators.find(({validator:e})=>e(l))?.classGroupId},n=/^\[(.+)\]$/,a=(e,t,r,o)=>{e.forEach(e=>{if("string"==typeof e){(""===e?t:l(t,e)).classGroupId=r;return}if("function"==typeof e)return i(e)?void a(e(o),t,r,o):void t.validators.push({validator:e,classGroupId:r});Object.entries(e).forEach(([e,n])=>{a(n,l(t,e),r,o)})})},l=(e,t)=>{let r=e;return t.split("-").forEach(e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)}),r},i=e=>e.isThemeGetter,s=/\s+/;function d(){let e,t,r=0,o="";for(;r{let t;if("string"==typeof e)return e;let r="";for(let o=0;o{let t=t=>t[e]||[];return t.isThemeGetter=!0,t},f=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,m=/^\((?:(\w[\w-]*):)?(.+)\)$/i,p=/^\d+\/\d+$/,h=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,b=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,g=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,y=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,v=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,w=e=>p.test(e),k=e=>!!e&&!Number.isNaN(Number(e)),x=e=>!!e&&Number.isInteger(Number(e)),A=e=>e.endsWith("%")&&k(e.slice(0,-1)),z=e=>h.test(e),M=()=>!0,N=e=>b.test(e)&&!g.test(e),R=()=>!1,j=e=>y.test(e),C=e=>v.test(e),E=e=>!S(e)&&!F(e),I=e=>q(e,Z,R),S=e=>f.test(e),T=e=>q(e,X,N),O=e=>q(e,Q,k),P=e=>q(e,H,R),D=e=>q(e,B,C),_=e=>q(e,J,j),F=e=>m.test(e),$=e=>K(e,X),L=e=>K(e,Y),U=e=>K(e,H),V=e=>K(e,Z),W=e=>K(e,B),G=e=>K(e,J,!0),q=(e,t,r)=>{let o=f.exec(e);return!!o&&(o[1]?t(o[1]):r(o[2]))},K=(e,t,r=!1)=>{let o=m.exec(e);return!!o&&(o[1]?t(o[1]):r)},H=e=>"position"===e||"percentage"===e,B=e=>"image"===e||"url"===e,Z=e=>"length"===e||"size"===e||"bg-size"===e,X=e=>"length"===e,Q=e=>"number"===e,Y=e=>"family-name"===e,J=e=>"shadow"===e;Symbol.toStringTag;let ee=function(e,...t){let r,l,i,c=function(s){let d;return l=(r={cache:(e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,r=new Map,o=new Map,n=(n,a)=>{r.set(n,a),++t>e&&(t=0,o=r,r=new Map)};return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=o.get(e))?(n(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):n(e,t)}}})((d=t.reduce((e,t)=>t(e),e())).cacheSize),parseClassName:(e=>{let{prefix:t,experimentalParseClassName:r}=e,o=e=>{let t,r,o=[],n=0,a=0,l=0;for(let r=0;rl?t-l:void 0}};if(t){let e=t+":",r=o;o=t=>t.startsWith(e)?r(t.substring(e.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:t,maybePostfixModifierPosition:void 0}}if(r){let e=o;o=t=>r({className:t,parseClassName:e})}return o})(d),sortModifiers:(e=>{let t=Object.fromEntries(e.orderSensitiveModifiers.map(e=>[e,!0]));return e=>{if(e.length<=1)return e;let r=[],o=[];return e.forEach(e=>{"["===e[0]||t[e]?(r.push(...o.sort(),e),o=[]):o.push(e)}),r.push(...o.sort()),r}})(d),...(e=>{let t=(e=>{let{theme:t,classGroups:r}=e,o={nextPart:new Map,validators:[]};for(let e in r)a(r[e],o,e,t);return o})(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:l}=e;return{getClassGroupId:e=>{let r=e.split("-");return""===r[0]&&1!==r.length&&r.shift(),o(r,t)||(e=>{if(n.test(e)){let t=n.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}})(e)},getConflictingClassGroupIds:(e,t)=>{let o=r[e]||[];return t&&l[e]?[...o,...l[e]]:o}}})(d)}).cache.get,i=r.cache.set,c=u,u(s)};function u(e){let t=l(e);if(t)return t;let o=((e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n,sortModifiers:a}=t,l=[],i=e.trim().split(s),d="";for(let e=i.length-1;e>=0;e-=1){let t=i[e],{isExternal:s,modifiers:c,hasImportantModifier:u,baseClassName:f,maybePostfixModifierPosition:m}=r(t);if(s){d=t+(d.length>0?" "+d:d);continue}let p=!!m,h=o(p?f.substring(0,m):f);if(!h){if(!p||!(h=o(f))){d=t+(d.length>0?" "+d:d);continue}p=!1}let b=a(c).join(":"),g=u?b+"!":b,y=g+h;if(l.includes(y))continue;l.push(y);let v=n(h,p);for(let e=0;e0?" "+d:d)}return d})(e,r);return i(e,o),o}return function(){return c(d.apply(null,arguments))}}(()=>{let e=u("color"),t=u("font"),r=u("text"),o=u("font-weight"),n=u("tracking"),a=u("leading"),l=u("breakpoint"),i=u("container"),s=u("spacing"),d=u("radius"),c=u("shadow"),f=u("inset-shadow"),m=u("text-shadow"),p=u("drop-shadow"),h=u("blur"),b=u("perspective"),g=u("aspect"),y=u("ease"),v=u("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],j=()=>[...R(),F,S],C=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto","contain","none"],K=()=>[F,S,s],H=()=>[w,"full","auto",...K()],B=()=>[x,"none","subgrid",F,S],Z=()=>["auto",{span:["full",x,F,S]},x,F,S],X=()=>[x,"auto",F,S],Q=()=>["auto","min","max","fr",F,S],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],J=()=>["start","end","center","stretch","center-safe","end-safe"],ee=()=>["auto",...K()],et=()=>[w,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...K()],er=()=>[e,F,S],eo=()=>[...R(),U,P,{position:[F,S]}],en=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ea=()=>["auto","cover","contain",V,I,{size:[F,S]}],el=()=>[A,$,T],ei=()=>["","none","full",d,F,S],es=()=>["",k,$,T],ed=()=>["solid","dashed","dotted","double"],ec=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],eu=()=>[k,A,U,P],ef=()=>["","none",h,F,S],em=()=>["none",k,F,S],ep=()=>["none",k,F,S],eh=()=>[k,F,S],eb=()=>[w,"full",...K()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[z],breakpoint:[z],color:[M],container:[z],"drop-shadow":[z],ease:["in","out","in-out"],font:[E],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[z],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[z],shadow:[z],spacing:["px",k],text:[z],"text-shadow":[z],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",w,S,F,g]}],container:["container"],columns:[{columns:[k,S,F,i]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:j()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:H()}],"inset-x":[{"inset-x":H()}],"inset-y":[{"inset-y":H()}],start:[{start:H()}],end:[{end:H()}],top:[{top:H()}],right:[{right:H()}],bottom:[{bottom:H()}],left:[{left:H()}],visibility:["visible","invisible","collapse"],z:[{z:[x,"auto",F,S]}],basis:[{basis:[w,"full","auto",i,...K()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[k,w,"auto","initial","none",S]}],grow:[{grow:["",k,F,S]}],shrink:[{shrink:["",k,F,S]}],order:[{order:[x,"first","last","none",F,S]}],"grid-cols":[{"grid-cols":B()}],"col-start-end":[{col:Z()}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":B()}],"row-start-end":[{row:Z()}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Q()}],"auto-rows":[{"auto-rows":Q()}],gap:[{gap:K()}],"gap-x":[{"gap-x":K()}],"gap-y":[{"gap-y":K()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...J(),"normal"]}],"justify-self":[{"justify-self":["auto",...J()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...J(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...J(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...J(),"baseline"]}],"place-self":[{"place-self":["auto",...J()]}],p:[{p:K()}],px:[{px:K()}],py:[{py:K()}],ps:[{ps:K()}],pe:[{pe:K()}],pt:[{pt:K()}],pr:[{pr:K()}],pb:[{pb:K()}],pl:[{pl:K()}],m:[{m:ee()}],mx:[{mx:ee()}],my:[{my:ee()}],ms:[{ms:ee()}],me:[{me:ee()}],mt:[{mt:ee()}],mr:[{mr:ee()}],mb:[{mb:ee()}],ml:[{ml:ee()}],"space-x":[{"space-x":K()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":K()}],"space-y-reverse":["space-y-reverse"],size:[{size:et()}],w:[{w:[i,"screen",...et()]}],"min-w":[{"min-w":[i,"screen","none",...et()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[l]},...et()]}],h:[{h:["screen","lh",...et()]}],"min-h":[{"min-h":["screen","lh","none",...et()]}],"max-h":[{"max-h":["screen","lh",...et()]}],"font-size":[{text:["base",r,$,T]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,F,O]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",A,S]}],"font-family":[{font:[L,S,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,F,S]}],"line-clamp":[{"line-clamp":[k,"none",F,O]}],leading:[{leading:[a,...K()]}],"list-image":[{"list-image":["none",F,S]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",F,S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:er()}],"text-color":[{text:er()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ed(),"wavy"]}],"text-decoration-thickness":[{decoration:[k,"from-font","auto",F,T]}],"text-decoration-color":[{decoration:er()}],"underline-offset":[{"underline-offset":[k,"auto",F,S]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:K()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",F,S]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",F,S]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:eo()}],"bg-repeat":[{bg:en()}],"bg-size":[{bg:ea()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},x,F,S],radial:["",F,S],conic:[x,F,S]},W,D]}],"bg-color":[{bg:er()}],"gradient-from-pos":[{from:el()}],"gradient-via-pos":[{via:el()}],"gradient-to-pos":[{to:el()}],"gradient-from":[{from:er()}],"gradient-via":[{via:er()}],"gradient-to":[{to:er()}],rounded:[{rounded:ei()}],"rounded-s":[{"rounded-s":ei()}],"rounded-e":[{"rounded-e":ei()}],"rounded-t":[{"rounded-t":ei()}],"rounded-r":[{"rounded-r":ei()}],"rounded-b":[{"rounded-b":ei()}],"rounded-l":[{"rounded-l":ei()}],"rounded-ss":[{"rounded-ss":ei()}],"rounded-se":[{"rounded-se":ei()}],"rounded-ee":[{"rounded-ee":ei()}],"rounded-es":[{"rounded-es":ei()}],"rounded-tl":[{"rounded-tl":ei()}],"rounded-tr":[{"rounded-tr":ei()}],"rounded-br":[{"rounded-br":ei()}],"rounded-bl":[{"rounded-bl":ei()}],"border-w":[{border:es()}],"border-w-x":[{"border-x":es()}],"border-w-y":[{"border-y":es()}],"border-w-s":[{"border-s":es()}],"border-w-e":[{"border-e":es()}],"border-w-t":[{"border-t":es()}],"border-w-r":[{"border-r":es()}],"border-w-b":[{"border-b":es()}],"border-w-l":[{"border-l":es()}],"divide-x":[{"divide-x":es()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":es()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ed(),"hidden","none"]}],"divide-style":[{divide:[...ed(),"hidden","none"]}],"border-color":[{border:er()}],"border-color-x":[{"border-x":er()}],"border-color-y":[{"border-y":er()}],"border-color-s":[{"border-s":er()}],"border-color-e":[{"border-e":er()}],"border-color-t":[{"border-t":er()}],"border-color-r":[{"border-r":er()}],"border-color-b":[{"border-b":er()}],"border-color-l":[{"border-l":er()}],"divide-color":[{divide:er()}],"outline-style":[{outline:[...ed(),"none","hidden"]}],"outline-offset":[{"outline-offset":[k,F,S]}],"outline-w":[{outline:["",k,$,T]}],"outline-color":[{outline:er()}],shadow:[{shadow:["","none",c,G,_]}],"shadow-color":[{shadow:er()}],"inset-shadow":[{"inset-shadow":["none",f,G,_]}],"inset-shadow-color":[{"inset-shadow":er()}],"ring-w":[{ring:es()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:er()}],"ring-offset-w":[{"ring-offset":[k,T]}],"ring-offset-color":[{"ring-offset":er()}],"inset-ring-w":[{"inset-ring":es()}],"inset-ring-color":[{"inset-ring":er()}],"text-shadow":[{"text-shadow":["none",m,G,_]}],"text-shadow-color":[{"text-shadow":er()}],opacity:[{opacity:[k,F,S]}],"mix-blend":[{"mix-blend":[...ec(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ec()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[k]}],"mask-image-linear-from-pos":[{"mask-linear-from":eu()}],"mask-image-linear-to-pos":[{"mask-linear-to":eu()}],"mask-image-linear-from-color":[{"mask-linear-from":er()}],"mask-image-linear-to-color":[{"mask-linear-to":er()}],"mask-image-t-from-pos":[{"mask-t-from":eu()}],"mask-image-t-to-pos":[{"mask-t-to":eu()}],"mask-image-t-from-color":[{"mask-t-from":er()}],"mask-image-t-to-color":[{"mask-t-to":er()}],"mask-image-r-from-pos":[{"mask-r-from":eu()}],"mask-image-r-to-pos":[{"mask-r-to":eu()}],"mask-image-r-from-color":[{"mask-r-from":er()}],"mask-image-r-to-color":[{"mask-r-to":er()}],"mask-image-b-from-pos":[{"mask-b-from":eu()}],"mask-image-b-to-pos":[{"mask-b-to":eu()}],"mask-image-b-from-color":[{"mask-b-from":er()}],"mask-image-b-to-color":[{"mask-b-to":er()}],"mask-image-l-from-pos":[{"mask-l-from":eu()}],"mask-image-l-to-pos":[{"mask-l-to":eu()}],"mask-image-l-from-color":[{"mask-l-from":er()}],"mask-image-l-to-color":[{"mask-l-to":er()}],"mask-image-x-from-pos":[{"mask-x-from":eu()}],"mask-image-x-to-pos":[{"mask-x-to":eu()}],"mask-image-x-from-color":[{"mask-x-from":er()}],"mask-image-x-to-color":[{"mask-x-to":er()}],"mask-image-y-from-pos":[{"mask-y-from":eu()}],"mask-image-y-to-pos":[{"mask-y-to":eu()}],"mask-image-y-from-color":[{"mask-y-from":er()}],"mask-image-y-to-color":[{"mask-y-to":er()}],"mask-image-radial":[{"mask-radial":[F,S]}],"mask-image-radial-from-pos":[{"mask-radial-from":eu()}],"mask-image-radial-to-pos":[{"mask-radial-to":eu()}],"mask-image-radial-from-color":[{"mask-radial-from":er()}],"mask-image-radial-to-color":[{"mask-radial-to":er()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[k]}],"mask-image-conic-from-pos":[{"mask-conic-from":eu()}],"mask-image-conic-to-pos":[{"mask-conic-to":eu()}],"mask-image-conic-from-color":[{"mask-conic-from":er()}],"mask-image-conic-to-color":[{"mask-conic-to":er()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:eo()}],"mask-repeat":[{mask:en()}],"mask-size":[{mask:ea()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",F,S]}],filter:[{filter:["","none",F,S]}],blur:[{blur:ef()}],brightness:[{brightness:[k,F,S]}],contrast:[{contrast:[k,F,S]}],"drop-shadow":[{"drop-shadow":["","none",p,G,_]}],"drop-shadow-color":[{"drop-shadow":er()}],grayscale:[{grayscale:["",k,F,S]}],"hue-rotate":[{"hue-rotate":[k,F,S]}],invert:[{invert:["",k,F,S]}],saturate:[{saturate:[k,F,S]}],sepia:[{sepia:["",k,F,S]}],"backdrop-filter":[{"backdrop-filter":["","none",F,S]}],"backdrop-blur":[{"backdrop-blur":ef()}],"backdrop-brightness":[{"backdrop-brightness":[k,F,S]}],"backdrop-contrast":[{"backdrop-contrast":[k,F,S]}],"backdrop-grayscale":[{"backdrop-grayscale":["",k,F,S]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[k,F,S]}],"backdrop-invert":[{"backdrop-invert":["",k,F,S]}],"backdrop-opacity":[{"backdrop-opacity":[k,F,S]}],"backdrop-saturate":[{"backdrop-saturate":[k,F,S]}],"backdrop-sepia":[{"backdrop-sepia":["",k,F,S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":K()}],"border-spacing-x":[{"border-spacing-x":K()}],"border-spacing-y":[{"border-spacing-y":K()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",F,S]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[k,"initial",F,S]}],ease:[{ease:["linear","initial",y,F,S]}],delay:[{delay:[k,F,S]}],animate:[{animate:["none",v,F,S]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,F,S]}],"perspective-origin":[{"perspective-origin":j()}],rotate:[{rotate:em()}],"rotate-x":[{"rotate-x":em()}],"rotate-y":[{"rotate-y":em()}],"rotate-z":[{"rotate-z":em()}],scale:[{scale:ep()}],"scale-x":[{"scale-x":ep()}],"scale-y":[{"scale-y":ep()}],"scale-z":[{"scale-z":ep()}],"scale-3d":["scale-3d"],skew:[{skew:eh()}],"skew-x":[{"skew-x":eh()}],"skew-y":[{"skew-y":eh()}],transform:[{transform:[F,S,"","none","gpu","cpu"]}],"transform-origin":[{origin:j()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:eb()}],"translate-x":[{"translate-x":eb()}],"translate-y":[{"translate-y":eb()}],"translate-z":[{"translate-z":eb()}],"translate-none":["translate-none"],accent:[{accent:er()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:er()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",F,S]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":K()}],"scroll-mx":[{"scroll-mx":K()}],"scroll-my":[{"scroll-my":K()}],"scroll-ms":[{"scroll-ms":K()}],"scroll-me":[{"scroll-me":K()}],"scroll-mt":[{"scroll-mt":K()}],"scroll-mr":[{"scroll-mr":K()}],"scroll-mb":[{"scroll-mb":K()}],"scroll-ml":[{"scroll-ml":K()}],"scroll-p":[{"scroll-p":K()}],"scroll-px":[{"scroll-px":K()}],"scroll-py":[{"scroll-py":K()}],"scroll-ps":[{"scroll-ps":K()}],"scroll-pe":[{"scroll-pe":K()}],"scroll-pt":[{"scroll-pt":K()}],"scroll-pr":[{"scroll-pr":K()}],"scroll-pb":[{"scroll-pb":K()}],"scroll-pl":[{"scroll-pl":K()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",F,S]}],fill:[{fill:["none",...er()]}],"stroke-w":[{stroke:[k,$,T,O]}],stroke:[{stroke:["none",...er()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}})},9708:(e,t,r)=>{r.d(t,{DX:()=>i,TL:()=>l});var o=r(2115),n=r(6101),a=r(5155);function l(e){let t=function(e){let t=o.forwardRef((e,t)=>{let{children:r,...a}=e;if(o.isValidElement(r)){var l;let e,i,s=(l=r,(i=(e=Object.getOwnPropertyDescriptor(l.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?l.ref:(i=(e=Object.getOwnPropertyDescriptor(l,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?l.props.ref:l.props.ref||l.ref),d=function(e,t){let r={...t};for(let o in t){let n=e[o],a=t[o];/^on[A-Z]/.test(o)?n&&a?r[o]=(...e)=>{let t=a(...e);return n(...e),t}:n&&(r[o]=n):"style"===o?r[o]={...n,...a}:"className"===o&&(r[o]=[n,a].filter(Boolean).join(" "))}return{...e,...r}}(a,r.props);return r.type!==o.Fragment&&(d.ref=t?(0,n.t)(t,s):s),o.cloneElement(r,d)}return o.Children.count(r)>1?o.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}(e),r=o.forwardRef((e,r)=>{let{children:n,...l}=e,i=o.Children.toArray(n),s=i.find(d);if(s){let e=s.props.children,n=i.map(t=>t!==s?t:o.Children.count(e)>1?o.Children.only(null):o.isValidElement(e)?e.props.children:null);return(0,a.jsx)(t,{...l,ref:r,children:o.isValidElement(e)?o.cloneElement(e,void 0,n):null})}return(0,a.jsx)(t,{...l,ref:r,children:n})});return r.displayName=`${e}.Slot`,r}var i=l("Slot"),s=Symbol("radix.slottable");function d(e){return o.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===s}},9803:(e,t,r)=>{r.d(t,{A:()=>o});let o=(0,r(9946).A)("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]])},9869:(e,t,r)=>{r.d(t,{A:()=>o});let o=(0,r(9946).A)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]])},9946:(e,t,r)=>{r.d(t,{A:()=>s});var o=r(2115);let n=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},a=function(){for(var e=arguments.length,t=Array(e),r=0;r!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()};var l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,o.forwardRef)((e,t)=>{let{color:r="currentColor",size:n=24,strokeWidth:i=2,absoluteStrokeWidth:s,className:d="",children:c,iconNode:u,...f}=e;return(0,o.createElement)("svg",{ref:t,...l,width:n,height:n,stroke:r,strokeWidth:s?24*Number(i)/Number(n):i,className:a("lucide",d),...!c&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(f)&&{"aria-hidden":"true"},...f},[...u.map(e=>{let[t,r]=e;return(0,o.createElement)(t,r)}),...Array.isArray(c)?c:[c]])}),s=(e,t)=>{let r=(0,o.forwardRef)((r,l)=>{let{className:s,...d}=r;return(0,o.createElement)(i,{ref:l,iconNode:t,className:a("lucide-".concat(n(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-".concat(e),s),...d})});return r.displayName=n(e),r}}}]); \ No newline at end of file diff --git a/internal/web/frontend/_next/static/chunks/984-39bc34483f07a61c.js b/internal/web/frontend/_next/static/chunks/984-39bc34483f07a61c.js deleted file mode 100644 index cc6b85e..0000000 --- a/internal/web/frontend/_next/static/chunks/984-39bc34483f07a61c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[984],{227:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(9946).A)("music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]])},888:(e,t,r)=>{r.d(t,{UC:()=>en,B8:()=>et,bL:()=>ee,l9:()=>er});var n,o=r(2115),a=r(5185),i=r(6081);function l(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function s(e,t){var r=l(e,t,"get");return r.get?r.get.call(e):r.value}function c(e,t,r){var n=l(e,t,"set");if(n.set)n.set.call(e,r);else{if(!n.writable)throw TypeError("attempted to set read only private field");n.value=r}return r}var u=r(6101),d=r(9708),f=r(5155),p=new WeakMap;function m(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let r=function(e,t){let r=e.length,n=h(t),o=n>=0?n:r+n;return o<0||o>=r?-1:o}(e,t);return -1===r?void 0:e[r]}function h(e){return e!=e||0===e?0:Math.trunc(e)}n=new WeakMap,class e extends Map{set(e,t){return p.get(this)&&(this.has(e)?s(this,n)[s(this,n).indexOf(e)]=e:s(this,n).push(e)),super.set(e,t),this}insert(e,t,r){let o,a=this.has(t),i=s(this,n).length,l=h(e),c=l>=0?l:i+l,u=c<0||c>=i?-1:c;if(u===this.size||a&&u===this.size-1||-1===u)return this.set(t,r),this;let d=this.size+ +!a;l<0&&c++;let f=[...s(this,n)],p=!1;for(let e=c;e=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return n;r++}}findIndex(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return r;r++}return -1}filter(t,r){let n=[],o=0;for(let e of this)Reflect.apply(t,r,[e,o,this])&&n.push(e),o++;return new e(n)}map(t,r){let n=[],o=0;for(let e of this)n.push([e[0],Reflect.apply(t,r,[e,o,this])]),o++;return new e(n)}reduce(){for(var e=arguments.length,t=Array(e),r=0;r=0;e--){let r=this.at(e);a=e===this.size-1&&1===t.length?r:Reflect.apply(n,this,[a,r,e,this])}return a}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),n=this.get(r);t.set(r,n)}return t}toSpliced(){for(var t=arguments.length,r=Array(t),n=0;n0&&(o=r-1);for(let e=t;e<=o;e++){let t=this.keyAt(e),r=this.get(t);n.set(t,r)}return n}every(e,t){let r=0;for(let n of this){if(!Reflect.apply(e,t,[n,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return!0;r++}return!1}constructor(e){super(e),function(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}(this,n,{writable:!0,value:void 0}),c(this,n,[...super.keys()]),p.set(this,!0)}};var v=r(1285),g=r(3655),b=r(9033),y=r(5845),w=o.createContext(void 0);function x(e){let t=o.useContext(w);return e||t||"ltr"}var k="rovingFocusGroup.onEntryFocus",E={bubbles:!1,cancelable:!0},A="RovingFocusGroup",[C,R,N]=function(e){let t=e+"CollectionProvider",[r,n]=(0,i.A)(t),[a,l]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=e=>{let{scope:t,children:r}=e,n=o.useRef(null),i=o.useRef(new Map).current;return(0,f.jsx)(a,{scope:t,itemMap:i,collectionRef:n,children:r})};s.displayName=t;let c=e+"CollectionSlot",p=(0,d.TL)(c),m=o.forwardRef((e,t)=>{let{scope:r,children:n}=e,o=l(c,r),a=(0,u.s)(t,o.collectionRef);return(0,f.jsx)(p,{ref:a,children:n})});m.displayName=c;let h=e+"CollectionItemSlot",v="data-radix-collection-item",g=(0,d.TL)(h),b=o.forwardRef((e,t)=>{let{scope:r,children:n,...a}=e,i=o.useRef(null),s=(0,u.s)(t,i),c=l(h,r);return o.useEffect(()=>(c.itemMap.set(i,{ref:i,...a}),()=>void c.itemMap.delete(i))),(0,f.jsx)(g,{...{[v]:""},ref:s,children:n})});return b.displayName=h,[{Provider:s,Slot:m,ItemSlot:b},function(t){let r=l(e+"CollectionConsumer",t);return o.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll("[".concat(v,"]")));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},n]}(A),[M,j]=(0,i.A)(A,[N]),[S,O]=M(A),T=o.forwardRef((e,t)=>(0,f.jsx)(C.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,f.jsx)(C.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,f.jsx)(z,{...e,ref:t})})}));T.displayName=A;var z=o.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:l,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:d,onEntryFocus:p,preventScrollOnEntryFocus:m=!1,...h}=e,v=o.useRef(null),w=(0,u.s)(t,v),C=x(l),[N,M]=(0,y.i)({prop:s,defaultProp:null!=c?c:null,onChange:d,caller:A}),[j,O]=o.useState(!1),T=(0,b.c)(p),z=R(r),D=o.useRef(!1),[P,I]=o.useState(0);return o.useEffect(()=>{let e=v.current;if(e)return e.addEventListener(k,T),()=>e.removeEventListener(k,T)},[T]),(0,f.jsx)(S,{scope:r,orientation:n,dir:C,loop:i,currentTabStopId:N,onItemFocus:o.useCallback(e=>M(e),[M]),onItemShiftTab:o.useCallback(()=>O(!0),[]),onFocusableItemAdd:o.useCallback(()=>I(e=>e+1),[]),onFocusableItemRemove:o.useCallback(()=>I(e=>e-1),[]),children:(0,f.jsx)(g.sG.div,{tabIndex:j||0===P?-1:0,"data-orientation":n,...h,ref:w,style:{outline:"none",...e.style},onMouseDown:(0,a.m)(e.onMouseDown,()=>{D.current=!0}),onFocus:(0,a.m)(e.onFocus,e=>{let t=!D.current;if(e.target===e.currentTarget&&t&&!j){let t=new CustomEvent(k,E);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=z().filter(e=>e.focusable);L([e.find(e=>e.active),e.find(e=>e.id===N),...e].filter(Boolean).map(e=>e.ref.current),m)}}D.current=!1}),onBlur:(0,a.m)(e.onBlur,()=>O(!1))})})}),D="RovingFocusGroupItem",P=o.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:l,children:s,...c}=e,u=(0,v.B)(),d=l||u,p=O(D,r),m=p.currentTabStopId===d,h=R(r),{onFocusableItemAdd:b,onFocusableItemRemove:y,currentTabStopId:w}=p;return o.useEffect(()=>{if(n)return b(),()=>y()},[n,b,y]),(0,f.jsx)(C.ItemSlot,{scope:r,id:d,focusable:n,active:i,children:(0,f.jsx)(g.sG.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...c,ref:t,onMouseDown:(0,a.m)(e.onMouseDown,e=>{n?p.onItemFocus(d):e.preventDefault()}),onFocus:(0,a.m)(e.onFocus,()=>p.onItemFocus(d)),onKeyDown:(0,a.m)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void p.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var n;let o=(n=e.key,"rtl"!==r?n:"ArrowLeft"===n?"ArrowRight":"ArrowRight"===n?"ArrowLeft":n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(o))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(o)))return I[o]}(e,p.orientation,p.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let r=h().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)r.reverse();else if("prev"===t||"next"===t){"prev"===t&&r.reverse();let n=r.indexOf(e.currentTarget);r=p.loop?function(e,t){return e.map((r,n)=>e[(t+n)%e.length])}(r,n+1):r.slice(n+1)}setTimeout(()=>L(r))}}),children:"function"==typeof s?s({isCurrentTabStop:m,hasTabStop:null!=w}):s})})});P.displayName=D;var I={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function L(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}var F=r(8905),_="Tabs",[W,G]=(0,i.A)(_,[j]),B=j(),[$,U]=W(_),q=o.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:l,activationMode:s="automatic",...c}=e,u=x(l),[d,p]=(0,y.i)({prop:n,onChange:o,defaultProp:null!=a?a:"",caller:_});return(0,f.jsx)($,{scope:r,baseId:(0,v.B)(),value:d,onValueChange:p,orientation:i,dir:u,activationMode:s,children:(0,f.jsx)(g.sG.div,{dir:u,"data-orientation":i,...c,ref:t})})});q.displayName=_;var K="TabsList",V=o.forwardRef((e,t)=>{let{__scopeTabs:r,loop:n=!0,...o}=e,a=U(K,r),i=B(r);return(0,f.jsx)(T,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:n,children:(0,f.jsx)(g.sG.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});V.displayName=K;var H="TabsTrigger",Z=o.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,disabled:o=!1,...i}=e,l=U(H,r),s=B(r),c=J(l.baseId,n),u=Q(l.baseId,n),d=n===l.value;return(0,f.jsx)(P,{asChild:!0,...s,focusable:!o,active:d,children:(0,f.jsx)(g.sG.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...i,ref:t,onMouseDown:(0,a.m)(e.onMouseDown,e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():l.onValueChange(n)}),onKeyDown:(0,a.m)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&l.onValueChange(n)}),onFocus:(0,a.m)(e.onFocus,()=>{let e="manual"!==l.activationMode;d||o||!e||l.onValueChange(n)})})})});Z.displayName=H;var X="TabsContent",Y=o.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,forceMount:a,children:i,...l}=e,s=U(X,r),c=J(s.baseId,n),u=Q(s.baseId,n),d=n===s.value,p=o.useRef(d);return o.useEffect(()=>{let e=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,f.jsx)(F.C,{present:a||d,children:r=>{let{present:n}=r;return(0,f.jsx)(g.sG.div,{"data-state":d?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":c,hidden:!n,id:u,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:n&&i})}})});function J(e,t){return"".concat(e,"-trigger-").concat(t)}function Q(e,t){return"".concat(e,"-content-").concat(t)}Y.displayName=X;var ee=q,et=V,er=Z,en=Y},1285:(e,t,r)=>{r.d(t,{B:()=>s});var n,o=r(2115),a=r(2712),i=(n||(n=r.t(o,2)))[" useId ".trim().toString()]||(()=>void 0),l=0;function s(e){let[t,r]=o.useState(i());return(0,a.N)(()=>{e||r(e=>e??String(l++))},[e]),e||(t?`radix-${t}`:"")}},1497:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(9946).A)("message-square",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]])},1788:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(9946).A)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]])},2085:(e,t,r)=>{r.d(t,{F:()=>i});var n=r(2596);let o=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,a=n.$,i=(e,t)=>r=>{var n;if((null==t?void 0:t.variants)==null)return a(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:i,defaultVariants:l}=t,s=Object.keys(i).map(e=>{let t=null==r?void 0:r[e],n=null==l?void 0:l[e];if(null===t)return null;let a=o(t)||o(n);return i[e][a]}),c=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{});return a(e,s,null==t||null==(n=t.compoundVariants)?void 0:n.reduce((e,t)=>{let{class:r,className:n,...o}=t;return Object.entries(o).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...l,...c}[t]):({...l,...c})[t]===r})?[...e,r,n]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}},2486:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(9946).A)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},2596:(e,t,r)=>{r.d(t,{$:()=>n});function n(){for(var e,t,r=0,n="",o=arguments.length;r{r.d(t,{A:()=>n});let n=(0,r(9946).A)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},2712:(e,t,r)=>{r.d(t,{N:()=>o});var n=r(2115),o=globalThis?.document?n.useLayoutEffect:()=>{}},3470:(e,t,r)=>{r.d(t,{bm:()=>ta,UC:()=>tr,VY:()=>to,hJ:()=>tt,ZL:()=>te,bL:()=>e3,hE:()=>tn,l9:()=>e7});var n,o,a,i=r(2115),l=r(5185),s=r(6101),c=r(6081),u=r(1285),d=r(5845),f=r(3655),p=r(9033),m=r(5155),h="dismissableLayer.update",v=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),g=i.forwardRef((e,t)=>{var r,n;let{disableOutsidePointerEvents:a=!1,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:g,onDismiss:w,...x}=e,k=i.useContext(v),[E,A]=i.useState(null),C=null!=(n=null==E?void 0:E.ownerDocument)?n:null==(r=globalThis)?void 0:r.document,[,R]=i.useState({}),N=(0,s.s)(t,e=>A(e)),M=Array.from(k.layers),[j]=[...k.layersWithOutsidePointerEventsDisabled].slice(-1),S=M.indexOf(j),O=E?M.indexOf(E):-1,T=k.layersWithOutsidePointerEventsDisabled.size>0,z=O>=S,D=function(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null==(t=globalThis)?void 0:t.document,n=(0,p.c)(e),o=i.useRef(!1),a=i.useRef(()=>{});return i.useEffect(()=>{let e=e=>{if(e.target&&!o.current){let t=function(){y("dismissableLayer.pointerDownOutside",n,o,{discrete:!0})},o={originalEvent:e};"touch"===e.pointerType?(r.removeEventListener("click",a.current),a.current=t,r.addEventListener("click",a.current,{once:!0})):t()}else r.removeEventListener("click",a.current);o.current=!1},t=window.setTimeout(()=>{r.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(t),r.removeEventListener("pointerdown",e),r.removeEventListener("click",a.current)}},[r,n]),{onPointerDownCapture:()=>o.current=!0}}(e=>{let t=e.target,r=[...k.branches].some(e=>e.contains(t));z&&!r&&(null==u||u(e),null==g||g(e),e.defaultPrevented||null==w||w())},C),P=function(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null==(t=globalThis)?void 0:t.document,n=(0,p.c)(e),o=i.useRef(!1);return i.useEffect(()=>{let e=e=>{e.target&&!o.current&&y("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return r.addEventListener("focusin",e),()=>r.removeEventListener("focusin",e)},[r,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{let t=e.target;![...k.branches].some(e=>e.contains(t))&&(null==d||d(e),null==g||g(e),e.defaultPrevented||null==w||w())},C);return!function(e,t=globalThis?.document){let r=(0,p.c)(e);i.useEffect(()=>{let e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}(e=>{O===k.layers.size-1&&(null==c||c(e),!e.defaultPrevented&&w&&(e.preventDefault(),w()))},C),i.useEffect(()=>{if(E)return a&&(0===k.layersWithOutsidePointerEventsDisabled.size&&(o=C.body.style.pointerEvents,C.body.style.pointerEvents="none"),k.layersWithOutsidePointerEventsDisabled.add(E)),k.layers.add(E),b(),()=>{a&&1===k.layersWithOutsidePointerEventsDisabled.size&&(C.body.style.pointerEvents=o)}},[E,C,a,k]),i.useEffect(()=>()=>{E&&(k.layers.delete(E),k.layersWithOutsidePointerEventsDisabled.delete(E),b())},[E,k]),i.useEffect(()=>{let e=()=>R({});return document.addEventListener(h,e),()=>document.removeEventListener(h,e)},[]),(0,m.jsx)(f.sG.div,{...x,ref:N,style:{pointerEvents:T?z?"auto":"none":void 0,...e.style},onFocusCapture:(0,l.m)(e.onFocusCapture,P.onFocusCapture),onBlurCapture:(0,l.m)(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:(0,l.m)(e.onPointerDownCapture,D.onPointerDownCapture)})});function b(){let e=new CustomEvent(h);document.dispatchEvent(e)}function y(e,t,r,n){let{discrete:o}=n,a=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),o?(0,f.hO)(a,i):a.dispatchEvent(i)}g.displayName="DismissableLayer",i.forwardRef((e,t)=>{let r=i.useContext(v),n=i.useRef(null),o=(0,s.s)(t,n);return i.useEffect(()=>{let e=n.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),(0,m.jsx)(f.sG.div,{...e,ref:o})}).displayName="DismissableLayerBranch";var w="focusScope.autoFocusOnMount",x="focusScope.autoFocusOnUnmount",k={bubbles:!1,cancelable:!0},E=i.forwardRef((e,t)=>{let{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...l}=e,[c,u]=i.useState(null),d=(0,p.c)(o),h=(0,p.c)(a),v=i.useRef(null),g=(0,s.s)(t,e=>u(e)),b=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(n){let e=function(e){if(b.paused||!c)return;let t=e.target;c.contains(t)?v.current=t:R(v.current,{select:!0})},t=function(e){if(b.paused||!c)return;let t=e.relatedTarget;null!==t&&(c.contains(t)||R(v.current,{select:!0}))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let r=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&R(c)});return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[n,c,b.paused]),i.useEffect(()=>{if(c){N.add(b);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(w,k);c.addEventListener(w,d),c.dispatchEvent(t),t.defaultPrevented||(function(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=document.activeElement;for(let n of e)if(R(n,{select:t}),document.activeElement!==r)return}(A(c).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&R(c))}return()=>{c.removeEventListener(w,d),setTimeout(()=>{let t=new CustomEvent(x,k);c.addEventListener(x,h),c.dispatchEvent(t),t.defaultPrevented||R(null!=e?e:document.body,{select:!0}),c.removeEventListener(x,h),N.remove(b)},0)}}},[c,d,h,b]);let y=i.useCallback(e=>{if(!r&&!n||b.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){let t=e.currentTarget,[n,a]=function(e){let t=A(e);return[C(t,e),C(t.reverse(),e)]}(t);n&&a?e.shiftKey||o!==a?e.shiftKey&&o===n&&(e.preventDefault(),r&&R(a,{select:!0})):(e.preventDefault(),r&&R(n,{select:!0})):o===t&&e.preventDefault()}},[r,n,b.paused]);return(0,m.jsx)(f.sG.div,{tabIndex:-1,...l,ref:g,onKeyDown:y})});function A(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function C(e,t){for(let r of e)if(!function(e,t){let{upTo:r}=t;if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===r||e!==r);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(r,{upTo:t}))return r}function R(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.focus){var r;let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&(r=e)instanceof HTMLInputElement&&"select"in r&&t&&e.select()}}E.displayName="FocusScope";var N=function(){let e=[];return{add(t){let r=e[0];t!==r&&(null==r||r.pause()),(e=M(e,t)).unshift(t)},remove(t){var r;null==(r=(e=M(e,t))[0])||r.resume()}}}();function M(e,t){let r=[...e],n=r.indexOf(t);return -1!==n&&r.splice(n,1),r}var j=r(7650),S=r(2712),O=i.forwardRef((e,t)=>{var r,n;let{container:o,...a}=e,[l,s]=i.useState(!1);(0,S.N)(()=>s(!0),[]);let c=o||l&&(null==(n=globalThis)||null==(r=n.document)?void 0:r.body);return c?j.createPortal((0,m.jsx)(f.sG.div,{...a,ref:t}),c):null});O.displayName="Portal";var T=r(8905),z=0;function D(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var P=function(){return(P=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}Object.create;Object.create;var L=("function"==typeof SuppressedError&&SuppressedError,"right-scroll-bar-position"),F="width-before-scroll-bar";function _(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var W="undefined"!=typeof window?i.useLayoutEffect:i.useEffect,G=new WeakMap;function B(e){return e}var $=function(e){void 0===e&&(e={});var t,r,n,o=(void 0===t&&(t=B),r=[],n=!1,{read:function(){if(n)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:null},useMedium:function(e){var o=t(e,n);return r.push(o),function(){r=r.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var o=r;r=[],o.forEach(e),t=r}var a=function(){var r=t;t=[],r.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),r={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),r}}}});return o.options=P({async:!0,ssr:!1},e),o}(),U=function(){},q=i.forwardRef(function(e,t){var r,n,o,a,l=i.useRef(null),s=i.useState({onScrollCapture:U,onWheelCapture:U,onTouchMoveCapture:U}),c=s[0],u=s[1],d=e.forwardProps,f=e.children,p=e.className,m=e.removeScrollBar,h=e.enabled,v=e.shards,g=e.sideCar,b=e.noRelative,y=e.noIsolation,w=e.inert,x=e.allowPinchZoom,k=e.as,E=e.gapMode,A=I(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=(r=[l,t],n=function(e){return r.forEach(function(t){return _(t,e)})},(o=(0,i.useState)(function(){return{value:null,callback:n,facade:{get current(){return o.value},set current(value){var e=o.value;e!==value&&(o.value=value,o.callback(value,e))}}}})[0]).callback=n,a=o.facade,W(function(){var e=G.get(a);if(e){var t=new Set(e),n=new Set(r),o=a.current;t.forEach(function(e){n.has(e)||_(e,null)}),n.forEach(function(e){t.has(e)||_(e,o)})}G.set(a,r)},[r]),a),R=P(P({},A),c);return i.createElement(i.Fragment,null,h&&i.createElement(g,{sideCar:$,removeScrollBar:m,shards:v,noRelative:b,noIsolation:y,inert:w,setCallbacks:u,allowPinchZoom:!!x,lockRef:l,gapMode:E}),d?i.cloneElement(i.Children.only(f),P(P({},R),{ref:C})):i.createElement(void 0===k?"div":k,P({},R,{className:p,ref:C}),f))});q.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},q.classNames={fullWidth:F,zeroRight:L};var K=function(e){var t=e.sideCar,r=I(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw Error("Sidecar medium not found");return i.createElement(n,P({},r))};K.isSideCarExport=!0;var V=function(){var e=0,t=null;return{add:function(n){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=a||r.nc;return t&&e.setAttribute("nonce",t),e}())){var o,i;(o=t).styleSheet?o.styleSheet.cssText=n:o.appendChild(document.createTextNode(n)),i=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(i)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},H=function(){var e=V();return function(t,r){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Z=function(){var e=H();return function(t){return e(t.styles,t.dynamic),null}},X={left:0,top:0,right:0,gap:0},Y=function(e){return parseInt(e||"",10)||0},J=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[Y(r),Y(n),Y(o)]},Q=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return X;var t=J(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},ee=Z(),et="data-scroll-locked",er=function(e,t,r,n){var o=e.left,a=e.top,i=e.right,l=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(l,"px ").concat(n,";\n }\n body[").concat(et,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(L," {\n right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(F," {\n margin-right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(L," .").concat(L," {\n right: 0 ").concat(n,";\n }\n \n .").concat(F," .").concat(F," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(et,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},en=function(){var e=parseInt(document.body.getAttribute(et)||"0",10);return isFinite(e)?e:0},eo=function(){i.useEffect(function(){return document.body.setAttribute(et,(en()+1).toString()),function(){var e=en()-1;e<=0?document.body.removeAttribute(et):document.body.setAttribute(et,e.toString())}},[])},ea=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=void 0===n?"margin":n;eo();var a=i.useMemo(function(){return Q(o)},[o]);return i.createElement(ee,{styles:er(a,!t,o,r?"":"!important")})},ei=!1;if("undefined"!=typeof window)try{var el=Object.defineProperty({},"passive",{get:function(){return ei=!0,!0}});window.addEventListener("test",el,el),window.removeEventListener("test",el,el)}catch(e){ei=!1}var es=!!ei&&{passive:!1},ec=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&(r.overflowY!==r.overflowX||"TEXTAREA"===e.tagName||"visible"!==r[t])},eu=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),ed(e,n)){var o=ef(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},ed=function(e,t){return"v"===e?ec(t,"overflowY"):ec(t,"overflowX")},ef=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},ep=function(e,t,r,n,o){var a,i=(a=window.getComputedStyle(t).direction,"h"===e&&"rtl"===a?-1:1),l=i*n,s=r.target,c=t.contains(s),u=!1,d=l>0,f=0,p=0;do{if(!s)break;var m=ef(e,s),h=m[0],v=m[1]-m[2]-i*h;(h||v)&&ed(e,s)&&(f+=v,p+=h);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return d&&(o&&1>Math.abs(f)||!o&&l>f)?u=!0:!d&&(o&&1>Math.abs(p)||!o&&-l>p)&&(u=!0),u},em=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},eh=function(e){return[e.deltaX,e.deltaY]},ev=function(e){return e&&"current"in e?e.current:e},eg=0,eb=[];let ey=(n=function(e){var t=i.useRef([]),r=i.useRef([0,0]),n=i.useRef(),o=i.useState(eg++)[0],a=i.useState(Z)[0],l=i.useRef(e);i.useEffect(function(){l.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(function(e,t,r){if(r||2==arguments.length)for(var n,o=0,a=t.length;oMath.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=eu(d,u);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=eu(d,u)),!f)return!1;if(!n.current&&"changedTouches"in e&&(s||c)&&(n.current=o),!o)return!0;var p=n.current||o;return ep(p,t,e,"h"===p?s:c,!0)},[]),c=i.useCallback(function(e){if(eb.length&&eb[eb.length-1]===a){var r="deltaY"in e?eh(e):em(e),n=t.current.filter(function(t){var n;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(n=t.delta,n[0]===r[0]&&n[1]===r[1])})[0];if(n&&n.should){e.cancelable&&e.preventDefault();return}if(!n){var o=(l.current.shards||[]).map(ev).filter(Boolean).filter(function(t){return t.contains(e.target)});(o.length>0?s(e,o[0]):!l.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),u=i.useCallback(function(e,r,n,o){var a={name:e,delta:r,target:n,should:o,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(n)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=i.useCallback(function(e){r.current=em(e),n.current=void 0},[]),f=i.useCallback(function(t){u(t.type,eh(t),t.target,s(t,e.lockRef.current))},[]),p=i.useCallback(function(t){u(t.type,em(t),t.target,s(t,e.lockRef.current))},[]);i.useEffect(function(){return eb.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,es),document.addEventListener("touchmove",c,es),document.addEventListener("touchstart",d,es),function(){eb=eb.filter(function(e){return e!==a}),document.removeEventListener("wheel",c,es),document.removeEventListener("touchmove",c,es),document.removeEventListener("touchstart",d,es)}},[]);var m=e.removeScrollBar,h=e.inert;return i.createElement(i.Fragment,null,h?i.createElement(a,{styles:"\n .block-interactivity-".concat(o," {pointer-events: none;}\n .allow-interactivity-").concat(o," {pointer-events: all;}\n")}):null,m?i.createElement(ea,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},$.useMedium(n),K);var ew=i.forwardRef(function(e,t){return i.createElement(q,P({},e,{ref:t,sideCar:ey}))});ew.classNames=q.classNames;var ex=new WeakMap,ek=new WeakMap,eE={},eA=0,eC=function(e){return e&&(e.host||eC(e.parentNode))},eR=function(e,t,r,n){var o=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var r=eC(e);return r&&t.contains(r)?r:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});eE[r]||(eE[r]=new WeakMap);var a=eE[r],i=[],l=new Set,s=new Set(o),c=function(e){!e||l.has(e)||(l.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){!e||s.has(e)||Array.prototype.forEach.call(e.children,function(e){if(l.has(e))u(e);else try{var t=e.getAttribute(n),o=null!==t&&"false"!==t,s=(ex.get(e)||0)+1,c=(a.get(e)||0)+1;ex.set(e,s),a.set(e,c),i.push(e),1===s&&o&&ek.set(e,!0),1===c&&e.setAttribute(r,"true"),o||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return u(t),l.clear(),eA++,function(){i.forEach(function(e){var t=ex.get(e)-1,o=a.get(e)-1;ex.set(e,t),a.set(e,o),t||(ek.has(e)||e.removeAttribute(n),ek.delete(e)),o||e.removeAttribute(r)}),--eA||(ex=new WeakMap,ex=new WeakMap,ek=new WeakMap,eE={})}},eN=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||("undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),eR(n,o,r,"aria-hidden")):function(){return null}},eM=r(9708),ej="Dialog",[eS,eO]=(0,c.A)(ej),[eT,ez]=eS(ej),eD=e=>{let{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:l=!0}=e,s=i.useRef(null),c=i.useRef(null),[f,p]=(0,d.i)({prop:n,defaultProp:null!=o&&o,onChange:a,caller:ej});return(0,m.jsx)(eT,{scope:t,triggerRef:s,contentRef:c,contentId:(0,u.B)(),titleId:(0,u.B)(),descriptionId:(0,u.B)(),open:f,onOpenChange:p,onOpenToggle:i.useCallback(()=>p(e=>!e),[p]),modal:l,children:r})};eD.displayName=ej;var eP="DialogTrigger",eI=i.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,o=ez(eP,r),a=(0,s.s)(t,o.triggerRef);return(0,m.jsx)(f.sG.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":e2(o.open),...n,ref:a,onClick:(0,l.m)(e.onClick,o.onOpenToggle)})});eI.displayName=eP;var eL="DialogPortal",[eF,e_]=eS(eL,{forceMount:void 0}),eW=e=>{let{__scopeDialog:t,forceMount:r,children:n,container:o}=e,a=ez(eL,t);return(0,m.jsx)(eF,{scope:t,forceMount:r,children:i.Children.map(n,e=>(0,m.jsx)(T.C,{present:r||a.open,children:(0,m.jsx)(O,{asChild:!0,container:o,children:e})}))})};eW.displayName=eL;var eG="DialogOverlay",eB=i.forwardRef((e,t)=>{let r=e_(eG,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=ez(eG,e.__scopeDialog);return a.modal?(0,m.jsx)(T.C,{present:n||a.open,children:(0,m.jsx)(eU,{...o,ref:t})}):null});eB.displayName=eG;var e$=(0,eM.TL)("DialogOverlay.RemoveScroll"),eU=i.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,o=ez(eG,r);return(0,m.jsx)(ew,{as:e$,allowPinchZoom:!0,shards:[o.contentRef],children:(0,m.jsx)(f.sG.div,{"data-state":e2(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),eq="DialogContent",eK=i.forwardRef((e,t)=>{let r=e_(eq,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=ez(eq,e.__scopeDialog);return(0,m.jsx)(T.C,{present:n||a.open,children:a.modal?(0,m.jsx)(eV,{...o,ref:t}):(0,m.jsx)(eH,{...o,ref:t})})});eK.displayName=eq;var eV=i.forwardRef((e,t)=>{let r=ez(eq,e.__scopeDialog),n=i.useRef(null),o=(0,s.s)(t,r.contentRef,n);return i.useEffect(()=>{let e=n.current;if(e)return eN(e)},[]),(0,m.jsx)(eZ,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,l.m)(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),null==(t=r.triggerRef.current)||t.focus()}),onPointerDownOutside:(0,l.m)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:(0,l.m)(e.onFocusOutside,e=>e.preventDefault())})}),eH=i.forwardRef((e,t)=>{let r=ez(eq,e.__scopeDialog),n=i.useRef(!1),o=i.useRef(!1);return(0,m.jsx)(eZ,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var a,i;null==(a=e.onCloseAutoFocus)||a.call(e,t),t.defaultPrevented||(n.current||null==(i=r.triggerRef.current)||i.focus(),t.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:t=>{var a,i;null==(a=e.onInteractOutside)||a.call(e,t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));let l=t.target;(null==(i=r.triggerRef.current)?void 0:i.contains(l))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),eZ=i.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,...l}=e,c=ez(eq,r),u=i.useRef(null),d=(0,s.s)(t,u);return i.useEffect(()=>{var e,t;let r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!=(e=r[0])?e:D()),document.body.insertAdjacentElement("beforeend",null!=(t=r[1])?t:D()),z++,()=>{1===z&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),z--}},[]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(E,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,m.jsx)(g,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":e2(c.open),...l,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(e6,{titleId:c.titleId}),(0,m.jsx)(e8,{contentRef:u,descriptionId:c.descriptionId})]})]})}),eX="DialogTitle",eY=i.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,o=ez(eX,r);return(0,m.jsx)(f.sG.h2,{id:o.titleId,...n,ref:t})});eY.displayName=eX;var eJ="DialogDescription",eQ=i.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,o=ez(eJ,r);return(0,m.jsx)(f.sG.p,{id:o.descriptionId,...n,ref:t})});eQ.displayName=eJ;var e0="DialogClose",e1=i.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,o=ez(e0,r);return(0,m.jsx)(f.sG.button,{type:"button",...n,ref:t,onClick:(0,l.m)(e.onClick,()=>o.onOpenChange(!1))})});function e2(e){return e?"open":"closed"}e1.displayName=e0;var e5="DialogTitleWarning",[e4,e9]=(0,c.q)(e5,{contentName:eq,titleName:eX,docsSlug:"dialog"}),e6=e=>{let{titleId:t}=e,r=e9(e5),n="`".concat(r.contentName,"` requires a `").concat(r.titleName,"` for the component to be accessible for screen reader users.\n\nIf you want to hide the `").concat(r.titleName,"`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/").concat(r.docsSlug);return i.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},e8=e=>{let{contentRef:t,descriptionId:r}=e,n=e9("DialogDescriptionWarning"),o="Warning: Missing `Description` or `aria-describedby={undefined}` for {".concat(n.contentName,"}.");return i.useEffect(()=>{var e;let n=null==(e=t.current)?void 0:e.getAttribute("aria-describedby");r&&n&&(document.getElementById(r)||console.warn(o))},[o,t,r]),null},e3=eD,e7=eI,te=eW,tt=eB,tr=eK,tn=eY,to=eQ,ta=e1},3655:(e,t,r)=>{r.d(t,{hO:()=>s,sG:()=>l});var n=r(2115),o=r(7650),a=r(9708),i=r(5155),l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=(0,a.TL)(`Primitive.${t}`),o=n.forwardRef((e,n)=>{let{asChild:o,...a}=e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(o?r:t,{...a,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function s(e,t){e&&o.flushSync(()=>e.dispatchEvent(t))}},4357:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(9946).A)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},4416:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(9946).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},4738:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(9946).A)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]])},5185:(e,t,r)=>{r.d(t,{m:()=>n});function n(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}},5690:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(9946).A)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]])},5695:(e,t,r)=>{var n=r(8999);r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},5845:(e,t,r)=>{r.d(t,{i:()=>l});var n,o=r(2115),a=r(2712),i=(n||(n=r.t(o,2)))[" useInsertionEffect ".trim().toString()]||a.N;function l({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[a,l,s]=function({defaultProp:e,onChange:t}){let[r,n]=o.useState(e),a=o.useRef(r),l=o.useRef(t);return i(()=>{l.current=t},[t]),o.useEffect(()=>{a.current!==r&&(l.current?.(r),a.current=r)},[r,a]),[r,n,l]}({defaultProp:t,onChange:r}),c=void 0!==e,u=c?e:a;{let t=o.useRef(void 0!==e);o.useEffect(()=>{let e=t.current;if(e!==c){let t=c?"controlled":"uncontrolled";console.warn(`${n} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=c},[c,n])}return[u,o.useCallback(t=>{if(c){let r="function"==typeof t?t(e):t;r!==e&&s.current?.(r)}else l(t)},[c,e,l,s])]}Symbol("RADIX:SYNC_STATE")},6081:(e,t,r)=>{r.d(t,{A:()=>i,q:()=>a});var n=r(2115),o=r(5155);function a(e,t){let r=n.createContext(t),a=e=>{let{children:t,...a}=e,i=n.useMemo(()=>a,Object.values(a));return(0,o.jsx)(r.Provider,{value:i,children:t})};return a.displayName=e+"Provider",[a,function(o){let a=n.useContext(r);if(a)return a;if(void 0!==t)return t;throw Error(`\`${o}\` must be used within \`${e}\``)}]}function i(e,t=[]){let r=[],a=()=>{let t=r.map(e=>n.createContext(e));return function(r){let o=r?.[e]||t;return n.useMemo(()=>({[`__scope${e}`]:{...r,[e]:o}}),[r,o])}};return a.scopeName=e,[function(t,a){let i=n.createContext(a),l=r.length;r=[...r,a];let s=t=>{let{scope:r,children:a,...s}=t,c=r?.[e]?.[l]||i,u=n.useMemo(()=>s,Object.values(s));return(0,o.jsx)(c.Provider,{value:u,children:a})};return s.displayName=t+"Provider",[s,function(r,o){let s=o?.[e]?.[l]||i,c=n.useContext(s);if(c)return c;if(void 0!==a)return a;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let o=r.reduce((t,{useScope:r,scopeName:n})=>{let o=r(e)[`__scope${n}`];return{...t,...o}},{});return n.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}(a,...t)]}},6101:(e,t,r)=>{r.d(t,{s:()=>i,t:()=>a});var n=r(2115);function o(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function a(...e){return t=>{let r=!1,n=e.map(e=>{let n=o(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t{r.d(t,{A:()=>n});let n=(0,r(9946).A)("share",[["path",{d:"M12 2v13",key:"1km8f5"}],["path",{d:"m16 6-4-4-4 4",key:"13yo43"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}]])},7213:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(9946).A)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]])},7434:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(9946).A)("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},7580:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(9946).A)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]])},8164:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(9946).A)("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]])},8905:(e,t,r)=>{r.d(t,{C:()=>i});var n=r(2115),o=r(6101),a=r(2712),i=e=>{let{present:t,children:r}=e,i=function(e){var t,r;let[o,i]=n.useState(),s=n.useRef(null),c=n.useRef(e),u=n.useRef("none"),[d,f]=(t=e?"mounted":"unmounted",r={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},n.useReducer((e,t)=>{let n=r[e][t];return null!=n?n:e},t));return n.useEffect(()=>{let e=l(s.current);u.current="mounted"===d?e:"none"},[d]),(0,a.N)(()=>{let t=s.current,r=c.current;if(r!==e){let n=u.current,o=l(t);e?f("MOUNT"):"none"===o||(null==t?void 0:t.display)==="none"?f("UNMOUNT"):r&&n!==o?f("ANIMATION_OUT"):f("UNMOUNT"),c.current=e}},[e,f]),(0,a.N)(()=>{if(o){var e;let t,r=null!=(e=o.ownerDocument.defaultView)?e:window,n=e=>{let n=l(s.current).includes(e.animationName);if(e.target===o&&n&&(f("ANIMATION_END"),!c.current)){let e=o.style.animationFillMode;o.style.animationFillMode="forwards",t=r.setTimeout(()=>{"forwards"===o.style.animationFillMode&&(o.style.animationFillMode=e)})}},a=e=>{e.target===o&&(u.current=l(s.current))};return o.addEventListener("animationstart",a),o.addEventListener("animationcancel",n),o.addEventListener("animationend",n),()=>{r.clearTimeout(t),o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",n),o.removeEventListener("animationend",n)}}f("ANIMATION_END")},[o,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:n.useCallback(e=>{s.current=e?getComputedStyle(e):null,i(e)},[])}}(t),s="function"==typeof r?r({present:i.isPresent}):n.Children.only(r),c=(0,o.s)(i.ref,function(e){var t,r;let n=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=n&&"isReactWarning"in n&&n.isReactWarning;return o?e.ref:(o=(n=null==(r=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:r.get)&&"isReactWarning"in n&&n.isReactWarning)?e.props.ref:e.props.ref||e.ref}(s));return"function"==typeof r||i.isPresent?n.cloneElement(s,{ref:c}):null};function l(e){return(null==e?void 0:e.animationName)||"none"}i.displayName="Presence"},8979:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(9946).A)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]])},9022:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(9946).A)("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]])},9033:(e,t,r)=>{r.d(t,{c:()=>o});var n=r(2115);function o(e){let t=n.useRef(e);return n.useEffect(()=>{t.current=e}),n.useMemo(()=>(...e)=>t.current?.(...e),[])}},9099:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(9946).A)("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]])},9688:(e,t,r)=>{r.d(t,{QP:()=>ee});let n=(e,t)=>{if(0===e.length)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),a=o?n(e.slice(1),o):void 0;if(a)return a;if(0===t.validators.length)return;let i=e.join("-");return t.validators.find(({validator:e})=>e(i))?.classGroupId},o=/^\[(.+)\]$/,a=(e,t,r,n)=>{e.forEach(e=>{if("string"==typeof e){(""===e?t:i(t,e)).classGroupId=r;return}if("function"==typeof e)return l(e)?void a(e(n),t,r,n):void t.validators.push({validator:e,classGroupId:r});Object.entries(e).forEach(([e,o])=>{a(o,i(t,e),r,n)})})},i=(e,t)=>{let r=e;return t.split("-").forEach(e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)}),r},l=e=>e.isThemeGetter,s=/\s+/;function c(){let e,t,r=0,n="";for(;r{let t;if("string"==typeof e)return e;let r="";for(let n=0;n{let t=t=>t[e]||[];return t.isThemeGetter=!0,t},f=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,p=/^\((?:(\w[\w-]*):)?(.+)\)$/i,m=/^\d+\/\d+$/,h=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,v=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,g=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,b=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,y=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,w=e=>m.test(e),x=e=>!!e&&!Number.isNaN(Number(e)),k=e=>!!e&&Number.isInteger(Number(e)),E=e=>e.endsWith("%")&&x(e.slice(0,-1)),A=e=>h.test(e),C=()=>!0,R=e=>v.test(e)&&!g.test(e),N=()=>!1,M=e=>b.test(e),j=e=>y.test(e),S=e=>!T(e)&&!F(e),O=e=>q(e,Z,N),T=e=>f.test(e),z=e=>q(e,X,R),D=e=>q(e,Y,x),P=e=>q(e,V,N),I=e=>q(e,H,j),L=e=>q(e,Q,M),F=e=>p.test(e),_=e=>K(e,X),W=e=>K(e,J),G=e=>K(e,V),B=e=>K(e,Z),$=e=>K(e,H),U=e=>K(e,Q,!0),q=(e,t,r)=>{let n=f.exec(e);return!!n&&(n[1]?t(n[1]):r(n[2]))},K=(e,t,r=!1)=>{let n=p.exec(e);return!!n&&(n[1]?t(n[1]):r)},V=e=>"position"===e||"percentage"===e,H=e=>"image"===e||"url"===e,Z=e=>"length"===e||"size"===e||"bg-size"===e,X=e=>"length"===e,Y=e=>"number"===e,J=e=>"family-name"===e,Q=e=>"shadow"===e;Symbol.toStringTag;let ee=function(e,...t){let r,i,l,u=function(s){let c;return i=(r={cache:(e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,r=new Map,n=new Map,o=(o,a)=>{r.set(o,a),++t>e&&(t=0,n=r,r=new Map)};return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=n.get(e))?(o(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):o(e,t)}}})((c=t.reduce((e,t)=>t(e),e())).cacheSize),parseClassName:(e=>{let{prefix:t,experimentalParseClassName:r}=e,n=e=>{let t,r,n=[],o=0,a=0,i=0;for(let r=0;ri?t-i:void 0}};if(t){let e=t+":",r=n;n=t=>t.startsWith(e)?r(t.substring(e.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:t,maybePostfixModifierPosition:void 0}}if(r){let e=n;n=t=>r({className:t,parseClassName:e})}return n})(c),sortModifiers:(e=>{let t=Object.fromEntries(e.orderSensitiveModifiers.map(e=>[e,!0]));return e=>{if(e.length<=1)return e;let r=[],n=[];return e.forEach(e=>{"["===e[0]||t[e]?(r.push(...n.sort(),e),n=[]):n.push(e)}),r.push(...n.sort()),r}})(c),...(e=>{let t=(e=>{let{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(let e in r)a(r[e],n,e,t);return n})(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:e=>{let r=e.split("-");return""===r[0]&&1!==r.length&&r.shift(),n(r,t)||(e=>{if(o.test(e)){let t=o.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}})(e)},getConflictingClassGroupIds:(e,t)=>{let n=r[e]||[];return t&&i[e]?[...n,...i[e]]:n}}})(c)}).cache.get,l=r.cache.set,u=d,d(s)};function d(e){let t=i(e);if(t)return t;let n=((e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:a}=t,i=[],l=e.trim().split(s),c="";for(let e=l.length-1;e>=0;e-=1){let t=l[e],{isExternal:s,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=r(t);if(s){c=t+(c.length>0?" "+c:c);continue}let m=!!p,h=n(m?f.substring(0,p):f);if(!h){if(!m||!(h=n(f))){c=t+(c.length>0?" "+c:c);continue}m=!1}let v=a(u).join(":"),g=d?v+"!":v,b=g+h;if(i.includes(b))continue;i.push(b);let y=o(h,m);for(let e=0;e0?" "+c:c)}return c})(e,r);return l(e,n),n}return function(){return u(c.apply(null,arguments))}}(()=>{let e=d("color"),t=d("font"),r=d("text"),n=d("font-weight"),o=d("tracking"),a=d("leading"),i=d("breakpoint"),l=d("container"),s=d("spacing"),c=d("radius"),u=d("shadow"),f=d("inset-shadow"),p=d("text-shadow"),m=d("drop-shadow"),h=d("blur"),v=d("perspective"),g=d("aspect"),b=d("ease"),y=d("animate"),R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...N(),F,T],j=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto","contain","none"],K=()=>[F,T,s],V=()=>[w,"full","auto",...K()],H=()=>[k,"none","subgrid",F,T],Z=()=>["auto",{span:["full",k,F,T]},k,F,T],X=()=>[k,"auto",F,T],Y=()=>["auto","min","max","fr",F,T],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],ee=()=>["auto",...K()],et=()=>[w,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...K()],er=()=>[e,F,T],en=()=>[...N(),G,P,{position:[F,T]}],eo=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ea=()=>["auto","cover","contain",B,O,{size:[F,T]}],ei=()=>[E,_,z],el=()=>["","none","full",c,F,T],es=()=>["",x,_,z],ec=()=>["solid","dashed","dotted","double"],eu=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ed=()=>[x,E,G,P],ef=()=>["","none",h,F,T],ep=()=>["none",x,F,T],em=()=>["none",x,F,T],eh=()=>[x,F,T],ev=()=>[w,"full",...K()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[A],breakpoint:[A],color:[C],container:[A],"drop-shadow":[A],ease:["in","out","in-out"],font:[S],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[A],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[A],shadow:[A],spacing:["px",x],text:[A],"text-shadow":[A],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",w,T,F,g]}],container:["container"],columns:[{columns:[x,T,F,l]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:M()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:V()}],"inset-x":[{"inset-x":V()}],"inset-y":[{"inset-y":V()}],start:[{start:V()}],end:[{end:V()}],top:[{top:V()}],right:[{right:V()}],bottom:[{bottom:V()}],left:[{left:V()}],visibility:["visible","invisible","collapse"],z:[{z:[k,"auto",F,T]}],basis:[{basis:[w,"full","auto",l,...K()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[x,w,"auto","initial","none",T]}],grow:[{grow:["",x,F,T]}],shrink:[{shrink:["",x,F,T]}],order:[{order:[k,"first","last","none",F,T]}],"grid-cols":[{"grid-cols":H()}],"col-start-end":[{col:Z()}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":H()}],"row-start-end":[{row:Z()}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Y()}],"auto-rows":[{"auto-rows":Y()}],gap:[{gap:K()}],"gap-x":[{"gap-x":K()}],"gap-y":[{"gap-y":K()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:K()}],px:[{px:K()}],py:[{py:K()}],ps:[{ps:K()}],pe:[{pe:K()}],pt:[{pt:K()}],pr:[{pr:K()}],pb:[{pb:K()}],pl:[{pl:K()}],m:[{m:ee()}],mx:[{mx:ee()}],my:[{my:ee()}],ms:[{ms:ee()}],me:[{me:ee()}],mt:[{mt:ee()}],mr:[{mr:ee()}],mb:[{mb:ee()}],ml:[{ml:ee()}],"space-x":[{"space-x":K()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":K()}],"space-y-reverse":["space-y-reverse"],size:[{size:et()}],w:[{w:[l,"screen",...et()]}],"min-w":[{"min-w":[l,"screen","none",...et()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...et()]}],h:[{h:["screen","lh",...et()]}],"min-h":[{"min-h":["screen","lh","none",...et()]}],"max-h":[{"max-h":["screen","lh",...et()]}],"font-size":[{text:["base",r,_,z]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,F,D]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",E,T]}],"font-family":[{font:[W,T,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,F,T]}],"line-clamp":[{"line-clamp":[x,"none",F,D]}],leading:[{leading:[a,...K()]}],"list-image":[{"list-image":["none",F,T]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",F,T]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:er()}],"text-color":[{text:er()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ec(),"wavy"]}],"text-decoration-thickness":[{decoration:[x,"from-font","auto",F,z]}],"text-decoration-color":[{decoration:er()}],"underline-offset":[{"underline-offset":[x,"auto",F,T]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:K()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",F,T]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",F,T]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:en()}],"bg-repeat":[{bg:eo()}],"bg-size":[{bg:ea()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},k,F,T],radial:["",F,T],conic:[k,F,T]},$,I]}],"bg-color":[{bg:er()}],"gradient-from-pos":[{from:ei()}],"gradient-via-pos":[{via:ei()}],"gradient-to-pos":[{to:ei()}],"gradient-from":[{from:er()}],"gradient-via":[{via:er()}],"gradient-to":[{to:er()}],rounded:[{rounded:el()}],"rounded-s":[{"rounded-s":el()}],"rounded-e":[{"rounded-e":el()}],"rounded-t":[{"rounded-t":el()}],"rounded-r":[{"rounded-r":el()}],"rounded-b":[{"rounded-b":el()}],"rounded-l":[{"rounded-l":el()}],"rounded-ss":[{"rounded-ss":el()}],"rounded-se":[{"rounded-se":el()}],"rounded-ee":[{"rounded-ee":el()}],"rounded-es":[{"rounded-es":el()}],"rounded-tl":[{"rounded-tl":el()}],"rounded-tr":[{"rounded-tr":el()}],"rounded-br":[{"rounded-br":el()}],"rounded-bl":[{"rounded-bl":el()}],"border-w":[{border:es()}],"border-w-x":[{"border-x":es()}],"border-w-y":[{"border-y":es()}],"border-w-s":[{"border-s":es()}],"border-w-e":[{"border-e":es()}],"border-w-t":[{"border-t":es()}],"border-w-r":[{"border-r":es()}],"border-w-b":[{"border-b":es()}],"border-w-l":[{"border-l":es()}],"divide-x":[{"divide-x":es()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":es()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ec(),"hidden","none"]}],"divide-style":[{divide:[...ec(),"hidden","none"]}],"border-color":[{border:er()}],"border-color-x":[{"border-x":er()}],"border-color-y":[{"border-y":er()}],"border-color-s":[{"border-s":er()}],"border-color-e":[{"border-e":er()}],"border-color-t":[{"border-t":er()}],"border-color-r":[{"border-r":er()}],"border-color-b":[{"border-b":er()}],"border-color-l":[{"border-l":er()}],"divide-color":[{divide:er()}],"outline-style":[{outline:[...ec(),"none","hidden"]}],"outline-offset":[{"outline-offset":[x,F,T]}],"outline-w":[{outline:["",x,_,z]}],"outline-color":[{outline:er()}],shadow:[{shadow:["","none",u,U,L]}],"shadow-color":[{shadow:er()}],"inset-shadow":[{"inset-shadow":["none",f,U,L]}],"inset-shadow-color":[{"inset-shadow":er()}],"ring-w":[{ring:es()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:er()}],"ring-offset-w":[{"ring-offset":[x,z]}],"ring-offset-color":[{"ring-offset":er()}],"inset-ring-w":[{"inset-ring":es()}],"inset-ring-color":[{"inset-ring":er()}],"text-shadow":[{"text-shadow":["none",p,U,L]}],"text-shadow-color":[{"text-shadow":er()}],opacity:[{opacity:[x,F,T]}],"mix-blend":[{"mix-blend":[...eu(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":eu()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[x]}],"mask-image-linear-from-pos":[{"mask-linear-from":ed()}],"mask-image-linear-to-pos":[{"mask-linear-to":ed()}],"mask-image-linear-from-color":[{"mask-linear-from":er()}],"mask-image-linear-to-color":[{"mask-linear-to":er()}],"mask-image-t-from-pos":[{"mask-t-from":ed()}],"mask-image-t-to-pos":[{"mask-t-to":ed()}],"mask-image-t-from-color":[{"mask-t-from":er()}],"mask-image-t-to-color":[{"mask-t-to":er()}],"mask-image-r-from-pos":[{"mask-r-from":ed()}],"mask-image-r-to-pos":[{"mask-r-to":ed()}],"mask-image-r-from-color":[{"mask-r-from":er()}],"mask-image-r-to-color":[{"mask-r-to":er()}],"mask-image-b-from-pos":[{"mask-b-from":ed()}],"mask-image-b-to-pos":[{"mask-b-to":ed()}],"mask-image-b-from-color":[{"mask-b-from":er()}],"mask-image-b-to-color":[{"mask-b-to":er()}],"mask-image-l-from-pos":[{"mask-l-from":ed()}],"mask-image-l-to-pos":[{"mask-l-to":ed()}],"mask-image-l-from-color":[{"mask-l-from":er()}],"mask-image-l-to-color":[{"mask-l-to":er()}],"mask-image-x-from-pos":[{"mask-x-from":ed()}],"mask-image-x-to-pos":[{"mask-x-to":ed()}],"mask-image-x-from-color":[{"mask-x-from":er()}],"mask-image-x-to-color":[{"mask-x-to":er()}],"mask-image-y-from-pos":[{"mask-y-from":ed()}],"mask-image-y-to-pos":[{"mask-y-to":ed()}],"mask-image-y-from-color":[{"mask-y-from":er()}],"mask-image-y-to-color":[{"mask-y-to":er()}],"mask-image-radial":[{"mask-radial":[F,T]}],"mask-image-radial-from-pos":[{"mask-radial-from":ed()}],"mask-image-radial-to-pos":[{"mask-radial-to":ed()}],"mask-image-radial-from-color":[{"mask-radial-from":er()}],"mask-image-radial-to-color":[{"mask-radial-to":er()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":N()}],"mask-image-conic-pos":[{"mask-conic":[x]}],"mask-image-conic-from-pos":[{"mask-conic-from":ed()}],"mask-image-conic-to-pos":[{"mask-conic-to":ed()}],"mask-image-conic-from-color":[{"mask-conic-from":er()}],"mask-image-conic-to-color":[{"mask-conic-to":er()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:en()}],"mask-repeat":[{mask:eo()}],"mask-size":[{mask:ea()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",F,T]}],filter:[{filter:["","none",F,T]}],blur:[{blur:ef()}],brightness:[{brightness:[x,F,T]}],contrast:[{contrast:[x,F,T]}],"drop-shadow":[{"drop-shadow":["","none",m,U,L]}],"drop-shadow-color":[{"drop-shadow":er()}],grayscale:[{grayscale:["",x,F,T]}],"hue-rotate":[{"hue-rotate":[x,F,T]}],invert:[{invert:["",x,F,T]}],saturate:[{saturate:[x,F,T]}],sepia:[{sepia:["",x,F,T]}],"backdrop-filter":[{"backdrop-filter":["","none",F,T]}],"backdrop-blur":[{"backdrop-blur":ef()}],"backdrop-brightness":[{"backdrop-brightness":[x,F,T]}],"backdrop-contrast":[{"backdrop-contrast":[x,F,T]}],"backdrop-grayscale":[{"backdrop-grayscale":["",x,F,T]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[x,F,T]}],"backdrop-invert":[{"backdrop-invert":["",x,F,T]}],"backdrop-opacity":[{"backdrop-opacity":[x,F,T]}],"backdrop-saturate":[{"backdrop-saturate":[x,F,T]}],"backdrop-sepia":[{"backdrop-sepia":["",x,F,T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":K()}],"border-spacing-x":[{"border-spacing-x":K()}],"border-spacing-y":[{"border-spacing-y":K()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",F,T]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[x,"initial",F,T]}],ease:[{ease:["linear","initial",b,F,T]}],delay:[{delay:[x,F,T]}],animate:[{animate:["none",y,F,T]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,F,T]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:ep()}],"rotate-x":[{"rotate-x":ep()}],"rotate-y":[{"rotate-y":ep()}],"rotate-z":[{"rotate-z":ep()}],scale:[{scale:em()}],"scale-x":[{"scale-x":em()}],"scale-y":[{"scale-y":em()}],"scale-z":[{"scale-z":em()}],"scale-3d":["scale-3d"],skew:[{skew:eh()}],"skew-x":[{"skew-x":eh()}],"skew-y":[{"skew-y":eh()}],transform:[{transform:[F,T,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ev()}],"translate-x":[{"translate-x":ev()}],"translate-y":[{"translate-y":ev()}],"translate-z":[{"translate-z":ev()}],"translate-none":["translate-none"],accent:[{accent:er()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:er()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",F,T]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":K()}],"scroll-mx":[{"scroll-mx":K()}],"scroll-my":[{"scroll-my":K()}],"scroll-ms":[{"scroll-ms":K()}],"scroll-me":[{"scroll-me":K()}],"scroll-mt":[{"scroll-mt":K()}],"scroll-mr":[{"scroll-mr":K()}],"scroll-mb":[{"scroll-mb":K()}],"scroll-ml":[{"scroll-ml":K()}],"scroll-p":[{"scroll-p":K()}],"scroll-px":[{"scroll-px":K()}],"scroll-py":[{"scroll-py":K()}],"scroll-ps":[{"scroll-ps":K()}],"scroll-pe":[{"scroll-pe":K()}],"scroll-pt":[{"scroll-pt":K()}],"scroll-pr":[{"scroll-pr":K()}],"scroll-pb":[{"scroll-pb":K()}],"scroll-pl":[{"scroll-pl":K()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",F,T]}],fill:[{fill:["none",...er()]}],"stroke-w":[{stroke:[x,_,z,D]}],stroke:[{stroke:["none",...er()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}})},9708:(e,t,r)=>{r.d(t,{DX:()=>l,TL:()=>i});var n=r(2115),o=r(6101),a=r(5155);function i(e){let t=function(e){let t=n.forwardRef((e,t)=>{let{children:r,...a}=e;if(n.isValidElement(r)){var i;let e,l,s=(i=r,(l=(e=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.ref:(l=(e=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.props.ref:i.props.ref||i.ref),c=function(e,t){let r={...t};for(let n in t){let o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...e)=>{let t=a(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...a}:"className"===n&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}(a,r.props);return r.type!==n.Fragment&&(c.ref=t?(0,o.t)(t,s):s),n.cloneElement(r,c)}return n.Children.count(r)>1?n.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}(e),r=n.forwardRef((e,r)=>{let{children:o,...i}=e,l=n.Children.toArray(o),s=l.find(c);if(s){let e=s.props.children,o=l.map(t=>t!==s?t:n.Children.count(e)>1?n.Children.only(null):n.isValidElement(e)?e.props.children:null);return(0,a.jsx)(t,{...i,ref:r,children:n.isValidElement(e)?n.cloneElement(e,void 0,o):null})}return(0,a.jsx)(t,{...i,ref:r,children:o})});return r.displayName=`${e}.Slot`,r}var l=i("Slot"),s=Symbol("radix.slottable");function c(e){return n.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===s}},9803:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(9946).A)("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]])},9869:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(9946).A)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]])},9946:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(2115);let o=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},a=function(){for(var e=arguments.length,t=Array(e),r=0;r!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()};var i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let l=(0,n.forwardRef)((e,t)=>{let{color:r="currentColor",size:o=24,strokeWidth:l=2,absoluteStrokeWidth:s,className:c="",children:u,iconNode:d,...f}=e;return(0,n.createElement)("svg",{ref:t,...i,width:o,height:o,stroke:r,strokeWidth:s?24*Number(l)/Number(o):l,className:a("lucide",c),...!u&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(f)&&{"aria-hidden":"true"},...f},[...d.map(e=>{let[t,r]=e;return(0,n.createElement)(t,r)}),...Array.isArray(u)?u:[u]])}),s=(e,t)=>{let r=(0,n.forwardRef)((r,i)=>{let{className:s,...c}=r;return(0,n.createElement)(l,{ref:i,iconNode:t,className:a("lucide-".concat(o(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-".concat(e),s),...c})});return r.displayName=o(e),r}}}]); \ No newline at end of file diff --git a/internal/web/frontend/_next/static/chunks/app/page-6f704b6eb3095813.js b/internal/web/frontend/_next/static/chunks/app/page-6f704b6eb3095813.js new file mode 100644 index 0000000..02a87ee --- /dev/null +++ b/internal/web/frontend/_next/static/chunks/app/page-6f704b6eb3095813.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{409:(e,s,t)=>{Promise.resolve().then(t.bind(t,1287))},1287:(e,s,t)=>{"use strict";t.d(s,{default:()=>_});var a=t(5155),l=t(2115),r=t(3559),n=t(2596),i=t(9688);function c(){for(var e=arguments.length,s=Array(e),t=0;t{let{className:t,...l}=e;return(0,a.jsx)(r.B8,{ref:s,className:c("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),...l})});d.displayName=r.B8.displayName;let m=l.forwardRef((e,s)=>{let{className:t,...l}=e;return(0,a.jsx)(r.l9,{ref:s,className:c("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",t),...l})});m.displayName=r.l9.displayName;let x=l.forwardRef((e,s)=>{let{className:t,...l}=e;return(0,a.jsx)(r.UC,{ref:s,className:c("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...l})});x.displayName=r.UC.displayName;var h=t(9869),u=t(1497),g=t(4738);function p(){return(0,a.jsxs)("div",{className:"text-center mb-6 animate-fade-in-up",children:[(0,a.jsx)("h1",{className:"text-2xl sm:text-3xl md:text-4xl font-bold bg-gradient-to-r from-blue-600 via-purple-600 to-indigo-600 bg-clip-text text-transparent mb-2",children:"文件快传"}),(0,a.jsxs)("p",{className:"text-sm sm:text-base text-slate-600 max-w-xl mx-auto leading-relaxed px-4 mb-3",children:["安全、快速、简单的传输服务",(0,a.jsx)("br",{}),(0,a.jsx)("span",{className:"text-xs sm:text-sm text-slate-500",children:"支持文件、文字、桌面共享 - 无需注册,即传即用"})]}),(0,a.jsx)("div",{className:"w-64 sm:w-80 md:w-96 lg:w-[32rem] xl:w-[40rem] h-0.5 bg-gradient-to-r from-blue-400 via-purple-400 to-indigo-400 mx-auto mt-4 mb-2 opacity-60"})]})}var f=t(5695),b=t(9708);let j=(0,t(2085).F)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),v=l.forwardRef((e,s)=>{let{className:t,variant:l,size:r,asChild:n=!1,...i}=e,o=n?b.DX:"button";return(0,a.jsx)(o,{className:c(j({variant:l,size:r,className:t})),ref:s,...i})});v.displayName="Button";let N=l.forwardRef((e,s)=>{let{className:t,type:l,...r}=e;return(0,a.jsx)("input",{type:l,className:c("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:s,...r})});N.displayName="Input";var w=t(1788),y=t(2486),k=t(4357),C=t(8164),S=t(7213),F=t(2657),R=t(6801);function T(e){let{onSendText:s,onReceiveText:t,websocket:r,isConnected:n=!1,currentRole:i,pickupCode:c,onCreateWebSocket:o}=e,d=(0,f.useSearchParams)(),m=(0,f.useRouter)(),[x,h]=(0,l.useState)("send"),[g,p]=(0,l.useState)(""),[b,j]=(0,l.useState)(""),[T,A]=(0,l.useState)(""),[D,W]=(0,l.useState)(!1),[E,L]=(0,l.useState)(!1),[z,P]=(0,l.useState)(0),[O,M]=(0,l.useState)([]),[I,B]=(0,l.useState)([]),[J,U]=(0,l.useState)(null),[_,q]=(0,l.useState)(null),[G,V]=(0,l.useState)(!1),{showToast:H}=(0,R.d)(),K=(0,l.useRef)(null),Q=(0,l.useRef)(null),X=(0,l.useRef)(null);(0,l.useEffect)(()=>{let e=d.get("mode");if("text"===d.get("type")&&e&&["send","receive"].includes(e)){h(e);let s=d.get("code");"receive"===e&&s&&6===s.length&&j(s.toUpperCase())}},[d]),(0,l.useEffect)(()=>{let e=e=>{var s,t,a,l,r,n;let c=e.detail;switch(console.log("TextTransfer收到WebSocket消息:",c),c.type){case"text-content":(null==(s=c.payload)?void 0:s.text)!==void 0&&(A(c.payload.text),"receiver"===i&&(p(c.payload.text),!G&&D&&(V(!0),H("成功加入文字房间!","success"))),X.current&&(clearTimeout(X.current),X.current=null),D&&W(!1));break;case"text-update":(null==(t=c.payload)?void 0:t.text)!==void 0&&(A(c.payload.text),"receiver"===i&&p(c.payload.text));break;case"text-send":(null==(a=c.payload)?void 0:a.text)&&(A(c.payload.text),H("收到新的文字内容!","success"));break;case"image-send":(null==(l=c.payload)?void 0:l.imageData)&&(console.log("接收到图片数据:",c.payload.imageData.substring(0,100)+"..."),c.payload.imageData.startsWith("data:image/")?(B(e=>[...e,c.payload.imageData]),H("收到新的图片!","success")):(console.error("无效的图片数据格式:",c.payload.imageData.substring(0,50)),H("收到的图片格式不正确","error")));break;case"room-status":(null==(r=c.payload)?void 0:r.sender_count)!==void 0&&(null==(n=c.payload)?void 0:n.receiver_count)!==void 0&&P(c.payload.sender_count+c.payload.receiver_count)}},s=e=>{let{code:s,reason:t}=e.detail;console.log("WebSocket连接关闭:",s,t),D&&(W(!1),1e3!==s&&H("取件码不存在或已过期","error"))},t=e=>{console.error("WebSocket连接错误:",e.detail),D&&(W(!1),H("取件码不存在或已过期","error"))};return window.addEventListener("websocket-message",e),window.addEventListener("websocket-close",s),window.addEventListener("websocket-error",t),()=>{window.removeEventListener("websocket-message",e),window.removeEventListener("websocket-close",s),window.removeEventListener("websocket-error",t),X.current&&clearTimeout(X.current)}},[i,H,G,D]);let Z=(0,l.useCallback)(e=>{h(e);let s=new URLSearchParams(d.toString());s.set("type","text"),s.set("mode",e),m.push("?".concat(s.toString()),{scroll:!1})},[d,m]),$=(0,l.useCallback)(e=>{r&&n&&(Q.current&&clearTimeout(Q.current),Q.current=setTimeout(()=>{r.send(JSON.stringify({type:"text-update",payload:{text:e}}))},300))},[r,n]),Y=(0,l.useCallback)(e=>{let s=e.target.value;p(s),n&&r&&$(s)},[n,r,$]),ee=(0,l.useCallback)(async()=>{if(!g.trim())return void H("请输入要传输的文字内容","error");W(!0);try{if(s){let e=await s(g);e&&(j(e),L(!0),H("房间创建成功!","success"),o&&o(e,"sender"))}}catch(e){console.error("创建房间失败:",e)}finally{W(!1)}},[g,s,o,H]),es=(0,l.useCallback)(async()=>{if(!b.trim()||6!==b.length)return void H("请输入正确的6位房间码","error");if(!D){W(!0),V(!1);try{let e=await fetch("/api/room-info?code=".concat(b)),s=await e.json();if(!e.ok||!s.success){H(s.message||"房间不存在或已过期","error"),W(!1);return}o&&(console.log("房间验证成功,手动加入房间:",b),o(b,"receiver"),X.current=setTimeout(()=>{D&&(W(!1),H("取件码不存在或已过期","error"))},8e3))}catch(e){console.error("加入房间失败:",e),H("网络错误,请稍后重试","error"),W(!1)}}},[b,o,H,D]),et=(0,l.useCallback)(()=>{r&&n&&g.trim()&&(r.send(JSON.stringify({type:"text-send",payload:{text:g}})),H("文字已发送!","success"))},[r,n,g,H]),ea=(0,l.useCallback)(e=>new Promise((s,t)=>{let a=document.createElement("canvas"),l=a.getContext("2d"),r=document.createElement("img");if(!l)return void t(Error("无法创建Canvas上下文"));r.onload=()=>{try{let{width:e,height:t}=r;e>t?e>800&&(t=800*t/e,e=800):t>600&&(e=600*e/t,t=600),a.width=e,a.height=t,l.fillStyle="#FFFFFF",l.fillRect(0,0,e,t),l.drawImage(r,0,0,e,t);let n=a.toDataURL("image/jpeg",.8);console.log("图片压缩完成,数据长度:",n.length,"前100字符:",n.substring(0,100)),s(n)}catch(e){t(Error("图片压缩失败: "+e))}},r.onerror=()=>t(Error("图片加载失败"));let n=new FileReader;n.onload=e=>{var s;(null==(s=e.target)?void 0:s.result)?r.src=e.target.result:t(Error("文件读取失败"))},n.onerror=()=>t(Error("文件读取失败")),n.readAsDataURL(e)}),[]),el=(0,l.useCallback)(async e=>{var s;let t=null==(s=e.clipboardData)?void 0:s.items;if(t)for(let e=0;e[...e,s]),r&&n&&(r.send(JSON.stringify({type:"image-send",payload:{imageData:s}})),H("图片已发送!","success"))}catch(e){console.error("图片处理失败:",e),H("图片处理失败,请重试","error")}}}},[r,n,H,ea]),er=(0,l.useCallback)(async e=>{try{await navigator.clipboard.writeText(e),H("已复制到剪贴板!","success")}catch(e){H("复制失败","error")}},[H]),en=(0,l.useCallback)(async e=>{let s=window.location.origin+window.location.pathname,t="".concat(s,"?type=text&mode=receive&code=").concat(e);await er(t)},[er]),ei=(0,l.useCallback)((e,s)=>{let t=document.createElement("a");t.download="image_".concat(s+1,".jpg"),t.href=e,document.body.appendChild(t),t.click(),document.body.removeChild(t),H("图片已下载!","success")},[H]);return(0,a.jsxs)("div",{className:"space-y-4 sm:space-y-6",children:[(0,a.jsx)("div",{className:"flex justify-center mb-6",children:(0,a.jsxs)("div",{className:"bg-white/80 backdrop-blur-sm rounded-xl p-1 shadow-lg",children:[(0,a.jsxs)(v,{variant:"send"===x?"default":"ghost",onClick:()=>Z("send"),className:"px-6 py-2 rounded-lg",children:[(0,a.jsx)(y.A,{className:"w-4 h-4 mr-2"}),"发送文字"]}),(0,a.jsxs)(v,{variant:"receive"===x?"default":"ghost",onClick:()=>Z("receive"),className:"px-6 py-2 rounded-lg",children:[(0,a.jsx)(w.A,{className:"w-4 h-4 mr-2"}),"加入房间"]})]})}),"send"===x?(0,a.jsxs)("div",{className:"bg-white/80 backdrop-blur-sm rounded-xl shadow-lg p-4 sm:p-6 animate-fade-in-up",children:[(0,a.jsxs)("div",{className:"flex items-center mb-6",children:[(0,a.jsxs)("div",{className:"flex items-center space-x-3 flex-1",children:[(0,a.jsx)("div",{className:"w-10 h-10 bg-gradient-to-br from-blue-500 to-indigo-500 rounded-xl flex items-center justify-center",children:(0,a.jsx)(u.A,{className:"w-5 h-5 text-white"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold text-slate-800",children:"传送文字"}),(0,a.jsx)("p",{className:"text-sm text-slate-600",children:E?"实时编辑,对方可以同步看到":"输入要传输的文本内容"})]})]}),(0,a.jsx)("div",{className:"w-px h-12 bg-slate-200 mx-4"}),(0,a.jsxs)("div",{className:"text-right",children:[(0,a.jsx)("div",{className:"text-sm text-slate-500 mb-1",children:"连接状态"}),(0,a.jsxs)("div",{className:"flex items-center justify-end space-x-3 text-sm",children:[(0,a.jsx)("div",{className:"flex items-center space-x-1",children:E?n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-emerald-500 animate-pulse"}),(0,a.jsx)("span",{className:"text-emerald-600",children:"WS"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-red-500"}),(0,a.jsx)("span",{className:"text-red-600",children:"WS"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-slate-400"}),(0,a.jsx)("span",{className:"text-slate-600",children:"WS"})]})}),(0,a.jsx)("div",{className:"text-slate-300",children:"|"}),(0,a.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-slate-400"}),(0,a.jsx)("span",{className:"text-slate-600",children:"RTC"})]})]}),z>0&&(0,a.jsxs)("div",{className:"mt-1 text-xs text-blue-600",children:[z," 人在线"]})]})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("textarea",{ref:K,value:g,onChange:Y,onPaste:el,placeholder:"在这里输入要传输的文本内容... \uD83D\uDCA1 提示:支持实时同步编辑,可以直接粘贴图片 (Ctrl+V)",className:"w-full min-h-[150px] p-4 border-2 border-slate-200 rounded-xl focus:border-blue-500 focus:ring-blue-500 bg-white/80 backdrop-blur-sm resize-none",disabled:D}),E&&n&&(0,a.jsx)("div",{className:"absolute top-2 right-2",children:(0,a.jsxs)("div",{className:"flex items-center space-x-1 bg-emerald-100 text-emerald-700 px-2 py-1 rounded-lg text-xs",children:[(0,a.jsx)("div",{className:"w-2 h-2 bg-emerald-500 rounded-full animate-pulse"}),(0,a.jsx)("span",{children:"实时同步"})]})}),E&&!n&&(0,a.jsx)("div",{className:"absolute top-2 right-2",children:(0,a.jsxs)("div",{className:"flex items-center space-x-1 bg-orange-100 text-orange-700 px-2 py-1 rounded-lg text-xs",children:[(0,a.jsx)("div",{className:"w-2 h-2 bg-orange-500 rounded-full"}),(0,a.jsx)("span",{children:"连接中..."})]})})]}),(0,a.jsxs)("div",{className:"flex justify-between text-sm text-slate-500",children:[(0,a.jsxs)("span",{children:[g.length," 字符"]}),(0,a.jsx)("span",{children:"最大 50,000 字符"})]}),E?(0,a.jsx)("div",{className:"space-y-4",children:(0,a.jsx)("div",{className:"p-4 bg-gradient-to-r from-emerald-50 to-teal-50 rounded-xl border border-emerald-200",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("p",{className:"text-sm text-emerald-700 mb-2",children:"房间码"}),(0,a.jsx)("div",{className:"text-2xl font-bold font-mono text-emerald-600 mb-3",children:b}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 justify-center",children:[(0,a.jsxs)(v,{onClick:()=>er(b),size:"sm",className:"bg-emerald-500 hover:bg-emerald-600 text-white",children:[(0,a.jsx)(k.A,{className:"w-4 h-4 mr-2"}),"复制房间码"]}),(0,a.jsxs)(v,{onClick:()=>en(b),size:"sm",className:"bg-purple-500 hover:bg-purple-600 text-white",children:[(0,a.jsx)(C.A,{className:"w-4 h-4 mr-2"}),"复制链接"]}),(0,a.jsxs)(v,{onClick:et,size:"sm",className:"bg-blue-500 hover:bg-blue-600 text-white",disabled:!g.trim(),children:[(0,a.jsx)(y.A,{className:"w-4 h-4 mr-2"}),"发送文字"]})]})]})})}):(0,a.jsx)(v,{onClick:ee,disabled:!g.trim()||g.length>5e4||D,className:"w-full h-12 bg-gradient-to-r from-blue-500 to-indigo-500 hover:from-blue-600 hover:to-indigo-600 text-white text-lg font-medium rounded-xl shadow-lg",children:D?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"animate-spin rounded-full h-5 w-5 border-b-2 border-white mr-2"}),"创建房间..."]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(y.A,{className:"w-5 h-5 mr-2"}),"创建文字传输房间"]})}),"send"===x&&O.length>0&&(0,a.jsxs)("div",{className:"mt-6",children:[(0,a.jsxs)("h3",{className:"text-lg font-medium text-slate-800 mb-3 flex items-center",children:[(0,a.jsx)(S.A,{className:"w-5 h-5 mr-2"}),"已发送的图片 (",O.length,")"]}),(0,a.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3",children:O.map((e,s)=>(0,a.jsxs)("div",{className:"relative group overflow-hidden",children:[(0,a.jsx)("img",{src:e,alt:"图片 ".concat(s+1),className:"w-full h-24 object-cover rounded-lg border-2 border-slate-200 hover:border-blue-400 transition-all duration-200 cursor-pointer bg-gradient-to-br from-slate-50 via-blue-50 to-indigo-50",onClick:()=>q(e),onError:s=>{console.error("图片加载失败:",e),s.currentTarget.style.display="none"}}),(0,a.jsx)("div",{className:"absolute inset-0 bg-black bg-opacity-0 group-hover:bg-opacity-20 transition-opacity rounded-lg"}),(0,a.jsxs)("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity flex gap-1",children:[(0,a.jsx)("button",{onClick:s=>{s.stopPropagation(),q(e)},className:"p-1.5 bg-white bg-opacity-90 hover:bg-opacity-100 rounded-md shadow-sm transition-all hover:scale-105",title:"预览图片",children:(0,a.jsx)(F.A,{className:"w-3.5 h-3.5 text-slate-600"})}),(0,a.jsx)("button",{onClick:t=>{t.stopPropagation(),ei(e,s)},className:"p-1.5 bg-white bg-opacity-90 hover:bg-opacity-100 rounded-md shadow-sm transition-all hover:scale-105",title:"下载图片",children:(0,a.jsx)(w.A,{className:"w-3.5 h-3.5 text-slate-600"})})]}),(0,a.jsx)("div",{className:"absolute bottom-1 left-1 bg-black bg-opacity-50 text-white text-xs px-1.5 py-0.5 rounded",children:s+1})]},s))})]})]})]}):(0,a.jsxs)("div",{className:"bg-white/80 backdrop-blur-sm rounded-xl shadow-lg p-4 sm:p-6 animate-fade-in-up",children:[(0,a.jsxs)("div",{className:"flex items-center mb-6",children:[(0,a.jsxs)("div",{className:"flex items-center space-x-3 flex-1",children:[(0,a.jsx)("div",{className:"w-10 h-10 bg-gradient-to-br from-emerald-500 to-teal-500 rounded-xl flex items-center justify-center",children:(0,a.jsx)(w.A,{className:"w-5 h-5 text-white"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold text-slate-800",children:"加入房间"}),(0,a.jsx)("p",{className:"text-sm text-slate-600",children:T||g?n?"已连接,可以实时查看和编辑":"连接断开,等待重连":"输入6位房间码来获取文字内容"})]})]}),(0,a.jsx)("div",{className:"w-px h-12 bg-slate-200 mx-4"}),(0,a.jsxs)("div",{className:"text-right",children:[(0,a.jsx)("div",{className:"text-sm text-slate-500 mb-1",children:"连接状态"}),(0,a.jsxs)("div",{className:"flex items-center justify-end space-x-3 text-sm",children:[(0,a.jsx)("div",{className:"flex items-center space-x-1",children:T||g?n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-emerald-500 animate-pulse"}),(0,a.jsx)("span",{className:"text-emerald-600",children:"WS"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-red-500"}),(0,a.jsx)("span",{className:"text-red-600",children:"WS"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-slate-400"}),(0,a.jsx)("span",{className:"text-slate-600",children:"WS"})]})}),(0,a.jsx)("div",{className:"text-slate-300",children:"|"}),(0,a.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-slate-400"}),(0,a.jsx)("span",{className:"text-slate-600",children:"RTC"})]})]}),z>0&&(0,a.jsxs)("div",{className:"mt-1 text-xs text-blue-600",children:[z," 人在线"]})]})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(N,{value:b,onChange:e=>j(e.target.value.toUpperCase().slice(0,6)),placeholder:"请输入房间码",className:"text-center text-2xl sm:text-3xl tracking-[0.3em] sm:tracking-[0.5em] font-mono h-12 sm:h-16 border-2 border-slate-200 rounded-xl focus:border-emerald-500 focus:ring-emerald-500 bg-white/80 backdrop-blur-sm",maxLength:6,disabled:D}),(0,a.jsx)(v,{onClick:es,disabled:6!==b.length||D,className:"w-full h-12 bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white text-lg font-medium rounded-xl shadow-lg",children:D?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"animate-spin rounded-full h-5 w-5 border-b-2 border-white mr-2"}),"连接中..."]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(w.A,{className:"w-5 h-5 mr-2"}),"加入房间"]})}),(T||g)&&(0,a.jsxs)("div",{className:"mt-6 space-y-4",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("textarea",{value:T||g,readOnly:"receiver"!==i,onChange:"receiver"===i?Y:void 0,className:"w-full min-h-[150px] p-4 border-2 border-emerald-200 rounded-xl bg-emerald-50/50 backdrop-blur-sm resize-none"}),"receiver"===i&&n&&(0,a.jsx)("div",{className:"absolute top-2 right-2",children:(0,a.jsxs)("div",{className:"flex items-center space-x-1 bg-emerald-100 text-emerald-700 px-2 py-1 rounded-lg text-xs",children:[(0,a.jsx)("div",{className:"w-2 h-2 bg-emerald-500 rounded-full animate-pulse"}),(0,a.jsx)("span",{children:"实时同步"})]})}),"receiver"===i&&!n&&(0,a.jsx)("div",{className:"absolute top-2 right-2",children:(0,a.jsxs)("div",{className:"flex items-center space-x-1 bg-orange-100 text-orange-700 px-2 py-1 rounded-lg text-xs",children:[(0,a.jsx)("div",{className:"w-2 h-2 bg-orange-500 rounded-full"}),(0,a.jsx)("span",{children:"连接中..."})]})})]}),(0,a.jsxs)(v,{onClick:()=>er(T||g),className:"w-full h-12 bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white text-lg font-medium rounded-xl shadow-lg",children:[(0,a.jsx)(k.A,{className:"w-5 h-5 mr-2"}),"复制文字"]})]}),"receive"===x&&I.length>0&&(0,a.jsxs)("div",{className:"mt-6",children:[(0,a.jsxs)("h3",{className:"text-lg font-medium text-slate-800 mb-3 flex items-center",children:[(0,a.jsx)(S.A,{className:"w-5 h-5 mr-2"}),"接收到的图片 (",I.length,")"]}),(0,a.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3",children:I.map((e,s)=>(0,a.jsxs)("div",{className:"relative group overflow-hidden",children:[(0,a.jsx)("img",{src:e,alt:"图片 ".concat(s+1),className:"w-full h-24 object-cover rounded-lg border-2 border-slate-200 hover:border-emerald-400 transition-all duration-200 cursor-pointer bg-gradient-to-br from-slate-50 via-blue-50 to-indigo-50",onClick:()=>q(e),onLoad:e=>{console.log("图片 ".concat(s+1," 加载成功"))},onError:t=>{console.error("图片 ".concat(s+1," 加载失败:"),e.substring(0,100)),t.currentTarget.style.backgroundColor="#f1f5f9",t.currentTarget.style.display="flex",t.currentTarget.style.alignItems="center",t.currentTarget.style.justifyContent="center",t.currentTarget.innerHTML='图片加载失败'}}),(0,a.jsx)("div",{className:"absolute inset-0 bg-black bg-opacity-0 group-hover:bg-opacity-20 transition-opacity rounded-lg"}),(0,a.jsxs)("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity flex gap-1",children:[(0,a.jsx)("button",{onClick:s=>{s.stopPropagation(),q(e)},className:"p-1.5 bg-white bg-opacity-90 hover:bg-opacity-100 rounded-md shadow-sm transition-all hover:scale-105",title:"预览图片",children:(0,a.jsx)(F.A,{className:"w-3.5 h-3.5 text-slate-600"})}),(0,a.jsx)("button",{onClick:t=>{t.stopPropagation(),ei(e,s)},className:"p-1.5 bg-white bg-opacity-90 hover:bg-opacity-100 rounded-md shadow-sm transition-all hover:scale-105",title:"下载图片",children:(0,a.jsx)(w.A,{className:"w-3.5 h-3.5 text-slate-600"})})]}),(0,a.jsx)("div",{className:"absolute bottom-1 left-1 bg-black bg-opacity-50 text-white text-xs px-1.5 py-0.5 rounded",children:s+1})]},s))})]})]})]}),_&&(0,a.jsx)(e=>{let{src:s,onClose:t}=e;return(0,a.jsx)("div",{className:"fixed inset-0 bg-slate-900/80 backdrop-blur-sm flex items-center justify-center z-50 p-4 animate-fade-in",onClick:t,children:(0,a.jsx)("div",{className:"relative max-w-[90vw] max-h-[90vh] animate-scale-in",children:(0,a.jsxs)("div",{className:"relative bg-white rounded-2xl overflow-hidden shadow-2xl",children:[(0,a.jsx)("img",{src:s,alt:"预览",className:"max-w-full max-h-[80vh] object-contain block bg-gradient-to-br from-slate-50 via-blue-50 to-indigo-50",onClick:e=>e.stopPropagation(),onError:e=>{console.error("预览图片加载失败:",s)}}),(0,a.jsx)("div",{className:"absolute top-0 left-0 right-0 bg-gradient-to-b from-slate-900/60 to-transparent p-4",children:(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("h3",{className:"text-white font-medium text-lg",children:"图片预览"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("button",{onClick:e=>{e.stopPropagation();let t=O.indexOf(s);-1===t&&(t=I.indexOf(s)),ei(s,t>=0?t:0)},className:"bg-white/20 hover:bg-white/30 backdrop-blur-sm text-white p-2 rounded-lg shadow-lg transition-all hover:scale-105",title:"下载图片",children:(0,a.jsx)(w.A,{className:"w-5 h-5"})}),(0,a.jsx)("button",{onClick:t,className:"bg-white/20 hover:bg-white/30 backdrop-blur-sm text-white p-2 rounded-lg shadow-lg transition-all hover:scale-105",title:"关闭预览",children:(0,a.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]})}),(0,a.jsx)("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-slate-900/60 to-transparent p-4",children:(0,a.jsx)("div",{className:"text-white text-sm opacity-80",children:"点击空白区域关闭预览"})})]})})})},{src:_,onClose:()=>q(null)})]})}var A=t(6683),D=t(5690),W=t(8979);function E(e){let{onStartSharing:s,onStopSharing:t,onJoinSharing:r}=e,n=(0,f.useSearchParams)(),i=(0,f.useRouter)(),[c,o]=(0,l.useState)("share"),[d,m]=(0,l.useState)(""),[x,h]=(0,l.useState)(""),[u,p]=(0,l.useState)(!1),[b,j]=(0,l.useState)(!1),[w,y]=(0,l.useState)(!1),{showToast:C}=(0,R.d)();(0,l.useEffect)(()=>{let e=n.get("mode");"desktop"===n.get("type")&&e&&("send"===e?o("share"):"receive"===e&&o("view"))},[n]);let S=(0,l.useCallback)(e=>{o(e);let s=new URLSearchParams(n.toString());s.set("type","desktop"),s.set("mode","share"===e?"send":"receive"),i.push("?".concat(s.toString()),{scroll:!1})},[n,i]),F=(0,l.useCallback)(async()=>{if(s){y(!0);try{let e=await s();m(e),p(!0),C("桌面共享已开始!","success")}catch(e){console.error("开始共享失败:",e),C("开始共享失败,请重试","error")}finally{y(!1)}}},[s,C]),T=(0,l.useCallback)(async()=>{if(t){y(!0);try{await t(),p(!1),m(""),C("桌面共享已停止","success")}catch(e){console.error("停止共享失败:",e),C("停止共享失败","error")}finally{y(!1)}}},[t,C]),E=(0,l.useCallback)(async()=>{if(x.trim()&&r){y(!0);try{await r(x),j(!0),C("已连接到桌面共享!","success")}catch(e){console.error("连接失败:",e),C("连接失败,请检查连接码","error")}finally{y(!1)}}},[x,r,C]),L=(0,l.useCallback)(async e=>{try{await navigator.clipboard.writeText(e),C("已复制到剪贴板!","success")}catch(e){C("复制失败","error")}},[C]);return(0,a.jsxs)("div",{className:"space-y-4 sm:space-y-6",children:[(0,a.jsx)("div",{className:"flex justify-center mb-6",children:(0,a.jsxs)("div",{className:"bg-white/80 backdrop-blur-sm rounded-xl p-1 shadow-lg",children:[(0,a.jsxs)(v,{variant:"share"===c?"default":"ghost",onClick:()=>S("share"),className:"px-6 py-2 rounded-lg",children:[(0,a.jsx)(A.A,{className:"w-4 h-4 mr-2"}),"共享桌面"]}),(0,a.jsxs)(v,{variant:"view"===c?"default":"ghost",onClick:()=>S("view"),className:"px-6 py-2 rounded-lg",children:[(0,a.jsx)(g.A,{className:"w-4 h-4 mr-2"}),"观看桌面"]})]})}),"share"===c?(0,a.jsxs)("div",{className:"bg-white/80 backdrop-blur-sm rounded-xl shadow-lg p-4 sm:p-6 animate-fade-in-up",children:[(0,a.jsxs)("div",{className:"flex items-center mb-6",children:[(0,a.jsxs)("div",{className:"flex items-center space-x-3 flex-1",children:[(0,a.jsx)("div",{className:"w-10 h-10 bg-gradient-to-br from-purple-500 to-pink-500 rounded-xl flex items-center justify-center",children:(0,a.jsx)(A.A,{className:"w-5 h-5 text-white"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold text-slate-800",children:"共享桌面"}),(0,a.jsx)("p",{className:"text-sm text-slate-600",children:u?"桌面共享进行中":"开始共享您的桌面屏幕"})]})]}),(0,a.jsx)("div",{className:"w-px h-12 bg-slate-200 mx-4"}),(0,a.jsxs)("div",{className:"text-right",children:[(0,a.jsx)("div",{className:"text-sm text-slate-500 mb-1",children:"连接状态"}),(0,a.jsxs)("div",{className:"flex items-center justify-end space-x-3 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-slate-400"}),(0,a.jsx)("span",{className:"text-slate-600",children:"WS"})]}),(0,a.jsx)("div",{className:"text-slate-300",children:"|"}),(0,a.jsx)("div",{className:"flex items-center space-x-1",children:u?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-emerald-500 animate-pulse"}),(0,a.jsx)("span",{className:"text-emerald-600",children:"RTC"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-slate-400"}),(0,a.jsx)("span",{className:"text-slate-600",children:"RTC"})]})})]}),u&&d&&(0,a.jsx)("div",{className:"mt-1 text-xs text-purple-600",children:d})]})]}),(0,a.jsx)("div",{className:"space-y-4",children:u?(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("div",{className:"p-4 bg-gradient-to-r from-purple-50 to-pink-50 rounded-xl border border-purple-200",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("p",{className:"text-sm text-purple-700 mb-2",children:"连接码"}),(0,a.jsx)("div",{className:"text-2xl font-bold font-mono text-purple-600 mb-3",children:d}),(0,a.jsxs)(v,{onClick:()=>L(d),size:"sm",className:"bg-purple-500 hover:bg-purple-600 text-white",children:[(0,a.jsx)(k.A,{className:"w-4 h-4 mr-2"}),"复制连接码"]})]})}),(0,a.jsx)(v,{onClick:T,disabled:w,className:"w-full h-12 bg-gradient-to-r from-red-500 to-pink-500 hover:from-red-600 hover:to-pink-600 text-white text-lg font-medium rounded-xl shadow-lg",children:w?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"animate-spin rounded-full h-5 w-5 border-b-2 border-white mr-2"}),"停止中..."]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(W.A,{className:"w-5 h-5 mr-2"}),"停止共享"]})})]}):(0,a.jsx)(v,{onClick:F,disabled:w,className:"w-full h-12 bg-gradient-to-r from-purple-500 to-pink-500 hover:from-purple-600 hover:to-pink-600 text-white text-lg font-medium rounded-xl shadow-lg",children:w?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"animate-spin rounded-full h-5 w-5 border-b-2 border-white mr-2"}),"启动中..."]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(D.A,{className:"w-5 h-5 mr-2"}),"开始共享桌面"]})})})]}):(0,a.jsxs)("div",{className:"bg-white/80 backdrop-blur-sm rounded-xl shadow-lg p-4 sm:p-6 animate-fade-in-up",children:[(0,a.jsxs)("div",{className:"flex items-center mb-6",children:[(0,a.jsxs)("div",{className:"flex items-center space-x-3 flex-1",children:[(0,a.jsx)("div",{className:"w-10 h-10 bg-gradient-to-br from-indigo-500 to-purple-500 rounded-xl flex items-center justify-center",children:(0,a.jsx)(g.A,{className:"w-5 h-5 text-white"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold text-slate-800",children:"观看桌面"}),(0,a.jsx)("p",{className:"text-sm text-slate-600",children:b?"正在观看桌面共享":"输入连接码观看他人的桌面"})]})]}),(0,a.jsx)("div",{className:"w-px h-12 bg-slate-200 mx-4"}),(0,a.jsxs)("div",{className:"text-right",children:[(0,a.jsx)("div",{className:"text-sm text-slate-500 mb-1",children:"连接状态"}),(0,a.jsxs)("div",{className:"flex items-center justify-end space-x-3 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-slate-400"}),(0,a.jsx)("span",{className:"text-slate-600",children:"WS"})]}),(0,a.jsx)("div",{className:"text-slate-300",children:"|"}),(0,a.jsx)("div",{className:"flex items-center space-x-1",children:b?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-emerald-500 animate-pulse"}),(0,a.jsx)("span",{className:"text-emerald-600",children:"RTC"})]}):w?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-orange-500 animate-pulse"}),(0,a.jsx)("span",{className:"text-orange-600",children:"RTC"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-slate-400"}),(0,a.jsx)("span",{className:"text-slate-600",children:"RTC"})]})})]}),b&&(0,a.jsx)("div",{className:"mt-1 text-xs text-indigo-600",children:"观看中"})]})]}),(0,a.jsx)("div",{className:"space-y-4",children:b?(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("div",{className:"aspect-video bg-slate-900 rounded-xl flex items-center justify-center text-white",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)(g.A,{className:"w-12 h-12 mx-auto mb-2 opacity-50"}),(0,a.jsx)("p",{className:"text-sm opacity-75",children:"桌面共享画面"})]})}),(0,a.jsxs)(v,{onClick:()=>j(!1),className:"w-full h-12 bg-gradient-to-r from-red-500 to-pink-500 hover:from-red-600 hover:to-pink-600 text-white text-lg font-medium rounded-xl shadow-lg",children:[(0,a.jsx)(W.A,{className:"w-5 h-5 mr-2"}),"断开连接"]})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(N,{value:x,onChange:e=>h(e.target.value.toUpperCase().slice(0,6)),placeholder:"请输入连接码",className:"text-center text-2xl sm:text-3xl tracking-[0.3em] sm:tracking-[0.5em] font-mono h-12 sm:h-16 border-2 border-slate-200 rounded-xl focus:border-indigo-500 focus:ring-indigo-500 bg-white/80 backdrop-blur-sm",maxLength:6,disabled:w}),(0,a.jsx)(v,{onClick:E,disabled:6!==x.length||w,className:"w-full h-12 bg-gradient-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600 text-white text-lg font-medium rounded-xl shadow-lg",children:w?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"animate-spin rounded-full h-5 w-5 border-b-2 border-white mr-2"}),"连接中..."]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.A,{className:"w-5 h-5 mr-2"}),"连接桌面"]})})]})})]})]})}var L=t(9803),z=t(227),P=t(9022),O=t(7434),M=t(4416);function I(e){let{selectedFiles:s,fileList:t=[],onFilesChange:r,onGenerateCode:n,pickupCode:i,pickupLink:c,onCopyCode:o,onCopyLink:d,onAddMoreFiles:m,onRemoveFile:x,onClearFiles:u,onReset:g,disabled:p=!1,isConnected:f=!1,isWebSocketConnected:b=!1}=e,[j,N]=(0,l.useState)(!1),w=(0,l.useRef)(null),y=(0,l.useCallback)(e=>{e.preventDefault(),N(!0)},[]),k=(0,l.useCallback)(e=>{e.preventDefault(),e.currentTarget.contains(e.relatedTarget)||N(!1)},[]),C=(0,l.useCallback)(e=>{e.preventDefault(),N(!1);let t=Array.from(e.dataTransfer.files);t.length>0&&r([...s,...t])},[s,r]),F=(0,l.useCallback)(e=>{let t=Array.from(e.target.files||[]);t.length>0&&r([...s,...t])},[s,r]),R=(0,l.useCallback)(e=>{let t=s.filter((s,t)=>t!==e);r(t),x&&x(t)},[s,r,x]),T=(0,l.useCallback)(()=>{w.current&&w.current.click()},[]);return 0!==s.length||i?(0,a.jsxs)("div",{className:"space-y-4 sm:space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center mb-4 sm:mb-6",children:[(0,a.jsxs)("div",{className:"flex items-center space-x-3 flex-1",children:[(0,a.jsx)("div",{className:"w-10 h-10 bg-gradient-to-br from-emerald-500 to-teal-500 rounded-xl flex items-center justify-center",children:(0,a.jsx)(O.A,{className:"w-5 h-5 text-white"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-slate-800",children:"已选择文件"}),(0,a.jsxs)("p",{className:"text-sm text-slate-500",children:[s.length," 个文件准备传输"]})]})]}),(0,a.jsx)("div",{className:"w-px h-12 bg-slate-200 mx-4"}),(0,a.jsxs)("div",{className:"text-right",children:[(0,a.jsx)("div",{className:"text-sm text-slate-500 mb-1",children:"连接状态"}),(0,a.jsxs)("div",{className:"flex items-center justify-end space-x-3 text-sm",children:[(0,a.jsx)("div",{className:"flex items-center space-x-1",children:b?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-emerald-500 animate-pulse"}),(0,a.jsx)("span",{className:"text-emerald-600",children:"WS"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-slate-400"}),(0,a.jsx)("span",{className:"text-slate-600",children:"WS"})]})}),(0,a.jsx)("div",{className:"text-slate-300",children:"|"}),(0,a.jsx)("div",{className:"flex items-center space-x-1",children:f?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-emerald-500 animate-pulse"}),(0,a.jsx)("span",{className:"text-emerald-600",children:"RTC"})]}):i?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-orange-500 animate-pulse"}),(0,a.jsx)("span",{className:"text-orange-600",children:"RTC"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-slate-400"}),(0,a.jsx)("span",{className:"text-slate-600",children:"RTC"})]})})]})]})]}),(0,a.jsx)("div",{className:"space-y-3 mb-4 sm:mb-6",children:s.map((e,s)=>{var l;let r=t.find(s=>s.name===e.name&&s.size===e.size);null==r||r.status;let n=(null==r?void 0:r.progress)||0,i=(null==r?void 0:r.status)||"ready";return(0,a.jsxs)("div",{className:"group bg-gradient-to-r from-slate-50 to-blue-50 border border-slate-200 rounded-xl hover:shadow-md transition-all duration-200",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between p-3 sm:p-4",children:[(0,a.jsxs)("div",{className:"flex items-center space-x-3 sm:space-x-4 min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"w-10 h-10 sm:w-12 sm:h-12 bg-gradient-to-br from-blue-500 to-indigo-500 rounded-lg flex items-center justify-center flex-shrink-0",children:(l=e.type).startsWith("image/")?(0,a.jsx)(S.A,{className:"w-5 h-5 text-white"}):l.startsWith("video/")?(0,a.jsx)(L.A,{className:"w-5 h-5 text-white"}):l.startsWith("audio/")?(0,a.jsx)(z.A,{className:"w-5 h-5 text-white"}):l.includes("zip")||l.includes("rar")?(0,a.jsx)(P.A,{className:"w-5 h-5 text-white"}):(0,a.jsx)(O.A,{className:"w-5 h-5 text-white"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"font-medium text-slate-800 truncate text-sm sm:text-base",children:e.name}),(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("p",{className:"text-xs sm:text-sm text-slate-500",children:(e=>{if(0===e)return"0 Bytes";let s=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,s)).toFixed(2))+" "+["Bytes","KB","MB","GB"][s]})(e.size)}),"downloading"===i&&(0,a.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,a.jsx)("div",{className:"w-1 h-1 bg-orange-500 rounded-full animate-pulse"}),(0,a.jsx)("span",{className:"text-xs text-orange-600 font-medium",children:"传输中"})]}),"completed"===i&&(0,a.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,a.jsx)("div",{className:"w-1 h-1 bg-emerald-500 rounded-full"}),(0,a.jsx)("span",{className:"text-xs text-emerald-600 font-medium",children:"已完成"})]})]})]})]}),(0,a.jsx)(v,{variant:"ghost",size:"sm",onClick:()=>R(s),disabled:p||"downloading"===i,className:"opacity-0 group-hover:opacity-100 text-slate-400 hover:text-red-500 hover:bg-red-50 transition-all duration-200 flex-shrink-0 ml-2 disabled:opacity-50",children:(0,a.jsx)(M.A,{className:"w-4 h-4"})})]}),("downloading"===i||"completed"===i)&&n>0&&(0,a.jsx)("div",{className:"px-3 sm:px-4 pb-3 sm:pb-4",children:(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex justify-between text-xs text-slate-600",children:[(0,a.jsx)("span",{children:"downloading"===i?"正在发送...":"发送完成"}),(0,a.jsxs)("span",{className:"font-medium",children:[n.toFixed(1),"%"]})]}),(0,a.jsx)("div",{className:"w-full bg-slate-200 rounded-full h-2",children:(0,a.jsx)("div",{className:"h-2 rounded-full transition-all duration-300 ".concat("completed"===i?"bg-gradient-to-r from-emerald-500 to-emerald-600":"bg-gradient-to-r from-orange-500 to-orange-600"),style:{width:"".concat(n,"%")}})})]})})]},"".concat(e.name,"-").concat(e.size,"-").concat(s))})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3",children:[!i&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(v,{onClick:n,disabled:p||0===s.length,className:"button-primary text-white px-6 sm:px-8 py-3 rounded-xl font-medium flex-1 min-w-0 shadow-lg",children:[(0,a.jsx)(h.A,{className:"w-5 h-5 mr-2"}),"生成取件码"]}),(0,a.jsx)(v,{onClick:m,variant:"outline",disabled:p,className:"px-6 sm:px-8 py-3 rounded-xl font-medium",children:"添加文件"}),(0,a.jsx)(v,{onClick:g,variant:"outline",disabled:p,className:"text-red-600 hover:bg-red-50 px-6 sm:px-8 py-3 rounded-xl font-medium",children:"重新选择"})]}),i&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v,{variant:"outline",onClick:m,disabled:p,className:"px-6 py-3 rounded-xl border-slate-300 text-slate-600 hover:bg-slate-50 flex-1",children:"添加更多文件"}),s.length>0&&u&&(0,a.jsx)(v,{variant:"outline",onClick:u,disabled:p,className:"px-6 py-3 rounded-xl border-orange-300 text-orange-600 hover:bg-orange-50",children:"清空文件"})]}),(0,a.jsx)(v,{variant:"outline",onClick:g,disabled:p,className:"px-6 py-3 rounded-xl border-red-300 text-red-600 hover:bg-red-50",children:"关闭房间"})]})]}),i&&(0,a.jsxs)("div",{className:"border-t border-slate-200 pt-6",children:[(0,a.jsxs)("div",{className:"text-center mb-4 sm:mb-6",children:[(0,a.jsx)("div",{className:"w-12 h-12 sm:w-16 sm:h-16 mx-auto mb-4 bg-gradient-to-br from-emerald-500 to-teal-500 rounded-2xl flex items-center justify-center animate-float",children:(0,a.jsx)(O.A,{className:"w-6 h-6 sm:w-8 sm:h-8 text-white"})}),(0,a.jsx)("h3",{className:"text-xl sm:text-2xl font-bold bg-gradient-to-r from-emerald-600 to-teal-600 bg-clip-text text-transparent mb-2",children:"取件码生成成功!"}),(0,a.jsx)("p",{className:"text-sm sm:text-base text-slate-600",children:"分享以下信息给接收方"})]}),(0,a.jsxs)("div",{className:"space-y-4 sm:space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-3",children:"取件码"}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3",children:[(0,a.jsx)("div",{className:"flex-1 code-display rounded-xl p-4 sm:p-6 text-center",children:(0,a.jsx)("div",{className:"text-2xl sm:text-3xl font-bold font-mono bg-gradient-to-r from-emerald-600 to-teal-600 bg-clip-text text-transparent tracking-wider",children:i})}),(0,a.jsx)(v,{onClick:o,className:"px-4 sm:px-6 py-3 bg-emerald-500 hover:bg-emerald-600 text-white rounded-xl font-medium shadow-lg transition-all duration-200 hover:shadow-xl w-full sm:w-auto",children:"复制"})]})]}),c&&(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-3",children:"取件链接"}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3",children:[(0,a.jsx)("div",{className:"flex-1 code-display rounded-xl p-3 sm:p-4",children:(0,a.jsx)("div",{className:"text-xs sm:text-sm text-slate-700 break-all font-mono",children:c})}),(0,a.jsx)(v,{onClick:d,className:"px-4 sm:px-6 py-3 bg-blue-500 hover:bg-blue-600 text-white rounded-xl font-medium shadow-lg transition-all duration-200 hover:shadow-xl w-full sm:w-auto",children:"复制"})]})]})]}),(0,a.jsx)("div",{className:"mt-4 sm:mt-6 p-3 sm:p-4 bg-gradient-to-r from-blue-50 to-indigo-50 rounded-xl border border-blue-200",children:(0,a.jsxs)("p",{className:"text-xs sm:text-sm text-slate-600 text-center",children:["\uD83D\uDCA1 ",(0,a.jsx)("span",{className:"font-medium",children:"使用提示:"}),"接收方输入取件码或访问取件链接即可下载文件"]})})]})]}):(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsxs)("div",{className:"flex items-center space-x-3 flex-1",children:[(0,a.jsx)("div",{className:"w-10 h-10 bg-gradient-to-br from-blue-500 to-indigo-500 rounded-xl flex items-center justify-center",children:(0,a.jsx)(h.A,{className:"w-5 h-5 text-white"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold text-slate-800",children:"选择文件"}),(0,a.jsx)("p",{className:"text-sm text-slate-600",children:"拖拽文件到下方区域或点击选择文件"})]})]}),(0,a.jsx)("div",{className:"w-px h-12 bg-slate-200 mx-4"}),(0,a.jsxs)("div",{className:"text-right",children:[(0,a.jsx)("div",{className:"text-sm text-slate-500 mb-1",children:"连接状态"}),(0,a.jsxs)("div",{className:"flex items-center justify-end space-x-3 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-slate-400"}),(0,a.jsx)("span",{className:"text-slate-600",children:"WS"})]}),(0,a.jsx)("div",{className:"text-slate-300",children:"|"}),(0,a.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-slate-400"}),(0,a.jsx)("span",{className:"text-slate-600",children:"RTC"})]})]})]})]}),(0,a.jsxs)("div",{className:"upload-area rounded-xl p-6 sm:p-8 md:p-12 text-center cursor-pointer ".concat(j?"drag-active":""),onDragOver:y,onDragLeave:k,onDrop:C,onClick:T,children:[(0,a.jsxs)("div",{className:"transition-all duration-300 ".concat(j?"scale-110":""),children:[(0,a.jsx)("div",{className:"w-16 h-16 sm:w-20 sm:h-20 mx-auto mb-4 sm:mb-6 bg-gradient-to-br from-blue-100 to-indigo-100 rounded-full flex items-center justify-center",children:(0,a.jsx)(h.A,{className:"w-8 h-8 sm:w-10 sm:h-10 transition-colors duration-300 ".concat(j?"text-blue-600":"text-slate-400")})}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("p",{className:"text-lg sm:text-xl font-medium text-slate-700",children:j?"释放文件":"拖拽文件到这里"}),(0,a.jsxs)("p",{className:"text-sm sm:text-base text-slate-500",children:["或者 ",(0,a.jsx)("span",{className:"text-blue-600 font-medium underline",children:"点击选择文件"})]}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-slate-400 mt-4",children:"支持多个文件同时上传,WebRTC点对点传输"})]})]}),(0,a.jsx)("input",{ref:w,type:"file",multiple:!0,className:"hidden",onChange:F,disabled:p})]})]})}function B(e){let{onJoinRoom:s,files:t,onDownloadFile:r,isConnected:n,isConnecting:i,isWebSocketConnected:c=!1,downloadedFiles:o,error:d=null,onReset:m}=e,[x,h]=(0,l.useState)(""),[u,g]=(0,l.useState)(!1),{showToast:p}=(0,R.d)(),f=async e=>{try{g(!0),console.log("开始验证取件码:",e);let s=await fetch("/api/room-info?code=".concat(e)),t=await s.json();if(console.log("验证响应:",{status:s.status,data:t}),!s.ok||!t.success){let e=t.message||"取件码验证失败";return p(e,"error"),console.log("验证失败:",e),!1}return console.log("取件码验证成功:",t.room),!0}catch(e){return console.error("验证取件码时发生错误:",e),p("网络错误,请检查连接后重试","error"),!1}finally{g(!1)}},b=(0,l.useCallback)(async e=>{if(e.preventDefault(),6===x.length){let e=x.toUpperCase();await f(e)&&s(e)}},[x,s]),j=(0,l.useCallback)(e=>{let s=e.target.value.replace(/[^A-Z0-9]/g,"").toUpperCase();s.length<=6&&h(s)},[]);return(l.useEffect(()=>{if(d&&!i&&!n&&!u){let e=setTimeout(()=>{console.log("重置取件码输入"),h("")},3e3);return()=>clearTimeout(e)}},[d,i,n,u]),(n||i)&&0===t.length)?(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center mb-6",children:[(0,a.jsxs)("div",{className:"flex items-center space-x-3 flex-1",children:[(0,a.jsx)("div",{className:"w-10 h-10 bg-gradient-to-br from-blue-500 to-indigo-500 rounded-xl flex items-center justify-center",children:(0,a.jsx)(w.A,{className:"w-5 h-5 text-white"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold text-slate-800",children:"等待文件"}),(0,a.jsx)("p",{className:"text-sm text-slate-600",children:n?"已连接到房间,等待发送方选择文件...":"正在连接到房间..."})]})]}),(0,a.jsx)("div",{className:"w-px h-12 bg-slate-200 mx-4"}),(0,a.jsxs)("div",{className:"text-right",children:[(0,a.jsx)("div",{className:"text-sm text-slate-500 mb-1",children:"连接状态"}),(0,a.jsxs)("div",{className:"flex items-center justify-end space-x-3 text-sm",children:[(0,a.jsx)("div",{className:"flex items-center space-x-1",children:c?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-emerald-500 animate-pulse"}),(0,a.jsx)("span",{className:"text-emerald-600",children:"WS"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-orange-500 animate-pulse"}),(0,a.jsx)("span",{className:"text-orange-600",children:"WS"})]})}),(0,a.jsx)("div",{className:"text-slate-300",children:"|"}),(0,a.jsx)("div",{className:"flex items-center space-x-1",children:n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-emerald-500 animate-pulse"}),(0,a.jsx)("span",{className:"text-emerald-600",children:"RTC"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-orange-500 animate-pulse"}),(0,a.jsx)("span",{className:"text-orange-600",children:"RTC"})]})})]})]})]}),(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("div",{className:"flex items-center justify-center space-x-4 mb-6",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("div",{className:"w-3 h-3 rounded-full mr-2 ".concat(n?"bg-emerald-500 animate-pulse":"bg-orange-500 animate-spin")}),(0,a.jsx)("span",{className:"text-sm font-medium ".concat(n?"text-emerald-600":"text-orange-600"),children:n?"连接已建立":"连接中..."})]})}),(0,a.jsx)("div",{className:"flex justify-center space-x-1 mb-6",children:[void 0,void 0,void 0].map((e,s)=>(0,a.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full animate-bounce",style:{animationDelay:"".concat(.1*s,"s")}},s))}),(0,a.jsx)("div",{className:"p-4 bg-gradient-to-r from-blue-50 to-indigo-50 rounded-xl border border-blue-200",children:(0,a.jsxs)("p",{className:"text-xs sm:text-sm text-slate-600 text-center",children:["\uD83D\uDCA1 ",(0,a.jsx)("span",{className:"font-medium",children:"提示:"}),"房间已连接,发送方清空文件列表后您会看到此界面,等待对方重新选择文件"]})})]})]}):t.length>0?(0,a.jsxs)("div",{className:"space-y-4 sm:space-y-6",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsxs)("div",{className:"flex items-center space-x-3 flex-1",children:[(0,a.jsx)("div",{className:"w-10 h-10 bg-gradient-to-br from-emerald-500 to-teal-500 rounded-xl flex items-center justify-center",children:(0,a.jsx)(w.A,{className:"w-5 h-5 text-white"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-slate-800",children:"可下载文件"}),(0,a.jsx)("p",{className:"text-sm text-slate-500",children:n?(0,a.jsx)("span",{className:"text-emerald-600",children:"✅ 已连接,可以下载文件"}):(0,a.jsx)("span",{className:"text-amber-600",children:"⏳ 正在建立连接..."})})]})]}),(0,a.jsx)("div",{className:"w-px h-12 bg-slate-200 mx-4"}),(0,a.jsxs)("div",{className:"text-right",children:[(0,a.jsx)("div",{className:"text-sm text-slate-500 mb-1",children:"连接状态"}),(0,a.jsxs)("div",{className:"flex items-center justify-end space-x-3 text-sm",children:[(0,a.jsx)("div",{className:"flex items-center space-x-1",children:c?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-emerald-500 animate-pulse"}),(0,a.jsx)("span",{className:"text-emerald-600",children:"WS"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-slate-400"}),(0,a.jsx)("span",{className:"text-slate-600",children:"WS"})]})}),(0,a.jsx)("div",{className:"text-slate-300",children:"|"}),(0,a.jsx)("div",{className:"flex items-center space-x-1",children:n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-emerald-500 animate-pulse"}),(0,a.jsx)("span",{className:"text-emerald-600",children:"RTC"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-orange-500 animate-pulse"}),(0,a.jsx)("span",{className:"text-orange-600",children:"RTC"})]})})]}),(0,a.jsxs)("div",{className:"mt-1 text-xs text-slate-400",children:[t.length," 个文件"]})]})]}),(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"space-y-3 sm:space-y-4",children:t.map(e=>{var s;let t="downloading"===e.status,l="completed"===e.status,i=null==o?void 0:o.has(e.id),c=e.progress;return console.log("文件状态:",{fileName:e.name,status:e.status,progress:e.progress,isDownloading:t,currentProgress:c}),(0,a.jsxs)("div",{className:"bg-gradient-to-r from-slate-50 to-blue-50 border border-slate-200 rounded-xl p-3 sm:p-4 hover:shadow-md transition-all duration-200",children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between mb-3 gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center space-x-3 sm:space-x-4 flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"w-10 h-10 sm:w-12 sm:h-12 bg-gradient-to-br from-blue-500 to-indigo-500 rounded-lg flex items-center justify-center flex-shrink-0",children:(s=e.type).startsWith("image/")?(0,a.jsx)(S.A,{className:"w-5 h-5 text-white"}):s.startsWith("video/")?(0,a.jsx)(L.A,{className:"w-5 h-5 text-white"}):s.startsWith("audio/")?(0,a.jsx)(z.A,{className:"w-5 h-5 text-white"}):s.includes("zip")||s.includes("rar")?(0,a.jsx)(P.A,{className:"w-5 h-5 text-white"}):(0,a.jsx)(O.A,{className:"w-5 h-5 text-white"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-slate-800 truncate text-sm sm:text-base",children:e.name}),(0,a.jsx)("p",{className:"text-sm text-slate-500",children:(e=>{if(0===e)return"0 Bytes";let s=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,s)).toFixed(2))+" "+["Bytes","KB","MB","GB"][s]})(e.size)}),i&&(0,a.jsx)("p",{className:"text-xs text-emerald-600 font-medium",children:"✅ 传输完成,点击保存"}),t&&(0,a.jsxs)("p",{className:"text-xs text-blue-600 font-medium",children:["⏳ 传输中...",c.toFixed(1),"%"]})]})]}),(0,a.jsxs)(v,{onClick:()=>r(e.id),disabled:!n||t,className:"px-6 py-2 rounded-lg font-medium shadow-lg transition-all duration-200 hover:shadow-xl ".concat(i?"bg-gradient-to-r from-blue-500 to-indigo-500 hover:from-blue-600 hover:to-indigo-600 text-white":t?"bg-slate-300 text-slate-500 cursor-not-allowed":"bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white"),children:[(0,a.jsx)(w.A,{className:"w-4 h-4 mr-2"}),t?"传输中...":i?"保存文件":"开始传输"]})]}),(t||l)&&c>0&&(0,a.jsxs)("div",{className:"mt-3 space-y-2",children:[(0,a.jsxs)("div",{className:"flex justify-between text-sm text-slate-600",children:[(0,a.jsx)("span",{children:i?"传输完成":"正在传输..."}),(0,a.jsxs)("span",{className:"font-medium",children:[c.toFixed(1),"%"]})]}),(0,a.jsx)("div",{className:"w-full bg-slate-200 rounded-full h-2",children:(0,a.jsx)("div",{className:"h-2 rounded-full transition-all duration-300 ".concat(i?"bg-gradient-to-r from-emerald-500 to-emerald-600":"bg-gradient-to-r from-emerald-500 to-teal-500"),style:{width:"".concat(c,"%")}})})]})]},e.id)})})})]}):(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center mb-6 sm:mb-8",children:[(0,a.jsxs)("div",{className:"flex items-center space-x-3 flex-1",children:[(0,a.jsx)("div",{className:"w-10 h-10 bg-gradient-to-br from-emerald-500 to-teal-500 rounded-xl flex items-center justify-center",children:(0,a.jsx)(w.A,{className:"w-5 h-5 text-white"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold text-slate-800",children:"输入取件码"}),(0,a.jsx)("p",{className:"text-sm text-slate-600",children:"请输入6位取件码来获取文件"})]})]}),(0,a.jsx)("div",{className:"w-px h-12 bg-slate-200 mx-4"}),(0,a.jsxs)("div",{className:"text-right",children:[(0,a.jsx)("div",{className:"text-sm text-slate-500 mb-1",children:"连接状态"}),(0,a.jsxs)("div",{className:"flex items-center justify-end space-x-3 text-sm",children:[(0,a.jsx)("div",{className:"flex items-center space-x-1",children:i?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-orange-500 animate-pulse"}),(0,a.jsx)("span",{className:"text-orange-600",children:"WS"})]}):c?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-emerald-500 animate-pulse"}),(0,a.jsx)("span",{className:"text-emerald-600",children:"WS"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-slate-400"}),(0,a.jsx)("span",{className:"text-slate-600",children:"WS"})]})}),(0,a.jsx)("div",{className:"text-slate-300",children:"|"}),(0,a.jsx)("div",{className:"flex items-center space-x-1",children:n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-emerald-500 animate-pulse"}),(0,a.jsx)("span",{className:"text-emerald-600",children:"RTC"})]}):i?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-orange-500 animate-pulse"}),(0,a.jsx)("span",{className:"text-orange-600",children:"RTC"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full bg-slate-400"}),(0,a.jsx)("span",{className:"text-slate-600",children:"RTC"})]})})]})]})]}),(0,a.jsxs)("form",{onSubmit:b,className:"space-y-4 sm:space-y-6",children:[(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(N,{value:x,onChange:j,placeholder:"请输入取件码",className:"text-center text-2xl sm:text-3xl tracking-[0.3em] sm:tracking-[0.5em] font-mono h-12 sm:h-16 border-2 border-slate-200 rounded-xl focus:border-emerald-500 focus:ring-emerald-500 bg-white/80 backdrop-blur-sm pb-2 sm:pb-4",maxLength:6,disabled:u||i}),(0,a.jsx)("div",{className:"absolute inset-x-0 -bottom-4 sm:-bottom-6 flex justify-center space-x-1 sm:space-x-2",children:[...Array(6)].map((e,s)=>(0,a.jsx)("div",{className:"w-1.5 h-1.5 sm:w-2 sm:h-2 rounded-full transition-all duration-200 ".concat(s{let e=(0,f.useSearchParams)(),s=(0,f.useRouter)(),{showToast:t}=(0,R.d)(),[r,n]=(0,l.useState)([]),[i,c]=(0,l.useState)([]),[o,d]=(0,l.useState)(new Map),[m,x]=(0,l.useState)(null),[u,g]=(0,l.useState)(""),[p,b]=(0,l.useState)("send"),j=(0,l.useRef)(null),{isConnected:N,isConnecting:y,isWebSocketConnected:k,error:C,connect:S,disconnect:F,sendFile:T,sendFileList:A,requestFile:D,onFileReceived:W,onFileListReceived:E,onFileRequested:L,onFileProgress:z}=function(){let e=function(){let[e,s]=(0,l.useState)({isConnected:!1,isConnecting:!1,isWebSocketConnected:!1,error:null,localDataChannel:null,remoteDataChannel:null}),t=(0,l.useRef)(null),a=(0,l.useRef)(null),r=(0,l.useRef)(null),n=(0,l.useRef)(null),i=[{urls:"stun:stun.l.google.com:19302"},{urls:"stun:stun1.l.google.com:19302"},{urls:"stun:stun2.l.google.com:19302"}],c=(0,l.useCallback)(e=>{s(s=>({...s,...e}))},[]),o=(0,l.useCallback)(()=>{n.current&&(clearTimeout(n.current),n.current=null)},[]),d=(0,l.useCallback)(()=>{console.warn("WebRTC连接超时"),c({error:"连接超时,请检查取件码是否正确或稍后重试",isConnecting:!1}),t.current&&t.current.close(),a.current&&a.current.close()},[c]),m=(0,l.useCallback)(async(e,s)=>{console.log("=== 开始WebRTC连接 ==="),console.log("房间代码:",e,"角色:",s),o(),c({isConnecting:!0,error:null}),n.current=setTimeout(()=>{d()},3e4);try{let l=new RTCPeerConnection({iceServers:i});a.current=l;let n=new WebSocket("ws://localhost:8080/ws/webrtc?code=".concat(e,"&role=").concat(s));if(t.current=n,n.onopen=async()=>{if(console.log("WebSocket连接已建立"),c({isWebSocketConnected:!0}),"sender"===s)try{let e=await l.createOffer();await l.setLocalDescription(e),n.send(JSON.stringify({type:"offer",payload:e})),console.log("已发送offer")}catch(e){console.error("创建offer失败:",e),c({error:"创建连接失败",isConnecting:!1})}},n.onmessage=async e=>{try{let s=JSON.parse(e.data);switch(console.log("收到信令消息:",s),s.type){case"offer":if(s.payload){await l.setRemoteDescription(new RTCSessionDescription(s.payload));let e=await l.createAnswer();await l.setLocalDescription(e),n.readyState===WebSocket.OPEN&&(n.send(JSON.stringify({type:"answer",payload:e})),console.log("已发送answer"))}break;case"answer":s.payload&&await l.setRemoteDescription(new RTCSessionDescription(s.payload));break;case"ice-candidate":s.payload&&await l.addIceCandidate(new RTCIceCandidate(s.payload));break;case"error":console.error("信令错误:",s.error),c({error:s.error,isConnecting:!1})}}catch(e){console.error("处理信令消息失败:",e),c({error:"信令处理失败",isConnecting:!1})}},n.onerror=e=>{console.error("WebSocket错误:",e),c({error:"WebSocket连接失败",isConnecting:!1,isWebSocketConnected:!1})},n.onclose=()=>{console.log("WebSocket连接已关闭"),c({isWebSocketConnected:!1})},l.onicecandidate=e=>{e.candidate&&n.readyState===WebSocket.OPEN&&(console.log("发送ICE候选:",e.candidate),n.send(JSON.stringify({type:"ice-candidate",payload:e.candidate})))},l.onconnectionstatechange=()=>{console.log("连接状态:",l.connectionState);let e="connected"===l.connectionState;e&&o(),c({isConnected:e,isConnecting:!e&&"failed"!==l.connectionState}),"failed"===l.connectionState&&(o(),c({error:"连接失败",isConnecting:!1}))},"sender"===s){let e=l.createDataChannel("fileTransfer",{ordered:!0,maxPacketLifeTime:void 0,maxRetransmits:void 0});r.current=e,e.bufferedAmountLowThreshold=262144,e.onopen=()=>{console.log("数据通道已打开 (发送方)"),console.log("数据通道配置:",{id:e.id,label:e.label,maxPacketLifeTime:e.maxPacketLifeTime,maxRetransmits:e.maxRetransmits,ordered:e.ordered,bufferedAmountLowThreshold:e.bufferedAmountLowThreshold}),c({localDataChannel:e})}}else l.ondatachannel=e=>{let s=e.channel;r.current=s,console.log("收到数据通道 (接收方)"),s.onopen=()=>{console.log("数据通道已打开 (接收方)"),c({remoteDataChannel:s})}}}catch(e){console.error("连接失败:",e),o(),c({error:e instanceof Error?e.message:"连接失败",isConnecting:!1})}},[c,o,d]),x=(0,l.useCallback)(()=>{console.log("断开WebRTC连接"),o(),r.current&&(r.current.close(),r.current=null),a.current&&(a.current.close(),a.current=null),t.current&&(t.current.close(),t.current=null),s({isConnected:!1,isConnecting:!1,isWebSocketConnected:!1,error:null,localDataChannel:null,remoteDataChannel:null})},[o]),h=(0,l.useCallback)(()=>r.current,[]);return{...e,connect:m,disconnect:x,getDataChannel:h}}(),s=function(){let[e,s]=(0,l.useState)({isTransferring:!1,transferProgress:0,receivedFiles:[],error:null}),t=(0,l.useRef)(new Map),a=(0,l.useRef)(null),r=(0,l.useRef)([]),n=(0,l.useRef)([]),i=(0,l.useRef)([]),c=(0,l.useCallback)(e=>{s(s=>({...s,...e}))},[]),o=(0,l.useCallback)(async(e,s,t)=>{if(!t||"open"!==t.readyState){console.error("数据通道未准备就绪"),c({error:"数据通道未准备就绪"});return}console.log("=== 开始发送文件 ==="),console.log("文件:",e.name,"大小:",e.size,"ID:",s),c({isTransferring:!0,transferProgress:0,error:null});try{let a={id:s,name:e.name,size:e.size,type:e.type},l=JSON.stringify({type:"file-start",payload:a});console.log("发送文件元数据:",l),t.send(l);let r=Math.ceil(e.size/262144);console.log("总分块数:",r);let n=0,o=()=>{if(n>=r){let a=JSON.stringify({type:"file-end",payload:{id:s}});t.send(a),c({isTransferring:!1,transferProgress:100}),console.log("文件发送完成:",e.name);return}let a=262144*n,l=Math.min(a+262144,e.size),d=e.slice(a,l),m=new FileReader;m.onload=a=>{var l;if((null==(l=a.target)?void 0:l.result)&&"open"===t.readyState){let l=a.target.result;if(t.bufferedAmount>1048576){console.log("数据通道缓冲区满,等待清空...");let e=()=>{t.bufferedAmount<262144?d():setTimeout(e,10)};e()}else d();function d(){let a=JSON.stringify({type:"file-chunk",payload:{fileId:s,chunkIndex:n,totalChunks:r}});t.send(a),t.send(l);let d=++n/r*100;c({transferProgress:d}),i.current.forEach(t=>{t({fileId:s,fileName:e.name,progress:d})}),console.log("发送进度: ".concat(d.toFixed(1),"%, 块: ").concat(n,"/").concat(r,", 文件: ").concat(e.name,", 缓冲区: ").concat(t.bufferedAmount," bytes")),o()}}},m.onerror=()=>{console.error("读取文件块失败"),c({error:"读取文件失败",isTransferring:!1})},m.readAsArrayBuffer(d)};o()}catch(e){console.error("发送文件失败:",e),c({error:e instanceof Error?e.message:"发送文件失败",isTransferring:!1})}},[c]),d=(0,l.useCallback)(e=>{if("string"==typeof e.data)try{let l=JSON.parse(e.data);switch(console.log("收到消息:",l.type,l.payload),l.type){case"file-list":console.log("文件列表消息将由主hook处理");return;case"file-start":let i=l.payload;console.log("开始接收文件:",i.name,"大小:",i.size),t.current.set(i.id,{metadata:i,chunks:[],receivedChunks:0,totalChunks:Math.ceil(i.size/262144)}),c({isTransferring:!0,transferProgress:0});break;case"file-chunk":let{fileId:o,chunkIndex:d,totalChunks:m}=l.payload;console.log("接收文件块信息: ".concat(d+1,"/").concat(m,", 文件ID: ").concat(o)),a.current={fileId:o,chunkIndex:d,totalChunks:m};break;case"file-end":let{id:x}=l.payload,h=t.current.get(x);if(h){let e=new Blob(h.chunks,{type:h.metadata.type}),a=new File([e],h.metadata.name,{type:h.metadata.type});console.log("文件接收完成:",a.name),s(e=>({...e,receivedFiles:[...e.receivedFiles,{id:x,file:a}],isTransferring:!1,transferProgress:100})),n.current.forEach(e=>{e({id:x,file:a})}),t.current.delete(x)}break;case"file-request":let{fileId:u,fileName:g}=l.payload;console.log("收到文件请求:",g,"ID:",u),r.current.forEach(e=>{e(u,g)})}}catch(e){console.error("解析消息失败:",e)}else if(e.data instanceof ArrayBuffer){let s=e.data;if(console.log("收到文件块数据:",s.byteLength,"bytes"),a.current){let{fileId:e,chunkIndex:l}=a.current,r=t.current.get(e);if(r){if(!r.chunks[l]){r.chunks[l]=s,r.receivedChunks++;let t=r.receivedChunks/r.totalChunks*100;c({transferProgress:t}),i.current.forEach(s=>{s({fileId:e,fileName:r.metadata.name,progress:t})}),console.log("文件接收进度: ".concat(t.toFixed(1),"%, 块: ").concat(r.receivedChunks,"/").concat(r.totalChunks,", 文件: ").concat(r.metadata.name))}a.current=null}}else console.warn("收到块数据但没有对应的块信息")}},[c]),m=(0,l.useCallback)((e,s,t)=>{if(!t||"open"!==t.readyState)return void console.error("数据通道未准备就绪");console.log("请求文件:",s,"ID:",e);let a=JSON.stringify({type:"file-request",payload:{fileId:e,fileName:s}});t.send(a)},[]),x=(0,l.useCallback)(e=>(r.current.push(e),()=>{let s=r.current.indexOf(e);s>-1&&r.current.splice(s,1)}),[]),h=(0,l.useCallback)(e=>(n.current.push(e),()=>{let s=n.current.indexOf(e);s>-1&&n.current.splice(s,1)}),[]),u=(0,l.useCallback)(e=>(i.current.push(e),()=>{let s=i.current.indexOf(e);s>-1&&i.current.splice(s,1)}),[]);return{...e,sendFile:o,requestFile:m,handleMessage:d,onFileRequested:x,onFileReceived:h,onFileProgress:u}}(),t=(0,l.useRef)([]);(0,l.useEffect)(()=>{let a=e.getDataChannel();if(a&&"open"===a.readyState){console.log("设置数据通道消息处理器");let e=s.handleMessage;a.onmessage=s=>{if(console.log("收到数据通道消息:",typeof s.data),"string"==typeof s.data)try{let e=JSON.parse(s.data);if("file-list"===e.type){console.log("收到文件列表:",e.payload),t.current.forEach(s=>{s(e.payload)});return}}catch(e){console.error("解析文件列表消息失败:",e)}e(s)}}},[e.isConnected,e.getDataChannel,s.handleMessage]);let a=(0,l.useCallback)((t,a)=>{let l=e.getDataChannel();if(!l)return void console.error("数据通道未准备就绪");let r=a||"file_".concat(Date.now());console.log("=== 发送文件 ==="),console.log("文件:",t.name,"ID:",r,"大小:",t.size),s.sendFile(t,r,l)},[e.getDataChannel,s.sendFile]),r=(0,l.useCallback)((t,a)=>{let l=e.getDataChannel();if(!l)return void console.error("数据通道未准备就绪");console.log("=== 请求文件 ==="),console.log("文件:",a,"ID:",t),s.requestFile(t,a,l)},[e.getDataChannel,s.requestFile]),n=(0,l.useCallback)(s=>{let t=e.getDataChannel();if(!t||"open"!==t.readyState)return void console.error("数据通道未准备就绪,无法发送文件列表");console.log("=== 发送文件列表 ==="),console.log("文件列表:",s);let a=JSON.stringify({type:"file-list",payload:s});try{t.send(a),console.log("文件列表已发送")}catch(e){console.error("发送文件列表失败:",e)}},[e.getDataChannel]),i=(0,l.useCallback)(e=>(console.log("注册文件列表回调"),t.current.push(e),()=>{let s=t.current.indexOf(e);s>-1&&t.current.splice(s,1)}),[]);return{isConnected:e.isConnected,isConnecting:e.isConnecting,isWebSocketConnected:e.isWebSocketConnected,error:e.error||s.error,isTransferring:s.isTransferring,transferProgress:s.transferProgress,receivedFiles:s.receivedFiles,connect:e.connect,disconnect:e.disconnect,sendFile:a,requestFile:r,sendFileList:n,onFileRequested:s.onFileRequested,onFileReceived:s.onFileReceived,onFileProgress:s.onFileProgress,onFileListReceived:i}}();(0,l.useEffect)(()=>{let s=e.get("mode"),t=e.get("type"),a=e.get("code");"webrtc"===t&&s&&["send","receive"].includes(s)&&(b(s),a&&"receive"===s&&J(a))},[e]);let P=(0,l.useCallback)(t=>{b(t);let a=new URLSearchParams(e.toString());a.set("type","webrtc"),a.set("mode",t),s.push("?".concat(a.toString()),{scroll:!1})},[e,s]),O=()=>Date.now().toString(36)+Math.random().toString(36).substr(2),M=async()=>{if(0===r.length)return void t("需要选择文件才能创建传输房间","error");try{console.log("=== 创建房间 ==="),console.log("选中文件数:",r.length);let e=await fetch("/api/create-room",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:r.map(e=>({name:e.name,size:e.size,type:e.type,lastModified:e.lastModified}))})}),s=await e.json();if(!e.ok)throw Error(s.error||"创建房间失败");let a=s.code;g(a),console.log("房间创建成功,取件码:",a),S(a,"sender"),t("房间创建成功,取件码: ".concat(a),"success")}catch(e){console.error("创建房间失败:",e),t(e instanceof Error?e.message:"网络错误,请重试","error")}},J=e=>{console.log("=== 加入房间 ==="),console.log("取件码:",e),g(e.trim()),S(e.trim(),"receiver"),t("正在连接到房间: ".concat(e),"info")};(0,l.useEffect)(()=>E(e=>{console.log("=== 收到文件列表更新 ==="),console.log("文件列表:",e),console.log("当前模式:",p),"receive"===p&&c(e)}),[E,p]),(0,l.useEffect)(()=>{C&&"receive"===p&&(console.log("=== 连接错误处理 ==="),console.log("错误信息:",C),t("连接失败: ".concat(C),"error"))},[C,p,t]),(0,l.useEffect)(()=>W(e=>{console.log("=== 接收到文件 ==="),console.log("文件:",e.file.name,"ID:",e.id),d(s=>new Map(s.set(e.id,e.file))),c(s=>s.map(s=>s.id===e.id?{...s,status:"completed",progress:100}:s)),t("".concat(e.file.name," 已准备好下载"),"success")}),[W,t]),(0,l.useEffect)(()=>z(e=>{console.log("=== 文件进度更新 ==="),console.log("文件:",e.fileName,"ID:",e.fileId,"进度:",e.progress),x({fileId:e.fileId,fileName:e.fileName,progress:e.progress}),c(s=>s.map(s=>{if(s.id===e.fileId||s.name===e.fileName){let t=e.progress,a=t>=100?"completed":"downloading";return console.log("更新文件 ".concat(s.name," 进度: ").concat(s.progress," -> ").concat(t)),{...s,progress:t,status:a}}return s})),e.progress>=100&&"send"===p&&(t("文件发送完成: ".concat(e.fileName),"success"),x(null))}),[z,p,t]),(0,l.useEffect)(()=>L((e,s)=>{if(console.log("=== 收到文件请求 ==="),console.log("文件:",s,"ID:",e,"当前模式:",p),"send"===p){console.log("当前选中的文件列表:",r.map(e=>e.name));let a=r.find(e=>e.name===s);if(!a){console.error("找不到匹配的文件:",s),console.log("可用文件:",r.map(e=>"".concat(e.name," (").concat(e.size," bytes)"))),t("无法找到文件: ".concat(s),"error");return}console.log("找到匹配文件,开始发送:",a.name,"ID:",e,"文件大小:",a.size),c(t=>t.map(t=>t.id===e||t.name===s?{...t,status:"downloading",progress:0}:t)),T(a,e),t("开始发送文件: ".concat(s),"info")}else console.warn("接收模式下收到文件请求,忽略")}),[L,p,r,T,t]),(0,l.useEffect)(()=>{if(console.log("=== 连接状态变化 ==="),console.log("连接状态:",{isConnected:N,pickupCode:u,mode:p,selectedFilesCount:r.length,fileListCount:i.length}),N&&u&&"send"===p&&r.length>0)if(0===i.length){console.log("创建文件列表并发送...");let e=r.map(e=>({id:O(),name:e.name,size:e.size,type:e.type,status:"ready",progress:0}));c(e),setTimeout(()=>{A(e)},500)}else i.length>0&&(console.log("发送现有文件列表..."),setTimeout(()=>{A(i)},500))},[N,u,p,r.length]);let U=u?"".concat(window.location.origin,"?type=webrtc&mode=receive&code=").concat(u):"";return(0,l.useEffect)(()=>{C&&t(C,"error")},[C,t]),(0,a.jsxs)("div",{className:"space-y-4 sm:space-y-6",children:[(0,a.jsx)("div",{className:"flex justify-center mb-6",children:(0,a.jsxs)("div",{className:"bg-white/80 backdrop-blur-sm rounded-xl p-1 shadow-lg",children:[(0,a.jsxs)(v,{variant:"send"===p?"default":"ghost",onClick:()=>P("send"),className:"px-6 py-2 rounded-lg",children:[(0,a.jsx)(h.A,{className:"w-4 h-4 mr-2"}),"发送文件"]}),(0,a.jsxs)(v,{variant:"receive"===p?"default":"ghost",onClick:()=>P("receive"),className:"px-6 py-2 rounded-lg",children:[(0,a.jsx)(w.A,{className:"w-4 h-4 mr-2"}),"接收文件"]})]})}),"send"===p?(0,a.jsx)("div",{className:"bg-white/80 backdrop-blur-sm rounded-xl p-4 sm:p-6 shadow-lg border border-white/20 animate-fade-in-up",children:(0,a.jsx)(I,{selectedFiles:r,fileList:i,onFilesChange:n,onGenerateCode:M,pickupCode:u,pickupLink:U,onCopyCode:()=>{navigator.clipboard.writeText(u),t("取件码已复制到剪贴板","success")},onCopyLink:()=>{let e="".concat(window.location.origin,"?type=webrtc&mode=receive&code=").concat(u);navigator.clipboard.writeText(e),t("取件链接已复制到剪贴板","success")},onAddMoreFiles:()=>{var e;null==(e=j.current)||e.click()},onRemoveFile:n,onClearFiles:()=>{console.log("=== 清空文件 ==="),n([]),c([]),N&&u&&A([])},onReset:()=>{console.log("=== 重置房间 ==="),F(),g(""),n([]),c([]),d(new Map)},disabled:!!m,isConnected:N,isWebSocketConnected:k})}):(0,a.jsx)("div",{className:"bg-white/80 backdrop-blur-sm rounded-xl p-4 sm:p-6 shadow-lg border border-white/20 animate-fade-in-up",children:(0,a.jsx)(B,{onJoinRoom:J,files:i,onDownloadFile:e=>{o.get(e)?(e=>{let s=o.get(e);if(!s)return;let a=URL.createObjectURL(s),l=document.createElement("a");l.href=a,l.download=s.name,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(a),t("".concat(s.name," 已保存到下载文件夹"),"success")})(e):(e=>{if("receive"!==p)return console.error("requestFile只能在接收模式下调用");let s=i.find(s=>s.id===e);if(!s)return console.error("找不到文件信息:",e);console.log("=== 开始请求文件 ==="),console.log("文件信息:",{name:s.name,id:e,size:s.size}),console.log("当前文件状态:",s.status),console.log("WebRTC连接状态:",{isConnected:N,isTransferring:!!m}),c(s=>{let t=s.map(s=>s.id===e?{...s,status:"downloading",progress:0}:s);return console.log("更新后的文件列表:",t.find(s=>s.id===e)),t}),console.log("调用hook的requestFile..."),D(e,s.name),t("正在请求文件: ".concat(s.name),"info")})(e)},isConnected:N,isConnecting:y,isWebSocketConnected:k,downloadedFiles:o,error:C,onReset:()=>{if(console.log("=== 重置连接状态 ==="),F(),g(""),c([]),d(new Map),"receive"===p){let t=new URLSearchParams(e.toString());t.delete("code"),s.push("?".concat(t.toString()),{scroll:!1})}}})}),(0,a.jsx)("input",{ref:j,type:"file",multiple:!0,onChange:e=>(e=>{console.log("=== 文件选择 ==="),console.log("新文件:",e.map(e=>e.name)),n(s=>[...s,...e]);let s=e.map(e=>({id:O(),name:e.name,size:e.size,type:e.type,status:"ready",progress:0}));c(e=>{let t=[...e,...s];return console.log("更新后的文件列表:",t),N&&u&&(console.log("立即同步文件列表到对端"),setTimeout(()=>A(t),100)),t})})(Array.from(e.target.files||[])),className:"hidden"})]})};function U(){return(0,a.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 to-blue-50",children:(0,a.jsxs)("div",{className:"container mx-auto px-4 py-4 sm:py-6 md:py-8",children:[(0,a.jsx)("div",{className:"text-center mb-6 sm:mb-8",children:(0,a.jsx)(p,{})}),(0,a.jsx)("div",{className:"max-w-4xl mx-auto",children:(0,a.jsxs)(o,{defaultValue:"webrtc",className:"w-full",children:[(0,a.jsx)("div",{className:"mb-6",children:(0,a.jsxs)(d,{className:"grid w-full grid-cols-3 max-w-lg mx-auto h-auto bg-white/90 backdrop-blur-sm shadow-lg rounded-xl p-2 border border-slate-200",children:[(0,a.jsxs)(m,{value:"webrtc",className:"flex items-center justify-center space-x-2 px-4 py-3 text-sm font-medium rounded-lg transition-all duration-200 hover:bg-slate-50 data-[state=active]:bg-blue-500 data-[state=active]:text-white data-[state=active]:shadow-md data-[state=active]:hover:bg-blue-600",children:[(0,a.jsx)(h.A,{className:"w-4 h-4"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"文件传输"}),(0,a.jsx)("span",{className:"sm:hidden",children:"文件"})]}),(0,a.jsxs)(m,{value:"text",className:"flex items-center justify-center space-x-2 px-4 py-3 text-sm font-medium rounded-lg transition-all duration-200 hover:bg-slate-50 data-[state=active]:bg-emerald-500 data-[state=active]:text-white data-[state=active]:shadow-md data-[state=active]:hover:bg-emerald-600",children:[(0,a.jsx)(u.A,{className:"w-4 h-4"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"文本传输"}),(0,a.jsx)("span",{className:"sm:hidden",children:"文本"})]}),(0,a.jsxs)(m,{value:"desktop",className:"flex items-center justify-center space-x-2 px-4 py-3 text-sm font-medium rounded-lg transition-all duration-200 hover:bg-slate-50 data-[state=active]:bg-purple-500 data-[state=active]:text-white data-[state=active]:shadow-md data-[state=active]:hover:bg-purple-600",children:[(0,a.jsx)(g.A,{className:"w-4 h-4"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"共享桌面"}),(0,a.jsx)("span",{className:"sm:hidden",children:"桌面"})]})]})}),(0,a.jsxs)("div",{children:[(0,a.jsx)(x,{value:"webrtc",className:"mt-0 animate-fade-in-up",children:(0,a.jsx)(J,{})}),(0,a.jsx)(x,{value:"text",className:"mt-0 animate-fade-in-up",children:(0,a.jsx)(T,{onSendText:async e=>{try{let s=await fetch("/api/create-text-room",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:e})}),t=await s.json();if(!s.ok)throw Error(t.error||"创建文本房间失败");return t.code}catch(e){throw console.error("创建文本房间失败:",e),e}},onReceiveText:async e=>{try{let s=await fetch("/api/get-text-content?code=".concat(e)),t=await s.json();if(!s.ok)throw Error(t.error||"获取文本内容失败");return t.text}catch(e){throw console.error("获取文本内容失败:",e),e}}})}),(0,a.jsx)(x,{value:"desktop",className:"mt-0 animate-fade-in-up",children:(0,a.jsx)(E,{})})]})]})})]})})}let _=function(){return(0,a.jsx)(l.Suspense,{fallback:(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center",children:"加载中..."}),children:(0,a.jsx)(U,{})})}},6801:(e,s,t)=>{"use strict";t.d(s,{ToastProvider:()=>i,d:()=>n});var a=t(5155),l=t(2115);let r=(0,l.createContext)(void 0),n=()=>{let e=(0,l.useContext)(r);if(!e)throw Error("useToast must be used within a ToastProvider");return e},i=e=>{let{children:s}=e,[t,n]=(0,l.useState)([]),i=(0,l.useCallback)(function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"success",t=Date.now().toString(),a={id:t,message:e,type:s};n(e=>[...e,a]),setTimeout(()=>{n(e=>e.filter(e=>e.id!==t))},3e3)},[]),c=(0,l.useCallback)(e=>{n(s=>s.filter(s=>s.id!==e))},[]);return(0,a.jsxs)(r.Provider,{value:{showToast:i},children:[s,(0,a.jsx)("div",{className:"fixed top-4 left-1/2 transform -translate-x-1/2 z-50 space-y-2",children:t.map(e=>(0,a.jsx)("div",{className:"\n max-w-sm p-4 rounded-xl shadow-lg backdrop-blur-sm transform transition-all duration-300 ease-in-out\n ".concat("success"===e.type?"bg-emerald-50/90 border border-emerald-200 text-emerald-800":"","\n ").concat("error"===e.type?"bg-red-50/90 border border-red-200 text-red-800":"","\n ").concat("info"===e.type?"bg-blue-50/90 border border-blue-200 text-blue-800":"","\n animate-slide-in-down\n "),onClick:()=>c(e.id),children:(0,a.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,a.jsxs)("div",{className:"flex-shrink-0",children:["success"===e.type&&(0,a.jsx)("div",{className:"w-6 h-6 bg-emerald-500 rounded-full flex items-center justify-center",children:(0,a.jsx)("svg",{className:"w-4 h-4 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}),"error"===e.type&&(0,a.jsx)("div",{className:"w-6 h-6 bg-red-500 rounded-full flex items-center justify-center",children:(0,a.jsx)("svg",{className:"w-4 h-4 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})}),"info"===e.type&&(0,a.jsx)("div",{className:"w-6 h-6 bg-blue-500 rounded-full flex items-center justify-center",children:(0,a.jsx)("svg",{className:"w-4 h-4 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})})]}),(0,a.jsx)("p",{className:"text-sm font-medium",children:e.message})]})},e.id))})]})}}},e=>{e.O(0,[423,441,964,358],()=>e(e.s=409)),_N_E=e.O()}]); \ No newline at end of file diff --git a/internal/web/frontend/_next/static/chunks/app/page-f438e315cafde810.js b/internal/web/frontend/_next/static/chunks/app/page-f438e315cafde810.js deleted file mode 100644 index d7a676d..0000000 --- a/internal/web/frontend/_next/static/chunks/app/page-f438e315cafde810.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{409:(e,t,s)=>{Promise.resolve().then(s.bind(s,5055))},5055:(e,t,s)=>{"use strict";s.d(t,{default:()=>eo});var a=s(5155),l=s(2115),r=s(5695),i=s(888),n=s(2596),o=s(9688);function c(){for(var e=arguments.length,t=Array(e),s=0;s{let{className:s,...l}=e;return(0,a.jsx)(i.B8,{ref:t,className:c("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",s),...l})});m.displayName=i.B8.displayName;let x=l.forwardRef((e,t)=>{let{className:s,...l}=e;return(0,a.jsx)(i.l9,{ref:t,className:c("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",s),...l})});x.displayName=i.l9.displayName;let u=l.forwardRef((e,t)=>{let{className:s,...l}=e;return(0,a.jsx)(i.UC,{ref:t,className:c("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s),...l})});u.displayName=i.UC.displayName;var h=s(3470),p=s(4416);let f=h.bL;h.l9;let g=h.ZL;h.bm;let b=l.forwardRef((e,t)=>{let{className:s,...l}=e;return(0,a.jsx)(h.hJ,{ref:t,className:c("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...l})});b.displayName=h.hJ.displayName;let v=l.forwardRef((e,t)=>{let{className:s,children:l,...r}=e;return(0,a.jsxs)(g,{children:[(0,a.jsx)(b,{}),(0,a.jsxs)(h.UC,{ref:t,className:c("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...r,children:[l,(0,a.jsxs)(h.bm,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,a.jsx)(p.A,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});v.displayName=h.UC.displayName;let j=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:c("flex flex-col space-y-1.5 text-center sm:text-left",t),...s})};j.displayName="DialogHeader";let w=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:c("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...s})};w.displayName="DialogFooter";let N=l.forwardRef((e,t)=>{let{className:s,...l}=e;return(0,a.jsx)(h.hE,{ref:t,className:c("text-lg font-semibold leading-none tracking-tight",s),...l})});N.displayName=h.hE.displayName;let y=l.forwardRef((e,t)=>{let{className:s,...l}=e;return(0,a.jsx)(h.VY,{ref:t,className:c("text-sm text-muted-foreground",s),...l})});y.displayName=h.VY.displayName;var k=s(9708);let C=(0,s(2085).F)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),S=l.forwardRef((e,t)=>{let{className:s,variant:l,size:r,asChild:i=!1,...n}=e,o=i?k.DX:"button";return(0,a.jsx)(o,{className:c(C({variant:l,size:r,className:s})),ref:t,...n})});S.displayName="Button";var A=s(9099);function z(){return(0,a.jsxs)("div",{className:"text-center mb-8 sm:mb-12 animate-fade-in-up",children:[(0,a.jsx)("h1",{className:"text-3xl sm:text-4xl md:text-5xl font-bold bg-gradient-to-r from-blue-600 via-purple-600 to-indigo-600 bg-clip-text text-transparent mb-4",children:"文件快传"}),(0,a.jsxs)("p",{className:"text-base sm:text-lg text-slate-600 max-w-2xl mx-auto leading-relaxed px-4 mb-4",children:["安全、快速、简单的传输服务",(0,a.jsx)("br",{}),(0,a.jsx)("span",{className:"text-sm sm:text-base text-slate-500",children:"支持文件、文字、桌面共享 - 无需注册,即传即用"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center space-y-2",children:[(0,a.jsxs)("a",{href:"https://github.com/MatrixSeven/file-transfer-go",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center space-x-2 px-4 py-2 bg-slate-100 hover:bg-slate-200 text-slate-700 text-sm rounded-lg transition-all duration-200 hover:scale-105 transform border border-slate-200 hover:border-slate-300",children:[(0,a.jsx)(A.A,{className:"w-4 h-4"}),(0,a.jsx)("span",{children:"开源项目"})]}),(0,a.jsx)("a",{href:"https://github.com/MatrixSeven/file-transfer-go",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-slate-400 font-mono hover:text-slate-600 transition-colors duration-200 hover:underline",children:"https://github.com/MatrixSeven/file-transfer-go"})]})]})}var E=s(9869),R=s(1788),_=s(7213),F=s(9803),L=s(227),T=s(9022),D=s(7434);function U(e){let{selectedFiles:t,onFilesChange:s,onGenerateCode:r,pickupCode:i,pickupLink:n,onCopyCode:o,onCopyLink:c,onAddMoreFiles:d,onRemoveFile:m,onClearFiles:x,onReset:u,disabled:h=!1}=e,[f,g]=(0,l.useState)(!1),b=(0,l.useRef)(null),v=(0,l.useCallback)(e=>{e.preventDefault(),g(!0)},[]),j=(0,l.useCallback)(e=>{e.preventDefault(),e.currentTarget.contains(e.relatedTarget)||g(!1)},[]),w=(0,l.useCallback)(e=>{e.preventDefault(),g(!1);let a=Array.from(e.dataTransfer.files);a.length>0&&s([...t,...a])},[t,s]),N=(0,l.useCallback)(e=>{let a=Array.from(e.target.files||[]);a.length>0&&s([...t,...a])},[t,s]),y=(0,l.useCallback)(e=>{let a=t.filter((t,s)=>s!==e);s(a),m&&m(a)},[t,s,m]),k=(0,l.useCallback)(()=>{b.current&&b.current.click()},[]);return 0!==t.length||i?(0,a.jsxs)("div",{className:"space-y-4 sm:space-y-6",children:[(0,a.jsxs)("div",{className:"glass-card rounded-2xl p-4 sm:p-6 animate-fade-in-up",children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between mb-4 sm:mb-6 gap-4",children:(0,a.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,a.jsx)("div",{className:"w-10 h-10 bg-gradient-to-br from-emerald-500 to-teal-500 rounded-xl flex items-center justify-center",children:(0,a.jsx)(D.A,{className:"w-5 h-5 text-white"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg sm:text-xl font-semibold text-slate-800",children:"已选择文件"}),(0,a.jsxs)("p",{className:"text-slate-500 text-sm",children:[t.length," 个文件准备传输"]})]})]})}),(0,a.jsx)("div",{className:"space-y-3 mb-4 sm:mb-6",children:t.map((e,t)=>{var s;return(0,a.jsxs)("div",{className:"group flex items-center justify-between p-3 sm:p-4 bg-gradient-to-r from-slate-50 to-blue-50 border border-slate-200 rounded-xl hover:shadow-md transition-all duration-200",children:[(0,a.jsxs)("div",{className:"flex items-center space-x-3 sm:space-x-4 min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"w-10 h-10 sm:w-12 sm:h-12 bg-gradient-to-br from-blue-500 to-indigo-500 rounded-lg flex items-center justify-center flex-shrink-0",children:(s=e.type).startsWith("image/")?(0,a.jsx)(_.A,{className:"w-5 h-5 text-white"}):s.startsWith("video/")?(0,a.jsx)(F.A,{className:"w-5 h-5 text-white"}):s.startsWith("audio/")?(0,a.jsx)(L.A,{className:"w-5 h-5 text-white"}):s.includes("zip")||s.includes("rar")?(0,a.jsx)(T.A,{className:"w-5 h-5 text-white"}):(0,a.jsx)(D.A,{className:"w-5 h-5 text-white"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"font-medium text-slate-800 truncate text-sm sm:text-base",children:e.name}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-slate-500",children:(e=>{if(0===e)return"0 Bytes";let t=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,t)).toFixed(2))+" "+["Bytes","KB","MB","GB"][t]})(e.size)})]})]}),(0,a.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>y(t),disabled:h,className:"opacity-0 group-hover:opacity-100 text-slate-400 hover:text-red-500 hover:bg-red-50 transition-all duration-200 flex-shrink-0 ml-2",children:(0,a.jsx)(p.A,{className:"w-4 h-4"})})]},"".concat(e.name,"-").concat(e.size,"-").concat(t))})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3",children:[!i&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(S,{onClick:r,disabled:h||0===t.length,className:"button-primary text-white px-6 sm:px-8 py-3 rounded-xl font-medium flex-1 min-w-0 shadow-lg",children:[(0,a.jsx)(E.A,{className:"w-5 h-5 mr-2"}),"生成取件码"]}),(0,a.jsx)(S,{onClick:d,variant:"outline",disabled:h,className:"px-6 sm:px-8 py-3 rounded-xl font-medium",children:"添加文件"}),(0,a.jsx)(S,{onClick:u,variant:"outline",disabled:h,className:"text-red-600 hover:bg-red-50 px-6 sm:px-8 py-3 rounded-xl font-medium",children:"重新选择"})]}),i&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(S,{variant:"outline",onClick:d,disabled:h,className:"px-6 py-3 rounded-xl border-slate-300 text-slate-600 hover:bg-slate-50 flex-1",children:"添加更多文件"}),t.length>0&&x&&(0,a.jsx)(S,{variant:"outline",onClick:x,disabled:h,className:"px-6 py-3 rounded-xl border-orange-300 text-orange-600 hover:bg-orange-50",children:"清空文件"})]}),(0,a.jsx)(S,{variant:"outline",onClick:u,disabled:h,className:"px-6 py-3 rounded-xl border-red-300 text-red-600 hover:bg-red-50",children:"关闭房间"})]})]}),i&&(0,a.jsxs)("div",{className:"glass-card rounded-2xl p-4 sm:p-6 md:p-8 animate-fade-in-up",children:[(0,a.jsxs)("div",{className:"text-center mb-4 sm:mb-6",children:[(0,a.jsx)("div",{className:"w-12 h-12 sm:w-16 sm:h-16 mx-auto mb-4 bg-gradient-to-br from-emerald-500 to-teal-500 rounded-2xl flex items-center justify-center animate-float",children:(0,a.jsx)(D.A,{className:"w-6 h-6 sm:w-8 sm:h-8 text-white"})}),(0,a.jsx)("h3",{className:"text-xl sm:text-2xl font-bold bg-gradient-to-r from-emerald-600 to-teal-600 bg-clip-text text-transparent mb-2",children:"取件码生成成功!"}),(0,a.jsx)("p",{className:"text-sm sm:text-base text-slate-600",children:"分享以下信息给接收方"})]}),(0,a.jsxs)("div",{className:"space-y-4 sm:space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-3",children:"取件码"}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3",children:[(0,a.jsx)("div",{className:"flex-1 code-display rounded-xl p-4 sm:p-6 text-center",children:(0,a.jsx)("div",{className:"text-2xl sm:text-3xl font-bold font-mono bg-gradient-to-r from-emerald-600 to-teal-600 bg-clip-text text-transparent tracking-wider",children:i})}),(0,a.jsx)(S,{onClick:o,className:"px-4 sm:px-6 py-3 bg-emerald-500 hover:bg-emerald-600 text-white rounded-xl font-medium shadow-lg transition-all duration-200 hover:shadow-xl w-full sm:w-auto",children:"复制"})]})]}),n&&(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-3",children:"取件链接"}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3",children:[(0,a.jsx)("div",{className:"flex-1 code-display rounded-xl p-3 sm:p-4",children:(0,a.jsx)("div",{className:"text-xs sm:text-sm text-slate-700 break-all font-mono",children:n})}),(0,a.jsx)(S,{onClick:c,className:"px-4 sm:px-6 py-3 bg-blue-500 hover:bg-blue-600 text-white rounded-xl font-medium shadow-lg transition-all duration-200 hover:shadow-xl w-full sm:w-auto",children:"复制"})]})]})]}),(0,a.jsx)("div",{className:"mt-4 sm:mt-6 p-3 sm:p-4 bg-gradient-to-r from-blue-50 to-indigo-50 rounded-xl border border-blue-200",children:(0,a.jsxs)("p",{className:"text-xs sm:text-sm text-slate-600 text-center",children:["\uD83D\uDCA1 ",(0,a.jsx)("span",{className:"font-medium",children:"使用提示:"}),"接收方输入取件码或访问取件链接即可下载文件"]})})]})]}):(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 bg-gradient-to-br from-blue-500 to-indigo-500 rounded-2xl flex items-center justify-center animate-float",children:(0,a.jsx)(E.A,{className:"w-8 h-8 text-white"})}),(0,a.jsx)("h2",{className:"text-2xl font-semibold text-slate-800 mb-2",children:"选择文件"}),(0,a.jsx)("p",{className:"text-slate-600",children:"拖拽文件到下方区域或点击选择文件"})]}),(0,a.jsxs)("div",{className:"upload-area rounded-xl p-6 sm:p-8 md:p-12 text-center cursor-pointer ".concat(f?"drag-active":""),onDragOver:v,onDragLeave:j,onDrop:w,onClick:k,children:[(0,a.jsxs)("div",{className:"transition-all duration-300 ".concat(f?"scale-110":""),children:[(0,a.jsx)("div",{className:"w-16 h-16 sm:w-20 sm:h-20 mx-auto mb-4 sm:mb-6 bg-gradient-to-br from-blue-100 to-indigo-100 rounded-full flex items-center justify-center",children:(0,a.jsx)(E.A,{className:"w-8 h-8 sm:w-10 sm:h-10 transition-colors duration-300 ".concat(f?"text-blue-600":"text-slate-400")})}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("p",{className:"text-lg sm:text-xl font-medium text-slate-700",children:f?"释放文件":"拖拽文件到这里"}),(0,a.jsxs)("p",{className:"text-sm sm:text-base text-slate-500",children:["或者 ",(0,a.jsx)("span",{className:"text-blue-600 font-medium underline",children:"点击选择文件"})]}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-slate-400 mt-4",children:"支持多个文件同时上传,无大小限制"})]})]}),(0,a.jsx)("input",{ref:b,type:"file",multiple:!0,className:"hidden",onChange:N,disabled:h})]})]})}let P=l.forwardRef((e,t)=>{let{className:s,type:l,...r}=e;return(0,a.jsx)("input",{type:l,className:c("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",s),ref:t,...r})});P.displayName="Input";let M=e=>{if(0===e)return"0 Bytes";let t=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,t)).toFixed(2))+" "+["Bytes","KB","MB","GB"][t]};function W(e){let{onJoinRoom:t,files:s,onDownloadFile:r,transferProgresses:i,isConnected:n,isConnecting:o}=e,[c,d]=(0,l.useState)(""),m=(0,l.useCallback)(e=>{e.preventDefault(),6===c.length&&t(c.toUpperCase())},[c,t]),x=(0,l.useCallback)(e=>{let t=e.target.value.replace(/[^A-Z0-9]/g,"").toUpperCase();t.length<=6&&d(t)},[]);return(n||o)&&0===s.length?(0,a.jsx)("div",{className:"glass-card rounded-2xl p-4 sm:p-6 md:p-8 animate-fade-in-up",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("div",{className:"w-12 h-12 sm:w-16 sm:h-16 mx-auto mb-4 bg-gradient-to-br from-blue-500 to-indigo-500 rounded-2xl flex items-center justify-center animate-float",children:(0,a.jsx)(R.A,{className:"w-6 h-6 sm:w-8 sm:h-8 text-white"})}),(0,a.jsx)("h2",{className:"text-xl sm:text-2xl font-semibold text-slate-800 mb-2",children:"等待文件"}),(0,a.jsx)("p",{className:"text-sm sm:text-base text-slate-600 mb-6",children:n?"已连接到房间,等待发送方选择文件...":"正在连接到房间..."}),(0,a.jsx)("div",{className:"flex items-center justify-center space-x-4 mb-6",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("div",{className:"w-3 h-3 rounded-full mr-2 ".concat(n?"bg-emerald-500 animate-pulse":"bg-orange-500 animate-spin")}),(0,a.jsx)("span",{className:"text-sm font-medium ".concat(n?"text-emerald-600":"text-orange-600"),children:n?"连接已建立":"连接中..."})]})}),(0,a.jsx)("div",{className:"flex justify-center space-x-1 mb-6",children:[void 0,void 0,void 0].map((e,t)=>(0,a.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full animate-bounce",style:{animationDelay:"".concat(.1*t,"s")}},t))}),(0,a.jsx)("div",{className:"p-4 bg-gradient-to-r from-blue-50 to-indigo-50 rounded-xl border border-blue-200",children:(0,a.jsxs)("p",{className:"text-xs sm:text-sm text-slate-600 text-center",children:["\uD83D\uDCA1 ",(0,a.jsx)("span",{className:"font-medium",children:"提示:"}),"房间已连接,发送方清空文件列表后您会看到此界面,等待对方重新选择文件"]})})]})}):s.length>0?(0,a.jsx)("div",{className:"space-y-4 sm:space-y-6",children:(0,a.jsxs)("div",{className:"glass-card rounded-2xl p-4 sm:p-6 animate-fade-in-up",children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between mb-4 sm:mb-6 gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,a.jsx)("div",{className:"w-10 h-10 bg-gradient-to-br from-emerald-500 to-teal-500 rounded-xl flex items-center justify-center",children:(0,a.jsx)(R.A,{className:"w-5 h-5 text-white"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg sm:text-xl font-semibold text-slate-800",children:"可下载文件"}),(0,a.jsx)("p",{className:"text-slate-500 text-sm",children:n?(0,a.jsx)("span",{className:"text-emerald-600",children:"✅ 已连接,可以下载文件"}):(0,a.jsx)("span",{className:"text-amber-600",children:"⏳ 正在建立连接..."})})]})]}),(0,a.jsx)("div",{className:"bg-gradient-to-r from-emerald-100 to-teal-100 px-3 sm:px-4 py-2 rounded-full self-start sm:self-center",children:(0,a.jsxs)("span",{className:"text-emerald-700 font-medium text-sm",children:[s.length," 个文件"]})})]}),(0,a.jsx)("div",{className:"space-y-3 sm:space-y-4",children:s.map(e=>{var t;let s=i.find(t=>t.originalFileId===e.id),l=s&&"downloading"===s.status,o=s&&"completed"===s.status;return(0,a.jsxs)("div",{className:"bg-gradient-to-r from-slate-50 to-blue-50 border border-slate-200 rounded-xl p-3 sm:p-4 hover:shadow-md transition-all duration-200",children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between mb-3 gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center space-x-3 sm:space-x-4 flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"w-10 h-10 sm:w-12 sm:h-12 bg-gradient-to-br from-blue-500 to-indigo-500 rounded-lg flex items-center justify-center flex-shrink-0",children:(t=e.type).startsWith("image/")?(0,a.jsx)(_.A,{className:"w-5 h-5 text-white"}):t.startsWith("video/")?(0,a.jsx)(F.A,{className:"w-5 h-5 text-white"}):t.startsWith("audio/")?(0,a.jsx)(L.A,{className:"w-5 h-5 text-white"}):t.includes("zip")||t.includes("rar")?(0,a.jsx)(T.A,{className:"w-5 h-5 text-white"}):(0,a.jsx)(D.A,{className:"w-5 h-5 text-white"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-slate-800 truncate text-sm sm:text-base",children:e.name}),(0,a.jsx)("p",{className:"text-sm text-slate-500",children:M(e.size)}),o&&(0,a.jsx)("p",{className:"text-xs text-emerald-600 font-medium",children:"✅ 下载完成"})]})]}),(0,a.jsxs)(S,{onClick:()=>r(e.id),disabled:!n||l||o,className:"px-6 py-2 rounded-lg font-medium shadow-lg transition-all duration-200 hover:shadow-xl ".concat(o?"bg-slate-300 text-slate-500 cursor-not-allowed":"bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white"),children:[(0,a.jsx)(R.A,{className:"w-4 h-4 mr-2"}),l?"下载中...":o?"已完成":"下载"]})]}),s&&("downloading"===s.status||"completed"===s.status)&&(0,a.jsxs)("div",{className:"mt-3 space-y-2",children:[(0,a.jsxs)("div",{className:"flex justify-between text-sm text-slate-600",children:[(0,a.jsx)("span",{children:"completed"===s.status?"下载完成":"正在下载..."}),(0,a.jsxs)("span",{className:"font-medium",children:[s.progress.toFixed(1),"%"]})]}),(0,a.jsx)("div",{className:"w-full bg-slate-200 rounded-full h-2",children:(0,a.jsx)("div",{className:"h-2 rounded-full transition-all duration-300 ".concat("completed"===s.status?"bg-gradient-to-r from-emerald-500 to-emerald-600":"bg-gradient-to-r from-emerald-500 to-teal-500"),style:{width:"".concat(s.progress,"%")}})}),(0,a.jsxs)("div",{className:"flex justify-between text-xs text-slate-500",children:[(0,a.jsxs)("span",{children:[M(s.receivedSize)," / ",M(s.totalSize)]}),"downloading"===s.status&&(0,a.jsxs)("span",{children:["预计还需 ",Math.ceil((s.totalSize-s.receivedSize)/1024/1024)," MB"]})]})]})]},e.id)})})]})}):(0,a.jsxs)("div",{className:"glass-card rounded-2xl p-4 sm:p-6 md:p-8 animate-fade-in-up",children:[(0,a.jsxs)("div",{className:"text-center mb-6 sm:mb-8",children:[(0,a.jsx)("div",{className:"w-12 h-12 sm:w-16 sm:h-16 mx-auto mb-4 bg-gradient-to-br from-emerald-500 to-teal-500 rounded-2xl flex items-center justify-center animate-float",children:(0,a.jsx)(R.A,{className:"w-6 h-6 sm:w-8 sm:h-8 text-white"})}),(0,a.jsx)("h2",{className:"text-xl sm:text-2xl font-semibold text-slate-800 mb-2",children:"输入取件码"}),(0,a.jsx)("p",{className:"text-sm sm:text-base text-slate-600",children:"请输入6位取件码来获取文件"})]}),(0,a.jsxs)("form",{onSubmit:m,className:"space-y-4 sm:space-y-6",children:[(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(P,{value:c,onChange:x,placeholder:"请输入取件码",className:"text-center text-2xl sm:text-3xl tracking-[0.3em] sm:tracking-[0.5em] font-mono h-12 sm:h-16 border-2 border-slate-200 rounded-xl focus:border-emerald-500 focus:ring-emerald-500 bg-white/80 backdrop-blur-sm pb-2 sm:pb-4",maxLength:6,disabled:o}),(0,a.jsx)("div",{className:"absolute inset-x-0 -bottom-4 sm:-bottom-6 flex justify-center space-x-1 sm:space-x-2",children:[...Array(6)].map((e,t)=>(0,a.jsx)("div",{className:"w-1.5 h-1.5 sm:w-2 sm:h-2 rounded-full transition-all duration-200 ".concat(t{let e=N.get("mode");"file"===N.get("type")&&e&&["send","receive"].includes(e)&&C(e)},[N]);let A=(0,l.useCallback)(e=>{C(e);let t=new URLSearchParams(N.toString());t.set("type","file"),t.set("mode",e),y.push("?".concat(t.toString()),{scroll:!1})},[N,y]);return(0,a.jsxs)("div",{className:"space-y-4 sm:space-y-6",children:[(0,a.jsx)("div",{className:"flex justify-center mb-6",children:(0,a.jsxs)("div",{className:"bg-white/80 backdrop-blur-sm rounded-xl p-1 shadow-lg",children:[(0,a.jsxs)(S,{variant:"send"===k?"default":"ghost",onClick:()=>A("send"),className:"px-6 py-2 rounded-lg",children:[(0,a.jsx)(E.A,{className:"w-4 h-4 mr-2"}),"发送文件"]}),(0,a.jsxs)(S,{variant:"receive"===k?"default":"ghost",onClick:()=>A("receive"),className:"px-6 py-2 rounded-lg",children:[(0,a.jsx)(R.A,{className:"w-4 h-4 mr-2"}),"接收文件"]})]})}),"send"===k?(0,a.jsx)("div",{className:"animate-fade-in-up",children:(0,a.jsx)(U,{selectedFiles:t,onFilesChange:s,onGenerateCode:i,pickupCode:n,pickupLink:o,onCopyCode:c,onCopyLink:d,onAddMoreFiles:m,onRemoveFile:x,onClearFiles:u,onReset:h,disabled:w})}):(0,a.jsx)("div",{className:"animate-fade-in-up",children:(0,a.jsx)(W,{onJoinRoom:p,files:f,onDownloadFile:g,transferProgresses:b,isConnected:v,isConnecting:j})})]})}var O=s(2486),I=s(1497),J=s(7580),G=s(4357),V=s(8164),q=s(2657),X=s(6801);function H(e){let{onSendText:t,onReceiveText:s,websocket:i,isConnected:n=!1,currentRole:o,pickupCode:c,onCreateWebSocket:d}=e,m=(0,r.useSearchParams)(),x=(0,r.useRouter)(),[u,h]=(0,l.useState)("send"),[p,f]=(0,l.useState)(""),[g,b]=(0,l.useState)(""),[v,j]=(0,l.useState)(""),[w,N]=(0,l.useState)(!1),[y,k]=(0,l.useState)(!1),[C,A]=(0,l.useState)(0),[z,E]=(0,l.useState)([]),[F,L]=(0,l.useState)([]),[T,D]=(0,l.useState)(null),[U,M]=(0,l.useState)(null),[W,B]=(0,l.useState)(!1),{showToast:H}=(0,X.d)(),K=(0,l.useRef)(null),$=(0,l.useRef)(null),Y=(0,l.useRef)(null);(0,l.useEffect)(()=>{let e=m.get("mode");if("text"===m.get("type")&&e&&["send","receive"].includes(e)){h(e);let t=m.get("code");"receive"===e&&t&&6===t.length&&b(t.toUpperCase())}},[m]),(0,l.useEffect)(()=>{let e=e=>{var t,s,a,l,r,i;let n=e.detail;switch(console.log("TextTransfer收到WebSocket消息:",n),n.type){case"text-content":(null==(t=n.payload)?void 0:t.text)!==void 0&&(j(n.payload.text),"receiver"===o&&(f(n.payload.text),!W&&w&&(B(!0),H("成功加入文字房间!","success"))),Y.current&&(clearTimeout(Y.current),Y.current=null),w&&N(!1));break;case"text-update":(null==(s=n.payload)?void 0:s.text)!==void 0&&(j(n.payload.text),"receiver"===o&&f(n.payload.text));break;case"text-send":(null==(a=n.payload)?void 0:a.text)&&(j(n.payload.text),H("收到新的文字内容!","success"));break;case"image-send":(null==(l=n.payload)?void 0:l.imageData)&&(console.log("接收到图片数据:",n.payload.imageData.substring(0,100)+"..."),n.payload.imageData.startsWith("data:image/")?(L(e=>[...e,n.payload.imageData]),H("收到新的图片!","success")):(console.error("无效的图片数据格式:",n.payload.imageData.substring(0,50)),H("收到的图片格式不正确","error")));break;case"room-status":(null==(r=n.payload)?void 0:r.sender_count)!==void 0&&(null==(i=n.payload)?void 0:i.receiver_count)!==void 0&&A(n.payload.sender_count+n.payload.receiver_count)}},t=e=>{let{code:t,reason:s}=e.detail;console.log("WebSocket连接关闭:",t,s),w&&(N(!1),1e3!==t&&H("取件码不存在或已过期","error"))},s=e=>{console.error("WebSocket连接错误:",e.detail),w&&(N(!1),H("取件码不存在或已过期","error"))};return window.addEventListener("websocket-message",e),window.addEventListener("websocket-close",t),window.addEventListener("websocket-error",s),()=>{window.removeEventListener("websocket-message",e),window.removeEventListener("websocket-close",t),window.removeEventListener("websocket-error",s),Y.current&&clearTimeout(Y.current)}},[o,H,W,w]);let Z=(0,l.useCallback)(e=>{h(e);let t=new URLSearchParams(m.toString());t.set("type","text"),t.set("mode",e),x.push("?".concat(t.toString()),{scroll:!1})},[m,x]),Q=(0,l.useCallback)(e=>{i&&n&&($.current&&clearTimeout($.current),$.current=setTimeout(()=>{i.send(JSON.stringify({type:"text-update",payload:{text:e}}))},300))},[i,n]),ee=(0,l.useCallback)(e=>{let t=e.target.value;f(t),n&&i&&Q(t)},[n,i,Q]),et=(0,l.useCallback)(async()=>{if(!p.trim())return void H("请输入要传输的文字内容","error");N(!0);try{if(t){let e=await t(p);e&&(b(e),k(!0),H("房间创建成功!","success"),d&&d(e,"sender"))}}catch(e){console.error("创建房间失败:",e)}finally{N(!1)}},[p,t,d,H]),es=(0,l.useCallback)(async()=>{if(!g.trim()||6!==g.length)return void H("请输入正确的6位房间码","error");if(!w){N(!0),B(!1);try{let e=await fetch("/api/room-info?code=".concat(g)),t=await e.json();if(!e.ok||!t.success){H(t.message||"房间不存在或已过期","error"),N(!1);return}d&&(console.log("房间验证成功,手动加入房间:",g),d(g,"receiver"),Y.current=setTimeout(()=>{w&&(N(!1),H("取件码不存在或已过期","error"))},8e3))}catch(e){console.error("加入房间失败:",e),H("网络错误,请稍后重试","error"),N(!1)}}},[g,d,H,w]),ea=(0,l.useCallback)(()=>{i&&n&&p.trim()&&(i.send(JSON.stringify({type:"text-send",payload:{text:p}})),H("文字已发送!","success"))},[i,n,p,H]),el=(0,l.useCallback)(e=>new Promise((t,s)=>{let a=document.createElement("canvas"),l=a.getContext("2d"),r=document.createElement("img");if(!l)return void s(Error("无法创建Canvas上下文"));r.onload=()=>{try{let{width:e,height:s}=r;e>s?e>800&&(s=800*s/e,e=800):s>600&&(e=600*e/s,s=600),a.width=e,a.height=s,l.fillStyle="#FFFFFF",l.fillRect(0,0,e,s),l.drawImage(r,0,0,e,s);let i=a.toDataURL("image/jpeg",.8);console.log("图片压缩完成,数据长度:",i.length,"前100字符:",i.substring(0,100)),t(i)}catch(e){s(Error("图片压缩失败: "+e))}},r.onerror=()=>s(Error("图片加载失败"));let i=new FileReader;i.onload=e=>{var t;(null==(t=e.target)?void 0:t.result)?r.src=e.target.result:s(Error("文件读取失败"))},i.onerror=()=>s(Error("文件读取失败")),i.readAsDataURL(e)}),[]),er=(0,l.useCallback)(async e=>{var t;let s=null==(t=e.clipboardData)?void 0:t.items;if(s)for(let e=0;e[...e,t]),i&&n&&(i.send(JSON.stringify({type:"image-send",payload:{imageData:t}})),H("图片已发送!","success"))}catch(e){console.error("图片处理失败:",e),H("图片处理失败,请重试","error")}}}},[i,n,H,el]),ei=(0,l.useCallback)(async e=>{try{await navigator.clipboard.writeText(e),H("已复制到剪贴板!","success")}catch(e){H("复制失败","error")}},[H]),en=(0,l.useCallback)(async e=>{let t=window.location.origin+window.location.pathname,s="".concat(t,"?type=text&mode=receive&code=").concat(e);await ei(s)},[ei]),eo=(0,l.useCallback)((e,t)=>{let s=document.createElement("a");s.download="image_".concat(t+1,".jpg"),s.href=e,document.body.appendChild(s),s.click(),document.body.removeChild(s),H("图片已下载!","success")},[H]);return(0,a.jsxs)("div",{className:"space-y-4 sm:space-y-6",children:[(0,a.jsx)("div",{className:"flex justify-center mb-6",children:(0,a.jsxs)("div",{className:"bg-white/80 backdrop-blur-sm rounded-xl p-1 shadow-lg",children:[(0,a.jsxs)(S,{variant:"send"===u?"default":"ghost",onClick:()=>Z("send"),className:"px-6 py-2 rounded-lg",children:[(0,a.jsx)(O.A,{className:"w-4 h-4 mr-2"}),"发送文字"]}),(0,a.jsxs)(S,{variant:"receive"===u?"default":"ghost",onClick:()=>Z("receive"),className:"px-6 py-2 rounded-lg",children:[(0,a.jsx)(R.A,{className:"w-4 h-4 mr-2"}),"加入房间"]})]})}),"send"===u?(0,a.jsxs)("div",{className:"glass-card rounded-2xl p-4 sm:p-6 animate-fade-in-up",children:[(0,a.jsxs)("div",{className:"text-center mb-6",children:[(0,a.jsx)("div",{className:"w-12 h-12 sm:w-16 sm:h-16 mx-auto mb-4 bg-gradient-to-br from-blue-500 to-indigo-500 rounded-2xl flex items-center justify-center animate-float",children:(0,a.jsx)(I.A,{className:"w-6 h-6 sm:w-8 sm:h-8 text-white"})}),(0,a.jsx)("h2",{className:"text-xl sm:text-2xl font-semibold text-slate-800 mb-2",children:"传送文字"}),(0,a.jsx)("p",{className:"text-sm sm:text-base text-slate-600",children:y?"实时编辑,对方可以同步看到":"输入要传输的文本内容"}),(0,a.jsx)("div",{className:"mt-2 space-y-1",children:y&&(0,a.jsxs)("div",{className:"flex items-center justify-center space-x-4 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full mr-2 ".concat(n?"bg-emerald-500 animate-pulse":"bg-red-500")}),(0,a.jsx)("span",{className:n?"text-emerald-600":"text-red-600",children:n?"实时连接已建立":"连接断开"})]}),C>0&&(0,a.jsxs)("div",{className:"flex items-center text-blue-600",children:[(0,a.jsx)(J.A,{className:"w-4 h-4 mr-1"}),C," 人在线"]})]})})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("textarea",{ref:K,value:p,onChange:ee,onPaste:er,placeholder:"在这里输入要传输的文本内容... \uD83D\uDCA1 提示:支持实时同步编辑,可以直接粘贴图片 (Ctrl+V)",className:"w-full min-h-[150px] p-4 border-2 border-slate-200 rounded-xl focus:border-blue-500 focus:ring-blue-500 bg-white/80 backdrop-blur-sm resize-none",disabled:w}),y&&n&&(0,a.jsx)("div",{className:"absolute top-2 right-2",children:(0,a.jsxs)("div",{className:"flex items-center space-x-1 bg-emerald-100 text-emerald-700 px-2 py-1 rounded-lg text-xs",children:[(0,a.jsx)("div",{className:"w-2 h-2 bg-emerald-500 rounded-full animate-pulse"}),(0,a.jsx)("span",{children:"实时同步"})]})}),y&&!n&&(0,a.jsx)("div",{className:"absolute top-2 right-2",children:(0,a.jsxs)("div",{className:"flex items-center space-x-1 bg-orange-100 text-orange-700 px-2 py-1 rounded-lg text-xs",children:[(0,a.jsx)("div",{className:"w-2 h-2 bg-orange-500 rounded-full"}),(0,a.jsx)("span",{children:"连接中..."})]})})]}),(0,a.jsxs)("div",{className:"flex justify-between text-sm text-slate-500",children:[(0,a.jsxs)("span",{children:[p.length," 字符"]}),(0,a.jsx)("span",{children:"最大 50,000 字符"})]}),y?(0,a.jsx)("div",{className:"space-y-4",children:(0,a.jsx)("div",{className:"p-4 bg-gradient-to-r from-emerald-50 to-teal-50 rounded-xl border border-emerald-200",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("p",{className:"text-sm text-emerald-700 mb-2",children:"房间码"}),(0,a.jsx)("div",{className:"text-2xl font-bold font-mono text-emerald-600 mb-3",children:g}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 justify-center",children:[(0,a.jsxs)(S,{onClick:()=>ei(g),size:"sm",className:"bg-emerald-500 hover:bg-emerald-600 text-white",children:[(0,a.jsx)(G.A,{className:"w-4 h-4 mr-2"}),"复制房间码"]}),(0,a.jsxs)(S,{onClick:()=>en(g),size:"sm",className:"bg-purple-500 hover:bg-purple-600 text-white",children:[(0,a.jsx)(V.A,{className:"w-4 h-4 mr-2"}),"复制链接"]}),(0,a.jsxs)(S,{onClick:ea,size:"sm",className:"bg-blue-500 hover:bg-blue-600 text-white",disabled:!p.trim(),children:[(0,a.jsx)(O.A,{className:"w-4 h-4 mr-2"}),"发送文字"]})]})]})})}):(0,a.jsx)(S,{onClick:et,disabled:!p.trim()||p.length>5e4||w,className:"w-full h-12 bg-gradient-to-r from-blue-500 to-indigo-500 hover:from-blue-600 hover:to-indigo-600 text-white text-lg font-medium rounded-xl shadow-lg",children:w?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"animate-spin rounded-full h-5 w-5 border-b-2 border-white mr-2"}),"创建房间..."]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(O.A,{className:"w-5 h-5 mr-2"}),"创建文字传输房间"]})}),"send"===u&&z.length>0&&(0,a.jsxs)("div",{className:"mt-6",children:[(0,a.jsxs)("h3",{className:"text-lg font-medium text-slate-800 mb-3 flex items-center",children:[(0,a.jsx)(_.A,{className:"w-5 h-5 mr-2"}),"已发送的图片 (",z.length,")"]}),(0,a.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3",children:z.map((e,t)=>(0,a.jsxs)("div",{className:"relative group overflow-hidden",children:[(0,a.jsx)("img",{src:e,alt:"图片 ".concat(t+1),className:"w-full h-24 object-cover rounded-lg border-2 border-slate-200 hover:border-blue-400 transition-all duration-200 cursor-pointer bg-gradient-to-br from-slate-50 via-blue-50 to-indigo-50",onClick:()=>M(e),onError:t=>{console.error("图片加载失败:",e),t.currentTarget.style.display="none"}}),(0,a.jsx)("div",{className:"absolute inset-0 bg-black bg-opacity-0 group-hover:bg-opacity-20 transition-opacity rounded-lg"}),(0,a.jsxs)("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity flex gap-1",children:[(0,a.jsx)("button",{onClick:t=>{t.stopPropagation(),M(e)},className:"p-1.5 bg-white bg-opacity-90 hover:bg-opacity-100 rounded-md shadow-sm transition-all hover:scale-105",title:"预览图片",children:(0,a.jsx)(q.A,{className:"w-3.5 h-3.5 text-slate-600"})}),(0,a.jsx)("button",{onClick:s=>{s.stopPropagation(),eo(e,t)},className:"p-1.5 bg-white bg-opacity-90 hover:bg-opacity-100 rounded-md shadow-sm transition-all hover:scale-105",title:"下载图片",children:(0,a.jsx)(R.A,{className:"w-3.5 h-3.5 text-slate-600"})})]}),(0,a.jsx)("div",{className:"absolute bottom-1 left-1 bg-black bg-opacity-50 text-white text-xs px-1.5 py-0.5 rounded",children:t+1})]},t))})]})]})]}):(0,a.jsxs)("div",{className:"glass-card rounded-2xl p-4 sm:p-6 animate-fade-in-up",children:[(0,a.jsxs)("div",{className:"text-center mb-6",children:[(0,a.jsx)("div",{className:"w-12 h-12 sm:w-16 sm:h-16 mx-auto mb-4 bg-gradient-to-br from-emerald-500 to-teal-500 rounded-2xl flex items-center justify-center animate-float",children:(0,a.jsx)(R.A,{className:"w-6 h-6 sm:w-8 sm:h-8 text-white"})}),(0,a.jsx)("h2",{className:"text-xl sm:text-2xl font-semibold text-slate-800 mb-2",children:"加入房间"}),(0,a.jsx)("p",{className:"text-sm sm:text-base text-slate-600",children:"输入6位房间码来获取文字内容"}),(v||p)&&(0,a.jsx)("div",{className:"mt-2 space-y-1",children:(0,a.jsxs)("div",{className:"flex items-center justify-center space-x-4 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full mr-2 ".concat(n?"bg-emerald-500 animate-pulse":"bg-red-500")}),(0,a.jsx)("span",{className:n?"text-emerald-600":"text-red-600",children:n?"实时连接已建立":"连接断开"})]}),C>0&&(0,a.jsxs)("div",{className:"flex items-center text-blue-600",children:[(0,a.jsx)(J.A,{className:"w-4 h-4 mr-1"}),C," 人在线"]})]})})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(P,{value:g,onChange:e=>b(e.target.value.toUpperCase().slice(0,6)),placeholder:"请输入房间码",className:"text-center text-2xl sm:text-3xl tracking-[0.3em] sm:tracking-[0.5em] font-mono h-12 sm:h-16 border-2 border-slate-200 rounded-xl focus:border-emerald-500 focus:ring-emerald-500 bg-white/80 backdrop-blur-sm",maxLength:6,disabled:w}),(0,a.jsx)(S,{onClick:es,disabled:6!==g.length||w,className:"w-full h-12 bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white text-lg font-medium rounded-xl shadow-lg",children:w?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"animate-spin rounded-full h-5 w-5 border-b-2 border-white mr-2"}),"连接中..."]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(R.A,{className:"w-5 h-5 mr-2"}),"加入房间"]})}),(v||p)&&(0,a.jsxs)("div",{className:"mt-6 space-y-4",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("textarea",{value:v||p,readOnly:"receiver"!==o,onChange:"receiver"===o?ee:void 0,className:"w-full min-h-[150px] p-4 border-2 border-emerald-200 rounded-xl bg-emerald-50/50 backdrop-blur-sm resize-none"}),"receiver"===o&&n&&(0,a.jsx)("div",{className:"absolute top-2 right-2",children:(0,a.jsxs)("div",{className:"flex items-center space-x-1 bg-emerald-100 text-emerald-700 px-2 py-1 rounded-lg text-xs",children:[(0,a.jsx)("div",{className:"w-2 h-2 bg-emerald-500 rounded-full animate-pulse"}),(0,a.jsx)("span",{children:"实时同步"})]})}),"receiver"===o&&!n&&(0,a.jsx)("div",{className:"absolute top-2 right-2",children:(0,a.jsxs)("div",{className:"flex items-center space-x-1 bg-orange-100 text-orange-700 px-2 py-1 rounded-lg text-xs",children:[(0,a.jsx)("div",{className:"w-2 h-2 bg-orange-500 rounded-full"}),(0,a.jsx)("span",{children:"连接中..."})]})})]}),(0,a.jsxs)(S,{onClick:()=>ei(v||p),className:"w-full h-12 bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white text-lg font-medium rounded-xl shadow-lg",children:[(0,a.jsx)(G.A,{className:"w-5 h-5 mr-2"}),"复制文字"]})]}),"receive"===u&&F.length>0&&(0,a.jsxs)("div",{className:"mt-6",children:[(0,a.jsxs)("h3",{className:"text-lg font-medium text-slate-800 mb-3 flex items-center",children:[(0,a.jsx)(_.A,{className:"w-5 h-5 mr-2"}),"接收到的图片 (",F.length,")"]}),(0,a.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3",children:F.map((e,t)=>(0,a.jsxs)("div",{className:"relative group overflow-hidden",children:[(0,a.jsx)("img",{src:e,alt:"图片 ".concat(t+1),className:"w-full h-24 object-cover rounded-lg border-2 border-slate-200 hover:border-emerald-400 transition-all duration-200 cursor-pointer bg-gradient-to-br from-slate-50 via-blue-50 to-indigo-50",onClick:()=>M(e),onLoad:e=>{console.log("图片 ".concat(t+1," 加载成功"))},onError:s=>{console.error("图片 ".concat(t+1," 加载失败:"),e.substring(0,100)),s.currentTarget.style.backgroundColor="#f1f5f9",s.currentTarget.style.display="flex",s.currentTarget.style.alignItems="center",s.currentTarget.style.justifyContent="center",s.currentTarget.innerHTML='图片加载失败'}}),(0,a.jsx)("div",{className:"absolute inset-0 bg-black bg-opacity-0 group-hover:bg-opacity-20 transition-opacity rounded-lg"}),(0,a.jsxs)("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity flex gap-1",children:[(0,a.jsx)("button",{onClick:t=>{t.stopPropagation(),M(e)},className:"p-1.5 bg-white bg-opacity-90 hover:bg-opacity-100 rounded-md shadow-sm transition-all hover:scale-105",title:"预览图片",children:(0,a.jsx)(q.A,{className:"w-3.5 h-3.5 text-slate-600"})}),(0,a.jsx)("button",{onClick:s=>{s.stopPropagation(),eo(e,t)},className:"p-1.5 bg-white bg-opacity-90 hover:bg-opacity-100 rounded-md shadow-sm transition-all hover:scale-105",title:"下载图片",children:(0,a.jsx)(R.A,{className:"w-3.5 h-3.5 text-slate-600"})})]}),(0,a.jsx)("div",{className:"absolute bottom-1 left-1 bg-black bg-opacity-50 text-white text-xs px-1.5 py-0.5 rounded",children:t+1})]},t))})]})]})]}),U&&(0,a.jsx)(e=>{let{src:t,onClose:s}=e;return(0,a.jsx)("div",{className:"fixed inset-0 bg-slate-900/80 backdrop-blur-sm flex items-center justify-center z-50 p-4 animate-fade-in",onClick:s,children:(0,a.jsx)("div",{className:"relative max-w-[90vw] max-h-[90vh] animate-scale-in",children:(0,a.jsxs)("div",{className:"relative bg-white rounded-2xl overflow-hidden shadow-2xl",children:[(0,a.jsx)("img",{src:t,alt:"预览",className:"max-w-full max-h-[80vh] object-contain block bg-gradient-to-br from-slate-50 via-blue-50 to-indigo-50",onClick:e=>e.stopPropagation(),onError:e=>{console.error("预览图片加载失败:",t)}}),(0,a.jsx)("div",{className:"absolute top-0 left-0 right-0 bg-gradient-to-b from-slate-900/60 to-transparent p-4",children:(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("h3",{className:"text-white font-medium text-lg",children:"图片预览"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("button",{onClick:e=>{e.stopPropagation();let s=z.indexOf(t);-1===s&&(s=F.indexOf(t)),eo(t,s>=0?s:0)},className:"bg-white/20 hover:bg-white/30 backdrop-blur-sm text-white p-2 rounded-lg shadow-lg transition-all hover:scale-105",title:"下载图片",children:(0,a.jsx)(R.A,{className:"w-5 h-5"})}),(0,a.jsx)("button",{onClick:s,className:"bg-white/20 hover:bg-white/30 backdrop-blur-sm text-white p-2 rounded-lg shadow-lg transition-all hover:scale-105",title:"关闭预览",children:(0,a.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]})}),(0,a.jsx)("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-slate-900/60 to-transparent p-4",children:(0,a.jsx)("div",{className:"text-white text-sm opacity-80",children:"点击空白区域关闭预览"})})]})})})},{src:U,onClose:()=>M(null)})]})}var K=s(6683),$=s(4738),Y=s(5690),Z=s(8979);function Q(e){let{onStartSharing:t,onStopSharing:s,onJoinSharing:i}=e,n=(0,r.useSearchParams)(),o=(0,r.useRouter)(),[c,d]=(0,l.useState)("share"),[m,x]=(0,l.useState)(""),[u,h]=(0,l.useState)(""),[p,f]=(0,l.useState)(!1),[g,b]=(0,l.useState)(!1),[v,j]=(0,l.useState)(!1),{showToast:w}=(0,X.d)();(0,l.useEffect)(()=>{let e=n.get("mode");"desktop"===n.get("type")&&e&&("send"===e?d("share"):"receive"===e&&d("view"))},[n]);let N=(0,l.useCallback)(e=>{d(e);let t=new URLSearchParams(n.toString());t.set("type","desktop"),t.set("mode","share"===e?"send":"receive"),o.push("?".concat(t.toString()),{scroll:!1})},[n,o]),y=(0,l.useCallback)(async()=>{if(t){j(!0);try{let e=await t();x(e),f(!0),w("桌面共享已开始!","success")}catch(e){console.error("开始共享失败:",e),w("开始共享失败,请重试","error")}finally{j(!1)}}},[t,w]),k=(0,l.useCallback)(async()=>{if(s){j(!0);try{await s(),f(!1),x(""),w("桌面共享已停止","success")}catch(e){console.error("停止共享失败:",e),w("停止共享失败","error")}finally{j(!1)}}},[s,w]),C=(0,l.useCallback)(async()=>{if(u.trim()&&i){j(!0);try{await i(u),b(!0),w("已连接到桌面共享!","success")}catch(e){console.error("连接失败:",e),w("连接失败,请检查连接码","error")}finally{j(!1)}}},[u,i,w]),A=(0,l.useCallback)(async e=>{try{await navigator.clipboard.writeText(e),w("已复制到剪贴板!","success")}catch(e){w("复制失败","error")}},[w]);return(0,a.jsxs)("div",{className:"space-y-4 sm:space-y-6",children:[(0,a.jsx)("div",{className:"flex justify-center mb-6",children:(0,a.jsxs)("div",{className:"bg-white/80 backdrop-blur-sm rounded-xl p-1 shadow-lg",children:[(0,a.jsxs)(S,{variant:"share"===c?"default":"ghost",onClick:()=>N("share"),className:"px-6 py-2 rounded-lg",children:[(0,a.jsx)(K.A,{className:"w-4 h-4 mr-2"}),"共享桌面"]}),(0,a.jsxs)(S,{variant:"view"===c?"default":"ghost",onClick:()=>N("view"),className:"px-6 py-2 rounded-lg",children:[(0,a.jsx)($.A,{className:"w-4 h-4 mr-2"}),"观看桌面"]})]})}),"share"===c?(0,a.jsxs)("div",{className:"glass-card rounded-2xl p-4 sm:p-6 animate-fade-in-up",children:[(0,a.jsxs)("div",{className:"text-center mb-6",children:[(0,a.jsx)("div",{className:"w-12 h-12 sm:w-16 sm:h-16 mx-auto mb-4 bg-gradient-to-br from-purple-500 to-pink-500 rounded-2xl flex items-center justify-center animate-float",children:(0,a.jsx)(K.A,{className:"w-6 h-6 sm:w-8 sm:h-8 text-white"})}),(0,a.jsx)("h2",{className:"text-xl sm:text-2xl font-semibold text-slate-800 mb-2",children:"共享桌面"}),(0,a.jsx)("p",{className:"text-sm sm:text-base text-slate-600",children:p?"桌面共享进行中":"开始共享您的桌面屏幕"})]}),(0,a.jsx)("div",{className:"space-y-4",children:p?(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("div",{className:"p-4 bg-gradient-to-r from-purple-50 to-pink-50 rounded-xl border border-purple-200",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("p",{className:"text-sm text-purple-700 mb-2",children:"连接码"}),(0,a.jsx)("div",{className:"text-2xl font-bold font-mono text-purple-600 mb-3",children:m}),(0,a.jsxs)(S,{onClick:()=>A(m),size:"sm",className:"bg-purple-500 hover:bg-purple-600 text-white",children:[(0,a.jsx)(G.A,{className:"w-4 h-4 mr-2"}),"复制连接码"]})]})}),(0,a.jsx)(S,{onClick:k,disabled:v,className:"w-full h-12 bg-gradient-to-r from-red-500 to-pink-500 hover:from-red-600 hover:to-pink-600 text-white text-lg font-medium rounded-xl shadow-lg",children:v?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"animate-spin rounded-full h-5 w-5 border-b-2 border-white mr-2"}),"停止中..."]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Z.A,{className:"w-5 h-5 mr-2"}),"停止共享"]})})]}):(0,a.jsx)(S,{onClick:y,disabled:v,className:"w-full h-12 bg-gradient-to-r from-purple-500 to-pink-500 hover:from-purple-600 hover:to-pink-600 text-white text-lg font-medium rounded-xl shadow-lg",children:v?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"animate-spin rounded-full h-5 w-5 border-b-2 border-white mr-2"}),"启动中..."]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Y.A,{className:"w-5 h-5 mr-2"}),"开始共享桌面"]})})})]}):(0,a.jsxs)("div",{className:"glass-card rounded-2xl p-4 sm:p-6 animate-fade-in-up",children:[(0,a.jsxs)("div",{className:"text-center mb-6",children:[(0,a.jsx)("div",{className:"w-12 h-12 sm:w-16 sm:h-16 mx-auto mb-4 bg-gradient-to-br from-indigo-500 to-purple-500 rounded-2xl flex items-center justify-center animate-float",children:(0,a.jsx)($.A,{className:"w-6 h-6 sm:w-8 sm:h-8 text-white"})}),(0,a.jsx)("h2",{className:"text-xl sm:text-2xl font-semibold text-slate-800 mb-2",children:"观看桌面"}),(0,a.jsx)("p",{className:"text-sm sm:text-base text-slate-600",children:g?"正在观看桌面共享":"输入连接码观看他人的桌面"})]}),(0,a.jsx)("div",{className:"space-y-4",children:g?(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("div",{className:"aspect-video bg-slate-900 rounded-xl flex items-center justify-center text-white",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)($.A,{className:"w-12 h-12 mx-auto mb-2 opacity-50"}),(0,a.jsx)("p",{className:"text-sm opacity-75",children:"桌面共享画面"})]})}),(0,a.jsxs)(S,{onClick:()=>b(!1),className:"w-full h-12 bg-gradient-to-r from-red-500 to-pink-500 hover:from-red-600 hover:to-pink-600 text-white text-lg font-medium rounded-xl shadow-lg",children:[(0,a.jsx)(Z.A,{className:"w-5 h-5 mr-2"}),"断开连接"]})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(P,{value:u,onChange:e=>h(e.target.value.toUpperCase().slice(0,6)),placeholder:"请输入连接码",className:"text-center text-2xl sm:text-3xl tracking-[0.3em] sm:tracking-[0.5em] font-mono h-12 sm:h-16 border-2 border-slate-200 rounded-xl focus:border-indigo-500 focus:ring-indigo-500 bg-white/80 backdrop-blur-sm",maxLength:6,disabled:v}),(0,a.jsx)(S,{onClick:C,disabled:6!==u.length||v,className:"w-full h-12 bg-gradient-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600 text-white text-lg font-medium rounded-xl shadow-lg",children:v?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"animate-spin rounded-full h-5 w-5 border-b-2 border-white mr-2"}),"连接中..."]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)($.A,{className:"w-5 h-5 mr-2"}),"连接桌面"]})})]})})]})]})}var ee=s(9509);let et=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{if(void 0!==ee&&ee.env)return ee.env[e]||t}catch(e){}return t},es={isDev:"development"===et("NODE_ENV"),isProd:"production"===et("NODE_ENV"),isStatic:!0,api:{backendUrl:et("GO_BACKEND_URL","http://localhost:8080"),baseUrl:et("NEXT_PUBLIC_API_BASE_URL","http://localhost:3000"),directBackendUrl:et("NEXT_PUBLIC_BACKEND_URL","http://localhost:8080"),wsUrl:et("NEXT_PUBLIC_WS_URL","ws://localhost:8080/ws")},timeout:{api:3e4,ws:6e4},retry:{max:3,delay:1e3}};var ea=s(9509);async function el(e){let t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a="true"===ea.env.NEXT_EXPORT||!window.location.origin.includes("localhost:3000");return t=a?function(e){let t=es.api.directBackendUrl.replace(/\/$/,""),s=e.startsWith("/")?e:"/".concat(e);return"".concat(t).concat(s)}(e):function(e){let t=es.api.baseUrl.replace(/\/$/,""),s=e.startsWith("/")?e:"/".concat(e);return"".concat(t).concat(s)}(e),console.log("[API] 模式检查: isClient=".concat(!0,", isStatic=").concat(a)),console.log("[API] 调用: ".concat(e," -> ").concat(t)),fetch(t,{...s,headers:{"Content-Type":"application/json",...s.headers}})}async function er(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return el(e,{...t,method:"GET"})}async function ei(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return el(e,{...s,method:"POST",body:t?JSON.stringify(t):void 0})}function en(){let e=(0,r.useSearchParams)(),t=(0,r.useRouter)(),{websocket:s,isConnected:i,connect:n,disconnect:o,sendMessage:c}=function(){let[e,t]=(0,l.useState)(null),[s,a]=(0,l.useState)(!1),r=(0,l.useRef)(null),i=(0,l.useRef)(""),n=(0,l.useRef)("sender"),o=(0,l.useCallback)((s,l)=>{if(e&&(e.readyState===WebSocket.OPEN||e.readyState===WebSocket.CONNECTING)&&i.current===s&&n.current===l)return void console.log("WebSocket已连接或正在连接,跳过重复连接",{readyState:e.readyState,currentCode:i.current,newCode:s,currentRole:n.current,newRole:l});e&&(console.log("关闭现有WebSocket连接"),e.close()),i.current=s,n.current=l;let c=es.api.wsUrl,d="".concat(c,"/p2p?code=").concat(s,"&role=").concat(l);console.log("连接WebSocket:",d);let m=new WebSocket(d);m.onopen=()=>{console.log("WebSocket连接已建立"),a(!0),t(m);let e={type:"connect",payload:{code:s,role:l,timestamp:Date.now()}};m.send(JSON.stringify(e))},m.onmessage=e=>{try{let t=JSON.parse(e.data);console.log("收到WebSocket消息:",t);let s=new CustomEvent("websocket-message",{detail:t});window.dispatchEvent(s)}catch(e){console.error("解析WebSocket消息失败:",e)}},m.onclose=e=>{console.log("WebSocket连接关闭:",e.code,e.reason),a(!1),t(null);let s=new CustomEvent("websocket-close",{detail:{code:e.code,reason:e.reason}});window.dispatchEvent(s),1e3!==e.code&&i.current&&(console.log("尝试重新连接..."),r.current=setTimeout(()=>{o(i.current,n.current)},3e3))},m.onerror=e=>{console.error("WebSocket错误:",e);let t=new CustomEvent("websocket-error",{detail:{error:e}});window.dispatchEvent(t)}},[e]),c=(0,l.useCallback)(()=>{r.current&&clearTimeout(r.current),i.current="",e&&e.close(1e3,"User disconnected")},[e]),d=(0,l.useCallback)(t=>{e&&e.readyState===WebSocket.OPEN?e.send(JSON.stringify(t)):console.warn("WebSocket未连接,无法发送消息")},[e]);return(0,l.useEffect)(()=>()=>{r.current&&clearTimeout(r.current),e&&e.close()},[e]),{websocket:e,isConnected:s,connect:o,disconnect:c,sendMessage:d}}(),{showToast:h}=(0,X.d)(),[p,g]=(0,l.useState)("file"),[b,k]=(0,l.useState)(!1),[C,A]=(0,l.useState)("");(0,l.useEffect)(()=>{let t=e.get("type");e.get("mode"),t&&["file","text","desktop"].includes(t)&&g(t)},[e]);let R=(0,l.useCallback)((s,a)=>{let l=new URLSearchParams(e.toString());l.set("type",s),a&&l.set("mode",a),t.push("?".concat(l.toString()),{scroll:!1})},[e,t]),[_,F]=(0,l.useState)([]),[L,T]=(0,l.useState)(""),[D,U]=(0,l.useState)(""),[P,M]=(0,l.useState)("sender"),[W,O]=(0,l.useState)([]),[J,G]=(0,l.useState)([]),[V,q]=(0,l.useState)(!1),[K,Y]=(0,l.useState)(null),[Z,ee]=(0,l.useState)(new Map),[et,ea]=(0,l.useState)(new Set),el=(0,l.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"success";console.log("[".concat(t.toUpperCase(),"] ").concat(e)),h(e,t)},[h]),en=(0,l.useCallback)(e=>{if((i||L||V)&&e!==p){A(e),k(!0);return}g(e),R(e)},[R,i,L,V,p]);(0,l.useEffect)(()=>{i&&V&&(q(!1),console.log("WebSocket连接已建立,重置连接状态"))},[i,V]);let eo=(0,l.useCallback)(()=>{if(C){let e=window.location.origin+window.location.pathname,t="".concat(e,"?type=").concat(C);window.open(t,"_blank"),k(!1),A("")}},[C]),ec=(0,l.useCallback)(()=>{k(!1),A("")},[]),ed=(0,l.useCallback)(e=>{console.log("初始化文件传输:",e);let t=e.file_id;ee(s=>{let a=new Map(s);return a.set(t,{fileId:e.file_id,chunks:[],totalSize:e.size,receivedSize:0,fileName:e.name,mimeType:e.mime_type,startTime:Date.now()}),console.log("添加文件传输记录:",t),a}),G(t=>{let s=t.map(t=>t.fileId===e.file_id?{...t,status:"downloading",totalSize:e.size}:t);return console.log("更新传输进度为下载中:",s),s})},[]),em=(0,l.useCallback)((e,t)=>{t.chunks.sort((e,t)=>e.offset-t.offset);let s=new Uint8Array(t.chunks.reduce((e,t)=>e+t.data.length,0)),a=0;t.chunks.forEach(e=>{s.set(e.data,a),a+=e.data.length});let l=new Blob([s],{type:t.mimeType}),r=URL.createObjectURL(l),i=document.createElement("a");i.href=r,i.download=t.fileName,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r),ee(t=>{let s=new Map(t);return s.delete(e),s}),G(t=>t.filter(t=>t.fileId!==e));let n=(Date.now()-t.startTime)/1e3,o=(t.totalSize/n/1024/1024).toFixed(2);el('文件 "'.concat(t.fileName,'" 下载完成!传输速度: ').concat(o," MB/s"))},[el]),ex=(0,l.useCallback)(e=>{console.log("接收文件数据块:",e);let t=e.file_id;ee(s=>{let a=new Map(s),l=a.get(t);if(l){if(l.receivedSize>=l.totalSize)return console.log("文件已完成,忽略额外的数据块"),a;let s=new Uint8Array(e.data);l.chunks.push({offset:e.offset,data:s}),l.receivedSize+=s.length,l.receivedSize>l.totalSize&&(l.receivedSize=l.totalSize);let r=l.receivedSize/l.totalSize*100;console.log("文件 ".concat(t," 进度: ").concat(r.toFixed(2),"%")),G(e=>{let s=e.map(e=>e.fileId===t?{...e,progress:r,receivedSize:l.receivedSize,totalSize:l.totalSize}:e);return console.log("更新进度状态:",s),s}),(e.is_last||l.receivedSize>=l.totalSize)&&(console.log("文件接收完成,准备下载"),G(e=>e.map(e=>e.fileId===t?{...e,status:"completed",progress:100,receivedSize:l.totalSize}:e)))}else console.warn("未找到对应的文件传输:",t);return a})},[]),eu=(0,l.useCallback)(e=>{if(console.log("文件传输完成,开始下载:",e),et.has(e))return void console.log("文件已经下载过,跳过重复下载:",e);ea(t=>new Set([...t,e]));let t=Z.get(e);t?(em(e,t),setTimeout(()=>{G(t=>t.filter(t=>t.fileId!==e))},2e3)):console.warn("未找到文件传输数据:",e)},[Z,em,et]),eh=(0,l.useCallback)(async e=>{let t=e.file_id,s=e.request_id,a=_[parseInt(t.replace("file_",""))];if(!a)return void console.error("未找到请求的文件:",t);console.log("开始发送文件:",a.name),el("开始发送文件: ".concat(a.name)),c({type:"file-info",payload:{file_id:s,name:a.name,size:a.size,mime_type:a.type,last_modified:a.lastModified}});let l=0,r=()=>{if(l>=a.size){c({type:"file-complete",payload:{file_id:s}}),el("文件发送完成: ".concat(a.name));return}let e=a.slice(l,l+65536),t=new FileReader;t.onload=e=>{var t;let i=null==(t=e.target)?void 0:t.result;c({type:"file-chunk",payload:{file_id:s,offset:l,data:Array.from(new Uint8Array(i)),is_last:l+i.byteLength>=a.size}}),l+=i.byteLength,setTimeout(r,10)},t.readAsArrayBuffer(e)};r()},[_,c,el]);(0,l.useEffect)(()=>{let e=e=>{let t=e.detail;switch(console.log("HomePage收到WebSocket消息:",t.type,t),t.type){case"file-list":console.log("处理file-list消息"),"receiver"===P&&(O(t.payload.files||[]),q(!1));break;case"file-list-updated":console.log("处理file-list-updated消息"),"receiver"===P&&(O(t.payload.files||[]),el("文件列表已更新,发现新文件!"));break;case"room-status":console.log("处理room-status消息"),Y(t.payload);break;case"file-info":console.log("处理file-info消息"),"receiver"===P&&ed(t.payload);break;case"file-chunk":console.log("处理file-chunk消息"),"receiver"===P&&ex(t.payload);break;case"file-complete":console.log("处理file-complete消息"),"receiver"===P&&eu(t.payload.file_id);break;case"file-request":console.log("处理file-request消息"),"sender"===P&&eh(t.payload)}};return window.addEventListener("websocket-message",e),()=>{window.removeEventListener("websocket-message",e)}},[P,el,ed,ex,eu,eh]);let ep=(0,l.useCallback)(async()=>{if(0===_.length)return;let e=_.map((e,t)=>({id:"file_"+t,name:e.name,size:e.size,type:e.type,lastModified:e.lastModified}));try{let t=await ei("/api/create-room",{files:e}),s=await t.json();if(s.success){let e=s.code;T(e),M("sender");let t=window.location.origin,a="".concat(t,"/?type=file&mode=receive&code=").concat(e);U(a),n(e,"sender"),el("取件码生成成功!")}else el("生成取件码失败: "+s.message,"error")}catch(e){console.error("生成取件码失败:",e),el("生成取件码失败,请重试","error")}},[_,n,el]),ef=(0,l.useCallback)(async e=>{if(V||i&&L===e)return void console.log("已在连接中或已连接,跳过重复请求");q(!0);try{let t=await er("/api/room-info?code=".concat(e)),s=await t.json();s.success?(T(e),M("receiver"),O(s.files||[]),n(e,"receiver"),el("连接成功!","success")):(el(s.message||"取件码不存在或已过期","error"),q(!1))}catch(e){console.error("API调用失败:",e),el("取件码不存在或已过期","error"),q(!1)}},[n,el,V,i,L]);(0,l.useEffect)(()=>{let t=e.get("code"),s=e.get("type"),a=e.get("mode");t&&6===t.length&&!i&&L!==t.toUpperCase()&&s&&"text"!==s&&"receive"===a&&(console.log("自动加入文件房间:",t.toUpperCase()),M("receiver"),ef(t.toUpperCase()))},[e]);let eg=(0,l.useCallback)(e=>{var t;if(console.log("开始下载文件:",e),!s||s.readyState!==WebSocket.OPEN)return void el("连接未建立,请重试","error");if(J.find(t=>t.originalFileId===e&&"completed"!==t.status)){console.log("文件已在下载中,跳过重复请求:",e),el("文件正在下载中...","info");return}let a="req_"+Date.now()+"_"+Math.random().toString(36).substr(2,9);console.log("生成请求ID:",a),c({type:"file-request",payload:{file_id:e,request_id:a}});let l={fileId:a,originalFileId:e,fileName:(null==(t=W.find(t=>t.id===e))?void 0:t.name)||e,progress:0,receivedSize:0,totalSize:0,status:"pending"};console.log("添加传输进度:",l),G(t=>[...t.filter(t=>t.originalFileId!==e),l])},[s,c,W,el,J]),eb=(0,l.useCallback)(e=>{if(!L||!s||s.readyState!==WebSocket.OPEN)return void console.log("无法更新文件列表: pickupCode=",L,"websocket状态=",null==s?void 0:s.readyState);let t=e.map((e,t)=>({id:"file_"+t,name:e.name,size:e.size,type:e.type,lastModified:e.lastModified}));console.log("通过WebSocket发送文件列表更新:",t),c({type:"update-file-list",payload:{files:t}}),el("文件列表已更新")},[L,s,c,el]),ev=(0,l.useCallback)(e=>{L&&eb(e)},[L,eb]),ej=(0,l.useCallback)(()=>{F([]),G([]),ee(new Map),L&&(eb([]),el("文件列表已清空,房间保持连接","success"))},[L,eb,el]),ew=(0,l.useCallback)(()=>{F([]),T(""),U(""),O([]),G([]),Y(null),ee(new Map),o(),el("已断开连接","info")},[o,el]),eN=(0,l.useCallback)(async(e,t)=>{try{await navigator.clipboard.writeText(e),el(t,"success")}catch(e){console.error("复制失败:",e),el("复制失败,请手动复制","error")}},[el]);return(0,a.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-blue-50 to-indigo-50",children:[(0,a.jsxs)("div",{className:"relative min-h-screen",children:[(0,a.jsxs)("div",{className:"absolute inset-0 pointer-events-none",children:[(0,a.jsx)("div",{className:"absolute -top-40 -right-40 w-80 h-80 bg-gradient-to-br from-blue-400/20 to-indigo-600/20 rounded-full blur-3xl"}),(0,a.jsx)("div",{className:"absolute -bottom-40 -left-40 w-80 h-80 bg-gradient-to-br from-purple-400/20 to-pink-400/20 rounded-full blur-3xl"})]}),(0,a.jsxs)("div",{className:"relative container mx-auto px-4 sm:px-6 py-8 max-w-6xl",children:[(0,a.jsx)(z,{}),(0,a.jsx)("div",{className:"max-w-4xl mx-auto",children:(0,a.jsxs)(d,{value:p,onValueChange:en,className:"w-full",children:[(0,a.jsxs)(m,{className:"grid w-full grid-cols-3 bg-white/80 backdrop-blur-sm border-0 shadow-lg h-12 sm:h-14 p-1 mb-6",children:[(0,a.jsxs)(x,{value:"file",className:"flex items-center justify-center space-x-2 text-sm sm:text-base font-medium data-[state=active]:bg-gradient-to-r data-[state=active]:from-blue-500 data-[state=active]:to-indigo-500 data-[state=active]:text-white data-[state=active]:shadow-lg transition-all duration-300",children:[(0,a.jsx)(E.A,{className:"w-4 h-4 sm:w-5 sm:h-5"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"传文件"}),(0,a.jsx)("span",{className:"sm:hidden",children:"文件"})]}),(0,a.jsxs)(x,{value:"text",className:"flex items-center justify-center space-x-2 text-sm sm:text-base font-medium data-[state=active]:bg-gradient-to-r data-[state=active]:from-emerald-500 data-[state=active]:to-teal-500 data-[state=active]:text-white data-[state=active]:shadow-lg transition-all duration-300",children:[(0,a.jsx)(I.A,{className:"w-4 h-4 sm:w-5 sm:h-5"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"传文字"}),(0,a.jsx)("span",{className:"sm:hidden",children:"文字"})]}),(0,a.jsxs)(x,{value:"desktop",className:"flex items-center justify-center space-x-2 text-sm sm:text-base font-medium data-[state=active]:bg-gradient-to-r data-[state=active]:from-purple-500 data-[state=active]:to-pink-500 data-[state=active]:text-white data-[state=active]:shadow-lg transition-all duration-300",children:[(0,a.jsx)($.A,{className:"w-4 h-4 sm:w-5 sm:h-5"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"共享桌面"}),(0,a.jsx)("span",{className:"sm:hidden",children:"桌面"})]})]}),(0,a.jsxs)(u,{value:"file",className:"mt-6 animate-fade-in-up",children:[(0,a.jsx)(B,{selectedFiles:_,onFilesChange:F,onGenerateCode:ep,pickupCode:L,pickupLink:D,onCopyCode:()=>eN(L,"取件码已复制到剪贴板!"),onCopyLink:()=>eN(D,"取件链接已复制到剪贴板!"),onAddMoreFiles:()=>{let e=document.createElement("input");e.type="file",e.multiple=!0,e.onchange=async e=>{let t=Array.from(e.target.files||[]),s=[..._,...t];F(s),L&&t.length>0&&eb(s)},e.click()},onRemoveFile:ev,onClearFiles:ej,onReset:ew,onJoinRoom:ef,receiverFiles:W,onDownloadFile:eg,transferProgresses:J,isConnected:i,isConnecting:V,disabled:V}),K&&"sender"===P&&(0,a.jsxs)("div",{className:"mt-6 glass-card rounded-2xl p-6 animate-fade-in-up",children:[(0,a.jsx)("h3",{className:"text-xl font-semibold text-slate-800 mb-4 text-center",children:"实时状态"}),(0,a.jsxs)("div",{className:"grid grid-cols-3 gap-6",children:[(0,a.jsxs)("div",{className:"text-center p-4 bg-gradient-to-br from-blue-50 to-indigo-50 rounded-xl",children:[(0,a.jsx)("div",{className:"text-3xl font-bold bg-gradient-to-r from-blue-600 to-indigo-600 bg-clip-text text-transparent",children:((null==K?void 0:K.sender_count)||0)+((null==K?void 0:K.receiver_count)||0)}),(0,a.jsx)("div",{className:"text-sm text-slate-600 mt-1",children:"在线用户"})]}),(0,a.jsxs)("div",{className:"text-center p-4 bg-gradient-to-br from-emerald-50 to-teal-50 rounded-xl",children:[(0,a.jsx)("div",{className:"text-3xl font-bold text-emerald-600",children:(null==K?void 0:K.sender_count)||0}),(0,a.jsx)("div",{className:"text-sm text-slate-600 mt-1",children:"发送方"})]}),(0,a.jsxs)("div",{className:"text-center p-4 bg-gradient-to-br from-purple-50 to-pink-50 rounded-xl",children:[(0,a.jsx)("div",{className:"text-3xl font-bold text-purple-600",children:(null==K?void 0:K.receiver_count)||0}),(0,a.jsx)("div",{className:"text-sm text-slate-600 mt-1",children:"接收方"})]})]})]})]}),(0,a.jsx)(u,{value:"text",className:"mt-6 animate-fade-in-up",children:(0,a.jsx)(H,{onSendText:async e=>{try{let t=await fetch("/api/create-text-room",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:e})}),s=await t.json();if(!t.ok){let e=s.error||"创建文字传输房间失败";return el(e,"error"),""}return s.code}catch(e){return console.error("创建文字传输房间失败:",e),el("网络错误,请重试","error"),""}},onReceiveText:async e=>(console.log("onReceiveText被调用,但文字内容将通过WebSocket获取:",e),""),websocket:s,isConnected:i,currentRole:P,onCreateWebSocket:(e,t)=>{s&&o(),n(e,t)}})}),(0,a.jsx)(u,{value:"desktop",className:"mt-6 animate-fade-in-up",children:(0,a.jsx)(Q,{onStartSharing:async()=>(el("桌面共享功能开发中","info"),"DEF456"),onStopSharing:async()=>{el("桌面共享已停止","info")},onJoinSharing:async e=>{el("桌面共享功能开发中","info")}})})]})}),(0,a.jsx)("div",{className:"h-8 sm:h-16"})]})]}),(0,a.jsx)(f,{open:b,onOpenChange:k,children:(0,a.jsxs)(v,{className:"sm:max-w-[425px]",children:[(0,a.jsxs)(j,{children:[(0,a.jsx)(N,{children:"切换传输模式"}),(0,a.jsx)(y,{children:(()=>{let e="",t="";switch(p){case"file":e="文件传输";break;case"text":e="文字传输";break;case"desktop":e="桌面共享"}switch(C){case"file":t="文件传输";break;case"text":t="文字传输";break;case"desktop":t="桌面共享"}return"当前".concat(e,"会话进行中,是否要在新标签页中打开").concat(t,"?")})()})]}),(0,a.jsxs)(w,{children:[(0,a.jsx)(S,{variant:"outline",onClick:ec,children:"取消"}),(0,a.jsx)(S,{onClick:eo,children:"确认打开"})]})]})})]})}let eo=function(){return(0,a.jsx)(l.Suspense,{fallback:(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center",children:"加载中..."}),children:(0,a.jsx)(en,{})})}},6801:(e,t,s)=>{"use strict";s.d(t,{ToastProvider:()=>n,d:()=>i});var a=s(5155),l=s(2115);let r=(0,l.createContext)(void 0),i=()=>{let e=(0,l.useContext)(r);if(!e)throw Error("useToast must be used within a ToastProvider");return e},n=e=>{let{children:t}=e,[s,i]=(0,l.useState)([]),n=(0,l.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"success",s=Date.now().toString(),a={id:s,message:e,type:t};i(e=>[...e,a]),setTimeout(()=>{i(e=>e.filter(e=>e.id!==s))},3e3)},[]),o=(0,l.useCallback)(e=>{i(t=>t.filter(t=>t.id!==e))},[]);return(0,a.jsxs)(r.Provider,{value:{showToast:n},children:[t,(0,a.jsx)("div",{className:"fixed top-4 left-1/2 transform -translate-x-1/2 z-50 space-y-2",children:s.map(e=>(0,a.jsx)("div",{className:"\n max-w-sm p-4 rounded-xl shadow-lg backdrop-blur-sm transform transition-all duration-300 ease-in-out\n ".concat("success"===e.type?"bg-emerald-50/90 border border-emerald-200 text-emerald-800":"","\n ").concat("error"===e.type?"bg-red-50/90 border border-red-200 text-red-800":"","\n ").concat("info"===e.type?"bg-blue-50/90 border border-blue-200 text-blue-800":"","\n animate-slide-in-down\n "),onClick:()=>o(e.id),children:(0,a.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,a.jsxs)("div",{className:"flex-shrink-0",children:["success"===e.type&&(0,a.jsx)("div",{className:"w-6 h-6 bg-emerald-500 rounded-full flex items-center justify-center",children:(0,a.jsx)("svg",{className:"w-4 h-4 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}),"error"===e.type&&(0,a.jsx)("div",{className:"w-6 h-6 bg-red-500 rounded-full flex items-center justify-center",children:(0,a.jsx)("svg",{className:"w-4 h-4 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})}),"info"===e.type&&(0,a.jsx)("div",{className:"w-6 h-6 bg-blue-500 rounded-full flex items-center justify-center",children:(0,a.jsx)("svg",{className:"w-4 h-4 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})})]}),(0,a.jsx)("p",{className:"text-sm font-medium",children:e.message})]})},e.id))})]})}}},e=>{e.O(0,[984,441,964,358],()=>e(e.s=409)),_N_E=e.O()}]); \ No newline at end of file diff --git a/internal/web/frontend/_next/static/chunks/webpack-aa487e64701147db.js b/internal/web/frontend/_next/static/chunks/webpack-8c94b35adf29e9b1.js similarity index 99% rename from internal/web/frontend/_next/static/chunks/webpack-aa487e64701147db.js rename to internal/web/frontend/_next/static/chunks/webpack-8c94b35adf29e9b1.js index 425c359..ebeb55d 100644 --- a/internal/web/frontend/_next/static/chunks/webpack-aa487e64701147db.js +++ b/internal/web/frontend/_next/static/chunks/webpack-8c94b35adf29e9b1.js @@ -1 +1 @@ -(()=>{"use strict";var e={},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}},i=!0;try{e[o](a,a.exports,r),i=!1}finally{i&&delete t[o]}return a.exports}r.m=e,(()=>{var e=[];r.O=(t,o,n,a)=>{if(o){a=a||0;for(var i=e.length;i>0&&e[i-1][2]>a;i--)e[i]=e[i-1];e[i]=[o,n,a];return}for(var u=1/0,i=0;i=a)&&Object.keys(r.O).every(e=>r.O[e](o[c]))?o.splice(c--,1):(l=!1,a{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;r.t=function(o,n){if(1&n&&(o=this(o)),8&n||"object"==typeof o&&o&&(4&n&&o.__esModule||16&n&&"function"==typeof o.then))return o;var a=Object.create(null);r.r(a);var i={};e=e||[null,t({}),t([]),t(t)];for(var u=2&n&&o;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach(e=>i[e]=()=>o[e]);return i.default=()=>o,r.d(a,i),a}})(),r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,o)=>(r.f[o](e,t),t),[])),r.u=e=>{},r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="_N_E:";r.l=(o,n,a,i)=>{if(e[o])return void e[o].push(n);if(void 0!==a)for(var u,l,c=document.getElementsByTagName("script"),d=0;d{u.onerror=u.onload=null,clearTimeout(p);var n=e[o];if(delete e[o],u.parentNode&&u.parentNode.removeChild(u),n&&n.forEach(e=>e(r)),t)return t(r)},p=setTimeout(s.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=s.bind(null,u.onerror),u.onload=s.bind(null,u.onload),l&&document.head.appendChild(u)}})(),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:e=>e},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("nextjs#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="/_next/",(()=>{var e={68:0,896:0};r.f.j=(t,o)=>{var n=r.o(e,t)?e[t]:void 0;if(0!==n)if(n)o.push(n[2]);else if(/^(68|896)$/.test(t))e[t]=0;else{var a=new Promise((r,o)=>n=e[t]=[r,o]);o.push(n[2]=a);var i=r.p+r.u(t),u=Error();r.l(i,o=>{if(r.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var a=o&&("load"===o.type?"missing":o.type),i=o&&o.target&&o.target.src;u.message="Loading chunk "+t+" failed.\n("+a+": "+i+")",u.name="ChunkLoadError",u.type=a,u.request=i,n[1](u)}},"chunk-"+t,t)}},r.O.j=t=>0===e[t];var t=(t,o)=>{var n,a,[i,u,l]=o,c=0;if(i.some(t=>0!==e[t])){for(n in u)r.o(u,n)&&(r.m[n]=u[n]);if(l)var d=l(r)}for(t&&t(o);c{"use strict";var e={},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}},i=!0;try{e[o](a,a.exports,r),i=!1}finally{i&&delete t[o]}return a.exports}r.m=e,(()=>{var e=[];r.O=(t,o,n,a)=>{if(o){a=a||0;for(var i=e.length;i>0&&e[i-1][2]>a;i--)e[i]=e[i-1];e[i]=[o,n,a];return}for(var u=1/0,i=0;i=a)&&Object.keys(r.O).every(e=>r.O[e](o[c]))?o.splice(c--,1):(l=!1,a{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;r.t=function(o,n){if(1&n&&(o=this(o)),8&n||"object"==typeof o&&o&&(4&n&&o.__esModule||16&n&&"function"==typeof o.then))return o;var a=Object.create(null);r.r(a);var i={};e=e||[null,t({}),t([]),t(t)];for(var u=2&n&&o;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach(e=>i[e]=()=>o[e]);return i.default=()=>o,r.d(a,i),a}})(),r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,o)=>(r.f[o](e,t),t),[])),r.u=e=>{},r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="_N_E:";r.l=(o,n,a,i)=>{if(e[o])return void e[o].push(n);if(void 0!==a)for(var u,l,c=document.getElementsByTagName("script"),d=0;d{u.onerror=u.onload=null,clearTimeout(p);var n=e[o];if(delete e[o],u.parentNode&&u.parentNode.removeChild(u),n&&n.forEach(e=>e(r)),t)return t(r)},p=setTimeout(s.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=s.bind(null,u.onerror),u.onload=s.bind(null,u.onload),l&&document.head.appendChild(u)}})(),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:e=>e},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("nextjs#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="/_next/",(()=>{var e={68:0,896:0};r.f.j=(t,o)=>{var n=r.o(e,t)?e[t]:void 0;if(0!==n)if(n)o.push(n[2]);else if(/^(68|896)$/.test(t))e[t]=0;else{var a=new Promise((r,o)=>n=e[t]=[r,o]);o.push(n[2]=a);var i=r.p+r.u(t),u=Error();r.l(i,o=>{if(r.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var a=o&&("load"===o.type?"missing":o.type),i=o&&o.target&&o.target.src;u.message="Loading chunk "+t+" failed.\n("+a+": "+i+")",u.name="ChunkLoadError",u.type=a,u.request=i,n[1](u)}},"chunk-"+t,t)}},r.O.j=t=>0===e[t];var t=(t,o)=>{var n,a,[i,u,l]=o,c=0;if(i.some(t=>0!==e[t])){for(n in u)r.o(u,n)&&(r.m[n]=u[n]);if(l)var d=l(r)}for(t&&t(o);c:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*1)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*3)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap}.overflow-hidden,.truncate{overflow:hidden}.rounded{border-radius:var(--radius)}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e+38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-blue-200{border-color:var(--color-blue-200)}.border-destructive{border-color:hsl(var(--destructive))}.border-emerald-200{border-color:var(--color-emerald-200)}.border-input{border-color:hsl(var(--input))}.border-orange-300{border-color:var(--color-orange-300)}.border-purple-200{border-color:var(--color-purple-200)}.border-red-200{border-color:var(--color-red-200)}.border-red-300{border-color:var(--color-red-300)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-300{border-color:var(--color-slate-300)}.border-white{border-color:var(--color-white)}.border-t-transparent{border-top-color:#0000}.bg-background{background-color:hsl(var(--background))}.bg-black{background-color:var(--color-black)}.bg-black\/80{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.bg-black\/80{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}.bg-blue-50\/90{background-color:#eff6ffe6}@supports (color:color-mix(in lab,red,red)){.bg-blue-50\/90{background-color:color-mix(in oklab,var(--color-blue-50)90%,transparent)}}.bg-blue-500{background-color:var(--color-blue-500)}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-50\/50{background-color:#ecfdf580}@supports (color:color-mix(in lab,red,red)){.bg-emerald-50\/50{background-color:color-mix(in oklab,var(--color-emerald-50)50%,transparent)}}.bg-emerald-50\/90{background-color:#ecfdf5e6}@supports (color:color-mix(in lab,red,red)){.bg-emerald-50\/90{background-color:color-mix(in oklab,var(--color-emerald-50)90%,transparent)}}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-muted{background-color:hsl(var(--muted))}.bg-orange-100{background-color:var(--color-orange-100)}.bg-orange-500{background-color:var(--color-orange-500)}.bg-primary{background-color:hsl(var(--primary))}.bg-purple-500{background-color:var(--color-purple-500)}.bg-red-50\/90{background-color:#fef2f2e6}@supports (color:color-mix(in lab,red,red)){.bg-red-50\/90{background-color:color-mix(in oklab,var(--color-red-50)90%,transparent)}}.bg-red-500{background-color:var(--color-red-500)}.bg-secondary{background-color:hsl(var(--secondary))}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-900\/80{background-color:#0f172bcc}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\/80{background-color:color-mix(in oklab,var(--color-slate-900)80%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.bg-white\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.bg-white\/80{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab}.bg-gradient-to-b,.bg-gradient-to-br{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab}.bg-gradient-to-r{--tw-gradient-position:to right in oklab}.bg-gradient-to-r,.bg-gradient-to-t{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-t{--tw-gradient-position:to top in oklab}.from-blue-50{--tw-gradient-from:var(--color-blue-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-blue-100{--tw-gradient-from:var(--color-blue-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-blue-400\/20{--tw-gradient-from:#54a2ff33}@supports (color:color-mix(in lab,red,red)){.from-blue-400\/20{--tw-gradient-from:color-mix(in oklab,var(--color-blue-400)20%,transparent)}}.from-blue-400\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-blue-500{--tw-gradient-from:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-blue-600{--tw-gradient-from:var(--color-blue-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-emerald-50{--tw-gradient-from:var(--color-emerald-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-emerald-100{--tw-gradient-from:var(--color-emerald-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-emerald-500{--tw-gradient-from:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-emerald-600{--tw-gradient-from:var(--color-emerald-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-indigo-500{--tw-gradient-from:var(--color-indigo-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-purple-50{--tw-gradient-from:var(--color-purple-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-purple-400\/20{--tw-gradient-from:#c07eff33}@supports (color:color-mix(in lab,red,red)){.from-purple-400\/20{--tw-gradient-from:color-mix(in oklab,var(--color-purple-400)20%,transparent)}}.from-purple-400\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-purple-500{--tw-gradient-from:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-red-500{--tw-gradient-from:var(--color-red-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-slate-50{--tw-gradient-from:var(--color-slate-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-slate-900\/60{--tw-gradient-from:#0f172b99}@supports (color:color-mix(in lab,red,red)){.from-slate-900\/60{--tw-gradient-from:color-mix(in oklab,var(--color-slate-900)60%,transparent)}}.from-slate-900\/60{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.via-blue-50{--tw-gradient-via:var(--color-blue-50);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-purple-600{--tw-gradient-via:var(--color-purple-600);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-blue-50{--tw-gradient-to:var(--color-blue-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-emerald-600{--tw-gradient-to:var(--color-emerald-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-indigo-50{--tw-gradient-to:var(--color-indigo-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-indigo-100{--tw-gradient-to:var(--color-indigo-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-indigo-500{--tw-gradient-to:var(--color-indigo-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-indigo-600{--tw-gradient-to:var(--color-indigo-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-indigo-600\/20{--tw-gradient-to:#4f39f633}@supports (color:color-mix(in lab,red,red)){.to-indigo-600\/20{--tw-gradient-to:color-mix(in oklab,var(--color-indigo-600)20%,transparent)}}.to-indigo-600\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-pink-50{--tw-gradient-to:var(--color-pink-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-pink-400\/20{--tw-gradient-to:#fb64b633}@supports (color:color-mix(in lab,red,red)){.to-pink-400\/20{--tw-gradient-to:color-mix(in oklab,var(--color-pink-400)20%,transparent)}}.to-pink-400\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-pink-500{--tw-gradient-to:var(--color-pink-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-purple-500{--tw-gradient-to:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-teal-50{--tw-gradient-to:var(--color-teal-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-teal-100{--tw-gradient-to:var(--color-teal-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-teal-500{--tw-gradient-to:var(--color-teal-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-teal-600{--tw-gradient-to:var(--color-teal-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-1{padding:calc(var(--spacing)*1)}.p-1\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-8{padding-block:calc(var(--spacing)*8)}.pt-0{padding-top:calc(var(--spacing)*0)}.pr-8{padding-right:calc(var(--spacing)*8)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.text-center{text-align:center}.font-mono{font-family:var(--font-geist-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[0\.3em\]{--tw-tracking:.3em;letter-spacing:.3em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.text-amber-600{color:var(--color-amber-600)}.text-blue-600{color:var(--color-blue-600)}.text-blue-800{color:var(--color-blue-800)}.text-card-foreground{color:hsl(var(--card-foreground))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-700{color:var(--color-emerald-700)}.text-emerald-800{color:var(--color-emerald-800)}.text-emerald-900{color:var(--color-emerald-900)}.text-foreground,.text-foreground\/50{color:hsl(var(--foreground))}@supports (color:color-mix(in lab,red,red)){.text-foreground\/50{color:color-mix(in oklab,hsl(var(--foreground))50%,transparent)}}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-orange-600{color:var(--color-orange-600)}.text-orange-700{color:var(--color-orange-700)}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-purple-600{color:var(--color-purple-600)}.text-purple-700{color:var(--color-purple-700)}.text-red-600{color:var(--color-red-600)}.text-red-800{color:var(--color-red-800)}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-transparent{color:#0000}.text-white{color:var(--color-white)}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040)}.shadow-2xl,.shadow-lg{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur-3xl{--tw-blur:blur(var(--blur-3xl));filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}@media (hover:hover){.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.group-\[\.destructive\]\:border-muted\/40:is(:where(.group).destructive *){border-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.group-\[\.destructive\]\:border-muted\/40:is(:where(.group).destructive *){border-color:color-mix(in oklab,hsl(var(--muted))40%,transparent)}}.group-\[\.destructive\]\:text-red-300:is(:where(.group).destructive *){color:var(--color-red-300)}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}@media (hover:hover){.hover\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\:border-blue-400:hover{border-color:var(--color-blue-400)}.hover\:border-emerald-400:hover{border-color:var(--color-emerald-400)}.hover\:border-slate-300:hover{border-color:var(--color-slate-300)}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-blue-600:hover{background-color:var(--color-blue-600)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,hsl(var(--destructive))90%,transparent)}}.hover\:bg-emerald-600:hover{background-color:var(--color-emerald-600)}.hover\:bg-orange-50:hover{background-color:var(--color-orange-50)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,hsl(var(--primary))90%,transparent)}}.hover\:bg-purple-600:hover{background-color:var(--color-purple-600)}.hover\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\:bg-secondary:hover,.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,hsl(var(--secondary))80%,transparent)}}.hover\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\:bg-slate-200:hover{background-color:var(--color-slate-200)}.hover\:bg-white\/30:hover{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/30:hover{background-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.hover\:from-blue-600:hover{--tw-gradient-from:var(--color-blue-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hover\:from-emerald-600:hover{--tw-gradient-from:var(--color-emerald-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hover\:from-indigo-600:hover{--tw-gradient-from:var(--color-indigo-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hover\:from-purple-600:hover{--tw-gradient-from:var(--color-purple-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hover\:from-red-600:hover{--tw-gradient-from:var(--color-red-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hover\:to-indigo-600:hover{--tw-gradient-to:var(--color-indigo-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hover\:to-pink-600:hover{--tw-gradient-to:var(--color-pink-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hover\:to-purple-600:hover{--tw-gradient-to:var(--color-purple-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hover\:to-teal-600:hover{--tw-gradient-to:var(--color-teal-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-red-500:hover{color:var(--color-red-500)}.hover\:text-slate-600:hover{color:var(--color-slate-600)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a)}.hover\:shadow-md:hover,.hover\:shadow-xl:hover{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-xl:hover{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a)}.group-\[\.destructive\]\:hover\:border-destructive\/30:is(:where(.group).destructive *):hover{border-color:hsl(var(--destructive))}@supports (color:color-mix(in lab,red,red)){.group-\[\.destructive\]\:hover\:border-destructive\/30:is(:where(.group).destructive *):hover{border-color:color-mix(in oklab,hsl(var(--destructive))30%,transparent)}}.group-\[\.destructive\]\:hover\:bg-destructive:is(:where(.group).destructive *):hover{background-color:hsl(var(--destructive))}.group-\[\.destructive\]\:hover\:text-destructive-foreground:is(:where(.group).destructive *):hover{color:hsl(var(--destructive-foreground))}.group-\[\.destructive\]\:hover\:text-red-50:is(:where(.group).destructive *):hover{color:var(--color-red-50)}}.focus\:border-blue-500:focus{border-color:var(--color-blue-500)}.focus\:border-emerald-500:focus{border-color:var(--color-emerald-500)}.focus\:border-indigo-500:focus{border-color:var(--color-indigo-500)}.focus\:opacity-100:focus{opacity:1}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.focus\:ring-emerald-500:focus{--tw-ring-color:var(--color-emerald-500)}.focus\:ring-indigo-500:focus{--tw-ring-color:var(--color-indigo-500)}.focus\:ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.group-\[\.destructive\]\:focus\:ring-destructive:is(:where(.group).destructive *):focus{--tw-ring-color:hsl(var(--destructive))}.group-\[\.destructive\]\:focus\:ring-red-400:is(:where(.group).destructive *):focus{--tw-ring-color:var(--color-red-400)}.group-\[\.destructive\]\:focus\:ring-offset-red-600:is(:where(.group).destructive *):focus{--tw-ring-offset-color:var(--color-red-600)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:scale-100:disabled{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=active\]\:bg-gradient-to-r[data-state=active]{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.data-\[state\=active\]\:from-blue-500[data-state=active]{--tw-gradient-from:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.data-\[state\=active\]\:from-emerald-500[data-state=active]{--tw-gradient-from:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.data-\[state\=active\]\:from-purple-500[data-state=active]{--tw-gradient-from:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.data-\[state\=active\]\:to-indigo-500[data-state=active]{--tw-gradient-to:var(--color-indigo-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.data-\[state\=active\]\:to-pink-500[data-state=active]{--tw-gradient-to:var(--color-pink-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.data-\[state\=active\]\:to-teal-500[data-state=active]{--tw-gradient-to:var(--color-teal-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=active\]\:text-white[data-state=active]{color:var(--color-white)}.data-\[state\=active\]\:shadow-lg[data-state=active]{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a)}.data-\[state\=active\]\:shadow-lg[data-state=active],.data-\[state\=active\]\:shadow-sm[data-state=active]{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a)}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x:var(--radix-toast-swipe-end-x);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x:var(--radix-toast-swipe-move-x);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}@media (min-width:40rem){.sm\:top-auto{top:auto}.sm\:right-0{right:calc(var(--spacing)*0)}.sm\:-bottom-6{bottom:calc(var(--spacing)*-6)}.sm\:bottom-0{bottom:calc(var(--spacing)*0)}.sm\:mt-6{margin-top:calc(var(--spacing)*6)}.sm\:mb-6{margin-bottom:calc(var(--spacing)*6)}.sm\:mb-8{margin-bottom:calc(var(--spacing)*8)}.sm\:mb-12{margin-bottom:calc(var(--spacing)*12)}.sm\:hidden{display:none}.sm\:inline{display:inline}.sm\:h-2{height:calc(var(--spacing)*2)}.sm\:h-4{height:calc(var(--spacing)*4)}.sm\:h-5{height:calc(var(--spacing)*5)}.sm\:h-8{height:calc(var(--spacing)*8)}.sm\:h-10{height:calc(var(--spacing)*10)}.sm\:h-12{height:calc(var(--spacing)*12)}.sm\:h-14{height:calc(var(--spacing)*14)}.sm\:h-16{height:calc(var(--spacing)*16)}.sm\:h-20{height:calc(var(--spacing)*20)}.sm\:w-2{width:calc(var(--spacing)*2)}.sm\:w-5{width:calc(var(--spacing)*5)}.sm\:w-8{width:calc(var(--spacing)*8)}.sm\:w-10{width:calc(var(--spacing)*10)}.sm\:w-12{width:calc(var(--spacing)*12)}.sm\:w-16{width:calc(var(--spacing)*16)}.sm\:w-20{width:calc(var(--spacing)*20)}.sm\:w-auto{width:auto}.sm\:max-w-\[425px\]{max-width:425px}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-col{flex-direction:column}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}:where(.sm\:space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.sm\:space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.sm\:space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}:where(.sm\:space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))}.sm\:self-center{align-self:center}.sm\:rounded-lg{border-radius:var(--radius-lg)}.sm\:p-4{padding:calc(var(--spacing)*4)}.sm\:p-6{padding:calc(var(--spacing)*6)}.sm\:p-8{padding:calc(var(--spacing)*8)}.sm\:px-4{padding-inline:calc(var(--spacing)*4)}.sm\:px-6{padding-inline:calc(var(--spacing)*6)}.sm\:px-8{padding-inline:calc(var(--spacing)*8)}.sm\:pb-4{padding-bottom:calc(var(--spacing)*4)}.sm\:text-left{text-align:left}.sm\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.sm\:text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.sm\:text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.sm\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.sm\:text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.sm\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.sm\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.sm\:tracking-\[0\.5em\]{--tw-tracking:.5em;letter-spacing:.5em}}@media (min-width:48rem){.md\:max-w-\[420px\]{max-width:420px}.md\:p-8{padding:calc(var(--spacing)*8)}.md\:p-12{padding:calc(var(--spacing)*12)}.md\:text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}}}:root{--background:0 0% 100%;--foreground:225 15% 20%;--card:0 0% 100%;--card-foreground:225 15% 20%;--popover:0 0% 100%;--popover-foreground:225 15% 20%;--primary:262 83% 58%;--primary-foreground:0 0% 100%;--secondary:220 14% 96%;--secondary-foreground:225 15% 20%;--muted:220 14% 96%;--muted-foreground:215 13% 55%;--accent:210 40% 94%;--accent-foreground:225 15% 20%;--destructive:0 72% 51%;--destructive-foreground:0 0% 100%;--border:220 13% 91%;--input:220 13% 91%;--ring:262 83% 58%;--radius:.75rem}.dark{--background:224 71% 4%;--foreground:213 31% 91%;--card:224 71% 4%;--card-foreground:213 31% 91%;--popover:224 71% 4%;--popover-foreground:213 31% 91%;--primary:263 70% 50%;--primary-foreground:213 31% 91%;--secondary:215 28% 17%;--secondary-foreground:213 31% 91%;--muted:215 28% 17%;--muted-foreground:217 11% 65%;--accent:215 28% 17%;--accent-foreground:213 31% 91%;--destructive:0 63% 31%;--destructive-foreground:213 31% 91%;--border:215 28% 17%;--input:215 28% 17%;--ring:263 70% 50%}*{border-color:hsl(var(--border));box-sizing:border-box}html{height:100%;overflow-x:hidden}body{color:hsl(var(--foreground));font-family:var(--font-geist-sans),-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;background:linear-gradient(135deg,#f8fafc,#f1f5f9);min-height:100vh;margin:0;padding:0;overflow:hidden}.hero-gradient{background:linear-gradient(135deg,#667eea,#764ba2)}.glass-card{-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);background:#fffffff2;border:1px solid #fff3;box-shadow:0 8px 32px #0000001a}.upload-area{background:linear-gradient(135deg,#667eea0d,#764ba20d);border:2px dashed #667eea4d;transition:all .3s cubic-bezier(.4,0,.2,1)}.upload-area:hover{background:linear-gradient(135deg,#667eea1a,#764ba21a);border-color:#667eea99;transform:translateY(-2px)}.upload-area.drag-active{border-color:hsl(var(--primary));background:linear-gradient(135deg,#667eea26,#764ba226);transform:scale(1.02)}.button-primary{background:linear-gradient(135deg,#667eea,#764ba2);transition:all .3s cubic-bezier(.4,0,.2,1)}.button-primary:hover{transform:translateY(-1px);box-shadow:0 10px 25px #667eea4d}.code-display{background:linear-gradient(135deg,#f8fafc,#e2e8f0);border:1px solid #cbd5e1}@keyframes fadeInUp{0%{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}@keyframes float{0%,to{transform:translateY(0)}50%{transform:translateY(-10px)}}@keyframes slideInRight{0%{opacity:0;transform:translate(100%)}to{opacity:1;transform:translate(0)}}@keyframes slideInDown{0%{opacity:0;transform:translateY(-100%)}to{opacity:1;transform:translateY(0)}}.animate-fade-in-up{animation:fadeInUp .6s ease-out}.animate-float{animation:float 6s ease-in-out infinite}.animate-slide-in-right{animation:slideInRight .3s ease-out}.animate-slide-in-down{animation:slideInDown .3s ease-out}.animate-fade-in{animation:fadeIn .3s ease-out}.animate-scale-in{animation:scaleIn .3s ease-out}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes scaleIn{0%{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(1turn)}}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}} \ No newline at end of file diff --git a/internal/web/frontend/_next/static/css/f6f47fde0030ec04.css b/internal/web/frontend/_next/static/css/f6f47fde0030ec04.css new file mode 100644 index 0000000..7d9e8be --- /dev/null +++ b/internal/web/frontend/_next/static/css/f6f47fde0030ec04.css @@ -0,0 +1,3 @@ +@font-face{font-family:Geist;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/8d697b304b401681-s.woff2) format("woff2");unicode-range:u+0301,u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}@font-face{font-family:Geist;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/ba015fad6dcf6784-s.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c0,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-family:Geist;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/569ce4b8f30dc480-s.p.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-family:Geist Fallback;src:local("Arial");ascent-override:95.94%;descent-override:28.16%;line-gap-override:0.00%;size-adjust:104.76%}.__className_5cfdac{font-family:Geist,Geist Fallback;font-style:normal}.__variable_5cfdac{--font-geist-sans:"Geist","Geist Fallback"}@font-face{font-family:Geist Mono;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/9610d9e46709d722-s.woff2) format("woff2");unicode-range:u+0301,u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}@font-face{font-family:Geist Mono;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/747892c23ea88013-s.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c0,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-family:Geist Mono;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/93f479601ee12b01-s.p.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-family:Geist Mono Fallback;src:local("Arial");ascent-override:74.67%;descent-override:21.92%;line-gap-override:0.00%;size-adjust:134.59%}.__className_9a8899{font-family:Geist Mono,Geist Mono Fallback;font-style:normal}.__variable_9a8899{--font-geist-mono:"Geist Mono","Geist Mono Fallback"} + +/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:host,:root{--color-red-50:oklch(97.1% .013 17.38);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-800:oklch(44.4% .177 26.899);--color-orange-50:oklch(98% .016 73.684);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-amber-600:oklch(66.6% .179 58.318);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-800:oklch(43.2% .095 166.913);--color-emerald-900:oklch(37.8% .077 168.94);--color-teal-50:oklch(98.4% .014 180.72);--color-teal-500:oklch(70.4% .14 182.503);--color-teal-600:oklch(60% .118 184.704);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-800:oklch(42.4% .199 265.638);--color-indigo-50:oklch(96.2% .018 272.314);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-purple-50:oklch(97.7% .014 308.299);--color-purple-200:oklch(90.2% .063 306.703);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-pink-50:oklch(97.1% .014 343.198);--color-pink-500:oklch(65.6% .241 354.308);--color-pink-600:oklch(59.2% .249 .584);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-lg:32rem;--container-xl:36rem;--container-4xl:56rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height:calc(1.5/1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25/1.875);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wider:.05em;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--animate-bounce:bounce 1s infinite;--blur-sm:8px;--aspect-video:16/9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-geist-sans);--default-mono-font-family:var(--font-geist-mono);--radius:var(--radius)}}@layer base{*,::backdrop,:after,:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}:host,html{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,optgroup,select,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden}.absolute,.sr-only{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing)*0)}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-2{top:calc(var(--spacing)*2)}.top-4{top:calc(var(--spacing)*4)}.top-\[50\%\]{top:50%}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-4{right:calc(var(--spacing)*4)}.-bottom-4{bottom:calc(var(--spacing)*-4)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-1{bottom:calc(var(--spacing)*1)}.left-0{left:calc(var(--spacing)*0)}.left-1{left:calc(var(--spacing)*1)}.left-1\/2,.left-\[50\%\]{left:50%}.z-50{z-index:50}.z-\[100\]{z-index:100}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mx-4{margin-inline:calc(var(--spacing)*4)}.mx-auto{margin-inline:auto}.mt-0{margin-top:calc(var(--spacing)*0)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-6{margin-top:calc(var(--spacing)*6)}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.ml-2{margin-left:calc(var(--spacing)*2)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.aspect-video{aspect-ratio:var(--aspect-video)}.h-0\.5{height:calc(var(--spacing)*.5)}.h-1{height:calc(var(--spacing)*1)}.h-1\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-3\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-11{height:calc(var(--spacing)*11)}.h-12{height:calc(var(--spacing)*12)}.h-16{height:calc(var(--spacing)*16)}.h-24{height:calc(var(--spacing)*24)}.h-auto{height:auto}.h-full{height:100%}.max-h-\[80vh\]{max-height:80vh}.max-h-\[90vh\]{max-height:90vh}.max-h-screen{max-height:100vh}.min-h-\[80px\]{min-height:80px}.min-h-\[150px\]{min-height:150px}.min-h-screen{min-height:100vh}.w-1{width:calc(var(--spacing)*1)}.w-1\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-3{width:calc(var(--spacing)*3)}.w-3\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-16{width:calc(var(--spacing)*16)}.w-64{width:calc(var(--spacing)*64)}.w-full{width:100%}.w-px{width:1px}.max-w-4xl{max-width:var(--container-4xl)}.max-w-\[90vw\]{max-width:90vw}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x:calc(calc(1/2*100%)*-1)}.-translate-x-1\/2,.translate-x-\[-50\%\]{translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-\[-50\%\]{--tw-translate-x:-50%}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-110{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-bounce{animation:var(--animate-bounce)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*1)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*3)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap}.overflow-hidden,.truncate{overflow:hidden}.rounded{border-radius:var(--radius)}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e+38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-blue-200{border-color:var(--color-blue-200)}.border-destructive{border-color:hsl(var(--destructive))}.border-emerald-200{border-color:var(--color-emerald-200)}.border-input{border-color:hsl(var(--input))}.border-orange-300{border-color:var(--color-orange-300)}.border-purple-200{border-color:var(--color-purple-200)}.border-red-200{border-color:var(--color-red-200)}.border-red-300{border-color:var(--color-red-300)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-300{border-color:var(--color-slate-300)}.border-white{border-color:var(--color-white)}.border-white\/20{border-color:#fff3}@supports (color:color-mix(in lab,red,red)){.border-white\/20{border-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.border-t-transparent{border-top-color:#0000}.bg-background{background-color:hsl(var(--background))}.bg-black{background-color:var(--color-black)}.bg-black\/80{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.bg-black\/80{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}.bg-blue-50\/90{background-color:#eff6ffe6}@supports (color:color-mix(in lab,red,red)){.bg-blue-50\/90{background-color:color-mix(in oklab,var(--color-blue-50)90%,transparent)}}.bg-blue-500{background-color:var(--color-blue-500)}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-50\/50{background-color:#ecfdf580}@supports (color:color-mix(in lab,red,red)){.bg-emerald-50\/50{background-color:color-mix(in oklab,var(--color-emerald-50)50%,transparent)}}.bg-emerald-50\/90{background-color:#ecfdf5e6}@supports (color:color-mix(in lab,red,red)){.bg-emerald-50\/90{background-color:color-mix(in oklab,var(--color-emerald-50)90%,transparent)}}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-muted{background-color:hsl(var(--muted))}.bg-orange-100{background-color:var(--color-orange-100)}.bg-orange-500{background-color:var(--color-orange-500)}.bg-primary{background-color:hsl(var(--primary))}.bg-purple-500{background-color:var(--color-purple-500)}.bg-red-50\/90{background-color:#fef2f2e6}@supports (color:color-mix(in lab,red,red)){.bg-red-50\/90{background-color:color-mix(in oklab,var(--color-red-50)90%,transparent)}}.bg-red-500{background-color:var(--color-red-500)}.bg-secondary{background-color:hsl(var(--secondary))}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-400{background-color:var(--color-slate-400)}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-900\/80{background-color:#0f172bcc}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\/80{background-color:color-mix(in oklab,var(--color-slate-900)80%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.bg-white\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.bg-white\/80{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}.bg-white\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.bg-white\/90{background-color:color-mix(in oklab,var(--color-white)90%,transparent)}}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab}.bg-gradient-to-b,.bg-gradient-to-br{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab}.bg-gradient-to-r{--tw-gradient-position:to right in oklab}.bg-gradient-to-r,.bg-gradient-to-t{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-t{--tw-gradient-position:to top in oklab}.from-blue-50{--tw-gradient-from:var(--color-blue-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-blue-100{--tw-gradient-from:var(--color-blue-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-blue-400{--tw-gradient-from:var(--color-blue-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-blue-500{--tw-gradient-from:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-blue-600{--tw-gradient-from:var(--color-blue-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-emerald-50{--tw-gradient-from:var(--color-emerald-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-emerald-500{--tw-gradient-from:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-emerald-600{--tw-gradient-from:var(--color-emerald-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-indigo-500{--tw-gradient-from:var(--color-indigo-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-orange-500{--tw-gradient-from:var(--color-orange-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-purple-50{--tw-gradient-from:var(--color-purple-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-purple-500{--tw-gradient-from:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-red-500{--tw-gradient-from:var(--color-red-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-slate-50{--tw-gradient-from:var(--color-slate-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-slate-900\/60{--tw-gradient-from:#0f172b99}@supports (color:color-mix(in lab,red,red)){.from-slate-900\/60{--tw-gradient-from:color-mix(in oklab,var(--color-slate-900)60%,transparent)}}.from-slate-900\/60{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.via-blue-50{--tw-gradient-via:var(--color-blue-50);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-purple-400{--tw-gradient-via:var(--color-purple-400);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-purple-600{--tw-gradient-via:var(--color-purple-600);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-blue-50{--tw-gradient-to:var(--color-blue-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-emerald-600{--tw-gradient-to:var(--color-emerald-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-indigo-50{--tw-gradient-to:var(--color-indigo-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-indigo-100{--tw-gradient-to:var(--color-indigo-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-indigo-400{--tw-gradient-to:var(--color-indigo-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-indigo-500{--tw-gradient-to:var(--color-indigo-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-indigo-600{--tw-gradient-to:var(--color-indigo-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-orange-600{--tw-gradient-to:var(--color-orange-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-pink-50{--tw-gradient-to:var(--color-pink-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-pink-500{--tw-gradient-to:var(--color-pink-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-purple-500{--tw-gradient-to:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-teal-50{--tw-gradient-to:var(--color-teal-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-teal-500{--tw-gradient-to:var(--color-teal-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-teal-600{--tw-gradient-to:var(--color-teal-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-1{padding:calc(var(--spacing)*1)}.p-1\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.pt-0{padding-top:calc(var(--spacing)*0)}.pt-6{padding-top:calc(var(--spacing)*6)}.pr-8{padding-right:calc(var(--spacing)*8)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:var(--font-geist-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[0\.3em\]{--tw-tracking:.3em;letter-spacing:.3em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.text-amber-600{color:var(--color-amber-600)}.text-blue-600{color:var(--color-blue-600)}.text-blue-800{color:var(--color-blue-800)}.text-card-foreground{color:hsl(var(--card-foreground))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-700{color:var(--color-emerald-700)}.text-emerald-800{color:var(--color-emerald-800)}.text-emerald-900{color:var(--color-emerald-900)}.text-foreground,.text-foreground\/50{color:hsl(var(--foreground))}@supports (color:color-mix(in lab,red,red)){.text-foreground\/50{color:color-mix(in oklab,hsl(var(--foreground))50%,transparent)}}.text-indigo-600{color:var(--color-indigo-600)}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-orange-600{color:var(--color-orange-600)}.text-orange-700{color:var(--color-orange-700)}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-purple-600{color:var(--color-purple-600)}.text-purple-700{color:var(--color-purple-700)}.text-red-600{color:var(--color-red-600)}.text-red-800{color:var(--color-red-800)}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-transparent{color:#0000}.text-white{color:var(--color-white)}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040)}.shadow-2xl,.shadow-lg{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}@media (hover:hover){.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.group-\[\.destructive\]\:border-muted\/40:is(:where(.group).destructive *){border-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.group-\[\.destructive\]\:border-muted\/40:is(:where(.group).destructive *){border-color:color-mix(in oklab,hsl(var(--muted))40%,transparent)}}.group-\[\.destructive\]\:text-red-300:is(:where(.group).destructive *){color:var(--color-red-300)}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}@media (hover:hover){.hover\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\:border-blue-400:hover{border-color:var(--color-blue-400)}.hover\:border-emerald-400:hover{border-color:var(--color-emerald-400)}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-blue-600:hover{background-color:var(--color-blue-600)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,hsl(var(--destructive))90%,transparent)}}.hover\:bg-emerald-600:hover{background-color:var(--color-emerald-600)}.hover\:bg-orange-50:hover{background-color:var(--color-orange-50)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,hsl(var(--primary))90%,transparent)}}.hover\:bg-purple-600:hover{background-color:var(--color-purple-600)}.hover\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\:bg-secondary:hover,.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,hsl(var(--secondary))80%,transparent)}}.hover\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\:bg-white\/30:hover{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/30:hover{background-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.hover\:from-blue-600:hover{--tw-gradient-from:var(--color-blue-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hover\:from-emerald-600:hover{--tw-gradient-from:var(--color-emerald-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hover\:from-indigo-600:hover{--tw-gradient-from:var(--color-indigo-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hover\:from-purple-600:hover{--tw-gradient-from:var(--color-purple-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hover\:from-red-600:hover{--tw-gradient-from:var(--color-red-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hover\:to-indigo-600:hover{--tw-gradient-to:var(--color-indigo-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hover\:to-pink-600:hover{--tw-gradient-to:var(--color-pink-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hover\:to-purple-600:hover{--tw-gradient-to:var(--color-purple-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hover\:to-teal-600:hover{--tw-gradient-to:var(--color-teal-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-red-500:hover{color:var(--color-red-500)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a)}.hover\:shadow-md:hover,.hover\:shadow-xl:hover{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-xl:hover{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a)}.group-\[\.destructive\]\:hover\:border-destructive\/30:is(:where(.group).destructive *):hover{border-color:hsl(var(--destructive))}@supports (color:color-mix(in lab,red,red)){.group-\[\.destructive\]\:hover\:border-destructive\/30:is(:where(.group).destructive *):hover{border-color:color-mix(in oklab,hsl(var(--destructive))30%,transparent)}}.group-\[\.destructive\]\:hover\:bg-destructive:is(:where(.group).destructive *):hover{background-color:hsl(var(--destructive))}.group-\[\.destructive\]\:hover\:text-destructive-foreground:is(:where(.group).destructive *):hover{color:hsl(var(--destructive-foreground))}.group-\[\.destructive\]\:hover\:text-red-50:is(:where(.group).destructive *):hover{color:var(--color-red-50)}}.focus\:border-blue-500:focus{border-color:var(--color-blue-500)}.focus\:border-emerald-500:focus{border-color:var(--color-emerald-500)}.focus\:border-indigo-500:focus{border-color:var(--color-indigo-500)}.focus\:opacity-100:focus{opacity:1}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.focus\:ring-emerald-500:focus{--tw-ring-color:var(--color-emerald-500)}.focus\:ring-indigo-500:focus{--tw-ring-color:var(--color-indigo-500)}.focus\:ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.group-\[\.destructive\]\:focus\:ring-destructive:is(:where(.group).destructive *):focus{--tw-ring-color:hsl(var(--destructive))}.group-\[\.destructive\]\:focus\:ring-red-400:is(:where(.group).destructive *):focus{--tw-ring-color:var(--color-red-400)}.group-\[\.destructive\]\:focus\:ring-offset-red-600:is(:where(.group).destructive *):focus{--tw-ring-offset-color:var(--color-red-600)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:scale-100:disabled{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=active\]\:bg-blue-500[data-state=active]{background-color:var(--color-blue-500)}.data-\[state\=active\]\:bg-emerald-500[data-state=active]{background-color:var(--color-emerald-500)}.data-\[state\=active\]\:bg-purple-500[data-state=active]{background-color:var(--color-purple-500)}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=active\]\:text-white[data-state=active]{color:var(--color-white)}.data-\[state\=active\]\:shadow-md[data-state=active]{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a)}.data-\[state\=active\]\:shadow-md[data-state=active],.data-\[state\=active\]\:shadow-sm[data-state=active]{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a)}@media (hover:hover){.data-\[state\=active\]\:hover\:bg-blue-600[data-state=active]:hover{background-color:var(--color-blue-600)}.data-\[state\=active\]\:hover\:bg-emerald-600[data-state=active]:hover{background-color:var(--color-emerald-600)}.data-\[state\=active\]\:hover\:bg-purple-600[data-state=active]:hover{background-color:var(--color-purple-600)}}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x:var(--radix-toast-swipe-end-x);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x:var(--radix-toast-swipe-move-x);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}@media (min-width:40rem){.sm\:top-auto{top:auto}.sm\:right-0{right:calc(var(--spacing)*0)}.sm\:-bottom-6{bottom:calc(var(--spacing)*-6)}.sm\:bottom-0{bottom:calc(var(--spacing)*0)}.sm\:mt-6{margin-top:calc(var(--spacing)*6)}.sm\:mb-6{margin-bottom:calc(var(--spacing)*6)}.sm\:mb-8{margin-bottom:calc(var(--spacing)*8)}.sm\:hidden{display:none}.sm\:inline{display:inline}.sm\:h-2{height:calc(var(--spacing)*2)}.sm\:h-4{height:calc(var(--spacing)*4)}.sm\:h-8{height:calc(var(--spacing)*8)}.sm\:h-10{height:calc(var(--spacing)*10)}.sm\:h-12{height:calc(var(--spacing)*12)}.sm\:h-16{height:calc(var(--spacing)*16)}.sm\:h-20{height:calc(var(--spacing)*20)}.sm\:w-2{width:calc(var(--spacing)*2)}.sm\:w-8{width:calc(var(--spacing)*8)}.sm\:w-10{width:calc(var(--spacing)*10)}.sm\:w-12{width:calc(var(--spacing)*12)}.sm\:w-16{width:calc(var(--spacing)*16)}.sm\:w-20{width:calc(var(--spacing)*20)}.sm\:w-80{width:calc(var(--spacing)*80)}.sm\:w-auto{width:auto}.sm\:max-w-\[425px\]{max-width:425px}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-col{flex-direction:column}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}:where(.sm\:space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.sm\:space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.sm\:space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}:where(.sm\:space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius-lg)}.sm\:p-4{padding:calc(var(--spacing)*4)}.sm\:p-6{padding:calc(var(--spacing)*6)}.sm\:p-8{padding:calc(var(--spacing)*8)}.sm\:px-4{padding-inline:calc(var(--spacing)*4)}.sm\:px-6{padding-inline:calc(var(--spacing)*6)}.sm\:px-8{padding-inline:calc(var(--spacing)*8)}.sm\:py-6{padding-block:calc(var(--spacing)*6)}.sm\:pb-4{padding-bottom:calc(var(--spacing)*4)}.sm\:text-left{text-align:left}.sm\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.sm\:text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.sm\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.sm\:text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.sm\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.sm\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.sm\:tracking-\[0\.5em\]{--tw-tracking:.5em;letter-spacing:.5em}}@media (min-width:48rem){.md\:w-96{width:calc(var(--spacing)*96)}.md\:max-w-\[420px\]{max-width:420px}.md\:p-12{padding:calc(var(--spacing)*12)}.md\:py-8{padding-block:calc(var(--spacing)*8)}.md\:text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}}@media (min-width:64rem){.lg\:w-\[32rem\]{width:32rem}}@media (min-width:80rem){.xl\:w-\[40rem\]{width:40rem}}}:root{--background:0 0% 100%;--foreground:225 15% 20%;--card:0 0% 100%;--card-foreground:225 15% 20%;--popover:0 0% 100%;--popover-foreground:225 15% 20%;--primary:262 83% 58%;--primary-foreground:0 0% 100%;--secondary:220 14% 96%;--secondary-foreground:225 15% 20%;--muted:220 14% 96%;--muted-foreground:215 13% 55%;--accent:210 40% 94%;--accent-foreground:225 15% 20%;--destructive:0 72% 51%;--destructive-foreground:0 0% 100%;--border:220 13% 91%;--input:220 13% 91%;--ring:262 83% 58%;--radius:.75rem}.dark{--background:224 71% 4%;--foreground:213 31% 91%;--card:224 71% 4%;--card-foreground:213 31% 91%;--popover:224 71% 4%;--popover-foreground:213 31% 91%;--primary:263 70% 50%;--primary-foreground:213 31% 91%;--secondary:215 28% 17%;--secondary-foreground:213 31% 91%;--muted:215 28% 17%;--muted-foreground:217 11% 65%;--accent:215 28% 17%;--accent-foreground:213 31% 91%;--destructive:0 63% 31%;--destructive-foreground:213 31% 91%;--border:215 28% 17%;--input:215 28% 17%;--ring:263 70% 50%}*{border-color:hsl(var(--border));box-sizing:border-box}html{height:100%;overflow-x:hidden}body{color:hsl(var(--foreground));font-family:var(--font-geist-sans),-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;background:linear-gradient(135deg,#f8fafc,#f1f5f9);min-height:100vh;margin:0;padding:0;overflow:hidden}.hero-gradient{background:linear-gradient(135deg,#667eea,#764ba2)}.glass-card{-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);background:#fffffff2;border:1px solid #fff3;box-shadow:0 8px 32px #0000001a}.upload-area{background:linear-gradient(135deg,#667eea0d,#764ba20d);border:2px dashed #667eea4d;transition:all .3s cubic-bezier(.4,0,.2,1)}.upload-area:hover{background:linear-gradient(135deg,#667eea1a,#764ba21a);border-color:#667eea99;transform:translateY(-2px)}.upload-area.drag-active{border-color:hsl(var(--primary));background:linear-gradient(135deg,#667eea26,#764ba226);transform:scale(1.02)}.button-primary{background:linear-gradient(135deg,#667eea,#764ba2);transition:all .3s cubic-bezier(.4,0,.2,1)}.button-primary:hover{transform:translateY(-1px);box-shadow:0 10px 25px #667eea4d}.code-display{background:linear-gradient(135deg,#f8fafc,#e2e8f0);border:1px solid #cbd5e1}@keyframes fadeInUp{0%{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}@keyframes float{0%,to{transform:translateY(0)}50%{transform:translateY(-10px)}}@keyframes slideInRight{0%{opacity:0;transform:translate(100%)}to{opacity:1;transform:translate(0)}}@keyframes slideInDown{0%{opacity:0;transform:translateY(-100%)}to{opacity:1;transform:translateY(0)}}.animate-fade-in-up{animation:fadeInUp .6s ease-out}.animate-float{animation:float 6s ease-in-out infinite}.animate-slide-in-right{animation:slideInRight .3s ease-out}.animate-slide-in-down{animation:slideInDown .3s ease-out}.animate-fade-in{animation:fadeIn .3s ease-out}.animate-scale-in{animation:scaleIn .3s ease-out}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes scaleIn{0%{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(1turn)}}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}} \ No newline at end of file diff --git a/internal/web/frontend/index.html b/internal/web/frontend/index.html index f85a4c6..625f24c 100644 --- a/internal/web/frontend/index.html +++ b/internal/web/frontend/index.html @@ -1 +1 @@ -File Transfer - 文件传输
加载中...
\ No newline at end of file +File Transfer - 文件传输
加载中...
\ No newline at end of file diff --git a/internal/web/frontend/index.txt b/internal/web/frontend/index.txt index dd0ac9a..3f75408 100644 --- a/internal/web/frontend/index.txt +++ b/internal/web/frontend/index.txt @@ -2,7 +2,7 @@ 2:I[6801,["177","static/chunks/app/layout-d0f2a5cbcfca20f5.js"],"ToastProvider"] 3:I[7555,[],""] 4:I[1295,[],""] -5:I[5055,["984","static/chunks/984-39bc34483f07a61c.js","974","static/chunks/app/page-f438e315cafde810.js"],"default"] +5:I[1287,["423","static/chunks/423-3db9dd818e8fd852.js","974","static/chunks/app/page-6f704b6eb3095813.js"],"default"] 6:I[9665,[],"OutletBoundary"] 8:I[4911,[],"AsyncMetadataOutlet"] a:I[9665,[],"ViewportBoundary"] @@ -11,8 +11,8 @@ d:"$Sreact.suspense" f:I[8393,[],""] :HL["/_next/static/media/569ce4b8f30dc480-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}] :HL["/_next/static/media/93f479601ee12b01-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -:HL["/_next/static/css/7908b4c934e87974.css","style"] -0:{"P":null,"b":"dIaE9ChLg6gKLX3iG0ErS","p":"","c":["",""],"i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/7908b4c934e87974.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"zh-CN","children":["$","body",null,{"className":"__variable_5cfdac __variable_9a8899 antialiased","children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$L5",null,{}],null,["$","$L6",null,{"children":["$L7",["$","$L8",null,{"promise":"$@9"}]]}]]}],{},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$La",null,{"children":"$Lb"}],["$","meta",null,{"name":"next-size-adjust","content":""}]],["$","$Lc",null,{"children":["$","div",null,{"hidden":true,"children":["$","$d",null,{"fallback":null,"children":"$Le"}]}]}]]}],false]],"m":"$undefined","G":["$f",[]],"s":false,"S":true} +:HL["/_next/static/css/f6f47fde0030ec04.css","style"] +0:{"P":null,"b":"8bbWAyBmnmNj0Jk5ryXl4","p":"","c":["",""],"i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/f6f47fde0030ec04.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"zh-CN","children":["$","body",null,{"className":"__variable_5cfdac __variable_9a8899 antialiased","children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$L5",null,{}],null,["$","$L6",null,{"children":["$L7",["$","$L8",null,{"promise":"$@9"}]]}]]}],{},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$La",null,{"children":"$Lb"}],["$","meta",null,{"name":"next-size-adjust","content":""}]],["$","$Lc",null,{"children":["$","div",null,{"hidden":true,"children":["$","$d",null,{"fallback":null,"children":"$Le"}]}]}]]}],false]],"m":"$undefined","G":["$f",[]],"s":false,"S":true} b:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] 7:null 10:I[8175,[],"IconMark"]