Binary files a/public/svg/copy/Bold-dark.png and /dev/null differ Binary files a/public/svg/copy/Bold.png and /dev/null differ Binary files a/public/svg/copy/Center-dark.png and /dev/null differ Binary files a/public/svg/copy/Center.png and /dev/null differ Binary files a/public/svg/copy/Italic-dark.png and /dev/null differ Binary files a/public/svg/copy/Italic.png and /dev/null differ Binary files a/public/svg/copy/Left-dark.png and /dev/null differ Binary files a/public/svg/copy/Left.png and /dev/null differ Binary files a/public/svg/copy/Ordered-dark.png and /dev/null differ Binary files a/public/svg/copy/Ordered.png and /dev/null differ Binary files a/public/svg/copy/Redo-dark.png and /dev/null differ Binary files a/public/svg/copy/Redo.png and /dev/null differ Binary files a/public/svg/copy/Right-dark.png and /dev/null differ Binary files a/public/svg/copy/Right.png and /dev/null differ Binary files a/public/svg/copy/Underline-dark.png and /dev/null differ Binary files a/public/svg/copy/Underline.png and /dev/null differ Binary files a/public/svg/copy/Undo-dark.png and /dev/null differ Binary files a/public/svg/copy/Undo.png and /dev/null differ Binary files a/public/svg/copy/Unordered-dark.png and /dev/null differ Binary files a/public/svg/copy/Unordered.png and /dev/null differ @@ -1,24 +0,0 @@ - - - - \ No newline at end of file Binary files a/public/logo180.png and /dev/null differ Binary files a/public/logo192.png and /dev/null differ Binary files a/public/logo512.png and /dev/null differ @@ -1,19 +0,0 @@ -{ - "name": "AIR", - "short_name": "AIR", - "icons": [ - { - "src": "/logo192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "/logo512.png", - "sizes": "512x512", - "type": "image/png" - } - ], - "start_url": "/", - "display": "standalone" - } - \ No newline at end of file Binary files a/public/spin-spinning.gif and /dev/null differ @@ -0,0 +1,15 @@ +import { Template } from '@/src/domains/copywrite/proxy/types/template' + +export const emptyTemplate: Template = { + id: 1000, + title: 'Пустой шаблон', + content: '', + keywords: [], + tov: '', + language: '', + theme: '', + resources_urls: [], + picture: '123', + target_audience: '', + description: '', +} @@ -0,0 +1,6 @@ +import { ContentState, EditorState } from 'draft-js' + +export const toEditorState = (text: string) => { + const newContentState = ContentState.createFromText(text) + return EditorState.createWithContent(newContentState) +} @@ -0,0 +1,13 @@ +export interface Template { + id: number + title: string + description: string + picture: string + theme: string + content: string + target_audience: string + resources_urls: string[] + keywords: string[] + tov: string + language: string +} @@ -0,0 +1,34 @@ +import axios from 'axios' + +import { Template } from '@/src/domains/copywrite/proxy/types/template' +import { API_URL } from '@/src/shared/lib/constants' +import { Message } from '@/src/shared/lib/types/model' + +export class CopywriteProxy { + token?: string + + constructor(token: string | undefined) { + this.token = token + } + + static async getGeneration(token?: string): Promise { + const { data } = await axios.get(API_URL + '/copywrite/', { + headers: { Authorization: `Bearer ${token}` }, + }) + return data + } + + static async getTemplates(token?: string): Promise { + const { data } = await axios.get(API_URL + '/copywrite/templates/', { + headers: { Authorization: `Bearer ${token}` }, + }) + return data + } + + static async createTemplates(token?: string): Promise { + const { data } = await axios.post(API_URL + '/copywrite/templates/', { + headers: { Authorization: `Bearer ${token}` }, + }) + return data + } +} @@ -0,0 +1,30 @@ +import React from 'react' +import { Typography } from '@mui/material' + +import { Input, Slider } from '@/src/shared' + +import { FiltersProps } from './types' + +export function Filters({ + strength, + setStrength, + upscale, + setUpscale, + negative_prompt, + num_inference_steps, + guidance_scale, + setGuidanceScale, + setNegative_prompt, + setSteps, +}: FiltersProps) { + return ( + <> + + + + + Запрос для исключения из генерации + + + ) +} @@ -0,0 +1,17 @@ +import { ChangeEvent } from 'react' + +export interface Setting { + strength: number + upscale: number + negative_prompt: string + num_inference_steps: number + guidance_scale: number +} + +export interface FiltersProps extends Setting { + setStrength: (e: Event, cur: number | number[]) => void + setUpscale: (e: Event, cur: number | number[]) => void + setGuidanceScale: (e: Event, cur: number | number[]) => void + setNegative_prompt: (e: ChangeEvent) => void + setSteps: (e: Event, cur: number | number[]) => void +} @@ -0,0 +1,36 @@ +import React from 'react' +import { Stack, Typography } from '@mui/material' + +import { Input, Slider } from '@/src/shared' +import { SelectUI } from '@/src/shared/ui/select' + +import { Filters } from './types' + +const sizes = [128, 256, 384, 448, 512, 576, 640, 704, 768, 832, 896, 960, 1024] + +export function EpicPhotoFilters({ + guidance_scale, + height, + negative_prompt, + num_inference_steps, + num_outputs, + setGuidance_scale, + setHeight, + setNegative_prompt, + setNum_inference_steps, + setNum_outputs, + setWidth, + width, +}: Filters) { + return ( + <> + + + + + + Запрос для исключения из генерации + + + ) +} @@ -0,0 +1,2 @@ +export * from './epic-photo-filters' +export * from './types' @@ -0,0 +1,20 @@ +import { ChangeEvent, ChangeEventHandler } from 'react' +import { SelectChangeEvent } from '@mui/material' + +export interface Setting { + num_outputs: number + negative_prompt: string + width: number + height: number + num_inference_steps: number + guidance_scale: number +} + +export interface Filters extends Setting { + setWidth: (e: SelectChangeEvent) => void + setHeight: (e: SelectChangeEvent) => void + setNum_outputs: (e: Event, cur: number | number[]) => void + setNum_inference_steps: (e: Event, cur: number | number[]) => void + setGuidance_scale: (e: Event, cur: number | number[]) => void + setNegative_prompt: (e: ChangeEvent) => void +} @@ -0,0 +1,2 @@ +export * from './kandinsky-filters' +export * from './types' @@ -0,0 +1,76 @@ +import React from 'react' +import { Box, Typography } from '@mui/material' + +import { Input, Slider, SwitchCustom } from '@/src/shared' +import { SelectUI } from '@/src/shared/ui/select' + +import { Filters } from './types' + +export function KandinskyFilters({ + height, + isTranslate, + negativePrompt, + num_outputs, + setHeight, + setNegative_prompt, + setNumber, + setSteps, + setWidth, + steps, + width, + setIsTranslate, +}: Filters) { + return ( + <> + Настройки + + + + + + + + + + + + + + + + Переводить запрос + + + + + + + Запрос для исключения из генерации + + + + + ) +} @@ -0,0 +1,20 @@ +import { ChangeEvent } from 'react' +import { SelectChangeEvent } from '@mui/material' + +export interface Setting { + steps: number + num_outputs: number + width: number + height: number + isTranslate: boolean + negativePrompt: string +} + +export interface Filters extends Setting { + setWidth: (e: SelectChangeEvent) => void + setHeight: (e: SelectChangeEvent) => void + setSteps: (e: Event, cur: number | number[]) => void + setNumber: (e: Event, cur: number | number[]) => void + setNegative_prompt: (e: ChangeEvent) => void + setIsTranslate: () => void +} @@ -0,0 +1,33 @@ +import React from 'react' +import { Typography } from '@mui/material' + +import { Input, Slider } from '@/src/shared' +import { SelectUI } from '@/src/shared/ui/select' + +import { FiltersProps } from './types' + +const sizes = [384, 512, 576, 640, 704, 768] + +export function Filters({ + height, + negative_prompt, + num_inference_steps, + num_outputs, + setHeight, + setNegative_prompt, + setNumOutputs, + setSteps, + setWidth, + width, +}: FiltersProps) { + return ( + <> + + + + + Запрос для исключения из генерации + + + ) +} @@ -0,0 +1,2 @@ +export * from './filters' +export * from './types' @@ -0,0 +1,18 @@ +import { ChangeEvent } from 'react' +import { SelectChangeEvent } from '@mui/material' + +export interface Setting { + width: number + height: number + num_outputs: number + negative_prompt: string + num_inference_steps: number +} + +export interface FiltersProps extends Setting { + setWidth: (e: SelectChangeEvent) => void + setHeight: (e: SelectChangeEvent) => void + setNumOutputs: (e: Event, cur: number | number[]) => void + setSteps: (e: Event, cur: number | number[]) => void + setNegative_prompt: (e: ChangeEvent) => void +} @@ -92,14 +92,11 @@ const initialState: UserState & ResponseAllInfo = { export const getAll = async (token: string | null | undefined): Promise => { try { - const { data } = await axios.get>( - API_URL + '/auth/me', - { - headers: { - Authorization: `Bearer ${token}`, - }, - } - ) + const { data } = await axios.get>(API_URL + '/auth/me', { + headers: { + Authorization: `Bearer ${token}`, + }, + }) return data } catch (err) { @@ -107,23 +104,13 @@ export const getAll = async (token: string | null | undefined): Promise { - return await getAll(token) - } -) +export const getAllInfo = createAsyncThunk('user/getAllInfo', async (token: string | null | undefined) => { + return await getAll(token) +}) -export const unfollowEmail = createAsyncThunk( - 'user/unfollowEmail', - async (token: string | null | undefined) => { - await axios.patch( - API_URL + '/auth/email-sub', - {}, - { headers: { Authorization: `Bearer ${token}` } } - ) - } -) +export const unfollowEmail = createAsyncThunk('user/unfollowEmail', async (token: string | null | undefined) => { + await axios.patch(API_URL + '/auth/email-sub', {}, { headers: { Authorization: `Bearer ${token}` } }) +}) export const userSlice = createSlice({ name: 'userSlice', @@ -0,0 +1,12 @@ +export const costModel: any = { + 'gpt-3.5-turbo': 0.0017, + 'gpt-3.5-turbo-16k': 0.00255, + 'text-davinci-003': 0.017, + 'text-curie-001': 0.0017, + 'text-babbage-001': 0.000425, + 'text-ada-001': 0.000034, + 'gpt-4': 0.01785, + 'gpt-4-32k': 0.0255, +} + +export const textTooltipCalculating = 'Столько токенов спишется за ваш текущий запрос.' @@ -0,0 +1,8 @@ +const price = { + '1024x1024': 8.5, + '512x512': 7.65, + '256x256': 6.8, +} +export const calculatingDalle = (count: number, quality: '1024x1024' | '512x512' | '256x256') => { + return price[quality] * count +} @@ -0,0 +1,59 @@ +import React from 'react' +import { encoding_for_model } from '@dqbd/tiktoken' + +import { costModel } from '@/src/features/calculation-tokens-gpt/lib/constants' +import { calculatingDalle } from '@/src/features/calculation-tokens-gpt/model/calculating-dalle' +import { ImessageContext } from '@/src/shared/lib/types/types-gpt' +import { TypeModelGPT, typeModels } from '@/src/widgets/filters-gpt/lib/constants' + +const getFullModelTypeName = (name: string): TypeModelGPT => { + return typeModels.filter((el) => el.key === name)[0].value as TypeModelGPT +} + +const getTransformPrice = (price: number, isGpt: boolean = false) => { + if (price === 0) { + return '0' + } + + return price < 1 ? ' < 1' : `${isGpt ? '≈' : ''} ${price.toFixed(2).replace('.', ',')}` +} + +const checkIsAdditional = (model: string, isAdditional?: boolean): any => { + if (model === 'gpt-3.5-turbo') { + return isAdditional ? 'gpt-3.5-turbo-16k' : model + } + + if (model === 'gpt-4') { + return isAdditional ? 'gpt-4-32k' : model + } + + return model +} +export const useCalculating = ( + model: 'gpt' | 'dalle' | 'sd', + count?: number, + quality?: any, + prompt?: string, + gptType?: TypeModelGPT, + isAdditionalCtx?: boolean, + context?: { message: string; uid: string }[] +): string => { + if (model === 'dalle') { + return getTransformPrice(calculatingDalle(count as number, quality)) + } + + // eslint-disable-next-line react-hooks/rules-of-hooks + const modelFullName = React.useMemo(() => getFullModelTypeName(gptType as TypeModelGPT), [gptType]) + + // eslint-disable-next-line react-hooks/rules-of-hooks + const encoding = React.useMemo(() => encoding_for_model(modelFullName), [gptType]) + + const tokens = + context?.length === 0 + ? encoding.encode(prompt as string).length + : encoding.encode((prompt as string) + context?.map((el) => el.message).toString()).length + + const price = prompt ? costModel[checkIsAdditional(modelFullName, isAdditionalCtx)] * tokens + 0.1 : 0 + + return getTransformPrice(price, true) +} @@ -0,0 +1,89 @@ +import React, { memo } from 'react' +import { Box, Tooltip } from '@mui/material' +import Typography from '@mui/material/Typography' +import Image from 'next/image' + +import { useCalculating } from '@/src/features/calculation-tokens-gpt/model/use-calculating' +import TooltipCalculating from '@/src/features/calculation-tokens-gpt/ui/tooltip-calculating' +import { useAppSelector } from '@/src/main/store/store' +import { baseColor } from '@/src/shared/lib/constants/colors' +import { ImessageContext } from '@/src/shared/lib/types/types-gpt' +import { TypeModelGPT } from '@/src/widgets/filters-gpt/lib/constants' + +interface ICalculationTokenProps { + model: 'gpt' | 'sd' | 'dalle' + quality?: string + count?: number + prompt?: string + isAdditional?: boolean + gptType?: TypeModelGPT + context?: { message: string; uid: string }[] +} + +export const Calculation: React.FC = memo(({ prompt, gptType, context, isAdditional, count, quality, model }) => { + const price = useCalculating(model, count, quality, prompt, gptType, isAdditional, context) + + const theme = useAppSelector((state) => state.theme.theme) + + return ( + } + componentsProps={{ + tooltip: { + sx: { + '&.MuiTooltip-tooltip': { + '&.MuiTooltip-tooltipPlacementBottom': { + marginTop: '2px', + }, + '&.MuiTooltip-tooltipPlacementTop': { + marginBottom: '7px', + }, + '&.MuiTooltip-tooltipPlacementLeft': { + marginRight: '24px', + }, + }, + bgcolor: theme === 'light' ? 'white' : '#4B4B4B', + borderRadius: '10px', + '& .MuiTooltip-arrow': { + color: theme === 'light' ? 'white' : '#4B4B4B', + }, + boxShadow: '0px 0px 4px rgba(0, 0, 0, 0.04), 0px 4px 32px rgba(0, 0, 0, 0.16)', + }, + }, + }} + arrow + > + + {''} + + {price} + + + + ) +}) + +Calculation.displayName = 'Calculation' @@ -0,0 +1,39 @@ +import React from 'react' +import { Box } from '@mui/material' +import Typography from '@mui/material/Typography' + +import { textTooltipCalculating } from '@/src/features/calculation-tokens-gpt/lib/constants' +import { useAppSelector } from '@/src/main/store/store' + +const TooltipCalculating = ({ model = 'dalle' }: { model?: 'gpt' | 'dalle' | 'sd' }) => { + const theme = useAppSelector((state) => state.theme.theme) + + return ( + + + {textTooltipCalculating} + + + {model === 'gpt' && ( + + Фактическое значение может немного отличаться + + )} + + ) +} + +export default TooltipCalculating @@ -0,0 +1 @@ +export { Calculation } from './ui/calculation' @@ -37,7 +37,7 @@ export function useChats(model: string): ChatsReturn { const { data } = useSession() useEffect(() => { - ;[][1] + [][1] if (model && data?.access) { getAllChats(model, data?.access).then((res) => { setChats(res) @@ -8,7 +8,6 @@ interface IProps { setModal: Dispatch> image: string } - export default function FullScreenModal({ modal, setModal, image }: IProps) { const isSvg = image.includes('.svg') @@ -1,6 +1,6 @@ .close_block{ position: absolute; - z-index: 110; + z-index: 105; cursor: pointer; right: 25px; top: 25px; @@ -1,5 +1,5 @@ import React from 'react' -import { Avatar, Box, Typography } from '@mui/material' +import { Box, Typography } from '@mui/material' import Link from 'next/link' import styles from '@/src/shared/styles/chats-bot-pages.module.scss' @@ -10,16 +10,11 @@ export default function Title(props: any) { {' '} - {props.linkBack && props.linkBack !== '' ? ( - {props.type} - ) : ( - {props.type} - )} •{' '} + {props.type} •{' '} -  {props.title} +  {props.title} - {props.icon && } {props.title} @@ -56,3 +56,10 @@ export const options: Options = { doneLabel: 'Готово', disableInteraction: true, } + +export const responseGPT = + 'Для нахождения минимального элемента в массиве предлагаю написать собственную функцию с использованием функции высшего порядка reduce и стандартного метода Math.min():\n' + + '\n' + + 'const numbers = [-94, 87, 12, 0, -67, 32];\n' + + 'const min = (values) => values.reduce((x, y) => Math.min(x, y));\n' + + 'console.log(min(numbers)); // => -94\n' @@ -0,0 +1,44 @@ +import { createAsyncThunk, createSlice } from '@reduxjs/toolkit' + +import { CopywriteProxy } from '@/src/domains/copywrite/proxy/copywrite-proxy' +import { Template } from '@/src/domains/copywrite/proxy/types/template' +import { Message } from '@/src/shared/lib/types/model' + +export interface Theme { + templates: Template[] | null + generation: Message[] | null +} + +const initialState: Theme = { + templates: null, + generation: null, +} + +export const loadTemplates = createAsyncThunk('copywrite/loadTemplates', async (token?: string): Promise => { + return await CopywriteProxy.getTemplates(token) +}) + +export const loadGeneration = createAsyncThunk('copywrite/loadGeneration', async (token?: string): Promise => { + return await CopywriteProxy.getGeneration(token) +}) + +export const copySlice = createSlice({ + name: 'copySlice', + initialState, + reducers: { + loadTemplates: (state, action) => {}, + }, + extraReducers: (builder) => { + builder + .addCase(loadTemplates.fulfilled, (state, action) => { + state.templates = action.payload + }) + .addCase(loadGeneration.fulfilled, (state, action) => { + state.generation = action.payload + }) + }, +}) + +export const {} = copySlice.actions + +export default copySlice.reducer @@ -1,98 +0,0 @@ -import { createSlice } from '@reduxjs/toolkit' -import { EditorState } from 'draft-js' - -import { CopywriteDefaultVariables, CopywriteOverrideVariables } from '@/src/widgets/copy/api/models' -import { getHtmlText } from '@/src/widgets/copy/lib/getEditorHtml' - -export interface Theme { - output_content: string | null - input_content: string - variables: { [p: string]: string | null }[] - defaultVariables: CopywriteDefaultVariables[] | [] - overridenVariables: CopywriteOverrideVariables[] | [] -} - -const initialState: Theme = { - output_content: null, - input_content: '', - variables: [], - defaultVariables: [], - overridenVariables: [], -} - -export const copyStore = createSlice({ - name: 'copyStore', - initialState, - reducers: { - // OUTPUT CONTENT - setNewOutputContent: (state, action: { payload: string }) => { - state.output_content = action.payload - }, - addOutputContent: (state, action: { payload: string }) => { - state.output_content += action.payload - }, - - // INPUT CONTENT - setTextInputContent: (state, action: { payload: string }) => { - state.input_content = action.payload - }, - setEditorInputContent: (state, action: { payload: EditorState | undefined }) => { - if (action.payload !== undefined) state.output_content = getHtmlText(action.payload) - }, - - // VARIABLES - setAllVariables: (state, action: { payload: { [p: string]: string | null }[] }) => { - state.variables = action.payload - }, - updateVariable: (state, action: { payload: { id: string; value: string | null } }) => { - state.variables = state.variables.map((el) => { - if (el.id === action.payload.id) { - el.value = action.payload.value - } - return el - }) - }, - createVariables: (state) => {}, - - // DEFAULT VARIABLES - setDefaultVariables: (state, action: { payload: CopywriteDefaultVariables[] }) => { - state.defaultVariables = action.payload - }, - updateDefaultVariables: (state, action: { payload: { action: 'add' | 'remove'; variable: CopywriteDefaultVariables } }) => { - if (action.payload.action === 'add') { - state.defaultVariables = [...state.defaultVariables, action.payload.variable] - } - if (action.payload.action === 'remove') { - state.defaultVariables = state.defaultVariables.filter((el) => el.id !== action.payload.variable.id) - } - }, - - // OVERRIDE VARIABLES - setOverrideVariables: (state, action: { payload: CopywriteOverrideVariables[] }) => { - state.overridenVariables = action.payload - }, - updateOverrideVariables: (state, action: { payload: { action: 'add' | 'remove'; variable: CopywriteOverrideVariables } }) => { - if (action.payload.action === 'add') { - state.overridenVariables = [...state.overridenVariables, action.payload.variable] - } - if (action.payload.action === 'remove') { - state.overridenVariables = state.overridenVariables.filter((el) => el.variable !== action.payload.variable.id) - } - }, - }, -}) - -export const { - setNewOutputContent, - addOutputContent, - setTextInputContent, - setEditorInputContent, - updateVariable, - setAllVariables, - updateDefaultVariables, - setDefaultVariables, - setOverrideVariables, - updateOverrideVariables, -} = copyStore.actions - -export default copyStore.reducer @@ -0,0 +1,72 @@ +import { Dispatch, SetStateAction, useEffect, useMemo, useState } from 'react' +import { useRouter } from 'next/router' +import { useSession } from 'next-auth/react' + +import { emptyTemplate } from '@/src/domains/copywrite/lib/constants' +import { Template } from '@/src/domains/copywrite/proxy/types/template' +import { loadGeneration, loadTemplates } from '@/src/features/use-copy/copy-slice' +import { useAppDispatch, useAppSelector } from '@/src/main/store/store' +import { Message } from '@/src/shared/lib/types/model' + +interface UseCopy { + currentTemplate: Template | null + generations: Message[] | null + pickGeneration: Message | null + setPickGeneration: Dispatch> + createEmpty: () => void +} + +export const useCopy = (): UseCopy => { + const [pickGeneration, setPickGeneration] = useState(null) + + const { data } = useSession() + + const { query, push, pathname } = useRouter() + + const templates = useAppSelector((state) => state.copy.templates) + + const generations = useAppSelector((state) => state.copy.generation) + + const dispatch = useAppDispatch() + + const getId = () => { + const id = query['id'] + + if (id) { + return Number(id) + } + } + + const createEmpty = () => { + setPickGeneration({ + content: '', + uid: '123', + created_at: '123', + file: null, + info: null, + from_model: false, + elapsed_time: '12', + is_favourite: false, + is_sent: false, + }) + } + + useEffect(() => { + if (data?.access) { + dispatch(loadTemplates(data.access)) + dispatch(loadGeneration(data.access)) + } + }, [data?.access]) + + const currentTemplate = useMemo(() => { + const id = getId() + const foundTemplate = templates?.find((el) => el.id === id) + if (foundTemplate) { + return foundTemplate + } + + return emptyTemplate + }, [templates]) + + return { currentTemplate, generations, pickGeneration, setPickGeneration, createEmpty } +} @@ -0,0 +1,166 @@ +import { Dispatch, SetStateAction, useEffect, useState } from 'react' +import axios, { AxiosError, AxiosResponse } from 'axios' +import { ContentState, EditorState } from 'draft-js' +import { useSession } from 'next-auth/react' + +import { Template } from '@/src/domains/copywrite/proxy/types/template' +import { loadGeneration } from '@/src/features/use-copy/copy-slice' +import { useAppDispatch } from '@/src/main/store/store' +import { useShowData } from '@/src/shared' +import { API_URL } from '@/src/shared/lib/constants' +import { Message, MessageSend } from '@/src/shared/lib/types/model' + +type Languages = 'ru' | 'en' | 'it' | 'fr' +type LanguagesText = 'Русский' | 'Английский' | 'Итальянский' | 'Французский' + +export const langs: Record = { + Русский: 'ru', + Английский: 'en', + Итальянский: 'it', + Французский: 'fr', +} + +export const languages = { ...langs, Немецкий: 'de' } +export const target_audiences = ['Вся', '18+', '21+', '30+', '14-20', '35-40'] +export const tovs = ['Нейтральный', 'Спокойный', 'Агрессивный', 'Серьезный', 'Провокационный', 'Остроумный', 'Наставнический', 'Дружелюбный'] + +type Setting = Pick + +type UseTemplate = { + text: EditorState + isLoading: boolean + + lang: string + targetAudiences: string + tov: string + theme: string + content: string + keywords: string[] + resource_urls: string[] + + setLang: Dispatch> + setTargetAudiences: Dispatch> + setTov: Dispatch> + setTheme: Dispatch> + setContent: Dispatch> + setKeywords: Dispatch> + setResourceUrls: Dispatch> + + clearSetting: () => void + createText: () => void + onEditorChange: (a: any) => void +} + +export const useTemplate = (currentTemplate: Template | null): UseTemplate => { + const [text, setText] = useState(EditorState.createEmpty()) + + const onEditorChange = (editorState: any) => { + setText(editorState) + } + + const [isLoading, setIsLoading] = useState(false) + + const dispatch = useAppDispatch() + + const { showError } = useShowData() + + const { data: session } = useSession() + + const [lang, setLang] = useState(() => { + const a = Object.entries(languages) + + const b = a.find(([key, value]) => value === currentTemplate?.language) + + if (b) { + return b[0] + } else { + return a[0][0] + } + }) + + const [targetAudiences, setTargetAudiences] = useState(currentTemplate?.target_audience || target_audiences[0]) + + const [tov, setTov] = useState(currentTemplate?.tov || tovs[0]) + + const [theme, setTheme] = useState(currentTemplate?.theme || '') + + const [content, setContent] = useState(currentTemplate?.content || '') + + const [keywords, setKeywords] = useState(currentTemplate?.keywords || []) + + const [resource_urls, setResourceUrls] = useState(currentTemplate?.resources_urls || []) + + const clearSetting = () => { + setLang('Русский') + setTargetAudiences(currentTemplate?.target_audience || target_audiences[0]) + setTov(currentTemplate?.tov || tovs[0]) + setTheme(currentTemplate?.theme || '') + setKeywords(currentTemplate?.keywords || []) + setResourceUrls(currentTemplate?.resources_urls || []) + } + + const createText = async () => { + const dataForSend: MessageSend = { + content: content, + file: null, + info: { + keywords, + language: Object.entries(languages).find(([key, value]) => key === lang)![1], + tov, + resources_urls: resource_urls, + target_audience: targetAudiences, + theme: theme, + }, + } + + if (!session?.access) { + showError('У вас неактивный токен, попробуйте перезайти в аккаунт', true) + return + } + + try { + setIsLoading(true) + const { data } = await axios.post>(API_URL + '/copywrite/', dataForSend, { + withCredentials: true, + headers: { + Authorization: `Bearer ${session?.access}`, + }, + }) + setIsLoading(false) + + const newContentState = ContentState.createFromText(data[0].content) + + setText(EditorState.createWithContent(newContentState)) + dispatch(loadGeneration(session?.access)) + } catch (err: any) { + setIsLoading(false) + return { + error: true, + message: 'Произошла ошибка при выполнении запроса', + details: err as AxiosError, + } + } + } + + return { + tov, + setTov, + lang, + setLang, + clearSetting, + createText, + isLoading, + keywords, + setKeywords, + setResourceUrls, + resource_urls, + setTargetAudiences, + targetAudiences, + setTheme, + text, + onEditorChange, + theme, + setContent, + content, + } +} @@ -4,7 +4,7 @@ import Switch from '@mui/material/Switch' import { setParams } from '@/src/main/store/model-parametres-store' import { useAppDispatch } from '@/src/main/store/store' -import TooltipModelTypes from '@/src/shared/ui/tooltip-model-types' +import TooltipModelTypes from '@/src/widgets/filters-gpt/ui/tooltip-model-types' interface IProps { name: string @@ -8,7 +8,7 @@ import { setParams } from '@/src/main/store/model-parametres-store' import { useAppDispatch } from '@/src/main/store/store' import { InputStyleDark, InputStyleLight } from '@/src/shared' import { useThemeAndDevice } from '@/src/shared/lib/hooks' -import TooltipModelTypes from '@/src/shared/ui/tooltip-model-types' +import TooltipModelTypes from '@/src/widgets/filters-gpt/ui/tooltip-model-types' interface IProps { title: string @@ -21,7 +21,7 @@ interface IProps { setNewParam: (payload: { [p: string]: string | number | number[] | boolean }) => void } -export const InputFilter = ({ filters, item_key, values, title, description = '', setNewParam }: IProps) => { +export const InputFilter = ({ filters, item_key, values, title, description, setNewParam }: IProps) => { const { theme } = useThemeAndDevice() const [value, setValue] = React.useState(values?.default || '') @@ -5,7 +5,7 @@ import { MenuItem, Select, SelectChangeEvent, Stack, Typography } from '@mui/mat import { setParams } from '@/src/main/store/model-parametres-store' import { useAppDispatch, useAppSelector } from '@/src/main/store/store' import { baseColor } from '@/src/shared/lib/constants/colors' -import TooltipModelTypes from '@/src/shared/ui/tooltip-model-types' +import TooltipModelTypes from '@/src/widgets/filters-gpt/ui/tooltip-model-types' interface IProps { selects: { availables: string[]; default: any; end: number; start: number; step: number } @@ -3,7 +3,7 @@ import * as React from 'react' import { setParams } from '@/src/main/store/model-parametres-store' import { useAppDispatch } from '@/src/main/store/store' import { Slider as Sl } from '@/src/shared' -import TooltipModelTypes from '@/src/shared/ui/tooltip-model-types' +import TooltipModelTypes from '@/src/widgets/filters-gpt/ui/tooltip-model-types' interface IProps { title: string @@ -15,6 +15,10 @@ export type CardProps = { } const ChatCard = ({ text, icon, title, uid, slug, accessed_models }: CardProps) => { + useEffect(() => { + console.log(accessed_models) + }, [accessed_models]) + return ( @@ -5,7 +5,7 @@ import { MenuItem, Select, SelectChangeEvent, Stack, Typography } from '@mui/mat import { useAppSelector } from '@/src/main/store/store' import { IModelVersions } from '@/src/shared/api/models/models' import { baseColor } from '@/src/shared/lib/constants/colors' -import TooltipModelTypes from '@/src/shared/ui/tooltip-model-types' +import TooltipModelTypes from '@/src/widgets/filters-gpt/ui/tooltip-model-types' interface ISelect { value: string @@ -86,7 +86,6 @@ function Chat({ modelType={modelType} deleteMessage={deleteMessage} modelTitle={modelTitle} - loading={loading} /> (toShort: T, lang: LangParam): LangRet return arrLang.find(([_, value]) => lang === value)![0] as LangReturn } +function KeyForSearch(props: any) { + if (props.text === null) { + return null + } + + const checkType = () => { + if (props.text.includes('Windows')) { + return 'Ctrl + F' + } else { + return '⌥+F' + } + } + + return ( + + {checkType()} + + ) +} + const InfoBar: React.FC = ({ title, device }) => { const theme = useAppSelector((state) => state.theme.theme) @@ -64,6 +83,8 @@ const InfoBar: React.FC = ({ title, device }) => { const show_balance = useAppSelector((state) => state.user.show_balance) + const desktop = device === 'desktop' + const { pathname, replace } = useRouter() const { data } = useSession() @@ -75,9 +96,7 @@ const InfoBar: React.FC = ({ title, device }) => { await i18n.changeLanguage(newLang) } - const { email, first_name, last_name, profile_picture_link, account_type } = useAppSelector( - (state) => state.user - ) + const { email, first_name, last_name, profile_picture_link, account_type } = useAppSelector((state) => state.user) const dispatch = useAppDispatch() @@ -91,6 +110,37 @@ const InfoBar: React.FC = ({ title, device }) => { getModels(data?.access).then((res) => setModels(res)) }, [data?.access]) + const filtersFn = () => { + if (!search.trim()) { + return models + } + + return models.filter((el) => el.title.toLowerCase().includes(search.toLowerCase())) + } + + const searchRef = useRef(null) + const searchRef2 = useRef(null) + const autocompleteRef = useRef(null) + + useEffect(() => { + document.addEventListener('keydown', ctrlF, false) + return () => { + document.removeEventListener('keydown', ctrlF, false) + } + //@ts-ignore + }, [ctrlF]) + + const ctrlF = useCallback((e: any) => { + if ((e.key === 'f' || e.key === 'F') && (e.ctrlKey || e.metaKey)) { + e.preventDefault() + //@ts-ignore + searchRef.current!.focus() + setSearchOpen(true) + } + }, []) + + const { push } = useRouter() + const [anchorEl, setAnchorEl] = React.useState(null) const [anchorEl2, setAnchorEl2] = React.useState(null) @@ -119,7 +169,60 @@ const InfoBar: React.FC = ({ title, device }) => { return ( - + + setSearchOpen(true)} + onClose={() => setSearchOpen(false)} + //@ts-ignore + getOptionLabel={(label: Model) => label.title} + onChange={(event, value) => { + if (value) { + //@ts-ignore + push(`chat-bots/${value.slug}`) + } + }} + renderInput={(params) => ( + setSearch(e.target.value)} + placeholder='Поиск по платформе' + InputProps={{ + ...params.InputProps, + startAdornment: ( + Поиск + ), + endAdornment: , + }} + /> + )} + /> + + = ({ title, device }) => { > - Мы уже работаем над этой проблемой. Попробуйте перезайти в - аккаунт + Мы уже работаем над этой проблемой. Попробуйте перезайти в аккаунт - @@ -196,10 +294,7 @@ const InfoBar: React.FC = ({ title, device }) => { {show_balance && ( - + {declineToken(balance.toString())} @@ -213,13 +308,7 @@ const InfoBar: React.FC = ({ title, device }) => { handleClick(e) } src={profile_picture_link as string} - sx={{ - width: 40, - height: 40, - bgcolor: '#8280FF', - marginLeft: '10px', - cursor: 'pointer', - }} + sx={{ width: 40, height: 40, bgcolor: '#8280FF', marginLeft: '10px', cursor: 'pointer' }} > {email[0] || 'N'} @@ -227,8 +316,7 @@ const InfoBar: React.FC = ({ title, device }) => { sx={{ marginTop: '6px' }} PaperProps={{ style: { - backgroundColor: - theme === 'dark' ? '#151518' : 'white', + backgroundColor: theme === 'dark' ? '#151518' : 'white', borderRadius: '13px', boxShadow: 'none', }, @@ -248,22 +336,9 @@ const InfoBar: React.FC = ({ title, device }) => { > - - router.push('/account?scope=setting') - } - > - {''} - + router.push('/account?scope=setting')}> + {''} + {' '} Настройки{' '} @@ -271,26 +346,9 @@ const InfoBar: React.FC = ({ title, device }) => { - - router.push( - '/account?scope=business' - ) - } - > - {''} - + router.push('/account?scope=business')}> + {''} + {' '} Компаниям{' '} @@ -301,26 +359,9 @@ const InfoBar: React.FC = ({ title, device }) => { {account_type === 'regular' && ( - - router.push( - '/account?scope=referral' - ) - } - > - {''} - + router.push('/account?scope=referral')}> + {''} + {' '} Рефералам{' '} @@ -331,45 +372,18 @@ const InfoBar: React.FC = ({ title, device }) => { - - router.push( - '/account?scope=subscribe' - ) - } - > - {''} - + router.push('/account?scope=subscribe')}> + {''} + {' '} Оплата{' '} - signOut()} - sx={{ marginTop: '15px', cursor: 'pointer' }} - > - {''} - + signOut()} sx={{ marginTop: '15px', cursor: 'pointer' }}> + {''} + Выйти @@ -29,14 +29,7 @@ interface Props { isLoader?: boolean } -export const Layout: React.FC = ({ - children, - device, - isAuthPage = false, - titlePage, - title = titlePage, - isLoader, -}) => { +export const Layout: React.FC = ({ children, device, isAuthPage = false, titlePage, title = titlePage, isLoader }) => { const { data: sessionData } = useSession() const appState = useAppSelector((state) => state) const dispatch = useAppDispatch() @@ -44,7 +37,6 @@ export const Layout: React.FC = ({ const desktop = device === 'desktop' const [sidemenuDefaultOpen, setSidemenuDefaultOpen] = useState(true) - const [readyToDisplay, setReadyToDisplay] = useState(false) useTheme() @@ -67,7 +59,6 @@ export const Layout: React.FC = ({ if ((sessionData && !sessionStorage.getItem('firstRender')) || (sessionData && !localStorage.getItem('global_settings'))) { dispatch(getUserAccountSettings(sessionData.access)) sessionStorage.setItem('firstRender', 'true') - setReadyToDisplay(true) } }, [sessionData]) @@ -75,7 +66,6 @@ export const Layout: React.FC = ({ const lsData = localStorage.getItem('global_settings') if (lsData !== null) { dispatch(setSettings(JSON.parse(lsData))) - setReadyToDisplay(true) } window.addEventListener('beforeunload', () => { @@ -86,27 +76,14 @@ export const Layout: React.FC = ({ React.useEffect(() => { if (appState.settings.state !== null && device) { - let setting = isSettingExist({ - settings: appState.settings.state, - targetDevice: device, - targetType: 'sidemenu', - }) - if (setting) - setting?.value?.sidemenu_state === 'opened' - ? setSidemenuDefaultOpen(true) - : setSidemenuDefaultOpen(false) + let setting = isSettingExist({ settings: appState.settings.state, targetDevice: device, targetType: 'sidemenu' }) + if (setting) setting?.value?.sidemenu_state === 'opened' ? setSidemenuDefaultOpen(true) : setSidemenuDefaultOpen(false) } }, [appState.settings.state]) if (status === 'loading' || isLoader) { return ( - + ) @@ -119,8 +96,6 @@ export const Layout: React.FC = ({ - - = ({ padding: isAuthPage ? '0px' : desktop ? '0px' : '10px', }} > - {readyToDisplay && ( - - - {!isAuthPage ? ( - desktop ? ( - - - - - - {children} - + + + {!isAuthPage ? ( + desktop ? ( + + + + + + {children} - ) : ( - - - {children} - - ) + ) : ( - <>{children} - )} - - - )} + + + {children} + + ) + ) : ( + <>{children} + )} + + ) @@ -6,7 +6,7 @@ import { themeSlice } from '@/src/entities/theme' import { userSlice } from '@/src/entities/user-account' import { settingsSlice } from '@/src/entities/user-account/model/settings' import { stepperSlice } from '@/src/features/register-business' -import { copyStore } from '@/src/features/use-copy/copy-store' +import { copySlice } from '@/src/features/use-copy/copy-slice' import { paramsStore } from '@/src/main/store/model-parametres-store' import { notificationSlice } from './notification-slice' @@ -17,7 +17,7 @@ export const store = configureStore({ balance: balanceSlice.reducer, stepper: stepperSlice.reducer, user: userSlice.reducer, - copy: copyStore.reducer, + copy: copySlice.reducer, notification: notificationSlice.reducer, params: paramsStore.reducer, settings: settingsSlice.reducer, @@ -1,19 +1,19 @@ :root[data-theme='light'] { - --air-color: #8280ff; - --background-color-main: #ffffff; - --background-color-additional: #ffffff; - --background-color-page: #fbfbfb; - --background-color-table: white; - --bg-color-button-gray: #e8e8e8; - --color-btn-gray: #5a5a5a; - --search-bg: white; - --text-color-purple: #7f7df3; - --text-color-main: #373737; - --text-color-additional-one: #868686; - --text-color-additional-two: #5e5e5e; - --border-color: #f5f5f5; - --border-color2: #e7e7e7; - --bg-audio: #f2f2fe; + --air-color: #8280FF; + --background-color-main: #ffffff; + --background-color-additional: #ffffff; + --background-color-page: #fbfbfb; + --background-color-table: white; + --bg-color-button-gray: #e8e8e8; + --color-btn-gray: #5a5a5a; + --search-bg: white; + --text-color-purple: #7f7df3; + --text-color-main: #373737; + --text-color-additional-one: #868686; + --text-color-additional-two: #5e5e5e; + --border-color: #f5f5f5; + --border-color2: #e7e7e7; + --bg-audio: #f2f2fe; --new-ui-bg-app-color: #eff0f2; --new-ui-main-color: white; @@ -23,31 +23,24 @@ --new-ui-btn-danger-bg: #FF23721A; --new-ui-ctrl-f-button-bg:#F9F9FC; --new-ui-ctrl-f-button-border:1px solid #C4CBD8; - - --copy-border: #EFF0F2; - --copy-color: #343437; - - --cards-hover:#F9F9FF; - --choosen-tab: #FFFFFF; - --choosen-tab-color:#373737 ; } :root[data-theme='dark'] { - --air-color: #8280ff; - --background-color-main: #303030; - --background-color-page: #303030; - --background-color-table: #4b4b4b; - --background-color-additional: #373737; - --search-bg: #464646; - --color-btn-gray: #d0d0d0; - --bg-color-button-gray: #5d5a5a; - --text-color-additional-one: #d4d4d4; - --text-color-main: #ffffff; - --text-color-additional-two: #ffffff; - --text-color-purple: #7f7df3; - --border-color: #202020; - --border-color2: #2c2c2c; - --bg-audio: #303030; + --air-color: #8280FF; + --background-color-main: #303030; + --background-color-page: #303030; + --background-color-table: #4b4b4b; + --background-color-additional: #373737; + --search-bg: #464646; + --color-btn-gray: #d0d0d0; + --bg-color-button-gray: #5d5a5a; + --text-color-additional-one: #d4d4d4; + --text-color-main: #ffffff; + --text-color-additional-two: #ffffff; + --text-color-purple: #7f7df3; + --border-color: #202020; + --border-color2: #2c2c2c; + --bg-audio: #303030; --new-ui-bg-app-color: #303035; --new-ui-border: 1px solid #40404E; @@ -57,72 +50,63 @@ --new-ui-btn-danger-bg: #FF23721A; --new-ui-ctrl-f-button-bg:#242428; --new-ui-ctrl-f-button-border:1px solid #303035; - - --copy-border: #343437; - --copy-color:#EFF0F2; - - --cards-hover:#303047; - --choosen-tab: #151518; - --choosen-tab-color: #FFFFFF; } * { - box-sizing: border-box; - padding: 0; - margin: 0; + box-sizing: border-box; + padding: 0; + margin: 0; } - - - html { + } body { - max-width: 100vw; - background-color: var(--new-ui-bg-app-color); - scroll-behavior: smooth; - font-feature-settings: 'lnum' 1; + max-width: 100vw; + background-color: var(--new-ui-bg-app-color); + scroll-behavior: smooth; + font-feature-settings: 'lnum' 1; } a { - color: inherit; - text-decoration: none; + color: inherit; + text-decoration: none; } p { - font-size: 15px; - font-style: normal; - font-weight: 400; - color: var(--new-ui-text-color); + font-size: 15px; + font-style: normal; + font-weight: 400; + color: var(--new-ui-text-color); } .introjs-tooltip { - max-width: 350px !important; - border-radius: 10px; - background-color: transparent !important; - box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.04), 0px 4px 32px rgba(0, 0, 0, 0.16) !important; + max-width: 350px !important; + border-radius: 10px; + background-color: transparent !important; + box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.04), 0px 4px 32px rgba(0, 0, 0, 0.16) !important; } .introjs-tooltip-header { - border-radius: 10px 9px 0px 0px !important; + border-radius: 10px 9px 0px 0px !important; } .introjs-tooltip * { - color: white; - background-color: #8685c6; + color: white; + background-color: #8685c6; } .left { - border-right-color: #8685c6 !important; - border: 10px; - background-color: transparent !important; + border-right-color: #8685c6 !important; + border: 10px; + background-color: transparent !important; } .bottom { - border-top-color: #6d6ca6 !important; - border: 10px; - background-color: transparent !important; + border-top-color: #6d6ca6 !important; + border: 10px; + background-color: transparent !important; } /*li {*/ @@ -130,432 +114,306 @@ p { /*}*/ .right { - border-left-color: #8685c6 !important; - border: 10px; - background-color: transparent !important; + border-left-color: #8685c6 !important; + border: 10px; + background-color: transparent !important; } .introjs-skipbutton { - margin-top: 6px !important; - color: rgba(255, 255, 255, 0.5) !important; + margin-top: 6px !important; + color: rgba(255, 255, 255, 0.5) !important; } .MuiPaper-root.MuiAutocomplete-paper { - background-color: var(--new-ui-main-color); /* Замените #your-color на ваш цвет */ - border: 1px solid var(--new-ui-main-color); /* Замените #your-border-color на цвет бордюра */ - box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.15); /* Измените тень, если необходимо */ -} - -/* Изменение цвета полоски сверху выпадающего списка */ -.MuiAutocomplete-listbox:before { - border-top: 1px solid var(--new-ui-main-color); /* Замените #your-border-color на цвет бордюра */ -} - -/* Изменение цвета полоски снизу выпадающего списка */ -.MuiAutocomplete-listbox:after { - border-bottom: 1px solid var(--new-ui-main-color); /* Замените #your-border-color на цвет бордюра */ -} + background-color:var(--new-ui-main-color); /* Замените #your-color на ваш цвет */ + border: 1px solid var(--new-ui-main-color); /* Замените #your-border-color на цвет бордюра */ + box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.15); /* Измените тень, если необходимо */ + } + + /* Изменение цвета полоски сверху выпадающего списка */ + .MuiAutocomplete-listbox:before { + border-top: 1px solid var(--new-ui-main-color); /* Замените #your-border-color на цвет бордюра */ + } + + /* Изменение цвета полоски снизу выпадающего списка */ + .MuiAutocomplete-listbox:after { + border-bottom: 1px solid var(--new-ui-main-color); /* Замените #your-border-color на цвет бордюра */ + } .MuiAutocomplete-popup { - background-color: var(--new-ui-main-color); /* Замените #your-color на ваш цвет */ -} - -/* Изменение цвета элементов в выпадающем списке */ -.MuiAutocomplete-option { - background-color: var(--new-ui-main-color); /* Замените #your-color на ваш цвет */ - color: var(--new-ui-text-color); /* Замените #your-text-color на цвет текста элементов */ -} - -/* Изменение цвета активного элемента в выпадающем списке */ -.MuiAutocomplete-option.Mui-selected { - background-color: var( - --new-ui-main-color - ); /* Замените #your-selected-color на цвет активного элемента */ - color: var( - --new-ui-main-color - ); /* Замените #your-selected-text-color на цвет текста активного элемента */ -} + background-color: var(--new-ui-main-color); /* Замените #your-color на ваш цвет */ + } + + /* Изменение цвета элементов в выпадающем списке */ + .MuiAutocomplete-option { + background-color: var(--new-ui-main-color); /* Замените #your-color на ваш цвет */ + color:var(--new-ui-text-color); /* Замените #your-text-color на цвет текста элементов */ + } + + /* Изменение цвета активного элемента в выпадающем списке */ + .MuiAutocomplete-option.Mui-selected { + background-color:var(--new-ui-main-color); /* Замените #your-selected-color на цвет активного элемента */ + color: var(--new-ui-main-color); /* Замените #your-selected-text-color на цвет текста активного элемента */ + } .introjs-tooltiptext { - padding: 6px 20px !important; - padding-bottom: 15px !important; - font-size: 15px !important; - line-height: 150% !important; + padding: 6px 20px !important; + padding-bottom: 15px !important; + font-size: 15px !important; + line-height: 150% !important; } .introjs-helperLayer { - border: 1px solid #8685c6 !important; - border-radius: 20px !important; - box-shadow: rgba(33, 33, 33, 0.8) 0px 0px 0px 0px, rgba(33, 33, 33, 0.5) 0px 0px 0px 5000px !important; + border: 1px solid #8685c6 !important; + border-radius: 20px !important; + box-shadow: rgba(33, 33, 33, 0.8) 0px 0px 0px 0px, rgba(33, 33, 33, 0.5) 0px 0px 0px 5000px !important; } .introjs-tooltipbuttons { - border-radius: 0px 0px 10px 10px !important; - border: none !important; - background-color: #6d6ca6 !important; + border-radius: 0px 0px 10px 10px !important; + border: none !important; + background-color: #6d6ca6 !important; } .introjs-tooltipbuttons * { - background-color: transparent !important; - border: none !important; - color: white !important; - font-size: 14px !important; - font-weight: 600 !important; + background-color: transparent !important; + border: none !important; + color: white !important; + font-size: 14px !important; + font-weight: 600 !important; - text-shadow: none !important; + text-shadow: none !important; } .introjs-button:focus { - box-shadow: none !important; + box-shadow: none !important; } .introjs-tooltip-title { - margin-top: 5px !important; - font-weight: 500 !important; + margin-top: 5px !important; + font-weight: 500 !important; } .MuiMenu-paper { - padding: 0; -} - -/* Примените фиксированную ширину, если необходимо */ -.MuiMenu-paper { -} + padding: 0; + } + + /* Примените фиксированную ширину, если необходимо */ + .MuiMenu-paper { + + } .pd-30 { - padding: 30px; + padding: 30px; } -@media (max-width: 768px) { - .pd-30 { - padding: 25px; - } +@media (max-width:768px) { + .pd-30 { + padding: 25px; + } } .bg-color-block { - background-color: var(--new-ui-main-color); + background-color: var(--new-ui-main-color); } .border-radius-main { - border-radius: 15px; + border-radius: 15px; } .mt-15 { - margin-top: 15px; + margin-top: 15px; } .mt-30 { - margin-top: 15px; + margin-top: 15px; } .color-gray { - color: var(--new-ui-gray-color); + color: var(--new-ui-gray-color); } .font-16 { - font-size: 16px; + font-size: 16px; } .relative { - position: relative; + position: relative; } th { - color: var(--new-ui-text-color) !important; + color: var(--new-ui-text-color) !important; } .content-center-translate { - text-align: center; - position: absolute; - top: 150px; - left: 37%; - transform: translate(0, -50%); + text-align: center; + position: absolute; + top: 150px; + left: 37%; + transform: translate(0, -50%); } -.tutorial-chat-gpt { - position: relative; +.tutorial-chat-gpt{ + position: relative; } .title-block { - letter-spacing: 0.39px; - color: var(--new-ui-gray-color); - font-size: 13px !important; - font-weight: 600; - text-transform: uppercase; + letter-spacing: 0.39px; + color: var(--new-ui-gray-color); + font-size: 13px !important; + font-weight: 600; + text-transform: uppercase; } .title-struct { - color: var(--new-ui-text-color); - font-size: 15px; - font-style: normal; - font-weight: 600; + color: var(--new-ui-text-color); + font-size: 15px; + font-style: normal; + font-weight: 600; } .text { - color: var(--new-ui-text-color); - font-size: 15px; - font-style: normal; - font-weight: 400; + color: var(--new-ui-text-color); + font-size: 15px; + font-style: normal; + font-weight: 400; } .title-main-gray { - color: var(--new-ui-gray-color); - font-size: 15px; - font-style: normal; - font-weight: 400; + color: var(--new-ui-gray-color); + font-size: 15px; + font-style: normal; + font-weight: 400; } .title-vspomogatel { - color: var(--new-ui-text-color); - font-size: 20px; - font-style: normal; - font-weight: 600; - line-height: normal; + color: var(--new-ui-text-color); + font-size: 20px; + font-style: normal; + font-weight: 600; + line-height: normal; } ::placeholder { - color: var(--new-ui-gray-color); + color: var(--new-ui-gray-color) } textarea { - border-radius: 10px; - background-color: transparent; - border: var(--new-ui-border); - color: var(--new-ui-text-color); - padding: 10px; - font-size: 15px; - font-family: inherit; + border-radius: 10px; + background-color: transparent; + border: var(--new-ui-border); + color: var(--new-ui-text-color); + padding: 10px; + font-size: 15px; + font-family: inherit; } .rdw-option-wrapper { - border: none !important; + border: none !important; } .rdw-option-wrapper:hover { - box-shadow: none !important; + box-shadow: none !important; } .rdw-option-wrapper { - background-color: transparent !important; - max-width: 900px; + background-color: transparent !important; + max-width: 900px; } .rdw-editor-toolbar { background-color: transparent !important; - padding: 20px 0 !important; + padding-bottom: 15px !important; border: none !important; - border-bottom: 1px solid var(--copy-border) !important; - border-top: 1px solid var(--copy-border) !important; + border-bottom: 1px solid #EFF0F2 !important; } .rdw-dropdown-wrapper { background-color: transparent !important; border: 2px solid var(--new-ui-bg-app-color) !important; border-radius: 10px !important; - padding: 0 !important; + padding: 10px !important; height: 36px !important; min-width: 40px !important; } -.rdw-dropdown-selectedtext{ - padding: 0 16px 0 12px !important; -} - .rdw-dropdown-wrapper:hover { - box-shadow: none !important; + box-shadow: none !important; } .rdw-editor-wrapper { - color: var(--new-ui-text-color); + color: var(--new-ui-text-color); } .rdw-dropdown-wrapper { - background-color: transparent !important; - position: relative; + background-color: transparent !important; + position: relative; } .rdw-dropdown-optionwrapper { - border: none !important; - border-radius: 10px !important; width: 100% !important; - margin-top: 12px !important; + margin-top: 15px !important; overflow: hidden; color: inherit !important; - background-color: var(--background-color-main) !important; overflow-y: hidden !important; } .rdw-block-dropdown { - width: 150px !important; + width: 150px !important; } .rdw-dropdown-optionwrapper > li { - color: var(--new-ui-text-color) !important; - padding: 0 16px 0 12px !important; -} - -.rdw-dropdown-optionwrapper > li:hover{ - background-color:var(--new-ui-gray-color) !important -} -.rdw-dropdownoption-active{ - background: var(--new-ui-gray-color) !important + color: inherit !important; } .rdw-dropdown-optionwrapper:hover { - border: none !important; - box-shadow: none !important; + box-shadow: none; color: inherit !important; } -.rdw-dropdown-carettoclose{ - border-radius: 5px !important; - border-bottom-color: var(--new-ui-gray-color) !important; -} - -.rdw-dropdown-carettoopen{ - border-radius: 5px !important; - border-top-color: var(--new-ui-gray-color) !important; -} - -.rdw-text-align-wrapper{ - margin: 0 !important; -} - -.rdw-list-wrapper{ - margin: 0 !important; -} - -.rdw-history-wrapper{ - margin: 0 !important; -} - -.rdw-block-wrapper{ - margin: 0 !important; -} - .border-bottom-1px-gray { - border-bottom: 1px solid #eff0f2 !important; + border-bottom: 1px solid #EFF0F2 !important; } .pointer { - cursor: pointer; + cursor: pointer; } .air-color { - background-color: var(--air-color); + background-color: var(--air-color); } -[contenteditable='true']:focus { - outline: none; - border: 1px solid var(--air-color) !important; +[contenteditable="true"]:focus { + outline: none; + border: 1px solid var(--air-color) !important; } /*scroll styles*/ -.smallScroll::-webkit-scrollbar { - height: 5px; - width: 2px; +.smallScroll::-webkit-scrollbar{ + height: 5px; + width: 2px; } .smallScroll::-webkit-scrollbar-track { background: initial; - /*margin: 21px 0;*/ - margin: 5px 0; + margin: 21px 0; } .smallScroll::-webkit-scrollbar-thumb { - background-color: rgba(217, 217, 217, 0.49); - border-radius: 5px; + background-color: rgba(217, 217, 217, 0.49); + border-radius: 5px; } -.height { - height: calc(400px + (1024 - 400) * ((100vh - 400px) / (1024 - 400))); +.height{ + height: calc(400px + (1024 - 400) * ((100vh - 400px) / (1024 - 400))); } -.rotate-180 { - transform: rotate(180deg); - transition: all; - transition-duration: 250ms; +.rotate-180{ + transform: rotate(180deg); + transition: all; + transition-duration: 250ms; } .rotate-0{ transform: rotate(0deg); transition: all; transition-duration: 250ms; -} - - -/*COPY*/ -.toolbarClassName{ - align-items: center; - gap: 15px; -} -.wrapperClassName{ - -} - -.editorClassName{ - border: 1px solid transparent; - transition: border-color 0.3s; - cursor: text; -} - -.editorClassName div:focus{ - outline: none !important; - border-color: transparent !important; -} - -.editorClassName div .public-DraftStyleDefault-block{ - display: inline-block; - padding:0 1px; - margin: 0.5em 0 !important; -} - -.public-DraftEditor-content{ - overflow-y: scroll; - max-height: calc(75vh - 200px) ; - - @media (max-width: 768px) { - max-height: calc(70vh - 200px) ; - } - -} - - -.public-DraftEditor-content::-webkit-scrollbar{ - height: 5px; - width: 2px; -} - -.public-DraftEditor-content::-webkit-scrollbar-track { - background: initial; - margin: 21px 0; -} - -.public-DraftEditor-content::-webkit-scrollbar-thumb { - background-color: rgba(217, 217, 217, 0.49); - border-radius: 5px; -} - -.inline{ - gap:3px; - margin: 0 !important; -} - -.inline-btn{ - width: 12px; - height: 25px !important; - margin: 0 !important; - padding: 0 !important; -} - -.rdw-option-active{ - background: rgba(229, 229, 229, 0.18) !important; - -webkit-box-shadow: inset 0 0 5px #c1c1c1 !important; - -moz-box-shadow: inset 0 0 5px #c1c1c1 !important; - box-shadow: inset 0 0 5px #c1c1c1 !important; - outline: none !important; -} - -.copy-color{ - color:var(--copy-color); - border-color: var(--copy-border); - -} +} \ No newline at end of file @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect } from 'react' +import React, { useCallback } from 'react' import { useDispatch } from 'react-redux' import { Box, Collapse, Stack, Typography } from '@mui/material' import { useRouter } from 'next/router' @@ -49,7 +49,6 @@ const Page: React.FC = ({ deviceType, deviceOs }) => { const desktop = deviceType === 'desktop' const { data } = useSession() const router = useRouter() - const { chats, currentChat, @@ -62,11 +61,7 @@ const Page: React.FC = ({ deviceType, deviceOs }) => { isTryRename, setIsTryRename, } = useChats(modelType) - const { messages, sendMessage, loading, getMessagesPagination, deleteMessage } = useModel( - currentChat, - showError, - modelType - ) + const { messages, sendMessage, loading, getMessagesPagination, deleteMessage } = useModel(currentChat, showError, modelType) const includeParams = useAppSelector((state) => state.params.params) const dispatch = useDispatch() @@ -74,7 +69,7 @@ const Page: React.FC = ({ deviceType, deviceOs }) => { const deleteMessageMemo = useCallback(deleteMessage, [currentChat, messages]) React.useEffect(() => { - if (data?.access) { + if (data?.access && !botParams) { model_api.getBotParams(router.asPath.split('/')[2], data.access).then((res) => { setBotParams(res) setModelType(res.slug) @@ -83,55 +78,35 @@ const Page: React.FC = ({ deviceType, deviceOs }) => { dispatch( setParametres( res.parameters.reduce( - (a, v) => - v.versions.includes(res.versions[0].slug) - ? { ...a, [v.key]: v.values.default } - : { ...a }, + (a, v) => (v.versions.includes(res.versions[0].slug) ? { ...a, [v.key]: v.values.default } : { ...a }), {} ) ) ) } else { setVersion('') - dispatch( - setParametres( - res.parameters.reduce( - (a, v) => ({ ...a, [v.key]: v.values.default }), - {} - ) - ) - ) + dispatch(setParametres(res.parameters.reduce((a, v) => ({ ...a, [v.key]: v.values.default }), {}))) } }) } - }, [data?.access, router.query]) + }, [data?.access]) const resetParams = () => { if (botParams) { dispatch(setParametres({})) - if (botParams.versions?.length !== 0) { + if (botParams.versions.length !== 0) { setVersion(botParams.versions[0].slug) dispatch( setParametres( botParams.parameters.reduce( - (a, v) => - v.versions.includes(botParams.versions[0].slug) - ? { ...a, [v.key]: v.values.default } - : { ...a }, + (a, v) => (v.versions.includes(botParams.versions[0].slug) ? { ...a, [v.key]: v.values.default } : { ...a }), {} ) ) ) } else { setVersion(botParams.slug) - dispatch( - setParametres( - botParams.parameters.reduce( - (a, v) => ({ ...a, [v.key]: v.values.default }), - {} - ) - ) - ) + dispatch(setParametres(botParams.parameters.reduce((a, v) => ({ ...a, [v.key]: v.values.default }), {}))) } } } @@ -143,23 +118,13 @@ const Page: React.FC = ({ deviceType, deviceOs }) => { dispatch( setParametres( botParams.parameters.reduce( - (a, v) => - v.versions.includes(version) - ? { ...a, [v.key]: v.values.default } - : { ...a }, + (a, v) => (v.versions.includes(version) ? { ...a, [v.key]: v.values.default } : { ...a }), {} ) ) ) } else { - dispatch( - setParametres( - botParams.parameters.reduce( - (a, v) => ({ ...a, [v.key]: v.values.default }), - {} - ) - ) - ) + dispatch(setParametres(botParams.parameters.reduce((a, v) => ({ ...a, [v.key]: v.values.default }), {}))) } } } @@ -205,11 +170,7 @@ const Page: React.FC = ({ deviceType, deviceOs }) => { } return ( - + <Box className={styles.main}> @@ -247,20 +208,10 @@ const Page: React.FC<any> = ({ deviceType, deviceOs }) => { handleClickChatSetting={handleClickChatSetting} /> {desktop && ( - <Stack - className='pd-30 bg-color-block border-radius-main' - spacing={2} - > + <Stack className='pd-30 bg-color-block border-radius-main' spacing={2}> {botParams?.versions && botParams.versions.length !== 0 && ( <> - <Typography - sx={{ - color: '#A4AAB5', - fontWeight: '600', - fontSize: '14px', - letterSpacing: '0.1px', - }} - > + <Typography sx={{ color: '#A4AAB5', fontWeight: '600', fontSize: '14px', letterSpacing: '0.1px' }}> ВЕРСИИ </Typography> <ChatSelect @@ -281,14 +232,7 @@ const Page: React.FC<any> = ({ deviceType, deviceOs }) => { setParams(!params) }} > - <Typography - sx={{ - color: '#A4AAB5', - fontWeight: '600', - fontSize: '14px', - letterSpacing: '0.1px', - }} - > + <Typography sx={{ color: '#A4AAB5', fontWeight: '600', fontSize: '14px', letterSpacing: '0.1px' }}> ПАРАМЕТРЫ </Typography> <svg @@ -297,9 +241,7 @@ const Page: React.FC<any> = ({ deviceType, deviceOs }) => { viewBox='0 0 21 13' fill='none' xmlns='http://www.w3.org/2000/svg' - className={`${ - params ? 'rotate-180' : 'rotate-0' - }`} + className={`${params ? 'rotate-180' : 'rotate-0'}`} > <path fillRule='evenodd' @@ -312,63 +254,41 @@ const Page: React.FC<any> = ({ deviceType, deviceOs }) => { )} {botParams && botParams.parameters?.length > 0 ? ( - <Collapse - in={params} - orientation='vertical' - collapsedSize={0} - sx={{}} - > - <BotParamsMap - currentVersion={version} - params={botParams?.parameters} - /> - <ResetFilters - desktop={desktop} - closeDrawer={hideMobileSettings} - reset={resetParams} - /> + <Collapse in={params} orientation='vertical' collapsedSize={0} sx={{}}> + <BotParamsMap currentVersion={version} params={botParams?.parameters} /> + <ResetFilters desktop={desktop} closeDrawer={hideMobileSettings} reset={resetParams} /> </Collapse> ) : ( - <Typography - sx={{ - color: '#6e6e6e', - fontSize: '15px', - fontWeight: '500', - }} - > + <Typography sx={{ color: '#6e6e6e', fontSize: '15px', fontWeight: '500' }}> Параметры отсутствуют </Typography> )} </Stack> )} {!desktop && ( - <DrawerCustom - open={openFiltersMobile} - onClose={hideMobileSettings} - > + <DrawerCustom open={openFiltersMobile} onClose={hideMobileSettings}> <Stack spacing={1} padding={2.4}> - {botParams?.versions && - botParams.versions.length !== 0 && ( - <> - <Typography - sx={{ - color: '#A4AAB5', - fontWeight: '600', - fontSize: '14px', - letterSpacing: '0.1px', - margin: '20px 0px 0px !important', - }} - > - ВЕРСИИ - </Typography> - <ChatSelect - setDefaultParams={setDefaultParams} - value={version} - list={botParams.versions} - setValue={setVersion} - /> - </> - )} + {botParams?.versions && botParams.versions.length !== 0 && ( + <> + <Typography + sx={{ + color: '#A4AAB5', + fontWeight: '600', + fontSize: '14px', + letterSpacing: '0.1px', + margin: '20px 0px 0px !important', + }} + > + ВЕРСИИ + </Typography> + <ChatSelect + setDefaultParams={setDefaultParams} + value={version} + list={botParams.versions} + setValue={setVersion} + /> + </> + )} {botParams && botParams.parameters?.length > 0 ? ( <> <Typography @@ -382,24 +302,11 @@ const Page: React.FC<any> = ({ deviceType, deviceOs }) => { > ПАРАМЕТРЫ </Typography> - <BotParamsMap - currentVersion={version} - params={botParams?.parameters} - /> - <ResetFilters - closeDrawer={hideMobileSettings} - desktop={desktop} - reset={resetParams} - /> + <BotParamsMap currentVersion={version} params={botParams?.parameters} /> + <ResetFilters closeDrawer={hideMobileSettings} desktop={desktop} reset={resetParams} /> </> ) : ( - <Typography - sx={{ - color: '#6e6e6e', - fontSize: '15px', - fontWeight: '500', - }} - > + <Typography sx={{ color: '#6e6e6e', fontSize: '15px', fontWeight: '500' }}> Параметры отсутствуют </Typography> )} @@ -1,6 +1,6 @@ .card { background-color: var(--new-ui-main-color); - width: 330px; + width: 381px; height: 227px; border-radius: 15px; margin-right: 20px; @@ -9,36 +9,6 @@ cursor: pointer; padding: 30px; box-sizing: border-box; - border: 1px solid var(--new-ui-main-color); - - .colorBox{ - width: 50px; - height: 50px; - border-radius: 100%; - background-color: #313138; - } - - .colorBox[data-theme='light']{ - background-color: #EFF0F2; - } - - &:hover{ - transition: all; - transition-duration: 250ms; - background-color:var(--cards-hover); - border-color: #8280FF; - - .colorBox[data-theme='light']{ - transition-duration: 250ms; - background-color: #E7E7FF; - } - - .colorBox[data-theme='dark']{ - transition-duration: 250ms; - background-color: #222233; - } - - } @media (max-width:768px) { width: 100%; @@ -47,14 +17,13 @@ margin-top: 20px; .title { - font-size: 15px; font-weight: 600; } .text { color: var(--new-ui-gray-color); font-weight: 400; - margin-top: 10px; + margin-top: 6px; font-size: 15px; } } @@ -1,32 +1,44 @@ import React from 'react' import { Avatar, Box, Typography } from '@mui/material' +import Image from 'next/image' import Link from 'next/link' import styles from './card.module.scss' export type CardProps = { - theme: 'dark' | 'light' title: string - icon: string | null - text: string | null + icon: string + changeFavorite: (uid: string) => Promise<void> + isFavorite: boolean + text: string link: string uid: string + companies: string } -const Card = ({ text, icon, title, link, theme }: CardProps) => { +const Card = ({ changeFavorite, isFavorite, text, icon, title, link, uid, companies }: CardProps) => { return ( <Link href={link ?? ''}> <Box className={styles.card}> <Box display='flex' justifyContent='space-between' width='100%'> - {icon ? ( - <Avatar src={icon} sx={{ width: '50px', height: '50px' }} /> - ) : ( - <Box data-theme={theme} className={styles.colorBox}></Box> - )} + <Avatar src={icon} /> + <Image + onClick={(e) => { + e.preventDefault() + changeFavorite(uid) + }} + src={isFavorite ? '/svg/sub_menu/favourite.svg' : '/svg/sub_menu/favourite_off.svg'} + width={25} + height={25} + alt={''} + /> </Box> <Box className={styles.description}> <Typography className={styles.title}>{title}</Typography> <Typography className={styles.text}>{text}</Typography> + <Typography className={styles.text} sx={{ marginTop: '10px', fontWeight: '600 !important' }}> + {companies} + </Typography> </Box> </Box> </Link> @@ -0,0 +1,235 @@ +import * as React from 'react' +import { useState } from 'react' +import { Stack, Typography } from '@mui/material' +import Box from '@mui/material/Box' +import Button from '@mui/material/Button' +import dynamic from 'next/dynamic' +import Image from 'next/image' +import { getSession } from 'next-auth/react' + +import { toEditorState } from '@/src/domains/copywrite/lib/helper' +import { useCopy } from '@/src/features/use-copy/use-copy' +import { languages, target_audiences, tovs, useTemplate } from '@/src/features/use-copy/use-template' +import { Layout } from '@/src/main/layout' +import { Input, Loader, TooltipCustom } from '@/src/shared' +import { api } from '@/src/shared/api/endpoints' +import { getTypeDevice } from '@/src/shared/lib/helpers' +import { Message } from '@/src/shared/lib/types/model' +import { IDalleProps } from '@/src/shared/lib/types/types-dalle' +import { SelectUI } from '@/src/shared/ui/select' + +import Title from '../../features/title/title' + +import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css' + +const toolbarOptions = { + options: ['inline', 'blockType', 'list', 'textAlign', 'history'], + inline: { + options: ['bold', 'italic', 'underline'], + }, + blockType: { + options: ['Normal', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'Blockquote'], + }, + fontSize: { + options: [12, 14, 16, 18, 24, 30, 36], + }, + fontFamily: { + options: ['Arial', 'Georgia', 'Impact', 'Tahoma', 'Times New Roman', 'Verdana'], + }, + list: { + options: ['unordered', 'ordered'], + }, + textAlign: { + options: ['left', 'center', 'right'], + }, +} + +export async function getServerSideProps(context: any): Promise<{ props: IDalleProps }> { + const device = getTypeDevice(context) + + const { req } = context + + const session = await getSession({ req }) + + const token = session?.access || null + + const favorites = await api.getFavoritesModel(token, session) + + return { + props: { + device, + token, + favorites, + }, + } +} + +const Create: React.FC<IDalleProps> = ({ device, token, favorites }) => { + const desktop = device === 'desktop' + + const [showGeneration, setShowGeneration] = useState(false) + + const [isCopy, setIsCopy] = useState(false) + + const copy = (text: string) => { + navigator.clipboard.writeText(text) + setIsCopy(true) + } + + const { currentTemplate, generations, pickGeneration, setPickGeneration, createEmpty } = useCopy() + + const { + tov, + lang, + setLang, + setTov, + setTargetAudiences, + targetAudiences, + setResourceUrls, + resource_urls, + setTheme, + theme, + keywords, + setKeywords, + createText, + text, + clearSetting, + isLoading, + content, + setContent, + onEditorChange, + } = useTemplate(currentTemplate) + + const onSetGeneration = (message: Message) => { + setPickGeneration(message) + onEditorChange(toEditorState(message.content)) + setShowGeneration(false) + } + + const Editor = dynamic(() => import('react-draft-wysiwyg').then((res) => res.Editor), { ssr: false }) + + const EditorWrap = (): JSX.Element | null => { + if (showGeneration) { + if (!generations || generations.length === 0) { + return null + } + + //@ts-ignore + return generations.map((el) => ( + <Box + onClick={() => onSetGeneration(el)} + display='flex' + justifyContent='space-between' + className='border-bottom-1px-gray' + sx={{ cursor: 'pointer' }} + padding='10px' + key={el.uid} + > + <Typography className='title-struct'>{el.content.slice(0, 60)}...</Typography> + <TooltipCustom title={'Скопировать ответ'}> + <Image onClick={() => copy(el.content)} src={'/svg/copy.svg'} width={22} height={22} alt={'copy'} /> + </TooltipCustom> + </Box> + )) + } + + return ( + <Editor + //@ts-ignore + editorState={text} + toolbar={toolbarOptions} + toolbarClassName='toolbarClassName' + wrapperClassName='wrapperClassName' + editorClassName='editorClassName' + onEditorStateChange={onEditorChange} + /> + ) + } + + return ( + <Layout isLoader={currentTemplate === null} titlePage={'Копирайтинг'} device={device}> + <Title title={showGeneration ? 'Мои генерации' : theme ? theme : 'Пустой шаблон'} type={'Копирайтинг'} linkBack={'/copy'} /> + <Box + display={'flex'} + justifyContent='space-between' + flexDirection={desktop ? 'row' : 'column-reverse'} + sx={{ marginBottom: desktop ? 0 : 3, width: desktop ? '98%' : '100%', marginTop: desktop ? 3 : 0 }} + > + <Box className='pd-30 bg-color-block border-radius-main' width='100%' position='relative'> + <Box height='95%' sx={{ overflowY: 'auto' }}> + <Box width='50%' display='flex' marginBottom={2}> + {!showGeneration && ( + <Button fullWidth className='btn-classic' onClick={() => setShowGeneration(true)}> + Мои генерации + </Button> + )} + <Button + fullWidth + sx={{ marginLeft: 1 }} + className='btn-classic' + onClick={() => { + onEditorChange(toEditorState('')) + setShowGeneration(false) + }} + > + Пустой шаблон + </Button> + </Box> + <EditorWrap /> + </Box> + </Box> + <Box height='auto' className='pd-30 bg-color-block border-radius-main' width='500px' marginLeft={1.5}> + <Typography className='font-16 color-gray'>Настройки генерации</Typography> + <Stack spacing={0.5} sx={{ marginTop: 2.5 }}> + <Typography className='title-main-gray'>Ваш запрос</Typography> + <textarea value={content} onChange={(e) => setContent(e.target.value)} /> + </Stack> + <Box sx={{ marginTop: 1 }}> + <SelectUI title={'Тон'} value={tov} onChange={(e) => setTov(e.target.value)} list={tovs} /> + </Box> + <Box sx={{ marginTop: 1 }}> + <SelectUI title={'Язык'} value={lang} onChange={(e) => setLang(e.target.value)} list={Object.keys(languages)} /> + </Box> + <Box sx={{ marginTop: 1 }}> + <SelectUI + title={'Аудитория'} + value={targetAudiences} + onChange={(e) => setTargetAudiences(e.target.value)} + list={target_audiences} + /> + </Box> + <Stack spacing={0.5} sx={{ marginTop: 1 }}> + <Typography className='title-main-gray'>Тема</Typography> + <Input value={theme} onChange={(e) => setTheme(e.target.value)} /> + </Stack> + <Stack spacing={0.5} sx={{ marginTop: 1 }}> + <Typography className='title-main-gray'>Ключевые слова (через запятую)</Typography> + <Input value={keywords} onChange={(e) => setKeywords(e.target.value.split(','))} /> + </Stack> + <Stack spacing={0.5} sx={{ marginTop: 1 }}> + <Typography className='title-main-gray'>Ресурсы (ссылки, через запятую)</Typography> + <Input value={resource_urls} onChange={(e) => setResourceUrls(e.target.value.split(','))} /> + </Stack> + <Stack sx={{ marginTop: 1 }}> + <Typography onClick={clearSetting} className='text' color='#FF2372 !important' sx={{ cursor: 'pointer' }}> + Сбросить настройки + </Typography> + </Stack> + <Stack sx={{ marginTop: 3 }}> + {isLoading ? ( + <Box width='100%' display='flex' justifyContent='center'> + <Loader /> + </Box> + ) : ( + <Button className='btn-classic' onClick={createText}> + Сгенерировать + </Button> + )} + </Stack> + </Box> + </Box> + </Layout> + ) +} + +export default Create @@ -0,0 +1,79 @@ +import * as React from 'react' +import { useEffect } from 'react' +import { Typography } from '@mui/material' +import Box from '@mui/material/Box' +import { getSession, useSession } from 'next-auth/react' + +import { loadTemplates } from '@/src/features/use-copy/copy-slice' +import { Layout } from '@/src/main/layout' +import { useAppDispatch, useAppSelector } from '@/src/main/store/store' +import { api } from '@/src/shared/api/endpoints' +import { getTypeDevice } from '@/src/shared/lib/helpers' +import { IDalleProps } from '@/src/shared/lib/types/types-dalle' + +import Card from './card' + +export async function getServerSideProps(context: any): Promise<{ props: IDalleProps }> { + const device = getTypeDevice(context) + + const { req } = context + + const session = await getSession({ req }) + + const token = session?.access || null + + const favorites = await api.getFavoritesModel(token, session) + + return { + props: { + device, + token, + favorites, + }, + } +} + +const CopyPage: React.FC<IDalleProps> = ({ device, token, favorites }) => { + const desktop = device === 'desktop' + + const { data } = useSession() + + const templates = useAppSelector((state) => state.copy.templates) + + const dispatch = useAppDispatch() + + useEffect(() => { + if (data?.access) { + dispatch(loadTemplates(data.access)) + } + }, [data?.access]) + + return ( + <Layout titlePage={'Копирайтинг'} device={device}> + <Typography sx={{ fontSize: 24, fontWeight: 'bold', marginTop: '25px' }}>Копирайтинг</Typography> + <Box + display={'flex'} + flexDirection={desktop ? 'row' : 'column-reverse'} + sx={{ marginBottom: desktop ? 0 : 3, width: desktop ? '98%' : '100%', marginTop: desktop ? 3 : 0 }} + > + {templates?.map((el) => { + return ( + <Card + icon={el.picture} + key={el.id} + changeFavorite={async () => {}} + link={`/copy/create?id=${el.id}`} + isFavorite={false} + text={el.description} + title={el.title} + uid={el.id.toString()} + companies={''} + /> + ) + })} + </Box> + </Layout> + ) +} + +export default CopyPage @@ -1,180 +0,0 @@ -import * as React from 'react' -import { useEffect, useState } from 'react' -import { useDispatch } from 'react-redux' -import { Box, Stack, Typography } from '@mui/material' -import Image from 'next/image' -import Link from 'next/link' -import { useRouter } from 'next/router' -import { useSession } from 'next-auth/react' - -import Title from '@/src/features/title/title' -import { setTextInputContent } from '@/src/features/use-copy/copy-store' -import { Layout } from '@/src/main/layout' -import { useAppSelector } from '@/src/main/store/store' -import { Error, useShowData } from '@/src/shared' -import { getTypeDevice } from '@/src/shared/lib/helpers' -import { getDeviceOs } from '@/src/shared/lib/helpers/get-type-device' -import { useBeforeUnload } from '@/src/shared/lib/hooks' -import { useChangeRouter } from '@/src/shared/lib/hooks/use-change-router' -import { Device, DeviceOs, IFuncProps } from '@/src/shared/lib/types/entities' -import { MobileSettingsDrawer } from '@/src/shared/ui/mobile-settings-drawer' -import { SettingsBlockMock } from '@/src/shared/ui/mocks/settings-block-mock' -import { CopyEndpoints } from '@/src/widgets/copy/api/copy-endpoints' -import { editorEndpoints } from '@/src/widgets/copy/api/editor-endpoints' -import { DraftRequestBody, EditorCopywrite } from '@/src/widgets/copy/api/models' -import { CopyButton } from '@/src/widgets/copy/ui/buttons/copy-button' -import { MobileButtons } from '@/src/widgets/copy/ui/buttons/mobile-buttons' -import { EditorWrap } from '@/src/widgets/copy/ui/editor-wrap' -import styles from '@/src/widgets/copy/ui/styles/copywrite.module.scss' - -import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css' - -export async function getServerSideProps(context: any): Promise<{ props: { device: Device; deviceOs: DeviceOs } }> { - const device = getTypeDevice(context) - const deviceOs = getDeviceOs(context) - return { props: { device, deviceOs } } -} - -export default function Index({ device, deviceOs }: IFuncProps) { - const desktop = device === 'desktop' - const theme = useAppSelector((state) => state.theme.theme) - const input_content = useAppSelector((state) => state.copy.input_content) - const [isSettings, setIsSettings] = useState<boolean>(false) - const [copywrite, setCopywrite] = useState<EditorCopywrite | null>(null) - const { push, query } = useRouter() - const { error, showError } = useShowData() - const { data } = useSession() - const dispatch = useDispatch() - const [isGenerateStart, setIsGenerateStart] = useState<boolean>(false) - - const settingsHandler = (value: boolean) => { - setIsSettings(value) - } - - const startGenerateHandler = () => { - setIsGenerateStart(true) - if (data?.access && query['uuid'] !== undefined) { - const uuid = query['uuid'] - const req_body = { - input_content: input_content, - } - editorEndpoints.UpdateCopywriteContent(uuid, req_body, data?.access).then(() => { - CopyEndpoints.GenerateResponse(uuid, data?.access).then(() => { - setIsGenerateStart(false) - addQueryParams('resp') - }) - }) - } - } - - async function addNewUuid(uuid: string) { - await push({ - pathname: '/copywriting/editor', - query: { uuid }, - }) - } - - async function addQueryParams(mode: 'query' | 'resp') { - await push({ - pathname: `/copywriting/my/${query['uuid']}`, - query: { mode }, - }) - } - - const createDraftHandler = () => { - let req_body: DraftRequestBody = { - type: 'self', - } - CopyEndpoints.CreateDraft(req_body, 'self', data?.access).then((res) => { - if (res) addNewUuid(res?.id) - }) - } - - const saveEditorValue = (content: string) => { - if (data?.access && query['uuid'] !== undefined) { - const uuid = query['uuid'] - const req_body = { - input_content: content, - } - editorEndpoints.UpdateCopywriteContent(uuid, req_body, data?.access) - } - } - - useEffect(() => { - if (copywrite !== null) { - dispatch(setTextInputContent(copywrite.input_content ?? '')) - } - }, [copywrite]) - - useEffect(() => { - if (query['uuid'] !== undefined) { - if (data?.access) { - CopyEndpoints.GetCopywrite(query['uuid'], 'self', data.access).then((res) => { - if (res !== null) { - setCopywrite(res as EditorCopywrite) - } else { - createDraftHandler() - } - }) - } - } else { - createDraftHandler() - } - }, [query, data?.access]) - - return ( - <Layout titlePage={'Копирайтинг'} device={device}> - <Title title={'Редактор'} type={'Копирайтинг'} linkBack={''} /> - <Box - className={styles.mainWrapper} - flexDirection={desktop ? 'row' : 'column-reverse'} - sx={{ marginBottom: desktop ? 0 : '10px', width: '100%', marginTop: desktop ? 3 : '10px', overflowY: 'clip' }} - > - <Box className={styles.sizeWrapper} sx={{ width: desktop ? '70%' : '100%', height: '75vh' }}> - <Stack direction={'row'} justifyContent={'space-between'} gap={2}> - <Stack direction={'row'} gap={2} sx={{ stroke: theme === 'light' ? '#2B2B42' : '#ffffff', paddingBottom: '25px' }}> - <Link href={'/copywriting/my'}> - <Stack alignItems={'center'} direction={'row'} gap={2} className={'pointer'}> - <svg width='10' height='17' viewBox='0 0 10 17' fill='none' xmlns='http://www.w3.org/2000/svg'> - <path - d='M8.5 15.5L1.5 8.5L8.5 1.5' - strokeWidth='1.8' - strokeLinecap='round' - strokeLinejoin='round' - stroke='#A4AAB5' - /> - </svg> - <Typography sx={{ fontSize: '15px' }}>Мои генерации</Typography> - </Stack> - </Link> - - {/*<CopyIcon onClick={() => copyText('123')} />*/} - {/*<CopyDropdownMenu id={'editor-dropdown-menu'}>*/} - {/* <DownloadIcon />*/} - {/*</CopyDropdownMenu>*/} - </Stack> - </Stack> - {copywrite && ( - <EditorWrap - id={copywrite.id} - isGenerateStart={isGenerateStart} - saveEditorValue={saveEditorValue} - contentState={copywrite.input_content} - theme={theme} - /> - )} - </Box> - <MobileSettingsDrawer desktop={desktop} open={isSettings} onClose={settingsHandler}> - <Stack justifyContent={'space-between'} alignItems={'center'} sx={{ width: '25%', height: '75vh' }}> - <SettingsBlockMock /> - <CopyButton onClick={startGenerateHandler}>Сгенерировать</CopyButton> - </Stack> - </MobileSettingsDrawer> - </Box> - - {!desktop && <MobileButtons generateHandler={startGenerateHandler} settingsHandler={settingsHandler} />} - - <Error error={error} open={Boolean(error)} /> - </Layout> - ) -} @@ -1,184 +0,0 @@ -import * as React from 'react' -import { useEffect, useState } from 'react' -import { Box, Stack } from '@mui/material' -import { useRouter } from 'next/router' -import { useSession } from 'next-auth/react' - -import Title from '@/src/features/title/title' -import { addOutputContent, setDefaultVariables, setNewOutputContent, setOverrideVariables } from '@/src/features/use-copy/copy-store' -import { Layout } from '@/src/main/layout' -import { useAppDispatch } from '@/src/main/store/store' -import { Error, useShowData } from '@/src/shared' -import { getTypeDevice } from '@/src/shared/lib/helpers' -import { getDeviceOs } from '@/src/shared/lib/helpers/get-type-device' -import { Device, DeviceOs, IParams } from '@/src/shared/lib/types/entities' -import { MobileSettingsDrawer } from '@/src/shared/ui/mobile-settings-drawer' -import { SettingsBlockMock } from '@/src/shared/ui/mocks/settings-block-mock' -import { CopyEndpoints } from '@/src/widgets/copy/api/copy-endpoints' -import { editorEndpoints } from '@/src/widgets/copy/api/editor-endpoints' -import { Copywrite, DraftRequestBody, EditorCopywrite, TemplateType } from '@/src/widgets/copy/api/models' -import { CopyButton } from '@/src/widgets/copy/ui/buttons/copy-button' -import { MobileButtons } from '@/src/widgets/copy/ui/buttons/mobile-buttons' -import { GenerationBlock } from '@/src/widgets/copy/ui/generation/generation-block' -import styles from '@/src/widgets/copy/ui/styles/copywrite.module.scss' - -export async function getServerSideProps(context: any): Promise<{ - props: { device: Device; deviceOs: DeviceOs; uuid: string } -}> { - const device = getTypeDevice(context) - const deviceOs = getDeviceOs(context) - const { uuid } = context.params - - return { props: { device, deviceOs, uuid } } -} - -export default function Index({ device, deviceOs, uuid }: IParams) { - const desktop = device === 'desktop' - const [templateType, setTemplateType] = useState<TemplateType>('template') - const [editor, setEditor] = useState<EditorCopywrite | null>(null) - const [copywrite, setCopywrite] = useState<Copywrite | null>(null) - const [tab, setTab] = useState<'query' | 'resp' | null>(null) - const [isSettings, setIsSettings] = useState<boolean>(false) - const dispatch = useAppDispatch() - const { push, query } = useRouter() - const { error, showError } = useShowData() - const { data } = useSession() - - const startGenerateHandler = () => { - if (data?.access) { - CopyEndpoints.GenerateResponse(uuid, data?.access).then(() => addQueryParams('resp')) - } - } - - const settingsHandler = (value: boolean) => { - setIsSettings(value) - } - - const handleChangeTab = async (tab: 'query' | 'resp') => { - setTab(tab) - await addQueryParams(tab) - } - - async function addQueryParams(mode: 'query' | 'resp') { - await push({ - pathname: `/copywriting/my/${uuid}`, - query: { mode }, - }) - } - - async function addNewUuid(uuid: string) { - await push({ - pathname: `/copywriting/my/${uuid}`, - }) - } - - const createDraftHandler = () => { - let req_body: DraftRequestBody = { - type: 'template', - initial: { - template_id: uuid, - }, - } - CopyEndpoints.CreateDraft(req_body, 'template', data?.access).then((res) => { - if (res) addNewUuid(res?.id) - }) - } - - useEffect(() => { - if (query['mode'] !== undefined && tab !== query['mode']) { - handleChangeTab(query['mode'] as 'query' | 'resp') - } - }, [query]) - - useEffect(() => { - if (uuid && data?.access) { - CopyEndpoints.GetCopywrite(uuid, 'template', data.access).then((res) => { - if (res !== null) { - if (res.type === 'template') { - setCopywrite(res as Copywrite) - // @ts-ignore - dispatch(setDefaultVariables(res.template.variables)) - // @ts-ignore - dispatch(setOverrideVariables(res.overriden_variables)) - } else { - setEditor(res as EditorCopywrite) - } - setTemplateType(res.type) - if (res.output_content !== null) { - dispatch(setNewOutputContent(res.output_content)) - } - } else { - createDraftHandler() - } - }) - } - }, [uuid, data?.access]) - - useEffect(() => { - if (editor?.draft || copywrite?.draft) { - const socket = new WebSocket(`${editorEndpoints.webSocket.url}/copywrite/copywrites/${uuid}/`) - - socket.onopen = function (event) { - dispatch(setNewOutputContent('')) - } - - socket.onmessage = function (event) { - const event_data = JSON.parse(event.data).event_data - dispatch(addOutputContent(event_data.chunk)) - - if (event_data.end) { - return socket.close() - } - } - - socket.onerror = function (error) { - showError('Произошла ошибка генерации, перезагрузите страницу') - } - } - }, [copywrite, editor]) - - return ( - <Layout titlePage={'Копирайтинг'} device={device}> - <Title icon={copywrite?.template.picture} title={copywrite?.template.title ?? 'Свой шаблон'} type={'Копирайтинг'} linkBack={''} /> - <Box - className={styles.mainWrapper} - flexDirection={desktop ? 'row' : 'column-reverse'} - sx={{ - marginBottom: desktop ? 0 : '10px', - width: desktop ? '97%' : '100%', - marginTop: desktop ? 3 : '10px', - overflowY: 'clip', - }} - > - <Box className={styles.sizeWrapper} sx={{ width: desktop && !tab ? '70%' : '100%', height: '75vh' }}> - {editor || copywrite ? ( - <GenerationBlock - uuid={uuid} - isEditor={!!editor} - draft={editor?.draft ? editor.draft : copywrite?.draft ? copywrite.draft : false} - favourite={copywrite?.favourite} - template_type={templateType} - input_content={editor?.input_content} - desktop={desktop} - handleChangeTab={handleChangeTab} - tab={tab} - /> - ) : ( - <></> - )} - </Box> - {!tab && ( - <MobileSettingsDrawer desktop={desktop} open={isSettings} onClose={settingsHandler}> - <Stack justifyContent={'space-between'} alignItems={'center'} sx={{ width: '25%', height: '75vh' }}> - <SettingsBlockMock /> - <CopyButton onClick={startGenerateHandler}>Сгенерировать</CopyButton> - </Stack> - </MobileSettingsDrawer> - )} - </Box> - - {!desktop && !tab && <MobileButtons generateHandler={startGenerateHandler} settingsHandler={settingsHandler} />} - <Error error={error} open={Boolean(error)} /> - </Layout> - ) -} @@ -1,75 +0,0 @@ -import * as React from 'react' -import { useEffect, useState } from 'react' -import { Box } from '@mui/material' -import Link from 'next/link' -import { useSession } from 'next-auth/react' - -import Title from '@/src/features/title/title' -import { Layout } from '@/src/main/layout' -import { useAppSelector } from '@/src/main/store/store' -import { getTypeDevice } from '@/src/shared/lib/helpers' -import { getDeviceOs } from '@/src/shared/lib/helpers/get-type-device' -import { Device, DeviceOs, IFuncProps } from '@/src/shared/lib/types/entities' -import { CopyEndpoints } from '@/src/widgets/copy/api/copy-endpoints' -import { Copywrite, ShortCopywrite } from '@/src/widgets/copy/api/models' -import { MyCopywrite } from '@/src/widgets/copy/ui/my-copywrite' -import styles from '@/src/widgets/copy/ui/styles/copywrite.module.scss' - -export async function getServerSideProps(context: any): Promise<{ props: { device: Device; deviceOs: DeviceOs } }> { - const device = getTypeDevice(context) - const deviceOs = getDeviceOs(context) - return { props: { device, deviceOs } } -} - -export default function Index({ device, deviceOs }: IFuncProps) { - const desktop = device === 'desktop' - const { data } = useSession() - const [copywritesList, setCopywritesList] = useState<ShortCopywrite[] | null>(null) - - const changeFavouriteHandler = (id: string, favourite: boolean) => { - if (!favourite) { - CopyEndpoints.MarkAsFavourite(id, data?.access).then(() => { - CopyEndpoints.ListCopywrites(data?.access).then((res) => { - if (res) setCopywritesList(res) - }) - }) - } else { - CopyEndpoints.DeleteFavourite(id, data?.access).then(() => { - CopyEndpoints.ListCopywrites(data?.access).then((res) => { - if (res) setCopywritesList(res) - }) - }) - } - } - - useEffect(() => { - if (data?.access) { - CopyEndpoints.ListCopywrites(data?.access).then((res) => { - if (res) setCopywritesList(res) - }) - } - }, [data?.access]) - - return ( - <Layout titlePage={'Копирайтинг'} device={device}> - <Title title={'Мои копирайты'} type={'Копирайтинг'} linkBack={''} /> - <Box - className={styles.mainWrapper} - flexDirection={desktop ? 'row' : 'column-reverse'} - sx={{ marginBottom: desktop ? 0 : 3, width: desktop ? '97%' : '100%', marginTop: desktop ? 3 : '15px', overflowY: 'clip' }} - > - <Box width='100%'> - <Box className={styles.sizeWrapper} sx={{ height: 'fit-content' }}> - <MyCopywrite copywritesList={copywritesList} changeFavouriteHandler={changeFavouriteHandler} desktop={desktop} /> - </Box> - - <Link href={'/copywriting/templates'}> - <Box className={styles.defaultButton} sx={{ maxWidth: desktop ? '310px' : '100%' }}> - Создать копирайт - </Box> - </Link> - </Box> - </Box> - </Layout> - ) -} @@ -1,111 +0,0 @@ -import * as React from 'react' -import { useEffect, useState } from 'react' -import { Tab, Tabs } from '@mui/material' -import Box from '@mui/material/Box' -import { useSession } from 'next-auth/react' - -import Title from '@/src/features/title/title' -import { Layout } from '@/src/main/layout' -import { useAppSelector } from '@/src/main/store/store' -import { getTypeDevice } from '@/src/shared/lib/helpers' -import { Device } from '@/src/shared/lib/types/entities' -import { IDalleProps } from '@/src/shared/lib/types/types-dalle' -import { Template, TemplateCategory } from '@/src/widgets/copy/api/models' -import { templatesApi } from '@/src/widgets/copy/api/template-endpoints' -import styles from '@/src/widgets/copy/ui/styles/templates.module.scss' - -import Card from '../../../widgets/copy/ui/card/card' - -export async function getServerSideProps(context: any): Promise<{ props: { device: Device } }> { - const device = getTypeDevice(context) - return { - props: { - device, - }, - } -} - -const Templates: React.FC<IDalleProps> = ({ device }) => { - const desktop = device === 'desktop' - const { data } = useSession() - const theme = useAppSelector((state) => state.theme.theme) - const [tab, setTab] = useState<string | null>(null) - const [templateList, setTemplateList] = useState<Template[] | null>(null) - const [categoriesList, setCategoriesList] = useState<TemplateCategory[] | null>(null) - const staticTemplate = templatesApi.staticTemplate - - const handleChangeTab = (e: React.SyntheticEvent<Element, Event>, value: string) => { - setTab(value) - } - - useEffect(() => { - if (data?.access) { - templatesApi.ListTemplateCategories(data.access).then((res) => { - setCategoriesList(res) - if (res) setTab(res[0].slug) - }) - } - }, [data?.access]) - - useEffect(() => { - if (data?.access && tab) { - templatesApi.ListTemplates(data.access, tab).then((res) => { - if (res) setTemplateList(res) - }) - } - }, [data?.access, tab]) - - return ( - <Layout titlePage={'Копирайтинг'} device={device}> - <Title title={'Шаблоны'} type={'Копирайтинг'} linkBack={''} /> - <Tabs - value={tab} - onChange={handleChangeTab} - variant='scrollable' - className={styles.tabs} - aria-label='template' - scrollButtons={false} - sx={{ - '& .MuiTabs-indicator': { display: 'none' }, - borderColor: theme === 'dark' ? '' : '#F2F2F8 !important', - color: theme === 'dark' ? '#FFFFFF !important' : '#A4AAB5 !important', - marginTop: desktop ? 0 : 3, - }} - > - {categoriesList?.map((el) => ( - <Tab key={el.slug} disableRipple={true} className={styles.tab} value={el.slug} label={el.title} /> - ))} - </Tabs> - - <Box - display={'flex'} - flexDirection={desktop ? 'row' : 'column'} - sx={{ marginBottom: desktop ? 0 : 3, width: desktop ? '98%' : '100%' }} - > - {templateList?.map((el) => { - return ( - <Card - theme={theme} - icon={el.picture} - key={el.id} - link={`/copywriting/my/${el.id}`} - text={el.description} - title={el.title} - uid={el.id} - /> - ) - })} - <Card - theme={theme} - title={staticTemplate.title} - icon={staticTemplate.picture} - link={'/copywriting/editor'} - uid={staticTemplate.id} - text={staticTemplate.description} - /> - </Box> - </Layout> - ) -} - -export default Templates @@ -8,6 +8,7 @@ import { useRouter } from 'next/router' import { useSession } from 'next-auth/react' import { serverSideTranslations } from 'next-i18next/serverSideTranslations' +import { Setting } from '@/src/domains/images-bots/babes/types' import BotParamsMap from '@/src/features/bot-params/bot-params-map' import Title from '@/src/features/title/title' import { ChatSelect } from '@/src/main/components/chat_select' @@ -23,8 +24,6 @@ import { IModel } from '@/src/shared/api/models/models' import { getTypeDevice } from '@/src/shared/lib/helpers' import { getDeviceOs } from '@/src/shared/lib/helpers/get-type-device' import { useShowData } from '@/src/shared/lib/hooks' -import { ArrowDownScroll } from '@/src/shared/ui/icon-components/scroll-down-arrow' -import { Setting } from '@/src/widgets/images/api/types' import { ImageMessagesList } from '@/src/widgets/messages/image-messages-list' export async function getServerSideProps(context: any): Promise<{ props: any }> { @@ -52,16 +51,10 @@ const Images: React.FC<any> = ({ deviceType, deviceOs }) => { const [version, setVersion] = React.useState<string>('') const [modelType, setModelType] = React.useState<string>('') const [params, setParams] = React.useState<boolean>(false) + const refScroll = useRef(null) const includeParams = useAppSelector((state) => state.params.params) const dispatch = useDispatch() - const { messages, loading, createImage, isComplete, getMessagesPagination } = useModelImages<Setting>(showError, modelType, deviceType) - - const [chatScrollHeight, setChatScrollHeight] = React.useState(0) - const [scrollBottom, setScrollBottom] = React.useState(0) - const refScrollMobile = useRef<any>() - const [isPaginating, setIsPaginating] = React.useState(false) - React.useEffect(() => { model_api .getBotParams(router.asPath.split('/')[2], data?.access) @@ -73,29 +66,20 @@ const Images: React.FC<any> = ({ deviceType, deviceOs }) => { dispatch( setParametres( res.parameters.reduce( - (a, v) => - v.versions.includes(res.versions[0].slug) - ? { ...a, [v.key]: v.values.default } - : { ...a }, + (a, v) => (v.versions.includes(res.versions[0].slug) ? { ...a, [v.key]: v.values.default } : { ...a }), {} ) ) ) } else { setVersion('') - dispatch( - setParametres( - res.parameters.reduce( - (a, v) => ({ ...a, [v.key]: v.values.default }), - {} - ) - ) - ) + dispatch(setParametres(res.parameters.reduce((a, v) => ({ ...a, [v.key]: v.values.default }), {}))) } }) .catch((err) => {}) - }, [data?.access, router.query]) + }, [data?.access]) + const { messages, loading, createImage, isComplete } = useModelImages<Setting>(showError, modelType, deviceType) const onLoadImage = (event: React.ChangeEvent<HTMLInputElement>) => { if (event.target.files) { setImage(event.target.files[0]) @@ -119,24 +103,14 @@ const Images: React.FC<any> = ({ deviceType, deviceOs }) => { dispatch( setParametres( botParams.parameters.reduce( - (a, v) => - v.versions.includes(botParams.versions[0].slug) - ? { ...a, [v.key]: v.values.default } - : { ...a }, + (a, v) => (v.versions.includes(botParams.versions[0].slug) ? { ...a, [v.key]: v.values.default } : { ...a }), {} ) ) ) } else { setVersion(botParams.slug) - dispatch( - setParametres( - botParams.parameters.reduce( - (a, v) => ({ ...a, [v.key]: v.values.default }), - {} - ) - ) - ) + dispatch(setParametres(botParams.parameters.reduce((a, v) => ({ ...a, [v.key]: v.values.default }), {}))) } } } @@ -148,23 +122,13 @@ const Images: React.FC<any> = ({ deviceType, deviceOs }) => { dispatch( setParametres( botParams.parameters.reduce( - (a, v) => - v.versions.includes(version) - ? { ...a, [v.key]: v.values.default } - : { ...a }, + (a, v) => (v.versions.includes(version) ? { ...a, [v.key]: v.values.default } : { ...a }), {} ) ) ) } else { - dispatch( - setParametres( - botParams.parameters.reduce( - (a, v) => ({ ...a, [v.key]: v.values.default }), - {} - ) - ) - ) + dispatch(setParametres(botParams.parameters.reduce((a, v) => ({ ...a, [v.key]: v.values.default }), {}))) } } } @@ -207,7 +171,7 @@ const Images: React.FC<any> = ({ deviceType, deviceOs }) => { React.useEffect(() => { if (isComplete) { if (!desktop) { - const block = refScrollMobile.current + const block = refScroll.current if (block) { //@ts-ignore block.scrollTop = block.scrollHeight @@ -218,55 +182,18 @@ const Images: React.FC<any> = ({ deviceType, deviceOs }) => { } }, [isComplete]) - const handleMobileScroll = () => { - setScrollBottom(refScrollMobile.current?.scrollHeight - refScrollMobile.current?.scrollTop - refScrollMobile.current?.clientHeight) - - if (refScrollMobile.current && messages?.length !== 0) { - const { scrollTop, scrollHeight, clientHeight } = refScrollMobile.current - if (scrollTop === 0) { - if (getMessagesPagination) { - setIsPaginating(true) - getMessagesPagination(deviceType) - } - } - } - } - - const handleScroll = () => { - if (window.scrollY + window.innerHeight >= document.documentElement.scrollHeight) { - setIsPaginating(true) - getMessagesPagination(deviceType) - } - } - React.useEffect(() => { - window.addEventListener('scroll', handleScroll) - return () => { - window.removeEventListener('scroll', handleScroll) - } - }, []) + if (!desktop && messages !== null) { + const block = refScroll.current - React.useEffect(() => { - const block = deviceType === 'desktop' ? window : refScrollMobile.current - if (block) { - if (messages != undefined && !isPaginating) { - setChatScrollHeight(block.scrollHeight) - const time = setTimeout(() => { + const time = setTimeout(() => { + if (block) { //@ts-ignore - block.scrollTo({ - top: block.scrollHeight, - behavior: 'smooth', // добавляем плавную прокрутку - }) - }, 350) - return () => clearTimeout(time) - } else if (messages != undefined && isPaginating) { - //@ts-ignore - block.scrollTop = block.scrollHeight - chatScrollHeight - - setChatScrollHeight(block.scrollHeight) - } + block.scrollTop = block.scrollHeight + } + }, 250) + return () => clearTimeout(time) } - setIsPaginating(false) }, [messages]) return ( @@ -277,11 +204,7 @@ const Images: React.FC<any> = ({ deviceType, deviceOs }) => { justifyContent='space-between' alignItems='start' flexDirection={desktop ? 'row' : 'column-reverse'} - sx={{ - marginBottom: desktop ? 0 : 3, - width: desktop ? '97%' : '100%', - marginTop: desktop ? 3 : '15px', - }} + sx={{ marginBottom: desktop ? 0 : 3, width: desktop ? '97%' : '100%', marginTop: desktop ? 3 : '15px' }} > <Box sx={{ @@ -310,45 +233,14 @@ const Images: React.FC<any> = ({ deviceType, deviceOs }) => { /> )} </Stack> - <Box - className={'bg-color-block border-radius-main'} - sx={{ padding: '30px' }} - > - <ImageMessagesList - isComplete={isComplete} - device={deviceType} - images={messages} - /> + <Box className={'bg-color-block border-radius-main'} sx={{ padding: '30px' }}> + <ImageMessagesList isComplete={isComplete} device={deviceType} images={messages} /> </Box> </> ) : ( <Box className={'bg-color-block border-radius-main'}> - {scrollBottom > 500 && ( - <Box - sx={{ - position: 'absolute', - left: 0, - right: 0, - width: 'fit-content', - cursor: 'pointer', - margin: '0 auto', - bottom: '100px', - zIndex: 10, - }} - onClick={() => { - const block = refScrollMobile.current - - block.scrollTo({ - top: block.scrollHeight, - behavior: 'smooth', // добавляем плавную прокрутку - }) - }} - > - <ArrowDownScroll /> - </Box> - )} <Box - ref={refScrollMobile} + ref={refScroll} sx={{ padding: '30px', height: ios @@ -358,13 +250,8 @@ const Images: React.FC<any> = ({ deviceType, deviceOs }) => { overflowX: 'hidden', }} className={'smallScroll'} - onScroll={handleMobileScroll} > - <ImageMessagesList - isComplete={isComplete} - device={deviceType} - images={messages} - /> + <ImageMessagesList isComplete={isComplete} device={deviceType} images={messages} /> </Box> <Stack alignItems='center'> {botParams && ( @@ -387,21 +274,10 @@ const Images: React.FC<any> = ({ deviceType, deviceOs }) => { )} </Box> {desktop && ( - <Stack - spacing={2} - className='pd-30 bg-color-block border-radius-main' - sx={{ width: '25.5%', height: 'auto' }} - > + <Stack spacing={2} className='pd-30 bg-color-block border-radius-main' sx={{ width: '25.5%', height: 'auto' }}> {botParams?.versions && botParams.versions.length !== 0 ? ( <> - <Typography - sx={{ - color: '#A4AAB5', - fontWeight: '600', - fontSize: '14px', - letterSpacing: '0.1px', - }} - > + <Typography sx={{ color: '#A4AAB5', fontWeight: '600', fontSize: '14px', letterSpacing: '0.1px' }}> ВЕРСИИ </Typography> <ChatSelect @@ -424,14 +300,7 @@ const Images: React.FC<any> = ({ deviceType, deviceOs }) => { setParams(!params) }} > - <Typography - sx={{ - color: '#A4AAB5', - fontWeight: '600', - fontSize: '14px', - letterSpacing: '0.1px', - }} - > + <Typography sx={{ color: '#A4AAB5', fontWeight: '600', fontSize: '14px', letterSpacing: '0.1px' }}> ПАРАМЕТРЫ </Typography> <svg @@ -453,32 +322,12 @@ const Images: React.FC<any> = ({ deviceType, deviceOs }) => { )} {botParams && botParams.parameters?.length > 0 ? ( - <Collapse - in={params} - orientation='vertical' - collapsedSize={0} - sx={{}} - > - <BotParamsMap - currentVersion={version} - params={botParams?.parameters} - /> - <ResetFilters - desktop={desktop} - closeDrawer={hideMobileSettings} - reset={resetParams} - /> + <Collapse in={params} orientation='vertical' collapsedSize={0} sx={{}}> + <BotParamsMap currentVersion={version} params={botParams?.parameters} /> + <ResetFilters desktop={desktop} closeDrawer={hideMobileSettings} reset={resetParams} /> </Collapse> ) : ( - <Typography - sx={{ - color: '#6e6e6e', - fontSize: '15px', - fontWeight: '500', - }} - > - Параметры отсутствуют - </Typography> + <Typography sx={{ color: '#6e6e6e', fontSize: '15px', fontWeight: '500' }}>Параметры отсутствуют</Typography> )} </Stack> )} @@ -520,26 +369,11 @@ const Images: React.FC<any> = ({ deviceType, deviceOs }) => { > ПАРАМЕТРЫ </Typography> - <BotParamsMap - currentVersion={version} - params={botParams?.parameters} - /> - <ResetFilters - closeDrawer={hideMobileSettings} - desktop={desktop} - reset={resetParams} - /> + <BotParamsMap currentVersion={version} params={botParams?.parameters} /> + <ResetFilters closeDrawer={hideMobileSettings} desktop={desktop} reset={resetParams} /> </> ) : ( - <Typography - sx={{ - color: '#6e6e6e', - fontSize: '15px', - fontWeight: '500', - }} - > - Параметры отсутствуют - </Typography> + <Typography sx={{ color: '#6e6e6e', fontSize: '15px', fontWeight: '500' }}>Параметры отсутствуют</Typography> )} </Stack> </DrawerCustom> @@ -22,7 +22,6 @@ axios.defaults.httpsAgent = new https.Agent({ const inter = Raleway({ subsets: ['latin'] }) function App({ Component, pageProps: { session, ...pageProps } }: AppProps) { - return ( <> <style jsx global>{` @@ -194,7 +194,7 @@ const KeyRow = (props: any) => { <TooltipCustom title={'Скопировать ключ'}> <Image onClick={() => copy(props.keyValue)} - src={'/svg/copywriting.svg'} + src={'/svg/copy.svg'} width={20} height={20} style={{ cursor: 'pointer' }} @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect, useRef, useState } from 'react' +import React, { useEffect, useState } from 'react' import axios, { AxiosError, AxiosResponse } from 'axios' import base64 from 'base64-encode-file' import { useSession } from 'next-auth/react' @@ -23,7 +23,7 @@ const formDataHelper = (file: File, dataForSend: MessageSend<any>): FormData => export const ModelsWithChatsEndpoints = { getData: async (chatUid: string, offset: number, token?: string) => { try { - const { data } = await axios.get<Message[]>(API_URL + `/chats/${chatUid}/messages/?limit=10&offset=${offset}`, { + const { data } = await axios.get<Message[]>(API_URL + `/chats/${chatUid}/messages/?limit=100&offset=${offset}`, { headers: { Authorization: `Bearer ${token}`, }, @@ -77,12 +77,12 @@ export function useModel( setMessages([]) ;(async () => { setLoading(true) - const answer = await ModelsWithChatsEndpoints.getData(currentChat, 0, data?.access) + const answer = await ModelsWithChatsEndpoints.getData(currentChat, offset, data?.access) setLoading(false) if (Array.isArray(answer)) { setMessages(answer.reverse()) - setOffset(answer.length) + // setOffset((prev) => prev + 10) } else { showError('Ошибка загрузки чата') return @@ -100,7 +100,7 @@ export function useModel( if (Array.isArray(answer) && messages != null) { const newMessages = answer.reverse() setMessages([...newMessages, ...messages]) - setOffset((prev) => prev + answer.length) + setOffset((prev) => prev + 10) } else { showError('Ошибка загрузки сообщений') return @@ -192,9 +192,9 @@ export function useModel( } export const ModelsWithImagesEndpoints = { - getData: async (type: string, offset: number, token?: string) => { + getData: async (type: string, token?: string) => { try { - const { data } = await axios.get<Message[]>(API_URL + `/media/image/${type}?limit=10&offset=${offset}`, { + const { data } = await axios.get<Message[]>(API_URL + `/media/image/${type}?limit=100`, { headers: { Authorization: `Bearer ${token}`, }, @@ -242,33 +242,13 @@ export function useModelImages<T>(showError: (message: string) => void, type: st const [isComplete, setIsComplete] = useState<boolean>(false) - const [offset, setOffset] = useState<number>(0) - const dispatch = useAppDispatch() - const typeRef = useRef(type) - const dataRef = useRef(data) - const messagesRef = useRef(messages) - const offsetRef = useRef(offset) - - useEffect(() => { - typeRef.current = type - }, [type]) - useEffect(() => { - dataRef.current = data - }, [data]) - useEffect(() => { - messagesRef.current = messages - }, [messages]) - useEffect(() => { - offsetRef.current = offset - }, [offset]) - useEffect(() => { if (data?.access && type !== '' && type !== undefined) { ;(async () => { setLoading(true) - const answer = await getData(type, offset, data?.access) + const answer = await getData(type, data?.access) setLoading(false) if ('error' in answer) { showError('Ошибка загрузки чата') @@ -278,46 +258,14 @@ export function useModelImages<T>(showError: (message: string) => void, type: st if (Array.isArray(answer)) { if (device === 'desktop') { setMessages(answer) - setOffset(answer.length) } else { setMessages(answer.reverse()) - setOffset(answer.length) } } })() } }, [data?.access, type]) - const getMessagesPagination = useCallback( - async (device: 'mobile' | 'desktop') => { - // console.log(dataRef.current?.access); - // console.log(typeRef.current); - // console.log(offsetRef.current); - // console.log(messagesRef.current); - - if (dataRef.current?.access && typeRef.current !== '' && typeRef.current !== undefined) { - setLoading(true) - const answer = await getData(typeRef.current, offsetRef.current, dataRef.current?.access) - setLoading(false) - - if (Array.isArray(answer) && messagesRef.current != null && device === 'mobile') { - const newMessages = answer.reverse() - setMessages([...newMessages, ...messagesRef.current]) - setOffset((prev) => prev + answer.length) - } else if (Array.isArray(answer) && messagesRef.current != null && device === 'desktop') { - setMessages([...messagesRef.current, ...answer]) - setOffset((prev) => prev + answer.length) - } else { - console.log('err') - - showError('Ошибка загрузки сообщений') - return - } - } - }, - [data?.access, type, offset, messages] - ) - const createImage = async <T>(dataForSend: MessageSend<T>) => { const { content, file } = dataForSend @@ -353,7 +301,7 @@ export function useModelImages<T>(showError: (message: string) => void, type: st setIsComplete(true) } - return { messages, createImage, loading, isComplete, getMessagesPagination } + return { messages, createImage, loading, isComplete } } export const ModelsMediaApi = { @@ -158,7 +158,7 @@ export const createChat = async (model: string, token?: string) => { export const getAllChats = async (model: string, token?: string): Promise<Chat[] | []> => { try { const { data } = await axios.get(API_URL + `/chats/?model=${model}`, { headers: { Authorization: `Bearer ${token}` } }) - + if (data.length === 0) { const newChat = await createChat(model, token) return [newChat].reverse() @@ -37,7 +37,7 @@ export const surpriseMePrompts = [ 'Darth Vader on trial, courtroom sketch, black and white', - 'Index a high resolution artwork of lofi ,Anime Girl is programming at a computer in a room full of gadgets, snown ,web developer, by makoto shinkai and ghibli studio, outlined silhouettes, dramatic lighting, highly detailed, incredible quality, trending on artstation, masterpiece, 8k', + 'Create a high resolution artwork of lofi ,Anime Girl is programming at a computer in a room full of gadgets, snown ,web developer, by makoto shinkai and ghibli studio, outlined silhouettes, dramatic lighting, highly detailed, incredible quality, trending on artstation, masterpiece, 8k', 'knight warrior helmet skyrim mask elder scrolls v nordic armor bethesda adam adamowicz illustration character design concept, unreal 5, daz, hyperrealistic, octane render, cosplay, rpg portrait, dynamic lighting, intricate detail, harvest fall vibrancy, cinematic volume inner glowing aura global illumination ray tracing hdr', @@ -1,3 +1,2 @@ export { getAccessToken } from './get-token' export { getTypeDevice } from './get-type-device' -export { useConcat } from './reactive-concat' @@ -1,5 +0,0 @@ -import { useMemo } from 'react' - -export const useConcat = <R>(...arrays: any[]) => { - return useMemo<R>(() => arrays.reduce((a, b) => a.concat(b), []), arrays) -} @@ -1,4 +1,3 @@ export { useAutoScroll } from './use-auto-scroll' -export { useBeforeUnload } from './use-before-unload' export { useShowData } from './use-show-data' export { useThemeAndDevice } from './use-theme-and-device' @@ -1,15 +0,0 @@ -import { useEffect } from 'react' - -export const useBeforeUnload = (handler: () => void) => { - useEffect(() => { - const handleBeforeUnload = (event: any) => { - handler() - } - - window.addEventListener('beforeunload', handleBeforeUnload) - - return () => { - window.removeEventListener('beforeunload', handleBeforeUnload) - } - }, [handler]) -} @@ -1,18 +0,0 @@ -import { useEffect } from 'react' -import { useRouter } from 'next/router' - -export const useChangeRouter = (handler: () => void) => { - const router = useRouter() - - useEffect(() => { - const handleRouteChange = (url: any) => { - handler() - } - - router.events.on('routeChangeStart', handleRouteChange) - - return () => { - router.events.off('routeChangeStart', handleRouteChange) - } - }, [router]) -} @@ -1,6 +1,32 @@ +export const subMenuTitle = { + color: '#5A5A5A', + fontSize: '19px', + fontWeight: '600px', + lineHeight: '28.5px', +} + export const username = { color: '#7F7DF3', fontSize: '19px', fontWeight: '600px', lineHeight: '28.5px', } +export const subscriptionColumn = { + color: '#868686', + fontSize: '15px', + fontWeight: '600px', + lineHeight: '17.61px', +} +export const subMenuTitleNight = { + color: '#E1E1E1', + fontSize: '19px', + fontWeight: '600px', + lineHeight: '28.5px', +} + +export const subscriptionColumnNight = { + color: '#A6A5A5', + fontSize: '15px', + fontWeight: '600px', + lineHeight: '17.61px', +} @@ -16,12 +16,3 @@ export type Error = { message: string details: string } - -export interface IFuncProps { - device: Device - deviceOs: DeviceOs -} - -export interface IParams extends IFuncProps { - uuid: string -} @@ -13,5 +13,4 @@ export interface IDalleRequest { export interface IDalleProps extends IProps { favorites: any[] | [] - deviceOs?: 'ios' | 'android' } @@ -36,10 +36,6 @@ margin-top: 15px; } .bigTitle { - display: flex; - justify-content: start; - align-items: center; - gap: 10px; @media (max-width:768px) { display: none; overflow: hidden; @@ -1,28 +0,0 @@ -import React from 'react' -import { Menu, MenuProps } from '@mui/material' - -import { useAppSelector } from '@/src/main/store/store' - -export const DropdownMenu: React.FC<MenuProps> = ({ children, ...props }) => { - const theme = useAppSelector((state) => state.theme.theme) - - return ( - <Menu - {...props} - autoFocus={false} - sx={{ - '& .MuiMenu-list': { - backgroundColor: theme === 'dark' ? '#303035' : '#EFF0F2', - color: '#8280FF', - borderRadius: '15px', - }, - '& .MuiPopover-paper': { - backgroundColor: theme === 'dark' ? '#303035' : '#EFF0F2', - borderRadius: '15px', - }, - }} - > - {children} - </Menu> - ) -} @@ -1,11 +0,0 @@ -import * as React from 'react' -import { SVGProps } from 'react' - -export const ArrowDownScroll: React.FC<SVGProps<SVGSVGElement>> = ({ ...props }) => { - return ( - <svg width='36' height='36' viewBox='0 0 36 36' fill='none' xmlns='http://www.w3.org/2000/svg'> - <rect width='36' height='36' rx='18' fill='#7F7DF3' /> - <path d='M25 16L18 23L11 16' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' /> - </svg> - ) -} @@ -6,6 +6,7 @@ import Stack from '@mui/material/Stack' import { TextFieldProps } from '@mui/material/TextField/TextField' import Image from 'next/image' +import { Calculation } from '@/src/features/calculation-tokens-gpt' import { useAppSelector } from '@/src/main/store/store' import { styleInputWithoutBorderFocus } from '@/src/shared/ui/input' @@ -1,39 +0,0 @@ -import React from 'react' -import { RegisterOptions } from 'react-hook-form/dist/types/validator' -import { TextField, Typography } from '@mui/material' -import Box from '@mui/material/Box' -import { TextFieldProps } from '@mui/material/TextField/TextField' - -import { setParams } from '@/src/main/store/model-parametres-store' -import { useAppDispatch } from '@/src/main/store/store' -import { InputStyleDark, InputStyleLight } from '@/src/shared' -import { useThemeAndDevice } from '@/src/shared/lib/hooks' -import TooltipModelTypes from '@/src/shared/ui/tooltip-model-types' - -interface IProps { - title: string -} - -export const InputFilterMock = ({ title }: IProps) => { - const { theme } = useThemeAndDevice() - - return ( - <Box> - <Box sx={{ marginTop: 0.5 }}> - <Typography - sx={{ - marginBottom: 1, - fontSize: '15px', - color: '#A4AAB5', - fontWeight: '400', - }} - className='title-main-gray' - > - {title} - </Typography> - - <TextField value={''} fullWidth sx={theme === 'light' ? { ...InputStyleLight } : { ...InputStyleDark }} /> - </Box> - </Box> - ) -} @@ -1,16 +0,0 @@ -import * as React from 'react' - -import { setParams } from '@/src/main/store/model-parametres-store' -import { useAppDispatch } from '@/src/main/store/store' -import { Slider as Sl } from '@/src/shared' -import TooltipModelTypes from '@/src/shared/ui/tooltip-model-types' - -interface IProps { - title: string -} - -export const RangeFieldMock = ({ title }: IProps) => { - const [range, setRange] = React.useState<number | number[]>(10) - - return <Sl title={title} value={range} onChange={(e, current) => {}} max={20} min={0} step={2} aria-label='pretto slider' /> -} @@ -1,22 +0,0 @@ -import React from 'react' -import { Typography } from '@mui/material' - -export const ResetParamsMock = () => { - return ( - <Typography - variant='body2' - sx={{ - color: '#FF4170', - lineHeight: '19.6px', - fontSize: '14px', - fontWeight: '400px', - marginTop: '15px !important', - '&:hover': { - cursor: 'pointer', - }, - }} - > - Сбросить настройки - </Typography> - ) -} @@ -1,38 +0,0 @@ -import * as React from 'react' -import { DotLottieReact } from '@lottiefiles/dotlottie-react' -import { Box, Stack, Typography } from '@mui/material' - -import { InputFilterMock } from '@/src/shared/ui/mocks/input-field-mock' -import { RangeFieldMock } from '@/src/shared/ui/mocks/range-field-mock' -import { ResetParamsMock } from '@/src/shared/ui/mocks/reset-params-mock' -import { SwitchFieldMock } from '@/src/shared/ui/mocks/switch-field-mock' -import styles from '@/src/widgets/copy/ui/styles/copywrite.module.scss' - -export const SettingsBlockMock = () => { - return ( - <Stack justifyContent={'space-between'} alignItems={'center'} sx={{ width: '100%', height: '90%' }} className={styles.sizeWrapper}> - <Box className={styles.mockWrapperInDev}></Box> - <Typography className={styles.inDev}> - В разработке - <DotLottieReact src='https://lottie.host/a66d4290-6dfb-411e-9ace-240ad64f2f2a/0emod9BhcE.lottie' loop autoplay /> - </Typography> - <Stack className={styles.mockWrapper}> - <Typography - sx={{ - color: '#A4AAB5', - fontWeight: '600', - fontSize: '14px', - letterSpacing: '0.1px', - }} - > - ПАРАМЕТРЫ - </Typography> - <InputFilterMock title={'Малый выпадающий блок'} /> - <InputFilterMock title={'Большой выпадающий блок'} /> - <RangeFieldMock title={'Блок с ползунком'} /> - <SwitchFieldMock title={'Контекст'} /> - <ResetParamsMock /> - </Stack> - </Stack> - ) -} @@ -1,48 +0,0 @@ -import React from 'react' -import { FormControlLabel, Typography } from '@mui/material' -import Switch from '@mui/material/Switch' - -import { setParams } from '@/src/main/store/model-parametres-store' -import { useAppDispatch } from '@/src/main/store/store' -import TooltipModelTypes from '@/src/shared/ui/tooltip-model-types' - -interface IProps { - title: string -} - -export const SwitchFieldMock = ({ title }: IProps) => { - return ( - <FormControlLabel - sx={{ '&': { justifyContent: 'space-between !important' } }} - control={ - <Switch - sx={{ - '& .MuiSwitch-switchBase.Mui-checked+.MuiSwitch-track': { - backgroundColor: '#7f7df3 !important', - }, - '& .MuiSwitch-switchBase.Mui-checked': { - color: '#7f7df3 !important', - }, - '& .MuiSwitch-track': { - backgroundColor: '#40404E !important', - }, - }} - checked={true} - /> - } - labelPlacement={'start'} - label={ - <Typography - sx={{ - color: '#A4AAB5', - lineHeight: '19.6px', - fontSize: '15px', - fontWeight: '600px', - }} - > - {title} - </Typography> - } - /> - ) -} @@ -1,50 +0,0 @@ -import { Slider, styled } from '@mui/material' - -export const PrettoSlider = styled(Slider)({ - width: '90%', - color: '#EFF0F2', - height: 5, - '& .MuiSlider-track': { - border: 'none', - backgroundColor: '#EFF0F', - }, - '.MuiSlider-rail': { - border: 'none', - backgroundColor: '#EFF0F', - }, - '& .MuiSlider-thumb': { - height: 17, - width: 17, - backgroundColor: '#fff', - border: '2px solid #7F7DF3', - '&:focus, &:hover, &.Mui-active, &.Mui-focusVisible': { - boxShadow: 'inherit', - }, - '&:before': { - display: 'none', - }, - }, -}) -export const PrettoSliderDark = styled(Slider)({ - width: '90%', - - height: 5, - '& .MuiSlider-track': { - border: 'none', - backgroundColor: '#40404E', - }, - '.MuiSlider-rail': { - border: 'none', - backgroundColor: '#40404E', - }, - '& .MuiSlider-thumb': { - height: 17, - width: 17, - backgroundColor: '#373737', - border: '2px solid #7F7DF3', - '&:focus, &:hover, &.Mui-active, &.Mui-focusVisible': {}, - '&:before': { - display: 'none', - }, - }, -}) @@ -3,7 +3,7 @@ import { Typography } from '@mui/material' import Box from '@mui/material/Box' import { useAppSelector } from '@/src/main/store/store' -import { PrettoSlider, PrettoSliderDark } from '@/src/shared/ui/slider/slider-styles' +import { PrettoSlider, PrettoSliderDark } from '@/src/widgets/filters-gpt/ui/filters' export const Slider = ({ value, @@ -1,24 +0,0 @@ -import React from 'react' - -import { DrawerCustom } from '@/src/shared' - -interface IProps { - children: React.ReactNode - desktop: boolean - open: boolean - onClose: (v: boolean) => void -} - -export const MobileSettingsDrawer: React.FC<IProps> = ({ children, desktop, open, onClose }) => { - return ( - <> - {desktop && children} - - {!desktop && ( - <DrawerCustom open={open} onClose={onClose}> - {children} - </DrawerCustom> - )} - </> - ) -} @@ -1,5 +1,4 @@ export { emailOptions, onlyNumbersOption } from './lib/constants/hook-form-options' -export { useConcat } from './lib/helpers' export { translateTypeModel } from './lib/helpers/model-helpers' export { useShowData } from './lib/hooks' export { useAutoLoad } from './lib/hooks/use-auto-load' @@ -111,7 +111,7 @@ // // const [modal, setModal] = useState<boolean>(false) // -// const copywriting = (text: string) => { +// const copy = (text: string) => { // navigator.clipboard.writeText(text) // setIsCopy(true) // setTimeout(() => setIsCopy(false), 3000) @@ -152,16 +152,16 @@ // <Box display='flex' alignItems='center' sx={{ cursor: 'pointer' }}> // <Box marginRight={1}> // {isCopy ? ( -// <Image src={'/svg/tic.svg'} width={22} height={22} alt={'copywriting'} /> +// <Image src={'/svg/tic.svg'} width={22} height={22} alt={'copy'} /> // ) : ( // <Box> // <TooltipCustom title={'Скопировать вопрос'}> // <Image -// onClick={() => copywriting(props.message.content)} -// src={'/svg/copywriting.svg'} +// onClick={() => copy(props.message.content)} +// src={'/svg/copy.svg'} // width={22} // height={22} -// alt={'copywriting'} +// alt={'copy'} // /> // </TooltipCustom> // </Box> @@ -285,7 +285,7 @@ // const LazyCode = dynamic(() => import('./code')) // const [isCopy, setIsCopy] = useState(false) // -// const copywriting = (text: string) => { +// const copy = (text: string) => { // navigator.clipboard.writeText(text) // setIsCopy(true) // setTimeout(() => setIsCopy(false), 3000) @@ -406,16 +406,16 @@ // }} // > // {isCopy ? ( -// <Image src={'/svg/tic.svg'} width={22} height={22} alt={'copywriting'} /> +// <Image src={'/svg/tic.svg'} width={22} height={22} alt={'copy'} /> // ) : ( // <Box sx={{ display: props.message.file ? 'none' : 'inline' }}> // <TooltipCustom title={'Скопировать ответ'}> // <Image -// onClick={() => copywriting(props.message.content)} -// src={'/svg/copywriting.svg'} +// onClick={() => copy(props.message.content)} +// src={'/svg/copy.svg'} // width={22} // height={22} -// alt={'copywriting'} +// alt={'copy'} // /> // </TooltipCustom> // </Box> @@ -1,98 +0,0 @@ -import axios from 'axios' - -import { API_URL } from '@/src/shared/lib/constants' -import { Copywrite, DraftRequestBody, EditorCopywrite, ShortCopywrite, TemplateType } from '@/src/widgets/copy/api/models' - -export const CopyEndpoints = { - GetCopywrite: async (id: string | string[], type: TemplateType, token?: string): Promise<Copywrite | EditorCopywrite | null> => { - try { - const { data } = await axios.get<Copywrite | EditorCopywrite>(API_URL + `/api/copywrite/copywrites/${id}/`, { - headers: { - Authorization: `Bearer ${token}`, - }, - }) - if (type == 'self') return data as EditorCopywrite - return data as Copywrite - } catch (err) { - return null - } - }, - - CreateDraft: async (req_body: DraftRequestBody, type: TemplateType, token?: string): Promise<Copywrite | EditorCopywrite | null> => { - try { - const { data } = await axios.post<Copywrite | EditorCopywrite>( - API_URL + '/api/copywrite/copywrites/', - { ...req_body }, - { - headers: { - Authorization: `Bearer ${token}`, - }, - } - ) - if (type == 'self') return data as EditorCopywrite - return data as Copywrite - } catch (err) { - return null - } - }, - - ListCopywrites: async (token?: string, type: 'template' | 'self' = 'template', sort: string = ''): Promise<ShortCopywrite[] | null> => { - try { - const { data } = await axios.get<ShortCopywrite[]>(API_URL + '/api/copywrite/copywrites/', { - headers: { - Authorization: `Bearer ${token}`, - }, - }) - return data - } catch (err) { - return null - } - }, - - GenerateResponse: async (id: string | string[], token?: string) => { - try { - const { data } = await axios.put( - API_URL + `/api/copywrite/copywrites/${id}/generate/`, - {}, - { - headers: { - Authorization: `Bearer ${token}`, - }, - } - ) - return data - } catch (err) { - return null - } - }, - - MarkAsFavourite: async (id: string | string[], token?: string) => { - try { - const { data } = await axios.put( - API_URL + `/api/copywrite/copywrites/${id}/favourite`, - {}, - { - headers: { - Authorization: `Bearer ${token}`, - }, - } - ) - return data - } catch (err) { - return null - } - }, - - DeleteFavourite: async (id: string | string[], token?: string) => { - try { - const { data } = await axios.delete(API_URL + `/api/copywrite/copywrites/${id}/favourite`, { - headers: { - Authorization: `Bearer ${token}`, - }, - }) - return data - } catch (err) { - return null - } - }, -} @@ -1,27 +0,0 @@ -import axios from 'axios' -import process from 'process' - -import { API_URL } from '@/src/shared/lib/constants' - -export const editorEndpoints = { - webSocket: { - url: process.env.NEXT_PUBLIC_WS_API_URL, - }, - - UpdateCopywriteContent: async (id: string | string[], req_body: { input_content: string }, token?: string) => { - try { - const { data } = await axios.patch( - API_URL + `/api/copywrite/copywrites/${id}/`, - { ...req_body }, - { - headers: { - Authorization: `Bearer ${token}`, - }, - } - ) - return data - } catch (err) { - return null - } - }, -} @@ -1,73 +0,0 @@ -export type TemplateType = 'template' | 'self' - -export type Template = { - id: string - title: string - description: string | null - picture: string | null -} - -export type TemplateCategory = { - title: string - slug: string -} - -export type Copywrite = { - id: string - output_content: string | null - draft: boolean - favourite: boolean - type: TemplateType - template: CopywriteVariableTemplate - overriden_variables: CopywriteOverrideVariables[] -} - -export type EditorCopywrite = { - id: string - type: TemplateType - draft: boolean - favourite: false - label: string | null - input_content: string | null - output_content: string | null -} - -export type ShortCopywrite = { - draft: boolean - favourite: boolean - id: string - label: string | null - template: Template - type: TemplateType -} - -export type CopywriteVariableTemplate = { - id: string - title: string - picture: string | null - variables: CopywriteDefaultVariables[] -} - -export type OverrideVariableResponse = { - variable_id: string - value: string | null -} - -export type DraftRequestBody = { - type: TemplateType - initial?: { template_id: string } -} - -// VARIABLES - -export type CopywriteDefaultVariables = { - id: string //ID ПЕРЕМЕННОЙ В ШАБЛОНЕ - name: string - default_value: {} -} - -export type CopywriteOverrideVariables = { - id: string //ID ПЕРЕМЕННОЙ В ШАБЛОНЕ - variable: string //ID ИЗМЕНЯЕМОЙ ПЕРЕМЕННОЙ - value: string -} @@ -1,42 +0,0 @@ -import axios from 'axios' - -import { API_URL } from '@/src/shared/lib/constants' -import { Template, TemplateCategory } from '@/src/widgets/copy/api/models' - -export const templatesApi = { - staticTemplate: { - id: '0', - picture: '', - title: 'Свой шаблон', - description: 'Создайте собственный шаблон для определенного сценария использования', - }, - - ListTemplates: async (token?: string, category?: string): Promise<Template[] | null> => { - try { - const { data } = await axios.get<Template[]>( - API_URL + `/api/copywrite/templates/${category !== undefined ? `?category=${category}` : ''}`, - { - headers: { - Authorization: `Bearer ${token}`, - }, - } - ) - return data - } catch (err) { - return null - } - }, - - ListTemplateCategories: async (token?: string): Promise<TemplateCategory[] | null> => { - try { - const { data } = await axios.get<TemplateCategory[]>(API_URL + '/api/copywrite/templates/categories/', { - headers: { - Authorization: `Bearer ${token}`, - }, - }) - return data - } catch (err: any) { - return null - } - }, -} @@ -1,57 +0,0 @@ -import axios from 'axios' - -import { API_URL } from '@/src/shared/lib/constants' -import { OverrideVariableResponse } from '@/src/widgets/copy/api/models' - -export const VariablesEndpoints = { - OverrideVariable: async ( - req_body: OverrideVariableResponse, - copywrite_id: string, - token?: string - ): Promise<{ id: string; variable: string; value: string } | null> => { - try { - const { data } = await axios.post<{ id: string; variable: string; value: string }>( - API_URL + `/api/copywrite/copywrites/${copywrite_id}/variables/`, - { ...req_body }, - { - headers: { - Authorization: `Bearer ${token}`, - }, - } - ) - return data - } catch (err) { - return null - } - }, - - UpdateVariable: async (id: string, value: string | null, copywrite_id: string, token?: string): Promise<{ value: {} } | null> => { - try { - const { data } = await axios.put<{ value: {} }>( - API_URL + `/api/copywrite/copywrites/${copywrite_id}/variables/${id}/`, - { value: value }, - { - headers: { - Authorization: `Bearer ${token}`, - }, - } - ) - return data - } catch (err) { - return null - } - }, - - RemoveVariable: async (id: string, copywrite_id: string, token?: string) => { - try { - const { data } = await axios.delete(API_URL + `/api/copywrite/copywrites/${copywrite_id}/variables/${id}/`, { - headers: { - Authorization: `Bearer ${token}`, - }, - }) - return data - } catch (err) { - return null - } - }, -} @@ -1,39 +0,0 @@ -import CustomColorPicker from '@/src/widgets/copy/ui/custom-color-picker' - -export const toolbarOptions = (theme: 'light' | 'dark') => { - return { - options: ['blockType', 'colorPicker', 'inline', 'textAlign', 'list', 'history'], - inline: { - className: 'inline', - options: ['bold', 'italic', 'underline'], - bold: { icon: `/svg/copy/Bold${theme === 'light' ? '-dark' : ''}.png`, className: 'inline-btn' }, - italic: { icon: `/svg/copy/Italic${theme === 'light' ? '-dark' : ''}.png`, className: 'inline-btn' }, - underline: { icon: `/svg/copy/Underline${theme === 'light' ? '-dark' : ''}.png`, className: 'inline-btn' }, - }, - blockType: { - options: ['Normal', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'Blockquote'], - }, - - textAlign: { - options: ['left', 'center', 'right'], - left: { icon: `/svg/copy/Left${theme === 'light' ? '-dark' : ''}.png`, className: 'inline-btn' }, - center: { icon: `/svg/copy/Center${theme === 'light' ? '-dark' : ''}.png`, className: 'inline-btn' }, - right: { icon: `/svg/copy/Right${theme === 'light' ? '-dark' : ''}.png`, className: 'inline-btn' }, - }, - - list: { - options: ['unordered', 'ordered'], - unordered: { icon: `/svg/copy/Unordered${theme === 'light' ? '-dark' : ''}.png`, className: 'inline-btn' }, - ordered: { icon: `/svg/copy/Ordered${theme === 'light' ? '-dark' : ''}.png`, className: 'inline-btn' }, - }, - - colorPicker: { - component: CustomColorPicker, - }, - - history: { - redo: { icon: `/svg/copy/Redo${theme === 'light' ? '-dark' : ''}.png` }, - undo: { icon: `/svg/copy/Undo${theme === 'light' ? '-dark' : ''}.png` }, - }, - } -} @@ -1,3 +0,0 @@ -export const copyText = (text: string) => { - navigator.clipboard.writeText(text) -} @@ -1,14 +0,0 @@ -import { convertToRaw, EditorState } from 'draft-js' -import draftToHtml from 'draftjs-to-html' - -const getTextFromEditor = (editorState: EditorState) => { - const contentState = editorState.getCurrentContent() - const plainText = contentState.getPlainText() - return plainText -} - -export const getHtmlText = (editorState: EditorState) => { - const contentState = editorState.getCurrentContent() - const rawContent = convertToRaw(contentState) - return draftToHtml(rawContent) -} @@ -1,33 +0,0 @@ -.buttonWrapper{ - - display: flex; - align-items: center; - gap: 10px; - flex-direction: row; - - width: 100%; - - .settingButton{ - display: flex; - justify-content: center; - align-items: center; - - padding: 14px; - border: 1px solid var(--air-color); - border-radius: 13px; - } - -} - -.generateButton{ - width: 100%; - padding: 14px; - background-color: var(--air-color); - border-radius: 13px; - cursor: pointer; - - font-size: 15px; - font-weight: 500; - color: white; - text-align: center; -} \ No newline at end of file @@ -1,16 +0,0 @@ -import React from 'react' -import { Box, BoxProps } from '@mui/material' - -import styles from './button-styles.module.scss' - -interface CustomBoxProps extends BoxProps { - children?: React.ReactNode -} - -export const CopyButton: React.FC<CustomBoxProps> = ({ children, ...props }) => { - return ( - <Box {...props} className={styles.generateButton}> - {children} - </Box> - ) -} @@ -1,25 +0,0 @@ -import React from 'react' -import { Box, Stack } from '@mui/material' - -import { SettingsIcon } from '@/src/widgets/copy/ui/icons/settings-icon' - -import styles from './button-styles.module.scss' - -interface IProps { - settingsHandler: (value: boolean) => void - generateHandler: () => void -} - -export const MobileButtons: React.FC<IProps> = ({ settingsHandler, generateHandler }) => { - return ( - <Stack className={styles.buttonWrapper}> - <Box className={styles.generateButton} onClick={generateHandler}> - Сгенерировать - </Box> - - {/*<Box className={styles.settingButton} onClick={() => settingsHandler(true)}>*/} - {/* <SettingsIcon />*/} - {/*</Box>*/} - </Stack> - ) -} @@ -1,46 +0,0 @@ -import React from 'react' -import { Box, MenuItem } from '@mui/material' - -import { DropdownMenu } from '@/src/shared/ui/dropdown-menu/dropdown-menu' - -import styles from './dropdown-menu.module.scss' - -interface IProps { - id?: string - children: React.ReactNode -} - -export const CopyDropdownMenu: React.FC<IProps> = ({ children, id = 'dropdown-menu' }) => { - const [anchorEl, setAnchorEl] = React.useState<null | HTMLElement>(null) - const open = Boolean(anchorEl) - - const handleClick = (event: React.MouseEvent<HTMLDivElement>) => { - setAnchorEl(event.currentTarget) - } - - const handleClose = () => { - setAnchorEl(null) - } - - return ( - <div> - <Box - onClick={handleClick} - id='editor-dropdown-menu-button' - aria-controls={open ? 'basic-menu' : undefined} - aria-haspopup='true' - aria-expanded={open ? 'true' : undefined} - > - {children} - </Box> - <DropdownMenu id={id} anchorEl={anchorEl} open={open} onClose={handleClose}> - <MenuItem autoFocus={false} className={styles.menuItem}> - Скачать PDF - </MenuItem> - <MenuItem autoFocus={false} className={styles.menuItem}> - Скачать DOCX - </MenuItem> - </DropdownMenu> - </div> - ) -} @@ -1,7 +0,0 @@ -.menuItem{ - font-size: 15px; - font-weight: 500; - display: flex; - align-items: center; - gap: 10px; -} \ No newline at end of file @@ -1,323 +0,0 @@ -import * as React from 'react' -import { useEffect, useState } from 'react' -import { useDispatch } from 'react-redux' -import { Stack, Tab, Tabs, Typography } from '@mui/material' -import Box from '@mui/material/Box' -import Link from 'next/link' -import { useSession } from 'next-auth/react' - -import { setAllVariables, updateOverrideVariables, updateVariable } from '@/src/features/use-copy/copy-store' -import { useAppSelector } from '@/src/main/store/store' -import { useBeforeUnload } from '@/src/shared/lib/hooks' -import { useChangeRouter } from '@/src/shared/lib/hooks/use-change-router' -import { CopyEndpoints } from '@/src/widgets/copy/api/copy-endpoints' -import { OverrideVariableResponse, TemplateType } from '@/src/widgets/copy/api/models' -import { VariablesEndpoints } from '@/src/widgets/copy/api/variables-endpoints' -import { CopyTextarea } from '@/src/widgets/copy/ui/textarea/copy-textarea' - -import styles from './styles.module.scss' - -interface IProps { - desktop: boolean - handleChangeTab: (tab: 'query' | 'resp') => Promise<void> - tab: 'query' | 'resp' | null - input_content: string | null | undefined - template_type: TemplateType - uuid: string - favourite: boolean | undefined - draft: boolean - isEditor: boolean -} - -export const GenerationBlock = ({ desktop, handleChangeTab, tab, input_content, template_type, uuid, favourite, draft, isEditor }: IProps) => { - const theme = useAppSelector((state) => state.theme.theme) - const copy = useAppSelector((state) => state.copy) - const dispatch = useDispatch() - const [variables, setVariables] = useState<any>() - const { data } = useSession() - const [localFavourite, setLocalFavourite] = useState<boolean>(false) - - const changeFavouriteHandler = (id: string) => { - if (!localFavourite) { - CopyEndpoints.MarkAsFavourite(id, data?.access) - } else { - CopyEndpoints.DeleteFavourite(id, data?.access) - } - setLocalFavourite(!localFavourite) - } - - const variableHandler = (variable_id: string, value: string | null, name: string) => { - console.log(isEditor, draft) - - if (!isEditor && draft) { - let isDefVar = copy.overridenVariables?.filter((el) => el.variable === variable_id).length === 0 - - if (value === null || value === '') { - if (!isDefVar) { - VariablesEndpoints.RemoveVariable(variable_id, uuid, data?.access).then(() => { - dispatch(updateVariable({ id: variable_id, value: null })) - dispatch(updateOverrideVariables({ action: 'remove', variable: { id: variable_id, variable: variable_id, value: '' } })) - }) - } - return - } - if (isDefVar) { - const req_body: OverrideVariableResponse = { - variable_id: variable_id, - value: value, - } - VariablesEndpoints.OverrideVariable(req_body, uuid, data?.access).then((res) => { - dispatch(updateVariable({ id: variable_id, value: value })) - if (res) dispatch(updateOverrideVariables({ action: 'add', variable: res })) - }) - return - } - if (!isDefVar) { - VariablesEndpoints.UpdateVariable(variable_id, value, uuid, data?.access).then(() => - dispatch(updateVariable({ id: variable_id, value: value })) - ) - return - } - } - } - - const saveVariables = (variables: { [p: string]: string | null }[]) => { - variables.map((el) => { - if (el.id && el.name) { - variableHandler(el.id, el.value, el.name) - } - }) - } - - useEffect(() => { - if (copy.overridenVariables.length === 0) { - setVariables(copy.defaultVariables) - } else { - const new_over_vars: { [p: string]: string } = {} - - for (let i in copy.overridenVariables) { - new_over_vars[copy.overridenVariables[i].variable] = copy.overridenVariables[i].value - } - - const new_def_vars = copy.defaultVariables.map((el) => { - return { - id: el.id, - value: new_over_vars[el.id] ?? el.default_value, - name: el.name, - } - }) - setVariables(new_def_vars) - dispatch(setAllVariables(new_def_vars)) - } - }, [copy.overridenVariables, copy.defaultVariables]) - - useEffect(() => { - if (favourite !== undefined) setLocalFavourite(favourite) - }, [favourite]) - - useBeforeUnload(() => saveVariables(copy.variables)) - useChangeRouter(() => saveVariables(copy.variables)) - - return ( - <Box className={styles.wrap}> - <Box> - {tab && ( - <Box className={styles.header_wrap}> - <Stack - className={styles.header} - sx={{ paddingBottom: desktop ? '30px' : '15px', borderColor: theme === 'dark' ? '#343437' : '#EFF0F2 !important' }} - > - <Link href={'/copywriting/my'}> - <Stack alignItems={'center'} direction={'row'} gap={2} className={'pointer'}> - <svg width='10' height='17' viewBox='0 0 10 17' fill='none' xmlns='http://www.w3.org/2000/svg'> - <path - d='M8.5 15.5L1.5 8.5L8.5 1.5' - strokeWidth='1.8' - strokeLinecap='round' - strokeLinejoin='round' - stroke='#A4AAB5' - /> - </svg> - <Typography sx={{ fontSize: '15px' }}>Мои генерации</Typography> - </Stack> - </Link> - - <Stack direction={'row'} alignItems={'center'} gap={4}> - {desktop && ( - <Tabs - value={tab} - textColor='inherit' - variant='fullWidth' - className={styles.tabs} - sx={{ - '& .MuiTabs-indicator': { display: 'none' }, - backgroundColor: theme === 'dark' ? '#303035' : 'white', - borderColor: theme === 'dark' ? '' : '#F2F2F8 !important', - }} - > - <Tab - onClick={() => handleChangeTab('query')} - value={'query'} - label={'Запрос'} - className={styles.tab} - sx={{ color: theme === 'dark' ? '#FFFFFF' : '#8280FF' }} - /> - <Tab - onClick={() => handleChangeTab('resp')} - value={'resp'} - label={'Копирайт'} - className={styles.tab} - sx={{ color: theme === 'dark' ? '#FFFFFF' : '#8280FF' }} - /> - </Tabs> - )} - - <Stack direction={'row'} alignItems={'center'} gap={2}> - <svg - className={'pointer'} - width='22' - height='21' - viewBox='0 0 22 21' - fill='none' - xmlns='http://www.w3.org/2000/svg' - onClick={() => { - changeFavouriteHandler(uuid) - }} - > - <path - d='M10.0481 1.92708C10.3481 1.00608 11.6511 1.00608 11.9501 1.92708L13.4691 6.60108C13.5345 6.80157 13.6616 6.97626 13.8322 7.10018C14.0028 7.22411 14.2082 7.29092 14.4191 7.29108H19.3341C20.3031 7.29108 20.7051 8.53108 19.9221 9.10108L15.9461 11.9891C15.7753 12.1132 15.6482 12.2883 15.583 12.4891C15.5178 12.6899 15.5178 12.9063 15.5831 13.1071L17.1011 17.7811C17.4011 18.7031 16.3461 19.4691 15.5631 18.8991L11.5871 16.0111C11.4162 15.8869 11.2104 15.8199 10.9991 15.8199C10.7878 15.8199 10.582 15.8869 10.4111 16.0111L6.43512 18.8991C5.65212 19.4691 4.59712 18.7021 4.89712 17.7811L6.41512 13.1071C6.4804 12.9063 6.48044 12.6899 6.41523 12.4891C6.35002 12.2883 6.22291 12.1132 6.05212 11.9891L2.07612 9.10108C1.29212 8.53108 1.69612 7.29108 2.66412 7.29108H7.57812C7.78917 7.29113 7.99482 7.22442 8.16564 7.10048C8.33646 6.97654 8.46369 6.80173 8.52912 6.60108L10.0481 1.92708Z' - strokeWidth='2' - strokeLinecap='round' - stroke={localFavourite ? '#EEC625' : '#A4AAB5'} - fill={localFavourite ? '#EEC625' : 'inherit'} - strokeLinejoin='round' - /> - </svg> - {/*<svg*/} - {/* className={'pointer'}*/} - {/* width='19'*/} - {/* height='19'*/} - {/* viewBox='0 0 19 19'*/} - {/* fill='none'*/} - {/* xmlns='http://www.w3.org/2000/svg'*/} - {/*>*/} - {/* <rect x='0.85' y='3.85' width='14.3' height='14.3' rx='2.15' stroke='#A4AAB5' strokeWidth='1.7' />*/} - {/* <path*/} - {/* d='M6.5 1H15C16.6569 1 18 2.34315 18 4V12.5'*/} - {/* stroke='#A4AAB5'*/} - {/* strokeWidth='1.7'*/} - {/* strokeLinecap='round'*/} - {/* strokeLinejoin='round'*/} - {/* />*/} - {/*</svg>*/} - {/*<svg*/} - {/* className={'pointer'}*/} - {/* width='16'*/} - {/* height='18'*/} - {/* viewBox='0 0 16 18'*/} - {/* fill='none'*/} - {/* xmlns='http://www.w3.org/2000/svg'*/} - {/*>*/} - {/* <path*/} - {/* d='M1 16.25L15 16.25'*/} - {/* stroke='#A4AAB5'*/} - {/* strokeWidth='1.7'*/} - {/* strokeLinecap='round'*/} - {/* strokeLinejoin='round'*/} - {/* />*/} - {/* <path*/} - {/* d='M8 1.75V12.75M8 12.75L4 9.41M8 12.75L12 9.41'*/} - {/* stroke='#A4AAB5'*/} - {/* strokeWidth='1.8'*/} - {/* strokeLinecap='round'*/} - {/* strokeLinejoin='round'*/} - {/* />*/} - {/*</svg>*/} - </Stack> - </Stack> - </Stack> - - {!desktop && ( - <Tabs - value={tab} - textColor='inherit' - variant='fullWidth' - className={styles.tabs} - sx={{ - '& .MuiTabs-indicator': { display: 'none' }, - backgroundColor: theme === 'dark' ? '#303035' : 'white', - borderColor: theme === 'dark' ? '' : '#F2F2F8 !important', - }} - > - <Tab - onClick={() => handleChangeTab('query')} - value={'query'} - label={'Запрос'} - className={styles.tab} - sx={{ color: theme === 'dark' ? '#FFFFFF' : '#8280FF' }} - /> - <Tab - onClick={() => handleChangeTab('resp')} - value={'resp'} - label={'Копирайт'} - className={styles.tab} - sx={{ color: theme === 'dark' ? '#FFFFFF' : '#8280FF' }} - /> - </Tabs> - )} - </Box> - )} - - <Box - className={'smallScroll'} - sx={{ - paddingY: tab ? '30px' : '', - overflowY: 'scroll', - maxHeight: desktop ? '60vh' : 'calc(200px + (400 - 200) * ((100vh - 400px) / (650 - 400)) - 20px )', - }} - > - {tab === 'resp' && ( - <Box - sx={{ color: theme === 'dark' ? '#FFFFFF' : '#2B2B42', paddingBottom: '10px' }} - dangerouslySetInnerHTML={{ __html: copy.output_content ?? '' }} - /> - )} - {tab === 'query' && template_type === 'template' && ( - <Stack gap={'10px'}> - {variables?.map((el: any) => ( - <CopyTextarea - variableHandler={variableHandler} - key={el.id} - var_id={el.id} - name={el.name} - value={el.value} - format={'view'} - /> - ))} - </Stack> - )} - {tab === 'query' && template_type === 'self' && ( - <Box - sx={{ color: theme === 'dark' ? '#FFFFFF' : '#2B2B42' }} - dangerouslySetInnerHTML={{ __html: input_content ?? '' }} - /> - )} - {!tab && ( - <Stack gap={'10px'}> - {variables?.map((el: any) => ( - <CopyTextarea - variableHandler={variableHandler} - key={el.id} - var_id={el.id} - name={el.name} - value={el.value} - format={'edit'} - /> - ))} - </Stack> - )} - </Box> - </Box> - </Box> - ) -} @@ -1,51 +0,0 @@ -.tabs{ - border: 1px solid #303035; - border-radius: 10px; - min-height: fit-content; -} - -.tab{ - font-size: 14px; - text-transform: none; - border-radius: 10px; - padding: 7px 32px; - min-height: fit-content; -} - -.tab[aria-selected="true"]{ - background-color: #8280FFCC; - color: white !important; -} - -.header{ - display: flex; - justify-content: space-between; - align-items: center; - flex-direction: row; - border-bottom: 1px solid #343437; -} - -.header_wrap{ - padding-bottom: 0; - border-bottom: none; -} - -.wrap{ - width: 100%; - margin-left: 0; - display: flex; - flex-direction: column; - height: fit-content; -} - -@media (max-width: 1080px) { - .header{ - border-bottom: none; - } - - .header_wrap{ - padding-bottom: 30px; - border-bottom: 1px solid #343437; - } - -} \ No newline at end of file @@ -1,11 +0,0 @@ -import * as React from 'react' -import { SVGProps } from 'react' - -export const CopyIcon: React.FC<SVGProps<SVGSVGElement>> = ({ ...props }) => { - return ( - <svg className={'pointer'} {...props} width='19' height='19' viewBox='0 0 19 19' fill='none' xmlns='http://www.w3.org/2000/svg'> - <rect x='0.85' y='3.85' width='14.3' height='14.3' rx='2.15' stroke='inherit' strokeWidth='1.7' /> - <path d='M6.5 1H15C16.6569 1 18 2.34315 18 4V12.5' stroke='inherit' strokeWidth='1.7' strokeLinecap='round' strokeLinejoin='round' /> - </svg> - ) -} @@ -1,10 +0,0 @@ -import React, { SVGProps } from 'react' - -export const DownloadIcon: React.FC<SVGProps<SVGSVGElement>> = ({ ...props }) => { - return ( - <svg className={'pointer'} {...props} width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'> - <path d='M1 16L15 16' stroke='inherit' strokeWidth='1.7' strokeLinecap='round' strokeLinejoin='round' /> - <path d='M8 1.5V12.5M8 12.5L4 9.16M8 12.5L12 9.16' stroke='inherit' strokeWidth='1.8' strokeLinecap='round' strokeLinejoin='round' /> - </svg> - ) -} @@ -1,14 +0,0 @@ -import React, { SVGProps } from 'react' - -export const SettingsIcon: React.FC<SVGProps<SVGSVGElement>> = ({ ...props }) => { - return ( - <svg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'> - <path - d='M17.6402 8.99994C17.6401 8.74797 17.4366 8.54306 17.1851 8.54297H14.1367C13.9228 7.4023 12.9257 6.53564 11.7284 6.53564C10.5312 6.53564 9.53384 7.4023 9.31977 8.54297H0.814479C0.562983 8.54297 0.359375 8.74797 0.359375 8.99994C0.359375 9.2521 0.563155 9.45685 0.814479 9.45685H9.31977C9.53384 10.5976 10.5308 11.4642 11.7282 11.4642C12.9254 11.4642 13.9225 10.5976 14.1365 9.45685H17.1851C17.4367 9.45685 17.6402 9.25192 17.6402 8.99994ZM11.7283 10.5502C10.8777 10.5502 10.1853 9.85476 10.1853 8.99994C10.1853 8.14501 10.8779 7.44976 11.7283 7.44976C12.5789 7.44976 13.2714 8.1452 13.2714 8.99994C13.2714 9.85494 12.5787 10.5502 11.7283 10.5502ZM17.1851 14.7191H8.67984C8.46583 13.5784 7.4688 12.7117 6.27149 12.7117C5.07419 12.7117 4.07701 13.5784 3.86292 14.7191H0.814624C0.563127 14.7191 0.359522 14.9241 0.359522 15.176C0.359522 15.4282 0.563299 15.633 0.814624 15.633H3.86321C4.07719 16.7737 5.07422 17.6403 6.27152 17.6403C7.46883 17.6403 8.46587 16.7737 8.67984 15.633H17.1851C17.4367 15.633 17.6403 15.428 17.6403 15.176C17.6403 14.924 17.4367 14.7191 17.1851 14.7191ZM6.27149 16.7262C5.42087 16.7262 4.72843 16.0308 4.72843 15.1761C4.72843 14.3211 5.42105 13.6259 6.27149 13.6259C7.12212 13.6259 7.81455 14.3213 7.81455 15.1761C7.81455 16.031 7.12208 16.7262 6.27149 16.7262ZM0.81466 3.28061H3.86325C4.07722 4.42129 5.07426 5.28794 6.27157 5.28794C7.46887 5.28794 8.4659 4.42129 8.67984 3.28061H17.1852C17.4368 3.28061 17.6403 3.07561 17.6403 2.82366C17.6403 2.57153 17.4366 2.36671 17.1852 2.36671H8.67984C8.46591 1.22604 7.46887 0.359375 6.27157 0.359375C5.07426 0.359375 4.07709 1.22604 3.86299 2.36671H0.814696C0.5632 2.36671 0.359595 2.5717 0.359595 2.82366C0.359595 3.07577 0.563028 3.28061 0.81466 3.28061ZM6.27149 1.27342C7.12212 1.27342 7.81455 1.96886 7.81455 2.82362C7.81455 3.67857 7.12194 4.37383 6.27149 4.37383C5.42087 4.37383 4.72843 3.67839 4.72843 2.82362C4.72843 1.96868 5.42076 1.27342 6.27149 1.27342Z' - fill='#8280FF' - stroke='#868686' - strokeWidth='0.0904762' - /> - </svg> - ) -} @@ -1,170 +0,0 @@ -.mainWrapper{ - width: 97%; - display: flex; - justify-content: flex-start; - align-items: start; - gap: 20px; - - @media (max-width:768px ) { - width: 100%; - } - - .sizeWrapper{ - position: relative; - padding: 30px; - background-color: var(--new-ui-main-color); - border-radius: 15px; - } - - .defaultButton{ - cursor: pointer; - background-color: #8280FF; - border-radius: 13px; - color: white; - padding: 14px 0; - text-align: center; - font-weight: 500; - margin-top: 20px; - font-size: 15px; - } - -} - -.mockWrapper{ - gap: 20px; - - height:85%; - width:100%; - position:relative; - z-index:4; - filter:blur(7px); - user-select: none; -} - -.inDev{ - position:absolute; - z-index:5; - left:0; - right:0; - bottom:25%; - margin:0 auto; - color:var(--air-color); - user-select: none; - font-weight: 700; - font-size: 34px; - text-align: center; - letter-spacing: 2px; - - @media (max-width: 1500px) { - bottom:30%; - font-size: 28px; - } - - @media (max-width: 1300px) { - bottom:35%; - font-size: 20px; - } - -} - -.mockWrapperInDev{ - position:absolute; - z-index:7; - height:85%; - width:100%; - top:0; - left:0 -} - -// MY_COPYWRITE_BLOCK - -.generationText{ - padding-bottom: 30px; - font-size: 16px; - color: #A4AAB5; - font-weight: 600; - letter-spacing: 0.3px; -} - -.generationsWrapper{ - display: flex; - justify-content: start; - gap: 20px; - align-items: start; - padding-right: 10px; - - overflow-y: scroll; - max-height: 55vh; - - .generateWrap{ - display: flex; - justify-content: space-between; - align-items: center; - flex-direction: row; - gap: 15px; - - width: 100%; - cursor: pointer; - stroke: #A4AAB5; - - padding-bottom: 20px; - border-bottom: 1px solid; - - color:var(--copy-color); - border-color: var(--copy-border); - - &:last-child{ - border-bottom: none; - padding-bottom: 0; - } - } - - .generateTitle{ - font-size: 17px; - font-weight: 500; - color: inherit; - } - - .generateIconsWrap{ - display: flex; - align-items: center; - flex-direction: row; - gap: 15px; - } - - .draftText{ - display: flex; - justify-content: start; - align-items: center; - gap: 5px; - - color:#B73262; - font-size: 17px; - font-weight: 500; - } - -} - -.colorBox{ - width: 20px; - height: 20px; - border-radius: 100%; - background-color: #313138; -} -.colorBox[data-theme='light']{ - background-color: #EFF0F2; -} - -.saveBlock{ - color:#A4AAB5; - font-size: 12px; - font-weight: 500; - - position: absolute; - - display: flex; - align-items: center; - justify-content: center; - gap: 5px; - width: 100%; -} \ No newline at end of file @@ -1,24 +0,0 @@ -.tabs{ - border: 1px solid #303035; - border-radius: 13px; - min-height: fit-content; - - .tab{ - font-size: 15px; - text-transform: none; - border-radius: 13px; - padding: 13px 15px; - font-weight: 500; - min-height: fit-content; - color:inherit; - } - - - .tab[aria-selected="true"]{ - background-color: var(--choosen-tab); - color: var(--choosen-tab-color) !important; - } - - -} - @@ -1,158 +0,0 @@ -import { ChangeEvent, useEffect, useState } from 'react' -import { useDispatch } from 'react-redux' -import { Box, Collapse, Stack, TextField, Typography } from '@mui/material' - -import { updateVariable } from '@/src/features/use-copy/copy-store' -import { useAppSelector } from '@/src/main/store/store' - -import styles from './styles.module.scss' - -interface IProps { - format: 'edit' | 'view' - error?: boolean - name?: string - value: any - var_id: string - variableHandler: (variable_id: string, value: string, name: string) => void -} - -export const CopyTextarea = ({ format, name = 'Field', value, var_id, variableHandler, error }: IProps) => { - const theme = useAppSelector((state) => state.theme.theme) - const [isOpen, setIsOpen] = useState<boolean>(false) - const [inputValue, setInputValue] = useState<string>(value) - const dispatch = useDispatch() - - const setInputValueHandler = (event: ChangeEvent<HTMLTextAreaElement | HTMLInputElement>) => { - setInputValue(event.target.value) - dispatch(updateVariable({ id: var_id, value: event.target.value })) - } - - useEffect(() => { - if (inputValue !== value) { - const timeout = setTimeout(() => { - variableHandler(var_id, inputValue, name) - }, 3000) - return () => clearTimeout(timeout) - } - }, [inputValue]) - - return ( - <Box className={styles.wrap}> - {format === 'edit' && ( - <Box className={styles.textarea_wrap}> - <TextField - InputProps={{ - startAdornment: ( - <svg width='28' height='28' viewBox='0 0 28 28' fill='none' xmlns='http://www.w3.org/2000/svg'> - <path - d='M22.1667 23.3333H5.83333C5.21449 23.3333 4.621 23.0875 4.18342 22.6499C3.74583 22.2123 3.5 21.6188 3.5 21V6.99996C3.5 6.38112 3.74583 5.78763 4.18342 5.35004C4.621 4.91246 5.21449 4.66663 5.83333 4.66663H17.5C18.1188 4.66663 18.7123 4.91246 19.1499 5.35004C19.5875 5.78763 19.8333 6.38112 19.8333 6.99996V8.16663M22.1667 23.3333C21.5478 23.3333 20.9543 23.0875 20.5168 22.6499C20.0792 22.2123 19.8333 21.6188 19.8333 21V8.16663M22.1667 23.3333C22.7855 23.3333 23.379 23.0875 23.8166 22.6499C24.2542 22.2123 24.5 21.6188 24.5 21V10.5C24.5 9.88112 24.2542 9.28763 23.8166 8.85004C23.379 8.41246 22.7855 8.16663 22.1667 8.16663H19.8333M15.1667 4.66663H10.5M8.16667 18.6666H15.1667M8.16667 9.33329H15.1667V14H8.16667V9.33329Z' - stroke={error && theme === 'dark' ? '#B73262' : error && theme === 'light' ? '#FF76A7' : '#A4AAB5'} - strokeWidth='1.75' - strokeLinecap='round' - strokeLinejoin='round' - /> - </svg> - ), - }} - variant={'outlined'} - multiline={true} - value={inputValue} - onChange={setInputValueHandler} - className={styles.textarea} - placeholder={name} - sx={{ - '& .MuiOutlinedInput-root': { - borderRadius: '13px', - padding: '0 0 0 15px', - transition: 'all 200ms', - '&:hover fieldset': { - borderColor: 'rgba(130,128,255,0.54)', - transition: 'all 200ms', - }, - '&.Mui-focused fieldset': { - borderColor: '#8280FF', - transition: 'all 200ms', - }, - - '& .MuiOutlinedInput-notchedOutline': { - border: '2px solid', - borderColor: - error && theme === 'dark' - ? '#B73262' - : error && theme === 'light' - ? '#FF76A7' - : theme === 'dark' - ? '#40404E' - : '#EFF0F2', - }, - color: theme === 'dark' ? 'white' : '#2B2B42', - fontSize: '15px', - fontWeight: 'medium', - }, - '& textarea::placeholder': { - color: error && theme === 'dark' ? '#B73262' : error && theme === 'light' ? '#FF76A7' : '', - opacity: error ? '100%' : '30%', - }, - }} - /> - {error && ( - <Typography sx={{ color: theme === 'dark' ? '#B73262' : '#FF76A7' }} className={styles.error_text}> - Ошибка - </Typography> - )} - </Box> - )} - {format === 'view' && ( - <Box data-theme={theme} className={styles.drop_wrap}> - <Box - className={styles.title_wrap} - onClick={() => { - setIsOpen(!isOpen) - }} - > - <Stack direction={'row'} gap={'15px'} alignItems={'center'}> - <svg - className={`${isOpen ? styles.color_view_icon : styles.view_icon}`} - width='28' - height='28' - viewBox='0 0 28 28' - fill='none' - xmlns='http://www.w3.org/2000/svg' - > - <path - d='M22.1667 23.3333H5.83333C5.21449 23.3333 4.621 23.0875 4.18342 22.6499C3.74583 22.2123 3.5 21.6188 3.5 21V6.99996C3.5 6.38112 3.74583 5.78763 4.18342 5.35004C4.621 4.91246 5.21449 4.66663 5.83333 4.66663H17.5C18.1188 4.66663 18.7123 4.91246 19.1499 5.35004C19.5875 5.78763 19.8333 6.38112 19.8333 6.99996V8.16663M22.1667 23.3333C21.5478 23.3333 20.9543 23.0875 20.5168 22.6499C20.0792 22.2123 19.8333 21.6188 19.8333 21V8.16663M22.1667 23.3333C22.7855 23.3333 23.379 23.0875 23.8166 22.6499C24.2542 22.2123 24.5 21.6188 24.5 21V10.5C24.5 9.88112 24.2542 9.28763 23.8166 8.85004C23.379 8.41246 22.7855 8.16663 22.1667 8.16663H19.8333M15.1667 4.66663H10.5M8.16667 18.6666H15.1667M8.16667 9.33329H15.1667V14H8.16667V9.33329Z' - stroke='inherit' - strokeWidth='1.75' - strokeLinecap='round' - strokeLinejoin='round' - /> - </svg> - <Typography - sx={{ - color: isOpen ? '#8280FF' : '', - }} - className={styles.view_title} - > - {name} - </Typography> - </Stack> - <svg - className={`${isOpen ? styles.rotate : styles.default}`} - width='16' - height='10' - viewBox='0 0 16 10' - fill='none' - xmlns='http://www.w3.org/2000/svg' - > - <path d='M1 8.5L8 1.5L15 8.5' stroke='inherit' strokeWidth='1.8' strokeLinecap='round' strokeLinejoin='round' /> - </svg> - </Box> - - <Collapse in={isOpen}> - <Typography className={styles.open_content}>{value}</Typography> - </Collapse> - </Box> - )} - </Box> - ) -} @@ -1,81 +0,0 @@ -.wrap{ - padding: 1px 1px; - - .textarea_wrap{ - - .textarea{ - width: 100%; - } - - .textarea textarea{ - padding: 15px 10px 15px 15px; - } - - .error_text{ - font-size: 13px; - margin-top: 5px; - } - - } - - .drop_wrap{ - width: 100%; - border-radius: 13px; - border: 2px solid #40404E; - padding: 10px 15px; - - .title_wrap{ - cursor: pointer; - user-select: none; - - display: flex; - justify-content: space-between; - align-items: center; - flex-direction: row; - gap: 10px; - } - - .view_title{ - font-size: 15px; - font-weight: 500; - } - - .view_icon{ - stroke: #A4AAB5; - } - - .color_view_icon{ - stroke: #8280FF; - } - - .open_content{ - margin-top: 10px; - font-size: 15px; - font-weight: 400; - color: #FFFFFF; - } - - .default{ - stroke: #A4AAB5; - transition: all 150ms; - transform: rotate(0deg); - } - - .rotate{ - stroke: #8280FF; - transition: all 150ms; - transform: rotate(-180deg); - } - - } - - .drop_wrap[data-theme='light']{ - border: 2px solid #EFF0F2; - - .open_content{ - color: #2B2B42; - } - - } - -} @@ -1,111 +0,0 @@ -import React, { useState } from 'react' -import { ColorResult, SwatchesPicker } from 'react-color' -import { Box, Stack } from '@mui/material' - -import { useAppSelector } from '@/src/main/store/store' - -interface CustomColorPickerProps { - expanded: boolean - onExpandEvent: () => void - onChange: (style: string, color: string) => void - currentState: { - color?: string - bgColor?: string - } -} - -const CustomColorPicker: React.FC<CustomColorPickerProps> = ({ expanded, onExpandEvent, onChange, currentState }) => { - const [isColor, setIsColor] = useState<boolean>(false) - const [isHighlight, setIsHighlight] = useState<boolean>(false) - const theme = useAppSelector((state) => state.theme.theme) - - const theme_color = theme === 'dark' ? 'white' : 'black' - - const handleChangeComplete = (color: ColorResult) => { - onChange('color', color.hex) - } - - const handleBgChangeComplete = (color: ColorResult) => { - onChange('bgcolor', color.hex) - } - - return ( - <Stack direction={'row'} alignItems={'center'} gap={'3px'}> - <Stack - justifyContent={'center'} - alignItems={'center'} - aria-haspopup='true' - aria-expanded={isColor} - onClick={() => setIsColor(!isColor)} - aria-label='custom-color-picker' - sx={{ minWidth: '25px', cursor: 'pointer', position: 'relative' }} - > - <div onClick={() => setIsColor(!isColor)}> - {isColor && ( - <Box sx={{ position: 'absolute', zIndex: '10' }}> - <SwatchesPicker color={currentState.color} onChangeComplete={handleChangeComplete} /> - </Box> - )} - <Stack justifyContent={'center'} alignItems={'center'} direction={'column'} gap={'3px'}> - <svg width='12' height='12' viewBox='0 0 10 11' fill='none' xmlns='http://www.w3.org/2000/svg'> - <path - d='M2.24636 11H0.27761L3.86213 0.818182H6.13912L9.7286 11H7.75985L5.04039 2.90625H4.96085L2.24636 11ZM2.31099 7.00781H7.68031V8.48935H2.31099V7.00781Z' - fill={theme_color} - /> - </svg> - <Box - sx={{ - width: '16px', - height: '3px', - borderRadius: '100px', - marginTop: '3px', - background: currentState.color || theme_color, - }} - ></Box> - </Stack> - </div> - </Stack> - - <Stack - justifyContent={'center'} - alignItems={'center'} - aria-haspopup='true' - aria-expanded={isHighlight} - onClick={() => setIsHighlight(!isHighlight)} - aria-label='custom-highlight-picker' - sx={{ minWidth: '25px', cursor: 'pointer', position: 'relative' }} - > - <div onClick={() => setIsHighlight(!isHighlight)}> - {isHighlight && ( - <Box sx={{ position: 'absolute', zIndex: '10' }}> - <SwatchesPicker color={currentState.bgColor} onChangeComplete={handleBgChangeComplete} /> - </Box> - )} - <Stack justifyContent={'center'} alignItems={'center'} direction={'column'} gap={'3px'}> - <svg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'> - <path - d='M5.65503 2.36449C5.61566 2.32512 5.55267 2.32512 5.5133 2.36449L0.532991 7.34479C0.515274 7.38023 0.497557 7.41172 0.477872 7.44519L0.00346388 9.76408C-0.0221266 9.90188 0.0979519 10.022 0.235747 9.99636L2.55267 9.52196C2.5881 9.50424 2.6196 9.48652 2.65307 9.46684L7.63534 4.48456C7.67471 4.44519 7.67471 4.3822 7.63534 4.34283L5.65503 2.36449Z' - fill={theme_color} - /> - <path - d='M9.85366 1.56151L8.43831 0.146161C8.24343 -0.0487204 7.9265 -0.0487204 7.73162 0.146161L6.36351 1.51624C6.32414 1.55561 6.32414 1.6186 6.36351 1.65797L8.34382 3.63828C8.38319 3.67765 8.44619 3.67765 8.48556 3.63828L9.85366 2.27017C10.0485 2.07332 10.0485 1.75639 9.85366 1.56151Z' - fill={theme_color} - /> - </svg> - <Box - sx={{ - width: '16px', - height: '3px', - borderRadius: '100px', - marginTop: '3px', - background: currentState.bgColor || theme_color, - }} - ></Box> - </Stack> - </div> - </Stack> - </Stack> - ) -} - -export default CustomColorPicker @@ -1,77 +0,0 @@ -import React, { useEffect, useState } from 'react' -import { useDispatch } from 'react-redux' -import { Box } from '@mui/material' -import { EditorState } from 'draft-js' -import { stateFromHTML } from 'draft-js-import-html' -import dynamic from 'next/dynamic' -import { useRouter } from 'next/router' -import { useSession } from 'next-auth/react' - -import { setTextInputContent } from '@/src/features/use-copy/copy-store' -import { useBeforeUnload } from '@/src/shared/lib/hooks' -import { useChangeRouter } from '@/src/shared/lib/hooks/use-change-router' -import { editorEndpoints } from '@/src/widgets/copy/api/editor-endpoints' -import { toolbarOptions } from '@/src/widgets/copy/lib/constants' -import { getHtmlText } from '@/src/widgets/copy/lib/getEditorHtml' -import { SaveBlock } from '@/src/widgets/copy/ui/save-block' - -interface IProps { - theme: 'light' | 'dark' - id: string - contentState: string | null - saveEditorValue: (content: string) => void - isGenerateStart: boolean -} - -export const EditorWrap: React.FC<IProps> = ({ theme, id, contentState, saveEditorValue, isGenerateStart }) => { - const Editor = dynamic(() => import('react-draft-wysiwyg').then((res) => res.Editor), { ssr: false }) - const [editorState, setEditorState] = useState(() => { - if (contentState) return EditorState.createWithContent(stateFromHTML(contentState)) - if (!contentState) return EditorState.createEmpty() - }) - const dispatch = useDispatch() - const [test, setTest] = useState() - - useEffect(() => { - if (editorState) { - const htmlText = getHtmlText(editorState) - - const timeout = setTimeout(() => { - dispatch(setTextInputContent(htmlText)) - }, 250) - - const saveTimeout = setTimeout(() => { - saveEditorValue(htmlText) - }, 1000) - - return () => { - clearTimeout(timeout) - clearTimeout(saveTimeout) - } - } - }, [editorState]) - - useEffect(() => { - if (isGenerateStart && editorState) { - saveEditorValue(getHtmlText(editorState)) - } - }, [isGenerateStart]) - - useChangeRouter(() => { - if (editorState) saveEditorValue(getHtmlText(editorState)) - }) - - return ( - <Box sx={{ position: 'relative', height: '100%' }}> - <Editor - editorState={editorState} - toolbar={toolbarOptions(theme)} - toolbarClassName='toolbarClassName' - wrapperClassName='wrapperClassName' - editorClassName='editorClassName' - onEditorStateChange={setEditorState} - /> - {/*{isSave && <SaveBlock sx={{ right: 0, bottom: '30px', left: 0, margin: '0 auto' }} />}*/} - </Box> - ) -} @@ -1,46 +0,0 @@ -import * as React from 'react' -import { Stack, Typography } from '@mui/material' - -import { ShortCopywrite } from '@/src/widgets/copy/api/models' -import { MyGeneration } from '@/src/widgets/copy/ui/my-generation' -import styles from '@/src/widgets/copy/ui/styles/copywrite.module.scss' - -interface IProps { - desktop: boolean - copywritesList: ShortCopywrite[] | null - changeFavouriteHandler: (id: string, favourite: boolean) => void -} - -export const MyCopywrite = ({ desktop, copywritesList, changeFavouriteHandler }: IProps) => { - return ( - <> - <Typography className={styles.generationText}>ГЕНЕРАЦИИ</Typography> - <Stack className={`${styles.generationsWrapper} smallScroll`}> - {copywritesList?.map((el) => { - let href = '' - - if (el.type == 'self') { - href = !el.draft ? `my/${el.id}?mode=query` : `editor?uuid=${el.id}` - } - if (el.type == 'template') { - href = !el.draft ? `my/${el.id}?mode=query` : `my/${el.id}` - } - - return ( - <MyGeneration - key={el.id} - changeFavouriteHandler={changeFavouriteHandler} - id={el.id} - draft={el.draft} - type={el.type} - label={el.label} - favourite={el.favourite} - href={href} - template={el.template} - /> - ) - })} - </Stack> - </> - ) -} @@ -1,94 +0,0 @@ -import * as React from 'react' -import { useState } from 'react' -import { Box, Stack, Typography } from '@mui/material' -import Image from 'next/image' -import Link from 'next/link' - -import { useAppSelector } from '@/src/main/store/store' -import { Template, TemplateType } from '@/src/widgets/copy/api/models' -import styles from '@/src/widgets/copy/ui/styles/copywrite.module.scss' - -interface IProps { - href: string - draft: boolean - favourite: boolean - id: string - label: string | null - template: Template - type: TemplateType - changeFavouriteHandler: (id: string, favourite: boolean) => void -} - -export const MyGeneration: React.FC<IProps> = ({ favourite, id, label, template, type, href, draft, changeFavouriteHandler }) => { - const [localFavourite, setLocalFavourite] = useState<boolean>(favourite) - const theme = useAppSelector((state) => state.theme.theme) - - return ( - <Stack key={id} className={styles.generateWrap}> - <Link href={href} style={{ width: '100%' }}> - <Typography className={styles.generateTitle}> - {draft && ( - <Typography className={styles.draftText}> - Черновик:{' '} - {template && template.picture !== null && ( - <Image src={template.picture} alt={'template icon'} width={20} height={20} /> - )} - {draft && type === 'self' && <Box data-theme={theme} className={styles.colorBox}></Box>}{' '} - <span style={{ color: '#A4AAB5' }}>{label ? label : type == 'template' ? template.title : 'Свой шаблон'}</span>{' '} - </Typography> - )} - {!draft && label} - </Typography> - </Link> - - <Stack className={styles.generateIconsWrap}> - <svg - width='22' - height='21' - viewBox='0 0 22 21' - fill='none' - xmlns='http://www.w3.org/2000/svg' - onClick={() => { - changeFavouriteHandler(id, localFavourite) - setLocalFavourite(!localFavourite) - }} - > - <path - d='M10.0481 1.92708C10.3481 1.00608 11.6511 1.00608 11.9501 1.92708L13.4691 6.60108C13.5345 6.80157 13.6616 6.97626 13.8322 7.10018C14.0028 7.22411 14.2082 7.29092 14.4191 7.29108H19.3341C20.3031 7.29108 20.7051 8.53108 19.9221 9.10108L15.9461 11.9891C15.7753 12.1132 15.6482 12.2883 15.583 12.4891C15.5178 12.6899 15.5178 12.9063 15.5831 13.1071L17.1011 17.7811C17.4011 18.7031 16.3461 19.4691 15.5631 18.8991L11.5871 16.0111C11.4162 15.8869 11.2104 15.8199 10.9991 15.8199C10.7878 15.8199 10.582 15.8869 10.4111 16.0111L6.43512 18.8991C5.65212 19.4691 4.59712 18.7021 4.89712 17.7811L6.41512 13.1071C6.4804 12.9063 6.48044 12.6899 6.41523 12.4891C6.35002 12.2883 6.22291 12.1132 6.05212 11.9891L2.07612 9.10108C1.29212 8.53108 1.69612 7.29108 2.66412 7.29108H7.57812C7.78917 7.29113 7.99482 7.22442 8.16564 7.10048C8.33646 6.97654 8.46369 6.80173 8.52912 6.60108L10.0481 1.92708Z' - stroke={localFavourite ? '#EEC625' : '#A4AAB5'} - strokeWidth='2' - strokeLinecap='round' - fill={localFavourite ? '#EEC625' : 'inherit'} - strokeLinejoin='round' - /> - </svg> - {/*<svg className={'pointer'} width='19' height='19' viewBox='0 0 19 19' fill='none' xmlns='http://www.w3.org/2000/svg'>*/} - {/* <rect x='0.85' y='3.85' width='14.3' height='14.3' rx='2.15' stroke='inherit' strokeWidth='1.7' />*/} - {/* <path*/} - {/* d='M6.5 1H15C16.6569 1 18 2.34315 18 4V12.5'*/} - {/* stroke='inherit'*/} - {/* strokeWidth='1.7'*/} - {/* strokeLinecap='round'*/} - {/* strokeLinejoin='round'*/} - {/* />*/} - {/*</svg>*/} - {/*<svg width='16' height='18' viewBox='0 0 16 18' fill='none' xmlns='http://www.w3.org/2000/svg'>*/} - {/* <path*/} - {/* d='M1 16.25L15 16.25'*/} - {/* stroke='#A4AAB5'*/} - {/* strokeWidth='1.7'*/} - {/* strokeLinecap='round'*/} - {/* strokeLinejoin='round'*/} - {/* />*/} - {/* <path*/} - {/* d='M8 1.75V12.75M8 12.75L4 9.41M8 12.75L12 9.41'*/} - {/* stroke='#A4AAB5'*/} - {/* strokeWidth='1.8'*/} - {/* strokeLinecap='round'*/} - {/* strokeLinejoin='round'*/} - {/* />*/} - {/*</svg>*/} - </Stack> - </Stack> - ) -} @@ -1,22 +0,0 @@ -import React from 'react' -import { Typography, TypographyProps } from '@mui/material' - -import styles from '@/src/widgets/copy/ui/styles/copywrite.module.scss' - -interface CustomTypographyProps extends TypographyProps {} - -export const SaveBlock: React.FC<CustomTypographyProps> = ({ children, ...props }) => { - return ( - <Typography {...props} className={styles.saveBlock}> - <svg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'> - <path - fillRule='evenodd' - clipRule='evenodd' - d='M10.6007 0.583328C10.9101 0.583328 11.2069 0.706242 11.4257 0.925039L13.0756 2.57495C13.2944 2.79375 13.4173 3.09049 13.4173 3.39991V11.6667C13.4173 12.6332 12.6338 13.4167 11.6673 13.4167H2.33398C1.36749 13.4167 0.583984 12.6332 0.583984 11.6667V2.33333C0.583984 1.36683 1.36749 0.583328 2.33398 0.583328H10.6007ZM2.33398 1.74999C2.01182 1.74999 1.75065 2.01116 1.75065 2.33333V11.6667C1.75065 11.9888 2.01182 12.25 2.33398 12.25H2.91732V8.74999C2.91732 7.78347 3.70082 6.99999 4.66732 6.99999H9.33398C10.3005 6.99999 11.084 7.78347 11.084 8.74999V12.25H11.6673C11.9895 12.25 12.2506 11.9888 12.2506 11.6667V3.98325C12.2506 3.67382 12.1277 3.37708 11.9089 3.15828L10.8424 2.09171C10.6236 1.87291 10.3268 1.74999 10.0174 1.74999H9.91732V2.91666C9.91732 3.88316 9.13384 4.66666 8.16732 4.66666H5.83398C4.86749 4.66666 4.08398 3.88316 4.08398 2.91666V1.74999H2.33398ZM9.91732 12.25V8.74999C9.91732 8.42782 9.65616 8.16666 9.33398 8.16666H4.66732C4.34515 8.16666 4.08398 8.42782 4.08398 8.74999V12.25H9.91732ZM5.25065 1.74999H8.75065V2.91666C8.75065 3.23882 8.48949 3.49999 8.16732 3.49999H5.83398C5.51182 3.49999 5.25065 3.23882 5.25065 2.91666V1.74999Z' - fill='#A4AAB5' - /> - </svg> - Автосохранение... - </Typography> - ) -} @@ -0,0 +1,84 @@ +const descriptionChatGPT = + 'Модели GPT-3.5 могут понимать и генерировать естественный язык или код. Наша самая мощная и экономичная модель серии GPT-3.5 - gpt-3.5-turbo, которая была оптимизирована для чата, но также хорошо работает и для традиционных операций по выполнению заданий.' +const descriptionChatGPT4 = + 'GPT-4 более творческий и совместный, чем когда-либо прежде. Он может генерировать, редактировать и повторять с пользователями творческие и технические задачи письма, такие как сочинение песен, написание сценариев или изучение стиля письма пользователя.\n' + + 'GPT-4 может принимать изображения в качестве входных данных и генерировать подписи, классификации и анализы.\n' + + 'GPT-4 способен обрабатывать более 25 000 слов текста, что позволяет использовать такие варианты использования, как создание длинного контента, расширенные беседы, а также поиск и анализ документов.' + +const advantagesChatGPT = '' + +const descriptionDaVinci = + 'Самая мощная модель в серии GPT-3. Может выполнять любую задачу эффективнее своих предшественников и демонстрировать результат, часто более высокого качества, более развернутый и гораздо более точный. Обрабатывает до 4000 токенов за запрос.' +const advantagesDaVinci = + 'Обрабатывает максимально сложные запросы, выводит причину и следствие в любом виде контента, способен работать с нестандартным подходом, ищет, анализирует и обобщает информацию по запросу, тратит в 10 раз больше токенов, чем модели ChaGPT-35 и Curie.' +const warningDaVinci = 'Тратит в 10 раз больше токенов, чем модели ChatGPT и Curie.' + +const descriptionCurie = 'Очень мощный, при этом быстрее и дешевле, чем text-DaVinci-003.' +const advantagesCurie = 'Способен выполнять языковой перевод, классифицировать и обобщать информацию, соблюдать заданный эмоциональный тон.' + +const descriptionBabbage = 'Способен выполнять простые задачи, очень быстрый и недорогой.' +const advantagesBabbage = 'Способен классифицировать информацию по заданным параметрам и осуществлять семантический поиск.' + +const descriptionAda = 'Способен выполнять простые задачи. В серии GPT-3 является самой быстрой моделью по самой низкой цене.' +const advantagesAda = 'Способен синтаксически анализировать текст, выполнять базовую классификацию, подбирать ключевые слова.' + +export const ParameterTopP = + 'Тор_p - альтернатива температуре. Не\n' + + 'советуем менять top_p и температуру\n' + + 'одновременно. Меняется в интервале от 0\n' + + 'до 1. Более высокие значения дают более\n' + + 'креативные ответы.\n' + +export const ParameterTemperature = + 'Температура влияет на вероятность\n' + + 'случайного ответа: чем выше температура,\n' + + 'тем больше вероятность получить\n' + + 'креативный ответ. Наоборот, при низкой\n' + + 'температуре ответ будет более точным и\n' + + 'предсказуемым. Меняется в интервале от\n' + + '0 до 1. Значение по-умолчанию 0.5.\n' + +export const ParameterPresencePenalty = + 'Максимальное количество токенов для\n' + + 'генерации ответа ботом. Токен это часть\n' + + 'слова или слово целиком. Бот оперирует\n' + + 'токенами, разбивая весь текст на токены.\n' + + '750 слов это в среднем 1000 токенов.' + +export interface ITypeModels { + key: string + value: string + description: string + advantages?: string + warning?: string +} + +export const typeModels: ITypeModels[] = [ + { + key: 'GPT-4o', + value: 'gpt-4o', + description: '', + }, + { + key: 'GPT-4 Turbo Preview', + value: 'gpt-4-turbo-preview', + description: '', + }, + { + key: 'GPT-4 Turbo', + value: 'gpt-4-turbo', + description: '', + }, + { + key: 'GPT-4', + value: 'gpt-4', + description: descriptionChatGPT4, + }, + { + key: 'GPT-3.5', + value: 'gpt-3.5-turbo', + description: descriptionChatGPT, + }, +] + +export type TypeModelGPT = 'gpt-3.5-turbo' | 'text-davinci-003' | 'text-curie-001' | 'text-babbage-001' | 'text-ada-001' @@ -0,0 +1,48 @@ +import React from 'react' +import { Drawer, MenuItem, Slider, Typography } from '@mui/material' +import Stack from '@mui/material/Stack' + +import { useAppSelector } from '@/src/main/store/store' +import { Select } from '@/src/shared' +import { IFiltersChatGPT } from '@/src/widgets/filters-gpt/ui/filters' +import TooltipModelTypes from '@/src/widgets/filters-gpt/ui/tooltip-model-types' + +const FiltersMobile: React.FC<IFiltersChatGPT> = ({ + open, + handleCloseFilters, + parameterTopP, + temperatureModel, + typeModels, + typeModel, + handleChangeTypeModel, + changeTemperature, + changeTopP, + changePresence, + parameterPresence, + resetSettings, +}) => { + const theme = useAppSelector((state) => state.theme.theme) + + return ( + <Drawer + sx={{ + '.MuiStack-root': { + backgroundColor: theme === 'light' ? 'white' : '#4B4B4B', + border: 'none', + }, + '.MuiPaper-root': { + backgroundColor: theme === 'light' ? 'white' : '#4B4B4B', + border: 'none', + }, + }} + PaperProps={{ + style: { borderRadius: '15px 15px 0px 0px' }, + }} + open={Boolean(open)} + onClose={handleCloseFilters} + anchor='bottom' + ></Drawer> + ) +} + +export default FiltersMobile @@ -0,0 +1,291 @@ +import React, { memo, useMemo } from 'react' +import SettingsSuggestIcon from '@mui/icons-material/SettingsSuggest' +import { Box, Button, MenuItem, Slider, Tooltip, Typography } from '@mui/material' +import { SelectChangeEvent } from '@mui/material/Select' +import Stack from '@mui/material/Stack' +import { styled } from '@mui/material/styles' + +import { TutorialContext } from '@/src/features/tutorial-context/tutorial-context' +import { useAppSelector } from '@/src/main/store/store' +import { Select, Slider as Sl, SwitchCustom, TooltipCustom } from '@/src/shared' +import { ITypeModels, ParameterPresencePenalty, ParameterTemperature, ParameterTopP } from '@/src/widgets/filters-gpt/lib/constants' +import FiltersMobile from '@/src/widgets/filters-gpt/ui/filters-mobile' +import TooltipModelTypes from '@/src/widgets/filters-gpt/ui/tooltip-model-types' + +import 'intro.js/introjs.css' + +interface IFiltersChatGPTMobile { + open?: boolean + handleOpenFilters?: () => void + handleCloseFilters?: () => void +} + +export interface IFiltersChatGPT extends IFiltersChatGPTMobile { + device: 'mobile' | 'desktop' + typeModel: string + typeModels: ITypeModels[] + temperatureModel: number | number[] + parameterTopP: number | number[] + parameterPresence: number | number[] + isAdditional?: boolean + handleChangeTypeModel: (e: SelectChangeEvent) => void + changeTemperature: (e: Event, current: number | number[]) => void + changeTopP: (e: Event, current: number | number[]) => void + changePresence: (e: Event, current: number | number[]) => void + resetSettings: () => void + changeAdditionalCtx?: () => void +} + +export const PrettoSlider = styled(Slider)({ + width: '90%', + color: '#EFF0F2', + height: 5, + '& .MuiSlider-track': { + border: 'none', + backgroundColor: '#EFF0F', + }, + '.MuiSlider-rail': { + border: 'none', + backgroundColor: '#EFF0F', + }, + '& .MuiSlider-thumb': { + height: 17, + width: 17, + backgroundColor: '#fff', + border: '2px solid #7F7DF3', + '&:focus, &:hover, &.Mui-active, &.Mui-focusVisible': { + boxShadow: 'inherit', + }, + '&:before': { + display: 'none', + }, + }, +}) +export const PrettoSliderDark = styled(Slider)({ + width: '90%', + + height: 5, + '& .MuiSlider-track': { + border: 'none', + backgroundColor: '#40404E', + }, + '.MuiSlider-rail': { + border: 'none', + backgroundColor: '#40404E', + }, + '& .MuiSlider-thumb': { + height: 17, + width: 17, + backgroundColor: '#373737', + border: '2px solid #7F7DF3', + '&:focus, &:hover, &.Mui-active, &.Mui-focusVisible': {}, + '&:before': { + display: 'none', + }, + }, +}) + +export const Filters: React.FC<IFiltersChatGPT> = memo( + ({ + device, + parameterPresence, + parameterTopP, + temperatureModel, + typeModels, + typeModel, + handleChangeTypeModel, + changeTemperature, + changeTopP, + changePresence, + resetSettings, + handleCloseFilters, + open, + isAdditional, + changeAdditionalCtx, + }) => { + const desktop = device === 'desktop' + + const theme = useAppSelector((state) => state.theme.theme) + + const [showConfigure, setShowConfigure] = React.useState(false) + + const contextTutorial = React.useContext(TutorialContext) + + typeModels.find((el) => el.key === typeModel)!.value + + const isAdditionalCtx = useMemo(() => { + const value = typeModels.find((el) => el.key === typeModel)!.value + + return value === 'gpt-3.5-turbo' || value === 'gpt-4' ? true : false + }, [typeModel]) + + React.useEffect(() => { + if (contextTutorial?.step === 3) { + setTimeout(() => setShowConfigure(true), 500) + return + } + + setShowConfigure(false) + }, [contextTutorial?.step]) + return ( + <> + {desktop ? ( + <Stack + className='tutorial-show-setting' + direction='column' + sx={{ + padding: '30px', + height: 'fit-content', + borderRadius: '15px', + backgroundColor: desktop ? (theme === 'light' ? 'white' : '#151518') : theme === 'light' ? 'white' : '#4B4B4B', + }} + > + <Typography className='title-block' sx={{ marginBottom: '15px' }}> + Настройки + </Typography> + <Stack width='100%' margin='0 auto' spacing={2}> + <Typography + variant='body2' + sx={{ + marginTop: 1, + color: '#868686', + lineHeight: '19.6px', + fontSize: '15px', + fontWeight: '600px', + }} + > + Тип модели + </Typography> + <Box width='100%'> + <Select value={typeModel} onChange={handleChangeTypeModel}> + {typeModels.map((model) => { + return ( + <MenuItem key={model.value} value={model.key}> + <TooltipModelTypes + title={model.key} + description={model.description} + warning={model.warning} + advantages={model.advantages || ''} + > + <Typography + sx={{ + fontSize: '18px', + }} + > + {model.key} + </Typography> + </TooltipModelTypes> + </MenuItem> + ) + })} + </Select> + </Box> + {isAdditionalCtx && ( + <Box width='100%' display='flex' alignItems='center' justifyContent='space-between'> + <Typography + sx={{ + color: '#868686', + lineHeight: '19.6px', + fontSize: '14px', + fontWeight: '600px', + }} + > + Увеличенный контекст + </Typography> + <SwitchCustom checked={isAdditional} onChange={() => changeAdditionalCtx!()} /> + </Box> + )} + <TooltipCustom title={ParameterTemperature} placement='left'> + <Sl + title='Температура' + value={temperatureModel} + onChange={(e, current) => changeTemperature(e, current)} + max={1} + min={0} + step={0.1} + aria-label='pretto slider' + /> + </TooltipCustom> + + <Button + startIcon={<SettingsSuggestIcon />} + style={{ marginTop: '15px' }} + variant='contained' + sx={{ + width: '100%', + backgroundColor: '#7F7DF3', + fontSize: '14px', + ':hover': { backgroundColor: '#7F7DF3' }, + }} + onClick={() => setShowConfigure((prevState) => !prevState)} + > + Настройки + </Button> + {showConfigure && ( + <> + <TooltipCustom title={ParameterTopP} placement='left'> + <Sl + title='top_p' + value={parameterTopP} + onChange={(e, current) => changeTopP(e, current)} + max={1} + min={0} + step={0.1} + aria-label='pretto slider' + /> + </TooltipCustom> + <TooltipCustom title={ParameterPresencePenalty} placement='left'> + <Sl + title='Штраф за присутствие' + value={parameterPresence} + onChange={(e, current) => changePresence(e, current)} + max={2} + min={-2} + step={0.1} + aria-label='pretto slider' + /> + </TooltipCustom> + </> + )} + <Typography + variant='body2' + onClick={resetSettings} + sx={{ + color: '#FF4170', + lineHeight: '19.6px', + fontSize: '14px', + fontWeight: '400px', + marginTop: 1, + '&:hover': { + cursor: 'pointer', + }, + }} + > + Сбросить настройки + </Typography> + </Stack> + </Stack> + ) : ( + <FiltersMobile + changeAdditionalCtx={changeAdditionalCtx} + device={device} + changeTemperature={changeTemperature} + changeTopP={changeTopP} + handleChangeTypeModel={handleChangeTypeModel} + parameterPresence={parameterPresence} + temperatureModel={temperatureModel} + changePresence={changePresence} + parameterTopP={parameterTopP} + typeModel={typeModel} + resetSettings={resetSettings} + typeModels={typeModels} + open={open} + handleCloseFilters={handleCloseFilters} + /> + )} + </> + ) + } +) + +Filters.displayName = 'Filters' @@ -0,0 +1 @@ +export { Filters } from './ui/filters' @@ -0,0 +1,6 @@ +export enum GeneratingModel { + 'stable-diffusion-v1-6', + 'stable-diffusion-xl-1024-v1-0', + 'sd3', + 'sd3-turbo', +} @@ -0,0 +1,45 @@ +import { IProps } from '@/src/shared/lib/types/entities' +import { Styles } from '@/src/widgets/filters-sd/ui/filters' + +export type TImageFormat = '512x512' | '640x384' | '384x640' | '768x512' | '512x768' | '1024x1024' +export type TClipGuidancePresets = 'FAST_BLUE' | 'FAST_GREEN' | 'Без фильтров' | 'SIMPLE' | 'SLOW' | 'SLOWER' | 'SLOWEST' +export type TSamplerTypes = + | 'DDIM' + | 'DDPM' + | 'K_DPMPP_2M' + | 'K_DPMPP_2S_ANCESTRAL' + | 'K_DPM_2' + | 'K_DPM_2_ANCESTRAL' + | 'K_EULER' + | 'K_EULER_ANCESTRAL' + | 'K_HEUN' + | 'K_LMS' + +export type TGeneratingModel = 'stable-diffusion-v1-6' | 'stable-diffusion-xl-1024-v1-0' | 'sd3' | 'sd3-turbo' + +export interface ISDFilters extends IProps { + formatImage: TImageFormat + stepsImage: number | string | Array<number | string> + numberImages: number | number[] | undefined + sampleType: TSamplerTypes + samplerTypes: TSamplerTypes[] + cfgScale: number | string | Array<number | string> + clipGuidancePreset: TClipGuidancePresets + clipGuidancePresets: TClipGuidancePresets[] + formatImages: TImageFormat[] + generatingModel: TGeneratingModel + isTranslate: boolean + style: Styles + + changeFormatImage: (e: TImageFormat) => void + changeClipGuidancePreset: (e: TClipGuidancePresets) => void + changeSampleType: (e: TSamplerTypes) => void + changeStepsImage: (e: Event, current: number | number[]) => void + changeNumberImage: (e: Event, current: number | number[]) => void + changeCfgScale: (e: Event, current: number | number[]) => void + changeGeneratingModel: (e: TGeneratingModel) => void + changeIsTranslate: () => void + changeStyle: (e: Styles) => void + + resetSettings: () => void +} @@ -0,0 +1,202 @@ +import React, { useState } from 'react' +import SettingsSuggestIcon from '@mui/icons-material/SettingsSuggest' +import { Box, Button, Drawer, Stack, Typography } from '@mui/material' + +import { useAppSelector } from '@/src/main/store/store' +import { Select, SwitchCustom } from '@/src/shared' +import { Slider } from '@/src/shared' +import { SelectUI } from '@/src/shared/ui/select' +import { PrettoSlider, PrettoSliderDark } from '@/src/widgets/filters-gpt/ui/filters' +import { GeneratingModel } from '@/src/widgets/filters-sd/lib/constants' +import { ISDFilters, TClipGuidancePresets, TGeneratingModel, TImageFormat, TSamplerTypes } from '@/src/widgets/filters-sd/lib/types' +import { Styles,styles } from '@/src/widgets/filters-sd/ui/filters' + +interface ISDFiltersMobile extends ISDFilters { + isOpenDrawer: boolean + onCloseDrawer: () => void +} + +export const FiltersMobile: React.FC<ISDFiltersMobile> = ({ + stepsImage, + numberImages, + formatImage, + cfgScale, + clipGuidancePreset, + sampleType, + formatImages, + changeFormatImage, + changeClipGuidancePreset, + clipGuidancePresets, + samplerTypes, + changeSampleType, + changeStepsImage, + changeNumberImage, + changeCfgScale, + resetSettings, + onCloseDrawer, + isOpenDrawer, + isTranslate, + changeIsTranslate, + style, + changeStyle, + generatingModel, + changeGeneratingModel, +}) => { + const [showConfigure, setShowConfigure] = useState(false) + + const theme = useAppSelector((state) => state.theme.theme) + + return ( + <Drawer + anchor={'bottom'} + open={isOpenDrawer} + onClose={onCloseDrawer} + sx={{ + width: '100%', + borderRadius: 10, + display: 'flex', + flexDirection: 'column', + justifyContent: 'center', + }} + PaperProps={{ + sx: { + borderRadius: '15px 15px 0px 0px', + padding: '15px 8px', + backgroundColor: theme === 'light' ? 'white' : '#373737', + }, + }} + > + <Stack direction='column' sx={{ width: '100%', marginLeft: 3, marginBottom: 1.5 }} spacing={2}> + <Box width='90%'> + <Select + size={'small'} + title={'Размер изображения'} + value={formatImage} + onChange={(e) => changeFormatImage(e.target.value as TImageFormat)} + list={formatImages} + /> + </Box> + + <Box width='90%'> + <SelectUI + size={'small'} + title={'Стиль'} + value={style} + onChange={(e) => changeStyle(e.target.value as Styles)} + list={Object.values(styles)} + /> + </Box> + + <Box width='90%'> + <SelectUI + size='small' + title={'Генеративная модель'} + value={generatingModel} + onChange={(e) => changeGeneratingModel(e.target.value as TGeneratingModel)} + list={Object.values(GeneratingModel).filter((v) => isNaN(Number(v)))} + /> + </Box> + + <Box width='88%'> + <Slider + title={'Количество изображений'} + value={numberImages} + onChange={(e, cur) => changeNumberImage(e, cur)} + max={10} + min={1} + step={1} + /> + </Box> + + <Button + startIcon={<SettingsSuggestIcon />} + style={{ marginTop: '10px' }} + variant='contained' + sx={{ + width: '90%', + backgroundColor: '#7F7DF3', + fontSize: '14px', + ':hover': { backgroundColor: '#7F7DF3' }, + }} + onClick={() => setShowConfigure((prevState) => !prevState)} + > + {showConfigure ? 'Скрыть ' : 'Показать '} + расширенные настройки + </Button> + {showConfigure && ( + <> + <Box width='90%'> + <Box display='flex' alignItems='center' justifyContent='space-between'> + <Typography + sx={{ + fontSize: '14px', + }} + > + Переводить запрос + </Typography> + <SwitchCustom checked={isTranslate} onChange={changeIsTranslate} /> + </Box> + </Box> + <Box width='90%'> + <Select + size={'small'} + title={'clip_guidance_preset'} + value={clipGuidancePreset} + onChange={(e) => changeClipGuidancePreset(e.target.value as TClipGuidancePresets)} + list={clipGuidancePresets} + /> + </Box> + + <Box width='90%'> + <Select + size={'small'} + title={'sampler'} + value={sampleType} + onChange={(e) => changeSampleType(e.target.value as TSamplerTypes)} + list={samplerTypes} + /> + </Box> + <Box width='88%'> + <Slider + title={'Шаги для обработки'} + value={typeof stepsImage === 'number' ? stepsImage : 30} + onChange={(e, cur) => changeStepsImage(e, cur)} + max={150} + min={10} + step={1} + /> + </Box> + + <Box width='88%'> + <Slider + title={'CFG scale'} + value={typeof cfgScale === 'number' ? cfgScale : 7} + onChange={(e, cur) => changeCfgScale(e, cur)} + max={20} + min={1} + step={1} + /> + </Box> + </> + )} + + <Typography + variant='body2' + onClick={resetSettings} + sx={{ + color: '#FF4170', + lineHeight: '19.6px', + fontSize: '14px', + fontWeight: '400px', + marginTop: 0.2, + '&:hover': { + cursor: 'pointer', + }, + }} + > + Сбросить настройки + </Typography> + </Stack> + </Drawer> + ) +} @@ -0,0 +1,169 @@ +import React from 'react' +import { Box, Stack, Typography } from '@mui/material' + +import { Slider, SwitchCustom } from '@/src/shared' +import { SelectUI } from '@/src/shared/ui/select' +import { GeneratingModel } from '@/src/widgets/filters-sd/lib/constants' +import { ISDFilters, TClipGuidancePresets, TGeneratingModel, TImageFormat, TSamplerTypes } from '@/src/widgets/filters-sd/lib/types' + +export type Styles = + | null + | '3d-model' + | 'analog-film' + | 'anime' + | 'cinematic' + | 'comic-book' + | 'digital-art' + | 'enhance' + | 'fantasy-art' + | 'isometric' + | 'line-art' + | 'low-poly' + | 'modeling-compound' + | 'neon-punk' + | 'origami' + | 'photographic' + | 'pixel-art' + | 'tile-texture' + +export const styles: Record<string, Styles> = { + '3D-модель': '3d-model', + Фильм: 'analog-film', + Аниме: 'anime', + cinematic: 'cinematic', + 'comic-book': 'comic-book', + 'digital-art': 'digital-art', + enhance: 'enhance', + 'Фентези арт': 'fantasy-art', + isometric: 'isometric', + 'line-art': 'line-art', + 'low-poly': 'low-poly', + 'modeling-compound': 'modeling-compound', + 'neon-punk': 'neon-punk', + origami: 'origami', + photographic: 'photographic', + 'pixel-art': 'pixel-art', + 'tile-texture': 'tile-texture', + 'Без стилей': null, +} + +export const FiltersSd: React.FC<ISDFilters> = ({ + stepsImage, + numberImages, + formatImage, + cfgScale, + clipGuidancePreset, + sampleType, + formatImages, + changeFormatImage, + changeClipGuidancePreset, + clipGuidancePresets, + samplerTypes, + changeSampleType, + changeStepsImage, + changeNumberImage, + changeCfgScale, + resetSettings, + generatingModel, + changeGeneratingModel, + isTranslate, + changeIsTranslate, + style, + changeStyle, +}) => { + return ( + <Stack direction='column' sx={{ width: '100%' }}> + <SelectUI + title={'Размер изображения'} + value={formatImage} + onChange={(e) => changeFormatImage(e.target.value as TImageFormat)} + list={formatImages} + /> + + <Box sx={{ marginTop: 1 }}> + <SelectUI title={'Стиль'} value={style} onChange={(e) => changeStyle(e.target.value as Styles)} list={Object.values(styles)} /> + </Box> + + <Slider + title={'Количество изображений'} + value={numberImages} + onChange={(e, cur) => changeNumberImage(e, cur)} + max={10} + min={1} + step={1} + /> + <Box sx={{ marginTop: 1 }}> + <SelectUI + title={'clip_guidance_preset'} + value={clipGuidancePreset} + onChange={(e) => changeClipGuidancePreset(e.target.value as TClipGuidancePresets)} + list={clipGuidancePresets} + /> + </Box> + + <Box sx={{ marginTop: 1 }}> + <SelectUI + title={'Генеративная модель'} + value={generatingModel} + onChange={(e) => changeGeneratingModel(e.target.value as TGeneratingModel)} + list={Object.values(GeneratingModel).filter((v) => isNaN(Number(v)))} + /> + </Box> + + <Box sx={{ marginTop: 1 }}> + <SelectUI + title={'sampler'} + value={sampleType} + onChange={(e) => changeSampleType(e.target.value as TSamplerTypes)} + list={samplerTypes} + /> + </Box> + + <Slider + title={'Шаги для обработки'} + value={typeof stepsImage === 'number' ? stepsImage : 30} + onChange={(e, cur) => changeStepsImage(e, cur)} + max={50} + min={10} + step={1} + /> + + <Slider + title={'CFG scale'} + value={typeof cfgScale === 'number' ? cfgScale : 7} + onChange={(e, cur) => changeCfgScale(e, cur)} + max={20} + min={1} + step={1} + /> + + <Box sx={{ padding: '0px 5px' }} display='flex' alignItems='center' justifyContent='space-between'> + <Typography + sx={{ + fontSize: '14px', + }} + > + Переводить запрос + </Typography> + <SwitchCustom checked={isTranslate} onChange={changeIsTranslate} /> + </Box> + + <Typography + variant='body2' + onClick={resetSettings} + sx={{ + color: '#FF4170', + lineHeight: '19.6px', + fontSize: '14px', + fontWeight: '400px', + marginTop: 1, + '&:hover': { + cursor: 'pointer', + }, + }} + > + Сбросить настройки + </Typography> + </Stack> + ) +} @@ -0,0 +1,2 @@ +export { FiltersSd } from './ui/filters' +export { FiltersMobile } from './ui/filters-mobile' @@ -1,7 +0,0 @@ -export interface Setting { - strength: number - upscale: number - negative_prompt: string - num_inference_steps: number - guidance_scale: number -} @@ -58,8 +58,7 @@ export function BotMessage(props: any) { : {} return ( - // <Slide direction='right' in={props.isNewMessage} mountOnEnter unmountOnExit> - <Box> + <Slide direction='right' in={props.isNewMessage} mountOnEnter unmountOnExit> <Box sx={{ display: 'flex', @@ -253,6 +252,6 @@ export function BotMessage(props: any) { </Box> </Box> </Box> - </Box> + </Slide> ) } @@ -67,8 +67,7 @@ export const UserMessage = React.memo(function UserMessage(props: IMessagesList) {props.message.file && <FullScreenModal modal={modal} setModal={setModal} image={props.message.file.toString()} />} <span className='tutorial-message'> {!props.message.from_model ? ( - // <Slide className='tutorial-message-me' direction='left' in={props.isNewMessage} mountOnEnter unmountOnExit> - <Box> + <Slide className='tutorial-message-me' direction='left' in={props.isNewMessage} mountOnEnter unmountOnExit> <Box className='smallScroll' sx={{ @@ -493,7 +492,7 @@ export const UserMessage = React.memo(function UserMessage(props: IMessagesList) )} </Box> </Box> - </Box> + </Slide> ) : ( <BotMessage modelTitle={props.modelTitle} @@ -1,9 +1,8 @@ import React, { memo, useEffect } from 'react' -import { Box, CircularProgress } from '@mui/material' +import { Box } from '@mui/material' import { useSession } from 'next-auth/react' import { Message } from '@/src/shared/lib/types/model' -import { ArrowDownScroll } from '@/src/shared/ui/icon-components/scroll-down-arrow' import { IsNextDay } from '@/src/widgets/messages/is-next-day' import { PreviewView } from '@/src/widgets/messages/message-components/preview-view' @@ -18,63 +17,32 @@ interface IMessagesList { modelTitle: string | undefined setResendValue: (value: string) => void onLoadImage?: (event: React.ChangeEvent<HTMLInputElement> | null, file?: File) => void - loading: boolean } export const ChatMessagesList: React.FC<IMessagesList> = memo( - ({ messageResponse, onLoadImage, setResendValue, modelTitle, device, modelType, mode, getMessagesPagination, deleteMessage, loading }) => { + ({ messageResponse, onLoadImage, setResendValue, modelTitle, device, modelType, mode, getMessagesPagination, deleteMessage }) => { const paginationScroll = React.useRef<any>() - const [isPaginating, setIsPaginating] = React.useState(false) - const [chatScrollHeight, setChatScrollHeight] = React.useState(0) - const [scrollBottom, setScrollBottom] = React.useState(0) - const desktop = device === 'desktop' const { status } = useSession() const [isNewMessage, setIsNewMessage] = React.useState(false) React.useEffect(() => { - const block = paginationScroll.current - - if (messageResponse != undefined && !isPaginating) { - setChatScrollHeight(paginationScroll.current.scrollHeight) + if (messageResponse != undefined) { + const block = paginationScroll.current const time = setTimeout(() => { if (block) { //@ts-ignore - block.scrollTo({ - top: block.scrollHeight, - behavior: 'smooth', // добавляем плавную прокрутку - }) + block.scrollTop = block.scrollHeight } }, 250) return () => clearTimeout(time) - } else if (messageResponse != undefined && isPaginating) { - if (block) { - //@ts-ignore - block.scrollTop = block.scrollHeight - chatScrollHeight - setChatScrollHeight(paginationScroll.current.scrollHeight) - } } - setIsPaginating(false) }, [messageResponse]) useEffect(() => { setIsNewMessage(true) }, [messageResponse]) - const handleScroll = () => { - setScrollBottom(paginationScroll.current?.scrollHeight - paginationScroll.current?.scrollTop - paginationScroll.current?.clientHeight) - - if (paginationScroll.current && messageResponse?.length !== 0) { - const { scrollTop, scrollHeight, clientHeight } = paginationScroll.current - if (scrollTop === 0) { - if (getMessagesPagination) { - setIsPaginating(true) - getMessagesPagination() - } - } - } - } - return ( <Box sx={{ @@ -87,56 +55,7 @@ export const ChatMessagesList: React.FC<IMessagesList> = memo( paddingLeft: desktop ? 1 : 0, }} ref={paginationScroll} - onScroll={handleScroll} > - {scrollBottom > 500 && ( - <Box - sx={{ - position: 'absolute', - left: 0, - right: 0, - width: 'fit-content', - cursor: 'pointer', - margin: '0 auto', - bottom: '100px', - zIndex: 10, - }} - onClick={() => { - //@ts-ignore - const block = paginationScroll.current - - block.scrollTo({ - top: block.scrollHeight, - behavior: 'smooth', // добавляем плавную прокрутку - }) - }} - > - <ArrowDownScroll /> - </Box> - )} - - {loading && ( - <Box - sx={{ - position: 'absolute', - left: 0, - right: 0, - width: 'fit-content', - margin: '0 auto', - top: '10px', - zIndex: 10, - }} - > - <CircularProgress - size={18} - thickness={3} - sx={{ - color: '#7F7DF3', - }} - /> - </Box> - )} - {messageResponse?.length === 0 && status === 'authenticated' ? ( <>{desktop && modelType !== 'deepl' && <PreviewView setValue={setResendValue} />}</> ) : ( @@ -1,17 +0,0 @@ -import axios from 'axios' - -import { API_URL } from '@/src/shared/lib/constants' - -import { NavigationSearchModelLink } from './types' - -export const getModelChatLinks = async (token: string) => { - return await axios.get<NavigationSearchModelLink[]>(API_URL + '/api/chats/links', { - headers: { Authorization: `Bearer ${token}` }, - }) -} - -export const getModelMediaLinks = async (token: string) => { - return await axios.get<NavigationSearchModelLink[]>(API_URL + '/api/media/images/links', { - headers: { Authorization: `Bearer ${token}` }, - }) -} @@ -1,12 +0,0 @@ -export interface NavigationSearchModelLink { - title: string - slug: string -} - -export interface NavigationSearchLink { - label: string - url: string - category: string - external?: boolean - uid?: string -} @@ -1 +0,0 @@ -export * from './static-links' @@ -1,35 +0,0 @@ -import { NavigationSearchLink } from '../api/types'; - -export const staticLinks: NavigationSearchLink[] = [ - { - label: 'Дашборд', - url: '/', - category: 'Навигация' - }, - { - label: 'Оплата', - url: '/account?scope=subscribe', - category: 'Навигация', - }, - { - label: 'Настройки', - url: '/account?scope=setting', - category: 'Навигация', - }, - { - label: 'Настройки корп. аккаунта', - url: '/account?scope=business', - category: 'Навигация', - }, - { - label: 'API-ключи', - url: '/api-keys', - category: 'Навигация', - }, - { - label: 'Реквизиты', - url: 'https://air.fail/requisites', - category: 'Навигация', - external: true, - }, -] @@ -1,2 +0,0 @@ -export * from './use-chat-links' -export * from './use-model' \ No newline at end of file @@ -1,35 +0,0 @@ -import { useEffect, useId, useMemo, useState } from 'react' -import { uniqueId } from 'lodash' -import { useSession } from 'next-auth/react' - -import { getModelChatLinks, getModelMediaLinks } from '../api/api-get-model-links' -import { NavigationSearchLink, NavigationSearchModelLink } from '../api/types' - -export const useNavigationSearchChatLinks = () => { - const [chatLinks, setChatLinks] = useState<NavigationSearchModelLink[]>([]) - - const { data } = useSession() - - const fetchChatLinks = async () => { - if(!data) return - setChatLinks((await getModelChatLinks(data.access)).data) - } - - const visibleChatLinks = useMemo<NavigationSearchLink[]>( - () => - chatLinks.map((el) => ({ - uid: uniqueId(), - label: el.title, - url: 'chat-bot/' + el.slug, - category: 'Чат-боты', - })), - [chatLinks] - ) - - return { - chatLinks, - setChatLinks, - visibleChatLinks, - fetchChatLinks, - } -} @@ -1,35 +0,0 @@ -import { useEffect, useMemo, useState } from 'react' -import { uniqueId } from 'lodash' -import { useSession } from 'next-auth/react' - -import { getModelMediaLinks } from '../api/api-get-model-links' -import { NavigationSearchLink, NavigationSearchModelLink } from '../api/types' - -export const useNavigationSearchMediaLinks = () => { - const [mediaLinks, setMediaLinks] = useState<NavigationSearchModelLink[]>([]) - - const { data } = useSession() - - const fetchMediaLinks = async () => { - if (!data) return - setMediaLinks((await getModelMediaLinks(data.access)).data) - } - - const visibleMediaLinks = useMemo<NavigationSearchLink[]>( - () => - mediaLinks.map((el) => ({ - uid: uniqueId(), - label: el.title, - url: 'images/' + el.slug, - category: 'Изображения', - })), - [mediaLinks] - ) - - return { - mediaLinks, - setMediaLinks, - visibleMediaLinks, - fetchMediaLinks, - } -} @@ -1,52 +0,0 @@ -import { useCallback, useEffect, useRef, useState } from 'react' - -import { NavigationSearchLink } from '../api/types' - -export const useNavigationSearchModel = (links: NavigationSearchLink[]) => { - // state - const [search, setSearch] = useState<string>('') - - const [searchOpen, setSearchOpen] = useState(false) - - const searchRef = useRef(null) - - // hooks - const ctrlF = useCallback((e: any) => { - if (!searchRef.current) { - return - } - - if ((e.key === 'f' || e.key === 'F') && (e.ctrlKey || e.metaKey)) { - e.preventDefault() - ;(searchRef.current as HTMLInputElement).focus() - setSearchOpen(true) - } - }, []) - - const filter = () => { - if (!search) { - return links - } - - return links.filter((el) => el.label.toLowerCase().includes(search.toLowerCase())) - } - - // state hooks - useEffect(() => { - document.addEventListener('keydown', ctrlF, false) - return () => { - document.removeEventListener('keydown', ctrlF, false) - } - }, [ctrlF]) - - return { - // S - search, - searchOpen, - searchRef, - // F - setSearch, - setSearchOpen, - filter, - } -} @@ -1 +0,0 @@ -export { Search as NavigationSearch } from './search' @@ -1,9 +0,0 @@ -.ctrl { - padding: 2px; - text-align: center; - width: 55px; - height: 25px; - border-radius: 7px; - border: var(--new-ui-ctrl-f-button-border); - background: var(--new-ui-ctrl-f-button-bg); -} @@ -1,28 +0,0 @@ -import React from 'react' -import { Box, Typography } from '@mui/material' - -import styles from './key-for-search.module.scss' - -interface KeyForSearchProps { - userAgent: string | null -} - -export const KeyForSearch = ({ userAgent }: KeyForSearchProps) => { - if (userAgent === null) { - return null - } - - const checkType = () => { - if (userAgent.includes('Windows')) { - return 'Ctrl + F' - } else { - return '⌥+F' - } - } - - return ( - <Box className={styles.ctrl}> - <Typography sx={{ fontSize: '13px', color: '#A4AAB5', fontWeight: 500 }}>{checkType()}</Typography> - </Box> - ) -} @@ -1,153 +0,0 @@ -import React, { useEffect, useMemo } from 'react' -import { Autocomplete, Box, Stack, TextField, Typography } from '@mui/material' -import Image from 'next/image' -import { useRouter } from 'next/router' - -import { useAppSelector } from '@/src/main/store/store' -import { InputStyleDark, InputStyleLight, useConcat } from '@/src/shared' - -import { NavigationSearchLink } from '../api/types' -import { staticLinks } from '../config' -import { useNavigationSearchChatLinks, useNavigationSearchModel } from '../model' -import { useNavigationSearchMediaLinks } from '../model/use-media-links' - -import { KeyForSearch } from './key-for-search' - -interface SearchProps { - device: string -} - -export const Search = ({ device }: SearchProps) => { - const desktop = device === 'desktop' - - const { theme } = useAppSelector((state) => state.theme) - - const { push } = useRouter() - - const { fetchChatLinks, visibleChatLinks } = useNavigationSearchChatLinks() - - const { fetchMediaLinks, visibleMediaLinks } = useNavigationSearchMediaLinks() - - const links = useConcat<NavigationSearchLink[]>( - visibleChatLinks, - visibleMediaLinks, - staticLinks - ) - - const { search, setSearch, searchOpen, setSearchOpen, searchRef, filter } = - useNavigationSearchModel(links) - - useEffect(() => { - fetchChatLinks() - fetchMediaLinks() - }, []) - - return ( - <> - <Stack> - <Autocomplete - disablePortal - freeSolo - sx={{ width: '457px' }} - noOptionsText={'Не найдено'} - options={links} - filterOptions={filter} - groupBy={(link) => link.category} - renderGroup={(params) => ( - <li key={params.key}> - <div> - <Typography - sx={{ - fontSize: '16px', - fontWeight: 600, - color: '#A4AAB5', - marginLeft: '10px', - }} - > - {params.group} - </Typography> - </div> - <ul>{params.children}</ul> - </li> - )} - open={searchOpen} - onOpen={() => setSearchOpen(true)} - onClose={() => setSearchOpen(false)} - getOptionLabel={(label: any) => (label as NavigationSearchLink).label} - renderOption={(option, state) => ( - <Typography - {...option} - key={state.uid ?? state.label} - sx={{ - display: 'flex', - alignItems: 'center', - fontSize: '18px', - fontWeight: 500, - }} - > - <span style={{ marginLeft: '20px' }}>{state.label}</span> - </Typography> - )} - onChange={async (event, value: any) => { - if (!value) { - return - } - if (value.external) { - return window.open(value.url, '_blank') - } - push('/' + value.url) - }} - renderInput={(params) => ( - <TextField - inputRef={searchRef} - {...params} - fullWidth - sx={ - theme === 'light' - ? { - ...InputStyleLight, - '& input': { - fontSize: '18px !important', - fontWeight: 500, - }, - } - : { - ...InputStyleDark, - } - } - className='bg-color-block' - size='small' - value={search} - onChange={(e: any) => setSearch(e.target.value)} - placeholder='Поиск по платформе' - InputProps={{ - ...params.InputProps, - startAdornment: ( - <Image - src={'/search.svg'} - width={15} - height={15} - alt='Поиск' - style={{ - marginLeft: '8px', - marginRight: '4px', - marginTop: '2px', - transform: 'scaleX(-1)', - }} - /> - ), - endAdornment: ( - <KeyForSearch - userAgent={ - desktop ? window.navigator.userAgent : null - } - /> - ), - }} - /> - )} - /> - </Stack> - </> - ) -} @@ -1,2 +0,0 @@ -export * from './config' -export * from './ui' \ No newline at end of file @@ -93,7 +93,7 @@ export const Referral = ({ device }: IProps) => { > {device === 'mobile' ? url.slice(0, 20) + '...' : url.slice(0, 40) + '...'} <Image - src={'/svg/copywriting.svg'} + src={'/svg/copy.svg'} alt={''} style={{ width: '20px', height: '20px', cursor: 'pointer' }} width={100} @@ -0,0 +1,104 @@ +import React, { memo } from 'react' +import { Box, Typography } from '@mui/material' +import Image from 'next/image' + +import { useAppSelector } from '@/src/main/store/store' +import { useAutoScroll } from '@/src/shared/lib/hooks' +import { IResponseSD } from '@/src/shared/lib/types/types-sd' + +interface ISDMessagesList { + messages: IResponseSD[] + device: 'mobile' | 'desktop' +} +export const SdMessagesList: React.FC<ISDMessagesList> = memo(({ messages, device }) => { + const theme = useAppSelector((state) => state.theme.theme) + + const refScroll = useAutoScroll(messages) + + const desktop = device === 'desktop' + + return ( + <Box + ref={refScroll} + sx={{ + overflowY: 'scroll', + backgroundColor: desktop ? (theme === 'light' ? '#F8F8F8' : '#4B4B4B') : theme === 'light' ? 'white' : '#4B4B4B', + maxWidth: '100%', + padding: 2, + borderRadius: 5, + }} + > + {messages?.map((img) => { + return ( + <Box key={img.created_at} display={'flex'} sx={{ margin: desktop ? 1 : 0, marginTop: 1.5 }}> + {desktop && <Image height={29} width={29} src='/svg/chatgpt/avatar.svg' alt={''} />} + <Box + display='flex' + flexDirection='column' + alignItems='center' + sx={{ + backgroundColor: theme === 'light' ? 'white' : '#3D3D3D', + marginLeft: desktop ? 2 : 0, + borderRadius: '13px', + padding: 2.5, + }} + > + <Box sx={{ position: 'relative' }}> + <a + style={{ + position: 'absolute', + right: 22, + top: 20, + backgroundColor: theme === 'light' ? '#FFFFFF' : '#373737', + padding: 0, + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + width: '45px', + height: '45px', + borderRadius: '11px', + }} + href={img.link} + download + > + <Image width={20} height={25} src={'svg/dalle/download.svg'} alt={'Скачать'} /> + </a> + <Image style={{ borderRadius: 15 }} width={270} height={320} key={img.link} src={img.link} alt={'np'} /> + </Box> + <Box display='flex' justifyContent='space-between' width='100%'> + <Typography + sx={{ + fontSize: 16, + marginTop: 1, + color: theme === 'light' ? 'black' : '#FFFFFF', + }} + > + <span + style={{ + fontWeight: '600', + fontSize: 16, + }} + > + Запрос:{' '} + </span> + {img.question} + </Typography> + <Typography + sx={{ + fontSize: 15, + marginTop: 1, + color: theme === 'light' ? '#868686' : '#A6A5A5', + }} + > + {img.created_at.slice(10, 16).replace('T', ' ')} + </Typography> + </Box> + </Box> + </Box> + ) + })} + </Box> + ) +}) + +SdMessagesList.displayName = 'SdMessagesList' @@ -0,0 +1 @@ +export { SdMessagesList } from './ui/sd-messages-list' @@ -34,8 +34,8 @@ export const menuListTop = [ export const menuListMiddle = [ { title: 'Чат-боты', link: '/chat-bot', icon: '/svg/side-menu/chat', activeList: ['chat-bot'] }, - { title: 'Изображения', link: '/images', icon: '/svg/side-menu/image', activeList: ['images'] }, - { title: 'Копирайтинг', link: '/copywriting/my', icon: '/svg/side-menu/copyrating', activeList: ['copywriting'] }, + { title: 'Изображения', link: '/images', icon: '/svg/side-menu/image', activeList: ['dalle', 'kandinksy', 'stable-diffusion', 'midjourney'] }, + //{ title: 'Копирайтинг', link: '/copy', icon: '/svg/side-menu/copyrating', activeList: ['/create'] }, // { title: 'Видео', link: '/video', icon: '/svg/side-menu/video', activeList: [] }, // { title: 'Аудио', link: '/audio', icon: '/svg/side-menu/audio', activeList: [] }, // { title: 'Код', link: '/code', icon: '/svg/side-menu/code', activeList: [] }, @@ -4,4 +4,4 @@ export async function register() { if (process.env.NEXT_RUNTIME === 'nodejs') { await import('../sentry.server.config') } -} +} \ No newline at end of file @@ -26,10 +26,4 @@ NEXT_PUBLIC_DJANGO_VK_APP_CLIENT_ID=seSpVo2gyb085UwxM9mnVuOyPvCcTuVC1BRQoEpx NEXT_PUBLIC_DJANGO_VK_APP_CLIENT_SECRET=YWv1YXdE69FKN5NZpf583qvU0mq7wbsdrLShBLxn2FsQ7miJxsHlAHwyT9ZD76LzqVcEVctkhWdB54d56FU7Zz3QtBAFP3XnQP2HaVK7e8paxGHfzFCNgyGnavZAXI9p NEXT_PUBLIC_SESSION_TIME=1800 -SESSION_TIME=1800 - -NEXT_PUBLIC_SENTRY_DSN=https://8ba86ce968074387878775e88a223c0e@sentry.syntex.digital/4 -NEXT_PUBLIC_SENTRY_ORGANIZATION=Syntex -NEXT_PUBLIC_SENTRY_DOMAIN=https://sentry.syntex.digital - -NEXT_PUBLIC_WS_API_URL=ws://devapi.air.fail:8000/rtc +SESSION_TIME=1800 \ No newline at end of file @@ -1,30 +1,30 @@ { - "plugins": ["prettier", "simple-import-sort"], - "extends": ["next/core-web-vitals"], - "rules": { - "no-console": "warn", - "quotes": ["warn", "single"], - "indent": "off", - "jsx-quotes": ["warn", "prefer-single"], - "simple-import-sort/imports": [ - "warn", - { - "groups": [ - // Packages `react` related packages come first. - ["^react", "^@?\\w"], - // Internal packages. - ["^(@|components)(/.*|$)"], - // Side effect imports. - ["^\\u0000"], - // Parent imports. Put `..` last. - ["^\\.\\.(?!/?$)", "^\\.\\./?$"], - // Other relative imports. Put same-folder imports and `.` last. - ["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"], - // Style imports. - ["^.+\\.?(css)$"] - ] - } - ], - "simple-import-sort/exports": "warn" - } + "plugins": [ + "prettier", + "simple-import-sort" + ], + "extends": ["next/core-web-vitals"], + "rules": { + "no-console": "warn", + "quotes": ["warn", "single"], + "indent": "off", + "jsx-quotes": [ "warn", "prefer-single"], + "simple-import-sort/imports": ["error",{ + "groups": [ + // Packages `react` related packages come first. + ["^react", "^@?\\w"], + // Internal packages. + ["^(@|components)(/.*|$)"], + // Side effect imports. + ["^\\u0000"], + // Parent imports. Put `..` last. + ["^\\.\\.(?!/?$)", "^\\.\\./?$"], + // Other relative imports. Put same-folder imports and `.` last. + ["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"], + // Style imports. + ["^.+\\.?(css)$"] + ] + }], + "simple-import-sort/exports": "error" + } } @@ -3,7 +3,7 @@ stages: - Deploy default: - image: docker:cli + image: docker:rc-cli before_script: - echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" $CI_REGISTRY --password-stdin @@ -5,7 +5,7 @@ "trailingComma": "es5", "jsxBracketSameLine": false, "semi": false, - "printWidth": 100, + "printWidth": 150, "jsxSingleQuote": true } @@ -1,26 +1,17 @@ services: - frontend: - image: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA - build: + app: + image: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA + build: context: . dockerfile: Dockerfile - container_name: frontend - restart: unless-stopped - networks: - - infrastructure - - ui - expose: - - "3000" - labels: - - "traefik.enable=true" - - "traefik.docker.network=infrastructure" - - "traefik.http.routers.frontend.rule=Host(`$UI_DOMAIN`)" - - "traefik.http.routers.frontend.entrypoints=web" - env_file: - - .env.production + container_name: frontend + restart: unless-stopped + ports: + - '3000:3000' + env_file: + - .env.production networks: - infrastructure: + default: + name: 'air' external: true - ui: - name: ui \ No newline at end of file @@ -14,7 +14,6 @@ "@emotion/react": "^11.11.0", "@emotion/styled": "^11.11.0", "@fontsource/roboto": "^4.5.8", - "@lottiefiles/dotlottie-react": "^0.12.0", "@mui/icons-material": "^5.11.11", "@mui/material": "^5.11.12", "@mui/styled-engine-sc": "^5.11.11", @@ -37,8 +36,6 @@ "cross-env": "^7.0.3", "dayjs": "^1.11.8", "draft-js": "^0.11.7", - "draft-js-import-html": "^1.4.1", - "draftjs-to-html": "^0.9.1", "eslint": "^8.7.0", "eslint-config-next": "13.2.4", "eslint-plugin-prettier": "^4.2.1", @@ -54,7 +51,6 @@ "prettier": "^2.8.8", "react": "18.2.0", "react-chartjs-2": "^5.2.0", - "react-color": "^2.19.3", "react-cookie": "^4.1.1", "react-dom": "18.2.0", "react-draft-wysiwyg": "^1.15.0", @@ -69,12 +65,9 @@ "typescript": "5.1.3" }, "devDependencies": { - "@types/draftjs-to-html": "^0.8.4", "@types/intro.js": "^5.1.1", "@types/lodash": "^4.14.195", - "@types/react-color": "^3.0.13", "@types/react-draft-wysiwyg": "^1.13.8", - "@types/react-lottie": "^1.2.10", "@types/react-syntax-highlighter": "^15.5.7", "eslint-config-prettier": "^8.8.0", "lint-staged": "^13.2.2", @@ -377,10 +370,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz", - "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", - "license": "MIT", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.4.tgz", + "integrity": "sha512-2Yv65nlWnWlSpe3fXEyX5i7fx5kIKo4Qbcj+hMO0odwaneFjfXw5fdum+4yL20O0QiaHpia0cYQ9xpNMqrBwHg==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -440,16 +432,15 @@ "integrity": "sha512-bhR5k5W+8GLzysjk8zTMVygQZsgvf7W1F0IlL4ZQ5ugjo5rCyiwGM5d8DYriXspytfu98tv59niang3/T+FoDw==" }, "node_modules/@emotion/babel-plugin": { - "version": "11.13.5", - "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.13.5.tgz", - "integrity": "sha512-pxHCpT2ex+0q+HH91/zsdHkw/lXd468DIN2zvfvLtPKLLMo6gQj7oLObq8PhkrxOZb/gGCq03S3Z7PDhS8pduQ==", - "license": "MIT", + "version": "11.11.0", + "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz", + "integrity": "sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==", "dependencies": { "@babel/helper-module-imports": "^7.16.7", "@babel/runtime": "^7.18.3", - "@emotion/hash": "^0.9.2", - "@emotion/memoize": "^0.9.0", - "@emotion/serialize": "^1.3.3", + "@emotion/hash": "^0.9.1", + "@emotion/memoize": "^0.8.1", + "@emotion/serialize": "^1.1.2", "babel-plugin-macros": "^3.1.0", "convert-source-map": "^1.5.0", "escape-string-regexp": "^4.0.0", @@ -461,56 +452,50 @@ "node_modules/@emotion/babel-plugin/node_modules/convert-source-map": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "license": "MIT" + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" }, "node_modules/@emotion/cache": { - "version": "11.14.0", - "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.14.0.tgz", - "integrity": "sha512-L/B1lc/TViYk4DcpGxtAVbx0ZyiKM5ktoIyafGkH6zg/tj+mA+NE//aPYKG0k8kCHSHVJrpLpcAlOBEXQ3SavA==", - "license": "MIT", - "dependencies": { - "@emotion/memoize": "^0.9.0", - "@emotion/sheet": "^1.4.0", - "@emotion/utils": "^1.4.2", - "@emotion/weak-memoize": "^0.4.0", + "version": "11.11.0", + "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.11.0.tgz", + "integrity": "sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==", + "dependencies": { + "@emotion/memoize": "^0.8.1", + "@emotion/sheet": "^1.2.2", + "@emotion/utils": "^1.2.1", + "@emotion/weak-memoize": "^0.3.1", "stylis": "4.2.0" } }, "node_modules/@emotion/hash": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.2.tgz", - "integrity": "sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g==", - "license": "MIT" + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.1.tgz", + "integrity": "sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==" }, "node_modules/@emotion/is-prop-valid": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.3.1.tgz", - "integrity": "sha512-/ACwoqx7XQi9knQs/G0qKvv5teDMhD7bXYns9N/wM8ah8iNb8jZ2uNO0YOgiq2o2poIvVtJS2YALasQuMSQ7Kw==", - "license": "MIT", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.1.tgz", + "integrity": "sha512-61Mf7Ufx4aDxx1xlDeOm8aFFigGHE4z+0sKCa+IHCeZKiyP9RLD0Mmx7m8b9/Cf37f7NAvQOOJAbQQGVr5uERw==", "dependencies": { - "@emotion/memoize": "^0.9.0" + "@emotion/memoize": "^0.8.1" } }, "node_modules/@emotion/memoize": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.9.0.tgz", - "integrity": "sha512-30FAj7/EoJ5mwVPOWhAyCX+FPfMDrVecJAM+Iw9NRoSl4BBAQeqj4cApHHUXOVvIPgLVDsCFoz/hGD+5QQD1GQ==", - "license": "MIT" + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz", + "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==" }, "node_modules/@emotion/react": { - "version": "11.14.0", - "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.14.0.tgz", - "integrity": "sha512-O000MLDBDdk/EohJPFUqvnp4qnHeYkVP5B0xEG0D/L7cOKP9kefu2DXn8dj74cQfsEzUqh+sr1RzFqiL1o+PpA==", - "license": "MIT", + "version": "11.11.1", + "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.1.tgz", + "integrity": "sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==", "dependencies": { "@babel/runtime": "^7.18.3", - "@emotion/babel-plugin": "^11.13.5", - "@emotion/cache": "^11.14.0", - "@emotion/serialize": "^1.3.3", - "@emotion/use-insertion-effect-with-fallbacks": "^1.2.0", - "@emotion/utils": "^1.4.2", - "@emotion/weak-memoize": "^0.4.0", + "@emotion/babel-plugin": "^11.11.0", + "@emotion/cache": "^11.11.0", + "@emotion/serialize": "^1.1.2", + "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1", + "@emotion/utils": "^1.2.1", + "@emotion/weak-memoize": "^0.3.1", "hoist-non-react-statics": "^3.3.1" }, "peerDependencies": { @@ -523,36 +508,33 @@ } }, "node_modules/@emotion/serialize": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.3.3.tgz", - "integrity": "sha512-EISGqt7sSNWHGI76hC7x1CksiXPahbxEOrC5RjmFRJTqLyEK9/9hZvBbiYn70dw4wuwMKiEMCUlR6ZXTSWQqxA==", - "license": "MIT", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.2.tgz", + "integrity": "sha512-zR6a/fkFP4EAcCMQtLOhIgpprZOwNmCldtpaISpvz348+DP4Mz8ZoKaGGCQpbzepNIUWbq4w6hNZkwDyKoS+HA==", "dependencies": { - "@emotion/hash": "^0.9.2", - "@emotion/memoize": "^0.9.0", - "@emotion/unitless": "^0.10.0", - "@emotion/utils": "^1.4.2", + "@emotion/hash": "^0.9.1", + "@emotion/memoize": "^0.8.1", + "@emotion/unitless": "^0.8.1", + "@emotion/utils": "^1.2.1", "csstype": "^3.0.2" } }, "node_modules/@emotion/sheet": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.4.0.tgz", - "integrity": "sha512-fTBW9/8r2w3dXWYM4HCB1Rdp8NLibOw2+XELH5m5+AkWiL/KqYX6dc0kKYlaYyKjrQ6ds33MCdMPEwgs2z1rqg==", - "license": "MIT" + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.2.2.tgz", + "integrity": "sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==" }, "node_modules/@emotion/styled": { - "version": "11.14.0", - "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.14.0.tgz", - "integrity": "sha512-XxfOnXFffatap2IyCeJyNov3kiDQWoR08gPUQxvbL7fxKryGBKUZUkG6Hz48DZwVrJSVh9sJboyV1Ds4OW6SgA==", - "license": "MIT", + "version": "11.11.0", + "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.11.0.tgz", + "integrity": "sha512-hM5Nnvu9P3midq5aaXj4I+lnSfNi7Pmd4EWk1fOZ3pxookaQTNew6bp4JaCBYM4HVFZF9g7UjJmsUmC2JlxOng==", "dependencies": { "@babel/runtime": "^7.18.3", - "@emotion/babel-plugin": "^11.13.5", - "@emotion/is-prop-valid": "^1.3.0", - "@emotion/serialize": "^1.3.3", - "@emotion/use-insertion-effect-with-fallbacks": "^1.2.0", - "@emotion/utils": "^1.4.2" + "@emotion/babel-plugin": "^11.11.0", + "@emotion/is-prop-valid": "^1.2.1", + "@emotion/serialize": "^1.1.2", + "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1", + "@emotion/utils": "^1.2.1" }, "peerDependencies": { "@emotion/react": "^11.0.0-rc.0", @@ -570,31 +552,27 @@ "integrity": "sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ==" }, "node_modules/@emotion/unitless": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.10.0.tgz", - "integrity": "sha512-dFoMUuQA20zvtVTuxZww6OHoJYgrzfKM1t52mVySDJnMSEa08ruEvdYQbhvyu6soU+NeLVd3yKfTfT0NeV6qGg==", - "license": "MIT" + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz", + "integrity": "sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==" }, "node_modules/@emotion/use-insertion-effect-with-fallbacks": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.2.0.tgz", - "integrity": "sha512-yJMtVdH59sxi/aVJBpk9FQq+OR8ll5GT8oWd57UpeaKEVGab41JWaCFA7FRLoMLloOZF/c/wsPoe+bfGmRKgDg==", - "license": "MIT", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.1.tgz", + "integrity": "sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==", "peerDependencies": { "react": ">=16.8.0" } }, "node_modules/@emotion/utils": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.4.2.tgz", - "integrity": "sha512-3vLclRofFziIa3J2wDh9jjbkUz9qk5Vi3IZ/FSTKViB0k+ef0fPV7dYrUIugbgupYDx7v9ud/SjrtEP8Y4xLoA==", - "license": "MIT" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.2.1.tgz", + "integrity": "sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==" }, "node_modules/@emotion/weak-memoize": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.4.0.tgz", - "integrity": "sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==", - "license": "MIT" + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz", + "integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==" }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", @@ -753,19 +731,10 @@ "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==" }, - "node_modules/@icons/material": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@icons/material/-/material-0.2.4.tgz", - "integrity": "sha512-QPcGmICAPbGLGb6F/yNf/KzKqvFx8z5qx3D1yFqVAjoFmXK35EgyW+cJ57Te3CNsmzblwtzakLGFqHPqrfb4Tw==", - "license": "MIT", - "peerDependencies": { - "react": "*" - } - }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", - "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "license": "MIT", "dependencies": { "@jridgewell/set-array": "^1.2.1", @@ -825,24 +794,6 @@ "resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.2.tgz", "integrity": "sha512-fuscdXJ9G1qb7W8VdHi+IwRqij3lBkosAm4ydQtEmbY58OzHXqQhvlxqEkoz0yssNVn38bcpRWgA9PP+OGoisw==" }, - "node_modules/@lottiefiles/dotlottie-react": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@lottiefiles/dotlottie-react/-/dotlottie-react-0.12.0.tgz", - "integrity": "sha512-33Tsd67vlotrm43R8oko30Krwyuqb0YdOLra7L5m2mVfrTvDPEDBt8jfjgiveoLJ0jG/FlTLiCPXi/vCaBSXrg==", - "license": "MIT", - "dependencies": { - "@lottiefiles/dotlottie-web": "0.38.2" - }, - "peerDependencies": { - "react": "^17 || ^18 || ^19" - } - }, - "node_modules/@lottiefiles/dotlottie-web": { - "version": "0.38.2", - "resolved": "https://registry.npmjs.org/@lottiefiles/dotlottie-web/-/dotlottie-web-0.38.2.tgz", - "integrity": "sha512-01d+UjJ8NG7ZStYQxtb8FPzknzGmauG7gEkcH+wHfSdiSQJY9PoBNVSTB9V6F5hAnmFqOxaocTtd7TIEEnzMnA==", - "license": "MIT" - }, "node_modules/@mui/base": { "version": "5.0.0-beta.24", "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.24.tgz", @@ -875,34 +826,32 @@ } }, "node_modules/@mui/core-downloads-tracker": { - "version": "5.16.12", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.16.12.tgz", - "integrity": "sha512-rkN+bPpe2Xn8h4ZLqKy5JsZt3nzMyTJ2ySdyLHHf0IL+PrxS46dxOIC1i66R8qi14kJBHfy7Byqv1yUvpwf0iw==", - "license": "MIT", + "version": "5.14.18", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.14.18.tgz", + "integrity": "sha512-yFpF35fEVDV81nVktu0BE9qn2dD/chs7PsQhlyaV3EnTeZi9RZBuvoEfRym1/jmhJ2tcfeWXiRuHG942mQXJJQ==", "funding": { "type": "opencollective", - "url": "https://opencollective.com/mui-org" + "url": "https://opencollective.com/mui" } }, "node_modules/@mui/icons-material": { - "version": "5.16.12", - "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.16.12.tgz", - "integrity": "sha512-4Ocmbl1uzkWxAdYYARCLySJNqALgrJ+Fdr95FLpKZV7zMZxyoJRdPTO/CgUxjFjlj9Sy2Gi7j3HX4f5HS2GLeQ==", - "license": "MIT", + "version": "5.14.18", + "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.14.18.tgz", + "integrity": "sha512-o2z49R1G4SdBaxZjbMmkn+2OdT1bKymLvAYaB6pH59obM1CYv/0vAVm6zO31IqhwtYwXv6A7sLIwCGYTaVkcdg==", "dependencies": { - "@babel/runtime": "^7.23.9" + "@babel/runtime": "^7.23.2" }, "engines": { "node": ">=12.0.0" }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/mui-org" + "url": "https://opencollective.com/mui" }, "peerDependencies": { "@mui/material": "^5.0.0", - "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", - "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0" }, "peerDependenciesMeta": { "@types/react": { @@ -911,22 +860,21 @@ } }, "node_modules/@mui/material": { - "version": "5.16.12", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.16.12.tgz", - "integrity": "sha512-+M0UPy0xa9xGo8TV1vp9Mmf85TNUqpk7OoSiw+BaZf3D584S3aqfl+CL+EBTt9t52A97GnCjVNvXTO7hmLqhHw==", - "license": "MIT", + "version": "5.14.18", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.14.18.tgz", + "integrity": "sha512-y3UiR/JqrkF5xZR0sIKj6y7xwuEiweh9peiN3Zfjy1gXWXhz5wjlaLdoxFfKIEBUFfeQALxr/Y8avlHH+B9lpQ==", "dependencies": { - "@babel/runtime": "^7.23.9", - "@mui/core-downloads-tracker": "^5.16.12", - "@mui/system": "^5.16.12", - "@mui/types": "^7.2.15", - "@mui/utils": "^5.16.12", - "@popperjs/core": "^2.11.8", - "@types/react-transition-group": "^4.4.10", - "clsx": "^2.1.0", - "csstype": "^3.1.3", + "@babel/runtime": "^7.23.2", + "@mui/base": "5.0.0-beta.24", + "@mui/core-downloads-tracker": "^5.14.18", + "@mui/system": "^5.14.18", + "@mui/types": "^7.2.9", + "@mui/utils": "^5.14.18", + "@types/react-transition-group": "^4.4.8", + "clsx": "^2.0.0", + "csstype": "^3.1.2", "prop-types": "^15.8.1", - "react-is": "^19.0.0", + "react-is": "^18.2.0", "react-transition-group": "^4.4.5" }, "engines": { @@ -934,14 +882,14 @@ }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/mui-org" + "url": "https://opencollective.com/mui" }, "peerDependencies": { "@emotion/react": "^11.5.0", "@emotion/styled": "^11.3.0", - "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", - "react": "^17.0.0 || ^18.0.0 || ^19.0.0", - "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" }, "peerDependenciesMeta": { "@emotion/react": { @@ -955,20 +903,13 @@ } } }, - "node_modules/@mui/material/node_modules/react-is": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.0.0.tgz", - "integrity": "sha512-H91OHcwjZsbq3ClIDHMzBShc1rotbfACdWENsmEf0IFvZ3FgGPtdHMcsv45bQ1hAbgdfiA8SnxTKfDS+x/8m2g==", - "license": "MIT" - }, "node_modules/@mui/private-theming": { - "version": "5.16.12", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.16.12.tgz", - "integrity": "sha512-hhLTSZxsazwZZ4bUAKgFcbsnfCrwizSnJI7/bXf/R9/tZkZBy+bKY05/Au/bIgGKzuZ4KTlKlPn+U/uufEXrNw==", - "license": "MIT", + "version": "5.14.18", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.14.18.tgz", + "integrity": "sha512-WSgjqRlzfHU+2Rou3HlR2Gqfr4rZRsvFgataYO3qQ0/m6gShJN+lhVEvwEiJ9QYyVzMDvNpXZAcqp8Y2Vl+PAw==", "dependencies": { - "@babel/runtime": "^7.23.9", - "@mui/utils": "^5.16.12", + "@babel/runtime": "^7.23.2", + "@mui/utils": "^5.14.18", "prop-types": "^15.8.1" }, "engines": { @@ -976,11 +917,11 @@ }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/mui-org" + "url": "https://opencollective.com/mui" }, "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", - "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0" }, "peerDependenciesMeta": { "@types/react": { @@ -989,14 +930,13 @@ } }, "node_modules/@mui/styled-engine": { - "version": "5.16.12", - "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.16.12.tgz", - "integrity": "sha512-TMf3SN19rkJPh1hQZTjoY8UsJa5qExfr78owwCuEZLjIhsajAYiWmbJzJ8mM3grEWLiP3MziDA4zy4LFNri12Q==", - "license": "MIT", + "version": "5.14.18", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.14.18.tgz", + "integrity": "sha512-pW8bpmF9uCB5FV2IPk6mfbQCjPI5vGI09NOLhtGXPeph/4xIfC3JdIX0TILU0WcTs3aFQqo6s2+1SFgIB9rCXA==", "dependencies": { - "@babel/runtime": "^7.23.9", - "@emotion/cache": "^11.13.5", - "csstype": "^3.1.3", + "@babel/runtime": "^7.23.2", + "@emotion/cache": "^11.11.0", + "csstype": "^3.1.2", "prop-types": "^15.8.1" }, "engines": { @@ -1004,12 +944,12 @@ }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/mui-org" + "url": "https://opencollective.com/mui" }, "peerDependencies": { "@emotion/react": "^11.4.1", "@emotion/styled": "^11.3.0", - "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + "react": "^17.0.0 || ^18.0.0" }, "peerDependenciesMeta": { "@emotion/react": { @@ -1024,7 +964,6 @@ "version": "5.14.12", "resolved": "https://registry.npmjs.org/@mui/styled-engine-sc/-/styled-engine-sc-5.14.12.tgz", "integrity": "sha512-FQ5KDd17OkRurE0ljR4Pddekv1uPSoJxcBqXa9tdoOETGULVCefM5Gd9CRGzT+alNPDyHBoUeEYKulIkDN9ytA==", - "license": "MIT", "dependencies": { "@babel/runtime": "^7.23.1", "csstype": "^3.1.2", @@ -1048,18 +987,17 @@ } }, "node_modules/@mui/system": { - "version": "5.16.12", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.16.12.tgz", - "integrity": "sha512-rDsndVl0ug0Ex2rZt8x0WIF3Zc0EMFT2TmRVWP4jzk38aLS6WsxryXAZUQa0BKEnB3vfx1pSP/xa44TdKQ94dg==", - "license": "MIT", + "version": "5.14.18", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.14.18.tgz", + "integrity": "sha512-hSQQdb3KF72X4EN2hMEiv8EYJZSflfdd1TRaGPoR7CIAG347OxCslpBUwWngYobaxgKvq6xTrlIl+diaactVww==", "dependencies": { - "@babel/runtime": "^7.23.9", - "@mui/private-theming": "^5.16.12", - "@mui/styled-engine": "^5.16.12", - "@mui/types": "^7.2.15", - "@mui/utils": "^5.16.12", - "clsx": "^2.1.0", - "csstype": "^3.1.3", + "@babel/runtime": "^7.23.2", + "@mui/private-theming": "^5.14.18", + "@mui/styled-engine": "^5.14.18", + "@mui/types": "^7.2.9", + "@mui/utils": "^5.14.18", + "clsx": "^2.0.0", + "csstype": "^3.1.2", "prop-types": "^15.8.1" }, "engines": { @@ -1067,13 +1005,13 @@ }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/mui-org" + "url": "https://opencollective.com/mui" }, "peerDependencies": { "@emotion/react": "^11.5.0", "@emotion/styled": "^11.3.0", - "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", - "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0" }, "peerDependenciesMeta": { "@emotion/react": { @@ -1088,12 +1026,11 @@ } }, "node_modules/@mui/types": { - "version": "7.2.20", - "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.20.tgz", - "integrity": "sha512-straFHD7L8v05l/N5vcWk+y7eL9JF0C2mtph/y4BPm3gn2Eh61dDwDB65pa8DLss3WJfDXYC7Kx5yjP0EmXpgw==", - "license": "MIT", + "version": "7.2.9", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.9.tgz", + "integrity": "sha512-k1lN/PolaRZfNsRdAqXtcR71sTnv3z/VCCGPxU8HfdftDkzi335MdJ6scZxvofMAd/K/9EbzCZTFBmlNpQVdCg==", "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0" + "@types/react": "^17.0.0 || ^18.0.0" }, "peerDependenciesMeta": { "@types/react": { @@ -1102,28 +1039,25 @@ } }, "node_modules/@mui/utils": { - "version": "5.16.12", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.16.12.tgz", - "integrity": "sha512-p3JAq7nA0ur8M/zLnBvR6ZeAjM8mD4LnPdKfsJAYPS26w4eDQjQzl55XvoOmch2MeXhmWaO4Pkvs/xurrISNBw==", - "license": "MIT", + "version": "5.14.18", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.14.18.tgz", + "integrity": "sha512-HZDRsJtEZ7WMSnrHV9uwScGze4wM/Y+u6pDVo+grUjt5yXzn+wI8QX/JwTHh9YSw/WpnUL80mJJjgCnWj2VrzQ==", "dependencies": { - "@babel/runtime": "^7.23.9", - "@mui/types": "^7.2.15", - "@types/prop-types": "^15.7.12", - "clsx": "^2.1.1", + "@babel/runtime": "^7.23.2", + "@types/prop-types": "^15.7.10", "prop-types": "^15.8.1", - "react-is": "^19.0.0" + "react-is": "^18.2.0" }, "engines": { "node": ">=12.0.0" }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/mui-org" + "url": "https://opencollective.com/mui" }, "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", - "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0" }, "peerDependenciesMeta": { "@types/react": { @@ -1131,12 +1065,6 @@ } } }, - "node_modules/@mui/utils/node_modules/react-is": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.0.0.tgz", - "integrity": "sha512-H91OHcwjZsbq3ClIDHMzBShc1rotbfACdWENsmEf0IFvZ3FgGPtdHMcsv45bQ1hAbgdfiA8SnxTKfDS+x/8m2g==", - "license": "MIT" - }, "node_modules/@mui/x-date-pickers": { "version": "6.18.2", "resolved": "https://registry.npmjs.org/@mui/x-date-pickers/-/x-date-pickers-6.18.2.tgz", @@ -1487,9 +1415,9 @@ } }, "node_modules/@opentelemetry/api-logs": { - "version": "0.56.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.56.0.tgz", - "integrity": "sha512-Wr39+94UNNG3Ei9nv3pHd4AJ63gq5nSemMRpCd8fPwDL9rN3vK26lzxfH27mw16XzOSO+TpyQwBAMaLxaPWG0g==", + "version": "0.54.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.54.2.tgz", + "integrity": "sha512-4MTVwwmLgUh5QrJnZpYo6YRO5IBLAggf2h8gWDblwRagDStY13aEvt7gGk3jewrMaPlHiF83fENhIx0HO97/cQ==", "license": "Apache-2.0", "dependencies": { "@opentelemetry/api": "^1.3.0" @@ -1499,9 +1427,9 @@ } }, "node_modules/@opentelemetry/context-async-hooks": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-1.30.0.tgz", - "integrity": "sha512-roCetrG/cz0r/gugQm/jFo75UxblVvHaNSRoR0kSSRSzXFAiIBqFCZuH458BHBNRtRe+0yJdIJ21L9t94bw7+g==", + "version": "1.28.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-1.28.0.tgz", + "integrity": "sha512-igcl4Ve+F1N2063PJUkesk/GkYyuGIWinYkSyAFTnIj3gzrOgvOA4k747XNdL47HRRL1w/qh7UW8NDuxOLvKFA==", "license": "Apache-2.0", "engines": { "node": ">=14" @@ -1511,12 +1439,12 @@ } }, "node_modules/@opentelemetry/core": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.30.0.tgz", - "integrity": "sha512-Q/3u/K73KUjTCnFUP97ZY+pBjQ1kPEgjOfXj/bJl8zW7GbXdkw6cwuyZk6ZTXkVgCBsYRYUzx4fvYK1jxdb9MA==", + "version": "1.28.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.28.0.tgz", + "integrity": "sha512-ZLwRMV+fNDpVmF2WYUdBHlq0eOWtEaUJSusrzjGnBt7iSRvfjFE3RXYUZJrqou/wIDWV0DwQ5KIfYe9WXg9Xqw==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/semantic-conventions": "1.28.0" + "@opentelemetry/semantic-conventions": "1.27.0" }, "engines": { "node": ">=14" @@ -1525,13 +1453,22 @@ "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, + "node_modules/@opentelemetry/core/node_modules/@opentelemetry/semantic-conventions": { + "version": "1.27.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.27.0.tgz", + "integrity": "sha512-sAay1RrB+ONOem0OZanAR1ZI/k7yDpnOQSQmTMuGImUQb2y8EbSaCJ94FQluM74xoU03vlb2d2U90hZluL6nQg==", + "license": "Apache-2.0", + "engines": { + "node": ">=14" + } + }, "node_modules/@opentelemetry/instrumentation": { - "version": "0.56.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.56.0.tgz", - "integrity": "sha512-2KkGBKE+FPXU1F0zKww+stnlUxUTlBvLCiWdP63Z9sqXYeNI/ziNzsxAp4LAdUcTQmXjw1IWgvm5CAb/BHy99w==", + "version": "0.54.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.54.2.tgz", + "integrity": "sha512-go6zpOVoZVztT9r1aPd79Fr3OWiD4N24bCPJsIKkBses8oyFo12F/Ew3UBTdIu6hsW4HC4MVEJygG6TEyJI/lg==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api-logs": "0.56.0", + "@opentelemetry/api-logs": "0.54.2", "@types/shimmer": "^1.2.0", "import-in-the-middle": "^1.8.1", "require-in-the-middle": "^7.1.1", @@ -1546,13 +1483,13 @@ } }, "node_modules/@opentelemetry/instrumentation-amqplib": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-amqplib/-/instrumentation-amqplib-0.45.0.tgz", - "integrity": "sha512-SlKLsOS65NGMIBG1Lh/hLrMDU9WzTUF25apnV6ZmWZB1bBmUwan7qrwwrTu1cL5LzJWCXOdZPuTaxP7pC9qxnQ==", + "version": "0.43.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-amqplib/-/instrumentation-amqplib-0.43.0.tgz", + "integrity": "sha512-ALjfQC+0dnIEcvNYsbZl/VLh7D2P1HhFF4vicRKHhHFIUV3Shpg4kXgiek5PLhmeKSIPiUB25IYH5RIneclL4A==", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.56.0", + "@opentelemetry/instrumentation": "^0.54.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, "engines": { @@ -1563,13 +1500,13 @@ } }, "node_modules/@opentelemetry/instrumentation-connect": { - "version": "0.42.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-connect/-/instrumentation-connect-0.42.0.tgz", - "integrity": "sha512-bOoYHBmbnq/jFaLHmXJ55VQ6jrH5fHDMAPjFM0d3JvR0dvIqW7anEoNC33QqYGFYUfVJ50S0d/eoyF61ALqQuA==", + "version": "0.40.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-connect/-/instrumentation-connect-0.40.0.tgz", + "integrity": "sha512-3aR/3YBQ160siitwwRLjwqrv2KBT16897+bo6yz8wIfel6nWOxTZBJudcbsK3p42pTC7qrbotJ9t/1wRLpv79Q==", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.56.0", + "@opentelemetry/instrumentation": "^0.54.0", "@opentelemetry/semantic-conventions": "^1.27.0", "@types/connect": "3.4.36" }, @@ -1581,12 +1518,12 @@ } }, "node_modules/@opentelemetry/instrumentation-dataloader": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-dataloader/-/instrumentation-dataloader-0.15.0.tgz", - "integrity": "sha512-5fP35A2jUPk4SerVcduEkpbRAIoqa2PaP5rWumn01T1uSbavXNccAr3Xvx1N6xFtZxXpLJq4FYqGFnMgDWgVng==", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-dataloader/-/instrumentation-dataloader-0.12.0.tgz", + "integrity": "sha512-pnPxatoFE0OXIZDQhL2okF//dmbiWFzcSc8pUg9TqofCLYZySSxDCgQc69CJBo5JnI3Gz1KP+mOjS4WAeRIH4g==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.56.0" + "@opentelemetry/instrumentation": "^0.53.0" }, "engines": { "node": ">=14" @@ -1595,32 +1532,30 @@ "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-express": { - "version": "0.46.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-express/-/instrumentation-express-0.46.0.tgz", - "integrity": "sha512-BCEClDj/HPq/1xYRAlOr6z+OUnbp2eFp18DSrgyQz4IT9pkdYk8eWHnMi9oZSqlC6J5mQzkFmaW5RrKb1GLQhg==", + "node_modules/@opentelemetry/instrumentation-dataloader/node_modules/@opentelemetry/api-logs": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.53.0.tgz", + "integrity": "sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.56.0", - "@opentelemetry/semantic-conventions": "^1.27.0" + "@opentelemetry/api": "^1.0.0" }, "engines": { "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-fastify": { - "version": "0.43.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-fastify/-/instrumentation-fastify-0.43.0.tgz", - "integrity": "sha512-Lmdsg7tYiV+K3/NKVAQfnnLNGmakUOFdB0PhoTh2aXuSyCmyNnnDvhn2MsArAPTZ68wnD5Llh5HtmiuTkf+DyQ==", + "node_modules/@opentelemetry/instrumentation-dataloader/node_modules/@opentelemetry/instrumentation": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.53.0.tgz", + "integrity": "sha512-DMwg0hy4wzf7K73JJtl95m/e0boSoWhH07rfvHvYzQtBD3Bmv0Wc1x733vyZBqmFm8OjJD0/pfiUg1W3JjFX0A==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.56.0", - "@opentelemetry/semantic-conventions": "^1.27.0" + "@opentelemetry/api-logs": "0.53.0", + "@types/shimmer": "^1.2.0", + "import-in-the-middle": "^1.8.1", + "require-in-the-middle": "^7.1.1", + "semver": "^7.5.2", + "shimmer": "^1.2.1" }, "engines": { "node": ">=14" @@ -1629,14 +1564,27 @@ "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-fs": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-fs/-/instrumentation-fs-0.18.0.tgz", - "integrity": "sha512-kC40y6CEMONm8/MWwoF5GHWIC7gOdF+g3sgsjfwJaUkgD6bdWV+FgG0XApqSbTQndICKzw3RonVk8i7s6mHqhA==", + "node_modules/@opentelemetry/instrumentation-dataloader/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@opentelemetry/instrumentation-express": { + "version": "0.44.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-express/-/instrumentation-express-0.44.0.tgz", + "integrity": "sha512-GWgibp6Q0wxyFaaU8ERIgMMYgzcHmGrw3ILUtGchLtLncHNOKk0SNoWGqiylXWWT4HTn5XdV8MGawUgpZh80cA==", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.56.0" + "@opentelemetry/instrumentation": "^0.54.0", + "@opentelemetry/semantic-conventions": "^1.27.0" }, "engines": { "node": ">=14" @@ -1645,13 +1593,15 @@ "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-generic-pool": { - "version": "0.42.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-generic-pool/-/instrumentation-generic-pool-0.42.0.tgz", - "integrity": "sha512-J4QxqiQ1imtB9ogzsOnHra0g3dmmLAx4JCeoK3o0rFes1OirljNHnO8Hsj4s1jAir8WmWvnEEQO1y8yk6j2tog==", + "node_modules/@opentelemetry/instrumentation-fastify": { + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-fastify/-/instrumentation-fastify-0.41.0.tgz", + "integrity": "sha512-pNRjFvf0mvqfJueaeL/qEkuGJwgtE5pgjIHGYwjc2rMViNCrtY9/Sf+Nu8ww6dDd/Oyk2fwZZP7i0XZfCnETrA==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.56.0" + "@opentelemetry/core": "^1.8.0", + "@opentelemetry/instrumentation": "^0.54.0", + "@opentelemetry/semantic-conventions": "^1.27.0" }, "engines": { "node": ">=14" @@ -1660,13 +1610,14 @@ "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-graphql": { - "version": "0.46.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-graphql/-/instrumentation-graphql-0.46.0.tgz", - "integrity": "sha512-tplk0YWINSECcK89PGM7IVtOYenXyoOuhOQlN0X0YrcDUfMS4tZMKkVc0vyhNWYYrexnUHwNry2YNBNugSpjlQ==", + "node_modules/@opentelemetry/instrumentation-fs": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-fs/-/instrumentation-fs-0.16.0.tgz", + "integrity": "sha512-hMDRUxV38ln1R3lNz6osj3YjlO32ykbHqVrzG7gEhGXFQfu7LJUx8t9tEwE4r2h3CD4D0Rw4YGDU4yF4mP3ilg==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.56.0" + "@opentelemetry/core": "^1.8.0", + "@opentelemetry/instrumentation": "^0.54.0" }, "engines": { "node": ">=14" @@ -1675,15 +1626,13 @@ "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-hapi": { - "version": "0.44.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-hapi/-/instrumentation-hapi-0.44.0.tgz", - "integrity": "sha512-4HdNIMNXWK1O6nsaQOrACo83QWEVoyNODTdVDbUqtqXiv2peDfD0RAPhSQlSGWLPw3S4d9UoOmrV7s2HYj6T2A==", + "node_modules/@opentelemetry/instrumentation-generic-pool": { + "version": "0.39.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-generic-pool/-/instrumentation-generic-pool-0.39.0.tgz", + "integrity": "sha512-y4v8Y+tSfRB3NNBvHjbjrn7rX/7sdARG7FuK6zR8PGb28CTa0kHpEGCJqvL9L8xkTNvTXo+lM36ajFGUaK1aNw==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.56.0", - "@opentelemetry/semantic-conventions": "^1.27.0" + "@opentelemetry/instrumentation": "^0.53.0" }, "engines": { "node": ">=14" @@ -1692,41 +1641,39 @@ "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-http": { - "version": "0.56.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.56.0.tgz", - "integrity": "sha512-/bWHBUAq8VoATnH9iLk5w8CE9+gj+RgYSUphe7hry472n6fYl7+4PvuScoQMdmSUTprKq/gyr2kOWL6zrC7FkQ==", + "node_modules/@opentelemetry/instrumentation-generic-pool/node_modules/@opentelemetry/api-logs": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.53.0.tgz", + "integrity": "sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "1.29.0", - "@opentelemetry/instrumentation": "0.56.0", - "@opentelemetry/semantic-conventions": "1.28.0", - "forwarded-parse": "2.1.2", - "semver": "^7.5.2" + "@opentelemetry/api": "^1.0.0" }, "engines": { "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-http/node_modules/@opentelemetry/core": { - "version": "1.29.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.29.0.tgz", - "integrity": "sha512-gmT7vAreXl0DTHD2rVZcw3+l2g84+5XiHIqdBUxXbExymPCvSsGOpiwMmn8nkiJur28STV31wnhIDrzWDPzjfA==", + "node_modules/@opentelemetry/instrumentation-generic-pool/node_modules/@opentelemetry/instrumentation": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.53.0.tgz", + "integrity": "sha512-DMwg0hy4wzf7K73JJtl95m/e0boSoWhH07rfvHvYzQtBD3Bmv0Wc1x733vyZBqmFm8OjJD0/pfiUg1W3JjFX0A==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/semantic-conventions": "1.28.0" + "@opentelemetry/api-logs": "0.53.0", + "@types/shimmer": "^1.2.0", + "import-in-the-middle": "^1.8.1", + "require-in-the-middle": "^7.1.1", + "semver": "^7.5.2", + "shimmer": "^1.2.1" }, "engines": { "node": ">=14" }, "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" + "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-http/node_modules/semver": { + "node_modules/@opentelemetry/instrumentation-generic-pool/node_modules/semver": { "version": "7.6.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", @@ -1738,15 +1685,13 @@ "node": ">=10" } }, - "node_modules/@opentelemetry/instrumentation-ioredis": { - "version": "0.46.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-ioredis/-/instrumentation-ioredis-0.46.0.tgz", - "integrity": "sha512-sOdsq8oGi29V58p1AkefHvuB3l2ymP1IbxRIX3y4lZesQWKL8fLhBmy8xYjINSQ5gHzWul2yoz7pe7boxhZcqQ==", + "node_modules/@opentelemetry/instrumentation-graphql": { + "version": "0.44.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-graphql/-/instrumentation-graphql-0.44.0.tgz", + "integrity": "sha512-FYXTe3Bv96aNpYktqm86BFUTpjglKD0kWI5T5bxYkLUPEPvFn38vWGMJTGrDMVou/i55E4jlWvcm6hFIqLsMbg==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.56.0", - "@opentelemetry/redis-common": "^0.36.2", - "@opentelemetry/semantic-conventions": "^1.27.0" + "@opentelemetry/instrumentation": "^0.54.0" }, "engines": { "node": ">=14" @@ -1755,13 +1700,14 @@ "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-kafkajs": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-kafkajs/-/instrumentation-kafkajs-0.6.0.tgz", - "integrity": "sha512-MGQrzqEUAl0tacKJUFpuNHJesyTi51oUzSVizn7FdvJplkRIdS11FukyZBZJEscofSEdk7Ycmg+kNMLi5QHUFg==", + "node_modules/@opentelemetry/instrumentation-hapi": { + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-hapi/-/instrumentation-hapi-0.41.0.tgz", + "integrity": "sha512-jKDrxPNXDByPlYcMdZjNPYCvw0SQJjN+B1A+QH+sx+sAHsKSAf9hwFiJSrI6C4XdOls43V/f/fkp9ITkHhKFbQ==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.56.0", + "@opentelemetry/core": "^1.8.0", + "@opentelemetry/instrumentation": "^0.53.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, "engines": { @@ -1771,31 +1717,30 @@ "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-knex": { - "version": "0.43.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-knex/-/instrumentation-knex-0.43.0.tgz", - "integrity": "sha512-mOp0TRQNFFSBj5am0WF67fRO7UZMUmsF3/7HSDja9g3H4pnj+4YNvWWyZn4+q0rGrPtywminAXe0rxtgaGYIqg==", + "node_modules/@opentelemetry/instrumentation-hapi/node_modules/@opentelemetry/api-logs": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.53.0.tgz", + "integrity": "sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.56.0", - "@opentelemetry/semantic-conventions": "^1.27.0" + "@opentelemetry/api": "^1.0.0" }, "engines": { "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-koa": { - "version": "0.46.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-koa/-/instrumentation-koa-0.46.0.tgz", - "integrity": "sha512-RcWXMQdJQANnPUaXbHY5G0Fg6gmleZ/ZtZeSsekWPaZmQq12FGk0L1UwodIgs31OlYfviAZ4yTeytoSUkgo5vQ==", + "node_modules/@opentelemetry/instrumentation-hapi/node_modules/@opentelemetry/instrumentation": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.53.0.tgz", + "integrity": "sha512-DMwg0hy4wzf7K73JJtl95m/e0boSoWhH07rfvHvYzQtBD3Bmv0Wc1x733vyZBqmFm8OjJD0/pfiUg1W3JjFX0A==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.56.0", - "@opentelemetry/semantic-conventions": "^1.27.0" + "@opentelemetry/api-logs": "0.53.0", + "@types/shimmer": "^1.2.0", + "import-in-the-middle": "^1.8.1", + "require-in-the-middle": "^7.1.1", + "semver": "^7.5.2", + "shimmer": "^1.2.1" }, "engines": { "node": ">=14" @@ -1804,29 +1749,28 @@ "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-lru-memoizer": { - "version": "0.43.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-lru-memoizer/-/instrumentation-lru-memoizer-0.43.0.tgz", - "integrity": "sha512-fZc+1eJUV+tFxaB3zkbupiA8SL3vhDUq89HbDNg1asweYrEb9OlHIB+Ot14ZiHUc1qCmmWmZHbPTwa56mVVwzg==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/instrumentation": "^0.56.0" + "node_modules/@opentelemetry/instrumentation-hapi/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" }, "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" + "node": ">=10" } }, - "node_modules/@opentelemetry/instrumentation-mongodb": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongodb/-/instrumentation-mongodb-0.50.0.tgz", - "integrity": "sha512-DtwJMjYFXFT5auAvv8aGrBj1h3ciA/dXQom11rxL7B1+Oy3FopSpanvwYxJ+z0qmBrQ1/iMuWELitYqU4LnlkQ==", + "node_modules/@opentelemetry/instrumentation-http": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.53.0.tgz", + "integrity": "sha512-H74ErMeDuZfj7KgYCTOFGWF5W9AfaPnqLQQxeFq85+D29wwV2yqHbz2IKLYpkOh7EI6QwDEl7rZCIxjJLyc/CQ==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.56.0", - "@opentelemetry/semantic-conventions": "^1.27.0" + "@opentelemetry/core": "1.26.0", + "@opentelemetry/instrumentation": "0.53.0", + "@opentelemetry/semantic-conventions": "1.27.0", + "semver": "^7.5.2" }, "engines": { "node": ">=14" @@ -1835,49 +1779,45 @@ "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-mongoose": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongoose/-/instrumentation-mongoose-0.45.0.tgz", - "integrity": "sha512-zHgNh+A01C5baI2mb5dAGyMC7DWmUpOfwpV8axtC0Hd5Uzqv+oqKgKbVDIVhOaDkPxjgVJwYF9YQZl2pw2qxIA==", + "node_modules/@opentelemetry/instrumentation-http/node_modules/@opentelemetry/api-logs": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.53.0.tgz", + "integrity": "sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.56.0", - "@opentelemetry/semantic-conventions": "^1.27.0" + "@opentelemetry/api": "^1.0.0" }, "engines": { "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-mysql": { - "version": "0.44.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql/-/instrumentation-mysql-0.44.0.tgz", - "integrity": "sha512-al7jbXvT/uT1KV8gdNDzaWd5/WXf+mrjrsF0/NtbnqLa0UUFGgQnoK3cyborgny7I+KxWhL8h7YPTf6Zq4nKsg==", + "node_modules/@opentelemetry/instrumentation-http/node_modules/@opentelemetry/core": { + "version": "1.26.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.26.0.tgz", + "integrity": "sha512-1iKxXXE8415Cdv0yjG3G6hQnB5eVEsJce3QaawX8SjDn0mAS0ZM8fAbZZJD4ajvhC15cePvosSCut404KrIIvQ==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.56.0", - "@opentelemetry/semantic-conventions": "^1.27.0", - "@types/mysql": "2.15.26" + "@opentelemetry/semantic-conventions": "1.27.0" }, "engines": { "node": ">=14" }, "peerDependencies": { - "@opentelemetry/api": "^1.3.0" + "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, - "node_modules/@opentelemetry/instrumentation-mysql2": { - "version": "0.44.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql2/-/instrumentation-mysql2-0.44.0.tgz", - "integrity": "sha512-e9QY4AGsjGFwmfHd6kBa4yPaQZjAq2FuxMb0BbKlXCAjG+jwqw+sr9xWdJGR60jMsTq52hx3mAlE3dUJ9BipxQ==", + "node_modules/@opentelemetry/instrumentation-http/node_modules/@opentelemetry/instrumentation": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.53.0.tgz", + "integrity": "sha512-DMwg0hy4wzf7K73JJtl95m/e0boSoWhH07rfvHvYzQtBD3Bmv0Wc1x733vyZBqmFm8OjJD0/pfiUg1W3JjFX0A==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.56.0", - "@opentelemetry/semantic-conventions": "^1.27.0", - "@opentelemetry/sql-common": "^0.40.1" + "@opentelemetry/api-logs": "0.53.0", + "@types/shimmer": "^1.2.0", + "import-in-the-middle": "^1.8.1", + "require-in-the-middle": "^7.1.1", + "semver": "^7.5.2", + "shimmer": "^1.2.1" }, "engines": { "node": ">=14" @@ -1886,13 +1826,446 @@ "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-nestjs-core": { + "node_modules/@opentelemetry/instrumentation-http/node_modules/@opentelemetry/semantic-conventions": { + "version": "1.27.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.27.0.tgz", + "integrity": "sha512-sAay1RrB+ONOem0OZanAR1ZI/k7yDpnOQSQmTMuGImUQb2y8EbSaCJ94FQluM74xoU03vlb2d2U90hZluL6nQg==", + "license": "Apache-2.0", + "engines": { + "node": ">=14" + } + }, + "node_modules/@opentelemetry/instrumentation-http/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@opentelemetry/instrumentation-ioredis": { "version": "0.43.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-nestjs-core/-/instrumentation-nestjs-core-0.43.0.tgz", - "integrity": "sha512-NEo4RU7HTjiaXk3curqXUvCb9alRiFWxQY//+hvDXwWLlADX2vB6QEmVCeEZrKO+6I/tBrI4vNdAnbCY9ldZVg==", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-ioredis/-/instrumentation-ioredis-0.43.0.tgz", + "integrity": "sha512-i3Dke/LdhZbiUAEImmRG3i7Dimm/BD7t8pDDzwepSvIQ6s2X6FPia7561gw+64w+nx0+G9X14D7rEfaMEmmjig==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/instrumentation": "^0.53.0", + "@opentelemetry/redis-common": "^0.36.2", + "@opentelemetry/semantic-conventions": "^1.27.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-ioredis/node_modules/@opentelemetry/api-logs": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.53.0.tgz", + "integrity": "sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api": "^1.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@opentelemetry/instrumentation-ioredis/node_modules/@opentelemetry/instrumentation": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.53.0.tgz", + "integrity": "sha512-DMwg0hy4wzf7K73JJtl95m/e0boSoWhH07rfvHvYzQtBD3Bmv0Wc1x733vyZBqmFm8OjJD0/pfiUg1W3JjFX0A==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api-logs": "0.53.0", + "@types/shimmer": "^1.2.0", + "import-in-the-middle": "^1.8.1", + "require-in-the-middle": "^7.1.1", + "semver": "^7.5.2", + "shimmer": "^1.2.1" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-ioredis/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@opentelemetry/instrumentation-kafkajs": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-kafkajs/-/instrumentation-kafkajs-0.4.0.tgz", + "integrity": "sha512-I9VwDG314g7SDL4t8kD/7+1ytaDBRbZQjhVaQaVIDR8K+mlsoBhLsWH79yHxhHQKvwCSZwqXF+TiTOhoQVUt7A==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/instrumentation": "^0.54.0", + "@opentelemetry/semantic-conventions": "^1.27.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-knex": { + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-knex/-/instrumentation-knex-0.41.0.tgz", + "integrity": "sha512-OhI1SlLv5qnsnm2dOVrian/x3431P75GngSpnR7c4fcVFv7prXGYu29Z6ILRWJf/NJt6fkbySmwdfUUnFnHCTg==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/instrumentation": "^0.54.0", + "@opentelemetry/semantic-conventions": "^1.27.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-koa": { + "version": "0.43.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-koa/-/instrumentation-koa-0.43.0.tgz", + "integrity": "sha512-lDAhSnmoTIN6ELKmLJBplXzT/Jqs5jGZehuG22EdSMaTwgjMpxMDI1YtlKEhiWPWkrz5LUsd0aOO0ZRc9vn3AQ==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "^1.8.0", + "@opentelemetry/instrumentation": "^0.53.0", + "@opentelemetry/semantic-conventions": "^1.27.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-koa/node_modules/@opentelemetry/api-logs": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.53.0.tgz", + "integrity": "sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api": "^1.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@opentelemetry/instrumentation-koa/node_modules/@opentelemetry/instrumentation": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.53.0.tgz", + "integrity": "sha512-DMwg0hy4wzf7K73JJtl95m/e0boSoWhH07rfvHvYzQtBD3Bmv0Wc1x733vyZBqmFm8OjJD0/pfiUg1W3JjFX0A==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api-logs": "0.53.0", + "@types/shimmer": "^1.2.0", + "import-in-the-middle": "^1.8.1", + "require-in-the-middle": "^7.1.1", + "semver": "^7.5.2", + "shimmer": "^1.2.1" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-koa/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@opentelemetry/instrumentation-lru-memoizer": { + "version": "0.40.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-lru-memoizer/-/instrumentation-lru-memoizer-0.40.0.tgz", + "integrity": "sha512-21xRwZsEdMPnROu/QsaOIODmzw59IYpGFmuC4aFWvMj6stA8+Ei1tX67nkarJttlNjoM94um0N4X26AD7ff54A==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/instrumentation": "^0.53.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-lru-memoizer/node_modules/@opentelemetry/api-logs": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.53.0.tgz", + "integrity": "sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api": "^1.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@opentelemetry/instrumentation-lru-memoizer/node_modules/@opentelemetry/instrumentation": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.53.0.tgz", + "integrity": "sha512-DMwg0hy4wzf7K73JJtl95m/e0boSoWhH07rfvHvYzQtBD3Bmv0Wc1x733vyZBqmFm8OjJD0/pfiUg1W3JjFX0A==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api-logs": "0.53.0", + "@types/shimmer": "^1.2.0", + "import-in-the-middle": "^1.8.1", + "require-in-the-middle": "^7.1.1", + "semver": "^7.5.2", + "shimmer": "^1.2.1" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-lru-memoizer/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@opentelemetry/instrumentation-mongodb": { + "version": "0.48.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongodb/-/instrumentation-mongodb-0.48.0.tgz", + "integrity": "sha512-9YWvaGvrrcrydMsYGLu0w+RgmosLMKe3kv/UNlsPy8RLnCkN2z+bhhbjjjuxtUmvEuKZMCoXFluABVuBr1yhjw==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/instrumentation": "^0.54.0", + "@opentelemetry/semantic-conventions": "^1.27.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-mongoose": { + "version": "0.42.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongoose/-/instrumentation-mongoose-0.42.0.tgz", + "integrity": "sha512-AnWv+RaR86uG3qNEMwt3plKX1ueRM7AspfszJYVkvkehiicC3bHQA6vWdb6Zvy5HAE14RyFbu9+2hUUjR2NSyg==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "^1.8.0", + "@opentelemetry/instrumentation": "^0.53.0", + "@opentelemetry/semantic-conventions": "^1.27.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-mongoose/node_modules/@opentelemetry/api-logs": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.53.0.tgz", + "integrity": "sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api": "^1.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@opentelemetry/instrumentation-mongoose/node_modules/@opentelemetry/instrumentation": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.53.0.tgz", + "integrity": "sha512-DMwg0hy4wzf7K73JJtl95m/e0boSoWhH07rfvHvYzQtBD3Bmv0Wc1x733vyZBqmFm8OjJD0/pfiUg1W3JjFX0A==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api-logs": "0.53.0", + "@types/shimmer": "^1.2.0", + "import-in-the-middle": "^1.8.1", + "require-in-the-middle": "^7.1.1", + "semver": "^7.5.2", + "shimmer": "^1.2.1" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-mongoose/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@opentelemetry/instrumentation-mysql": { + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql/-/instrumentation-mysql-0.41.0.tgz", + "integrity": "sha512-jnvrV6BsQWyHS2qb2fkfbfSb1R/lmYwqEZITwufuRl37apTopswu9izc0b1CYRp/34tUG/4k/V39PND6eyiNvw==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/instrumentation": "^0.53.0", + "@opentelemetry/semantic-conventions": "^1.27.0", + "@types/mysql": "2.15.26" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-mysql/node_modules/@opentelemetry/api-logs": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.53.0.tgz", + "integrity": "sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api": "^1.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@opentelemetry/instrumentation-mysql/node_modules/@opentelemetry/instrumentation": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.53.0.tgz", + "integrity": "sha512-DMwg0hy4wzf7K73JJtl95m/e0boSoWhH07rfvHvYzQtBD3Bmv0Wc1x733vyZBqmFm8OjJD0/pfiUg1W3JjFX0A==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api-logs": "0.53.0", + "@types/shimmer": "^1.2.0", + "import-in-the-middle": "^1.8.1", + "require-in-the-middle": "^7.1.1", + "semver": "^7.5.2", + "shimmer": "^1.2.1" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-mysql/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@opentelemetry/instrumentation-mysql2": { + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql2/-/instrumentation-mysql2-0.41.0.tgz", + "integrity": "sha512-REQB0x+IzVTpoNgVmy5b+UnH1/mDByrneimP6sbDHkp1j8QOl1HyWOrBH/6YWR0nrbU3l825Em5PlybjT3232g==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/instrumentation": "^0.53.0", + "@opentelemetry/semantic-conventions": "^1.27.0", + "@opentelemetry/sql-common": "^0.40.1" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-mysql2/node_modules/@opentelemetry/api-logs": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.53.0.tgz", + "integrity": "sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api": "^1.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@opentelemetry/instrumentation-mysql2/node_modules/@opentelemetry/instrumentation": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.53.0.tgz", + "integrity": "sha512-DMwg0hy4wzf7K73JJtl95m/e0boSoWhH07rfvHvYzQtBD3Bmv0Wc1x733vyZBqmFm8OjJD0/pfiUg1W3JjFX0A==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api-logs": "0.53.0", + "@types/shimmer": "^1.2.0", + "import-in-the-middle": "^1.8.1", + "require-in-the-middle": "^7.1.1", + "semver": "^7.5.2", + "shimmer": "^1.2.1" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-mysql2/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@opentelemetry/instrumentation-nestjs-core": { + "version": "0.40.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-nestjs-core/-/instrumentation-nestjs-core-0.40.0.tgz", + "integrity": "sha512-WF1hCUed07vKmf5BzEkL0wSPinqJgH7kGzOjjMAiTGacofNXjb/y4KQ8loj2sNsh5C/NN7s1zxQuCgbWbVTGKg==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.56.0", + "@opentelemetry/instrumentation": "^0.53.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, "engines": { @@ -1902,15 +2275,58 @@ "@opentelemetry/api": "^1.3.0" } }, + "node_modules/@opentelemetry/instrumentation-nestjs-core/node_modules/@opentelemetry/api-logs": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.53.0.tgz", + "integrity": "sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api": "^1.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@opentelemetry/instrumentation-nestjs-core/node_modules/@opentelemetry/instrumentation": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.53.0.tgz", + "integrity": "sha512-DMwg0hy4wzf7K73JJtl95m/e0boSoWhH07rfvHvYzQtBD3Bmv0Wc1x733vyZBqmFm8OjJD0/pfiUg1W3JjFX0A==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api-logs": "0.53.0", + "@types/shimmer": "^1.2.0", + "import-in-the-middle": "^1.8.1", + "require-in-the-middle": "^7.1.1", + "semver": "^7.5.2", + "shimmer": "^1.2.1" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-nestjs-core/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@opentelemetry/instrumentation-pg": { - "version": "0.49.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-pg/-/instrumentation-pg-0.49.0.tgz", - "integrity": "sha512-3alvNNjPXVdAPdY1G7nGRVINbDxRK02+KAugDiEpzw0jFQfU8IzFkSWA4jyU4/GbMxKvHD+XIOEfSjpieSodKw==", + "version": "0.44.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-pg/-/instrumentation-pg-0.44.0.tgz", + "integrity": "sha512-oTWVyzKqXud1BYEGX1loo2o4k4vaU1elr3vPO8NZolrBtFvQ34nx4HgUaexUDuEog00qQt+MLR5gws/p+JXMLQ==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "^1.26.0", - "@opentelemetry/instrumentation": "^0.56.0", - "@opentelemetry/semantic-conventions": "1.27.0", + "@opentelemetry/instrumentation": "^0.53.0", + "@opentelemetry/semantic-conventions": "^1.27.0", "@opentelemetry/sql-common": "^0.40.1", "@types/pg": "8.6.1", "@types/pg-pool": "2.0.6" @@ -1922,41 +2338,168 @@ "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-pg/node_modules/@opentelemetry/semantic-conventions": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.27.0.tgz", - "integrity": "sha512-sAay1RrB+ONOem0OZanAR1ZI/k7yDpnOQSQmTMuGImUQb2y8EbSaCJ94FQluM74xoU03vlb2d2U90hZluL6nQg==", + "node_modules/@opentelemetry/instrumentation-pg/node_modules/@opentelemetry/api-logs": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.53.0.tgz", + "integrity": "sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api": "^1.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@opentelemetry/instrumentation-pg/node_modules/@opentelemetry/instrumentation": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.53.0.tgz", + "integrity": "sha512-DMwg0hy4wzf7K73JJtl95m/e0boSoWhH07rfvHvYzQtBD3Bmv0Wc1x733vyZBqmFm8OjJD0/pfiUg1W3JjFX0A==", "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api-logs": "0.53.0", + "@types/shimmer": "^1.2.0", + "import-in-the-middle": "^1.8.1", + "require-in-the-middle": "^7.1.1", + "semver": "^7.5.2", + "shimmer": "^1.2.1" + }, "engines": { "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-pg/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/@opentelemetry/instrumentation-redis-4": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis-4/-/instrumentation-redis-4-0.45.0.tgz", - "integrity": "sha512-Sjgym1xn3mdxPRH5CNZtoz+bFd3E3NlGIu7FoYr4YrQouCc9PbnmoBcmSkEdDy5LYgzNildPgsjx9l0EKNjKTQ==", + "version": "0.42.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis-4/-/instrumentation-redis-4-0.42.0.tgz", + "integrity": "sha512-NaD+t2JNcOzX/Qa7kMy68JbmoVIV37fT/fJYzLKu2Wwd+0NCxt+K2OOsOakA8GVg8lSpFdbx4V/suzZZ2Pvdjg==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/instrumentation": "^0.53.0", + "@opentelemetry/redis-common": "^0.36.2", + "@opentelemetry/semantic-conventions": "^1.27.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-redis-4/node_modules/@opentelemetry/api-logs": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.53.0.tgz", + "integrity": "sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api": "^1.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@opentelemetry/instrumentation-redis-4/node_modules/@opentelemetry/instrumentation": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.53.0.tgz", + "integrity": "sha512-DMwg0hy4wzf7K73JJtl95m/e0boSoWhH07rfvHvYzQtBD3Bmv0Wc1x733vyZBqmFm8OjJD0/pfiUg1W3JjFX0A==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api-logs": "0.53.0", + "@types/shimmer": "^1.2.0", + "import-in-the-middle": "^1.8.1", + "require-in-the-middle": "^7.1.1", + "semver": "^7.5.2", + "shimmer": "^1.2.1" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-redis-4/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@opentelemetry/instrumentation-tedious": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-tedious/-/instrumentation-tedious-0.15.0.tgz", + "integrity": "sha512-Kb7yo8Zsq2TUwBbmwYgTAMPK0VbhoS8ikJ6Bup9KrDtCx2JC01nCb+M0VJWXt7tl0+5jARUbKWh5jRSoImxdCw==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/instrumentation": "^0.54.0", + "@opentelemetry/semantic-conventions": "^1.27.0", + "@types/tedious": "^4.0.14" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-undici": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-undici/-/instrumentation-undici-0.6.0.tgz", + "integrity": "sha512-ABJBhm5OdhGmbh0S/fOTE4N69IZ00CsHC5ijMYfzbw3E5NwLgpQk5xsljaECrJ8wz1SfXbO03FiSuu5AyRAkvQ==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "^1.8.0", + "@opentelemetry/instrumentation": "^0.53.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.7.0" + } + }, + "node_modules/@opentelemetry/instrumentation-undici/node_modules/@opentelemetry/api-logs": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.53.0.tgz", + "integrity": "sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.56.0", - "@opentelemetry/redis-common": "^0.36.2", - "@opentelemetry/semantic-conventions": "^1.27.0" + "@opentelemetry/api": "^1.0.0" }, "engines": { "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-tedious": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-tedious/-/instrumentation-tedious-0.17.0.tgz", - "integrity": "sha512-yRBz2409an03uVd1Q2jWMt3SqwZqRFyKoWYYX3hBAtPDazJ4w5L+1VOij71TKwgZxZZNdDBXImTQjii+VeuzLg==", + "node_modules/@opentelemetry/instrumentation-undici/node_modules/@opentelemetry/instrumentation": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.53.0.tgz", + "integrity": "sha512-DMwg0hy4wzf7K73JJtl95m/e0boSoWhH07rfvHvYzQtBD3Bmv0Wc1x733vyZBqmFm8OjJD0/pfiUg1W3JjFX0A==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.56.0", - "@opentelemetry/semantic-conventions": "^1.27.0", - "@types/tedious": "^4.0.14" + "@opentelemetry/api-logs": "0.53.0", + "@types/shimmer": "^1.2.0", + "import-in-the-middle": "^1.8.1", + "require-in-the-middle": "^7.1.1", + "semver": "^7.5.2", + "shimmer": "^1.2.1" }, "engines": { "node": ">=14" @@ -1965,20 +2508,16 @@ "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-undici": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-undici/-/instrumentation-undici-0.9.0.tgz", - "integrity": "sha512-lxc3cpUZ28CqbrWcUHxGW/ObDpMOYbuxF/ZOzeFZq54P9uJ2Cpa8gcrC9F716mtuiMaekwk8D6n34vg/JtkkxQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.56.0" + "node_modules/@opentelemetry/instrumentation-undici/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" }, "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.7.0" + "node": ">=10" } }, "node_modules/@opentelemetry/instrumentation/node_modules/semver": { @@ -2003,13 +2542,13 @@ } }, "node_modules/@opentelemetry/resources": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.30.0.tgz", - "integrity": "sha512-5mGMjL0Uld/99t7/pcd7CuVtJbkARckLVuiOX84nO8RtLtIz0/J6EOHM2TGvPZ6F4K+XjUq13gMx14w80SVCQg==", + "version": "1.28.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.28.0.tgz", + "integrity": "sha512-cIyXSVJjGeTICENN40YSvLDAq4Y2502hGK3iN7tfdynQLKWb3XWZQEkPc+eSx47kiy11YeFAlYkEfXwR1w8kfw==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "1.30.0", - "@opentelemetry/semantic-conventions": "1.28.0" + "@opentelemetry/core": "1.28.0", + "@opentelemetry/semantic-conventions": "1.27.0" }, "engines": { "node": ">=14" @@ -2018,15 +2557,24 @@ "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, + "node_modules/@opentelemetry/resources/node_modules/@opentelemetry/semantic-conventions": { + "version": "1.27.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.27.0.tgz", + "integrity": "sha512-sAay1RrB+ONOem0OZanAR1ZI/k7yDpnOQSQmTMuGImUQb2y8EbSaCJ94FQluM74xoU03vlb2d2U90hZluL6nQg==", + "license": "Apache-2.0", + "engines": { + "node": ">=14" + } + }, "node_modules/@opentelemetry/sdk-trace-base": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.30.0.tgz", - "integrity": "sha512-RKQDaDIkV7PwizmHw+rE/FgfB2a6MBx+AEVVlAHXRG1YYxLiBpPX2KhmoB99R5vA4b72iJrjle68NDWnbrE9Dg==", + "version": "1.28.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.28.0.tgz", + "integrity": "sha512-ceUVWuCpIao7Y5xE02Xs3nQi0tOGmMea17ecBdwtCvdo9ekmO+ijc9RFDgfifMl7XCBf41zne/1POM3LqSTZDA==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "1.30.0", - "@opentelemetry/resources": "1.30.0", - "@opentelemetry/semantic-conventions": "1.28.0" + "@opentelemetry/core": "1.28.0", + "@opentelemetry/resources": "1.28.0", + "@opentelemetry/semantic-conventions": "1.27.0" }, "engines": { "node": ">=14" @@ -2035,6 +2583,15 @@ "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, + "node_modules/@opentelemetry/sdk-trace-base/node_modules/@opentelemetry/semantic-conventions": { + "version": "1.27.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.27.0.tgz", + "integrity": "sha512-sAay1RrB+ONOem0OZanAR1ZI/k7yDpnOQSQmTMuGImUQb2y8EbSaCJ94FQluM74xoU03vlb2d2U90hZluL6nQg==", + "license": "Apache-2.0", + "engines": { + "node": ">=14" + } + }, "node_modules/@opentelemetry/semantic-conventions": { "version": "1.28.0", "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.28.0.tgz", @@ -2082,20 +2639,20 @@ } }, "node_modules/@prisma/instrumentation": { - "version": "5.22.0", - "resolved": "https://registry.npmjs.org/@prisma/instrumentation/-/instrumentation-5.22.0.tgz", - "integrity": "sha512-LxccF392NN37ISGxIurUljZSh1YWnphO34V5a0+T7FVQG2u9bhAXRTJpgmQ3483woVhkraQZFF7cbRrpbw/F4Q==", + "version": "5.19.1", + "resolved": "https://registry.npmjs.org/@prisma/instrumentation/-/instrumentation-5.19.1.tgz", + "integrity": "sha512-VLnzMQq7CWroL5AeaW0Py2huiNKeoMfCH3SUxstdzPrlWQi6UQ9UrfcbUkNHlVFqOMacqy8X/8YtE0kuKDpD9w==", "license": "Apache-2.0", "dependencies": { "@opentelemetry/api": "^1.8", - "@opentelemetry/instrumentation": "^0.49 || ^0.50 || ^0.51 || ^0.52.0 || ^0.53.0", + "@opentelemetry/instrumentation": "^0.49 || ^0.50 || ^0.51 || ^0.52.0", "@opentelemetry/sdk-trace-base": "^1.22" } }, "node_modules/@prisma/instrumentation/node_modules/@opentelemetry/api-logs": { - "version": "0.53.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.53.0.tgz", - "integrity": "sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw==", + "version": "0.52.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.52.1.tgz", + "integrity": "sha512-qnSqB2DQ9TPP96dl8cDubDvrUyWc0/sK81xHTK8eSUspzDM3bsewX903qclQFvVhgStjRWdC5bLb3kQqMkfV5A==", "license": "Apache-2.0", "dependencies": { "@opentelemetry/api": "^1.0.0" @@ -2105,13 +2662,13 @@ } }, "node_modules/@prisma/instrumentation/node_modules/@opentelemetry/instrumentation": { - "version": "0.53.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.53.0.tgz", - "integrity": "sha512-DMwg0hy4wzf7K73JJtl95m/e0boSoWhH07rfvHvYzQtBD3Bmv0Wc1x733vyZBqmFm8OjJD0/pfiUg1W3JjFX0A==", + "version": "0.52.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.52.1.tgz", + "integrity": "sha512-uXJbYU/5/MBHjMp1FqrILLRuiJCs3Ofk0MeRDk8g1S1gD47U8X3JnSwcMO1rtRo1x1a7zKaQHaoYu49p/4eSKw==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api-logs": "0.53.0", - "@types/shimmer": "^1.2.0", + "@opentelemetry/api-logs": "0.52.1", + "@types/shimmer": "^1.0.2", "import-in-the-middle": "^1.8.1", "require-in-the-middle": "^7.1.1", "semver": "^7.5.2", @@ -2212,9 +2769,9 @@ } }, "node_modules/@rollup/pluginutils": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.4.tgz", - "integrity": "sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.3.tgz", + "integrity": "sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==", "license": "MIT", "dependencies": { "@types/estree": "^1.0.0", @@ -2251,89 +2808,89 @@ "integrity": "sha512-2/U3GXA6YiPYQDLGwtGlnNgKYBSwCFIHf8Y9LUY5VATHdtbLlU0Y1R3QoBnT0aB4qv/BEiVVsj7LJXoQCgJ2vA==" }, "node_modules/@sentry-internal/browser-utils": { - "version": "8.47.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/browser-utils/-/browser-utils-8.47.0.tgz", - "integrity": "sha512-vOXzYzHTKkahTLDzWWIA4EiVCQ+Gk+7xGWUlNcR2ZiEPBqYZVb5MjsUozAcc7syrSUy6WicyFjcomZ3rlCVQhg==", + "version": "8.42.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/browser-utils/-/browser-utils-8.42.0.tgz", + "integrity": "sha512-xzgRI0wglKYsPrna574w1t38aftuvo44gjOKFvPNGPnYfiW9y4m+64kUz3JFbtanvOrKPcaITpdYiB4DeJXEbA==", "license": "MIT", "dependencies": { - "@sentry/core": "8.47.0" + "@sentry/core": "8.42.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/feedback": { - "version": "8.47.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-8.47.0.tgz", - "integrity": "sha512-IAiIemTQIalxAOYhUENs9bZ8pMNgJnX3uQSuY7v0gknEqClOGpGkG04X/cxCmtJUj1acZ9ShTGDxoh55a+ggAQ==", + "version": "8.42.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-8.42.0.tgz", + "integrity": "sha512-dkIw5Wdukwzngg5gNJ0QcK48LyJaMAnBspqTqZ3ItR01STi6Z+6+/Bt5XgmrvDgRD+FNBinflc5zMmfdFXXhvw==", "license": "MIT", "dependencies": { - "@sentry/core": "8.47.0" + "@sentry/core": "8.42.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/replay": { - "version": "8.47.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/replay/-/replay-8.47.0.tgz", - "integrity": "sha512-G/S40ZBORj0HSMLw/uVC6YDEPN/dqVk901vf4VYfml686DEhJrZesfAfp5SydJumQ0NKZQrdtvny+BWnlI5H1w==", + "version": "8.42.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay/-/replay-8.42.0.tgz", + "integrity": "sha512-oNcJEBlDfXnRFYC5Mxj5fairyZHNqlnU4g8kPuztB9G5zlsyLgWfPxzcn1ixVQunth2/WZRklDi4o1ZfyHww7w==", "license": "MIT", "dependencies": { - "@sentry-internal/browser-utils": "8.47.0", - "@sentry/core": "8.47.0" + "@sentry-internal/browser-utils": "8.42.0", + "@sentry/core": "8.42.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/replay-canvas": { - "version": "8.47.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-8.47.0.tgz", - "integrity": "sha512-M4W9UGouEeELbGbP3QsXLDVtGiQSZoWJlKwqMWyqdQgZuLoKw0S33+60t6teLVMhuQZR0UI9VJTF5coiXysnnA==", + "version": "8.42.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-8.42.0.tgz", + "integrity": "sha512-XrPErqVhPsPh/oFLVKvz7Wb+Fi2J1zCPLeZCxWqFuPWI2agRyLVu0KvqJyzSpSrRAEJC/XFzuSVILlYlXXSfgA==", "license": "MIT", "dependencies": { - "@sentry-internal/replay": "8.47.0", - "@sentry/core": "8.47.0" + "@sentry-internal/replay": "8.42.0", + "@sentry/core": "8.42.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry/babel-plugin-component-annotate": { - "version": "2.22.7", - "resolved": "https://registry.npmjs.org/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-2.22.7.tgz", - "integrity": "sha512-aa7XKgZMVl6l04NY+3X7BP7yvQ/s8scn8KzQfTLrGRarziTlMGrsCOBQtCNWXOPEbtxAIHpZ9dsrAn5EJSivOQ==", + "version": "2.22.6", + "resolved": "https://registry.npmjs.org/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-2.22.6.tgz", + "integrity": "sha512-V2g1Y1I5eSe7dtUVMBvAJr8BaLRr4CLrgNgtPaZyMT4Rnps82SrZ5zqmEkLXPumlXhLUWR6qzoMNN2u+RXVXfQ==", "license": "MIT", "engines": { "node": ">= 14" } }, "node_modules/@sentry/browser": { - "version": "8.47.0", - "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-8.47.0.tgz", - "integrity": "sha512-K6BzHisykmbFy/wORtGyfsAlw7ShevLALzu3ReZZZ18dVubO1bjSNjkZQU9MJD5Jcb9oLwkq89n3N9XIBfvdRA==", + "version": "8.42.0", + "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-8.42.0.tgz", + "integrity": "sha512-lStrEk609KJHwXfDrOgoYVVoFFExixHywxSExk7ZDtwj2YPv6r6Y1gogvgr7dAZj7jWzadHkxZ33l9EOSJBfug==", "license": "MIT", "dependencies": { - "@sentry-internal/browser-utils": "8.47.0", - "@sentry-internal/feedback": "8.47.0", - "@sentry-internal/replay": "8.47.0", - "@sentry-internal/replay-canvas": "8.47.0", - "@sentry/core": "8.47.0" + "@sentry-internal/browser-utils": "8.42.0", + "@sentry-internal/feedback": "8.42.0", + "@sentry-internal/replay": "8.42.0", + "@sentry-internal/replay-canvas": "8.42.0", + "@sentry/core": "8.42.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry/bundler-plugin-core": { - "version": "2.22.7", - "resolved": "https://registry.npmjs.org/@sentry/bundler-plugin-core/-/bundler-plugin-core-2.22.7.tgz", - "integrity": "sha512-ouQh5sqcB8vsJ8yTTe0rf+iaUkwmeUlGNFi35IkCFUQlWJ22qS6OfvNjOqFI19e6eGUXks0c/2ieFC4+9wJ+1g==", + "version": "2.22.6", + "resolved": "https://registry.npmjs.org/@sentry/bundler-plugin-core/-/bundler-plugin-core-2.22.6.tgz", + "integrity": "sha512-1esQdgSUCww9XAntO4pr7uAM5cfGhLsgTK9MEwAKNfvpMYJi9NUTYa3A7AZmdA8V6107Lo4OD7peIPrDRbaDCg==", "license": "MIT", "dependencies": { "@babel/core": "^7.18.5", - "@sentry/babel-plugin-component-annotate": "2.22.7", - "@sentry/cli": "2.39.1", + "@sentry/babel-plugin-component-annotate": "2.22.6", + "@sentry/cli": "^2.36.1", "dotenv": "^16.3.1", "find-up": "^5.0.0", "glob": "^9.3.2", @@ -2501,30 +3058,31 @@ } }, "node_modules/@sentry/core": { - "version": "8.47.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.47.0.tgz", - "integrity": "sha512-iSEJZMe3DOcqBFZQAqgA3NB2lCWBc4Gv5x/SCri/TVg96wAlss4VrUunSI2Mp0J4jJ5nJcJ2ChqHSBAU48k3FA==", + "version": "8.42.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.42.0.tgz", + "integrity": "sha512-ac6O3pgoIbU6rpwz6LlwW0wp3/GAHuSI0C5IsTgIY6baN8rOBnlAtG6KrHDDkGmUQ2srxkDJu9n1O6Td3cBCqw==", "license": "MIT", "engines": { "node": ">=14.18" } }, "node_modules/@sentry/nextjs": { - "version": "8.47.0", - "resolved": "https://registry.npmjs.org/@sentry/nextjs/-/nextjs-8.47.0.tgz", - "integrity": "sha512-qr++MBYhyAwF25hGq7LAxe3Xehs+w2V4b8mVxilRYFXNkWFazY1ukZcVzq9pKrrt5uTiURTf68e8eVMraHnHEQ==", + "version": "8.42.0", + "resolved": "https://registry.npmjs.org/@sentry/nextjs/-/nextjs-8.42.0.tgz", + "integrity": "sha512-8gZ0kVwaMpNeDg510m/8OSIuPSahP9GaKoFwPqscbvvbk1Hd+9wdW2X6YhdY+KzKiPLmYH/dGU20CvtN0iZqeg==", "license": "MIT", "dependencies": { "@opentelemetry/api": "^1.9.0", - "@opentelemetry/semantic-conventions": "^1.28.0", + "@opentelemetry/instrumentation-http": "0.53.0", + "@opentelemetry/semantic-conventions": "^1.27.0", "@rollup/plugin-commonjs": "28.0.1", - "@sentry-internal/browser-utils": "8.47.0", - "@sentry/core": "8.47.0", - "@sentry/node": "8.47.0", - "@sentry/opentelemetry": "8.47.0", - "@sentry/react": "8.47.0", - "@sentry/vercel-edge": "8.47.0", - "@sentry/webpack-plugin": "2.22.7", + "@sentry-internal/browser-utils": "8.42.0", + "@sentry/core": "8.42.0", + "@sentry/node": "8.42.0", + "@sentry/opentelemetry": "8.42.0", + "@sentry/react": "8.42.0", + "@sentry/vercel-edge": "8.42.0", + "@sentry/webpack-plugin": "2.22.6", "chalk": "3.0.0", "resolve": "1.22.8", "rollup": "3.29.5", @@ -2541,6 +3099,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -2555,6 +3114,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -2567,6 +3127,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -2577,12 +3138,14 @@ "node_modules/@sentry/nextjs/node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" }, "node_modules/@sentry/nextjs/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "license": "MIT", "engines": { "node": ">=8" } @@ -2591,6 +3154,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -2599,45 +3163,45 @@ } }, "node_modules/@sentry/node": { - "version": "8.47.0", - "resolved": "https://registry.npmjs.org/@sentry/node/-/node-8.47.0.tgz", - "integrity": "sha512-tMzeU3KkmDi2OVvSu+Ah5pwoi7srsSyc1DovBbRQU96RFf/lOFzGe9JERa1MyDUqqLH95NqnPTNsa4Amb8/Vxg==", + "version": "8.42.0", + "resolved": "https://registry.npmjs.org/@sentry/node/-/node-8.42.0.tgz", + "integrity": "sha512-MsNrmAIwDaxf1jTX1FsgZ+3mUq6G6IuU6FAqyp7TDnvUTsbWUtr0OM6EvVUz0zCImybIh9dcTQ+6KTmUyA7URw==", "license": "MIT", "dependencies": { "@opentelemetry/api": "^1.9.0", - "@opentelemetry/context-async-hooks": "^1.29.0", - "@opentelemetry/core": "^1.29.0", - "@opentelemetry/instrumentation": "^0.56.0", - "@opentelemetry/instrumentation-amqplib": "^0.45.0", - "@opentelemetry/instrumentation-connect": "0.42.0", - "@opentelemetry/instrumentation-dataloader": "0.15.0", - "@opentelemetry/instrumentation-express": "0.46.0", - "@opentelemetry/instrumentation-fastify": "0.43.0", - "@opentelemetry/instrumentation-fs": "0.18.0", - "@opentelemetry/instrumentation-generic-pool": "0.42.0", - "@opentelemetry/instrumentation-graphql": "0.46.0", - "@opentelemetry/instrumentation-hapi": "0.44.0", - "@opentelemetry/instrumentation-http": "0.56.0", - "@opentelemetry/instrumentation-ioredis": "0.46.0", - "@opentelemetry/instrumentation-kafkajs": "0.6.0", - "@opentelemetry/instrumentation-knex": "0.43.0", - "@opentelemetry/instrumentation-koa": "0.46.0", - "@opentelemetry/instrumentation-lru-memoizer": "0.43.0", - "@opentelemetry/instrumentation-mongodb": "0.50.0", - "@opentelemetry/instrumentation-mongoose": "0.45.0", - "@opentelemetry/instrumentation-mysql": "0.44.0", - "@opentelemetry/instrumentation-mysql2": "0.44.0", - "@opentelemetry/instrumentation-nestjs-core": "0.43.0", - "@opentelemetry/instrumentation-pg": "0.49.0", - "@opentelemetry/instrumentation-redis-4": "0.45.0", - "@opentelemetry/instrumentation-tedious": "0.17.0", - "@opentelemetry/instrumentation-undici": "0.9.0", - "@opentelemetry/resources": "^1.29.0", - "@opentelemetry/sdk-trace-base": "^1.29.0", - "@opentelemetry/semantic-conventions": "^1.28.0", - "@prisma/instrumentation": "5.22.0", - "@sentry/core": "8.47.0", - "@sentry/opentelemetry": "8.47.0", + "@opentelemetry/context-async-hooks": "^1.25.1", + "@opentelemetry/core": "^1.25.1", + "@opentelemetry/instrumentation": "^0.54.0", + "@opentelemetry/instrumentation-amqplib": "^0.43.0", + "@opentelemetry/instrumentation-connect": "0.40.0", + "@opentelemetry/instrumentation-dataloader": "0.12.0", + "@opentelemetry/instrumentation-express": "0.44.0", + "@opentelemetry/instrumentation-fastify": "0.41.0", + "@opentelemetry/instrumentation-fs": "0.16.0", + "@opentelemetry/instrumentation-generic-pool": "0.39.0", + "@opentelemetry/instrumentation-graphql": "0.44.0", + "@opentelemetry/instrumentation-hapi": "0.41.0", + "@opentelemetry/instrumentation-http": "0.53.0", + "@opentelemetry/instrumentation-ioredis": "0.43.0", + "@opentelemetry/instrumentation-kafkajs": "0.4.0", + "@opentelemetry/instrumentation-knex": "0.41.0", + "@opentelemetry/instrumentation-koa": "0.43.0", + "@opentelemetry/instrumentation-lru-memoizer": "0.40.0", + "@opentelemetry/instrumentation-mongodb": "0.48.0", + "@opentelemetry/instrumentation-mongoose": "0.42.0", + "@opentelemetry/instrumentation-mysql": "0.41.0", + "@opentelemetry/instrumentation-mysql2": "0.41.0", + "@opentelemetry/instrumentation-nestjs-core": "0.40.0", + "@opentelemetry/instrumentation-pg": "0.44.0", + "@opentelemetry/instrumentation-redis-4": "0.42.0", + "@opentelemetry/instrumentation-tedious": "0.15.0", + "@opentelemetry/instrumentation-undici": "0.6.0", + "@opentelemetry/resources": "^1.26.0", + "@opentelemetry/sdk-trace-base": "^1.26.0", + "@opentelemetry/semantic-conventions": "^1.27.0", + "@prisma/instrumentation": "5.19.1", + "@sentry/core": "8.42.0", + "@sentry/opentelemetry": "8.42.0", "import-in-the-middle": "^1.11.2" }, "engines": { @@ -2645,32 +3209,32 @@ } }, "node_modules/@sentry/opentelemetry": { - "version": "8.47.0", - "resolved": "https://registry.npmjs.org/@sentry/opentelemetry/-/opentelemetry-8.47.0.tgz", - "integrity": "sha512-wunyBIUPeY6Kx3SFhOQqOPs+hyRADO5bztpo8aZ3N3xfzhefSTOdrgUroKvHx1DvoQO6MAlykcuUFps3yfaqmg==", + "version": "8.42.0", + "resolved": "https://registry.npmjs.org/@sentry/opentelemetry/-/opentelemetry-8.42.0.tgz", + "integrity": "sha512-QPb9kMFgl35TIwIz0u+BFTbPG461CofMiloidJ44GFZ9cB33T5cB0oIN7ut/5tsH/AvqUmucydsV/Nj3HNQx9g==", "license": "MIT", "dependencies": { - "@sentry/core": "8.47.0" + "@sentry/core": "8.42.0" }, "engines": { "node": ">=14.18" }, "peerDependencies": { "@opentelemetry/api": "^1.9.0", - "@opentelemetry/core": "^1.29.0", - "@opentelemetry/instrumentation": "^0.56.0", - "@opentelemetry/sdk-trace-base": "^1.29.0", - "@opentelemetry/semantic-conventions": "^1.28.0" + "@opentelemetry/core": "^1.25.1", + "@opentelemetry/instrumentation": "^0.54.0", + "@opentelemetry/sdk-trace-base": "^1.26.0", + "@opentelemetry/semantic-conventions": "^1.27.0" } }, "node_modules/@sentry/react": { - "version": "8.47.0", - "resolved": "https://registry.npmjs.org/@sentry/react/-/react-8.47.0.tgz", - "integrity": "sha512-SRk2Up+qBTow4rQGiRXViC2i4M5w/tae5w8I/rmX+IxFoPyh8wXERcLAj/8xbbRm8aR+A4i5gNgfFtrYsyFJFA==", + "version": "8.42.0", + "resolved": "https://registry.npmjs.org/@sentry/react/-/react-8.42.0.tgz", + "integrity": "sha512-UBi/WM4oMa+kOA99R7t7Ke57zq6uQw6mALYW4fJ+wuhHZJBLDDDHSGpEUhdWuQ1oWQv/laT34DGS44PJOjfeAg==", "license": "MIT", "dependencies": { - "@sentry/browser": "8.47.0", - "@sentry/core": "8.47.0", + "@sentry/browser": "8.42.0", + "@sentry/core": "8.42.0", "hoist-non-react-statics": "^3.3.2" }, "engines": { @@ -2681,25 +3245,25 @@ } }, "node_modules/@sentry/vercel-edge": { - "version": "8.47.0", - "resolved": "https://registry.npmjs.org/@sentry/vercel-edge/-/vercel-edge-8.47.0.tgz", - "integrity": "sha512-oEVyoFehBnbao1aKd5OagkA5H2zowMsbgRZRPLFHELCSyoJbpShEM6L33rVvDz9xnkcaahuEO8op9U/4pUj1vA==", + "version": "8.42.0", + "resolved": "https://registry.npmjs.org/@sentry/vercel-edge/-/vercel-edge-8.42.0.tgz", + "integrity": "sha512-OvUPowWCLqrllJ/1mUs2SfkNGNVjYDJ2+nmbHOdK7SMlUaHatKbCrb1nUWzRgWJ5E+ztsXi3uCC7cE1a3kA/rQ==", "license": "MIT", "dependencies": { "@opentelemetry/api": "^1.9.0", - "@sentry/core": "8.47.0" + "@sentry/core": "8.42.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry/webpack-plugin": { - "version": "2.22.7", - "resolved": "https://registry.npmjs.org/@sentry/webpack-plugin/-/webpack-plugin-2.22.7.tgz", - "integrity": "sha512-j5h5LZHWDlm/FQCCmEghQ9FzYXwfZdlOf3FE/X6rK6lrtx0JCAkq+uhMSasoyP4XYKL4P4vRS6WFSos4jxf/UA==", + "version": "2.22.6", + "resolved": "https://registry.npmjs.org/@sentry/webpack-plugin/-/webpack-plugin-2.22.6.tgz", + "integrity": "sha512-BiLhAzQYAz/9kCXKj2LeUKWf/9GBVn2dD0DeYK89s+sjDEaxjbcLBBiLlLrzT7eC9QVj2tUZRKOi6puCfc8ysw==", "license": "MIT", "dependencies": { - "@sentry/bundler-plugin-core": "2.22.7", + "@sentry/bundler-plugin-core": "2.22.6", "unplugin": "1.0.1", "uuid": "^9.0.0" }, @@ -2772,16 +3336,6 @@ "node": ">=0.8.0" } }, - "node_modules/@types/draftjs-to-html": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/@types/draftjs-to-html/-/draftjs-to-html-0.8.4.tgz", - "integrity": "sha512-5FZcjFoJL57N/IttLCTCNI0krX+181oCl5hf76u3TqPkqBAphHrJAO9ReYesx9138kcObaYmpnWC2Yrqxoqd2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/draft-js": "*" - } - }, "node_modules/@types/eslint": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", @@ -2881,8 +3435,7 @@ "node_modules/@types/parse-json": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz", - "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==", - "license": "MIT" + "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==" }, "node_modules/@types/pg": { "version": "8.6.1", @@ -2905,10 +3458,9 @@ } }, "node_modules/@types/prop-types": { - "version": "15.7.14", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.14.tgz", - "integrity": "sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ==", - "license": "MIT" + "version": "15.7.11", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz", + "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==" }, "node_modules/@types/react": { "version": "18.0.28", @@ -2920,19 +3472,6 @@ "csstype": "^3.0.2" } }, - "node_modules/@types/react-color": { - "version": "3.0.13", - "resolved": "https://registry.npmjs.org/@types/react-color/-/react-color-3.0.13.tgz", - "integrity": "sha512-2c/9FZ4ixC5T3JzN0LP5Cke2Mf0MKOP2Eh0NPDPWmuVH3NjPyhEjqNMQpN1Phr5m74egAy+p2lYNAFrX1z9Yrg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/reactcss": "*" - }, - "peerDependencies": { - "@types/react": "*" - } - }, "node_modules/@types/react-dom": { "version": "18.0.11", "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.11.tgz", @@ -2951,16 +3490,6 @@ "@types/react": "*" } }, - "node_modules/@types/react-lottie": { - "version": "1.2.10", - "resolved": "https://registry.npmjs.org/@types/react-lottie/-/react-lottie-1.2.10.tgz", - "integrity": "sha512-rCd1p3US4ELKJlqwVnP0h5b24zt5p9OCvKUoNpYExLqwbFZMWEiJ6EGLMmH7nmq5V7KomBIbWO2X/XRFsL0vCA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/react": "*" - } - }, "node_modules/@types/react-syntax-highlighter": { "version": "15.5.10", "resolved": "https://registry.npmjs.org/@types/react-syntax-highlighter/-/react-syntax-highlighter-15.5.10.tgz", @@ -2971,21 +3500,10 @@ } }, "node_modules/@types/react-transition-group": { - "version": "4.4.12", - "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.12.tgz", - "integrity": "sha512-8TV6R3h2j7a91c+1DXdJi3Syo69zzIZbz7Lg5tORM5LEJG7X/E6a1V3drRyBRZq7/utz7A+c4OgYLiLcYGHG6w==", - "license": "MIT", - "peerDependencies": { - "@types/react": "*" - } - }, - "node_modules/@types/reactcss": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/@types/reactcss/-/reactcss-1.2.13.tgz", - "integrity": "sha512-gi3S+aUi6kpkF5vdhUsnkwbiSEIU/BEJyD7kBy2SudWBUuKmJk8AQKE0OVcQQeEy40Azh0lV6uynxlikYIJuwg==", - "dev": true, - "license": "MIT", - "peerDependencies": { + "version": "4.4.9", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.9.tgz", + "integrity": "sha512-ZVNmWumUIh5NhH8aMD9CR2hdW0fNuYInlocZHaZ+dgk/1K49j1w/HoAuK1ki+pgscQrOFRTlXeoURtuzEkV3dg==", + "dependencies": { "@types/react": "*" } }, @@ -3400,48 +3918,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ajv-formats": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", - "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", - "license": "MIT", - "peer": true, - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "node_modules/ajv-formats/node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "license": "MIT", - "peer": true, - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-formats/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "license": "MIT", - "peer": true - }, "node_modules/ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -3690,7 +4166,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz", "integrity": "sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==", - "license": "MIT", "dependencies": { "@babel/runtime": "^7.12.5", "cosmiconfig": "^7.0.0", @@ -3753,8 +4228,7 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/binary-extensions": { "version": "2.2.0", @@ -3785,9 +4259,9 @@ } }, "node_modules/browserslist": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.3.tgz", - "integrity": "sha512-1CPmv8iobE2fyRMV97dAcMVegvvWKxmq94hkLiAkUGwKVTyDLw33K+ZxiFrREKmmps4rIw6grcCFCnTMSZ/YiA==", + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", + "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", "funding": [ { "type": "opencollective", @@ -3804,9 +4278,9 @@ ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001688", - "electron-to-chromium": "^1.5.73", - "node-releases": "^2.0.19", + "caniuse-lite": "^1.0.30001669", + "electron-to-chromium": "^1.5.41", + "node-releases": "^2.0.18", "update-browserslist-db": "^1.1.1" }, "bin": { @@ -3834,7 +4308,6 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" @@ -3877,9 +4350,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001690", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001690.tgz", - "integrity": "sha512-5ExiE3qQN6oF8Clf8ifIDcMRCRE/dMGcETG/XGMD8/XiXm6HXQgQTh1yZYLXXpSOsEUlJm1Xr7kGULZTuGtP/w==", + "version": "1.0.30001684", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001684.tgz", + "integrity": "sha512-G1LRwLIQjBQoyq0ZJGqGIJUXzJ8irpbjHLpVRXDvBEScFJ9b17sgK6vlx0GAJFE21okD7zXl08rRRUfq6HdoEQ==", "funding": [ { "type": "opencollective", @@ -4059,10 +4532,9 @@ "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==" }, "node_modules/clsx": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", - "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", - "license": "MIT", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", + "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==", "engines": { "node": ">=6" } @@ -4142,7 +4614,6 @@ "version": "7.1.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", - "license": "MIT", "dependencies": { "@types/parse-json": "^4.0.0", "import-fresh": "^3.2.1", @@ -4211,10 +4682,9 @@ } }, "node_modules/csstype": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", - "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", - "license": "MIT" + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", + "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==" }, "node_modules/damerau-levenshtein": { "version": "1.0.8", @@ -4345,9 +4815,9 @@ } }, "node_modules/dotenv": { - "version": "16.4.7", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", - "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", "license": "BSD-2-Clause", "engines": { "node": ">=12" @@ -4370,43 +4840,6 @@ "react-dom": ">=0.14.0" } }, - "node_modules/draft-js-import-element": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/draft-js-import-element/-/draft-js-import-element-1.4.0.tgz", - "integrity": "sha512-WmYT5PrCm47lGL5FkH6sRO3TTAcn7qNHsD3igiPqLG/RXrqyKrqN4+wBgbcT2lhna/yfWTRtgzAbQsSJoS1Meg==", - "license": "ISC", - "dependencies": { - "draft-js-utils": "^1.4.0", - "synthetic-dom": "^1.4.0" - }, - "peerDependencies": { - "draft-js": ">=0.10.0", - "immutable": "3.x.x" - } - }, - "node_modules/draft-js-import-html": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/draft-js-import-html/-/draft-js-import-html-1.4.1.tgz", - "integrity": "sha512-KOZmtgxZriCDgg5Smr3Y09TjubvXe7rHPy/2fuLSsL+aSzwUDwH/aHDA/k47U+WfpmL4qgyg4oZhqx9TYJV0tg==", - "license": "ISC", - "dependencies": { - "draft-js-import-element": "^1.4.0" - }, - "peerDependencies": { - "draft-js": ">=0.10.0", - "immutable": "3.x.x" - } - }, - "node_modules/draft-js-utils": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/draft-js-utils/-/draft-js-utils-1.4.1.tgz", - "integrity": "sha512-xE81Y+z/muC5D5z9qWmKfxEW1XyXfsBzSbSBk2JRsoD0yzMGGHQm/0MtuqHl/EUDkaBJJLjJ2EACycoDMY/OOg==", - "license": "ISC", - "peerDependencies": { - "draft-js": ">=0.10.0", - "immutable": "3.x.x" - } - }, "node_modules/draft-js/node_modules/immutable": { "version": "3.7.6", "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.7.6.tgz", @@ -4415,12 +4848,6 @@ "node": ">=0.8.0" } }, - "node_modules/draftjs-to-html": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/draftjs-to-html/-/draftjs-to-html-0.9.1.tgz", - "integrity": "sha512-fFstE6+IayaVFBEvaFt/wN8vdj8FsTRzij7dy7LI9QIwf5LgfHFi9zSpvCg+feJ2tbYVqHxUkjcibwpsTpgFVQ==", - "license": "MIT" - }, "node_modules/draftjs-utils": { "version": "0.10.2", "resolved": "https://registry.npmjs.org/draftjs-utils/-/draftjs-utils-0.10.2.tgz", @@ -4442,9 +4869,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.5.75", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.75.tgz", - "integrity": "sha512-Lf3++DumRE/QmweGjU+ZcKqQ+3bKkU/qjaKYhIJKEOhgIO9Xs6IiAQFkfFoj+RhgDk4LUeNsLo6plExHqSyu6Q==", + "version": "1.5.67", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.67.tgz", + "integrity": "sha512-nz88NNBsD7kQSAGGJyp8hS6xSPtWwqNogA0mjtc2nUYeEf3nURK9qpV18TuBdDmEDgVWotS8Wkzf+V52dSQ/LQ==", "license": "ISC" }, "node_modules/emoji-regex": { @@ -4464,9 +4891,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.0.tgz", - "integrity": "sha512-0/r0MySGYG8YqlayBZ6MuCfECmHFdJ5qyPh8s8wa5Hnm6SaFLSK1VYCbj+NKp090Nm1caZhD+QTnmxO7esYGyQ==", + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", "license": "MIT", "dependencies": { "graceful-fs": "^4.2.4", @@ -4480,7 +4907,6 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "license": "MIT", "dependencies": { "is-arrayish": "^0.2.1" } @@ -5256,13 +5682,6 @@ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" }, - "node_modules/fast-uri": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.3.tgz", - "integrity": "sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==", - "license": "BSD-3-Clause", - "peer": true - }, "node_modules/fastq": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", @@ -5328,8 +5747,7 @@ "node_modules/find-root": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", - "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", - "license": "MIT" + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==" }, "node_modules/find-up": { "version": "5.0.0", @@ -5399,12 +5817,6 @@ "node": ">=0.4.x" } }, - "node_modules/forwarded-parse": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/forwarded-parse/-/forwarded-parse-2.1.2.tgz", - "integrity": "sha512-alTFZZQDKMporBH77856pXgzhEzaUVmLCDk+egLgIgHst3Tpndzz8MnKe+GzRJRfvVdn69HhpW7cmXzvtLvJAw==", - "license": "MIT" - }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -5922,8 +6334,7 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "BSD-3-Clause" + ] }, "node_modules/ignore": { "version": "5.3.0", @@ -5943,14 +6354,9 @@ } }, "node_modules/immutable": { - "version": "3.8.2", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.2.tgz", - "integrity": "sha512-15gZoQ38eYjEjxkorfbcgBKBL6R7T459OuK+CpcWt7O3KF4uPCx2tD0uFETlUDIyo+1789crbMhTvQBSR5yBMg==", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.4.tgz", + "integrity": "sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==" }, "node_modules/import-fresh": { "version": "3.3.0", @@ -5968,9 +6374,9 @@ } }, "node_modules/import-in-the-middle": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.12.0.tgz", - "integrity": "sha512-yAgSE7GmtRcu4ZUSFX/4v69UGXwugFFSdIQJ14LHPOPPQrWv8Y7O9PHsw8Ovk7bKCLe4sjXMbZFqGFcLHpZ89w==", + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.11.2.tgz", + "integrity": "sha512-gK6Rr6EykBcc6cVWRSBR5TWf8nn6hZMYSRYqCcHa0l0d1fPK7JSYo6+Mlmck76jIX9aL/IZ71c06U2VpFwl1zA==", "license": "Apache-2.0", "dependencies": { "acorn": "^8.8.2", @@ -6072,8 +6478,7 @@ "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "license": "MIT" + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" }, "node_modules/is-async-function": { "version": "2.0.0", @@ -6541,8 +6946,7 @@ "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "license": "MIT" + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, "node_modules/json-schema-traverse": { "version": "0.4.1", @@ -6627,8 +7031,7 @@ "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "license": "MIT" + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" }, "node_modules/linkify-it": { "version": "2.2.0", @@ -6740,12 +7143,6 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, - "node_modules/lodash-es": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", - "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==", - "license": "MIT" - }, "node_modules/lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", @@ -6844,9 +7241,9 @@ } }, "node_modules/magic-string": { - "version": "0.30.17", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", - "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", + "version": "0.30.14", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.14.tgz", + "integrity": "sha512-5c99P1WKTed11ZC0HMJOj6CDIue6F8ySu+bJL+85q1zBEIY8IklrJ1eiKC2NDRh3Ct3FcvmJPyQHb9erXMTJNw==", "license": "MIT", "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0" @@ -6861,12 +7258,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/material-colors": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/material-colors/-/material-colors-1.2.6.tgz", - "integrity": "sha512-6qE4B9deFBIa9YSpOc9O0Sgc43zTeVYbgDT5veRKSlB2+ZuHNoVVxA1L/ckMUayV9Ay9y7Z/SZCLcGteW9i7bg==", - "license": "ISC" - }, "node_modules/mdast-util-definitions": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-5.1.2.tgz", @@ -7897,9 +8288,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", - "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", "license": "MIT" }, "node_modules/normalize-path": { @@ -8204,7 +8595,6 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "license": "MIT", "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", @@ -8583,24 +8973,6 @@ "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, - "node_modules/react-color": { - "version": "2.19.3", - "resolved": "https://registry.npmjs.org/react-color/-/react-color-2.19.3.tgz", - "integrity": "sha512-LEeGE/ZzNLIsFWa1TMe8y5VYqr7bibneWmvJwm1pCn/eNmrabWDh659JSPn9BuaMpEfU83WTOJfnCcjDZwNQTA==", - "license": "MIT", - "dependencies": { - "@icons/material": "^0.2.4", - "lodash": "^4.17.15", - "lodash-es": "^4.17.15", - "material-colors": "^1.2.1", - "prop-types": "^15.5.10", - "reactcss": "^1.2.0", - "tinycolor2": "^1.4.1" - }, - "peerDependencies": { - "react": "*" - } - }, "node_modules/react-cookie": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/react-cookie/-/react-cookie-4.1.1.tgz", @@ -8783,15 +9155,6 @@ "react-dom": ">=16.6.0" } }, - "node_modules/reactcss": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/reactcss/-/reactcss-1.2.3.tgz", - "integrity": "sha512-KiwVUcFu1RErkI97ywr8nvx8dNOpT03rbnma0SSalTYjkrPYaEajR4a/MRt6DZ46K6arDRbWMNHF+xH7G7n/8A==", - "license": "MIT", - "dependencies": { - "lodash": "^4.0.1" - } - }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -8925,16 +9288,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/require-in-the-middle": { "version": "7.4.0", "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-7.4.0.tgz", @@ -8950,9 +9303,9 @@ } }, "node_modules/require-in-the-middle/node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -9221,12 +9574,6 @@ "node": ">=14.0.0" } }, - "node_modules/sass/node_modules/immutable": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz", - "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==", - "license": "MIT" - }, "node_modules/scheduler": { "version": "0.23.0", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", @@ -9406,7 +9753,6 @@ "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -9453,6 +9799,7 @@ "version": "0.1.10", "resolved": "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz", "integrity": "sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg==", + "license": "MIT", "dependencies": { "type-fest": "^0.7.1" }, @@ -9464,6 +9811,7 @@ "version": "0.7.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz", "integrity": "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==", + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=8" } @@ -9636,7 +9984,6 @@ "version": "5.3.11", "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-5.3.11.tgz", "integrity": "sha512-uuzIIfnVkagcVHv9nE0VPlHPSCmXIUGKfJ42LNjxCCTDTL5sgnJ8Z7GZBq0EnLYGln77tPpEpExt2+qa+cZqSw==", - "license": "MIT", "dependencies": { "@babel/helper-module-imports": "^7.0.0", "@babel/traverse": "^7.4.5", @@ -9716,12 +10063,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/synthetic-dom": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/synthetic-dom/-/synthetic-dom-1.4.0.tgz", - "integrity": "sha512-mHv51ZsmZ+ShT/4s5kg+MGUIhY7Ltq4v03xpN1c8T1Krb5pScsh/lzEjyhrVD0soVDbThbd2e+4dD9vnDG4rhg==", - "license": "ISC" - }, "node_modules/tapable": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", @@ -9731,9 +10072,9 @@ } }, "node_modules/terser": { - "version": "5.37.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.37.0.tgz", - "integrity": "sha512-B8wRRkmre4ERucLM/uXx4MOV5cbnOlVAqUst+1+iLKPI0dOgFO28f84ptoQt9HEI537PMzfYa/d+GEPKTRXmYA==", + "version": "5.36.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.36.0.tgz", + "integrity": "sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w==", "license": "BSD-2-Clause", "peer": true, "dependencies": { @@ -9750,17 +10091,17 @@ } }, "node_modules/terser-webpack-plugin": { - "version": "5.3.11", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.11.tgz", - "integrity": "sha512-RVCsMfuD0+cTt3EwX8hSl2Ks56EbFHWmhluwcqoPKtBnfjiT6olaq7PRIRfhyU8nnC2MrnDrBLfrD/RGE+cVXQ==", + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", + "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", "license": "MIT", "peer": true, "dependencies": { - "@jridgewell/trace-mapping": "^0.3.25", + "@jridgewell/trace-mapping": "^0.3.20", "jest-worker": "^27.4.5", - "schema-utils": "^4.3.0", - "serialize-javascript": "^6.0.2", - "terser": "^5.31.1" + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.1", + "terser": "^5.26.0" }, "engines": { "node": ">= 10.13.0" @@ -9784,63 +10125,6 @@ } } }, - "node_modules/terser-webpack-plugin/node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "license": "MIT", - "peer": true, - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/terser-webpack-plugin/node_modules/ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "license": "MIT", - "peer": true, - "dependencies": { - "fast-deep-equal": "^3.1.3" - }, - "peerDependencies": { - "ajv": "^8.8.2" - } - }, - "node_modules/terser-webpack-plugin/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "license": "MIT", - "peer": true - }, - "node_modules/terser-webpack-plugin/node_modules/schema-utils": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.0.tgz", - "integrity": "sha512-Gf9qqc58SpCA/xdziiHz35F4GNIWYWZrEshUc/G/r5BnLph6xpKuLeoJoQuj5WfBIx/eQLf+hmVPYHaxJu7V2g==", - "license": "MIT", - "peer": true, - "dependencies": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.9.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.1.0" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/terser/node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", @@ -9853,12 +10137,6 @@ "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" }, - "node_modules/tinycolor2": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0.tgz", - "integrity": "sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==", - "license": "MIT" - }, "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -10362,17 +10640,17 @@ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "node_modules/webpack": { - "version": "5.97.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.97.1.tgz", - "integrity": "sha512-EksG6gFY3L1eFMROS/7Wzgrii5mBAFe4rIr3r2BTfo7bcc+DWwFZ4OJ/miOuHJO/A85HwyI4eQ0F6IKXesO7Fg==", + "version": "5.96.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.96.1.tgz", + "integrity": "sha512-l2LlBSvVZGhL4ZrPwyr8+37AunkcYj5qh8o6u2/2rzoPc8gxFJkLj1WxNgooi9pnoc06jh0BjuXnamM4qlujZA==", "license": "MIT", "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.6", - "@webassemblyjs/ast": "^1.14.1", - "@webassemblyjs/wasm-edit": "^1.14.1", - "@webassemblyjs/wasm-parser": "^1.14.1", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", "acorn": "^8.14.0", "browserslist": "^4.24.0", "chrome-trace-event": "^1.0.2", @@ -10710,7 +10988,6 @@ "version": "1.10.2", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", - "license": "ISC", "engines": { "node": ">= 6" } @@ -1,119 +1,112 @@ { - "name": "frontend", - "private": true, - "version": "1.0.0", - "scripts": { - "start": "next start", - "build": "next build", - "predeploy": "npm run build", - "deploy": "vk-miniapps-deploy", - "dev": "next dev", - "lint": "next lint", - "precommit": "lint-staged", - "prepare": "husky install", - "tunnel": "vk-tunnel --insecure=1 --http-protocol=https --ws-protocol=wss --host=0.0.0.0 --port=3000", - "export": "next export" - }, - "engines": { - "node": ">=12.0.0" - }, - "keywords": [], - "license": "MIT", - "lint-staged": { - "*.{js,ts,jsx,tsx}": [ - "prettier --write", - "eslint --fix" - ] - }, - "dependencies": { - "@babel/eslint-parser": "7.23.3", - "@dqbd/tiktoken": "^1.0.7", - "@emotion/react": "^11.11.0", - "@emotion/styled": "^11.11.0", - "@fontsource/roboto": "^4.5.8", - "@lottiefiles/dotlottie-react": "^0.12.0", - "@mui/icons-material": "^5.11.11", - "@mui/material": "^5.11.12", - "@mui/styled-engine-sc": "^5.11.11", - "@mui/x-date-pickers": "^6.6.0", - "@next/bundle-analyzer": "^13.4.3", - "@reduxjs/toolkit": "^1.9.5", - "@sentry/nextjs": "^8.42.0", - "@types/cookie": "^0.5.1", - "@types/intro.js": "^5.1.1", - "@types/lodash": "^4.14.195", - "@types/node": "18.15.2", - "@types/react": "18.0.28", - "@types/react-dom": "18.0.11", - "@types/react-syntax-highlighter": "^15.5.7", - "axios": "^0.24.0", - "base64-encode-file": "^1.0.7", - "buffer": "^6.0.3", - "chart.js": "^4.4.0", - "cookie": "^0.5.0", - "cross-env": "^7.0.3", - "dayjs": "^1.11.8", - "draft-js": "^0.11.7", - "draft-js-import-html": "^1.4.1", - "draftjs-to-html": "^0.9.1", - "eslint": "^8.7.0", - "eslint-config-next": "13.2.4", - "eslint-plugin-prettier": "^4.2.1", - "eslint-plugin-simple-import-sort": "^10.0.0", - "husky": "^8.0.0", - "i18next": "^23.4.1", - "intro.js-react": "^1.0.0", - "lint-staged": "^13.2.2", - "lodash.debounce": "^4.0.8", - "next": "13.2.4", - "next-auth": "^4.20.1", - "next-i18next": "^14.0.0", - "prettier": "^2.8.8", - "react": "18.2.0", - "react-chartjs-2": "^5.2.0", - "react-color": "^2.19.3", - "react-cookie": "^4.1.1", - "react-dom": "18.2.0", - "react-draft-wysiwyg": "^1.15.0", - "react-hook-form": "^7.43.9", - "react-i18next": "^13.0.3", - "react-markdown": "^8.0.7", - "react-redux": "^8.0.5", - "react-syntax-highlighter": "^15.5.0", - "remark-gfm": "^3.0.1", - "sass": "^1.63.4", - "styled-components": "^5.3.9", - "typescript": "5.1.3" - }, - "devDependencies": { - "@types/draftjs-to-html": "^0.8.4", - "@types/intro.js": "^5.1.1", - "@types/lodash": "^4.14.195", - "@types/react-color": "^3.0.13", - "@types/react-draft-wysiwyg": "^1.13.8", - "@types/react-lottie": "^1.2.10", - "@types/react-syntax-highlighter": "^15.5.7", - "eslint-config-prettier": "^8.8.0", - "lint-staged": "^13.2.2", - "prettier": "^2.8.8", - "typescript": "5.1.3" - }, - "resolutions": { - "react-scripts/webpack-dev-server/yargs/yargs-parser": ">=18.1.2" - }, - "overrides": { - "es5-ext@^0.10.50": "0.10.53" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - } + "name": "frontend", + "private": true, + "version": "1.0.0", + "scripts": { + "start": "next start", + "build": "next build", + "predeploy": "npm run build", + "deploy": "vk-miniapps-deploy", + "dev": "next dev", + "lint": "next lint", + "precommit": "lint-staged", + "prepare": "husky install", + "tunnel": "vk-tunnel --insecure=1 --http-protocol=https --ws-protocol=wss --host=0.0.0.0 --port=3000", + "export": "next export" + }, + "engines": { + "node": ">=12.0.0" + }, + "keywords": [], + "license": "MIT", + "lint-staged": { + "*.{js,ts,jsx,tsx}": [ + "prettier --write", + "eslint --fix" + ] + }, + "dependencies": { + "@babel/eslint-parser": "7.23.3", + "@dqbd/tiktoken": "^1.0.7", + "@emotion/react": "^11.11.0", + "@emotion/styled": "^11.11.0", + "@fontsource/roboto": "^4.5.8", + "@mui/icons-material": "^5.11.11", + "@mui/material": "^5.11.12", + "@mui/styled-engine-sc": "^5.11.11", + "@mui/x-date-pickers": "^6.6.0", + "@next/bundle-analyzer": "^13.4.3", + "@reduxjs/toolkit": "^1.9.5", + "@sentry/nextjs": "^8.42.0", + "@types/cookie": "^0.5.1", + "@types/intro.js": "^5.1.1", + "@types/lodash": "^4.14.195", + "@types/node": "18.15.2", + "@types/react": "18.0.28", + "@types/react-dom": "18.0.11", + "@types/react-syntax-highlighter": "^15.5.7", + "axios": "^0.24.0", + "base64-encode-file": "^1.0.7", + "buffer": "^6.0.3", + "chart.js": "^4.4.0", + "cookie": "^0.5.0", + "cross-env": "^7.0.3", + "dayjs": "^1.11.8", + "draft-js": "^0.11.7", + "eslint": "^8.7.0", + "eslint-config-next": "13.2.4", + "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-simple-import-sort": "^10.0.0", + "husky": "^8.0.0", + "i18next": "^23.4.1", + "intro.js-react": "^1.0.0", + "lint-staged": "^13.2.2", + "lodash.debounce": "^4.0.8", + "next": "13.2.4", + "next-auth": "^4.20.1", + "next-i18next": "^14.0.0", + "prettier": "^2.8.8", + "react": "18.2.0", + "react-chartjs-2": "^5.2.0", + "react-cookie": "^4.1.1", + "react-dom": "18.2.0", + "react-draft-wysiwyg": "^1.15.0", + "react-hook-form": "^7.43.9", + "react-i18next": "^13.0.3", + "react-markdown": "^8.0.7", + "react-redux": "^8.0.5", + "react-syntax-highlighter": "^15.5.0", + "remark-gfm": "^3.0.1", + "sass": "^1.63.4", + "styled-components": "^5.3.9", + "typescript": "5.1.3" + }, + "devDependencies": { + "@types/intro.js": "^5.1.1", + "@types/lodash": "^4.14.195", + "@types/react-draft-wysiwyg": "^1.13.8", + "@types/react-syntax-highlighter": "^15.5.7", + "eslint-config-prettier": "^8.8.0", + "lint-staged": "^13.2.2", + "prettier": "^2.8.8", + "typescript": "5.1.3" + }, + "resolutions": { + "react-scripts/webpack-dev-server/yargs/yargs-parser": ">=18.1.2" + }, + "overrides": { + "es5-ext@^0.10.50": "0.10.53" + }, + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] + } } @@ -1,7 +1,10 @@ import * as Sentry from '@sentry/nextjs' const SENTRY_DSN = process.env.NEXT_PUBLIC_SENTRY_DSN -if (SENTRY_DSN) - Sentry.init({ - dsn: SENTRY_DSN, - integrations: [Sentry.browserTracingIntegration(), Sentry.browserProfilingIntegration(), Sentry.replayIntegration()], - }) +if (SENTRY_DSN) Sentry.init({ + dsn: SENTRY_DSN, + integrations: [ + Sentry.browserTracingIntegration(), + Sentry.browserProfilingIntegration(), + Sentry.replayIntegration() + ] +}) @@ -1,8 +1,10 @@ import * as Sentry from '@sentry/nextjs' const SENTRY_DSN = process.env.SENTRY_DSN -if (SENTRY_DSN) - Sentry.init({ - dsn: SENTRY_DSN, - integrations: [Sentry.onUncaughtExceptionIntegration(), Sentry.onUnhandledRejectionIntegration()], - includeLocalVariables: true, - }) +if (SENTRY_DSN) Sentry.init({ + dsn: SENTRY_DSN, + integrations: [ + Sentry.onUncaughtExceptionIntegration(), + Sentry.onUnhandledRejectionIntegration() + ], + includeLocalVariables: true +})