diff --git a/app/actions.ts b/app/actions.ts index bd5d8a1..0394161 100644 --- a/app/actions.ts +++ b/app/actions.ts @@ -1,5 +1,6 @@ 'use server'; +import { OpenAI } from 'openai'; import { generateObject } from 'ai'; import { createOpenAI as createGroq } from '@ai-sdk/openai'; import { z } from 'zod'; @@ -9,6 +10,10 @@ const groq = createGroq({ apiKey: process.env.GROQ_API_KEY, }); +const openai = new OpenAI({ + apiKey: process.env.OPENAI_API_KEY, +}); + export async function suggestQuestions(history: any[]) { 'use server'; @@ -23,6 +28,7 @@ Try to stick to the context of the conversation and avoid asking questions that For weather based converations sent to you, always generate questions that are about news, sports, or other topics that are not related to the weather. For programming based conversations, always generate questions that are about the algorithms, data structures, or other topics that are related to it or an improvement of the question. For location based conversations, always generate questions that are about the culture, history, or other topics that are related to the location. +For the translation based conversations, always generate questions that may continue the conversation or ask for more information or translations. Never use pronouns in the questions as they blur the context.`, messages: history, schema: z.object({ @@ -33,4 +39,19 @@ Never use pronouns in the questions as they blur the context.`, return { questions: object.questions }; +} + +export async function generateSpeech(text: string, voice: 'alloy' | 'echo' | 'fable' | 'onyx' | 'nova' | 'shimmer' = "alloy") { + const response = await openai.audio.speech.create({ + model: "tts-1", + voice: voice, + input: text, + }); + + const arrayBuffer = await response.arrayBuffer(); + const base64Audio = Buffer.from(arrayBuffer).toString('base64'); + + return { + audio: `data:audio/mp3;base64,${base64Audio}`, + }; } \ No newline at end of file diff --git a/app/api/chat/route.ts b/app/api/chat/route.ts index 99602d5..76d165e 100644 --- a/app/api/chat/route.ts +++ b/app/api/chat/route.ts @@ -28,7 +28,7 @@ The user is located in ${city}(${latitude}, ${longitude}). Here are the tools available to you: -web_search, retrieve, get_weather_data, programming, nearby_search, find_place, text_search +web_search, retrieve, get_weather_data, programming, nearby_search, find_place, text_search, text_translate Here is the general guideline per tool to follow when responding to user queries: @@ -36,9 +36,12 @@ Here is the general guideline per tool to follow when responding to user queries - If you need to retrieve specific information from a webpage, use the retrieve tool. Analyze the user's query to set the topic type either normal or news. Then, compose your response based on the retrieved information. - For weather-related queries, use the get_weather_data tool. The weather results are 5 days weather forecast data with 3-hour step. Then, provide the weather information in your response. - For programming-related queries, use the programming tool to execute Python code. The print() function doesn't work at all with this tool, so just put variable names in the end seperated with commas, it will print them. Then, compose your response based on the output of the code execution. +- The programming tool runs the code in a jupyper notebook environment. Use this tool for tasks that require code execution, such as data analysis, calculations, or visualizations. - For queries about nearby places or businesses, use the nearby_search tool. Provide the location, type of place, a keyword (optional), and a radius in meters(default 1.5 Kilometers). Then, compose your response based on the search results. - For queries about finding a specific place, use the find_place tool. Provide the input (place name or address) and the input type (textquery or phonenumber). Then, compose your response based on the search results. - For text-based searches of places, use the text_search tool. Provide the query, location (optional), and radius (optional). Then, compose your response based on the search results. +- For text translation queries, use the text_translate tool. Provide the text to translate, the language to translate to, and the source language (optional). Then, compose your response based on the translated text. +- Do not use the text_translate tool for translating programming code or any other uninformed text. Only run the tool for translating on user's request. - Do not use the retrieve tool for general web searches. It is only for retrieving specific information from a URL. - Show plots from the programming tool using plt.show() function. The tool will automatically capture the plot and display it in the response. - If asked for multiple plots, make it happen in one run of the tool. The tool will automatically capture the plots and display them in the response. @@ -50,10 +53,13 @@ Here is the general guideline per tool to follow when responding to user queries Always remember to run the appropriate tool first, then compose your response based on the information gathered. All tool should be called only once per response. +The programming tool is actually a Python Code interpreter, so you can run any Python code in it. + Citations should always be placed at the end of each paragraph and in the end of sentences where you use it in which they are referred to with the given format to the information provided. When citing sources(citations), use the following styling only: Claude 3.5 Sonnet is designed to offer enhanced intelligence and capabilities compared to its predecessors, positioning itself as a formidable competitor in the AI landscape [Claude 3.5 Sonnet raises the..](https://www.anthropic.com/news/claude-3-5-sonnet). ALWAYS REMEMBER TO USE THE CITATIONS FORMAT CORRECTLY AT ALL COSTS!! ANY SINGLE ITCH IN THE FORMAT WILL CRASH THE RESPONSE!! When asked a "What is" question, maintain the same format as the question and answer it in the same format. +The response should include latex equations, use the format $$ for inline equations, $$$$ for block equations and \[ \] for math blocks. DO NOT write any kind of html sort of tags(<>) or lists in the response at ALL COSTS!! NOT EVEN AN ENCLOSING TAGS FOR THE RESPONSE AT ALL COSTS!! @@ -339,6 +345,37 @@ Just run the tool and provide the answer.`, return data; }, }), + text_translate: tool({ + description: "Translate text from one language to another using Microsoft Translator.", + parameters: z.object({ + text: z.string().describe("The text to translate."), + to: z.string().describe("The language to translate to (e.g., 'fr' for French)."), + from: z.string().optional().describe("The source language (optional, will be auto-detected if not provided)."), + }), + execute: async ({ text, to, from }: { text: string; to: string; from?: string }) => { + const key = process.env.AZURE_TRANSLATOR_KEY; + const endpoint = "https://api.cognitive.microsofttranslator.com"; + const location = process.env.AZURE_TRANSLATOR_LOCATION; + + const url = `${endpoint}/translate?api-version=3.0&to=${to}${from ? `&from=${from}` : ''}`; + + const response = await fetch(url, { + method: 'POST', + headers: { + 'Ocp-Apim-Subscription-Key': key!, + 'Ocp-Apim-Subscription-Region': location!, + 'Content-type': 'application/json', + }, + body: JSON.stringify([{ text }]), + }); + + const data = await response.json(); + return { + translatedText: data[0].translations[0].text, + detectedLanguage: data[0].detectedLanguage?.language, + }; + }, + }), }, toolChoice: "auto", }); diff --git a/app/page.tsx b/app/page.tsx index 708a368..67c206f 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -13,12 +13,16 @@ React, } from 'react'; import ReactMarkdown, { Components } from 'react-markdown'; import remarkGfm from 'remark-gfm'; +import remarkMath from 'remark-math'; +import rehypeKatex from 'rehype-katex'; +import 'katex/dist/katex.min.css'; import { useChat } from 'ai/react'; import { ToolInvocation } from 'ai'; import { toast } from 'sonner'; import { motion, AnimatePresence } from 'framer-motion'; import Image from 'next/image'; -import { suggestQuestions } from './actions'; +import { generateSpeech, suggestQuestions } from './actions'; +import { Wave } from "@foobar404/wave"; import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter'; import { oneLight } from 'react-syntax-highlighter/dist/esm/styles/prism'; import { @@ -42,9 +46,11 @@ import { Plus, Download, Flame, - Video, Sun, - Terminal + Terminal, + Pause, + Play, + RotateCw } from 'lucide-react'; import { HoverCard, @@ -109,7 +115,7 @@ export default function Home() { maxToolRoundtrips: 1, onFinish: async (message, { finishReason }) => { console.log("[finish reason]:", finishReason); - if (message.content && finishReason === 'stop') { + if (message.content && finishReason === 'stop' || finishReason === 'length') { const newHistory = [...messages, { role: "user", content: lastSubmittedQuery }, { role: "assistant", content: message.content }]; const { questions } = await suggestQuestions(newHistory); setSuggestedQuestions(questions); @@ -484,6 +490,147 @@ export default function Home() { TextSearchResult.displayName = 'TextSearchResult'; + const TranslationTool = ({ toolInvocation, result }: { toolInvocation: ToolInvocation; result: any }) => { + const [isPlaying, setIsPlaying] = useState(false); + const [audioUrl, setAudioUrl] = useState(null); + const [isGeneratingAudio, setIsGeneratingAudio] = useState(false); + const audioRef = useRef(null); + const canvasRef = useRef(null); + const waveRef = useRef(null); + + useEffect(() => { + return () => { + if (audioRef.current) { + audioRef.current.pause(); + audioRef.current.src = ''; + } + }; + }, []); + + useEffect(() => { + if (audioUrl && audioRef.current && canvasRef.current) { + waveRef.current = new Wave(audioRef.current, canvasRef.current); + waveRef.current.addAnimation(new waveRef.current.animations.Lines({ + lineColor: "hsl(var(--primary))", + lineWidth: 2, + mirroredY: true, + count: 100, + })); + } + }, [audioUrl]); + + const handlePlayPause = async () => { + if (!audioUrl && !isGeneratingAudio) { + setIsGeneratingAudio(true); + try { + const { audio } = await generateSpeech(result.translatedText, 'alloy'); + setAudioUrl(audio); + setIsGeneratingAudio(false); + } catch (error) { + console.error("Error generating speech:", error); + setIsGeneratingAudio(false); + } + } else if (audioRef.current) { + if (isPlaying) { + audioRef.current.pause(); + } else { + audioRef.current.play(); + } + setIsPlaying(!isPlaying); + } + }; + + const handleReset = () => { + if (audioRef.current) { + audioRef.current.pause(); + audioRef.current.currentTime = 0; + setIsPlaying(false); + } + }; + + if (!result) { + return ( + + +
+
+
+
+
+
+ ); + } + + return ( + + + + + + + Translation Result + + + +
+
+

+ Original Text {result.detectedLanguage} +

+

{toolInvocation.args.text}

+
+
+

+ Translated Text {toolInvocation.args.to} +

+

{result.translatedText}

+
+
+
+

Audio Playback:

+
+ +
+
+ + +
+
+
+ {audioUrl && ( +
+ ); + }; const renderToolInvocation = (toolInvocation: ToolInvocation, index: number) => { const args = JSON.parse(JSON.stringify(toolInvocation.args)); @@ -926,7 +1073,7 @@ export default function Home() { ); } - + if (toolInvocation.toolName === 'retrieve') { if (!result) { return ( @@ -954,7 +1101,7 @@ export default function Home() { ); } - + return (
@@ -987,6 +1134,10 @@ export default function Home() { ); } + if (toolInvocation.toolName === 'text_translate') { + return ; + } + return (
{!result ? ( @@ -1081,10 +1232,10 @@ export default function Home() { children: React.ReactNode; index: number; } - + const CitationComponent: React.FC = React.memo(({ href, index }) => { const faviconUrl = `https://www.google.com/s2/favicons?sz=128&domain=${new URL(href).hostname}`; - + return ( @@ -1106,13 +1257,13 @@ export default function Home() { ); }); - + CitationComponent.displayName = "CitationComponent"; - + interface MarkdownRendererProps { content: string; } - + const MarkdownRenderer: React.FC = React.memo(({ content }) => { const citationLinks = useMemo(() => { return [...content.matchAll(/\[([^\]]+)\]\(([^)]+)\)/g)].map(([_, text, link]) => ({ @@ -1120,7 +1271,7 @@ export default function Home() { link, })); }, [content]); - + const components: Partial = useMemo(() => ({ a: ({ href, children }) => { if (!href) return null; @@ -1136,10 +1287,11 @@ export default function Home() { ); }, }), [citationLinks]); - + return ( @@ -1147,7 +1299,7 @@ export default function Home() { ); }); - + MarkdownRenderer.displayName = "MarkdownRenderer"; const lastUserMessageIndex = useMemo(() => { diff --git a/package.json b/package.json index ee6801b..b3e4804 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "@ai-sdk/cohere": "latest", "@ai-sdk/openai": "latest", "@e2b/code-interpreter": "^0.0.8", + "@foobar404/wave": "^2.0.5", "@mendable/firecrawl-js": "^0.0.36", "@radix-ui/react-accordion": "^1.2.0", "@radix-ui/react-dialog": "^1.1.1", @@ -30,14 +31,18 @@ "clsx": "^2.1.1", "date-fns": "^3.6.0", "framer-motion": "^11.3.19", + "katex": "^0.16.11", "lucide-react": "^0.424.0", "next": "14.2.5", + "openai": "^4.56.0", "react": "^18", "react-dom": "^18", "react-markdown": "^9.0.1", "react-syntax-highlighter": "^15.5.0", "recharts": "^2.12.7", + "rehype-katex": "^7.0.1", "remark-gfm": "^4.0.0", + "remark-math": "^6.0.0", "sonner": "^1.5.0", "tailwind-merge": "^2.4.0", "tailwindcss-animate": "^1.0.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5ad62b4..3a46048 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,13 +7,16 @@ settings: dependencies: '@ai-sdk/cohere': specifier: latest - version: 0.0.19(zod@3.23.8) + version: 0.0.20(zod@3.23.8) '@ai-sdk/openai': specifier: latest - version: 0.0.51(zod@3.23.8) + version: 0.0.53(zod@3.23.8) '@e2b/code-interpreter': specifier: ^0.0.8 version: 0.0.8 + '@foobar404/wave': + specifier: ^2.0.5 + version: 2.0.5 '@mendable/firecrawl-js': specifier: ^0.0.36 version: 0.0.36 @@ -55,7 +58,7 @@ dependencies: version: 1.4.0 ai: specifier: latest - version: 3.3.14(react@18.3.1)(svelte@4.2.18)(vue@3.4.35)(zod@3.23.8) + version: 3.3.16(openai@4.56.0)(react@18.3.1)(svelte@4.2.18)(vue@3.4.35)(zod@3.23.8) class-variance-authority: specifier: ^0.7.0 version: 0.7.0 @@ -68,12 +71,18 @@ dependencies: framer-motion: specifier: ^11.3.19 version: 11.3.20(react-dom@18.3.1)(react@18.3.1) + katex: + specifier: ^0.16.11 + version: 0.16.11 lucide-react: specifier: ^0.424.0 version: 0.424.0(react@18.3.1) next: specifier: 14.2.5 version: 14.2.5(react-dom@18.3.1)(react@18.3.1) + openai: + specifier: ^4.56.0 + version: 4.56.0(zod@3.23.8) react: specifier: ^18 version: 18.3.1 @@ -89,9 +98,15 @@ dependencies: recharts: specifier: ^2.12.7 version: 2.12.7(react-dom@18.3.1)(react@18.3.1) + rehype-katex: + specifier: ^7.0.1 + version: 7.0.1 remark-gfm: specifier: ^4.0.0 version: 4.0.0 + remark-math: + specifier: ^6.0.0 + version: 6.0.0 sonner: specifier: ^1.5.0 version: 1.5.0(react-dom@18.3.1)(react@18.3.1) @@ -139,30 +154,30 @@ devDependencies: packages: - /@ai-sdk/cohere@0.0.19(zod@3.23.8): - resolution: {integrity: sha512-qiaK7RQU9EbCZvoPj7J2NvUd4Plo9UD7g/r61QTwGI/m9XLHeJyq/Vo7eucowvQdyOOdwDr5EGZrV7BlM+stkA==} + /@ai-sdk/cohere@0.0.20(zod@3.23.8): + resolution: {integrity: sha512-QCd7SneC/q2sPvfmewYtcwCSayv3leGmuwESSx33qdl11A9IXGYNyiw6juIsp3EvZnnxUjWUR8ilhyHhyk45Hw==} engines: {node: '>=18'} peerDependencies: zod: ^3.0.0 dependencies: '@ai-sdk/provider': 0.0.21 - '@ai-sdk/provider-utils': 1.0.15(zod@3.23.8) + '@ai-sdk/provider-utils': 1.0.16(zod@3.23.8) zod: 3.23.8 dev: false - /@ai-sdk/openai@0.0.51(zod@3.23.8): - resolution: {integrity: sha512-e+badQnVzAuY0CXThjXZM4IdbztGnntz0Oo44jyklVsWjhJxnpr5m47ALR+0C/Wdakl5oHFGy4CZfiJ9K6ZyVw==} + /@ai-sdk/openai@0.0.53(zod@3.23.8): + resolution: {integrity: sha512-Wm4+EYG2Zl5WmhvZJrLhrBY+C46FEQmDjQ9ZB5h2DvRoJZNKtNiVNFMEQuyBK7QwivvlCSMJkPRBfFcbJgNLMQ==} engines: {node: '>=18'} peerDependencies: zod: ^3.0.0 dependencies: '@ai-sdk/provider': 0.0.21 - '@ai-sdk/provider-utils': 1.0.15(zod@3.23.8) + '@ai-sdk/provider-utils': 1.0.16(zod@3.23.8) zod: 3.23.8 dev: false - /@ai-sdk/provider-utils@1.0.15(zod@3.23.8): - resolution: {integrity: sha512-icZqf2kpV8XdSViei4pX9ylYcVn+pk9AnVquJJGjGQGnwZ/5OgShqnFcLYrMjQfQcSVkz0PxdQVsIhZHzlT9Og==} + /@ai-sdk/provider-utils@1.0.16(zod@3.23.8): + resolution: {integrity: sha512-8Nd8vIkGTIthhfgJEdP9KyMlykehBNP/1J47eMC3vQqYgJV6r5Bgvl3LFVfWi9KzamiD8tp9nU2NJKTeo4MH/A==} engines: {node: '>=18'} peerDependencies: zod: ^3.0.0 @@ -184,8 +199,8 @@ packages: json-schema: 0.4.0 dev: false - /@ai-sdk/react@0.0.48(react@18.3.1)(zod@3.23.8): - resolution: {integrity: sha512-KfW33Gj5/qDA6RWfJ42al3QsgIA2UO+x0gX1M6Kk6LY4bTFgy7+F4GLmo4eflM/9o2M7fUZrNddoOuJ15vbgZg==} + /@ai-sdk/react@0.0.50(react@18.3.1)(zod@3.23.8): + resolution: {integrity: sha512-+6/CfoqZzBnMGBsFP3qOHFTP+n8e6NGXRSeSepcxz3wDfkts1XGF8ZHPHwFD+etBW0/D1dTcKN3EDPh3LmnGqA==} engines: {node: '>=18'} peerDependencies: react: ^18 || ^19 @@ -196,15 +211,15 @@ packages: zod: optional: true dependencies: - '@ai-sdk/provider-utils': 1.0.15(zod@3.23.8) - '@ai-sdk/ui-utils': 0.0.35(zod@3.23.8) + '@ai-sdk/provider-utils': 1.0.16(zod@3.23.8) + '@ai-sdk/ui-utils': 0.0.37(zod@3.23.8) react: 18.3.1 swr: 2.2.5(react@18.3.1) zod: 3.23.8 dev: false - /@ai-sdk/solid@0.0.38(zod@3.23.8): - resolution: {integrity: sha512-7pMW6leig8Y05UIL8jy/1dEDTjtfA2WG9qkVMWjnKSKiucT/Z5uOO3zWNHYq8EVwdJJnv+RR8gUASXcZLTh7og==} + /@ai-sdk/solid@0.0.40(zod@3.23.8): + resolution: {integrity: sha512-h+H07drBurEgxI3EbV2wqgcLaTBfqAn78ewmwCn70VEYmpJjTuOH0Ayp/qbH3kAw/LUY7LWuFzToaIAdSuPIEA==} engines: {node: '>=18'} peerDependencies: solid-js: ^1.7.7 @@ -212,14 +227,14 @@ packages: solid-js: optional: true dependencies: - '@ai-sdk/provider-utils': 1.0.15(zod@3.23.8) - '@ai-sdk/ui-utils': 0.0.35(zod@3.23.8) + '@ai-sdk/provider-utils': 1.0.16(zod@3.23.8) + '@ai-sdk/ui-utils': 0.0.37(zod@3.23.8) transitivePeerDependencies: - zod dev: false - /@ai-sdk/svelte@0.0.40(svelte@4.2.18)(zod@3.23.8): - resolution: {integrity: sha512-S62aB2aT7gjrVY2uDhxwZFBg9hl4wNwu+kd31zsowByC/yyZp9MRIMXkDCkj0qQLFXvfUzaUuzk8v9gvuPOFCQ==} + /@ai-sdk/svelte@0.0.42(svelte@4.2.18)(zod@3.23.8): + resolution: {integrity: sha512-UJ1i0P0NOTKhiYtAJbYs9Wat/I0EP2w+TbOFlpvQWbfPjpqJ4UUwPJ7aMVuKDSoHtH6P57GyOFx8MN/dscwiyA==} engines: {node: '>=18'} peerDependencies: svelte: ^3.0.0 || ^4.0.0 @@ -227,16 +242,16 @@ packages: svelte: optional: true dependencies: - '@ai-sdk/provider-utils': 1.0.15(zod@3.23.8) - '@ai-sdk/ui-utils': 0.0.35(zod@3.23.8) + '@ai-sdk/provider-utils': 1.0.16(zod@3.23.8) + '@ai-sdk/ui-utils': 0.0.37(zod@3.23.8) sswr: 2.1.0(svelte@4.2.18) svelte: 4.2.18 transitivePeerDependencies: - zod dev: false - /@ai-sdk/ui-utils@0.0.35(zod@3.23.8): - resolution: {integrity: sha512-JZWp5gbH9K0/qmmqv0JFrH97JNMB9dU1xtrR2a8uzRE0wYtNmd3KsM9x3KW/f9OGjxUHzAkrboMvxKv/3uz24w==} + /@ai-sdk/ui-utils@0.0.37(zod@3.23.8): + resolution: {integrity: sha512-iMf+ksOjFPlqWVuW1/ljGtsKXtNTlAfRuxvQbMEImrRaSSOH0nKI5H34H2E0Vsa5SCyH9Bk1Y0zvZamb9Z/bYQ==} engines: {node: '>=18'} peerDependencies: zod: ^3.0.0 @@ -245,15 +260,15 @@ packages: optional: true dependencies: '@ai-sdk/provider': 0.0.21 - '@ai-sdk/provider-utils': 1.0.15(zod@3.23.8) + '@ai-sdk/provider-utils': 1.0.16(zod@3.23.8) json-schema: 0.4.0 secure-json-parse: 2.7.0 zod: 3.23.8 - zod-to-json-schema: 3.22.5(zod@3.23.8) + zod-to-json-schema: 3.23.2(zod@3.23.8) dev: false - /@ai-sdk/vue@0.0.40(vue@3.4.35)(zod@3.23.8): - resolution: {integrity: sha512-01LuQT+Cx2e19fYB4nlMlQhmpJ826S1HfGcB4BY30+/XOJebdHRPPOZ3WV9BytBD7kha/tnngBruiYzegGR+Ug==} + /@ai-sdk/vue@0.0.42(vue@3.4.35)(zod@3.23.8): + resolution: {integrity: sha512-RT4BCnG4fL36uBPi86jBZvyVACLOBano3w+wWiItqCRzE2TIpf0ojJQsssi/D8F2Ll7SZyl9vun5UipaSGoLpA==} engines: {node: '>=18'} peerDependencies: vue: ^3.3.4 @@ -261,8 +276,8 @@ packages: vue: optional: true dependencies: - '@ai-sdk/provider-utils': 1.0.15(zod@3.23.8) - '@ai-sdk/ui-utils': 0.0.35(zod@3.23.8) + '@ai-sdk/provider-utils': 1.0.16(zod@3.23.8) + '@ai-sdk/ui-utils': 0.0.37(zod@3.23.8) swrv: 1.0.4(vue@3.4.35) vue: 3.4.35(typescript@5.5.4) transitivePeerDependencies: @@ -291,12 +306,12 @@ packages: engines: {node: '>=6.9.0'} dev: false - /@babel/parser@7.25.3: - resolution: {integrity: sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw==} + /@babel/parser@7.25.4: + resolution: {integrity: sha512-nq+eWrOgdtu3jG5Os4TQP3x3cLA8hR8TvJNjD8vnPa20WGycimcparWnLK4jJhElTK6SDyuJo1weMKO/5LpmLA==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.25.2 + '@babel/types': 7.25.4 dev: false /@babel/runtime@7.25.0: @@ -306,8 +321,8 @@ packages: regenerator-runtime: 0.14.1 dev: false - /@babel/types@7.25.2: - resolution: {integrity: sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q==} + /@babel/types@7.25.4: + resolution: {integrity: sha512-zQ1ijeeCXVEh+aNL0RlmkPkG8HUiDcU2pzQQFjtbntgAczRASFzj4H+6+bV+dy1ntKR14I/DypeuRG1uma98iQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.24.8 @@ -392,6 +407,10 @@ packages: resolution: {integrity: sha512-0KI3zGxIUs1KDR/pjQPdJH4Z8nGBm0yJ5WRoRfdw1Kzeh45jkIfA0rmD0kBF6fKHH+xaH7g8y4jIXyAV5MGK3g==} dev: false + /@foobar404/wave@2.0.5: + resolution: {integrity: sha512-V/ydadtv5ObCw8aEg+Qy3YSq1eyinEWzJfRI43Ovmj7VmAvEdWAdL7MatoMbiIVYPATkNDVF7GOxX1xirxM9dA==} + dev: false + /@humanwhocodes/config-array@0.11.14: resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} @@ -1366,6 +1385,10 @@ packages: resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true + /@types/katex@0.16.7: + resolution: {integrity: sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ==} + dev: false + /@types/mdast@4.0.4: resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} dependencies: @@ -1376,11 +1399,23 @@ packages: resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} dev: false + /@types/node-fetch@2.6.11: + resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} + dependencies: + '@types/node': 20.14.13 + form-data: 4.0.0 + dev: false + + /@types/node@18.19.45: + resolution: {integrity: sha512-VZxPKNNhjKmaC1SUYowuXSRSMGyQGmQjvvA1xE4QZ0xce2kLtEhPDS+kqpCPBZYgqblCLQ2DAjSzmgCM5auvhA==} + dependencies: + undici-types: 5.26.5 + dev: false + /@types/node@20.14.13: resolution: {integrity: sha512-+bHoGiZb8UiQ0+WEtmph2IWQCjIqg8MDZMAV+ppRRhUZnquF5mQkP/9vpSwJClEiSM/C7fZZExPzfU0vJTyp8w==} dependencies: undici-types: 5.26.5 - dev: true /@types/prop-types@15.7.12: resolution: {integrity: sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==} @@ -1506,7 +1541,7 @@ packages: /@vue/compiler-core@3.4.35: resolution: {integrity: sha512-gKp0zGoLnMYtw4uS/SJRRO7rsVggLjvot3mcctlMXunYNsX+aRJDqqw/lV5/gHK91nvaAAlWFgdVl020AW1Prg==} dependencies: - '@babel/parser': 7.25.3 + '@babel/parser': 7.25.4 '@vue/shared': 3.4.35 entities: 4.5.0 estree-walker: 2.0.2 @@ -1523,7 +1558,7 @@ packages: /@vue/compiler-sfc@3.4.35: resolution: {integrity: sha512-xacnRS/h/FCsjsMfxBkzjoNxyxEyKyZfBch/P4vkLRvYJwe5ChXmZZrj8Dsed/752H2Q3JE8kYu9Uyha9J6PgA==} dependencies: - '@babel/parser': 7.25.3 + '@babel/parser': 7.25.4 '@vue/compiler-core': 3.4.35 '@vue/compiler-dom': 3.4.35 '@vue/compiler-ssr': 3.4.35 @@ -1577,6 +1612,13 @@ packages: resolution: {integrity: sha512-hvuhBYYDe+b1G8KHxsQ0diDqDMA8D9laxWZhNAjE83VZb5UDaXl9Xnz7cGdDSyiHM90qqI/CyGMcpBpiDy6VVQ==} dev: false + /abort-controller@3.0.0: + resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} + engines: {node: '>=6.5'} + dependencies: + event-target-shim: 5.0.1 + dev: false + /acorn-jsx@5.3.2(acorn@8.12.1): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -1590,8 +1632,15 @@ packages: engines: {node: '>=0.4.0'} hasBin: true - /ai@3.3.14(react@18.3.1)(svelte@4.2.18)(vue@3.4.35)(zod@3.23.8): - resolution: {integrity: sha512-GF3CVS1rnOtgN68OQGlT/2quhg/D3sMFwak48OGXeqv4VRcDgGJx3UqSwT7ipFa9BncRqo7TIqDHHji3Doamaw==} + /agentkeepalive@4.5.0: + resolution: {integrity: sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==} + engines: {node: '>= 8.0.0'} + dependencies: + humanize-ms: 1.2.1 + dev: false + + /ai@3.3.16(openai@4.56.0)(react@18.3.1)(svelte@4.2.18)(vue@3.4.35)(zod@3.23.8): + resolution: {integrity: sha512-Tb6SdrH73C9AJwZv2GPw+7HBGsruMq07QcuXwHOBW92HgV/+ddQhXbpdUS9rCf/GIqJ+3ObBg7Kcq4VroeP7BQ==} engines: {node: '>=18'} peerDependencies: openai: ^4.42.0 @@ -1612,22 +1661,23 @@ packages: optional: true dependencies: '@ai-sdk/provider': 0.0.21 - '@ai-sdk/provider-utils': 1.0.15(zod@3.23.8) - '@ai-sdk/react': 0.0.48(react@18.3.1)(zod@3.23.8) - '@ai-sdk/solid': 0.0.38(zod@3.23.8) - '@ai-sdk/svelte': 0.0.40(svelte@4.2.18)(zod@3.23.8) - '@ai-sdk/ui-utils': 0.0.35(zod@3.23.8) - '@ai-sdk/vue': 0.0.40(vue@3.4.35)(zod@3.23.8) + '@ai-sdk/provider-utils': 1.0.16(zod@3.23.8) + '@ai-sdk/react': 0.0.50(react@18.3.1)(zod@3.23.8) + '@ai-sdk/solid': 0.0.40(zod@3.23.8) + '@ai-sdk/svelte': 0.0.42(svelte@4.2.18)(zod@3.23.8) + '@ai-sdk/ui-utils': 0.0.37(zod@3.23.8) + '@ai-sdk/vue': 0.0.42(vue@3.4.35)(zod@3.23.8) '@opentelemetry/api': 1.9.0 eventsource-parser: 1.1.2 json-schema: 0.4.0 jsondiffpatch: 0.6.0 nanoid: 3.3.6 + openai: 4.56.0(zod@3.23.8) react: 18.3.1 secure-json-parse: 2.7.0 svelte: 4.2.18 zod: 3.23.8 - zod-to-json-schema: 3.22.5(zod@3.23.8) + zod-to-json-schema: 3.23.2(zod@3.23.8) transitivePeerDependencies: - solid-js - vue @@ -2016,6 +2066,11 @@ packages: resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} engines: {node: '>= 6'} + /commander@8.3.0: + resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} + engines: {node: '>= 12'} + dev: false + /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true @@ -2758,6 +2813,11 @@ packages: engines: {node: '>=0.10.0'} dev: true + /event-target-shim@5.0.1: + resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} + engines: {node: '>=6'} + dev: false + /eventemitter3@4.0.7: resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} dev: false @@ -2866,6 +2926,10 @@ packages: cross-spawn: 7.0.3 signal-exit: 4.1.0 + /form-data-encoder@1.7.2: + resolution: {integrity: sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==} + dev: false + /form-data@4.0.0: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} engines: {node: '>= 6'} @@ -2880,6 +2944,14 @@ packages: engines: {node: '>=0.4.x'} dev: false + /formdata-node@4.4.1: + resolution: {integrity: sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==} + engines: {node: '>= 12.20'} + dependencies: + node-domexception: 1.0.0 + web-streams-polyfill: 4.0.0-beta.3 + dev: false + /framer-motion@11.3.20(react-dom@18.3.1)(react@18.3.1): resolution: {integrity: sha512-xRPHtcrSjCdQ7gIttxcnSXOPq+P0AiU7tU82fWE3Tco7EmQQmu5AIgwkdcI6ebZolm+rz9ehSzECVSdZONSj+Q==} peerDependencies: @@ -3083,10 +3155,63 @@ packages: dependencies: function-bind: 1.1.2 + /hast-util-from-dom@5.0.0: + resolution: {integrity: sha512-d6235voAp/XR3Hh5uy7aGLbM3S4KamdW0WEgOaU1YoewnuYw4HXb5eRtv9g65m/RFGEfUY1Mw4UqCc5Y8L4Stg==} + dependencies: + '@types/hast': 3.0.4 + hastscript: 8.0.0 + web-namespaces: 2.0.1 + dev: false + + /hast-util-from-html-isomorphic@2.0.0: + resolution: {integrity: sha512-zJfpXq44yff2hmE0XmwEOzdWin5xwH+QIhMLOScpX91e/NSGPsAzNCvLQDIEPyO2TXi+lBmU6hjLIhV8MwP2kw==} + dependencies: + '@types/hast': 3.0.4 + hast-util-from-dom: 5.0.0 + hast-util-from-html: 2.0.2 + unist-util-remove-position: 5.0.0 + dev: false + + /hast-util-from-html@2.0.2: + resolution: {integrity: sha512-HwOHwxdt2zC5KQ/CNoybBntRook2zJvfZE/u5/Ap7aLPe22bDqen7KwGkOqOyzL5zIqKwiYX/OTtE0FWgr6XXA==} + dependencies: + '@types/hast': 3.0.4 + devlop: 1.1.0 + hast-util-from-parse5: 8.0.1 + parse5: 7.1.2 + vfile: 6.0.2 + vfile-message: 4.0.2 + dev: false + + /hast-util-from-parse5@8.0.1: + resolution: {integrity: sha512-Er/Iixbc7IEa7r/XLtuG52zoqn/b3Xng/w6aZQ0xGVxzhw5xUFxcRqdPzP6yFi/4HBYRaifaI5fQ1RH8n0ZeOQ==} + dependencies: + '@types/hast': 3.0.4 + '@types/unist': 3.0.2 + devlop: 1.1.0 + hastscript: 8.0.0 + property-information: 6.5.0 + vfile: 6.0.2 + vfile-location: 5.0.3 + web-namespaces: 2.0.1 + dev: false + + /hast-util-is-element@3.0.0: + resolution: {integrity: sha512-Val9mnv2IWpLbNPqc/pUem+a7Ipj2aHacCwgNfTiK0vJKl0LF+4Ba4+v1oPHFpf3bLYmreq0/l3Gud9S5OH42g==} + dependencies: + '@types/hast': 3.0.4 + dev: false + /hast-util-parse-selector@2.2.5: resolution: {integrity: sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ==} dev: false + /hast-util-parse-selector@4.0.0: + resolution: {integrity: sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A==} + dependencies: + '@types/hast': 3.0.4 + dev: false + /hast-util-to-jsx-runtime@2.3.0: resolution: {integrity: sha512-H/y0+IWPdsLLS738P8tDnrQ8Z+dj12zQQ6WC11TIM21C8WFVoIxcqWXf2H3hiTVZjF1AWqoimGwrTWecWrnmRQ==} dependencies: @@ -3109,6 +3234,15 @@ packages: - supports-color dev: false + /hast-util-to-text@4.0.2: + resolution: {integrity: sha512-KK6y/BN8lbaq654j7JgBydev7wuNMcID54lkRav1P0CaE1e47P72AWWPiGKXTJU271ooYzcvTAn/Zt0REnvc7A==} + dependencies: + '@types/hast': 3.0.4 + '@types/unist': 3.0.2 + hast-util-is-element: 3.0.0 + unist-util-find-after: 5.0.0 + dev: false + /hast-util-whitespace@3.0.0: resolution: {integrity: sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==} dependencies: @@ -3125,6 +3259,16 @@ packages: space-separated-tokens: 1.1.5 dev: false + /hastscript@8.0.0: + resolution: {integrity: sha512-dMOtzCEd3ABUeSIISmrETiKuyydk1w0pa+gE/uormcTpSYuaNJPbX1NU3JLyscSLjwAQM8bWMhhIlnCqnRvDTw==} + dependencies: + '@types/hast': 3.0.4 + comma-separated-tokens: 2.0.3 + hast-util-parse-selector: 4.0.0 + property-information: 6.5.0 + space-separated-tokens: 2.0.2 + dev: false + /highlight.js@10.7.3: resolution: {integrity: sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==} dev: false @@ -3133,6 +3277,12 @@ packages: resolution: {integrity: sha512-/sXbVCWayk6GDVg3ctOX6nxaVj7So40FcFAnWlWGNAB1LpYKcV5Cd10APjPjW80O7zYW2MsjBV4zZ7IZO5fVow==} dev: false + /humanize-ms@1.2.1: + resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==} + dependencies: + ms: 2.1.3 + dev: false + /ignore@5.3.1: resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} engines: {node: '>= 4'} @@ -3515,6 +3665,13 @@ packages: object.values: 1.2.0 dev: true + /katex@0.16.11: + resolution: {integrity: sha512-RQrI8rlHY92OLf3rho/Ts8i/XvjgguEjOkO1BEXcU3N8BqPpSzBNwV/G0Ukr+P/l3ivvJUE/Fa/CwbS6HesGNQ==} + hasBin: true + dependencies: + commander: 8.3.0 + dev: false + /keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} dependencies: @@ -3712,6 +3869,20 @@ packages: - supports-color dev: false + /mdast-util-math@3.0.0: + resolution: {integrity: sha512-Tl9GBNeG/AhJnQM221bJR2HPvLOSnLE/T9cJI9tlc6zwQk2nPk/4f0cHkOdEixQPC/j8UtKDdITswvLAy1OZ1w==} + dependencies: + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + devlop: 1.1.0 + longest-streak: 3.1.0 + mdast-util-from-markdown: 2.0.1 + mdast-util-to-markdown: 2.1.0 + unist-util-remove-position: 5.0.0 + transitivePeerDependencies: + - supports-color + dev: false + /mdast-util-mdx-expression@2.0.0: resolution: {integrity: sha512-fGCu8eWdKUKNu5mohVGkhBXCXGnOTLuFqOvGMvdikr+J1w7lDJgxThOKpwRWzzbyXAU2hhSwsmssOY4yTokluw==} dependencies: @@ -3899,6 +4070,18 @@ packages: micromark-util-types: 2.0.0 dev: false + /micromark-extension-math@3.1.0: + resolution: {integrity: sha512-lvEqd+fHjATVs+2v/8kg9i5Q0AP2k85H0WUOwpIVvUML8BapsMvh1XAogmQjOCsLpoKRCVQqEkQBB3NhVBcsOg==} + dependencies: + '@types/katex': 0.16.7 + devlop: 1.1.0 + katex: 0.16.11 + micromark-factory-space: 2.0.0 + micromark-util-character: 2.1.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + dev: false + /micromark-factory-destination@2.0.0: resolution: {integrity: sha512-j9DGrQLm/Uhl2tCzcbLhy5kXsgkHUrjJHg4fFAeoMRwJmJerT9aw4FEhIbZStWN8A3qMwOp1uzHr4UL8AInxtA==} dependencies: @@ -4104,7 +4287,6 @@ packages: /ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - dev: true /mz@2.7.0: resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} @@ -4170,6 +4352,23 @@ packages: - babel-plugin-macros dev: false + /node-domexception@1.0.0: + resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} + engines: {node: '>=10.5.0'} + dev: false + + /node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + dependencies: + whatwg-url: 5.0.0 + dev: false + /node-gyp-build@4.8.1: resolution: {integrity: sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==} hasBin: true @@ -4258,6 +4457,27 @@ packages: wrappy: 1.0.2 dev: true + /openai@4.56.0(zod@3.23.8): + resolution: {integrity: sha512-zcag97+3bG890MNNa0DQD9dGmmTWL8unJdNkulZzWRXrl+QeD+YkBI4H58rJcwErxqGK6a0jVPZ4ReJjhDGcmw==} + hasBin: true + peerDependencies: + zod: ^3.23.8 + peerDependenciesMeta: + zod: + optional: true + dependencies: + '@types/node': 18.19.45 + '@types/node-fetch': 2.6.11 + abort-controller: 3.0.0 + agentkeepalive: 4.5.0 + form-data-encoder: 1.7.2 + formdata-node: 4.4.1 + node-fetch: 2.7.0 + zod: 3.23.8 + transitivePeerDependencies: + - encoding + dev: false + /openapi-typescript-fetch@1.1.3: resolution: {integrity: sha512-smLZPck4OkKMNExcw8jMgrMOGgVGx2N/s6DbKL2ftNl77g5HfoGpZGFy79RBzU/EkaO0OZpwBnslfdBfh7ZcWg==} engines: {node: '>= 12.0.0', npm: '>= 7.0.0'} @@ -4323,6 +4543,12 @@ packages: is-hexadecimal: 2.0.1 dev: false + /parse5@7.1.2: + resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} + dependencies: + entities: 4.5.0 + dev: false + /path-browserify@1.0.1: resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} dev: false @@ -4717,6 +4943,18 @@ packages: set-function-name: 2.0.2 dev: true + /rehype-katex@7.0.1: + resolution: {integrity: sha512-OiM2wrZ/wuhKkigASodFoo8wimG3H12LWQaH8qSPVJn9apWKFSH3YOCtbKpBorTVw/eI7cuT21XBbvwEswbIOA==} + dependencies: + '@types/hast': 3.0.4 + '@types/katex': 0.16.7 + hast-util-from-html-isomorphic: 2.0.0 + hast-util-to-text: 4.0.2 + katex: 0.16.11 + unist-util-visit-parents: 6.0.1 + vfile: 6.0.2 + dev: false + /remark-gfm@4.0.0: resolution: {integrity: sha512-U92vJgBPkbw4Zfu/IiW2oTZLSL3Zpv+uI7My2eq8JxKgqraFdU8YUGicEJCEgSbeaG+QDFqIcwwfMTOEelPxuA==} dependencies: @@ -4730,6 +4968,17 @@ packages: - supports-color dev: false + /remark-math@6.0.0: + resolution: {integrity: sha512-MMqgnP74Igy+S3WwnhQ7kqGlEerTETXMvJhrUzDikVZ2/uogJCb+WHUg97hK9/jcfc0dkD73s3LN8zU49cTEtA==} + dependencies: + '@types/mdast': 4.0.4 + mdast-util-math: 3.0.0 + micromark-extension-math: 3.1.0 + unified: 11.0.5 + transitivePeerDependencies: + - supports-color + dev: false + /remark-parse@11.0.0: resolution: {integrity: sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==} dependencies: @@ -5210,6 +5459,10 @@ packages: dependencies: is-number: 7.0.0 + /tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + dev: false + /trim-lines@3.0.1: resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} dev: false @@ -5315,7 +5568,6 @@ packages: /undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} - dev: true /unified@11.0.5: resolution: {integrity: sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==} @@ -5329,6 +5581,13 @@ packages: vfile: 6.0.2 dev: false + /unist-util-find-after@5.0.0: + resolution: {integrity: sha512-amQa0Ep2m6hE2g72AugUItjbuM8X8cGQnFoHk0pGfrFeT9GZhzN5SW8nRsiGKK7Aif4CrACPENkA6P/Lw6fHGQ==} + dependencies: + '@types/unist': 3.0.2 + unist-util-is: 6.0.0 + dev: false + /unist-util-is@6.0.0: resolution: {integrity: sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==} dependencies: @@ -5430,6 +5689,13 @@ packages: hasBin: true dev: false + /vfile-location@5.0.3: + resolution: {integrity: sha512-5yXvWDEgqeiYiBe1lbxYF7UMAIm/IcopxMHrMQDq3nvKcjPKIhZklUKL+AE7J7uApI4kwe2snsK+eI6UTj9EHg==} + dependencies: + '@types/unist': 3.0.2 + vfile: 6.0.2 + dev: false + /vfile-message@4.0.2: resolution: {integrity: sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==} dependencies: @@ -5480,6 +5746,26 @@ packages: typescript: 5.5.4 dev: false + /web-namespaces@2.0.1: + resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==} + dev: false + + /web-streams-polyfill@4.0.0-beta.3: + resolution: {integrity: sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==} + engines: {node: '>= 14'} + dev: false + + /webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + dev: false + + /whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + dependencies: + tr46: 0.0.3 + webidl-conversions: 3.0.1 + dev: false + /which-boxed-primitive@1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} dependencies: @@ -5592,14 +5878,6 @@ packages: engines: {node: '>=10'} dev: true - /zod-to-json-schema@3.22.5(zod@3.23.8): - resolution: {integrity: sha512-+akaPo6a0zpVCCseDed504KBJUQpEW5QZw7RMneNmKw+fGaML1Z9tUNLnHHAC8x6dzVRO1eB2oEMyZRnuBZg7Q==} - peerDependencies: - zod: ^3.22.4 - dependencies: - zod: 3.23.8 - dev: false - /zod-to-json-schema@3.23.2(zod@3.23.8): resolution: {integrity: sha512-uSt90Gzc/tUfyNqxnjlfBs8W6WSGpNBv0rVsNxP/BVSMHMKGdthPYff4xtCHYloJGM0CFxFsb3NbC0eqPhfImw==} peerDependencies: