From f396203085167225d0f9b9f7dea417ec436b7471 Mon Sep 17 00:00:00 2001 From: Luiz Silva Date: Thu, 12 Feb 2026 16:38:17 -0300 Subject: [PATCH] build --- .agent => .cursorrules | 0 IA.md | 289 ++- dist/eli-vue.css | 2 +- dist/eli-vue.es.js | 2014 ++++++++--------- dist/eli-vue.umd.js | 26 +- .../EliEntrada/EliEntradaParagrafo.vue.d.ts | 4 +- .../EliEntrada/EliEntradaSelecao.vue.d.ts | 4 +- .../EliEntrada/registryEliEntradas.d.ts | 52 +- .../componentes/EliTabela/EliTabela.vue.d.ts | 61 +- .../EliTabelaModalFiltroAvancado.vue.d.ts | 52 +- .../EliTabela/types-eli-tabela.d.ts | 11 +- .../componentes/cartao/EliCartao.vue.d.ts | 24 +- .../ola_mundo/EliOlaMundo.vue.d.ts | 36 +- dist/types/index.d.ts | 7 +- package.json | 2 +- src/componentes/EliTabela/EliTabela.vue | 134 +- src/componentes/EliTabela/EliTabelaDebug.vue | 1 + .../EliTabelaModalFiltroAvancado.vue | 6 +- .../celulas/EliTabelaCelulaTextoTruncado.vue | 3 +- src/componentes/EliTabela/types-eli-tabela.ts | 16 +- src/index.ts | 9 +- src/playground/tabela.playground.vue | 80 +- 22 files changed, 1476 insertions(+), 1357 deletions(-) rename .agent => .cursorrules (100%) diff --git a/.agent b/.cursorrules similarity index 100% rename from .agent rename to .cursorrules diff --git a/IA.md b/IA.md index 86b55c5..75441c9 100644 --- a/IA.md +++ b/IA.md @@ -15,6 +15,7 @@ Biblioteca (Design System) de componentes para **Vue 3** com **TypeScript** e in - O `eli-vue` **não cria** nem configura Vuetify no seu projeto. - `vue` e `vuetify` são **peerDependencies**: o projeto consumidor precisa ter ambos instalados. +- O pacote utiliza internamente **lucide-vue-next** para ícones. --- @@ -29,9 +30,11 @@ pnpm add eli-vue Se o projeto ainda não tiver as peer dependencies, instale também: ```bash -pnpm add vue vuetify +pnpm add vue vuetify lucide-vue-next ``` +> Nota: `lucide-vue-next` é recomendado para passar ícones compatíveis aos componentes (como `EliTabela`). + --- ## Uso recomendado @@ -82,6 +85,28 @@ import "eli-vue/dist/eli-vue.css"; --- +## Tipagem e Helpers + +O pacote exporta tipos e funções utilitárias essenciais para o desenvolvimento com TypeScript. + +```ts +import { + // Componentes + EliTabela, + + // Helpers + celulaTabela, + + // Tipos + EliTabelaConsulta, + EliColuna, + EliTabelaAcao, + CartaoStatus // Tipos compartilhados +} from "eli-vue"; +``` + +--- + ## Exemplos mínimos ### Botão @@ -214,6 +239,7 @@ import { defineComponent, ref } from "vue"; export default defineComponent({ setup() { + // Exemplo de valor ISO vindo do backend/banco const dataHora = ref("2026-01-09T16:15:00Z"); const data = ref("2026-01-09T00:00:00-03:00"); return { dataHora, data }; @@ -224,71 +250,173 @@ export default defineComponent({ --- -## EliTabela (com filtro avançado) +## Outros Componentes -O componente `EliTabela` suporta: -- ordenação -- paginação -- caixa de busca -- **filtro avançado (modal)** +### EliBadge (Indicador) -### Contrato da tabela (resumo) +Badge aprimorado que suporta raios predefinidos ("suave" | "pill"). -O tipo principal é `EliTabelaConsulta` (genérico), exportado de `eli-vue`. - -O `filtroAvancado` é uma lista de filtros pré-definidos (o usuário só escolhe quais usar e informa valores): - -```ts -filtroAvancado?: { - rotulo: string - coluna: keyof T - operador: string // ex.: "like", "=", ">", "in", "isNull" - entrada: ["texto" | "numero" | "dataHora", { rotulo: string; ... }] -}[] +```vue + ``` -### Exemplo mínimo +### EliCartao -```ts -import { EliTabela, celulaTabela } from "eli-vue"; -import type { EliTabelaConsulta } from "eli-vue"; -import type { ComponenteEntrada } from "eli-vue/dist/types/componentes/EliEntrada/tiposEntradas"; +Cartão padronizado para representar itens de domínio (ex: propostas) com status coloridos automaticamente. -type Linha = { nome: string; documento: string; email: string }; +> **Importante**: O status deve ser um dos valores do tipo `CartaoStatus` ("novo" | "rascunho" | "vendido" | "cancelado"). -const tabela: EliTabelaConsulta = { - nome: "Exemplo", - mostrarCaixaDeBusca: true, - registros_por_consulta: 10, - colunas: [ - { rotulo: "Nome", celula: (l) => celulaTabela("textoSimples", { texto: l.nome }), visivel: true }, - ], - filtroAvancado: [ - { - rotulo: "Documento", - coluna: "documento", - operador: "like", - entrada: ["texto", { rotulo: "Documento", formato: "cpfCnpj" }] as unknown as ComponenteEntrada, - }, - ], - consulta: async () => ({ - cod: 0, - eCerto: true, - eErro: false, - mensagem: undefined, - valor: { quantidade: 0, valores: [] }, - }), -}; +```vue + + + ``` --- -## Células da EliTabela (celulaTabela) +## EliTabela (Tabela Avançada) -O `eli-vue` expõe o helper `celulaTabela(tipo, dados)` para construir células tipadas. +O componente `EliTabela` suporta ordenação, paginação, busca e **filtro avançado**. +Para type-safety, recomenda-se definir a estrutura da consulta usando `EliTabelaConsulta`. -Tipos disponíveis atualmente: +### Exemplo Completo Tipado + +```ts +import { defineComponent } from "vue"; +import { EliTabela, celulaTabela } from "eli-vue"; +import type { EliTabelaConsulta } from "eli-vue"; +import type { ComponenteEntrada } from "eli-vue/dist/types/componentes/EliEntrada/tiposEntradas"; +// ^ Nota: Tipos internos podem precisar de caminho completo se não exportados na raiz. +// Melhor prática: use 'any' ou 'unknown' castado se o tipo não estiver disponível, +// mas `EliTabelaConsulta` geralmente infere. + +import { BadgeCheck, Pencil } from "lucide-vue-next"; + +// 1. Defina o tipo da linha +type Usuario = { + id: number; + nome: string; + documento: string; + email: string; + ativo: boolean; + criado_em: string; +}; + +// 2. Defina a configuração da tabela +const tabelaUsuarios: EliTabelaConsulta = { + nome: "Usuarios", + mostrarCaixaDeBusca: true, + registros_por_consulta: 10, + + // Colunas + colunas: [ + { + rotulo: "Nome", + celula: (row) => celulaTabela("textoSimples", { texto: row.nome }), + visivel: true, + coluna_ordem: "nome" // Habilita ordenação + }, + { + rotulo: "Status", + visivel: true, + celula: (row) => celulaTabela("tags", { + opcoes: [ + row.ativo + ? { rotulo: "Ativo", cor: "success", icone: BadgeCheck } + : { rotulo: "Inativo", cor: "error" } + ] + }) + }, + { + rotulo: "Criado em", + visivel: true, + celula: (row) => celulaTabela("data", { + valor: row.criado_em, + formato: "data_hora" + }) + } + ], + + // Ações de linha (botões à direita) + acoesLinha: [ + { + rotulo: "Editar", + icone: Pencil, + cor: "primary", + acao: (row) => console.log("Editar", row.id) + } + ], + + // Filtro Avançado (definição dos campos de filtro) + filtroAvancado: [ + { + rotulo: "Documento", + coluna: "documento", + operador: "like", // like, =, >, <, etc + entrada: ["texto", { rotulo: "Documento", formato: "cpfCnpj" }] as any, + }, + { + rotulo: "Criado em (Início)", + coluna: "criado_em", + operador: ">=", + entrada: ["dataHora", { rotulo: "A partir de", modo: "data" }] as any + } + ], + + // Função de consulta (simulada ou API real) + consulta: async (params) => { + console.log("Consultando com:", params); + // params contém: { filtro, coluna_ordem, direcao_ordem, offSet, limit, texto_busca } + + return { + cod: 0, + eCerto: true, + eErro: false, + mensagem: undefined, + valor: { + quantidade: 1, + valores: [ + { id: 1, nome: "Luiz", documento: "123", email: "a@a.com", ativo: true, criado_em: "2024-01-01" } + ] + }, + }; + }, +}; +``` + +### Tipos de Células (`celulaTabela`) + +Helper: `celulaTabela(tipo, dados)` - `textoSimples`: `{ texto: string; acao?: () => void }` - `textoTruncado`: `{ texto: string; acao?: () => void }` @@ -296,35 +424,6 @@ Tipos disponíveis atualmente: - `tags`: `{ opcoes: { rotulo: string; cor?: string; icone?: LucideIcon; acao?: () => void }[] }` - `data`: `{ valor: string; formato: "data" | "data_hora" | "relativo"; acao?: () => void }` -### Exemplo: célula `tags` - -```ts -import { celulaTabela } from "eli-vue"; -import { BadgeCheck, Pencil } from "lucide-vue-next"; - -celula: (l) => - celulaTabela("tags", { - opcoes: [ - { rotulo: "Ativo", cor: "success", icone: BadgeCheck }, - { rotulo: "Editar", cor: "primary", icone: Pencil, acao: () => editar(l) }, - ], - }) -``` - -### Exemplo: célula `data` - -```ts -import { celulaTabela } from "eli-vue"; - -celula: (l) => - celulaTabela("data", { - valor: l.criado_em, // ISO - formato: "data", // "data" | "data_hora" | "relativo" - }) -``` - -> Observação: em modo simulação/local, a tabela pode buscar uma lista completa e aplicar filtro/paginação localmente. - --- ## Troubleshooting (para IAs) @@ -332,20 +431,24 @@ celula: (l) => ### 1) “Failed to resolve component” Provável causa: componente não foi registrado. - - Se estiver usando plugin: confirme `app.use(EliVue)` - Se estiver importando direto: registre localmente no componente ### 2) Estilos não aplicam Confirme que o projeto importou: - - `vuetify/styles` - `eli-vue/dist/eli-vue.css` -### 3) Ícones não aparecem +### 3) Erro de tipo em `celulaTabela` -Alguns exemplos usam `` (MDI). O `eli-vue` **não instala** ícones automaticamente no projeto consumidor. +Verifique se você importou `celulaTabela` de `eli-vue`. +Certifique-se de que o segundo argumento corresponde ao tipo da célula (ex: `textoSimples` pede `{ texto: string }`). + +### 4) Ícones não aparecem + +O `eli-vue` espera ícones do pacote `lucide-vue-next` (ou compatíveis com Component type do Vue). +Certifique-se de passar o componente do ícone (ex: `Pencil`), e não string. --- @@ -353,19 +456,17 @@ Alguns exemplos usam `` (MDI). O `eli-vue` **não instala** ícones auto Quando for integrar `eli-vue` num projeto existente: -1) Verifique se **Vue 3** e **Vuetify 3** já estão configurados. -2) Prefira usar o **plugin** do `eli-vue` (simplifica registro). +1) Verifique se **Vue 3**, **Vuetify 3** e **lucide-vue-next** estão instalados. +2) Prefira usar o **plugin** do `eli-vue` (simplifica registro global). 3) Garanta o import do CSS do pacote (`eli-vue/dist/eli-vue.css`). -4) Ao ver erros de tipos, valide se o projeto está usando TypeScript e se o build está resolvendo `types` corretamente. +4) Use `celulaTabela` para construir colunas de tabelas de forma tipada. +5) Ao definir tabelas, use `EliTabelaConsulta` para garantir que colunas e filtros batam com o tipo de dados. --- ## Quando este arquivo deve ser atualizado -Atualize este `IA.md` quando houver mudanças em qualquer um destes pontos: - -- caminho/nome do CSS em `dist/` -- forma de instalação e/ou peerDependencies -- forma de uso do plugin/export principal -- lista de exports públicos (novos componentes, renomes, remoções) -- mudanças de comportamento relevantes para consumo +Atualize este `IA.md` quando houver mudanças em: +- Estrutura de exports (novos componentes ou helpers). +- Tipagem das células ou entradas. +- Dependências obrigatórias. diff --git a/dist/eli-vue.css b/dist/eli-vue.css index fcf6c74..70f24c0 100644 --- a/dist/eli-vue.css +++ b/dist/eli-vue.css @@ -1 +1 @@ -@font-face{font-family:Google Sans;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://paiol.idz.one/estaticos/GoogleSans/GoogleSans-VariableFont_GRAD,opsz,wght.ttf) format("truetype")}@font-face{font-family:Google Sans;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://paiol.idz.one/estaticos/GoogleSans/GoogleSans-Italic-VariableFont_GRAD,opsz,wght.ttf) format("truetype")}:root{--eli-font-family: "Google Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;--v-font-family: var(--eli-font-family)}html,body{font-family:var(--eli-font-family)}:where([class^=eli-],[class*=" eli-"]){font-family:var(--eli-font-family);--v-font-family: var(--eli-font-family)}button,input,select,textarea{font-family:inherit}[data-v-371c8db4] .v-badge__badge,[data-v-371c8db4] .v-badge__content{border-radius:var(--eli-badge-radius)!important}.eli-cartao[data-v-6c492bd9]{border-radius:12px}.eli-cartao__titulo[data-v-6c492bd9]{display:flex;align-items:center;justify-content:space-between;gap:12px}.eli-cartao__titulo-texto[data-v-6c492bd9]{min-width:0}.eli-cartao__conteudo[data-v-6c492bd9]{padding-top:8px}.eli-cartao__acoes[data-v-6c492bd9]{padding-top:0}.eli-cartao--cancelado[data-v-6c492bd9]{opacity:.85}.eli-tabela__busca[data-v-341415d1]{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.eli-tabela__busca-input-wrapper[data-v-341415d1]{display:inline-flex;align-items:stretch;border-radius:var(--eli-tabela-cabecalho-controle-radius, 8px);border:1px solid rgba(15,23,42,.15);overflow:hidden;background:#fff;height:var(--eli-tabela-cabecalho-controle-altura, 34px)}.eli-tabela__busca-input[data-v-341415d1]{height:100%;padding:0 12px;border:none;outline:none;font-size:.875rem;color:#0f172ad9}.eli-tabela__busca-input[data-v-341415d1]::-webkit-search-cancel-button,.eli-tabela__busca-input[data-v-341415d1]::-webkit-search-decoration{-webkit-appearance:none}.eli-tabela__busca-input[data-v-341415d1]::placeholder{color:#6b7280d9}.eli-tabela__busca-botao[data-v-341415d1]{display:inline-flex;align-items:center;justify-content:center;border:none;background:#2563eb1f;color:#2563ebf2;height:100%;padding:0 12px;cursor:pointer;transition:background-color .2s ease,color .2s ease}.eli-tabela__busca-botao-icone[data-v-341415d1]{display:block}.eli-tabela__busca-botao[data-v-341415d1]:hover,.eli-tabela__busca-botao[data-v-341415d1]:focus-visible{background:#2563eb33;color:#2563eb}.eli-tabela__busca-botao[data-v-341415d1]:focus-visible{outline:2px solid rgba(37,99,235,.35);outline-offset:2px}.eli-tabela__busca-grupo[data-v-17166105]{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}.eli-tabela__celula-link[data-v-7a629ffa]{all:unset;display:inline;color:#2563eb;cursor:pointer;text-decoration:underline;text-decoration-color:#2563eb8c;text-underline-offset:2px}.eli-tabela__celula-link[data-v-7a629ffa]:hover{color:#1d4ed8;text-decoration-color:#1d4ed8bf}.eli-tabela__celula-link[data-v-7a629ffa]:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px;border-radius:4px}.eli-tabela__texto-truncado[data-v-74854889]{display:inline-block;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:top}.eli-tabela__celula-link[data-v-74854889]{all:unset;display:inline;color:#2563eb;cursor:pointer;text-decoration:underline;text-decoration-color:#2563eb8c;text-underline-offset:2px}.eli-tabela__celula-link[data-v-74854889]:hover{color:#1d4ed8;text-decoration-color:#1d4ed8bf}.eli-tabela__celula-link[data-v-74854889]:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px;border-radius:4px}.eli-tabela__celula-link[data-v-69c890c4]{all:unset;display:inline;color:#2563eb;cursor:pointer;text-decoration:underline;text-decoration-color:#2563eb8c;text-underline-offset:2px}.eli-tabela__celula-link[data-v-69c890c4]:hover{color:#1d4ed8;text-decoration-color:#1d4ed8bf}.eli-tabela__celula-link[data-v-69c890c4]:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px;border-radius:4px}.eli-tabela__celula-tags[data-v-a9c83dbe]{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.eli-tabela__celula-tag[data-v-a9c83dbe]{cursor:default}.eli-tabela__celula-tag-icone[data-v-a9c83dbe]{margin-right:6px}.eli-tabela__celula-link[data-v-2b88bbb2]{all:unset;display:inline;color:#2563eb;cursor:pointer;text-decoration:underline;text-decoration-color:#2563eb8c;text-underline-offset:2px}.eli-tabela__celula-link[data-v-2b88bbb2]:hover{color:#1d4ed8;text-decoration-color:#1d4ed8bf}.eli-tabela__celula-link[data-v-2b88bbb2]:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px;border-radius:4px}.eli-tabela__paginacao[data-v-5ca7a362]{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:12px;flex-wrap:wrap}.eli-tabela__pagina-botao[data-v-5ca7a362]{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:6px 14px;border-radius:9999px;border:1px solid rgba(15,23,42,.12);background:#fff;font-size:.875rem;font-weight:500;color:#0f172ad1;cursor:pointer;transition:background-color .2s ease,border-color .2s ease,color .2s ease}.eli-tabela__pagina-botao[data-v-5ca7a362]:hover,.eli-tabela__pagina-botao[data-v-5ca7a362]:focus-visible{background-color:#2563eb14;border-color:#2563eb66;color:#2563ebf2}.eli-tabela__pagina-botao[data-v-5ca7a362]:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px}.eli-tabela__pagina-botao[data-v-5ca7a362]:disabled{cursor:default;opacity:.5;background:#94a3b814;border-color:#94a3b82e;color:#475569bf}.eli-tabela__pagina-botao--ativo[data-v-5ca7a362]{background:#2563eb1f;border-color:#2563eb66;color:#2563ebf2}.eli-tabela__pagina-ellipsis[data-v-5ca7a362]{display:inline-flex;align-items:center;justify-content:center;width:32px;color:#6b7280d9;font-size:.9rem}.eli-tabela-modal-colunas__overlay[data-v-b8f693ef]{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172a59;z-index:4000;display:flex;align-items:center;justify-content:center;padding:16px}.eli-tabela-modal-colunas__modal[data-v-b8f693ef]{width:min(860px,100%);background:#fff;border-radius:14px;border:1px solid rgba(15,23,42,.1);box-shadow:0 18px 60px #0f172a40;overflow:hidden}.eli-tabela-modal-colunas__header[data-v-b8f693ef]{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid rgba(15,23,42,.08)}.eli-tabela-modal-colunas__titulo[data-v-b8f693ef]{font-size:1rem;margin:0}.eli-tabela-modal-colunas__fechar[data-v-b8f693ef]{width:34px;height:34px;border-radius:10px;border:none;background:transparent;cursor:pointer;font-size:22px;line-height:1;color:#0f172acc}.eli-tabela-modal-colunas__fechar[data-v-b8f693ef]:hover,.eli-tabela-modal-colunas__fechar[data-v-b8f693ef]:focus-visible{background:#0f172a0f}.eli-tabela-modal-colunas__conteudo[data-v-b8f693ef]{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:16px}.eli-tabela-modal-colunas__coluna-titulo[data-v-b8f693ef]{font-weight:600;margin-bottom:8px}.eli-tabela-modal-colunas__lista[data-v-b8f693ef]{min-height:260px;border:1px solid rgba(15,23,42,.12);border-radius:12px;padding:10px;background:#0f172a03}.eli-tabela-modal-colunas__item[data-v-b8f693ef]{display:flex;align-items:center;gap:10px;padding:10px;border-radius:10px;border:1px solid rgba(15,23,42,.08);background:#fff;cursor:grab;-webkit-user-select:none;user-select:none}.eli-tabela-modal-colunas__item+.eli-tabela-modal-colunas__item[data-v-b8f693ef]{margin-top:8px}.eli-tabela-modal-colunas__item[data-v-b8f693ef]:active{cursor:grabbing}.eli-tabela-modal-colunas__item-handle[data-v-b8f693ef]{color:#0f172a8c;font-size:14px}.eli-tabela-modal-colunas__item-texto[data-v-b8f693ef]{flex:1;min-width:0}.eli-tabela-modal-colunas__footer[data-v-b8f693ef]{display:flex;justify-content:flex-end;gap:8px;padding:14px 16px;border-top:1px solid rgba(15,23,42,.08)}.eli-tabela-modal-colunas__botao[data-v-b8f693ef]{height:34px;padding:0 14px;border-radius:10px;border:1px solid rgba(15,23,42,.12);background:#fff;cursor:pointer;font-size:.9rem}.eli-tabela-modal-colunas__botao--sec[data-v-b8f693ef]:hover,.eli-tabela-modal-colunas__botao--sec[data-v-b8f693ef]:focus-visible{background:#0f172a0f}.eli-tabela-modal-colunas__botao--prim[data-v-b8f693ef]{border:none;background:#2563ebf2;color:#fff}.eli-tabela-modal-colunas__botao--prim[data-v-b8f693ef]:hover,.eli-tabela-modal-colunas__botao--prim[data-v-b8f693ef]:focus-visible{background:#2563eb}@media(max-width:720px){.eli-tabela-modal-colunas__conteudo[data-v-b8f693ef]{grid-template-columns:1fr}}.eli-entrada__prefixo[data-v-77cbf216],.eli-entrada__sufixo[data-v-77cbf216]{opacity:.75;font-size:.9em;white-space:nowrap}.eli-entrada__prefixo[data-v-77cbf216]{margin-right:6px}.eli-entrada__sufixo[data-v-77cbf216]{margin-left:6px}.eli-data-hora[data-v-1bfd1be8]{width:100%}.eli-tabela-modal-filtro__overlay[data-v-ae32fe4c]{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172a59;z-index:4000;display:flex;align-items:center;justify-content:center;padding:16px}.eli-tabela-modal-filtro__modal[data-v-ae32fe4c]{width:min(980px,100%);background:#fff;border-radius:14px;border:1px solid rgba(15,23,42,.1);box-shadow:0 18px 60px #0f172a40;overflow:hidden}.eli-tabela-modal-filtro__header[data-v-ae32fe4c]{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid rgba(15,23,42,.08)}.eli-tabela-modal-filtro__titulo[data-v-ae32fe4c]{font-size:1rem;margin:0}.eli-tabela-modal-filtro__fechar[data-v-ae32fe4c]{width:34px;height:34px;border-radius:10px;border:none;background:transparent;cursor:pointer;font-size:22px;line-height:1;color:#0f172acc}.eli-tabela-modal-filtro__fechar[data-v-ae32fe4c]:hover,.eli-tabela-modal-filtro__fechar[data-v-ae32fe4c]:focus-visible{background:#0f172a0f}.eli-tabela-modal-filtro__conteudo[data-v-ae32fe4c]{padding:16px}.eli-tabela-modal-filtro__vazio[data-v-ae32fe4c]{opacity:.75;font-size:.9rem}.eli-tabela-modal-filtro__lista[data-v-ae32fe4c]{display:grid;gap:10px}.eli-tabela-modal-filtro__linha[data-v-ae32fe4c]{display:grid;grid-template-columns:1fr 34px;gap:10px;align-items:center}.eli-tabela-modal-filtro__select[data-v-ae32fe4c]{height:34px;border-radius:10px;border:1px solid rgba(15,23,42,.12);padding:0 10px;background:#fff}.eli-tabela-modal-filtro__entrada[data-v-ae32fe4c]{min-width:0}.eli-tabela-modal-filtro__remover[data-v-ae32fe4c]{width:34px;height:34px;border-radius:10px;border:1px solid rgba(15,23,42,.12);background:#fff;cursor:pointer;font-size:18px;line-height:1;color:#0f172acc}.eli-tabela-modal-filtro__remover[data-v-ae32fe4c]:hover,.eli-tabela-modal-filtro__remover[data-v-ae32fe4c]:focus-visible{background:#0f172a0f}.eli-tabela-modal-filtro__acoes[data-v-ae32fe4c]{margin-top:12px}.eli-tabela-modal-filtro__footer[data-v-ae32fe4c]{display:flex;justify-content:flex-end;gap:8px;padding:14px 16px;border-top:1px solid rgba(15,23,42,.08)}.eli-tabela-modal-filtro__botao[data-v-ae32fe4c]{height:34px;padding:0 14px;border-radius:10px;border:1px solid rgba(15,23,42,.12);background:#fff;cursor:pointer;font-size:.9rem}.eli-tabela-modal-filtro__botao[data-v-ae32fe4c]:disabled{opacity:.55;cursor:not-allowed}.eli-tabela-modal-filtro__botao--sec[data-v-ae32fe4c]:hover,.eli-tabela-modal-filtro__botao--sec[data-v-ae32fe4c]:focus-visible{background:#0f172a0f}.eli-tabela-modal-filtro__botao--prim[data-v-ae32fe4c]{border:none;background:#2563ebf2;color:#fff}.eli-tabela-modal-filtro__botao--prim[data-v-ae32fe4c]:hover,.eli-tabela-modal-filtro__botao--prim[data-v-ae32fe4c]:focus-visible{background:#2563eb}@media(max-width:880px){.eli-tabela-modal-filtro__linha[data-v-ae32fe4c]{grid-template-columns:1fr}}.eli-tabela{width:100%}.eli-tabela__table{width:100%;border-collapse:separate;border-spacing:0;border:1px solid rgba(0,0,0,.12);border-radius:12px;overflow:visible}.eli-tabela__tbody{overflow:visible}.eli-tabela__tbody .eli-tabela__tr--zebra .eli-tabela__td{background:#0f172a05}.eli-tabela__th,.eli-tabela__td{padding:10px 12px;border-bottom:1px solid rgba(0,0,0,.08);vertical-align:top}.eli-tabela__th{text-align:left;font-weight:600;background:#00000008}.eli-tabela__th--ordenavel{padding:0}.eli-tabela__th--ordenavel .eli-tabela__th-botao{padding:10px 12px}.eli-tabela__th-botao{display:inline-flex;align-items:center;justify-content:flex-start;gap:8px;width:100%;background:transparent;border:none;font:inherit;color:inherit;cursor:pointer;text-align:left;transition:color .2s ease}.eli-tabela__th-botao:hover,.eli-tabela__th-botao:focus-visible{color:#0f172ad9}.eli-tabela__th-botao:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px}.eli-tabela__th-botao--ativo{color:#2563ebf2}.eli-tabela__th-texto{flex:1;min-width:0;white-space:nowrap}.eli-tabela__th-icone{flex-shrink:0}.eli-tabela__th-icone--oculto{opacity:0}.eli-tabela__tr:last-child .eli-tabela__td{border-bottom:none}.eli-tabela__td--clicavel{cursor:pointer}.eli-tabela__td--clicavel:hover{background:#00000008}.eli-tabela--erro{border:1px solid rgba(220,53,69,.35);border-radius:12px;padding:12px}.eli-tabela--carregando{border:1px dashed rgba(0,0,0,.25);border-radius:12px;padding:12px;opacity:.8}.eli-tabela__erro-titulo{font-weight:700;margin-bottom:4px}.eli-tabela__erro-mensagem{opacity:.9}.eli-tabela--vazio{border:1px dashed rgba(0,0,0,.25);border-radius:12px;padding:12px;opacity:.8}.eli-tabela__th--acoes{text-align:right;white-space:nowrap}.eli-tabela__td--acoes{white-space:nowrap;overflow:visible}.eli-tabela__acoes-container{display:flex;justify-content:flex-end;position:relative;z-index:1}.eli-tabela__acoes-container--aberto{z-index:200}.eli-tabela__cabecalho{width:100%;box-sizing:border-box;display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-bottom:12px;flex-wrap:wrap;--eli-tabela-cabecalho-controle-altura: 34px;--eli-tabela-cabecalho-controle-radius: 8px}.eli-tabela__acoes-cabecalho{display:inline-flex;gap:8px;flex-wrap:wrap}.eli-tabela__acoes-cabecalho-botao{display:inline-flex;align-items:center;gap:6px;height:var(--eli-tabela-cabecalho-controle-altura);padding:0 14px;border-radius:var(--eli-tabela-cabecalho-controle-radius);border:none;background:#2563eb1f;color:#2563ebf2;font-size:.875rem;font-weight:500;line-height:1;cursor:pointer;transition:background-color .2s ease,color .2s ease}.eli-tabela__acoes-cabecalho-botao:hover,.eli-tabela__acoes-cabecalho-botao:focus-visible{background:#2563eb33}.eli-tabela__acoes-cabecalho-botao:focus-visible{outline:2px solid rgba(37,99,235,.35);outline-offset:2px}.eli-tabela__acoes-cabecalho-icone{display:inline-block}.eli-tabela__acoes-cabecalho-rotulo{line-height:1}.eli-tabela__acoes-toggle{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:9999px;border:none;background:transparent;color:#0f172ab8;cursor:pointer;transition:background-color .2s ease,color .2s ease}.eli-tabela__acoes-toggle-icone{display:block}.eli-tabela__acoes-toggle:hover,.eli-tabela__acoes-toggle:focus-visible{background-color:#0f172a14;color:#0f172af2}.eli-tabela__acoes-toggle:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px}.eli-tabela__acoes-toggle:disabled{cursor:default;color:#94a3b8cc;background:transparent}.eli-tabela__acoes-menu{min-width:180px;padding:6px 0;margin:0;list-style:none;background:#fff;border:1px solid rgba(15,23,42,.08);border-radius:10px;box-shadow:0 12px 30px #0f172a2e;z-index:1000}.eli-tabela__acoes-item{margin:0}.eli-tabela__acoes-item-botao{display:flex;align-items:center;gap:8px;width:100%;padding:8px 12px;border:none;background:transparent;font-size:.9rem;cursor:pointer;transition:background-color .2s ease}.eli-tabela__acoes-item-botao:hover,.eli-tabela__acoes-item-botao:focus-visible{background-color:#0f172a0f}.eli-tabela__acoes-item-botao:focus-visible{outline:2px solid currentColor;outline-offset:-2px}.eli-tabela__acoes-item-icone{flex-shrink:0}.eli-tabela__acoes-item-texto{flex:1;text-align:left}.eli-tabela__th--expander,.eli-tabela__td--expander{width:42px;padding:6px 8px;text-align:center;vertical-align:middle}.eli-tabela__expander-botao{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:9999px;border:none;background:transparent;color:#0f172ab8;cursor:pointer;transition:background-color .2s ease,color .2s ease}.eli-tabela__expander-botao:hover,.eli-tabela__expander-botao:focus-visible{background-color:#0f172a14;color:#0f172af2}.eli-tabela__expander-botao:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px}.eli-tabela__expander-botao--ativo{background-color:#0f172a0f;color:#0f172af2}.eli-tabela__td--detalhes{padding:12px}.eli-tabela__tr--detalhes .eli-tabela__td{border-bottom:1px solid rgba(0,0,0,.08)}.eli-tabela__detalhes{display:grid;gap:10px;padding-left:4px}.eli-tabela__detalhe{display:grid;grid-template-columns:180px 1fr;gap:10px;align-items:start}.eli-tabela__detalhe-rotulo{font-weight:600;color:#0f172ad9}.eli-tabela__detalhe-valor{min-width:0}@media(max-width:720px){.eli-tabela__detalhe{grid-template-columns:1fr}} +@font-face{font-family:Google Sans;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://paiol.idz.one/estaticos/GoogleSans/GoogleSans-VariableFont_GRAD,opsz,wght.ttf) format("truetype")}@font-face{font-family:Google Sans;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://paiol.idz.one/estaticos/GoogleSans/GoogleSans-Italic-VariableFont_GRAD,opsz,wght.ttf) format("truetype")}:root{--eli-font-family: "Google Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;--v-font-family: var(--eli-font-family)}html,body{font-family:var(--eli-font-family)}:where([class^=eli-],[class*=" eli-"]){font-family:var(--eli-font-family);--v-font-family: var(--eli-font-family)}button,input,select,textarea{font-family:inherit}[data-v-371c8db4] .v-badge__badge,[data-v-371c8db4] .v-badge__content{border-radius:var(--eli-badge-radius)!important}.eli-cartao[data-v-6c492bd9]{border-radius:12px}.eli-cartao__titulo[data-v-6c492bd9]{display:flex;align-items:center;justify-content:space-between;gap:12px}.eli-cartao__titulo-texto[data-v-6c492bd9]{min-width:0}.eli-cartao__conteudo[data-v-6c492bd9]{padding-top:8px}.eli-cartao__acoes[data-v-6c492bd9]{padding-top:0}.eli-cartao--cancelado[data-v-6c492bd9]{opacity:.85}.eli-tabela__busca[data-v-341415d1]{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.eli-tabela__busca-input-wrapper[data-v-341415d1]{display:inline-flex;align-items:stretch;border-radius:var(--eli-tabela-cabecalho-controle-radius, 8px);border:1px solid rgba(15,23,42,.15);overflow:hidden;background:#fff;height:var(--eli-tabela-cabecalho-controle-altura, 34px)}.eli-tabela__busca-input[data-v-341415d1]{height:100%;padding:0 12px;border:none;outline:none;font-size:.875rem;color:#0f172ad9}.eli-tabela__busca-input[data-v-341415d1]::-webkit-search-cancel-button,.eli-tabela__busca-input[data-v-341415d1]::-webkit-search-decoration{-webkit-appearance:none}.eli-tabela__busca-input[data-v-341415d1]::placeholder{color:#6b7280d9}.eli-tabela__busca-botao[data-v-341415d1]{display:inline-flex;align-items:center;justify-content:center;border:none;background:#2563eb1f;color:#2563ebf2;height:100%;padding:0 12px;cursor:pointer;transition:background-color .2s ease,color .2s ease}.eli-tabela__busca-botao-icone[data-v-341415d1]{display:block}.eli-tabela__busca-botao[data-v-341415d1]:hover,.eli-tabela__busca-botao[data-v-341415d1]:focus-visible{background:#2563eb33;color:#2563eb}.eli-tabela__busca-botao[data-v-341415d1]:focus-visible{outline:2px solid rgba(37,99,235,.35);outline-offset:2px}.eli-tabela__busca-grupo[data-v-17166105]{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}.eli-tabela__celula-link[data-v-7a629ffa]{all:unset;display:inline;color:#2563eb;cursor:pointer;text-decoration:underline;text-decoration-color:#2563eb8c;text-underline-offset:2px}.eli-tabela__celula-link[data-v-7a629ffa]:hover{color:#1d4ed8;text-decoration-color:#1d4ed8bf}.eli-tabela__celula-link[data-v-7a629ffa]:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px;border-radius:4px}.eli-tabela__texto-truncado[data-v-20b03658]{display:inline-block;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:top}.eli-tabela__celula-link[data-v-20b03658]{all:unset;display:inline;color:#2563eb;cursor:pointer;text-decoration:underline;text-decoration-color:#2563eb8c;text-underline-offset:2px}.eli-tabela__celula-link[data-v-20b03658]:hover{color:#1d4ed8;text-decoration-color:#1d4ed8bf}.eli-tabela__celula-link[data-v-20b03658]:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px;border-radius:4px}.eli-tabela__celula-link[data-v-69c890c4]{all:unset;display:inline;color:#2563eb;cursor:pointer;text-decoration:underline;text-decoration-color:#2563eb8c;text-underline-offset:2px}.eli-tabela__celula-link[data-v-69c890c4]:hover{color:#1d4ed8;text-decoration-color:#1d4ed8bf}.eli-tabela__celula-link[data-v-69c890c4]:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px;border-radius:4px}.eli-tabela__celula-tags[data-v-a9c83dbe]{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.eli-tabela__celula-tag[data-v-a9c83dbe]{cursor:default}.eli-tabela__celula-tag-icone[data-v-a9c83dbe]{margin-right:6px}.eli-tabela__celula-link[data-v-2b88bbb2]{all:unset;display:inline;color:#2563eb;cursor:pointer;text-decoration:underline;text-decoration-color:#2563eb8c;text-underline-offset:2px}.eli-tabela__celula-link[data-v-2b88bbb2]:hover{color:#1d4ed8;text-decoration-color:#1d4ed8bf}.eli-tabela__celula-link[data-v-2b88bbb2]:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px;border-radius:4px}.eli-tabela__paginacao[data-v-5ca7a362]{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:12px;flex-wrap:wrap}.eli-tabela__pagina-botao[data-v-5ca7a362]{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:6px 14px;border-radius:9999px;border:1px solid rgba(15,23,42,.12);background:#fff;font-size:.875rem;font-weight:500;color:#0f172ad1;cursor:pointer;transition:background-color .2s ease,border-color .2s ease,color .2s ease}.eli-tabela__pagina-botao[data-v-5ca7a362]:hover,.eli-tabela__pagina-botao[data-v-5ca7a362]:focus-visible{background-color:#2563eb14;border-color:#2563eb66;color:#2563ebf2}.eli-tabela__pagina-botao[data-v-5ca7a362]:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px}.eli-tabela__pagina-botao[data-v-5ca7a362]:disabled{cursor:default;opacity:.5;background:#94a3b814;border-color:#94a3b82e;color:#475569bf}.eli-tabela__pagina-botao--ativo[data-v-5ca7a362]{background:#2563eb1f;border-color:#2563eb66;color:#2563ebf2}.eli-tabela__pagina-ellipsis[data-v-5ca7a362]{display:inline-flex;align-items:center;justify-content:center;width:32px;color:#6b7280d9;font-size:.9rem}.eli-tabela-modal-colunas__overlay[data-v-b8f693ef]{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172a59;z-index:4000;display:flex;align-items:center;justify-content:center;padding:16px}.eli-tabela-modal-colunas__modal[data-v-b8f693ef]{width:min(860px,100%);background:#fff;border-radius:14px;border:1px solid rgba(15,23,42,.1);box-shadow:0 18px 60px #0f172a40;overflow:hidden}.eli-tabela-modal-colunas__header[data-v-b8f693ef]{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid rgba(15,23,42,.08)}.eli-tabela-modal-colunas__titulo[data-v-b8f693ef]{font-size:1rem;margin:0}.eli-tabela-modal-colunas__fechar[data-v-b8f693ef]{width:34px;height:34px;border-radius:10px;border:none;background:transparent;cursor:pointer;font-size:22px;line-height:1;color:#0f172acc}.eli-tabela-modal-colunas__fechar[data-v-b8f693ef]:hover,.eli-tabela-modal-colunas__fechar[data-v-b8f693ef]:focus-visible{background:#0f172a0f}.eli-tabela-modal-colunas__conteudo[data-v-b8f693ef]{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:16px}.eli-tabela-modal-colunas__coluna-titulo[data-v-b8f693ef]{font-weight:600;margin-bottom:8px}.eli-tabela-modal-colunas__lista[data-v-b8f693ef]{min-height:260px;border:1px solid rgba(15,23,42,.12);border-radius:12px;padding:10px;background:#0f172a03}.eli-tabela-modal-colunas__item[data-v-b8f693ef]{display:flex;align-items:center;gap:10px;padding:10px;border-radius:10px;border:1px solid rgba(15,23,42,.08);background:#fff;cursor:grab;-webkit-user-select:none;user-select:none}.eli-tabela-modal-colunas__item+.eli-tabela-modal-colunas__item[data-v-b8f693ef]{margin-top:8px}.eli-tabela-modal-colunas__item[data-v-b8f693ef]:active{cursor:grabbing}.eli-tabela-modal-colunas__item-handle[data-v-b8f693ef]{color:#0f172a8c;font-size:14px}.eli-tabela-modal-colunas__item-texto[data-v-b8f693ef]{flex:1;min-width:0}.eli-tabela-modal-colunas__footer[data-v-b8f693ef]{display:flex;justify-content:flex-end;gap:8px;padding:14px 16px;border-top:1px solid rgba(15,23,42,.08)}.eli-tabela-modal-colunas__botao[data-v-b8f693ef]{height:34px;padding:0 14px;border-radius:10px;border:1px solid rgba(15,23,42,.12);background:#fff;cursor:pointer;font-size:.9rem}.eli-tabela-modal-colunas__botao--sec[data-v-b8f693ef]:hover,.eli-tabela-modal-colunas__botao--sec[data-v-b8f693ef]:focus-visible{background:#0f172a0f}.eli-tabela-modal-colunas__botao--prim[data-v-b8f693ef]{border:none;background:#2563ebf2;color:#fff}.eli-tabela-modal-colunas__botao--prim[data-v-b8f693ef]:hover,.eli-tabela-modal-colunas__botao--prim[data-v-b8f693ef]:focus-visible{background:#2563eb}@media(max-width:720px){.eli-tabela-modal-colunas__conteudo[data-v-b8f693ef]{grid-template-columns:1fr}}.eli-entrada__prefixo[data-v-77cbf216],.eli-entrada__sufixo[data-v-77cbf216]{opacity:.75;font-size:.9em;white-space:nowrap}.eli-entrada__prefixo[data-v-77cbf216]{margin-right:6px}.eli-entrada__sufixo[data-v-77cbf216]{margin-left:6px}.eli-data-hora[data-v-1bfd1be8]{width:100%}.eli-tabela-modal-filtro__overlay[data-v-cdc3f41a]{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172a59;z-index:4000;display:flex;align-items:center;justify-content:center;padding:16px}.eli-tabela-modal-filtro__modal[data-v-cdc3f41a]{width:min(980px,100%);background:#fff;border-radius:14px;border:1px solid rgba(15,23,42,.1);box-shadow:0 18px 60px #0f172a40;overflow:hidden}.eli-tabela-modal-filtro__header[data-v-cdc3f41a]{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid rgba(15,23,42,.08)}.eli-tabela-modal-filtro__titulo[data-v-cdc3f41a]{font-size:1rem;margin:0}.eli-tabela-modal-filtro__fechar[data-v-cdc3f41a]{width:34px;height:34px;border-radius:10px;border:none;background:transparent;cursor:pointer;font-size:22px;line-height:1;color:#0f172acc}.eli-tabela-modal-filtro__fechar[data-v-cdc3f41a]:hover,.eli-tabela-modal-filtro__fechar[data-v-cdc3f41a]:focus-visible{background:#0f172a0f}.eli-tabela-modal-filtro__conteudo[data-v-cdc3f41a]{padding:16px}.eli-tabela-modal-filtro__vazio[data-v-cdc3f41a]{opacity:.75;font-size:.9rem}.eli-tabela-modal-filtro__lista[data-v-cdc3f41a]{display:grid;gap:10px}.eli-tabela-modal-filtro__linha[data-v-cdc3f41a]{display:grid;grid-template-columns:1fr 34px;gap:10px;align-items:center}.eli-tabela-modal-filtro__select[data-v-cdc3f41a]{height:34px;border-radius:10px;border:1px solid rgba(15,23,42,.12);padding:0 10px;background:#fff}.eli-tabela-modal-filtro__entrada[data-v-cdc3f41a]{min-width:0}.eli-tabela-modal-filtro__remover[data-v-cdc3f41a]{width:34px;height:34px;border-radius:10px;border:1px solid rgba(15,23,42,.12);background:#fff;cursor:pointer;font-size:18px;line-height:1;color:#0f172acc}.eli-tabela-modal-filtro__remover[data-v-cdc3f41a]:hover,.eli-tabela-modal-filtro__remover[data-v-cdc3f41a]:focus-visible{background:#0f172a0f}.eli-tabela-modal-filtro__acoes[data-v-cdc3f41a]{margin-top:12px}.eli-tabela-modal-filtro__footer[data-v-cdc3f41a]{display:flex;justify-content:flex-end;gap:8px;padding:14px 16px;border-top:1px solid rgba(15,23,42,.08)}.eli-tabela-modal-filtro__botao[data-v-cdc3f41a]{height:34px;padding:0 14px;border-radius:10px;border:1px solid rgba(15,23,42,.12);background:#fff;cursor:pointer;font-size:.9rem}.eli-tabela-modal-filtro__botao[data-v-cdc3f41a]:disabled{opacity:.55;cursor:not-allowed}.eli-tabela-modal-filtro__botao--sec[data-v-cdc3f41a]:hover,.eli-tabela-modal-filtro__botao--sec[data-v-cdc3f41a]:focus-visible{background:#0f172a0f}.eli-tabela-modal-filtro__botao--prim[data-v-cdc3f41a]{border:none;background:#2563ebf2;color:#fff}.eli-tabela-modal-filtro__botao--prim[data-v-cdc3f41a]:hover,.eli-tabela-modal-filtro__botao--prim[data-v-cdc3f41a]:focus-visible{background:#2563eb}@media(max-width:880px){.eli-tabela-modal-filtro__linha[data-v-cdc3f41a]{grid-template-columns:1fr}}.eli-tabela{width:100%}.eli-tabela__table{width:100%;border-collapse:separate;border-spacing:0;border:1px solid rgba(0,0,0,.12);border-radius:12px;overflow:visible}.eli-tabela__tbody{overflow:visible}.eli-tabela__tbody .eli-tabela__tr--zebra .eli-tabela__td{background:#0f172a05}.eli-tabela__th,.eli-tabela__td{padding:10px 12px;border-bottom:1px solid rgba(0,0,0,.08);vertical-align:top}.eli-tabela__th{text-align:left;font-weight:600;background:#00000008}.eli-tabela__th--ordenavel{padding:0}.eli-tabela__th--ordenavel .eli-tabela__th-botao{padding:10px 12px}.eli-tabela__th-botao{display:inline-flex;align-items:center;justify-content:flex-start;gap:8px;width:100%;background:transparent;border:none;font:inherit;color:inherit;cursor:pointer;text-align:left;transition:color .2s ease}.eli-tabela__th-botao:hover,.eli-tabela__th-botao:focus-visible{color:#0f172ad9}.eli-tabela__th-botao:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px}.eli-tabela__th-botao--ativo{color:#2563ebf2}.eli-tabela__th-texto{flex:1;min-width:0;white-space:nowrap}.eli-tabela__th-icone{flex-shrink:0}.eli-tabela__th-icone--oculto{opacity:0}.eli-tabela__tr:last-child .eli-tabela__td{border-bottom:none}.eli-tabela__td--clicavel{cursor:pointer}.eli-tabela__td--clicavel:hover{background:#00000008}.eli-tabela--erro{border:1px solid rgba(220,53,69,.35);border-radius:12px;padding:12px}.eli-tabela--carregando{border:1px dashed rgba(0,0,0,.25);border-radius:12px;padding:12px;opacity:.8}.eli-tabela__erro-titulo{font-weight:700;margin-bottom:4px}.eli-tabela__erro-mensagem{opacity:.9}.eli-tabela--vazio{border:1px dashed rgba(0,0,0,.25);border-radius:12px;padding:12px;opacity:.8}.eli-tabela__th--acoes{text-align:right;white-space:nowrap}.eli-tabela__td--acoes{white-space:nowrap;overflow:visible}.eli-tabela__acoes-container{display:flex;justify-content:flex-end;position:relative;z-index:1}.eli-tabela__acoes-container--aberto{z-index:200}.eli-tabela__cabecalho{width:100%;box-sizing:border-box;display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-bottom:12px;flex-wrap:wrap;--eli-tabela-cabecalho-controle-altura: 34px;--eli-tabela-cabecalho-controle-radius: 8px}.eli-tabela__acoes-cabecalho{display:inline-flex;gap:8px;flex-wrap:wrap}.eli-tabela__acoes-cabecalho-botao{display:inline-flex;align-items:center;gap:6px;height:var(--eli-tabela-cabecalho-controle-altura);padding:0 14px;border-radius:var(--eli-tabela-cabecalho-controle-radius);border:none;background:#2563eb1f;color:#2563ebf2;font-size:.875rem;font-weight:500;line-height:1;cursor:pointer;transition:background-color .2s ease,color .2s ease}.eli-tabela__acoes-cabecalho-botao:hover,.eli-tabela__acoes-cabecalho-botao:focus-visible{background:#2563eb33}.eli-tabela__acoes-cabecalho-botao:focus-visible{outline:2px solid rgba(37,99,235,.35);outline-offset:2px}.eli-tabela__acoes-cabecalho-icone{display:inline-block}.eli-tabela__acoes-cabecalho-rotulo{line-height:1}.eli-tabela__acoes-toggle{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:9999px;border:none;background:transparent;color:#0f172ab8;cursor:pointer;transition:background-color .2s ease,color .2s ease}.eli-tabela__acoes-toggle-icone{display:block}.eli-tabela__acoes-toggle:hover,.eli-tabela__acoes-toggle:focus-visible{background-color:#0f172a14;color:#0f172af2}.eli-tabela__acoes-toggle:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px}.eli-tabela__acoes-toggle:disabled{cursor:default;color:#94a3b8cc;background:transparent}.eli-tabela__acoes-menu{min-width:180px;padding:6px 0;margin:0;list-style:none;background:#fff;border:1px solid rgba(15,23,42,.08);border-radius:10px;box-shadow:0 12px 30px #0f172a2e;z-index:1000}.eli-tabela__acoes-item{margin:0}.eli-tabela__acoes-item-botao{display:flex;align-items:center;gap:8px;width:100%;padding:8px 12px;border:none;background:transparent;font-size:.9rem;cursor:pointer;transition:background-color .2s ease}.eli-tabela__acoes-item-botao:hover,.eli-tabela__acoes-item-botao:focus-visible{background-color:#0f172a0f}.eli-tabela__acoes-item-botao:focus-visible{outline:2px solid currentColor;outline-offset:-2px}.eli-tabela__acoes-item-icone{flex-shrink:0}.eli-tabela__acoes-item-texto{flex:1;text-align:left}.eli-tabela__th--expander,.eli-tabela__td--expander{width:42px;padding:6px 8px;text-align:center;vertical-align:middle}.eli-tabela__expander-botao{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:9999px;border:none;background:transparent;color:#0f172ab8;cursor:pointer;transition:background-color .2s ease,color .2s ease}.eli-tabela__expander-botao:hover,.eli-tabela__expander-botao:focus-visible{background-color:#0f172a14;color:#0f172af2}.eli-tabela__expander-botao:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px}.eli-tabela__expander-botao--ativo{background-color:#0f172a0f;color:#0f172af2}.eli-tabela__td--detalhes{padding:12px}.eli-tabela__tr--detalhes .eli-tabela__td{border-bottom:1px solid rgba(0,0,0,.08)}.eli-tabela__detalhes{display:grid;gap:10px;padding-left:4px}.eli-tabela__detalhe{display:grid;grid-template-columns:180px 1fr;gap:10px;align-items:start}.eli-tabela__detalhe-rotulo{font-weight:600;color:#0f172ad9}.eli-tabela__detalhe-valor{min-width:0}@media(max-width:720px){.eli-tabela__detalhe{grid-template-columns:1fr}} diff --git a/dist/eli-vue.es.js b/dist/eli-vue.es.js index 67d3d4b..cd9268b 100644 --- a/dist/eli-vue.es.js +++ b/dist/eli-vue.es.js @@ -1,14 +1,14 @@ -import { defineComponent as j, createBlock as W, openBlock as u, mergeProps as Ce, withCtx as te, renderSlot as Te, computed as A, ref as F, resolveComponent as Q, createVNode as q, createTextVNode as Ie, createElementVNode as $, createCommentVNode as ee, toDisplayString as L, h as je, watch as me, createElementBlock as y, withDirectives as ia, withKeys as Aa, vModelText as ka, Fragment as re, renderList as fe, normalizeStyle as ze, resolveDynamicComponent as Me, normalizeClass as De, withModifiers as ue, Teleport as Da, createSlots as Ma, onMounted as sa, vModelSelect as Ba, onBeforeUnmount as Ta } from "vue"; -import { VBtn as wa } from "vuetify/components/VBtn"; -import { VBadge as Pa } from "vuetify/components/VBadge"; +import { defineComponent as N, createBlock as W, openBlock as c, mergeProps as Se, withCtx as ae, renderSlot as Be, computed as S, ref as O, resolveComponent as K, createVNode as q, createTextVNode as Ie, createElementVNode as p, createCommentVNode as Q, toDisplayString as F, h as je, watch as me, createElementBlock as $, withDirectives as ra, withKeys as Ca, vModelText as Aa, Fragment as re, renderList as ve, normalizeStyle as ze, resolveDynamicComponent as Te, normalizeClass as Me, withModifiers as ue, Teleport as Sa, createSlots as ka, onMounted as la, vModelSelect as Da, onBeforeUnmount as Ma } from "vue"; +import { VBtn as Ba } from "vuetify/components/VBtn"; +import { VBadge as Ta } from "vuetify/components/VBadge"; import { VTextField as He } from "vuetify/components/VTextField"; -import { VCard as ua, VCardTitle as ca, VCardText as da, VCardActions as fa } from "vuetify/components/VCard"; -import { VContainer as Oa } from "vuetify/components/VGrid"; -import { VChip as Fa, VTextarea as Va, VSelect as Ia } from "vuetify/components"; -import { VChip as Na } from "vuetify/components/VChip"; -import { VTextarea as qa } from "vuetify/components/VTextarea"; -import { VSelect as La } from "vuetify/components/VSelect"; -const ja = j({ +import { VCard as ia, VCardTitle as sa, VCardText as ua, VCardActions as ca } from "vuetify/components/VCard"; +import { VContainer as wa } from "vuetify/components/VGrid"; +import { VChip as Pa, VTextarea as Oa, VSelect as Fa } from "vuetify/components"; +import { VChip as Va } from "vuetify/components/VChip"; +import { VTextarea as Ia } from "vuetify/components/VTextarea"; +import { VSelect as qa } from "vuetify/components/VSelect"; +const Na = N({ name: "EliBotao", inheritAttrs: !1, props: { @@ -33,30 +33,30 @@ const ja = j({ default: !1 } } -}), z = (e, a) => { +}), L = (e, a) => { const o = e.__vccOpts || e; for (const [r, i] of a) o[r] = i; return o; }; -function za(e, a, o, r, i, f) { - return u(), W(wa, Ce({ +function La(e, a, o, r, i, f) { + return c(), W(Ba, Se({ color: e.color, variant: e.variant, size: e.size, disabled: e.disabled, loading: e.loading }, e.$attrs, { class: "eli-botao text-none pt-1" }), { - default: te(() => [ - Te(e.$slots, "default") + default: ae(() => [ + Be(e.$slots, "default") ]), _: 3 }, 16, ["color", "variant", "size", "disabled", "loading"]); } -const pa = /* @__PURE__ */ z(ja, [["render", za]]), Ze = { +const da = /* @__PURE__ */ L(Na, [["render", La]]), Je = { suave: "4px", pill: "10px" -}, Ha = j({ +}, ja = N({ name: "EliBadge", inheritAttrs: !1, props: { @@ -95,14 +95,14 @@ const pa = /* @__PURE__ */ z(ja, [["render", za]]), Ze = { } }, setup(e) { - const a = A(() => e.radius in Ze ? Ze[e.radius] : e.radius), o = A(() => e.dot || e.badge !== void 0 ? e.visible : !1), r = A(() => ({ + const a = S(() => e.radius in Je ? Je[e.radius] : e.radius), o = S(() => e.dot || e.badge !== void 0 ? e.visible : !1), r = S(() => ({ "--eli-badge-radius": a.value })); return { showBadge: o, badgeStyle: r }; } }); -function Ua(e, a, o, r, i, f) { - return e.showBadge ? (u(), W(Pa, Ce({ +function za(e, a, o, r, i, f) { + return e.showBadge ? (c(), W(Ta, Se({ key: 0, color: e.color }, e.$attrs, { @@ -114,35 +114,35 @@ function Ua(e, a, o, r, i, f) { style: e.badgeStyle, class: "eli-badge" }), { - default: te(() => [ - Te(e.$slots, "default", {}, void 0, !0) + default: ae(() => [ + Be(e.$slots, "default", {}, void 0, !0) ]), _: 3 - }, 16, ["color", "location", "offset-x", "offset-y", "dot", "content", "style"])) : Te(e.$slots, "default", { key: 1 }, void 0, !0); + }, 16, ["color", "location", "offset-x", "offset-y", "dot", "content", "style"])) : Be(e.$slots, "default", { key: 1 }, void 0, !0); +} +const Ue = /* @__PURE__ */ L(ja, [["render", za], ["__scopeId", "data-v-371c8db4"]]); +function Ha(e) { + return e.replace(/\D+/g, ""); +} +function Ua(e) { + const a = Ha(e); + return a.length <= 11 ? a.replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d{1,2})$/, "$1-$2").slice(0, 14) : a.replace(/^(\d{2})(\d)/, "$1.$2").replace(/^(\d{2})\.(\d{3})(\d)/, "$1.$2.$3").replace(/\.(\d{3})(\d)/, ".$1/$2").replace(/(\d{4})(\d)/, "$1-$2").slice(0, 18); } -const Ue = /* @__PURE__ */ z(Ha, [["render", Ua], ["__scopeId", "data-v-371c8db4"]]); function Ya(e) { return e.replace(/\D+/g, ""); } function Ra(e) { const a = Ya(e); - return a.length <= 11 ? a.replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d{1,2})$/, "$1-$2").slice(0, 14) : a.replace(/^(\d{2})(\d)/, "$1.$2").replace(/^(\d{2})\.(\d{3})(\d)/, "$1.$2.$3").replace(/\.(\d{3})(\d)/, ".$1/$2").replace(/(\d{4})(\d)/, "$1-$2").slice(0, 18); + return a ? a.length <= 10 ? a.replace(/^(\d{2})(\d)/, "($1) $2").replace(/(\d{4})(\d)/, "$1-$2").slice(0, 14) : a.replace(/^(\d{2})(\d)/, "($1) $2").replace(/(\d{5})(\d)/, "$1-$2").slice(0, 15) : ""; } function Ja(e) { return e.replace(/\D+/g, ""); } function Wa(e) { const a = Ja(e); - return a ? a.length <= 10 ? a.replace(/^(\d{2})(\d)/, "($1) $2").replace(/(\d{4})(\d)/, "$1-$2").slice(0, 14) : a.replace(/^(\d{2})(\d)/, "($1) $2").replace(/(\d{5})(\d)/, "$1-$2").slice(0, 15) : ""; -} -function Za(e) { - return e.replace(/\D+/g, ""); -} -function Xa(e) { - const a = Za(e); return a ? a.replace(/^(\d{5})(\d)/, "$1-$2").slice(0, 9) : ""; } -const Ga = j({ +const Za = N({ name: "EliEntradaTexto", inheritAttrs: !1, props: { @@ -165,42 +165,42 @@ const Ga = j({ blur: () => !0 }, setup(e, { attrs: a, emit: o }) { - const r = A(() => { + const r = S(() => { var l; return ((l = e.opcoes) == null ? void 0 : l.formato) ?? "texto"; - }), i = A({ + }), i = S({ get: () => e.value, set: (l) => { o("update:value", l), o("input", l), o("change", l); } - }), f = A(() => r.value === "email" ? "email" : r.value === "url" ? "url" : "text"), t = A(() => { + }), f = S(() => r.value === "email" ? "email" : r.value === "url" ? "url" : "text"), t = S(() => { if (r.value === "telefone") return "tel"; if (r.value === "cpfCnpj" || r.value === "cep") return "numeric"; }); function n(l) { switch (r.value) { case "telefone": - return Wa(l); - case "cpfCnpj": return Ra(l); + case "cpfCnpj": + return Ua(l); case "cep": - return Xa(l); + return Wa(l); default: return l; } } function d(l) { - const c = l.target, m = n(c.value); - c.value = m, i.value = m; + const u = l.target, b = n(u.value); + u.value = b, i.value = b; } return { attrs: a, emit: o, localValue: i, inputHtmlType: f, inputMode: t, onInput: d }; } }); -function Ka(e, a, o, r, i, f) { +function Xa(e, a, o, r, i, f) { var t, n, d, l; - return u(), W(He, Ce({ + return c(), W(He, Se({ modelValue: e.localValue, - "onUpdate:modelValue": a[0] || (a[0] = (c) => e.localValue = c), + "onUpdate:modelValue": a[0] || (a[0] = (u) => e.localValue = u), type: e.inputHtmlType, inputmode: e.inputMode, label: (t = e.opcoes) == null ? void 0 : t.rotulo, @@ -213,15 +213,15 @@ function Ka(e, a, o, r, i, f) { onInput: e.onInput }), null, 16, ["modelValue", "type", "inputmode", "label", "placeholder", "counter", "maxlength", "onInput"]); } -const Ye = /* @__PURE__ */ z(Ga, [["render", Ka]]), Qa = j({ +const Ye = /* @__PURE__ */ L(Za, [["render", Xa]]), Ga = N({ name: "EliOlaMundo", components: { - EliBotao: pa, + EliBotao: da, EliBadge: Ue, EliEntradaTexto: Ye }, setup() { - const e = F(""), a = F(""), o = F(""), r = F(""), i = F(""); + const e = O(""), a = O(""), o = O(""), r = O(""), i = O(""); return { nome: e, email: r, @@ -230,24 +230,24 @@ const Ye = /* @__PURE__ */ z(Ga, [["render", Ka]]), Qa = j({ cep: a }; } -}), xa = { class: "grid-example" }; -function et(e, a, o, r, i, f) { - const t = Q("EliBadge"), n = Q("EliEntradaTexto"), d = Q("EliBotao"); - return u(), W(Oa, null, { - default: te(() => [ - q(ua, { +}), Ka = { class: "grid-example" }; +function Qa(e, a, o, r, i, f) { + const t = K("EliBadge"), n = K("EliEntradaTexto"), d = K("EliBotao"); + return c(), W(wa, null, { + default: ae(() => [ + q(ia, { class: "mx-auto", max_width: "400" }, { - default: te(() => [ - q(ca, null, { - default: te(() => [ + default: ae(() => [ + q(sa, null, { + default: ae(() => [ q(t, { badge: "Novo", "offset-x": "-15", location: "right center" }, { - default: te(() => [...a[5] || (a[5] = [ + default: ae(() => [...a[5] || (a[5] = [ Ie(" Olá Mundo! ", -1) ])]), _: 1 @@ -255,10 +255,10 @@ function et(e, a, o, r, i, f) { ]), _: 1 }), - q(da, null, { - default: te(() => [ + q(ua, null, { + default: ae(() => [ a[6] || (a[6] = Ie(" Este é um componente de exemplo integrado com Vuetify. ", -1)), - $("div", xa, [ + p("div", Ka, [ q(n, { value: e.nome, "onUpdate:value": a[0] || (a[0] = (l) => e.nome = l), @@ -289,14 +289,14 @@ function et(e, a, o, r, i, f) { ]), _: 1 }), - q(fa, null, { - default: te(() => [ + q(ca, null, { + default: ae(() => [ q(d, { color: "primary", variant: "elevated", block: "" }, { - default: te(() => [...a[7] || (a[7] = [ + default: ae(() => [...a[7] || (a[7] = [ Ie(" Botão Vuetify ", -1) ])]), _: 1 @@ -311,7 +311,7 @@ function et(e, a, o, r, i, f) { _: 1 }); } -const at = /* @__PURE__ */ z(Qa, [["render", et]]), tt = j({ +const xa = /* @__PURE__ */ L(Ga, [["render", Qa]]), et = N({ name: "EliCartao", components: { EliBadge: Ue }, inheritAttrs: !1, @@ -340,7 +340,7 @@ const at = /* @__PURE__ */ z(Qa, [["render", et]]), tt = j({ clicar: (e) => !0 }, setup(e, { emit: a }) { - const o = A(() => e.status), r = A(() => { + const o = S(() => e.status), r = S(() => { switch (e.status) { case "novo": return "primary"; @@ -351,7 +351,7 @@ const at = /* @__PURE__ */ z(Qa, [["render", et]]), tt = j({ case "cancelado": return "error"; } - }), i = A(() => `eli-cartao--${e.status}`); + }), i = S(() => `eli-cartao--${e.status}`); function f() { a("clicar", e.status); } @@ -362,29 +362,29 @@ const at = /* @__PURE__ */ z(Qa, [["render", et]]), tt = j({ onClick: f }; } -}), ot = { class: "eli-cartao__titulo-texto" }, nt = { class: "eli-cartao__status" }; -function rt(e, a, o, r, i, f) { - const t = Q("EliBadge"); - return u(), W(ua, Ce({ +}), at = { class: "eli-cartao__titulo-texto" }, tt = { class: "eli-cartao__status" }; +function ot(e, a, o, r, i, f) { + const t = K("EliBadge"); + return c(), W(ia, Se({ class: ["eli-cartao", e.classeStatus], variant: e.variant }, e.$attrs), { - default: te(() => [ - q(ca, { class: "eli-cartao__titulo" }, { - default: te(() => [ - $("div", ot, [ - Te(e.$slots, "titulo", {}, () => [ - Ie(L(e.titulo), 1) + default: ae(() => [ + q(sa, { class: "eli-cartao__titulo" }, { + default: ae(() => [ + p("div", at, [ + Be(e.$slots, "titulo", {}, () => [ + Ie(F(e.titulo), 1) ], !0) ]), - $("div", nt, [ + p("div", tt, [ q(t, { badge: e.rotuloStatus, radius: "pill", color: e.corStatus }, { - default: te(() => [...a[0] || (a[0] = [ - $("span", null, null, -1) + default: ae(() => [...a[0] || (a[0] = [ + p("span", null, null, -1) ])]), _: 1 }, 8, ["badge", "color"]) @@ -392,34 +392,34 @@ function rt(e, a, o, r, i, f) { ]), _: 3 }), - q(da, { class: "eli-cartao__conteudo" }, { - default: te(() => [ - Te(e.$slots, "default", {}, void 0, !0) + q(ua, { class: "eli-cartao__conteudo" }, { + default: ae(() => [ + Be(e.$slots, "default", {}, void 0, !0) ]), _: 3 }), - e.$slots.acoes ? (u(), W(fa, { + e.$slots.acoes ? (c(), W(ca, { key: 0, class: "eli-cartao__acoes" }, { - default: te(() => [ - Te(e.$slots, "acoes", {}, void 0, !0) + default: ae(() => [ + Be(e.$slots, "acoes", {}, void 0, !0) ]), _: 3 - })) : ee("", !0) + })) : Q("", !0) ]), _: 3 }, 16, ["variant", "class"]); } -const lt = /* @__PURE__ */ z(tt, [["render", rt], ["__scopeId", "data-v-6c492bd9"]]); -var va = ((e) => (e[e.sucesso = 200] = "sucesso", e[e.erroConhecido = 400] = "erroConhecido", e[e.erroPermissao = 401] = "erroPermissao", e[e.erroNaoEncontrado = 404] = "erroNaoEncontrado", e[e.erroDesconhecido = 500] = "erroDesconhecido", e[e.tempoEsgotado = 504] = "tempoEsgotado", e))(va || {}); +const nt = /* @__PURE__ */ L(et, [["render", ot], ["__scopeId", "data-v-6c492bd9"]]); +var fa = ((e) => (e[e.sucesso = 200] = "sucesso", e[e.erroConhecido = 400] = "erroConhecido", e[e.erroPermissao = 401] = "erroPermissao", e[e.erroNaoEncontrado = 404] = "erroNaoEncontrado", e[e.erroDesconhecido = 500] = "erroDesconhecido", e[e.tempoEsgotado = 504] = "tempoEsgotado", e))(fa || {}); /** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const it = (e) => { +const rt = (e) => { for (const a in e) if (a.startsWith("aria-") || a === "role" || a === "title") return !0; @@ -431,28 +431,28 @@ const it = (e) => { * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const Xe = (e) => e === ""; +const We = (e) => e === ""; /** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const st = (...e) => e.filter((a, o, r) => !!a && a.trim() !== "" && r.indexOf(a) === o).join(" ").trim(); +const lt = (...e) => e.filter((a, o, r) => !!a && a.trim() !== "" && r.indexOf(a) === o).join(" ").trim(); /** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const Ge = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(); +const Ze = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(); /** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const ut = (e) => e.replace( +const it = (e) => e.replace( /^([A-Z])|[\s-_]+(\w)/g, (a, o, r) => r ? r.toUpperCase() : o.toLowerCase() ); @@ -462,8 +462,8 @@ const ut = (e) => e.replace( * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const ct = (e) => { - const a = ut(e); +const st = (e) => { + const a = it(e); return a.charAt(0).toUpperCase() + a.slice(1); }; /** @@ -489,7 +489,7 @@ var Fe = { * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const dt = ({ +const ut = ({ name: e, iconNode: a, absoluteStrokeWidth: o, @@ -507,15 +507,15 @@ const dt = ({ width: t, height: t, stroke: n, - "stroke-width": Xe(o) || Xe(r) || o === !0 || r === !0 ? Number(i || f || Fe["stroke-width"]) * 24 / Number(t) : i || f || Fe["stroke-width"], - class: st( + "stroke-width": We(o) || We(r) || o === !0 || r === !0 ? Number(i || f || Fe["stroke-width"]) * 24 / Number(t) : i || f || Fe["stroke-width"], + class: lt( "lucide", d.class, - ...e ? [`lucide-${Ge(ct(e))}-icon`, `lucide-${Ge(e)}`] : ["lucide-icon"] + ...e ? [`lucide-${Ze(st(e))}-icon`, `lucide-${Ze(e)}`] : ["lucide-icon"] ), - ...!l.default && !it(d) && { "aria-hidden": "true" } + ...!l.default && !rt(d) && { "aria-hidden": "true" } }, - [...a.map((c) => je(...c)), ...l.default ? [l.default()] : []] + [...a.map((u) => je(...u)), ...l.default ? [l.default()] : []] ); /** * @license lucide-vue-next v0.563.0 - ISC @@ -524,7 +524,7 @@ const dt = ({ * See the LICENSE file in the root directory of this source tree. */ const we = (e, a) => (o, { slots: r, attrs: i }) => je( - dt, + ut, { ...i, ...o, @@ -539,7 +539,7 @@ const we = (e, a) => (o, { slots: r, attrs: i }) => je( * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const Ke = we("arrow-down", [ +const Xe = we("arrow-down", [ ["path", { d: "M12 5v14", key: "s699le" }], ["path", { d: "m19 12-7 7-7-7", key: "1idqje" }] ]); @@ -549,7 +549,7 @@ const Ke = we("arrow-down", [ * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const Qe = we("arrow-up", [ +const Ge = we("arrow-up", [ ["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }], ["path", { d: "M12 19V5", key: "x0mq9r" }] ]); @@ -559,7 +559,7 @@ const Qe = we("arrow-up", [ * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const xe = we("chevron-down", [ +const Ke = we("chevron-down", [ ["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }] ]); /** @@ -568,7 +568,7 @@ const xe = we("chevron-down", [ * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const ea = we("chevron-right", [ +const Qe = we("chevron-right", [ ["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }] ]); /** @@ -577,7 +577,7 @@ const ea = we("chevron-right", [ * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const ft = we("ellipsis-vertical", [ +const ct = we("ellipsis-vertical", [ ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }], ["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }], ["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }] @@ -588,12 +588,12 @@ const ft = we("ellipsis-vertical", [ * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ -const pt = we("search", [ +const dt = we("search", [ ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }], ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }] -]), vt = j({ +]), ft = N({ name: "EliTabelaCaixaDeBusca", - components: { Search: pt }, + components: { Search: dt }, props: { modelo: { type: String, @@ -607,7 +607,7 @@ const pt = we("search", [ } }, setup(e, { emit: a }) { - const o = F(e.modelo ?? ""); + const o = O(e.modelo ?? ""); me( () => e.modelo, (i) => { @@ -619,22 +619,22 @@ const pt = we("search", [ } return { texto: o, emitirBusca: r }; } -}), mt = { class: "eli-tabela__busca" }, bt = { class: "eli-tabela__busca-input-wrapper" }; -function ht(e, a, o, r, i, f) { - const t = Q("Search"); - return u(), y("div", mt, [ - $("div", bt, [ - ia($("input", { +}), vt = { class: "eli-tabela__busca" }, pt = { class: "eli-tabela__busca-input-wrapper" }; +function mt(e, a, o, r, i, f) { + const t = K("Search"); + return c(), $("div", vt, [ + p("div", pt, [ + ra(p("input", { id: "eli-tabela-busca", "onUpdate:modelValue": a[0] || (a[0] = (n) => e.texto = n), type: "search", class: "eli-tabela__busca-input", placeholder: "Digite termos para filtrar", - onKeyup: a[1] || (a[1] = Aa((...n) => e.emitirBusca && e.emitirBusca(...n), ["enter"])) + onKeyup: a[1] || (a[1] = Ca((...n) => e.emitirBusca && e.emitirBusca(...n), ["enter"])) }, null, 544), [ - [ka, e.texto] + [Aa, e.texto] ]), - $("button", { + p("button", { type: "button", class: "eli-tabela__busca-botao", "aria-label": "Buscar", @@ -651,9 +651,9 @@ function ht(e, a, o, r, i, f) { ]) ]); } -const gt = /* @__PURE__ */ z(vt, [["render", ht], ["__scopeId", "data-v-341415d1"]]), $t = j({ +const bt = /* @__PURE__ */ L(ft, [["render", mt], ["__scopeId", "data-v-341415d1"]]), ht = N({ name: "EliTabelaCabecalho", - components: { EliTabelaCaixaDeBusca: gt }, + components: { EliTabelaCaixaDeBusca: bt }, props: { exibirBusca: { type: Boolean, @@ -690,7 +690,7 @@ const gt = /* @__PURE__ */ z(vt, [["render", ht], ["__scopeId", "data-v-341415d1 } }, setup(e, { emit: a }) { - const o = A(() => e.acoesCabecalho.length > 0); + const o = S(() => e.acoesCabecalho.length > 0); function r(t) { a("buscar", t); } @@ -702,54 +702,54 @@ const gt = /* @__PURE__ */ z(vt, [["render", ht], ["__scopeId", "data-v-341415d1 } return { temAcoesCabecalho: o, emitBuscar: r, emitColunas: i, emitFiltroAvancado: f }; } -}), yt = { class: "eli-tabela__cabecalho" }, _t = { +}), gt = { class: "eli-tabela__cabecalho" }, $t = { key: 0, class: "eli-tabela__busca-grupo" -}, Et = { +}, yt = { key: 1, class: "eli-tabela__acoes-cabecalho" -}, Ct = ["onClick"], St = { class: "eli-tabela__acoes-cabecalho-rotulo" }; -function At(e, a, o, r, i, f) { - const t = Q("EliTabelaCaixaDeBusca"); - return u(), y("div", yt, [ - e.exibirBusca ? (u(), y("div", _t, [ - e.exibirBotaoColunas ? (u(), y("button", { +}, _t = ["onClick"], Et = { class: "eli-tabela__acoes-cabecalho-rotulo" }; +function Ct(e, a, o, r, i, f) { + const t = K("EliTabelaCaixaDeBusca"); + return c(), $("div", gt, [ + e.exibirBusca ? (c(), $("div", $t, [ + e.exibirBotaoColunas ? (c(), $("button", { key: 0, type: "button", class: "eli-tabela__acoes-cabecalho-botao eli-tabela__acoes-cabecalho-botao--colunas", onClick: a[0] || (a[0] = (...n) => e.emitColunas && e.emitColunas(...n)) - }, " Colunas ")) : ee("", !0), - e.exibirBotaoFiltroAvancado ? (u(), y("button", { + }, " Colunas ")) : Q("", !0), + e.exibirBotaoFiltroAvancado ? (c(), $("button", { key: 1, type: "button", class: "eli-tabela__acoes-cabecalho-botao eli-tabela__acoes-cabecalho-botao--filtro", onClick: a[1] || (a[1] = (...n) => e.emitFiltroAvancado && e.emitFiltroAvancado(...n)) - }, " Filtro ")) : ee("", !0), + }, " Filtro ")) : Q("", !0), q(t, { modelo: e.valorBusca, onBuscar: e.emitBuscar }, null, 8, ["modelo", "onBuscar"]) - ])) : ee("", !0), - e.temAcoesCabecalho ? (u(), y("div", Et, [ - (u(!0), y(re, null, fe(e.acoesCabecalho, (n, d) => (u(), y("button", { + ])) : Q("", !0), + e.temAcoesCabecalho ? (c(), $("div", yt, [ + (c(!0), $(re, null, ve(e.acoesCabecalho, (n, d) => (c(), $("button", { key: `${n.rotulo}-${d}`, type: "button", class: "eli-tabela__acoes-cabecalho-botao", style: ze(n.cor ? { backgroundColor: n.cor, color: "#fff" } : void 0), onClick: n.acao }, [ - n.icone ? (u(), W(Me(n.icone), { + n.icone ? (c(), W(Te(n.icone), { key: 0, class: "eli-tabela__acoes-cabecalho-icone", size: 16, "stroke-width": 2 - })) : ee("", !0), - $("span", St, L(n.rotulo), 1) - ], 12, Ct))), 128)) - ])) : ee("", !0) + })) : Q("", !0), + p("span", Et, F(n.rotulo), 1) + ], 12, _t))), 128)) + ])) : Q("", !0) ]); } -const kt = /* @__PURE__ */ z($t, [["render", At], ["__scopeId", "data-v-17166105"]]), Dt = j({ +const At = /* @__PURE__ */ L(ht, [["render", Ct], ["__scopeId", "data-v-17166105"]]), St = N({ name: "EliTabelaEstados", props: { carregando: { @@ -766,25 +766,25 @@ const kt = /* @__PURE__ */ z($t, [["render", At], ["__scopeId", "data-v-17166105 default: void 0 } } -}), Mt = { +}), kt = { key: 0, class: "eli-tabela eli-tabela--carregando", "aria-busy": "true" -}, Bt = { +}, Dt = { key: 1, class: "eli-tabela eli-tabela--erro", role: "alert" -}, Tt = { class: "eli-tabela__erro-mensagem" }, wt = { +}, Mt = { class: "eli-tabela__erro-mensagem" }, Bt = { key: 2, class: "eli-tabela eli-tabela--vazio" }; -function Pt(e, a, o, r, i, f) { - return e.carregando ? (u(), y("div", Mt, " Carregando... ")) : e.erro ? (u(), y("div", Bt, [ - a[0] || (a[0] = $("div", { class: "eli-tabela__erro-titulo" }, "Erro", -1)), - $("div", Tt, L(e.erro), 1) - ])) : (u(), y("div", wt, L(e.mensagemVazio ?? "Nenhum registro encontrado."), 1)); +function Tt(e, a, o, r, i, f) { + return e.carregando ? (c(), $("div", kt, " Carregando... ")) : e.erro ? (c(), $("div", Dt, [ + a[0] || (a[0] = p("div", { class: "eli-tabela__erro-titulo" }, "Erro", -1)), + p("div", Mt, F(e.erro), 1) + ])) : (c(), $("div", Bt, F(e.mensagemVazio ?? "Nenhum registro encontrado."), 1)); } -const Ot = /* @__PURE__ */ z(Dt, [["render", Pt]]), Ft = j({ +const wt = /* @__PURE__ */ L(St, [["render", Tt]]), Pt = N({ name: "EliTabelaDebug", props: { isDev: { @@ -800,22 +800,23 @@ const Ot = /* @__PURE__ */ z(Dt, [["render", Pt]]), Ft = j({ required: !0 } } -}), Vt = { +}), Ot = { key: 0, style: { position: "fixed", left: "8px", bottom: "8px", "z-index": "999999", background: "rgba(185,28,28,0.9)", color: "#fff", padding: "6px 10px", "border-radius": "8px", "font-size": "12px", "max-width": "500px" } }; -function It(e, a, o, r, i, f) { - return e.isDev ? (u(), y("div", Vt, [ - a[0] || (a[0] = $("div", null, [ - $("b", null, "EliTabela debug") +function Ft(e, a, o, r, i, f) { + return e.isDev ? (c(), $("div", Ot, [ + a[0] || (a[0] = p("div", null, [ + p("b", null, "EliTabela debug") ], -1)), - $("div", null, "menuAberto: " + L(e.menuAberto), 1), - $("div", null, "menuPos: top=" + L(e.menuPopupPos.top) + ", left=" + L(e.menuPopupPos.left), 1) - ])) : ee("", !0); + p("div", null, "menuAberto: " + F(e.menuAberto), 1), + p("div", null, "menuPos: top=" + F(e.menuPopupPos.top) + ", left=" + F(e.menuPopupPos.left), 1), + Be(e.$slots, "default") + ])) : Q("", !0); } -const Nt = /* @__PURE__ */ z(Ft, [["render", It]]), qt = j({ +const Vt = /* @__PURE__ */ L(Pt, [["render", Ft]]), It = N({ name: "EliTabelaHead", - components: { ArrowUp: Qe, ArrowDown: Ke }, + components: { ArrowUp: Ge, ArrowDown: Xe }, props: { colunas: { type: Array, @@ -851,63 +852,63 @@ const Nt = /* @__PURE__ */ z(Ft, [["render", It]]), qt = j({ a("alternarOrdenacao", i); } return { - ArrowUp: Qe, - ArrowDown: Ke, + ArrowUp: Ge, + ArrowDown: Xe, isOrdenavel: o, emitAlternarOrdenacao: r }; } -}), Lt = { class: "eli-tabela__thead" }, jt = { class: "eli-tabela__tr eli-tabela__tr--header" }, zt = { +}), qt = { class: "eli-tabela__thead" }, Nt = { class: "eli-tabela__tr eli-tabela__tr--header" }, Lt = { key: 0, class: "eli-tabela__th eli-tabela__th--expander", scope: "col" -}, Ht = ["onClick"], Ut = { class: "eli-tabela__th-texto" }, Yt = { +}, jt = ["onClick"], zt = { class: "eli-tabela__th-texto" }, Ht = { key: 1, class: "eli-tabela__th-label" -}, Rt = { +}, Ut = { key: 1, class: "eli-tabela__th eli-tabela__th--acoes", scope: "col" }; -function Jt(e, a, o, r, i, f) { - const t = Q("ArrowUp"); - return u(), y("thead", Lt, [ - $("tr", jt, [ - e.temColunasInvisiveis ? (u(), y("th", zt)) : ee("", !0), - (u(!0), y(re, null, fe(e.colunas, (n, d) => (u(), y("th", { +function Yt(e, a, o, r, i, f) { + const t = K("ArrowUp"); + return c(), $("thead", qt, [ + p("tr", Nt, [ + e.temColunasInvisiveis ? (c(), $("th", Lt)) : Q("", !0), + (c(!0), $(re, null, ve(e.colunas, (n, d) => (c(), $("th", { key: `th-${d}`, - class: De(["eli-tabela__th", [e.isOrdenavel(n) ? "eli-tabela__th--ordenavel" : void 0]]), + class: Me(["eli-tabela__th", [e.isOrdenavel(n) ? "eli-tabela__th--ordenavel" : void 0]]), scope: "col" }, [ - e.isOrdenavel(n) ? (u(), y("button", { + e.isOrdenavel(n) ? (c(), $("button", { key: 0, type: "button", - class: De(["eli-tabela__th-botao", [ + class: Me(["eli-tabela__th-botao", [ e.colunaOrdenacao === String(n.coluna_ordem) ? "eli-tabela__th-botao--ativo" : void 0 ]]), onClick: (l) => e.emitAlternarOrdenacao(String(n.coluna_ordem)) }, [ - $("span", Ut, L(n.rotulo), 1), - e.colunaOrdenacao === String(n.coluna_ordem) ? (u(), W(Me(e.direcaoOrdenacao === "asc" ? e.ArrowUp : e.ArrowDown), { + p("span", zt, F(n.rotulo), 1), + e.colunaOrdenacao === String(n.coluna_ordem) ? (c(), W(Te(e.direcaoOrdenacao === "asc" ? e.ArrowUp : e.ArrowDown), { key: 0, class: "eli-tabela__th-icone", size: 16, "stroke-width": 2, "aria-hidden": "true" - })) : (u(), W(t, { + })) : (c(), W(t, { key: 1, class: "eli-tabela__th-icone eli-tabela__th-icone--oculto", size: 16, "stroke-width": 2, "aria-hidden": "true" })) - ], 10, Ht)) : (u(), y("span", Yt, L(n.rotulo), 1)) + ], 10, jt)) : (c(), $("span", Ht, F(n.rotulo), 1)) ], 2))), 128)), - e.temAcoes ? (u(), y("th", Rt, " Ações ")) : ee("", !0) + e.temAcoes ? (c(), $("th", Ut, " Ações ")) : Q("", !0) ]) ]); } -const Wt = /* @__PURE__ */ z(qt, [["render", Jt]]), Zt = j({ +const Rt = /* @__PURE__ */ L(It, [["render", Yt]]), Jt = N({ name: "EliTabelaCelulaTextoSimples", components: {}, props: { @@ -922,17 +923,17 @@ const Wt = /* @__PURE__ */ z(qt, [["render", Jt]]), Zt = j({ setup({ dados: e }) { return { dados: e }; } -}), Xt = { key: 1 }; -function Gt(e, a, o, r, i, f) { +}), Wt = { key: 1 }; +function Zt(e, a, o, r, i, f) { var t, n, d; - return (t = e.dados) != null && t.acao ? (u(), y("button", { + return (t = e.dados) != null && t.acao ? (c(), $("button", { key: 0, type: "button", class: "eli-tabela__celula-link", onClick: a[0] || (a[0] = ue((l) => e.dados.acao(), ["stop", "prevent"])) - }, L((n = e.dados) == null ? void 0 : n.texto), 1)) : (u(), y("span", Xt, L((d = e.dados) == null ? void 0 : d.texto), 1)); + }, F((n = e.dados) == null ? void 0 : n.texto), 1)) : (c(), $("span", Wt, F((d = e.dados) == null ? void 0 : d.texto), 1)); } -const Kt = /* @__PURE__ */ z(Zt, [["render", Gt], ["__scopeId", "data-v-7a629ffa"]]), Qt = j({ +const Xt = /* @__PURE__ */ L(Jt, [["render", Zt], ["__scopeId", "data-v-7a629ffa"]]), Gt = N({ name: "EliTabelaCelulaTextoTruncado", props: { dados: { @@ -942,22 +943,25 @@ const Kt = /* @__PURE__ */ z(Zt, [["render", Gt], ["__scopeId", "data-v-7a629ffa setup({ dados: e }) { return { dados: e }; } -}), xt = ["title"], eo = ["title"]; -function ao(e, a, o, r, i, f) { - var t, n, d, l, c; - return (t = e.dados) != null && t.acao ? (u(), y("button", { +}), Kt = ["title"], Qt = ["title"]; +function xt(e, a, o, r, i, f) { + var t, n, d, l, u; + return (t = e.dados) != null && t.acao ? (c(), $("button", { key: 0, type: "button", class: "eli-tabela__texto-truncado eli-tabela__celula-link", title: (n = e.dados) == null ? void 0 : n.texto, - onClick: a[0] || (a[0] = ue((m) => e.dados.acao(), ["stop", "prevent"])) - }, L((d = e.dados) == null ? void 0 : d.texto), 9, xt)) : (u(), y("span", { + onClick: a[0] || (a[0] = ue((b) => { + var k, D; + return (D = (k = e.dados) == null ? void 0 : k.acao) == null ? void 0 : D.call(k); + }, ["stop", "prevent"])) + }, F((d = e.dados) == null ? void 0 : d.texto), 9, Kt)) : (c(), $("span", { key: 1, class: "eli-tabela__texto-truncado", title: (l = e.dados) == null ? void 0 : l.texto - }, L((c = e.dados) == null ? void 0 : c.texto), 9, eo)); + }, F((u = e.dados) == null ? void 0 : u.texto), 9, Qt)); } -const to = /* @__PURE__ */ z(Qt, [["render", ao], ["__scopeId", "data-v-74854889"]]), oo = j({ +const eo = /* @__PURE__ */ L(Gt, [["render", xt], ["__scopeId", "data-v-20b03658"]]), ao = N({ name: "EliTabelaCelulaNumero", components: {}, props: { @@ -966,26 +970,26 @@ const to = /* @__PURE__ */ z(Qt, [["render", ao], ["__scopeId", "data-v-74854889 } }, setup({ dados: e }) { - const a = A(() => { + const a = S(() => { var n, d; const o = String(e == null ? void 0 : e.numero).replace(".", ","), r = (n = e == null ? void 0 : e.prefixo) == null ? void 0 : n.trim(), i = (d = e == null ? void 0 : e.sufixo) == null ? void 0 : d.trim(), f = r ? `${r} ` : "", t = i ? ` ${i}` : ""; return `${f}${o}${t}`; }); return { dados: e, textoNumero: a }; } -}), no = { key: 1 }; -function ro(e, a, o, r, i, f) { +}), to = { key: 1 }; +function oo(e, a, o, r, i, f) { var t; - return (t = e.dados) != null && t.acao ? (u(), y("button", { + return (t = e.dados) != null && t.acao ? (c(), $("button", { key: 0, type: "button", class: "eli-tabela__celula-link", onClick: a[0] || (a[0] = ue((n) => e.dados.acao(), ["stop", "prevent"])) - }, L(e.textoNumero), 1)) : (u(), y("span", no, L(e.textoNumero), 1)); + }, F(e.textoNumero), 1)) : (c(), $("span", to, F(e.textoNumero), 1)); } -const lo = /* @__PURE__ */ z(oo, [["render", ro], ["__scopeId", "data-v-69c890c4"]]), io = j({ +const no = /* @__PURE__ */ L(ao, [["render", oo], ["__scopeId", "data-v-69c890c4"]]), ro = N({ name: "EliTabelaCelulaTags", - components: { VChip: Fa }, + components: { VChip: Pa }, props: { dados: { type: Object, @@ -995,11 +999,11 @@ const lo = /* @__PURE__ */ z(oo, [["render", ro], ["__scopeId", "data-v-69c890c4 setup({ dados: e }) { return { dados: e }; } -}), so = { class: "eli-tabela__celula-tags" }; -function uo(e, a, o, r, i, f) { +}), lo = { class: "eli-tabela__celula-tags" }; +function io(e, a, o, r, i, f) { var t; - return u(), y("div", so, [ - (u(!0), y(re, null, fe(((t = e.dados) == null ? void 0 : t.opcoes) ?? [], (n, d) => (u(), W(Na, { + return c(), $("div", lo, [ + (c(!0), $(re, null, ve(((t = e.dados) == null ? void 0 : t.opcoes) ?? [], (n, d) => (c(), W(Va, { key: d, class: "eli-tabela__celula-tag", size: "small", @@ -1007,254 +1011,254 @@ function uo(e, a, o, r, i, f) { color: n.cor, clickable: !!n.acao, onClick: ue((l) => { - var c; - return (c = n.acao) == null ? void 0 : c.call(n); + var u; + return (u = n.acao) == null ? void 0 : u.call(n); }, ["stop", "prevent"]) }, { - default: te(() => [ - n.icone ? (u(), W(Me(n.icone), { + default: ae(() => [ + n.icone ? (c(), W(Te(n.icone), { key: 0, class: "eli-tabela__celula-tag-icone", size: 14 - })) : ee("", !0), - $("span", null, L(n.rotulo), 1) + })) : Q("", !0), + p("span", null, F(n.rotulo), 1) ]), _: 2 }, 1032, ["color", "clickable", "onClick"]))), 128)) ]); } -const co = /* @__PURE__ */ z(io, [["render", uo], ["__scopeId", "data-v-a9c83dbe"]]); -function ma(e) { +const so = /* @__PURE__ */ L(ro, [["render", io], ["__scopeId", "data-v-a9c83dbe"]]); +function va(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } -var Ne = { exports: {} }, fo = Ne.exports, aa; -function po() { - return aa || (aa = 1, (function(e, a) { +var qe = { exports: {} }, uo = qe.exports, xe; +function co() { + return xe || (xe = 1, (function(e, a) { (function(o, r) { e.exports = r(); - })(fo, (function() { - var o = 1e3, r = 6e4, i = 36e5, f = "millisecond", t = "second", n = "minute", d = "hour", l = "day", c = "week", m = "month", w = "quarter", B = "year", _ = "date", s = "Invalid Date", E = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, g = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, C = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(D) { - var h = ["th", "st", "nd", "rd"], p = D % 100; - return "[" + D + (h[(p - 20) % 10] || h[p] || h[0]) + "]"; - } }, Z = function(D, h, p) { - var S = String(D); - return !S || S.length >= h ? D : "" + Array(h + 1 - S.length).join(p) + D; - }, le = { s: Z, z: function(D) { - var h = -D.utcOffset(), p = Math.abs(h), S = Math.floor(p / 60), v = p % 60; - return (h <= 0 ? "+" : "-") + Z(S, 2, "0") + ":" + Z(v, 2, "0"); - }, m: function D(h, p) { - if (h.date() < p.date()) return -D(p, h); - var S = 12 * (p.year() - h.year()) + (p.month() - h.month()), v = h.clone().add(S, m), T = p - v < 0, M = h.clone().add(S + (T ? -1 : 1), m); - return +(-(S + (p - v) / (T ? v - M : M - v)) || 0); - }, a: function(D) { - return D < 0 ? Math.ceil(D) || 0 : Math.floor(D); - }, p: function(D) { - return { M: m, y: B, w: c, d: l, D: _, h: d, m: n, s: t, ms: f, Q: w }[D] || String(D || "").toLowerCase().replace(/s$/, ""); - }, u: function(D) { - return D === void 0; + })(uo, (function() { + var o = 1e3, r = 6e4, i = 36e5, f = "millisecond", t = "second", n = "minute", d = "hour", l = "day", u = "week", b = "month", k = "quarter", D = "year", y = "date", s = "Invalid Date", _ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, g = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, E = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(M) { + var h = ["th", "st", "nd", "rd"], v = M % 100; + return "[" + M + (h[(v - 20) % 10] || h[v] || h[0]) + "]"; + } }, Z = function(M, h, v) { + var C = String(M); + return !C || C.length >= h ? M : "" + Array(h + 1 - C.length).join(v) + M; + }, oe = { s: Z, z: function(M) { + var h = -M.utcOffset(), v = Math.abs(h), C = Math.floor(v / 60), m = v % 60; + return (h <= 0 ? "+" : "-") + Z(C, 2, "0") + ":" + Z(m, 2, "0"); + }, m: function M(h, v) { + if (h.date() < v.date()) return -M(v, h); + var C = 12 * (v.year() - h.year()) + (v.month() - h.month()), m = h.clone().add(C, b), T = v - m < 0, B = h.clone().add(C + (T ? -1 : 1), b); + return +(-(C + (v - m) / (T ? m - B : B - m)) || 0); + }, a: function(M) { + return M < 0 ? Math.ceil(M) || 0 : Math.floor(M); + }, p: function(M) { + return { M: b, y: D, w: u, d: l, D: y, h: d, m: n, s: t, ms: f, Q: k }[M] || String(M || "").toLowerCase().replace(/s$/, ""); + }, u: function(M) { + return M === void 0; } }, Y = "en", X = {}; - X[Y] = C; - var ie = "$isDayjsObject", H = function(D) { - return D instanceof Se || !(!D || !D[ie]); - }, be = function D(h, p, S) { - var v; + X[Y] = E; + var le = "$isDayjsObject", j = function(M) { + return M instanceof ke || !(!M || !M[le]); + }, be = function M(h, v, C) { + var m; if (!h) return Y; if (typeof h == "string") { var T = h.toLowerCase(); - X[T] && (v = T), p && (X[T] = p, v = T); - var M = h.split("-"); - if (!v && M.length > 1) return D(M[0]); + X[T] && (m = T), v && (X[T] = v, m = T); + var B = h.split("-"); + if (!m && B.length > 1) return M(B[0]); } else { - var N = h.name; - X[N] = h, v = N; + var I = h.name; + X[I] = h, m = I; } - return !S && v && (Y = v), v || !S && Y; - }, I = function(D, h) { - if (H(D)) return D.clone(); - var p = typeof h == "object" ? h : {}; - return p.date = D, p.args = arguments, new Se(p); - }, O = le; - O.l = be, O.i = H, O.w = function(D, h) { - return I(D, { locale: h.$L, utc: h.$u, x: h.$x, $offset: h.$offset }); + return !C && m && (Y = m), m || !C && Y; + }, V = function(M, h) { + if (j(M)) return M.clone(); + var v = typeof h == "object" ? h : {}; + return v.date = M, v.args = arguments, new ke(v); + }, w = oe; + w.l = be, w.i = j, w.w = function(M, h) { + return V(M, { locale: h.$L, utc: h.$u, x: h.$x, $offset: h.$offset }); }; - var Se = (function() { - function D(p) { - this.$L = be(p.locale, null, !0), this.parse(p), this.$x = this.$x || p.x || {}, this[ie] = !0; + var ke = (function() { + function M(v) { + this.$L = be(v.locale, null, !0), this.parse(v), this.$x = this.$x || v.x || {}, this[le] = !0; } - var h = D.prototype; - return h.parse = function(p) { - this.$d = (function(S) { - var v = S.date, T = S.utc; - if (v === null) return /* @__PURE__ */ new Date(NaN); - if (O.u(v)) return /* @__PURE__ */ new Date(); - if (v instanceof Date) return new Date(v); - if (typeof v == "string" && !/Z$/i.test(v)) { - var M = v.match(E); - if (M) { - var N = M[2] - 1 || 0, R = (M[7] || "0").substring(0, 3); - return T ? new Date(Date.UTC(M[1], N, M[3] || 1, M[4] || 0, M[5] || 0, M[6] || 0, R)) : new Date(M[1], N, M[3] || 1, M[4] || 0, M[5] || 0, M[6] || 0, R); + var h = M.prototype; + return h.parse = function(v) { + this.$d = (function(C) { + var m = C.date, T = C.utc; + if (m === null) return /* @__PURE__ */ new Date(NaN); + if (w.u(m)) return /* @__PURE__ */ new Date(); + if (m instanceof Date) return new Date(m); + if (typeof m == "string" && !/Z$/i.test(m)) { + var B = m.match(_); + if (B) { + var I = B[2] - 1 || 0, R = (B[7] || "0").substring(0, 3); + return T ? new Date(Date.UTC(B[1], I, B[3] || 1, B[4] || 0, B[5] || 0, B[6] || 0, R)) : new Date(B[1], I, B[3] || 1, B[4] || 0, B[5] || 0, B[6] || 0, R); } } - return new Date(v); - })(p), this.init(); + return new Date(m); + })(v), this.init(); }, h.init = function() { - var p = this.$d; - this.$y = p.getFullYear(), this.$M = p.getMonth(), this.$D = p.getDate(), this.$W = p.getDay(), this.$H = p.getHours(), this.$m = p.getMinutes(), this.$s = p.getSeconds(), this.$ms = p.getMilliseconds(); + var v = this.$d; + this.$y = v.getFullYear(), this.$M = v.getMonth(), this.$D = v.getDate(), this.$W = v.getDay(), this.$H = v.getHours(), this.$m = v.getMinutes(), this.$s = v.getSeconds(), this.$ms = v.getMilliseconds(); }, h.$utils = function() { - return O; + return w; }, h.isValid = function() { return this.$d.toString() !== s; - }, h.isSame = function(p, S) { - var v = I(p); - return this.startOf(S) <= v && v <= this.endOf(S); - }, h.isAfter = function(p, S) { - return I(p) < this.startOf(S); - }, h.isBefore = function(p, S) { - return this.endOf(S) < I(p); - }, h.$g = function(p, S, v) { - return O.u(p) ? this[S] : this.set(v, p); + }, h.isSame = function(v, C) { + var m = V(v); + return this.startOf(C) <= m && m <= this.endOf(C); + }, h.isAfter = function(v, C) { + return V(v) < this.startOf(C); + }, h.isBefore = function(v, C) { + return this.endOf(C) < V(v); + }, h.$g = function(v, C, m) { + return w.u(v) ? this[C] : this.set(m, v); }, h.unix = function() { return Math.floor(this.valueOf() / 1e3); }, h.valueOf = function() { return this.$d.getTime(); - }, h.startOf = function(p, S) { - var v = this, T = !!O.u(S) || S, M = O.p(p), N = function(ye, K) { - var pe = O.w(v.$u ? Date.UTC(v.$y, K, ye) : new Date(v.$y, K, ye), v); - return T ? pe : pe.endOf(l); - }, R = function(ye, K) { - return O.w(v.toDate()[ye].apply(v.toDate("s"), (T ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(K)), v); - }, G = this.$W, x = this.$M, oe = this.$D, ge = "set" + (this.$u ? "UTC" : ""); - switch (M) { - case B: - return T ? N(1, 0) : N(31, 11); - case m: - return T ? N(1, x) : N(0, x + 1); - case c: - var $e = this.$locale().weekStart || 0, Ae = (G < $e ? G + 7 : G) - $e; - return N(T ? oe - Ae : oe + (6 - Ae), x); + }, h.startOf = function(v, C) { + var m = this, T = !!w.u(C) || C, B = w.p(v), I = function(_e, te) { + var ge = w.w(m.$u ? Date.UTC(m.$y, te, _e) : new Date(m.$y, te, _e), m); + return T ? ge : ge.endOf(l); + }, R = function(_e, te) { + return w.w(m.toDate()[_e].apply(m.toDate("s"), (T ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(te)), m); + }, G = this.$W, x = this.$M, ie = this.$D, de = "set" + (this.$u ? "UTC" : ""); + switch (B) { + case D: + return T ? I(1, 0) : I(31, 11); + case b: + return T ? I(1, x) : I(0, x + 1); + case u: + var he = this.$locale().weekStart || 0, Ee = (G < he ? G + 7 : G) - he; + return I(T ? ie - Ee : ie + (6 - Ee), x); case l: - case _: - return R(ge + "Hours", 0); + case y: + return R(de + "Hours", 0); case d: - return R(ge + "Minutes", 1); + return R(de + "Minutes", 1); case n: - return R(ge + "Seconds", 2); + return R(de + "Seconds", 2); case t: - return R(ge + "Milliseconds", 3); + return R(de + "Milliseconds", 3); default: return this.clone(); } - }, h.endOf = function(p) { - return this.startOf(p, !1); - }, h.$set = function(p, S) { - var v, T = O.p(p), M = "set" + (this.$u ? "UTC" : ""), N = (v = {}, v[l] = M + "Date", v[_] = M + "Date", v[m] = M + "Month", v[B] = M + "FullYear", v[d] = M + "Hours", v[n] = M + "Minutes", v[t] = M + "Seconds", v[f] = M + "Milliseconds", v)[T], R = T === l ? this.$D + (S - this.$W) : S; - if (T === m || T === B) { - var G = this.clone().set(_, 1); - G.$d[N](R), G.init(), this.$d = G.set(_, Math.min(this.$D, G.daysInMonth())).$d; - } else N && this.$d[N](R); + }, h.endOf = function(v) { + return this.startOf(v, !1); + }, h.$set = function(v, C) { + var m, T = w.p(v), B = "set" + (this.$u ? "UTC" : ""), I = (m = {}, m[l] = B + "Date", m[y] = B + "Date", m[b] = B + "Month", m[D] = B + "FullYear", m[d] = B + "Hours", m[n] = B + "Minutes", m[t] = B + "Seconds", m[f] = B + "Milliseconds", m)[T], R = T === l ? this.$D + (C - this.$W) : C; + if (T === b || T === D) { + var G = this.clone().set(y, 1); + G.$d[I](R), G.init(), this.$d = G.set(y, Math.min(this.$D, G.daysInMonth())).$d; + } else I && this.$d[I](R); return this.init(), this; - }, h.set = function(p, S) { - return this.clone().$set(p, S); - }, h.get = function(p) { - return this[O.p(p)](); - }, h.add = function(p, S) { - var v, T = this; - p = Number(p); - var M = O.p(S), N = function(x) { - var oe = I(T); - return O.w(oe.date(oe.date() + Math.round(x * p)), T); + }, h.set = function(v, C) { + return this.clone().$set(v, C); + }, h.get = function(v) { + return this[w.p(v)](); + }, h.add = function(v, C) { + var m, T = this; + v = Number(v); + var B = w.p(C), I = function(x) { + var ie = V(T); + return w.w(ie.date(ie.date() + Math.round(x * v)), T); }; - if (M === m) return this.set(m, this.$M + p); - if (M === B) return this.set(B, this.$y + p); - if (M === l) return N(1); - if (M === c) return N(7); - var R = (v = {}, v[n] = r, v[d] = i, v[t] = o, v)[M] || 1, G = this.$d.getTime() + p * R; - return O.w(G, this); - }, h.subtract = function(p, S) { - return this.add(-1 * p, S); - }, h.format = function(p) { - var S = this, v = this.$locale(); - if (!this.isValid()) return v.invalidDate || s; - var T = p || "YYYY-MM-DDTHH:mm:ssZ", M = O.z(this), N = this.$H, R = this.$m, G = this.$M, x = v.weekdays, oe = v.months, ge = v.meridiem, $e = function(K, pe, _e, Be) { - return K && (K[pe] || K(S, T)) || _e[pe].slice(0, Be); - }, Ae = function(K) { - return O.s(N % 12 || 12, K, "0"); - }, ye = ge || function(K, pe, _e) { - var Be = K < 12 ? "AM" : "PM"; - return _e ? Be.toLowerCase() : Be; + if (B === b) return this.set(b, this.$M + v); + if (B === D) return this.set(D, this.$y + v); + if (B === l) return I(1); + if (B === u) return I(7); + var R = (m = {}, m[n] = r, m[d] = i, m[t] = o, m)[B] || 1, G = this.$d.getTime() + v * R; + return w.w(G, this); + }, h.subtract = function(v, C) { + return this.add(-1 * v, C); + }, h.format = function(v) { + var C = this, m = this.$locale(); + if (!this.isValid()) return m.invalidDate || s; + var T = v || "YYYY-MM-DDTHH:mm:ssZ", B = w.z(this), I = this.$H, R = this.$m, G = this.$M, x = m.weekdays, ie = m.months, de = m.meridiem, he = function(te, ge, Ce, De) { + return te && (te[ge] || te(C, T)) || Ce[ge].slice(0, De); + }, Ee = function(te) { + return w.s(I % 12 || 12, te, "0"); + }, _e = de || function(te, ge, Ce) { + var De = te < 12 ? "AM" : "PM"; + return Ce ? De.toLowerCase() : De; }; - return T.replace(g, (function(K, pe) { - return pe || (function(_e) { - switch (_e) { + return T.replace(g, (function(te, ge) { + return ge || (function(Ce) { + switch (Ce) { case "YY": - return String(S.$y).slice(-2); + return String(C.$y).slice(-2); case "YYYY": - return O.s(S.$y, 4, "0"); + return w.s(C.$y, 4, "0"); case "M": return G + 1; case "MM": - return O.s(G + 1, 2, "0"); + return w.s(G + 1, 2, "0"); case "MMM": - return $e(v.monthsShort, G, oe, 3); + return he(m.monthsShort, G, ie, 3); case "MMMM": - return $e(oe, G); + return he(ie, G); case "D": - return S.$D; + return C.$D; case "DD": - return O.s(S.$D, 2, "0"); + return w.s(C.$D, 2, "0"); case "d": - return String(S.$W); + return String(C.$W); case "dd": - return $e(v.weekdaysMin, S.$W, x, 2); + return he(m.weekdaysMin, C.$W, x, 2); case "ddd": - return $e(v.weekdaysShort, S.$W, x, 3); + return he(m.weekdaysShort, C.$W, x, 3); case "dddd": - return x[S.$W]; + return x[C.$W]; case "H": - return String(N); + return String(I); case "HH": - return O.s(N, 2, "0"); + return w.s(I, 2, "0"); case "h": - return Ae(1); + return Ee(1); case "hh": - return Ae(2); + return Ee(2); case "a": - return ye(N, R, !0); + return _e(I, R, !0); case "A": - return ye(N, R, !1); + return _e(I, R, !1); case "m": return String(R); case "mm": - return O.s(R, 2, "0"); + return w.s(R, 2, "0"); case "s": - return String(S.$s); + return String(C.$s); case "ss": - return O.s(S.$s, 2, "0"); + return w.s(C.$s, 2, "0"); case "SSS": - return O.s(S.$ms, 3, "0"); + return w.s(C.$ms, 3, "0"); case "Z": - return M; + return B; } return null; - })(K) || M.replace(":", ""); + })(te) || B.replace(":", ""); })); }, h.utcOffset = function() { return 15 * -Math.round(this.$d.getTimezoneOffset() / 15); - }, h.diff = function(p, S, v) { - var T, M = this, N = O.p(S), R = I(p), G = (R.utcOffset() - this.utcOffset()) * r, x = this - R, oe = function() { - return O.m(M, R); + }, h.diff = function(v, C, m) { + var T, B = this, I = w.p(C), R = V(v), G = (R.utcOffset() - this.utcOffset()) * r, x = this - R, ie = function() { + return w.m(B, R); }; - switch (N) { - case B: - T = oe() / 12; + switch (I) { + case D: + T = ie() / 12; break; - case m: - T = oe(); + case b: + T = ie(); break; - case w: - T = oe() / 3; + case k: + T = ie() / 3; break; - case c: + case u: T = (x - G) / 6048e5; break; case l: @@ -1272,17 +1276,17 @@ function po() { default: T = x; } - return v ? T : O.a(T); + return m ? T : w.a(T); }, h.daysInMonth = function() { - return this.endOf(m).$D; + return this.endOf(b).$D; }, h.$locale = function() { return X[this.$L]; - }, h.locale = function(p, S) { - if (!p) return this.$L; - var v = this.clone(), T = be(p, S, !0); - return T && (v.$L = T), v; + }, h.locale = function(v, C) { + if (!v) return this.$L; + var m = this.clone(), T = be(v, C, !0); + return T && (m.$L = T), m; }, h.clone = function() { - return O.w(this.$d, this); + return w.w(this.$d, this); }, h.toDate = function() { return new Date(this.valueOf()); }, h.toJSON = function() { @@ -1291,53 +1295,53 @@ function po() { return this.$d.toISOString(); }, h.toString = function() { return this.$d.toUTCString(); - }, D; - })(), Pe = Se.prototype; - return I.prototype = Pe, [["$ms", f], ["$s", t], ["$m", n], ["$H", d], ["$W", l], ["$M", m], ["$y", B], ["$D", _]].forEach((function(D) { - Pe[D[1]] = function(h) { - return this.$g(h, D[0], D[1]); + }, M; + })(), Pe = ke.prototype; + return V.prototype = Pe, [["$ms", f], ["$s", t], ["$m", n], ["$H", d], ["$W", l], ["$M", b], ["$y", D], ["$D", y]].forEach((function(M) { + Pe[M[1]] = function(h) { + return this.$g(h, M[0], M[1]); }; - })), I.extend = function(D, h) { - return D.$i || (D(h, Se, I), D.$i = !0), I; - }, I.locale = be, I.isDayjs = H, I.unix = function(D) { - return I(1e3 * D); - }, I.en = X[Y], I.Ls = X, I.p = {}, I; + })), V.extend = function(M, h) { + return M.$i || (M(h, ke, V), M.$i = !0), V; + }, V.locale = be, V.isDayjs = j, V.unix = function(M) { + return V(1e3 * M); + }, V.en = X[Y], V.Ls = X, V.p = {}, V; })); - })(Ne)), Ne.exports; + })(qe)), qe.exports; } -var vo = po(); -const Ee = /* @__PURE__ */ ma(vo); -var qe = { exports: {} }, mo = qe.exports, ta; -function bo() { - return ta || (ta = 1, (function(e, a) { +var fo = co(); +const Ae = /* @__PURE__ */ va(fo); +var Ne = { exports: {} }, vo = Ne.exports, ea; +function po() { + return ea || (ea = 1, (function(e, a) { (function(o, r) { e.exports = r(); - })(mo, (function() { + })(vo, (function() { return function(o, r, i) { o = o || {}; var f = r.prototype, t = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" }; - function n(l, c, m, w) { - return f.fromToBase(l, c, m, w); + function n(l, u, b, k) { + return f.fromToBase(l, u, b, k); } - i.en.relativeTime = t, f.fromToBase = function(l, c, m, w, B) { - for (var _, s, E, g = m.$locale().relativeTime || t, C = o.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], Z = C.length, le = 0; le < Z; le += 1) { - var Y = C[le]; - Y.d && (_ = w ? i(l).diff(m, Y.d, !0) : m.diff(l, Y.d, !0)); - var X = (o.rounding || Math.round)(Math.abs(_)); - if (E = _ > 0, X <= Y.r || !Y.r) { - X <= 1 && le > 0 && (Y = C[le - 1]); - var ie = g[Y.l]; - B && (X = B("" + X)), s = typeof ie == "string" ? ie.replace("%d", X) : ie(X, c, Y.l, E); + i.en.relativeTime = t, f.fromToBase = function(l, u, b, k, D) { + for (var y, s, _, g = b.$locale().relativeTime || t, E = o.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], Z = E.length, oe = 0; oe < Z; oe += 1) { + var Y = E[oe]; + Y.d && (y = k ? i(l).diff(b, Y.d, !0) : b.diff(l, Y.d, !0)); + var X = (o.rounding || Math.round)(Math.abs(y)); + if (_ = y > 0, X <= Y.r || !Y.r) { + X <= 1 && oe > 0 && (Y = E[oe - 1]); + var le = g[Y.l]; + D && (X = D("" + X)), s = typeof le == "string" ? le.replace("%d", X) : le(X, u, Y.l, _); break; } } - if (c) return s; - var H = E ? g.future : g.past; - return typeof H == "function" ? H(s) : H.replace("%s", s); - }, f.to = function(l, c) { - return n(l, c, this, !0); - }, f.from = function(l, c) { - return n(l, c, this); + if (u) return s; + var j = _ ? g.future : g.past; + return typeof j == "function" ? j(s) : j.replace("%s", s); + }, f.to = function(l, u) { + return n(l, u, this, !0); + }, f.from = function(l, u) { + return n(l, u, this); }; var d = function(l) { return l.$u ? i.utc() : i(); @@ -1349,12 +1353,12 @@ function bo() { }; }; })); - })(qe)), qe.exports; + })(Ne)), Ne.exports; } -var ho = bo(); -const go = /* @__PURE__ */ ma(ho); -Ee.extend(go); -const $o = j({ +var mo = po(); +const bo = /* @__PURE__ */ va(mo); +Ae.extend(bo); +const ho = N({ name: "EliTabelaCelulaData", props: { dados: { @@ -1363,31 +1367,31 @@ const $o = j({ } }, setup({ dados: e }) { - const a = A(() => { + const a = S(() => { const o = e == null ? void 0 : e.valor; if (!o) return ""; const r = (e == null ? void 0 : e.formato) ?? "data"; - return r === "relativo" ? Ee(o).fromNow() : r === "data_hora" ? Ee(o).format("DD/MM/YYYY HH:mm") : Ee(o).format("DD/MM/YYYY"); + return r === "relativo" ? Ae(o).fromNow() : r === "data_hora" ? Ae(o).format("DD/MM/YYYY HH:mm") : Ae(o).format("DD/MM/YYYY"); }); return { dados: e, textoData: a }; } -}), yo = { key: 1 }; -function _o(e, a, o, r, i, f) { +}), go = { key: 1 }; +function $o(e, a, o, r, i, f) { var t; - return (t = e.dados) != null && t.acao ? (u(), y("button", { + return (t = e.dados) != null && t.acao ? (c(), $("button", { key: 0, type: "button", class: "eli-tabela__celula-link", onClick: a[0] || (a[0] = ue((n) => e.dados.acao(), ["stop", "prevent"])) - }, L(e.textoData), 1)) : (u(), y("span", yo, L(e.textoData), 1)); + }, F(e.textoData), 1)) : (c(), $("span", go, F(e.textoData), 1)); } -const Eo = /* @__PURE__ */ z($o, [["render", _o], ["__scopeId", "data-v-2b88bbb2"]]), Co = { - textoSimples: Kt, - textoTruncado: to, - numero: lo, - tags: co, - data: Eo -}, So = j({ +const yo = /* @__PURE__ */ L(ho, [["render", $o], ["__scopeId", "data-v-2b88bbb2"]]), _o = { + textoSimples: Xt, + textoTruncado: eo, + numero: no, + tags: so, + data: yo +}, Eo = N({ name: "EliTabelaCelula", props: { celula: { @@ -1397,16 +1401,16 @@ const Eo = /* @__PURE__ */ z($o, [["render", _o], ["__scopeId", "data-v-2b88bbb2 } }, setup(e) { - const a = A(() => e.celula[0]), o = A(() => e.celula[1]), r = A(() => Co[a.value]), i = A(() => o.value); + const a = S(() => e.celula[0]), o = S(() => e.celula[1]), r = S(() => _o[a.value]), i = S(() => o.value); return { Componente: r, dadosParaComponente: i }; } }); -function Ao(e, a, o, r, i, f) { - return u(), W(Me(e.Componente), { dados: e.dadosParaComponente }, null, 8, ["dados"]); +function Co(e, a, o, r, i, f) { + return c(), W(Te(e.Componente), { dados: e.dadosParaComponente }, null, 8, ["dados"]); } -const ba = /* @__PURE__ */ z(So, [["render", Ao]]), ko = j({ +const pa = /* @__PURE__ */ L(Eo, [["render", Co]]), Ao = N({ name: "EliTabelaDetalhesLinha", - components: { EliTabelaCelula: ba }, + components: { EliTabelaCelula: pa }, props: { linha: { type: null, @@ -1417,16 +1421,16 @@ const ba = /* @__PURE__ */ z(So, [["render", Ao]]), ko = j({ required: !0 } } -}), Do = { class: "eli-tabela__detalhes" }, Mo = { class: "eli-tabela__detalhe-rotulo" }, Bo = { class: "eli-tabela__detalhe-valor" }; -function To(e, a, o, r, i, f) { - const t = Q("EliTabelaCelula"); - return u(), y("div", Do, [ - (u(!0), y(re, null, fe(e.colunasInvisiveis, (n, d) => (u(), y("div", { +}), So = { class: "eli-tabela__detalhes" }, ko = { class: "eli-tabela__detalhe-rotulo" }, Do = { class: "eli-tabela__detalhe-valor" }; +function Mo(e, a, o, r, i, f) { + const t = K("EliTabelaCelula"); + return c(), $("div", So, [ + (c(!0), $(re, null, ve(e.colunasInvisiveis, (n, d) => (c(), $("div", { key: `det-${d}-${n.rotulo}`, class: "eli-tabela__detalhe" }, [ - $("div", Mo, L(n.rotulo), 1), - $("div", Bo, [ + p("div", ko, F(n.rotulo), 1), + p("div", Do, [ q(t, { celula: n.celula(e.linha) }, null, 8, ["celula"]) @@ -1434,14 +1438,14 @@ function To(e, a, o, r, i, f) { ]))), 128)) ]); } -const wo = /* @__PURE__ */ z(ko, [["render", To], ["__scopeId", "data-v-f1ee8d20"]]), Po = j({ +const Bo = /* @__PURE__ */ L(Ao, [["render", Mo], ["__scopeId", "data-v-f1ee8d20"]]), To = N({ name: "EliTabelaBody", components: { - EliTabelaCelula: ba, - EliTabelaDetalhesLinha: wo, - MoreVertical: ft, - ChevronRight: ea, - ChevronDown: xe + EliTabelaCelula: pa, + EliTabelaDetalhesLinha: Bo, + MoreVertical: ct, + ChevronRight: Qe, + ChevronDown: Ke }, props: { colunas: { @@ -1487,83 +1491,83 @@ const wo = /* @__PURE__ */ z(ko, [["render", To], ["__scopeId", "data-v-f1ee8d20 }, setup() { return { - ChevronRight: ea, - ChevronDown: xe + ChevronRight: Qe, + ChevronDown: Ke }; } -}), Oo = { class: "eli-tabela__tbody" }, Fo = ["aria-expanded", "aria-label", "title", "onClick"], Vo = ["id", "disabled", "aria-expanded", "aria-controls", "aria-label", "title", "onClick"], Io = ["colspan"]; -function No(e, a, o, r, i, f) { - const t = Q("EliTabelaCelula"), n = Q("MoreVertical"), d = Q("EliTabelaDetalhesLinha"); - return u(), y("tbody", Oo, [ - (u(!0), y(re, null, fe(e.linhas, (l, c) => { - var m, w, B, _, s, E; - return u(), y(re, { - key: `grp-${c}` +}), wo = { class: "eli-tabela__tbody" }, Po = ["aria-expanded", "aria-label", "title", "onClick"], Oo = ["id", "disabled", "aria-expanded", "aria-controls", "aria-label", "title", "onClick"], Fo = ["colspan"]; +function Vo(e, a, o, r, i, f) { + const t = K("EliTabelaCelula"), n = K("MoreVertical"), d = K("EliTabelaDetalhesLinha"); + return c(), $("tbody", wo, [ + (c(!0), $(re, null, ve(e.linhas, (l, u) => { + var b, k, D, y, s, _; + return c(), $(re, { + key: `grp-${u}` }, [ - $("tr", { - class: De(["eli-tabela__tr", [c % 2 === 1 ? "eli-tabela__tr--zebra" : void 0]]) + p("tr", { + class: Me(["eli-tabela__tr", [u % 2 === 1 ? "eli-tabela__tr--zebra" : void 0]]) }, [ - e.temColunasInvisiveis ? (u(), y("td", { + e.temColunasInvisiveis ? (c(), $("td", { class: "eli-tabela__td eli-tabela__td--expander", - key: `td-${c}-exp` + key: `td-${u}-exp` }, [ - $("button", { + p("button", { type: "button", - class: De(["eli-tabela__expander-botao", [(m = e.linhasExpandidas) != null && m[c] ? "eli-tabela__expander-botao--ativo" : void 0]]), - "aria-expanded": (w = e.linhasExpandidas) != null && w[c] ? "true" : "false", - "aria-label": (B = e.linhasExpandidas) != null && B[c] ? "Ocultar colunas ocultas" : "Mostrar colunas ocultas", - title: (_ = e.linhasExpandidas) != null && _[c] ? "Ocultar detalhes" : "Mostrar detalhes", - onClick: ue((g) => e.alternarLinhaExpandida(c), ["stop"]) + class: Me(["eli-tabela__expander-botao", [(b = e.linhasExpandidas) != null && b[u] ? "eli-tabela__expander-botao--ativo" : void 0]]), + "aria-expanded": (k = e.linhasExpandidas) != null && k[u] ? "true" : "false", + "aria-label": (D = e.linhasExpandidas) != null && D[u] ? "Ocultar colunas ocultas" : "Mostrar colunas ocultas", + title: (y = e.linhasExpandidas) != null && y[u] ? "Ocultar detalhes" : "Mostrar detalhes", + onClick: ue((g) => e.alternarLinhaExpandida(u), ["stop"]) }, [ - (u(), W(Me((s = e.linhasExpandidas) != null && s[c] ? e.ChevronDown : e.ChevronRight), { + (c(), W(Te((s = e.linhasExpandidas) != null && s[u] ? e.ChevronDown : e.ChevronRight), { class: "eli-tabela__expander-icone", size: 16, "stroke-width": 2, "aria-hidden": "true" })) - ], 10, Fo) - ])) : ee("", !0), - (u(!0), y(re, null, fe(e.colunas, (g, C) => (u(), y("td", { - key: `td-${c}-${C}`, + ], 10, Po) + ])) : Q("", !0), + (c(!0), $(re, null, ve(e.colunas, (g, E) => (c(), $("td", { + key: `td-${u}-${E}`, class: "eli-tabela__td" }, [ q(t, { celula: g.celula(l) }, null, 8, ["celula"]) ]))), 128)), - e.temAcoes ? (u(), y("td", { + e.temAcoes ? (c(), $("td", { class: "eli-tabela__td eli-tabela__td--acoes", - key: `td-${c}-acoes` + key: `td-${u}-acoes` }, [ - $("div", { - class: De(["eli-tabela__acoes-container", [e.menuAberto === c ? "eli-tabela__acoes-container--aberto" : void 0]]) + p("div", { + class: Me(["eli-tabela__acoes-container", [e.menuAberto === u ? "eli-tabela__acoes-container--aberto" : void 0]]) }, [ - $("button", { + p("button", { class: "eli-tabela__acoes-toggle", type: "button", - id: `eli-tabela-acoes-toggle-${c}`, - disabled: !e.possuiAcoes(c), + id: `eli-tabela-acoes-toggle-${u}`, + disabled: !e.possuiAcoes(u), "aria-haspopup": "menu", - "aria-expanded": e.menuAberto === c ? "true" : "false", - "aria-controls": e.possuiAcoes(c) ? `eli-tabela-acoes-menu-${c}` : void 0, - "aria-label": e.possuiAcoes(c) ? "Ações da linha" : "Nenhuma ação disponível", - title: e.possuiAcoes(c) ? "Ações" : "Nenhuma ação disponível", - onClick: ue((g) => e.toggleMenu(c, g), ["stop"]) + "aria-expanded": e.menuAberto === u ? "true" : "false", + "aria-controls": e.possuiAcoes(u) ? `eli-tabela-acoes-menu-${u}` : void 0, + "aria-label": e.possuiAcoes(u) ? "Ações da linha" : "Nenhuma ação disponível", + title: e.possuiAcoes(u) ? "Ações" : "Nenhuma ação disponível", + onClick: ue((g) => e.toggleMenu(u, g), ["stop"]) }, [ q(n, { class: "eli-tabela__acoes-toggle-icone", size: 18, "stroke-width": 2 }) - ], 8, Vo) + ], 8, Oo) ], 2) - ])) : ee("", !0) + ])) : Q("", !0) ], 2), - e.temColunasInvisiveis && ((E = e.linhasExpandidas) != null && E[c]) ? (u(), y("tr", { + e.temColunasInvisiveis && ((_ = e.linhasExpandidas) != null && _[u]) ? (c(), $("tr", { key: 0, - class: De(["eli-tabela__tr eli-tabela__tr--detalhes", [c % 2 === 1 ? "eli-tabela__tr--zebra" : void 0]]) + class: Me(["eli-tabela__tr eli-tabela__tr--detalhes", [u % 2 === 1 ? "eli-tabela__tr--zebra" : void 0]]) }, [ - $("td", { + p("td", { class: "eli-tabela__td eli-tabela__td--detalhes", colspan: (e.temColunasInvisiveis ? 1 : 0) + e.colunas.length + (e.temAcoes ? 1 : 0) }, [ @@ -1571,13 +1575,13 @@ function No(e, a, o, r, i, f) { linha: l, colunasInvisiveis: e.colunasInvisiveis }, null, 8, ["linha", "colunasInvisiveis"]) - ], 8, Io) - ], 2)) : ee("", !0) + ], 8, Fo) + ], 2)) : Q("", !0) ], 64); }), 128)) ]); } -const qo = /* @__PURE__ */ z(Po, [["render", No]]), Lo = j({ +const Io = /* @__PURE__ */ L(To, [["render", Vo]]), qo = N({ name: "EliTabelaMenuAcoes", props: { menuAberto: { @@ -1604,18 +1608,18 @@ const qo = /* @__PURE__ */ z(Po, [["render", No]]), Lo = j({ } }, setup(e, { emit: a, expose: o }) { - const r = F(null); + const r = O(null); o({ menuEl: r }); - const i = A(() => e.acoes.length > 0); + const i = S(() => e.acoes.length > 0); function f(t) { e.linha && a("executar", { acao: t.acao, linha: e.linha }); } return { menuEl: r, possuiAcoes: i, emitExecutar: f }; } -}), jo = ["id", "aria-labelledby"], zo = ["aria-label", "title", "onClick"], Ho = { class: "eli-tabela__acoes-item-texto" }; -function Uo(e, a, o, r, i, f) { - return u(), W(Da, { to: "body" }, [ - e.menuAberto !== null && e.possuiAcoes ? (u(), y("ul", { +}), No = ["id", "aria-labelledby"], Lo = ["aria-label", "title", "onClick"], jo = { class: "eli-tabela__acoes-item-texto" }; +function zo(e, a, o, r, i, f) { + return c(), W(Sa, { to: "body" }, [ + e.menuAberto !== null && e.possuiAcoes ? (c(), $("ul", { key: 0, id: `eli-tabela-acoes-menu-${e.menuAberto}`, ref: "menuEl", @@ -1629,12 +1633,12 @@ function Uo(e, a, o, r, i, f) { zIndex: 999999 }) }, [ - (u(!0), y(re, null, fe(e.acoes, (t) => (u(), y("li", { + (c(!0), $(re, null, ve(e.acoes, (t) => (c(), $("li", { key: `acao-${e.menuAberto}-${t.indice}`, class: "eli-tabela__acoes-item", role: "none" }, [ - $("button", { + p("button", { type: "button", class: "eli-tabela__acoes-item-botao", style: ze({ color: t.acao.cor }), @@ -1643,18 +1647,18 @@ function Uo(e, a, o, r, i, f) { title: t.acao.rotulo, onClick: ue((n) => e.emitExecutar(t), ["stop"]) }, [ - (u(), W(Me(t.acao.icone), { + (c(), W(Te(t.acao.icone), { class: "eli-tabela__acoes-item-icone", size: 16, "stroke-width": 2 })), - $("span", Ho, L(t.acao.rotulo), 1) - ], 12, zo) + p("span", jo, F(t.acao.rotulo), 1) + ], 12, Lo) ]))), 128)) - ], 12, jo)) : ee("", !0) + ], 12, No)) : Q("", !0) ]); } -const Yo = /* @__PURE__ */ z(Lo, [["render", Uo]]), Ro = j({ +const Ho = /* @__PURE__ */ L(qo, [["render", zo]]), Uo = N({ name: "EliTabelaPaginacao", props: { pagina: { @@ -1676,38 +1680,38 @@ const Yo = /* @__PURE__ */ z(Lo, [["render", Uo]]), Ro = j({ } }, setup(e, { emit: a }) { - const o = A(() => { + const o = S(() => { const l = e.maximoBotoes; return typeof l == "number" && l >= 5 ? Math.floor(l) : 7; - }), r = A(() => { - const l = e.totalPaginas, c = e.pagina, m = o.value, w = [], B = (C) => { - w.push({ - label: String(C), - pagina: C, - ativo: C === c + }), r = S(() => { + const l = e.totalPaginas, u = e.pagina, b = o.value, k = [], D = (E) => { + k.push({ + label: String(E), + pagina: E, + ativo: E === u }); - }, _ = () => { - w.push({ label: "…", ehEllipsis: !0 }); + }, y = () => { + k.push({ label: "…", ehEllipsis: !0 }); }; - if (l <= m) { - for (let C = 1; C <= l; C += 1) - B(C); - return w; + if (l <= b) { + for (let E = 1; E <= l; E += 1) + D(E); + return k; } - const s = Math.max(3, m - 2); - let E = Math.max(2, c - Math.floor(s / 2)), g = E + s - 1; - g >= l && (g = l - 1, E = g - s + 1), B(1), E > 2 && _(); - for (let C = E; C <= g; C += 1) - B(C); - return g < l - 1 && _(), B(l), w; + const s = Math.max(3, b - 2); + let _ = Math.max(2, u - Math.floor(s / 2)), g = _ + s - 1; + g >= l && (g = l - 1, _ = g - s + 1), D(1), _ > 2 && y(); + for (let E = _; E <= g; E += 1) + D(E); + return g < l - 1 && y(), D(l), k; }); function i(l) { if (!l) return; - const c = Math.min(Math.max(1, l), e.totalPaginas); - c !== e.pagina && a("alterar", c); + const u = Math.min(Math.max(1, l), e.totalPaginas); + u !== e.pagina && a("alterar", u); } - const f = A(() => e.pagina <= 1), t = A(() => e.pagina >= e.totalPaginas), n = A(() => e.pagina), d = A(() => e.totalPaginas); + const f = S(() => e.pagina <= 1), t = S(() => e.pagina >= e.totalPaginas), n = S(() => e.pagina), d = S(() => e.totalPaginas); return { botoes: r, irParaPagina: i, @@ -1717,48 +1721,48 @@ const Yo = /* @__PURE__ */ z(Lo, [["render", Uo]]), Ro = j({ totalPaginasExibidas: d }; } -}), Jo = { +}), Yo = { key: 0, class: "eli-tabela__paginacao", role: "navigation", "aria-label": "Paginação de resultados" -}, Wo = ["disabled"], Zo = { +}, Ro = ["disabled"], Jo = { key: 0, class: "eli-tabela__pagina-ellipsis", "aria-hidden": "true" -}, Xo = ["disabled", "aria-current", "aria-label", "onClick"], Go = ["disabled"]; -function Ko(e, a, o, r, i, f) { - return e.totalPaginasExibidas > 1 ? (u(), y("nav", Jo, [ - $("button", { +}, Wo = ["disabled", "aria-current", "aria-label", "onClick"], Zo = ["disabled"]; +function Xo(e, a, o, r, i, f) { + return e.totalPaginasExibidas > 1 ? (c(), $("nav", Yo, [ + p("button", { type: "button", class: "eli-tabela__pagina-botao", disabled: e.anteriorDesabilitado, "aria-label": "Página anterior", onClick: a[0] || (a[0] = (t) => e.irParaPagina(e.paginaAtual - 1)) - }, " << ", 8, Wo), - (u(!0), y(re, null, fe(e.botoes, (t, n) => (u(), y(re, { + }, " << ", 8, Ro), + (c(!0), $(re, null, ve(e.botoes, (t, n) => (c(), $(re, { key: `${t.label}-${n}` }, [ - t.ehEllipsis ? (u(), y("span", Zo, L(t.label), 1)) : (u(), y("button", { + t.ehEllipsis ? (c(), $("span", Jo, F(t.label), 1)) : (c(), $("button", { key: 1, type: "button", - class: De(["eli-tabela__pagina-botao", t.ativo ? "eli-tabela__pagina-botao--ativo" : void 0]), + class: Me(["eli-tabela__pagina-botao", t.ativo ? "eli-tabela__pagina-botao--ativo" : void 0]), disabled: t.ativo, "aria-current": t.ativo ? "page" : void 0, "aria-label": `Ir para página ${t.label}`, onClick: (d) => e.irParaPagina(t.pagina) - }, L(t.label), 11, Xo)) + }, F(t.label), 11, Wo)) ], 64))), 128)), - $("button", { + p("button", { type: "button", class: "eli-tabela__pagina-botao", disabled: e.proximaDesabilitada, "aria-label": "Próxima página", onClick: a[1] || (a[1] = (t) => e.irParaPagina(e.paginaAtual + 1)) - }, " >> ", 8, Go) - ])) : ee("", !0); + }, " >> ", 8, Zo) + ])) : Q("", !0); } -const Qo = /* @__PURE__ */ z(Ro, [["render", Ko], ["__scopeId", "data-v-5ca7a362"]]), oa = "application/x-eli-tabela-coluna", xo = j({ +const Go = /* @__PURE__ */ L(Uo, [["render", Xo], ["__scopeId", "data-v-5ca7a362"]]), aa = "application/x-eli-tabela-coluna", Ko = N({ name: "EliTabelaModalColunas", props: { aberto: { @@ -1787,17 +1791,17 @@ const Qo = /* @__PURE__ */ z(Ro, [["render", Ko], ["__scopeId", "data-v-5ca7a362 } }, setup(e, { emit: a }) { - const o = F([]), r = F([]); + const o = O([]), r = O([]); function i() { - var X, ie; - const _ = e.rotulosColunas, s = (((X = e.configInicial.visiveis) == null ? void 0 : X.length) ?? 0) > 0 || (((ie = e.configInicial.invisiveis) == null ? void 0 : ie.length) ?? 0) > 0, E = new Set( - e.colunas.filter((H) => H.visivel === !1).map((H) => H.rotulo) - ), g = s ? new Set(e.configInicial.invisiveis ?? []) : E, C = _.filter((H) => !g.has(H)), Z = e.configInicial.visiveis ?? [], le = new Set(C), Y = []; - for (const H of Z) - le.has(H) && Y.push(H); - for (const H of C) - Y.includes(H) || Y.push(H); - o.value = Y, r.value = _.filter((H) => g.has(H)); + var X, le; + const y = e.rotulosColunas, s = (((X = e.configInicial.visiveis) == null ? void 0 : X.length) ?? 0) > 0 || (((le = e.configInicial.invisiveis) == null ? void 0 : le.length) ?? 0) > 0, _ = new Set( + e.colunas.filter((j) => j.visivel === !1).map((j) => j.rotulo) + ), g = s ? new Set(e.configInicial.invisiveis ?? []) : _, E = y.filter((j) => !g.has(j)), Z = e.configInicial.visiveis ?? [], oe = new Set(E), Y = []; + for (const j of Z) + oe.has(j) && Y.push(j); + for (const j of E) + Y.includes(j) || Y.push(j); + o.value = Y, r.value = y.filter((j) => g.has(j)); } me( () => [e.aberto, e.rotulosColunas, e.configInicial, e.colunas], @@ -1815,55 +1819,55 @@ const Qo = /* @__PURE__ */ z(Ro, [["render", Ko], ["__scopeId", "data-v-5ca7a362 invisiveis: [...r.value] }); } - function n(_, s) { - var E, g; + function n(y, s) { + var _, g; try { - (E = _.dataTransfer) == null || E.setData(oa, JSON.stringify(s)), (g = _.dataTransfer) == null || g.setData("text/plain", s.rotulo), _.dataTransfer.effectAllowed = "move"; + (_ = y.dataTransfer) == null || _.setData(aa, JSON.stringify(s)), (g = y.dataTransfer) == null || g.setData("text/plain", s.rotulo), y.dataTransfer.effectAllowed = "move"; } catch { } } - function d(_) { + function d(y) { var s; try { - const E = (s = _.dataTransfer) == null ? void 0 : s.getData(oa); - if (!E) return null; - const g = JSON.parse(E); + const _ = (s = y.dataTransfer) == null ? void 0 : s.getData(aa); + if (!_) return null; + const g = JSON.parse(_); return !g || typeof g.rotulo != "string" || g.origem !== "visiveis" && g.origem !== "invisiveis" ? null : g; } catch { return null; } } - function l(_) { - const s = _.origem === "visiveis" ? o.value : r.value, E = s.indexOf(_.rotulo); - E >= 0 && s.splice(E, 1); + function l(y) { + const s = y.origem === "visiveis" ? o.value : r.value, _ = s.indexOf(y.rotulo); + _ >= 0 && s.splice(_, 1); } - function c(_, s, E) { - const g = _ === "visiveis" ? o.value : r.value, C = g.indexOf(s); - C >= 0 && g.splice(C, 1), E === null || E < 0 || E > g.length ? g.push(s) : g.splice(E, 0, s); + function u(y, s, _) { + const g = y === "visiveis" ? o.value : r.value, E = g.indexOf(s); + E >= 0 && g.splice(E, 1), _ === null || _ < 0 || _ > g.length ? g.push(s) : g.splice(_, 0, s); } - function m(_, s, E, g) { - n(_, { rotulo: s, origem: E, index: g }); + function b(y, s, _, g) { + n(y, { rotulo: s, origem: _, index: g }); } - function w(_, s, E) { - const g = d(_); + function k(y, s, _) { + const g = d(y); if (g) - if (l(g), c(s, g.rotulo, E), s === "visiveis") { - const C = r.value.indexOf(g.rotulo); - C >= 0 && r.value.splice(C, 1); + if (l(g), u(s, g.rotulo, _), s === "visiveis") { + const E = r.value.indexOf(g.rotulo); + E >= 0 && r.value.splice(E, 1); } else { - const C = o.value.indexOf(g.rotulo); - C >= 0 && o.value.splice(C, 1); + const E = o.value.indexOf(g.rotulo); + E >= 0 && o.value.splice(E, 1); } } - function B(_, s, E) { - const g = d(_); + function D(y, s, _) { + const g = d(y); if (g) - if (l(g), c(s, g.rotulo, null), s === "visiveis") { - const C = r.value.indexOf(g.rotulo); - C >= 0 && r.value.splice(C, 1); + if (l(g), u(s, g.rotulo, null), s === "visiveis") { + const E = r.value.indexOf(g.rotulo); + E >= 0 && r.value.splice(E, 1); } else { - const C = o.value.indexOf(g.rotulo); - C >= 0 && o.value.splice(C, 1); + const E = o.value.indexOf(g.rotulo); + E >= 0 && o.value.splice(E, 1); } } return { @@ -1871,44 +1875,44 @@ const Qo = /* @__PURE__ */ z(Ro, [["render", Ko], ["__scopeId", "data-v-5ca7a362 invisiveisLocal: r, emitFechar: f, emitSalvar: t, - onDragStart: m, - onDropItem: w, - onDropLista: B + onDragStart: b, + onDropItem: k, + onDropLista: D }; } -}), en = { +}), Qo = { class: "eli-tabela-modal-colunas__modal", role: "dialog", "aria-modal": "true", "aria-label": "Configurar colunas" -}, an = { class: "eli-tabela-modal-colunas__header" }, tn = { class: "eli-tabela-modal-colunas__conteudo" }, on = { class: "eli-tabela-modal-colunas__coluna" }, nn = ["onDragstart", "onDrop"], rn = { class: "eli-tabela-modal-colunas__item-texto" }, ln = { class: "eli-tabela-modal-colunas__coluna" }, sn = ["onDragstart", "onDrop"], un = { class: "eli-tabela-modal-colunas__item-texto" }, cn = { class: "eli-tabela-modal-colunas__footer" }; -function dn(e, a, o, r, i, f) { - return e.aberto ? (u(), y("div", { +}, xo = { class: "eli-tabela-modal-colunas__header" }, en = { class: "eli-tabela-modal-colunas__conteudo" }, an = { class: "eli-tabela-modal-colunas__coluna" }, tn = ["onDragstart", "onDrop"], on = { class: "eli-tabela-modal-colunas__item-texto" }, nn = { class: "eli-tabela-modal-colunas__coluna" }, rn = ["onDragstart", "onDrop"], ln = { class: "eli-tabela-modal-colunas__item-texto" }, sn = { class: "eli-tabela-modal-colunas__footer" }; +function un(e, a, o, r, i, f) { + return e.aberto ? (c(), $("div", { key: 0, class: "eli-tabela-modal-colunas__overlay", role: "presentation", onClick: a[9] || (a[9] = ue((...t) => e.emitFechar && e.emitFechar(...t), ["self"])) }, [ - $("div", en, [ - $("header", an, [ - a[10] || (a[10] = $("h3", { class: "eli-tabela-modal-colunas__titulo" }, "Colunas", -1)), - $("button", { + p("div", Qo, [ + p("header", xo, [ + a[10] || (a[10] = p("h3", { class: "eli-tabela-modal-colunas__titulo" }, "Colunas", -1)), + p("button", { type: "button", class: "eli-tabela-modal-colunas__fechar", "aria-label": "Fechar", onClick: a[0] || (a[0] = (...t) => e.emitFechar && e.emitFechar(...t)) }, " × ") ]), - $("div", tn, [ - $("div", on, [ - a[12] || (a[12] = $("div", { class: "eli-tabela-modal-colunas__coluna-titulo" }, "Visíveis", -1)), - $("div", { + p("div", en, [ + p("div", an, [ + a[12] || (a[12] = p("div", { class: "eli-tabela-modal-colunas__coluna-titulo" }, "Visíveis", -1)), + p("div", { class: "eli-tabela-modal-colunas__lista", onDragover: a[2] || (a[2] = ue(() => { }, ["prevent"])), onDrop: a[3] || (a[3] = (t) => e.onDropLista(t, "visiveis", null)) }, [ - (u(!0), y(re, null, fe(e.visiveisLocal, (t, n) => (u(), y("div", { + (c(!0), $(re, null, ve(e.visiveisLocal, (t, n) => (c(), $("div", { key: `vis-${t}`, class: "eli-tabela-modal-colunas__item", draggable: "true", @@ -1917,23 +1921,23 @@ function dn(e, a, o, r, i, f) { }, ["prevent"])), onDrop: (d) => e.onDropItem(d, "visiveis", n) }, [ - a[11] || (a[11] = $("span", { + a[11] || (a[11] = p("span", { class: "eli-tabela-modal-colunas__item-handle", "aria-hidden": "true" }, "⋮⋮", -1)), - $("span", rn, L(t), 1) - ], 40, nn))), 128)) + p("span", on, F(t), 1) + ], 40, tn))), 128)) ], 32) ]), - $("div", ln, [ - a[14] || (a[14] = $("div", { class: "eli-tabela-modal-colunas__coluna-titulo" }, "Invisíveis", -1)), - $("div", { + p("div", nn, [ + a[14] || (a[14] = p("div", { class: "eli-tabela-modal-colunas__coluna-titulo" }, "Invisíveis", -1)), + p("div", { class: "eli-tabela-modal-colunas__lista", onDragover: a[5] || (a[5] = ue(() => { }, ["prevent"])), onDrop: a[6] || (a[6] = (t) => e.onDropLista(t, "invisiveis", null)) }, [ - (u(!0), y(re, null, fe(e.invisiveisLocal, (t, n) => (u(), y("div", { + (c(!0), $(re, null, ve(e.invisiveisLocal, (t, n) => (c(), $("div", { key: `inv-${t}`, class: "eli-tabela-modal-colunas__item", draggable: "true", @@ -1942,32 +1946,32 @@ function dn(e, a, o, r, i, f) { }, ["prevent"])), onDrop: (d) => e.onDropItem(d, "invisiveis", n) }, [ - a[13] || (a[13] = $("span", { + a[13] || (a[13] = p("span", { class: "eli-tabela-modal-colunas__item-handle", "aria-hidden": "true" }, "⋮⋮", -1)), - $("span", un, L(t), 1) - ], 40, sn))), 128)) + p("span", ln, F(t), 1) + ], 40, rn))), 128)) ], 32) ]) ]), - $("footer", cn, [ - $("button", { + p("footer", sn, [ + p("button", { type: "button", class: "eli-tabela-modal-colunas__botao eli-tabela-modal-colunas__botao--sec", onClick: a[7] || (a[7] = (...t) => e.emitFechar && e.emitFechar(...t)) }, " Cancelar "), - $("button", { + p("button", { type: "button", class: "eli-tabela-modal-colunas__botao eli-tabela-modal-colunas__botao--prim", onClick: a[8] || (a[8] = (...t) => e.emitSalvar && e.emitSalvar(...t)) }, " Salvar ") ]) ]) - ])) : ee("", !0); + ])) : Q("", !0); } -const fn = /* @__PURE__ */ z(xo, [["render", dn], ["__scopeId", "data-v-b8f693ef"]]); -function pn(e) { +const cn = /* @__PURE__ */ L(Ko, [["render", un], ["__scopeId", "data-v-b8f693ef"]]); +function dn(e) { if (!Number.isFinite(e) || e <= 0 || e >= 1) return 0; const a = e.toString(); if (a.includes("e-")) { @@ -1977,7 +1981,7 @@ function pn(e) { const o = a.indexOf("."); return o === -1 ? 0 : a.slice(o + 1).replace(/0+$/, "").length; } -function vn(e) { +function fn(e) { const a = (e ?? "").trim().replace(/,/g, "."); if (!a) return null; const o = Number(a); @@ -1986,16 +1990,16 @@ function vn(e) { function Le(e, a) { return e == null ? "" : a === null ? String(e) : Number(e).toFixed(Math.max(0, a)).replace(/\./g, ","); } -function na(e) { +function ta(e) { return (e ?? "").replace(/\D+/g, ""); } -function mn(e) { +function vn(e) { const a = (e ?? "").replace(/[^0-9.,]+/g, ""), o = a.match(/[.,]/); if (!o) return a; const r = o[0], i = a.indexOf(r), f = a.slice(0, i).replace(/[.,]/g, ""), t = a.slice(i + 1).replace(/[.,]/g, ""); return `${f.length ? f : "0"}${r}${t}`; } -function bn(e, a) { +function pn(e, a) { if (a === null) return e; if (a <= 0) return e.replace(/[.,]/g, ""); const o = e.match(/[.,]/); @@ -2003,13 +2007,13 @@ function bn(e, a) { const r = o[0], i = e.indexOf(r), f = e.slice(0, i), t = e.slice(i + 1); return `${f}${r}${t.slice(0, a)}`; } -function hn(e) { +function mn(e) { const a = e.match(/^(\d+)[.,]$/); if (!a) return null; const o = Number(a[1]); return Number.isNaN(o) ? null : o; } -const gn = j({ +const bn = N({ name: "EliEntradaNumero", inheritAttrs: !1, props: { @@ -2032,14 +2036,14 @@ const gn = j({ blur: () => !0 }, setup(e, { attrs: a, emit: o }) { - const r = A(() => { - var c; - const l = (c = e.opcoes) == null ? void 0 : c.precisao; - return l == null ? null : pn(l); - }), i = A(() => r.value === 0), f = A(() => { + const r = S(() => { + var u; + const l = (u = e.opcoes) == null ? void 0 : u.precisao; + return l == null ? null : dn(l); + }), i = S(() => r.value === 0), f = S(() => { const l = r.value; return l !== null && l > 0; - }), t = F(""), n = F(void 0); + }), t = O(""), n = O(void 0); me( () => e.value, (l) => { @@ -2049,24 +2053,24 @@ const gn = j({ ); function d(l) { if (f.value) { - const B = r.value ?? 0, _ = na(l), s = _ ? Number(_) : 0, E = Math.pow(10, B), g = _ ? s / E : null, C = g === null ? null : g; - n.value = C, o("update:value", C), o("input", C), o("change", C), t.value = Le(C, B); + const D = r.value ?? 0, y = ta(l), s = y ? Number(y) : 0, _ = Math.pow(10, D), g = y ? s / _ : null, E = g === null ? null : g; + n.value = E, o("update:value", E), o("input", E), o("change", E), t.value = Le(E, D); return; } - const c = i.value ? na(l) : mn(l), m = i.value ? c : bn(c, r.value); - let w = null; - if (m) { - const _ = (i.value ? null : hn(m)) ?? vn(m); - w = _ === null ? null : _; + const u = i.value ? ta(l) : vn(l), b = i.value ? u : pn(u, r.value); + let k = null; + if (b) { + const y = (i.value ? null : mn(b)) ?? fn(b); + k = y === null ? null : y; } - n.value = w, o("update:value", w), o("input", w), o("change", w), t.value = Le(w, r.value); + n.value = k, o("update:value", k), o("input", k), o("change", k), t.value = Le(k, r.value); } return { attrs: a, emit: o, displayValue: t, isInteiro: i, onUpdateModelValue: d }; } -}), $n = { class: "eli-entrada__prefixo" }, yn = { class: "eli-entrada__sufixo" }; -function _n(e, a, o, r, i, f) { +}), hn = { class: "eli-entrada__prefixo" }, gn = { class: "eli-entrada__sufixo" }; +function $n(e, a, o, r, i, f) { var t, n, d, l; - return u(), W(He, Ce({ + return c(), W(He, Se({ "model-value": e.displayValue, label: (t = e.opcoes) == null ? void 0 : t.rotulo, placeholder: (n = e.opcoes) == null ? void 0 : n.placeholder, @@ -2077,24 +2081,24 @@ function _n(e, a, o, r, i, f) { "onUpdate:modelValue": e.onUpdateModelValue, onFocus: a[0] || (a[0] = () => e.emit("focus")), onBlur: a[1] || (a[1] = () => e.emit("blur")) - }), Ma({ _: 2 }, [ + }), ka({ _: 2 }, [ (d = e.opcoes) != null && d.prefixo ? { name: "prepend-inner", - fn: te(() => [ - $("span", $n, L(e.opcoes.prefixo), 1) + fn: ae(() => [ + p("span", hn, F(e.opcoes.prefixo), 1) ]), key: "0" } : void 0, (l = e.opcoes) != null && l.sufixo ? { name: "append-inner", - fn: te(() => [ - $("span", yn, L(e.opcoes.sufixo), 1) + fn: ae(() => [ + p("span", gn, F(e.opcoes.sufixo), 1) ]), key: "1" } : void 0 ]), 1040, ["model-value", "label", "placeholder", "type", "inputmode", "pattern", "onUpdate:modelValue"]); } -const ha = /* @__PURE__ */ z(gn, [["render", _n], ["__scopeId", "data-v-77cbf216"]]), En = j({ +const ma = /* @__PURE__ */ L(bn, [["render", $n], ["__scopeId", "data-v-77cbf216"]]), yn = N({ name: "EliEntradaDataHora", inheritAttrs: !1, props: { @@ -2145,7 +2149,7 @@ const ha = /* @__PURE__ */ z(gn, [["render", _n], ["__scopeId", "data-v-77cbf216 blur: () => !0 }, setup(e, { emit: a, attrs: o }) { - const r = A(() => e.opcoes ? e.opcoes : { + const r = S(() => e.opcoes ? e.opcoes : { rotulo: e.rotulo ?? "Data e hora", placeholder: e.placeholder ?? "", modo: e.modo ?? "dataHora", @@ -2158,59 +2162,59 @@ const ha = /* @__PURE__ */ z(gn, [["render", _n], ["__scopeId", "data-v-77cbf216 variante: e.variante, min: e.min, max: e.max - }), i = A( + }), i = S( () => r.value.modo ?? "dataHora" - ), f = A(() => !!e.desabilitado), t = A( + ), f = S(() => !!e.desabilitado), t = S( () => i.value === "data" ? "date" : "datetime-local" ); function n(s) { - return i.value === "data" ? Ee(s).format("YYYY-MM-DD") : Ee(s).format("YYYY-MM-DDTHH:mm"); + return i.value === "data" ? Ae(s).format("YYYY-MM-DD") : Ae(s).format("YYYY-MM-DDTHH:mm"); } function d(s) { - return i.value === "data" ? Ee(`${s}T00:00`).format() : Ee(s).format(); + return i.value === "data" ? Ae(`${s}T00:00`).format() : Ae(s).format(); } - const l = A(() => e.value !== void 0 ? e.value ?? null : e.modelValue), c = A({ + const l = S(() => e.value !== void 0 ? e.value ?? null : e.modelValue), u = S({ get: () => l.value ? n(l.value) : "", set: (s) => { - const E = s && s.length > 0 ? s : null; - if (!E) { + const _ = s && s.length > 0 ? s : null; + if (!_) { a("update:value", null), a("input", null), a("change", null), a("update:modelValue", null), a("alterar", null); return; } - const g = d(E); + const g = d(_); a("update:value", g), a("input", g), a("change", g), a("update:modelValue", g), a("alterar", g); } - }), m = A(() => { + }), b = S(() => { const s = r.value.min; if (s) return n(s); - }), w = A(() => { + }), k = S(() => { const s = r.value.max; if (s) return n(s); }); - function B() { + function D() { a("foco"), a("focus"); } - function _() { + function y() { a("desfoco"), a("blur"); } return { attrs: o, - valor: c, + valor: u, tipoInput: t, - minLocal: m, - maxLocal: w, + minLocal: b, + maxLocal: k, opcoesEfetivas: r, desabilitadoEfetivo: f, - emitCompatFocus: B, - emitCompatBlur: _ + emitCompatFocus: D, + emitCompatBlur: y }; } -}), Cn = { class: "eli-data-hora" }; -function Sn(e, a, o, r, i, f) { - return u(), y("div", Cn, [ - q(He, Ce({ +}), _n = { class: "eli-data-hora" }; +function En(e, a, o, r, i, f) { + return c(), $("div", _n, [ + q(He, Se({ modelValue: e.valor, "onUpdate:modelValue": a[0] || (a[0] = (t) => e.valor = t), type: e.tipoInput, @@ -2232,9 +2236,9 @@ function Sn(e, a, o, r, i, f) { }), null, 16, ["modelValue", "type", "label", "placeholder", "disabled", "clearable", "error", "error-messages", "hint", "persistent-hint", "density", "variant", "min", "max", "onFocus", "onBlur"]) ]); } -const ga = /* @__PURE__ */ z(En, [["render", Sn], ["__scopeId", "data-v-1bfd1be8"]]), An = j({ +const ba = /* @__PURE__ */ L(yn, [["render", En], ["__scopeId", "data-v-1bfd1be8"]]), Cn = N({ name: "EliEntradaParagrafo", - components: { VTextarea: Va }, + components: { VTextarea: Oa }, inheritAttrs: !1, props: { value: { @@ -2254,7 +2258,7 @@ const ga = /* @__PURE__ */ z(En, [["render", Sn], ["__scopeId", "data-v-1bfd1be8 blur: () => !0 }, setup(e, { attrs: a, emit: o }) { - const r = A({ + const r = S({ get: () => e.value, set: (i) => { o("update:value", i), o("input", i), o("change", i); @@ -2263,22 +2267,22 @@ const ga = /* @__PURE__ */ z(En, [["render", Sn], ["__scopeId", "data-v-1bfd1be8 return { attrs: a, emit: o, localValue: r, opcoes: e.opcoes }; } }); -function kn(e, a, o, r, i, f) { - var t, n, d, l, c, m, w, B, _, s, E, g; - return u(), W(qa, Ce({ +function An(e, a, o, r, i, f) { + var t, n, d, l, u, b, k, D, y, s, _, g; + return c(), W(Ia, Se({ modelValue: e.localValue, - "onUpdate:modelValue": a[0] || (a[0] = (C) => e.localValue = C), + "onUpdate:modelValue": a[0] || (a[0] = (E) => e.localValue = E), label: (t = e.opcoes) == null ? void 0 : t.rotulo, placeholder: (n = e.opcoes) == null ? void 0 : n.placeholder, rows: ((d = e.opcoes) == null ? void 0 : d.linhas) ?? 4, counter: (l = e.opcoes) == null ? void 0 : l.limiteCaracteres, - maxlength: (c = e.opcoes) == null ? void 0 : c.limiteCaracteres, - clearable: !!((m = e.opcoes) != null && m.limpavel), - error: !!((w = e.opcoes) != null && w.erro), - "error-messages": (B = e.opcoes) == null ? void 0 : B.mensagensErro, - hint: (_ = e.opcoes) == null ? void 0 : _.dica, + maxlength: (u = e.opcoes) == null ? void 0 : u.limiteCaracteres, + clearable: !!((b = e.opcoes) != null && b.limpavel), + error: !!((k = e.opcoes) != null && k.erro), + "error-messages": (D = e.opcoes) == null ? void 0 : D.mensagensErro, + hint: (y = e.opcoes) == null ? void 0 : y.dica, "persistent-hint": !!((s = e.opcoes) != null && s.dicaPersistente), - density: ((E = e.opcoes) == null ? void 0 : E.densidade) ?? "comfortable", + density: ((_ = e.opcoes) == null ? void 0 : _.densidade) ?? "comfortable", variant: ((g = e.opcoes) == null ? void 0 : g.variante) ?? "outlined", "auto-grow": "" }, e.attrs, { @@ -2286,9 +2290,9 @@ function kn(e, a, o, r, i, f) { onBlur: a[2] || (a[2] = () => e.emit("blur")) }), null, 16, ["modelValue", "label", "placeholder", "rows", "counter", "maxlength", "clearable", "error", "error-messages", "hint", "persistent-hint", "density", "variant"]); } -const Dn = /* @__PURE__ */ z(An, [["render", kn]]), Mn = j({ +const Sn = /* @__PURE__ */ L(Cn, [["render", An]]), kn = N({ name: "EliEntradaSelecao", - components: { VSelect: Ia }, + components: { VSelect: Fa }, inheritAttrs: !1, props: { value: { @@ -2308,7 +2312,7 @@ const Dn = /* @__PURE__ */ z(An, [["render", kn]]), Mn = j({ blur: () => !0 }, setup(e, { attrs: a, emit: o }) { - const r = F([]), i = F(!1), f = A({ + const r = O([]), i = O(!1), f = S({ get: () => e.value, set: (n) => { o("update:value", n), o("input", n), o("change", n); @@ -2328,7 +2332,7 @@ const Dn = /* @__PURE__ */ z(An, [["render", kn]]), Mn = j({ () => { t(); } - ), sa(() => { + ), la(() => { t(); }), me( r, @@ -2339,9 +2343,9 @@ const Dn = /* @__PURE__ */ z(An, [["render", kn]]), Mn = j({ ), { attrs: a, emit: o, localValue: f, opcoes: e.opcoes, itens: r, carregando: i }; } }); -function Bn(e, a, o, r, i, f) { - var t, n, d, l, c, m, w, B, _; - return u(), W(La, Ce({ +function Dn(e, a, o, r, i, f) { + var t, n, d, l, u, b, k, D, y; + return c(), W(qa, Se({ modelValue: e.localValue, "onUpdate:modelValue": a[0] || (a[0] = (s) => e.localValue = s), label: (t = e.opcoes) == null ? void 0 : t.rotulo, @@ -2354,26 +2358,26 @@ function Bn(e, a, o, r, i, f) { "menu-props": { maxHeight: 320 }, clearable: !!((d = e.opcoes) != null && d.limpavel), error: !!((l = e.opcoes) != null && l.erro), - "error-messages": (c = e.opcoes) == null ? void 0 : c.mensagensErro, - hint: (m = e.opcoes) == null ? void 0 : m.dica, - "persistent-hint": !!((w = e.opcoes) != null && w.dicaPersistente), - density: ((B = e.opcoes) == null ? void 0 : B.densidade) ?? "comfortable", - variant: ((_ = e.opcoes) == null ? void 0 : _.variante) ?? "outlined" + "error-messages": (u = e.opcoes) == null ? void 0 : u.mensagensErro, + hint: (b = e.opcoes) == null ? void 0 : b.dica, + "persistent-hint": !!((k = e.opcoes) != null && k.dicaPersistente), + density: ((D = e.opcoes) == null ? void 0 : D.densidade) ?? "comfortable", + variant: ((y = e.opcoes) == null ? void 0 : y.variante) ?? "outlined" }, e.attrs, { onFocus: a[1] || (a[1] = () => e.emit("focus")), onBlur: a[2] || (a[2] = () => e.emit("blur")) }), null, 16, ["modelValue", "label", "placeholder", "items", "loading", "disabled", "clearable", "error", "error-messages", "hint", "persistent-hint", "density", "variant"]); } -const Tn = /* @__PURE__ */ z(Mn, [["render", Bn]]); -function wn(e) { +const Mn = /* @__PURE__ */ L(kn, [["render", Dn]]); +function Bn(e) { return e === "texto" || e === "numero" || e === "dataHora"; } -function Pn(e) { +function Tn(e) { var o, r; const a = (r = (o = e == null ? void 0 : e.entrada) == null ? void 0 : o[1]) == null ? void 0 : r.rotulo; return String(a || ((e == null ? void 0 : e.coluna) ?? "Filtro")); } -const On = j({ +const wn = N({ name: "EliTabelaModalFiltroAvancado", props: { aberto: { type: Boolean, required: !0 }, @@ -2392,13 +2396,13 @@ const On = j({ salvar: (e) => !0 }, setup(e, { emit: a }) { - const o = F([]), r = F(""), i = A(() => (e.filtrosBase ?? []).map((s) => String(s.coluna))), f = A(() => { - const s = new Set(o.value.map((E) => String(E.coluna))); - return (e.filtrosBase ?? []).filter((E) => !s.has(String(E.coluna))); + const o = O([]), r = O(""), i = S(() => (e.filtrosBase ?? []).map((s) => String(s.coluna))), f = S(() => { + const s = new Set(o.value.map((_) => String(_.coluna))); + return (e.filtrosBase ?? []).filter((_) => !s.has(String(_.coluna))); }); function t(s) { - const E = s == null ? void 0 : s[0]; - return E === "numero" ? ha : E === "dataHora" ? ga : Ye; + const _ = s == null ? void 0 : s[0]; + return _ === "numero" ? ma : _ === "dataHora" ? ba : Ye; } function n(s) { return (s == null ? void 0 : s[1]) ?? { rotulo: "" }; @@ -2408,18 +2412,18 @@ const On = j({ } function l() { var g; - const s = e.filtrosBase ?? [], E = Array.isArray(e.modelo) ? e.modelo : []; - o.value = E.map((C) => { - const Z = s.find((H) => String(H.coluna) === String(C.coluna)) ?? s[0], le = (Z == null ? void 0 : Z.entrada) ?? C.entrada, Y = (Z == null ? void 0 : Z.coluna) ?? C.coluna, X = String((Z == null ? void 0 : Z.operador) ?? "="), ie = C.valor ?? d(le); + const s = e.filtrosBase ?? [], _ = Array.isArray(e.modelo) ? e.modelo : []; + o.value = _.map((E) => { + const Z = s.find((j) => String(j.coluna) === String(E.coluna)) ?? s[0], oe = (Z == null ? void 0 : Z.entrada) ?? E.entrada, Y = (Z == null ? void 0 : Z.coluna) ?? E.coluna, X = String((Z == null ? void 0 : Z.operador) ?? "="), le = E.valor ?? d(oe); return { coluna: Y, operador: X, - entrada: le, - valor: ie + entrada: oe, + valor: le }; }); - for (const C of o.value) - i.value.includes(String(C.coluna)) && (C.operador = String(((g = s.find((Z) => String(Z.coluna) === String(C.coluna))) == null ? void 0 : g.operador) ?? "="), C.entrada && !wn(C.entrada[0]) && (C.entrada = ["texto", { rotulo: "Valor" }])); + for (const E of o.value) + i.value.includes(String(E.coluna)) && (E.operador = String(((g = s.find((Z) => String(Z.coluna) === String(E.coluna))) == null ? void 0 : g.operador) ?? "="), E.entrada && !Bn(E.entrada[0]) && (E.entrada = ["texto", { rotulo: "Valor" }])); } me( () => [e.aberto, e.filtrosBase, e.modelo], @@ -2428,26 +2432,26 @@ const On = j({ }, { deep: !0, immediate: !0 } ); - function c() { + function u() { if (!r.value) return; - const s = (e.filtrosBase ?? []).find((E) => String(E.coluna) === String(r.value)); - s && (o.value.some((E) => String(E.coluna) === String(s.coluna)) || (o.value.push({ + const s = (e.filtrosBase ?? []).find((_) => String(_.coluna) === String(r.value)); + s && (o.value.some((_) => String(_.coluna) === String(s.coluna)) || (o.value.push({ coluna: s.coluna, entrada: s.entrada, operador: String(s.operador ?? "="), valor: d(s.entrada) }), r.value = "")); } - function m(s) { + function b(s) { o.value.splice(s, 1); } - function w() { + function k() { a("fechar"); } - function B() { + function D() { a("limpar"); } - function _() { + function y() { a( "salvar", o.value.map((s) => ({ @@ -2462,140 +2466,140 @@ const On = j({ colunaParaAdicionar: r, componenteEntrada: t, opcoesEntrada: n, - adicionar: c, - remover: m, + adicionar: u, + remover: b, // exibimos operador fixo só como texto - emitFechar: w, - emitSalvar: _, - emitLimpar: B, - rotuloDoFiltro: Pn + emitFechar: k, + emitSalvar: y, + emitLimpar: D, + rotuloDoFiltro: Tn }; } -}), Fn = { +}), Pn = { class: "eli-tabela-modal-filtro__modal", role: "dialog", "aria-modal": "true", "aria-label": "Filtro avançado" -}, Vn = { class: "eli-tabela-modal-filtro__header" }, In = { class: "eli-tabela-modal-filtro__conteudo" }, Nn = { +}, On = { class: "eli-tabela-modal-filtro__header" }, Fn = { class: "eli-tabela-modal-filtro__conteudo" }, Vn = { key: 0, class: "eli-tabela-modal-filtro__vazio" -}, qn = { +}, In = { key: 1, class: "eli-tabela-modal-filtro__lista" -}, Ln = { class: "eli-tabela-modal-filtro__entrada" }, jn = ["onClick"], zn = { class: "eli-tabela-modal-filtro__acoes" }, Hn = ["disabled"], Un = ["value"], Yn = ["disabled"], Rn = { class: "eli-tabela-modal-filtro__footer" }; -function Jn(e, a, o, r, i, f) { - return e.aberto ? (u(), y("div", { +}, qn = { class: "eli-tabela-modal-filtro__entrada" }, Nn = ["onClick"], Ln = { class: "eli-tabela-modal-filtro__acoes" }, jn = ["disabled"], zn = ["value"], Hn = ["disabled"], Un = { class: "eli-tabela-modal-filtro__footer" }; +function Yn(e, a, o, r, i, f) { + return e.aberto ? (c(), $("div", { key: 0, class: "eli-tabela-modal-filtro__overlay", role: "presentation", onClick: a[6] || (a[6] = ue((...t) => e.emitFechar && e.emitFechar(...t), ["self"])) }, [ - $("div", Fn, [ - $("header", Vn, [ - a[7] || (a[7] = $("h3", { class: "eli-tabela-modal-filtro__titulo" }, "Filtro avançado", -1)), - $("button", { + p("div", Pn, [ + p("header", On, [ + a[7] || (a[7] = p("h3", { class: "eli-tabela-modal-filtro__titulo" }, "Filtro avançado", -1)), + p("button", { type: "button", class: "eli-tabela-modal-filtro__fechar", "aria-label": "Fechar", onClick: a[0] || (a[0] = (...t) => e.emitFechar && e.emitFechar(...t)) }, " × ") ]), - $("div", In, [ - e.filtrosBase.length ? (u(), y("div", qn, [ - (u(!0), y(re, null, fe(e.linhas, (t, n) => (u(), y("div", { + p("div", Fn, [ + e.filtrosBase.length ? (c(), $("div", In, [ + (c(!0), $(re, null, ve(e.linhas, (t, n) => (c(), $("div", { key: String(t.coluna), class: "eli-tabela-modal-filtro__linha" }, [ - $("div", Ln, [ - (u(), W(Me(e.componenteEntrada(t.entrada)), { + p("div", qn, [ + (c(), W(Te(e.componenteEntrada(t.entrada)), { value: t.valor, "onUpdate:value": (d) => t.valor = d, opcoes: e.opcoesEntrada(t.entrada), density: "compact" }, null, 40, ["value", "onUpdate:value", "opcoes"])) ]), - $("button", { + p("button", { type: "button", class: "eli-tabela-modal-filtro__remover", title: "Remover", "aria-label": "Remover", onClick: (d) => e.remover(n) - }, " × ", 8, jn) + }, " × ", 8, Nn) ]))), 128)) - ])) : (u(), y("div", Nn, " Nenhum filtro configurado na tabela. ")), - $("div", zn, [ - ia($("select", { + ])) : (c(), $("div", Vn, " Nenhum filtro configurado na tabela. ")), + p("div", Ln, [ + ra(p("select", { "onUpdate:modelValue": a[1] || (a[1] = (t) => e.colunaParaAdicionar = t), class: "eli-tabela-modal-filtro__select", disabled: !e.opcoesParaAdicionar.length }, [ - a[8] || (a[8] = $("option", { + a[8] || (a[8] = p("option", { disabled: "", value: "" }, "Selecione um filtro…", -1)), - (u(!0), y(re, null, fe(e.opcoesParaAdicionar, (t) => (u(), y("option", { + (c(!0), $(re, null, ve(e.opcoesParaAdicionar, (t) => (c(), $("option", { key: String(t.coluna), value: String(t.coluna) - }, L(e.rotuloDoFiltro(t)), 9, Un))), 128)) - ], 8, Hn), [ - [Ba, e.colunaParaAdicionar] + }, F(e.rotuloDoFiltro(t)), 9, zn))), 128)) + ], 8, jn), [ + [Da, e.colunaParaAdicionar] ]), - $("button", { + p("button", { type: "button", class: "eli-tabela-modal-filtro__botao", onClick: a[2] || (a[2] = (...t) => e.adicionar && e.adicionar(...t)), disabled: !e.colunaParaAdicionar - }, " Adicionar ", 8, Yn) + }, " Adicionar ", 8, Hn) ]) ]), - $("footer", Rn, [ - $("button", { + p("footer", Un, [ + p("button", { type: "button", class: "eli-tabela-modal-filtro__botao eli-tabela-modal-filtro__botao--sec", onClick: a[3] || (a[3] = (...t) => e.emitLimpar && e.emitLimpar(...t)) }, " Limpar "), - $("button", { + p("button", { type: "button", class: "eli-tabela-modal-filtro__botao eli-tabela-modal-filtro__botao--sec", onClick: a[4] || (a[4] = (...t) => e.emitFechar && e.emitFechar(...t)) }, " Cancelar "), - $("button", { + p("button", { type: "button", class: "eli-tabela-modal-filtro__botao eli-tabela-modal-filtro__botao--prim", onClick: a[5] || (a[5] = (...t) => e.emitSalvar && e.emitSalvar(...t)) }, " Aplicar ") ]) ]) - ])) : ee("", !0); + ])) : Q("", !0); } -const Wn = /* @__PURE__ */ z(On, [["render", Jn], ["__scopeId", "data-v-ae32fe4c"]]), Zn = "eli:tabela"; -function $a(e) { - return `${Zn}:${e}:colunas`; +const Rn = /* @__PURE__ */ L(wn, [["render", Yn], ["__scopeId", "data-v-cdc3f41a"]]), Jn = "eli:tabela"; +function ha(e) { + return `${Jn}:${e}:colunas`; } -function ya(e) { +function ga(e) { if (!e || typeof e != "object") return { visiveis: [], invisiveis: [] }; const a = e, o = Array.isArray(a.visiveis) ? a.visiveis.filter((i) => typeof i == "string") : [], r = Array.isArray(a.invisiveis) ? a.invisiveis.filter((i) => typeof i == "string") : []; return { visiveis: o, invisiveis: r }; } -function ra(e) { +function oa(e) { try { - const a = window.localStorage.getItem($a(e)); - return a ? ya(JSON.parse(a)) : { visiveis: [], invisiveis: [] }; + const a = window.localStorage.getItem(ha(e)); + return a ? ga(JSON.parse(a)) : { visiveis: [], invisiveis: [] }; } catch { return { visiveis: [], invisiveis: [] }; } } -function Xn(e, a) { +function Wn(e, a) { try { - window.localStorage.setItem($a(e), JSON.stringify(ya(a))); + window.localStorage.setItem(ha(e), JSON.stringify(ga(a))); } catch { } } function Re(e) { return `eli_tabela:${e}:filtro_avancado`; } -function la(e) { +function na(e) { try { const a = localStorage.getItem(Re(e)); if (!a) return []; @@ -2605,31 +2609,31 @@ function la(e) { return []; } } -function Gn(e, a) { +function Zn(e, a) { try { localStorage.setItem(Re(e), JSON.stringify(a ?? [])); } catch { } } -function Kn(e) { +function Xn(e) { try { localStorage.removeItem(Re(e)); } catch { } } -const Qn = j({ +const Gn = N({ name: "EliTabela", inheritAttrs: !1, components: { - EliTabelaCabecalho: kt, - EliTabelaEstados: Ot, - EliTabelaDebug: Nt, - EliTabelaHead: Wt, - EliTabelaBody: qo, - EliTabelaMenuAcoes: Yo, - EliTabelaPaginacao: Qo, - EliTabelaModalColunas: fn, - EliTabelaModalFiltroAvancado: Wn + EliTabelaCabecalho: At, + EliTabelaEstados: wt, + EliTabelaDebug: Vt, + EliTabelaHead: Rt, + EliTabelaBody: Io, + EliTabelaMenuAcoes: Ho, + EliTabelaPaginacao: Go, + EliTabelaModalColunas: cn, + EliTabelaModalFiltroAvancado: Rn }, props: { /** Configuração principal da tabela (colunas, consulta e ações) */ @@ -2639,223 +2643,182 @@ const Qn = j({ } }, setup(e) { - const o = F(!1), r = F(null), i = F([]), f = F(0), t = F([]), n = F(null), d = F(null), l = F({ top: 0, left: 0 }), c = F(""), m = F(1), w = F(null), B = F("asc"), _ = F(!1), s = F(la(e.tabela.nome)); - function E() { - _.value = !0; + const o = O(!1), r = O(null), i = O([]), f = O(0), t = O([]), n = O(null), d = O(null), l = O({ top: 0, left: 0 }), u = O(""), b = O(1), k = O(null), D = O("asc"), y = O(!1), s = O(na(e.tabela.nome)); + function _() { + y.value = !0; } function g() { - _.value = !1; + y.value = !1; } - function C() { - s.value = [], Kn(e.tabela.nome), _.value = !1, m.value !== 1 && (m.value = 1); + function E() { + s.value = [], Xn(e.tabela.nome), y.value = !1, u.value = "", b.value !== 1 ? b.value = 1 : $e(); } - function Z(b) { - s.value = b ?? [], Gn(e.tabela.nome, b ?? []), _.value = !1, m.value !== 1 && (m.value = 1); + function Z(A) { + s.value = A ?? [], Zn(e.tabela.nome, A ?? []), y.value = !1, u.value = "", b.value !== 1 ? b.value = 1 : $e(); } - const le = A(() => { - const b = e.tabela.filtroAvancado ?? []; - return (s.value ?? []).filter((k) => k && k.coluna !== void 0).map((k) => { - const P = b.find((V) => String(V.coluna) === String(k.coluna)); - return P ? { - coluna: String(P.coluna), - operador: P.operador, - valor: k.valor + const oe = S(() => { + const A = e.tabela.filtroAvancado ?? []; + return (s.value ?? []).filter((P) => P && P.coluna !== void 0).map((P) => { + const z = A.find((H) => String(H.coluna) === String(P.coluna)); + return z ? { + coluna: String(z.coluna), + operador: z.operador, + valor: P.valor } : null; }).filter(Boolean); - }), Y = A(() => e.tabela), X = A(() => !!e.tabela.mostrarCaixaDeBusca), ie = A(() => e.tabela.acoesTabela ?? []), H = A(() => ie.value.length > 0), be = F(!1), I = F( - ra(e.tabela.nome) - ), O = F({}), Se = A(() => e.tabela.colunas.map((b) => b.rotulo)), Pe = A(() => { - var ce, de; - const b = e.tabela.colunas, P = (((ce = I.value.visiveis) == null ? void 0 : ce.length) ?? 0) > 0 || (((de = I.value.invisiveis) == null ? void 0 : de.length) ?? 0) > 0 ? I.value.invisiveis ?? [] : b.filter((U) => U.visivel === !1).map((U) => U.rotulo), V = new Set(P), ae = b.filter((U) => V.has(U.rotulo)), ne = P, ve = /* @__PURE__ */ new Map(); - for (const U of ae) - ve.has(U.rotulo) || ve.set(U.rotulo, U); - const se = []; - for (const U of ne) { - const he = ve.get(U); - he && se.push(he); + }), Y = S(() => e.tabela), X = S(() => !!e.tabela.mostrarCaixaDeBusca), le = S(() => e.tabela.acoesTabela ?? []), j = S(() => le.value.length > 0), be = O(!1), V = O( + oa(e.tabela.nome) + ), w = O({}), ke = S(() => e.tabela.colunas.map((A) => A.rotulo)), Pe = S(() => { + var ne, se; + const A = e.tabela.colunas, z = (((ne = V.value.visiveis) == null ? void 0 : ne.length) ?? 0) > 0 || (((se = V.value.invisiveis) == null ? void 0 : se.length) ?? 0) > 0 ? V.value.invisiveis ?? [] : A.filter((J) => J.visivel === !1).map((J) => J.rotulo), H = new Set(z), fe = A.filter((J) => H.has(J.rotulo)), ce = z, ye = /* @__PURE__ */ new Map(); + for (const J of fe) + ye.has(J.rotulo) || ye.set(J.rotulo, J); + const ee = []; + for (const J of ce) { + const pe = ye.get(J); + pe && ee.push(pe); } - for (const U of ae) - se.includes(U) || se.push(U); - return se; - }), D = A(() => Pe.value.length > 0), h = A(() => { - var U, he; - const b = e.tabela.colunas, k = Se.value, P = (((U = I.value.visiveis) == null ? void 0 : U.length) ?? 0) > 0 || (((he = I.value.invisiveis) == null ? void 0 : he.length) ?? 0) > 0, V = P ? I.value.invisiveis ?? [] : e.tabela.colunas.filter((J) => J.visivel === !1).map((J) => J.rotulo), ae = new Set(V), ne = k.filter((J) => !ae.has(J)), ve = new Set(ne), se = P ? I.value.visiveis ?? [] : [], ce = []; - for (const J of se) - ve.has(J) && ce.push(J); - for (const J of ne) - ce.includes(J) || ce.push(J); - const de = /* @__PURE__ */ new Map(); - for (const J of b) - de.has(J.rotulo) || de.set(J.rotulo, J); - return ce.map((J) => de.get(J)).filter(Boolean); + for (const J of fe) + ee.includes(J) || ee.push(J); + return ee; + }), M = S(() => Pe.value.length > 0), h = S(() => { + var J, pe; + const A = e.tabela.colunas, P = ke.value, z = (((J = V.value.visiveis) == null ? void 0 : J.length) ?? 0) > 0 || (((pe = V.value.invisiveis) == null ? void 0 : pe.length) ?? 0) > 0, H = z ? V.value.invisiveis ?? [] : e.tabela.colunas.filter((U) => U.visivel === !1).map((U) => U.rotulo), fe = new Set(H), ce = P.filter((U) => !fe.has(U)), ye = new Set(ce), ee = z ? V.value.visiveis ?? [] : [], ne = []; + for (const U of ee) + ye.has(U) && ne.push(U); + for (const U of ce) + ne.includes(U) || ne.push(U); + const se = /* @__PURE__ */ new Map(); + for (const U of A) + se.has(U.rotulo) || se.set(U.rotulo, U); + return ne.map((U) => se.get(U)).filter(Boolean); }); - function p() { + function v() { be.value = !0; } - function S() { + function C() { be.value = !1; } - function v(b) { - I.value = b, Xn(e.tabela.nome, b), be.value = !1, O.value = {}; + function m(A) { + V.value = A, Wn(e.tabela.nome, A), be.value = !1, w.value = {}; } - function T(b) { - const k = !!O.value[b]; - O.value = { - ...O.value, - [b]: !k + function T(A) { + const P = !!w.value[A]; + w.value = { + ...w.value, + [A]: !P }; } - const M = A(() => { - const b = e.tabela.registros_por_consulta; - return typeof b == "number" && b > 0 ? Math.floor(b) : 10; - }); - function N(b) { - const k = (c.value ?? "").trim().toLowerCase(); - return k ? b.filter((P) => JSON.stringify(P).toLowerCase().includes(k)) : b; - } - function R(b, k, P) { - switch (b) { - case "=": - return k == P; - case "!=": - return k != P; - case ">": - return Number(k) > Number(P); - case ">=": - return Number(k) >= Number(P); - case "<": - return Number(k) < Number(P); - case "<=": - return Number(k) <= Number(P); - case "like": { - const V = String(k ?? "").toLowerCase(), ae = String(P ?? "").toLowerCase(); - return V.includes(ae); - } - case "in": - return (Array.isArray(P) ? P : String(P ?? "").split(",").map((ae) => ae.trim()).filter(Boolean)).includes(String(k)); - case "isNull": - return k == null || k === ""; - default: - return !0; - } - } - function G(b) { - const k = le.value; - return k.length ? b.filter((P) => k.every((V) => { - const ae = P == null ? void 0 : P[V.coluna]; - return R(String(V.operador), ae, V.valor); - })) : b; - } - const x = A(() => { - const b = i.value ?? []; - return G(N(b)); - }), oe = A(() => x.value.length), ge = A(() => { - const b = M.value; - if (!b || b <= 0) return 1; - const k = oe.value; - return k ? Math.max(1, Math.ceil(k / b)) : 1; - }), $e = A(() => { - const b = Math.max(1, M.value), k = (m.value - 1) * b; - return x.value.slice(k, k + b); - }), Ae = A(() => (e.tabela.acoesLinha ?? []).length > 0), ye = A(() => (e.tabela.filtroAvancado ?? []).length > 0); - let K = 0; - function pe(b) { - var se, ce, de, U, he, J; - const k = b.getBoundingClientRect(), P = 8, V = ((de = (ce = (se = d.value) == null ? void 0 : se.menuEl) == null ? void 0 : ce.value) == null ? void 0 : de.offsetHeight) ?? 0, ae = ((J = (he = (U = d.value) == null ? void 0 : U.menuEl) == null ? void 0 : he.value) == null ? void 0 : J.offsetWidth) ?? 180; - let ne = k.bottom + P; - const ve = k.right - ae; - V && ne + V > window.innerHeight - P && (ne = k.top - P - V), l.value = { - top: Math.max(P, Math.round(ne)), - left: Math.max(P, Math.round(ve)) + const B = S(() => { + const A = e.tabela.registros_por_consulta; + return typeof A == "number" && A > 0 ? Math.floor(A) : 10; + }), I = S(() => { + const A = B.value; + if (!A || A <= 0) return 1; + const P = f.value ?? 0; + return P ? Math.max(1, Math.ceil(P / A)) : 1; + }), R = S(() => i.value ?? []), G = S(() => f.value ?? 0), x = S(() => (e.tabela.acoesLinha ?? []).length > 0), ie = S(() => (e.tabela.filtroAvancado ?? []).length > 0); + let de = 0; + function he(A) { + var ee, ne, se, J, pe, U; + const P = A.getBoundingClientRect(), z = 8, H = ((se = (ne = (ee = d.value) == null ? void 0 : ee.menuEl) == null ? void 0 : ne.value) == null ? void 0 : se.offsetHeight) ?? 0, fe = ((U = (pe = (J = d.value) == null ? void 0 : J.menuEl) == null ? void 0 : pe.value) == null ? void 0 : U.offsetWidth) ?? 180; + let ce = P.bottom + z; + const ye = P.right - fe; + H && ce + H > window.innerHeight - z && (ce = P.top - z - H), l.value = { + top: Math.max(z, Math.round(ce)), + left: Math.max(z, Math.round(ye)) }; } - function _e(b) { - var P, V; + function Ee(A) { + var z, H; if (n.value === null) return; - const k = b.target; - (V = (P = d.value) == null ? void 0 : P.menuEl) != null && V.value && d.value.menuEl.value.contains(k) || (n.value = null); + const P = A.target; + (H = (z = d.value) == null ? void 0 : z.menuEl) != null && H.value && d.value.menuEl.value.contains(P) || (n.value = null); } - function Be(b) { - if (b) { - if (w.value === b) { - B.value = B.value === "asc" ? "desc" : "asc", ke(); + function _e(A) { + if (A) { + if (k.value === A) { + D.value = D.value === "asc" ? "desc" : "asc", $e(); return; } - w.value = b, B.value = "asc", m.value !== 1 ? m.value = 1 : ke(); + k.value = A, D.value = "asc", b.value !== 1 ? b.value = 1 : $e(); } } - function _a(b) { - c.value !== b && (c.value = b, m.value !== 1 ? m.value = 1 : ke()); + function te(A) { + u.value !== A && (u.value = A, b.value !== 1 ? b.value = 1 : $e()); } - function Ea(b) { - const k = Math.min(Math.max(1, b), ge.value); - k !== m.value && (m.value = k); + function ge(A) { + const P = Math.min(Math.max(1, A), I.value); + P !== b.value && (b.value = P); } - function Je(b) { - const k = e.tabela.acoesLinha ?? [], P = t.value[b] ?? []; - return k.map((V, ae) => { - const ne = V.exibir === void 0 ? !0 : typeof V.exibir == "boolean" ? V.exibir : !1; + function Ce(A) { + const P = e.tabela.acoesLinha ?? [], z = t.value[A] ?? []; + return P.map((H, fe) => { + const ce = H.exibir === void 0 ? !0 : typeof H.exibir == "boolean" ? H.exibir : !1; return { - acao: V, - indice: ae, - visivel: P[ae] ?? ne + acao: H, + indice: fe, + visivel: z[fe] ?? ce }; - }).filter((V) => V.visivel); + }).filter((H) => H.visivel); } - function We(b) { - return Je(b).length > 0; + function De(A) { + return Ce(A).length > 0; } - function Ca(b, k) { - if (!We(b)) return; - if (n.value === b) { + function $a(A, P) { + if (!De(A)) return; + if (n.value === A) { n.value = null; return; } - n.value = b; - const P = (k == null ? void 0 : k.currentTarget) ?? null; - P && (pe(P), requestAnimationFrame(() => pe(P))); + n.value = A; + const z = (P == null ? void 0 : P.currentTarget) ?? null; + z && (he(z), requestAnimationFrame(() => he(z))); } - async function ke() { - var ae; - const b = ++K; - o.value = !0, r.value = null, t.value = [], n.value = null, O.value = {}; - const k = Math.max(1, M.value), V = { - offSet: 0, - limit: 999999 - }; - w.value && (V.coluna_ordem = w.value, V.direcao_ordem = B.value); + async function $e() { + var ce, ye; + const A = ++de; + o.value = !0, r.value = null, t.value = [], n.value = null, w.value = {}; + const P = Math.max(1, B.value), H = { + offSet: (b.value - 1) * P, + limit: P + }, fe = (u.value ?? "").trim(); + if (fe) + H.texto_busca = fe; + else { + const ee = oe.value; + ee.length && (H.filtros = ee); + } + k.value && (H.coluna_ordem = k.value, H.direcao_ordem = D.value); try { - const ne = e.tabela, ve = await ne.consulta(V); - if (b !== K) return; - if (ve.cod !== va.sucesso) { - i.value = [], f.value = 0, r.value = ve.mensagem; + const ee = e.tabela, ne = await ee.consulta(H); + if (A !== de) return; + if (ne.cod !== fa.sucesso) { + i.value = [], f.value = 0, r.value = ne.mensagem; return; } - const se = ((ae = ve.valor) == null ? void 0 : ae.valores) ?? [], ce = se.length; - i.value = se, f.value = ce; - const de = Math.max(1, Math.ceil((oe.value || 0) / k)); - if (m.value > de) { - m.value = de; - return; - } - const U = ne.acoesLinha ?? []; + const se = ((ce = ne.valor) == null ? void 0 : ce.valores) ?? [], J = ((ye = ne.valor) == null ? void 0 : ye.quantidade) ?? se.length; + i.value = se, f.value = Number(J) || 0; + const pe = Math.max(1, Math.ceil((f.value || 0) / P)); + b.value > pe && (b.value = pe); + const U = ee.acoesLinha ?? []; if (!U.length) { t.value = []; return; } - const he = se.map( + const ya = se.map( () => U.map((Oe) => Oe.exibir === void 0 ? !0 : typeof Oe.exibir == "boolean" ? Oe.exibir : !1) ); - t.value = he; - const J = await Promise.all( + t.value = ya; + const _a = await Promise.all( se.map( async (Oe) => Promise.all( U.map(async (Ve) => { if (Ve.exibir === void 0) return !0; if (typeof Ve.exibir == "boolean") return Ve.exibir; try { - const Sa = Ve.exibir(Oe); - return !!await Promise.resolve(Sa); + const Ea = Ve.exibir(Oe); + return !!await Promise.resolve(Ea); } catch { return !1; } @@ -2863,36 +2826,37 @@ const Qn = j({ ) ) ); - b === K && (t.value = J); - } catch (ne) { - if (b !== K) return; - i.value = [], f.value = 0, r.value = ne instanceof Error ? ne.message : "Erro ao carregar dados."; + A === de && (t.value = _a); + } catch (ee) { + if (A !== de) return; + i.value = [], f.value = 0, r.value = ee instanceof Error ? ee.message : "Erro ao carregar dados."; } finally { - b === K && (o.value = !1); + A === de && (o.value = !1); } } - return sa(() => { - document.addEventListener("click", _e), ke(); - }), Ta(() => { - document.removeEventListener("click", _e); + return la(() => { + document.addEventListener("click", Ee), $e(); + }), Ma(() => { + document.removeEventListener("click", Ee); }), me( () => e.tabela.mostrarCaixaDeBusca, - (b) => { - !b && c.value && (c.value = "", m.value !== 1 ? m.value = 1 : ke()); + (A) => { + !A && u.value && (u.value = "", b.value !== 1 ? b.value = 1 : $e()); } - ), me(m, (b, k) => { + ), me(b, (A, P) => { + A !== P && $e(); }), me( () => e.tabela, () => { - n.value = null, w.value = null, B.value = "asc", c.value = "", be.value = !1, _.value = !1, I.value = ra(e.tabela.nome), s.value = la(e.tabela.nome), O.value = {}, m.value !== 1 ? m.value = 1 : ke(); + n.value = null, k.value = null, D.value = "asc", u.value = "", be.value = !1, y.value = !1, V.value = oa(e.tabela.nome), s.value = na(e.tabela.nome), w.value = {}, b.value !== 1 ? b.value = 1 : $e(); } ), me( () => e.tabela.registros_por_consulta, () => { - m.value !== 1 ? m.value = 1 : ke(); + b.value !== 1 ? b.value = 1 : $e(); } ), me(i, () => { - n.value = null, O.value = {}; + n.value = null, w.value = {}; }), { // state isDev: !1, @@ -2900,66 +2864,77 @@ const Qn = j({ carregando: o, erro: r, linhas: i, - linhasPaginadas: $e, - quantidadeFiltrada: oe, + linhasPaginadas: R, + filtrosAvancadosAtivos: oe, + quantidadeFiltrada: G, quantidade: f, menuAberto: n, - valorBusca: c, - paginaAtual: m, - colunaOrdenacao: w, - direcaoOrdenacao: B, - totalPaginas: ge, + valorBusca: u, + paginaAtual: b, + colunaOrdenacao: k, + direcaoOrdenacao: D, + totalPaginas: I, + registrosPorConsulta: B, // computed exibirBusca: X, - exibirFiltroAvancado: ye, - acoesCabecalho: ie, - temAcoesCabecalho: H, - temAcoes: Ae, + exibirFiltroAvancado: ie, + acoesCabecalho: le, + temAcoesCabecalho: j, + temAcoes: x, colunasEfetivas: h, - rotulosColunas: Se, + rotulosColunas: ke, modalColunasAberto: be, - configColunas: I, - temColunasInvisiveis: D, + configColunas: V, + temColunasInvisiveis: M, colunasInvisiveisEfetivas: Pe, - linhasExpandidas: O, - abrirModalColunas: p, - abrirModalFiltro: E, - fecharModalColunas: S, - salvarModalColunas: v, - modalFiltroAberto: _, + linhasExpandidas: w, + abrirModalColunas: v, + abrirModalFiltro: _, + fecharModalColunas: C, + salvarModalColunas: m, + modalFiltroAberto: y, filtrosUi: s, salvarFiltrosAvancados: Z, - limparFiltrosAvancados: C, + limparFiltrosAvancados: E, fecharModalFiltro: g, alternarLinhaExpandida: T, // actions - alternarOrdenacao: Be, - atualizarBusca: _a, - irParaPagina: Ea, - acoesDisponiveisPorLinha: Je, - possuiAcoes: We, - toggleMenu: Ca, + alternarOrdenacao: _e, + atualizarBusca: te, + irParaPagina: ge, + acoesDisponiveisPorLinha: Ce, + possuiAcoes: De, + toggleMenu: $a, // popup menuPopup: d, menuPopupPos: l }; } -}), xn = { class: "eli-tabela" }, er = { class: "eli-tabela__table" }; -function ar(e, a, o, r, i, f) { - const t = Q("EliTabelaDebug"), n = Q("EliTabelaEstados"), d = Q("EliTabelaCabecalho"), l = Q("EliTabelaModalColunas"), c = Q("EliTabelaModalFiltroAvancado"), m = Q("EliTabelaHead"), w = Q("EliTabelaBody"), B = Q("EliTabelaMenuAcoes"), _ = Q("EliTabelaPaginacao"); - return u(), y("div", xn, [ +}), Kn = { class: "eli-tabela" }, Qn = { class: "eli-tabela__table" }; +function xn(e, a, o, r, i, f) { + const t = K("EliTabelaDebug"), n = K("EliTabelaEstados"), d = K("EliTabelaCabecalho"), l = K("EliTabelaModalColunas"), u = K("EliTabelaModalFiltroAvancado"), b = K("EliTabelaHead"), k = K("EliTabelaBody"), D = K("EliTabelaMenuAcoes"), y = K("EliTabelaPaginacao"); + return c(), $("div", Kn, [ q(t, { isDev: e.isDev, menuAberto: e.menuAberto, menuPopupPos: e.menuPopupPos - }, null, 8, ["isDev", "menuAberto", "menuPopupPos"]), - e.carregando || e.erro || !e.linhas.length ? (u(), W(n, { + }, { + default: ae(() => [ + p("div", null, "paginaAtual: " + F(e.paginaAtual), 1), + p("div", null, "limit: " + F(e.registrosPorConsulta), 1), + p("div", null, "texto_busca: " + F((e.valorBusca || "").trim()), 1), + p("div", null, "filtrosAvancadosAtivos: " + F(JSON.stringify(e.filtrosAvancadosAtivos)), 1), + p("div", null, "quantidadeTotal: " + F(e.quantidade), 1) + ]), + _: 1 + }, 8, ["isDev", "menuAberto", "menuPopupPos"]), + e.carregando || e.erro || !e.linhas.length ? (c(), W(n, { key: 0, carregando: e.carregando, erro: e.erro, mensagemVazio: e.tabela.mensagemVazio - }, null, 8, ["carregando", "erro", "mensagemVazio"])) : (u(), y(re, { key: 1 }, [ - e.exibirBusca || e.temAcoesCabecalho ? (u(), W(d, { + }, null, 8, ["carregando", "erro", "mensagemVazio"])) : (c(), $(re, { key: 1 }, [ + e.exibirBusca || e.temAcoesCabecalho ? (c(), W(d, { key: 0, exibirBusca: e.exibirBusca, exibirBotaoFiltroAvancado: e.exibirFiltroAvancado, @@ -2968,7 +2943,7 @@ function ar(e, a, o, r, i, f) { onBuscar: e.atualizarBusca, onColunas: e.abrirModalColunas, onFiltroAvancado: e.abrirModalFiltro - }, null, 8, ["exibirBusca", "exibirBotaoFiltroAvancado", "valorBusca", "acoesCabecalho", "onBuscar", "onColunas", "onFiltroAvancado"])) : ee("", !0), + }, null, 8, ["exibirBusca", "exibirBotaoFiltroAvancado", "valorBusca", "acoesCabecalho", "onBuscar", "onColunas", "onFiltroAvancado"])) : Q("", !0), q(l, { aberto: e.modalColunasAberto, rotulosColunas: e.rotulosColunas, @@ -2977,7 +2952,7 @@ function ar(e, a, o, r, i, f) { onFechar: e.fecharModalColunas, onSalvar: e.salvarModalColunas }, null, 8, ["aberto", "rotulosColunas", "configInicial", "colunas", "onFechar", "onSalvar"]), - q(c, { + q(u, { aberto: e.modalFiltroAberto, filtrosBase: e.tabela.filtroAvancado ?? [], modelo: e.filtrosUi, @@ -2985,8 +2960,8 @@ function ar(e, a, o, r, i, f) { onLimpar: e.limparFiltrosAvancados, onSalvar: e.salvarFiltrosAvancados }, null, 8, ["aberto", "filtrosBase", "modelo", "onFechar", "onLimpar", "onSalvar"]), - $("table", er, [ - q(m, { + p("table", Qn, [ + q(b, { colunas: e.colunasEfetivas, temAcoes: e.temAcoes, temColunasInvisiveis: e.temColunasInvisiveis, @@ -2994,7 +2969,7 @@ function ar(e, a, o, r, i, f) { direcaoOrdenacao: e.direcaoOrdenacao, onAlternarOrdenacao: e.alternarOrdenacao }, null, 8, ["colunas", "temAcoes", "temColunasInvisiveis", "colunaOrdenacao", "direcaoOrdenacao", "onAlternarOrdenacao"]), - q(w, { + q(k, { colunas: e.colunasEfetivas, colunasInvisiveis: e.colunasInvisiveisEfetivas, temColunasInvisiveis: e.temColunasInvisiveis, @@ -3007,41 +2982,42 @@ function ar(e, a, o, r, i, f) { alternarLinhaExpandida: e.alternarLinhaExpandida }, null, 8, ["colunas", "colunasInvisiveis", "temColunasInvisiveis", "linhasExpandidas", "linhas", "temAcoes", "menuAberto", "possuiAcoes", "toggleMenu", "alternarLinhaExpandida"]) ]), - q(B, { + q(D, { ref: "menuPopup", menuAberto: e.menuAberto, posicao: e.menuPopupPos, acoes: e.menuAberto === null ? [] : e.acoesDisponiveisPorLinha(e.menuAberto), linha: e.menuAberto === null ? null : e.linhasPaginadas[e.menuAberto], - onExecutar: a[0] || (a[0] = ({ acao: s, linha: E }) => { - e.menuAberto = null, s.acao(E); + onExecutar: a[0] || (a[0] = ({ acao: s, linha: _ }) => { + e.menuAberto = null, s.acao(_); }) }, null, 8, ["menuAberto", "posicao", "acoes", "linha"]), - e.totalPaginas > 1 && e.quantidadeFiltrada > 0 ? (u(), W(_, { + e.totalPaginas > 1 && e.quantidadeFiltrada > 0 ? (c(), W(y, { key: 1, pagina: e.paginaAtual, totalPaginas: e.totalPaginas, maximoBotoes: e.tabela.maximo_botoes_paginacao, onAlterar: e.irParaPagina - }, null, 8, ["pagina", "totalPaginas", "maximoBotoes", "onAlterar"])) : ee("", !0) + }, null, 8, ["pagina", "totalPaginas", "maximoBotoes", "onAlterar"])) : Q("", !0) ], 64)) ]); } -const tr = /* @__PURE__ */ z(Qn, [["render", ar]]), pr = { +const er = /* @__PURE__ */ L(Gn, [["render", xn]]), dr = (e, a) => [e, a], fr = { install(e) { - e.component("EliOlaMundo", at), e.component("EliBotao", pa), e.component("EliBadge", Ue), e.component("EliCartao", lt), e.component("EliTabela", tr), e.component("EliEntradaTexto", Ye), e.component("EliEntradaNumero", ha), e.component("EliEntradaDataHora", ga), e.component("EliEntradaParagrafo", Dn), e.component("EliEntradaSelecao", Tn); + e.component("EliOlaMundo", xa), e.component("EliBotao", da), e.component("EliBadge", Ue), e.component("EliCartao", nt), e.component("EliTabela", er), e.component("EliEntradaTexto", Ye), e.component("EliEntradaNumero", ma), e.component("EliEntradaDataHora", ba), e.component("EliEntradaParagrafo", Sn), e.component("EliEntradaSelecao", Mn); } }; export { Ue as EliBadge, - pa as EliBotao, - lt as EliCartao, - ga as EliEntradaDataHora, - ha as EliEntradaNumero, - Dn as EliEntradaParagrafo, - Tn as EliEntradaSelecao, + da as EliBotao, + nt as EliCartao, + ba as EliEntradaDataHora, + ma as EliEntradaNumero, + Sn as EliEntradaParagrafo, + Mn as EliEntradaSelecao, Ye as EliEntradaTexto, - at as EliOlaMundo, - tr as EliTabela, - pr as default + xa as EliOlaMundo, + er as EliTabela, + dr as celulaTabela, + fr as default }; diff --git a/dist/eli-vue.umd.js b/dist/eli-vue.umd.js index 7d36bdf..eac62c0 100644 --- a/dist/eli-vue.umd.js +++ b/dist/eli-vue.umd.js @@ -1,9 +1,9 @@ -(function(F,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("vuetify/components/VBtn"),require("vuetify/components/VBadge"),require("vuetify/components/VTextField"),require("vuetify/components/VCard"),require("vuetify/components/VGrid"),require("vuetify/components"),require("vuetify/components/VChip"),require("vuetify/components/VTextarea"),require("vuetify/components/VSelect")):typeof define=="function"&&define.amd?define(["exports","vue","vuetify/components/VBtn","vuetify/components/VBadge","vuetify/components/VTextField","vuetify/components/VCard","vuetify/components/VGrid","vuetify/components","vuetify/components/VChip","vuetify/components/VTextarea","vuetify/components/VSelect"],t):(F=typeof globalThis<"u"?globalThis:F||self,t(F.eli_vue={},F.Vue,F.VBtn,F.VBadge,F.VTextField,F.VCard,F.VGrid,F.components,F.VChip,F.VTextarea,F.VSelect))})(this,(function(F,t,tt,at,Ce,ie,ot,_e,nt,rt,lt){"use strict";const it=t.defineComponent({name:"EliBotao",inheritAttrs:!1,props:{color:{type:String,default:"primary"},variant:{type:String,default:"elevated"},size:{type:String,default:"default"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}}}),P=(e,a)=>{const n=e.__vccOpts||e;for(const[l,s]of a)n[l]=s;return n};function st(e,a,n,l,s,m){return t.openBlock(),t.createBlock(tt.VBtn,t.mergeProps({color:e.color,variant:e.variant,size:e.size,disabled:e.disabled,loading:e.loading},e.$attrs,{class:"eli-botao text-none pt-1"}),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["color","variant","size","disabled","loading"])}const ve=P(it,[["render",st]]),Ae={suave:"4px",pill:"10px"},ct=t.defineComponent({name:"EliBadge",inheritAttrs:!1,props:{color:{type:String,default:"primary"},location:{type:String,default:"top right"},offsetX:{type:String,default:"0"},offsetY:{type:String,default:"0"},dot:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},badge:{type:[String,Number],default:void 0},radius:{type:String,default:"suave"}},setup(e){const a=t.computed(()=>e.radius in Ae?Ae[e.radius]:e.radius),n=t.computed(()=>e.dot||e.badge!==void 0?e.visible:!1),l=t.computed(()=>({"--eli-badge-radius":a.value}));return{showBadge:n,badgeStyle:l}}});function dt(e,a,n,l,s,m){return e.showBadge?(t.openBlock(),t.createBlock(at.VBadge,t.mergeProps({key:0,color:e.color},e.$attrs,{location:e.location,"offset-x":e.offsetX,"offset-y":e.offsetY,dot:e.dot,content:e.badge,style:e.badgeStyle,class:"eli-badge"}),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},16,["color","location","offset-x","offset-y","dot","content","style"])):t.renderSlot(e.$slots,"default",{key:1},void 0,!0)}const ye=P(ct,[["render",dt],["__scopeId","data-v-371c8db4"]]);function ut(e){return e.replace(/\D+/g,"")}function mt(e){const a=ut(e);return a.length<=11?a.replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d{1,2})$/,"$1-$2").slice(0,14):a.replace(/^(\d{2})(\d)/,"$1.$2").replace(/^(\d{2})\.(\d{3})(\d)/,"$1.$2.$3").replace(/\.(\d{3})(\d)/,".$1/$2").replace(/(\d{4})(\d)/,"$1-$2").slice(0,18)}function pt(e){return e.replace(/\D+/g,"")}function ft(e){const a=pt(e);return a?a.length<=10?a.replace(/^(\d{2})(\d)/,"($1) $2").replace(/(\d{4})(\d)/,"$1-$2").slice(0,14):a.replace(/^(\d{2})(\d)/,"($1) $2").replace(/(\d{5})(\d)/,"$1-$2").slice(0,15):""}function bt(e){return e.replace(/\D+/g,"")}function ht(e){const a=bt(e);return a?a.replace(/^(\d{5})(\d)/,"$1-$2").slice(0,9):""}const gt=t.defineComponent({name:"EliEntradaTexto",inheritAttrs:!1,props:{value:{type:[String,null],default:void 0},opcoes:{type:Object,required:!0}},emits:{"update:value":e=>!0,input:e=>!0,change:e=>!0,focus:()=>!0,blur:()=>!0},setup(e,{attrs:a,emit:n}){const l=t.computed(()=>{var i;return((i=e.opcoes)==null?void 0:i.formato)??"texto"}),s=t.computed({get:()=>e.value,set:i=>{n("update:value",i),n("input",i),n("change",i)}}),m=t.computed(()=>l.value==="email"?"email":l.value==="url"?"url":"text"),o=t.computed(()=>{if(l.value==="telefone")return"tel";if(l.value==="cpfCnpj"||l.value==="cep")return"numeric"});function r(i){switch(l.value){case"telefone":return ft(i);case"cpfCnpj":return mt(i);case"cep":return ht(i);default:return i}}function u(i){const d=i.target,b=r(d.value);d.value=b,s.value=b}return{attrs:a,emit:n,localValue:s,inputHtmlType:m,inputMode:o,onInput:u}}});function yt(e,a,n,l,s,m){var o,r,u,i;return t.openBlock(),t.createBlock(Ce.VTextField,t.mergeProps({modelValue:e.localValue,"onUpdate:modelValue":a[0]||(a[0]=d=>e.localValue=d),type:e.inputHtmlType,inputmode:e.inputMode,label:(o=e.opcoes)==null?void 0:o.rotulo,placeholder:(r=e.opcoes)==null?void 0:r.placeholder,counter:(u=e.opcoes)==null?void 0:u.limiteCaracteres,maxlength:(i=e.opcoes)==null?void 0:i.limiteCaracteres},e.attrs,{onFocus:a[1]||(a[1]=()=>e.emit("focus")),onBlur:a[2]||(a[2]=()=>e.emit("blur")),onInput:e.onInput}),null,16,["modelValue","type","inputmode","label","placeholder","counter","maxlength","onInput"])}const $e=P(gt,[["render",yt]]),$t=t.defineComponent({name:"EliOlaMundo",components:{EliBotao:ve,EliBadge:ye,EliEntradaTexto:$e},setup(){const e=t.ref(""),a=t.ref(""),n=t.ref(""),l=t.ref(""),s=t.ref("");return{nome:e,email:l,documento:s,telefone:n,cep:a}}}),Et={class:"grid-example"};function kt(e,a,n,l,s,m){const o=t.resolveComponent("EliBadge"),r=t.resolveComponent("EliEntradaTexto"),u=t.resolveComponent("EliBotao");return t.openBlock(),t.createBlock(ot.VContainer,null,{default:t.withCtx(()=>[t.createVNode(ie.VCard,{class:"mx-auto",max_width:"400"},{default:t.withCtx(()=>[t.createVNode(ie.VCardTitle,null,{default:t.withCtx(()=>[t.createVNode(o,{badge:"Novo","offset-x":"-15",location:"right center"},{default:t.withCtx(()=>[...a[5]||(a[5]=[t.createTextVNode(" Olá Mundo! ",-1)])]),_:1})]),_:1}),t.createVNode(ie.VCardText,null,{default:t.withCtx(()=>[a[6]||(a[6]=t.createTextVNode(" Este é um componente de exemplo integrado com Vuetify. ",-1)),t.createElementVNode("div",Et,[t.createVNode(r,{value:e.nome,"onUpdate:value":a[0]||(a[0]=i=>e.nome=i),opcoes:{rotulo:"Nome",placeholder:"Digite o nome"},density:"compact"},null,8,["value"]),t.createVNode(r,{value:e.telefone,"onUpdate:value":a[1]||(a[1]=i=>e.telefone=i),opcoes:{rotulo:"Telefone",formato:"telefone"}},null,8,["value"]),t.createVNode(r,{value:e.cep,"onUpdate:value":a[2]||(a[2]=i=>e.cep=i),opcoes:{rotulo:"CEP",placeholder:"00000-000",formato:"cep"}},null,8,["value"]),t.createVNode(r,{value:e.documento,"onUpdate:value":a[3]||(a[3]=i=>e.documento=i),opcoes:{rotulo:"CPF / CNPJ",formato:"cpfCnpj"}},null,8,["value"]),t.createVNode(r,{value:e.email,"onUpdate:value":a[4]||(a[4]=i=>e.email=i),opcoes:{rotulo:"Email",placeholder:"email@exemplo.com",formato:"email"}},null,8,["value"])])]),_:1}),t.createVNode(ie.VCardActions,null,{default:t.withCtx(()=>[t.createVNode(u,{color:"primary",variant:"elevated",block:""},{default:t.withCtx(()=>[...a[7]||(a[7]=[t.createTextVNode(" Botão Vuetify ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})}const Me=P($t,[["render",kt]]),Bt=t.defineComponent({name:"EliCartao",components:{EliBadge:ye},inheritAttrs:!1,props:{titulo:{type:String,default:""},status:{type:String,required:!0},variant:{type:String,default:"outlined"}},emits:{clicar:e=>!0},setup(e,{emit:a}){const n=t.computed(()=>e.status),l=t.computed(()=>{switch(e.status){case"novo":return"primary";case"rascunho":return"secondary";case"vendido":return"success";case"cancelado":return"error"}}),s=t.computed(()=>`eli-cartao--${e.status}`);function m(){a("clicar",e.status)}return{rotuloStatus:n,corStatus:l,classeStatus:s,onClick:m}}}),Ct={class:"eli-cartao__titulo-texto"},_t={class:"eli-cartao__status"};function vt(e,a,n,l,s,m){const o=t.resolveComponent("EliBadge");return t.openBlock(),t.createBlock(ie.VCard,t.mergeProps({class:["eli-cartao",e.classeStatus],variant:e.variant},e.$attrs),{default:t.withCtx(()=>[t.createVNode(ie.VCardTitle,{class:"eli-cartao__titulo"},{default:t.withCtx(()=>[t.createElementVNode("div",Ct,[t.renderSlot(e.$slots,"titulo",{},()=>[t.createTextVNode(t.toDisplayString(e.titulo),1)],!0)]),t.createElementVNode("div",_t,[t.createVNode(o,{badge:e.rotuloStatus,radius:"pill",color:e.corStatus},{default:t.withCtx(()=>[...a[0]||(a[0]=[t.createElementVNode("span",null,null,-1)])]),_:1},8,["badge","color"])])]),_:3}),t.createVNode(ie.VCardText,{class:"eli-cartao__conteudo"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3}),e.$slots.acoes?(t.openBlock(),t.createBlock(ie.VCardActions,{key:0,class:"eli-cartao__acoes"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"acoes",{},void 0,!0)]),_:3})):t.createCommentVNode("",!0)]),_:3},16,["variant","class"])}const we=P(Bt,[["render",vt],["__scopeId","data-v-6c492bd9"]]);var Te=(e=>(e[e.sucesso=200]="sucesso",e[e.erroConhecido=400]="erroConhecido",e[e.erroPermissao=401]="erroPermissao",e[e.erroNaoEncontrado=404]="erroNaoEncontrado",e[e.erroDesconhecido=500]="erroDesconhecido",e[e.tempoEsgotado=504]="tempoEsgotado",e))(Te||{});/** +(function(w,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("vuetify/components/VBtn"),require("vuetify/components/VBadge"),require("vuetify/components/VTextField"),require("vuetify/components/VCard"),require("vuetify/components/VGrid"),require("vuetify/components"),require("vuetify/components/VChip"),require("vuetify/components/VTextarea"),require("vuetify/components/VSelect")):typeof define=="function"&&define.amd?define(["exports","vue","vuetify/components/VBtn","vuetify/components/VBadge","vuetify/components/VTextField","vuetify/components/VCard","vuetify/components/VGrid","vuetify/components","vuetify/components/VChip","vuetify/components/VTextarea","vuetify/components/VSelect"],t):(w=typeof globalThis<"u"?globalThis:w||self,t(w.eli_vue={},w.Vue,w.VBtn,w.VBadge,w.VTextField,w.VCard,w.VGrid,w.components,w.VChip,w.VTextarea,w.VSelect))})(this,(function(w,t,xe,et,ve,se,tt,Ce,at,ot,nt){"use strict";const rt=t.defineComponent({name:"EliBotao",inheritAttrs:!1,props:{color:{type:String,default:"primary"},variant:{type:String,default:"elevated"},size:{type:String,default:"default"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}}}),T=(e,a)=>{const n=e.__vccOpts||e;for(const[l,s]of a)n[l]=s;return n};function lt(e,a,n,l,s,m){return t.openBlock(),t.createBlock(xe.VBtn,t.mergeProps({color:e.color,variant:e.variant,size:e.size,disabled:e.disabled,loading:e.loading},e.$attrs,{class:"eli-botao text-none pt-1"}),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["color","variant","size","disabled","loading"])}const _e=T(rt,[["render",lt]]),Ae={suave:"4px",pill:"10px"},it=t.defineComponent({name:"EliBadge",inheritAttrs:!1,props:{color:{type:String,default:"primary"},location:{type:String,default:"top right"},offsetX:{type:String,default:"0"},offsetY:{type:String,default:"0"},dot:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},badge:{type:[String,Number],default:void 0},radius:{type:String,default:"suave"}},setup(e){const a=t.computed(()=>e.radius in Ae?Ae[e.radius]:e.radius),n=t.computed(()=>e.dot||e.badge!==void 0?e.visible:!1),l=t.computed(()=>({"--eli-badge-radius":a.value}));return{showBadge:n,badgeStyle:l}}});function st(e,a,n,l,s,m){return e.showBadge?(t.openBlock(),t.createBlock(et.VBadge,t.mergeProps({key:0,color:e.color},e.$attrs,{location:e.location,"offset-x":e.offsetX,"offset-y":e.offsetY,dot:e.dot,content:e.badge,style:e.badgeStyle,class:"eli-badge"}),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},16,["color","location","offset-x","offset-y","dot","content","style"])):t.renderSlot(e.$slots,"default",{key:1},void 0,!0)}const ye=T(it,[["render",st],["__scopeId","data-v-371c8db4"]]);function ct(e){return e.replace(/\D+/g,"")}function dt(e){const a=ct(e);return a.length<=11?a.replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d{1,2})$/,"$1-$2").slice(0,14):a.replace(/^(\d{2})(\d)/,"$1.$2").replace(/^(\d{2})\.(\d{3})(\d)/,"$1.$2.$3").replace(/\.(\d{3})(\d)/,".$1/$2").replace(/(\d{4})(\d)/,"$1-$2").slice(0,18)}function ut(e){return e.replace(/\D+/g,"")}function mt(e){const a=ut(e);return a?a.length<=10?a.replace(/^(\d{2})(\d)/,"($1) $2").replace(/(\d{4})(\d)/,"$1-$2").slice(0,14):a.replace(/^(\d{2})(\d)/,"($1) $2").replace(/(\d{5})(\d)/,"$1-$2").slice(0,15):""}function pt(e){return e.replace(/\D+/g,"")}function ft(e){const a=pt(e);return a?a.replace(/^(\d{5})(\d)/,"$1-$2").slice(0,9):""}const bt=t.defineComponent({name:"EliEntradaTexto",inheritAttrs:!1,props:{value:{type:[String,null],default:void 0},opcoes:{type:Object,required:!0}},emits:{"update:value":e=>!0,input:e=>!0,change:e=>!0,focus:()=>!0,blur:()=>!0},setup(e,{attrs:a,emit:n}){const l=t.computed(()=>{var i;return((i=e.opcoes)==null?void 0:i.formato)??"texto"}),s=t.computed({get:()=>e.value,set:i=>{n("update:value",i),n("input",i),n("change",i)}}),m=t.computed(()=>l.value==="email"?"email":l.value==="url"?"url":"text"),o=t.computed(()=>{if(l.value==="telefone")return"tel";if(l.value==="cpfCnpj"||l.value==="cep")return"numeric"});function r(i){switch(l.value){case"telefone":return mt(i);case"cpfCnpj":return dt(i);case"cep":return ft(i);default:return i}}function u(i){const d=i.target,b=r(d.value);d.value=b,s.value=b}return{attrs:a,emit:n,localValue:s,inputHtmlType:m,inputMode:o,onInput:u}}});function ht(e,a,n,l,s,m){var o,r,u,i;return t.openBlock(),t.createBlock(ve.VTextField,t.mergeProps({modelValue:e.localValue,"onUpdate:modelValue":a[0]||(a[0]=d=>e.localValue=d),type:e.inputHtmlType,inputmode:e.inputMode,label:(o=e.opcoes)==null?void 0:o.rotulo,placeholder:(r=e.opcoes)==null?void 0:r.placeholder,counter:(u=e.opcoes)==null?void 0:u.limiteCaracteres,maxlength:(i=e.opcoes)==null?void 0:i.limiteCaracteres},e.attrs,{onFocus:a[1]||(a[1]=()=>e.emit("focus")),onBlur:a[2]||(a[2]=()=>e.emit("blur")),onInput:e.onInput}),null,16,["modelValue","type","inputmode","label","placeholder","counter","maxlength","onInput"])}const $e=T(bt,[["render",ht]]),gt=t.defineComponent({name:"EliOlaMundo",components:{EliBotao:_e,EliBadge:ye,EliEntradaTexto:$e},setup(){const e=t.ref(""),a=t.ref(""),n=t.ref(""),l=t.ref(""),s=t.ref("");return{nome:e,email:l,documento:s,telefone:n,cep:a}}}),yt={class:"grid-example"};function $t(e,a,n,l,s,m){const o=t.resolveComponent("EliBadge"),r=t.resolveComponent("EliEntradaTexto"),u=t.resolveComponent("EliBotao");return t.openBlock(),t.createBlock(tt.VContainer,null,{default:t.withCtx(()=>[t.createVNode(se.VCard,{class:"mx-auto",max_width:"400"},{default:t.withCtx(()=>[t.createVNode(se.VCardTitle,null,{default:t.withCtx(()=>[t.createVNode(o,{badge:"Novo","offset-x":"-15",location:"right center"},{default:t.withCtx(()=>[...a[5]||(a[5]=[t.createTextVNode(" Olá Mundo! ",-1)])]),_:1})]),_:1}),t.createVNode(se.VCardText,null,{default:t.withCtx(()=>[a[6]||(a[6]=t.createTextVNode(" Este é um componente de exemplo integrado com Vuetify. ",-1)),t.createElementVNode("div",yt,[t.createVNode(r,{value:e.nome,"onUpdate:value":a[0]||(a[0]=i=>e.nome=i),opcoes:{rotulo:"Nome",placeholder:"Digite o nome"},density:"compact"},null,8,["value"]),t.createVNode(r,{value:e.telefone,"onUpdate:value":a[1]||(a[1]=i=>e.telefone=i),opcoes:{rotulo:"Telefone",formato:"telefone"}},null,8,["value"]),t.createVNode(r,{value:e.cep,"onUpdate:value":a[2]||(a[2]=i=>e.cep=i),opcoes:{rotulo:"CEP",placeholder:"00000-000",formato:"cep"}},null,8,["value"]),t.createVNode(r,{value:e.documento,"onUpdate:value":a[3]||(a[3]=i=>e.documento=i),opcoes:{rotulo:"CPF / CNPJ",formato:"cpfCnpj"}},null,8,["value"]),t.createVNode(r,{value:e.email,"onUpdate:value":a[4]||(a[4]=i=>e.email=i),opcoes:{rotulo:"Email",placeholder:"email@exemplo.com",formato:"email"}},null,8,["value"])])]),_:1}),t.createVNode(se.VCardActions,null,{default:t.withCtx(()=>[t.createVNode(u,{color:"primary",variant:"elevated",block:""},{default:t.withCtx(()=>[...a[7]||(a[7]=[t.createTextVNode(" Botão Vuetify ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})}const Me=T(gt,[["render",$t]]),Et=t.defineComponent({name:"EliCartao",components:{EliBadge:ye},inheritAttrs:!1,props:{titulo:{type:String,default:""},status:{type:String,required:!0},variant:{type:String,default:"outlined"}},emits:{clicar:e=>!0},setup(e,{emit:a}){const n=t.computed(()=>e.status),l=t.computed(()=>{switch(e.status){case"novo":return"primary";case"rascunho":return"secondary";case"vendido":return"success";case"cancelado":return"error"}}),s=t.computed(()=>`eli-cartao--${e.status}`);function m(){a("clicar",e.status)}return{rotuloStatus:n,corStatus:l,classeStatus:s,onClick:m}}}),kt={class:"eli-cartao__titulo-texto"},Bt={class:"eli-cartao__status"};function vt(e,a,n,l,s,m){const o=t.resolveComponent("EliBadge");return t.openBlock(),t.createBlock(se.VCard,t.mergeProps({class:["eli-cartao",e.classeStatus],variant:e.variant},e.$attrs),{default:t.withCtx(()=>[t.createVNode(se.VCardTitle,{class:"eli-cartao__titulo"},{default:t.withCtx(()=>[t.createElementVNode("div",kt,[t.renderSlot(e.$slots,"titulo",{},()=>[t.createTextVNode(t.toDisplayString(e.titulo),1)],!0)]),t.createElementVNode("div",Bt,[t.createVNode(o,{badge:e.rotuloStatus,radius:"pill",color:e.corStatus},{default:t.withCtx(()=>[...a[0]||(a[0]=[t.createElementVNode("span",null,null,-1)])]),_:1},8,["badge","color"])])]),_:3}),t.createVNode(se.VCardText,{class:"eli-cartao__conteudo"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3}),e.$slots.acoes?(t.openBlock(),t.createBlock(se.VCardActions,{key:0,class:"eli-cartao__acoes"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"acoes",{},void 0,!0)]),_:3})):t.createCommentVNode("",!0)]),_:3},16,["variant","class"])}const we=T(Et,[["render",vt],["__scopeId","data-v-6c492bd9"]]);var Te=(e=>(e[e.sucesso=200]="sucesso",e[e.erroConhecido=400]="erroConhecido",e[e.erroPermissao=401]="erroPermissao",e[e.erroNaoEncontrado=404]="erroNaoEncontrado",e[e.erroDesconhecido=500]="erroDesconhecido",e[e.tempoEsgotado=504]="tempoEsgotado",e))(Te||{});/** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const St=e=>{for(const a in e)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1};/** + */const Ct=e=>{for(const a in e)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1};/** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. @@ -13,7 +13,7 @@ * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Vt=(...e)=>e.filter((a,n,l)=>!!a&&a.trim()!==""&&l.indexOf(a)===n).join(" ").trim();/** + */const _t=(...e)=>e.filter((a,n,l)=>!!a&&a.trim()!==""&&l.indexOf(a)===n).join(" ").trim();/** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. @@ -23,12 +23,12 @@ * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Nt=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,n,l)=>l?l.toUpperCase():n.toLowerCase());/** + */const Vt=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,n,l)=>l?l.toUpperCase():n.toLowerCase());/** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Dt=e=>{const a=Nt(e);return a.charAt(0).toUpperCase()+a.slice(1)};/** + */const St=e=>{const a=Vt(e);return a.charAt(0).toUpperCase()+a.slice(1)};/** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. @@ -38,39 +38,39 @@ * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const At=({name:e,iconNode:a,absoluteStrokeWidth:n,"absolute-stroke-width":l,strokeWidth:s,"stroke-width":m,size:o=be.width,color:r=be.stroke,...u},{slots:i})=>t.h("svg",{...be,...u,width:o,height:o,stroke:r,"stroke-width":Pe(n)||Pe(l)||n===!0||l===!0?Number(s||m||be["stroke-width"])*24/Number(o):s||m||be["stroke-width"],class:Vt("lucide",u.class,...e?[`lucide-${Fe(Dt(e))}-icon`,`lucide-${Fe(e)}`]:["lucide-icon"]),...!i.default&&!St(u)&&{"aria-hidden":"true"}},[...a.map(d=>t.h(...d)),...i.default?[i.default()]:[]]);/** + */const Dt=({name:e,iconNode:a,absoluteStrokeWidth:n,"absolute-stroke-width":l,strokeWidth:s,"stroke-width":m,size:o=be.width,color:r=be.stroke,...u},{slots:i})=>t.h("svg",{...be,...u,width:o,height:o,stroke:r,"stroke-width":Pe(n)||Pe(l)||n===!0||l===!0?Number(s||m||be["stroke-width"])*24/Number(o):s||m||be["stroke-width"],class:_t("lucide",u.class,...e?[`lucide-${Fe(St(e))}-icon`,`lucide-${Fe(e)}`]:["lucide-icon"]),...!i.default&&!Ct(u)&&{"aria-hidden":"true"}},[...a.map(d=>t.h(...d)),...i.default?[i.default()]:[]]);/** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const pe=(e,a)=>(n,{slots:l,attrs:s})=>t.h(At,{...s,...n,iconNode:a,name:e},l);/** + */const fe=(e,a)=>(n,{slots:l,attrs:s})=>t.h(Dt,{...s,...n,iconNode:a,name:e},l);/** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Oe=pe("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** + */const Oe=fe("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const qe=pe("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** + */const qe=fe("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Ie=pe("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + */const Ie=fe("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Le=pe("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + */const Le=fe("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Mt=pe("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/** + */const Nt=fe("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/** * @license lucide-vue-next v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const wt=pe("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),Tt=t.defineComponent({name:"EliTabelaCaixaDeBusca",components:{Search:wt},props:{modelo:{type:String,required:!1,default:""}},emits:{buscar(e){return typeof e=="string"}},setup(e,{emit:a}){const n=t.ref(e.modelo??"");t.watch(()=>e.modelo,s=>{s!==void 0&&s!==n.value&&(n.value=s)});function l(){a("buscar",n.value.trim())}return{texto:n,emitirBusca:l}}}),Pt={class:"eli-tabela__busca"},Ft={class:"eli-tabela__busca-input-wrapper"};function Ot(e,a,n,l,s,m){const o=t.resolveComponent("Search");return t.openBlock(),t.createElementBlock("div",Pt,[t.createElementVNode("div",Ft,[t.withDirectives(t.createElementVNode("input",{id:"eli-tabela-busca","onUpdate:modelValue":a[0]||(a[0]=r=>e.texto=r),type:"search",class:"eli-tabela__busca-input",placeholder:"Digite termos para filtrar",onKeyup:a[1]||(a[1]=t.withKeys((...r)=>e.emitirBusca&&e.emitirBusca(...r),["enter"]))},null,544),[[t.vModelText,e.texto]]),t.createElementVNode("button",{type:"button",class:"eli-tabela__busca-botao","aria-label":"Buscar",title:"Buscar",onClick:a[2]||(a[2]=(...r)=>e.emitirBusca&&e.emitirBusca(...r))},[t.createVNode(o,{class:"eli-tabela__busca-botao-icone",size:16,"stroke-width":2,"aria-hidden":"true"})])])])}const qt=P(Tt,[["render",Ot],["__scopeId","data-v-341415d1"]]),It=t.defineComponent({name:"EliTabelaCabecalho",components:{EliTabelaCaixaDeBusca:qt},props:{exibirBusca:{type:Boolean,required:!0},exibirBotaoColunas:{type:Boolean,required:!1,default:!0},exibirBotaoFiltroAvancado:{type:Boolean,required:!1,default:!1},valorBusca:{type:String,required:!0},acoesCabecalho:{type:Array,required:!0}},emits:{buscar(e){return typeof e=="string"},colunas(){return!0},filtroAvancado(){return!0}},setup(e,{emit:a}){const n=t.computed(()=>e.acoesCabecalho.length>0);function l(o){a("buscar",o)}function s(){a("colunas")}function m(){a("filtroAvancado")}return{temAcoesCabecalho:n,emitBuscar:l,emitColunas:s,emitFiltroAvancado:m}}}),Lt={class:"eli-tabela__cabecalho"},zt={key:0,class:"eli-tabela__busca-grupo"},jt={key:1,class:"eli-tabela__acoes-cabecalho"},Ht=["onClick"],Ut={class:"eli-tabela__acoes-cabecalho-rotulo"};function Yt(e,a,n,l,s,m){const o=t.resolveComponent("EliTabelaCaixaDeBusca");return t.openBlock(),t.createElementBlock("div",Lt,[e.exibirBusca?(t.openBlock(),t.createElementBlock("div",zt,[e.exibirBotaoColunas?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"eli-tabela__acoes-cabecalho-botao eli-tabela__acoes-cabecalho-botao--colunas",onClick:a[0]||(a[0]=(...r)=>e.emitColunas&&e.emitColunas(...r))}," Colunas ")):t.createCommentVNode("",!0),e.exibirBotaoFiltroAvancado?(t.openBlock(),t.createElementBlock("button",{key:1,type:"button",class:"eli-tabela__acoes-cabecalho-botao eli-tabela__acoes-cabecalho-botao--filtro",onClick:a[1]||(a[1]=(...r)=>e.emitFiltroAvancado&&e.emitFiltroAvancado(...r))}," Filtro ")):t.createCommentVNode("",!0),t.createVNode(o,{modelo:e.valorBusca,onBuscar:e.emitBuscar},null,8,["modelo","onBuscar"])])):t.createCommentVNode("",!0),e.temAcoesCabecalho?(t.openBlock(),t.createElementBlock("div",jt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.acoesCabecalho,(r,u)=>(t.openBlock(),t.createElementBlock("button",{key:`${r.rotulo}-${u}`,type:"button",class:"eli-tabela__acoes-cabecalho-botao",style:t.normalizeStyle(r.cor?{backgroundColor:r.cor,color:"#fff"}:void 0),onClick:r.acao},[r.icone?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.icone),{key:0,class:"eli-tabela__acoes-cabecalho-icone",size:16,"stroke-width":2})):t.createCommentVNode("",!0),t.createElementVNode("span",Ut,t.toDisplayString(r.rotulo),1)],12,Ht))),128))])):t.createCommentVNode("",!0)])}const Rt=P(It,[["render",Yt],["__scopeId","data-v-17166105"]]),Jt=t.defineComponent({name:"EliTabelaEstados",props:{carregando:{type:Boolean,required:!0},erro:{type:String,required:!0},mensagemVazio:{type:String,required:!1,default:void 0}}}),Wt={key:0,class:"eli-tabela eli-tabela--carregando","aria-busy":"true"},Zt={key:1,class:"eli-tabela eli-tabela--erro",role:"alert"},Gt={class:"eli-tabela__erro-mensagem"},Xt={key:2,class:"eli-tabela eli-tabela--vazio"};function Kt(e,a,n,l,s,m){return e.carregando?(t.openBlock(),t.createElementBlock("div",Wt," Carregando... ")):e.erro?(t.openBlock(),t.createElementBlock("div",Zt,[a[0]||(a[0]=t.createElementVNode("div",{class:"eli-tabela__erro-titulo"},"Erro",-1)),t.createElementVNode("div",Gt,t.toDisplayString(e.erro),1)])):(t.openBlock(),t.createElementBlock("div",Xt,t.toDisplayString(e.mensagemVazio??"Nenhum registro encontrado."),1))}const Qt=P(Jt,[["render",Kt]]),xt=t.defineComponent({name:"EliTabelaDebug",props:{isDev:{type:Boolean,required:!0},menuAberto:{type:Number,required:!0},menuPopupPos:{type:Object,required:!0}}}),ea={key:0,style:{position:"fixed",left:"8px",bottom:"8px","z-index":"999999",background:"rgba(185,28,28,0.9)",color:"#fff",padding:"6px 10px","border-radius":"8px","font-size":"12px","max-width":"500px"}};function ta(e,a,n,l,s,m){return e.isDev?(t.openBlock(),t.createElementBlock("div",ea,[a[0]||(a[0]=t.createElementVNode("div",null,[t.createElementVNode("b",null,"EliTabela debug")],-1)),t.createElementVNode("div",null,"menuAberto: "+t.toDisplayString(e.menuAberto),1),t.createElementVNode("div",null,"menuPos: top="+t.toDisplayString(e.menuPopupPos.top)+", left="+t.toDisplayString(e.menuPopupPos.left),1)])):t.createCommentVNode("",!0)}const aa=P(xt,[["render",ta]]),oa=t.defineComponent({name:"EliTabelaHead",components:{ArrowUp:qe,ArrowDown:Oe},props:{colunas:{type:Array,required:!0},temAcoes:{type:Boolean,required:!0},temColunasInvisiveis:{type:Boolean,required:!0},colunaOrdenacao:{type:String,required:!0},direcaoOrdenacao:{type:String,required:!0}},emits:{alternarOrdenacao(e){return typeof e=="string"&&e.length>0}},setup(e,{emit:a}){function n(s){return(s==null?void 0:s.coluna_ordem)!==void 0&&(s==null?void 0:s.coluna_ordem)!==null}function l(s){a("alternarOrdenacao",s)}return{ArrowUp:qe,ArrowDown:Oe,isOrdenavel:n,emitAlternarOrdenacao:l}}}),na={class:"eli-tabela__thead"},ra={class:"eli-tabela__tr eli-tabela__tr--header"},la={key:0,class:"eli-tabela__th eli-tabela__th--expander",scope:"col"},ia=["onClick"],sa={class:"eli-tabela__th-texto"},ca={key:1,class:"eli-tabela__th-label"},da={key:1,class:"eli-tabela__th eli-tabela__th--acoes",scope:"col"};function ua(e,a,n,l,s,m){const o=t.resolveComponent("ArrowUp");return t.openBlock(),t.createElementBlock("thead",na,[t.createElementVNode("tr",ra,[e.temColunasInvisiveis?(t.openBlock(),t.createElementBlock("th",la)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.colunas,(r,u)=>(t.openBlock(),t.createElementBlock("th",{key:`th-${u}`,class:t.normalizeClass(["eli-tabela__th",[e.isOrdenavel(r)?"eli-tabela__th--ordenavel":void 0]]),scope:"col"},[e.isOrdenavel(r)?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:t.normalizeClass(["eli-tabela__th-botao",[e.colunaOrdenacao===String(r.coluna_ordem)?"eli-tabela__th-botao--ativo":void 0]]),onClick:i=>e.emitAlternarOrdenacao(String(r.coluna_ordem))},[t.createElementVNode("span",sa,t.toDisplayString(r.rotulo),1),e.colunaOrdenacao===String(r.coluna_ordem)?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.direcaoOrdenacao==="asc"?e.ArrowUp:e.ArrowDown),{key:0,class:"eli-tabela__th-icone",size:16,"stroke-width":2,"aria-hidden":"true"})):(t.openBlock(),t.createBlock(o,{key:1,class:"eli-tabela__th-icone eli-tabela__th-icone--oculto",size:16,"stroke-width":2,"aria-hidden":"true"}))],10,ia)):(t.openBlock(),t.createElementBlock("span",ca,t.toDisplayString(r.rotulo),1))],2))),128)),e.temAcoes?(t.openBlock(),t.createElementBlock("th",da," Ações ")):t.createCommentVNode("",!0)])])}const ma=P(oa,[["render",ua]]),pa=t.defineComponent({name:"EliTabelaCelulaTextoSimples",components:{},props:{dados:{type:Object}},data(){return{}},methods:{},setup({dados:e}){return{dados:e}}}),fa={key:1};function ba(e,a,n,l,s,m){var o,r,u;return(o=e.dados)!=null&&o.acao?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"eli-tabela__celula-link",onClick:a[0]||(a[0]=t.withModifiers(i=>e.dados.acao(),["stop","prevent"]))},t.toDisplayString((r=e.dados)==null?void 0:r.texto),1)):(t.openBlock(),t.createElementBlock("span",fa,t.toDisplayString((u=e.dados)==null?void 0:u.texto),1))}const ha=P(pa,[["render",ba],["__scopeId","data-v-7a629ffa"]]),ga=t.defineComponent({name:"EliTabelaCelulaTextoTruncado",props:{dados:{type:Object}},setup({dados:e}){return{dados:e}}}),ya=["title"],$a=["title"];function Ea(e,a,n,l,s,m){var o,r,u,i,d;return(o=e.dados)!=null&&o.acao?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"eli-tabela__texto-truncado eli-tabela__celula-link",title:(r=e.dados)==null?void 0:r.texto,onClick:a[0]||(a[0]=t.withModifiers(b=>e.dados.acao(),["stop","prevent"]))},t.toDisplayString((u=e.dados)==null?void 0:u.texto),9,ya)):(t.openBlock(),t.createElementBlock("span",{key:1,class:"eli-tabela__texto-truncado",title:(i=e.dados)==null?void 0:i.texto},t.toDisplayString((d=e.dados)==null?void 0:d.texto),9,$a))}const ka=P(ga,[["render",Ea],["__scopeId","data-v-74854889"]]),Ba=t.defineComponent({name:"EliTabelaCelulaNumero",components:{},props:{dados:{type:Object}},setup({dados:e}){const a=t.computed(()=>{var r,u;const n=String(e==null?void 0:e.numero).replace(".",","),l=(r=e==null?void 0:e.prefixo)==null?void 0:r.trim(),s=(u=e==null?void 0:e.sufixo)==null?void 0:u.trim(),m=l?`${l} `:"",o=s?` ${s}`:"";return`${m}${n}${o}`});return{dados:e,textoNumero:a}}}),Ca={key:1};function _a(e,a,n,l,s,m){var o;return(o=e.dados)!=null&&o.acao?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"eli-tabela__celula-link",onClick:a[0]||(a[0]=t.withModifiers(r=>e.dados.acao(),["stop","prevent"]))},t.toDisplayString(e.textoNumero),1)):(t.openBlock(),t.createElementBlock("span",Ca,t.toDisplayString(e.textoNumero),1))}const va=P(Ba,[["render",_a],["__scopeId","data-v-69c890c4"]]),Sa=t.defineComponent({name:"EliTabelaCelulaTags",components:{VChip:_e.VChip},props:{dados:{type:Object,required:!1}},setup({dados:e}){return{dados:e}}}),Va={class:"eli-tabela__celula-tags"};function Na(e,a,n,l,s,m){var o;return t.openBlock(),t.createElementBlock("div",Va,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(((o=e.dados)==null?void 0:o.opcoes)??[],(r,u)=>(t.openBlock(),t.createBlock(nt.VChip,{key:u,class:"eli-tabela__celula-tag",size:"small",variant:"tonal",color:r.cor,clickable:!!r.acao,onClick:t.withModifiers(i=>{var d;return(d=r.acao)==null?void 0:d.call(r)},["stop","prevent"])},{default:t.withCtx(()=>[r.icone?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.icone),{key:0,class:"eli-tabela__celula-tag-icone",size:14})):t.createCommentVNode("",!0),t.createElementVNode("span",null,t.toDisplayString(r.rotulo),1)]),_:2},1032,["color","clickable","onClick"]))),128))])}const Da=P(Sa,[["render",Na],["__scopeId","data-v-a9c83dbe"]]);function ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ee={exports:{}},Aa=Ee.exports,je;function Ma(){return je||(je=1,(function(e,a){(function(n,l){e.exports=l()})(Aa,(function(){var n=1e3,l=6e4,s=36e5,m="millisecond",o="second",r="minute",u="hour",i="day",d="week",b="month",N="quarter",S="year",$="date",c="Invalid Date",E=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,k={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(_){var g=["th","st","nd","rd"],p=_%100;return"["+_+(g[(p-20)%10]||g[p]||g[0])+"]"}},j=function(_,g,p){var B=String(_);return!B||B.length>=g?_:""+Array(g+1-B.length).join(p)+_},G={s:j,z:function(_){var g=-_.utcOffset(),p=Math.abs(g),B=Math.floor(p/60),f=p%60;return(g<=0?"+":"-")+j(B,2,"0")+":"+j(f,2,"0")},m:function _(g,p){if(g.date()1)return _(v[0])}else{var T=g.name;H[T]=g,f=T}return!B&&f&&(I=f),f||!B&&I},w=function(_,g){if(O(_))return _.clone();var p=typeof g=="object"?g:{};return p.date=_,p.args=arguments,new de(p)},A=G;A.l=ae,A.i=O,A.w=function(_,g){return w(_,{locale:g.$L,utc:g.$u,x:g.$x,$offset:g.$offset})};var de=(function(){function _(p){this.$L=ae(p.locale,null,!0),this.parse(p),this.$x=this.$x||p.x||{},this[X]=!0}var g=_.prototype;return g.parse=function(p){this.$d=(function(B){var f=B.date,V=B.utc;if(f===null)return new Date(NaN);if(A.u(f))return new Date;if(f instanceof Date)return new Date(f);if(typeof f=="string"&&!/Z$/i.test(f)){var v=f.match(E);if(v){var T=v[2]-1||0,L=(v[7]||"0").substring(0,3);return V?new Date(Date.UTC(v[1],T,v[3]||1,v[4]||0,v[5]||0,v[6]||0,L)):new Date(v[1],T,v[3]||1,v[4]||0,v[5]||0,v[6]||0,L)}}return new Date(f)})(p),this.init()},g.init=function(){var p=this.$d;this.$y=p.getFullYear(),this.$M=p.getMonth(),this.$D=p.getDate(),this.$W=p.getDay(),this.$H=p.getHours(),this.$m=p.getMinutes(),this.$s=p.getSeconds(),this.$ms=p.getMilliseconds()},g.$utils=function(){return A},g.isValid=function(){return this.$d.toString()!==c},g.isSame=function(p,B){var f=w(p);return this.startOf(B)<=f&&f<=this.endOf(B)},g.isAfter=function(p,B){return w(p)0,H<=I.r||!I.r){H<=1&&G>0&&(I=k[G-1]);var X=y[I.l];S&&(H=S(""+H)),c=typeof X=="string"?X.replace("%d",H):X(H,d,I.l,E);break}}if(d)return c;var O=E?y.future:y.past;return typeof O=="function"?O(c):O.replace("%s",c)},m.to=function(i,d){return r(i,d,this,!0)},m.from=function(i,d){return r(i,d,this)};var u=function(i){return i.$u?s.utc():s()};m.toNow=function(i){return this.to(u(this),i)},m.fromNow=function(i){return this.from(u(this),i)}}}))})(ke)),ke.exports}var Fa=Pa();const Oa=ze(Fa);se.extend(Oa);const qa=t.defineComponent({name:"EliTabelaCelulaData",props:{dados:{type:Object,required:!1}},setup({dados:e}){const a=t.computed(()=>{const n=e==null?void 0:e.valor;if(!n)return"";const l=(e==null?void 0:e.formato)??"data";return l==="relativo"?se(n).fromNow():l==="data_hora"?se(n).format("DD/MM/YYYY HH:mm"):se(n).format("DD/MM/YYYY")});return{dados:e,textoData:a}}}),Ia={key:1};function La(e,a,n,l,s,m){var o;return(o=e.dados)!=null&&o.acao?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"eli-tabela__celula-link",onClick:a[0]||(a[0]=t.withModifiers(r=>e.dados.acao(),["stop","prevent"]))},t.toDisplayString(e.textoData),1)):(t.openBlock(),t.createElementBlock("span",Ia,t.toDisplayString(e.textoData),1))}const za={textoSimples:ha,textoTruncado:ka,numero:va,tags:Da,data:P(qa,[["render",La],["__scopeId","data-v-2b88bbb2"]])},ja=t.defineComponent({name:"EliTabelaCelula",props:{celula:{type:Array,required:!0}},setup(e){const a=t.computed(()=>e.celula[0]),n=t.computed(()=>e.celula[1]),l=t.computed(()=>za[a.value]),s=t.computed(()=>n.value);return{Componente:l,dadosParaComponente:s}}});function Ha(e,a,n,l,s,m){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Componente),{dados:e.dadosParaComponente},null,8,["dados"])}const Ue=P(ja,[["render",Ha]]),Ua=t.defineComponent({name:"EliTabelaDetalhesLinha",components:{EliTabelaCelula:Ue},props:{linha:{type:null,required:!0},colunasInvisiveis:{type:Array,required:!0}}}),Ya={class:"eli-tabela__detalhes"},Ra={class:"eli-tabela__detalhe-rotulo"},Ja={class:"eli-tabela__detalhe-valor"};function Wa(e,a,n,l,s,m){const o=t.resolveComponent("EliTabelaCelula");return t.openBlock(),t.createElementBlock("div",Ya,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.colunasInvisiveis,(r,u)=>(t.openBlock(),t.createElementBlock("div",{key:`det-${u}-${r.rotulo}`,class:"eli-tabela__detalhe"},[t.createElementVNode("div",Ra,t.toDisplayString(r.rotulo),1),t.createElementVNode("div",Ja,[t.createVNode(o,{celula:r.celula(e.linha)},null,8,["celula"])])]))),128))])}const Za=P(Ua,[["render",Wa],["__scopeId","data-v-f1ee8d20"]]),Ga=t.defineComponent({name:"EliTabelaBody",components:{EliTabelaCelula:Ue,EliTabelaDetalhesLinha:Za,MoreVertical:Mt,ChevronRight:Le,ChevronDown:Ie},props:{colunas:{type:Array,required:!0},colunasInvisiveis:{type:Array,required:!0},temColunasInvisiveis:{type:Boolean,required:!0},linhasExpandidas:{type:Object,required:!0},linhas:{type:Array,required:!0},temAcoes:{type:Boolean,required:!0},menuAberto:{type:Number,required:!0},possuiAcoes:{type:Function,required:!0},toggleMenu:{type:Function,required:!0},alternarLinhaExpandida:{type:Function,required:!0}},setup(){return{ChevronRight:Le,ChevronDown:Ie}}}),Xa={class:"eli-tabela__tbody"},Ka=["aria-expanded","aria-label","title","onClick"],Qa=["id","disabled","aria-expanded","aria-controls","aria-label","title","onClick"],xa=["colspan"];function eo(e,a,n,l,s,m){const o=t.resolveComponent("EliTabelaCelula"),r=t.resolveComponent("MoreVertical"),u=t.resolveComponent("EliTabelaDetalhesLinha");return t.openBlock(),t.createElementBlock("tbody",Xa,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.linhas,(i,d)=>{var b,N,S,$,c,E;return t.openBlock(),t.createElementBlock(t.Fragment,{key:`grp-${d}`},[t.createElementVNode("tr",{class:t.normalizeClass(["eli-tabela__tr",[d%2===1?"eli-tabela__tr--zebra":void 0]])},[e.temColunasInvisiveis?(t.openBlock(),t.createElementBlock("td",{class:"eli-tabela__td eli-tabela__td--expander",key:`td-${d}-exp`},[t.createElementVNode("button",{type:"button",class:t.normalizeClass(["eli-tabela__expander-botao",[(b=e.linhasExpandidas)!=null&&b[d]?"eli-tabela__expander-botao--ativo":void 0]]),"aria-expanded":(N=e.linhasExpandidas)!=null&&N[d]?"true":"false","aria-label":(S=e.linhasExpandidas)!=null&&S[d]?"Ocultar colunas ocultas":"Mostrar colunas ocultas",title:($=e.linhasExpandidas)!=null&&$[d]?"Ocultar detalhes":"Mostrar detalhes",onClick:t.withModifiers(y=>e.alternarLinhaExpandida(d),["stop"])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent((c=e.linhasExpandidas)!=null&&c[d]?e.ChevronDown:e.ChevronRight),{class:"eli-tabela__expander-icone",size:16,"stroke-width":2,"aria-hidden":"true"}))],10,Ka)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.colunas,(y,k)=>(t.openBlock(),t.createElementBlock("td",{key:`td-${d}-${k}`,class:"eli-tabela__td"},[t.createVNode(o,{celula:y.celula(i)},null,8,["celula"])]))),128)),e.temAcoes?(t.openBlock(),t.createElementBlock("td",{class:"eli-tabela__td eli-tabela__td--acoes",key:`td-${d}-acoes`},[t.createElementVNode("div",{class:t.normalizeClass(["eli-tabela__acoes-container",[e.menuAberto===d?"eli-tabela__acoes-container--aberto":void 0]])},[t.createElementVNode("button",{class:"eli-tabela__acoes-toggle",type:"button",id:`eli-tabela-acoes-toggle-${d}`,disabled:!e.possuiAcoes(d),"aria-haspopup":"menu","aria-expanded":e.menuAberto===d?"true":"false","aria-controls":e.possuiAcoes(d)?`eli-tabela-acoes-menu-${d}`:void 0,"aria-label":e.possuiAcoes(d)?"Ações da linha":"Nenhuma ação disponível",title:e.possuiAcoes(d)?"Ações":"Nenhuma ação disponível",onClick:t.withModifiers(y=>e.toggleMenu(d,y),["stop"])},[t.createVNode(r,{class:"eli-tabela__acoes-toggle-icone",size:18,"stroke-width":2})],8,Qa)],2)])):t.createCommentVNode("",!0)],2),e.temColunasInvisiveis&&((E=e.linhasExpandidas)!=null&&E[d])?(t.openBlock(),t.createElementBlock("tr",{key:0,class:t.normalizeClass(["eli-tabela__tr eli-tabela__tr--detalhes",[d%2===1?"eli-tabela__tr--zebra":void 0]])},[t.createElementVNode("td",{class:"eli-tabela__td eli-tabela__td--detalhes",colspan:(e.temColunasInvisiveis?1:0)+e.colunas.length+(e.temAcoes?1:0)},[t.createVNode(u,{linha:i,colunasInvisiveis:e.colunasInvisiveis},null,8,["linha","colunasInvisiveis"])],8,xa)],2)):t.createCommentVNode("",!0)],64)}),128))])}const to=P(Ga,[["render",eo]]),ao=t.defineComponent({name:"EliTabelaMenuAcoes",props:{menuAberto:{type:Number,required:!0},posicao:{type:Object,required:!0},acoes:{type:Array,required:!0},linha:{type:null,required:!0}},emits:{executar(e){return e!==null&&typeof e=="object"}},setup(e,{emit:a,expose:n}){const l=t.ref(null);n({menuEl:l});const s=t.computed(()=>e.acoes.length>0);function m(o){e.linha&&a("executar",{acao:o.acao,linha:e.linha})}return{menuEl:l,possuiAcoes:s,emitExecutar:m}}}),oo=["id","aria-labelledby"],no=["aria-label","title","onClick"],ro={class:"eli-tabela__acoes-item-texto"};function lo(e,a,n,l,s,m){return t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[e.menuAberto!==null&&e.possuiAcoes?(t.openBlock(),t.createElementBlock("ul",{key:0,id:`eli-tabela-acoes-menu-${e.menuAberto}`,ref:"menuEl",class:"eli-tabela__acoes-menu",role:"menu","aria-labelledby":`eli-tabela-acoes-toggle-${e.menuAberto}`,style:t.normalizeStyle({position:"fixed",top:`${e.posicao.top}px`,left:`${e.posicao.left}px`,zIndex:999999})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.acoes,o=>(t.openBlock(),t.createElementBlock("li",{key:`acao-${e.menuAberto}-${o.indice}`,class:"eli-tabela__acoes-item",role:"none"},[t.createElementVNode("button",{type:"button",class:"eli-tabela__acoes-item-botao",style:t.normalizeStyle({color:o.acao.cor}),role:"menuitem","aria-label":o.acao.rotulo,title:o.acao.rotulo,onClick:t.withModifiers(r=>e.emitExecutar(o),["stop"])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.acao.icone),{class:"eli-tabela__acoes-item-icone",size:16,"stroke-width":2})),t.createElementVNode("span",ro,t.toDisplayString(o.acao.rotulo),1)],12,no)]))),128))],12,oo)):t.createCommentVNode("",!0)])}const io=P(ao,[["render",lo]]),so=t.defineComponent({name:"EliTabelaPaginacao",props:{pagina:{type:Number,required:!0},totalPaginas:{type:Number,required:!0},maximoBotoes:{type:Number,required:!1}},emits:{alterar(e){return Number.isFinite(e)}},setup(e,{emit:a}){const n=t.computed(()=>{const i=e.maximoBotoes;return typeof i=="number"&&i>=5?Math.floor(i):7}),l=t.computed(()=>{const i=e.totalPaginas,d=e.pagina,b=n.value,N=[],S=k=>{N.push({label:String(k),pagina:k,ativo:k===d})},$=()=>{N.push({label:"…",ehEllipsis:!0})};if(i<=b){for(let k=1;k<=i;k+=1)S(k);return N}const c=Math.max(3,b-2);let E=Math.max(2,d-Math.floor(c/2)),y=E+c-1;y>=i&&(y=i-1,E=y-c+1),S(1),E>2&&$();for(let k=E;k<=y;k+=1)S(k);return ye.pagina<=1),o=t.computed(()=>e.pagina>=e.totalPaginas),r=t.computed(()=>e.pagina),u=t.computed(()=>e.totalPaginas);return{botoes:l,irParaPagina:s,anteriorDesabilitado:m,proximaDesabilitada:o,paginaAtual:r,totalPaginasExibidas:u}}}),co={key:0,class:"eli-tabela__paginacao",role:"navigation","aria-label":"Paginação de resultados"},uo=["disabled"],mo={key:0,class:"eli-tabela__pagina-ellipsis","aria-hidden":"true"},po=["disabled","aria-current","aria-label","onClick"],fo=["disabled"];function bo(e,a,n,l,s,m){return e.totalPaginasExibidas>1?(t.openBlock(),t.createElementBlock("nav",co,[t.createElementVNode("button",{type:"button",class:"eli-tabela__pagina-botao",disabled:e.anteriorDesabilitado,"aria-label":"Página anterior",onClick:a[0]||(a[0]=o=>e.irParaPagina(e.paginaAtual-1))}," << ",8,uo),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.botoes,(o,r)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`${o.label}-${r}`},[o.ehEllipsis?(t.openBlock(),t.createElementBlock("span",mo,t.toDisplayString(o.label),1)):(t.openBlock(),t.createElementBlock("button",{key:1,type:"button",class:t.normalizeClass(["eli-tabela__pagina-botao",o.ativo?"eli-tabela__pagina-botao--ativo":void 0]),disabled:o.ativo,"aria-current":o.ativo?"page":void 0,"aria-label":`Ir para página ${o.label}`,onClick:u=>e.irParaPagina(o.pagina)},t.toDisplayString(o.label),11,po))],64))),128)),t.createElementVNode("button",{type:"button",class:"eli-tabela__pagina-botao",disabled:e.proximaDesabilitada,"aria-label":"Próxima página",onClick:a[1]||(a[1]=o=>e.irParaPagina(e.paginaAtual+1))}," >> ",8,fo)])):t.createCommentVNode("",!0)}const ho=P(so,[["render",bo],["__scopeId","data-v-5ca7a362"]]),Ye="application/x-eli-tabela-coluna",go=t.defineComponent({name:"EliTabelaModalColunas",props:{aberto:{type:Boolean,required:!0},rotulosColunas:{type:Array,required:!0},configInicial:{type:Object,required:!0},colunas:{type:Array,required:!0}},emits:{fechar(){return!0},salvar(e){return!0}},setup(e,{emit:a}){const n=t.ref([]),l=t.ref([]);function s(){var H,X;const $=e.rotulosColunas,c=(((H=e.configInicial.visiveis)==null?void 0:H.length)??0)>0||(((X=e.configInicial.invisiveis)==null?void 0:X.length)??0)>0,E=new Set(e.colunas.filter(O=>O.visivel===!1).map(O=>O.rotulo)),y=c?new Set(e.configInicial.invisiveis??[]):E,k=$.filter(O=>!y.has(O)),j=e.configInicial.visiveis??[],G=new Set(k),I=[];for(const O of j)G.has(O)&&I.push(O);for(const O of k)I.includes(O)||I.push(O);n.value=I,l.value=$.filter(O=>y.has(O))}t.watch(()=>[e.aberto,e.rotulosColunas,e.configInicial,e.colunas],()=>{e.aberto&&s()},{deep:!0,immediate:!0});function m(){a("fechar")}function o(){a("salvar",{visiveis:[...n.value],invisiveis:[...l.value]})}function r($,c){var E,y;try{(E=$.dataTransfer)==null||E.setData(Ye,JSON.stringify(c)),(y=$.dataTransfer)==null||y.setData("text/plain",c.rotulo),$.dataTransfer.effectAllowed="move"}catch{}}function u($){var c;try{const E=(c=$.dataTransfer)==null?void 0:c.getData(Ye);if(!E)return null;const y=JSON.parse(E);return!y||typeof y.rotulo!="string"||y.origem!=="visiveis"&&y.origem!=="invisiveis"?null:y}catch{return null}}function i($){const c=$.origem==="visiveis"?n.value:l.value,E=c.indexOf($.rotulo);E>=0&&c.splice(E,1)}function d($,c,E){const y=$==="visiveis"?n.value:l.value,k=y.indexOf(c);k>=0&&y.splice(k,1),E===null||E<0||E>y.length?y.push(c):y.splice(E,0,c)}function b($,c,E,y){r($,{rotulo:c,origem:E,index:y})}function N($,c,E){const y=u($);if(y)if(i(y),d(c,y.rotulo,E),c==="visiveis"){const k=l.value.indexOf(y.rotulo);k>=0&&l.value.splice(k,1)}else{const k=n.value.indexOf(y.rotulo);k>=0&&n.value.splice(k,1)}}function S($,c,E){const y=u($);if(y)if(i(y),d(c,y.rotulo,null),c==="visiveis"){const k=l.value.indexOf(y.rotulo);k>=0&&l.value.splice(k,1)}else{const k=n.value.indexOf(y.rotulo);k>=0&&n.value.splice(k,1)}}return{visiveisLocal:n,invisiveisLocal:l,emitFechar:m,emitSalvar:o,onDragStart:b,onDropItem:N,onDropLista:S}}}),yo={class:"eli-tabela-modal-colunas__modal",role:"dialog","aria-modal":"true","aria-label":"Configurar colunas"},$o={class:"eli-tabela-modal-colunas__header"},Eo={class:"eli-tabela-modal-colunas__conteudo"},ko={class:"eli-tabela-modal-colunas__coluna"},Bo=["onDragstart","onDrop"],Co={class:"eli-tabela-modal-colunas__item-texto"},_o={class:"eli-tabela-modal-colunas__coluna"},vo=["onDragstart","onDrop"],So={class:"eli-tabela-modal-colunas__item-texto"},Vo={class:"eli-tabela-modal-colunas__footer"};function No(e,a,n,l,s,m){return e.aberto?(t.openBlock(),t.createElementBlock("div",{key:0,class:"eli-tabela-modal-colunas__overlay",role:"presentation",onClick:a[9]||(a[9]=t.withModifiers((...o)=>e.emitFechar&&e.emitFechar(...o),["self"]))},[t.createElementVNode("div",yo,[t.createElementVNode("header",$o,[a[10]||(a[10]=t.createElementVNode("h3",{class:"eli-tabela-modal-colunas__titulo"},"Colunas",-1)),t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-colunas__fechar","aria-label":"Fechar",onClick:a[0]||(a[0]=(...o)=>e.emitFechar&&e.emitFechar(...o))}," × ")]),t.createElementVNode("div",Eo,[t.createElementVNode("div",ko,[a[12]||(a[12]=t.createElementVNode("div",{class:"eli-tabela-modal-colunas__coluna-titulo"},"Visíveis",-1)),t.createElementVNode("div",{class:"eli-tabela-modal-colunas__lista",onDragover:a[2]||(a[2]=t.withModifiers(()=>{},["prevent"])),onDrop:a[3]||(a[3]=o=>e.onDropLista(o,"visiveis",null))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.visiveisLocal,(o,r)=>(t.openBlock(),t.createElementBlock("div",{key:`vis-${o}`,class:"eli-tabela-modal-colunas__item",draggable:"true",onDragstart:u=>e.onDragStart(u,o,"visiveis",r),onDragover:a[1]||(a[1]=t.withModifiers(()=>{},["prevent"])),onDrop:u=>e.onDropItem(u,"visiveis",r)},[a[11]||(a[11]=t.createElementVNode("span",{class:"eli-tabela-modal-colunas__item-handle","aria-hidden":"true"},"⋮⋮",-1)),t.createElementVNode("span",Co,t.toDisplayString(o),1)],40,Bo))),128))],32)]),t.createElementVNode("div",_o,[a[14]||(a[14]=t.createElementVNode("div",{class:"eli-tabela-modal-colunas__coluna-titulo"},"Invisíveis",-1)),t.createElementVNode("div",{class:"eli-tabela-modal-colunas__lista",onDragover:a[5]||(a[5]=t.withModifiers(()=>{},["prevent"])),onDrop:a[6]||(a[6]=o=>e.onDropLista(o,"invisiveis",null))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.invisiveisLocal,(o,r)=>(t.openBlock(),t.createElementBlock("div",{key:`inv-${o}`,class:"eli-tabela-modal-colunas__item",draggable:"true",onDragstart:u=>e.onDragStart(u,o,"invisiveis",r),onDragover:a[4]||(a[4]=t.withModifiers(()=>{},["prevent"])),onDrop:u=>e.onDropItem(u,"invisiveis",r)},[a[13]||(a[13]=t.createElementVNode("span",{class:"eli-tabela-modal-colunas__item-handle","aria-hidden":"true"},"⋮⋮",-1)),t.createElementVNode("span",So,t.toDisplayString(o),1)],40,vo))),128))],32)])]),t.createElementVNode("footer",Vo,[t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-colunas__botao eli-tabela-modal-colunas__botao--sec",onClick:a[7]||(a[7]=(...o)=>e.emitFechar&&e.emitFechar(...o))}," Cancelar "),t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-colunas__botao eli-tabela-modal-colunas__botao--prim",onClick:a[8]||(a[8]=(...o)=>e.emitSalvar&&e.emitSalvar(...o))}," Salvar ")])])])):t.createCommentVNode("",!0)}const Do=P(go,[["render",No],["__scopeId","data-v-b8f693ef"]]);function Ao(e){if(!Number.isFinite(e)||e<=0||e>=1)return 0;const a=e.toString();if(a.includes("e-")){const[,s]=a.split("e-"),m=Number(s);return Number.isFinite(m)?m:0}const n=a.indexOf(".");return n===-1?0:a.slice(n+1).replace(/0+$/,"").length}function Mo(e){const a=(e??"").trim().replace(/,/g,".");if(!a)return null;const n=Number(a);return Number.isNaN(n)?null:n}function Se(e,a){return e==null?"":a===null?String(e):Number(e).toFixed(Math.max(0,a)).replace(/\./g,",")}function Re(e){return(e??"").replace(/\D+/g,"")}function wo(e){const a=(e??"").replace(/[^0-9.,]+/g,""),n=a.match(/[.,]/);if(!n)return a;const l=n[0],s=a.indexOf(l),m=a.slice(0,s).replace(/[.,]/g,""),o=a.slice(s+1).replace(/[.,]/g,"");return`${m.length?m:"0"}${l}${o}`}function To(e,a){if(a===null)return e;if(a<=0)return e.replace(/[.,]/g,"");const n=e.match(/[.,]/);if(!n)return e;const l=n[0],s=e.indexOf(l),m=e.slice(0,s),o=e.slice(s+1);return`${m}${l}${o.slice(0,a)}`}function Po(e){const a=e.match(/^(\d+)[.,]$/);if(!a)return null;const n=Number(a[1]);return Number.isNaN(n)?null:n}const Fo=t.defineComponent({name:"EliEntradaNumero",inheritAttrs:!1,props:{value:{type:[Number,null],default:void 0},opcoes:{type:Object,required:!0}},emits:{"update:value":e=>!0,input:e=>!0,change:e=>!0,focus:()=>!0,blur:()=>!0},setup(e,{attrs:a,emit:n}){const l=t.computed(()=>{var d;const i=(d=e.opcoes)==null?void 0:d.precisao;return i==null?null:Ao(i)}),s=t.computed(()=>l.value===0),m=t.computed(()=>{const i=l.value;return i!==null&&i>0}),o=t.ref(""),r=t.ref(void 0);t.watch(()=>e.value,i=>{i!==r.value&&(o.value=Se(i,l.value),r.value=i)},{immediate:!0});function u(i){if(m.value){const S=l.value??0,$=Re(i),c=$?Number($):0,E=Math.pow(10,S),y=$?c/E:null,k=y===null?null:y;r.value=k,n("update:value",k),n("input",k),n("change",k),o.value=Se(k,S);return}const d=s.value?Re(i):wo(i),b=s.value?d:To(d,l.value);let N=null;if(b){const $=(s.value?null:Po(b))??Mo(b);N=$===null?null:$}r.value=N,n("update:value",N),n("input",N),n("change",N),o.value=Se(N,l.value)}return{attrs:a,emit:n,displayValue:o,isInteiro:s,onUpdateModelValue:u}}}),Oo={class:"eli-entrada__prefixo"},qo={class:"eli-entrada__sufixo"};function Io(e,a,n,l,s,m){var o,r,u,i;return t.openBlock(),t.createBlock(Ce.VTextField,t.mergeProps({"model-value":e.displayValue,label:(o=e.opcoes)==null?void 0:o.rotulo,placeholder:(r=e.opcoes)==null?void 0:r.placeholder,type:e.isInteiro?"number":"text",inputmode:e.isInteiro?"numeric":"decimal",pattern:e.isInteiro?"[0-9]*":"[0-9.,]*"},e.attrs,{"onUpdate:modelValue":e.onUpdateModelValue,onFocus:a[0]||(a[0]=()=>e.emit("focus")),onBlur:a[1]||(a[1]=()=>e.emit("blur"))}),t.createSlots({_:2},[(u=e.opcoes)!=null&&u.prefixo?{name:"prepend-inner",fn:t.withCtx(()=>[t.createElementVNode("span",Oo,t.toDisplayString(e.opcoes.prefixo),1)]),key:"0"}:void 0,(i=e.opcoes)!=null&&i.sufixo?{name:"append-inner",fn:t.withCtx(()=>[t.createElementVNode("span",qo,t.toDisplayString(e.opcoes.sufixo),1)]),key:"1"}:void 0]),1040,["model-value","label","placeholder","type","inputmode","pattern","onUpdate:modelValue"])}const Ve=P(Fo,[["render",Io],["__scopeId","data-v-77cbf216"]]),Lo=t.defineComponent({name:"EliEntradaDataHora",inheritAttrs:!1,props:{value:{type:String,default:void 0},opcoes:{type:Object,required:!1,default:void 0},modelValue:{type:String,default:null},modo:{type:String,default:void 0},rotulo:{type:String,default:void 0},placeholder:{type:String,default:void 0},desabilitado:{type:Boolean,default:void 0},limpavel:{type:Boolean,default:void 0},erro:{type:Boolean,default:void 0},mensagensErro:{type:[String,Array],default:void 0},dica:{type:String,default:void 0},dicaPersistente:{type:Boolean,default:void 0},densidade:{type:String,default:void 0},variante:{type:String,default:void 0},min:{type:String,default:void 0},max:{type:String,default:void 0}},emits:{"update:value":e=>!0,input:e=>!0,change:e=>!0,"update:modelValue":e=>!0,alterar:e=>!0,foco:()=>!0,desfoco:()=>!0,focus:()=>!0,blur:()=>!0},setup(e,{emit:a,attrs:n}){const l=t.computed(()=>e.opcoes?e.opcoes:{rotulo:e.rotulo??"Data e hora",placeholder:e.placeholder??"",modo:e.modo??"dataHora",limpavel:e.limpavel,erro:e.erro,mensagensErro:e.mensagensErro,dica:e.dica,dicaPersistente:e.dicaPersistente,densidade:e.densidade,variante:e.variante,min:e.min,max:e.max}),s=t.computed(()=>l.value.modo??"dataHora"),m=t.computed(()=>!!e.desabilitado),o=t.computed(()=>s.value==="data"?"date":"datetime-local");function r(c){return s.value==="data"?se(c).format("YYYY-MM-DD"):se(c).format("YYYY-MM-DDTHH:mm")}function u(c){return s.value==="data"?se(`${c}T00:00`).format():se(c).format()}const i=t.computed(()=>e.value!==void 0?e.value??null:e.modelValue),d=t.computed({get:()=>i.value?r(i.value):"",set:c=>{const E=c&&c.length>0?c:null;if(!E){a("update:value",null),a("input",null),a("change",null),a("update:modelValue",null),a("alterar",null);return}const y=u(E);a("update:value",y),a("input",y),a("change",y),a("update:modelValue",y),a("alterar",y)}}),b=t.computed(()=>{const c=l.value.min;if(c)return r(c)}),N=t.computed(()=>{const c=l.value.max;if(c)return r(c)});function S(){a("foco"),a("focus")}function $(){a("desfoco"),a("blur")}return{attrs:n,valor:d,tipoInput:o,minLocal:b,maxLocal:N,opcoesEfetivas:l,desabilitadoEfetivo:m,emitCompatFocus:S,emitCompatBlur:$}}}),zo={class:"eli-data-hora"};function jo(e,a,n,l,s,m){return t.openBlock(),t.createElementBlock("div",zo,[t.createVNode(Ce.VTextField,t.mergeProps({modelValue:e.valor,"onUpdate:modelValue":a[0]||(a[0]=o=>e.valor=o),type:e.tipoInput,label:e.opcoesEfetivas.rotulo,placeholder:e.opcoesEfetivas.placeholder,disabled:e.desabilitadoEfetivo,clearable:!!e.opcoesEfetivas.limpavel,error:!!e.opcoesEfetivas.erro,"error-messages":e.opcoesEfetivas.mensagensErro,hint:e.opcoesEfetivas.dica,"persistent-hint":!!e.opcoesEfetivas.dicaPersistente,density:e.opcoesEfetivas.densidade??"comfortable",variant:e.opcoesEfetivas.variante??"outlined",min:e.minLocal,max:e.maxLocal},e.attrs,{onFocus:e.emitCompatFocus,onBlur:e.emitCompatBlur}),null,16,["modelValue","type","label","placeholder","disabled","clearable","error","error-messages","hint","persistent-hint","density","variant","min","max","onFocus","onBlur"])])}const Ne=P(Lo,[["render",jo],["__scopeId","data-v-1bfd1be8"]]),Ho=t.defineComponent({name:"EliEntradaParagrafo",components:{VTextarea:_e.VTextarea},inheritAttrs:!1,props:{value:{type:[String,null],default:void 0},opcoes:{type:Object,required:!0}},emits:{"update:value":e=>!0,input:e=>!0,change:e=>!0,focus:()=>!0,blur:()=>!0},setup(e,{attrs:a,emit:n}){const l=t.computed({get:()=>e.value,set:s=>{n("update:value",s),n("input",s),n("change",s)}});return{attrs:a,emit:n,localValue:l,opcoes:e.opcoes}}});function Uo(e,a,n,l,s,m){var o,r,u,i,d,b,N,S,$,c,E,y;return t.openBlock(),t.createBlock(rt.VTextarea,t.mergeProps({modelValue:e.localValue,"onUpdate:modelValue":a[0]||(a[0]=k=>e.localValue=k),label:(o=e.opcoes)==null?void 0:o.rotulo,placeholder:(r=e.opcoes)==null?void 0:r.placeholder,rows:((u=e.opcoes)==null?void 0:u.linhas)??4,counter:(i=e.opcoes)==null?void 0:i.limiteCaracteres,maxlength:(d=e.opcoes)==null?void 0:d.limiteCaracteres,clearable:!!((b=e.opcoes)!=null&&b.limpavel),error:!!((N=e.opcoes)!=null&&N.erro),"error-messages":(S=e.opcoes)==null?void 0:S.mensagensErro,hint:($=e.opcoes)==null?void 0:$.dica,"persistent-hint":!!((c=e.opcoes)!=null&&c.dicaPersistente),density:((E=e.opcoes)==null?void 0:E.densidade)??"comfortable",variant:((y=e.opcoes)==null?void 0:y.variante)??"outlined","auto-grow":""},e.attrs,{onFocus:a[1]||(a[1]=()=>e.emit("focus")),onBlur:a[2]||(a[2]=()=>e.emit("blur"))}),null,16,["modelValue","label","placeholder","rows","counter","maxlength","clearable","error","error-messages","hint","persistent-hint","density","variant"])}const Je=P(Ho,[["render",Uo]]),Yo=t.defineComponent({name:"EliEntradaSelecao",components:{VSelect:_e.VSelect},inheritAttrs:!1,props:{value:{type:[String,null],default:void 0},opcoes:{type:Object,required:!0}},emits:{"update:value":e=>!0,input:e=>!0,change:e=>!0,focus:()=>!0,blur:()=>!0},setup(e,{attrs:a,emit:n}){const l=t.ref([]),s=t.ref(!1),m=t.computed({get:()=>e.value,set:r=>{n("update:value",r),n("input",r),n("change",r)}});async function o(){s.value=!0;try{const r=await e.opcoes.itens(),u=Array.isArray(r)?r:[];l.value=[...u]}finally{s.value=!1}}return t.watch(()=>e.opcoes.itens,()=>{o()}),t.onMounted(()=>{o()}),t.watch(l,r=>{console.debug("[EliEntradaSelecao] itens:",r)},{deep:!0}),{attrs:a,emit:n,localValue:m,opcoes:e.opcoes,itens:l,carregando:s}}});function Ro(e,a,n,l,s,m){var o,r,u,i,d,b,N,S,$;return t.openBlock(),t.createBlock(lt.VSelect,t.mergeProps({modelValue:e.localValue,"onUpdate:modelValue":a[0]||(a[0]=c=>e.localValue=c),label:(o=e.opcoes)==null?void 0:o.rotulo,placeholder:(r=e.opcoes)==null?void 0:r.placeholder,items:e.itens,"item-title":"rotulo","item-value":"chave",loading:e.carregando,disabled:e.carregando,"menu-props":{maxHeight:320},clearable:!!((u=e.opcoes)!=null&&u.limpavel),error:!!((i=e.opcoes)!=null&&i.erro),"error-messages":(d=e.opcoes)==null?void 0:d.mensagensErro,hint:(b=e.opcoes)==null?void 0:b.dica,"persistent-hint":!!((N=e.opcoes)!=null&&N.dicaPersistente),density:((S=e.opcoes)==null?void 0:S.densidade)??"comfortable",variant:(($=e.opcoes)==null?void 0:$.variante)??"outlined"},e.attrs,{onFocus:a[1]||(a[1]=()=>e.emit("focus")),onBlur:a[2]||(a[2]=()=>e.emit("blur"))}),null,16,["modelValue","label","placeholder","items","loading","disabled","clearable","error","error-messages","hint","persistent-hint","density","variant"])}const We=P(Yo,[["render",Ro]]);function Jo(e){return e==="texto"||e==="numero"||e==="dataHora"}function Wo(e){var n,l;const a=(l=(n=e==null?void 0:e.entrada)==null?void 0:n[1])==null?void 0:l.rotulo;return String(a||((e==null?void 0:e.coluna)??"Filtro"))}const Zo=t.defineComponent({name:"EliTabelaModalFiltroAvancado",props:{aberto:{type:Boolean,required:!0},filtrosBase:{type:Array,required:!0},modelo:{type:Array,required:!0}},emits:{fechar:()=>!0,limpar:()=>!0,salvar:e=>!0},setup(e,{emit:a}){const n=t.ref([]),l=t.ref(""),s=t.computed(()=>(e.filtrosBase??[]).map(c=>String(c.coluna))),m=t.computed(()=>{const c=new Set(n.value.map(E=>String(E.coluna)));return(e.filtrosBase??[]).filter(E=>!c.has(String(E.coluna)))});function o(c){const E=c==null?void 0:c[0];return E==="numero"?Ve:E==="dataHora"?Ne:$e}function r(c){return(c==null?void 0:c[1])??{rotulo:""}}function u(c){return(c==null?void 0:c[0])==="numero"?null:""}function i(){var y;const c=e.filtrosBase??[],E=Array.isArray(e.modelo)?e.modelo:[];n.value=E.map(k=>{const j=c.find(O=>String(O.coluna)===String(k.coluna))??c[0],G=(j==null?void 0:j.entrada)??k.entrada,I=(j==null?void 0:j.coluna)??k.coluna,H=String((j==null?void 0:j.operador)??"="),X=k.valor??u(G);return{coluna:I,operador:H,entrada:G,valor:X}});for(const k of n.value)s.value.includes(String(k.coluna))&&(k.operador=String(((y=c.find(j=>String(j.coluna)===String(k.coluna)))==null?void 0:y.operador)??"="),k.entrada&&!Jo(k.entrada[0])&&(k.entrada=["texto",{rotulo:"Valor"}]))}t.watch(()=>[e.aberto,e.filtrosBase,e.modelo],()=>{e.aberto&&i()},{deep:!0,immediate:!0});function d(){if(!l.value)return;const c=(e.filtrosBase??[]).find(E=>String(E.coluna)===String(l.value));c&&(n.value.some(E=>String(E.coluna)===String(c.coluna))||(n.value.push({coluna:c.coluna,entrada:c.entrada,operador:String(c.operador??"="),valor:u(c.entrada)}),l.value=""))}function b(c){n.value.splice(c,1)}function N(){a("fechar")}function S(){a("limpar")}function $(){a("salvar",n.value.map(c=>({coluna:c.coluna,valor:c.valor})))}return{linhas:n,opcoesParaAdicionar:m,colunaParaAdicionar:l,componenteEntrada:o,opcoesEntrada:r,adicionar:d,remover:b,emitFechar:N,emitSalvar:$,emitLimpar:S,rotuloDoFiltro:Wo}}}),Go={class:"eli-tabela-modal-filtro__modal",role:"dialog","aria-modal":"true","aria-label":"Filtro avançado"},Xo={class:"eli-tabela-modal-filtro__header"},Ko={class:"eli-tabela-modal-filtro__conteudo"},Qo={key:0,class:"eli-tabela-modal-filtro__vazio"},xo={key:1,class:"eli-tabela-modal-filtro__lista"},en={class:"eli-tabela-modal-filtro__entrada"},tn=["onClick"],an={class:"eli-tabela-modal-filtro__acoes"},on=["disabled"],nn=["value"],rn=["disabled"],ln={class:"eli-tabela-modal-filtro__footer"};function sn(e,a,n,l,s,m){return e.aberto?(t.openBlock(),t.createElementBlock("div",{key:0,class:"eli-tabela-modal-filtro__overlay",role:"presentation",onClick:a[6]||(a[6]=t.withModifiers((...o)=>e.emitFechar&&e.emitFechar(...o),["self"]))},[t.createElementVNode("div",Go,[t.createElementVNode("header",Xo,[a[7]||(a[7]=t.createElementVNode("h3",{class:"eli-tabela-modal-filtro__titulo"},"Filtro avançado",-1)),t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-filtro__fechar","aria-label":"Fechar",onClick:a[0]||(a[0]=(...o)=>e.emitFechar&&e.emitFechar(...o))}," × ")]),t.createElementVNode("div",Ko,[e.filtrosBase.length?(t.openBlock(),t.createElementBlock("div",xo,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.linhas,(o,r)=>(t.openBlock(),t.createElementBlock("div",{key:String(o.coluna),class:"eli-tabela-modal-filtro__linha"},[t.createElementVNode("div",en,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.componenteEntrada(o.entrada)),{value:o.valor,"onUpdate:value":u=>o.valor=u,opcoes:e.opcoesEntrada(o.entrada),density:"compact"},null,40,["value","onUpdate:value","opcoes"]))]),t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-filtro__remover",title:"Remover","aria-label":"Remover",onClick:u=>e.remover(r)}," × ",8,tn)]))),128))])):(t.openBlock(),t.createElementBlock("div",Qo," Nenhum filtro configurado na tabela. ")),t.createElementVNode("div",an,[t.withDirectives(t.createElementVNode("select",{"onUpdate:modelValue":a[1]||(a[1]=o=>e.colunaParaAdicionar=o),class:"eli-tabela-modal-filtro__select",disabled:!e.opcoesParaAdicionar.length},[a[8]||(a[8]=t.createElementVNode("option",{disabled:"",value:""},"Selecione um filtro…",-1)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.opcoesParaAdicionar,o=>(t.openBlock(),t.createElementBlock("option",{key:String(o.coluna),value:String(o.coluna)},t.toDisplayString(e.rotuloDoFiltro(o)),9,nn))),128))],8,on),[[t.vModelSelect,e.colunaParaAdicionar]]),t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-filtro__botao",onClick:a[2]||(a[2]=(...o)=>e.adicionar&&e.adicionar(...o)),disabled:!e.colunaParaAdicionar}," Adicionar ",8,rn)])]),t.createElementVNode("footer",ln,[t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-filtro__botao eli-tabela-modal-filtro__botao--sec",onClick:a[3]||(a[3]=(...o)=>e.emitLimpar&&e.emitLimpar(...o))}," Limpar "),t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-filtro__botao eli-tabela-modal-filtro__botao--sec",onClick:a[4]||(a[4]=(...o)=>e.emitFechar&&e.emitFechar(...o))}," Cancelar "),t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-filtro__botao eli-tabela-modal-filtro__botao--prim",onClick:a[5]||(a[5]=(...o)=>e.emitSalvar&&e.emitSalvar(...o))}," Aplicar ")])])])):t.createCommentVNode("",!0)}const cn=P(Zo,[["render",sn],["__scopeId","data-v-ae32fe4c"]]),dn="eli:tabela";function Ze(e){return`${dn}:${e}:colunas`}function Ge(e){if(!e||typeof e!="object")return{visiveis:[],invisiveis:[]};const a=e,n=Array.isArray(a.visiveis)?a.visiveis.filter(s=>typeof s=="string"):[],l=Array.isArray(a.invisiveis)?a.invisiveis.filter(s=>typeof s=="string"):[];return{visiveis:n,invisiveis:l}}function Xe(e){try{const a=window.localStorage.getItem(Ze(e));return a?Ge(JSON.parse(a)):{visiveis:[],invisiveis:[]}}catch{return{visiveis:[],invisiveis:[]}}}function un(e,a){try{window.localStorage.setItem(Ze(e),JSON.stringify(Ge(a)))}catch{}}function De(e){return`eli_tabela:${e}:filtro_avancado`}function Ke(e){try{const a=localStorage.getItem(De(e));if(!a)return[];const n=JSON.parse(a);return Array.isArray(n)?n:[]}catch{return[]}}function mn(e,a){try{localStorage.setItem(De(e),JSON.stringify(a??[]))}catch{}}function pn(e){try{localStorage.removeItem(De(e))}catch{}}const fn=t.defineComponent({name:"EliTabela",inheritAttrs:!1,components:{EliTabelaCabecalho:Rt,EliTabelaEstados:Qt,EliTabelaDebug:aa,EliTabelaHead:ma,EliTabelaBody:to,EliTabelaMenuAcoes:io,EliTabelaPaginacao:ho,EliTabelaModalColunas:Do,EliTabelaModalFiltroAvancado:cn},props:{tabela:{type:Object,required:!0}},setup(e){const n=t.ref(!1),l=t.ref(null),s=t.ref([]),m=t.ref(0),o=t.ref([]),r=t.ref(null),u=t.ref(null),i=t.ref({top:0,left:0}),d=t.ref(""),b=t.ref(1),N=t.ref(null),S=t.ref("asc"),$=t.ref(!1),c=t.ref(Ke(e.tabela.nome));function E(){$.value=!0}function y(){$.value=!1}function k(){c.value=[],pn(e.tabela.nome),$.value=!1,b.value!==1&&(b.value=1)}function j(h){c.value=h??[],mn(e.tabela.nome,h??[]),$.value=!1,b.value!==1&&(b.value=1)}const G=t.computed(()=>{const h=e.tabela.filtroAvancado??[];return(c.value??[]).filter(C=>C&&C.coluna!==void 0).map(C=>{const D=h.find(M=>String(M.coluna)===String(C.coluna));return D?{coluna:String(D.coluna),operador:D.operador,valor:C.valor}:null}).filter(Boolean)}),I=t.computed(()=>e.tabela),H=t.computed(()=>!!e.tabela.mostrarCaixaDeBusca),X=t.computed(()=>e.tabela.acoesTabela??[]),O=t.computed(()=>X.value.length>0),ae=t.ref(!1),w=t.ref(Xe(e.tabela.nome)),A=t.ref({}),de=t.computed(()=>e.tabela.colunas.map(h=>h.rotulo)),he=t.computed(()=>{var Q,x;const h=e.tabela.colunas,D=(((Q=w.value.visiveis)==null?void 0:Q.length)??0)>0||(((x=w.value.invisiveis)==null?void 0:x.length)??0)>0?w.value.invisiveis??[]:h.filter(q=>q.visivel===!1).map(q=>q.rotulo),M=new Set(D),J=h.filter(q=>M.has(q.rotulo)),Z=D,te=new Map;for(const q of J)te.has(q.rotulo)||te.set(q.rotulo,q);const K=[];for(const q of Z){const oe=te.get(q);oe&&K.push(oe)}for(const q of J)K.includes(q)||K.push(q);return K}),_=t.computed(()=>he.value.length>0),g=t.computed(()=>{var q,oe;const h=e.tabela.colunas,C=de.value,D=(((q=w.value.visiveis)==null?void 0:q.length)??0)>0||(((oe=w.value.invisiveis)==null?void 0:oe.length)??0)>0,M=D?w.value.invisiveis??[]:e.tabela.colunas.filter(z=>z.visivel===!1).map(z=>z.rotulo),J=new Set(M),Z=C.filter(z=>!J.has(z)),te=new Set(Z),K=D?w.value.visiveis??[]:[],Q=[];for(const z of K)te.has(z)&&Q.push(z);for(const z of Z)Q.includes(z)||Q.push(z);const x=new Map;for(const z of h)x.has(z.rotulo)||x.set(z.rotulo,z);return Q.map(z=>x.get(z)).filter(Boolean)});function p(){ae.value=!0}function B(){ae.value=!1}function f(h){w.value=h,un(e.tabela.nome,h),ae.value=!1,A.value={}}function V(h){const C=!!A.value[h];A.value={...A.value,[h]:!C}}const v=t.computed(()=>{const h=e.tabela.registros_por_consulta;return typeof h=="number"&&h>0?Math.floor(h):10});function T(h){const C=(d.value??"").trim().toLowerCase();return C?h.filter(D=>JSON.stringify(D).toLowerCase().includes(C)):h}function L(h,C,D){switch(h){case"=":return C==D;case"!=":return C!=D;case">":return Number(C)>Number(D);case">=":return Number(C)>=Number(D);case"<":return Number(C)J.trim()).filter(Boolean)).includes(String(C));case"isNull":return C==null||C==="";default:return!0}}function U(h){const C=G.value;return C.length?h.filter(D=>C.every(M=>{const J=D==null?void 0:D[M.coluna];return L(String(M.operador),J,M.valor)})):h}const R=t.computed(()=>{const h=s.value??[];return U(T(h))}),W=t.computed(()=>R.value.length),ne=t.computed(()=>{const h=v.value;if(!h||h<=0)return 1;const C=W.value;return C?Math.max(1,Math.ceil(C/h)):1}),re=t.computed(()=>{const h=Math.max(1,v.value),C=(b.value-1)*h;return R.value.slice(C,C+h)}),ue=t.computed(()=>(e.tabela.acoesLinha??[]).length>0),le=t.computed(()=>(e.tabela.filtroAvancado??[]).length>0);let Y=0;function ee(h){var K,Q,x,q,oe,z;const C=h.getBoundingClientRect(),D=8,M=((x=(Q=(K=u.value)==null?void 0:K.menuEl)==null?void 0:Q.value)==null?void 0:x.offsetHeight)??0,J=((z=(oe=(q=u.value)==null?void 0:q.menuEl)==null?void 0:oe.value)==null?void 0:z.offsetWidth)??180;let Z=C.bottom+D;const te=C.right-J;M&&Z+M>window.innerHeight-D&&(Z=C.top-D-M),i.value={top:Math.max(D,Math.round(Z)),left:Math.max(D,Math.round(te))}}function ce(h){var D,M;if(r.value===null)return;const C=h.target;(M=(D=u.value)==null?void 0:D.menuEl)!=null&&M.value&&u.value.menuEl.value.contains(C)||(r.value=null)}function fe(h){if(h){if(N.value===h){S.value=S.value==="asc"?"desc":"asc",me();return}N.value=h,S.value="asc",b.value!==1?b.value=1:me()}}function $n(h){d.value!==h&&(d.value=h,b.value!==1?b.value=1:me())}function En(h){const C=Math.min(Math.max(1,h),ne.value);C!==b.value&&(b.value=C)}function xe(h){const C=e.tabela.acoesLinha??[],D=o.value[h]??[];return C.map((M,J)=>{const Z=M.exibir===void 0?!0:typeof M.exibir=="boolean"?M.exibir:!1;return{acao:M,indice:J,visivel:D[J]??Z}}).filter(M=>M.visivel)}function et(h){return xe(h).length>0}function kn(h,C){if(!et(h))return;if(r.value===h){r.value=null;return}r.value=h;const D=(C==null?void 0:C.currentTarget)??null;D&&(ee(D),requestAnimationFrame(()=>ee(D)))}async function me(){var J;const h=++Y;n.value=!0,l.value=null,o.value=[],r.value=null,A.value={};const C=Math.max(1,v.value),M={offSet:0,limit:999999};N.value&&(M.coluna_ordem=N.value,M.direcao_ordem=S.value);try{const Z=e.tabela,te=await Z.consulta(M);if(h!==Y)return;if(te.cod!==Te.sucesso){s.value=[],m.value=0,l.value=te.mensagem;return}const K=((J=te.valor)==null?void 0:J.valores)??[],Q=K.length;s.value=K,m.value=Q;const x=Math.max(1,Math.ceil((W.value||0)/C));if(b.value>x){b.value=x;return}const q=Z.acoesLinha??[];if(!q.length){o.value=[];return}const oe=K.map(()=>q.map(ge=>ge.exibir===void 0?!0:typeof ge.exibir=="boolean"?ge.exibir:!1));o.value=oe;const z=await Promise.all(K.map(async ge=>Promise.all(q.map(async Be=>{if(Be.exibir===void 0)return!0;if(typeof Be.exibir=="boolean")return Be.exibir;try{const Bn=Be.exibir(ge);return!!await Promise.resolve(Bn)}catch{return!1}}))));h===Y&&(o.value=z)}catch(Z){if(h!==Y)return;s.value=[],m.value=0,l.value=Z instanceof Error?Z.message:"Erro ao carregar dados."}finally{h===Y&&(n.value=!1)}}return t.onMounted(()=>{document.addEventListener("click",ce),me()}),t.onBeforeUnmount(()=>{document.removeEventListener("click",ce)}),t.watch(()=>e.tabela.mostrarCaixaDeBusca,h=>{!h&&d.value&&(d.value="",b.value!==1?b.value=1:me())}),t.watch(b,(h,C)=>{}),t.watch(()=>e.tabela,()=>{r.value=null,N.value=null,S.value="asc",d.value="",ae.value=!1,$.value=!1,w.value=Xe(e.tabela.nome),c.value=Ke(e.tabela.nome),A.value={},b.value!==1?b.value=1:me()}),t.watch(()=>e.tabela.registros_por_consulta,()=>{b.value!==1?b.value=1:me()}),t.watch(s,()=>{r.value=null,A.value={}}),{isDev:!1,tabela:I,carregando:n,erro:l,linhas:s,linhasPaginadas:re,quantidadeFiltrada:W,quantidade:m,menuAberto:r,valorBusca:d,paginaAtual:b,colunaOrdenacao:N,direcaoOrdenacao:S,totalPaginas:ne,exibirBusca:H,exibirFiltroAvancado:le,acoesCabecalho:X,temAcoesCabecalho:O,temAcoes:ue,colunasEfetivas:g,rotulosColunas:de,modalColunasAberto:ae,configColunas:w,temColunasInvisiveis:_,colunasInvisiveisEfetivas:he,linhasExpandidas:A,abrirModalColunas:p,abrirModalFiltro:E,fecharModalColunas:B,salvarModalColunas:f,modalFiltroAberto:$,filtrosUi:c,salvarFiltrosAvancados:j,limparFiltrosAvancados:k,fecharModalFiltro:y,alternarLinhaExpandida:V,alternarOrdenacao:fe,atualizarBusca:$n,irParaPagina:En,acoesDisponiveisPorLinha:xe,possuiAcoes:et,toggleMenu:kn,menuPopup:u,menuPopupPos:i}}}),bn={class:"eli-tabela"},hn={class:"eli-tabela__table"};function gn(e,a,n,l,s,m){const o=t.resolveComponent("EliTabelaDebug"),r=t.resolveComponent("EliTabelaEstados"),u=t.resolveComponent("EliTabelaCabecalho"),i=t.resolveComponent("EliTabelaModalColunas"),d=t.resolveComponent("EliTabelaModalFiltroAvancado"),b=t.resolveComponent("EliTabelaHead"),N=t.resolveComponent("EliTabelaBody"),S=t.resolveComponent("EliTabelaMenuAcoes"),$=t.resolveComponent("EliTabelaPaginacao");return t.openBlock(),t.createElementBlock("div",bn,[t.createVNode(o,{isDev:e.isDev,menuAberto:e.menuAberto,menuPopupPos:e.menuPopupPos},null,8,["isDev","menuAberto","menuPopupPos"]),e.carregando||e.erro||!e.linhas.length?(t.openBlock(),t.createBlock(r,{key:0,carregando:e.carregando,erro:e.erro,mensagemVazio:e.tabela.mensagemVazio},null,8,["carregando","erro","mensagemVazio"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.exibirBusca||e.temAcoesCabecalho?(t.openBlock(),t.createBlock(u,{key:0,exibirBusca:e.exibirBusca,exibirBotaoFiltroAvancado:e.exibirFiltroAvancado,valorBusca:e.valorBusca,acoesCabecalho:e.acoesCabecalho,onBuscar:e.atualizarBusca,onColunas:e.abrirModalColunas,onFiltroAvancado:e.abrirModalFiltro},null,8,["exibirBusca","exibirBotaoFiltroAvancado","valorBusca","acoesCabecalho","onBuscar","onColunas","onFiltroAvancado"])):t.createCommentVNode("",!0),t.createVNode(i,{aberto:e.modalColunasAberto,rotulosColunas:e.rotulosColunas,configInicial:e.configColunas,colunas:e.tabela.colunas,onFechar:e.fecharModalColunas,onSalvar:e.salvarModalColunas},null,8,["aberto","rotulosColunas","configInicial","colunas","onFechar","onSalvar"]),t.createVNode(d,{aberto:e.modalFiltroAberto,filtrosBase:e.tabela.filtroAvancado??[],modelo:e.filtrosUi,onFechar:e.fecharModalFiltro,onLimpar:e.limparFiltrosAvancados,onSalvar:e.salvarFiltrosAvancados},null,8,["aberto","filtrosBase","modelo","onFechar","onLimpar","onSalvar"]),t.createElementVNode("table",hn,[t.createVNode(b,{colunas:e.colunasEfetivas,temAcoes:e.temAcoes,temColunasInvisiveis:e.temColunasInvisiveis,colunaOrdenacao:e.colunaOrdenacao,direcaoOrdenacao:e.direcaoOrdenacao,onAlternarOrdenacao:e.alternarOrdenacao},null,8,["colunas","temAcoes","temColunasInvisiveis","colunaOrdenacao","direcaoOrdenacao","onAlternarOrdenacao"]),t.createVNode(N,{colunas:e.colunasEfetivas,colunasInvisiveis:e.colunasInvisiveisEfetivas,temColunasInvisiveis:e.temColunasInvisiveis,linhasExpandidas:e.linhasExpandidas,linhas:e.linhasPaginadas,temAcoes:e.temAcoes,menuAberto:e.menuAberto,possuiAcoes:e.possuiAcoes,toggleMenu:e.toggleMenu,alternarLinhaExpandida:e.alternarLinhaExpandida},null,8,["colunas","colunasInvisiveis","temColunasInvisiveis","linhasExpandidas","linhas","temAcoes","menuAberto","possuiAcoes","toggleMenu","alternarLinhaExpandida"])]),t.createVNode(S,{ref:"menuPopup",menuAberto:e.menuAberto,posicao:e.menuPopupPos,acoes:e.menuAberto===null?[]:e.acoesDisponiveisPorLinha(e.menuAberto),linha:e.menuAberto===null?null:e.linhasPaginadas[e.menuAberto],onExecutar:a[0]||(a[0]=({acao:c,linha:E})=>{e.menuAberto=null,c.acao(E)})},null,8,["menuAberto","posicao","acoes","linha"]),e.totalPaginas>1&&e.quantidadeFiltrada>0?(t.openBlock(),t.createBlock($,{key:1,pagina:e.paginaAtual,totalPaginas:e.totalPaginas,maximoBotoes:e.tabela.maximo_botoes_paginacao,onAlterar:e.irParaPagina},null,8,["pagina","totalPaginas","maximoBotoes","onAlterar"])):t.createCommentVNode("",!0)],64))])}const Qe=P(fn,[["render",gn]]),yn={install(e){e.component("EliOlaMundo",Me),e.component("EliBotao",ve),e.component("EliBadge",ye),e.component("EliCartao",we),e.component("EliTabela",Qe),e.component("EliEntradaTexto",$e),e.component("EliEntradaNumero",Ve),e.component("EliEntradaDataHora",Ne),e.component("EliEntradaParagrafo",Je),e.component("EliEntradaSelecao",We)}};F.EliBadge=ye,F.EliBotao=ve,F.EliCartao=we,F.EliEntradaDataHora=Ne,F.EliEntradaNumero=Ve,F.EliEntradaParagrafo=Je,F.EliEntradaSelecao=We,F.EliEntradaTexto=$e,F.EliOlaMundo=Me,F.EliTabela=Qe,F.default=yn,Object.defineProperties(F,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})})); + */const At=fe("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),Mt=t.defineComponent({name:"EliTabelaCaixaDeBusca",components:{Search:At},props:{modelo:{type:String,required:!1,default:""}},emits:{buscar(e){return typeof e=="string"}},setup(e,{emit:a}){const n=t.ref(e.modelo??"");t.watch(()=>e.modelo,s=>{s!==void 0&&s!==n.value&&(n.value=s)});function l(){a("buscar",n.value.trim())}return{texto:n,emitirBusca:l}}}),wt={class:"eli-tabela__busca"},Tt={class:"eli-tabela__busca-input-wrapper"};function Pt(e,a,n,l,s,m){const o=t.resolveComponent("Search");return t.openBlock(),t.createElementBlock("div",wt,[t.createElementVNode("div",Tt,[t.withDirectives(t.createElementVNode("input",{id:"eli-tabela-busca","onUpdate:modelValue":a[0]||(a[0]=r=>e.texto=r),type:"search",class:"eli-tabela__busca-input",placeholder:"Digite termos para filtrar",onKeyup:a[1]||(a[1]=t.withKeys((...r)=>e.emitirBusca&&e.emitirBusca(...r),["enter"]))},null,544),[[t.vModelText,e.texto]]),t.createElementVNode("button",{type:"button",class:"eli-tabela__busca-botao","aria-label":"Buscar",title:"Buscar",onClick:a[2]||(a[2]=(...r)=>e.emitirBusca&&e.emitirBusca(...r))},[t.createVNode(o,{class:"eli-tabela__busca-botao-icone",size:16,"stroke-width":2,"aria-hidden":"true"})])])])}const Ft=T(Mt,[["render",Pt],["__scopeId","data-v-341415d1"]]),Ot=t.defineComponent({name:"EliTabelaCabecalho",components:{EliTabelaCaixaDeBusca:Ft},props:{exibirBusca:{type:Boolean,required:!0},exibirBotaoColunas:{type:Boolean,required:!1,default:!0},exibirBotaoFiltroAvancado:{type:Boolean,required:!1,default:!1},valorBusca:{type:String,required:!0},acoesCabecalho:{type:Array,required:!0}},emits:{buscar(e){return typeof e=="string"},colunas(){return!0},filtroAvancado(){return!0}},setup(e,{emit:a}){const n=t.computed(()=>e.acoesCabecalho.length>0);function l(o){a("buscar",o)}function s(){a("colunas")}function m(){a("filtroAvancado")}return{temAcoesCabecalho:n,emitBuscar:l,emitColunas:s,emitFiltroAvancado:m}}}),qt={class:"eli-tabela__cabecalho"},It={key:0,class:"eli-tabela__busca-grupo"},Lt={key:1,class:"eli-tabela__acoes-cabecalho"},zt=["onClick"],jt={class:"eli-tabela__acoes-cabecalho-rotulo"};function Ht(e,a,n,l,s,m){const o=t.resolveComponent("EliTabelaCaixaDeBusca");return t.openBlock(),t.createElementBlock("div",qt,[e.exibirBusca?(t.openBlock(),t.createElementBlock("div",It,[e.exibirBotaoColunas?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"eli-tabela__acoes-cabecalho-botao eli-tabela__acoes-cabecalho-botao--colunas",onClick:a[0]||(a[0]=(...r)=>e.emitColunas&&e.emitColunas(...r))}," Colunas ")):t.createCommentVNode("",!0),e.exibirBotaoFiltroAvancado?(t.openBlock(),t.createElementBlock("button",{key:1,type:"button",class:"eli-tabela__acoes-cabecalho-botao eli-tabela__acoes-cabecalho-botao--filtro",onClick:a[1]||(a[1]=(...r)=>e.emitFiltroAvancado&&e.emitFiltroAvancado(...r))}," Filtro ")):t.createCommentVNode("",!0),t.createVNode(o,{modelo:e.valorBusca,onBuscar:e.emitBuscar},null,8,["modelo","onBuscar"])])):t.createCommentVNode("",!0),e.temAcoesCabecalho?(t.openBlock(),t.createElementBlock("div",Lt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.acoesCabecalho,(r,u)=>(t.openBlock(),t.createElementBlock("button",{key:`${r.rotulo}-${u}`,type:"button",class:"eli-tabela__acoes-cabecalho-botao",style:t.normalizeStyle(r.cor?{backgroundColor:r.cor,color:"#fff"}:void 0),onClick:r.acao},[r.icone?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.icone),{key:0,class:"eli-tabela__acoes-cabecalho-icone",size:16,"stroke-width":2})):t.createCommentVNode("",!0),t.createElementVNode("span",jt,t.toDisplayString(r.rotulo),1)],12,zt))),128))])):t.createCommentVNode("",!0)])}const Ut=T(Ot,[["render",Ht],["__scopeId","data-v-17166105"]]),Yt=t.defineComponent({name:"EliTabelaEstados",props:{carregando:{type:Boolean,required:!0},erro:{type:String,required:!0},mensagemVazio:{type:String,required:!1,default:void 0}}}),Rt={key:0,class:"eli-tabela eli-tabela--carregando","aria-busy":"true"},Jt={key:1,class:"eli-tabela eli-tabela--erro",role:"alert"},Wt={class:"eli-tabela__erro-mensagem"},Zt={key:2,class:"eli-tabela eli-tabela--vazio"};function Gt(e,a,n,l,s,m){return e.carregando?(t.openBlock(),t.createElementBlock("div",Rt," Carregando... ")):e.erro?(t.openBlock(),t.createElementBlock("div",Jt,[a[0]||(a[0]=t.createElementVNode("div",{class:"eli-tabela__erro-titulo"},"Erro",-1)),t.createElementVNode("div",Wt,t.toDisplayString(e.erro),1)])):(t.openBlock(),t.createElementBlock("div",Zt,t.toDisplayString(e.mensagemVazio??"Nenhum registro encontrado."),1))}const Xt=T(Yt,[["render",Gt]]),Kt=t.defineComponent({name:"EliTabelaDebug",props:{isDev:{type:Boolean,required:!0},menuAberto:{type:Number,required:!0},menuPopupPos:{type:Object,required:!0}}}),Qt={key:0,style:{position:"fixed",left:"8px",bottom:"8px","z-index":"999999",background:"rgba(185,28,28,0.9)",color:"#fff",padding:"6px 10px","border-radius":"8px","font-size":"12px","max-width":"500px"}};function xt(e,a,n,l,s,m){return e.isDev?(t.openBlock(),t.createElementBlock("div",Qt,[a[0]||(a[0]=t.createElementVNode("div",null,[t.createElementVNode("b",null,"EliTabela debug")],-1)),t.createElementVNode("div",null,"menuAberto: "+t.toDisplayString(e.menuAberto),1),t.createElementVNode("div",null,"menuPos: top="+t.toDisplayString(e.menuPopupPos.top)+", left="+t.toDisplayString(e.menuPopupPos.left),1),t.renderSlot(e.$slots,"default")])):t.createCommentVNode("",!0)}const ea=T(Kt,[["render",xt]]),ta=t.defineComponent({name:"EliTabelaHead",components:{ArrowUp:qe,ArrowDown:Oe},props:{colunas:{type:Array,required:!0},temAcoes:{type:Boolean,required:!0},temColunasInvisiveis:{type:Boolean,required:!0},colunaOrdenacao:{type:String,required:!0},direcaoOrdenacao:{type:String,required:!0}},emits:{alternarOrdenacao(e){return typeof e=="string"&&e.length>0}},setup(e,{emit:a}){function n(s){return(s==null?void 0:s.coluna_ordem)!==void 0&&(s==null?void 0:s.coluna_ordem)!==null}function l(s){a("alternarOrdenacao",s)}return{ArrowUp:qe,ArrowDown:Oe,isOrdenavel:n,emitAlternarOrdenacao:l}}}),aa={class:"eli-tabela__thead"},oa={class:"eli-tabela__tr eli-tabela__tr--header"},na={key:0,class:"eli-tabela__th eli-tabela__th--expander",scope:"col"},ra=["onClick"],la={class:"eli-tabela__th-texto"},ia={key:1,class:"eli-tabela__th-label"},sa={key:1,class:"eli-tabela__th eli-tabela__th--acoes",scope:"col"};function ca(e,a,n,l,s,m){const o=t.resolveComponent("ArrowUp");return t.openBlock(),t.createElementBlock("thead",aa,[t.createElementVNode("tr",oa,[e.temColunasInvisiveis?(t.openBlock(),t.createElementBlock("th",na)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.colunas,(r,u)=>(t.openBlock(),t.createElementBlock("th",{key:`th-${u}`,class:t.normalizeClass(["eli-tabela__th",[e.isOrdenavel(r)?"eli-tabela__th--ordenavel":void 0]]),scope:"col"},[e.isOrdenavel(r)?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:t.normalizeClass(["eli-tabela__th-botao",[e.colunaOrdenacao===String(r.coluna_ordem)?"eli-tabela__th-botao--ativo":void 0]]),onClick:i=>e.emitAlternarOrdenacao(String(r.coluna_ordem))},[t.createElementVNode("span",la,t.toDisplayString(r.rotulo),1),e.colunaOrdenacao===String(r.coluna_ordem)?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.direcaoOrdenacao==="asc"?e.ArrowUp:e.ArrowDown),{key:0,class:"eli-tabela__th-icone",size:16,"stroke-width":2,"aria-hidden":"true"})):(t.openBlock(),t.createBlock(o,{key:1,class:"eli-tabela__th-icone eli-tabela__th-icone--oculto",size:16,"stroke-width":2,"aria-hidden":"true"}))],10,ra)):(t.openBlock(),t.createElementBlock("span",ia,t.toDisplayString(r.rotulo),1))],2))),128)),e.temAcoes?(t.openBlock(),t.createElementBlock("th",sa," Ações ")):t.createCommentVNode("",!0)])])}const da=T(ta,[["render",ca]]),ua=t.defineComponent({name:"EliTabelaCelulaTextoSimples",components:{},props:{dados:{type:Object}},data(){return{}},methods:{},setup({dados:e}){return{dados:e}}}),ma={key:1};function pa(e,a,n,l,s,m){var o,r,u;return(o=e.dados)!=null&&o.acao?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"eli-tabela__celula-link",onClick:a[0]||(a[0]=t.withModifiers(i=>e.dados.acao(),["stop","prevent"]))},t.toDisplayString((r=e.dados)==null?void 0:r.texto),1)):(t.openBlock(),t.createElementBlock("span",ma,t.toDisplayString((u=e.dados)==null?void 0:u.texto),1))}const fa=T(ua,[["render",pa],["__scopeId","data-v-7a629ffa"]]),ba=t.defineComponent({name:"EliTabelaCelulaTextoTruncado",props:{dados:{type:Object}},setup({dados:e}){return{dados:e}}}),ha=["title"],ga=["title"];function ya(e,a,n,l,s,m){var o,r,u,i,d;return(o=e.dados)!=null&&o.acao?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"eli-tabela__texto-truncado eli-tabela__celula-link",title:(r=e.dados)==null?void 0:r.texto,onClick:a[0]||(a[0]=t.withModifiers(b=>{var v,C;return(C=(v=e.dados)==null?void 0:v.acao)==null?void 0:C.call(v)},["stop","prevent"]))},t.toDisplayString((u=e.dados)==null?void 0:u.texto),9,ha)):(t.openBlock(),t.createElementBlock("span",{key:1,class:"eli-tabela__texto-truncado",title:(i=e.dados)==null?void 0:i.texto},t.toDisplayString((d=e.dados)==null?void 0:d.texto),9,ga))}const $a=T(ba,[["render",ya],["__scopeId","data-v-20b03658"]]),Ea=t.defineComponent({name:"EliTabelaCelulaNumero",components:{},props:{dados:{type:Object}},setup({dados:e}){const a=t.computed(()=>{var r,u;const n=String(e==null?void 0:e.numero).replace(".",","),l=(r=e==null?void 0:e.prefixo)==null?void 0:r.trim(),s=(u=e==null?void 0:e.sufixo)==null?void 0:u.trim(),m=l?`${l} `:"",o=s?` ${s}`:"";return`${m}${n}${o}`});return{dados:e,textoNumero:a}}}),ka={key:1};function Ba(e,a,n,l,s,m){var o;return(o=e.dados)!=null&&o.acao?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"eli-tabela__celula-link",onClick:a[0]||(a[0]=t.withModifiers(r=>e.dados.acao(),["stop","prevent"]))},t.toDisplayString(e.textoNumero),1)):(t.openBlock(),t.createElementBlock("span",ka,t.toDisplayString(e.textoNumero),1))}const va=T(Ea,[["render",Ba],["__scopeId","data-v-69c890c4"]]),Ca=t.defineComponent({name:"EliTabelaCelulaTags",components:{VChip:Ce.VChip},props:{dados:{type:Object,required:!1}},setup({dados:e}){return{dados:e}}}),_a={class:"eli-tabela__celula-tags"};function Va(e,a,n,l,s,m){var o;return t.openBlock(),t.createElementBlock("div",_a,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(((o=e.dados)==null?void 0:o.opcoes)??[],(r,u)=>(t.openBlock(),t.createBlock(at.VChip,{key:u,class:"eli-tabela__celula-tag",size:"small",variant:"tonal",color:r.cor,clickable:!!r.acao,onClick:t.withModifiers(i=>{var d;return(d=r.acao)==null?void 0:d.call(r)},["stop","prevent"])},{default:t.withCtx(()=>[r.icone?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.icone),{key:0,class:"eli-tabela__celula-tag-icone",size:14})):t.createCommentVNode("",!0),t.createElementVNode("span",null,t.toDisplayString(r.rotulo),1)]),_:2},1032,["color","clickable","onClick"]))),128))])}const Sa=T(Ca,[["render",Va],["__scopeId","data-v-a9c83dbe"]]);function ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ee={exports:{}},Da=Ee.exports,je;function Na(){return je||(je=1,(function(e,a){(function(n,l){e.exports=l()})(Da,(function(){var n=1e3,l=6e4,s=36e5,m="millisecond",o="second",r="minute",u="hour",i="day",d="week",b="month",v="quarter",C="year",y="date",c="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,E={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(_){var h=["th","st","nd","rd"],p=_%100;return"["+_+(h[(p-20)%10]||h[p]||h[0])+"]"}},j=function(_,h,p){var k=String(_);return!k||k.length>=h?_:""+Array(h+1-k.length).join(p)+_},W={s:j,z:function(_){var h=-_.utcOffset(),p=Math.abs(h),k=Math.floor(p/60),f=p%60;return(h<=0?"+":"-")+j(k,2,"0")+":"+j(f,2,"0")},m:function _(h,p){if(h.date()1)return _(V[0])}else{var M=h.name;H[M]=h,f=M}return!k&&f&&(I=f),f||!k&&I},A=function(_,h){if(P(_))return _.clone();var p=typeof h=="object"?h:{};return p.date=_,p.args=arguments,new me(p)},D=W;D.l=ae,D.i=P,D.w=function(_,h){return A(_,{locale:h.$L,utc:h.$u,x:h.$x,$offset:h.$offset})};var me=(function(){function _(p){this.$L=ae(p.locale,null,!0),this.parse(p),this.$x=this.$x||p.x||{},this[G]=!0}var h=_.prototype;return h.parse=function(p){this.$d=(function(k){var f=k.date,S=k.utc;if(f===null)return new Date(NaN);if(D.u(f))return new Date;if(f instanceof Date)return new Date(f);if(typeof f=="string"&&!/Z$/i.test(f)){var V=f.match($);if(V){var M=V[2]-1||0,L=(V[7]||"0").substring(0,3);return S?new Date(Date.UTC(V[1],M,V[3]||1,V[4]||0,V[5]||0,V[6]||0,L)):new Date(V[1],M,V[3]||1,V[4]||0,V[5]||0,V[6]||0,L)}}return new Date(f)})(p),this.init()},h.init=function(){var p=this.$d;this.$y=p.getFullYear(),this.$M=p.getMonth(),this.$D=p.getDate(),this.$W=p.getDay(),this.$H=p.getHours(),this.$m=p.getMinutes(),this.$s=p.getSeconds(),this.$ms=p.getMilliseconds()},h.$utils=function(){return D},h.isValid=function(){return this.$d.toString()!==c},h.isSame=function(p,k){var f=A(p);return this.startOf(k)<=f&&f<=this.endOf(k)},h.isAfter=function(p,k){return A(p)0,H<=I.r||!I.r){H<=1&&W>0&&(I=E[W-1]);var G=g[I.l];C&&(H=C(""+H)),c=typeof G=="string"?G.replace("%d",H):G(H,d,I.l,$);break}}if(d)return c;var P=$?g.future:g.past;return typeof P=="function"?P(c):P.replace("%s",c)},m.to=function(i,d){return r(i,d,this,!0)},m.from=function(i,d){return r(i,d,this)};var u=function(i){return i.$u?s.utc():s()};m.toNow=function(i){return this.to(u(this),i)},m.fromNow=function(i){return this.from(u(this),i)}}}))})(ke)),ke.exports}var Ta=wa();const Pa=ze(Ta);ce.extend(Pa);const Fa=t.defineComponent({name:"EliTabelaCelulaData",props:{dados:{type:Object,required:!1}},setup({dados:e}){const a=t.computed(()=>{const n=e==null?void 0:e.valor;if(!n)return"";const l=(e==null?void 0:e.formato)??"data";return l==="relativo"?ce(n).fromNow():l==="data_hora"?ce(n).format("DD/MM/YYYY HH:mm"):ce(n).format("DD/MM/YYYY")});return{dados:e,textoData:a}}}),Oa={key:1};function qa(e,a,n,l,s,m){var o;return(o=e.dados)!=null&&o.acao?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"eli-tabela__celula-link",onClick:a[0]||(a[0]=t.withModifiers(r=>e.dados.acao(),["stop","prevent"]))},t.toDisplayString(e.textoData),1)):(t.openBlock(),t.createElementBlock("span",Oa,t.toDisplayString(e.textoData),1))}const Ia={textoSimples:fa,textoTruncado:$a,numero:va,tags:Sa,data:T(Fa,[["render",qa],["__scopeId","data-v-2b88bbb2"]])},La=t.defineComponent({name:"EliTabelaCelula",props:{celula:{type:Array,required:!0}},setup(e){const a=t.computed(()=>e.celula[0]),n=t.computed(()=>e.celula[1]),l=t.computed(()=>Ia[a.value]),s=t.computed(()=>n.value);return{Componente:l,dadosParaComponente:s}}});function za(e,a,n,l,s,m){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Componente),{dados:e.dadosParaComponente},null,8,["dados"])}const Ue=T(La,[["render",za]]),ja=t.defineComponent({name:"EliTabelaDetalhesLinha",components:{EliTabelaCelula:Ue},props:{linha:{type:null,required:!0},colunasInvisiveis:{type:Array,required:!0}}}),Ha={class:"eli-tabela__detalhes"},Ua={class:"eli-tabela__detalhe-rotulo"},Ya={class:"eli-tabela__detalhe-valor"};function Ra(e,a,n,l,s,m){const o=t.resolveComponent("EliTabelaCelula");return t.openBlock(),t.createElementBlock("div",Ha,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.colunasInvisiveis,(r,u)=>(t.openBlock(),t.createElementBlock("div",{key:`det-${u}-${r.rotulo}`,class:"eli-tabela__detalhe"},[t.createElementVNode("div",Ua,t.toDisplayString(r.rotulo),1),t.createElementVNode("div",Ya,[t.createVNode(o,{celula:r.celula(e.linha)},null,8,["celula"])])]))),128))])}const Ja=T(ja,[["render",Ra],["__scopeId","data-v-f1ee8d20"]]),Wa=t.defineComponent({name:"EliTabelaBody",components:{EliTabelaCelula:Ue,EliTabelaDetalhesLinha:Ja,MoreVertical:Nt,ChevronRight:Le,ChevronDown:Ie},props:{colunas:{type:Array,required:!0},colunasInvisiveis:{type:Array,required:!0},temColunasInvisiveis:{type:Boolean,required:!0},linhasExpandidas:{type:Object,required:!0},linhas:{type:Array,required:!0},temAcoes:{type:Boolean,required:!0},menuAberto:{type:Number,required:!0},possuiAcoes:{type:Function,required:!0},toggleMenu:{type:Function,required:!0},alternarLinhaExpandida:{type:Function,required:!0}},setup(){return{ChevronRight:Le,ChevronDown:Ie}}}),Za={class:"eli-tabela__tbody"},Ga=["aria-expanded","aria-label","title","onClick"],Xa=["id","disabled","aria-expanded","aria-controls","aria-label","title","onClick"],Ka=["colspan"];function Qa(e,a,n,l,s,m){const o=t.resolveComponent("EliTabelaCelula"),r=t.resolveComponent("MoreVertical"),u=t.resolveComponent("EliTabelaDetalhesLinha");return t.openBlock(),t.createElementBlock("tbody",Za,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.linhas,(i,d)=>{var b,v,C,y,c,$;return t.openBlock(),t.createElementBlock(t.Fragment,{key:`grp-${d}`},[t.createElementVNode("tr",{class:t.normalizeClass(["eli-tabela__tr",[d%2===1?"eli-tabela__tr--zebra":void 0]])},[e.temColunasInvisiveis?(t.openBlock(),t.createElementBlock("td",{class:"eli-tabela__td eli-tabela__td--expander",key:`td-${d}-exp`},[t.createElementVNode("button",{type:"button",class:t.normalizeClass(["eli-tabela__expander-botao",[(b=e.linhasExpandidas)!=null&&b[d]?"eli-tabela__expander-botao--ativo":void 0]]),"aria-expanded":(v=e.linhasExpandidas)!=null&&v[d]?"true":"false","aria-label":(C=e.linhasExpandidas)!=null&&C[d]?"Ocultar colunas ocultas":"Mostrar colunas ocultas",title:(y=e.linhasExpandidas)!=null&&y[d]?"Ocultar detalhes":"Mostrar detalhes",onClick:t.withModifiers(g=>e.alternarLinhaExpandida(d),["stop"])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent((c=e.linhasExpandidas)!=null&&c[d]?e.ChevronDown:e.ChevronRight),{class:"eli-tabela__expander-icone",size:16,"stroke-width":2,"aria-hidden":"true"}))],10,Ga)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.colunas,(g,E)=>(t.openBlock(),t.createElementBlock("td",{key:`td-${d}-${E}`,class:"eli-tabela__td"},[t.createVNode(o,{celula:g.celula(i)},null,8,["celula"])]))),128)),e.temAcoes?(t.openBlock(),t.createElementBlock("td",{class:"eli-tabela__td eli-tabela__td--acoes",key:`td-${d}-acoes`},[t.createElementVNode("div",{class:t.normalizeClass(["eli-tabela__acoes-container",[e.menuAberto===d?"eli-tabela__acoes-container--aberto":void 0]])},[t.createElementVNode("button",{class:"eli-tabela__acoes-toggle",type:"button",id:`eli-tabela-acoes-toggle-${d}`,disabled:!e.possuiAcoes(d),"aria-haspopup":"menu","aria-expanded":e.menuAberto===d?"true":"false","aria-controls":e.possuiAcoes(d)?`eli-tabela-acoes-menu-${d}`:void 0,"aria-label":e.possuiAcoes(d)?"Ações da linha":"Nenhuma ação disponível",title:e.possuiAcoes(d)?"Ações":"Nenhuma ação disponível",onClick:t.withModifiers(g=>e.toggleMenu(d,g),["stop"])},[t.createVNode(r,{class:"eli-tabela__acoes-toggle-icone",size:18,"stroke-width":2})],8,Xa)],2)])):t.createCommentVNode("",!0)],2),e.temColunasInvisiveis&&(($=e.linhasExpandidas)!=null&&$[d])?(t.openBlock(),t.createElementBlock("tr",{key:0,class:t.normalizeClass(["eli-tabela__tr eli-tabela__tr--detalhes",[d%2===1?"eli-tabela__tr--zebra":void 0]])},[t.createElementVNode("td",{class:"eli-tabela__td eli-tabela__td--detalhes",colspan:(e.temColunasInvisiveis?1:0)+e.colunas.length+(e.temAcoes?1:0)},[t.createVNode(u,{linha:i,colunasInvisiveis:e.colunasInvisiveis},null,8,["linha","colunasInvisiveis"])],8,Ka)],2)):t.createCommentVNode("",!0)],64)}),128))])}const xa=T(Wa,[["render",Qa]]),eo=t.defineComponent({name:"EliTabelaMenuAcoes",props:{menuAberto:{type:Number,required:!0},posicao:{type:Object,required:!0},acoes:{type:Array,required:!0},linha:{type:null,required:!0}},emits:{executar(e){return e!==null&&typeof e=="object"}},setup(e,{emit:a,expose:n}){const l=t.ref(null);n({menuEl:l});const s=t.computed(()=>e.acoes.length>0);function m(o){e.linha&&a("executar",{acao:o.acao,linha:e.linha})}return{menuEl:l,possuiAcoes:s,emitExecutar:m}}}),to=["id","aria-labelledby"],ao=["aria-label","title","onClick"],oo={class:"eli-tabela__acoes-item-texto"};function no(e,a,n,l,s,m){return t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[e.menuAberto!==null&&e.possuiAcoes?(t.openBlock(),t.createElementBlock("ul",{key:0,id:`eli-tabela-acoes-menu-${e.menuAberto}`,ref:"menuEl",class:"eli-tabela__acoes-menu",role:"menu","aria-labelledby":`eli-tabela-acoes-toggle-${e.menuAberto}`,style:t.normalizeStyle({position:"fixed",top:`${e.posicao.top}px`,left:`${e.posicao.left}px`,zIndex:999999})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.acoes,o=>(t.openBlock(),t.createElementBlock("li",{key:`acao-${e.menuAberto}-${o.indice}`,class:"eli-tabela__acoes-item",role:"none"},[t.createElementVNode("button",{type:"button",class:"eli-tabela__acoes-item-botao",style:t.normalizeStyle({color:o.acao.cor}),role:"menuitem","aria-label":o.acao.rotulo,title:o.acao.rotulo,onClick:t.withModifiers(r=>e.emitExecutar(o),["stop"])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.acao.icone),{class:"eli-tabela__acoes-item-icone",size:16,"stroke-width":2})),t.createElementVNode("span",oo,t.toDisplayString(o.acao.rotulo),1)],12,ao)]))),128))],12,to)):t.createCommentVNode("",!0)])}const ro=T(eo,[["render",no]]),lo=t.defineComponent({name:"EliTabelaPaginacao",props:{pagina:{type:Number,required:!0},totalPaginas:{type:Number,required:!0},maximoBotoes:{type:Number,required:!1}},emits:{alterar(e){return Number.isFinite(e)}},setup(e,{emit:a}){const n=t.computed(()=>{const i=e.maximoBotoes;return typeof i=="number"&&i>=5?Math.floor(i):7}),l=t.computed(()=>{const i=e.totalPaginas,d=e.pagina,b=n.value,v=[],C=E=>{v.push({label:String(E),pagina:E,ativo:E===d})},y=()=>{v.push({label:"…",ehEllipsis:!0})};if(i<=b){for(let E=1;E<=i;E+=1)C(E);return v}const c=Math.max(3,b-2);let $=Math.max(2,d-Math.floor(c/2)),g=$+c-1;g>=i&&(g=i-1,$=g-c+1),C(1),$>2&&y();for(let E=$;E<=g;E+=1)C(E);return ge.pagina<=1),o=t.computed(()=>e.pagina>=e.totalPaginas),r=t.computed(()=>e.pagina),u=t.computed(()=>e.totalPaginas);return{botoes:l,irParaPagina:s,anteriorDesabilitado:m,proximaDesabilitada:o,paginaAtual:r,totalPaginasExibidas:u}}}),io={key:0,class:"eli-tabela__paginacao",role:"navigation","aria-label":"Paginação de resultados"},so=["disabled"],co={key:0,class:"eli-tabela__pagina-ellipsis","aria-hidden":"true"},uo=["disabled","aria-current","aria-label","onClick"],mo=["disabled"];function po(e,a,n,l,s,m){return e.totalPaginasExibidas>1?(t.openBlock(),t.createElementBlock("nav",io,[t.createElementVNode("button",{type:"button",class:"eli-tabela__pagina-botao",disabled:e.anteriorDesabilitado,"aria-label":"Página anterior",onClick:a[0]||(a[0]=o=>e.irParaPagina(e.paginaAtual-1))}," << ",8,so),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.botoes,(o,r)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`${o.label}-${r}`},[o.ehEllipsis?(t.openBlock(),t.createElementBlock("span",co,t.toDisplayString(o.label),1)):(t.openBlock(),t.createElementBlock("button",{key:1,type:"button",class:t.normalizeClass(["eli-tabela__pagina-botao",o.ativo?"eli-tabela__pagina-botao--ativo":void 0]),disabled:o.ativo,"aria-current":o.ativo?"page":void 0,"aria-label":`Ir para página ${o.label}`,onClick:u=>e.irParaPagina(o.pagina)},t.toDisplayString(o.label),11,uo))],64))),128)),t.createElementVNode("button",{type:"button",class:"eli-tabela__pagina-botao",disabled:e.proximaDesabilitada,"aria-label":"Próxima página",onClick:a[1]||(a[1]=o=>e.irParaPagina(e.paginaAtual+1))}," >> ",8,mo)])):t.createCommentVNode("",!0)}const fo=T(lo,[["render",po],["__scopeId","data-v-5ca7a362"]]),Ye="application/x-eli-tabela-coluna",bo=t.defineComponent({name:"EliTabelaModalColunas",props:{aberto:{type:Boolean,required:!0},rotulosColunas:{type:Array,required:!0},configInicial:{type:Object,required:!0},colunas:{type:Array,required:!0}},emits:{fechar(){return!0},salvar(e){return!0}},setup(e,{emit:a}){const n=t.ref([]),l=t.ref([]);function s(){var H,G;const y=e.rotulosColunas,c=(((H=e.configInicial.visiveis)==null?void 0:H.length)??0)>0||(((G=e.configInicial.invisiveis)==null?void 0:G.length)??0)>0,$=new Set(e.colunas.filter(P=>P.visivel===!1).map(P=>P.rotulo)),g=c?new Set(e.configInicial.invisiveis??[]):$,E=y.filter(P=>!g.has(P)),j=e.configInicial.visiveis??[],W=new Set(E),I=[];for(const P of j)W.has(P)&&I.push(P);for(const P of E)I.includes(P)||I.push(P);n.value=I,l.value=y.filter(P=>g.has(P))}t.watch(()=>[e.aberto,e.rotulosColunas,e.configInicial,e.colunas],()=>{e.aberto&&s()},{deep:!0,immediate:!0});function m(){a("fechar")}function o(){a("salvar",{visiveis:[...n.value],invisiveis:[...l.value]})}function r(y,c){var $,g;try{($=y.dataTransfer)==null||$.setData(Ye,JSON.stringify(c)),(g=y.dataTransfer)==null||g.setData("text/plain",c.rotulo),y.dataTransfer.effectAllowed="move"}catch{}}function u(y){var c;try{const $=(c=y.dataTransfer)==null?void 0:c.getData(Ye);if(!$)return null;const g=JSON.parse($);return!g||typeof g.rotulo!="string"||g.origem!=="visiveis"&&g.origem!=="invisiveis"?null:g}catch{return null}}function i(y){const c=y.origem==="visiveis"?n.value:l.value,$=c.indexOf(y.rotulo);$>=0&&c.splice($,1)}function d(y,c,$){const g=y==="visiveis"?n.value:l.value,E=g.indexOf(c);E>=0&&g.splice(E,1),$===null||$<0||$>g.length?g.push(c):g.splice($,0,c)}function b(y,c,$,g){r(y,{rotulo:c,origem:$,index:g})}function v(y,c,$){const g=u(y);if(g)if(i(g),d(c,g.rotulo,$),c==="visiveis"){const E=l.value.indexOf(g.rotulo);E>=0&&l.value.splice(E,1)}else{const E=n.value.indexOf(g.rotulo);E>=0&&n.value.splice(E,1)}}function C(y,c,$){const g=u(y);if(g)if(i(g),d(c,g.rotulo,null),c==="visiveis"){const E=l.value.indexOf(g.rotulo);E>=0&&l.value.splice(E,1)}else{const E=n.value.indexOf(g.rotulo);E>=0&&n.value.splice(E,1)}}return{visiveisLocal:n,invisiveisLocal:l,emitFechar:m,emitSalvar:o,onDragStart:b,onDropItem:v,onDropLista:C}}}),ho={class:"eli-tabela-modal-colunas__modal",role:"dialog","aria-modal":"true","aria-label":"Configurar colunas"},go={class:"eli-tabela-modal-colunas__header"},yo={class:"eli-tabela-modal-colunas__conteudo"},$o={class:"eli-tabela-modal-colunas__coluna"},Eo=["onDragstart","onDrop"],ko={class:"eli-tabela-modal-colunas__item-texto"},Bo={class:"eli-tabela-modal-colunas__coluna"},vo=["onDragstart","onDrop"],Co={class:"eli-tabela-modal-colunas__item-texto"},_o={class:"eli-tabela-modal-colunas__footer"};function Vo(e,a,n,l,s,m){return e.aberto?(t.openBlock(),t.createElementBlock("div",{key:0,class:"eli-tabela-modal-colunas__overlay",role:"presentation",onClick:a[9]||(a[9]=t.withModifiers((...o)=>e.emitFechar&&e.emitFechar(...o),["self"]))},[t.createElementVNode("div",ho,[t.createElementVNode("header",go,[a[10]||(a[10]=t.createElementVNode("h3",{class:"eli-tabela-modal-colunas__titulo"},"Colunas",-1)),t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-colunas__fechar","aria-label":"Fechar",onClick:a[0]||(a[0]=(...o)=>e.emitFechar&&e.emitFechar(...o))}," × ")]),t.createElementVNode("div",yo,[t.createElementVNode("div",$o,[a[12]||(a[12]=t.createElementVNode("div",{class:"eli-tabela-modal-colunas__coluna-titulo"},"Visíveis",-1)),t.createElementVNode("div",{class:"eli-tabela-modal-colunas__lista",onDragover:a[2]||(a[2]=t.withModifiers(()=>{},["prevent"])),onDrop:a[3]||(a[3]=o=>e.onDropLista(o,"visiveis",null))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.visiveisLocal,(o,r)=>(t.openBlock(),t.createElementBlock("div",{key:`vis-${o}`,class:"eli-tabela-modal-colunas__item",draggable:"true",onDragstart:u=>e.onDragStart(u,o,"visiveis",r),onDragover:a[1]||(a[1]=t.withModifiers(()=>{},["prevent"])),onDrop:u=>e.onDropItem(u,"visiveis",r)},[a[11]||(a[11]=t.createElementVNode("span",{class:"eli-tabela-modal-colunas__item-handle","aria-hidden":"true"},"⋮⋮",-1)),t.createElementVNode("span",ko,t.toDisplayString(o),1)],40,Eo))),128))],32)]),t.createElementVNode("div",Bo,[a[14]||(a[14]=t.createElementVNode("div",{class:"eli-tabela-modal-colunas__coluna-titulo"},"Invisíveis",-1)),t.createElementVNode("div",{class:"eli-tabela-modal-colunas__lista",onDragover:a[5]||(a[5]=t.withModifiers(()=>{},["prevent"])),onDrop:a[6]||(a[6]=o=>e.onDropLista(o,"invisiveis",null))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.invisiveisLocal,(o,r)=>(t.openBlock(),t.createElementBlock("div",{key:`inv-${o}`,class:"eli-tabela-modal-colunas__item",draggable:"true",onDragstart:u=>e.onDragStart(u,o,"invisiveis",r),onDragover:a[4]||(a[4]=t.withModifiers(()=>{},["prevent"])),onDrop:u=>e.onDropItem(u,"invisiveis",r)},[a[13]||(a[13]=t.createElementVNode("span",{class:"eli-tabela-modal-colunas__item-handle","aria-hidden":"true"},"⋮⋮",-1)),t.createElementVNode("span",Co,t.toDisplayString(o),1)],40,vo))),128))],32)])]),t.createElementVNode("footer",_o,[t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-colunas__botao eli-tabela-modal-colunas__botao--sec",onClick:a[7]||(a[7]=(...o)=>e.emitFechar&&e.emitFechar(...o))}," Cancelar "),t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-colunas__botao eli-tabela-modal-colunas__botao--prim",onClick:a[8]||(a[8]=(...o)=>e.emitSalvar&&e.emitSalvar(...o))}," Salvar ")])])])):t.createCommentVNode("",!0)}const So=T(bo,[["render",Vo],["__scopeId","data-v-b8f693ef"]]);function Do(e){if(!Number.isFinite(e)||e<=0||e>=1)return 0;const a=e.toString();if(a.includes("e-")){const[,s]=a.split("e-"),m=Number(s);return Number.isFinite(m)?m:0}const n=a.indexOf(".");return n===-1?0:a.slice(n+1).replace(/0+$/,"").length}function No(e){const a=(e??"").trim().replace(/,/g,".");if(!a)return null;const n=Number(a);return Number.isNaN(n)?null:n}function Ve(e,a){return e==null?"":a===null?String(e):Number(e).toFixed(Math.max(0,a)).replace(/\./g,",")}function Re(e){return(e??"").replace(/\D+/g,"")}function Ao(e){const a=(e??"").replace(/[^0-9.,]+/g,""),n=a.match(/[.,]/);if(!n)return a;const l=n[0],s=a.indexOf(l),m=a.slice(0,s).replace(/[.,]/g,""),o=a.slice(s+1).replace(/[.,]/g,"");return`${m.length?m:"0"}${l}${o}`}function Mo(e,a){if(a===null)return e;if(a<=0)return e.replace(/[.,]/g,"");const n=e.match(/[.,]/);if(!n)return e;const l=n[0],s=e.indexOf(l),m=e.slice(0,s),o=e.slice(s+1);return`${m}${l}${o.slice(0,a)}`}function wo(e){const a=e.match(/^(\d+)[.,]$/);if(!a)return null;const n=Number(a[1]);return Number.isNaN(n)?null:n}const To=t.defineComponent({name:"EliEntradaNumero",inheritAttrs:!1,props:{value:{type:[Number,null],default:void 0},opcoes:{type:Object,required:!0}},emits:{"update:value":e=>!0,input:e=>!0,change:e=>!0,focus:()=>!0,blur:()=>!0},setup(e,{attrs:a,emit:n}){const l=t.computed(()=>{var d;const i=(d=e.opcoes)==null?void 0:d.precisao;return i==null?null:Do(i)}),s=t.computed(()=>l.value===0),m=t.computed(()=>{const i=l.value;return i!==null&&i>0}),o=t.ref(""),r=t.ref(void 0);t.watch(()=>e.value,i=>{i!==r.value&&(o.value=Ve(i,l.value),r.value=i)},{immediate:!0});function u(i){if(m.value){const C=l.value??0,y=Re(i),c=y?Number(y):0,$=Math.pow(10,C),g=y?c/$:null,E=g===null?null:g;r.value=E,n("update:value",E),n("input",E),n("change",E),o.value=Ve(E,C);return}const d=s.value?Re(i):Ao(i),b=s.value?d:Mo(d,l.value);let v=null;if(b){const y=(s.value?null:wo(b))??No(b);v=y===null?null:y}r.value=v,n("update:value",v),n("input",v),n("change",v),o.value=Ve(v,l.value)}return{attrs:a,emit:n,displayValue:o,isInteiro:s,onUpdateModelValue:u}}}),Po={class:"eli-entrada__prefixo"},Fo={class:"eli-entrada__sufixo"};function Oo(e,a,n,l,s,m){var o,r,u,i;return t.openBlock(),t.createBlock(ve.VTextField,t.mergeProps({"model-value":e.displayValue,label:(o=e.opcoes)==null?void 0:o.rotulo,placeholder:(r=e.opcoes)==null?void 0:r.placeholder,type:e.isInteiro?"number":"text",inputmode:e.isInteiro?"numeric":"decimal",pattern:e.isInteiro?"[0-9]*":"[0-9.,]*"},e.attrs,{"onUpdate:modelValue":e.onUpdateModelValue,onFocus:a[0]||(a[0]=()=>e.emit("focus")),onBlur:a[1]||(a[1]=()=>e.emit("blur"))}),t.createSlots({_:2},[(u=e.opcoes)!=null&&u.prefixo?{name:"prepend-inner",fn:t.withCtx(()=>[t.createElementVNode("span",Po,t.toDisplayString(e.opcoes.prefixo),1)]),key:"0"}:void 0,(i=e.opcoes)!=null&&i.sufixo?{name:"append-inner",fn:t.withCtx(()=>[t.createElementVNode("span",Fo,t.toDisplayString(e.opcoes.sufixo),1)]),key:"1"}:void 0]),1040,["model-value","label","placeholder","type","inputmode","pattern","onUpdate:modelValue"])}const Se=T(To,[["render",Oo],["__scopeId","data-v-77cbf216"]]),qo=t.defineComponent({name:"EliEntradaDataHora",inheritAttrs:!1,props:{value:{type:String,default:void 0},opcoes:{type:Object,required:!1,default:void 0},modelValue:{type:String,default:null},modo:{type:String,default:void 0},rotulo:{type:String,default:void 0},placeholder:{type:String,default:void 0},desabilitado:{type:Boolean,default:void 0},limpavel:{type:Boolean,default:void 0},erro:{type:Boolean,default:void 0},mensagensErro:{type:[String,Array],default:void 0},dica:{type:String,default:void 0},dicaPersistente:{type:Boolean,default:void 0},densidade:{type:String,default:void 0},variante:{type:String,default:void 0},min:{type:String,default:void 0},max:{type:String,default:void 0}},emits:{"update:value":e=>!0,input:e=>!0,change:e=>!0,"update:modelValue":e=>!0,alterar:e=>!0,foco:()=>!0,desfoco:()=>!0,focus:()=>!0,blur:()=>!0},setup(e,{emit:a,attrs:n}){const l=t.computed(()=>e.opcoes?e.opcoes:{rotulo:e.rotulo??"Data e hora",placeholder:e.placeholder??"",modo:e.modo??"dataHora",limpavel:e.limpavel,erro:e.erro,mensagensErro:e.mensagensErro,dica:e.dica,dicaPersistente:e.dicaPersistente,densidade:e.densidade,variante:e.variante,min:e.min,max:e.max}),s=t.computed(()=>l.value.modo??"dataHora"),m=t.computed(()=>!!e.desabilitado),o=t.computed(()=>s.value==="data"?"date":"datetime-local");function r(c){return s.value==="data"?ce(c).format("YYYY-MM-DD"):ce(c).format("YYYY-MM-DDTHH:mm")}function u(c){return s.value==="data"?ce(`${c}T00:00`).format():ce(c).format()}const i=t.computed(()=>e.value!==void 0?e.value??null:e.modelValue),d=t.computed({get:()=>i.value?r(i.value):"",set:c=>{const $=c&&c.length>0?c:null;if(!$){a("update:value",null),a("input",null),a("change",null),a("update:modelValue",null),a("alterar",null);return}const g=u($);a("update:value",g),a("input",g),a("change",g),a("update:modelValue",g),a("alterar",g)}}),b=t.computed(()=>{const c=l.value.min;if(c)return r(c)}),v=t.computed(()=>{const c=l.value.max;if(c)return r(c)});function C(){a("foco"),a("focus")}function y(){a("desfoco"),a("blur")}return{attrs:n,valor:d,tipoInput:o,minLocal:b,maxLocal:v,opcoesEfetivas:l,desabilitadoEfetivo:m,emitCompatFocus:C,emitCompatBlur:y}}}),Io={class:"eli-data-hora"};function Lo(e,a,n,l,s,m){return t.openBlock(),t.createElementBlock("div",Io,[t.createVNode(ve.VTextField,t.mergeProps({modelValue:e.valor,"onUpdate:modelValue":a[0]||(a[0]=o=>e.valor=o),type:e.tipoInput,label:e.opcoesEfetivas.rotulo,placeholder:e.opcoesEfetivas.placeholder,disabled:e.desabilitadoEfetivo,clearable:!!e.opcoesEfetivas.limpavel,error:!!e.opcoesEfetivas.erro,"error-messages":e.opcoesEfetivas.mensagensErro,hint:e.opcoesEfetivas.dica,"persistent-hint":!!e.opcoesEfetivas.dicaPersistente,density:e.opcoesEfetivas.densidade??"comfortable",variant:e.opcoesEfetivas.variante??"outlined",min:e.minLocal,max:e.maxLocal},e.attrs,{onFocus:e.emitCompatFocus,onBlur:e.emitCompatBlur}),null,16,["modelValue","type","label","placeholder","disabled","clearable","error","error-messages","hint","persistent-hint","density","variant","min","max","onFocus","onBlur"])])}const De=T(qo,[["render",Lo],["__scopeId","data-v-1bfd1be8"]]),zo=t.defineComponent({name:"EliEntradaParagrafo",components:{VTextarea:Ce.VTextarea},inheritAttrs:!1,props:{value:{type:[String,null],default:void 0},opcoes:{type:Object,required:!0}},emits:{"update:value":e=>!0,input:e=>!0,change:e=>!0,focus:()=>!0,blur:()=>!0},setup(e,{attrs:a,emit:n}){const l=t.computed({get:()=>e.value,set:s=>{n("update:value",s),n("input",s),n("change",s)}});return{attrs:a,emit:n,localValue:l,opcoes:e.opcoes}}});function jo(e,a,n,l,s,m){var o,r,u,i,d,b,v,C,y,c,$,g;return t.openBlock(),t.createBlock(ot.VTextarea,t.mergeProps({modelValue:e.localValue,"onUpdate:modelValue":a[0]||(a[0]=E=>e.localValue=E),label:(o=e.opcoes)==null?void 0:o.rotulo,placeholder:(r=e.opcoes)==null?void 0:r.placeholder,rows:((u=e.opcoes)==null?void 0:u.linhas)??4,counter:(i=e.opcoes)==null?void 0:i.limiteCaracteres,maxlength:(d=e.opcoes)==null?void 0:d.limiteCaracteres,clearable:!!((b=e.opcoes)!=null&&b.limpavel),error:!!((v=e.opcoes)!=null&&v.erro),"error-messages":(C=e.opcoes)==null?void 0:C.mensagensErro,hint:(y=e.opcoes)==null?void 0:y.dica,"persistent-hint":!!((c=e.opcoes)!=null&&c.dicaPersistente),density:(($=e.opcoes)==null?void 0:$.densidade)??"comfortable",variant:((g=e.opcoes)==null?void 0:g.variante)??"outlined","auto-grow":""},e.attrs,{onFocus:a[1]||(a[1]=()=>e.emit("focus")),onBlur:a[2]||(a[2]=()=>e.emit("blur"))}),null,16,["modelValue","label","placeholder","rows","counter","maxlength","clearable","error","error-messages","hint","persistent-hint","density","variant"])}const Je=T(zo,[["render",jo]]),Ho=t.defineComponent({name:"EliEntradaSelecao",components:{VSelect:Ce.VSelect},inheritAttrs:!1,props:{value:{type:[String,null],default:void 0},opcoes:{type:Object,required:!0}},emits:{"update:value":e=>!0,input:e=>!0,change:e=>!0,focus:()=>!0,blur:()=>!0},setup(e,{attrs:a,emit:n}){const l=t.ref([]),s=t.ref(!1),m=t.computed({get:()=>e.value,set:r=>{n("update:value",r),n("input",r),n("change",r)}});async function o(){s.value=!0;try{const r=await e.opcoes.itens(),u=Array.isArray(r)?r:[];l.value=[...u]}finally{s.value=!1}}return t.watch(()=>e.opcoes.itens,()=>{o()}),t.onMounted(()=>{o()}),t.watch(l,r=>{console.debug("[EliEntradaSelecao] itens:",r)},{deep:!0}),{attrs:a,emit:n,localValue:m,opcoes:e.opcoes,itens:l,carregando:s}}});function Uo(e,a,n,l,s,m){var o,r,u,i,d,b,v,C,y;return t.openBlock(),t.createBlock(nt.VSelect,t.mergeProps({modelValue:e.localValue,"onUpdate:modelValue":a[0]||(a[0]=c=>e.localValue=c),label:(o=e.opcoes)==null?void 0:o.rotulo,placeholder:(r=e.opcoes)==null?void 0:r.placeholder,items:e.itens,"item-title":"rotulo","item-value":"chave",loading:e.carregando,disabled:e.carregando,"menu-props":{maxHeight:320},clearable:!!((u=e.opcoes)!=null&&u.limpavel),error:!!((i=e.opcoes)!=null&&i.erro),"error-messages":(d=e.opcoes)==null?void 0:d.mensagensErro,hint:(b=e.opcoes)==null?void 0:b.dica,"persistent-hint":!!((v=e.opcoes)!=null&&v.dicaPersistente),density:((C=e.opcoes)==null?void 0:C.densidade)??"comfortable",variant:((y=e.opcoes)==null?void 0:y.variante)??"outlined"},e.attrs,{onFocus:a[1]||(a[1]=()=>e.emit("focus")),onBlur:a[2]||(a[2]=()=>e.emit("blur"))}),null,16,["modelValue","label","placeholder","items","loading","disabled","clearable","error","error-messages","hint","persistent-hint","density","variant"])}const We=T(Ho,[["render",Uo]]);function Yo(e){return e==="texto"||e==="numero"||e==="dataHora"}function Ro(e){var n,l;const a=(l=(n=e==null?void 0:e.entrada)==null?void 0:n[1])==null?void 0:l.rotulo;return String(a||((e==null?void 0:e.coluna)??"Filtro"))}const Jo=t.defineComponent({name:"EliTabelaModalFiltroAvancado",props:{aberto:{type:Boolean,required:!0},filtrosBase:{type:Array,required:!0},modelo:{type:Array,required:!0}},emits:{fechar:()=>!0,limpar:()=>!0,salvar:e=>!0},setup(e,{emit:a}){const n=t.ref([]),l=t.ref(""),s=t.computed(()=>(e.filtrosBase??[]).map(c=>String(c.coluna))),m=t.computed(()=>{const c=new Set(n.value.map($=>String($.coluna)));return(e.filtrosBase??[]).filter($=>!c.has(String($.coluna)))});function o(c){const $=c==null?void 0:c[0];return $==="numero"?Se:$==="dataHora"?De:$e}function r(c){return(c==null?void 0:c[1])??{rotulo:""}}function u(c){return(c==null?void 0:c[0])==="numero"?null:""}function i(){var g;const c=e.filtrosBase??[],$=Array.isArray(e.modelo)?e.modelo:[];n.value=$.map(E=>{const j=c.find(P=>String(P.coluna)===String(E.coluna))??c[0],W=(j==null?void 0:j.entrada)??E.entrada,I=(j==null?void 0:j.coluna)??E.coluna,H=String((j==null?void 0:j.operador)??"="),G=E.valor??u(W);return{coluna:I,operador:H,entrada:W,valor:G}});for(const E of n.value)s.value.includes(String(E.coluna))&&(E.operador=String(((g=c.find(j=>String(j.coluna)===String(E.coluna)))==null?void 0:g.operador)??"="),E.entrada&&!Yo(E.entrada[0])&&(E.entrada=["texto",{rotulo:"Valor"}]))}t.watch(()=>[e.aberto,e.filtrosBase,e.modelo],()=>{e.aberto&&i()},{deep:!0,immediate:!0});function d(){if(!l.value)return;const c=(e.filtrosBase??[]).find($=>String($.coluna)===String(l.value));c&&(n.value.some($=>String($.coluna)===String(c.coluna))||(n.value.push({coluna:c.coluna,entrada:c.entrada,operador:String(c.operador??"="),valor:u(c.entrada)}),l.value=""))}function b(c){n.value.splice(c,1)}function v(){a("fechar")}function C(){a("limpar")}function y(){a("salvar",n.value.map(c=>({coluna:c.coluna,valor:c.valor})))}return{linhas:n,opcoesParaAdicionar:m,colunaParaAdicionar:l,componenteEntrada:o,opcoesEntrada:r,adicionar:d,remover:b,emitFechar:v,emitSalvar:y,emitLimpar:C,rotuloDoFiltro:Ro}}}),Wo={class:"eli-tabela-modal-filtro__modal",role:"dialog","aria-modal":"true","aria-label":"Filtro avançado"},Zo={class:"eli-tabela-modal-filtro__header"},Go={class:"eli-tabela-modal-filtro__conteudo"},Xo={key:0,class:"eli-tabela-modal-filtro__vazio"},Ko={key:1,class:"eli-tabela-modal-filtro__lista"},Qo={class:"eli-tabela-modal-filtro__entrada"},xo=["onClick"],en={class:"eli-tabela-modal-filtro__acoes"},tn=["disabled"],an=["value"],on=["disabled"],nn={class:"eli-tabela-modal-filtro__footer"};function rn(e,a,n,l,s,m){return e.aberto?(t.openBlock(),t.createElementBlock("div",{key:0,class:"eli-tabela-modal-filtro__overlay",role:"presentation",onClick:a[6]||(a[6]=t.withModifiers((...o)=>e.emitFechar&&e.emitFechar(...o),["self"]))},[t.createElementVNode("div",Wo,[t.createElementVNode("header",Zo,[a[7]||(a[7]=t.createElementVNode("h3",{class:"eli-tabela-modal-filtro__titulo"},"Filtro avançado",-1)),t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-filtro__fechar","aria-label":"Fechar",onClick:a[0]||(a[0]=(...o)=>e.emitFechar&&e.emitFechar(...o))}," × ")]),t.createElementVNode("div",Go,[e.filtrosBase.length?(t.openBlock(),t.createElementBlock("div",Ko,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.linhas,(o,r)=>(t.openBlock(),t.createElementBlock("div",{key:String(o.coluna),class:"eli-tabela-modal-filtro__linha"},[t.createElementVNode("div",Qo,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.componenteEntrada(o.entrada)),{value:o.valor,"onUpdate:value":u=>o.valor=u,opcoes:e.opcoesEntrada(o.entrada),density:"compact"},null,40,["value","onUpdate:value","opcoes"]))]),t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-filtro__remover",title:"Remover","aria-label":"Remover",onClick:u=>e.remover(r)}," × ",8,xo)]))),128))])):(t.openBlock(),t.createElementBlock("div",Xo," Nenhum filtro configurado na tabela. ")),t.createElementVNode("div",en,[t.withDirectives(t.createElementVNode("select",{"onUpdate:modelValue":a[1]||(a[1]=o=>e.colunaParaAdicionar=o),class:"eli-tabela-modal-filtro__select",disabled:!e.opcoesParaAdicionar.length},[a[8]||(a[8]=t.createElementVNode("option",{disabled:"",value:""},"Selecione um filtro…",-1)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.opcoesParaAdicionar,o=>(t.openBlock(),t.createElementBlock("option",{key:String(o.coluna),value:String(o.coluna)},t.toDisplayString(e.rotuloDoFiltro(o)),9,an))),128))],8,tn),[[t.vModelSelect,e.colunaParaAdicionar]]),t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-filtro__botao",onClick:a[2]||(a[2]=(...o)=>e.adicionar&&e.adicionar(...o)),disabled:!e.colunaParaAdicionar}," Adicionar ",8,on)])]),t.createElementVNode("footer",nn,[t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-filtro__botao eli-tabela-modal-filtro__botao--sec",onClick:a[3]||(a[3]=(...o)=>e.emitLimpar&&e.emitLimpar(...o))}," Limpar "),t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-filtro__botao eli-tabela-modal-filtro__botao--sec",onClick:a[4]||(a[4]=(...o)=>e.emitFechar&&e.emitFechar(...o))}," Cancelar "),t.createElementVNode("button",{type:"button",class:"eli-tabela-modal-filtro__botao eli-tabela-modal-filtro__botao--prim",onClick:a[5]||(a[5]=(...o)=>e.emitSalvar&&e.emitSalvar(...o))}," Aplicar ")])])])):t.createCommentVNode("",!0)}const ln=T(Jo,[["render",rn],["__scopeId","data-v-cdc3f41a"]]),sn="eli:tabela";function Ze(e){return`${sn}:${e}:colunas`}function Ge(e){if(!e||typeof e!="object")return{visiveis:[],invisiveis:[]};const a=e,n=Array.isArray(a.visiveis)?a.visiveis.filter(s=>typeof s=="string"):[],l=Array.isArray(a.invisiveis)?a.invisiveis.filter(s=>typeof s=="string"):[];return{visiveis:n,invisiveis:l}}function Xe(e){try{const a=window.localStorage.getItem(Ze(e));return a?Ge(JSON.parse(a)):{visiveis:[],invisiveis:[]}}catch{return{visiveis:[],invisiveis:[]}}}function cn(e,a){try{window.localStorage.setItem(Ze(e),JSON.stringify(Ge(a)))}catch{}}function Ne(e){return`eli_tabela:${e}:filtro_avancado`}function Ke(e){try{const a=localStorage.getItem(Ne(e));if(!a)return[];const n=JSON.parse(a);return Array.isArray(n)?n:[]}catch{return[]}}function dn(e,a){try{localStorage.setItem(Ne(e),JSON.stringify(a??[]))}catch{}}function un(e){try{localStorage.removeItem(Ne(e))}catch{}}const mn=t.defineComponent({name:"EliTabela",inheritAttrs:!1,components:{EliTabelaCabecalho:Ut,EliTabelaEstados:Xt,EliTabelaDebug:ea,EliTabelaHead:da,EliTabelaBody:xa,EliTabelaMenuAcoes:ro,EliTabelaPaginacao:fo,EliTabelaModalColunas:So,EliTabelaModalFiltroAvancado:ln},props:{tabela:{type:Object,required:!0}},setup(e){const n=t.ref(!1),l=t.ref(null),s=t.ref([]),m=t.ref(0),o=t.ref([]),r=t.ref(null),u=t.ref(null),i=t.ref({top:0,left:0}),d=t.ref(""),b=t.ref(1),v=t.ref(null),C=t.ref("asc"),y=t.ref(!1),c=t.ref(Ke(e.tabela.nome));function $(){y.value=!0}function g(){y.value=!1}function E(){c.value=[],un(e.tabela.nome),y.value=!1,d.value="",b.value!==1?b.value=1:re()}function j(B){c.value=B??[],dn(e.tabela.nome,B??[]),y.value=!1,d.value="",b.value!==1?b.value=1:re()}const W=t.computed(()=>{const B=e.tabela.filtroAvancado??[];return(c.value??[]).filter(N=>N&&N.coluna!==void 0).map(N=>{const F=B.find(O=>String(O.coluna)===String(N.coluna));return F?{coluna:String(F.coluna),operador:F.operador,valor:N.valor}:null}).filter(Boolean)}),I=t.computed(()=>e.tabela),H=t.computed(()=>!!e.tabela.mostrarCaixaDeBusca),G=t.computed(()=>e.tabela.acoesTabela??[]),P=t.computed(()=>G.value.length>0),ae=t.ref(!1),A=t.ref(Xe(e.tabela.nome)),D=t.ref({}),me=t.computed(()=>e.tabela.colunas.map(B=>B.rotulo)),he=t.computed(()=>{var Z,K;const B=e.tabela.colunas,F=(((Z=A.value.visiveis)==null?void 0:Z.length)??0)>0||(((K=A.value.invisiveis)==null?void 0:K.length)??0)>0?A.value.invisiveis??[]:B.filter(z=>z.visivel===!1).map(z=>z.rotulo),O=new Set(F),ee=B.filter(z=>O.has(z.rotulo)),Q=F,le=new Map;for(const z of ee)le.has(z.rotulo)||le.set(z.rotulo,z);const R=[];for(const z of Q){const te=le.get(z);te&&R.push(te)}for(const z of ee)R.includes(z)||R.push(z);return R}),_=t.computed(()=>he.value.length>0),h=t.computed(()=>{var z,te;const B=e.tabela.colunas,N=me.value,F=(((z=A.value.visiveis)==null?void 0:z.length)??0)>0||(((te=A.value.invisiveis)==null?void 0:te.length)??0)>0,O=F?A.value.invisiveis??[]:e.tabela.colunas.filter(q=>q.visivel===!1).map(q=>q.rotulo),ee=new Set(O),Q=N.filter(q=>!ee.has(q)),le=new Set(Q),R=F?A.value.visiveis??[]:[],Z=[];for(const q of R)le.has(q)&&Z.push(q);for(const q of Q)Z.includes(q)||Z.push(q);const K=new Map;for(const q of B)K.has(q.rotulo)||K.set(q.rotulo,q);return Z.map(q=>K.get(q)).filter(Boolean)});function p(){ae.value=!0}function k(){ae.value=!1}function f(B){A.value=B,cn(e.tabela.nome,B),ae.value=!1,D.value={}}function S(B){const N=!!D.value[B];D.value={...D.value,[B]:!N}}const V=t.computed(()=>{const B=e.tabela.registros_por_consulta;return typeof B=="number"&&B>0?Math.floor(B):10}),M=t.computed(()=>{const B=V.value;if(!B||B<=0)return 1;const N=m.value??0;return N?Math.max(1,Math.ceil(N/B)):1}),L=t.computed(()=>s.value??[]),U=t.computed(()=>m.value??0),Y=t.computed(()=>(e.tabela.acoesLinha??[]).length>0),X=t.computed(()=>(e.tabela.filtroAvancado??[]).length>0);let x=0;function oe(B){var R,Z,K,z,te,q;const N=B.getBoundingClientRect(),F=8,O=((K=(Z=(R=u.value)==null?void 0:R.menuEl)==null?void 0:Z.value)==null?void 0:K.offsetHeight)??0,ee=((q=(te=(z=u.value)==null?void 0:z.menuEl)==null?void 0:te.value)==null?void 0:q.offsetWidth)??180;let Q=N.bottom+F;const le=N.right-ee;O&&Q+O>window.innerHeight-F&&(Q=N.top-F-O),i.value={top:Math.max(F,Math.round(Q)),left:Math.max(F,Math.round(le))}}function de(B){var F,O;if(r.value===null)return;const N=B.target;(O=(F=u.value)==null?void 0:F.menuEl)!=null&&O.value&&u.value.menuEl.value.contains(N)||(r.value=null)}function ie(B){if(B){if(v.value===B){C.value=C.value==="asc"?"desc":"asc",re();return}v.value=B,C.value="asc",b.value!==1?b.value=1:re()}}function J(B){d.value!==B&&(d.value=B,b.value!==1?b.value=1:re())}function ne(B){const N=Math.min(Math.max(1,B),M.value);N!==b.value&&(b.value=N)}function ue(B){const N=e.tabela.acoesLinha??[],F=o.value[B]??[];return N.map((O,ee)=>{const Q=O.exibir===void 0?!0:typeof O.exibir=="boolean"?O.exibir:!1;return{acao:O,indice:ee,visivel:F[ee]??Q}}).filter(O=>O.visivel)}function pe(B){return ue(B).length>0}function yn(B,N){if(!pe(B))return;if(r.value===B){r.value=null;return}r.value=B;const F=(N==null?void 0:N.currentTarget)??null;F&&(oe(F),requestAnimationFrame(()=>oe(F)))}async function re(){var Q,le;const B=++x;n.value=!0,l.value=null,o.value=[],r.value=null,D.value={};const N=Math.max(1,V.value),O={offSet:(b.value-1)*N,limit:N},ee=(d.value??"").trim();if(ee)O.texto_busca=ee;else{const R=W.value;R.length&&(O.filtros=R)}v.value&&(O.coluna_ordem=v.value,O.direcao_ordem=C.value);try{const R=e.tabela,Z=await R.consulta(O);if(B!==x)return;if(Z.cod!==Te.sucesso){s.value=[],m.value=0,l.value=Z.mensagem;return}const K=((Q=Z.valor)==null?void 0:Q.valores)??[],z=((le=Z.valor)==null?void 0:le.quantidade)??K.length;s.value=K,m.value=Number(z)||0;const te=Math.max(1,Math.ceil((m.value||0)/N));b.value>te&&(b.value=te);const q=R.acoesLinha??[];if(!q.length){o.value=[];return}const $n=K.map(()=>q.map(ge=>ge.exibir===void 0?!0:typeof ge.exibir=="boolean"?ge.exibir:!1));o.value=$n;const En=await Promise.all(K.map(async ge=>Promise.all(q.map(async Be=>{if(Be.exibir===void 0)return!0;if(typeof Be.exibir=="boolean")return Be.exibir;try{const kn=Be.exibir(ge);return!!await Promise.resolve(kn)}catch{return!1}}))));B===x&&(o.value=En)}catch(R){if(B!==x)return;s.value=[],m.value=0,l.value=R instanceof Error?R.message:"Erro ao carregar dados."}finally{B===x&&(n.value=!1)}}return t.onMounted(()=>{document.addEventListener("click",de),re()}),t.onBeforeUnmount(()=>{document.removeEventListener("click",de)}),t.watch(()=>e.tabela.mostrarCaixaDeBusca,B=>{!B&&d.value&&(d.value="",b.value!==1?b.value=1:re())}),t.watch(b,(B,N)=>{B!==N&&re()}),t.watch(()=>e.tabela,()=>{r.value=null,v.value=null,C.value="asc",d.value="",ae.value=!1,y.value=!1,A.value=Xe(e.tabela.nome),c.value=Ke(e.tabela.nome),D.value={},b.value!==1?b.value=1:re()}),t.watch(()=>e.tabela.registros_por_consulta,()=>{b.value!==1?b.value=1:re()}),t.watch(s,()=>{r.value=null,D.value={}}),{isDev:!1,tabela:I,carregando:n,erro:l,linhas:s,linhasPaginadas:L,filtrosAvancadosAtivos:W,quantidadeFiltrada:U,quantidade:m,menuAberto:r,valorBusca:d,paginaAtual:b,colunaOrdenacao:v,direcaoOrdenacao:C,totalPaginas:M,registrosPorConsulta:V,exibirBusca:H,exibirFiltroAvancado:X,acoesCabecalho:G,temAcoesCabecalho:P,temAcoes:Y,colunasEfetivas:h,rotulosColunas:me,modalColunasAberto:ae,configColunas:A,temColunasInvisiveis:_,colunasInvisiveisEfetivas:he,linhasExpandidas:D,abrirModalColunas:p,abrirModalFiltro:$,fecharModalColunas:k,salvarModalColunas:f,modalFiltroAberto:y,filtrosUi:c,salvarFiltrosAvancados:j,limparFiltrosAvancados:E,fecharModalFiltro:g,alternarLinhaExpandida:S,alternarOrdenacao:ie,atualizarBusca:J,irParaPagina:ne,acoesDisponiveisPorLinha:ue,possuiAcoes:pe,toggleMenu:yn,menuPopup:u,menuPopupPos:i}}}),pn={class:"eli-tabela"},fn={class:"eli-tabela__table"};function bn(e,a,n,l,s,m){const o=t.resolveComponent("EliTabelaDebug"),r=t.resolveComponent("EliTabelaEstados"),u=t.resolveComponent("EliTabelaCabecalho"),i=t.resolveComponent("EliTabelaModalColunas"),d=t.resolveComponent("EliTabelaModalFiltroAvancado"),b=t.resolveComponent("EliTabelaHead"),v=t.resolveComponent("EliTabelaBody"),C=t.resolveComponent("EliTabelaMenuAcoes"),y=t.resolveComponent("EliTabelaPaginacao");return t.openBlock(),t.createElementBlock("div",pn,[t.createVNode(o,{isDev:e.isDev,menuAberto:e.menuAberto,menuPopupPos:e.menuPopupPos},{default:t.withCtx(()=>[t.createElementVNode("div",null,"paginaAtual: "+t.toDisplayString(e.paginaAtual),1),t.createElementVNode("div",null,"limit: "+t.toDisplayString(e.registrosPorConsulta),1),t.createElementVNode("div",null,"texto_busca: "+t.toDisplayString((e.valorBusca||"").trim()),1),t.createElementVNode("div",null,"filtrosAvancadosAtivos: "+t.toDisplayString(JSON.stringify(e.filtrosAvancadosAtivos)),1),t.createElementVNode("div",null,"quantidadeTotal: "+t.toDisplayString(e.quantidade),1)]),_:1},8,["isDev","menuAberto","menuPopupPos"]),e.carregando||e.erro||!e.linhas.length?(t.openBlock(),t.createBlock(r,{key:0,carregando:e.carregando,erro:e.erro,mensagemVazio:e.tabela.mensagemVazio},null,8,["carregando","erro","mensagemVazio"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.exibirBusca||e.temAcoesCabecalho?(t.openBlock(),t.createBlock(u,{key:0,exibirBusca:e.exibirBusca,exibirBotaoFiltroAvancado:e.exibirFiltroAvancado,valorBusca:e.valorBusca,acoesCabecalho:e.acoesCabecalho,onBuscar:e.atualizarBusca,onColunas:e.abrirModalColunas,onFiltroAvancado:e.abrirModalFiltro},null,8,["exibirBusca","exibirBotaoFiltroAvancado","valorBusca","acoesCabecalho","onBuscar","onColunas","onFiltroAvancado"])):t.createCommentVNode("",!0),t.createVNode(i,{aberto:e.modalColunasAberto,rotulosColunas:e.rotulosColunas,configInicial:e.configColunas,colunas:e.tabela.colunas,onFechar:e.fecharModalColunas,onSalvar:e.salvarModalColunas},null,8,["aberto","rotulosColunas","configInicial","colunas","onFechar","onSalvar"]),t.createVNode(d,{aberto:e.modalFiltroAberto,filtrosBase:e.tabela.filtroAvancado??[],modelo:e.filtrosUi,onFechar:e.fecharModalFiltro,onLimpar:e.limparFiltrosAvancados,onSalvar:e.salvarFiltrosAvancados},null,8,["aberto","filtrosBase","modelo","onFechar","onLimpar","onSalvar"]),t.createElementVNode("table",fn,[t.createVNode(b,{colunas:e.colunasEfetivas,temAcoes:e.temAcoes,temColunasInvisiveis:e.temColunasInvisiveis,colunaOrdenacao:e.colunaOrdenacao,direcaoOrdenacao:e.direcaoOrdenacao,onAlternarOrdenacao:e.alternarOrdenacao},null,8,["colunas","temAcoes","temColunasInvisiveis","colunaOrdenacao","direcaoOrdenacao","onAlternarOrdenacao"]),t.createVNode(v,{colunas:e.colunasEfetivas,colunasInvisiveis:e.colunasInvisiveisEfetivas,temColunasInvisiveis:e.temColunasInvisiveis,linhasExpandidas:e.linhasExpandidas,linhas:e.linhasPaginadas,temAcoes:e.temAcoes,menuAberto:e.menuAberto,possuiAcoes:e.possuiAcoes,toggleMenu:e.toggleMenu,alternarLinhaExpandida:e.alternarLinhaExpandida},null,8,["colunas","colunasInvisiveis","temColunasInvisiveis","linhasExpandidas","linhas","temAcoes","menuAberto","possuiAcoes","toggleMenu","alternarLinhaExpandida"])]),t.createVNode(C,{ref:"menuPopup",menuAberto:e.menuAberto,posicao:e.menuPopupPos,acoes:e.menuAberto===null?[]:e.acoesDisponiveisPorLinha(e.menuAberto),linha:e.menuAberto===null?null:e.linhasPaginadas[e.menuAberto],onExecutar:a[0]||(a[0]=({acao:c,linha:$})=>{e.menuAberto=null,c.acao($)})},null,8,["menuAberto","posicao","acoes","linha"]),e.totalPaginas>1&&e.quantidadeFiltrada>0?(t.openBlock(),t.createBlock(y,{key:1,pagina:e.paginaAtual,totalPaginas:e.totalPaginas,maximoBotoes:e.tabela.maximo_botoes_paginacao,onAlterar:e.irParaPagina},null,8,["pagina","totalPaginas","maximoBotoes","onAlterar"])):t.createCommentVNode("",!0)],64))])}const Qe=T(mn,[["render",bn]]),hn=(e,a)=>[e,a],gn={install(e){e.component("EliOlaMundo",Me),e.component("EliBotao",_e),e.component("EliBadge",ye),e.component("EliCartao",we),e.component("EliTabela",Qe),e.component("EliEntradaTexto",$e),e.component("EliEntradaNumero",Se),e.component("EliEntradaDataHora",De),e.component("EliEntradaParagrafo",Je),e.component("EliEntradaSelecao",We)}};w.EliBadge=ye,w.EliBotao=_e,w.EliCartao=we,w.EliEntradaDataHora=De,w.EliEntradaNumero=Se,w.EliEntradaParagrafo=Je,w.EliEntradaSelecao=We,w.EliEntradaTexto=$e,w.EliOlaMundo=Me,w.EliTabela=Qe,w.celulaTabela=hn,w.default=gn,Object.defineProperties(w,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})})); diff --git a/dist/types/componentes/EliEntrada/EliEntradaParagrafo.vue.d.ts b/dist/types/componentes/EliEntrada/EliEntradaParagrafo.vue.d.ts index 4381ba1..9ed30cb 100644 --- a/dist/types/componentes/EliEntrada/EliEntradaParagrafo.vue.d.ts +++ b/dist/types/componentes/EliEntrada/EliEntradaParagrafo.vue.d.ts @@ -27,8 +27,8 @@ declare const __VLS_export: import("vue").DefineComponent true; diff --git a/dist/types/componentes/EliEntrada/EliEntradaSelecao.vue.d.ts b/dist/types/componentes/EliEntrada/EliEntradaSelecao.vue.d.ts index 61f0451..32d35c9 100644 --- a/dist/types/componentes/EliEntrada/EliEntradaSelecao.vue.d.ts +++ b/dist/types/componentes/EliEntrada/EliEntradaSelecao.vue.d.ts @@ -36,8 +36,8 @@ declare const __VLS_export: import("vue").DefineComponent; required: false; default: undefined; @@ -174,11 +174,11 @@ export declare const registryTabelaCelulas: { default: undefined; }; densidade: { - type: import("vue").PropType; + type: import("vue").PropType; default: undefined; }; variante: { - type: import("vue").PropType; + type: import("vue").PropType; default: undefined; }; min: { @@ -209,8 +209,8 @@ export declare const registryTabelaCelulas: { dicaPersistente?: boolean; min?: string; max?: string; - densidade?: import("../../tipos/entrada.js").CampoDensidade; - variante?: import("../../tipos/entrada.js").CampoVariante; + densidade?: import("../../index.js").CampoDensidade; + variante?: import("../../index.js").CampoVariante; }>; desabilitadoEfetivo: import("vue").ComputedRef; emitCompatFocus: () => void; @@ -243,8 +243,8 @@ export declare const registryTabelaCelulas: { dicaPersistente?: boolean; min?: string; max?: string; - densidade?: import("../../tipos/entrada.js").CampoDensidade; - variante?: import("../../tipos/entrada.js").CampoVariante; + densidade?: import("../../index.js").CampoDensidade; + variante?: import("../../index.js").CampoVariante; }>; required: false; default: undefined; @@ -290,11 +290,11 @@ export declare const registryTabelaCelulas: { default: undefined; }; densidade: { - type: import("vue").PropType; + type: import("vue").PropType; default: undefined; }; variante: { - type: import("vue").PropType; + type: import("vue").PropType; default: undefined; }; min: { @@ -324,8 +324,8 @@ export declare const registryTabelaCelulas: { dicaPersistente: boolean; min: string | undefined; max: string | undefined; - densidade: import("../../tipos/entrada.js").CampoDensidade; - variante: import("../../tipos/entrada.js").CampoVariante; + densidade: import("../../index.js").CampoDensidade; + variante: import("../../index.js").CampoVariante; opcoes: { rotulo: string; placeholder?: string; @@ -338,8 +338,8 @@ export declare const registryTabelaCelulas: { dicaPersistente?: boolean; min?: string; max?: string; - densidade?: import("../../tipos/entrada.js").CampoDensidade; - variante?: import("../../tipos/entrada.js").CampoVariante; + densidade?: import("../../index.js").CampoDensidade; + variante?: import("../../index.js").CampoVariante; }; value: string | null | undefined; placeholder: string; @@ -364,8 +364,8 @@ export declare const registryTabelaCelulas: { mensagensErro?: string | string[]; dica?: string; dicaPersistente?: boolean; - densidade?: import("../../tipos/entrada.js").CampoDensidade; - variante?: import("../../tipos/entrada.js").CampoVariante; + densidade?: import("../../index.js").CampoDensidade; + variante?: import("../../index.js").CampoVariante; }>; required: true; }; @@ -386,8 +386,8 @@ export declare const registryTabelaCelulas: { mensagensErro?: string | string[]; dica?: string; dicaPersistente?: boolean; - densidade?: import("../../tipos/entrada.js").CampoDensidade; - variante?: import("../../tipos/entrada.js").CampoVariante; + densidade?: import("../../index.js").CampoDensidade; + variante?: import("../../index.js").CampoVariante; }; }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { "update:value": (_v: string | null | undefined) => true; @@ -412,8 +412,8 @@ export declare const registryTabelaCelulas: { mensagensErro?: string | string[]; dica?: string; dicaPersistente?: boolean; - densidade?: import("../../tipos/entrada.js").CampoDensidade; - variante?: import("../../tipos/entrada.js").CampoVariante; + densidade?: import("../../index.js").CampoDensidade; + variante?: import("../../index.js").CampoVariante; }>; required: true; }; @@ -2032,8 +2032,8 @@ export declare const registryTabelaCelulas: { mensagensErro?: string | string[]; dica?: string; dicaPersistente?: boolean; - densidade?: import("../../tipos/entrada.js").CampoDensidade; - variante?: import("../../tipos/entrada.js").CampoVariante; + densidade?: import("../../index.js").CampoDensidade; + variante?: import("../../index.js").CampoVariante; }>; required: true; }; @@ -2059,8 +2059,8 @@ export declare const registryTabelaCelulas: { mensagensErro?: string | string[]; dica?: string; dicaPersistente?: boolean; - densidade?: import("../../tipos/entrada.js").CampoDensidade; - variante?: import("../../tipos/entrada.js").CampoVariante; + densidade?: import("../../index.js").CampoDensidade; + variante?: import("../../index.js").CampoVariante; }; itens: import("vue").Ref<{ chave: string; @@ -2101,8 +2101,8 @@ export declare const registryTabelaCelulas: { mensagensErro?: string | string[]; dica?: string; dicaPersistente?: boolean; - densidade?: import("../../tipos/entrada.js").CampoDensidade; - variante?: import("../../tipos/entrada.js").CampoVariante; + densidade?: import("../../index.js").CampoDensidade; + variante?: import("../../index.js").CampoVariante; }>; required: true; }; diff --git a/dist/types/componentes/EliTabela/EliTabela.vue.d.ts b/dist/types/componentes/EliTabela/EliTabela.vue.d.ts index c217e76..6594b8f 100644 --- a/dist/types/componentes/EliTabela/EliTabela.vue.d.ts +++ b/dist/types/componentes/EliTabela/EliTabela.vue.d.ts @@ -21,6 +21,12 @@ declare const __VLS_export: import("vue").DefineComponent; linhas: import("vue").Ref; linhasPaginadas: import("vue").ComputedRef; + filtrosAvancadosAtivos: import("vue").ComputedRef<{ + coluna: string; + valor: any; + operador: "in" | "=" | "!=" | ">" | ">=" | "<" | "<=" | "like" | "isNull"; + ou?: boolean | undefined; + }[]>; quantidadeFiltrada: import("vue").ComputedRef; quantidade: import("vue").Ref; menuAberto: import("vue").Ref; @@ -29,6 +35,7 @@ declare const __VLS_export: import("vue").DefineComponent; direcaoOrdenacao: import("vue").Ref<"desc" | "asc", "desc" | "asc">; totalPaginas: import("vue").ComputedRef; + registrosPorConsulta: import("vue").ComputedRef; exibirBusca: import("vue").ComputedRef; exibirFiltroAvancado: import("vue").ComputedRef; acoesCabecalho: import("vue").ComputedRef<{ @@ -36,6 +43,8 @@ declare const __VLS_export: import("vue").DefineComponent void; + atualizarConsulta?: () => Promise; + editarLista?: ((lista: any[]) => Promise) | undefined; }[]>; temAcoesCabecalho: import("vue").ComputedRef; temAcoes: import("vue").ComputedRef; @@ -764,8 +773,8 @@ declare const __VLS_export: import("vue").DefineComponent; required: false; default: undefined; @@ -1047,11 +1056,11 @@ declare const __VLS_export: import("vue").DefineComponent; + type: PropType; default: undefined; }; variante: { - type: PropType; + type: PropType; default: undefined; }; min: { @@ -1082,8 +1091,8 @@ declare const __VLS_export: import("vue").DefineComponent; desabilitadoEfetivo: import("vue").ComputedRef; emitCompatFocus: () => void; @@ -1116,8 +1125,8 @@ declare const __VLS_export: import("vue").DefineComponent; required: false; default: undefined; @@ -1163,11 +1172,11 @@ declare const __VLS_export: import("vue").DefineComponent; + type: PropType; default: undefined; }; variante: { - type: PropType; + type: PropType; default: undefined; }; min: { @@ -1197,8 +1206,8 @@ declare const __VLS_export: import("vue").DefineComponent; required: false; default: undefined; @@ -319,11 +319,11 @@ declare const __VLS_export: import("vue").DefineComponent; + type: PropType; default: undefined; }; variante: { - type: PropType; + type: PropType; default: undefined; }; min: { @@ -354,8 +354,8 @@ declare const __VLS_export: import("vue").DefineComponent; desabilitadoEfetivo: import("vue").ComputedRef; emitCompatFocus: () => void; @@ -388,8 +388,8 @@ declare const __VLS_export: import("vue").DefineComponent; required: false; default: undefined; @@ -435,11 +435,11 @@ declare const __VLS_export: import("vue").DefineComponent; + type: PropType; default: undefined; }; variante: { - type: PropType; + type: PropType; default: undefined; }; min: { @@ -469,8 +469,8 @@ declare const __VLS_export: import("vue").DefineComponent = { rotulo: string; /** Função executada ao clicar no botão. */ acao: () => void; + /** + * Callback opcional para forçar atualização da consulta. + * Observação: o componente `EliTabela` pode ignorar isso dependendo do modo de uso. + */ + atualizarConsulta?: () => Promise; + /** + * Callback opcional para permitir editar a lista localmente (sem refazer consulta). + * Observação: o componente `EliTabela` pode ignorar isso dependendo do modo de uso. + */ + editarLista?: (lista: T[]) => Promise; }[]; - /** configuração para aplicação dos filtros padrões */ filtroAvancado?: { rotulo: string; coluna: keyof T; diff --git a/dist/types/componentes/cartao/EliCartao.vue.d.ts b/dist/types/componentes/cartao/EliCartao.vue.d.ts index dad2251..2252e6b 100644 --- a/dist/types/componentes/cartao/EliCartao.vue.d.ts +++ b/dist/types/componentes/cartao/EliCartao.vue.d.ts @@ -59,15 +59,15 @@ declare const __VLS_export: import("vue").DefineComponent; + type: PropType; default: string; }; offsetX: { - type: PropType; + type: PropType; default: string; }; offsetY: { - type: PropType; + type: PropType; default: string; }; dot: { @@ -83,7 +83,7 @@ declare const __VLS_export: import("vue").DefineComponent; + type: PropType; default: string; }; }>, { @@ -97,15 +97,15 @@ declare const __VLS_export: import("vue").DefineComponent; + type: PropType; default: string; }; offsetX: { - type: PropType; + type: PropType; default: string; }; offsetY: { - type: PropType; + type: PropType; default: string; }; dot: { @@ -121,18 +121,18 @@ declare const __VLS_export: import("vue").DefineComponent; + type: PropType; default: string; }; }>> & Readonly<{}>, { color: string; - location: import("../../tipos").IndicadorLocalizacao; - offsetX: import("../../tipos").IndicadorOffset; - offsetY: import("../../tipos").IndicadorOffset; + location: import("../..").IndicadorLocalizacao; + offsetX: import("../..").IndicadorOffset; + offsetY: import("../..").IndicadorOffset; dot: boolean; visible: boolean; badge: string | number | undefined; - radius: import("../../tipos").IndicadorPresetRaio | import("../../tipos").CssLength; + radius: import("../..").IndicadorPresetRaio | import("../..").CssLength; }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>; }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>; /** diff --git a/dist/types/componentes/ola_mundo/EliOlaMundo.vue.d.ts b/dist/types/componentes/ola_mundo/EliOlaMundo.vue.d.ts index 4b0d59a..94acb2c 100644 --- a/dist/types/componentes/ola_mundo/EliOlaMundo.vue.d.ts +++ b/dist/types/componentes/ola_mundo/EliOlaMundo.vue.d.ts @@ -11,11 +11,11 @@ declare const __VLS_export: import("vue").DefineComponent<{}, { default: string; }; variant: { - type: import("vue").PropType; + type: import("vue").PropType; default: string; }; size: { - type: import("vue").PropType; + type: import("vue").PropType; default: string; }; disabled: { @@ -32,11 +32,11 @@ declare const __VLS_export: import("vue").DefineComponent<{}, { default: string; }; variant: { - type: import("vue").PropType; + type: import("vue").PropType; default: string; }; size: { - type: import("vue").PropType; + type: import("vue").PropType; default: string; }; disabled: { @@ -49,8 +49,8 @@ declare const __VLS_export: import("vue").DefineComponent<{}, { }; }>> & Readonly<{}>, { color: string; - variant: import("../../tipos/botao.js").BotaoVariante; - size: import("../../tipos/botao.js").BotaoTamanho; + variant: import("../../index.js").BotaoVariante; + size: import("../../index.js").BotaoTamanho; disabled: boolean; loading: boolean; }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>; @@ -60,15 +60,15 @@ declare const __VLS_export: import("vue").DefineComponent<{}, { default: string; }; location: { - type: import("vue").PropType; + type: import("vue").PropType; default: string; }; offsetX: { - type: import("vue").PropType; + type: import("vue").PropType; default: string; }; offsetY: { - type: import("vue").PropType; + type: import("vue").PropType; default: string; }; dot: { @@ -84,7 +84,7 @@ declare const __VLS_export: import("vue").DefineComponent<{}, { default: undefined; }; radius: { - type: import("vue").PropType; + type: import("vue").PropType; default: string; }; }>, { @@ -98,15 +98,15 @@ declare const __VLS_export: import("vue").DefineComponent<{}, { default: string; }; location: { - type: import("vue").PropType; + type: import("vue").PropType; default: string; }; offsetX: { - type: import("vue").PropType; + type: import("vue").PropType; default: string; }; offsetY: { - type: import("vue").PropType; + type: import("vue").PropType; default: string; }; dot: { @@ -122,18 +122,18 @@ declare const __VLS_export: import("vue").DefineComponent<{}, { default: undefined; }; radius: { - type: import("vue").PropType; + type: import("vue").PropType; default: string; }; }>> & Readonly<{}>, { color: string; - location: import("../../tipos/indicador.js").IndicadorLocalizacao; - offsetX: import("../../tipos/indicador.js").IndicadorOffset; - offsetY: import("../../tipos/indicador.js").IndicadorOffset; + location: import("../../index.js").IndicadorLocalizacao; + offsetX: import("../../index.js").IndicadorOffset; + offsetY: import("../../index.js").IndicadorOffset; dot: boolean; visible: boolean; badge: string | number | undefined; - radius: import("../../tipos/indicador.js").IndicadorPresetRaio | import("../../tipos/indicador.js").CssLength; + radius: import("../../index.js").IndicadorPresetRaio | import("../../index.js").CssLength; }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>; EliEntradaTexto: import("vue").DefineComponent
- + +
paginaAtual: {{ paginaAtual }}
+
limit: {{ registrosPorConsulta }}
+
texto_busca: {{ (valorBusca || '').trim() }}
+
filtrosAvancadosAtivos: {{ JSON.stringify(filtrosAvancadosAtivos) }}
+
quantidadeTotal: {{ quantidade }}
+
(() => { @@ -351,85 +365,20 @@ export default defineComponent({ return 10; }); - function aplicarFiltroTexto(linhasIn: unknown[]) { - const q = (valorBusca.value ?? "").trim().toLowerCase(); - if (!q) return linhasIn; - // filtro simples: stringifica o objeto - return linhasIn.filter((l) => JSON.stringify(l).toLowerCase().includes(q)); - } - - function compararOperador(operador: string, valorLinha: any, valorFiltro: any): boolean { - switch (operador) { - case "=": - return valorLinha == valorFiltro; - case "!=": - return valorLinha != valorFiltro; - case ">": - return Number(valorLinha) > Number(valorFiltro); - case ">=": - return Number(valorLinha) >= Number(valorFiltro); - case "<": - return Number(valorLinha) < Number(valorFiltro); - case "<=": - return Number(valorLinha) <= Number(valorFiltro); - case "like": { - const a = String(valorLinha ?? "").toLowerCase(); - const b = String(valorFiltro ?? "").toLowerCase(); - return a.includes(b); - } - case "in": { - // aceita "a,b,c" ou array - const arr = Array.isArray(valorFiltro) - ? valorFiltro - : String(valorFiltro ?? "") - .split(",") - .map((s) => s.trim()) - .filter(Boolean); - return arr.includes(String(valorLinha)); - } - case "isNull": - return valorLinha === null || valorLinha === undefined || valorLinha === ""; - default: - return true; - } - } - - function aplicarFiltroAvancado(linhasIn: unknown[]) { - const filtros = filtrosAvancadosAtivos.value; - if (!filtros.length) return linhasIn; - - return linhasIn.filter((l: any) => { - return filtros.every((f) => { - const vLinha = l?.[f.coluna as any]; - return compararOperador(String(f.operador), vLinha, (f as any).valor); - }); - }); - } - - const linhasFiltradas = computed(() => { - const base = linhas.value ?? []; - return aplicarFiltroAvancado(aplicarFiltroTexto(base)); - }); - - /** Quantidade agora segue a filtragem local */ - const quantidadeFiltrada = computed(() => linhasFiltradas.value.length); - - /** Total de páginas calculado com base no filtrado */ + /** Total de páginas calculado com base no total retornado pela API */ const totalPaginas = computed(() => { const limite = registrosPorConsulta.value; if (!limite || limite <= 0) return 1; - - const total = quantidadeFiltrada.value; + const total = quantidade.value ?? 0; if (!total) return 1; - return Math.max(1, Math.ceil(total / limite)); }); - const linhasPaginadas = computed(() => { - const limite = Math.max(1, registrosPorConsulta.value); - const offset = (paginaAtual.value - 1) * limite; - return linhasFiltradas.value.slice(offset, offset + limite); - }); + /** As linhas já vêm paginadas do backend */ + const linhasPaginadas = computed(() => linhas.value ?? []); + + /** Quantidade exibida é a quantidade total retornada pela consulta */ + const quantidadeFiltrada = computed(() => quantidade.value ?? 0); /** Indica se existem ações por linha */ const temAcoes = computed(() => (props.tabela.acoesLinha ?? []).length > 0); @@ -594,12 +543,11 @@ export default defineComponent({ menuAberto.value = null; linhasExpandidas.value = {}; - // Em modo simulação (filtro local), sempre buscamos a lista completa. - // A paginação é aplicada APÓS a filtragem. const limite = Math.max(1, registrosPorConsulta.value); - const offset = 0; + const offset = (paginaAtual.value - 1) * limite; const parametrosConsulta: { + filtros?: tipoFiltro[]; coluna_ordem?: never; direcao_ordem?: "asc" | "desc"; offSet: number; @@ -607,16 +555,28 @@ export default defineComponent({ texto_busca?: string; } = { offSet: offset, - limit: 999999, + limit: limite, }; - // texto_busca ficará somente para filtragem local. + // Regra combinatória definida: busca tem prioridade. + const busca = (valorBusca.value ?? "").trim(); + if (busca) { + parametrosConsulta.texto_busca = busca; + } else { + const filtros = filtrosAvancadosAtivos.value; + if (filtros.length) parametrosConsulta.filtros = filtros; + } if (colunaOrdenacao.value) { parametrosConsulta.coluna_ordem = colunaOrdenacao.value as never; parametrosConsulta.direcao_ordem = direcaoOrdenacao.value; } + if (import.meta.env.DEV) { + // eslint-disable-next-line no-console + console.log("[EliTabela] consulta(parametros)", parametrosConsulta); + } + try { const tabelaConfig = props.tabela; const res = await tabelaConfig.consulta(parametrosConsulta); @@ -631,16 +591,13 @@ export default defineComponent({ } const valores = res.valor?.valores ?? []; - const total = valores.length; + const total = (res.valor as any)?.quantidade ?? valores.length; linhas.value = valores; - quantidade.value = total; + quantidade.value = Number(total) || 0; - const totalPaginasRecalculado = Math.max(1, Math.ceil((quantidadeFiltrada.value || 0) / limite)); - if (paginaAtual.value > totalPaginasRecalculado) { - paginaAtual.value = totalPaginasRecalculado; - return; - } + const totalPaginasRecalculado = Math.max(1, Math.ceil((quantidade.value || 0) / limite)); + if (paginaAtual.value > totalPaginasRecalculado) paginaAtual.value = totalPaginasRecalculado; const acoesLinhaConfiguradas = tabelaConfig.acoesLinha ?? []; if (!acoesLinhaConfiguradas.length) { @@ -720,10 +677,7 @@ export default defineComponent({ /** Watch: mudança de página dispara nova consulta */ watch(paginaAtual, (nova, antiga) => { - // paginação local não precisa recarregar - if (nova !== antiga) { - // noop - } + if (nova !== antiga) void carregar(); }); /** Watch: troca de configuração reseta estados e recarrega */ @@ -774,6 +728,7 @@ export default defineComponent({ erro, linhas, linhasPaginadas, + filtrosAvancadosAtivos, quantidadeFiltrada, quantidade, menuAberto, @@ -782,6 +737,7 @@ export default defineComponent({ colunaOrdenacao, direcaoOrdenacao, totalPaginas, + registrosPorConsulta, // computed exibirBusca, diff --git a/src/componentes/EliTabela/EliTabelaDebug.vue b/src/componentes/EliTabela/EliTabelaDebug.vue index bc16286..e2e8345 100644 --- a/src/componentes/EliTabela/EliTabelaDebug.vue +++ b/src/componentes/EliTabela/EliTabelaDebug.vue @@ -7,6 +7,7 @@
EliTabela debug
menuAberto: {{ menuAberto }}
menuPos: top={{ menuPopupPos.top }}, left={{ menuPopupPos.left }}
+
diff --git a/src/componentes/EliTabela/EliTabelaModalFiltroAvancado.vue b/src/componentes/EliTabela/EliTabelaModalFiltroAvancado.vue index 5fe7435..e4087e5 100644 --- a/src/componentes/EliTabela/EliTabelaModalFiltroAvancado.vue +++ b/src/componentes/EliTabela/EliTabelaModalFiltroAvancado.vue @@ -37,7 +37,11 @@
-