");
- conversationListDiv.prepend(newChatHistory);
- }
- }
- addToConversationHistory() {
- this.conversationHistory.push({'role': 'assistant', 'content': this.fullResponse});
- this.fullResponse = '';
- }
-
- newChat() {
- this.clearChat();
- }
-
- applyConfig() {
- var selectedModel = $('#model-select').val();
- var selectedFormat = $('#format-select').val();
- var systemMessage = $('#system-message').val();
- var gpuLayers = $('#gpu-layers').val();
- var temperature = $('#temperature').val();
- var n_ctx = $('#context').val();
- const self = this;
- $.ajax({
-
- type: "POST",
- url: "/load_model",
- data: {
- model_path: selectedModel,
- format: selectedFormat,
- temperature: temperature,
- system_message: systemMessage,
- gpu_layers: gpuLayers,
- context: n_ctx
- },
- success: function (data) {
- self.showPopup('Model loaded successfully');
- self.newChat()
- console.log(data);
- },
- error: function (error) {
- self.showPopup(error, 'error');
- console.error('Error:', error);
- }
- });
- this.clearContext();
- }
-
- unloadModel() {
- const self = this;
- $.ajax({
- type: "POST",
- url: "/unload_model",
- success: function (data) {
- self.showPopup(data);
- console.log(data);
- },
- error: function (error) {
- self.showPopup(error, 'error');
- console.error('Error:', error);
- }
- });
- }
-
- stopResponse() {
- const self = this;
- $.ajax({
- type: "POST",
- url: "/stop_response",
- success: (data) => {
- console.log(data);
- self.showPopup(data);
- $('#stop-button').hide();
- $('#send-button').show();
- },
- error: (error) => {
- self.showPopup(error, 'error');
- console.error('Error:', error);
- }
- });
- }
-//** UTILS */
- scrollToBottom() {
- var chatContainer = $('#chat-container')[0];
- chatContainer.scrollTop = chatContainer.scrollHeight;
- }
-
- copyToClipboard(button) {
- var codeContent = $(button).siblings('code').html();
- codeContent = codeContent.replace(/
/g, '\n');
- codeContent = codeContent.replace(/^[^\n]*\n/, '');
-
- var textarea = document.createElement('textarea');
- textarea.textContent = codeContent;
- document.body.appendChild(textarea);
- textarea.select();
- document.execCommand('copy');
- document.body.removeChild(textarea);
- let str = 'Copied to clipboard! 📋';
- this.showPopup(str);
- console.log(str);
- }
-
- toggleSidebar(element) {
- var sidebar = document.getElementById(element);
- // Verificar si las media queries están activas
- var mediaQueriesActive = window.matchMedia("(max-width: 1023px)").matches || window.matchMedia("(max-height: 740px)").matches;
-
- // Solo ejecutar el código si las media queries no están activas
- if (!mediaQueriesActive) {
- if (sidebar.style.display === 'none' || sidebar.style.display === '') {
- sidebar.style.display = 'flex';
- sidebar.style.width = '15%';
- } else {
- sidebar.style.display = 'none';
-
- }
- }
- else{
- if(sidebar.style.display === 'none' || sidebar.style.display === '') {
- sidebar.style.display = 'block';
- sidebar.style.width = '100%';
- }
- else{
- sidebar.style.display = 'none';
-
-
- }
-
- }
- }
-
- escapeHtml(text) {
- var map = {
- '&': '&',
- '<': '<',
- '>': '>',
- '"': '"',
- "'": '''
- };
- return text.replace(/[&<>"']/g, function (m) {
- return map[m];
- });
- }
-
- shareChat(responseNumber) {
- const self = this;
- let str_success = 'Chat shared successfully';
- if (navigator.share) {
- var ask = $('.user-message-' + responseNumber).text();
- var response = $('#chat-assistant-' + responseNumber).html();
- var fullResponse = "User: \n" + ask + "\n\nAssistant:\n" + response;
- fullResponse = fullResponse.replace(/
/g, '\n');
- navigator.share({
- title: ask,
- text: fullResponse,
- url: '/'
- })
- .then(() => { console.log(str_success); self.showPopup(str_success); })
- .catch((error) => console.error('Error sharing chat:', error));
- } else {
- self.showPopup('Sharing function not supported in this browser. 😤', 'error');
- }
- }
-
- showPopup(message, type) {
- let container = document.getElementById('notification-container');
- if (!container) {
- container = document.createElement('div');
- container.id = 'notification-container';
- container.className = 'popup-container';
- container.style.left = '20px';
- container.style.bottom = '20px';
- document.body.appendChild(container);
- }
-
- const popup = document.createElement('div');
- popup.className = 'popup-notification';
- if (type === 'error') {
- popup.classList.add('popup-error');
- }
- popup.textContent = message;
- container.appendChild(popup);
-
- setTimeout(() => {
- popup.style.opacity = 1;
- setTimeout(() => {
- popup.style.opacity = 0;
- setTimeout(() => {
- container.removeChild(popup);
- if (container.childNodes.length === 0) {
- document.body.removeChild(container);
- }
- }, 500); //seconds to complete disappearance animation
- }, 5500); //seconds before disappearing
- }, 100); // 0.1 seconds before displaying
- }
-
- adjustTextareaHeight() {
- const textarea = document.getElementById('user-input');
- const lineHeight = parseFloat(getComputedStyle(textarea).lineHeight);
- const maxLines = 20;
- const maxHeight = maxLines * lineHeight;
- textarea.style.height = '0';
- textarea.style.height = `${Math.min(textarea.scrollHeight, maxHeight)}px`;
- }
-}
diff --git a/static/js/chat.js b/static/js/chat.js
index 1ef0d23..986d4aa 100644
--- a/static/js/chat.js
+++ b/static/js/chat.js
@@ -1,594 +1,622 @@
-//@author: Borja Otero Ferreira
-class Chat {
+// Manejador de WebSocket
+class ManejadorWebSocket {
+ constructor(dominio, puerto, ruta) {
+ this.socket = io.connect(`http://${dominio}:${puerto}${ruta}`);
+ this.configurarEscuchadores();
+ }
+
+ configurarEscuchadores() {
+ this.socket.on('connect', () => this.alConectar());
+ }
+
+ alConectar() {
+ console.log('¡Conectado! ✅');
+ }
+}
+
+// Gestor de Interfaz de Usuario
+class GestorUI {
constructor() {
- const textarea = document.getElementById('user-input');
- this.socket = io.connect('http://' + document.domain + ':' + location.port + '/test');
- this.socket.on('connect', () => this.onConnect());
- this.conversationHistory = [{'role': 'system', 'content': 'Eres un asistente en español'}];
- this.socket.on('assistant_response', (response) => this.assistantResponse(response));
- this.socket.on('output_console', (response) => this.consoleOutputResponse(response));
- this.currentResponse = '';
- this.library ='llama';
- this.systemMessage = 'Eres un asistente en español. Debes responder siemrpe en español';
- this.n_responses = 0;
- this.popupCount = 0;
- this.fullResponse = '';
- this.totalTokens = 0;
- this.totalTokensResponse =0;
- this.conversationStarted = false;
- this.memory=true;
- this.chatId = ' ';
- this.adjustTextareaHeight();
- textarea.addEventListener('input', () => this.adjustTextareaHeight());
- textarea.addEventListener('keydown', (e) => {
- if (e.which === 13 && !e.shiftKey) {
- e.preventDefault();
- this.sendMessage();
- }
- });
- }
-/** METHODS */
- onConnect() {
- console.log('Connected! ✅');
- $('#stop-button').hide();
+ this.configurarEscuchadoresEventos();
}
- consoleOutputResponse(response){
- var divConsole = $('#consola');
- var role = response.role;
- var divRespuesta = $('
');
- if (role === 'info')
- divRespuesta = $('
ialab-suite@agent:~$ '+response.content+'
');
- divConsole.append(divRespuesta);
-
- this.scrollToBottom(divConsole[0]);
+ static mostrarNotificacion(mensaje, tipo = 'info') {
+ let contenedor = this.obtenerOCrearContenedorNotificaciones();
+ const notificacion = this.crearElementoNotificacion(mensaje, tipo);
+ contenedor.appendChild(notificacion);
+ this.animarNotificacion(notificacion, contenedor);
}
- assistantResponse(response) {
- this.onAssistantResponse(response);
+ static obtenerOCrearContenedorNotificaciones() {
+ let contenedor = document.getElementById('notification-container');
+ if (!contenedor) {
+ contenedor = document.createElement('div');
+ contenedor.id = 'notification-container';
+ contenedor.className = 'popup-container';
+ contenedor.style.left = '20px';
+ contenedor.style.bottom = '20px';
+ document.body.appendChild(contenedor);
+ }
+ return contenedor;
+ }
+ static crearElementoNotificacion(mensaje, tipo) {
+ const notificacion = document.createElement('div');
+ notificacion.className = 'popup-notification';
+ if (tipo === 'error') notificacion.classList.add('popup-error');
+ notificacion.textContent = mensaje;
+ return notificacion;
}
- onAssistantResponse(response) {
- var delta = '';
- var choiceDelta =''
-
- if (this.library === 'ollama'){
- const responseData = response;
- delta = responseData.content;
- console.log(response);
- this.fullResponse += delta; // Agregar a fullResponse
- const totalUserTokens = responseData.total_user_tokens; // Obtener el número total de tokens del usuario
- const totalAssistantTokens = responseData.total_assistant_tokens;
- this.totalTokensResponse = totalUserTokens + totalAssistantTokens;
- console.log("Contenido de la elección:", delta);
- console.log("Tokens del usuario : ", totalUserTokens);
- console.log("Tokens Respuesta: ", totalAssistantTokens);
- }else{
- const responseData = response.content["choices"][0];
- const { id, model, created, object } = response.content;
- const { index, delta, finish_reason } = responseData;
- const responseId = id;
- const responseModel = model;
- const responseCreated = created;
- const responseObject = object;
- const choiceIndex = index;
- choiceDelta = delta && Object.keys(delta).length !== 0 ? delta.content : ''; // Verificar si delta no está vacío
- this.fullResponse += choiceDelta; // Agregar a fullResponse
- const choiceFinishReason = finish_reason != null ? finish_reason : 'None';
- const totalUserTokens = response.total_user_tokens; // Obtener el número total de tokens del usuario
- const totalAssistantTokens = response.total_assistant_tokens;
- this.totalTokensResponse = totalUserTokens + totalAssistantTokens;
- console.log("ID de la respuesta:", responseId);
- console.log("Modelo utilizado:", responseModel);
- console.log("Creación:", responseCreated);
- console.log("Objeto:", responseObject);
- console.log("Índice de la elección:", choiceIndex);
- console.log("Contenido de la elección:", choiceDelta);
- console.log("Razón de finalización:", choiceFinishReason);
- console.log("Tokens del usuario : ", totalUserTokens);
- console.log("Tokens Respuesta: ", totalAssistantTokens);
+ static animarNotificacion(notificacion, contenedor) {
+ setTimeout(() => {
+ notificacion.style.opacity = 1;
+ setTimeout(() => {
+ notificacion.style.opacity = 0;
+ setTimeout(() => {
+ contenedor.removeChild(notificacion);
+ if (contenedor.childNodes.length === 0) {
+ document.body.removeChild(contenedor);
+ }
+ }, 500);
+ }, 5500);
+ }, 100);
+ }
+
+ static desplazarAlFinal(elemento) {
+ elemento.scrollTop = elemento.scrollHeight;
+ }
+
+ static ajustarAlturaTextarea(textarea) {
+ const alturaLinea = parseFloat(getComputedStyle(textarea).lineHeight);
+ const maxLineas = 20;
+ const alturaMaxima = maxLineas * alturaLinea;
+ textarea.style.height = '0';
+ textarea.style.height = `${Math.min(textarea.scrollHeight, alturaMaxima)}px`;
+ }
+
+ configurarEscuchadoresEventos() {
+ const textarea = document.getElementById('user-input');
+ textarea.addEventListener('input', () => GestorUI.ajustarAlturaTextarea(textarea));
+ }
+
+ static alternarBarraLateral(elemento) {
+ const barra = document.getElementById(elemento);
+ const mediaQuerysActivas = window.matchMedia("(max-width: 1023px)").matches ||
+ window.matchMedia("(max-height: 740px)").matches;
+
+ if (!mediaQuerysActivas) {
+ if (barra.style.display === 'none' || barra.style.display === '') {
+ barra.style.display = 'flex';
+ barra.style.width = '15%';
+ } else {
+ barra.style.display = 'none';
+ }
+ } else {
+ if (barra.style.display === 'none' || barra.style.display === '') {
+ barra.style.display = 'block';
+ barra.style.width = '100%';
+ } else {
+ barra.style.display = 'none';
+ }
}
- $('#stop-button').show();
- $('#send-button').prop('disabled', true);
- $('#send-button').hide();
- var responseModel = this.library === 'ollama' ? delta : choiceDelta;
- this.handleAssistantResponse(responseModel);
- var chatContainer = $('#chat-container')[0];
- this.scrollToBottom(chatContainer);
- /*console.log('Tokens received 🧠');**/
-
}
- guardarHistorial(chatId, content) {
+}
+
+// Gestor de Conversaciones
+class GestorConversaciones {
+ constructor(mensajeSistema) {
+ this.historial = [{ role: 'system', content: mensajeSistema }];
+ this.respuestaActual = '';
+ this.respuestaCompleta = '';
+ this.idChat = ' ';
+ this.conversacionIniciada = false;
+ }
+
+ agregarMensajeUsuario(mensaje) {
+ this.historial.push({ role: 'user', content: mensaje });
+ }
+
+ agregarMensajeAsistente(mensaje) {
+ this.historial.push({ role: 'assistant', content: mensaje });
+ }
+
+ limpiarHistorial() {
+ this.historial = [this.historial[0]]; // Mantener mensaje del sistema
+ this.respuestaActual = '';
+ this.respuestaCompleta = '';
+ this.idChat = ' ';
+ }
+
+ generarIdChat(mensajeUsuario) {
+ const fechaActual = new Date();
+ const fechaFormateada = `${fechaActual.getFullYear()}.${fechaActual.getMonth() + 1}.${fechaActual.getDate()}.${fechaActual.getHours()}.${fechaActual.getMinutes()}.${fechaActual.getSeconds()}`;
+ const mensajeRecortado = mensajeUsuario.substring(0, 35).trim();
+ return `${fechaFormateada}-${mensajeRecortado}`.replace(' ', '_');
+ }
+
+ guardarHistorial(idChat, contenido) {
$.ajax({
type: 'POST',
- url: '/actualizar_historial', // Endpoint para actualizar el historial
- data: JSON.stringify({ nombre_chat: chatId, historial: content }), // Convertir a JSON
- contentType: 'application/json', // Asegura que el servidor entienda que es JSON
- success: function (data) {
-
+ url: '/actualizar_historial',
+ data: JSON.stringify({ nombre_chat: idChat, historial: contenido }),
+ contentType: 'application/json',
+ success: function(data) {
+ console.log('Historial guardado con éxito');
},
- error: function (error) {
- console.error('Error al guardar el historial:', error); // Imprimir el mensaje de error en la consola
+ error: function(error) {
+ console.error('Error al guardar el historial:', error);
}
});
}
-
- loadHistory(nombre_chat) {
- nombre_chat = String(nombre_chat);
+ cargarHistorial(nombreChat) {
+ nombreChat = String(nombreChat);
const self = this;
$.ajax({
type: 'GET',
- url: `/recuperar_historial?nombre_chat=${nombre_chat}`,
+ url: `/recuperar_historial?nombre_chat=${nombreChat}`,
contentType: 'application/json',
- success: function (data) {
- // Verifica si se recuperaron datos válidos
+ success: function(data) {
if (data && Array.isArray(data)) {
- self.conversationHistory = data; // Asigna los datos recuperados a conversationHistory
- console.log('Historial cargado exitosamente:', self.conversationHistory);
- self.chatId=nombre_chat;
+ self.historial = data;
+ self.idChat = nombreChat;
+ console.log('Historial cargado exitosamente:', self.historial);
} else {
console.error('Error: No se pudieron recuperar datos válidos del historial.');
}
- self.loadMessages();
+ self.cargarMensajes();
},
- error: function (error) {
- self.showPopup('Error cargando historial','error');
- console.error('Error al cargar el historial:', error); // Imprime el mensaje de error en la consola
+ error: function(error) {
+ GestorUI.mostrarNotificacion('Error cargando historial', 'error');
+ console.error('Error al cargar el historial:', error);
}
});
}
-
- loadMessages(){
- $('#chat-list').empty();
- // Suponiendo que this.chatHistory contiene los mensajes
- for (var i = 0; i < this.conversationHistory.length; i++) {
- var messageData = this.conversationHistory[i];
- var sanitizedUserMessage = messageData.role === 'user' ? sanitizeMessage(messageData.content) : messageData.content;
- const converter = new showdown.Converter();
- messageData.content = converter.makeHtml(messageData.content);
- if (messageData.role === 'user') {
- var message = $('
' +
- sanitizedUserMessage + '
');
- $('#chat-list').append(message);
- } else if (messageData.role === 'assistant') {
- var divAssistant = $('
' + messageData.content + '
');
- $('#chat-list').append(divAssistant);
- divAssistant.find('pre code').each(function(i, block) {
- Prism.highlightElement(block);
- });
- }
- }
-
-
-function sanitizeMessage(message) {
- return $('
').text(message).html();
-}
- }
-
- deleteHistory(nombreChat){
- const self = this;
+ eliminarHistorial(nombreChat) {
+ const self = this;
$.ajax({
url: `/eliminar_historial?nombre_chat=${nombreChat}`,
type: 'DELETE',
success: function(result) {
console.log(`Historial ${nombreChat} eliminado exitosamente.`);
- self.removeFromConversationList(nombreChat);
-
+ self.eliminarDeListaConversaciones(nombreChat);
},
error: function(xhr, status, error) {
console.error(`Error al eliminar el historial ${nombreChat}: ${xhr.status}`);
}
});
-
}
-
- removeFromConversationList(chatId) {
- // Eliminar el elemento de la lista de conversaciones
- const conversationListDiv = $('#conversations-list');
- const elementToRemove = $('#' + chatId);
-
- if (elementToRemove.length) {
- elementToRemove.remove();
+ eliminarDeListaConversaciones(idChat) {
+ const listaConversaciones = $('#conversations-list');
+ const elementoAEliminar = $('#' + idChat);
+ if (elementoAEliminar.length) {
+ elementoAEliminar.remove();
} else {
- // Intentar encontrar el elemento con un selector que coincida con el formato de ID
- const formattedIdSelector = '.load-history[id^="' + chatId + '"]';
- const elementToRemoveFormatted = $(formattedIdSelector);
- if (elementToRemoveFormatted.length) {
- elementToRemoveFormatted.remove();
+ const selectorIdFormateado = '.load-history[id^="' + idChat + '"]';
+ const elementoAEliminarFormateado = $(selectorIdFormateado);
+ if (elementoAEliminarFormateado.length) {
+ elementoAEliminarFormateado.remove();
} else {
- console.error(`Element with ID ${chatId} not found in conversation list.`);
+ console.error(`Elemento con ID ${idChat} no encontrado en la lista de conversaciones.`);
}
}
}
- handleAssistantResponse(response) {
- response = response.replace(/<0x0A>/g, '\n');
-
- if (!this.conversationStarted) {
- this.currentResponse = response;
- this.conversationStarted = true;
- } else {
- this.currentResponse += response;
- }
-
- const converter = new showdown.Converter();
- this.response = converter.makeHtml(this.currentResponse);
-
- const tableRegex = /(?:\|.*(?:\|).*)+\|/gs;
- let htmlResponse = this.response.replace(tableRegex, (table) => {
- const rows = table.trim().split('\n').map(row => row.trim().split('|').filter(cell => cell.trim() !== ''));
-
- // Filtrar las filas que contienen guiones
- const filteredRows = rows.filter(row => !row.some(cell => cell.includes('---')));
-
- let htmlTable = '
';
- for (let i = 0; i < filteredRows.length; i++) {
- htmlTable += '';
- for (let j = 0; j < filteredRows[i].length; j++) {
- htmlTable += (i === 0) ? `${filteredRows[i][j]} | ` : `${filteredRows[i][j]} | `;
- }
- htmlTable += '
';
+
+ cargarMensajes() {
+ $('#chat-list').empty();
+ for (let i = 0; i < this.historial.length; i++) {
+ const mensajeData = this.historial[i];
+ if (mensajeData.role === 'system') continue;
+
+ const converter = new showdown.Converter();
+ const contenidoHtml = converter.makeHtml(mensajeData.content);
+
+ if (mensajeData.role === 'user') {
+ const mensaje = $(`
+
+
+
+ ${this.escaparHtml(mensajeData.content)}
+
+
`);
+ $('#chat-list').append(mensaje);
+ } else if (mensajeData.role === 'assistant') {
+ const divAsistente = $(`
+
+
+
+ ${contenidoHtml}
+
+
`);
+ $('#chat-list').append(divAsistente);
+ divAsistente.find('pre code').each(function(i, block) {
+ Prism.highlightElement(block);
+ });
}
- htmlTable += '
';
- return htmlTable;
- });
-
- var divAssistant = $('#chat-assistant-' + this.n_responses);
- divAssistant.html(htmlResponse);
-
- document.querySelectorAll('pre').forEach(function(pre) {
- pre.classList.add('line-numbers');
- });
-
- divAssistant.find('pre code').each(function(i, block) {
- Prism.highlightElement(block);
- });
+ }
}
+}
- clearChat() {
- $('#chat-list').html('');
- this.currentResponse = '';
+// Gestor de Tokens
+class GestorTokens {
+ constructor() {
this.totalTokens = 0;
- this.chatId=' ';
- var label = document.getElementById('tokens');
- label.textContent = ' ' + this.totalTokens + ' Tokens';
- this.conversationHistory = [{'role':'system', 'content' : this.systemMessage}];
- $('#key-container').empty();
- let str = 'Chat emptied! 🗑️';
- this.showPopup(str);
- console.log(str);
- }
-
- actualizarTokens(){
- this.totalTokens += this.totalTokensResponse;
- this.totalTokensResponse = 0;
- var label = document.getElementById('tokens');
- label.textContent = ' ' + this.totalTokens + ' Tokens';
- }
-
- sendMessage() {
- if (!this.conversationStarted){
- this.conversationStarted= true;
- this.currentResponse = ' ';
- this.n_responses += 1;
- var userMessage = $('#user-input').val(); // Obtener el valor del input
- var userMessageTrimed = userMessage.substring(0, 35).trim(); // Usando substring
- var currentDate = new Date(); // Obtener la fecha y hora actual
- var formattedDateTime = currentDate.getFullYear() + '.' + (currentDate.getMonth() + 1) + '.' + currentDate.getDate()+'.'+currentDate.getHours()+'.'+currentDate.getMinutes()+'.'+currentDate.getSeconds();
- var messageWithDateTime = formattedDateTime + '-' + userMessageTrimed; // Agregar la fecha y hora al mensaje
- if (this.chatId ===' '){
- this.chatId = messageWithDateTime.replace(' ','_');
+ this.totalTokensRespuesta = 0;
+ }
- }
- var url = this.library === 'ollama' ? 'v1/chat/completions' : '/user_input';
- var sanitizedUserMessage = this.escapeHtml(userMessage);
- if(this.memory){
- this.conversationHistory.push({'role': 'user', 'content': sanitizedUserMessage});
- }
- else{
- var mensajeSistema = ""+
- "Funciones disponibles: "+
- "[Funcion: \'buscar_en_internet\' , query: \'url_o_consulta\' ]"+
- "[Funcion: \'cripto_price\' , query: \'zilliqa,ethereum,\'"+
- "[Funcion: \'video_search_tool\' , query: \'consulta\']"+
- "Necesitas utilizar alguna para responder?"+
- "responde con la herramienta a lanzar, ejemplo:"+
- "supongamos que necesitas buscar el tiempo en internet , contestas:"+
- "[Funcion: \'buscar_en_internet , query: \'tiempo proximos dias\' ]"+
- "Puedes usar mas de una funcion. Responde solo con las funciones que usaras en el formato adecuado entre [], sin texto antes ni despues de los corchetes";
- this.conversationHistory = [{'role':'system', 'content' : mensajeSistema}];
- if(this.conversationHistory.length - 1 > 0){
- var mensajeAsistente = this.conversationHistory[this.conversationHistory.length - 1];
- this.conversationHistory.push(mensajeAsistente);
- }
- if(this.conversationHistory.length - 2 > 0 ){
- var mensajeUsuario = this.conversationHistory[this.conversationHistory.length -2];
- this.conversationHistory.push(mensajeUsuario);
- }
-
- this.conversationHistory.push({'role': 'user', 'content': sanitizedUserMessage});
- }
- const self = this;
- self.conversationHistory[self.conversationHistory.length -1]['content'];/*+=". Puedes usar mas de una herramienta. Pero debe estar en la lista de herramientas."*/;
- $.ajax({
- type: 'POST',
- url: url,
- data: JSON.stringify({ content: self.conversationHistory}), // Convertir a JSON
- contentType: 'application/json', // Asegura que el servidor entienda que es JSON
- success: function (data) {
- $('#stop-button').hide();
- $('#send-button').show();
- $('#send-button').prop('disabled', false);
- self.addToConversationHistory(); // Agregar la respuesta completa al historial
- self.actualizarTokens();
-
- var conversationListDiv = $('#conversations-list');
- var buttonExists = false;
- $('.load-history').each(function() {
- console.log($(this).text())
- if ($(this).text() === '❌'+self.chatId) {
-
- buttonExists = true;
- return false; // Salir del bucle each() si se encuentra un botón con el mismo texto
- }
- });
- console.log("Valor de self.chatId:", self.chatId);
- console.log("Número de botones existentes:", $('.load-history').length);
- var conversationListDiv = $('#conversations-list');
- var newChatHistory ='';
- if(!buttonExists) {
- newChatHistory = $("
"); // $("
")
- conversationListDiv.prepend(newChatHistory);
- }
- self.guardarHistorial(self.chatId , self.conversationHistory);
- self.showPopup(data);
- console.log(data);
- self.conversationStarted = false;
- },
- error: function (error) {
- self.showPopup(error, 'error');
- console.error('Error:', error);
- self.conversationStarted = false;
- }
- });
- console.log('Prompt sent! 🔤');
- $('#user-input').val('');
- $('#user-input').focus();
- var message = $('
' +
- sanitizedUserMessage + '
');
- var chatList = $('#chat-list');
-
- chatList.append(message);
-
- var divAssistant = $('
');
- chatList.append(divAssistant);
-
- var shareButton = $('
');
- var userMessageCointainer = $('.assistant-message-container-' + this.n_responses);
- userMessageCointainer.append(shareButton);
- var chatContainer = $('#chat-container')[0];
- this.scrollToBottom(chatContainer);
-
- }
+ actualizarTokens(tokensRespuesta) {
+ this.totalTokens += tokensRespuesta;
+ this.actualizarVisualizacion();
}
- // Método para agregar la respuesta completa al historial de conversación
- addToConversationHistory() {
- if (this.memory){
- // Agregar la respuesta completa al historial de conversación
- this.conversationHistory.push({'role': 'assistant', 'content': this.fullResponse});
-
- // Reiniciar la respuesta completa para futuras conversaciones
- this.fullResponse = '';
+ actualizarVisualizacion() {
+ const etiqueta = document.getElementById('tokens');
+ etiqueta.textContent = ` ${this.totalTokens} Tokens`;
+ }
+
+ reiniciar() {
+ this.totalTokens = 0;
+ this.totalTokensRespuesta = 0;
+ this.actualizarVisualizacion();
}
}
- newChat() {
- this.clearChat();
+// Clase Principal Chat
+class Chat {
+ constructor() {
+ this.inicializar();
+ this.configurarComponentes();
+ this.configurarEscuchadores();
}
- applyConfig() {
- var selectedModel = $('#model-select').val();
- var selectedFormat = $('#format-select').val();
- var systemMessage = $('#system-message').val();
- this.systemMessage = systemMessage;
- var gpuLayers = $('#gpu-layers').val();
- var temperature = $('#temperature').val();
- var n_ctx = $('#context').val();
- const self = this;
- $.ajax({
+ // Método para alternar la barra lateral
+ toggleSidebar(elementId) {
+ GestorUI.alternarBarraLateral(elementId);
+ }
- type: "POST",
- url: "/load_model",
- data: {
- model_path: selectedModel,
- format: selectedFormat,
- temperature: temperature,
- system_message: systemMessage,
- gpu_layers: gpuLayers,
- context: n_ctx
- },
- success: function (data) {
- self.showPopup('Model loaded successfully');
- self.newChat();
- console.log(data);
- },
- error: function (error) {
- self.showPopup(error, 'error');
- console.error('Error:', error);
- }
- });
- this.clearContext();
+ inicializar() {
+ this.herramientas = false;
+ this.rag = false;
+ this.biblioteca = 'llama';
+ this.numRespuestas = 0;
+ this.mensajeSistema = 'Eres un asistente en español. Debes responder siempre en español';
}
- unloadModel() {
- const self = this;
- $.ajax({
- type: "POST",
- url: "/unload_model",
- success: function (data) {
- self.showPopup(data);
- console.log(data);
- },
- error: function (error) {
- self.showPopup(error, 'error');
- console.error('Error:', error);
- }
- });
+ configurarComponentes() {
+ this.manejadorWS = new ManejadorWebSocket(document.domain, location.port, '/test');
+ this.gestorUI = new GestorUI();
+ this.gestorConversaciones = new GestorConversaciones(this.mensajeSistema);
+ this.gestorTokens = new GestorTokens();
+
+ this.manejadorWS.socket.on('assistant_response', respuesta => this.manejarRespuestaAsistente(respuesta));
+ this.manejadorWS.socket.on('output_console', respuesta => this.manejarSalidaConsola(respuesta));
+ this.manejadorWS.socket.on('utilidades', respuesta => this.manejarUtilidades(respuesta));
}
- stopResponse() {
- const self = this;
- $.ajax({
- type: "POST",
- url: "/stop_response",
- success: (data) => {
- console.log(data);
- self.showPopup(data);
- $('#stop-button').hide();
- $('#send-button').show();
- },
- error: (error) => {
- self.showPopup(error, 'error');
- console.error('Error:', error);
+ configurarEscuchadores() {
+ const checkboxHerramientas = document.getElementById('checkbox-3');
+ const checkboxRag = document.getElementById('checkbox-4');
+ const areaTexto = document.getElementById('user-input');
+
+ checkboxHerramientas.addEventListener('change', () => this.herramientas = checkboxHerramientas.checked);
+ checkboxRag.addEventListener('change', () => this.rag = checkboxRag.checked);
+ areaTexto.addEventListener('keydown', (e) => {
+ if (e.which === 13 && !e.shiftKey) {
+ e.preventDefault();
+ this.enviarMensaje();
}
});
+
+ $('#stop-button').hide();
}
-//** UTILS */
- scrollToBottom(id) {
- var chatContainer = $('#chat-container')[0];
- id.scrollTop = id.scrollHeight;
- }
- copyToClipboard(button) {
- var codeContent = $(button).siblings('code').html();
- codeContent = codeContent.replace(/
/g, '\n');
- codeContent = codeContent.replace(/^[^\n]*\n/, '');
+ manejarRespuestaAsistente(respuesta) {
+ let delta = '';
+ let deltaEleccion = '';
+
+ if (this.biblioteca === 'ollama') {
+ delta = respuesta.content;
+ this.gestorConversaciones.respuestaCompleta += delta;
+ const tokensUsuarioTotal = respuesta.total_user_tokens;
+ const tokensAsistenteTotal = respuesta.total_assistant_tokens;
+ this.gestorTokens.totalTokensRespuesta = tokensUsuarioTotal + tokensAsistenteTotal;
+ } else {
+ const datosRespuesta = respuesta.content.choices[0];
+ deltaEleccion = datosRespuesta.delta && Object.keys(datosRespuesta.delta).length !== 0
+ ? datosRespuesta.delta.content
+ : '';
+ this.gestorConversaciones.respuestaCompleta += deltaEleccion;
+ this.gestorTokens.totalTokensRespuesta = respuesta.total_user_tokens + respuesta.total_assistant_tokens;
+ }
+
+ $('#stop-button').show();
+ $('#send-button').prop('disabled', true).hide();
- var textarea = document.createElement('textarea');
- textarea.textContent = codeContent;
- document.body.appendChild(textarea);
- textarea.select();
- document.execCommand('copy');
- document.body.removeChild(textarea);
- let str = 'Copied to clipboard! 📋';
- this.showPopup(str);
- console.log(str);
+ const respuestaModelo = this.biblioteca === 'ollama' ? delta : deltaEleccion;
+ this.procesarRespuestaAsistente(respuestaModelo);
+ GestorUI.desplazarAlFinal($('#chat-container')[0]);
}
- toggleSidebar(element) {
- var sidebar = document.getElementById(element);
- // Verificar si las media queries están activas
- var mediaQueriesActive = window.matchMedia("(max-width: 1023px)").matches || window.matchMedia("(max-height: 740px)").matches;
+ procesarRespuestaAsistente(respuesta) {
+ respuesta = respuesta.replace(/<0x0A>/g, '\n');
+
+ if (!this.gestorConversaciones.conversacionIniciada) {
+ this.gestorConversaciones.respuestaActual = respuesta;
+ this.gestorConversaciones.conversacionIniciada = true;
+ } else {
+ this.gestorConversaciones.respuestaActual += respuesta;
+ }
+
+ const converter = new showdown.Converter();
+ const respuestaHtml = converter.makeHtml(this.gestorConversaciones.respuestaActual);
+
+ // Procesar tablas
+ const regexTabla = /(?:\|.*(?:\|).*)+\|/gs;
+ let respuestaHtmlProcesada = respuestaHtml.replace(regexTabla, (tabla) => {
+ const filas = tabla.trim().split('\n')
+ .map(fila => fila.trim().split('|')
+ .filter(celda => celda.trim() !== ''));
+ const filasFiltradas = filas.filter(fila => !fila.some(celda => celda.includes('---')));
+
+ let tablaHtml = '
';
+ filasFiltradas.forEach((fila, i) => {
+ tablaHtml += '';
+ fila.forEach(celda => {
+ tablaHtml += i === 0
+ ? `${celda} | `
+ : `${celda} | `;
+ });
+ tablaHtml += '
';
+ });
+ tablaHtml += '
';
+ return tablaHtml;
+ });
+
+ const divAsistente = $(`#chat-assistant-${this.numRespuestas}`);
+ divAsistente.html(respuestaHtmlProcesada);
+
+ document.querySelectorAll('pre').forEach(pre => {
+ pre.classList.add('line-numbers');
+ });
+
+ divAsistente.find('pre code').each((i, bloque) => {
+ Prism.highlightElement(bloque);
+ });
+ }
- // Solo ejecutar el código si las media queries no están activas
- if (!mediaQueriesActive) {
- if (sidebar.style.display === 'none' || sidebar.style.display === '') {
- sidebar.style.display = 'flex';
- sidebar.style.width = '15%';
+ manejarSalidaConsola(respuesta) {
+ const divConsola = $('#consola');
+ const { role, content } = respuesta;
+ let divRespuesta;
+
+ if (role === 'info') {
+ divRespuesta = $(`
ialab-suite@agent:~$ ${content}
`);
} else {
- sidebar.style.display = 'none';
-
+ divRespuesta = $(`
`);
}
+
+ divConsola.append(divRespuesta);
+ GestorUI.desplazarAlFinal(divConsola[0]);
+ }
+
+ manejarUtilidades(respuesta) {
+ const divResultados = document.getElementById(`resultados${this.numRespuestas}`);
+
+ respuesta.ids.forEach(id => {
+ const iframe = document.createElement('iframe');
+ iframe.width = "64px";
+ iframe.height = "32px";
+ iframe.src = `https://www.youtube.com/embed/${id}`;
+ iframe.frameborder = "0";
+ iframe.allow = "encrypted-media; picture-in-picture";
+ iframe.allowfullscreen = true;
+ divResultados.appendChild(iframe);
+ });
}
- else{
- if(sidebar.style.display === 'none' || sidebar.style.display === '') {
- sidebar.style.display = 'block';
- sidebar.style.width = '100%';
- }
- else{
- sidebar.style.display = 'none';
+
+ enviarMensaje() {
+ if (!this.gestorConversaciones.conversacionIniciada) {
+ const entradaUsuario = $('#user-input').val();
+ if (!entradaUsuario.trim()) return;
+
+ this.prepararNuevoMensaje(entradaUsuario);
+ this.enviarMensajeAlServidor(entradaUsuario);
}
+ }
+
+ prepararNuevoMensaje(entradaUsuario) {
+ this.gestorConversaciones.conversacionIniciada = true;
+ this.numRespuestas++;
+
+ if (this.gestorConversaciones.idChat === ' ') {
+ this.gestorConversaciones.idChat = this.gestorConversaciones.generarIdChat(entradaUsuario);
+ }
+
+ this.gestorConversaciones.agregarMensajeUsuario(this.escaparHtml(entradaUsuario));
+ this.agregarMensajeUsuarioUI(entradaUsuario);
+ $('#user-input').val('').focus();
}
- }
- escapeHtml(text) {
- var map = {
- '&': '&',
- '<': '<',
- '>': '>',
- '"': '"',
- "'": '''
- };
- return text.replace(/[&<>"']/g, function (m) {
- return map[m];
- });
- }
-
- shareChat(responseNumber) {
- const self = this;
- let str_success = 'Chat shared successfully';
- if (navigator.share) {
- var ask = $('.user-message-' + responseNumber).text();
- var response = $('#chat-assistant-' + responseNumber).html();
- var fullResponse = "User: \n" + ask + "\n\nAssistant:\n" + response;
- fullResponse = fullResponse.replace(/
/g, '\n');
- navigator.share({
- title: ask,
- text: fullResponse,
- url: '/'
- })
- .then(() => { console.log(str_success); self.showPopup(str_success); })
- .catch((error) => console.error('Error sharing chat:', error));
- } else {
- self.showPopup('Sharing function not supported in this browser. 😤', 'error');
+
+ agregarMensajeUsuarioUI(mensaje) {
+ const mensajeUsuario = $(`
+
+
+ ${this.escaparHtml(mensaje)}
+
+
+ `);
+
+ const divAsistente = $(`
+
+ `);
+
+ const botonCompartir = $(`
`);
+
+ $('#chat-list').append(mensajeUsuario, divAsistente);
+ $(`.assistant-message-container-${this.numRespuestas}`).append(botonCompartir);
+
+ GestorUI.desplazarAlFinal($('#chat-container')[0]);
}
- }
-
- showPopup(message, type) {
- let container = document.getElementById('notification-container');
- if (!container) {
- container = document.createElement('div');
- container.id = 'notification-container';
- container.className = 'popup-container';
- container.style.left = '20px';
- container.style.bottom = '20px';
- document.body.appendChild(container);
+
+ enviarMensajeAlServidor(entradaUsuario) {
+ const url = this.biblioteca === 'ollama' ? 'v1/chat/completions' : '/user_input';
+ const datos = {
+ content: this.gestorConversaciones.historial,
+ tools: this.herramientas,
+ rag: this.rag
+ };
+
+ $.ajax({
+ type: 'POST',
+ url: url,
+ data: JSON.stringify(datos),
+ contentType: 'application/json',
+ success: respuesta => this.manejarExitoEnvio(respuesta),
+ error: error => this.manejarErrorEnvio(error)
+ });
}
-
- const popup = document.createElement('div');
- popup.className = 'popup-notification';
- if (type === 'error') {
- popup.classList.add('popup-error');
+
+ manejarExitoEnvio(respuesta) {
+ $('#stop-button').hide();
+ $('#send-button').show().prop('disabled', false);
+
+ this.gestorConversaciones.agregarMensajeAsistente(this.gestorConversaciones.respuestaCompleta);
+ this.gestorTokens.actualizarTokens(this.gestorTokens.totalTokensRespuesta);
+
+ this.actualizarListaConversaciones();
+ this.gestorConversaciones.guardarHistorial(
+ this.gestorConversaciones.idChat,
+ this.gestorConversaciones.historial
+ );
+
+ GestorUI.mostrarNotificacion(respuesta);
+ this.gestorConversaciones.conversacionIniciada = false;
+ }
+
+ manejarErrorEnvio(error) {
+ GestorUI.mostrarNotificacion(error, 'error');
+ console.error('Error:', error);
+ this.gestorConversaciones.conversacionIniciada = false;
+ }
+
+ actualizarListaConversaciones() {
+ const self = this;
+ const listaConversaciones = $('#conversations-list');
+ let existeBoton = false;
+ // Recorre cada elemento de la clase '.load-history'
+ $('.load-history').each(function() {
+ if ($(this).text() === '❌' + self.gestorConversaciones.idChat) {
+ existeBoton = true;
+ return false; // Rompe el bucle si ya existe
+ }
+ });
+ // Si el botón no existe, crea uno nuevo
+ if (!existeBoton) {
+ const nuevoHistorialChat = $(`
+
+
+
+
+ `);
+ listaConversaciones.prepend(nuevoHistorialChat);
+ }
+ }
+
+ limpiarChat() {
+ $('#chat-list').html('');
+ this.gestorConversaciones.limpiarHistorial();
+ this.gestorTokens.reiniciar();
+ $('#key-container').empty();
+ GestorUI.mostrarNotificacion('¡Chat vaciado! 🗑️');
+ }
+
+ aplicarConfiguracion() {
+ const modeloSeleccionado = $('#model-select').val();
+ const formatoSeleccionado = $('#format-select').val();
+ const mensajeSistema = $('#system-message').val();
+ const capasGPU = $('#gpu-layers').val();
+ const temperatura = $('#temperature').val();
+ const contexto = $('#context').val();
+
+ $.ajax({
+ type: "POST",
+ url: "/load_model",
+ data: {
+ model_path: modeloSeleccionado,
+ format: formatoSeleccionado,
+ temperature: temperatura,
+ system_message: mensajeSistema,
+ gpu_layers: capasGPU,
+ context: contexto
+ },
+ success: data => {
+ GestorUI.mostrarNotificacion('Modelo cargado exitosamente');
+ this.limpiarChat();
+ },
+ error: error => {
+ GestorUI.mostrarNotificacion(error, 'error');
+ console.error('Error:', error);
+ }
+ });
+ }
+
+ compartirChat(numeroRespuesta) {
+ if (navigator.share) {
+ const pregunta = $(`.user-message-${numeroRespuesta}`).text();
+ const respuesta = $(`#chat-assistant-${numeroRespuesta}`).html();
+ const respuestaCompleta = `Usuario: \n${pregunta}\n\nAsistente:\n${respuesta}`;
+
+ navigator.share({
+ title: pregunta,
+ text: respuestaCompleta.replace(/
/g, '\n'),
+ url: '/'
+ })
+ .then(() => GestorUI.mostrarNotificacion('Chat compartido exitosamente'))
+ .catch(error => console.error('Error al compartir chat:', error));
+ } else {
+ GestorUI.mostrarNotificacion('Función de compartir no soportada en este navegador. 😤', 'error');
+ }
+ }
+
+ escaparHtml(texto) {
+ const mapeo = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ "'": '''
+ };
+ return texto.replace(/[&<>"']/g, m => mapeo[m]);
+ }
+
+ detenerRespuesta() {
+ $.ajax({
+ type: "POST",
+ url: "/stop_response",
+ success: data => {
+ console.log(data);
+ GestorUI.mostrarNotificacion(data);
+ $('#stop-button').hide();
+ $('#send-button').show();
+ },
+ error: error => {
+ GestorUI.mostrarNotificacion(error, 'error');
+ console.error('Error:', error);
+ }
+ });
}
- popup.textContent = message;
- container.appendChild(popup);
-
- setTimeout(() => {
- popup.style.opacity = 1;
- setTimeout(() => {
- popup.style.opacity = 0;
- setTimeout(() => {
- container.removeChild(popup);
- if (container.childNodes.length === 0) {
- document.body.removeChild(container);
- }
- }, 500); //seconds to complete disappearance animation
- }, 5500); //seconds before disappearing
- }, 100); // 0.1 seconds before displaying
- }
-
- adjustTextareaHeight() {
- const textarea = document.getElementById('user-input');
- const lineHeight = parseFloat(getComputedStyle(textarea).lineHeight);
- const maxLines = 20;
- const maxHeight = maxLines * lineHeight;
- textarea.style.height = '0';
- textarea.style.height = `${Math.min(textarea.scrollHeight, maxHeight)}px`;
}
-}
+
+// Exportar para su uso
+window.Chat = Chat;
\ No newline at end of file
diff --git a/static/js/chat2.js b/static/js/old_gui.js
similarity index 89%
rename from static/js/chat2.js
rename to static/js/old_gui.js
index 2a7c103..1ef0d23 100644
--- a/static/js/chat2.js
+++ b/static/js/old_gui.js
@@ -1,26 +1,22 @@
//@author: Borja Otero Ferreira
class Chat {
constructor() {
- this.tools= false;
- this.rag = false;
- const checkbox = document.getElementById('checkbox-3');
- const checkboxrag = document.getElementById("checkbox-4");
const textarea = document.getElementById('user-input');
this.socket = io.connect('http://' + document.domain + ':' + location.port + '/test');
this.socket.on('connect', () => this.onConnect());
- this.systemMessage = 'Eres un asistente en español. Debes responder siemrpe en español';
- this.conversationHistory = [{'role': 'system', 'content': this.systemMessage}];
+ this.conversationHistory = [{'role': 'system', 'content': 'Eres un asistente en español'}];
this.socket.on('assistant_response', (response) => this.assistantResponse(response));
this.socket.on('output_console', (response) => this.consoleOutputResponse(response));
- this.socket.on('utilidades', (response) => this.cargarUtiles(response));
this.currentResponse = '';
this.library ='llama';
+ this.systemMessage = 'Eres un asistente en español. Debes responder siemrpe en español';
this.n_responses = 0;
this.popupCount = 0;
this.fullResponse = '';
this.totalTokens = 0;
this.totalTokensResponse =0;
this.conversationStarted = false;
+ this.memory=true;
this.chatId = ' ';
this.adjustTextareaHeight();
textarea.addEventListener('input', () => this.adjustTextareaHeight());
@@ -30,35 +26,8 @@ class Chat {
this.sendMessage();
}
});
-
- // Agregar evento change a los checkbox
- checkbox.addEventListener('change', () => {
- this.tools = checkbox.checked;
- });
- checkboxrag.addEventListener('change', () => {
- this.rag = checkboxrag.checked;
- });
- }
-
+ }
/** METHODS */
-cargarUtiles(response) {
- // Obtener el div donde se cargarán los resultados
- var divResultados = document.getElementById('resultados'+ this.n_responses);
- // Recorrer la lista de IDs de video recibidos
- response.ids.forEach(function(id) {
- // Crear un elemento iframe para cada ID de video
- var iframe = document.createElement('iframe');
- iframe.width = "64px";
- iframe.height = "32px";
- iframe.src = "https://www.youtube.com/embed/" + id;
- iframe.frameborder = "0";
- iframe.allow = "encrypted-media; picture-in-picture";
- iframe.allowfullscreen = true;
- // Agregar el iframe al div
- divResultados.appendChild(iframe);
- });
-}
-
onConnect() {
console.log('Connected! ✅');
$('#stop-button').hide();
@@ -71,16 +40,19 @@ cargarUtiles(response) {
if (role === 'info')
divRespuesta = $('
ialab-suite@agent:~$ '+response.content+'
');
divConsole.append(divRespuesta);
+
this.scrollToBottom(divConsole[0]);
}
assistantResponse(response) {
this.onAssistantResponse(response);
+
}
onAssistantResponse(response) {
var delta = '';
var choiceDelta =''
+
if (this.library === 'ollama'){
const responseData = response;
delta = responseData.content;
@@ -142,6 +114,7 @@ cargarUtiles(response) {
});
}
+
loadHistory(nombre_chat) {
nombre_chat = String(nombre_chat);
const self = this;
@@ -167,6 +140,7 @@ cargarUtiles(response) {
});
}
+
loadMessages(){
$('#chat-list').empty();
// Suponiendo que this.chatHistory contiene los mensajes
@@ -222,6 +196,7 @@ function sanitizeMessage(message) {
// Eliminar el elemento de la lista de conversaciones
const conversationListDiv = $('#conversations-list');
const elementToRemove = $('#' + chatId);
+
if (elementToRemove.length) {
elementToRemove.remove();
} else {
@@ -244,14 +219,17 @@ function sanitizeMessage(message) {
} else {
this.currentResponse += response;
}
+
const converter = new showdown.Converter();
this.response = converter.makeHtml(this.currentResponse);
const tableRegex = /(?:\|.*(?:\|).*)+\|/gs;
let htmlResponse = this.response.replace(tableRegex, (table) => {
const rows = table.trim().split('\n').map(row => row.trim().split('|').filter(cell => cell.trim() !== ''));
+
// Filtrar las filas que contienen guiones
const filteredRows = rows.filter(row => !row.some(cell => cell.includes('---')));
+
let htmlTable = '
';
for (let i = 0; i < filteredRows.length; i++) {
htmlTable += '';
@@ -313,14 +291,38 @@ function sanitizeMessage(message) {
}
var url = this.library === 'ollama' ? 'v1/chat/completions' : '/user_input';
var sanitizedUserMessage = this.escapeHtml(userMessage);
- this.conversationHistory.push({'role': 'user', 'content': sanitizedUserMessage});
-
+ if(this.memory){
+ this.conversationHistory.push({'role': 'user', 'content': sanitizedUserMessage});
+ }
+ else{
+ var mensajeSistema = ""+
+ "Funciones disponibles: "+
+ "[Funcion: \'buscar_en_internet\' , query: \'url_o_consulta\' ]"+
+ "[Funcion: \'cripto_price\' , query: \'zilliqa,ethereum,\'"+
+ "[Funcion: \'video_search_tool\' , query: \'consulta\']"+
+ "Necesitas utilizar alguna para responder?"+
+ "responde con la herramienta a lanzar, ejemplo:"+
+ "supongamos que necesitas buscar el tiempo en internet , contestas:"+
+ "[Funcion: \'buscar_en_internet , query: \'tiempo proximos dias\' ]"+
+ "Puedes usar mas de una funcion. Responde solo con las funciones que usaras en el formato adecuado entre [], sin texto antes ni despues de los corchetes";
+ this.conversationHistory = [{'role':'system', 'content' : mensajeSistema}];
+ if(this.conversationHistory.length - 1 > 0){
+ var mensajeAsistente = this.conversationHistory[this.conversationHistory.length - 1];
+ this.conversationHistory.push(mensajeAsistente);
+ }
+ if(this.conversationHistory.length - 2 > 0 ){
+ var mensajeUsuario = this.conversationHistory[this.conversationHistory.length -2];
+ this.conversationHistory.push(mensajeUsuario);
+ }
+
+ this.conversationHistory.push({'role': 'user', 'content': sanitizedUserMessage});
+ }
const self = this;
- self.conversationHistory[self.conversationHistory.length -1]['content'];;
+ self.conversationHistory[self.conversationHistory.length -1]['content'];/*+=". Puedes usar mas de una herramienta. Pero debe estar en la lista de herramientas."*/;
$.ajax({
type: 'POST',
url: url,
- data: JSON.stringify({ content: self.conversationHistory, tools: this.tools, rag: this.rag}), // Convertir a JSON
+ data: JSON.stringify({ content: self.conversationHistory}), // Convertir a JSON
contentType: 'application/json', // Asegura que el servidor entienda que es JSON
success: function (data) {
$('#stop-button').hide();
@@ -344,7 +346,7 @@ function sanitizeMessage(message) {
var conversationListDiv = $('#conversations-list');
var newChatHistory ='';
if(!buttonExists) {
- newChatHistory = $(""); // $("")
+ newChatHistory = $(""); // $("")
conversationListDiv.prepend(newChatHistory);
}
self.guardarHistorial(self.chatId , self.conversationHistory);
@@ -362,7 +364,8 @@ function sanitizeMessage(message) {
$('#user-input').val('');
$('#user-input').focus();
var message = $('' +
sanitizedUserMessage + '
');
var chatList = $('#chat-list');
@@ -370,8 +373,9 @@ function sanitizeMessage(message) {
chatList.append(message);
var divAssistant = $('
');
+ ' assistant-message-container">
');
chatList.append(divAssistant);
var shareButton = $('');
@@ -385,10 +389,13 @@ function sanitizeMessage(message) {
// Método para agregar la respuesta completa al historial de conversación
addToConversationHistory() {
+ if (this.memory){
// Agregar la respuesta completa al historial de conversación
this.conversationHistory.push({'role': 'assistant', 'content': this.fullResponse});
+
// Reiniciar la respuesta completa para futuras conversaciones
this.fullResponse = '';
+ }
}
newChat() {
@@ -584,5 +591,4 @@ function sanitizeMessage(message) {
textarea.style.height = '0';
textarea.style.height = `${Math.min(textarea.scrollHeight, maxHeight)}px`;
}
-}
-
\ No newline at end of file
+}
diff --git a/static/js/prism.js b/static/js/prism.js
index 02e427d..4898653 100644
--- a/static/js/prism.js
+++ b/static/js/prism.js
@@ -1,303 +1,15722 @@
/* PrismJS 1.29.0
https://prismjs.com/download.html#themes=prism-okaidia&languages=markup+css+clike+javascript+abap+abnf+actionscript+ada+agda+al+antlr4+apacheconf+apex+apl+applescript+aql+arduino+arff+armasm+arturo+asciidoc+aspnet+asm6502+asmatmel+autohotkey+autoit+avisynth+avro-idl+awk+bash+basic+batch+bbcode+bbj+bicep+birb+bison+bnf+bqn+brainfuck+brightscript+bro+bsl+c+csharp+cpp+cfscript+chaiscript+cil+cilkc+cilkcpp+clojure+cmake+cobol+coffeescript+concurnas+csp+cooklang+coq+crystal+css-extras+csv+cue+cypher+d+dart+dataweave+dax+dhall+diff+django+dns-zone-file+docker+dot+ebnf+editorconfig+eiffel+ejs+elixir+elm+etlua+erb+erlang+excel-formula+fsharp+factor+false+firestore-security-rules+flow+fortran+ftl+gml+gap+gcode+gdscript+gedcom+gettext+gherkin+git+glsl+gn+linker-script+go+go-module+gradle+graphql+groovy+haml+handlebars+haskell+haxe+hcl+hlsl+hoon+http+hpkp+hsts+ichigojam+icon+icu-message-format+idris+ignore+inform7+ini+io+j+java+javadoc+javadoclike+javastacktrace+jexl+jolie+jq+jsdoc+js-extras+json+json5+jsonp+jsstacktrace+js-templates+julia+keepalived+keyman+kotlin+kumir+kusto+latex+latte+less+lilypond+liquid+lisp+livescript+llvm+log+lolcode+lua+magma+makefile+markdown+markup-templating+mata+matlab+maxscript+mel+mermaid+metafont+mizar+mongodb+monkey+moonscript+n1ql+n4js+nand2tetris-hdl+naniscript+nasm+neon+nevod+nginx+nim+nix+nsis+objectivec+ocaml+odin+opencl+openqasm+oz+parigp+parser+pascal+pascaligo+psl+pcaxis+peoplecode+perl+php+phpdoc+php-extras+plant-uml+plsql+powerquery+powershell+processing+prolog+promql+properties+protobuf+pug+puppet+pure+purebasic+purescript+python+qsharp+q+qml+qore+r+racket+cshtml+jsx+tsx+reason+regex+rego+renpy+rescript+rest+rip+roboconf+robotframework+ruby+rust+sas+sass+scss+scala+scheme+shell-session+smali+smalltalk+smarty+sml+solidity+solution-file+soy+sparql+splunk-spl+sqf+sql+squirrel+stan+stata+iecst+stylus+supercollider+swift+systemd+t4-templating+t4-cs+t4-vb+tap+tcl+tt2+textile+toml+tremor+turtle+twig+typescript+typoscript+unrealscript+uorazor+uri+v+vala+vbnet+velocity+verilog+vhdl+vim+visual-basic+warpscript+wasm+web-idl+wgsl+wiki+wolfram+wren+xeora+xml-doc+xojo+xquery+yaml+yang+zig&plugins=line-numbers+toolbar+copy-to-clipboard */
-var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(e){var n=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,r={},a={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof i?new i(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=g.reach);A+=w.value.length,w=w.next){var E=w.value;if(n.length>e.length)return;if(!(E instanceof i)){var P,L=1;if(y){if(!(P=l(b,A,e,m))||P.index>=e.length)break;var S=P.index,O=P.index+P[0].length,j=A;for(j+=w.value.length;S>=j;)j+=(w=w.next).value.length;if(A=j-=w.value.length,w.value instanceof i)continue;for(var C=w;C!==n.tail&&(jg.reach&&(g.reach=W);var z=w.prev;if(_&&(z=u(n,z,_),A+=_.length),c(n,z,L),w=u(n,z,new i(f,p?a.tokenize(N,p):N,k,N)),M&&u(n,w,M),L>1){var I={cause:f+","+d,reach:W};o(e,n,t,w.prev,A,I),g&&I.reach>g.reach&&(g.reach=I.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function u(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function c(e,n,t){for(var r=n.next,a=0;a"+i.content+""+i.tag+">"},!e.document)return e.addEventListener?(a.disableWorkerMessageHandler||e.addEventListener("message",(function(n){var t=JSON.parse(n.data),r=t.language,i=t.code,l=t.immediateClose;e.postMessage(a.highlight(i,a.languages[r],r)),l&&e.close()}),!1),a):a;var g=a.util.currentScript();function f(){a.manual||a.highlightAll()}if(g&&(a.filename=g.src,g.hasAttribute("data-manual")&&(a.manual=!0)),!a.manual){var h=document.readyState;"loading"===h||"interactive"===h&&g&&g.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return a}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);
-Prism.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var t={"included-cdata":{pattern://i,inside:s}};t["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var n={};n[a]={pattern:RegExp("(<__[^>]*>)(?:))*\\]\\]>|(?!)".replace(/__/g,(function(){return a})),"i"),lookbehind:!0,greedy:!0,inside:t},Prism.languages.insertBefore("markup","cdata",n)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(a,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp("(^|[\"'\\s])(?:"+a+")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))","i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml;
-!function(s){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:[^;{\\s\"']|\\s+(?!\\s)|"+e.source+")*?(?:;|(?=\\s*\\{))"),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|(?:[^\\\\\r\n()\"']|\\\\[^])*)\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var t=s.languages.markup;t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(Prism);
-Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};
-Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp("(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp("((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)/(?:(?:\\[(?:[^\\]\\\\\r\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|/\\*(?:[^*]|\\*(?!/))*\\*/)*(?:$|[\r\n,.;:})\\]]|//))"),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),Prism.languages.js=Prism.languages.javascript;
-Prism.languages.abap={comment:/^\*.*/m,string:/(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/,"string-template":{pattern:/([|}])(?:\\.|[^\\|{\r\n])*(?=[|{])/,lookbehind:!0,alias:"string"},"eol-comment":{pattern:/(^|\s)".*/m,lookbehind:!0,alias:"comment"},keyword:{pattern:/(\s|\.|^)(?:\*-INPUT|\?TO|ABAP-SOURCE|ABBREVIATED|ABS|ABSTRACT|ACCEPT|ACCEPTING|ACCESSPOLICY|ACCORDING|ACOS|ACTIVATION|ACTUAL|ADD|ADD-CORRESPONDING|ADJACENT|AFTER|ALIAS|ALIASES|ALIGN|ALL|ALLOCATE|ALPHA|ANALYSIS|ANALYZER|AND|ANY|APPEND|APPENDAGE|APPENDING|APPLICATION|ARCHIVE|AREA|ARITHMETIC|AS|ASCENDING|ASIN|ASPECT|ASSERT|ASSIGN|ASSIGNED|ASSIGNING|ASSOCIATION|ASYNCHRONOUS|AT|ATAN|ATTRIBUTES|AUTHORITY|AUTHORITY-CHECK|AVG|BACK|BACKGROUND|BACKUP|BACKWARD|BADI|BASE|BEFORE|BEGIN|BETWEEN|BIG|BINARY|BINDING|BIT|BIT-AND|BIT-NOT|BIT-OR|BIT-XOR|BLACK|BLANK|BLANKS|BLOB|BLOCK|BLOCKS|BLUE|BOUND|BOUNDARIES|BOUNDS|BOXED|BREAK-POINT|BT|BUFFER|BY|BYPASSING|BYTE|BYTE-CA|BYTE-CN|BYTE-CO|BYTE-CS|BYTE-NA|BYTE-NS|BYTE-ORDER|C|CA|CALL|CALLING|CASE|CAST|CASTING|CATCH|CEIL|CENTER|CENTERED|CHAIN|CHAIN-INPUT|CHAIN-REQUEST|CHANGE|CHANGING|CHANNELS|CHAR-TO-HEX|CHARACTER|CHARLEN|CHECK|CHECKBOX|CIRCULAR|CI_|CLASS|CLASS-CODING|CLASS-DATA|CLASS-EVENTS|CLASS-METHODS|CLASS-POOL|CLEANUP|CLEAR|CLIENT|CLOB|CLOCK|CLOSE|CN|CNT|CO|COALESCE|CODE|CODING|COLLECT|COLOR|COLUMN|COLUMNS|COL_BACKGROUND|COL_GROUP|COL_HEADING|COL_KEY|COL_NEGATIVE|COL_NORMAL|COL_POSITIVE|COL_TOTAL|COMMENT|COMMENTS|COMMIT|COMMON|COMMUNICATION|COMPARING|COMPONENT|COMPONENTS|COMPRESSION|COMPUTE|CONCAT|CONCATENATE|COND|CONDENSE|CONDITION|CONNECT|CONNECTION|CONSTANTS|CONTEXT|CONTEXTS|CONTINUE|CONTROL|CONTROLS|CONV|CONVERSION|CONVERT|COPIES|COPY|CORRESPONDING|COS|COSH|COUNT|COUNTRY|COVER|CP|CPI|CREATE|CREATING|CRITICAL|CS|CURRENCY|CURRENCY_CONVERSION|CURRENT|CURSOR|CURSOR-SELECTION|CUSTOMER|CUSTOMER-FUNCTION|DANGEROUS|DATA|DATABASE|DATAINFO|DATASET|DATE|DAYLIGHT|DBMAXLEN|DD\/MM\/YY|DD\/MM\/YYYY|DDMMYY|DEALLOCATE|DECIMALS|DECIMAL_SHIFT|DECLARATIONS|DEEP|DEFAULT|DEFERRED|DEFINE|DEFINING|DEFINITION|DELETE|DELETING|DEMAND|DEPARTMENT|DESCENDING|DESCRIBE|DESTINATION|DETAIL|DIALOG|DIRECTORY|DISCONNECT|DISPLAY|DISPLAY-MODE|DISTANCE|DISTINCT|DIV|DIVIDE|DIVIDE-CORRESPONDING|DIVISION|DO|DUMMY|DUPLICATE|DUPLICATES|DURATION|DURING|DYNAMIC|DYNPRO|E|EACH|EDIT|EDITOR-CALL|ELSE|ELSEIF|EMPTY|ENABLED|ENABLING|ENCODING|END|END-ENHANCEMENT-SECTION|END-LINES|END-OF-DEFINITION|END-OF-FILE|END-OF-PAGE|END-OF-SELECTION|ENDAT|ENDCASE|ENDCATCH|ENDCHAIN|ENDCLASS|ENDDO|ENDENHANCEMENT|ENDEXEC|ENDFOR|ENDFORM|ENDFUNCTION|ENDIAN|ENDIF|ENDING|ENDINTERFACE|ENDLOOP|ENDMETHOD|ENDMODULE|ENDON|ENDPROVIDE|ENDSELECT|ENDTRY|ENDWHILE|ENGINEERING|ENHANCEMENT|ENHANCEMENT-POINT|ENHANCEMENT-SECTION|ENHANCEMENTS|ENTRIES|ENTRY|ENVIRONMENT|EQ|EQUAL|EQUIV|ERRORMESSAGE|ERRORS|ESCAPE|ESCAPING|EVENT|EVENTS|EXACT|EXCEPT|EXCEPTION|EXCEPTION-TABLE|EXCEPTIONS|EXCLUDE|EXCLUDING|EXEC|EXECUTE|EXISTS|EXIT|EXIT-COMMAND|EXP|EXPAND|EXPANDING|EXPIRATION|EXPLICIT|EXPONENT|EXPORT|EXPORTING|EXTEND|EXTENDED|EXTENSION|EXTRACT|FAIL|FETCH|FIELD|FIELD-GROUPS|FIELD-SYMBOL|FIELD-SYMBOLS|FIELDS|FILE|FILTER|FILTER-TABLE|FILTERS|FINAL|FIND|FIRST|FIRST-LINE|FIXED-POINT|FKEQ|FKGE|FLOOR|FLUSH|FONT|FOR|FORM|FORMAT|FORWARD|FOUND|FRAC|FRAME|FRAMES|FREE|FRIENDS|FROM|FUNCTION|FUNCTION-POOL|FUNCTIONALITY|FURTHER|GAPS|GE|GENERATE|GET|GIVING|GKEQ|GKGE|GLOBAL|GRANT|GREATER|GREEN|GROUP|GROUPS|GT|HANDLE|HANDLER|HARMLESS|HASHED|HAVING|HDB|HEAD-LINES|HEADER|HEADERS|HEADING|HELP-ID|HELP-REQUEST|HIDE|HIGH|HINT|HOLD|HOTSPOT|I|ICON|ID|IDENTIFICATION|IDENTIFIER|IDS|IF|IGNORE|IGNORING|IMMEDIATELY|IMPLEMENTATION|IMPLEMENTATIONS|IMPLEMENTED|IMPLICIT|IMPORT|IMPORTING|IN|INACTIVE|INCL|INCLUDE|INCLUDES|INCLUDING|INCREMENT|INDEX|INDEX-LINE|INFOTYPES|INHERITING|INIT|INITIAL|INITIALIZATION|INNER|INOUT|INPUT|INSERT|INSTANCES|INTENSIFIED|INTERFACE|INTERFACE-POOL|INTERFACES|INTERNAL|INTERVALS|INTO|INVERSE|INVERTED-DATE|IS|ISO|ITERATOR|ITNO|JOB|JOIN|KEEP|KEEPING|KERNEL|KEY|KEYS|KEYWORDS|KIND|LANGUAGE|LAST|LATE|LAYOUT|LE|LEADING|LEAVE|LEFT|LEFT-JUSTIFIED|LEFTPLUS|LEFTSPACE|LEGACY|LENGTH|LESS|LET|LEVEL|LEVELS|LIKE|LINE|LINE-COUNT|LINE-SELECTION|LINE-SIZE|LINEFEED|LINES|LIST|LIST-PROCESSING|LISTBOX|LITTLE|LLANG|LOAD|LOAD-OF-PROGRAM|LOB|LOCAL|LOCALE|LOCATOR|LOG|LOG-POINT|LOG10|LOGFILE|LOGICAL|LONG|LOOP|LOW|LOWER|LPAD|LPI|LT|M|MAIL|MAIN|MAJOR-ID|MAPPING|MARGIN|MARK|MASK|MATCH|MATCHCODE|MAX|MAXIMUM|MEDIUM|MEMBERS|MEMORY|MESH|MESSAGE|MESSAGE-ID|MESSAGES|MESSAGING|METHOD|METHODS|MIN|MINIMUM|MINOR-ID|MM\/DD\/YY|MM\/DD\/YYYY|MMDDYY|MOD|MODE|MODIF|MODIFIER|MODIFY|MODULE|MOVE|MOVE-CORRESPONDING|MULTIPLY|MULTIPLY-CORRESPONDING|NA|NAME|NAMETAB|NATIVE|NB|NE|NESTED|NESTING|NEW|NEW-LINE|NEW-PAGE|NEW-SECTION|NEXT|NO|NO-DISPLAY|NO-EXTENSION|NO-GAP|NO-GAPS|NO-GROUPING|NO-HEADING|NO-SCROLLING|NO-SIGN|NO-TITLE|NO-TOPOFPAGE|NO-ZERO|NODE|NODES|NON-UNICODE|NON-UNIQUE|NOT|NP|NS|NULL|NUMBER|NUMOFCHAR|O|OBJECT|OBJECTS|OBLIGATORY|OCCURRENCE|OCCURRENCES|OCCURS|OF|OFF|OFFSET|OLE|ON|ONLY|OPEN|OPTION|OPTIONAL|OPTIONS|OR|ORDER|OTHER|OTHERS|OUT|OUTER|OUTPUT|OUTPUT-LENGTH|OVERFLOW|OVERLAY|PACK|PACKAGE|PAD|PADDING|PAGE|PAGES|PARAMETER|PARAMETER-TABLE|PARAMETERS|PART|PARTIALLY|PATTERN|PERCENTAGE|PERFORM|PERFORMING|PERSON|PF|PF-STATUS|PINK|PLACES|POOL|POSITION|POS_HIGH|POS_LOW|PRAGMAS|PRECOMPILED|PREFERRED|PRESERVING|PRIMARY|PRINT|PRINT-CONTROL|PRIORITY|PRIVATE|PROCEDURE|PROCESS|PROGRAM|PROPERTY|PROTECTED|PROVIDE|PUBLIC|PUSHBUTTON|PUT|QUEUE-ONLY|QUICKINFO|RADIOBUTTON|RAISE|RAISING|RANGE|RANGES|RAW|READ|READ-ONLY|READER|RECEIVE|RECEIVED|RECEIVER|RECEIVING|RED|REDEFINITION|REDUCE|REDUCED|REF|REFERENCE|REFRESH|REGEX|REJECT|REMOTE|RENAMING|REPLACE|REPLACEMENT|REPLACING|REPORT|REQUEST|REQUESTED|RESERVE|RESET|RESOLUTION|RESPECTING|RESPONSIBLE|RESULT|RESULTS|RESUMABLE|RESUME|RETRY|RETURN|RETURNCODE|RETURNING|RIGHT|RIGHT-JUSTIFIED|RIGHTPLUS|RIGHTSPACE|RISK|RMC_COMMUNICATION_FAILURE|RMC_INVALID_STATUS|RMC_SYSTEM_FAILURE|ROLE|ROLLBACK|ROUND|ROWS|RTTI|RUN|SAP|SAP-SPOOL|SAVING|SCALE_PRESERVING|SCALE_PRESERVING_SCIENTIFIC|SCAN|SCIENTIFIC|SCIENTIFIC_WITH_LEADING_ZERO|SCREEN|SCROLL|SCROLL-BOUNDARY|SCROLLING|SEARCH|SECONDARY|SECONDS|SECTION|SELECT|SELECT-OPTIONS|SELECTION|SELECTION-SCREEN|SELECTION-SET|SELECTION-SETS|SELECTION-TABLE|SELECTIONS|SELECTOR|SEND|SEPARATE|SEPARATED|SET|SHARED|SHIFT|SHORT|SHORTDUMP-ID|SIGN|SIGN_AS_POSTFIX|SIMPLE|SIN|SINGLE|SINH|SIZE|SKIP|SKIPPING|SMART|SOME|SORT|SORTABLE|SORTED|SOURCE|SPACE|SPECIFIED|SPLIT|SPOOL|SPOTS|SQL|SQLSCRIPT|SQRT|STABLE|STAMP|STANDARD|START-OF-SELECTION|STARTING|STATE|STATEMENT|STATEMENTS|STATIC|STATICS|STATUSINFO|STEP-LOOP|STOP|STRLEN|STRUCTURE|STRUCTURES|STYLE|SUBKEY|SUBMATCHES|SUBMIT|SUBROUTINE|SUBSCREEN|SUBSTRING|SUBTRACT|SUBTRACT-CORRESPONDING|SUFFIX|SUM|SUMMARY|SUMMING|SUPPLIED|SUPPLY|SUPPRESS|SWITCH|SWITCHSTATES|SYMBOL|SYNCPOINTS|SYNTAX|SYNTAX-CHECK|SYNTAX-TRACE|SYSTEM-CALL|SYSTEM-EXCEPTIONS|SYSTEM-EXIT|TAB|TABBED|TABLE|TABLES|TABLEVIEW|TABSTRIP|TAN|TANH|TARGET|TASK|TASKS|TEST|TESTING|TEXT|TEXTPOOL|THEN|THROW|TIME|TIMES|TIMESTAMP|TIMEZONE|TITLE|TITLE-LINES|TITLEBAR|TO|TOKENIZATION|TOKENS|TOP-LINES|TOP-OF-PAGE|TRACE-FILE|TRACE-TABLE|TRAILING|TRANSACTION|TRANSFER|TRANSFORMATION|TRANSLATE|TRANSPORTING|TRMAC|TRUNC|TRUNCATE|TRUNCATION|TRY|TYPE|TYPE-POOL|TYPE-POOLS|TYPES|ULINE|UNASSIGN|UNDER|UNICODE|UNION|UNIQUE|UNIT|UNIT_CONVERSION|UNIX|UNPACK|UNTIL|UNWIND|UP|UPDATE|UPPER|USER|USER-COMMAND|USING|UTF-8|VALID|VALUE|VALUE-REQUEST|VALUES|VARY|VARYING|VERIFICATION-MESSAGE|VERSION|VIA|VIEW|VISIBLE|WAIT|WARNING|WHEN|WHENEVER|WHERE|WHILE|WIDTH|WINDOW|WINDOWS|WITH|WITH-HEADING|WITH-TITLE|WITHOUT|WORD|WORK|WRITE|WRITER|X|XML|XOR|XSD|XSTRLEN|YELLOW|YES|YYMMDD|Z|ZERO|ZONE)(?![\w-])/i,lookbehind:!0},number:/\b\d+\b/,operator:{pattern:/(\s)(?:\*\*?|<[=>]?|>=?|\?=|[-+\/=])(?=\s)/,lookbehind:!0},"string-operator":{pattern:/(\s)&&?(?=\s)/,lookbehind:!0,alias:"keyword"},"token-operator":[{pattern:/(\w)(?:->?|=>|[~|{}])(?=\w)/,lookbehind:!0,alias:"punctuation"},{pattern:/[|{}]/,alias:"punctuation"}],punctuation:/[,.:()]/};
-!function(n){var i="(?:ALPHA|BIT|CHAR|CR|CRLF|CTL|DIGIT|DQUOTE|HEXDIG|HTAB|LF|LWSP|OCTET|SP|VCHAR|WSP)";n.languages.abnf={comment:/;.*/,string:{pattern:/(?:%[is])?"[^"\n\r]*"/,greedy:!0,inside:{punctuation:/^%[is]/}},range:{pattern:/%(?:b[01]+-[01]+|d\d+-\d+|x[A-F\d]+-[A-F\d]+)/i,alias:"number"},terminal:{pattern:/%(?:b[01]+(?:\.[01]+)*|d\d+(?:\.\d+)*|x[A-F\d]+(?:\.[A-F\d]+)*)/i,alias:"number"},repetition:{pattern:/(^|[^\w-])(?:\d*\*\d*|\d+)/,lookbehind:!0,alias:"operator"},definition:{pattern:/(^[ \t]*)(?:[a-z][\w-]*|<[^<>\r\n]*>)(?=\s*=)/m,lookbehind:!0,alias:"keyword",inside:{punctuation:/<|>/}},"core-rule":{pattern:RegExp("(?:(^|[^<\\w-])"+i+"|<"+i+">)(?![\\w-])","i"),lookbehind:!0,alias:["rule","constant"],inside:{punctuation:/<|>/}},rule:{pattern:/(^|[^<\w-])[a-z][\w-]*|<[^<>\r\n]*>/i,lookbehind:!0,inside:{punctuation:/<|>/}},operator:/=\/?|\//,punctuation:/[()\[\]]/}}(Prism);
-Prism.languages.actionscript=Prism.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<|>>?>?|[!=]=?)=?|[~?@]/}),Prism.languages.actionscript["class-name"].alias="function",delete Prism.languages.actionscript.parameter,delete Prism.languages.actionscript["literal-property"],Prism.languages.markup&&Prism.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:Prism.languages.markup}});
-Prism.languages.ada={comment:/--.*/,string:/"(?:""|[^"\r\f\n])*"/,number:[{pattern:/\b\d(?:_?\d)*#[\dA-F](?:_?[\dA-F])*(?:\.[\dA-F](?:_?[\dA-F])*)?#(?:E[+-]?\d(?:_?\d)*)?/i},{pattern:/\b\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:E[+-]?\d(?:_?\d)*)?\b/i}],attribute:{pattern:/\b'\w+/,alias:"attr-name"},keyword:/\b(?:abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case|constant|declare|delay|delta|digits|do|else|elsif|end|entry|exception|exit|for|function|generic|goto|if|in|interface|is|limited|loop|mod|new|not|null|of|or|others|out|overriding|package|pragma|private|procedure|protected|raise|range|record|rem|renames|requeue|return|reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until|use|when|while|with|xor)\b/i,boolean:/\b(?:false|true)\b/i,operator:/<[=>]?|>=?|=>?|:=|\/=?|\*\*?|[&+-]/,punctuation:/\.\.?|[,;():]/,char:/'.'/,variable:/\b[a-z](?:\w)*\b/i};
-!function(t){t.languages.agda={comment:/\{-[\s\S]*?(?:-\}|$)|--.*/,string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},punctuation:/[(){}⦃⦄.;@]/,"class-name":{pattern:/((?:data|record) +)\S+/,lookbehind:!0},function:{pattern:/(^[ \t]*)(?!\s)[^:\r\n]+(?=:)/m,lookbehind:!0},operator:{pattern:/(^\s*|\s)(?:[=|:∀→λ\\?_]|->)(?=\s)/,lookbehind:!0},keyword:/\b(?:Set|abstract|constructor|data|eta-equality|field|forall|hiding|import|in|inductive|infix|infixl|infixr|instance|let|macro|module|mutual|no-eta-equality|open|overlap|pattern|postulate|primitive|private|public|quote|quoteContext|quoteGoal|quoteTerm|record|renaming|rewrite|syntax|tactic|unquote|unquoteDecl|unquoteDef|using|variable|where|with)\b/}}(Prism);
-Prism.languages.al={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/,greedy:!0},function:{pattern:/(\b(?:event|procedure|trigger)\s+|(?:^|[^.])\.\s*)[a-z_]\w*(?=\s*\()/i,lookbehind:!0},keyword:[/\b(?:array|asserterror|begin|break|case|do|downto|else|end|event|exit|for|foreach|function|if|implements|in|indataset|interface|internal|local|of|procedure|program|protected|repeat|runonclient|securityfiltering|suppressdispose|temporary|then|to|trigger|until|var|while|with|withevents)\b/i,/\b(?:action|actions|addafter|addbefore|addfirst|addlast|area|assembly|chartpart|codeunit|column|controladdin|cuegroup|customizes|dataitem|dataset|dotnet|elements|enum|enumextension|extends|field|fieldattribute|fieldelement|fieldgroup|fieldgroups|fields|filter|fixed|grid|group|key|keys|label|labels|layout|modify|moveafter|movebefore|movefirst|movelast|page|pagecustomization|pageextension|part|profile|query|repeater|report|requestpage|schema|separator|systempart|table|tableelement|tableextension|textattribute|textelement|type|usercontrol|value|xmlport)\b/i],number:/\b(?:0x[\da-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)(?:F|LL?|U(?:LL?)?)?\b/i,boolean:/\b(?:false|true)\b/i,variable:/\b(?:Curr(?:FieldNo|Page|Report)|x?Rec|RequestOptionsPage)\b/,"class-name":/\b(?:automation|biginteger|bigtext|blob|boolean|byte|char|clienttype|code|completiontriggererrorlevel|connectiontype|database|dataclassification|datascope|date|dateformula|datetime|decimal|defaultlayout|dialog|dictionary|dotnetassembly|dotnettypedeclaration|duration|errorinfo|errortype|executioncontext|executionmode|fieldclass|fieldref|fieldtype|file|filterpagebuilder|guid|httpclient|httpcontent|httpheaders|httprequestmessage|httpresponsemessage|instream|integer|joker|jsonarray|jsonobject|jsontoken|jsonvalue|keyref|list|moduledependencyinfo|moduleinfo|none|notification|notificationscope|objecttype|option|outstream|pageresult|record|recordid|recordref|reportformat|securityfilter|sessionsettings|tableconnectiontype|tablefilter|testaction|testfield|testfilterfield|testpage|testpermissions|testrequestpage|text|textbuilder|textconst|textencoding|time|transactionmodel|transactiontype|variant|verbosity|version|view|views|webserviceactioncontext|webserviceactionresultcode|xmlattribute|xmlattributecollection|xmlcdata|xmlcomment|xmldeclaration|xmldocument|xmldocumenttype|xmlelement|xmlnamespacemanager|xmlnametable|xmlnode|xmlnodelist|xmlprocessinginstruction|xmlreadoptions|xmltext|xmlwriteoptions)\b/i,operator:/\.\.|:[=:]|[-+*/]=?|<>|[<>]=?|=|\b(?:and|div|mod|not|or|xor)\b/i,punctuation:/[()\[\]{}:.;,]/};
-Prism.languages.antlr4={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,string:{pattern:/'(?:\\.|[^\\'\r\n])*'/,greedy:!0},"character-class":{pattern:/\[(?:\\.|[^\\\]\r\n])*\]/,greedy:!0,alias:"regex",inside:{range:{pattern:/([^[]|(?:^|[^\\])(?:\\\\)*\\\[)-(?!\])/,lookbehind:!0,alias:"punctuation"},escape:/\\(?:u(?:[a-fA-F\d]{4}|\{[a-fA-F\d]+\})|[pP]\{[=\w-]+\}|[^\r\nupP])/,punctuation:/[\[\]]/}},action:{pattern:/\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\}/,greedy:!0,inside:{content:{pattern:/(\{)[\s\S]+(?=\})/,lookbehind:!0},punctuation:/[{}]/}},command:{pattern:/(->\s*(?!\s))(?:\s*(?:,\s*)?\b[a-z]\w*(?:\s*\([^()\r\n]*\))?)+(?=\s*;)/i,lookbehind:!0,inside:{function:/\b\w+(?=\s*(?:[,(]|$))/,punctuation:/[,()]/}},annotation:{pattern:/@\w+(?:::\w+)*/,alias:"keyword"},label:{pattern:/#[ \t]*\w+/,alias:"punctuation"},keyword:/\b(?:catch|channels|finally|fragment|grammar|import|lexer|locals|mode|options|parser|returns|throws|tokens)\b/,definition:[{pattern:/\b[a-z]\w*(?=\s*:)/,alias:["rule","class-name"]},{pattern:/\b[A-Z]\w*(?=\s*:)/,alias:["token","constant"]}],constant:/\b[A-Z][A-Z_]*\b/,operator:/\.\.|->|[|~]|[*+?]\??/,punctuation:/[;:()=]/},Prism.languages.g4=Prism.languages.antlr4;
-Prism.languages.apacheconf={comment:/#.*/,"directive-inline":{pattern:/(^[\t ]*)\b(?:AcceptFilter|AcceptPathInfo|AccessFileName|Action|Add(?:Alt|AltByEncoding|AltByType|Charset|DefaultCharset|Description|Encoding|Handler|Icon|IconByEncoding|IconByType|InputFilter|Language|ModuleInfo|OutputFilter|OutputFilterByType|Type)|Alias|AliasMatch|Allow(?:CONNECT|EncodedSlashes|Methods|Override|OverrideList)?|Anonymous(?:_LogEmail|_MustGiveEmail|_NoUserID|_VerifyEmail)?|AsyncRequestWorkerFactor|Auth(?:BasicAuthoritative|BasicFake|BasicProvider|BasicUseDigestAlgorithm|DBDUserPWQuery|DBDUserRealmQuery|DBMGroupFile|DBMType|DBMUserFile|Digest(?:Algorithm|Domain|NonceLifetime|Provider|Qop|ShmemSize)|Form(?:Authoritative|Body|DisableNoStore|FakeBasicAuth|Location|LoginRequiredLocation|LoginSuccessLocation|LogoutLocation|Method|Mimetype|Password|Provider|SitePassphrase|Size|Username)|GroupFile|LDAP(?:AuthorizePrefix|BindAuthoritative|BindDN|BindPassword|CharsetConfig|CompareAsUser|CompareDNOnServer|DereferenceAliases|GroupAttribute|GroupAttributeIsDN|InitialBindAsUser|InitialBindPattern|MaxSubGroupDepth|RemoteUserAttribute|RemoteUserIsDN|SearchAsUser|SubGroupAttribute|SubGroupClass|Url)|Merging|Name|nCache(?:Context|Enable|ProvideFor|SOCache|Timeout)|nzFcgiCheckAuthnProvider|nzFcgiDefineProvider|Type|UserFile|zDBDLoginToReferer|zDBDQuery|zDBDRedirectQuery|zDBMType|zSendForbiddenOnFailure)|BalancerGrowth|BalancerInherit|BalancerMember|BalancerPersist|BrowserMatch|BrowserMatchNoCase|BufferedLogs|BufferSize|Cache(?:DefaultExpire|DetailHeader|DirLength|DirLevels|Disable|Enable|File|Header|IgnoreCacheControl|IgnoreHeaders|IgnoreNoLastMod|IgnoreQueryString|IgnoreURLSessionIdentifiers|KeyBaseURL|LastModifiedFactor|Lock|LockMaxAge|LockPath|MaxExpire|MaxFileSize|MinExpire|MinFileSize|NegotiatedDocs|QuickHandler|ReadSize|ReadTime|Root|Socache(?:MaxSize|MaxTime|MinTime|ReadSize|ReadTime)?|StaleOnError|StoreExpired|StoreNoStore|StorePrivate)|CGIDScriptTimeout|CGIMapExtension|CharsetDefault|CharsetOptions|CharsetSourceEnc|CheckCaseOnly|CheckSpelling|ChrootDir|ContentDigest|CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking|CoreDumpDirectory|CustomLog|Dav|DavDepthInfinity|DavGenericLockDB|DavLockDB|DavMinTimeout|DBDExptime|DBDInitSQL|DBDKeep|DBDMax|DBDMin|DBDParams|DBDPersist|DBDPrepareSQL|DBDriver|DefaultIcon|DefaultLanguage|DefaultRuntimeDir|DefaultType|Define|Deflate(?:BufferSize|CompressionLevel|FilterNote|InflateLimitRequestBody|InflateRatio(?:Burst|Limit)|MemLevel|WindowSize)|Deny|DirectoryCheckHandler|DirectoryIndex|DirectoryIndexRedirect|DirectorySlash|DocumentRoot|DTracePrivileges|DumpIOInput|DumpIOOutput|EnableExceptionHook|EnableMMAP|EnableSendfile|Error|ErrorDocument|ErrorLog|ErrorLogFormat|Example|ExpiresActive|ExpiresByType|ExpiresDefault|ExtendedStatus|ExtFilterDefine|ExtFilterOptions|FallbackResource|FileETag|FilterChain|FilterDeclare|FilterProtocol|FilterProvider|FilterTrace|ForceLanguagePriority|ForceType|ForensicLog|GprofDir|GracefulShutdownTimeout|Group|Header|HeaderName|Heartbeat(?:Address|Listen|MaxServers|Storage)|HostnameLookups|IdentityCheck|IdentityCheckTimeout|ImapBase|ImapDefault|ImapMenu|Include|IncludeOptional|Index(?:HeadInsert|Ignore|IgnoreReset|Options|OrderDefault|StyleSheet)|InputSed|ISAPI(?:AppendLogToErrors|AppendLogToQuery|CacheFile|FakeAsync|LogNotSupported|ReadAheadBuffer)|KeepAlive|KeepAliveTimeout|KeptBodySize|LanguagePriority|LDAP(?:CacheEntries|CacheTTL|ConnectionPoolTTL|ConnectionTimeout|LibraryDebug|OpCacheEntries|OpCacheTTL|ReferralHopLimit|Referrals|Retries|RetryDelay|SharedCacheFile|SharedCacheSize|Timeout|TrustedClientCert|TrustedGlobalCert|TrustedMode|VerifyServerCert)|Limit(?:InternalRecursion|Request(?:Body|Fields|FieldSize|Line)|XMLRequestBody)|Listen|ListenBackLog|LoadFile|LoadModule|LogFormat|LogLevel|LogMessage|LuaAuthzProvider|LuaCodeCache|Lua(?:Hook(?:AccessChecker|AuthChecker|CheckUserID|Fixups|InsertFilter|Log|MapToStorage|TranslateName|TypeChecker)|Inherit|InputFilter|MapHandler|OutputFilter|PackageCPath|PackagePath|QuickHandler|Root|Scope)|Max(?:ConnectionsPerChild|KeepAliveRequests|MemFree|RangeOverlaps|RangeReversals|Ranges|RequestWorkers|SpareServers|SpareThreads|Threads)|MergeTrailers|MetaDir|MetaFiles|MetaSuffix|MimeMagicFile|MinSpareServers|MinSpareThreads|MMapFile|ModemStandard|ModMimeUsePathInfo|MultiviewsMatch|Mutex|NameVirtualHost|NoProxy|NWSSLTrustedCerts|NWSSLUpgradeable|Options|Order|OutputSed|PassEnv|PidFile|PrivilegesMode|Protocol|ProtocolEcho|Proxy(?:AddHeaders|BadHeader|Block|Domain|ErrorOverride|ExpressDBMFile|ExpressDBMType|ExpressEnable|FtpDirCharset|FtpEscapeWildcards|FtpListOnWildcard|HTML(?:BufSize|CharsetOut|DocType|Enable|Events|Extended|Fixups|Interp|Links|Meta|StripComments|URLMap)|IOBufferSize|MaxForwards|Pass(?:Inherit|InterpolateEnv|Match|Reverse|ReverseCookieDomain|ReverseCookiePath)?|PreserveHost|ReceiveBufferSize|Remote|RemoteMatch|Requests|SCGIInternalRedirect|SCGISendfile|Set|SourceAddress|Status|Timeout|Via)|ReadmeName|ReceiveBufferSize|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ReflectorHeader|RemoteIP(?:Header|InternalProxy|InternalProxyList|ProxiesHeader|TrustedProxy|TrustedProxyList)|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|RequestHeader|RequestReadTimeout|Require|Rewrite(?:Base|Cond|Engine|Map|Options|Rule)|RLimitCPU|RLimitMEM|RLimitNPROC|Satisfy|ScoreBoardFile|Script(?:Alias|AliasMatch|InterpreterSource|Log|LogBuffer|LogLength|Sock)?|SecureListen|SeeRequestTail|SendBufferSize|Server(?:Admin|Alias|Limit|Name|Path|Root|Signature|Tokens)|Session(?:Cookie(?:Name|Name2|Remove)|Crypto(?:Cipher|Driver|Passphrase|PassphraseFile)|DBD(?:CookieName|CookieName2|CookieRemove|DeleteLabel|InsertLabel|PerUser|SelectLabel|UpdateLabel)|Env|Exclude|Header|Include|MaxAge)?|SetEnv|SetEnvIf|SetEnvIfExpr|SetEnvIfNoCase|SetHandler|SetInputFilter|SetOutputFilter|SSIEndTag|SSIErrorMsg|SSIETag|SSILastModified|SSILegacyExprParser|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|SSL(?:CACertificateFile|CACertificatePath|CADNRequestFile|CADNRequestPath|CARevocationCheck|CARevocationFile|CARevocationPath|CertificateChainFile|CertificateFile|CertificateKeyFile|CipherSuite|Compression|CryptoDevice|Engine|FIPS|HonorCipherOrder|InsecureRenegotiation|OCSP(?:DefaultResponder|Enable|OverrideResponder|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|UseRequestNonce)|OpenSSLConfCmd|Options|PassPhraseDialog|Protocol|Proxy(?:CACertificateFile|CACertificatePath|CARevocation(?:Check|File|Path)|CheckPeer(?:CN|Expire|Name)|CipherSuite|Engine|MachineCertificate(?:ChainFile|File|Path)|Protocol|Verify|VerifyDepth)|RandomSeed|RenegBufferSize|Require|RequireSSL|Session(?:Cache|CacheTimeout|TicketKeyFile|Tickets)|SRPUnknownUserSeed|SRPVerifierFile|Stapling(?:Cache|ErrorCacheTimeout|FakeTryLater|ForceURL|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|ReturnResponderErrors|StandardCacheTimeout)|StrictSNIVHostCheck|UserName|UseStapling|VerifyClient|VerifyDepth)|StartServers|StartThreads|Substitute|Suexec|SuexecUserGroup|ThreadLimit|ThreadsPerChild|ThreadStackSize|TimeOut|TraceEnable|TransferLog|TypesConfig|UnDefine|UndefMacro|UnsetEnv|Use|UseCanonicalName|UseCanonicalPhysicalPort|User|UserDir|VHostCGIMode|VHostCGIPrivs|VHostGroup|VHostPrivs|VHostSecure|VHostUser|Virtual(?:DocumentRoot|ScriptAlias)(?:IP)?|WatchdogInterval|XBitHack|xml2EncAlias|xml2EncDefault|xml2StartParse)\b/im,lookbehind:!0,alias:"property"},"directive-block":{pattern:/<\/?\b(?:Auth[nz]ProviderAlias|Directory|DirectoryMatch|Else|ElseIf|Files|FilesMatch|If|IfDefine|IfModule|IfVersion|Limit|LimitExcept|Location|LocationMatch|Macro|Proxy|Require(?:All|Any|None)|VirtualHost)\b.*>/i,inside:{"directive-block":{pattern:/^<\/?\w+/,inside:{punctuation:/^<\/?/},alias:"tag"},"directive-block-parameter":{pattern:/.*[^>]/,inside:{punctuation:/:/,string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}}},alias:"attr-value"},punctuation:/>/},alias:"tag"},"directive-flags":{pattern:/\[(?:[\w=],?)+\]/,alias:"keyword"},string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}},variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/,regex:/\^?.*\$|\^.*\$?/};
-Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};
-!function(e){var t=/\b(?:(?:after|before)(?=\s+[a-z])|abstract|activate|and|any|array|as|asc|autonomous|begin|bigdecimal|blob|boolean|break|bulk|by|byte|case|cast|catch|char|class|collect|commit|const|continue|currency|date|datetime|decimal|default|delete|desc|do|double|else|end|enum|exception|exit|export|extends|final|finally|float|for|from|get(?=\s*[{};])|global|goto|group|having|hint|if|implements|import|in|inner|insert|instanceof|int|integer|interface|into|join|like|limit|list|long|loop|map|merge|new|not|null|nulls|number|object|of|on|or|outer|override|package|parallel|pragma|private|protected|public|retrieve|return|rollback|select|set|short|sObject|sort|static|string|super|switch|synchronized|system|testmethod|then|this|throw|time|transaction|transient|trigger|try|undelete|update|upsert|using|virtual|void|webservice|when|where|while|(?:inherited|with|without)\s+sharing)\b/i,n="\\b(?:(?=[a-z_]\\w*\\s*[<\\[])|(?!))[A-Z_]\\w*(?:\\s*\\.\\s*[A-Z_]\\w*)*\\b(?:\\s*(?:\\[\\s*\\]|<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>))*".replace(//g,(function(){return t.source}));function i(e){return RegExp(e.replace(//g,(function(){return n})),"i")}var a={keyword:t,punctuation:/[()\[\]{};,:.<>]/};e.languages.apex={comment:e.languages.clike.comment,string:e.languages.clike.string,sql:{pattern:/((?:[=,({:]|\breturn)\s*)\[[^\[\]]*\]/i,lookbehind:!0,greedy:!0,alias:"language-sql",inside:e.languages.sql},annotation:{pattern:/@\w+\b/,alias:"punctuation"},"class-name":[{pattern:i("(\\b(?:class|enum|extends|implements|instanceof|interface|new|trigger\\s+\\w+\\s+on)\\s+)"),lookbehind:!0,inside:a},{pattern:i("(\\(\\s*)(?=\\s*\\)\\s*[\\w(])"),lookbehind:!0,inside:a},{pattern:i("(?=\\s*\\w+\\s*[;=,(){:])"),inside:a}],trigger:{pattern:/(\btrigger\s+)\w+\b/i,lookbehind:!0,alias:"class-name"},keyword:t,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/i,number:/(?:\B\.\d+|\b\d+(?:\.\d+|L)?)\b/i,operator:/[!=](?:==?)?|\?\.?|&&|\|\||--|\+\+|[-+*/^&|]=?|:|<=?|>{1,3}=?/,punctuation:/[()\[\]{};,.]/}}(Prism);
-Prism.languages.apl={comment:/(?:⍝|#[! ]).*$/m,string:{pattern:/'(?:[^'\r\n]|'')*'/,greedy:!0},number:/¯?(?:\d*\.?\b\d+(?:e[+¯]?\d+)?|¯|∞)(?:j¯?(?:(?:\d+(?:\.\d+)?|\.\d+)(?:e[+¯]?\d+)?|¯|∞))?/i,statement:/:[A-Z][a-z][A-Za-z]*\b/,"system-function":{pattern:/⎕[A-Z]+/i,alias:"function"},constant:/[⍬⌾#⎕⍞]/,function:/[-+×÷⌈⌊∣|⍳⍸?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⊆⊇⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⍯↗¤→]/,"monadic-operator":{pattern:/[\\\/⌿⍀¨⍨⌶&∥]/,alias:"operator"},"dyadic-operator":{pattern:/[.⍣⍠⍤∘⌸@⌺⍥]/,alias:"operator"},assignment:{pattern:/←/,alias:"keyword"},punctuation:/[\[;\]()◇⋄]/,dfn:{pattern:/[{}⍺⍵⍶⍹∇⍫:]/,alias:"builtin"}};
-Prism.languages.applescript={comment:[/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,/--.+/,/#.+/],string:/"(?:\\.|[^"\\\r\n])*"/,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e-?\d+)?\b/i,operator:[/[&=≠≤≥*+\-\/÷^]|[<>]=?/,/\b(?:(?:begin|end|start)s? with|(?:contains?|(?:does not|doesn't) contain)|(?:is|isn't|is not) (?:contained by|in)|(?:(?:is|isn't|is not) )?(?:greater|less) than(?: or equal)?(?: to)?|(?:comes|(?:does not|doesn't) come) (?:after|before)|(?:is|isn't|is not) equal(?: to)?|(?:(?:does not|doesn't) equal|equal to|equals|is not|isn't)|(?:a )?(?:ref(?: to)?|reference to)|(?:and|as|div|mod|not|or))\b/],keyword:/\b(?:about|above|after|against|apart from|around|aside from|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|continue|copy|does|eighth|else|end|equal|error|every|exit|false|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|instead of|into|is|it|its|last|local|me|middle|my|ninth|of|on|onto|out of|over|prop|property|put|repeat|return|returning|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|true|try|until|where|while|whose|with|without)\b/,"class-name":/\b(?:POSIX file|RGB color|alias|application|boolean|centimeters|centimetres|class|constant|cubic centimeters|cubic centimetres|cubic feet|cubic inches|cubic meters|cubic metres|cubic yards|date|degrees Celsius|degrees Fahrenheit|degrees Kelvin|feet|file|gallons|grams|inches|integer|kilograms|kilometers|kilometres|list|liters|litres|meters|metres|miles|number|ounces|pounds|quarts|real|record|reference|script|square feet|square kilometers|square kilometres|square meters|square metres|square miles|square yards|text|yards)\b/,punctuation:/[{}():,¬«»《》]/};
-Prism.languages.aql={comment:/\/\/.*|\/\*[\s\S]*?\*\//,property:{pattern:/([{,]\s*)(?:(?!\d)\w+|(["'´`])(?:(?!\2)[^\\\r\n]|\\.)*\2)(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},identifier:{pattern:/([´`])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},variable:/@@?\w+/,keyword:[{pattern:/(\bWITH\s+)COUNT(?=\s+INTO\b)/i,lookbehind:!0},/\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|K_PATHS|K_SHORTEST_PATHS|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WINDOW|WITH)\b/i,{pattern:/(^|[^\w.[])(?:KEEP|PRUNE|SEARCH|TO)\b/i,lookbehind:!0},{pattern:/(^|[^\w.[])(?:CURRENT|NEW|OLD)\b/,lookbehind:!0},{pattern:/\bOPTIONS(?=\s*\{)/i}],function:/\b(?!\d)\w+(?=\s*\()/,boolean:/\b(?:false|true)\b/i,range:{pattern:/\.\./,alias:"operator"},number:[/\b0b[01]+/i,/\b0x[0-9a-f]+/i,/(?:\B\.\d+|\b(?:0|[1-9]\d*)(?:\.\d+)?)(?:e[+-]?\d+)?/i],operator:/\*{2,}|[=!]~|[!=<>]=?|&&|\|\||[-+*/%]/,punctuation:/::|[?.:,;()[\]{}]/};
-Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean;
-!function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n="\\b(?!)\\w+(?:\\s*\\.\\s*\\w+)*\\b".replace(//g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp("(\\b(?:class|concept|enum|struct|typename)\\s+)(?!)\\w+".replace(//g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp('(\\b(?:import|module)\\s+)(?:"(?:\\\\(?:\r\n|[^])|[^"\\\\\r\n])*"|<[^<>\r\n]*>|'+"(?:\\s*:\\s*)?|:\\s*".replace(//g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism);
-Prism.languages.arduino=Prism.languages.extend("cpp",{keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}),Prism.languages.ino=Prism.languages.arduino;
-Prism.languages.arff={comment:/%.*/,string:{pattern:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:/@(?:attribute|data|end|relation)\b/i,number:/\b\d+(?:\.\d+)?\b/,punctuation:/[{},]/};
-Prism.languages.armasm={comment:{pattern:/;.*/,greedy:!0},string:{pattern:/"(?:[^"\r\n]|"")*"/,greedy:!0,inside:{variable:{pattern:/((?:^|[^$])(?:\${2})*)\$\w+/,lookbehind:!0}}},char:{pattern:/'(?:[^'\r\n]{0,4}|'')'/,greedy:!0},"version-symbol":{pattern:/\|[\w@]+\|/,greedy:!0,alias:"property"},boolean:/\b(?:FALSE|TRUE)\b/,directive:{pattern:/\b(?:ALIAS|ALIGN|AREA|ARM|ASSERT|ATTR|CN|CODE|CODE16|CODE32|COMMON|CP|DATA|DCB|DCD|DCDO|DCDU|DCFD|DCFDU|DCI|DCQ|DCQU|DCW|DCWU|DN|ELIF|ELSE|END|ENDFUNC|ENDIF|ENDP|ENTRY|EQU|EXPORT|EXPORTAS|EXTERN|FIELD|FILL|FN|FUNCTION|GBLA|GBLL|GBLS|GET|GLOBAL|IF|IMPORT|INCBIN|INCLUDE|INFO|KEEP|LCLA|LCLL|LCLS|LTORG|MACRO|MAP|MEND|MEXIT|NOFP|OPT|PRESERVE8|PROC|QN|READONLY|RELOC|REQUIRE|REQUIRE8|RLIST|ROUT|SETA|SETL|SETS|SN|SPACE|SUBT|THUMB|THUMBX|TTL|WEND|WHILE)\b/,alias:"property"},instruction:{pattern:/((?:^|(?:^|[^\\])(?:\r\n?|\n))[ \t]*(?:(?:[A-Z][A-Z0-9_]*[a-z]\w*|[a-z]\w*|\d+)[ \t]+)?)\b[A-Z.]+\b/,lookbehind:!0,alias:"keyword"},variable:/\$\w+/,number:/(?:\b[2-9]_\d+|(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e-?\d+)?|\b0(?:[fd]_|x)[0-9a-f]+|&[0-9a-f]+)\b/i,register:{pattern:/\b(?:r\d|lr)\b/,alias:"symbol"},operator:/<>|<<|>>|&&|\|\||[=!<>/]=?|[+\-*%#?&|^]|:[A-Z]+:/,punctuation:/[()[\],]/},Prism.languages["arm-asm"]=Prism.languages.armasm;
-!function(e){var a=function(a,t){return{pattern:RegExp("\\{!(?:"+(t||a)+")$[^]*\\}","m"),greedy:!0,inside:{embedded:{pattern:/(^\{!\w+\b)[\s\S]+(?=\}$)/,lookbehind:!0,alias:"language-"+a,inside:e.languages[a]},string:/[\s\S]+/}}};e.languages.arturo={comment:{pattern:/;.*/,greedy:!0},character:{pattern:/`.`/,alias:"char",greedy:!0},number:{pattern:/\b\d+(?:\.\d+(?:\.\d+(?:-[\w+-]+)?)?)?\b/},string:{pattern:/"(?:[^"\\\r\n]|\\.)*"/,greedy:!0},regex:{pattern:/\{\/.*?\/\}/,greedy:!0},"html-string":a("html"),"css-string":a("css"),"js-string":a("js"),"md-string":a("md"),"sql-string":a("sql"),"sh-string":a("shell","sh"),multistring:{pattern:/».*|\{:[\s\S]*?:\}|\{[\s\S]*?\}|^-{6}$[\s\S]*/m,alias:"string",greedy:!0},label:{pattern:/\w+\b\??:/,alias:"property"},literal:{pattern:/'(?:\w+\b\??:?)/,alias:"constant"},type:{pattern:/:(?:\w+\b\??:?)/,alias:"class-name"},color:/#\w+/,predicate:{pattern:/\b(?:all|and|any|ascii|attr|attribute|attributeLabel|binary|block|char|contains|database|date|dictionary|empty|equal|even|every|exists|false|floating|function|greater|greaterOrEqual|if|in|inline|integer|is|key|label|leap|less|lessOrEqual|literal|logical|lower|nand|negative|nor|not|notEqual|null|numeric|odd|or|path|pathLabel|positive|prefix|prime|regex|same|set|some|sorted|standalone|string|subset|suffix|superset|symbol|symbolLiteral|true|try|type|unless|upper|when|whitespace|word|xnor|xor|zero)\?/,alias:"keyword"},"builtin-function":{pattern:/\b(?:abs|acos|acosh|acsec|acsech|actan|actanh|add|after|alert|alias|and|angle|append|arg|args|arity|array|as|asec|asech|asin|asinh|atan|atan2|atanh|attr|attrs|average|before|benchmark|blend|break|call|capitalize|case|ceil|chop|clear|clip|close|color|combine|conj|continue|copy|cos|cosh|crc|csec|csech|ctan|ctanh|cursor|darken|dec|decode|define|delete|desaturate|deviation|dialog|dictionary|difference|digest|digits|div|do|download|drop|dup|e|else|empty|encode|ensure|env|escape|execute|exit|exp|extend|extract|factors|fdiv|filter|first|flatten|floor|fold|from|function|gamma|gcd|get|goto|hash|hypot|if|inc|indent|index|infinity|info|input|insert|inspect|intersection|invert|jaro|join|keys|kurtosis|last|let|levenshtein|lighten|list|ln|log|loop|lower|mail|map|match|max|median|min|mod|module|mul|nand|neg|new|nor|normalize|not|now|null|open|or|outdent|pad|palette|panic|path|pause|permissions|permutate|pi|pop|popup|pow|powerset|powmod|prefix|print|prints|process|product|query|random|range|read|relative|remove|rename|render|repeat|replace|request|return|reverse|round|sample|saturate|script|sec|sech|select|serve|set|shl|shr|shuffle|sin|sinh|size|skewness|slice|sort|spin|split|sqrt|squeeze|stack|strip|sub|suffix|sum|switch|symbols|symlink|sys|take|tan|tanh|terminal|terminate|to|truncate|try|type|unclip|union|unique|unless|until|unzip|upper|values|var|variance|volume|webview|while|with|wordwrap|write|xnor|xor|zip)\b/,alias:"keyword"},sugar:{pattern:/->|=>|\||::/,alias:"operator"},punctuation:/[()[\],]/,symbol:{pattern:/<:|-:|ø|@|#|\+|\||\*|\$|---|-|%|\/|\.\.|\^|~|=|<|>|\\/},boolean:{pattern:/\b(?:false|maybe|true)\b/}},e.languages.art=e.languages.arturo}(Prism);
-!function(t){var n={pattern:/(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\[\]\\]|\\.)*\]|[^\[\]\\"'$`]|\\.)*\]/m,lookbehind:!0,inside:{quoted:{pattern:/([$`])(?:(?!\1)[^\\]|\\.)*\1/,inside:{punctuation:/^[$`]|[$`]$/}},interpreted:{pattern:/'(?:[^'\\]|\\.)*'/,inside:{punctuation:/^'|'$/}},string:/"(?:[^"\\]|\\.)*"/,variable:/\w+(?==)/,punctuation:/^\[|\]$|,/,operator:/=/,"attr-value":/(?!^\s+$).+/}},i=t.languages.asciidoc={"comment-block":{pattern:/^(\/{4,})$[\s\S]*?^\1/m,alias:"comment"},table:{pattern:/^\|={3,}(?:(?:\r?\n|\r(?!\n)).*)*?(?:\r?\n|\r)\|={3,}$/m,inside:{specifiers:{pattern:/(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*](?:[<^>](?:\.[<^>])?|\.[<^>])?|[<^>](?:\.[<^>])?|\.[<^>])[a-z]*|[a-z]+)(?=\|)/,alias:"attr-value"},punctuation:{pattern:/(^|[^\\])[|!]=*/,lookbehind:!0}}},"passthrough-block":{pattern:/^(\+{4,})$[\s\S]*?^\1$/m,inside:{punctuation:/^\++|\++$/}},"literal-block":{pattern:/^(-{4,}|\.{4,})$[\s\S]*?^\1$/m,inside:{punctuation:/^(?:-+|\.+)|(?:-+|\.+)$/}},"other-block":{pattern:/^(--|\*{4,}|_{4,}|={4,})$[\s\S]*?^\1$/m,inside:{punctuation:/^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/}},"list-punctuation":{pattern:/(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,lookbehind:!0,alias:"punctuation"},"list-label":{pattern:/(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,lookbehind:!0,alias:"symbol"},"indented-block":{pattern:/((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,lookbehind:!0},comment:/^\/\/.*/m,title:{pattern:/^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} .+|^\.(?![\s.]).*/m,alias:"important",inside:{punctuation:/^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/}},"attribute-entry":{pattern:/^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,alias:"tag"},attributes:n,hr:{pattern:/^'{3,}$/m,alias:"punctuation"},"page-break":{pattern:/^<{3,}$/m,alias:"punctuation"},admonition:{pattern:/^(?:CAUTION|IMPORTANT|NOTE|TIP|WARNING):/m,alias:"keyword"},callout:[{pattern:/(^[ \t]*)\d*>/m,lookbehind:!0,alias:"symbol"},{pattern:/<\d+>/,alias:"symbol"}],macro:{pattern:/\b[a-z\d][a-z\d-]*::?(?:[^\s\[\]]*\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:{function:/^[a-z\d-]+(?=:)/,punctuation:/^::?/,attributes:{pattern:/(?:\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:n.inside}}},inline:{pattern:/(^|[^\\])(?:(?:\B\[(?:[^\]\\"']|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?:[^`'\s]|\s+\S)+['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"']|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,lookbehind:!0,inside:{attributes:n,url:{pattern:/^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,inside:{punctuation:/^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/}},"attribute-ref":{pattern:/^\{.+\}$/,inside:{variable:{pattern:/(^\{)[a-z\d,+_-]+/,lookbehind:!0},operator:/^[=?!#%@$]|!(?=[:}])/,punctuation:/^\{|\}$|::?/}},italic:{pattern:/^(['_])[\s\S]+\1$/,inside:{punctuation:/^(?:''?|__?)|(?:''?|__?)$/}},bold:{pattern:/^\*[\s\S]+\*$/,inside:{punctuation:/^\*\*?|\*\*?$/}},punctuation:/^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/}},replacement:{pattern:/\((?:C|R|TM)\)/,alias:"builtin"},entity:/?[\da-z]{1,8};/i,"line-continuation":{pattern:/(^| )\+$/m,lookbehind:!0,alias:"punctuation"}};function e(t){for(var n={},e=0,a=(t=t.split(" ")).length;e>/g,(function(e,s){return"(?:"+n[+s]+")"}))}function s(e,s,a){return RegExp(n(e,s),a||"")}function a(e,n){for(var s=0;s>/g,(function(){return"(?:"+e+")"}));return e.replace(/<>/g,"[^\\s\\S]")}var t="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",r="class enum interface record struct",i="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(r),p=RegExp(l(t+" "+r+" "+i+" "+o)),c=l(r+" "+i+" "+o),u=l(t+" "+r+" "+o),g=a("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=a("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=n("<<0>>(?:\\s*<<1>>)?",[h,g]),m=n("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=n("<<0>>(?:\\s*(?:\\?\\s*)?<<1>>)*(?:\\s*\\?)?",[m,k]),w=n("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k]),v=n("\\(<<0>>+(?:,<<0>>+)+\\)",[w]),x=n("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[v,m,k]),$={keyword:p,punctuation:/[<>()?,.:[\]]/},_="'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",B='"(?:\\\\.|[^\\\\"\r\n])*"';e.languages.csharp=e.languages.extend("clike",{string:[{pattern:s("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[^]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:s("(^|[^@$\\\\])<<0>>",[B]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:s("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:$},{pattern:s("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,x]),lookbehind:!0,inside:$},{pattern:s("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:s("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:$},{pattern:s("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:$},{pattern:s("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:s("(\\b(?:is(?:\\s+not)?|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:$},{pattern:s("\\b<<0>>(?=\\s+(?!<<1>>|with\\s*\\{)<<2>>(?:\\s*[=,;:{)\\]]|\\s+(?:in|when)\\b))",[x,u,h]),inside:$}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:s("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:s("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:s("(\\b(?:default|sizeof|typeof)\\s*\\(\\s*(?!\\s))(?:[^()\\s]|\\s(?!\\s)|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:$},"return-type":{pattern:s("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[x,m]),inside:$,alias:"class-name"},"constructor-invocation":{pattern:s("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[x]),lookbehind:!0,inside:$,alias:"class-name"},"generic-method":{pattern:s("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:s("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:$}}},"type-list":{pattern:s("\\b((?:<<0>>\\s+<<1>>|record\\s+<<1>>\\s*<<5>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>|<<1>>\\s*<<5>>|<<6>>)(?:\\s*,\\s*(?:<<3>>|<<4>>|<<6>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,x,p.source,b,"\\bnew\\s*\\(\\s*\\)"]),lookbehind:!0,inside:{"record-arguments":{pattern:s("(^(?!new\\s*\\()<<0>>\\s*)<<1>>",[f,b]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:p,"class-name":{pattern:RegExp(x),greedy:!0,inside:$},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var E=B+"|"+_,R=n("/(?![*/])|//[^\r\n]*[\r\n]|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>",[E]),z=a(n("[^\"'/()]|<<0>>|\\(<>*\\)",[R]),2),S="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",j=n("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,z]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:s("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[S,j]),lookbehind:!0,greedy:!0,inside:{target:{pattern:s("^<<0>>(?=\\s*:)",[S]),alias:"keyword"},"attribute-arguments":{pattern:s("\\(<<0>>*\\)",[z]),inside:e.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var A=":[^}\r\n]+",F=a(n("[^\"'/()]|<<0>>|\\(<>*\\)",[R]),2),P=n("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[F,A]),U=a(n("[^\"'/()]|/(?!\\*)|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>|\\(<>*\\)",[E]),2),Z=n("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[U,A]);function q(n,a){return{interpolation:{pattern:s("((?:^|[^{])(?:\\{\\{)*)<<0>>",[n]),lookbehind:!0,inside:{"format-string":{pattern:s("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[a,A]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:s('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[^]|\\{\\{|<<0>>|[^\\\\{"])*"',[P]),lookbehind:!0,greedy:!0,inside:q(P,F)},{pattern:s('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[Z]),lookbehind:!0,greedy:!0,inside:q(Z,U)}],char:{pattern:RegExp(_),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(Prism);
-Prism.languages.aspnet=Prism.languages.extend("markup",{"page-directive":{pattern:/<%\s*@.*%>/,alias:"tag",inside:{"page-directive":{pattern:/<%\s*@\s*(?:Assembly|Control|Implements|Import|Master(?:Type)?|OutputCache|Page|PreviousPageType|Reference|Register)?|%>/i,alias:"tag"},rest:Prism.languages.markup.tag.inside}},directive:{pattern:/<%.*%>/,alias:"tag",inside:{directive:{pattern:/<%\s*?[$=%#:]{0,2}|%>/,alias:"tag"},rest:Prism.languages.csharp}}}),Prism.languages.aspnet.tag.pattern=/<(?!%)\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/,Prism.languages.insertBefore("inside","punctuation",{directive:Prism.languages.aspnet.directive},Prism.languages.aspnet.tag.inside["attr-value"]),Prism.languages.insertBefore("aspnet","comment",{"asp-comment":{pattern:/<%--[\s\S]*?--%>/,alias:["asp","comment"]}}),Prism.languages.insertBefore("aspnet",Prism.languages.javascript?"script":"tag",{"asp-script":{pattern:/(
-
+
@@ -26,7 +26,7 @@
{% for chat_name in chat_list %}
-
+
{% endfor %}
@@ -34,7 +34,7 @@
@@ -44,20 +44,15 @@
+