diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b679e44..dee7e8a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,16 @@ jobs: run: npm run typecheck - name: Testes unitários - run: npm test + run: npm run test:coverage + + - name: Publicar resumo da cobertura + if: always() + uses: actions/upload-artifact@v4 + with: + name: cobertura + path: artifacts/coverage/coverage-summary.json + if-no-files-found: ignore + retention-days: 7 - name: Build run: npm run build @@ -56,5 +65,85 @@ jobs: uses: actions/upload-artifact@v4 with: name: relatorio-e2e - path: playwright-report + path: artifacts/e2e/report retention-days: 7 + + lighthouse: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + perfil: [celular, desktop] + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 24 + cache: npm + + - run: npm ci --ignore-scripts + + - name: Build e Lighthouse + run: npm run lighthouse + env: + LHCI_PERFIL: ${{ matrix.perfil }} + + - name: Publicar relatório do Lighthouse + if: always() + uses: actions/upload-artifact@v4 + with: + name: relatorio-lighthouse-${{ matrix.perfil }} + path: artifacts/lighthouse/reports + retention-days: 7 + + resumo: + if: ${{ !cancelled() && github.event_name == 'pull_request' }} + needs: [verificacoes, lighthouse] + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 24 + + - name: Baixar a cobertura + uses: actions/download-artifact@v4 + with: + name: cobertura + path: artifacts/coverage + continue-on-error: true + + - name: Baixar os relatórios do Lighthouse + uses: actions/download-artifact@v4 + with: + pattern: relatorio-lighthouse-* + path: artifacts/lighthouse/reports + merge-multiple: true + continue-on-error: true + + - name: Montar o resumo + env: + COMMIT_DO_PR: ${{ github.event.pull_request.head.sha }} + run: | + node scripts/resumo-pr.mjs > resumo.md + cat resumo.md >> "$GITHUB_STEP_SUMMARY" + + - name: Comentar no PR + continue-on-error: true + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPOSITORIO: ${{ github.repository }} + PR: ${{ github.event.pull_request.number }} + run: | + id=$(gh api "repos/$REPOSITORIO/issues/$PR/comments" --paginate \ + --jq '.[] | select(.body | contains("")) | .id' | head -1) + if [ -n "$id" ]; then + gh api --method PATCH "repos/$REPOSITORIO/issues/comments/$id" -F body=@resumo.md + else + gh api --method POST "repos/$REPOSITORIO/issues/$PR/comments" -F body=@resumo.md + fi diff --git a/.gitignore b/.gitignore index df04486..b17ca12 100644 --- a/.gitignore +++ b/.gitignore @@ -29,10 +29,11 @@ dist-ssr *.sw? # Playwright -/test-results/ -/playwright-report/ /blob-report/ /playwright/.cache/ # Vercel .vercel + +# Tudo o que os testes, a cobertura e o Lighthouse geram +/artifacts/ diff --git a/README.md b/README.md index 0918e7b..a76f1eb 100644 --- a/README.md +++ b/README.md @@ -134,6 +134,7 @@ Se o navegador acusar erro de CORS, confira `CORS_ORIGENS` no `.env` do backend. | `npm run test:e2e` | Roda os testes e2e (Playwright) com a API simulada, no desktop e, os marcados com `@celular`, também em celular (360 px) e tablet (768 px) | | `npm run test:e2e:headed` | Roda os testes e2e com o navegador visível, um teste por vez | | `npm run api:tipos` | Gera `src/api/schema.d.ts` de novo. Precisa da API no ar | +| `npm run lighthouse` | Gera o build em `artifacts/lighthouse/build/` e roda o Lighthouse CI com a API simulada (ver [Lighthouse](#lighthouse)) | > [!NOTE] > Use `npm run typecheck` para verificar os tipos. O `tsc --noEmit` na raiz não verifica nada, porque o `tsconfig.json` principal só aponta para os outros. @@ -154,6 +155,31 @@ Os testes das telas do parceiro levam a marca `@celular` e rodam também nos pro Antes dos testes, o Playwright gera o build e sobe o `npm run preview` na porta 4173. Fora do CI, se já houver um servidor nessa porta, ele é reaproveitado e os testes rodam contra o build antigo; derrube esse servidor depois de mudar o código. +### Lighthouse + +O Lighthouse CI (`@lhci/cli`, configurado em [`lighthouserc.cjs`](lighthouserc.cjs)) audita `/login`, `/definir-senha?token=x`, o painel (`/`), `/metodologia` e `/cadastros/usuarios`, duas execuções por página. O build é servido por [`lighthouse/servidor.mjs`](lighthouse/servidor.mjs) na porta 4179, que também responde a `/api` com dados simulados (os mesmos dos e2e) e, nas telas autenticadas, grava a sessão de um ADMIN no `sessionStorage` antes do app carregar. O texto é enviado com gzip, como na Vercel. + +```bash +npm run lighthouse # celular (padrão do Lighthouse) +LHCI_PERFIL=desktop npm run lighthouse # desktop +``` + +Sem Chrome instalado, aponte `CHROME_PATH` para o Chromium do Playwright (`~/.cache/ms-playwright/chromium-*/chrome-linux64/chrome`). Os relatórios ficam em `artifacts/lighthouse/reports/celular/` e `artifacts/lighthouse/reports/desktop/`. No CI, o job `lighthouse` roda os dois perfis e publica os relatórios como artefato. + +Limites: acessibilidade e boas práticas abaixo de 0,95 reprovam o job. Desempenho (0,75 no celular e 0,90 no desktop), SEO (0,90), LCP (3,5 s no celular e 1,5 s no desktop), TBT (600 ms no celular e 200 ms no desktop) e CLS (0,1) só geram aviso. + +Medido em 22/11/2026 (melhor das duas execuções; desempenho, acessibilidade, boas práticas e SEO, de 0 a 100): + +| Página | Celular | Desktop | +|---|---|---| +| `/login` | 100, 100, 100, 91 | 100, 100, 100, 91 | +| `/definir-senha` | 94, 100, 100, 91 | 100, 100, 100, 91 | +| `/` (painel) | 80, 100, 100, 91 | 96, 100, 100, 91 | +| `/metodologia` | 94, 100, 100, 91 | 100, 100, 100, 91 | +| `/cadastros/usuarios` | 87, 100, 100, 91 | 100, 100, 100, 91 | + +O SEO perde pontos só pela falta de ``. No painel, o CLS fica em 0,17 no celular e 0,11 no desktop, causado pela troca da fonte quando ela termina de carregar, e por isso o aviso de CLS aparece nessa página. O desempenho no celular varia bastante entre execuções (de 77 a 87 em `/cadastros/usuarios`). + ## Estrutura do projeto ```text diff --git a/e2e/acessibilidade.spec.ts b/e2e/acessibilidade.spec.ts new file mode 100644 index 0000000..bc4d3d6 --- /dev/null +++ b/e2e/acessibilidade.spec.ts @@ -0,0 +1,544 @@ +import AxeBuilder from '@axe-core/playwright' +import { expect, test, type Locator, type Page, type Route } from '@playwright/test' +import { injetarSessao } from './sessao.ts' +import { PUBLICADA_AGOSTO, PUBLICADA_CARNAVAL, RESULTADO_AGOSTO } from './fixtures/resultado.ts' +import { grupoLazer, grupoSelos, itemAcademia, itemPiscina } from './fixtures/catalogo.ts' +import { ADMIN, PARCEIRO, VISUALIZADOR } from './fixtures/usuarios.ts' + +type Perfil = 'ADMIN' | 'PARCEIRO' | 'VISUALIZADOR' + +const USUARIOS: Record = { ADMIN, PARCEIRO, VISUALIZADOR } + +const TIPOS = [ + { codigo: 'HOTEL', nome: 'Hotel', calculaReceita: true, ordem: 1 }, + { codigo: 'RESORT', nome: 'Resort', calculaReceita: true, ordem: 2 }, + { codigo: 'POUSADA', nome: 'Pousada', calculaReceita: false, ordem: 3 }, +] + +const REFERENCIAS = { + tiposHospedagem: TIPOS, + feriados: [{ codigo: 'CARNAVAL', nome: 'Carnaval', ordem: 1 }], + faixasOcupacao: [ + { codigo: 'RUIM', nome: 'Ruim', percentualMinimo: 0 }, + { codigo: 'BOA', nome: 'Boa', percentualMinimo: 41 }, + { codigo: 'OTIMA', nome: 'Ótima', percentualMinimo: 61 }, + ], +} + +const PUBLICADAS = [PUBLICADA_AGOSTO, PUBLICADA_CARNAVAL] + +const RESULTADO = { + ...RESULTADO_AGOSTO, + distribuicaoFaixas: [ + { codigo: 'BOA', nome: 'Boa', percentualMinimo: 41, qtdMh: 30 }, + { codigo: 'OTIMA', nome: 'Ótima', percentualMinimo: 61, qtdMh: 28 }, + ], +} + +const FERIADOS = [ + { + feriadoCodigo: 'CARNAVAL', + nome: 'Carnaval', + anos: [ + { ano: 2025, taxaOcupacao: 80, fluxoTotal: 54_000, diariaMedia: 910, origem: 'HISTORICO' }, + { ano: 2026, taxaOcupacao: 82.5, fluxoTotal: 60_210, diariaMedia: 950, origem: 'SISTEMA' }, + ], + }, +] + +const CAMPANHA = { + id: 50, + rodadaId: 5, + nome: 'Consolidada de outubro de 2026', + modalidade: 'CONSOLIDADA', + tipoPeriodo: 'MENSAL', + periodoInicio: '2026-10-01', + periodoFim: '2026-10-31', + qtdDiarias: 31, + publicada: false, +} + +const RODADA = { + id: 5, + codigo: '005/26', + titulo: 'Consolidada de outubro', + status: 'ABERTA', + dataAbertura: '2026-11-01', + prazoResposta: '2099-11-30', + campanhas: [CAMPANHA], +} + +const ACOMPANHAMENTO = { + rodadaId: 5, + codigo: '005/26', + status: 'ABERTA', + campanhas: [ + { + campanhaId: 50, + nome: CAMPANHA.nome, + qtdMh: 2, + qtdRespondentes: 1, + leitosTotal: 9_500, + leitosRespondentes: 9_200, + percentualLeitosRespondentes: 96.84, + percentualMinimoPublicacao: 70, + atingiuMinimo: true, + estabelecimentos: [ + { + estabelecimentoId: 7, + nomeFantasia: 'Hotel Thermas', + tipoHospedagemCodigo: 'HOTEL', + qtdLeitos: 300, + respondeu: false, + }, + { + estabelecimentoId: 9, + nomeFantasia: 'Resort Águas', + tipoHospedagemCodigo: 'RESORT', + qtdLeitos: 9_200, + respondeu: true, + versao: 2, + }, + ], + }, + ], +} + +const PREVIA = { + campanhaId: 50, + qtdMh: 2, + qtdRespondentes: 1, + leitosTotal: 9_500, + leitosRespondentes: 9_200, + percentualLeitosRespondentes: 96.84, + percentualMinimoPublicacao: 70, + podePublicar: false, + impedimentos: ['A pesquisa 005/26 precisa ser encerrada antes da publicação.'], + avisos: ['Hotel Thermas ainda não respondeu.'], + resultado: { ...RESULTADO, campanha: CAMPANHA, publicado: false }, +} + +const DIARIAS = [ + { + tipoHospedagemCodigo: 'RESORT', + diariaMedia: 900, + fonte: 'Associação dos resorts', + registradoPor: 1, + registradoEm: '2026-11-20T13:00:00Z', + }, +] + +const HOTEL = { + id: 12, + nomeFantasia: 'Hotel Exemplo', + tipoHospedagemCodigo: 'HOTEL', + situacao: 'REGULAR', + ativo: true, + qtdUh: 40, + qtdLeitos: 120, +} + +const POUSADA = { + id: 7, + nomeFantasia: 'Pousada do Sol', + tipoHospedagemCodigo: 'POUSADA', + situacao: 'REGULAR', + ativo: true, +} + +const CAPACIDADES = [ + { + id: 1, + vigenteDesde: '2025-01-01', + qtdUh: 40, + qtdUhPcd: 2, + qtdLeitos: 120, + maxLeitosPorUh: 4, + leitosUteis: 100, + }, +] + +const CATALOGO = [grupoLazer([itemPiscina(), itemAcademia()]), grupoSelos()] + +const PARAMETROS = [ + { + id: 1, + vigenteDesde: '2025-01-01', + percentualDayUse: 15.15, + diasEmParques: 2, + gastoMedioIngresso: 105, + diasPermanenciaMedia: 4, + gastoMedioDiario: 250, + percentualMinimoLeitosPublicacao: 70, + fonte: 'Estudo OTO 2025', + }, +] + +const RHC = [ + { + id: 1, + vigenteDesde: '2025-01-01', + qtdRegistros: 478, + qtdUh: 1_200, + qtdLeitos: 5_116, + maxLeitosPorUh: 5, + leitosUteis: 3_600, + }, +] + +const USUARIOS_CADASTRADOS = [ + { ...USUARIOS.ADMIN }, + { ...USUARIOS.VISUALIZADOR, ativo: false }, + { + ...USUARIOS.PARCEIRO, + primeiroAcessoPendente: true, + estabelecimentos: [{ id: 7, nomeFantasia: 'Pousada do Sol' }], + }, +] + +const HISTORICO = [ + { + id: 1, + indicador: 'TAXA_OCUPACAO', + modalidade: 'CONSOLIDADA', + ano: 2024, + mes: 7, + valor: 80, + fonte: 'Planilha 2017-2025', + }, + { + id: 2, + indicador: 'FLUXO_TURISTAS', + modalidade: 'CONSOLIDADA', + ano: 2024, + feriadoCodigo: 'CARNAVAL', + valor: 52_000, + fonte: 'Planilha 2017-2025', + }, +] + +const PENDENCIAS = [ + { + campanhaId: 50, + campanhaNome: CAMPANHA.nome, + periodoInicio: CAMPANHA.periodoInicio, + periodoFim: CAMPANHA.periodoFim, + rodadaCodigo: '005/26', + prazoResposta: '2099-11-30', + estabelecimentoId: 7, + nomeFantasia: 'Pousada do Sol', + respondida: false, + }, +] + +const MINHAS = [ + { + respostaId: 301, + campanhaId: 15, + campanhaNome: 'Agosto de 2026', + modalidade: 'CONSOLIDADA', + tipoPeriodo: 'MENSAL', + periodoInicio: '2026-08-01', + periodoFim: '2026-08-31', + estabelecimentoId: 7, + nomeFantasia: 'Pousada do Sol', + taxaOcupacao: 58, + diariaMedia: 320, + taxaOcupacaoCidade: 62.8, + }, +] + +function serieMensal(parametros: URLSearchParams) { + const fim = Number(parametros.get('anoFim') || 2026) + const inicio = Number(parametros.get('anoInicio') || fim - 2) + const anos = [] + for (let ano = inicio; ano <= fim; ano++) { + anos.push({ + ano, + meses: Array.from({ length: 12 }, (_, indice) => ({ + mes: indice + 1, + valor: ano === 2026 && indice > 7 ? null : 50 + ((indice * 7 + ano) % 30), + origem: ano < 2025 ? 'HISTORICO' : 'SISTEMA', + })), + }) + } + return { indicador: parametros.get('indicador') ?? 'TAXA_OCUPACAO', anos } +} + +function respostaGet(perfil: Perfil, caminho: string, parametros: URLSearchParams): unknown { + const estabelecimentos = perfil === 'PARCEIRO' ? [POUSADA] : [HOTEL, POUSADA] + const fixas: Record = { + '/api/me': USUARIOS[perfil], + '/api/referencias': REFERENCIAS, + '/api/campanhas/publicadas': PUBLICADAS, + '/api/campanhas/15/resultado': RESULTADO, + '/api/dashboard/feriados': FERIADOS, + '/api/rhc/vigente': RHC[0], + '/api/rhc': RHC, + '/api/parametros-calculo/vigente': PARAMETROS[0], + '/api/parametros-calculo': PARAMETROS, + '/api/rodadas': [RODADA, { ...RODADA, id: 4, codigo: '004/26', status: 'ENCERRADA' }], + '/api/rodadas/5': RODADA, + '/api/rodadas/5/acompanhamento': ACOMPANHAMENTO, + '/api/campanhas/50/respostas': [], + '/api/campanhas/50/previa': PREVIA, + '/api/campanhas/50/diarias': DIARIAS, + '/api/respostas/pendencias': PENDENCIAS, + '/api/respostas/minhas': MINHAS, + '/api/usuarios': USUARIOS_CADASTRADOS, + '/api/estabelecimentos': estabelecimentos, + '/api/estabelecimentos/12': { + id: 12, + ativo: true, + dados: { nomeFantasia: HOTEL.nomeFantasia }, + secretaria: { tipoHospedagemCodigo: 'HOTEL', situacao: 'REGULAR' }, + }, + '/api/estabelecimentos/7': { + id: 7, + ativo: true, + dados: { nomeFantasia: POUSADA.nomeFantasia, endereco: 'Rua das Flores, 10' }, + secretaria: { + tipoHospedagemCodigo: 'POUSADA', + situacao: 'REGULAR', + aceitaPesquisas: true, + contatoNome: 'Maria da Secretaria', + }, + }, + '/api/estabelecimentos/12/capacidades': CAPACIDADES, + '/api/estabelecimentos/7/capacidades': CAPACIDADES, + '/api/estabelecimentos/12/inventario': { estabelecimentoId: 12, itens: [{ itemId: 30 }] }, + '/api/estabelecimentos/7/inventario': { estabelecimentoId: 7, itens: [{ itemId: 30 }] }, + '/api/inventario/catalogo': CATALOGO, + '/api/inventario/catalogo/completo': CATALOGO, + '/api/historico': HISTORICO, + } + if (caminho === '/api/dashboard/serie-mensal') return serieMensal(parametros) + return fixas[caminho] +} + +/** API simulada só de leitura: cada tela recebe dados para mostrar a versão completa. */ +async function abrir(page: Page, perfil: Perfil | undefined, caminho: string) { + await page.clock.setFixedTime(new Date('2026-11-16T12:00:00-03:00')) + if (perfil) { + await injetarSessao(page) + } + await page.route('**/api/**', (rota: Route) => { + const url = new URL(rota.request().url()) + const corpo = + rota.request().method() === 'GET' && perfil + ? respostaGet(perfil, url.pathname, url.searchParams) + : undefined + return corpo === undefined + ? rota.fulfill({ status: 404, json: { detail: `sem rota: ${url.pathname}` } }) + : rota.fulfill({ json: corpo }) + }) + await page.goto(caminho) +} + +const REGRAS = ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa'] +const GRAVES = new Set(['serious', 'critical']) + +async function verificarAcessibilidade(page: Page) { + const { violations } = await new AxeBuilder({ page }).withTags(REGRAS).analyze() + const descrever = (v: (typeof violations)[number]) => + `${v.id} (${v.impact}): ${v.help} em ${v.nodes.map((no) => no.target.join(' ')).join(', ')}` + for (const leve of violations.filter((v) => !GRAVES.has(v.impact ?? ''))) { + test.info().annotations.push({ type: 'acessibilidade', description: descrever(leve) }) + } + expect(violations.filter((v) => GRAVES.has(v.impact ?? '')).map(descrever)).toEqual([]) +} + +/** + * Como o semRolagemHorizontal, mas compara com a largura do aparelho: no celular emulado, o + * innerWidth cresce até a largura do conteúdo e esconderia o corte. + */ +async function cabeNaLargura(page: Page) { + const conteudo = (await page.evaluate('document.documentElement.scrollWidth')) as number + expect(conteudo, 'a página não deveria rolar para o lado').toBeLessThanOrEqual( + page.viewportSize()!.width, + ) +} + +type Tela = { + nome: string + caminho: string + perfil?: Perfil + pronta: (page: Page) => Locator + dialogo?: (page: Page) => Locator + celular?: boolean +} + +const titulo = (nome: string | RegExp) => (page: Page) => + page.getByRole('heading', { level: 1, name: nome }) +const botao = (nome: string | RegExp) => (page: Page) => + page.getByRole('button', { name: nome }).first() + +const COM_VIGENCIA = { + perfil: 'ADMIN' as const, + pronta: (page: Page) => page.getByRole('row', { name: /01\/01\/2025/ }), + dialogo: botao('Nova vigência'), +} + +const TELAS: Tela[] = [ + { nome: 'login', caminho: '/login', pronta: titulo('Entrar no painel') }, + { + nome: 'definir senha', + caminho: '/definir-senha?token=link-valido', + pronta: (page) => page.getByLabel('Confirmar senha'), + }, + { + nome: 'painel', + caminho: '/', + perfil: 'VISUALIZADOR', + pronta: (page) => + page.getByRole('heading', { name: 'Taxa de ocupação hoteleira em agosto de 2026' }), + celular: true, + }, + { + nome: 'metodologia', + caminho: '/metodologia', + perfil: 'VISUALIZADOR', + pronta: (page) => page.getByText('Fonte: Estudo OTO 2025.'), + }, + { nome: 'minha senha', caminho: '/minha-senha', perfil: 'ADMIN', pronta: titulo('Trocar senha') }, + { + nome: 'resultado da campanha', + caminho: '/resultados/15', + perfil: 'VISUALIZADOR', + pronta: (page) => page.getByRole('row', { name: /Resort/ }), + celular: true, + }, + { + nome: 'relatórios', + caminho: '/relatorios', + perfil: 'VISUALIZADOR', + pronta: (page) => page.getByRole('row', { name: /Carnaval 2026/ }), + }, + { + nome: 'indicadores', + caminho: '/indicadores', + perfil: 'VISUALIZADOR', + pronta: (page) => page.getByRole('row', { name: /Carnaval/ }), + }, + { + nome: 'rodadas', + caminho: '/pesquisas', + perfil: 'ADMIN', + pronta: (page) => page.getByRole('row', { name: /005\/26/ }), + }, + { + nome: 'acompanhamento', + caminho: '/pesquisas/5', + perfil: 'ADMIN', + pronta: (page) => page.getByRole('link', { name: 'Lançar resposta de Hotel Thermas' }), + }, + { + nome: 'nova pesquisa', + caminho: '/pesquisas/nova', + perfil: 'ADMIN', + pronta: titulo('Nova pesquisa'), + }, + { + nome: 'lançar resposta', + caminho: '/pesquisas/5/campanhas/50/respostas/7', + perfil: 'ADMIN', + pronta: (page) => page.getByLabel('Taxa de ocupação (%)'), + }, + { + nome: 'prévia', + caminho: '/pesquisas/5/campanhas/50/previa', + perfil: 'ADMIN', + pronta: (page) => page.getByRole('table', { name: 'Diárias informadas pela equipe' }), + dialogo: botao(/^Corrigir /), + }, + { + nome: 'responder pesquisa', + caminho: '/pesquisas/responder', + perfil: 'PARCEIRO', + pronta: (page) => page.getByRole('listitem', { name: 'Pousada do Sol' }), + celular: true, + }, + { + nome: 'meu estabelecimento', + caminho: '/meu-estabelecimento', + perfil: 'PARCEIRO', + pronta: botao('Editar dados de Pousada do Sol'), + dialogo: botao('Editar dados de Pousada do Sol'), + celular: true, + }, + { + nome: 'usuários', + caminho: '/cadastros/usuarios', + perfil: 'ADMIN', + pronta: (page) => page.getByRole('row', { name: /Paula Reis/ }), + dialogo: botao('Novo usuário'), + }, + { + nome: 'estabelecimentos', + caminho: '/cadastros/estabelecimentos', + perfil: 'ADMIN', + pronta: (page) => page.getByRole('row', { name: /Hotel Exemplo/ }), + dialogo: botao('Novo estabelecimento'), + }, + { nome: 'capacidades', caminho: '/cadastros/estabelecimentos/12/capacidades', ...COM_VIGENCIA }, + { nome: 'parâmetros', caminho: '/cadastros/parametros', ...COM_VIGENCIA }, + { nome: 'RHC', caminho: '/cadastros/rhc', ...COM_VIGENCIA }, + { + nome: 'referências', + caminho: '/cadastros/referencias', + perfil: 'ADMIN', + pronta: (page) => page.getByRole('row', { name: /Pousada/ }), + dialogo: botao('Novo tipo de hospedagem'), + }, + { + nome: 'inventário', + caminho: '/cadastros/inventario', + perfil: 'ADMIN', + pronta: (page) => page.getByText('Piscina').first(), + dialogo: botao('Novo grupo'), + }, + { + nome: 'inventário do estabelecimento', + caminho: '/cadastros/estabelecimentos/12/inventario', + perfil: 'ADMIN', + pronta: (page) => page.getByText('Piscina').first(), + }, + { + nome: 'série histórica', + caminho: '/cadastros/historico', + perfil: 'ADMIN', + pronta: (page) => page.getByRole('row', { name: /Carnaval/ }), + dialogo: botao('Novo valor'), + }, +] + +for (const tela of TELAS) { + test( + `${tela.nome}: sem violações de acessibilidade`, + { tag: tela.celular ? '@celular' : [] }, + async ({ page }) => { + await abrir(page, tela.perfil, tela.caminho) + await expect(tela.pronta(page)).toBeVisible() + await verificarAcessibilidade(page) + + if (tela.dialogo) { + await tela.dialogo(page).click() + await expect(page.getByRole('dialog')).toBeVisible() + await verificarAcessibilidade(page) + } + }, + ) +} + +for (const tela of TELAS.filter(({ celular }) => celular)) { + test( + `${tela.nome}: cabe na tela sem rolar para o lado`, + { tag: '@celular' }, + async ({ page }) => { + if (!test.info().project.use.isMobile) await page.setViewportSize({ width: 360, height: 740 }) + await abrir(page, tela.perfil, tela.caminho) + await expect(tela.pronta(page)).toBeVisible() + await cabeNaLargura(page) + }, + ) +} diff --git a/e2e/cadastros.spec.ts b/e2e/cadastros.spec.ts index 6ab866a..5c21594 100644 --- a/e2e/cadastros.spec.ts +++ b/e2e/cadastros.spec.ts @@ -1,4 +1,5 @@ import { expect, test, type Page } from '@playwright/test' +import { abrirCadastro } from './navegacao.ts' type Usuario = { id: number @@ -153,13 +154,6 @@ async function entrar(page: Page, usuario: Usuario) { await expect(page.getByRole('button', { name: new RegExp(usuario.nome) })).toBeVisible() } -async function abrirCadastro(page: Page, tela: string) { - const cadastros = page.getByRole('button', { name: 'Cadastros' }) - await cadastros.click() - await expect(cadastros).toHaveAttribute('aria-expanded', 'true') - await page.getByRole('link', { name: tela }).click() -} - test.describe('ADMIN', () => { test.beforeEach(async ({ page }) => { await entrar(page, ADMIN) diff --git a/e2e/catalogo-no-inventario.spec.ts b/e2e/catalogo-no-inventario.spec.ts new file mode 100644 index 0000000..f66b3e5 --- /dev/null +++ b/e2e/catalogo-no-inventario.spec.ts @@ -0,0 +1,171 @@ +import { expect, test, type Page } from '@playwright/test' +import { injetarSessao } from './sessao.ts' +import { catalogoPadrao } from './fixtures/catalogo.ts' +import { ADMIN, PARCEIRO } from './fixtures/usuarios.ts' + +type Marcado = { itemId: number; complemento?: string } +type Item = { + id: number + codigo: string + nome: string + permiteComplemento: boolean + ordem: number + ativo: boolean +} +type Grupo = { + id: number + categoria: string + codigo: string + nome: string + exclusivoSecretaria: boolean + ordem: number + ativo: boolean + itens: Item[] +} + +type Estado = { + usuario: typeof ADMIN | typeof PARCEIRO + catalogo: Grupo[] + inventario: Marcado[] + puts: { itens: Marcado[] }[] +} + +function novoEstado(): Estado { + return { + usuario: ADMIN, + catalogo: catalogoPadrao(), + inventario: [], + puts: [], + } +} + +const RESUMO = { + id: 12, + nomeFantasia: 'Hotel Exemplo', + tipoHospedagemCodigo: 'HOTEL', + situacao: 'REGULAR', + ativo: true, +} + +async function mockarApi(page: Page, estado: Estado) { + await injetarSessao(page) + let proximoId = 100 + + await page.route('**/api/**', async (rota) => { + const pedido = rota.request() + const metodo = pedido.method() + const { pathname } = new URL(pedido.url()) + const chave = `${metodo} ${pathname}` + + if (chave === 'GET /api/me') return rota.fulfill({ json: estado.usuario }) + if (chave === 'GET /api/referencias') { + return rota.fulfill({ json: { tiposHospedagem: [{ codigo: 'HOTEL', nome: 'Hotel' }] } }) + } + if (chave === 'GET /api/estabelecimentos') return rota.fulfill({ json: [RESUMO] }) + if (chave === 'GET /api/estabelecimentos/12') { + return rota.fulfill({ + json: { id: 12, ativo: true, dados: { nomeFantasia: 'Hotel Exemplo' }, secretaria: {} }, + }) + } + if (chave === 'GET /api/estabelecimentos/12/capacidades') return rota.fulfill({ json: [] }) + if (chave === 'GET /api/inventario/catalogo') { + const ativos = estado.catalogo + .filter((grupo) => grupo.ativo) + .map((grupo) => ({ ...grupo, itens: grupo.itens.filter((item) => item.ativo) })) + return rota.fulfill({ json: ativos }) + } + if (chave === 'GET /api/inventario/catalogo/completo') { + return rota.fulfill({ json: estado.catalogo }) + } + const novoItem = pathname.match(/^\/api\/inventario\/grupos\/(\d+)\/itens$/) + if (metodo === 'POST' && novoItem) { + const corpo = pedido.postDataJSON() as Omit + const item: Item = { + ...corpo, + id: proximoId++, + codigo: corpo.nome.toUpperCase(), + ativo: true, + } + estado.catalogo.find(({ id }) => id === Number(novoItem[1]))?.itens.push(item) + return rota.fulfill({ status: 201, json: item }) + } + if (chave === 'GET /api/estabelecimentos/12/inventario') { + return rota.fulfill({ json: { estabelecimentoId: 12, itens: estado.inventario } }) + } + if (chave === 'PUT /api/estabelecimentos/12/inventario') { + const corpo = pedido.postDataJSON() as { itens: Marcado[] } + estado.puts.push(corpo) + estado.inventario = corpo.itens + return rota.fulfill({ json: { estabelecimentoId: 12, itens: corpo.itens } }) + } + return rota.fulfill({ json: [] }) + }) +} + +async function irParaCadastros(page: Page, destino: string) { + await page.getByRole('button', { name: 'Cadastros' }).click() + await page.getByRole('link', { name: destino, exact: true }).click() +} + +test('item novo do catálogo aparece no inventário do estabelecimento e no do parceiro', async ({ + page, +}) => { + const estado = novoEstado() + await mockarApi(page, estado) + + await page.goto('/cadastros/estabelecimentos/12/inventario') + await expect(page.getByRole('checkbox', { name: 'Piscina' })).toBeVisible() + await expect(page.getByRole('checkbox', { name: 'Sauna' })).toHaveCount(0) + + await irParaCadastros(page, 'Inventário') + await expect(page.getByRole('heading', { level: 1, name: 'Inventário' })).toBeVisible() + await page.getByRole('button', { name: 'Novo item' }).click() + const dialogo = page.getByRole('dialog', { name: 'Novo item' }) + await dialogo.getByLabel('Nome').fill('Sauna') + await dialogo.getByRole('button', { name: 'Criar' }).click() + await expect(page.getByRole('status')).toHaveText('Item Sauna criado.') + + await irParaCadastros(page, 'Estabelecimentos') + await page.getByRole('link', { name: 'Inventário de Hotel Exemplo' }).click() + await expect( + page.getByRole('heading', { level: 1, name: 'Inventário do estabelecimento' }), + ).toBeVisible() + const sauna = page.getByRole('checkbox', { name: 'Sauna' }) + await expect(sauna).not.toBeChecked() + await sauna.check() + await page.getByRole('button', { name: 'Salvar inventário' }).click() + await expect(page.getByText('Inventário salvo.')).toBeVisible() + expect(estado.puts).toEqual([{ itens: [{ itemId: 100 }] }]) + + estado.usuario = PARCEIRO + await page.goto('/meu-estabelecimento') + const inventario = page.getByRole('region', { name: 'Inventário' }) + await expect(inventario.getByRole('checkbox', { name: 'Sauna' })).toBeChecked() + await expect(inventario.getByRole('checkbox', { name: 'Piscina' })).not.toBeChecked() + await expect(inventario.getByText('Selos da Secretaria')).toHaveCount(0) + await expect(inventario.getByRole('checkbox', { name: 'Selo verde' })).toHaveCount(0) +}) + +test('o parceiro vê o item novo do catálogo antes de qualquer estabelecimento marcá-lo', async ({ + page, +}) => { + const estado = novoEstado() + estado.catalogo[0]!.itens.push({ + id: 101, + codigo: 'SAUNA', + nome: 'Sauna', + permiteComplemento: false, + ordem: 2, + ativo: true, + }) + estado.usuario = PARCEIRO + await mockarApi(page, estado) + + await page.goto('/meu-estabelecimento') + const inventario = page.getByRole('region', { name: 'Inventário' }) + await expect(inventario.getByRole('checkbox', { name: 'Sauna' })).not.toBeChecked() + + await inventario.getByRole('checkbox', { name: 'Sauna' }).check() + await inventario.getByRole('button', { name: 'Salvar inventário' }).click() + await expect.poll(() => estado.puts).toEqual([{ itens: [{ itemId: 101 }] }]) +}) diff --git a/e2e/correcao-publicacao.spec.ts b/e2e/correcao-publicacao.spec.ts new file mode 100644 index 0000000..f2db842 --- /dev/null +++ b/e2e/correcao-publicacao.spec.ts @@ -0,0 +1,308 @@ +import { expect, test, type Page } from '@playwright/test' +import { irPeloMenu } from './navegacao.ts' +import { injetarSessao } from './sessao.ts' + +const ADMIN = { id: 1, nome: 'Ana Souza', perfil: 'ADMIN' } + +const TIPOS = [ + { codigo: 'HOTEL', nome: 'Hotel', calculaReceita: true }, + { codigo: 'RESORT', nome: 'Resort', calculaReceita: true }, +] + +const CAMPANHA = { + id: 50, + rodadaId: 5, + nome: 'Consolidada de outubro de 2026', + modalidade: 'CONSOLIDADA', + tipoPeriodo: 'MENSAL', + periodoInicio: '2026-10-01', + periodoFim: '2026-10-31', + qtdDiarias: 31, +} + +const LEITOS = { HOTEL: 300, RESORT: 700 } + +type Estado = { + publicada: boolean + taxaHotel: number + versaoHotel: number + /** o resultado fica congelado no momento da publicação, como na API */ + publicado?: ReturnType + envios: string[] +} + +function calcular(estado: Estado) { + const taxaResort = 80 + const taxa = (estado.taxaHotel * LEITOS.HOTEL + taxaResort * LEITOS.RESORT) / 1000 + return { + campanha: CAMPANHA, + taxaOcupacao: Math.round(taxa * 100) / 100, + faixa: { codigo: 'OTIMA', nome: 'Ótima' }, + qtdMh: 2, + qtdMhRespondentes: 2, + percentualMhRespondentes: 100, + leitosTotal: 1000, + leitosRespondentes: 1000, + percentualLeitosRespondentes: 100, + porTipo: [ + { tipoHospedagemCodigo: 'HOTEL', nome: 'Hotel', qtdMh: 1, taxaOcupacao: estado.taxaHotel }, + { tipoHospedagemCodigo: 'RESORT', nome: 'Resort', qtdMh: 1, taxaOcupacao: taxaResort }, + ], + } +} + +function csv(resultado: ReturnType) { + const decimal = (valor: number) => valor.toFixed(2).replace('.', ',') + return [ + 'indicador;valor', + `taxa_ocupacao;${decimal(resultado.taxaOcupacao)}`, + ...resultado.porTipo.map( + (tipo) => `taxa_ocupacao_${tipo.tipoHospedagemCodigo};${decimal(tipo.taxaOcupacao)}`, + ), + ].join('\n') +} + +const NAO_PUBLICADA = { status: 422, json: { status: 422, detail: 'Campanha não publicada.' } } + +async function mockarApi(page: Page, estado: Estado) { + await page.clock.setFixedTime(new Date('2026-11-22T10:00:00-03:00')) + await injetarSessao(page) + + const rodada = () => ({ + id: 5, + codigo: '005/26', + titulo: 'Consolidada de outubro', + status: 'ENCERRADA', + dataAbertura: '2026-11-01', + prazoResposta: '2026-11-15', + campanhas: [ + { + ...CAMPANHA, + publicada: estado.publicada, + publicadaEm: estado.publicada ? '2026-11-20T12:00:00Z' : undefined, + }, + ], + }) + const resposta = () => ({ + id: 303, + estabelecimentoId: 7, + taxaOcupacao: estado.taxaHotel, + diariaMedia: 420, + versao: estado.versaoHotel, + enviadoEm: '2026-11-10T12:00:00Z', + }) + + await page.route('**/api/**', (rota) => { + const pedido = rota.request() + const { pathname } = new URL(pedido.url()) + const chave = `${pedido.method()} ${pathname}` + if (pedido.method() !== 'GET') estado.envios.push(chave) + + if (chave === 'GET /api/me') return rota.fulfill({ json: ADMIN }) + if (chave === 'GET /api/referencias') { + return rota.fulfill({ + json: { + tiposHospedagem: TIPOS, + faixasOcupacao: [{ codigo: 'OTIMA', nome: 'Ótima', percentualMinimo: 61 }], + }, + }) + } + if (chave === 'GET /api/campanhas/publicadas') { + return rota.fulfill({ + json: estado.publicada + ? [{ campanhaId: 50, ...CAMPANHA, publicadaEm: '2026-11-20T12:00:00Z' }] + : [], + }) + } + if (chave === 'GET /api/campanhas/50/resultado') { + return estado.publicada && estado.publicado + ? rota.fulfill({ json: { ...estado.publicado, publicado: true } }) + : rota.fulfill(NAO_PUBLICADA) + } + if (chave === 'GET /api/campanhas/50/resultado.csv') { + if (!estado.publicada || !estado.publicado) return rota.fulfill(NAO_PUBLICADA) + return rota.fulfill({ + body: csv(estado.publicado), + headers: { + 'content-type': 'text/csv; charset=utf-8', + 'content-disposition': 'attachment; filename="resultado-campanha-50.csv"', + }, + }) + } + if (chave === 'GET /api/rodadas') return rota.fulfill({ json: [rodada()] }) + if (chave === 'GET /api/rodadas/5') return rota.fulfill({ json: rodada() }) + if (chave === 'GET /api/rodadas/5/acompanhamento') { + return rota.fulfill({ + json: { + rodadaId: 5, + codigo: '005/26', + status: 'ENCERRADA', + campanhas: [ + { + campanhaId: 50, + nome: CAMPANHA.nome, + qtdMh: 2, + qtdRespondentes: 2, + leitosTotal: 1000, + leitosRespondentes: 1000, + percentualLeitosRespondentes: 100, + percentualMinimoPublicacao: 70, + atingiuMinimo: true, + estabelecimentos: [ + { + estabelecimentoId: 7, + nomeFantasia: 'Hotel Thermas', + tipoHospedagemCodigo: 'HOTEL', + qtdLeitos: LEITOS.HOTEL, + respondeu: true, + versao: estado.versaoHotel, + }, + { + estabelecimentoId: 9, + nomeFantasia: 'Resort Águas', + tipoHospedagemCodigo: 'RESORT', + qtdLeitos: LEITOS.RESORT, + respondeu: true, + versao: 1, + }, + ], + }, + ], + }, + }) + } + if (chave === 'GET /api/campanhas/50/respostas') return rota.fulfill({ json: [resposta()] }) + if (chave === 'GET /api/respostas/303/historico') return rota.fulfill({ json: [] }) + if (chave === 'PUT /api/campanhas/50/respostas/7') { + if (estado.publicada) { + return rota.fulfill({ + status: 422, + json: { status: 422, detail: 'A campanha já foi publicada.' }, + }) + } + const corpo = pedido.postDataJSON() as { taxaOcupacao: number } + estado.taxaHotel = corpo.taxaOcupacao + estado.versaoHotel += 1 + return rota.fulfill({ json: resposta() }) + } + if (chave === 'GET /api/campanhas/50/previa') { + return rota.fulfill({ + json: { + campanhaId: 50, + qtdMh: 2, + qtdRespondentes: 2, + leitosTotal: 1000, + leitosRespondentes: 1000, + percentualLeitosRespondentes: 100, + percentualMinimoPublicacao: 70, + podePublicar: !estado.publicada, + impedimentos: [], + avisos: [], + resultado: estado.publicada ? estado.publicado : calcular(estado), + }, + }) + } + if (chave === 'GET /api/campanhas/50/diarias') return rota.fulfill({ json: [] }) + if (chave === 'DELETE /api/campanhas/50/publicacao') { + estado.publicada = false + estado.publicado = undefined + return rota.fulfill({ status: 204 }) + } + if (chave === 'POST /api/campanhas/50/publicacao') { + estado.publicada = true + estado.publicado = calcular(estado) + return rota.fulfill({ json: estado.publicado }) + } + if (chave === 'GET /api/dashboard/serie-mensal') { + return rota.fulfill({ json: { indicador: 'TAXA_OCUPACAO', anos: [] } }) + } + if (chave === 'GET /api/dashboard/feriados') return rota.fulfill({ json: [] }) + return rota.fulfill({ status: 404, json: { status: 404, detail: `sem rota: ${chave}` } }) + }) +} + +const destaque = (page: Page) => + page.locator('section', { + has: page.getByRole('heading', { name: 'Taxa de ocupação hoteleira em outubro de 2026' }), + }) + +function indicador(page: Page, rotulo: string) { + return page + .locator('dl div', { has: page.locator('dt', { hasText: new RegExp(`^${rotulo}$`) }) }) + .locator('dd') + .first() +} + +async function baixarCsv(page: Page) { + const download = page.waitForEvent('download') + await page.getByRole('button', { name: 'Baixar CSV' }).click() + const arquivo = await download + const caminho = await arquivo.path() + const { readFile } = await import('node:fs/promises') + return { nome: arquivo.suggestedFilename(), conteudo: await readFile(caminho, 'utf-8') } +} + +test('ADMIN corrige uma resposta depois de publicar e o novo valor chega ao painel e ao CSV (E2E-05)', async ({ + page, +}) => { + const estado: Estado = { publicada: false, taxaHotel: 64, versaoHotel: 1, envios: [] } + estado.publicado = calcular(estado) + estado.publicada = true + await mockarApi(page, estado) + + await page.goto('/') + await expect(destaque(page)).toContainText('75,2%') + const antes = await baixarCsv(page) + expect(antes.conteudo).toContain('taxa_ocupacao;75,20') + + await irPeloMenu(page, 'Pesquisas') + await page.getByRole('link', { name: 'Consolidada de outubro', exact: true }).click() + await expect(page).toHaveURL(/\/pesquisas\/5$/) + await expect(page.getByRole('link', { name: 'Editar resposta de Hotel Thermas' })).toHaveCount(0) + + await page + .getByRole('link', { name: 'Prévia e publicação de Consolidada de outubro de 2026' }) + .click() + await page.getByRole('button', { name: 'Cancelar publicação' }).click() + await page + .getByRole('dialog', { name: 'Cancelar a publicação de Consolidada de outubro de 2026?' }) + .getByRole('button', { name: 'Confirmar cancelamento' }) + .click() + await expect(page.getByRole('status').filter({ hasText: 'Publicação cancelada.' })).toBeVisible() + await expect(page.getByRole('button', { name: 'Publicar' })).toBeVisible() + + await page.getByRole('link', { name: 'Voltar ao acompanhamento' }).click() + await page.getByRole('link', { name: 'Editar resposta de Hotel Thermas' }).click() + const taxa = page.getByLabel('Taxa de ocupação (%)') + await expect(taxa).toHaveValue('64') + await taxa.fill('72') + await page.getByRole('button', { name: 'Enviar correção' }).click() + await expect(page.getByText('Resposta enviada: versão 2 registrada.')).toBeVisible() + + await page.getByRole('link', { name: 'Voltar ao acompanhamento' }).click() + await page + .getByRole('link', { name: 'Prévia e publicação de Consolidada de outubro de 2026' }) + .click() + await expect(indicador(page, 'Taxa de ocupação')).toHaveText(/^77,60%/) + await page.getByRole('button', { name: 'Publicar' }).click() + await expect(page.getByRole('status').filter({ hasText: 'Campanha publicada.' })).toBeVisible() + + await page.getByRole('link', { name: 'Ver resultado publicado' }).click() + await expect(page).toHaveURL(/\/resultados\/50$/) + await expect(indicador(page, 'Taxa de ocupação')).toHaveText(/^77,60%/) + const depois = await baixarCsv(page) + expect(depois.nome).toBe('resultado-campanha-50.csv') + expect(depois.conteudo).toContain('taxa_ocupacao;77,60') + expect(depois.conteudo).toContain('taxa_ocupacao_HOTEL;72,00') + expect(depois.conteudo).not.toContain('75,20') + + await irPeloMenu(page, 'Painel') + await expect(destaque(page)).toContainText('77,6%') + await expect(destaque(page)).not.toContainText('75,2%') + + expect(estado.envios).toEqual([ + 'DELETE /api/campanhas/50/publicacao', + 'PUT /api/campanhas/50/respostas/7', + 'POST /api/campanhas/50/publicacao', + ]) +}) diff --git a/e2e/fixtures/catalogo.ts b/e2e/fixtures/catalogo.ts new file mode 100644 index 0000000..08656d2 --- /dev/null +++ b/e2e/fixtures/catalogo.ts @@ -0,0 +1,50 @@ +export const itemPiscina = () => ({ + id: 10, + codigo: 'PISCINA', + nome: 'Piscina', + permiteComplemento: true, + ordem: 1, + ativo: true, +}) + +export const itemAcademia = () => ({ + id: 11, + codigo: 'ACADEMIA', + nome: 'Academia', + permiteComplemento: false, + ordem: 2, + ativo: false, +}) + +export const itemSelo = () => ({ + id: 30, + codigo: 'SELO', + nome: 'Selo verde', + permiteComplemento: false, + ordem: 1, + ativo: true, +}) + +export const grupoLazer = (itens = [itemPiscina()]) => ({ + id: 1, + categoria: 'SERVICOS_EQUIPAMENTOS', + codigo: 'LAZER', + nome: 'Lazer', + exclusivoSecretaria: false, + ordem: 1, + ativo: true, + itens, +}) + +export const grupoSelos = (itens = [itemSelo()]) => ({ + id: 3, + categoria: 'SUSTENTABILIDADE', + codigo: 'SELOS', + nome: 'Selos da Secretaria', + exclusivoSecretaria: true, + ordem: 1, + ativo: true, + itens, +}) + +export const catalogoPadrao = () => [grupoLazer(), grupoSelos()] diff --git a/e2e/fixtures/estabelecimento.ts b/e2e/fixtures/estabelecimento.ts new file mode 100644 index 0000000..cda40c8 --- /dev/null +++ b/e2e/fixtures/estabelecimento.ts @@ -0,0 +1,17 @@ +export const CAPACIDADE_ANTIGA = { + id: 1, + vigenteDesde: '2025-01-01', + qtdUh: 20, + qtdUhPcd: 1, + qtdLeitos: 50, + maxLeitosPorUh: 3, + leitosUteis: 40, +} + +export const resumoDePousada = (id: number, nomeFantasia: string, ativo = true) => ({ + id, + nomeFantasia, + tipoHospedagemCodigo: 'POUSADA', + situacao: 'REGULAR', + ativo, +}) diff --git a/e2e/fixtures/resultado.ts b/e2e/fixtures/resultado.ts new file mode 100644 index 0000000..a2f87ff --- /dev/null +++ b/e2e/fixtures/resultado.ts @@ -0,0 +1,69 @@ +export const PUBLICADA_AGOSTO = { + campanhaId: 15, + nome: 'Agosto de 2026', + modalidade: 'CONSOLIDADA', + tipoPeriodo: 'MENSAL', + periodoInicio: '2026-08-01', + periodoFim: '2026-08-31', + publicadaEm: '2026-09-18T12:00:00Z', + taxaOcupacao: 62.8, + faixa: { codigo: 'OTIMA', nome: 'Ótima' }, + fluxoTotal: 496_660, +} + +export const PUBLICADA_CARNAVAL = { + campanhaId: 9, + nome: 'Carnaval 2026', + modalidade: 'EXPECTATIVA', + tipoPeriodo: 'FERIADO', + periodoInicio: '2026-02-14', + periodoFim: '2026-02-17', + publicadaEm: '2026-02-10T12:00:00Z', + taxaOcupacao: 71.5, + faixa: { codigo: 'OTIMA', nome: 'Ótima' }, + fluxoTotal: 60_210, +} + +export const RESULTADO_AGOSTO = { + campanha: { id: 15, ...PUBLICADA_AGOSTO, qtdDiarias: 31, publicada: true }, + publicado: true, + taxaOcupacao: 62.8, + faixa: { codigo: 'OTIMA', nome: 'Ótima' }, + qtdMh: 72, + qtdMhRespondentes: 58, + percentualMhRespondentes: 80.6, + leitosTotal: 13_508, + leitosRespondentes: 12_346, + percentualLeitosRespondentes: 91.4, + fluxoMh: 365_620, + fluxoRhc: 55_795, + fluxoDayUse: 75_245, + fluxoTotal: 496_660, + fluxoMedioDiario: 16_021, + diariaMedia: 765, + receitaHospedagem: 89_000_000, + receitaSemHospedagem: 21_000_000, + porTipo: [ + { + tipoHospedagemCodigo: 'RESORT', + nome: 'Resort', + qtdMh: 9, + qtdUh: 4_643, + taxaOcupacao: 66, + diariaMedia: 836, + revpar: 552, + receitaEstimada: 79_400_000, + }, + { + tipoHospedagemCodigo: 'HOTEL', + nome: 'Hotel', + qtdMh: 2, + qtdUh: 120, + taxaOcupacao: null, + diariaMedia: null, + revpar: null, + receitaEstimada: null, + omitido: true, + }, + ], +} diff --git a/e2e/fixtures/usuarios.ts b/e2e/fixtures/usuarios.ts new file mode 100644 index 0000000..bf5c6a6 --- /dev/null +++ b/e2e/fixtures/usuarios.ts @@ -0,0 +1,23 @@ +export const ADMIN = { + id: 1, + nome: 'Ana Souza', + email: 'ana@oto.test', + perfil: 'ADMIN', + ativo: true, +} + +export const PARCEIRO = { + id: 2, + nome: 'Paula Reis', + email: 'paula@oto.test', + perfil: 'PARCEIRO', + ativo: true, +} + +export const VISUALIZADOR = { + id: 3, + nome: 'Vera Lima', + email: 'vera@oto.test', + perfil: 'VISUALIZADOR', + ativo: true, +} diff --git a/e2e/indicadores.spec.ts b/e2e/indicadores.spec.ts index c20238d..9b89641 100644 --- a/e2e/indicadores.spec.ts +++ b/e2e/indicadores.spec.ts @@ -1,5 +1,6 @@ import { expect, test, type Page, type Route } from '@playwright/test' import { irPeloMenu } from './navegacao.ts' +import { injetarSessao } from './sessao.ts' function meses(valores: (number | null)[], origem = 'SISTEMA') { return valores.map((valor, indice) => ({ @@ -60,15 +61,7 @@ const FERIADOS = [ async function abrir(page: Page, caminho = '/indicadores') { const consultas: string[] = [] - await page.addInitScript(() => { - sessionStorage.setItem( - 'oto.sessao', - JSON.stringify({ - token: 'token-e2e', - expiraEm: new Date(Date.now() + 3_600_000).toISOString(), - }), - ) - }) + await injetarSessao(page) await page.route('**/api/**', (rota: Route) => { const url = new URL(rota.request().url()) diff --git a/e2e/inventario-catalogo.spec.ts b/e2e/inventario-catalogo.spec.ts new file mode 100644 index 0000000..ecb020d --- /dev/null +++ b/e2e/inventario-catalogo.spec.ts @@ -0,0 +1,380 @@ +import { expect, test, type Page } from '@playwright/test' +import { abrirCadastro } from './navegacao.ts' +import { injetarSessao } from './sessao.ts' +import { grupoLazer, grupoSelos, itemAcademia, itemPiscina } from './fixtures/catalogo.ts' +import { ADMIN } from './fixtures/usuarios.ts' + +type Item = { + id: number + codigo: string + nome: string + permiteComplemento: boolean + ordem: number + ativo: boolean +} +type Grupo = { + id: number + categoria: string + codigo: string + nome: string + exclusivoSecretaria: boolean + ordem: number + ativo: boolean + itens: Item[] +} +type Envio = { metodo: string; caminho: string; corpo: unknown } + +type Estado = { + catalogo: Grupo[] + envios: Envio[] + /** recusa a próxima gravação, uma única vez */ + recusaProxima?: { status: number; detail: string } +} + +function novoEstado(): Estado { + return { + catalogo: [grupoLazer([itemPiscina(), itemAcademia()]), grupoSelos([])], + envios: [], + } +} + +/** API em memória: o catálogo muda com o que a tela grava. */ +async function entrar(page: Page, estado: Estado) { + await injetarSessao(page) + let proximoId = 100 + const grupoDoItem = (itemId: number) => + estado.catalogo.find((grupo) => grupo.itens.some((item) => item.id === itemId)) + + await page.route('**/api/**', async (rota) => { + const pedido = rota.request() + const metodo = pedido.method() + const { pathname } = new URL(pedido.url()) + if (pathname === '/api/me') return rota.fulfill({ json: ADMIN }) + if (metodo === 'GET' && pathname === '/api/inventario/catalogo/completo') { + return rota.fulfill({ json: estado.catalogo }) + } + if (metodo === 'GET' || !pathname.startsWith('/api/inventario/')) { + return rota.fulfill({ json: [] }) + } + + const corpo = metodo === 'POST' || metodo === 'PUT' ? pedido.postDataJSON() : null + estado.envios.push({ metodo, caminho: pathname, corpo }) + if (estado.recusaProxima) { + const { status, detail } = estado.recusaProxima + estado.recusaProxima = undefined + return rota.fulfill({ status, json: { status, detail } }) + } + + const alvo = pathname.match(/^\/api\/inventario\/(grupos|itens)\/(\d+)(?:\/(\w+))?$/) + if (metodo === 'POST' && pathname === '/api/inventario/grupos') { + const novo: Grupo = { + ...(corpo as Omit), + id: proximoId++, + codigo: (corpo as { nome: string }).nome.toUpperCase(), + ativo: true, + itens: [], + } + estado.catalogo.push(novo) + return rota.fulfill({ status: 201, json: novo }) + } + const novoItem = pathname.match(/^\/api\/inventario\/grupos\/(\d+)\/itens$/) + if (metodo === 'POST' && novoItem) { + const item: Item = { + ...(corpo as Omit), + id: proximoId++, + codigo: (corpo as { nome: string }).nome.toUpperCase(), + ativo: true, + } + estado.catalogo.find(({ id }) => id === Number(novoItem[1]))?.itens.push(item) + return rota.fulfill({ status: 201, json: item }) + } + if (!alvo) return rota.fulfill({ json: [] }) + + const [, tipo, idTexto, acao] = alvo + const id = Number(idTexto) + const grupo = estado.catalogo.find((g) => g.id === id) + const item = estado.catalogo.flatMap((g) => g.itens).find((i) => i.id === id) + const registro = tipo === 'grupos' ? grupo : item + if (!registro) + return rota.fulfill({ status: 404, json: { status: 404, detail: 'Não existe.' } }) + + if (metodo === 'POST' && acao) { + registro.ativo = acao === 'reativar' + return rota.fulfill({ status: 204 }) + } + if (metodo === 'DELETE') { + if (tipo === 'grupos') estado.catalogo.splice(estado.catalogo.indexOf(grupo!), 1) + else grupoDoItem(id)!.itens = grupoDoItem(id)!.itens.filter((i) => i.id !== id) + return rota.fulfill({ status: 204 }) + } + Object.assign(registro, corpo) + return rota.fulfill({ json: registro }) + }) +} + +async function abrirCatalogo(page: Page) { + await page.goto('/') + await abrirCadastro(page, 'Inventário') + await expect(page.getByRole('heading', { level: 1, name: 'Inventário' })).toBeVisible() +} + +test('lista os grupos de cada categoria com situação e itens', async ({ page }) => { + await entrar(page, novoEstado()) + await abrirCatalogo(page) + + await expect(page.getByRole('tab', { name: 'Serviços e equipamentos' })).toHaveAttribute( + 'aria-selected', + 'true', + ) + await expect(page.getByText('Lazer', { exact: true }).first()).toBeVisible() + await expect(page.getByRole('row', { name: /Piscina/ })).toContainText('Sim') + await expect(page.getByRole('row', { name: /Piscina/ })).toContainText('Ativo') + await expect(page.getByRole('row', { name: /Academia/ })).toContainText('Inativo') + await expect(page.getByRole('row', { name: /Academia/ })).toContainText('Não') + + await page.getByRole('tab', { name: 'Acessibilidade' }).click() + await expect(page.getByText('Nenhum grupo em Acessibilidade')).toBeVisible() + + await page.getByRole('tab', { name: 'Sustentabilidade' }).click() + await expect(page.getByText('SELOS · Exclusivo da Secretaria')).toBeVisible() + await expect(page.getByText('Nenhum item neste grupo')).toBeVisible() +}) + +test('edita um grupo mantendo o código travado e a categoria no pedido', async ({ page }) => { + const estado = novoEstado() + await entrar(page, estado) + await abrirCatalogo(page) + + await page.getByRole('button', { name: 'Editar grupo Lazer' }).click() + const dialogo = page.getByRole('dialog', { name: 'Editar Lazer' }) + await expect(dialogo.getByLabel('Código')).toBeDisabled() + await dialogo.getByLabel('Nome').fill('Lazer e esporte') + await dialogo.getByRole('button', { name: 'Salvar' }).click() + + await expect(page.getByRole('status')).toHaveText('Grupo Lazer e esporte alterado.') + expect(estado.envios).toMatchObject([ + { + metodo: 'PUT', + caminho: '/api/inventario/grupos/1', + corpo: { nome: 'Lazer e esporte', categoria: 'SERVICOS_EQUIPAMENTOS' }, + }, + ]) +}) + +test('edita um item e troca o complemento', async ({ page }) => { + const estado = novoEstado() + await entrar(page, estado) + await abrirCatalogo(page) + + await page.getByRole('button', { name: 'Editar Academia' }).click() + const dialogo = page.getByRole('dialog', { name: 'Editar Academia' }) + await expect(dialogo.getByLabel('Código')).toBeDisabled() + await dialogo.getByLabel('Aceita complemento em texto, como no item "Outros"').check() + await dialogo.getByRole('button', { name: 'Salvar' }).click() + + await expect(page.getByRole('status')).toHaveText('Item Academia alterado.') + expect(estado.envios[0]).toMatchObject({ + metodo: 'PUT', + caminho: '/api/inventario/itens/11', + corpo: { nome: 'Academia', permiteComplemento: true }, + }) + await expect(page.getByRole('row', { name: /Academia/ })).toContainText('Sim') +}) + +test('inativa e reativa um item', async ({ page }) => { + const estado = novoEstado() + await entrar(page, estado) + await abrirCatalogo(page) + + await page.getByRole('button', { name: 'Inativar Piscina' }).click() + await expect(page.getByRole('status')).toHaveText('Item Piscina inativado.') + await expect(page.getByRole('row', { name: /Piscina/ })).toContainText('Inativo') + + await page.getByRole('button', { name: 'Reativar Piscina' }).click() + await expect(page.getByRole('status')).toHaveText('Item Piscina reativado.') + await expect(page.getByRole('row', { name: /Piscina/ })).toContainText('Ativo') + expect(estado.envios.map(({ caminho }) => caminho)).toEqual([ + '/api/inventario/itens/10/inativar', + '/api/inventario/itens/10/reativar', + ]) +}) + +test('inativa e reativa um grupo, e a situação aparece no subtítulo', async ({ page }) => { + await entrar(page, novoEstado()) + await abrirCatalogo(page) + + await page.getByRole('button', { name: 'Inativar grupo Lazer' }).click() + await expect(page.getByRole('status')).toHaveText('Grupo Lazer inativado.') + await expect(page.getByText('LAZER · Inativo')).toBeVisible() + + await page.getByRole('button', { name: 'Reativar grupo Lazer' }).click() + await expect(page.getByRole('status')).toHaveText('Grupo Lazer reativado.') + await expect(page.getByText('LAZER · Inativo')).toHaveCount(0) +}) + +test('mostra o erro da API quando a situação não pode ser alterada', async ({ page }) => { + const estado = novoEstado() + await entrar(page, estado) + await abrirCatalogo(page) + + estado.recusaProxima = { status: 422, detail: 'O grupo tem itens ativos.' } + await page.getByRole('button', { name: 'Inativar grupo Lazer' }).click() + + await expect(page.getByRole('alert')).toHaveText('O grupo tem itens ativos.') + await expect(page.getByText('LAZER · Inativo')).toHaveCount(0) +}) + +test('exclui um item sem uso depois de confirmar', async ({ page }) => { + const estado = novoEstado() + await entrar(page, estado) + await abrirCatalogo(page) + + await page.getByRole('button', { name: 'Excluir Academia' }).click() + const confirmacao = page.getByRole('dialog', { name: 'Excluir Academia' }) + await expect(confirmacao.getByRole('button', { name: 'Cancelar' })).toBeFocused() + await confirmacao.getByRole('button', { name: 'Excluir' }).click() + + await expect(page.getByRole('status')).toHaveText('Item Academia excluído.') + await expect(page.getByRole('row', { name: /Academia/ })).toHaveCount(0) +}) + +test('item já marcado por um estabelecimento não é excluído e o erro aparece', async ({ page }) => { + const estado = novoEstado() + await entrar(page, estado) + await abrirCatalogo(page) + + estado.recusaProxima = { status: 422, detail: 'O item Piscina já foi marcado em um inventário.' } + await page.getByRole('button', { name: 'Excluir Piscina' }).click() + const confirmacao = page.getByRole('dialog', { name: 'Excluir Piscina' }) + await confirmacao.getByRole('button', { name: 'Excluir' }).click() + + await expect(confirmacao.getByRole('alert')).toHaveText( + 'O item Piscina já foi marcado em um inventário.', + ) + await confirmacao.getByRole('button', { name: 'Cancelar' }).click() + await expect(page.getByRole('row', { name: /Piscina/ })).toBeVisible() +}) + +test('grupo com itens não é excluído, e o sem itens é', async ({ page }) => { + const estado = novoEstado() + await entrar(page, estado) + await abrirCatalogo(page) + + estado.recusaProxima = { status: 422, detail: 'O grupo Lazer ainda tem itens.' } + await page.getByRole('button', { name: 'Excluir grupo Lazer' }).click() + const recusado = page.getByRole('dialog', { name: 'Excluir Lazer' }) + await recusado.getByRole('button', { name: 'Excluir' }).click() + await expect(recusado.getByRole('alert')).toHaveText('O grupo Lazer ainda tem itens.') + await recusado.getByRole('button', { name: 'Cancelar' }).click() + + await page.getByRole('tab', { name: 'Sustentabilidade' }).click() + await page.getByRole('button', { name: 'Excluir grupo Selos da Secretaria' }).click() + await page + .getByRole('dialog', { name: 'Excluir Selos da Secretaria' }) + .getByRole('button', { name: 'Excluir' }) + .click() + await expect(page.getByRole('status')).toHaveText('Grupo Selos da Secretaria excluído.') + await expect(page.getByText('Nenhum grupo em Sustentabilidade')).toBeVisible() +}) + +test('barra nome vazio e código inválido sem chamar a API', async ({ page }) => { + const estado = novoEstado() + await entrar(page, estado) + await abrirCatalogo(page) + + await page.getByRole('button', { name: 'Novo grupo' }).click() + const dialogo = page.getByRole('dialog', { name: 'Novo grupo' }) + await dialogo.getByRole('button', { name: 'Criar' }).click() + await expect(dialogo.getByText('Preencha este campo.')).toBeVisible() + + await dialogo.getByLabel('Código').fill('área lazer') + await dialogo.getByLabel('Nome').fill('Área de lazer') + await dialogo.getByRole('button', { name: 'Criar' }).click() + await expect(dialogo.getByText('Use letras sem acento, números e _.')).toBeVisible() + expect(estado.envios).toHaveLength(0) +}) + +test('código repetido é recusado pela API no campo do código', async ({ page }) => { + const estado = novoEstado() + await entrar(page, estado) + await abrirCatalogo(page) + + estado.recusaProxima = { status: 422, detail: 'Já existe um grupo com este código.' } + await page.getByRole('button', { name: 'Novo grupo' }).click() + const dialogo = page.getByRole('dialog', { name: 'Novo grupo' }) + await dialogo.getByLabel('Código').fill('LAZER') + await dialogo.getByLabel('Nome').fill('Outro lazer') + await dialogo.getByRole('button', { name: 'Criar' }).click() + + await expect(dialogo.getByText('Já existe um grupo com este código.')).toBeVisible() + await expect(dialogo).toBeVisible() +}) + +test('cria um grupo exclusivo da Secretaria na categoria aberta', async ({ page }) => { + const estado = novoEstado() + await entrar(page, estado) + await abrirCatalogo(page) + + await page.getByRole('tab', { name: 'Acessibilidade' }).click() + await page.getByRole('button', { name: 'Novo grupo' }).click() + const dialogo = page.getByRole('dialog', { name: 'Novo grupo' }) + await dialogo.getByLabel('Nome').fill('Vistorias') + await dialogo.getByLabel('Ordem').fill('2') + await dialogo.getByLabel('Exclusivo da Secretaria: o parceiro não vê nem preenche').check() + await dialogo.getByRole('button', { name: 'Criar' }).click() + + await expect(page.getByRole('status')).toHaveText('Grupo Vistorias criado.') + expect(estado.envios[0]).toMatchObject({ + metodo: 'POST', + caminho: '/api/inventario/grupos', + corpo: { + nome: 'Vistorias', + ordem: 2, + exclusivoSecretaria: true, + categoria: 'ACESSIBILIDADE', + }, + }) + await expect(page.getByText('VISTORIAS · Exclusivo da Secretaria')).toBeVisible() +}) + +test('cria um item que aceita complemento no grupo escolhido', async ({ page }) => { + const estado = novoEstado() + await entrar(page, estado) + await abrirCatalogo(page) + + await page.getByRole('button', { name: 'Novo item' }).click() + const dialogo = page.getByRole('dialog', { name: 'Novo item' }) + await expect(dialogo).toContainText('Em Lazer.') + await dialogo.getByLabel('Nome').fill('Outros') + await dialogo.getByLabel('Descrição').fill('Itens que não estão na lista') + await dialogo.getByLabel('Aceita complemento em texto, como no item "Outros"').check() + await dialogo.getByRole('button', { name: 'Criar' }).click() + + await expect(page.getByRole('status')).toHaveText('Item Outros criado.') + expect(estado.envios[0]).toMatchObject({ + caminho: '/api/inventario/grupos/1/itens', + corpo: { + nome: 'Outros', + descricao: 'Itens que não estão na lista', + permiteComplemento: true, + }, + }) + await expect(page.getByRole('row', { name: /Outros/ })).toContainText('Sim') +}) + +test('erro ao carregar o catálogo permite tentar de novo', async ({ page }) => { + await entrar(page, novoEstado()) + let falhou = false + await page.route('**/api/inventario/catalogo/completo', (rota) => { + if (falhou) return rota.fallback() + falhou = true + return rota.fulfill({ status: 403, json: { status: 403, detail: 'Sem permissão.' } }) + }) + + await page.goto('/cadastros/inventario') + await expect(page.getByRole('alert')).toContainText( + 'Não foi possível carregar o catálogo do inventário.', + ) + await page.getByRole('button', { name: 'Tentar novamente' }).click() + await expect(page.getByRole('row', { name: /Piscina/ })).toBeVisible() +}) diff --git a/e2e/inventario-estabelecimento.spec.ts b/e2e/inventario-estabelecimento.spec.ts new file mode 100644 index 0000000..35b9497 --- /dev/null +++ b/e2e/inventario-estabelecimento.spec.ts @@ -0,0 +1,304 @@ +import { expect, test, type Page } from '@playwright/test' +import { injetarSessao } from './sessao.ts' +import { ADMIN } from './fixtures/usuarios.ts' + +type Marcado = { itemId: number; complemento?: string } + +const CATALOGO = [ + { + id: 1, + categoria: 'SERVICOS_EQUIPAMENTOS', + codigo: 'LAZER', + nome: 'Lazer', + exclusivoSecretaria: false, + ordem: 1, + ativo: true, + itens: [ + { + id: 10, + codigo: 'PISCINA', + nome: 'Piscina', + permiteComplemento: true, + ordem: 1, + ativo: true, + }, + { + id: 11, + codigo: 'ACADEMIA', + nome: 'Academia', + permiteComplemento: false, + ordem: 2, + ativo: true, + }, + ], + }, + { + id: 2, + categoria: 'ACESSIBILIDADE', + codigo: 'RAMPAS', + nome: 'Rampas', + exclusivoSecretaria: false, + ordem: 1, + ativo: true, + itens: [ + { + id: 20, + codigo: 'RAMPA', + nome: 'Rampa de acesso', + permiteComplemento: false, + ordem: 1, + ativo: true, + }, + ], + }, + { + id: 3, + categoria: 'SUSTENTABILIDADE', + codigo: 'SELOS', + nome: 'Selos da Secretaria', + exclusivoSecretaria: true, + ordem: 1, + ativo: true, + itens: [ + { + id: 30, + codigo: 'SELO', + nome: 'Selo verde', + permiteComplemento: false, + ordem: 1, + ativo: true, + }, + ], + }, +] + +type Estado = { + catalogo: unknown[] + inventario: { itens: Marcado[]; atualizadoEm?: string } + puts: unknown[] + recusaDoPut?: { status: number; detail: string } +} + +function novoEstado(): Estado { + return { catalogo: CATALOGO, inventario: { itens: [] }, puts: [] } +} + +async function entrar(page: Page, estado: Estado) { + await injetarSessao(page) + await page.route('**/api/**', async (rota) => { + const pedido = rota.request() + const metodo = pedido.method() + const { pathname } = new URL(pedido.url()) + const chave = `${metodo} ${pathname}` + + if (chave === 'GET /api/me') return rota.fulfill({ json: ADMIN }) + if (chave === 'GET /api/estabelecimentos/12') { + return rota.fulfill({ + json: { id: 12, ativo: true, dados: { nomeFantasia: 'Hotel Exemplo' } }, + }) + } + if (chave === 'GET /api/inventario/catalogo') return rota.fulfill({ json: estado.catalogo }) + if (chave === 'GET /api/estabelecimentos/12/inventario') { + return rota.fulfill({ + json: { + estabelecimentoId: 12, + itens: estado.inventario.itens, + inventarioAtualizadoEm: estado.inventario.atualizadoEm, + }, + }) + } + if (chave === 'PUT /api/estabelecimentos/12/inventario') { + const corpo = pedido.postDataJSON() as { itens: Marcado[] } + estado.puts.push(corpo) + if (estado.recusaDoPut) { + const { status, detail } = estado.recusaDoPut + return rota.fulfill({ status, json: { status, detail } }) + } + estado.inventario = { itens: corpo.itens, atualizadoEm: '2026-11-20T15:00:00Z' } + return rota.fulfill({ + json: { + estabelecimentoId: 12, + itens: corpo.itens, + inventarioAtualizadoEm: '2026-11-20T15:00:00Z', + }, + }) + } + return rota.fulfill({ json: [] }) + }) +} + +async function abrirInventario(page: Page) { + await page.goto('/cadastros/estabelecimentos/12/inventario') + await expect( + page.getByRole('heading', { level: 1, name: 'Inventário do estabelecimento' }), + ).toBeVisible() +} + +test('mostra o nome do estabelecimento, as categorias e o inventário ainda vazio', async ({ + page, +}) => { + await entrar(page, novoEstado()) + await abrirInventario(page) + + await expect(page.getByText(/de Hotel Exemplo\./)).toBeVisible() + await expect(page.getByRole('link', { name: 'Estabelecimentos' })).toHaveAttribute( + 'href', + '/cadastros/estabelecimentos', + ) + await expect(page.getByText('Inventário ainda não preenchido.')).toBeVisible() + for (const categoria of ['Serviços e equipamentos', 'Acessibilidade', 'Sustentabilidade']) { + await expect(page.getByRole('heading', { name: categoria })).toBeVisible() + } + await expect(page.getByRole('checkbox', { checked: true })).toHaveCount(0) +}) + +test('o ADMIN vê e marca o grupo exclusivo da Secretaria', async ({ page }) => { + const estado = novoEstado() + await entrar(page, estado) + await abrirInventario(page) + + const selos = page.getByRole('group', { name: 'Selos da Secretaria' }) + await selos.getByRole('checkbox', { name: 'Selo verde' }).check() + await page.getByRole('button', { name: 'Salvar inventário' }).click() + + await expect(page.getByText('Inventário salvo.')).toBeVisible() + expect(estado.puts).toEqual([{ itens: [{ itemId: 30 }] }]) +}) + +test('carrega o que já foi marcado, com o complemento, e a data da última atualização', async ({ + page, +}) => { + const estado = novoEstado() + estado.inventario = { + itens: [{ itemId: 10, complemento: '2 piscinas' }, { itemId: 20 }], + atualizadoEm: '2026-11-18T12:00:00Z', + } + await entrar(page, estado) + await abrirInventario(page) + + await expect(page.getByRole('checkbox', { name: 'Piscina' })).toBeChecked() + await expect(page.getByLabel('Complemento de Piscina')).toHaveValue('2 piscinas') + await expect(page.getByRole('checkbox', { name: 'Rampa de acesso' })).toBeChecked() + await expect(page.getByRole('checkbox', { name: 'Academia' })).not.toBeChecked() + await expect(page.getByText(/Inventário atualizado em 18\/11\/2026/)).toBeVisible() +}) + +test('o complemento só aparece para o item marcado que aceita complemento', async ({ page }) => { + await entrar(page, novoEstado()) + await abrirInventario(page) + + await expect(page.getByLabel('Complemento de Piscina')).toHaveCount(0) + await page.getByRole('checkbox', { name: 'Piscina' }).check() + await expect(page.getByLabel('Complemento de Piscina')).toBeVisible() + + await page.getByRole('checkbox', { name: 'Academia' }).check() + await expect(page.getByLabel('Complemento de Academia')).toHaveCount(0) + + await page.getByRole('checkbox', { name: 'Piscina' }).uncheck() + await expect(page.getByLabel('Complemento de Piscina')).toHaveCount(0) +}) + +test('desmarcar tira o item e o complemento do que é salvo', async ({ page }) => { + const estado = novoEstado() + estado.inventario = { + itens: [{ itemId: 10, complemento: '2 piscinas' }, { itemId: 20 }], + atualizadoEm: '2026-11-18T12:00:00Z', + } + await entrar(page, estado) + await abrirInventario(page) + + await page.getByRole('checkbox', { name: 'Piscina' }).uncheck() + await page.getByRole('button', { name: 'Salvar inventário' }).click() + + await expect(page.getByText('Inventário salvo.')).toBeVisible() + expect(estado.puts).toEqual([{ itens: [{ itemId: 20 }] }]) +}) + +test('complemento só com espaços não é enviado e o texto vai sem as bordas', async ({ page }) => { + const estado = novoEstado() + await entrar(page, estado) + await abrirInventario(page) + + await page.getByRole('checkbox', { name: 'Piscina' }).check() + await page.getByLabel('Complemento de Piscina').fill(' ') + await page.getByRole('button', { name: 'Salvar inventário' }).click() + await expect(page.getByText('Inventário salvo.')).toBeVisible() + + await page.getByLabel('Complemento de Piscina').fill(' aquecida ') + await page.getByRole('button', { name: 'Salvar inventário' }).click() + await expect.poll(() => estado.puts.length).toBe(2) + + expect(estado.puts).toEqual([ + { itens: [{ itemId: 10 }] }, + { itens: [{ itemId: 10, complemento: 'aquecida' }] }, + ]) +}) + +test('o aviso de salvo some quando o usuário volta a editar', async ({ page }) => { + await entrar(page, novoEstado()) + await abrirInventario(page) + + await page.getByRole('checkbox', { name: 'Academia' }).check() + await page.getByRole('button', { name: 'Salvar inventário' }).click() + await expect(page.getByText('Inventário salvo.')).toBeVisible() + await expect(page.getByText(/Inventário atualizado em 20\/11\/2026/)).toBeVisible() + + await page.getByRole('checkbox', { name: 'Rampa de acesso' }).check() + await expect(page.getByText('Inventário salvo.')).toHaveCount(0) +}) + +test('item que saiu do catálogo não volta no corpo do salvamento', async ({ page }) => { + const estado = novoEstado() + estado.inventario = { itens: [{ itemId: 999 }, { itemId: 11 }] } + await entrar(page, estado) + await abrirInventario(page) + + await expect(page.getByRole('checkbox', { name: 'Academia' })).toBeChecked() + await page.getByRole('checkbox', { name: 'Piscina' }).check() + await page.getByRole('button', { name: 'Salvar inventário' }).click() + + await expect(page.getByText('Inventário salvo.')).toBeVisible() + expect(estado.puts).toEqual([{ itens: [{ itemId: 10 }, { itemId: 11 }] }]) +}) + +test('erro ao salvar mostra o aviso e mantém o que foi marcado', async ({ page }) => { + const estado = novoEstado() + estado.recusaDoPut = { status: 422, detail: 'Item inativo no catálogo.' } + await entrar(page, estado) + await abrirInventario(page) + + await page.getByRole('checkbox', { name: 'Piscina' }).check() + await page.getByLabel('Complemento de Piscina').fill('2 piscinas') + await page.getByRole('button', { name: 'Salvar inventário' }).click() + + await expect(page.getByRole('alert')).toHaveText('Item inativo no catálogo.') + await expect(page.getByText('Inventário salvo.')).toHaveCount(0) + await expect(page.getByRole('checkbox', { name: 'Piscina' })).toBeChecked() + await expect(page.getByLabel('Complemento de Piscina')).toHaveValue('2 piscinas') +}) + +test('catálogo vazio mostra o estado vazio', async ({ page }) => { + const estado = novoEstado() + estado.catalogo = [] + await entrar(page, estado) + await abrirInventario(page) + + await expect(page.getByText('Catálogo vazio')).toBeVisible() + await expect(page.getByText('Não há itens de inventário cadastrados.')).toBeVisible() +}) + +test('erro ao carregar o inventário permite tentar de novo', async ({ page }) => { + await entrar(page, novoEstado()) + let falhou = false + await page.route('**/api/estabelecimentos/12/inventario', (rota) => { + if (falhou || rota.request().method() !== 'GET') return rota.fallback() + falhou = true + return rota.fulfill({ status: 403, json: { status: 403, detail: 'Sem permissão.' } }) + }) + + await abrirInventario(page) + await expect(page.getByRole('alert')).toContainText('Não foi possível carregar o inventário.') + await expect(page.getByRole('alert')).toContainText('Sem permissão.') + await page.getByRole('button', { name: 'Tentar novamente' }).click() + await expect(page.getByRole('checkbox', { name: 'Piscina' })).toBeVisible() +}) diff --git a/e2e/inventario.spec.ts b/e2e/inventario.spec.ts index dff9727..c44296e 100644 --- a/e2e/inventario.spec.ts +++ b/e2e/inventario.spec.ts @@ -1,12 +1,7 @@ import { expect, test, type Page } from '@playwright/test' +import { abrirCadastro } from './navegacao.ts' +import { ADMIN } from './fixtures/usuarios.ts' -const ADMIN = { - id: 1, - nome: 'Ana Souza', - email: 'ana@oto.test', - perfil: 'ADMIN', - ativo: true, -} const HOTEL = { id: 12, nomeFantasia: 'Hotel Exemplo', @@ -145,13 +140,6 @@ async function mockarApi(page: Page) { return { puts } } -async function abrirCadastro(page: Page, tela: string) { - const cadastros = page.getByRole('button', { name: 'Cadastros' }) - await cadastros.click() - await expect(cadastros).toHaveAttribute('aria-expanded', 'true') - await page.getByRole('link', { name: tela }).click() -} - test('cria grupo e item no catálogo e marca no inventário de um estabelecimento', async ({ page, }) => { diff --git a/e2e/jornadas-parceiro.spec.ts b/e2e/jornadas-parceiro.spec.ts new file mode 100644 index 0000000..e674c45 --- /dev/null +++ b/e2e/jornadas-parceiro.spec.ts @@ -0,0 +1,348 @@ +import { expect, test, type Page } from '@playwright/test' +import { injetarSessao } from './sessao.ts' +import { PARCEIRO } from './fixtures/usuarios.ts' + +const VISUALIZADOR = { id: 3, nome: 'Vera Lima', email: 'vera@oto.test', perfil: 'VISUALIZADOR' } + +const RESUMO = (id: number, nomeFantasia: string) => ({ + id, + nomeFantasia, + tipoHospedagemCodigo: 'HOTEL', + situacao: 'REGULAR', + ativo: true, +}) + +const CADASTRO = (id: number, nomeFantasia: string) => ({ + id, + ativo: true, + dados: { nomeFantasia, razaoSocial: `${nomeFantasia} Ltda` }, + secretaria: { tipoHospedagemCodigo: 'HOTEL', situacao: 'REGULAR', aceitaPesquisas: true }, +}) + +const TIPOS = [ + { codigo: 'HOTEL', nome: 'Hotel', calculaReceita: true }, + { codigo: 'RESORT', nome: 'Resort', calculaReceita: true }, +] + +test.describe('E2E-01 primeiro acesso do parceiro', () => { + test('define a senha pelo convite, entra e vê só o seu estabelecimento', async ({ page }) => { + const estado = { senha: '', convitesUsados: new Set(), chamadas: [] as string[] } + await page.route('**/api/**', (rota) => { + const pedido = rota.request() + const { pathname } = new URL(pedido.url()) + estado.chamadas.push(`${pedido.method()} ${pathname}`) + + if (pathname === '/api/auth/definir-senha') { + const { token, novaSenha, senha } = pedido.postDataJSON() as Record + if (token !== 'convite-hotel-a' || estado.convitesUsados.has(token)) { + return rota.fulfill({ + status: 422, + json: { status: 422, detail: 'Link expirado ou já utilizado.' }, + }) + } + estado.convitesUsados.add(token) + estado.senha = novaSenha ?? senha ?? '' + return rota.fulfill({ status: 204 }) + } + if (pathname === '/api/auth/login') { + const { email, senha } = pedido.postDataJSON() as { email: string; senha: string } + if (email !== PARCEIRO.email || senha !== estado.senha || estado.senha === '') { + return rota.fulfill({ + status: 401, + json: { status: 401, detail: 'E-mail ou senha inválidos.' }, + }) + } + return rota.fulfill({ + json: { + token: 'token-e2e', + expiraEm: new Date(Date.now() + 3_600_000).toISOString(), + usuario: PARCEIRO, + }, + }) + } + if (pathname === '/api/me') return rota.fulfill({ json: PARCEIRO }) + if (pathname === '/api/referencias') { + return rota.fulfill({ json: { tiposHospedagem: TIPOS } }) + } + if (pathname === '/api/estabelecimentos') { + return rota.fulfill({ json: [RESUMO(7, 'Hotel A')] }) + } + if (pathname === '/api/estabelecimentos/7') + return rota.fulfill({ json: CADASTRO(7, 'Hotel A') }) + if (pathname === '/api/estabelecimentos/8') { + return rota.fulfill({ + status: 403, + json: { status: 403, detail: 'Sem permissão.' }, + }) + } + return rota.fulfill({ json: [] }) + }) + + await page.goto('/definir-senha?token=convite-hotel-a') + await page.getByLabel('Nova senha').fill('senha-nova-123') + await page.getByLabel('Confirmar senha').fill('senha-nova-123') + await page.getByRole('button', { name: 'Definir senha' }).click() + await expect(page).toHaveURL(/\/login$/) + await expect(page.getByRole('status')).toHaveText(/Senha definida/) + + await page.getByLabel('E-mail').fill(PARCEIRO.email) + await page.getByLabel('Senha').fill('senha-nova-123') + await page.getByRole('button', { name: 'Entrar' }).click() + await expect(page.getByRole('button', { name: /Paula Reis/ })).toBeVisible() + + await page.getByRole('link', { name: 'Meu estabelecimento' }).click() + await expect(page).toHaveURL(/\/meu-estabelecimento$/) + await expect(page.getByRole('heading', { name: 'Hotel A', exact: true })).toBeVisible() + await expect(page.getByText('Hotel A Ltda')).toBeVisible() + await expect(page.getByText('Hotel B')).toHaveCount(0) + expect(estado.chamadas.filter((chamada) => chamada.includes('/estabelecimentos/8'))).toEqual([]) + + await page.goto('/definir-senha?token=convite-hotel-a') + await page.getByLabel('Nova senha').fill('outra-senha-456') + await page.getByLabel('Confirmar senha').fill('outra-senha-456') + await page.getByRole('button', { name: 'Definir senha' }).click() + await expect(page.getByRole('alert')).toHaveText('Link expirado ou já utilizado.') + await expect(page).toHaveURL(/\/definir-senha\?token=convite-hotel-a$/) + expect(estado.senha).toBe('senha-nova-123') + }) + + test('antes de definir a senha, o login do convidado é recusado', async ({ page }) => { + await page.route('**/api/**', (rota) => { + if (new URL(rota.request().url()).pathname === '/api/auth/login') { + return rota.fulfill({ + status: 401, + json: { status: 401, detail: 'E-mail ou senha inválidos.' }, + }) + } + return rota.fulfill({ json: [] }) + }) + + await page.goto('/login') + await page.getByLabel('E-mail').fill(PARCEIRO.email) + await page.getByLabel('Senha').fill('senha-nova-123') + await page.getByRole('button', { name: 'Entrar' }).click() + await expect(page.getByRole('alert')).toHaveText('E-mail ou senha inválidos.') + await expect(page).toHaveURL(/\/login$/) + }) +}) + +test.describe('E2E-04 perfis e sigilo', () => { + test('PARCEIRO diante de estabelecimento alheio: a API nega, a tela não vaza e a sessão segue', async ({ + page, + }) => { + const chamadas: string[] = [] + await injetarSessao(page) + await page.route('**/api/**', (rota) => { + const { pathname } = new URL(rota.request().url()) + chamadas.push(pathname) + if (pathname === '/api/me') return rota.fulfill({ json: PARCEIRO }) + if (pathname === '/api/referencias') { + return rota.fulfill({ json: { tiposHospedagem: TIPOS } }) + } + if (pathname === '/api/inventario/catalogo') return rota.fulfill({ json: [] }) + if (pathname === '/api/estabelecimentos') { + return rota.fulfill({ json: [RESUMO(7, 'Hotel A'), RESUMO(9, 'Hotel Alheio')] }) + } + if (pathname === '/api/estabelecimentos/7') + return rota.fulfill({ json: CADASTRO(7, 'Hotel A') }) + if (/^\/api\/estabelecimentos\/9(\/|$)/.test(pathname)) { + return rota.fulfill({ + status: 403, + json: { status: 403, detail: 'Você não tem acesso a este estabelecimento.' }, + }) + } + if (/^\/api\/estabelecimentos\/7\/(capacidades|inventario)$/.test(pathname)) { + return rota.fulfill({ + json: pathname.endsWith('inventario') ? { estabelecimentoId: 7, itens: [] } : [], + }) + } + return rota.fulfill({ json: [] }) + }) + + await page.goto('/meu-estabelecimento') + + await expect(page.getByRole('heading', { name: 'Hotel A', exact: true })).toBeVisible() + const alertas = page.getByRole('alert') + await expect(alertas).toHaveCount(1) + await expect(alertas).toContainText('Não foi possível carregar o cadastro.') + await expect(alertas).toContainText('Você não tem acesso a este estabelecimento.') + await expect(page.getByRole('button', { name: 'Editar dados de Hotel Alheio' })).toBeDisabled() + await expect(page.getByText('Hotel Alheio Ltda')).toHaveCount(0) + + await expect(page).toHaveURL(/\/meu-estabelecimento$/) + await expect(page.getByRole('button', { name: /Paula Reis/ })).toBeVisible() + expect(await page.evaluate(() => sessionStorage.getItem('oto.sessao'))).not.toBeNull() + expect(chamadas).toContain('/api/estabelecimentos/9') + expect(chamadas).not.toContain('/api/estabelecimentos/9/capacidades') + expect(chamadas).not.toContain('/api/estabelecimentos/9/inventario') + }) + + test('PARCEIRO não vê itens de ADMIN no menu e as rotas de ADMIN dizem sem permissão', async ({ + page, + }) => { + const chamadas: string[] = [] + await injetarSessao(page) + await page.route('**/api/**', (rota) => { + const { pathname } = new URL(rota.request().url()) + chamadas.push(pathname) + if (pathname === '/api/me') return rota.fulfill({ json: PARCEIRO }) + return rota.fulfill({ json: [] }) + }) + + await page.goto('/') + await expect(page.getByRole('button', { name: /Paula Reis/ })).toBeVisible() + const menu = page.getByRole('navigation', { name: 'Principal' }) + await expect(menu.getByRole('link', { name: 'Meu estabelecimento' })).toBeVisible() + await expect(menu.getByRole('button', { name: 'Cadastros' })).toHaveCount(0) + await expect(menu.getByRole('link', { name: 'Cadastros' })).toHaveCount(0) + + for (const rota of [ + '/cadastros/usuarios', + '/cadastros/estabelecimentos', + '/cadastros/estabelecimentos/9/inventario', + '/cadastros/parametros', + '/cadastros/rhc', + '/cadastros/referencias', + '/cadastros/inventario', + '/cadastros/historico', + '/pesquisas/nova', + ]) { + await page.goto(rota) + await expect(page.getByText('Sem permissão para esta página')).toBeVisible() + } + expect(chamadas.filter((c) => c.startsWith('/api/estabelecimentos'))).toEqual([]) + expect(chamadas.filter((c) => c.startsWith('/api/usuarios'))).toEqual([]) + }) + + const campanha = { + id: 50, + rodadaId: 5, + nome: 'Consolidada de outubro de 2026', + modalidade: 'CONSOLIDADA', + tipoPeriodo: 'MENSAL', + periodoInicio: '2026-10-01', + periodoFim: '2026-10-31', + publicadaEm: '2026-11-12T15:00:00Z', + qtdDiarias: 31, + publicada: true, + } + + const resultado = { + campanha, + publicado: true, + taxaOcupacao: 64.73, + faixa: { codigo: 'OTIMA', nome: 'Ótima' }, + diariaMedia: 657.13, + receitaHospedagem: 776805.3, + porTipo: [ + { + tipoHospedagemCodigo: 'HOTEL', + nome: 'Hotel', + qtdMh: 20, + qtdUh: 980, + taxaOcupacao: 40.35, + diariaMedia: 657.13, + revpar: 265.12, + receitaEstimada: 776805.3, + omitido: false, + }, + { + tipoHospedagemCodigo: 'RESORT', + nome: 'Resort', + qtdMh: 2, + qtdUh: 600, + omitido: true, + }, + ], + } + + async function mockarVisualizador(page: Page) { + await injetarSessao(page) + await page.route('**/api/**', (rota) => { + const { pathname } = new URL(rota.request().url()) + if (pathname === '/api/me') return rota.fulfill({ json: VISUALIZADOR }) + if (pathname === '/api/referencias') { + return rota.fulfill({ json: { tiposHospedagem: TIPOS, faixasOcupacao: [] } }) + } + if (pathname === '/api/campanhas/publicadas') { + return rota.fulfill({ + json: [ + { + campanhaId: 50, + nome: campanha.nome, + modalidade: campanha.modalidade, + tipoPeriodo: campanha.tipoPeriodo, + periodoInicio: campanha.periodoInicio, + periodoFim: campanha.periodoFim, + publicadaEm: campanha.publicadaEm, + }, + ], + }) + } + if (pathname === '/api/campanhas/50/resultado') return rota.fulfill({ json: resultado }) + if (pathname === '/api/dashboard/serie-mensal') { + return rota.fulfill({ json: { indicador: 'TAXA_OCUPACAO', anos: [] } }) + } + if (pathname === '/api/dashboard/feriados') return rota.fulfill({ json: [] }) + if (pathname === '/api/rhc/vigente') { + return rota.fulfill({ json: { qtdRegistros: 478, qtdLeitos: 5116 } }) + } + if (pathname === '/api/parametros-calculo/vigente') { + return rota.fulfill({ json: { percentualDayUse: 15.15 } }) + } + return rota.fulfill({ json: [] }) + }) + } + + async function conferirSigilo(page: Page) { + const tabela = page.getByRole('table', { name: 'Desempenho por tipo de hospedagem' }) + const resort = tabela.getByRole('row', { name: /Resort/ }) + await expect(resort).toBeVisible() + await expect(resort.getByRole('cell')).toHaveCount(2) + await expect(resort.getByRole('cell').last()).toHaveText( + 'Valores ocultos para preservar o sigilo: poucos estabelecimentos responderam.', + ) + await expect(resort).not.toContainText('%') + await expect(resort).not.toContainText('R$') + + const hotel = tabela.getByRole('row', { name: /Hotel/ }) + await expect(hotel).toContainText('40,4%') + await expect(hotel).toContainText('R$') + + const total = tabela.locator('tfoot tr') + await expect(total).not.toContainText('%') + await expect( + page.getByText('A taxa do total não aparece porque há tipo oculto por sigilo.'), + ).toBeVisible() + } + + test('VISUALIZADOR vê o painel com o tipo de poucos respondentes sem valores', async ({ + page, + }) => { + await mockarVisualizador(page) + await page.goto('/') + await expect( + page.getByRole('heading', { name: 'Taxa de ocupação hoteleira em outubro de 2026' }), + ).toBeVisible() + await conferirSigilo(page) + + await page.getByLabel('Tipo de hospedagem').selectOption('RESORT') + const tabela = page.getByRole('table', { name: 'Desempenho por tipo de hospedagem' }) + await expect(tabela.getByRole('row', { name: /Hotel/ })).toHaveCount(0) + await expect(tabela.getByRole('row', { name: /Resort/ })).toContainText( + 'Valores ocultos para preservar o sigilo', + ) + await expect(tabela.getByRole('row', { name: /Resort/ })).not.toContainText('%') + }) + + test('VISUALIZADOR vê o resultado publicado com o tipo oculto, e a tabela não mostra valores', async ({ + page, + }) => { + await mockarVisualizador(page) + await page.goto('/resultados/50') + await expect( + page.getByRole('heading', { level: 1, name: 'Consolidada de outubro de 2026' }), + ).toBeVisible() + await conferirSigilo(page) + }) +}) diff --git a/e2e/metodologia.spec.ts b/e2e/metodologia.spec.ts new file mode 100644 index 0000000..d1ca409 --- /dev/null +++ b/e2e/metodologia.spec.ts @@ -0,0 +1,243 @@ +import { expect, test, type Page } from '@playwright/test' +import { injetarSessao } from './sessao.ts' + +const VISUALIZADOR = { + id: 3, + nome: 'Vera Lima', + email: 'vera@oto.test', + perfil: 'VISUALIZADOR', + ativo: true, +} + +const PARAMETROS = { + id: 1, + vigenteDesde: '2025-01-01', + percentualDayUse: 15.15, + diasEmParques: 2, + gastoMedioIngresso: 105, + diasPermanenciaMedia: 4, + gastoMedioDiario: 250, + percentualMinimoLeitosPublicacao: 70, + fonte: 'Estudo OTO 2025', +} + +async function entrar(page: Page) { + await injetarSessao(page) +} + +test('mostra a explicação e os parâmetros em vigor', async ({ page }) => { + await entrar(page) + await page.route('**/api/**', (rota) => { + const { pathname } = new URL(rota.request().url()) + if (pathname === '/api/me') return rota.fulfill({ json: VISUALIZADOR }) + if (pathname === '/api/parametros-calculo/vigente') return rota.fulfill({ json: PARAMETROS }) + return rota.fulfill({ json: [] }) + }) + + await page.goto('/metodologia') + + await expect( + page.getByRole('heading', { + level: 1, + name: 'Como calculamos a taxa de ocupação e o fluxo de turistas', + }), + ).toBeVisible() + for (const secao of ['Taxa de ocupação', 'Leito útil', 'Day use', 'Sigilo dos dados']) { + await expect(page.getByRole('heading', { name: secao, exact: true })).toBeVisible() + } + + await expect(page.getByRole('heading', { name: 'Valores em vigor' })).toBeVisible() + const vigentes = page.locator('dl') + await expect(vigentes.getByText('Day use sobre o público hospedado')).toBeVisible() + await expect(vigentes.locator('dd').first()).toHaveText('15,15%') + await expect(vigentes.getByText('Mínimo de leitos respondentes para publicar')).toBeVisible() + await expect(page.getByText('Em vigor desde 01/01/2025. Fonte: Estudo OTO 2025.')).toBeVisible() +}) + +test('erro nos parâmetros não esconde o texto e permite tentar de novo', async ({ page }) => { + await entrar(page) + let tentativas = 0 + await page.route('**/api/**', (rota) => { + const { pathname } = new URL(rota.request().url()) + if (pathname === '/api/me') return rota.fulfill({ json: VISUALIZADOR }) + if (pathname === '/api/parametros-calculo/vigente') { + tentativas += 1 + return tentativas === 1 + ? rota.fulfill({ status: 403, json: { status: 403, detail: 'Sem permissão para isso.' } }) + : rota.fulfill({ json: PARAMETROS }) + } + return rota.fulfill({ json: [] }) + }) + + await page.goto('/metodologia') + + const alerta = page.getByRole('alert') + await expect(alerta).toContainText('Não foi possível carregar os parâmetros em vigor.') + await expect(alerta).toContainText('Sem permissão para isso.') + await expect(page.getByRole('heading', { name: 'Leito útil' })).toBeVisible() + + await alerta.getByRole('button', { name: 'Tentar novamente' }).click() + + await expect(page.getByRole('alert')).toHaveCount(0) + await expect(page.getByText('Fonte: Estudo OTO 2025.')).toBeVisible() +}) + +async function mockarMetodologia( + page: Page, + usuario: object, + parametros: () => Promise | object, +) { + await entrar(page) + await page.route('**/api/**', async (rota) => { + const { pathname } = new URL(rota.request().url()) + if (pathname === '/api/me') return rota.fulfill({ json: usuario }) + if (pathname === '/api/parametros-calculo/vigente') { + return rota.fulfill({ json: await parametros() }) + } + return rota.fulfill({ json: [] }) + }) +} + +test('formata cada valor em vigor e mostra as faixas de ocupação', async ({ page }) => { + await mockarMetodologia(page, VISUALIZADOR, () => ({ + ...PARAMETROS, + percentualDayUse: 12.5, + percentualMinimoLeitosPublicacao: 80, + })) + + await page.goto('/metodologia') + + const valores = page.locator('dl > div') + await expect(valores).toHaveCount(6) + const esperado: [string, RegExp][] = [ + ['Day use sobre o público hospedado', /^12,50%$/], + ['Dias de ingresso em parque', /^2$/], + ['Valor médio do ingresso', /^R\$\s105$/], + ['Dias de gasto médio', /^4$/], + ['Valor do gasto médio diário', /^R\$\s250$/], + ['Mínimo de leitos respondentes para publicar', /^80%$/], + ] + for (const [rotulo, valor] of esperado) { + await expect(valores.filter({ hasText: rotulo }).locator('dd')).toHaveText(valor) + } + + const faixas = page.getByRole('heading', { name: 'Faixas de ocupação' }) + await expect(faixas).toBeVisible() + const lista = page + .getByRole('listitem') + .filter({ hasText: /^(Ruim|Regular|Boa|Ótima|Excelente):/ }) + await expect(lista).toHaveText([ + 'Ruim: até 20%', + 'Regular: de 21 a 40%', + 'Boa: de 41 a 60%', + 'Ótima: de 61 a 80%', + 'Excelente: de 81 a 100%', + ]) +}) + +test('sem fonte cadastrada, a vigência aparece só com a data', async ({ page }) => { + await mockarMetodologia(page, VISUALIZADOR, () => ({ ...PARAMETROS, fonte: undefined })) + + await page.goto('/metodologia') + + await expect(page.getByText('Em vigor desde 01/01/2025.', { exact: true })).toBeVisible() + await expect(page.getByText(/Fonte:/)).toHaveCount(0) +}) + +test('mostra o carregamento dos parâmetros sem esconder o texto da metodologia', async ({ + page, +}) => { + let liberar: () => void = () => {} + const espera = new Promise((resolver) => { + liberar = resolver + }) + await mockarMetodologia(page, VISUALIZADOR, async () => { + await espera + return PARAMETROS + }) + + await page.goto('/metodologia') + + await expect(page.getByText('Carregando os parâmetros')).toBeVisible() + await expect(page.getByRole('heading', { name: 'Leito útil' })).toBeVisible() + await expect(page.locator('dl')).toHaveCount(0) + + liberar() + await expect(page.getByText('Carregando os parâmetros')).toHaveCount(0) + await expect(page.locator('dl > div')).toHaveCount(6) +}) + +test('todos os perfis abrem a página, e cada um com o seu menu', async ({ page }) => { + for (const [perfil, nome] of [ + ['ADMIN', 'Ana Souza'], + ['PARCEIRO', 'Paula Reis'], + ] as const) { + await mockarMetodologia( + page, + { id: 9, nome, email: 'x@oto.test', perfil, ativo: true }, + () => PARAMETROS, + ) + await page.goto('/metodologia') + + await expect(page.getByRole('heading', { level: 1 })).toContainText( + 'Como calculamos a taxa de ocupação', + ) + await expect(page.getByText('Sem permissão para esta página')).toHaveCount(0) + await expect(page.getByRole('button', { name: new RegExp(nome) })).toBeVisible() + await page.unrouteAll({ behavior: 'ignoreErrors' }) + } +}) + +test('sem sessão, a metodologia leva ao login', async ({ page }) => { + await page.route('**/api/**', (rota) => rota.fulfill({ status: 401, json: {} })) + + await page.goto('/metodologia') + + await expect(page).toHaveURL(/\/login$/) + await expect(page.getByRole('button', { name: 'Entrar' })).toBeVisible() +}) + +test('o painel leva à metodologia pelo link da taxa de ocupação', async ({ page }) => { + const campanha = { + campanhaId: 15, + nome: 'Agosto de 2026', + modalidade: 'CONSOLIDADA', + tipoPeriodo: 'MENSAL', + periodoInicio: '2026-08-01', + periodoFim: '2026-08-31', + publicadaEm: '2026-09-18T12:00:00Z', + } + await entrar(page) + await page.route('**/api/**', (rota) => { + const { pathname } = new URL(rota.request().url()) + if (pathname === '/api/me') return rota.fulfill({ json: VISUALIZADOR }) + if (pathname === '/api/referencias') { + return rota.fulfill({ json: { tiposHospedagem: [], faixasOcupacao: [] } }) + } + if (pathname === '/api/campanhas/publicadas') return rota.fulfill({ json: [campanha] }) + if (pathname === '/api/campanhas/15/resultado') { + return rota.fulfill({ + json: { + campanha: { id: 15, ...campanha, qtdDiarias: 31, publicada: true }, + publicado: true, + taxaOcupacao: 62.8, + qtdMh: 72, + qtdMhRespondentes: 58, + porTipo: [], + distribuicaoFaixas: [], + }, + }) + } + if (pathname === '/api/parametros-calculo/vigente') return rota.fulfill({ json: PARAMETROS }) + return rota.fulfill({ status: 404, json: { detail: `sem rota: ${pathname}` } }) + }) + + await page.goto('/') + await page + .getByRole('link', { name: 'Como calculamos a taxa de ocupação e o fluxo de turistas' }) + .click() + + await expect(page).toHaveURL(/\/metodologia$/) + await expect(page.getByRole('heading', { name: 'Valores em vigor' })).toBeVisible() + await expect(page.locator('dl > div')).toHaveCount(6) +}) diff --git a/e2e/meu-estabelecimento-cadastro.spec.ts b/e2e/meu-estabelecimento-cadastro.spec.ts new file mode 100644 index 0000000..9d85c89 --- /dev/null +++ b/e2e/meu-estabelecimento-cadastro.spec.ts @@ -0,0 +1,470 @@ +import { expect, test, type Page } from '@playwright/test' +import { injetarSessao } from './sessao.ts' +import { catalogoPadrao } from './fixtures/catalogo.ts' +import { CAPACIDADE_ANTIGA, resumoDePousada } from './fixtures/estabelecimento.ts' +import { PARCEIRO } from './fixtures/usuarios.ts' + +const CADASTRO = (id: number, nomeFantasia: string) => ({ + id, + ativo: true, + dados: { + nomeFantasia, + razaoSocial: 'Sol Hospedagens Ltda', + cnpj: '12345678000190', + dataAbertura: '2015-03-10', + bairro: 'Centro', + emailComercial: 'contato@sol.test', + possuiCadastur: true, + cadasturExigencia: 'OBRIGATORIO', + funcionamento24h: false, + funcionariosFixos: 12, + horarioCheckIn: '14:00:00', + }, + secretaria: { + tipoHospedagemCodigo: 'POUSADA', + situacao: 'IRREGULAR', + aceitaPesquisas: false, + contatoNome: 'Maria da Secretaria', + }, +}) + +const CATALOGO = catalogoPadrao() + +type Envio = { metodo: string; caminho: string; corpo: unknown } +type Recusa = { status: number; detail: string } + +type Estado = { + resumos: ReturnType[] + cadastros: Record> + capacidades: Record + envios: Envio[] + recusaProxima?: Recusa + /** ids cujo detalhe ou lista falham com 403 */ + semDetalhe: number[] + semLista: boolean +} + +function novoEstado(): Estado { + return { + resumos: [resumoDePousada(7, 'Pousada do Sol')], + cadastros: { 7: CADASTRO(7, 'Pousada do Sol') }, + capacidades: { 7: [{ ...CAPACIDADE_ANTIGA }] }, + envios: [], + semDetalhe: [], + semLista: false, + } +} + +async function entrar(page: Page, estado: Estado) { + await injetarSessao(page) + await page.route('**/api/**', async (rota) => { + const pedido = rota.request() + const metodo = pedido.method() + const { pathname } = new URL(pedido.url()) + const proibido = () => + rota.fulfill({ status: 403, json: { status: 403, detail: 'Sem permissão.' } }) + + if (pathname === '/api/me') return rota.fulfill({ json: PARCEIRO }) + if (pathname === '/api/referencias') { + return rota.fulfill({ json: { tiposHospedagem: [{ codigo: 'POUSADA', nome: 'Pousada' }] } }) + } + if (pathname === '/api/inventario/catalogo') return rota.fulfill({ json: CATALOGO }) + if (pathname === '/api/estabelecimentos' && metodo === 'GET') { + return estado.semLista ? proibido() : rota.fulfill({ json: estado.resumos }) + } + + const rotaDoEstabelecimento = pathname.match( + /^\/api\/estabelecimentos\/(\d+)(?:\/(capacidades|inventario))?$/, + ) + if (!rotaDoEstabelecimento) return rota.fulfill({ json: [] }) + const id = Number(rotaDoEstabelecimento[1]) + const parte = rotaDoEstabelecimento[2] + + if (metodo === 'GET') { + if (!parte) { + return estado.semDetalhe.includes(id) + ? proibido() + : rota.fulfill({ json: estado.cadastros[id] }) + } + if (parte === 'capacidades') return rota.fulfill({ json: estado.capacidades[id] ?? [] }) + return rota.fulfill({ json: { estabelecimentoId: id, itens: [] } }) + } + + const corpo = pedido.postDataJSON() as Record + estado.envios.push({ metodo, caminho: pathname, corpo }) + if (estado.recusaProxima) { + const { status, detail } = estado.recusaProxima + estado.recusaProxima = undefined + return rota.fulfill({ status, json: { status, detail } }) + } + if (!parte) { + estado.cadastros[id] = { ...estado.cadastros[id]!, dados: corpo.dados as never } + return rota.fulfill({ json: estado.cadastros[id] }) + } + if (parte === 'capacidades') { + const nova = { ...CAPACIDADE_ANTIGA, id: 2, ...corpo, leitosUteis: 90 } + estado.capacidades[id] = [nova as never, ...(estado.capacidades[id] ?? [])] + return rota.fulfill({ status: 201, json: nova }) + } + return rota.fulfill({ json: { estabelecimentoId: id, itens: (corpo as { itens: [] }).itens } }) + }) +} + +async function abrirMeuEstabelecimento(page: Page) { + await page.goto('/meu-estabelecimento') + await expect(page.getByRole('heading', { level: 1, name: 'Meu estabelecimento' })).toBeVisible() +} + +const secao = (page: Page, nome: string) => page.getByRole('region', { name: nome }) + +test('mostra os dados em leitura por grupo, com traço no que não foi informado', async ({ + page, +}) => { + await entrar(page, novoEstado()) + await abrirMeuEstabelecimento(page) + + await expect(page.getByRole('heading', { name: 'Pousada do Sol' })).toBeVisible() + await expect(page.getByText('Pousada', { exact: true }).first()).toBeVisible() + + const cadastrais = secao(page, 'Dados cadastrais') + await expect( + cadastrais.locator('div', { hasText: 'Razão social' }).locator('dd').first(), + ).toHaveText('Sol Hospedagens Ltda') + await expect( + cadastrais.locator('div', { hasText: 'Data de abertura' }).locator('dd').first(), + ).toHaveText('10/03/2015') + await expect(cadastrais.locator('div', { hasText: 'CNAE' }).locator('dd').first()).toHaveText('—') + + const cadastur = secao(page, 'Cadastur') + await expect( + cadastur.locator('div', { hasText: 'Exigência do Cadastur' }).locator('dd'), + ).toHaveText('Obrigatório') + await expect(cadastur.locator('div', { hasText: 'Possui Cadastur' }).locator('dd')).toHaveText( + 'Sim', + ) + + const funcionamento = secao(page, 'Funcionamento') + await expect( + funcionamento.locator('div', { hasText: 'Funciona 24 horas' }).locator('dd'), + ).toHaveText('Não') + await expect(funcionamento.locator('div', { hasText: 'Check-in' }).locator('dd')).toHaveText( + '14:00', + ) + await expect(funcionamento.locator('div', { hasText: 'Check-out' }).locator('dd')).toHaveText('—') +}) + +test('os dados da Secretaria aparecem só para leitura, sem campo para editar', async ({ page }) => { + await entrar(page, novoEstado()) + await abrirMeuEstabelecimento(page) + + const secretaria = secao(page, 'Dados da Secretaria') + await expect( + secretaria.locator('div', { hasText: 'Tipo de hospedagem' }).locator('dd'), + ).toHaveText('Pousada') + await expect(secretaria.locator('div', { hasText: 'Situação' }).locator('dd')).toHaveText( + 'Irregular', + ) + await expect( + secretaria.locator('div', { hasText: 'Aceita participar das pesquisas' }).locator('dd'), + ).toHaveText('Não') + await expect(secretaria.getByText('Maria da Secretaria')).toBeVisible() + await expect(secretaria.getByRole('textbox')).toHaveCount(0) + await expect( + page.getByText('Os dados da Secretaria só a equipe do OTO altera.', { exact: false }), + ).toBeVisible() +}) + +test('a capacidade mostra a vigência atual e não oferece corrigir nem excluir', async ({ + page, +}) => { + await entrar(page, novoEstado()) + await abrirMeuEstabelecimento(page) + + const linha = page.getByRole('row', { name: /01\/01\/2025/ }) + await expect(linha).toContainText('20') + await expect(linha).toContainText('40') + await expect(linha).toContainText('Vigente') + await expect(page.getByRole('button', { name: /Corrigir|Excluir/ })).toHaveCount(0) + await expect( + page.getByText('Lançamento errado só o OTO corrige.', { exact: false }), + ).toBeVisible() +}) + +test('o parceiro não vê o grupo exclusivo da Secretaria no inventário', async ({ page }) => { + await entrar(page, novoEstado()) + await abrirMeuEstabelecimento(page) + + const inventario = secao(page, 'Inventário') + await expect(inventario.getByRole('checkbox', { name: 'Piscina' })).toBeVisible() + await expect(inventario.getByText('Selos da Secretaria')).toHaveCount(0) + await expect(inventario.getByRole('checkbox', { name: 'Selo verde' })).toHaveCount(0) +}) + +test('sem estabelecimento vinculado, orienta a falar com o OTO', async ({ page }) => { + const estado = novoEstado() + estado.resumos = [] + await entrar(page, estado) + await abrirMeuEstabelecimento(page) + + await expect(page.getByText('Nenhum estabelecimento vinculado')).toBeVisible() + await expect( + page.getByText('Fale com o OTO para vincular o seu estabelecimento ao seu usuário.'), + ).toBeVisible() +}) + +test('mostra um cartão para cada estabelecimento vinculado, com o selo de inativo', async ({ + page, +}) => { + const estado = novoEstado() + estado.resumos = [ + resumoDePousada(7, 'Pousada do Sol'), + resumoDePousada(8, 'Pousada da Lua', false), + ] + estado.cadastros[8] = CADASTRO(8, 'Pousada da Lua') + estado.capacidades[8] = [] + await entrar(page, estado) + await abrirMeuEstabelecimento(page) + + await expect(page.getByRole('heading', { name: 'Pousada do Sol' })).toBeVisible() + await expect(page.getByRole('heading', { name: 'Pousada da Lua' })).toBeVisible() + await expect(page.getByRole('button', { name: /^Editar dados de/ })).toHaveCount(2) + await expect(page.getByText('Inativo', { exact: true })).toHaveCount(1) + await expect(page.getByText('Nenhuma capacidade cadastrada')).toBeVisible() +}) + +test('erro ao carregar a lista permite tentar de novo', async ({ page }) => { + const estado = novoEstado() + estado.semLista = true + await entrar(page, estado) + await page.goto('/meu-estabelecimento') + + await expect(page.getByRole('alert')).toContainText( + 'Não foi possível carregar os seus estabelecimentos.', + ) + estado.semLista = false + await page.getByRole('button', { name: 'Tentar novamente' }).click() + await expect(page.getByRole('heading', { name: 'Pousada do Sol' })).toBeVisible() +}) + +test('erro ao carregar o cadastro bloqueia a edição até tentar de novo', async ({ page }) => { + const estado = novoEstado() + estado.semDetalhe = [7] + await entrar(page, estado) + await abrirMeuEstabelecimento(page) + + await expect(page.getByRole('alert')).toContainText('Não foi possível carregar o cadastro.') + await expect(page.getByRole('button', { name: 'Editar dados de Pousada do Sol' })).toBeDisabled() + + estado.semDetalhe = [] + await page.getByRole('button', { name: 'Tentar novamente' }).click() + await expect(page.getByRole('button', { name: 'Editar dados de Pousada do Sol' })).toBeEnabled() + await expect(secao(page, 'Dados cadastrais')).toBeVisible() +}) + +test.describe('edição dos dados', () => { + async function abrirEdicao(page: Page) { + await abrirMeuEstabelecimento(page) + await page.getByRole('button', { name: 'Editar dados de Pousada do Sol' }).click() + return page.getByRole('dialog', { name: 'Editar dados de Pousada do Sol' }) + } + + test('abre com os dados atuais, sem os campos da Secretaria nem da capacidade', async ({ + page, + }) => { + await entrar(page, novoEstado()) + const dialogo = await abrirEdicao(page) + + await expect(dialogo.getByLabel('Nome fantasia')).toHaveValue('Pousada do Sol') + await expect(dialogo.getByLabel('CNPJ')).toHaveValue('12345678000190') + await expect(dialogo.getByLabel('Contato para as pesquisas')).toHaveCount(0) + await expect(dialogo.getByLabel('Tipo de hospedagem')).toHaveCount(0) + await expect(dialogo.getByLabel('UH', { exact: true })).toHaveCount(0) + }) + + test('barra nome vazio, e-mail inválido e CNPJ curto sem chamar a API', async ({ page }) => { + const estado = novoEstado() + await entrar(page, estado) + const dialogo = await abrirEdicao(page) + + await dialogo.getByLabel('Nome fantasia').fill('') + await dialogo.getByLabel('E-mail comercial').fill('sem-arroba') + await dialogo.getByLabel('CNPJ').fill('123') + await dialogo.getByRole('button', { name: 'Salvar' }).click() + + await expect(dialogo.getByText('Preencha este campo.')).toBeVisible() + await expect(dialogo.getByText('Informe um e-mail válido.')).toBeVisible() + await expect(dialogo.getByText('O CNPJ tem 14 dígitos.')).toBeVisible() + expect(estado.envios).toHaveLength(0) + }) + + test('cancelar fecha o diálogo sem gravar e mantém os dados', async ({ page }) => { + const estado = novoEstado() + await entrar(page, estado) + const dialogo = await abrirEdicao(page) + + await dialogo.getByLabel('Nome fantasia').fill('Outro nome') + await dialogo.getByRole('button', { name: 'Cancelar' }).click() + + await expect(dialogo).toHaveCount(0) + await expect(page.getByRole('heading', { name: 'Pousada do Sol' })).toBeVisible() + expect(estado.envios).toHaveLength(0) + }) + + test('a API recusa o CNPJ e a mensagem aparece no campo, com o diálogo aberto', async ({ + page, + }) => { + const estado = novoEstado() + await entrar(page, estado) + const dialogo = await abrirEdicao(page) + + estado.recusaProxima = { + status: 422, + detail: 'O CNPJ já está cadastrado em outro estabelecimento.', + } + await dialogo.getByRole('button', { name: 'Salvar' }).click() + + await expect( + dialogo.getByText('O CNPJ já está cadastrado em outro estabelecimento.'), + ).toBeVisible() + await expect(dialogo).toBeVisible() + await expect(page.getByText('Dados atualizados.')).toHaveCount(0) + }) + + test('envia só o bloco de dados, com os valores atuais dos campos que não mudaram', async ({ + page, + }) => { + const estado = novoEstado() + await entrar(page, estado) + const dialogo = await abrirEdicao(page) + + await dialogo.getByLabel('Bairro').fill('Jardim') + await dialogo.getByRole('button', { name: 'Salvar' }).click() + + await expect(page.getByText('Dados atualizados.')).toBeVisible() + expect(estado.envios).toHaveLength(1) + const { corpo } = estado.envios[0]! + expect(Object.keys(corpo as object)).toEqual(['dados']) + expect((corpo as { dados: Record }).dados).toMatchObject({ + nomeFantasia: 'Pousada do Sol', + cnpj: '12345678000190', + bairro: 'Jardim', + }) + await expect( + secao(page, 'Endereço').locator('div', { hasText: 'Bairro' }).locator('dd').first(), + ).toHaveText('Jardim') + }) +}) + +test.describe('capacidade', () => { + async function abrirNovaCapacidade(page: Page) { + await abrirMeuEstabelecimento(page) + await page.getByRole('button', { name: /Informar nova capacidade/ }).click() + return page.getByRole('dialog', { name: 'Informar nova capacidade' }) + } + + test('barra UH PCD acima do total de UH e campos obrigatórios vazios', async ({ page }) => { + const estado = novoEstado() + await entrar(page, estado) + const dialogo = await abrirNovaCapacidade(page) + + await dialogo.getByLabel('Vigente desde').fill('2026-11-20') + await dialogo.getByLabel('UH', { exact: true }).fill('10') + await dialogo.getByLabel('UH PCD').fill('11') + await dialogo.getByRole('button', { name: 'Incluir vigência' }).click() + + await expect(dialogo.getByText('As UH PCD não podem passar o total de UH.')).toBeVisible() + await expect(dialogo.getByText('Preencha este campo.').first()).toBeVisible() + expect(estado.envios).toHaveLength(0) + }) + + test('data já usada por outra vigência é recusada no campo da data', async ({ page }) => { + const estado = novoEstado() + await entrar(page, estado) + const dialogo = await abrirNovaCapacidade(page) + + estado.recusaProxima = { + status: 422, + detail: 'Já existe uma capacidade a partir desta data.', + } + await dialogo.getByLabel('Vigente desde').fill('2025-01-01') + await dialogo.getByLabel('UH', { exact: true }).fill('35') + await dialogo.getByLabel('UH PCD').fill('2') + await dialogo.getByLabel('Leitos').fill('90') + await dialogo.getByLabel('Máximo de pessoas por UH').fill('4') + await dialogo.getByRole('button', { name: 'Incluir vigência' }).click() + + await expect(dialogo.getByText('Já existe uma capacidade a partir desta data.')).toBeVisible() + await expect(dialogo).toBeVisible() + }) + + test('a nova vigência entra na tabela e a anterior passa a ser a vigente mais antiga', async ({ + page, + }) => { + await entrar(page, novoEstado()) + const dialogo = await abrirNovaCapacidade(page) + + await dialogo.getByLabel('Vigente desde').fill('2026-01-01') + await dialogo.getByLabel('UH', { exact: true }).fill('35') + await dialogo.getByLabel('UH PCD').fill('2') + await dialogo.getByLabel('Leitos').fill('90') + await dialogo.getByLabel('Máximo de pessoas por UH').fill('4') + await dialogo.getByRole('button', { name: 'Incluir vigência' }).click() + + await expect(page.getByText('Capacidade a partir de 01/01/2026 informada.')).toBeVisible() + await expect(page.getByRole('row', { name: /01\/01\/2026/ })).toContainText('Vigente') + await expect(page.getByRole('row', { name: /01\/01\/2025/ })).toContainText('Anterior') + }) + + test('cancelar fecha o diálogo sem gravar', async ({ page }) => { + const estado = novoEstado() + await entrar(page, estado) + const dialogo = await abrirNovaCapacidade(page) + + await dialogo.getByRole('button', { name: 'Cancelar' }).click() + + await expect(dialogo).toHaveCount(0) + expect(estado.envios).toHaveLength(0) + }) +}) + +test('erro ao salvar o inventário aparece no cartão e mantém as marcações', async ({ page }) => { + const estado = novoEstado() + await entrar(page, estado) + await abrirMeuEstabelecimento(page) + + const inventario = secao(page, 'Inventário') + await inventario.getByRole('checkbox', { name: 'Piscina' }).check() + estado.recusaProxima = { status: 422, detail: 'Item inativo no catálogo.' } + await inventario.getByRole('button', { name: 'Salvar inventário' }).click() + + await expect(inventario.getByRole('alert')).toHaveText('Item inativo no catálogo.') + await expect(inventario.getByRole('checkbox', { name: 'Piscina' })).toBeChecked() +}) + +test('o menu do parceiro leva ao cartão do estabelecimento', async ({ page }) => { + await entrar(page, novoEstado()) + await page.goto('/') + await page.getByRole('link', { name: 'Meu estabelecimento' }).click() + await expect(page).toHaveURL(/\/meu-estabelecimento$/) + await expect(page.getByRole('heading', { name: 'Pousada do Sol' })).toBeVisible() +}) + +test('o ADMIN não vê o item no menu e a tela diz que não tem permissão', async ({ page }) => { + await injetarSessao(page) + await page.route('**/api/**', (rota) => { + const { pathname } = new URL(rota.request().url()) + if (pathname === '/api/me') { + return rota.fulfill({ + json: { id: 1, nome: 'Ana Souza', email: 'ana@oto.test', perfil: 'ADMIN', ativo: true }, + }) + } + return rota.fulfill({ json: [] }) + }) + + await page.goto('/') + await expect(page.getByRole('button', { name: /Ana Souza/ })).toBeVisible() + await expect(page.getByRole('link', { name: 'Meu estabelecimento' })).toHaveCount(0) + + await page.goto('/meu-estabelecimento') + await expect(page.getByText('Sem permissão para esta página')).toBeVisible() +}) diff --git a/e2e/meu-estabelecimento.spec.ts b/e2e/meu-estabelecimento.spec.ts index 84c58bf..7d36316 100644 --- a/e2e/meu-estabelecimento.spec.ts +++ b/e2e/meu-estabelecimento.spec.ts @@ -1,76 +1,17 @@ import { expect, test, type Page } from '@playwright/test' import { irPeloMenu, semRolagemHorizontal } from './navegacao.ts' +import { catalogoPadrao } from './fixtures/catalogo.ts' +import { CAPACIDADE_ANTIGA, resumoDePousada } from './fixtures/estabelecimento.ts' +import { PARCEIRO } from './fixtures/usuarios.ts' -const PARCEIRO = { - id: 2, - nome: 'Paula Reis', - email: 'paula@oto.test', - perfil: 'PARCEIRO', - ativo: true, -} -const RESUMO = { - id: 7, - nomeFantasia: 'Pousada do Sol', - tipoHospedagemCodigo: 'POUSADA', - situacao: 'REGULAR', - ativo: true, -} +const RESUMO = resumoDePousada(7, 'Pousada do Sol') const SECRETARIA = { tipoHospedagemCodigo: 'POUSADA', situacao: 'REGULAR', aceitaPesquisas: true, contatoNome: 'Maria da Secretaria', } -const ANTIGA = { - id: 1, - vigenteDesde: '2025-01-01', - qtdUh: 20, - qtdUhPcd: 1, - qtdLeitos: 50, - maxLeitosPorUh: 3, - leitosUteis: 40, -} - -const CATALOGO = [ - { - id: 1, - categoria: 'SERVICOS_EQUIPAMENTOS', - codigo: 'LAZER', - nome: 'Lazer', - exclusivoSecretaria: false, - ordem: 1, - ativo: true, - itens: [ - { - id: 10, - codigo: 'PISCINA', - nome: 'Piscina', - permiteComplemento: true, - ordem: 1, - ativo: true, - }, - ], - }, - { - id: 3, - categoria: 'SUSTENTABILIDADE', - codigo: 'SELOS', - nome: 'Selos da Secretaria', - exclusivoSecretaria: true, - ordem: 1, - ativo: true, - itens: [ - { - id: 30, - codigo: 'SELO', - nome: 'Selo verde', - permiteComplemento: false, - ordem: 1, - ativo: true, - }, - ], - }, -] +const CATALOGO = catalogoPadrao() type Envio = { metodo: string; caminho: string; corpo: unknown } @@ -82,7 +23,7 @@ async function mockarApi(page: Page) { dados: { nomeFantasia: 'Pousada do Sol' }, secretaria: SECRETARIA, } - let capacidades = [ANTIGA] + let capacidades = [CAPACIDADE_ANTIGA] let inventario: { itemId: number; complemento?: string }[] = [{ itemId: 30 }] const envios: Envio[] = [] @@ -126,8 +67,8 @@ async function mockarApi(page: Page) { return rota.fulfill({ json: cadastro }) } if (chave === 'POST /api/estabelecimentos/7/capacidades') { - const nova = { ...ANTIGA, id: 2, ...corpo, leitosUteis: 90 } - capacidades = [nova as typeof ANTIGA, ...capacidades] + const nova = { ...CAPACIDADE_ANTIGA, id: 2, ...corpo, leitosUteis: 90 } + capacidades = [nova as typeof CAPACIDADE_ANTIGA, ...capacidades] return rota.fulfill({ status: 201, json: nova }) } if (chave === 'PUT /api/estabelecimentos/7/inventario') { diff --git a/e2e/minha-senha.spec.ts b/e2e/minha-senha.spec.ts new file mode 100644 index 0000000..2e64bd8 --- /dev/null +++ b/e2e/minha-senha.spec.ts @@ -0,0 +1,87 @@ +import { expect, test, type Page } from '@playwright/test' +import { injetarSessao } from './sessao.ts' +import { ADMIN } from './fixtures/usuarios.ts' + +type Troca = { senhaAtual: string; novaSenha: string } + +async function entrar( + page: Page, + aoTrocar: (corpo: Troca) => Parameters[1] | object, +) { + await injetarSessao(page) + await page.route('**/api/**', async (rota) => { + const pedido = rota.request() + const { pathname } = new URL(pedido.url()) + if (pathname === '/api/me') return rota.fulfill({ json: ADMIN }) + if (pedido.method() === 'PUT' && pathname === '/api/me/senha') { + return rota.fulfill(aoTrocar(pedido.postDataJSON() as Troca) as object) + } + return rota.fulfill({ json: [] }) + }) +} + +async function abrirTrocaDeSenha(page: Page) { + await page.goto('/') + await page.getByRole('button', { name: /Ana Souza/ }).click() + await page.getByRole('menuitem', { name: 'Trocar senha' }).click() + await expect(page).toHaveURL(/\/minha-senha$/) + await expect(page.getByRole('heading', { level: 1, name: 'Trocar senha' })).toBeVisible() +} + +test('troca a senha pelo menu da conta e limpa o formulário', async ({ page }) => { + const enviados: Troca[] = [] + await entrar(page, (corpo) => { + enviados.push(corpo) + return { status: 204 } + }) + await abrirTrocaDeSenha(page) + + await page.getByLabel('Senha atual').fill('senha-antiga') + await page.getByLabel('Nova senha', { exact: true }).fill('senha-nova-123') + await page.getByLabel('Confirmar senha').fill('senha-nova-123') + await page.getByRole('button', { name: 'Trocar senha' }).click() + + await expect(page.getByRole('status')).toHaveText('Senha alterada com sucesso.') + expect(enviados).toEqual([{ senhaAtual: 'senha-antiga', novaSenha: 'senha-nova-123' }]) + await expect(page.getByLabel('Senha atual')).toHaveValue('') + await expect(page.getByLabel('Nova senha', { exact: true })).toHaveValue('') + await expect(page.getByLabel('Confirmar senha')).toHaveValue('') +}) + +test('barra no campo o que está errado antes de chamar a API', async ({ page }) => { + const enviados: Troca[] = [] + await entrar(page, (corpo) => { + enviados.push(corpo) + return { status: 204 } + }) + await abrirTrocaDeSenha(page) + + await page.getByRole('button', { name: 'Trocar senha' }).click() + await expect(page.getByText('Informe a senha atual.')).toBeVisible() + await expect(page.getByText('A senha deve ter pelo menos 8 caracteres.')).toBeVisible() + + await page.getByLabel('Senha atual').fill('senha-antiga') + await page.getByLabel('Nova senha', { exact: true }).fill('senha-nova-123') + await page.getByLabel('Confirmar senha').fill('outra-senha-123') + await page.getByRole('button', { name: 'Trocar senha' }).click() + await expect(page.getByText('As senhas não conferem.')).toBeVisible() + + expect(enviados).toHaveLength(0) +}) + +test('mostra o erro da API quando a senha atual está errada', async ({ page }) => { + await entrar(page, () => ({ + status: 422, + json: { status: 422, detail: 'A senha atual está incorreta.' }, + })) + await abrirTrocaDeSenha(page) + + await page.getByLabel('Senha atual').fill('errada') + await page.getByLabel('Nova senha', { exact: true }).fill('senha-nova-123') + await page.getByLabel('Confirmar senha').fill('senha-nova-123') + await page.getByRole('button', { name: 'Trocar senha' }).click() + + await expect(page.getByRole('alert')).toHaveText('A senha atual está incorreta.') + await expect(page.getByRole('status')).toHaveCount(0) + await expect(page.getByLabel('Nova senha', { exact: true })).toHaveValue('senha-nova-123') +}) diff --git a/e2e/navegacao.ts b/e2e/navegacao.ts index 4b1d55e..ee7d17d 100644 --- a/e2e/navegacao.ts +++ b/e2e/navegacao.ts @@ -17,8 +17,15 @@ export async function irPeloMenu(page: Page, item: string) { /** A página cabe na largura da tela: nada obriga a rolar para o lado (o celular de 360 px). */ export async function semRolagemHorizontal(page: Page) { - const { conteudo, tela } = (await page.evaluate( - '({ conteudo: document.documentElement.scrollWidth, tela: window.innerWidth })', - )) as { conteudo: number; tela: number } + const conteudo = (await page.evaluate('document.documentElement.scrollWidth')) as number + const tela = page.viewportSize()?.width ?? 0 expect(conteudo, 'a página não deveria rolar para o lado').toBeLessThanOrEqual(tela) } + +/** Abre o submenu de Cadastros e segue para a tela. */ +export async function abrirCadastro(page: Page, tela: string) { + const cadastros = page.getByRole('button', { name: 'Cadastros' }) + await cadastros.click() + await expect(cadastros).toHaveAttribute('aria-expanded', 'true') + await page.getByRole('link', { name: tela }).click() +} diff --git a/e2e/nova-pesquisa.spec.ts b/e2e/nova-pesquisa.spec.ts new file mode 100644 index 0000000..058e016 --- /dev/null +++ b/e2e/nova-pesquisa.spec.ts @@ -0,0 +1,260 @@ +import { expect, test, type Page } from '@playwright/test' +import { injetarSessao } from './sessao.ts' +import { ADMIN } from './fixtures/usuarios.ts' + +const RODADAS = [ + { id: 4, codigo: '017/26', titulo: 'Anterior', status: 'ENCERRADA', campanhas: [] }, +] + +type Envio = { metodo: string; caminho: string; corpo: unknown } + +type Api = { envios: Envio[] } + +/** Dia fixo: o código, o mês e o prazo sugeridos não dependem do dia em que o teste roda. */ +async function entrar(page: Page): Promise { + const api: Api = { envios: [] } + await page.clock.setFixedTime(new Date('2026-11-16T12:00:00-03:00')) + await injetarSessao(page) + let ultimaCampanha = 100 + await page.route('**/api/**', async (rota) => { + const pedido = rota.request() + const metodo = pedido.method() + const { pathname } = new URL(pedido.url()) + const chave = `${metodo} ${pathname}` + + if (chave === 'GET /api/me') return rota.fulfill({ json: ADMIN }) + if (chave === 'GET /api/rodadas') return rota.fulfill({ json: RODADAS }) + if (chave === 'GET /api/referencias') { + return rota.fulfill({ + json: { + tiposHospedagem: [], + feriados: [ + { codigo: 'CARNAVAL', nome: 'Carnaval', ordem: 1 }, + { codigo: 'NATAL', nome: 'Natal', ordem: 2 }, + ], + faixasOcupacao: [], + }, + }) + } + if (metodo !== 'POST') return rota.fulfill({ json: [] }) + + const corpo = pedido.postDataJSON() as Record + api.envios.push({ metodo, caminho: pathname, corpo }) + + if (chave === 'POST /api/rodadas') { + return rota.fulfill({ status: 201, json: { id: 9, ...corpo, status: 'RASCUNHO' } }) + } + if (chave === 'POST /api/rodadas/9/campanhas') { + ultimaCampanha += 1 + return rota.fulfill({ status: 201, json: { id: ultimaCampanha, ...corpo } }) + } + if (chave === 'POST /api/rodadas/9/abrir') { + return rota.fulfill({ + json: { id: 9, codigo: '018/26', status: 'ABERTA', prazoResposta: corpo.prazoResposta }, + }) + } + return rota.fulfill({ json: [] }) + }) + return api +} + +async function adicionarCarnaval(page: Page) { + await page.getByRole('button', { name: 'Adicionar campanha' }).click() + const campanha = page.getByRole('listitem', { name: 'Campanha 2' }) + await campanha.getByLabel('Qual feriado').selectOption('CARNAVAL') + await campanha.getByLabel('Primeiro dia').fill('2027-02-13') + await campanha.getByLabel('Último dia').fill('2027-02-17') + return campanha +} + +test('cria a pesquisa com uma campanha mensal e uma de feriado e abre para respostas', async ({ + page, +}) => { + const api = await entrar(page) + await page.goto('/pesquisas/nova') + + await expect(page.getByRole('heading', { level: 1, name: 'Nova pesquisa' })).toBeVisible() + await expect(page.getByLabel('Código')).toHaveValue('018/26') + await expect(page.getByText('Próximo número do ano.')).toBeVisible() + + const primeira = page.getByRole('listitem', { name: 'Campanha 1' }) + await expect(primeira.getByLabel('Mês')).toHaveValue('10') + await expect(primeira.getByLabel('Ano')).toHaveValue('2026') + await expect(primeira.getByLabel('Nome da campanha')).toHaveValue( + 'Consolidada de outubro de 2026', + ) + await expect(primeira.getByLabel('Diárias')).toHaveValue('31') + + await page.getByLabel('Título').fill('Consolidada de outubro e expectativa do Carnaval') + const segunda = await adicionarCarnaval(page) + await expect(segunda.getByLabel('Nome da campanha')).toHaveValue('Expectativa Carnaval 2027') + await expect(segunda.getByLabel('Diárias')).toHaveValue('5') + await page.getByLabel('Prazo de resposta').fill('2026-11-30') + + const previa = page.getByRole('complementary', { name: 'Prévia e envio' }) + await expect(previa.getByText('Rodada 018/26')).toBeVisible() + await expect(previa.getByText('Consolidada de outubro e expectativa do Carnaval')).toBeVisible() + await expect(previa).toContainText('Expectativa Carnaval 2027') + + await page.getByRole('button', { name: 'Abrir pesquisa' }).click() + + await expect( + page.getByRole('heading', { name: 'Pesquisa 018/26 aberta para respostas' }), + ).toBeVisible() + await expect( + page.getByText('Os meios de hospedagem podem responder até 30/11/2026 (faltam 14 dias).'), + ).toBeVisible() + const resumo = page.getByRole('list').filter({ hasText: 'Expectativa Carnaval 2027' }) + await expect(resumo).toContainText('Consolidada de outubro de 2026') + await expect(resumo).toContainText('31 diárias') + await expect(resumo).toContainText('5 diárias') + + expect(api.envios).toEqual([ + { + metodo: 'POST', + caminho: '/api/rodadas', + corpo: { codigo: '018/26', titulo: 'Consolidada de outubro e expectativa do Carnaval' }, + }, + { + metodo: 'POST', + caminho: '/api/rodadas/9/campanhas', + corpo: { + nome: 'Consolidada de outubro de 2026', + modalidade: 'CONSOLIDADA', + tipoPeriodo: 'MENSAL', + periodoInicio: '2026-10-01', + periodoFim: '2026-10-31', + qtdDiarias: 31, + }, + }, + { + metodo: 'POST', + caminho: '/api/rodadas/9/campanhas', + corpo: { + nome: 'Expectativa Carnaval 2027', + modalidade: 'EXPECTATIVA', + tipoPeriodo: 'FERIADO', + feriadoCodigo: 'CARNAVAL', + periodoInicio: '2027-02-13', + periodoFim: '2027-02-17', + qtdDiarias: 5, + }, + }, + { metodo: 'POST', caminho: '/api/rodadas/9/abrir', corpo: { prazoResposta: '2026-11-30' } }, + ]) + + await page.getByRole('button', { name: 'Criar outra pesquisa' }).click() + await expect(page.getByLabel('Título')).toHaveValue('') + await expect(page.getByLabel('Código')).toHaveValue('018/26') +}) + +test('sem título e sem prazo, o resumo de erros leva ao campo e nada é enviado', async ({ + page, +}) => { + const api = await entrar(page) + await page.goto('/pesquisas/nova') + await expect(page.getByLabel('Código')).toHaveValue('018/26') + + await page.getByRole('button', { name: 'Abrir pesquisa' }).click() + + await expect( + page.getByRole('heading', { name: 'Revise 2 campos antes de abrir a pesquisa' }), + ).toBeVisible() + await page.getByRole('link', { name: 'Título: Informe o título da pesquisa.' }).click() + await expect(page.getByLabel('Título')).toBeFocused() + await expect(page.getByText('Informe o prazo de resposta.').first()).toBeVisible() + expect(api.envios).toHaveLength(0) + + await page.getByLabel('Título').fill('Consolidada de outubro') + await page.getByLabel('Prazo de resposta').fill('2026-11-30') + await expect(page.getByText('Informe o título da pesquisa.')).toHaveCount(0) +}) + +test('barra campanha repetida e diárias acima do período, e permite remover a campanha', async ({ + page, +}) => { + const api = await entrar(page) + await page.goto('/pesquisas/nova') + await expect(page.getByLabel('Código')).toHaveValue('018/26') + await page.getByLabel('Título').fill('Consolidada de outubro') + await page.getByLabel('Prazo de resposta').fill('2026-11-30') + + await page.getByRole('button', { name: 'Adicionar campanha' }).click() + const segunda = page.getByRole('listitem', { name: 'Campanha 2' }) + await segunda.getByRole('radio', { name: 'Consolidada' }).check() + await segunda.getByRole('radio', { name: 'Mensal' }).check() + await expect( + segunda.getByText('Já há uma campanha desta modalidade para este período.'), + ).toBeVisible() + + const primeira = page.getByRole('listitem', { name: 'Campanha 1' }) + await primeira.getByLabel('Diárias').fill('40') + await page.getByRole('button', { name: 'Abrir pesquisa' }).click() + await expect(primeira.getByText('Use até 31: o período tem 31 dias.')).toBeVisible() + expect(api.envios).toHaveLength(0) + + await page.getByRole('button', { name: 'Remover a campanha 2' }).click() + await expect(page.getByRole('listitem', { name: 'Campanha 2' })).toHaveCount(0) + await expect(page.getByRole('button', { name: /Remover a campanha/ })).toHaveCount(0) + await primeira.getByRole('button', { name: 'Usar 31' }).click() + await expect(primeira.getByLabel('Diárias')).toHaveValue('31') +}) + +test('falha numa campanha mantém o que já foi criado e o reenvio continua de onde parou', async ({ + page, +}) => { + const api = await entrar(page) + await page.goto('/pesquisas/nova') + await expect(page.getByLabel('Código')).toHaveValue('018/26') + await page.getByLabel('Título').fill('Consolidada de outubro e Carnaval') + await adicionarCarnaval(page) + await page.getByLabel('Prazo de resposta').fill('2026-11-30') + + let campanhas = 0 + await page.route('**/api/rodadas/9/campanhas', (rota) => { + campanhas += 1 + if (campanhas !== 2) return rota.fallback() + return rota.fulfill({ + status: 422, + json: { status: 422, detail: 'Já existe campanha neste período.' }, + }) + }) + + await page.getByRole('button', { name: 'Abrir pesquisa' }).click() + + const falha = page + .getByRole('alert') + .filter({ hasText: 'Não foi possível incluir uma das campanhas.' }) + await expect(falha).toContainText('Já existe campanha neste período.') + await expect( + page.getByText( + 'A pesquisa 018/26 já foi criada, com 1 de 2 campanhas. Corrija e envie de novo: o envio continua de onde parou.', + ), + ).toBeVisible() + await expect( + page.getByRole('listitem', { name: 'Campanha 1' }).getByText('Incluída'), + ).toBeVisible() + await expect(page.getByLabel('Título')).toBeDisabled() + + await page.getByRole('button', { name: 'Abrir pesquisa' }).click() + + await expect( + page.getByRole('heading', { name: 'Pesquisa 018/26 aberta para respostas' }), + ).toBeVisible() + const criacoes = api.envios.filter(({ caminho }) => caminho === '/api/rodadas') + const inclusoes = api.envios.filter(({ caminho }) => caminho === '/api/rodadas/9/campanhas') + expect(criacoes).toHaveLength(1) + expect(inclusoes).toHaveLength(2) +}) + +test('vai para o painel depois de abrir a pesquisa', async ({ page }) => { + await entrar(page) + await page.goto('/pesquisas/nova') + await expect(page.getByLabel('Código')).toHaveValue('018/26') + await page.getByLabel('Título').fill('Consolidada de outubro') + await page.getByLabel('Prazo de resposta').fill('2026-11-30') + await page.getByRole('button', { name: 'Abrir pesquisa' }).click() + + await page.getByRole('button', { name: 'Ir para o painel' }).click() + await expect(page).toHaveURL(/\/$/) +}) diff --git a/e2e/painel.spec.ts b/e2e/painel.spec.ts index 8e735e2..9ad1b4c 100644 --- a/e2e/painel.spec.ts +++ b/e2e/painel.spec.ts @@ -1,4 +1,5 @@ import { expect, test, type Page, type Route } from '@playwright/test' +import { injetarSessao } from './sessao.ts' const TIPOS = [ { codigo: 'HOTEL', nome: 'Hotel', calculaReceita: true }, @@ -85,15 +86,7 @@ async function abrirPainel( const { publicadas = PUBLICADAS, falhas = {}, caminho = '/' } = opcoes const csv: string[] = [] - await page.addInitScript(() => { - sessionStorage.setItem( - 'oto.sessao', - JSON.stringify({ - token: 'token-e2e', - expiraEm: new Date(Date.now() + 3_600_000).toISOString(), - }), - ) - }) + await injetarSessao(page) await page.route('**/api/**', (rota: Route) => { const { pathname } = new URL(rota.request().url()) diff --git a/e2e/pesquisas.spec.ts b/e2e/pesquisas.spec.ts index 13e7774..7acac5e 100644 --- a/e2e/pesquisas.spec.ts +++ b/e2e/pesquisas.spec.ts @@ -1,5 +1,6 @@ import { expect, test, type Page, type Route } from '@playwright/test' import { irPeloMenu, semRolagemHorizontal } from './navegacao.ts' +import { injetarSessao } from './sessao.ts' type Perfil = 'ADMIN' | 'PARCEIRO' | 'VISUALIZADOR' @@ -32,15 +33,7 @@ const LEITOS_DO_PENDENTE = 300 /** Sessão já salva, como depois do login: o teste começa na página. */ async function entrar(page: Page) { - await page.addInitScript(() => { - sessionStorage.setItem( - 'oto.sessao', - JSON.stringify({ - token: 'token-e2e', - expiraEm: new Date(Date.now() + 3_600_000).toISOString(), - }), - ) - }) + await injetarSessao(page) } function percentual(leitos: number) { diff --git a/e2e/previa-diarias.spec.ts b/e2e/previa-diarias.spec.ts new file mode 100644 index 0000000..b0799e5 --- /dev/null +++ b/e2e/previa-diarias.spec.ts @@ -0,0 +1,321 @@ +import { expect, test, type Page } from '@playwright/test' +import { injetarSessao } from './sessao.ts' + +const ADMIN = { id: 1, nome: 'Ana Souza', perfil: 'ADMIN' } + +const TIPOS = [ + { codigo: 'HOTEL', nome: 'Hotel', calculaReceita: true }, + { codigo: 'POUSADA', nome: 'Pousada', calculaReceita: true }, +] + +const CAMPANHA = { + id: 50, + rodadaId: 5, + nome: 'Consolidada de outubro de 2026', + modalidade: 'CONSOLIDADA', + tipoPeriodo: 'MENSAL', + periodoInicio: '2026-10-01', + periodoFim: '2026-10-31', + qtdDiarias: 31, +} + +/** média das respostas e diárias vendidas no mês, por tipo */ +const RESPOSTAS: Record = { + HOTEL: { media: 420, vendidas: 1000 }, + POUSADA: { media: 300, vendidas: 500 }, +} + +type Diaria = { tipoHospedagemCodigo?: string; diariaMedia: number; fonte?: string } + +type Estado = { + publicada: boolean + diarias: Diaria[] + /** resposta da API para o próximo PUT, uma única vez */ + recusaProxima?: { status: number; json: object } + envios: unknown[] +} + +function novoEstado(diarias: Diaria[] = [], publicada = false): Estado { + return { publicada, diarias, envios: [] } +} + +/** A prévia calcula com a diária informada no lugar da média das respostas, como a API. */ +function previa(estado: Estado) { + const informada = (codigo?: string) => + estado.diarias.find((d) => (d.tipoHospedagemCodigo ?? undefined) === codigo)?.diariaMedia + const porTipo = TIPOS.map(({ codigo, nome }) => { + const { media, vendidas } = RESPOSTAS[codigo]! + const diariaMedia = informada(codigo) ?? media + return { + tipoHospedagemCodigo: codigo, + nome, + qtdMh: 10, + qtdUh: 100, + taxaOcupacao: 50, + diariaMedia, + revpar: diariaMedia / 2, + receitaEstimada: diariaMedia * vendidas, + } + }) + const vendidas = porTipo.reduce( + (soma, tipo) => soma + RESPOSTAS[tipo.tipoHospedagemCodigo]!.vendidas, + 0, + ) + const receitaHospedagem = porTipo.reduce((soma, tipo) => soma + tipo.receitaEstimada, 0) + return { + campanhaId: 50, + qtdMh: 20, + qtdRespondentes: 20, + leitosTotal: 1000, + leitosRespondentes: 1000, + percentualLeitosRespondentes: 100, + percentualMinimoPublicacao: 70, + podePublicar: true, + impedimentos: [], + avisos: [], + resultado: { + campanha: CAMPANHA, + taxaOcupacao: 50, + diariaMedia: informada(undefined) ?? receitaHospedagem / vendidas, + receitaHospedagem, + porTipo, + }, + } +} + +async function abrirPrevia(page: Page, estado: Estado) { + await injetarSessao(page) + await page.route('**/api/**', (rota) => { + const pedido = rota.request() + const { pathname } = new URL(pedido.url()) + const chave = `${pedido.method()} ${pathname}` + + if (chave === 'GET /api/me') return rota.fulfill({ json: ADMIN }) + if (chave === 'GET /api/referencias') return rota.fulfill({ json: { tiposHospedagem: TIPOS } }) + if (chave === 'GET /api/rodadas/5') { + return rota.fulfill({ + json: { + id: 5, + codigo: '005/26', + titulo: 'Consolidada de outubro', + status: 'ENCERRADA', + campanhas: [{ ...CAMPANHA, publicada: estado.publicada }], + }, + }) + } + if (chave === 'GET /api/campanhas/50/previa') return rota.fulfill({ json: previa(estado) }) + if (chave === 'GET /api/campanhas/50/diarias') { + return rota.fulfill({ + json: estado.diarias.map((d) => ({ + ...d, + registradoPor: 1, + registradoEm: '2026-11-20T13:00:00Z', + })), + }) + } + if (chave === 'PUT /api/campanhas/50/diarias') { + const corpo = pedido.postDataJSON() as { diarias: Diaria[]; fonte?: string } + estado.envios.push(corpo) + if (estado.recusaProxima) { + const recusa = estado.recusaProxima + estado.recusaProxima = undefined + return rota.fulfill(recusa) + } + estado.diarias = corpo.diarias.map((d) => ({ ...d, fonte: corpo.fonte })) + return rota.fulfill({ json: estado.diarias }) + } + return rota.fulfill({ status: 404, json: { detail: `sem rota: ${chave}` } }) + }) + + await page.goto('/pesquisas/5/campanhas/50/previa') + const tabela = page.getByRole('table', { name: 'Diárias informadas pela equipe' }) + await expect(tabela).toBeVisible() + return tabela +} + +const linha = (tabela: ReturnType, recorte: string) => + tabela.getByRole('row').filter({ has: tabela.page().getByRole('rowheader', { name: recorte }) }) + +const desempenho = (page: Page, tipo: string) => + page + .getByRole('table', { name: 'Desempenho por tipo de hospedagem' }) + .getByRole('row') + .filter({ hasText: tipo }) + +const aviso = (page: Page) => page.getByRole('status').filter({ hasText: /^Diária/ }) + +function indicador(page: Page, rotulo: string) { + return page + .locator('section') + .filter({ has: page.getByRole('heading', { name: 'Resultado com as respostas atuais' }) }) + .locator('div', { has: page.locator('dt', { hasText: new RegExp(`^${rotulo}$`) }) }) + .locator('dd') + .first() +} + +test('informa a diária de um tipo e a geral, e a prévia passa a usá-las no lugar da média', async ({ + page, +}) => { + const estado = novoEstado() + const tabela = await abrirPrevia(page, estado) + + await expect( + page.getByText('Nenhuma diária informada. O cálculo usa a média das respostas.'), + ).toBeVisible() + await expect(linha(tabela, 'Pousada')).toContainText('Não informada') + await expect(linha(tabela, 'Pousada')).toContainText('R$ 300,00média das respostas') + await expect(desempenho(page, 'Pousada')).toContainText(/R\$\s150,0\smil/) + await expect(indicador(page, 'Receita em hospedagem')).toHaveText(/R\$\s570,0\smil/) + + await page.getByRole('button', { name: 'Informar diária de Pousada' }).click() + const dialogo = page.getByRole('dialog', { name: 'Informar diária de Pousada' }) + await expect(dialogo.getByText('Média das respostas na prévia: R$ 300,00.')).toBeVisible() + await dialogo.getByLabel('Diária média (R$)').fill('360') + await dialogo.getByLabel('Fonte (opcional)').fill('Pesquisa por telefone') + await dialogo.getByRole('button', { name: 'Salvar' }).click() + + await expect(aviso(page)).toHaveText('Diária de Pousada salva. A prévia já usa o novo valor.') + await expect(dialogo).toHaveCount(0) + await expect(linha(tabela, 'Pousada')).toContainText('R$ 360,00informada pela equipe') + await expect(desempenho(page, 'Pousada')).toContainText(/R\$\s360/) + await expect(desempenho(page, 'Pousada')).toContainText(/R\$\s180,0\smil/) + await expect(indicador(page, 'Receita em hospedagem')).toHaveText(/R\$\s600,0\smil/) + await expect(page.getByText(/^Fonte: Pesquisa por telefone\. Última alteração em/)).toBeVisible() + + await expect(indicador(page, 'Diária média')).toHaveText(/R\$\s400/) + await page.getByRole('button', { name: 'Informar diária geral' }).click() + const geral = page.getByRole('dialog', { name: 'Informar diária geral' }) + await expect(geral.getByLabel('Fonte (opcional)')).toHaveValue('Pesquisa por telefone') + await geral.getByLabel('Diária média (R$)').fill('450,50') + await geral.getByRole('button', { name: 'Salvar' }).click() + + await expect(aviso(page)).toHaveText('Diária geral salva. A prévia já usa o novo valor.') + await expect(linha(tabela, 'Geral (todos os tipos)')).toContainText( + 'R$ 450,50informada pela equipe', + ) + await expect(indicador(page, 'Diária média')).toHaveText(/R\$\s451/) + expect(estado.envios).toEqual([ + { + diarias: [{ tipoHospedagemCodigo: 'POUSADA', diariaMedia: 360 }], + fonte: 'Pesquisa por telefone', + }, + { + diarias: [{ tipoHospedagemCodigo: 'POUSADA', diariaMedia: 360 }, { diariaMedia: 450.5 }], + fonte: 'Pesquisa por telefone', + }, + ]) +}) + +test('corrige a diária informada de um tipo mantendo as demais e a fonte', async ({ page }) => { + const estado = novoEstado([ + { tipoHospedagemCodigo: 'HOTEL', diariaMedia: 500, fonte: 'Pesquisa de balcão' }, + { diariaMedia: 410, fonte: 'Pesquisa de balcão' }, + ]) + const tabela = await abrirPrevia(page, estado) + + await expect(linha(tabela, 'Hotel')).toContainText('R$ 500,00informada pela equipe') + await expect(desempenho(page, 'Hotel')).toContainText(/R\$\s500,0\smil/) + + await page.getByRole('button', { name: 'Corrigir diária de Hotel' }).click() + const dialogo = page.getByRole('dialog', { name: 'Corrigir diária de Hotel' }) + await expect(dialogo.getByLabel('Diária média (R$)')).toHaveValue('500') + await expect(dialogo.getByLabel('Fonte (opcional)')).toHaveValue('Pesquisa de balcão') + await dialogo.getByLabel('Diária média (R$)').fill('520') + await dialogo.getByRole('button', { name: 'Salvar' }).click() + + await expect(aviso(page)).toHaveText('Diária de Hotel salva. A prévia já usa o novo valor.') + await expect(linha(tabela, 'Hotel')).toContainText('R$ 520,00informada pela equipe') + await expect(desempenho(page, 'Hotel')).toContainText(/R\$\s520,0\smil/) + expect(estado.envios).toEqual([ + { + diarias: [{ diariaMedia: 410 }, { tipoHospedagemCodigo: 'HOTEL', diariaMedia: 520 }], + fonte: 'Pesquisa de balcão', + }, + ]) +}) + +test('remove a diária de um tipo e o cálculo volta à média das respostas', async ({ page }) => { + const estado = novoEstado([ + { tipoHospedagemCodigo: 'HOTEL', diariaMedia: 500, fonte: 'Pesquisa de balcão' }, + { tipoHospedagemCodigo: 'POUSADA', diariaMedia: 360, fonte: 'Pesquisa de balcão' }, + ]) + const tabela = await abrirPrevia(page, estado) + await expect(desempenho(page, 'Hotel')).toContainText(/R\$\s500,0\smil/) + + await page.getByRole('button', { name: 'Remover diária de Hotel' }).click() + const confirmacao = page.getByRole('dialog', { name: 'Remover diária de Hotel?' }) + await confirmacao.getByRole('button', { name: 'Remover' }).click() + + await expect(aviso(page)).toHaveText( + 'Diária de Hotel removida. O cálculo volta a usar a média das respostas.', + ) + await expect(linha(tabela, 'Hotel')).toContainText('Não informada') + await expect(linha(tabela, 'Hotel')).toContainText('R$ 420,00média das respostas') + await expect(page.getByRole('button', { name: 'Remover diária de Hotel' })).toHaveCount(0) + await expect(page.getByRole('button', { name: 'Informar diária de Hotel' })).toBeVisible() + await expect(linha(tabela, 'Pousada')).toContainText('R$ 360,00informada pela equipe') + await expect(desempenho(page, 'Hotel')).toContainText(/R\$\s420,0\smil/) + expect(estado.envios).toEqual([ + { + diarias: [{ tipoHospedagemCodigo: 'POUSADA', diariaMedia: 360 }], + fonte: 'Pesquisa de balcão', + }, + ]) +}) + +test('barra diária vazia ou zero sem chamar a API', async ({ page }) => { + const estado = novoEstado() + const tabela = await abrirPrevia(page, estado) + + await page.getByRole('button', { name: 'Informar diária de Hotel' }).click() + const dialogo = page.getByRole('dialog', { name: 'Informar diária de Hotel' }) + await dialogo.getByRole('button', { name: 'Salvar' }).click() + await expect(dialogo.getByText('Informe a diária média.')).toBeVisible() + await expect(dialogo.getByLabel('Diária média (R$)')).toBeFocused() + + await dialogo.getByLabel('Diária média (R$)').fill('0') + await dialogo.getByRole('button', { name: 'Salvar' }).click() + await expect(dialogo.getByText('A diária precisa ser maior que zero.')).toBeVisible() + + await dialogo.getByRole('button', { name: 'Cancelar' }).click() + await expect(dialogo).toHaveCount(0) + await expect(linha(tabela, 'Hotel')).toContainText('Não informada') + expect(estado.envios).toEqual([]) +}) + +test('recusa da API mantém o diálogo aberto com o valor digitado', async ({ page }) => { + const estado = novoEstado() + estado.recusaProxima = { + status: 422, + json: { status: 422, detail: 'As diárias só podem mudar antes da publicação.' }, + } + const tabela = await abrirPrevia(page, estado) + + await page.getByRole('button', { name: 'Informar diária de Hotel' }).click() + const dialogo = page.getByRole('dialog', { name: 'Informar diária de Hotel' }) + await dialogo.getByLabel('Diária média (R$)').fill('480') + await dialogo.getByRole('button', { name: 'Salvar' }).click() + + await expect(dialogo.getByRole('alert')).toHaveText( + 'As diárias só podem mudar antes da publicação.', + ) + await expect(dialogo).toBeVisible() + await expect(dialogo.getByLabel('Diária média (R$)')).toHaveValue('480') + await expect(linha(tabela, 'Hotel')).toContainText('Não informada') + expect(estado.envios).toHaveLength(1) +}) + +test('campanha publicada mostra as diárias sem os botões de mudar', async ({ page }) => { + const estado = novoEstado( + [{ tipoHospedagemCodigo: 'HOTEL', diariaMedia: 500, fonte: 'Pesquisa de balcão' }], + true, + ) + const tabela = await abrirPrevia(page, estado) + + await expect( + page.getByText('A campanha já foi publicada. Cancele a publicação para mudar as diárias.'), + ).toBeVisible() + await expect(linha(tabela, 'Hotel')).toContainText('R$ 500,00informada pela equipe') + await expect(tabela.getByRole('columnheader', { name: 'Ações' })).toHaveCount(0) + await expect(page.getByRole('button', { name: /diária/ })).toHaveCount(0) +}) diff --git a/e2e/referencias.spec.ts b/e2e/referencias.spec.ts new file mode 100644 index 0000000..e590c83 --- /dev/null +++ b/e2e/referencias.spec.ts @@ -0,0 +1,227 @@ +import { expect, test, type Page } from '@playwright/test' +import { injetarSessao } from './sessao.ts' +import { ADMIN } from './fixtures/usuarios.ts' + +type Item = { codigo: string; nome: string; ordem?: number; calculaReceita?: boolean } +type Faixa = { codigo: string; nome: string; percentualMinimo: number } + +type Estado = { + tipos: Item[] + feriados: Item[] + faixas: Faixa[] + recusaProxima?: { status: number; json: object } + enviados: { metodo: string; caminho: string; corpo: unknown }[] +} + +function novoEstado(): Estado { + return { + tipos: [ + { codigo: 'HOTEL', nome: 'Hotel', ordem: 1, calculaReceita: true }, + { codigo: 'POUSADA', nome: 'Pousada', ordem: 2, calculaReceita: false }, + ], + feriados: [{ codigo: 'CARNAVAL', nome: 'Carnaval', ordem: 1 }], + faixas: [ + { codigo: 'RUIM', nome: 'Ruim', percentualMinimo: 0 }, + { codigo: 'BOA', nome: 'Boa', percentualMinimo: 41 }, + ], + enviados: [], + } +} + +/** API em memória: as listas mudam com o que a tela grava. */ +async function entrar(page: Page, estado: Estado) { + await injetarSessao(page) + await page.route('**/api/**', async (rota) => { + const pedido = rota.request() + const metodo = pedido.method() + const { pathname } = new URL(pedido.url()) + if (pathname === '/api/me') return rota.fulfill({ json: ADMIN }) + if (metodo === 'GET' && pathname === '/api/referencias') { + return rota.fulfill({ + json: { + tiposHospedagem: estado.tipos, + feriados: estado.feriados, + faixasOcupacao: estado.faixas, + }, + }) + } + + const recurso = pathname.match( + /^\/api\/referencias\/(tipos-hospedagem|feriados|faixas)(?:\/(\w+))?$/, + ) + if (!recurso) return rota.fulfill({ json: [] }) + const [, nome, codigo] = recurso + const lista = ( + nome === 'tipos-hospedagem' + ? estado.tipos + : nome === 'feriados' + ? estado.feriados + : estado.faixas + ) as { codigo: string }[] + + estado.enviados.push({ + metodo, + caminho: pathname, + corpo: metodo === 'DELETE' ? null : pedido.postDataJSON(), + }) + if (estado.recusaProxima) { + const recusa = estado.recusaProxima + estado.recusaProxima = undefined + return rota.fulfill(recusa) + } + if (metodo === 'DELETE') { + lista.splice( + lista.findIndex((item) => item.codigo === codigo), + 1, + ) + return rota.fulfill({ status: 204 }) + } + const dados = pedido.postDataJSON() as Record + if (metodo === 'POST') { + const gerado = + (dados.codigo as string | undefined) ?? + (dados.nome as string).normalize('NFD').replace(/\W/g, '').toUpperCase() + const novo = { ...dados, codigo: gerado } as { codigo: string } + lista.push(novo) + return rota.fulfill({ status: 201, json: novo }) + } + const indice = lista.findIndex((item) => item.codigo === codigo) + lista[indice] = { ...lista[indice], ...dados, codigo: codigo! } + return rota.fulfill({ json: lista[indice] }) + }) +} + +async function abrirReferencias(page: Page) { + await page.goto('/') + const cadastros = page.getByRole('button', { name: 'Cadastros' }) + await cadastros.click() + await expect(cadastros).toHaveAttribute('aria-expanded', 'true') + await page.getByRole('link', { name: 'Referências' }).click() + await expect(page.getByRole('heading', { level: 1, name: 'Referências' })).toBeVisible() +} + +test('lista os tipos de hospedagem e troca de aba pelo clique e pelo teclado', async ({ page }) => { + await entrar(page, novoEstado()) + await abrirReferencias(page) + + await expect(page.getByRole('tab', { name: 'Tipos de hospedagem' })).toHaveAttribute( + 'aria-selected', + 'true', + ) + await expect(page.getByRole('row', { name: /Hotel/ })).toContainText('Sim') + await expect(page.getByRole('row', { name: /Pousada/ })).toContainText('Não') + + await page.getByRole('tab', { name: 'Feriados e eventos' }).click() + await expect(page.getByRole('row', { name: /Carnaval/ })).toBeVisible() + + await page.getByRole('tab', { name: 'Feriados e eventos' }).press('ArrowRight') + await expect(page.getByRole('tab', { name: 'Faixas de ocupação' })).toBeFocused() + await expect(page.getByRole('row', { name: /Boa/ })).toContainText('41,00%') +}) + +test('cria um tipo de hospedagem sem informar o código', async ({ page }) => { + const estado = novoEstado() + await entrar(page, estado) + await abrirReferencias(page) + + await page.getByRole('button', { name: 'Novo tipo de hospedagem' }).click() + const dialogo = page.getByRole('dialog', { name: 'Novo tipo de hospedagem' }) + await dialogo.getByRole('button', { name: 'Criar' }).click() + await expect(dialogo.getByText('Preencha este campo.')).toBeVisible() + expect(estado.enviados).toHaveLength(0) + + await dialogo.getByLabel('Nome').fill('Chalé') + await dialogo.getByLabel('Entra na diária média, no RevPAR e na receita estimada').check() + await dialogo.getByRole('button', { name: 'Criar' }).click() + + await expect(page.getByRole('status')).toHaveText('Tipo de hospedagem Chalé criado.') + expect(estado.enviados).toMatchObject([ + { + metodo: 'POST', + caminho: '/api/referencias/tipos-hospedagem', + corpo: { nome: 'Chalé', calculaReceita: true }, + }, + ]) + await expect(page.getByRole('row', { name: /Chalé/ })).toContainText('Sim') +}) + +test('edita um feriado mantendo o código travado', async ({ page }) => { + const estado = novoEstado() + await entrar(page, estado) + await abrirReferencias(page) + await page.getByRole('tab', { name: 'Feriados e eventos' }).click() + + await page.getByRole('button', { name: 'Editar Carnaval' }).click() + const dialogo = page.getByRole('dialog', { name: 'Editar Carnaval' }) + await expect(dialogo.getByLabel('Código')).toBeDisabled() + await dialogo.getByLabel('Nome').fill('Carnaval de rua') + await dialogo.getByRole('button', { name: 'Salvar' }).click() + + await expect(page.getByRole('status')).toHaveText('Feriado ou evento Carnaval de rua alterado.') + expect(estado.enviados[0]).toMatchObject({ + metodo: 'PUT', + caminho: '/api/referencias/feriados/CARNAVAL', + }) + await expect(page.getByRole('row', { name: /Carnaval de rua/ })).toBeVisible() +}) + +test('a primeira faixa de ocupação tem o percentual travado em zero', async ({ page }) => { + await entrar(page, novoEstado()) + await abrirReferencias(page) + await page.getByRole('tab', { name: 'Faixas de ocupação' }).click() + + await page.getByRole('button', { name: 'Editar Ruim' }).click() + await expect( + page.getByRole('dialog', { name: 'Editar Ruim' }).getByLabel('A partir de (%)'), + ).toBeDisabled() + await page.getByRole('button', { name: 'Cancelar' }).click() + + await page.getByRole('button', { name: 'Editar Boa' }).click() + await expect( + page.getByRole('dialog', { name: 'Editar Boa' }).getByLabel('A partir de (%)'), + ).toBeEnabled() +}) + +test('exclui uma referência sem uso e mostra a recusa de uma que está em uso', async ({ page }) => { + const estado = novoEstado() + await entrar(page, estado) + await abrirReferencias(page) + + estado.recusaProxima = { + status: 422, + json: { status: 422, detail: 'O tipo Hotel está em uso por estabelecimentos.' }, + } + await page.getByRole('button', { name: 'Excluir Hotel' }).click() + const recusada = page.getByRole('dialog', { name: 'Excluir Hotel' }) + await expect(recusada.getByRole('button', { name: 'Cancelar' })).toBeFocused() + await recusada.getByRole('button', { name: 'Excluir' }).click() + await expect(recusada.getByRole('alert')).toHaveText( + 'O tipo Hotel está em uso por estabelecimentos.', + ) + await recusada.getByRole('button', { name: 'Cancelar' }).click() + await expect(page.getByRole('row', { name: /Hotel/ })).toBeVisible() + + await page.getByRole('button', { name: 'Excluir Pousada' }).click() + await page + .getByRole('dialog', { name: 'Excluir Pousada' }) + .getByRole('button', { name: 'Excluir' }) + .click() + await expect(page.getByRole('status')).toHaveText('Tipo de hospedagem Pousada excluído.') + await expect(page.getByRole('row', { name: /Pousada/ })).toHaveCount(0) +}) + +test('erro ao carregar as referências permite tentar de novo', async ({ page }) => { + const estado = novoEstado() + await entrar(page, estado) + let falhou = false + await page.route('**/api/referencias', (rota) => { + if (falhou) return rota.fallback() + falhou = true + return rota.fulfill({ status: 403, json: { status: 403, detail: 'Sem permissão.' } }) + }) + + await page.goto('/cadastros/referencias') + await expect(page.getByRole('alert')).toContainText('Não foi possível carregar as referências.') + await page.getByRole('button', { name: 'Tentar novamente' }).click() + await expect(page.getByRole('row', { name: /Hotel/ })).toBeVisible() +}) diff --git a/e2e/relatorios.spec.ts b/e2e/relatorios.spec.ts index 139e642..1329bef 100644 --- a/e2e/relatorios.spec.ts +++ b/e2e/relatorios.spec.ts @@ -1,5 +1,7 @@ import { expect, test, type Page, type Route } from '@playwright/test' import { irPeloMenu } from './navegacao.ts' +import { injetarSessao } from './sessao.ts' +import { PUBLICADA_AGOSTO, PUBLICADA_CARNAVAL, RESULTADO_AGOSTO } from './fixtures/resultado.ts' const TIPOS = [ { codigo: 'HOTEL', nome: 'Hotel', calculaReceita: true }, @@ -7,30 +9,8 @@ const TIPOS = [ ] const PUBLICADAS = [ - { - campanhaId: 15, - nome: 'Agosto de 2026', - modalidade: 'CONSOLIDADA', - tipoPeriodo: 'MENSAL', - periodoInicio: '2026-08-01', - periodoFim: '2026-08-31', - publicadaEm: '2026-09-18T12:00:00Z', - taxaOcupacao: 62.8, - faixa: { codigo: 'OTIMA', nome: 'Ótima' }, - fluxoTotal: 496_660, - }, - { - campanhaId: 9, - nome: 'Carnaval 2026', - modalidade: 'EXPECTATIVA', - tipoPeriodo: 'FERIADO', - periodoInicio: '2026-02-14', - periodoFim: '2026-02-17', - publicadaEm: '2026-02-10T12:00:00Z', - taxaOcupacao: 71.5, - faixa: { codigo: 'OTIMA', nome: 'Ótima' }, - fluxoTotal: 60_210, - }, + PUBLICADA_AGOSTO, + PUBLICADA_CARNAVAL, { campanhaId: 3, nome: 'Julho de 2025', @@ -45,63 +25,11 @@ const PUBLICADAS = [ }, ] -const RESULTADO_AGOSTO = { - campanha: { id: 15, ...PUBLICADAS[0], qtdDiarias: 31, publicada: true }, - publicado: true, - taxaOcupacao: 62.8, - faixa: { codigo: 'OTIMA', nome: 'Ótima' }, - qtdMh: 72, - qtdMhRespondentes: 58, - percentualMhRespondentes: 80.6, - leitosTotal: 13_508, - leitosRespondentes: 12_346, - percentualLeitosRespondentes: 91.4, - fluxoMh: 365_620, - fluxoRhc: 55_795, - fluxoDayUse: 75_245, - fluxoTotal: 496_660, - fluxoMedioDiario: 16_021, - diariaMedia: 765, - receitaHospedagem: 89_000_000, - receitaSemHospedagem: 21_000_000, - porTipo: [ - { - tipoHospedagemCodigo: 'RESORT', - nome: 'Resort', - qtdMh: 9, - qtdUh: 4_643, - taxaOcupacao: 66, - diariaMedia: 836, - revpar: 552, - receitaEstimada: 79_400_000, - }, - { - tipoHospedagemCodigo: 'HOTEL', - nome: 'Hotel', - qtdMh: 2, - qtdUh: 120, - taxaOcupacao: null, - diariaMedia: null, - revpar: null, - receitaEstimada: null, - omitido: true, - }, - ], -} - /** Sessão já salva, como depois do login, e a API simulada. Guarda as buscas feitas à lista. */ async function abrir(page: Page, caminho = '/relatorios') { const buscas: string[] = [] - await page.addInitScript(() => { - sessionStorage.setItem( - 'oto.sessao', - JSON.stringify({ - token: 'token-e2e', - expiraEm: new Date(Date.now() + 3_600_000).toISOString(), - }), - ) - }) + await injetarSessao(page) await page.route('**/api/**', (rota: Route) => { const url = new URL(rota.request().url()) diff --git a/e2e/sessao.spec.ts b/e2e/sessao.spec.ts new file mode 100644 index 0000000..14d9497 --- /dev/null +++ b/e2e/sessao.spec.ts @@ -0,0 +1,137 @@ +import { expect, test, type Page } from '@playwright/test' + +const usuario = { id: 1, nome: 'Ana Souza', email: 'ana@oto.test', perfil: 'ADMIN', ativo: true } + +type Estado = { tokenRecusado: boolean; chamadas: string[] } + +async function mockarApi(page: Page, estado: Estado) { + await page.route('**/api/**', (rota) => { + const { pathname } = new URL(rota.request().url()) + estado.chamadas.push(pathname) + if (pathname === '/api/auth/login') { + return rota.fulfill({ + json: { + token: 'token-e2e', + expiraEm: new Date(Date.now() + 3_600_000).toISOString(), + usuario, + }, + }) + } + if (estado.tokenRecusado) { + return rota.fulfill({ status: 401, json: { status: 401, detail: 'Token expirado.' } }) + } + if (pathname === '/api/me') return rota.fulfill({ json: usuario }) + return rota.fulfill({ json: [] }) + }) +} + +async function entrar(page: Page) { + await page.goto('/login') + await page.getByLabel('E-mail').fill(usuario.email) + await page.getByLabel('Senha').fill('senha-correta') + await page.getByRole('button', { name: 'Entrar' }).click() + await expect(page.getByRole('button', { name: /Ana Souza/ })).toBeVisible() + await page.waitForLoadState('networkidle') +} + +const sessaoSalva = (page: Page) => page.evaluate(() => sessionStorage.getItem('oto.sessao')) + +test('a API recusa o token no meio do uso: volta ao login com o aviso e apaga a sessão', async ({ + page, +}) => { + const estado: Estado = { tokenRecusado: false, chamadas: [] } + await mockarApi(page, estado) + await entrar(page) + expect(await sessaoSalva(page)).not.toBeNull() + + estado.tokenRecusado = true + await page.getByRole('button', { name: 'Cadastros' }).click() + await page.getByRole('link', { name: 'Usuários' }).click() + + await expect(page).toHaveURL(/\/login$/) + await expect(page.getByRole('heading', { name: 'Entrar no painel' })).toBeVisible() + await expect(page.getByRole('status')).toHaveText( + 'Sua sessão expirou. Entre novamente para continuar.', + ) + expect(await sessaoSalva(page)).toBeNull() + await expect(page.getByRole('button', { name: /Ana Souza/ })).toHaveCount(0) +}) + +test('depois de expirar, entrar de novo limpa o aviso e reabre o app', async ({ page }) => { + const estado: Estado = { tokenRecusado: false, chamadas: [] } + await mockarApi(page, estado) + await entrar(page) + + estado.tokenRecusado = true + await page.getByRole('button', { name: 'Cadastros' }).click() + await page.getByRole('link', { name: 'Usuários' }).click() + await expect(page.getByRole('status')).toHaveText( + 'Sua sessão expirou. Entre novamente para continuar.', + ) + + estado.tokenRecusado = false + await page.getByLabel('E-mail').fill(usuario.email) + await page.getByLabel('Senha').fill('senha-correta') + await page.getByRole('button', { name: 'Entrar' }).click() + await expect(page.getByRole('button', { name: /Ana Souza/ })).toBeVisible() + expect(await sessaoSalva(page)).not.toBeNull() +}) + +test('sair pelo menu da conta apaga a sessão e o botão voltar não reabre a tela protegida', async ({ + page, +}) => { + const estado: Estado = { tokenRecusado: false, chamadas: [] } + await mockarApi(page, estado) + await entrar(page) + await page.getByRole('link', { name: 'Indicadores' }).click() + await expect(page).toHaveURL(/\/indicadores$/) + + await page.getByRole('button', { name: /Ana Souza/ }).click() + await page.getByRole('menuitem', { name: 'Sair' }).click() + await expect(page).toHaveURL(/\/login$/) + expect(await sessaoSalva(page)).toBeNull() + await expect(page.getByRole('status')).toHaveCount(0) + + const chamadasAntes = estado.chamadas.length + await page.goBack() + await expect(page).toHaveURL(/\/login$/) + await expect(page.getByRole('heading', { name: 'Entrar no painel' })).toBeVisible() + await expect(page.getByRole('button', { name: /Ana Souza/ })).toHaveCount(0) + await expect(page.getByRole('navigation', { name: 'Principal' })).toHaveCount(0) + expect(estado.chamadas).toHaveLength(chamadasAntes) +}) + +test('sessão com expiraEm no passado leva direto ao login, sem chamar a API', async ({ page }) => { + const estado: Estado = { tokenRecusado: false, chamadas: [] } + await mockarApi(page, estado) + await page.addInitScript(() => { + sessionStorage.setItem( + 'oto.sessao', + JSON.stringify({ token: 'token-velho', expiraEm: '2020-01-01T00:00:00Z' }), + ) + }) + + await page.goto('/') + await expect(page).toHaveURL(/\/login$/) + await expect(page.getByRole('heading', { name: 'Entrar no painel' })).toBeVisible() + expect(estado.chamadas).toEqual([]) +}) + +test('a sessão vence pelo relógio: válida às 10h, recusada às 11h', async ({ page }) => { + const estado: Estado = { tokenRecusado: false, chamadas: [] } + await mockarApi(page, estado) + await page.addInitScript(() => { + sessionStorage.setItem( + 'oto.sessao', + JSON.stringify({ token: 'token-e2e', expiraEm: '2026-11-22T10:30:00-03:00' }), + ) + }) + + await page.clock.setFixedTime(new Date('2026-11-22T10:00:00-03:00')) + await page.goto('/') + await expect(page.getByRole('button', { name: /Ana Souza/ })).toBeVisible() + + await page.clock.setFixedTime(new Date('2026-11-22T11:00:00-03:00')) + await page.goto('/') + await expect(page).toHaveURL(/\/login$/) +}) diff --git a/e2e/sessao.ts b/e2e/sessao.ts new file mode 100644 index 0000000..4173896 --- /dev/null +++ b/e2e/sessao.ts @@ -0,0 +1,11 @@ +import type { Page } from '@playwright/test' + +/** Deixa uma sessão válida salva antes de a página abrir, como depois do login. */ +export async function injetarSessao(page: Page) { + await page.addInitScript(() => { + sessionStorage.setItem( + 'oto.sessao', + JSON.stringify({ token: 'token-e2e', expiraEm: '2099-01-01T00:00:00Z' }), + ) + }) +} diff --git a/e2e/vigencia-periodo.spec.ts b/e2e/vigencia-periodo.spec.ts new file mode 100644 index 0000000..80bed9b --- /dev/null +++ b/e2e/vigencia-periodo.spec.ts @@ -0,0 +1,103 @@ +import { expect, test, type Page } from '@playwright/test' +import { injetarSessao } from './sessao.ts' + +const CAMPANHA = { + campanhaId: 15, + nome: 'Outubro de 2026', + modalidade: 'CONSOLIDADA', + tipoPeriodo: 'MENSAL', + periodoInicio: '2026-10-01', + periodoFim: '2026-10-31', + publicadaEm: '2026-11-18T12:00:00Z', +} + +const PARAMETROS = [ + { id: 1, vigenteDesde: '2026-01-01', percentualDayUse: 15.15, fonte: 'Estudo OTO 2024' }, + { id: 2, vigenteDesde: '2026-10-16', percentualDayUse: 18.4, fonte: 'Estudo OTO 2026' }, +] + +const RHC = [ + { id: 1, vigenteDesde: '2026-01-01', qtdRegistros: 478, qtdLeitos: 5116 }, + { id: 2, vigenteDesde: '2026-10-16', qtdRegistros: 520, qtdLeitos: 5600 }, +] + +/** A vigência que vale na data pedida: a mais recente que já começou, como a API. */ +function vigenteEm(lista: { vigenteDesde: string }[], data: string) { + return lista.filter((item) => item.vigenteDesde <= data).at(-1) +} + +async function abrirPainel(page: Page) { + const consultas: { recurso: string; data: string | null }[] = [] + await page.clock.setFixedTime(new Date('2026-11-22T10:00:00-03:00')) + await injetarSessao(page) + await page.route('**/api/**', (rota) => { + const url = new URL(rota.request().url()) + const { pathname } = url + + if (pathname === '/api/me') { + return rota.fulfill({ json: { id: 3, nome: 'Vera Lima', perfil: 'VISUALIZADOR' } }) + } + if (pathname === '/api/referencias') { + return rota.fulfill({ json: { tiposHospedagem: [], faixasOcupacao: [] } }) + } + if (pathname === '/api/campanhas/publicadas') return rota.fulfill({ json: [CAMPANHA] }) + if (pathname === '/api/campanhas/15/resultado') { + return rota.fulfill({ + json: { + campanha: { id: 15, ...CAMPANHA, qtdDiarias: 31, publicada: true }, + publicado: true, + taxaOcupacao: 62.8, + qtdMh: 72, + qtdMhRespondentes: 58, + fluxoMh: 365_620, + fluxoRhc: 55_795, + fluxoDayUse: 75_245, + fluxoTotal: 496_660, + fluxoMedioDiario: 16_021, + porTipo: [], + }, + }) + } + const vigente = pathname.match(/^\/api\/(parametros-calculo|rhc)\/vigente$/) + if (vigente) { + const recurso = vigente[1]! + const data = url.searchParams.get('data') + consultas.push({ recurso, data }) + const vigencia = vigenteEm(recurso === 'rhc' ? RHC : PARAMETROS, data ?? '2026-11-22') + return vigencia + ? rota.fulfill({ json: vigencia }) + : rota.fulfill({ status: 404, json: { status: 404, detail: 'Sem vigência.' } }) + } + if (pathname === '/api/dashboard/serie-mensal') { + return rota.fulfill({ json: { indicador: 'TAXA_OCUPACAO', anos: [] } }) + } + if (pathname === '/api/dashboard/feriados') return rota.fulfill({ json: [] }) + return rota.fulfill({ status: 404, json: { status: 404, detail: `sem rota: ${pathname}` } }) + }) + + await page.goto('/') + return consultas +} + +test('painel usa os parâmetros e o RHC vigentes no fim do período da campanha (E2E-10)', async ({ + page, +}) => { + const consultas = await abrirPainel(page) + const fluxo = page.locator('section', { + has: page.getByRole('heading', { name: 'Fluxo estimado de turistas' }), + }) + await expect(fluxo.getByText(/registros e .* leitos/)).toBeVisible() + await expect(fluxo.getByText(/^Day use estimado em/)).toBeVisible() + + expect(consultas).toEqual( + expect.arrayContaining([ + { recurso: 'parametros-calculo', data: '2026-10-31' }, + { recurso: 'rhc', data: '2026-10-31' }, + ]), + ) + expect(consultas.every(({ data }) => data === '2026-10-31')).toBe(true) + await expect(fluxo.getByText('520 registros e 5.600 leitos')).toBeVisible() + await expect( + fluxo.getByText('Day use estimado em 18,40% do total, conforme a Estudo OTO 2026.'), + ).toBeVisible() +}) diff --git a/e2e/vigencias.spec.ts b/e2e/vigencias.spec.ts new file mode 100644 index 0000000..3c15937 --- /dev/null +++ b/e2e/vigencias.spec.ts @@ -0,0 +1,337 @@ +import { expect, test, type Page } from '@playwright/test' +import { abrirCadastro } from './navegacao.ts' +import { injetarSessao } from './sessao.ts' +import { ADMIN } from './fixtures/usuarios.ts' + +type Parametros = { + id: number + vigenteDesde: string + percentualDayUse: number + diasPermanenciaMedia: number + diasEmParques: number + gastoMedioDiario: number + gastoMedioIngresso: number + percentualMinimoLeitosPublicacao: number + fonte: string +} + +type Rhc = { + id: number + vigenteDesde: string + qtdRegistros: number + qtdUh: number + qtdLeitos: number + maxLeitosPorUh: number + leitosUteis: number +} + +const PARAMETROS_ANTIGOS: Parametros = { + id: 1, + vigenteDesde: '2024-01-01', + percentualDayUse: 15.15, + diasPermanenciaMedia: 4, + diasEmParques: 2, + gastoMedioDiario: 250, + gastoMedioIngresso: 105, + percentualMinimoLeitosPublicacao: 70, + fonte: 'Estudo OTO 2024', +} + +const RHC_ANTIGO: Rhc = { + id: 1, + vigenteDesde: '2024-01-01', + qtdRegistros: 100, + qtdUh: 200, + qtdLeitos: 600, + maxLeitosPorUh: 5, + leitosUteis: 600, +} + +type Estado = { + parametros: Parametros[] + rhc: Rhc[] + /** corpo e status que a API devolve na próxima gravação, uma única vez */ + recusaProxima?: { status: number; json: object } + enviados: { metodo: string; caminho: string; corpo: unknown }[] +} + +/** API em memória: as vigências mudam com o que a tela grava. */ +async function entrar(page: Page, estado: Estado) { + await injetarSessao(page) + await page.route('**/api/**', async (rota) => { + const pedido = rota.request() + const metodo = pedido.method() + const { pathname } = new URL(pedido.url()) + if (pathname === '/api/me') return rota.fulfill({ json: ADMIN }) + + const recurso = pathname.match(/^\/api\/(parametros-calculo|rhc)(?:\/(\d+|vigente))?$/) + if (!recurso) return rota.fulfill({ json: [] }) + const [, nome, sufixo] = recurso + const lista = (nome === 'rhc' ? estado.rhc : estado.parametros) as { id: number }[] + + if (metodo === 'GET' && sufixo === 'vigente') { + const ultima = estado.rhc.at(-1) + return ultima + ? rota.fulfill({ json: ultima }) + : rota.fulfill({ status: 404, json: { status: 404, detail: 'Sem vigência.' } }) + } + if (metodo === 'GET') return rota.fulfill({ json: lista }) + + estado.enviados.push({ + metodo, + caminho: pathname, + corpo: metodo === 'DELETE' ? null : pedido.postDataJSON(), + }) + if (estado.recusaProxima) { + const recusa = estado.recusaProxima + estado.recusaProxima = undefined + return rota.fulfill(recusa) + } + if (metodo === 'DELETE') { + lista.splice( + lista.findIndex(({ id }) => id === Number(sufixo)), + 1, + ) + return rota.fulfill({ status: 204 }) + } + const dados = pedido.postDataJSON() as Record + if (nome === 'rhc') { + dados.leitosUteis = ((dados.qtdUh as number) * (1 + (dados.maxLeitosPorUh as number))) / 2 + } + if (metodo === 'POST') { + const nova = { ...dados, id: lista.length + 10 } as { id: number } + lista.push(nova) + return rota.fulfill({ status: 201, json: nova }) + } + const indice = lista.findIndex(({ id }) => id === Number(sufixo)) + lista[indice] = { ...dados, id: Number(sufixo) } as { id: number } + return rota.fulfill({ json: lista[indice] }) + }) +} + +function novoEstado(): Estado { + return { parametros: [{ ...PARAMETROS_ANTIGOS }], rhc: [{ ...RHC_ANTIGO }], enviados: [] } +} + +async function abrirTelaDeCadastro(page: Page, tela: string, titulo: string) { + await page.goto('/') + await abrirCadastro(page, tela) + await expect(page.getByRole('heading', { level: 1, name: titulo })).toBeVisible() +} + +async function preencherParametros(dialogo: ReturnType, fonte: string) { + await dialogo.getByLabel('Vigente desde').fill('2026-01-01') + await dialogo.getByLabel('Índice de day use (%)').fill('16,5') + await dialogo.getByLabel('Permanência média (dias)').fill('5') + await dialogo.getByLabel('Dias de ingresso em parques').fill('3') + await dialogo.getByLabel('Gasto médio diário (R$)').fill('280,50') + await dialogo.getByLabel('Valor médio do ingresso (R$)').fill('110') + await dialogo.getByLabel('Mínimo de leitos para publicar (%)').fill('75') + await dialogo.getByLabel('Fonte').fill(fonte) +} + +test.describe('Parâmetros de cálculo', () => { + test('lista as vigências e inclui uma nova com números em vírgula', async ({ page }) => { + const estado = novoEstado() + await entrar(page, estado) + await abrirTelaDeCadastro(page, 'Parâmetros de cálculo', 'Parâmetros de cálculo') + + const antiga = page.getByRole('row', { name: /01\/01\/2024/ }) + await expect(antiga).toContainText('15,15%') + await expect(antiga).toContainText('4 dias') + await expect(antiga).toContainText('Estudo OTO 2024') + await expect(antiga).toContainText('Vigente') + + await page.getByRole('button', { name: 'Nova vigência' }).click() + const dialogo = page.getByRole('dialog', { name: 'Nova vigência: Parâmetros' }) + await preencherParametros(dialogo, 'Estudo OTO 2026') + await dialogo.getByRole('button', { name: 'Incluir vigência' }).click() + + await expect(page.getByRole('status')).toHaveText( + 'Parâmetros a partir de 01/01/2026 incluídos.', + ) + expect(estado.enviados).toEqual([ + { + metodo: 'POST', + caminho: '/api/parametros-calculo', + corpo: { + vigenteDesde: '2026-01-01', + percentualDayUse: 16.5, + diasPermanenciaMedia: 5, + diasEmParques: 3, + gastoMedioDiario: 280.5, + gastoMedioIngresso: 110, + percentualMinimoLeitosPublicacao: 75, + fonte: 'Estudo OTO 2026', + }, + }, + ]) + const nova = page.getByRole('row', { name: /01\/01\/2026/ }) + await expect(nova).toContainText('16,50%') + await expect(nova).toContainText('5 dias') + await expect(nova).toContainText('Estudo OTO 2026') + }) + + test('barra campos vazios e dias em parques acima da permanência sem chamar a API', async ({ + page, + }) => { + const estado = novoEstado() + await entrar(page, estado) + await abrirTelaDeCadastro(page, 'Parâmetros de cálculo', 'Parâmetros de cálculo') + + await page.getByRole('button', { name: 'Nova vigência' }).click() + const dialogo = page.getByRole('dialog', { name: 'Nova vigência: Parâmetros' }) + await dialogo.getByRole('button', { name: 'Incluir vigência' }).click() + await expect(dialogo.getByText('Preencha este campo.').first()).toBeVisible() + + await preencherParametros(dialogo, 'Estudo OTO 2026') + await dialogo.getByLabel('Dias de ingresso em parques').fill('9') + await dialogo.getByRole('button', { name: 'Incluir vigência' }).click() + await expect( + dialogo.getByText('Os dias em parques não podem passar a permanência média.'), + ).toBeVisible() + expect(estado.enviados).toHaveLength(0) + }) + + test('mostra no campo a recusa da API para uma data já cadastrada', async ({ page }) => { + const estado = novoEstado() + estado.recusaProxima = { + status: 422, + json: { status: 422, detail: 'Já existe uma vigência a partir desta data.' }, + } + await entrar(page, estado) + await abrirTelaDeCadastro(page, 'Parâmetros de cálculo', 'Parâmetros de cálculo') + + await page.getByRole('button', { name: 'Nova vigência' }).click() + const dialogo = page.getByRole('dialog', { name: 'Nova vigência: Parâmetros' }) + await preencherParametros(dialogo, 'Estudo OTO 2026') + await dialogo.getByRole('button', { name: 'Incluir vigência' }).click() + + await expect(dialogo.getByText('Já existe uma vigência a partir desta data.')).toBeVisible() + await expect(dialogo).toBeVisible() + }) + + test('corrige uma vigência e depois exclui', async ({ page }) => { + const estado = novoEstado() + await entrar(page, estado) + await abrirTelaDeCadastro(page, 'Parâmetros de cálculo', 'Parâmetros de cálculo') + + await page.getByRole('button', { name: 'Corrigir a vigência de 01/01/2024' }).click() + const correcao = page.getByRole('dialog', { name: 'Corrigir a vigência de 01/01/2024' }) + await expect(correcao.getByLabel('Fonte')).toHaveValue('Estudo OTO 2024') + await correcao.getByLabel('Fonte').fill('Estudo OTO 2024 revisado') + await correcao.getByRole('button', { name: 'Salvar correção' }).click() + + await expect(page.getByRole('status')).toHaveText( + 'Parâmetros a partir de 01/01/2024 corrigidos.', + ) + await expect(page.getByRole('row', { name: /01\/01\/2024/ })).toContainText( + 'Estudo OTO 2024 revisado', + ) + expect(estado.enviados[0]).toMatchObject({ + metodo: 'PUT', + caminho: '/api/parametros-calculo/1', + }) + + await page.getByRole('button', { name: 'Excluir a vigência de 01/01/2024' }).click() + const confirmacao = page.getByRole('dialog', { name: 'Excluir vigência' }) + await expect(confirmacao.getByRole('button', { name: 'Cancelar' })).toBeFocused() + await confirmacao.getByRole('button', { name: 'Excluir' }).click() + + await expect(page.getByRole('status')).toHaveText( + 'Parâmetros a partir de 01/01/2024 excluídos.', + ) + await expect(page.getByText('Nenhum parâmetro cadastrado')).toBeVisible() + }) + + test('vigência já usada em resultado publicado não é excluída e o erro aparece', async ({ + page, + }) => { + const estado = novoEstado() + estado.recusaProxima = { + status: 422, + json: { status: 422, detail: 'A vigência já foi usada em um resultado publicado.' }, + } + await entrar(page, estado) + await abrirTelaDeCadastro(page, 'Parâmetros de cálculo', 'Parâmetros de cálculo') + + await page.getByRole('button', { name: 'Excluir a vigência de 01/01/2024' }).click() + const confirmacao = page.getByRole('dialog', { name: 'Excluir vigência' }) + await confirmacao.getByRole('button', { name: 'Excluir' }).click() + + await expect(confirmacao.getByRole('alert')).toHaveText( + 'A vigência já foi usada em um resultado publicado.', + ) + await confirmacao.getByRole('button', { name: 'Cancelar' }).click() + await expect(page.getByRole('row', { name: /01\/01\/2024/ })).toBeVisible() + }) +}) + +test.describe('Hospedagem caseira (RHC)', () => { + test('mostra o total vigente, inclui uma vigência e atualiza a lista', async ({ page }) => { + const estado = novoEstado() + await entrar(page, estado) + await abrirTelaDeCadastro(page, 'Hospedagem caseira (RHC)', 'Hospedagem caseira (RHC)') + + await expect( + page.getByText('Vigente hoje, desde 01/01/2024: 100 imóveis e 600 leitos úteis no cálculo.'), + ).toBeVisible() + await expect(page.getByRole('row', { name: /01\/01\/2024/ })).toContainText('600') + + await page.getByRole('button', { name: 'Nova vigência' }).click() + const dialogo = page.getByRole('dialog', { name: 'Nova vigência: Totais do RHC' }) + await dialogo.getByLabel('Vigente desde').fill('2026-01-01') + await dialogo.getByLabel('Imóveis registrados').fill('120') + await dialogo.getByLabel('UH', { exact: true }).fill('240') + await dialogo.getByLabel('Leitos', { exact: true }).fill('700') + await dialogo.getByLabel('Máximo de pessoas por UH').fill('5') + await dialogo.getByRole('button', { name: 'Incluir vigência' }).click() + + await expect(page.getByRole('status')).toHaveText( + 'Totais do RHC a partir de 01/01/2026 incluídos.', + ) + expect(estado.enviados).toEqual([ + { + metodo: 'POST', + caminho: '/api/rhc', + corpo: { + vigenteDesde: '2026-01-01', + qtdRegistros: 120, + qtdUh: 240, + qtdLeitos: 700, + maxLeitosPorUh: 5, + }, + }, + ]) + await expect(page.getByRole('row', { name: /01\/01\/2026/ })).toContainText('720') + }) + + test('sem totais, avisa que o RHC fica fora do fluxo de turistas', async ({ page }) => { + const estado = novoEstado() + estado.rhc = [] + await entrar(page, estado) + await abrirTelaDeCadastro(page, 'Hospedagem caseira (RHC)', 'Hospedagem caseira (RHC)') + + await expect( + page.getByText('Não há totais vigentes hoje: o RHC fica fora do fluxo de turistas.'), + ).toBeVisible() + await expect(page.getByText('Nenhum total do RHC cadastrado')).toBeVisible() + }) + + test('barra o máximo de pessoas por UH acima do limite sem chamar a API', async ({ page }) => { + const estado = novoEstado() + await entrar(page, estado) + await abrirTelaDeCadastro(page, 'Hospedagem caseira (RHC)', 'Hospedagem caseira (RHC)') + + await page.getByRole('button', { name: 'Nova vigência' }).click() + const dialogo = page.getByRole('dialog', { name: 'Nova vigência: Totais do RHC' }) + await dialogo.getByLabel('Imóveis registrados').fill('120') + await dialogo.getByLabel('UH', { exact: true }).fill('240') + await dialogo.getByLabel('Leitos', { exact: true }).fill('700') + await dialogo.getByLabel('Máximo de pessoas por UH').fill('31') + await dialogo.getByRole('button', { name: 'Incluir vigência' }).click() + + await expect(dialogo.getByText('Use um valor até 30.')).toBeVisible() + expect(estado.enviados).toHaveLength(0) + }) +}) diff --git a/index.html b/index.html index 139b4ff..64c5ea0 100644 --- a/index.html +++ b/index.html @@ -3,6 +3,11 @@ + + Painel de indicadores do turismo | OTO diff --git a/lighthouse/servidor.mjs b/lighthouse/servidor.mjs new file mode 100644 index 0000000..9d54001 --- /dev/null +++ b/lighthouse/servidor.mjs @@ -0,0 +1,212 @@ +// Serve o build do Lighthouse (artifacts/lighthouse/build) e simula a API em /api, no mesmo endereço. +// As telas autenticadas recebem a sessão no index.html, como o addInitScript dos e2e. + +import { createServer } from 'node:http' +import { readFile } from 'node:fs/promises' +import { extname, join, normalize } from 'node:path' +import { gzipSync } from 'node:zlib' + +const PORTA = 4179 +const PASTA = join(import.meta.dirname, '..', 'artifacts', 'lighthouse', 'build') +const PUBLICAS = new Set(['/login', '/definir-senha']) + +const TIPOS = { + '.html': 'text/html; charset=utf-8', + '.js': 'text/javascript; charset=utf-8', + '.css': 'text/css; charset=utf-8', + '.json': 'application/json; charset=utf-8', + '.svg': 'image/svg+xml', + '.png': 'image/png', + '.ico': 'image/x-icon', + '.webp': 'image/webp', + '.woff2': 'font/woff2', + '.txt': 'text/plain; charset=utf-8', +} + +const SESSAO = `` + +const ADMIN = { id: 1, nome: 'Ana Souza', email: 'ana@oto.test', perfil: 'ADMIN', ativo: true } + +const TIPOS_HOSPEDAGEM = [ + { codigo: 'HOTEL', nome: 'Hotel', calculaReceita: true }, + { codigo: 'RESORT', nome: 'Resort', calculaReceita: true }, + { codigo: 'POUSADA', nome: 'Pousada', calculaReceita: true }, +] + +const PUBLICADAS = [ + { + campanhaId: 15, + nome: 'Agosto de 2026', + modalidade: 'CONSOLIDADA', + tipoPeriodo: 'MENSAL', + periodoInicio: '2026-08-01', + periodoFim: '2026-08-31', + publicadaEm: '2026-09-18T12:00:00Z', + }, + { + campanhaId: 13, + nome: 'Julho de 2026', + modalidade: 'CONSOLIDADA', + tipoPeriodo: 'MENSAL', + periodoInicio: '2026-07-01', + periodoFim: '2026-07-31', + publicadaEm: '2026-08-12T12:00:00Z', + }, +] + +function resultado(campanha, taxaOcupacao) { + return { + campanha: { id: campanha.campanhaId, ...campanha, qtdDiarias: 31, publicada: true }, + publicado: true, + taxaOcupacao, + faixa: { codigo: 'OTIMA', nome: 'Ótima' }, + qtdMh: 72, + qtdMhRespondentes: 58, + percentualMhRespondentes: 80.6, + percentualLeitosRespondentes: 91.4, + fluxoMh: 365_620, + fluxoRhc: 55_795, + fluxoDayUse: 75_245, + fluxoTotal: 496_660, + fluxoMedioDiario: 16_021, + diariaMedia: 765, + receitaHospedagem: 89_000_000, + porTipo: [ + { + tipoHospedagemCodigo: 'RESORT', + nome: 'Resort', + qtdMh: 9, + qtdUh: 4_643, + taxaOcupacao: 66, + diariaMedia: 836, + revpar: 552, + receitaEstimada: 79_400_000, + }, + { + tipoHospedagemCodigo: 'POUSADA', + nome: 'Pousada', + qtdMh: 41, + qtdUh: 635, + taxaOcupacao: 48, + diariaMedia: 478, + revpar: 229, + receitaEstimada: 4_500_000, + }, + ], + distribuicaoFaixas: [{ codigo: 'OTIMA', nome: 'Ótima', percentualMinimo: 61, qtdMh: 21 }], + } +} + +const API = { + '/api/me': ADMIN, + '/api/referencias': { tiposHospedagem: TIPOS_HOSPEDAGEM, faixasOcupacao: [] }, + '/api/campanhas/publicadas': PUBLICADAS, + '/api/campanhas/15/resultado': resultado(PUBLICADAS[0], 62.8), + '/api/campanhas/13/resultado': resultado(PUBLICADAS[1], 51.3), + '/api/dashboard/serie-mensal': { + indicador: 'TAXA_OCUPACAO', + anos: [{ ano: 2026, meses: [{ mes: 8, valor: 62.8 }] }], + }, + '/api/dashboard/feriados': [], + '/api/rodadas': [], + '/api/rhc/vigente': { qtdRegistros: 478, qtdLeitos: 5116 }, + '/api/parametros-calculo/vigente': { + id: 1, + vigenteDesde: '2025-01-01', + percentualDayUse: 15.15, + diasEmParques: 2, + gastoMedioIngresso: 105, + diasPermanenciaMedia: 4, + gastoMedioDiario: 250, + percentualMinimoLeitosPublicacao: 70, + fonte: 'Estudo OTO 2025', + }, + '/api/usuarios': [ + ADMIN, + { id: 2, nome: 'Vera Lima', email: 'vera@oto.test', perfil: 'VISUALIZADOR', ativo: true }, + { + id: 3, + nome: 'Paulo Reis', + email: 'paulo@oto.test', + perfil: 'PARCEIRO', + ativo: true, + estabelecimentos: [{ id: 12, nomeFantasia: 'Hotel Exemplo' }], + }, + ], + '/api/estabelecimentos': [ + { + id: 12, + nomeFantasia: 'Hotel Exemplo', + tipoHospedagemCodigo: 'HOTEL', + situacao: 'REGULAR', + ativo: true, + qtdUh: 40, + qtdLeitos: 120, + }, + ], +} + +// Comprime como a Vercel, para o Lighthouse medir o que o usuário recebe. +function enviar(pedido, resposta, status, cabecalhos, corpo) { + const comprimir = /\bgzip\b/.test(pedido.headers['accept-encoding'] ?? '') + resposta.writeHead(status, comprimir ? { ...cabecalhos, 'content-encoding': 'gzip' } : cabecalhos) + resposta.end(comprimir ? gzipSync(corpo) : corpo) +} + +const semCache = (tipo) => ({ 'content-type': tipo, 'cache-control': 'no-cache' }) + +async function arquivo(caminho) { + const relativo = normalize(caminho).replace(/^(\.\.[/\\])+/, '') + try { + return { corpo: await readFile(join(PASTA, relativo)), tipo: TIPOS[extname(relativo)] } + } catch { + return null + } +} + +createServer(async (pedido, resposta) => { + const { pathname } = new URL(pedido.url, `http://localhost:${PORTA}`) + + if (pathname.startsWith('/api/')) { + if (pathname in API) { + return enviar(pedido, resposta, 200, semCache(TIPOS['.json']), JSON.stringify(API[pathname])) + } + const rota = `${pedido.method} ${pathname}`.replaceAll(/[\r\n]/g, '') + console.error(`sem rota simulada: ${rota}`) + return enviar( + pedido, + resposta, + 404, + semCache(TIPOS['.json']), + JSON.stringify({ detail: 'sem rota' }), + ) + } + + const estatico = extname(pathname) ? await arquivo(pathname) : null + if (estatico) { + return enviar( + pedido, + resposta, + 200, + { + 'content-type': estatico.tipo ?? 'application/octet-stream', + 'cache-control': pathname.startsWith('/assets/') + ? 'public, max-age=31536000, immutable' + : 'no-cache', + }, + estatico.corpo, + ) + } + if (extname(pathname)) + return enviar(pedido, resposta, 404, semCache(TIPOS['.txt']), 'não encontrado') + + const indice = await arquivo('index.html') + const html = indice.corpo.toString('utf-8') + enviar( + pedido, + resposta, + 200, + semCache(TIPOS['.html']), + PUBLICAS.has(pathname) ? html : html.replace('', `${SESSAO}`), + ) +}).listen(PORTA, () => console.log(`servidor do Lighthouse pronto em http://localhost:${PORTA}`)) diff --git a/lighthouserc.cjs b/lighthouserc.cjs new file mode 100644 index 0000000..d459a03 --- /dev/null +++ b/lighthouserc.cjs @@ -0,0 +1,46 @@ +// Lighthouse CI: `npm run lighthouse` (celular) ou `LHCI_PERFIL=desktop npm run lighthouse`. +// O servidor de lighthouse/servidor.mjs serve o build e simula a API. + +const path = require('node:path') + +const perfil = process.env.LHCI_PERFIL === 'desktop' ? 'desktop' : 'celular' +const base = 'http://localhost:4179' + +// Medidos em 22/11/2026, com folga para a variação entre execuções. +const limites = + perfil === 'desktop' + ? { desempenho: 0.9, lcp: 1500, tbt: 200 } + : { desempenho: 0.75, lcp: 3500, tbt: 600 } + +const paginas = ['/login', '/definir-senha?token=x', '/', '/metodologia', '/cadastros/usuarios'] + +module.exports = { + ci: { + collect: { + startServerCommand: `node ${path.join(__dirname, 'lighthouse/servidor.mjs')}`, + startServerReadyPattern: 'pronto', + url: paginas.map((pagina) => `${base}${pagina}`), + numberOfRuns: 2, + chromePath: process.env.CHROME_PATH || undefined, + settings: { + ...(perfil === 'desktop' ? { preset: 'desktop' } : {}), + chromeFlags: '--no-sandbox --headless=new', + }, + }, + assert: { + assertions: { + 'categories:accessibility': ['error', { minScore: 0.95 }], + 'categories:best-practices': ['error', { minScore: 0.95 }], + 'categories:performance': ['warn', { minScore: limites.desempenho }], + 'categories:seo': ['warn', { minScore: 0.9 }], + 'largest-contentful-paint': ['warn', { maxNumericValue: limites.lcp }], + 'cumulative-layout-shift': ['warn', { maxNumericValue: 0.1 }], + 'total-blocking-time': ['warn', { maxNumericValue: limites.tbt }], + }, + }, + upload: { + target: 'filesystem', + outputDir: path.join(__dirname, 'artifacts/lighthouse/reports', perfil), + }, + }, +} diff --git a/package-lock.json b/package-lock.json index 51f51df..32358e7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,8 @@ "react-router": "^8.5.1" }, "devDependencies": { + "@axe-core/playwright": "^4.14.0", + "@lhci/cli": "^0.16.1", "@playwright/test": "^1.65.1", "@testing-library/dom": "^10.4.2", "@testing-library/jest-dom": "^7.0.1", @@ -28,6 +30,7 @@ "@types/react": "^19.3.0", "@types/react-dom": "^19.3.0", "@vitejs/plugin-react": "^6.1.2", + "@vitest/coverage-v8": "^5.1.1", "axe-core": "^4.14.0", "jsdom": "^30.1.3", "oxlint": "^1.89.0", @@ -77,6 +80,22 @@ "node": "^22.22.2 || ^24.15.0 || >=26.0.0" } }, + "node_modules/@axe-core/playwright": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/@axe-core/playwright/-/playwright-4.14.0.tgz", + "integrity": "sha512-SGUhG5PIHd2eMdpgBF2PyQLOhX+qyDR2PT4cmoS4Qk2ak+jX/rrSvst9l0PGv5WTHolKpUMvVmoHpr4cZgf1RQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "axe-core": "~4.14.0" + }, + "engines": { + "node": ">=22.12.0" + }, + "peerDependencies": { + "playwright-core": ">= 1.0.0" + } + }, "node_modules/@babel/code-frame": { "version": "7.29.7", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", @@ -92,6 +111,16 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.15", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.15.tgz", + "integrity": "sha512-C2FuapQ2Kh1OnVHAoLi5rD3GBJ8COb9Q609T6HEpLqaBAo560PDP5OxBE5dCI/h951MBO/+bCUYU5SZ+8ZlV+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-validator-identifier": { "version": "7.29.7", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", @@ -102,6 +131,22 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/parser": { + "version": "7.29.15", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.15.tgz", + "integrity": "sha512-RpKWyisHoP81twtSCgmE02iU0RnPcq1DN5bBEbpUePrjA9Q3wXhufnCJrrayPpoZieqFh3zyZQqwtSK0gGccRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.15" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@babel/runtime": { "version": "7.29.10", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.10.tgz", @@ -112,6 +157,30 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/types": { + "version": "7.29.15", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.15.tgz", + "integrity": "sha512-/XKpKDakL//LZ66bq1XsZOswuqeI5MZqPLDu18o3XdkU1fNJ7bdPtzgnc4ZNS+bBGHV0FJG8jjb8SwcC3nNVQQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.15", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-1.0.2.tgz", + "integrity": "sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/@bramus/specificity": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/@bramus/specificity/-/specificity-2.4.3.tgz", @@ -310,10 +379,112 @@ "url": "https://github.com/sponsors/ayuhito" } }, + "node_modules/@formatjs/ecma402-abstract": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-2.3.6.tgz", + "integrity": "sha512-HJnTFeRM2kVFVr5gr5kH1XP6K0JcJtE7Lzvtr3FS/so5f1kpsqqqxy5JF+FRaO6H2qmcMfAUIox7AJteieRtVw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@formatjs/fast-memoize": "2.2.7", + "@formatjs/intl-localematcher": "0.6.2", + "decimal.js": "^10.4.3", + "tslib": "^2.8.0" + } + }, + "node_modules/@formatjs/fast-memoize": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/@formatjs/fast-memoize/-/fast-memoize-2.2.7.tgz", + "integrity": "sha512-Yabmi9nSvyOMrlSeGGWDiH7rf3a7sIwplbvo/dlz9WCIjzIQAfy1RMf4S0X3yG724n5Ghu2GmEl5NJIV6O9sZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.8.0" + } + }, + "node_modules/@formatjs/icu-messageformat-parser": { + "version": "2.11.4", + "resolved": "https://registry.npmjs.org/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.11.4.tgz", + "integrity": "sha512-7kR78cRrPNB4fjGFZg3Rmj5aah8rQj9KPzuLsmcSn4ipLXQvC04keycTI1F7kJYDwIXtT2+7IDEto842CfZBtw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@formatjs/ecma402-abstract": "2.3.6", + "@formatjs/icu-skeleton-parser": "1.8.16", + "tslib": "^2.8.0" + } + }, + "node_modules/@formatjs/icu-skeleton-parser": { + "version": "1.8.16", + "resolved": "https://registry.npmjs.org/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.8.16.tgz", + "integrity": "sha512-H13E9Xl+PxBd8D5/6TVUluSpxGNvFSlN/b3coUp0e0JpuWXXnQDiavIpY3NnvSp4xhEMoXyyBvVfdFX8jglOHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@formatjs/ecma402-abstract": "2.3.6", + "tslib": "^2.8.0" + } + }, + "node_modules/@formatjs/intl-localematcher": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.6.2.tgz", + "integrity": "sha512-XOMO2Hupl0wdd172Y06h6kLpBz6Dv+J4okPLl4LPtzbr8f66WbIoy4ev98EBuZ6ZK4h5ydTN6XneT4QVpD7cdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.8.0" + } + }, + "node_modules/@inquirer/external-editor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.3.tgz", + "integrity": "sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chardet": "^2.1.1", + "iconv-lite": "^0.7.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/external-editor/node_modules/iconv-lite": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.3.tgz", + "integrity": "sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/@isaacs/nonrecursive-glob-match": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@isaacs/nonrecursive-glob-match/-/nonrecursive-glob-match-1.1.0.tgz", + "integrity": "sha512-GPm/Dbvk5RLmhRnxXIa7nTpK0xtl4E0wj0MslsuNiJ1FIROU+2+9lgUC/dgF7Ey4QCWhfEsgxilMRMCdHPfDfw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.3.tgz", + "integrity": "sha512-lhTtjtoEArWBjismtfS761S9Hlyn+nIZqOZVYoZ1Xn82PMNMVnk+jj/NhC4fAXGTs7ydONcJiR5vyQBTMDu27g==", "dev": true, "license": "MIT", "engines": { @@ -338,20 +509,66 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@oxc-project/types": { - "version": "0.156.0", - "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.156.0.tgz", - "integrity": "sha512-1Duyg48TdJNdyhEB8Xn1L36bT9Pv6GUtlKjHxOys8xkaF/rQq3XJE+bAurSK/AgIz5mGFsb77cn9Pb20+WCScw==", + "node_modules/@lhci/cli": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@lhci/cli/-/cli-0.16.1.tgz", + "integrity": "sha512-Vh3z9Xkcs4ULrl62NTF9a+c9HL9teyD+dq3TueG4p4oo9ypYbPBb3Ht4YvxHzOyr31rFaiuHqdphpnVZs5SXQw==", "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/oxc-project" + "license": "Apache-2.0", + "dependencies": { + "@lhci/utils": "0.16.1", + "chrome-launcher": "^0.13.4", + "compression": "^1.8.2", + "debug": "^4.4.3", + "express": "^4.22.3", + "inquirer": "^8.2.7", + "isomorphic-fetch": "^3.0.0", + "lighthouse": "13.6.0", + "lighthouse-logger": "1.2.0", + "open": "^8.4.2", + "proxy-agent": "^8.0.2", + "uuid": "^14.0.3", + "yargs": "^15.4.1", + "yargs-parser": "^13.1.2" + }, + "bin": { + "lhci": "src/cli.js" + }, + "engines": { + "node": ">=22.19.0" } }, - "node_modules/@oxlint/binding-android-arm-eabi": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.90.0.tgz", - "integrity": "sha512-sgfalb1HuxYjiAa4wESZ626z1FGusqNcXYHyB5oIOEprS2sbPg0UYEfo83uF1GNG70DIfZxHkXuE6KFrlSdn8Q==", + "node_modules/@lhci/utils": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@lhci/utils/-/utils-0.16.1.tgz", + "integrity": "sha512-+hiBITsPkxtMnHJLuL7K6I3DPzanfsfPoBobj24ThdcB/eqgkuqjyXU6PmujObPofx1fWNxMJFq2LdHabzgDAA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "debug": "^4.4.3", + "isomorphic-fetch": "^3.0.0", + "js-yaml": "^5.5.0", + "lighthouse": "13.6.0", + "tree-kill": "^1.2.2" + }, + "engines": { + "node": ">=22.19.0" + } + }, + "node_modules/@opentelemetry/api": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.10.0.tgz", + "integrity": "sha512-lMkyes8iHrG+mk6WH7X70MdCLI2RS0FwNBY1PyQ8UemaijE2m5mv5A0Niy3HtbYTFrgkUEQjFMXmSAk2hQDuPQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@oxc-parser/binding-android-arm-eabi": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-android-arm-eabi/-/binding-android-arm-eabi-0.152.0.tgz", + "integrity": "sha512-393VtirINkae4XHBTkq/yQxhOwEr4V+r0et37P2fp+sYZSdYgZTRDPo5Um8vBh0QjMZ+RmaMy4PP0qwr4cTMwA==", "cpu": [ "arm" ], @@ -365,10 +582,10 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@oxlint/binding-android-arm64": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm64/-/binding-android-arm64-1.90.0.tgz", - "integrity": "sha512-RcKhz1ETMq+fazE9TKS2+5NIRGwigm/nW8egqF0LI+A8Yw2iW5r0E/C3XAPRiwIm/vcPiutIRIa6IQCIKhZsTQ==", + "node_modules/@oxc-parser/binding-android-arm64": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-android-arm64/-/binding-android-arm64-0.152.0.tgz", + "integrity": "sha512-iYFcExATJNZ0rZj0o02THbD1Nc9jAW0nVgIQPee6ejbSASpbZXlIMw8jxtpzaG14JQTWwGSZ6U5dEtRJXE6V3Q==", "cpu": [ "arm64" ], @@ -382,10 +599,10 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@oxlint/binding-darwin-arm64": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.90.0.tgz", - "integrity": "sha512-PSrxMvP6mx+p1karZcUxLdy9lpaP+JWQPti4al9FgTaPhxE+pT/BjhGExloVVSWgZgIfOlLOjVyyq8BXlodhLQ==", + "node_modules/@oxc-parser/binding-darwin-arm64": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-darwin-arm64/-/binding-darwin-arm64-0.152.0.tgz", + "integrity": "sha512-fnU+DfUzi5/rFy0LzmipYRz06PAUUkOS8kCJQ3Eg6oqlunC1XZXoffFqxmdL51RmcbYtUG3P8DVG1U5fckoa2A==", "cpu": [ "arm64" ], @@ -399,10 +616,10 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@oxlint/binding-darwin-x64": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.90.0.tgz", - "integrity": "sha512-OLbU9qsrV2Q8QxT2OEzOPdO8zCCpyI8qB+hDI8yr6RsYELtkf0FAZhJdfjM/RnLHKzt44HWwAPnk92vBtKofvw==", + "node_modules/@oxc-parser/binding-darwin-x64": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-darwin-x64/-/binding-darwin-x64-0.152.0.tgz", + "integrity": "sha512-Y3U2okryWTs7hDld6UhjJwLNf8/do+x4g4C+1U5SiGwrTLwbO83WJYJA8+l9iFSilWBgnfpd/+U76tfeNxUHzA==", "cpu": [ "x64" ], @@ -416,10 +633,10 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@oxlint/binding-freebsd-x64": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.90.0.tgz", - "integrity": "sha512-fBA4pWyVDARmNucQqpyFuPC49xYf1r+sX7dxPL5fNPQrSMLum39Sn56tZ9JPleWC7FzLPwSQ7plYYfirYBHF8A==", + "node_modules/@oxc-parser/binding-freebsd-x64": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-freebsd-x64/-/binding-freebsd-x64-0.152.0.tgz", + "integrity": "sha512-XkhkRrrPffEw+ZLv/d/5pEni0buxinm/E/N6fLbJCunD1DBbeCTtVP23ESV+4CWCWdSz397asks1ViGslpmWiQ==", "cpu": [ "x64" ], @@ -433,10 +650,10 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@oxlint/binding-linux-arm-gnueabihf": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.90.0.tgz", - "integrity": "sha512-zhxH78eP2nR6/pGdhBc7MIfjhhcgATeu8fkmkFJbuzfk6Cj0FzBxyEhL85yDqrCybjx+G2YDzZGsxIO9kvO4Iw==", + "node_modules/@oxc-parser/binding-linux-arm-gnueabihf": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-0.152.0.tgz", + "integrity": "sha512-MLzsRRbdfmdzo6JEhbC1yKU9ItfvM8tEf18HM32jCiNYZEz6J3bRBRl3cTkKR0vBdrk9ZVlcARXtwHccs+epDA==", "cpu": [ "arm" ], @@ -450,10 +667,10 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@oxlint/binding-linux-arm-musleabihf": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.90.0.tgz", - "integrity": "sha512-MvYmpHyJqUJjEvkZbJHdwfdL45cGn8EVBkYmoXFiaYFW9suoD3dbJl5mBdpy0DVgdjlyddmldbRtk3cCgETadQ==", + "node_modules/@oxc-parser/binding-linux-arm-musleabihf": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-0.152.0.tgz", + "integrity": "sha512-HHerTEJz7Iy10Ji6BGsk4gqG6PU0UzFuBu91jIEOX89FnrI5ECWSEr7BLpkYQhp7U0QFtMnBhNfQKI0hYZK78w==", "cpu": [ "arm" ], @@ -467,14 +684,17 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@oxlint/binding-linux-arm64-gnu": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.90.0.tgz", - "integrity": "sha512-L13Sy+Kg0nZhwTsToniqjUFPA2TuM6962qCZ5Wp5KeB517Tw7ApdLTTtlb+bF86fcZZa2EtvCVvAJxk4Dya/MQ==", + "node_modules/@oxc-parser/binding-linux-arm64-gnu": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.152.0.tgz", + "integrity": "sha512-9Bb8GyzZ2uSLzRDZ27usaKokr07mxiBe2dDF5b6bd2janmaJTT1gL51UfP7AU30yFiXrJvcRyFKREAgKwZYs0w==", "cpu": [ "arm64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -484,14 +704,17 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@oxlint/binding-linux-arm64-musl": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.90.0.tgz", - "integrity": "sha512-wFDdZWGpzIPFdJFjSLWnKB0TGzFriTKUIrl04iMqMyM9BBIJTuerfCHYa0WpDSjr5x3lcW/CHLyacSt886WpGg==", + "node_modules/@oxc-parser/binding-linux-arm64-musl": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.152.0.tgz", + "integrity": "sha512-om7iDMUroI74A/lfRRWY9/Ev3VWrVsrUZ4tyvyh8raBey/sdcfyAD7tYWc+iykAiotnmftyKTpUKFr1QnaBrAQ==", "cpu": [ "arm64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -501,14 +724,17 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@oxlint/binding-linux-ppc64-gnu": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.90.0.tgz", - "integrity": "sha512-FRywfn+MoKn8xpBSzgNwNVliSKRI2QXkxi/iF7o6FEQs8Bh8z2RpVTaFAcO3pchXjvB2eGNFIoLLQABIQ+u7VA==", + "node_modules/@oxc-parser/binding-linux-ppc64-gnu": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-0.152.0.tgz", + "integrity": "sha512-Lf1OL2lMTqwDMFC6jnRb30B+WYHKV0XT+bPHcFM6xHtNVwxpobiTzUIvKH6a0LWpvfwyru8Yu6zCGHqqFHH+gg==", "cpu": [ "ppc64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -518,14 +744,17 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@oxlint/binding-linux-riscv64-gnu": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.90.0.tgz", - "integrity": "sha512-IS2PaUgpc/qeLADTyhUNmdx3x4ijs9pjJdPKBYHaT+mAE7k3FsjnHPTjhpsak1b++h6CIPhv6WX9Z+y7Pw0voQ==", + "node_modules/@oxc-parser/binding-linux-riscv64-gnu": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-0.152.0.tgz", + "integrity": "sha512-BYWSMQK+YJ9ZILStPcmmiSVq8KEG9Qdq/c4BHPC3rUEq/fEDCVjUIwdj5ZzjgZ9P9is9PKu0tcAXzq1ZXg4urQ==", "cpu": [ "riscv64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -535,14 +764,17 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@oxlint/binding-linux-riscv64-musl": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.90.0.tgz", - "integrity": "sha512-s7JFKRkGS8O7i2ZVODfuO++NC7sH6HDqpMn8lYxw91w0SXJOxnAVjQ8utvmDwLMMT0jaSkuOKuUYJDGDtu4sHQ==", + "node_modules/@oxc-parser/binding-linux-riscv64-musl": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-0.152.0.tgz", + "integrity": "sha512-d2LqHNNNqdH185sRK5dPKWZu201JrNu9/CRFuVEuT+ht7n/QaVblEMWT9MALQPrDWYvhG10P+NSKJFquDWZ09w==", "cpu": [ "riscv64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -552,14 +784,17 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@oxlint/binding-linux-s390x-gnu": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.90.0.tgz", - "integrity": "sha512-b0GxrOQr5VONCkd7KLSqmP6b6nqZuTpuS8QPQHzltmqdXP5bY0Jl0CZ0QmlCTrS3ExaLYbioFYOARzNbYvcApQ==", + "node_modules/@oxc-parser/binding-linux-s390x-gnu": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-0.152.0.tgz", + "integrity": "sha512-8gBeHt5rA/8+pKhHl+zLggfa3L/V/L2at96p7ty6pBE7id6lFO19nFUc15u2PcjC4OYeYK465MKy1fhhbpFIGw==", "cpu": [ "s390x" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -569,14 +804,17 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@oxlint/binding-linux-x64-gnu": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.90.0.tgz", - "integrity": "sha512-iaJeShJtgUp8rZbt9YUdTAGOpmX5KogCLba17Jp1tWdJ3F4M3D2g2TKUyI1FMTHxKH9NNHuQcuC2kZRg6IV7yQ==", + "node_modules/@oxc-parser/binding-linux-x64-gnu": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.152.0.tgz", + "integrity": "sha512-ltgrSF6L+yPTVsIdaAyqKq3zTqzj/1VlNbxWZuxAe8flR3sWdyNsKvdXukoO8/ucJbLickhmieRBge+o/e8Ugw==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -586,14 +824,17 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@oxlint/binding-linux-x64-musl": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.90.0.tgz", - "integrity": "sha512-/aZoXnL5WBLCXuzfHqvEFXcm4iwYmr/cYByHDTXzLFzJdE5DC7bm6phpWqHv6BeqpVgY9IpBAxGDv2WEkl5JCg==", + "node_modules/@oxc-parser/binding-linux-x64-musl": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-x64-musl/-/binding-linux-x64-musl-0.152.0.tgz", + "integrity": "sha512-LcMp6BvrBnewSfdkLHoSqidhoAq4syKOTBV5TYHWd+2VnGkfD/nPRRVIzTBt/Lkbt7pfOFDGtkiTntFS0p6sQQ==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -603,10 +844,10 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@oxlint/binding-openharmony-arm64": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.90.0.tgz", - "integrity": "sha512-SMhk7ozwoxYDKfYqGZCQEfULOKDneF9uhaoIf2neoDLWvNtjY9yVeL7YHmE5L9WdKvMpWNwwZxhenxBu6AgfOg==", + "node_modules/@oxc-parser/binding-openharmony-arm64": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-openharmony-arm64/-/binding-openharmony-arm64-0.152.0.tgz", + "integrity": "sha512-jbhoMCslVxzRCRNQ8TSHxjYdSKRvk8O6ciLVDkahJvmyHDzBqba/bMQHM6ULKj/rgHNNbSzlIiakdx8SEfkJzA==", "cpu": [ "arm64" ], @@ -620,10 +861,10 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@oxlint/binding-win32-arm64-msvc": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.90.0.tgz", - "integrity": "sha512-KBvR3A9fO7fCi2vCP8ifWvlia7tGEQV9NaYh+IGwa/7Groy48Mt/UaYqMK9/zOtAWl20BUCf6RPqzJ32fRw33Q==", + "node_modules/@oxc-parser/binding-win32-arm64-msvc": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-0.152.0.tgz", + "integrity": "sha512-JZYVlhv36mr/nertnRB7vchJECOBb1Lz6lltalILsB+o9M/is+H6BEDRLQKdqA4JKs6NjJszo46+iM5sfwj6jQ==", "cpu": [ "arm64" ], @@ -637,10 +878,10 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@oxlint/binding-win32-ia32-msvc": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.90.0.tgz", - "integrity": "sha512-+x42rDHQGbTCuT3EzpWAzhP3NoVPE/cJsG4gnrakOSg0olV+GCdMpPU23Nvrl3zZMnXxFZdTtDv4D3SuaA5ZeQ==", + "node_modules/@oxc-parser/binding-win32-ia32-msvc": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-0.152.0.tgz", + "integrity": "sha512-1X9oganvVsunRH0lH10UU05N+H9atpX6WsOybByUjwnfcd3h/0tYwvuv16XuHglrIUOnxV2TodbLVEwwafd64g==", "cpu": [ "ia32" ], @@ -654,10 +895,10 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@oxlint/binding-win32-x64-msvc": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.90.0.tgz", - "integrity": "sha512-30JiaFEBUB9peEOcvVM8ggo88SoN/IdSr9DW505JdBji/R6dM66gKEiG65hw6qcaF2f4mO0cEJ+RwRZprmun9g==", + "node_modules/@oxc-parser/binding-win32-x64-msvc": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-win32-x64-msvc/-/binding-win32-x64-msvc-0.152.0.tgz", + "integrity": "sha512-sw0M80/dn9rcpu+Rqqph/C+MjvDDce6MlXmFjsNQtPEymha0eJy3ml6+foSUTqFfpDIDyHZZ4eoJ43IoMe8bJw==", "cpu": [ "x64" ], @@ -671,32 +912,20 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@playwright/test": { - "version": "1.65.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.65.1.tgz", - "integrity": "sha512-y+NCIRm2LvY4slUVWvGh1nujJ8RF/hEisIsq2mtUPgdQC4L701bq5hZGMhrpeXjACvwvO9tj5dJqhvM6TP9lbw==", + "node_modules/@oxc-project/types": { + "version": "0.156.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.156.0.tgz", + "integrity": "sha512-1Duyg48TdJNdyhEB8Xn1L36bT9Pv6GUtlKjHxOys8xkaF/rQq3XJE+bAurSK/AgIz5mGFsb77cn9Pb20+WCScw==", "dev": true, - "license": "Apache-2.0", - "dependencies": { - "playwright": "1.65.1" - }, - "bin": { - "playwright": "cli.js" - }, - "engines": { - "node": ">=20" + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/oxc-project" } }, - "node_modules/@remix-run/route-pattern": { - "version": "0.22.1", - "resolved": "https://registry.npmjs.org/@remix-run/route-pattern/-/route-pattern-0.22.1.tgz", - "integrity": "sha512-czdGJWh09Lapvcqt7Vb09KlrU2PhRJ8xQaI+AItTuD9aDJ5MAgxnS38lnys6Ll+6RJEqPiaUqTwIQhVLwFvv+w==", - "license": "MIT" - }, - "node_modules/@rolldown/binding-android-arm-eabi": { - "version": "1.2.16", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.16.tgz", - "integrity": "sha512-ia3DwAs0OsMGS7+IConptSiyk9pEXkOx/AbJ2n/lAGxH3QkWQus1t8d7gnAT38FCU2sQu8lUbeR6AiZFv4JxaA==", + "node_modules/@oxlint/binding-android-arm-eabi": { + "version": "1.90.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.90.0.tgz", + "integrity": "sha512-sgfalb1HuxYjiAa4wESZ626z1FGusqNcXYHyB5oIOEprS2sbPg0UYEfo83uF1GNG70DIfZxHkXuE6KFrlSdn8Q==", "cpu": [ "arm" ], @@ -710,10 +939,10 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@rolldown/binding-android-arm64": { - "version": "1.2.16", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.16.tgz", - "integrity": "sha512-kx5wBiMB6E7TEvpl2B9gjLU004BkvEm2Dr941BFjx/SontPwSzNuQUIoVKxHHoSjpFIfHMmcguyLOtyn0hObRg==", + "node_modules/@oxlint/binding-android-arm64": { + "version": "1.90.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm64/-/binding-android-arm64-1.90.0.tgz", + "integrity": "sha512-RcKhz1ETMq+fazE9TKS2+5NIRGwigm/nW8egqF0LI+A8Yw2iW5r0E/C3XAPRiwIm/vcPiutIRIa6IQCIKhZsTQ==", "cpu": [ "arm64" ], @@ -727,10 +956,10 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@rolldown/binding-darwin-arm64": { - "version": "1.2.16", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.16.tgz", - "integrity": "sha512-qslZrXnKJU4cUpjoAmtAo/KQM9e2IRMlmpig6Zpwj+8KWxW8v+nkAf9216Bsek9lOC1jvg2yCjygCFo2f83msQ==", + "node_modules/@oxlint/binding-darwin-arm64": { + "version": "1.90.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.90.0.tgz", + "integrity": "sha512-PSrxMvP6mx+p1karZcUxLdy9lpaP+JWQPti4al9FgTaPhxE+pT/BjhGExloVVSWgZgIfOlLOjVyyq8BXlodhLQ==", "cpu": [ "arm64" ], @@ -744,10 +973,10 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@rolldown/binding-darwin-x64": { - "version": "1.2.16", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.16.tgz", - "integrity": "sha512-FdF+y48ND13eAyM2mQn+85kvAqNlvRWROy2rhgA463X/0Gv4vGtazZtfaF1mRBLscYvtOlh4QnLjOWiFzX69OQ==", + "node_modules/@oxlint/binding-darwin-x64": { + "version": "1.90.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.90.0.tgz", + "integrity": "sha512-OLbU9qsrV2Q8QxT2OEzOPdO8zCCpyI8qB+hDI8yr6RsYELtkf0FAZhJdfjM/RnLHKzt44HWwAPnk92vBtKofvw==", "cpu": [ "x64" ], @@ -761,10 +990,10 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@rolldown/binding-freebsd-x64": { - "version": "1.2.16", - "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.16.tgz", - "integrity": "sha512-ddjqFM5e95AgLbUPtKIS7V1KTVlA0RUgCVr5mn+/IEhsdy3pr+Vuj/HZ7nlMN2FyxIwUktOH1LEPIQXO1v9y1Q==", + "node_modules/@oxlint/binding-freebsd-x64": { + "version": "1.90.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.90.0.tgz", + "integrity": "sha512-fBA4pWyVDARmNucQqpyFuPC49xYf1r+sX7dxPL5fNPQrSMLum39Sn56tZ9JPleWC7FzLPwSQ7plYYfirYBHF8A==", "cpu": [ "x64" ], @@ -778,10 +1007,10 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@rolldown/binding-linux-arm-gnueabihf": { - "version": "1.2.16", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.16.tgz", - "integrity": "sha512-tHdKWbFkFBI687iim3LIyIvyL7j66VvQYkDPss5Stn/qyE2tWkR1YD0dXmXPFKKqT/o5ZEJVsaRsWS2meQwGOA==", + "node_modules/@oxlint/binding-linux-arm-gnueabihf": { + "version": "1.90.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.90.0.tgz", + "integrity": "sha512-zhxH78eP2nR6/pGdhBc7MIfjhhcgATeu8fkmkFJbuzfk6Cj0FzBxyEhL85yDqrCybjx+G2YDzZGsxIO9kvO4Iw==", "cpu": [ "arm" ], @@ -795,10 +1024,27 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@rolldown/binding-linux-arm64-gnu": { - "version": "1.2.16", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.16.tgz", - "integrity": "sha512-FJiLGAblPBMlBEdbOqw6kW6QcXDWAf/oJu7gYs9ZJZwmg+K+/zjFLxPTIY9izJUzxzc24FHvmseyA0IvJSl17w==", + "node_modules/@oxlint/binding-linux-arm-musleabihf": { + "version": "1.90.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.90.0.tgz", + "integrity": "sha512-MvYmpHyJqUJjEvkZbJHdwfdL45cGn8EVBkYmoXFiaYFW9suoD3dbJl5mBdpy0DVgdjlyddmldbRtk3cCgETadQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm64-gnu": { + "version": "1.90.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.90.0.tgz", + "integrity": "sha512-L13Sy+Kg0nZhwTsToniqjUFPA2TuM6962qCZ5Wp5KeB517Tw7ApdLTTtlb+bF86fcZZa2EtvCVvAJxk4Dya/MQ==", "cpu": [ "arm64" ], @@ -812,10 +1058,10 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@rolldown/binding-linux-arm64-musl": { - "version": "1.2.16", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.16.tgz", - "integrity": "sha512-hrJpblMsrQ58U9veWpbXzkhV5zStunds6HWLprqq1qauvgBr1E6P+24kLj6lSLI9vjRn/RYpjprhkHQPKGWpNg==", + "node_modules/@oxlint/binding-linux-arm64-musl": { + "version": "1.90.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.90.0.tgz", + "integrity": "sha512-wFDdZWGpzIPFdJFjSLWnKB0TGzFriTKUIrl04iMqMyM9BBIJTuerfCHYa0WpDSjr5x3lcW/CHLyacSt886WpGg==", "cpu": [ "arm64" ], @@ -829,10 +1075,10 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@rolldown/binding-linux-ppc64-gnu": { - "version": "1.2.16", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.16.tgz", - "integrity": "sha512-qJd/dC6j6CwLG9/s/RP2nb1RZ0GIgj7Ioj7x/SYa3RzjVrlzrmH0fhIOpfvqQDeIsdP0loi+kHaMhJzY1PBIaA==", + "node_modules/@oxlint/binding-linux-ppc64-gnu": { + "version": "1.90.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.90.0.tgz", + "integrity": "sha512-FRywfn+MoKn8xpBSzgNwNVliSKRI2QXkxi/iF7o6FEQs8Bh8z2RpVTaFAcO3pchXjvB2eGNFIoLLQABIQ+u7VA==", "cpu": [ "ppc64" ], @@ -846,10 +1092,44 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@rolldown/binding-linux-s390x-gnu": { - "version": "1.2.16", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.16.tgz", - "integrity": "sha512-Vx7Xg5uUJuNcujJjI70OICaH0EYj80BtOLZTSN7uOYg8QOLlyKnaG0IW7Fn/J0IpJsaKzmDKMhOQv1JBM9m9vg==", + "node_modules/@oxlint/binding-linux-riscv64-gnu": { + "version": "1.90.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.90.0.tgz", + "integrity": "sha512-IS2PaUgpc/qeLADTyhUNmdx3x4ijs9pjJdPKBYHaT+mAE7k3FsjnHPTjhpsak1b++h6CIPhv6WX9Z+y7Pw0voQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-riscv64-musl": { + "version": "1.90.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.90.0.tgz", + "integrity": "sha512-s7JFKRkGS8O7i2ZVODfuO++NC7sH6HDqpMn8lYxw91w0SXJOxnAVjQ8utvmDwLMMT0jaSkuOKuUYJDGDtu4sHQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-s390x-gnu": { + "version": "1.90.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.90.0.tgz", + "integrity": "sha512-b0GxrOQr5VONCkd7KLSqmP6b6nqZuTpuS8QPQHzltmqdXP5bY0Jl0CZ0QmlCTrS3ExaLYbioFYOARzNbYvcApQ==", "cpu": [ "s390x" ], @@ -863,10 +1143,10 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@rolldown/binding-linux-x64-gnu": { - "version": "1.2.16", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.16.tgz", - "integrity": "sha512-TNKhgE3uJTsTzatUSSYt0Kgo+Oa2uSlSjz4r1aEIea7HX6ULBym4fAlYUhG1i6pjNf2njfCUAfKwr6C3E9Xg1w==", + "node_modules/@oxlint/binding-linux-x64-gnu": { + "version": "1.90.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.90.0.tgz", + "integrity": "sha512-iaJeShJtgUp8rZbt9YUdTAGOpmX5KogCLba17Jp1tWdJ3F4M3D2g2TKUyI1FMTHxKH9NNHuQcuC2kZRg6IV7yQ==", "cpu": [ "x64" ], @@ -880,10 +1160,10 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@rolldown/binding-linux-x64-musl": { - "version": "1.2.16", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.16.tgz", - "integrity": "sha512-7chXdpjXZ8qG0+mIxECN3cT9kvhZ3/oZhMX6Pp876P7CDrIy8nJswva6Mq357JR7eYXfuskwZxMeV1SzoZdHrA==", + "node_modules/@oxlint/binding-linux-x64-musl": { + "version": "1.90.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.90.0.tgz", + "integrity": "sha512-/aZoXnL5WBLCXuzfHqvEFXcm4iwYmr/cYByHDTXzLFzJdE5DC7bm6phpWqHv6BeqpVgY9IpBAxGDv2WEkl5JCg==", "cpu": [ "x64" ], @@ -897,10 +1177,10 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@rolldown/binding-openharmony-arm64": { - "version": "1.2.16", - "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.16.tgz", - "integrity": "sha512-Kwjt+7uNTJK5/MDkGWGVO2KQPnj8yAV75dMpfwyHZrJSXWHrniOB0aUEWlVYf3H1hOqFLIStLdM5QXq6bnKmOQ==", + "node_modules/@oxlint/binding-openharmony-arm64": { + "version": "1.90.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.90.0.tgz", + "integrity": "sha512-SMhk7ozwoxYDKfYqGZCQEfULOKDneF9uhaoIf2neoDLWvNtjY9yVeL7YHmE5L9WdKvMpWNwwZxhenxBu6AgfOg==", "cpu": [ "arm64" ], @@ -914,10 +1194,10 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@rolldown/binding-win32-arm64-msvc": { - "version": "1.2.16", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.16.tgz", - "integrity": "sha512-/LH6WfjDRXXJz/p5xl4TmU+jpcnwcxbKEQBW/GZE0JHfN0lGIyTtsUEGaQ/q/GikkGJ2yLKe6pwm7AnEWO8pdw==", + "node_modules/@oxlint/binding-win32-arm64-msvc": { + "version": "1.90.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.90.0.tgz", + "integrity": "sha512-KBvR3A9fO7fCi2vCP8ifWvlia7tGEQV9NaYh+IGwa/7Groy48Mt/UaYqMK9/zOtAWl20BUCf6RPqzJ32fRw33Q==", "cpu": [ "arm64" ], @@ -931,12 +1211,12 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@rolldown/binding-win32-x64-msvc": { - "version": "1.2.16", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.16.tgz", - "integrity": "sha512-1lv1KvX0Z871zfk7vw+dnXMMnHNyDwMzWG8Kv3HxDXMOhzCX4SHc7HK319fInP0i+0p9D8brkfzL7pJOaGl+tw==", + "node_modules/@oxlint/binding-win32-ia32-msvc": { + "version": "1.90.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.90.0.tgz", + "integrity": "sha512-+x42rDHQGbTCuT3EzpWAzhP3NoVPE/cJsG4gnrakOSg0olV+GCdMpPU23Nvrl3zZMnXxFZdTtDv4D3SuaA5ZeQ==", "cpu": [ - "x64" + "ia32" ], "dev": true, "license": "MIT", @@ -948,954 +1228,3663 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@rolldown/pluginutils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", - "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "node_modules/@oxlint/binding-win32-x64-msvc": { + "version": "1.90.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.90.0.tgz", + "integrity": "sha512-30JiaFEBUB9peEOcvVM8ggo88SoN/IdSr9DW505JdBji/R6dM66gKEiG65hw6qcaF2f4mO0cEJ+RwRZprmun9g==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT" - }, - "node_modules/@tanstack/query-core": { - "version": "5.105.1", - "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.105.1.tgz", - "integrity": "sha512-B/rNlZoZ54w1dlddiUt9oEe1SLM+37c00SKLJEg9YH+7as3Y54P81o9Fh+2ujZ36tXPnQJ5oVe7AcyEWkyFhPg==", "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@tanstack/react-query": { - "version": "5.105.1", - "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.105.1.tgz", - "integrity": "sha512-qcu+/+PtBOjW8qU4/0l47QVmNG7hPOWsCLzP0bTRhE1X7HYa757C4732wXTUH0QhCjTV1yedX8onsCiEwlNYrA==", - "license": "MIT", + "node_modules/@paulirish/trace_engine": { + "version": "0.0.67", + "resolved": "https://registry.npmjs.org/@paulirish/trace_engine/-/trace_engine-0.0.67.tgz", + "integrity": "sha512-AWZSKQDwbWKIO//xGvM8isSyDgEDZWDq12SbMQMxl6eE9ZgWaoc9n/2d7REjwcRANyA1Zjo1rVfJiSRFFGKUww==", + "dev": true, + "license": "BSD-3-Clause", "dependencies": { - "@tanstack/query-core": "5.105.1" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - }, - "peerDependencies": { - "@types/react": "^18 || ^19", - "react": "^18 || ^19" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } + "third-party-web": "*" } }, - "node_modules/@testing-library/dom": { - "version": "10.4.2", - "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.2.tgz", - "integrity": "sha512-yzr2S9HyAIdhz2/6qHgbs665Q7PKVcDF05vsOlHPxG1mo36gKVesdYVeDLnXgfjJ03CrKRk08knc6+E/9m8v2Q==", + "node_modules/@playwright/test": { + "version": "1.65.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.65.1.tgz", + "integrity": "sha512-y+NCIRm2LvY4slUVWvGh1nujJ8RF/hEisIsq2mtUPgdQC4L701bq5hZGMhrpeXjACvwvO9tj5dJqhvM6TP9lbw==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "@babel/code-frame": "^7.10.4", - "@babel/runtime": "^7.12.5", - "@types/aria-query": "^5.0.1", - "aria-query": "5.3.0", - "dom-accessibility-api": "^0.5.9", - "lz-string": "^1.5.0", - "picocolors": "1.1.1", - "pretty-format": "^27.0.2" + "playwright": "1.65.1" + }, + "bin": { + "playwright": "cli.js" }, "engines": { - "node": ">=18" + "node": ">=20" } }, - "node_modules/@testing-library/jest-dom": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-7.0.1.tgz", - "integrity": "sha512-oMDTC3oA+6CXSO2JZnvOI7CA6oVub6kij5ggk9ohwye5slmkwxYDXcPOVxgMw/RQlticjtO0C1RZkR97HgrWMw==", + "node_modules/@puppeteer/browsers": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-3.2.7.tgz", + "integrity": "sha512-B3C/v8OEEaJYcN1IzzgbPmt+GbFANr4Mf/NrqNuGk/dIchrv6quNqxgT+A6qE0Ge0MN95NjKUddcR1JMpYRMWA==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "@adobe/css-tools": "^4.4.0", - "aria-query": "^5.0.0", - "css.escape": "^1.5.1", - "dom-accessibility-api": "^0.6.3", - "picocolors": "^1.1.1", - "redent": "^3.0.0" + "modern-tar": "^0.8.6", + "yargs": "^18.0.0" + }, + "bin": { + "browsers": "lib/main-cli.js" }, "engines": { - "node": ">=22", - "npm": ">=6", - "yarn": ">=1" + "node": ">=22.12.0" }, "peerDependencies": { - "@testing-library/dom": ">=10 <11", - "vitest": ">= 0.32" + "proxy-agent": ">=8.0.1", + "yauzl": "^2.10.0 || ^3.4.0" }, "peerDependenciesMeta": { - "vitest": { + "proxy-agent": { + "optional": true + }, + "yauzl": { "optional": true } } }, - "node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz", - "integrity": "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==", - "dev": true, - "license": "MIT" - }, - "node_modules/@testing-library/react": { - "version": "16.3.3", - "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-16.3.3.tgz", - "integrity": "sha512-Uo193NgQbPMz6lrrhtRQQFcMC6Re/ELLFbbuVL30WDlZxlpZf9/lMHTAVxPRLw1q1iu9OJmR1c2BLiENRstdBg==", + "node_modules/@puppeteer/browsers/node_modules/ansi-regex": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.6.0.tgz", + "integrity": "sha512-XZ5apbzreCbXSKwPjJstu8R0zOi247w3XYwWxtwBXgpZrCyc1Ka7p9/xY0A9/diMewmHbEKz+FIraWaEWjlN5g==", "dev": true, "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.12.5" - }, "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@testing-library/dom": "^10.0.0", - "@types/react": "^18.0.0 || ^19.0.0", - "@types/react-dom": "^18.0.0 || ^19.0.0", - "react": "^18.0.0 || ^19.0.0", - "react-dom": "^18.0.0 || ^19.0.0" + "node": ">=12" }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/@testing-library/user-event": { - "version": "14.6.8", - "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.6.8.tgz", - "integrity": "sha512-vgSSqnANMnkcYR/vUNDbwS7aM3OErRLNUG8vCVVlj4oc6cKffUrccX7UAS5AmJQQNZTSibi9z5GvvRZ0aYgUCQ==", + "node_modules/@puppeteer/browsers/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", "dev": true, "license": "MIT", "engines": { - "node": ">=12", - "npm": ">=6" + "node": ">=12" }, - "peerDependencies": { - "@testing-library/dom": ">=7.21.4" + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@types/aria-query": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", - "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==", + "node_modules/@puppeteer/browsers/node_modules/cliui": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", + "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", "dev": true, - "license": "MIT" + "license": "ISC", + "dependencies": { + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=20" + } }, - "node_modules/@types/chai": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", - "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", + "node_modules/@puppeteer/browsers/node_modules/cliui/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", "dev": true, "license": "MIT", "dependencies": { - "@types/deep-eql": "*", - "assertion-error": "^2.0.1" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@types/d3-path": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.1.tgz", - "integrity": "sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==", + "node_modules/@puppeteer/browsers/node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", "dev": true, "license": "MIT" }, - "node_modules/@types/d3-shape": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.2.0.tgz", - "integrity": "sha512-kVd74ta9eof3eJOvbNd1vGKS/XERRyQbT26Og63hIsvDO84cjD5gEOhsXf26w3FSoNlPVz84DOFcKv/oou+fMw==", + "node_modules/@puppeteer/browsers/node_modules/string-width": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.3.0.tgz", + "integrity": "sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ==", "dev": true, "license": "MIT", "dependencies": { - "@types/d3-path": "*" + "get-east-asian-width": "^1.5.0", + "strip-ansi": "^7.1.2" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@types/deep-eql": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", - "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "node_modules/@puppeteer/browsers/node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } }, - "node_modules/@types/estree": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.10.tgz", - "integrity": "sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==", + "node_modules/@puppeteer/browsers/node_modules/wrap-ansi": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } }, - "node_modules/@types/node": { - "version": "24.19.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.19.2.tgz", - "integrity": "sha512-93d49wCWJkCyN87MxLpNN6KXPCwFw7bVUg79mGUV1OS40JGWwVCr8n61DXCSqz7CV6/VfPkb7xec7uP2M+QHWQ==", + "node_modules/@puppeteer/browsers/node_modules/wrap-ansi/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": ">=7.24.0 <7.24.7" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@types/react": { - "version": "19.3.0", - "resolved": "https://registry.npmjs.org/@types/react/-/react-19.3.0.tgz", - "integrity": "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==", - "devOptional": true, + "node_modules/@puppeteer/browsers/node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/@puppeteer/browsers/node_modules/yargs": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.2.0.tgz", + "integrity": "sha512-9OpKOLeaoNFecEp7P6iYbzze/5CqWoH7N3SMs/6y1XF4nMvFMspEGZzJ6uFi9MmQwXhyzqYoSEKO3tvA3Z/o2w==", + "dev": true, "license": "MIT", "dependencies": { - "csstype": "^3.2.2" + "cliui": "^9.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "string-width": "^8.2.1", + "y18n": "^5.0.5", + "yargs-parser": "^22.0.0" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" } }, - "node_modules/@types/react-dom": { - "version": "19.3.0", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.3.0.tgz", - "integrity": "sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q==", - "devOptional": true, - "license": "MIT", - "peerDependencies": { - "@types/react": "^19.3.0" + "node_modules/@puppeteer/browsers/node_modules/yargs-parser": { + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", + "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" } }, - "node_modules/@typescript/typescript-aix-ppc64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-aix-ppc64/-/typescript-aix-ppc64-7.0.2.tgz", - "integrity": "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==", + "node_modules/@remix-run/route-pattern": { + "version": "0.22.1", + "resolved": "https://registry.npmjs.org/@remix-run/route-pattern/-/route-pattern-0.22.1.tgz", + "integrity": "sha512-czdGJWh09Lapvcqt7Vb09KlrU2PhRJ8xQaI+AItTuD9aDJ5MAgxnS38lnys6Ll+6RJEqPiaUqTwIQhVLwFvv+w==", + "license": "MIT" + }, + "node_modules/@rolldown/binding-android-arm-eabi": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.16.tgz", + "integrity": "sha512-ia3DwAs0OsMGS7+IConptSiyk9pEXkOx/AbJ2n/lAGxH3QkWQus1t8d7gnAT38FCU2sQu8lUbeR6AiZFv4JxaA==", "cpu": [ - "ppc64" + "arm" ], "dev": true, - "license": "Apache-2.0", + "license": "MIT", "optional": true, "os": [ - "aix" + "android" ], "engines": { - "node": ">=16.20.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@typescript/typescript-darwin-arm64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-arm64/-/typescript-darwin-arm64-7.0.2.tgz", - "integrity": "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==", + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.16.tgz", + "integrity": "sha512-kx5wBiMB6E7TEvpl2B9gjLU004BkvEm2Dr941BFjx/SontPwSzNuQUIoVKxHHoSjpFIfHMmcguyLOtyn0hObRg==", "cpu": [ "arm64" ], "dev": true, - "license": "Apache-2.0", + "license": "MIT", "optional": true, "os": [ - "darwin" + "android" ], "engines": { - "node": ">=16.20.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@typescript/typescript-darwin-x64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-x64/-/typescript-darwin-x64-7.0.2.tgz", - "integrity": "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==", + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.16.tgz", + "integrity": "sha512-qslZrXnKJU4cUpjoAmtAo/KQM9e2IRMlmpig6Zpwj+8KWxW8v+nkAf9216Bsek9lOC1jvg2yCjygCFo2f83msQ==", "cpu": [ - "x64" + "arm64" ], "dev": true, - "license": "Apache-2.0", + "license": "MIT", "optional": true, "os": [ "darwin" ], "engines": { - "node": ">=16.20.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@typescript/typescript-freebsd-arm64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-arm64/-/typescript-freebsd-arm64-7.0.2.tgz", - "integrity": "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==", + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.16.tgz", + "integrity": "sha512-FdF+y48ND13eAyM2mQn+85kvAqNlvRWROy2rhgA463X/0Gv4vGtazZtfaF1mRBLscYvtOlh4QnLjOWiFzX69OQ==", "cpu": [ - "arm64" + "x64" ], "dev": true, - "license": "Apache-2.0", + "license": "MIT", "optional": true, "os": [ - "freebsd" + "darwin" ], "engines": { - "node": ">=16.20.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@typescript/typescript-freebsd-x64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-x64/-/typescript-freebsd-x64-7.0.2.tgz", - "integrity": "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==", + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.16.tgz", + "integrity": "sha512-ddjqFM5e95AgLbUPtKIS7V1KTVlA0RUgCVr5mn+/IEhsdy3pr+Vuj/HZ7nlMN2FyxIwUktOH1LEPIQXO1v9y1Q==", "cpu": [ "x64" ], "dev": true, - "license": "Apache-2.0", + "license": "MIT", "optional": true, "os": [ "freebsd" ], "engines": { - "node": ">=16.20.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@typescript/typescript-linux-arm": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm/-/typescript-linux-arm-7.0.2.tgz", - "integrity": "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==", + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.16.tgz", + "integrity": "sha512-tHdKWbFkFBI687iim3LIyIvyL7j66VvQYkDPss5Stn/qyE2tWkR1YD0dXmXPFKKqT/o5ZEJVsaRsWS2meQwGOA==", "cpu": [ "arm" ], "dev": true, - "license": "Apache-2.0", + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=16.20.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@typescript/typescript-linux-arm64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm64/-/typescript-linux-arm64-7.0.2.tgz", - "integrity": "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==", + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.16.tgz", + "integrity": "sha512-FJiLGAblPBMlBEdbOqw6kW6QcXDWAf/oJu7gYs9ZJZwmg+K+/zjFLxPTIY9izJUzxzc24FHvmseyA0IvJSl17w==", "cpu": [ "arm64" ], "dev": true, - "license": "Apache-2.0", + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=16.20.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@typescript/typescript-linux-loong64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-loong64/-/typescript-linux-loong64-7.0.2.tgz", - "integrity": "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==", + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.16.tgz", + "integrity": "sha512-hrJpblMsrQ58U9veWpbXzkhV5zStunds6HWLprqq1qauvgBr1E6P+24kLj6lSLI9vjRn/RYpjprhkHQPKGWpNg==", "cpu": [ - "loong64" + "arm64" ], "dev": true, - "license": "Apache-2.0", + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=16.20.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@typescript/typescript-linux-mips64el": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-mips64el/-/typescript-linux-mips64el-7.0.2.tgz", - "integrity": "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==", + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.16.tgz", + "integrity": "sha512-qJd/dC6j6CwLG9/s/RP2nb1RZ0GIgj7Ioj7x/SYa3RzjVrlzrmH0fhIOpfvqQDeIsdP0loi+kHaMhJzY1PBIaA==", "cpu": [ - "mips64el" + "ppc64" ], "dev": true, - "license": "Apache-2.0", + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-linux-ppc64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-ppc64/-/typescript-linux-ppc64-7.0.2.tgz", - "integrity": "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-linux-riscv64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-riscv64/-/typescript-linux-riscv64-7.0.2.tgz", - "integrity": "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=16.20.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@typescript/typescript-linux-s390x": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-s390x/-/typescript-linux-s390x-7.0.2.tgz", - "integrity": "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==", + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.16.tgz", + "integrity": "sha512-Vx7Xg5uUJuNcujJjI70OICaH0EYj80BtOLZTSN7uOYg8QOLlyKnaG0IW7Fn/J0IpJsaKzmDKMhOQv1JBM9m9vg==", "cpu": [ "s390x" ], "dev": true, - "license": "Apache-2.0", + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=16.20.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@typescript/typescript-linux-x64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-x64/-/typescript-linux-x64-7.0.2.tgz", - "integrity": "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==", + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.16.tgz", + "integrity": "sha512-TNKhgE3uJTsTzatUSSYt0Kgo+Oa2uSlSjz4r1aEIea7HX6ULBym4fAlYUhG1i6pjNf2njfCUAfKwr6C3E9Xg1w==", "cpu": [ "x64" ], "dev": true, - "license": "Apache-2.0", + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-netbsd-arm64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-arm64/-/typescript-netbsd-arm64-7.0.2.tgz", - "integrity": "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=16.20.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@typescript/typescript-netbsd-x64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-x64/-/typescript-netbsd-x64-7.0.2.tgz", - "integrity": "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==", + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.16.tgz", + "integrity": "sha512-7chXdpjXZ8qG0+mIxECN3cT9kvhZ3/oZhMX6Pp876P7CDrIy8nJswva6Mq357JR7eYXfuskwZxMeV1SzoZdHrA==", "cpu": [ "x64" ], "dev": true, - "license": "Apache-2.0", + "license": "MIT", "optional": true, "os": [ - "netbsd" + "linux" ], "engines": { - "node": ">=16.20.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@typescript/typescript-openbsd-arm64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-arm64/-/typescript-openbsd-arm64-7.0.2.tgz", - "integrity": "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==", + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.16.tgz", + "integrity": "sha512-Kwjt+7uNTJK5/MDkGWGVO2KQPnj8yAV75dMpfwyHZrJSXWHrniOB0aUEWlVYf3H1hOqFLIStLdM5QXq6bnKmOQ==", "cpu": [ "arm64" ], "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-openbsd-x64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-x64/-/typescript-openbsd-x64-7.0.2.tgz", - "integrity": "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-sunos-x64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-sunos-x64/-/typescript-sunos-x64-7.0.2.tgz", - "integrity": "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0", + "license": "MIT", "optional": true, "os": [ - "sunos" + "openharmony" ], "engines": { - "node": ">=16.20.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@typescript/typescript-win32-arm64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-arm64/-/typescript-win32-arm64-7.0.2.tgz", - "integrity": "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==", + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.16.tgz", + "integrity": "sha512-/LH6WfjDRXXJz/p5xl4TmU+jpcnwcxbKEQBW/GZE0JHfN0lGIyTtsUEGaQ/q/GikkGJ2yLKe6pwm7AnEWO8pdw==", "cpu": [ "arm64" ], "dev": true, - "license": "Apache-2.0", + "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { - "node": ">=16.20.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@typescript/typescript-win32-x64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-x64/-/typescript-win32-x64-7.0.2.tgz", - "integrity": "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==", + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.16.tgz", + "integrity": "sha512-1lv1KvX0Z871zfk7vw+dnXMMnHNyDwMzWG8Kv3HxDXMOhzCX4SHc7HK319fInP0i+0p9D8brkfzL7pJOaGl+tw==", "cpu": [ "x64" ], "dev": true, - "license": "Apache-2.0", + "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { - "node": ">=16.20.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@vitejs/plugin-react": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-6.2.1.tgz", - "integrity": "sha512-9KyWCij3r0+qLG3Q62vBmv0VyevmYibAtxaCIVK9o0k6CXgaajZRIe8tpfchQcdZArJ5b/7OrIz4W3b2uxVRDA==", + "node_modules/@rolldown/pluginutils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", + "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", "dev": true, - "license": "MIT", - "dependencies": { - "@rolldown/pluginutils": "^1.0.1" - }, - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, - "peerDependencies": { - "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0 || ^0.3.0", - "babel-plugin-react-compiler": "^1.0.0", - "oxc-transform-react": ">=0.152.0 <0.157.0", - "vite": "^8.0.0" - }, - "peerDependenciesMeta": { - "@rolldown/plugin-babel": { - "optional": true - }, - "babel-plugin-react-compiler": { - "optional": true - }, - "oxc-transform-react": { - "optional": true - } - } + "license": "MIT" }, - "node_modules/@vitest/mocker": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-5.0.5.tgz", - "integrity": "sha512-xLL3lkDegJZw+MGoGaCCsFayDZthGgpAtr3Vziyfc4p7xH89K7KRPcRBBh/kEYm0Aqkt5DtTmkYpBtRV/FrHZg==", + "node_modules/@sentry/bundler-plugins": { + "version": "11.16.0", + "resolved": "https://registry.npmjs.org/@sentry/bundler-plugins/-/bundler-plugins-11.16.0.tgz", + "integrity": "sha512-HGP4ppnqHwGKlibB08PCicBcVbjeC1utzwXHTTqDeZVACSpkBqRnhHKH53iHvXnoEaIbePyOcntJS6loEbxd8Q==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/trace-mapping": "0.3.31", - "@vitest/spy": "5.0.5", - "estree-walker": "^3.0.3", - "magic-string": "^1.4.3" + "@sentry/core": "11.16.0", + "dotenv": "^17.4.2", + "glob": "^14.0.3", + "magic-string": "~0.30.8 || ^1.0.0", + "oxc-parser": "^0.152.0", + "sentry": "^0.50.0" }, - "funding": { - "url": "https://opencollective.com/vitest" + "engines": { + "node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0" }, "peerDependencies": { - "msw": "^2.4.9 || ^3.0.0", - "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" + "rollup": ">=3.2.0", + "webpack": ">=5.1.0" }, "peerDependenciesMeta": { - "msw": { + "rollup": { "optional": true }, - "vite": { + "webpack": { "optional": true } } }, - "node_modules/@vitest/spy": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-5.0.5.tgz", - "integrity": "sha512-lwJRExuH417257Q5wv9QYugN9IMJkoxcrKrYxGPQkBzl7wlNpTUxD/5yNX4ESKVUIShKPgkGchYPFMWOOk0wzw==", + "node_modules/@sentry/conventions": { + "version": "0.34.0", + "resolved": "https://registry.npmjs.org/@sentry/conventions/-/conventions-0.34.0.tgz", + "integrity": "sha512-sGYLaq/zyRTOCoadW3Z66q6WHp16stnwezGK45B50mGO6QUTl/ttzsPpy+oxZlj2pKARyOohZ1pX9grdpMxo2Q==", "dev": true, "license": "MIT", - "funding": { - "url": "https://opencollective.com/vitest" + "engines": { + "node": ">=14" } }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "node_modules/@sentry/core": { + "version": "11.16.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-11.16.0.tgz", + "integrity": "sha512-hu7gw///rDLwVYKmkAgztXUx0sFkpxG1zDwnuHBYCXqHRaEwzEJ/ntBZfAmLbjOSIsg5dcM07AI09KSicFeXBw==", "dev": true, "license": "MIT", + "dependencies": { + "@sentry/conventions": "^0.34.0" + }, "engines": { - "node": ">=8" + "node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0" } }, - "node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "node_modules/@sentry/node": { + "version": "11.16.0", + "resolved": "https://registry.npmjs.org/@sentry/node/-/node-11.16.0.tgz", + "integrity": "sha512-0yS89Ck8VK0LSVJK7xLps0JDSp7hIHpdAkS4VcId0rsx9Pad8q4Qi0pBY1kqwJaYGhKYn8J1cc9AX7TZMDt42w==", "dev": true, "license": "MIT", - "engines": { - "node": ">=10" + "dependencies": { + "@opentelemetry/api": "^1.9.1", + "@sentry/bundler-plugins": "11.16.0", + "@sentry/conventions": "^0.34.0", + "@sentry/core": "11.16.0", + "@sentry/opentelemetry": "11.16.0", + "@sentry/server-runtime-injection": "11.16.0", + "@sentry/server-utils": "11.16.0" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "engines": { + "node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0" } }, - "node_modules/aria-query": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", - "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", + "node_modules/@sentry/opentelemetry": { + "version": "11.16.0", + "resolved": "https://registry.npmjs.org/@sentry/opentelemetry/-/opentelemetry-11.16.0.tgz", + "integrity": "sha512-1SROq4fl02vt9SvQ5Nf51dklQUbcNj5OGtDk2n6BMNa6n3dM7sTCj594b6zFM/YhecrgcHTRJLV61ruW7a2z8w==", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "dependencies": { - "dequal": "^2.0.3" + "@sentry/conventions": "^0.34.0", + "@sentry/core": "11.16.0" + }, + "engines": { + "node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.9.0" } }, - "node_modules/assertion-error": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", - "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "node_modules/@sentry/server-runtime-injection": { + "version": "11.16.0", + "resolved": "https://registry.npmjs.org/@sentry/server-runtime-injection/-/server-runtime-injection-11.16.0.tgz", + "integrity": "sha512-G1DFz/iBsbqf/Cqh8L0MFOIP43rSai/yhUJAA5K3TRgL9O2pj32XI2z4DKlfuXblRKzF3FaeEqZ7nIUjoqVbIQ==", "dev": true, "license": "MIT", + "dependencies": { + "@sentry/core": "11.16.0", + "@sentry/server-utils": "11.16.0" + }, "engines": { - "node": ">=12" + "node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0" } }, - "node_modules/axe-core": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.14.0.tgz", - "integrity": "sha512-9WTZxEjsZ7b13TH8JPmbV2z8CHbl80/2hm3XPEG4JgNdQLK81IBRXmSxHfMAOkSqQeRxT/0dwNDz2GOm3zzpcQ==", + "node_modules/@sentry/server-utils": { + "version": "11.16.0", + "resolved": "https://registry.npmjs.org/@sentry/server-utils/-/server-utils-11.16.0.tgz", + "integrity": "sha512-tfJpkLuGq/QfhMtPqsFd5gDYJ6ScN9ef6KS86t/GvRXR63Z0XzeaWUCXKEUhXdYsI7qDmwVal+gySewDyHPJcA==", "dev": true, - "license": "MPL-2.0", + "license": "MIT", + "dependencies": { + "@opentelemetry/api": "^1.9.1", + "@sentry/conventions": "^0.34.0", + "@sentry/core": "11.16.0" + }, "engines": { - "node": ">=4" + "node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0" } }, - "node_modules/bidi-js": { + "node_modules/@tanstack/query-core": { + "version": "5.105.1", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.105.1.tgz", + "integrity": "sha512-B/rNlZoZ54w1dlddiUt9oEe1SLM+37c00SKLJEg9YH+7as3Y54P81o9Fh+2ujZ36tXPnQJ5oVe7AcyEWkyFhPg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + } + }, + "node_modules/@tanstack/react-query": { + "version": "5.105.1", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.105.1.tgz", + "integrity": "sha512-qcu+/+PtBOjW8qU4/0l47QVmNG7hPOWsCLzP0bTRhE1X7HYa757C4732wXTUH0QhCjTV1yedX8onsCiEwlNYrA==", + "license": "MIT", + "dependencies": { + "@tanstack/query-core": "5.105.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "@types/react": "^18 || ^19", + "react": "^18 || ^19" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@testing-library/dom": { + "version": "10.4.2", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.2.tgz", + "integrity": "sha512-yzr2S9HyAIdhz2/6qHgbs665Q7PKVcDF05vsOlHPxG1mo36gKVesdYVeDLnXgfjJ03CrKRk08knc6+E/9m8v2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.10.4", + "@babel/runtime": "^7.12.5", + "@types/aria-query": "^5.0.1", + "aria-query": "5.3.0", + "dom-accessibility-api": "^0.5.9", + "lz-string": "^1.5.0", + "picocolors": "1.1.1", + "pretty-format": "^27.0.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@testing-library/jest-dom": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-7.0.1.tgz", + "integrity": "sha512-oMDTC3oA+6CXSO2JZnvOI7CA6oVub6kij5ggk9ohwye5slmkwxYDXcPOVxgMw/RQlticjtO0C1RZkR97HgrWMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@adobe/css-tools": "^4.4.0", + "aria-query": "^5.0.0", + "css.escape": "^1.5.1", + "dom-accessibility-api": "^0.6.3", + "picocolors": "^1.1.1", + "redent": "^3.0.0" + }, + "engines": { + "node": ">=22", + "npm": ">=6", + "yarn": ">=1" + }, + "peerDependencies": { + "@testing-library/dom": ">=10 <11", + "vitest": ">= 0.32" + }, + "peerDependenciesMeta": { + "vitest": { + "optional": true + } + } + }, + "node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz", + "integrity": "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@testing-library/react": { + "version": "16.3.3", + "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-16.3.3.tgz", + "integrity": "sha512-Uo193NgQbPMz6lrrhtRQQFcMC6Re/ELLFbbuVL30WDlZxlpZf9/lMHTAVxPRLw1q1iu9OJmR1c2BLiENRstdBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.12.5" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@testing-library/dom": "^10.0.0", + "@types/react": "^18.0.0 || ^19.0.0", + "@types/react-dom": "^18.0.0 || ^19.0.0", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@testing-library/user-event": { + "version": "14.6.8", + "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.6.8.tgz", + "integrity": "sha512-vgSSqnANMnkcYR/vUNDbwS7aM3OErRLNUG8vCVVlj4oc6cKffUrccX7UAS5AmJQQNZTSibi9z5GvvRZ0aYgUCQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12", + "npm": ">=6" + }, + "peerDependencies": { + "@testing-library/dom": ">=7.21.4" + } + }, + "node_modules/@types/aria-query": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", + "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/chai": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", + "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*", + "assertion-error": "^2.0.1" + } + }, + "node_modules/@types/d3-path": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.1.tgz", + "integrity": "sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/d3-shape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.2.0.tgz", + "integrity": "sha512-kVd74ta9eof3eJOvbNd1vGKS/XERRyQbT26Og63hIsvDO84cjD5gEOhsXf26w3FSoNlPVz84DOFcKv/oou+fMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/d3-path": "*" + } + }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.10.tgz", + "integrity": "sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "24.19.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.19.2.tgz", + "integrity": "sha512-93d49wCWJkCyN87MxLpNN6KXPCwFw7bVUg79mGUV1OS40JGWwVCr8n61DXCSqz7CV6/VfPkb7xec7uP2M+QHWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": ">=7.24.0 <7.24.7" + } + }, + "node_modules/@types/react": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.3.0.tgz", + "integrity": "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-dom": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.3.0.tgz", + "integrity": "sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q==", + "devOptional": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^19.3.0" + } + }, + "node_modules/@typescript/typescript-aix-ppc64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-aix-ppc64/-/typescript-aix-ppc64-7.0.2.tgz", + "integrity": "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-darwin-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-arm64/-/typescript-darwin-arm64-7.0.2.tgz", + "integrity": "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-darwin-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-x64/-/typescript-darwin-x64-7.0.2.tgz", + "integrity": "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-freebsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-arm64/-/typescript-freebsd-arm64-7.0.2.tgz", + "integrity": "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-freebsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-x64/-/typescript-freebsd-x64-7.0.2.tgz", + "integrity": "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-arm": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm/-/typescript-linux-arm-7.0.2.tgz", + "integrity": "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm64/-/typescript-linux-arm64-7.0.2.tgz", + "integrity": "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-loong64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-loong64/-/typescript-linux-loong64-7.0.2.tgz", + "integrity": "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-mips64el": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-mips64el/-/typescript-linux-mips64el-7.0.2.tgz", + "integrity": "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-ppc64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-ppc64/-/typescript-linux-ppc64-7.0.2.tgz", + "integrity": "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-riscv64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-riscv64/-/typescript-linux-riscv64-7.0.2.tgz", + "integrity": "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-s390x": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-s390x/-/typescript-linux-s390x-7.0.2.tgz", + "integrity": "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-x64/-/typescript-linux-x64-7.0.2.tgz", + "integrity": "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-netbsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-arm64/-/typescript-netbsd-arm64-7.0.2.tgz", + "integrity": "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-netbsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-x64/-/typescript-netbsd-x64-7.0.2.tgz", + "integrity": "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-openbsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-arm64/-/typescript-openbsd-arm64-7.0.2.tgz", + "integrity": "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-openbsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-x64/-/typescript-openbsd-x64-7.0.2.tgz", + "integrity": "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-sunos-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-sunos-x64/-/typescript-sunos-x64-7.0.2.tgz", + "integrity": "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-win32-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-arm64/-/typescript-win32-arm64-7.0.2.tgz", + "integrity": "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-win32-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-x64/-/typescript-win32-x64-7.0.2.tgz", + "integrity": "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@vitejs/plugin-react": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-6.2.1.tgz", + "integrity": "sha512-9KyWCij3r0+qLG3Q62vBmv0VyevmYibAtxaCIVK9o0k6CXgaajZRIe8tpfchQcdZArJ5b/7OrIz4W3b2uxVRDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rolldown/pluginutils": "^1.0.1" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0 || ^0.3.0", + "babel-plugin-react-compiler": "^1.0.0", + "oxc-transform-react": ">=0.152.0 <0.157.0", + "vite": "^8.0.0" + }, + "peerDependenciesMeta": { + "@rolldown/plugin-babel": { + "optional": true + }, + "babel-plugin-react-compiler": { + "optional": true + }, + "oxc-transform-react": { + "optional": true + } + } + }, + "node_modules/@vitest/coverage-v8": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-5.1.1.tgz", + "integrity": "sha512-xL4NkbVx/UqqDHaXSOyvB8qsSoLQ+dVNGR9H2Bh/4ggQtmaPFNPUC9gZQwKZePLOQ6WDcgwXVnPulFW9eCHt0w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@bcoe/v8-coverage": "^1.0.2", + "@vitest/istanbul-lib-coverage": "^2.1.0", + "@vitest/istanbul-lib-report": "^2.1.0", + "ast-v8-to-istanbul": "^1.0.7", + "magicast": "^0.5.5", + "obug": "^3.0.0", + "std-env": "^4.3.0", + "tinyrainbow": "^3.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@vitest/browser": "5.1.1", + "vitest": "5.1.1" + }, + "peerDependenciesMeta": { + "@vitest/browser": { + "optional": true + } + } + }, + "node_modules/@vitest/istanbul-lib-coverage": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@vitest/istanbul-lib-coverage/-/istanbul-lib-coverage-2.1.1.tgz", + "integrity": "sha512-pF9nMHHuyQzyEXdkWX3d4wElEKjymfL5TEoofegJn/jK2WjmTLOcJKfJ7/YwYGYdbZf8Ebrt4VDUoBPiTuO9zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=22" + } + }, + "node_modules/@vitest/istanbul-lib-report": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@vitest/istanbul-lib-report/-/istanbul-lib-report-2.1.1.tgz", + "integrity": "sha512-Qba+8OpQQAbWrmq3u1olh6jqE/vyW4OYJe6TLrrTBpXhjJhbY7Os69wyVvMQmNA64KJhGd5nQ/c7l4io8tPCHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/istanbul-lib-coverage": "2.1.1" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@vitest/mocker": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-5.1.1.tgz", + "integrity": "sha512-b2OgTB4+3ImWIVafXKazJXwLKwQxUNnix6b3xUvUTMh7RyXlrtzoxfZr8aEz9zkHOMAS4K5lu3TvFWoiVeVTQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.31", + "@vitest/spy": "5.1.1", + "estree-walker": "^3.0.3", + "magic-string": "^1.4.5" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9 || ^3.0.0", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@vitest/spy": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-5.1.1.tgz", + "integrity": "sha512-6K8C6alQG1/Yc8/ZI22iJS7JEsxPdVzqtqDq+/xM4Z0mGVykemMVjLhqMy/q6/IHYG3kKD8hKSwRen/ZdyI9vQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/accepts/node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/agent-base": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-9.0.0.tgz", + "integrity": "sha512-TQf59BsZnytt8GdJKLPfUZ54g/iaUL2OWDSFCCvMOhsHduDQxO8xC4PNeyIkVcA5KwL2phPSv0douC0fgWzmnA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 20" + } + }, + "node_modules/ajv": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz", + "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-3.0.4.tgz", + "integrity": "sha512-fwWK3Zq22l4XJJjx5mcBHGikIk+hJqO+32dPm0Jur7+rtG5x1scOjSfdT9ZKeWHPpsya/l0HHK4tDImBkTrtvA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], + "license": "PSF-2.0" + }, + "node_modules/aria-query": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", + "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "dequal": "^2.0.3" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/ast-types": { + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", + "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ast-v8-to-istanbul": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/ast-v8-to-istanbul/-/ast-v8-to-istanbul-1.0.8.tgz", + "integrity": "sha512-lPdpagk13ANXV+HClJEpCZM7kUsl5XcvgqKzZhaj6Ve1ZFICcY2sGhAN1n1vT0tML6EclT7bfVgTxqL57Gkpow==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.31", + "estree-walker": "^3.0.3", + "js-tokens": "^10.0.0" + } + }, + "node_modules/ast-v8-to-istanbul/node_modules/js-tokens": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-10.0.1.tgz", + "integrity": "sha512-XMt+uh+yEs6srFvEb/pEe4IMvbtoXVdNxF7lZFU+I9sdWI641L97L+gXQMTGm1x3RjPUVizNVjHueclXr0U7sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/atomically": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/atomically/-/atomically-2.1.1.tgz", + "integrity": "sha512-P4w9o2dqARji6P7MHprklbfiArZAWvo07yW7qs3pdljb3BWr12FIB7W+p0zJiuiVsUpRO0iZn1kFFcpPegg0tQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "stubborn-fs": "^2.0.0", + "when-exit": "^2.1.4" + } + }, + "node_modules/axe-core": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.14.0.tgz", + "integrity": "sha512-9WTZxEjsZ7b13TH8JPmbV2z8CHbl80/2hm3XPEG4JgNdQLK81IBRXmSxHfMAOkSqQeRxT/0dwNDz2GOm3zzpcQ==", + "dev": true, + "license": "MPL-2.0", + "engines": { + "node": ">=4" + } + }, + "node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/basic-ftp": { + "version": "6.2.6", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-6.2.6.tgz", + "integrity": "sha512-0EjZCaodOz6yiokv2JA1VyKGNdGxULZ+GGlPgG9tm4d+T/bHtX1hUch8CumDneBfpIbiSdn7TaCGwpM+gwsOlw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/bidi-js": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/bidi-js/-/bidi-js-1.1.0.tgz", + "integrity": "sha512-fX1Onk0tdVPC7obPWB5EbJ1z7NVhLq4m2xZLq2YXBkxzMXIGRpNMU88n0EPgWseKl12J7zXs7qrDxPK4sRs2fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "require-from-string": "^2.0.2" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/body-parser": { + "version": "1.20.9", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.9.tgz", + "integrity": "sha512-FISIQxV5u91Y9gvuFq3q/tA/qTqLJn3AhRcEvyozyhJTh5OBFFtv827AdHU7Rbyct4r+Ba1/99oFa1Y3yuFsdw==", + "dev": true, + "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "~1.2.0", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "on-finished": "~2.4.1", + "qs": "~6.16.0", + "raw-body": "~2.5.3", + "type-is": "~1.6.18", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "5.0.13", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.13.tgz", + "integrity": "sha512-Vh3dmFbc4wZeox7M9I/0L9GfFd83Su4+yCck/OF9Gi/P/dAHn0RT7X4K9R7gMNMhDck3DvhR6QXsnQdjjgwNvQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/bundle-name": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.1.tgz", + "integrity": "sha512-DdH81/zPLVS11EUgWq3tEu/xn+EzljlMYooDNdzWEnFha3R3NBMpMV1UqYIpjYHV/SgpFKMIX1Oh7o06SjM/oA==", + "dev": true, + "license": "MIT", + "dependencies": { + "run-applescript": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/chai": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-6.3.0.tgz", + "integrity": "sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/chardet": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.2.0.tgz", + "integrity": "sha512-rddelWYNPRrXq6PtNEN2S3f6t9ILzvqaN5pVgi4kqt9jHQaXIial9PznB5iSPVlQSLNaaH22ItWz3EJtQ10+OA==", + "dev": true, + "license": "MIT" + }, + "node_modules/chrome-launcher": { + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/chrome-launcher/-/chrome-launcher-0.13.4.tgz", + "integrity": "sha512-nnzXiDbGKjDSK6t2I+35OAPBy5Pw/39bgkb/ZAFwMhwJbdYBp6aH+vW28ZgtjdU890Q7D+3wN/tB8N66q5Gi2A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/node": "*", + "escape-string-regexp": "^1.0.5", + "is-wsl": "^2.2.0", + "lighthouse-logger": "^1.0.0", + "mkdirp": "^0.5.3", + "rimraf": "^3.0.2" + } + }, + "node_modules/chromium-bidi": { + "version": "157.0.8090-0", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-157.0.8090-0.tgz", + "integrity": "sha512-KJw7IQgqXwxpJgJlEIPg5mr2ZoqA+jkTRtc5EABI7sUJ3bu3cpI7NuEBoj4Gn1AsF78CaT9So5WQWspK3/wYag==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "mitt": "^3.0.1", + "zod": "^4.6.5" + }, + "engines": { + "node": ">=20.19.0 <22.0.0 || >=22.12.0" + }, + "peerDependencies": { + "devtools-protocol": "*" + } + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 10" + } + }, + "node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/compressible": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": ">= 1.43.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/compression": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.8.2.tgz", + "integrity": "sha512-o8vI5RE5A6EVVOd9o41jKp41aJom+QTEO/Bx8MYNjexMo/Bv2WOjUfZr+aL0WnYSgymUy6zeguqLTsIhV0gMvQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "compressible": "~2.0.18", + "debug": "2.6.9", + "destroy": "1.2.0", + "negotiator": "~0.6.4", + "on-headers": "~1.1.0", + "safe-buffer": "5.2.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/compression/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/compression/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/configstore": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-8.0.0.tgz", + "integrity": "sha512-U51WPZg+o6FDFhBCV6yYFEspGMCoHvCgJSGFw9AwsW2u75gYBPoDlYca5XfDs4TdMUu3/y0R6FFdvvgyH31mKQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "atomically": "^2.1.0", + "dot-prop": "^10.1.0", + "graceful-fs": "^4.2.11", + "is-safe-filename": "^0.1.0", + "xdg-basedir": "^5.1.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-es": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/cookie-es/-/cookie-es-3.1.1.tgz", + "integrity": "sha512-UaXxwISYJPTr9hwQxMFYZ7kNhSXboMXP+Z3TRX6f1/NyaGPfuNUZOWP1pUEb75B2HjfklIYLVRfWiFZJyC6Npg==", + "license": "MIT" + }, + "node_modules/cookie-signature": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz", + "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==", + "dev": true, + "license": "MIT" + }, + "node_modules/csp_evaluator": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/csp_evaluator/-/csp_evaluator-1.1.8.tgz", + "integrity": "sha512-EwOnfYuNbTytvbMKsLixTrRgnjOa0WZCxGy8A9nnSYAicrdwn+T/epU/yjgymmOxlgKnvH+8wXt+7p/8ak5Feg==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/css-tree": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-3.2.1.tgz", + "integrity": "sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "mdn-data": "2.27.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" + } + }, + "node_modules/css.escape": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", + "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==", + "dev": true, + "license": "MIT" + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/d3-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz", + "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-shape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz", + "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==", + "license": "ISC", + "dependencies": { + "d3-path": "^3.1.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/data-uri-to-buffer": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-8.0.0.tgz", + "integrity": "sha512-6UHfyCux51b8PTGDgveqtz1tvphBku5DrMKKJbFAZAJOI2zsjDpDoYE1+QGj7FOMS4BdTFNJsJiR3zEB0xH0yQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 20" + } + }, + "node_modules/data-urls": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-8.0.0.tgz", + "integrity": "sha512-JQUCCK+/CAGbGGx618PlFZMXH81Jtj7t73CHv9dd/zVWvxgGT2zLFRjnKb+Ng46GIwcy+f7f88qd4duqllK+WQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-mimetype": "^5.0.0", + "whatwg-url": "^17.1.2" + }, + "engines": { + "node": "^22.14.0 || >=24.0.0" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decimal.js": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz", + "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==", + "dev": true, + "license": "MIT" + }, + "node_modules/default-browser": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.5.1.tgz", + "integrity": "sha512-m1pAzaJgZ/gssEqlOhJkPJp8Xly7QyW6xcrkUa2KKcDeDSEMP7X8xipU3snUcfisTQx0w1AGae+9UtJSfVnXGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "bundle-name": "^4.1.0", + "default-browser-id": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.1.tgz", + "integrity": "sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/degenerator": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-7.0.2.tgz", + "integrity": "sha512-j47S7YEAqh4U3UR355ts14Ipq0Zgn+AaMRdJuoyF7Ry2eSazevFvaviLMp0iOXAq7/FiBs3/33UIkE7rWRoLWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ast-types": "^0.13.4", + "escodegen": "^2.1.0", + "esprima": "^4.0.1" + }, + "engines": { + "node": ">= 20" + }, + "peerDependencies": { + "quickjs-wasi": "^3.0.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/devtools-protocol": { + "version": "0.0.1727723", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1727723.tgz", + "integrity": "sha512-laxmpDN+zItbpy5klVbHqBsZ38O2rC6VwI9W5daM11Pc3Dj2gruc2wwnHW48CB8wYiWHALDkA6vRg92U2cfdLA==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/dom-accessibility-api": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", + "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", + "dev": true, + "license": "MIT" + }, + "node_modules/dot-prop": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-10.2.0.tgz", + "integrity": "sha512-BTJ9aZYL3vCfZlZOBLy9v8TUqWGQ0pzFnygKwFZt5udj6viBoFIBviKPUoZLDCPn1FoXffv6McQFDenrm5Krfw==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^5.0.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/dot-prop/node_modules/type-fest": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-5.10.0.tgz", + "integrity": "sha512-NoSdpq/WEiAg5sjmBkmV/hfxv6HJH4NqPNrqjtSO5CwRmpsDfaf4begxW34KdJykH/l1yHtwBWQkCRdoXO8mPA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "dependencies": { + "tagged-tag": "^1.0.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/dotenv": { + "version": "17.4.2", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.4.2.tgz", + "integrity": "sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "dev": true, + "license": "MIT" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.3.tgz", + "integrity": "sha512-mIteYONiEfc4xWf2F1WXovh1c8npzS00vNeiUPdwFF+QlVJni+gNvpQltLMQhob8rew/bWWc/bGTuUr0EUGt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/enquirer": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/entities": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-9.0.0.tgz", + "integrity": "sha512-oJFNDJg3kTPwAD1cNn2+WmUq4wFoo09npc3Ydf1D7ED4smRiWrsKnaLxykrTWgyGEcusc87P5dxlAleol9kpkg==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=20.19.0" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-module-lexer": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.2.tgz", + "integrity": "sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==", + "dev": true, + "license": "MIT" + }, + "node_modules/es-object-atoms": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "dev": true, + "license": "MIT" + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/escodegen": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/expect-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz", + "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/express": { + "version": "4.22.3", + "resolved": "https://registry.npmjs.org/express/-/express-4.22.3.tgz", + "integrity": "sha512-Bdcs4+3qlpVlx2NRn6fgX2Ue2/gGRaPeawebgclM0ERSCqDpA+owF1fdPwjJUTAJWMTuAaxjDf+hzb0/4eKvvw==", + "dev": true, + "license": "MIT", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "~1.20.5", + "content-disposition": "~0.5.4", + "content-type": "~1.0.4", + "cookie": "~0.7.1", + "cookie-signature": "~1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.3.1", + "fresh": "~0.5.2", + "http-errors": "~2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "~2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "~0.1.13", + "proxy-addr": "~2.0.7", + "qs": "~6.16.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "~0.19.0", + "serve-static": "~1.16.2", + "setprototypeof": "1.2.0", + "statuses": "~2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.9.tgz", + "integrity": "sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/finalhandler": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.2.tgz", + "integrity": "sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "~2.4.1", + "parseurl": "~1.3.3", + "statuses": "~2.0.2", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-east-asian-width": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.7.0.tgz", + "integrity": "sha512-XjH1AECxf0giL2V1aU8vKyRR2ppRUb5c0EvT7zuJTokQ74bNo52zOtghqdWIqrhUD79fo3x0WfKZdOqxF6LG1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-uri": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-8.0.2.tgz", + "integrity": "sha512-H1sU7ppM+Hdb+FJgOTaQ7SHiV7ogUgnb+VgZ55Dz3YzLqZ4bMAClcdveHYt56npM9M7eclEg1j92ZnmSOP9uhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "basic-ftp": "^6.2.4", + "data-uri-to-buffer": "8.0.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/glob": { + "version": "14.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-14.0.6.tgz", + "integrity": "sha512-OwXjVP2svY5EyLY75Vek96C8qK43gqrt4xsZ+qSILdnaEiJPXkd62mcfUSNx/TQErQRdu5uM5kF67sfONragKw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "minimatch": "^11.0.5", + "minipass": "^7.1.3", + "path-scurry": "^3.0.0" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.12", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.12.tgz", + "integrity": "sha512-iuyGF2E4oafQfPsRrG2wtY2ILupMhvtdrhzrxB+0VcjsPpSPttpfYdjnGFGsTi5MaJFjI1jOKHPQ6UTbTj9TAw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-symbols": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/bidi-js/-/bidi-js-1.1.0.tgz", - "integrity": "sha512-fX1Onk0tdVPC7obPWB5EbJ1z7NVhLq4m2xZLq2YXBkxzMXIGRpNMU88n0EPgWseKl12J7zXs7qrDxPK4sRs2fg==", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/html-encoding-sniffer": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-7.0.0.tgz", + "integrity": "sha512-UikN5yr7xsCDAq87Or5or0PAlD3HJJOKVzM05az588WnpDJ4Ux7a2A53Qi6gofGg2/EtvF/H4hCi/TXfCW4Y6w==", "dev": true, "license": "MIT", "dependencies": { - "require-from-string": "^2.0.2" + "@exodus/bytes": "^1.15.1" + }, + "engines": { + "node": "^22.13.0 || >=24.0.0" + } + }, + "node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/http-link-header": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/http-link-header/-/http-link-header-1.1.4.tgz", + "integrity": "sha512-xT3GPW6/ZbGuw4UvwHqErSCEjNUlwbQJuZn9/q5U4WEKfp2kENVCAlousG1zLxHeaQ/ffOHUNpWamvkbBW0eNw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/http-proxy-agent": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-9.1.0.tgz", + "integrity": "sha512-2NxoveTT58mjYT4n3RPTEfCZGLMbidoO8XEieXfpSYxu+PQJ1qpx4ypwH6N+uF9twBPIvRRgvkvW5HUTYWENig==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "9.0.0", + "debug": "^4.3.4", + "proxy-agent-negotiate": "1.1.0" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/https-proxy-agent": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-9.1.0.tgz", + "integrity": "sha512-ag87y7cJJ9/3+GxFr8Oy4O5faDsGRGnBGsJj/YjOSsSx/5eadKLYTMPlzuR6obgoCDDm0abAAZitXXQkMOPSpA==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "9.0.0", + "debug": "^4.3.4", + "proxy-agent-negotiate": "1.1.0" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/image-ssim": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/image-ssim/-/image-ssim-0.2.0.tgz", + "integrity": "sha512-W7+sO6/yhxy83L0G7xR8YAc5Z5QFtYEXXRV6EaE8tuYBZJnA3gVgp3q7X7muhLZVodeb9UfvjSbwt9VJwjIYAg==", + "dev": true, + "license": "MIT" + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/inquirer": { + "version": "8.2.7", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.7.tgz", + "integrity": "sha512-UjOaSel/iddGZJ5xP/Eixh6dY1XghiBw4XK13rCCIJcJfyhhoul/7KhLLUGtebEj6GDYM6Vnx/mVsjx2L/mFIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/external-editor": "^1.0.0", + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.4.1", + "run-async": "^2.4.0", + "rxjs": "^7.5.5", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6", + "wrap-ansi": "^6.0.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/intl-messageformat": { + "version": "10.7.18", + "resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-10.7.18.tgz", + "integrity": "sha512-m3Ofv/X/tV8Y3tHXLohcuVuhWKo7BBq62cqY15etqmLxg2DZ34AGGgQDeR+SCta2+zICb1NX83af0GJmbQ1++g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@formatjs/ecma402-abstract": "2.3.6", + "@formatjs/fast-memoize": "2.2.7", + "@formatjs/icu-messageformat-parser": "2.11.4", + "tslib": "^2.8.0" + } + }, + "node_modules/ip-address": { + "version": "10.7.6", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.7.6.tgz", + "integrity": "sha512-00LYkM6byILa9eQIx6qoaXCM40xTLd56AZ4vyaPW3YTyb49VZYPo5xsiAq4tuQ54GH4R7gVdYScJ1B7B77PuTg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true, + "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-in-ssh": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-in-ssh/-/is-in-ssh-1.0.0.tgz", + "integrity": "sha512-jYa6Q9rH90kR1vKB6NM7qqd1mge3Fx4Dhw5TVlK1MUBqhEOuCagrEHMevNuCcbECmXZ0ThXkRm+Ymr51HwEPAw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-inside-container/node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true, + "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-safe-filename": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-safe-filename/-/is-safe-filename-0.1.1.tgz", + "integrity": "sha512-4SrR7AdnY11LHfDKTZY1u6Ga3RuxZdl3YKWWShO5iyuG5h8QS4GD2tOb04peBJ5I7pXbR+CGBNEhTcwK+FzN3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/isomorphic-fetch": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz", + "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==", + "dev": true, + "license": "MIT", + "dependencies": { + "node-fetch": "^2.6.1", + "whatwg-fetch": "^3.4.1" + } + }, + "node_modules/jpeg-js": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.4.4.tgz", + "integrity": "sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/js-library-detector": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/js-library-detector/-/js-library-detector-6.7.0.tgz", + "integrity": "sha512-c80Qupofp43y4cJ7+8TTDN/AsDwLi5oOm/plBrWI+iQt485vKXCco+yVmOwEgdo9VOdsYTuV0UlTeetVPTriXA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-5.5.0.tgz", + "integrity": "sha512-paNr4LFIFPjeeSmwNYdrb8FafLLG/Cr2Af3GjbsHJ5CxIjH4r0c2emlmRdAtpPAieP1gRVzk6buBbVP5gBMGAg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], + "license": "MIT", + "dependencies": { + "argparse": "^3.0.3" + }, + "bin": { + "js-yaml": "bin/js-yaml.mjs" + } + }, + "node_modules/jsdom": { + "version": "30.1.3", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-30.1.3.tgz", + "integrity": "sha512-hQMUPvRgN7KxsfIytDQji7bimuJeRQa6Qo5+iuiZQk5CafeRxLIA10/cG5YCBFNpD9RO3oqIiN4CO1Y44kxqXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@asamuzakjp/css-color": "^7.1.3", + "@asamuzakjp/dom-selector": "^10.0.3", + "@bramus/specificity": "^2.4.2", + "@csstools/css-syntax-patches-for-csstree": "^1.1.15", + "@exodus/bytes": "^1.16.0", + "css-tree": "^3.2.1", + "data-urls": "^8.0.0", + "decimal.js": "^10.6.0", + "html-encoding-sniffer": "^7.0.0", + "is-potential-custom-element-name": "^1.0.1", + "lru-cache": "^11.5.3", + "parse5": "^8.0.1", + "saxes": "^6.0.0", + "tough-cookie": "^6.0.2", + "undici": "^8.12.1", + "w3c-xmlserializer": "^6.0.0", + "webidl-conversions": "^8.0.1", + "whatwg-mimetype": "^5.0.0", + "whatwg-url": "^17.2.0", + "xml-name-validator": "^5.0.0" + }, + "engines": { + "node": "^22.22.2 || ^24.15.0 || >=26.0.0" + }, + "peerDependencies": { + "canvas": "^3.2.3" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } } }, - "node_modules/chai": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-6.3.0.tgz", - "integrity": "sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==", + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true, - "license": "MIT", + "license": "MIT" + }, + "node_modules/lighthouse": { + "version": "13.6.0", + "resolved": "https://registry.npmjs.org/lighthouse/-/lighthouse-13.6.0.tgz", + "integrity": "sha512-2/HUPUpQyGm01VEgYCUjSlNZY7Zkhk1v3QI4c7UTbnaoRB7HF0qYMPzzaiidNf5iqw5wnmtm9LpGawKKqCfLmg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@paulirish/trace_engine": "0.0.67", + "@sentry/node": "^11.8.0", + "ajv-formats": "^3.0.1", + "axe-core": "4.14.0", + "chrome-launcher": "^1.2.2", + "configstore": "^8.0.0", + "csp_evaluator": "1.1.8", + "devtools-protocol": "0.0.1727723", + "enquirer": "^2.3.6", + "http-link-header": "^1.1.1", + "intl-messageformat": "^10.5.3", + "js-library-detector": "^6.7.0", + "lighthouse-logger": "^2.0.2", + "lighthouse-stack-packs": "1.12.3", + "open": "^11.0.4", + "puppeteer-core": "^25.16.0", + "robots-parser": "^3.0.1", + "speedline-core": "^1.4.3", + "third-party-web": "^0.30.0", + "tldts-icann": "^7.4.19", + "yargs": "^18.2.0", + "yargs-parser": "^22.0.0" + }, + "bin": { + "chrome-debug": "core/scripts/manual-chrome-launcher.js", + "lighthouse": "cli/index.js", + "smokehouse": "cli/test/smokehouse/frontends/smokehouse-bin.js" + }, "engines": { - "node": ">=18" + "node": ">=22.19" } }, - "node_modules/cookie-es": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/cookie-es/-/cookie-es-3.1.1.tgz", - "integrity": "sha512-UaXxwISYJPTr9hwQxMFYZ7kNhSXboMXP+Z3TRX6f1/NyaGPfuNUZOWP1pUEb75B2HjfklIYLVRfWiFZJyC6Npg==", - "license": "MIT" + "node_modules/lighthouse-logger": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/lighthouse-logger/-/lighthouse-logger-1.2.0.tgz", + "integrity": "sha512-wzUvdIeJZhRsG6gpZfmSCfysaxNEr43i+QT+Hie94wvHDKFLi4n7C2GqZ4sTC+PH5b5iktmXJvU87rWvhP3lHw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "debug": "^2.6.8", + "marky": "^1.2.0" + } }, - "node_modules/css-tree": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-3.2.1.tgz", - "integrity": "sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==", + "node_modules/lighthouse-logger/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "license": "MIT", "dependencies": { - "mdn-data": "2.27.1", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" + "ms": "2.0.0" } }, - "node_modules/css.escape": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", - "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==", + "node_modules/lighthouse-logger/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true, "license": "MIT" }, - "node_modules/csstype": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", - "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", - "devOptional": true, - "license": "MIT" + "node_modules/lighthouse-stack-packs": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/lighthouse-stack-packs/-/lighthouse-stack-packs-1.12.3.tgz", + "integrity": "sha512-d8IsOpE83kbANgnM+Tp8+x6HcMpX9o2ITBiUERssgzAIFdZCQzs/f4k6D0DLQTE59enml9mbAOU52Wu35exWtg==", + "dev": true, + "license": "Apache-2.0" }, - "node_modules/d3-path": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz", - "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==", - "license": "ISC", + "node_modules/lighthouse/node_modules/ansi-regex": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.6.0.tgz", + "integrity": "sha512-XZ5apbzreCbXSKwPjJstu8R0zOi247w3XYwWxtwBXgpZrCyc1Ka7p9/xY0A9/diMewmHbEKz+FIraWaEWjlN5g==", + "dev": true, + "license": "MIT", "engines": { "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/d3-shape": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz", - "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==", - "license": "ISC", - "dependencies": { - "d3-path": "^3.1.0" - }, + "node_modules/lighthouse/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", "engines": { "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/data-urls": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-8.0.0.tgz", - "integrity": "sha512-JQUCCK+/CAGbGGx618PlFZMXH81Jtj7t73CHv9dd/zVWvxgGT2zLFRjnKb+Ng46GIwcy+f7f88qd4duqllK+WQ==", + "node_modules/lighthouse/node_modules/chrome-launcher": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/chrome-launcher/-/chrome-launcher-1.2.3.tgz", + "integrity": "sha512-IpQuNUYnpXXq3VBRJInM7zTZDiAp/cu+zy0X74NjyQtFcZIQBbI64i0PYQO25wNwgmgw2cPBYitVmFz53N11Rg==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "whatwg-mimetype": "^5.0.0", - "whatwg-url": "^17.1.2" + "@types/node": "*", + "escape-string-regexp": "^4.0.0", + "is-wsl": "^2.2.0", + "lighthouse-logger": "^2.0.1" + }, + "bin": { + "print-chrome-path": "bin/print-chrome-path.cjs" }, "engines": { - "node": "^22.14.0 || >=24.0.0" + "node": ">=12.13.0" } }, - "node_modules/decimal.js": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz", - "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==", + "node_modules/lighthouse/node_modules/cliui": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", + "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", "dev": true, - "license": "MIT" + "license": "ISC", + "dependencies": { + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=20" + } }, - "node_modules/dequal": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", - "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "node_modules/lighthouse/node_modules/cliui/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", "dev": true, "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, "engines": { - "node": ">=6" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/detect-libc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", - "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "node_modules/lighthouse/node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/dom-accessibility-api": { - "version": "0.5.16", - "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", - "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", + "node_modules/lighthouse/node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", "dev": true, "license": "MIT" }, - "node_modules/entities": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-9.0.0.tgz", - "integrity": "sha512-oJFNDJg3kTPwAD1cNn2+WmUq4wFoo09npc3Ydf1D7ED4smRiWrsKnaLxykrTWgyGEcusc87P5dxlAleol9kpkg==", + "node_modules/lighthouse/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT", "engines": { - "node": ">=20.19.0" + "node": ">=10" }, "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/es-module-lexer": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.2.tgz", - "integrity": "sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==", - "dev": true, - "license": "MIT" - }, - "node_modules/estree-walker": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", - "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "node_modules/lighthouse/node_modules/lighthouse-logger": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lighthouse-logger/-/lighthouse-logger-2.0.2.tgz", + "integrity": "sha512-vWl2+u5jgOQuZR55Z1WM0XDdrJT6mzMP8zHUct7xTlWhuQs+eV0g+QL0RQdFjT54zVmbhLCP8vIVpy1wGn/gCg==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "@types/estree": "^1.0.0" + "debug": "^4.4.1", + "marky": "^1.2.2" } }, - "node_modules/expect-type": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz", - "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==", + "node_modules/lighthouse/node_modules/open": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/open/-/open-11.0.4.tgz", + "integrity": "sha512-++Zlftm0kVLPmzC06t6epuWmcRMDbI4z5P3NNX979WA/k23+NtSOynEGzsVfZwguKw2mi5umVgnBlJQMwRz4Pg==", "dev": true, - "license": "Apache-2.0", + "license": "MIT", + "dependencies": { + "default-browser": "^5.5.1", + "define-lazy-prop": "^3.0.0", + "is-in-ssh": "^1.0.0", + "is-inside-container": "^1.0.0", + "powershell-utils": "^0.2.1", + "wsl-utils": "^1.0.0" + }, "engines": { - "node": ">=12.0.0" + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "node_modules/lighthouse/node_modules/string-width": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.3.0.tgz", + "integrity": "sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ==", "dev": true, "license": "MIT", - "engines": { - "node": ">=12.0.0" + "dependencies": { + "get-east-asian-width": "^1.5.0", + "strip-ansi": "^7.1.2" }, - "peerDependencies": { - "picomatch": "^3 || ^4" + "engines": { + "node": ">=20" }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "node_modules/lighthouse/node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", "dev": true, - "hasInstallScript": true, "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], + "dependencies": { + "ansi-regex": "^6.2.2" + }, "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/html-encoding-sniffer": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-7.0.0.tgz", - "integrity": "sha512-UikN5yr7xsCDAq87Or5or0PAlD3HJJOKVzM05az588WnpDJ4Ux7a2A53Qi6gofGg2/EtvF/H4hCi/TXfCW4Y6w==", + "node_modules/lighthouse/node_modules/wrap-ansi": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", "dev": true, "license": "MIT", "dependencies": { - "@exodus/bytes": "^1.15.1" + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": "^22.13.0 || >=24.0.0" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "node_modules/lighthouse/node_modules/wrap-ansi/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", "dev": true, "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, "engines": { - "node": ">=8" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-potential-custom-element-name": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", - "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "node_modules/lighthouse/node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, - "license": "MIT" + "license": "ISC", + "engines": { + "node": ">=10" + } }, - "node_modules/jsdom": { - "version": "30.1.3", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-30.1.3.tgz", - "integrity": "sha512-hQMUPvRgN7KxsfIytDQji7bimuJeRQa6Qo5+iuiZQk5CafeRxLIA10/cG5YCBFNpD9RO3oqIiN4CO1Y44kxqXg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@asamuzakjp/css-color": "^7.1.3", - "@asamuzakjp/dom-selector": "^10.0.3", - "@bramus/specificity": "^2.4.2", - "@csstools/css-syntax-patches-for-csstree": "^1.1.15", - "@exodus/bytes": "^1.16.0", - "css-tree": "^3.2.1", - "data-urls": "^8.0.0", - "decimal.js": "^10.6.0", - "html-encoding-sniffer": "^7.0.0", - "is-potential-custom-element-name": "^1.0.1", - "lru-cache": "^11.5.3", - "parse5": "^8.0.1", - "saxes": "^6.0.0", - "tough-cookie": "^6.0.2", - "undici": "^8.12.1", - "w3c-xmlserializer": "^6.0.0", - "webidl-conversions": "^8.0.1", - "whatwg-mimetype": "^5.0.0", - "whatwg-url": "^17.2.0", - "xml-name-validator": "^5.0.0" + "node_modules/lighthouse/node_modules/yargs": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.2.0.tgz", + "integrity": "sha512-9OpKOLeaoNFecEp7P6iYbzze/5CqWoH7N3SMs/6y1XF4nMvFMspEGZzJ6uFi9MmQwXhyzqYoSEKO3tvA3Z/o2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^9.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "string-width": "^8.2.1", + "y18n": "^5.0.5", + "yargs-parser": "^22.0.0" }, "engines": { - "node": "^22.22.2 || ^24.15.0 || >=26.0.0" - }, - "peerDependencies": { - "canvas": "^3.2.3" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } + "node": "^20.19.0 || ^22.12.0 || >=23" + } + }, + "node_modules/lighthouse/node_modules/yargs-parser": { + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", + "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" } }, "node_modules/lightningcss": { @@ -2159,6 +5148,43 @@ "url": "https://opencollective.com/parcel" } }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash": { + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", + "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/lru-cache": { "version": "11.5.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.3.tgz", @@ -2184,59 +5210,476 @@ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.4.5.tgz", "integrity": "sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w==", "dev": true, - "license": "MIT", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.6.0" + } + }, + "node_modules/magicast": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.5.5.tgz", + "integrity": "sha512-UicdXN8zQ3JHlxVq+28afMXPr1z7WNY6+7EJnzTdQWkTAlMLF5fNCCKxJHBQwGaNGR11581EiQmQzx73+MvszA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7", + "source-map-js": "^1.2.1" + } + }, + "node_modules/marky": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/marky/-/marky-1.3.0.tgz", + "integrity": "sha512-ocnPZQLNpvbedwTy9kNrQEsknEfgvcLMvOtz3sFeWApDq1MXH1TqkCIx58xlpESsfwQOnuBO9beyQuNGzVvuhQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/mdn-data": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.27.1.tgz", + "integrity": "sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==", + "dev": true, + "license": "CC0-1.0" + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true, + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types/node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/minimatch": { + "version": "11.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-11.0.9.tgz", + "integrity": "sha512-KCFkfyjqerNlSstjlhIGNXIKZGA/6O4V4RlhZ+Dsr621SPPw0mzlypE9D9ZOoPiVefHID+j7/XuMMlqfD/F60Q==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/nonrecursive-glob-match": "^1.1.0", + "brace-expansion": "^5.0.12" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mitt": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", + "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==", + "dev": true, + "license": "MIT" + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/modern-tar": { + "version": "0.8.6", + "resolved": "https://registry.npmjs.org/modern-tar/-/modern-tar-0.8.6.tgz", + "integrity": "sha512-LYSks0tNVqbtez/9OB0YFP6qLRSqkdAxJWOQpVaR67lNTbj2zNLyYpowkRMia5lXLCZKzxwoxkxH2MbbBR2aEg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true, + "license": "ISC" + }, + "node_modules/nanoid": { + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", + "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/negotiator": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz", + "integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/netmask": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.1.2.tgz", + "integrity": "sha512-In/qjEgPWP3EEKRBrATKSHRCcempKN/gUl97rrB1mTreVQfvPGthTJVwNXwbQHtIzzLf1bYyh8M50xpeYk0r6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-fetch/node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-fetch/node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/node-fetch/node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/object-inspect": { + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.14.0.tgz", + "integrity": "sha512-IVgHNlp/jwQX271+Xzoq9LZNTWXxZK+cEOrGBOBxXNbn7fapnZ+Ts6TVMgNOuAezwG2wdtnMX97tTPK6VEnuOQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/obug": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/obug/-/obug-3.0.0.tgz", + "integrity": "sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw==", + "dev": true, + "funding": [ + "https://github.com/sponsors/sxzz", + "https://opencollective.com/debug" + ], + "license": "MIT", + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/on-finished": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.2.tgz", + "integrity": "sha512-ATWUv387i+nLD49EiDoOft5scf32Vsdz3ktrQJG9bi7jRFmaXTssvyvj1EmeKVVgvesbqUtvQQvaS2TpTukAZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/on-headers": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz", + "integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", "dependencies": { - "@jridgewell/sourcemap-codec": "^1.6.0" + "wrappy": "1" } }, - "node_modules/mdn-data": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.27.1.tgz", - "integrity": "sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==", + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, - "license": "CC0-1.0" + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "node_modules/min-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", - "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "node_modules/open": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", + "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", "dev": true, "license": "MIT", + "dependencies": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + }, "engines": { - "node": ">=4" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/nanoid": { - "version": "3.3.20", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", - "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" }, "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/obug": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/obug/-/obug-3.0.0.tgz", - "integrity": "sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw==", + "node_modules/oxc-parser": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/oxc-parser/-/oxc-parser-0.152.0.tgz", + "integrity": "sha512-ZztsZgaCWmPeKYMdoTT5e0oV/oxD1NeLWNR3kAtr/G707cUPYaaozRlVDHLCGnszHJRszN9mJwmPNpqgwloC0A==", "dev": true, - "funding": [ - "https://github.com/sponsors/sxzz", - "https://opencollective.com/debug" - ], "license": "MIT", + "dependencies": { + "@oxc-project/types": "^0.152.0" + }, "engines": { - "node": ">=12.20.0" + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/sponsors/oxc-project" + }, + "optionalDependencies": { + "@oxc-parser/binding-android-arm-eabi": "0.152.0", + "@oxc-parser/binding-android-arm64": "0.152.0", + "@oxc-parser/binding-darwin-arm64": "0.152.0", + "@oxc-parser/binding-darwin-x64": "0.152.0", + "@oxc-parser/binding-freebsd-x64": "0.152.0", + "@oxc-parser/binding-linux-arm-gnueabihf": "0.152.0", + "@oxc-parser/binding-linux-arm-musleabihf": "0.152.0", + "@oxc-parser/binding-linux-arm64-gnu": "0.152.0", + "@oxc-parser/binding-linux-arm64-musl": "0.152.0", + "@oxc-parser/binding-linux-ppc64-gnu": "0.152.0", + "@oxc-parser/binding-linux-riscv64-gnu": "0.152.0", + "@oxc-parser/binding-linux-riscv64-musl": "0.152.0", + "@oxc-parser/binding-linux-s390x-gnu": "0.152.0", + "@oxc-parser/binding-linux-x64-gnu": "0.152.0", + "@oxc-parser/binding-linux-x64-musl": "0.152.0", + "@oxc-parser/binding-openharmony-arm64": "0.152.0", + "@oxc-parser/binding-win32-arm64-msvc": "0.152.0", + "@oxc-parser/binding-win32-ia32-msvc": "0.152.0", + "@oxc-parser/binding-win32-x64-msvc": "0.152.0" + } + }, + "node_modules/oxc-parser/node_modules/@oxc-project/types": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.152.0.tgz", + "integrity": "sha512-oM/5rLBm2tPkg0iBgkH/FOeR3PCDpY19GTgAZjMFM8h9WI9VW7cLgzp6nwtarYKmovavIQZ+Fe/RKX/8C8O/Rw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/oxc-project" } }, "node_modules/oxlint": { @@ -2288,6 +5731,82 @@ } } }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/pac-proxy-agent": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-9.1.1.tgz", + "integrity": "sha512-P30j9cFU4vcu9TKjSVAwdzb+tY8ktfAwsVvxFSXmsoe09I4yZV52JAO8Z/Fptpi9VWxFTluDgqzGfgvYJlTzjg==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "9.0.0", + "debug": "^4.3.4", + "get-uri": "8.0.2", + "http-proxy-agent": "9.1.0", + "https-proxy-agent": "9.1.0", + "pac-resolver": "9.0.2", + "quickjs-wasi": "^3.0.0", + "socks-proxy-agent": "10.1.0" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/pac-resolver": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-9.0.2.tgz", + "integrity": "sha512-FyLebKd2X1SzQAc6P+AAgWRGnAgEAYEwn1oJucBIdQivJ50dV3Lndjqso4mebnHiLaYeHtVaDfSL33BJYLi7QA==", + "dev": true, + "license": "MIT", + "dependencies": { + "degenerator": "7.0.2", + "netmask": "^2.0.2" + }, + "engines": { + "node": ">= 20" + }, + "peerDependencies": { + "quickjs-wasi": "^3.0.0" + } + }, "node_modules/parse5": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/parse5/-/parse5-8.1.0.tgz", @@ -2301,6 +5820,60 @@ "url": "https://github.com/inikulin/parse5?sponsor=1" } }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-scurry": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-3.0.0.tgz", + "integrity": "sha512-1pTbQqH1wIwMi/eleQ5leFTTCkzFsPcgXNjwOA8YGGW/W4/kHT3dssE7Z6NH+zuqNLOzOB0uaD61yl7cAcVhgg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.13.tgz", + "integrity": "sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA==", + "dev": true, + "license": "MIT" + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -2350,74 +5923,238 @@ "node": ">=20" } }, - "node_modules/postcss": { - "version": "8.5.32", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.32.tgz", - "integrity": "sha512-LJlKCCAUFKOuZxipUdYw1NzIITEsPcgyOG9LkvRJvuKj/bRzbuRY0ARXvL0pWGpsZvn8jku+LMep2eU0seHp8g==", + "node_modules/postcss": { + "version": "8.5.32", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.32.tgz", + "integrity": "sha512-LJlKCCAUFKOuZxipUdYw1NzIITEsPcgyOG9LkvRJvuKj/bRzbuRY0ARXvL0pWGpsZvn8jku+LMep2eU0seHp8g==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.20", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/powershell-utils": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/powershell-utils/-/powershell-utils-0.2.1.tgz", + "integrity": "sha512-C+y9x90UElAddDZmV4qOx9W53B61PO7cIqWz2dQsWlwswuq4mr8NEwytdGKboYbQlGZ3awrkTeNvcZiZNHnQ8A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/prettier": { + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.10.tgz", + "integrity": "sha512-skGHTH1Yb9QvaTC4hWnRTzEYtCpApF0UMBPz+t/0ZPzP8ihefo/btKd+QA7pUE0fEwA1SbS/NmhyEcstdXOIdA==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/pretty-format": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.8.tgz", + "integrity": "sha512-5nnx0yGyVUcY6t9RnWcARWtwT9F1D8O9rt08htPvnd49W1IgZtmLkhu9WfMzQj1cFxjHIO6connUNVW5k7AVyQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/proxy-agent": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-8.0.3.tgz", + "integrity": "sha512-SYjxPOWaz3CrRZxqgj3A/261L3ZSCcWzM0dFsxNP27m43/KiHWtUmtHZFsHvh7fn11E/SmBfcNsWcWqMhZ6fAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "9.0.0", + "debug": "^4.3.4", + "http-proxy-agent": "9.1.0", + "https-proxy-agent": "9.1.0", + "lru-cache": "^7.14.1", + "pac-proxy-agent": "9.1.1", + "proxy-from-env": "^2.0.0", + "socks-proxy-agent": "10.1.0" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/proxy-agent-negotiate": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-agent-negotiate/-/proxy-agent-negotiate-1.1.0.tgz", + "integrity": "sha512-N8IBcM3UgCVzz2L2Lqv8DVntDnnC8/hiV4nEDUPkqq72TPUgYWjQc+bdZlBPZK9LzPAvOY//gAt0S0DApoOXWQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 20" + }, + "peerDependencies": { + "kerberos": "^2.0.0" + }, + "peerDependenciesMeta": { + "kerberos": { + "optional": true + } + } + }, + "node_modules/proxy-agent/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/proxy-from-env": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/puppeteer-core": { + "version": "25.18.1", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-25.18.1.tgz", + "integrity": "sha512-C0wHOJHDfAggGBtN5uUfsJGpeSKtPL5jzhgQYDuz4XKeOG1FUkxeZI2M5yK7AUyrdHO+RgDuiCfjmOpcw3PYTA==", "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "nanoid": "^3.3.20", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.2" + "@puppeteer/browsers": "3.2.7", + "chromium-bidi": "157.0.8090-0", + "devtools-protocol": "0.0.1717327", + "typed-query-selector": "^2.12.3", + "webdriver-bidi-protocol": "1.0.2", + "ws": "^8.22.1" }, "engines": { - "node": "^10 || ^12 || >=14" + "node": ">=22.12.0" } }, - "node_modules/prettier": { - "version": "3.9.10", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.10.tgz", - "integrity": "sha512-skGHTH1Yb9QvaTC4hWnRTzEYtCpApF0UMBPz+t/0ZPzP8ihefo/btKd+QA7pUE0fEwA1SbS/NmhyEcstdXOIdA==", + "node_modules/puppeteer-core/node_modules/devtools-protocol": { + "version": "0.0.1717327", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1717327.tgz", + "integrity": "sha512-3RDLDzyvv8XAYf1L+TL1og0EEk0eOW1Jn0yi88uG6Bj8fUKO1ZKfgNtwbJkqf5SWdPDS4VGEPxwdUWz78V6Xcg==", "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" + "license": "BSD-3-Clause" + }, + "node_modules/qs": { + "version": "6.16.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.16.2.tgz", + "integrity": "sha512-VYdnB5S7/0IeXzBacUtwNAaM6d7Y/PgYnNC7bJCI6meqA/OgnsQbZMtVW8Dt2D1PHgbHGtYmhSoEIgvt7xZ2ZA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "es-define-property": "^1.0.1", + "side-channel": "^1.1.1" }, "engines": { - "node": ">=14" + "node": ">=0.6" }, "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/pretty-format": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", - "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "node_modules/quickjs-wasi": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/quickjs-wasi/-/quickjs-wasi-3.7.0.tgz", + "integrity": "sha512-6nOShBtCglrQL6yH+hptIfEdA1WlSmvY/Mm5Ypn9IvtsaDsrYIg8x+xoIXQt02w66a0f1eLTAj1lhfgAbJ4WVw==", + "dev": true, + "license": "MIT" + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", "dev": true, "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">= 0.6" } }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "node_modules/raw-body": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz", + "integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==", "dev": true, "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "unpipe": "~1.0.0" + }, "engines": { - "node": ">=6" + "node": ">= 0.8" } }, "node_modules/react": { @@ -2478,6 +6215,21 @@ } } }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/redent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", @@ -2492,6 +6244,16 @@ "node": ">=8" } }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/require-from-string": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", @@ -2502,6 +6264,107 @@ "node": ">=0.10.0" } }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true, + "license": "ISC" + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/rimraf/node_modules/brace-expansion": { + "version": "1.1.22", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.22.tgz", + "integrity": "sha512-CKLDTuSsN0+r1ThM0WkzzBI7dnPI6xEGfa/JnVYIK9JNBA1N1NyPwXVHor//NKD/y3sDxp764sZdLhFK7pH8XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/robots-parser": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/robots-parser/-/robots-parser-3.1.1.tgz", + "integrity": "sha512-ltsI9/0CiaaZpnJeLT4vwK86cW1AfSXoBgnQHIaCtBrg4K8UckV7HakNzWfG8UvT2hqwrLZ1YWilWMEiynBg6g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/rolldown": { "version": "1.2.16", "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.16.tgz", @@ -2536,6 +6399,67 @@ "@rolldown/binding-win32-x64-msvc": "1.2.16" } }, + "node_modules/run-applescript": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz", + "integrity": "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/rxjs": { + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, "node_modules/saxes": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", @@ -2549,11 +6473,231 @@ "node": ">=v12.22.7" } }, - "node_modules/scheduler": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.28.0.tgz", - "integrity": "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw==", - "license": "MIT" + "node_modules/scheduler": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.28.0.tgz", + "integrity": "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw==", + "license": "MIT" + }, + "node_modules/send": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.2.tgz", + "integrity": "sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "~0.5.2", + "http-errors": "~2.0.1", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "~2.4.1", + "range-parser": "~1.2.1", + "statuses": "~2.0.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, + "node_modules/sentry": { + "version": "0.50.0", + "resolved": "https://registry.npmjs.org/sentry/-/sentry-0.50.0.tgz", + "integrity": "sha512-2BCdoK4xO3mN4c0QTXaMtJBJ9rjL5v1VawaV7Wd605hVWVrpZTipLbjGHEFavS8IliI0W68TGi8CuScbHALPjA==", + "dev": true, + "license": "FSL-1.1-Apache-2.0", + "bin": { + "sentry": "dist/bin.cjs" + }, + "engines": { + "node": ">=20.0" + } + }, + "node_modules/serve-static": { + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.3.tgz", + "integrity": "sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "~0.19.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "dev": true, + "license": "ISC" + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true, + "license": "ISC" + }, + "node_modules/side-channel": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz", + "integrity": "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.4", + "side-channel-list": "^1.0.1", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz", + "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.8.11", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.11.tgz", + "integrity": "sha512-2H/uQ7+SNP0hK16RorTak0mWrFoqo4AnAVGSUl2dT07obgWdWt9grml+VDl1LklgUOPWM4Abo0u86Cvp8vFjYw==", + "dev": true, + "license": "MIT", + "dependencies": { + "ip-address": "^10.1.1", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-10.1.0.tgz", + "integrity": "sha512-WlMj/67cEJ6MDI1OcsnjuYKDNDoyPCCYZ249kuuXPiMDw9F8PXkVaQ7YWu3siTydfQ/4BEZcvGzu+aYvz7dDCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "9.0.0", + "debug": "^4.3.4", + "socks": "^2.8.3" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "optional": true, + "engines": { + "node": ">=0.10.0" + } }, "node_modules/source-map-js": { "version": "1.2.2", @@ -2565,6 +6709,31 @@ "node": ">=0.10.0" } }, + "node_modules/speedline-core": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/speedline-core/-/speedline-core-1.4.3.tgz", + "integrity": "sha512-DI7/OuAUD+GMpR6dmu8lliO2Wg5zfeh+/xsdyJZCzd8o5JgFUjCeLsBDuZjIQJdwXS3J0L/uZYrELKYqx+PXog==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "image-ssim": "^0.2.0", + "jpeg-js": "^0.4.1" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/std-env": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.3.0.tgz", @@ -2572,6 +6741,44 @@ "dev": true, "license": "MIT" }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-indent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", @@ -2585,6 +6792,63 @@ "node": ">=8" } }, + "node_modules/stubborn-fs": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/stubborn-fs/-/stubborn-fs-2.0.0.tgz", + "integrity": "sha512-Y0AvSwDw8y+nlSNFXMm2g6L51rBGdAQT20J3YSOqxC53Lo3bjWRtr2BKcfYoAf352WYpsZSTURrA0tqhfgudPA==", + "dev": true, + "license": "MIT", + "dependencies": { + "stubborn-utils": "^1.0.1" + } + }, + "node_modules/stubborn-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stubborn-utils/-/stubborn-utils-1.0.2.tgz", + "integrity": "sha512-zOh9jPYI+xrNOyisSelgym4tolKTJCQd5GBhK0+0xJvcYDcwlOoxF/rnFKQ2KRZknXSG9jWAp66fwP6AxN9STg==", + "dev": true, + "license": "MIT" + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tagged-tag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/tagged-tag/-/tagged-tag-1.0.0.tgz", + "integrity": "sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/third-party-web": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/third-party-web/-/third-party-web-0.30.0.tgz", + "integrity": "sha512-p+PfyL5U0ediGzvwPzMSdD9MnC8rHW6nWJJVLIQvqN7RsSqfaZ+7n4c9GILqH36EYR0eXB9CzAeCRnKFr/9uJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true, + "license": "MIT" + }, "node_modules/tinybench": { "version": "6.2.3", "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-6.2.3.tgz", @@ -2622,6 +6886,16 @@ "url": "https://github.com/sponsors/SuperchupuDev" } }, + "node_modules/tinyrainbow": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.2.0.tgz", + "integrity": "sha512-LgO3D9yZJjApUiuUfl9iFAwrtaX4+lok3wJIqttGoKCHlWUqHqbQpnxCf82L8FjgKsh4iGo78hqJwgL8F6To2A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/tldts": { "version": "7.4.19", "resolved": "https://registry.npmjs.org/tldts/-/tldts-7.4.19.tgz", @@ -2636,12 +6910,32 @@ } }, "node_modules/tldts-core": { - "version": "7.4.20", - "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.4.20.tgz", - "integrity": "sha512-C630TWXZCZmLq0F2bW4QqwnaaxCQ/svpAqvJwnC4JvgEM5ohhBnGsEzTLSOXcN+xjz+kEaHS5uoWIw2klnqd0A==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.5.5.tgz", + "integrity": "sha512-rEJz/8cJFY/bdF354gl14yxavbrIbvM+FcbkYVQ6CSCMQTJdUFUIm39TTWSiGPvcpQh7/F6qHrD3SkwwdgtDCw==", "dev": true, "license": "MIT" }, + "node_modules/tldts-icann": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/tldts-icann/-/tldts-icann-7.5.5.tgz", + "integrity": "sha512-B5ayzgkdJ7MDN15K3zxpbe/+YCTcZUBwYDAuc9z+pRXncHJXBG/RoduEEHa4Qb/MKk1kJETkchk8S/eaKHOH7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "tldts-core": "^7.5.5" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, "node_modules/tough-cookie": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.0.2.tgz", @@ -2668,6 +6962,57 @@ "node": "^22.14.0 || >=24.0.0" } }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/tslib": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.9.1.tgz", + "integrity": "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA==", + "dev": true, + "license": "0BSD" + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typed-query-selector": { + "version": "2.12.4", + "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.4.tgz", + "integrity": "sha512-lF6/OY655DSWZeuNovde8TZhju6QyC0Xtav57b07oZQ1EQvfSowA3+WfLEhvFJOc9sVfAtW5hie1lGIppOqbpQ==", + "dev": true, + "license": "MIT" + }, "node_modules/typescript": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-7.0.2.tgz", @@ -2720,6 +7065,57 @@ "dev": true, "license": "MIT" }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.3.tgz", + "integrity": "sha512-Sc5u1VVln93y1Xnz4R+CunOZc7R9LUcTmhj7Rc7Eg3HVcf7rVn2FOoa812fe0W8p3jD7xeoGSYbfqCGGH2B6xw==", + "dev": true, + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist-node/bin/uuid" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/vite": { "version": "8.3.5", "resolved": "https://registry.npmjs.org/vite/-/vite-8.3.5.tgz", @@ -2799,22 +7195,22 @@ } }, "node_modules/vitest": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-5.0.5.tgz", - "integrity": "sha512-cPODOMF8YnkiiYtDdHo6n4wWmBrOBBbOIYH2d33M4l3CdNn72h+qMmO6uXffUN6A5AZFXNND/d+krS9mgkXRfg==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-5.1.1.tgz", + "integrity": "sha512-trVmzUFOSraCZcI3uZIMD5FqBh4atFkC/XuJP/IU7qtyQay0FCs3Ia+0QiQ2JJwGyWG/xrcBoJNel2+O7kEZ0g==", "dev": true, "license": "MIT", "dependencies": { "@types/chai": "^5.2.2", - "@vitest/mocker": "5.0.5", + "@vitest/mocker": "5.1.1", "chai": "^6.3.0", "es-module-lexer": "^2.3.2", "expect-type": "^1.4.0", - "magic-string": "^1.4.3", + "magic-string": "^1.4.5", "obug": "^3.0.0", "picomatch": "^4.0.7", "std-env": "^4.3.0", - "tinybench": "^6.2.2", + "tinybench": "^6.2.3", "tinyexec": "^1.3.1", "tinyglobby": "^0.2.17", "why-is-node-running": "3.2.1" @@ -2832,12 +7228,12 @@ "@edge-runtime/vm": "*", "@opentelemetry/api": "^1.9.0", "@types/node": "^22.0.0 || >=24.0.0", - "@vitest/browser-playwright": "5.0.5", - "@vitest/browser-preview": "5.0.5", + "@vitest/browser-playwright": "5.1.1", + "@vitest/browser-preview": "5.1.1", "@vitest/browser-webdriverio": "^5.0.0-beta.5 || >=5.0.0", - "@vitest/coverage-istanbul": "5.0.5", - "@vitest/coverage-v8": "5.0.5", - "@vitest/ui": "5.0.5", + "@vitest/coverage-istanbul": "5.1.1", + "@vitest/coverage-v8": "5.1.1", + "@vitest/ui": "5.1.1", "happy-dom": "*", "jsdom": "*", "vite": "^6.4.0 || ^7.0.0 || ^8.0.0" @@ -2894,6 +7290,23 @@ "node": "^22.22.2 || ^24.15.0 || >=26.0.0" } }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "license": "MIT", + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/webdriver-bidi-protocol": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/webdriver-bidi-protocol/-/webdriver-bidi-protocol-1.0.2.tgz", + "integrity": "sha512-nghazPI+J5RrLZ+qb6vMjC6l1/tnwqr2muVEax4Ufd6eIdcjeqNnhLsAxTG9s+7Zf4umgf0DrEwDC8CoU91nAA==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/webidl-conversions": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-8.0.1.tgz", @@ -2904,6 +7317,13 @@ "node": ">=20" } }, + "node_modules/whatwg-fetch": { + "version": "3.6.20", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz", + "integrity": "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==", + "dev": true, + "license": "MIT" + }, "node_modules/whatwg-mimetype": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-5.0.0.tgz", @@ -2929,6 +7349,20 @@ "node": "^22.14.0 || >=24.0.0" } }, + "node_modules/when-exit": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/when-exit/-/when-exit-2.1.5.tgz", + "integrity": "sha512-VGkKJ564kzt6Ms1dbgPP/yuIoQCrsFAnRbptpC5wOEsDaNsbCB2bnfnaA8i/vRs5tjUSEOtIuvl9/MyVsvQZCg==", + "dev": true, + "license": "MIT" + }, + "node_modules/which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", + "dev": true, + "license": "ISC" + }, "node_modules/why-is-node-running": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-3.2.1.tgz", @@ -2942,6 +7376,112 @@ "node": ">=20.11" } }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/ws": { + "version": "8.23.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.23.0.tgz", + "integrity": "sha512-wCkmX8QMOrKjgO8HW2WyDbTSGeqkocxgDzS9iR79rEAexty6/2qzilx3Ag8Tqf9ykop3irLKle0MtVn5qjVnoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/wsl-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-1.0.1.tgz", + "integrity": "sha512-c16PKLIRxBYpR3jSWsdS7SFp0COm5SOQdiFjY818dYFHJbMGuLBszpF07LBWmOS1uzrHa9VGdynsEgoeKy0oOQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-wsl": "^3.1.0", + "powershell-utils": "^0.2.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/wsl-utils/node_modules/is-wsl": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.1.tgz", + "integrity": "sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-inside-container": "^1.0.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/xdg-basedir": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz", + "integrity": "sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/xml-name-validator": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", @@ -2958,6 +7498,71 @@ "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true, "license": "MIT" + }, + "node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "license": "ISC", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "node_modules/yargs/node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/zod": { + "version": "4.6.7", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.7.tgz", + "integrity": "sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } } } } diff --git a/package.json b/package.json index 59bbd7b..63ece9c 100644 --- a/package.json +++ b/package.json @@ -10,13 +10,15 @@ "preview": "vite preview", "typecheck": "tsc -b", "test": "vitest run", + "test:coverage": "vitest run --coverage", "test:watch": "vitest", "test:e2e": "playwright test", "test:e2e:headed": "playwright test --headed --workers=1", "test:e2e:ui": "playwright test --ui", "format": "prettier --write src dev e2e", "format:check": "prettier --check src dev e2e", - "api:tipos": "npx -y -p openapi-typescript@7 -p typescript@5 openapi-typescript http://localhost:8080/v3/api-docs -o src/api/schema.d.ts" + "api:tipos": "npx -y -p openapi-typescript@7 -p typescript@5 openapi-typescript http://localhost:8080/v3/api-docs -o src/api/schema.d.ts", + "lighthouse": "VITE_API_URL=http://localhost:4179 vite build --outDir artifacts/lighthouse/build --emptyOutDir && cd artifacts/lighthouse && lhci autorun --config=../../lighthouserc.cjs" }, "dependencies": { "@fontsource-variable/bricolage-grotesque": "^5.3.0", @@ -29,6 +31,8 @@ "react-router": "^8.5.1" }, "devDependencies": { + "@axe-core/playwright": "^4.14.0", + "@lhci/cli": "^0.16.1", "@playwright/test": "^1.65.1", "@testing-library/dom": "^10.4.2", "@testing-library/jest-dom": "^7.0.1", @@ -39,6 +43,7 @@ "@types/react": "^19.3.0", "@types/react-dom": "^19.3.0", "@vitejs/plugin-react": "^6.1.2", + "@vitest/coverage-v8": "^5.1.1", "axe-core": "^4.14.0", "jsdom": "^30.1.3", "oxlint": "^1.89.0", diff --git a/plan/pendencias.md b/plan/pendencias.md index 4c37606..bddcf1c 100644 --- a/plan/pendencias.md +++ b/plan/pendencias.md @@ -4,29 +4,13 @@ Levantamento feito a partir do Documento de Requisitos e do Plano de Testes, com ## Front -### Pode ser feito já, por ordem de prioridade +### Pode ser feito já | # | Item | Requisito (prioridade) | Base nas páginas existentes | |---|---|---|---| -| 1 | Ligar os botões "Acompanhamento completo", "Ver pendências" e "Lançar resposta" do cartão de pesquisas do painel | RF-35 (Should) | Links para o acompanhamento e o lançamento, que já existem | -| 2 | Painel com dados reais (T15): seletor de campanha, filtro por tipo, destaque, resumo, ocupação mensal, faixas, fluxo, expectativa x realizado e desempenho por tipo | RF-25, RF-27 a RF-34 (Must e Should) | Os componentes já existem; trocar `fixtures.ts` pelas chamadas, como no cartão de pesquisas | -| 3 | Inventário do ADMIN: catálogo de grupos e itens e o inventário de cada estabelecimento | RF-06 (Must) | Catálogo como "Referências" (abas, tabela e diálogo); inventário do estabelecimento como "Capacidades" | -| 6 | Meu estabelecimento do PARCEIRO: dados, nova capacidade e inventário | RF-07 (Should) | Formulários de Cadastros, um card por estabelecimento como em "Responder pesquisa" | -| 7 | Diárias informadas pela equipe na prévia (`/api/campanhas/{id}/diarias`) | RF-18 a RF-21 | Um bloco a mais na `PreviaPage` | | 8 | Responsividade das telas do ADMIN em 360 px e tablet, incluindo tabelas e diálogos de Cadastros (cabeçalho, telas do parceiro, Relatórios e Indicadores já feitos) | RNF-01 | Mesmos pontos de quebra (1180 e 600 px) e o teste `semRolagemHorizontal` | -| 9 | Acessibilidade: estender a checagem do axe-core às telas do ADMIN e auditar o contraste no navegador | RNF-06 e FE-10 | `violacoesDeAcessibilidade` em `src/test/acessibilidade.ts` | -| 10 | E2E-08 (sessão expirada e botão voltar) e checagem do `schema.d.ts` na CI | E2E-08 e FE-09 | Padrão dos specs atuais | -| 11 | Otimização: código dividido por rota, favicon e Lighthouse | T18 | | +| 11 | Otimização: análise do tamanho do pacote e CLS do painel (0,17 no celular, causado pela troca da fonte web: preload ou fallback com `size-adjust`). O código já é dividido por rota, o favicon existe e o Lighthouse já roda no CI | T18 | Notas do Lighthouse no comentário do PR | -Todas as telas do menu já existem. - -Decisões em aberto do README que o front pode fechar sozinho, sem Figma: - -- **D2:** o filtro por tipo afeta só o que a API separa por tipo. -- **D3:** sem fonte na API, o bloco ou a variação fica escondido. -- **D5:** "Exportar" vira um botão direto de CSV. -- **D7:** o PARCEIRO continua com o cartão de pendências. -- **D8:** o código da rodada sai do texto dos filtros. ### Depende do back @@ -55,6 +39,12 @@ Decisões em aberto do README que o front pode fechar sozinho, sem Figma: | RF-24 e RF-39: Relatórios com filtros, CSV e versão para impressão em PDF | `feat/plano-essencial` | | RF-24: Indicadores mês a mês e por feriado, em gráfico e tabela | `feat/plano-essencial` | | RNF-01 e RNF-06 (parte): menu recolhível, telas do parceiro em 360 px e tablet, axe-core nos testes | `feat/plano-essencial` | +| RF-18 a RF-21: diárias informadas pela equipe na prévia (incluir, corrigir e remover) | `test/e2e-suite` | +| RNF-06 e FE-10: axe-core em todas as telas (unitário) e no navegador com contraste (`e2e/acessibilidade.spec.ts`), painel e responder pesquisa sem rolagem lateral em 360 px | `test/e2e-suite` | +| FE-09: teste de contrato dos caminhos e métodos de `src/api` contra o `schema.d.ts` | `test/e2e-suite` | +| Favicon, `meta description` e tabelas de Indicadores roláveis por teclado | `test/e2e-suite` | +| T18 (parte): Lighthouse no CI (celular e desktop, 5 páginas, com limites) e comentário do PR com badges de cobertura e Lighthouse | `test/e2e-suite` | +| E2E-01, 04, 05, 08, 09 e 10 automatizados no Playwright; painel passa a consultar parâmetros e RHC pela data do fim do período | `test/e2e-suite` | ## Back @@ -66,13 +56,6 @@ Decisões em aberto do README que o front pode fechar sozinho, sem Figma: | 4 | Link de resposta por parceiro e campanha, para WhatsApp e e-mail | RF-11 (Must) | O link existente é só o de convite e senha do usuário | | 5 | Merge do PR #3: Cucumber com REST Assured e Testcontainers (F01 a F13) e `aceitaResposta`/`respostasAte` na pendência | Plano de Testes e RF-12 | PR aberto | | 6 | Merge do PR #4: prazos das rodadas validados e 422 para campanha não publicada | RF-14 e RF-21 | PR aberto, empilhado sobre o #3 | -| 7 | Testes de integração TI-01 (subida com validação das entidades) e TI-02 (consultas de vigência no banco real) | Plano de Testes | Entram com o Testcontainers do PR #3 | | 8 | Exportar Excel (.xlsx) com indicadores e segmentos por categoria | RF-38 (Should) | Não existe | -| 9 | Importar inventário em lote a partir de planilha | RF-08 (Could) | Só existe a importação do histórico | -| 10 | Módulo de pesquisas genérico com perfil Pesquisador de Campo | RF-17 (Could) | Não existe; fora do escopo atual | A confirmar com o cliente: não existe "esqueci minha senha" para o próprio usuário. Só o ADMIN gera o link de redefinição, e a E2E-11 assume esse fluxo. - -## Divergências do Plano de Testes com o código - -O Plano de Testes e o RNF-02 falam em React Native com Jest, RNTL, MSW e Maestro. O front é React web com Vite, Vitest, Testing Library, `fetch` simulado e Playwright, e a sessão fica no `sessionStorage` em vez do armazenamento seguro do aparelho (FE-04). O documento precisa ser atualizado para a stack atual. diff --git a/plan/testes-plano-de-testes.md b/plan/testes-plano-de-testes.md new file mode 100644 index 0000000..d177d64 --- /dev/null +++ b/plan/testes-plano-de-testes.md @@ -0,0 +1,77 @@ +# Plano: fechar as lacunas do Plano de Testes no front + +Base: `Plano de Testes - OTO.pdf` (seções 6, 7 e 8), `plan/pendencias.md` e a `main` em `4fddb9f` (#32), já mesclada na branch `test/e2e-suite`. + +O plano descreve o app como React Native (Jest, RNTL, MSW, Maestro). O front real é React web com Vitest, Testing Library e Playwright. O critério é o objetivo de cada caso, não a ferramenta. + +## Situação medida + +- Vitest: 857 testes passando. Cobertura medida com `@vitest/coverage-v8` (instalado nesta rodada): 98,3% de linhas, 92,1% de branches, 96,9% de funções. A cobertura ainda não está configurada no `vite.config.ts` nem no CI. +- Playwright: 96 testes passando antes do merge, mais os specs de relatórios e indicadores vindos da `main`. +- Arquivos com menos de 92% de linhas: `FormularioResposta.tsx` (73%), `CapacidadeDoEstabelecimento.tsx` (83%), `MetodologiaPage.tsx` (87,5%), `HistoricoFormulario.tsx` (90%), `MeuEstabelecimentoCard.tsx` (90,6%), `MeuEstabelecimentoPage.tsx` (90,9%), `EstabelecimentoFormulario.tsx` (90,9%), `RelatoriosPage.tsx` (91,3%). `main.tsx` fica fora da medição. + +## Lacunas a fechar + +| ID | Lacuna | Tamanho | Agente | +| ------ | ----------------------------------------------------------------------------------------------------------- | -------- | ------ | +| COB | Configurar cobertura (script, limites, CI, `.gitignore`) e subir os arquivos fracos | simples | Sonnet | +| FE-10a | axe-core nas telas que ainda não o usam (cadastros, pesquisas, login, painel, metodologia, minha senha) | simples | Sonnet | +| FE-09 | Teste de contrato: todo caminho usado em `src/api/*.ts` existe em `schema.d.ts` | simples | Sonnet | +| DIA | Tela faltando: diárias informadas pela equipe na prévia (`/api/campanhas/{id}/diarias`, RF-18 a RF-21, F08) | complexa | Opus | +| E2E-05 | Correção depois de publicar: novo valor no painel e no CSV | complexa | Opus | +| E2E-10 | Parâmetros e RHC: vale a vigência do fim do período | complexa | Opus | +| FE-10b | axe-core no navegador (`@axe-core/playwright`), com contraste, e correção dos tokens se falhar | complexa | Opus | +| E2E-01 | Primeiro acesso do parceiro: define a senha, entra e vê só o seu estabelecimento | simples | Sonnet | +| E2E-04 | Perfis e sigilo: acesso negado a estabelecimento alheio, tipo com poucos respondentes sem números | simples | Sonnet | +| E2E-08 | Sessão expirada no meio do uso volta ao login; botão voltar não reabre telas | simples | Sonnet | +| E2E-09 | Item novo do catálogo aparece no inventário do estabelecimento | simples | Sonnet | + +Fora do escopo, por decisão do usuário ou por depender do back: E2E-11 (senha esquecida), boletim em PDF, indicadores semestrais, comparações extras do painel, exportação Excel, inventário em lote, link de resposta por parceiro. + +## Ondas + +Os agentes rodam no mesmo diretório. Para não colidirem, cada um é dono de arquivos próprios e o Playwright usa porta e pasta de build próprias (`E2E_PORT`, ver `playwright.config.ts`). + +**Onda 1 (sem Playwright):** COB, FE-10a, FE-09 e a parte de código e unitários de DIA. + +- COB é dona de `vite.config.ts`, `package.json` (só scripts), `.github/workflows/ci.yml`, `.gitignore` e dos testes novos dos arquivos fracos. +- FE-10a escreve só arquivos novos `*.acessibilidade.test.tsx`. +- FE-09 escreve só `src/api/contrato.test.ts`. +- DIA é dona de `PreviaPage.tsx`, componentes novos da prévia, `src/api/respostas.ts` ou `resultados.ts` (o que já tratar a prévia) e dos testes da prévia. + +**Onda 2 (Playwright em paralelo, portas 4174 a 4176):** + +- Opus A: e2e de DIA, E2E-05 e E2E-10, em `e2e/previa-diarias.spec.ts`, `e2e/correcao-publicacao.spec.ts` e `e2e/vigencia-periodo.spec.ts` (porta 4174). +- Sonnet B: E2E-01, E2E-04, E2E-08 e E2E-09, em `e2e/jornadas-parceiro.spec.ts`, `e2e/sessao.spec.ts` e `e2e/catalogo-no-inventario.spec.ts` (porta 4175). +- Opus C: FE-10b em `e2e/acessibilidade.spec.ts`, dono de `package.json` (dependência) e dos tokens CSS (porta 4176). + +**Fechamento:** `npm run format:check`, `npm run lint`, `npm run typecheck`, `npm test` com cobertura e `npm run test:e2e`, tudo verde. Atualizar `plan/pendencias.md`. + +## Regras comuns + +- Sem commit. O usuário decide. +- Texto de interface e testes em português, como o resto do código. Sem comentários, a menos que a lógica seja não óbvia. Casar com o estilo do arquivo. Não refatorar fora do escopo. +- Nos e2e, seguir o padrão dos specs existentes: API simulada com `page.route`, sessão injetada no `sessionStorage` e data fixa com `page.clock.setFixedTime` quando a tela depende do dia. +- Um teste só vale se falharia com o comportamento errado. Nada de asserção vazia. +- Rodar só os arquivos próprios durante o trabalho e a suíte inteira no fim. + +## Critério de aceite + +Os 21 itens aplicáveis do plano (FE-01 a FE-10 e E2E-01 a E2E-11, menos E2E-11) com cobertura completa, cobertura de linhas do vitest com limite configurado no CI e suíte inteira verde. + +## Resultado (22/11/2026) + +Todas as lacunas da tabela foram fechadas, exceto E2E-11 (fora do escopo). + +- Vitest: 95 arquivos, 1032 testes. Cobertura: 99,26% de linhas, 93,02% de branches, 98,74% de funções, 98,87% de statements. Limites no `vite.config.ts` (linhas 98, funções 97, statements 98, branches 92), aplicados no CI por `npm run test:coverage`. +- Playwright: 188 testes nos projetos chromium, celular e tablet, todos passando. +- DIA: bloco "Diárias informadas pela equipe" na prévia. A API só tem GET e PUT, então remover é um PUT sem o item. +- FE-10b: o axe no navegador achou 2 violações reais (nome acessível dos botões de grupo do inventário e tabela com rolagem sem acesso por teclado) e 2 estouros de largura em 360 px (painel e responder pesquisa). Todos corrigidos. Contraste: nenhuma violação. +- E2E-10: o painel consultava a vigência pelo início do período. Corrigido para o fim, como o back (`BaseCalculo`) e o plano exigem. +- Cache: a prévia agora invalida a lista de campanhas publicadas ao publicar e ao cancelar a publicação. +- `e2e/navegacao.ts`: `semRolagemHorizontal` passou a comparar com a largura do viewport. Antes, nos projetos de celular, `innerWidth` crescia junto com o conteúdo e o teste nunca falhava. + +- `IndicadoresPage.tsx`: as tabelas de rolagem lateral também ganharam acesso por teclado. +- Quality Gate do SonarCloud: duplicação em código novo caiu de 5,4% para 0,9% com fixtures e helpers compartilhados, o bug do `sort` sem comparação foi corrigido e as vulnerabilidades do job do Lighthouse (log sem sanitizar e `npm ci` sem `--ignore-scripts`) foram resolvidas. +- Lighthouse no CI (`lighthouserc.cjs`, `lighthouse/servidor.mjs`): 5 páginas em celular e desktop. Acessibilidade e boas práticas abaixo de 0,95 reprovam o job, o restante só avisa. Com a `meta description`, o SEO subiu de 91 para 100. +- O job `resumo` comenta no PR, e atualiza a cada push, badges e tabelas de cobertura e Lighthouse (`scripts/resumo-pr.mjs`). diff --git a/playwright.config.ts b/playwright.config.ts index ebe549c..5212587 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -1,13 +1,20 @@ import { defineConfig, devices } from '@playwright/test' +const porta = process.env.E2E_PORT ?? '4173' +const comPortaPropria = porta !== '4173' +const pasta = `artifacts/e2e/build-${porta}` + export default defineConfig({ testDir: './e2e', + outputDir: 'artifacts/e2e/results', fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 2 : 0, - reporter: process.env.CI ? [['github'], ['html', { open: 'never' }]] : 'list', + reporter: process.env.CI + ? [['github'], ['html', { open: 'never', outputFolder: 'artifacts/e2e/report' }]] + : 'list', use: { - baseURL: 'http://localhost:4173', + baseURL: `http://localhost:${porta}`, trace: 'on-first-retry', }, projects: [ @@ -37,8 +44,10 @@ export default defineConfig({ }, ], webServer: { - command: 'npm run build && npm run preview -- --port 4173 --strictPort', - url: 'http://localhost:4173', + command: comPortaPropria + ? `npx vite build --outDir ${pasta} --emptyOutDir && npx vite preview --outDir ${pasta} --port ${porta} --strictPort` + : 'npm run build && npm run preview -- --port 4173 --strictPort', + url: `http://localhost:${porta}`, reuseExistingServer: !process.env.CI, timeout: 120_000, }, diff --git a/public/favicon.png b/public/favicon.png new file mode 100644 index 0000000..bb55001 Binary files /dev/null and b/public/favicon.png differ diff --git a/scripts/resumo-pr.mjs b/scripts/resumo-pr.mjs new file mode 100644 index 0000000..1bf6f3f --- /dev/null +++ b/scripts/resumo-pr.mjs @@ -0,0 +1,176 @@ +// Monta o resumo de qualidade do PR (cobertura do vitest e Lighthouse) em Markdown, com badges. +// Uso: node scripts/resumo-pr.mjs > resumo.md +// Lê artifacts/coverage/coverage-summary.json e artifacts/lighthouse/reports//*.report.json. + +import { existsSync, readdirSync, readFileSync } from 'node:fs' +import { join } from 'node:path' + +const MARCADOR = '' +const PASTA_LIGHTHOUSE = 'artifacts/lighthouse/reports' +const ARQUIVO_COBERTURA = 'artifacts/coverage/coverage-summary.json' + +const PERFIS = { celular: 'Celular', desktop: 'Desktop' } +const CATEGORIAS = [ + ['performance', 'Desempenho'], + ['accessibility', 'Acessibilidade'], + ['best-practices', 'Boas práticas'], + ['seo', 'SEO'], +] + +function corDaCobertura(pct) { + if (pct >= 95) return 'brightgreen' + if (pct >= 90) return 'green' + if (pct >= 80) return 'yellow' + if (pct >= 60) return 'orange' + return 'red' +} + +function corDaNota(nota) { + if (nota >= 90) return 'brightgreen' + if (nota >= 50) return 'orange' + return 'red' +} + +function escapar(texto) { + return encodeURIComponent(String(texto).replaceAll('-', '--').replaceAll('_', '__')).replaceAll( + '%20', + '_', + ) +} + +function badge(rotulo, valor, cor) { + const url = `https://img.shields.io/badge/${escapar(rotulo)}-${escapar(valor)}-${cor}` + return `![${rotulo}: ${valor}](${url})` +} + +function decimal(valor, casas) { + return valor.toFixed(casas).replace('.', ',') +} + +function lerJson(caminho) { + return JSON.parse(readFileSync(caminho, 'utf8')) +} + +function coberturaEmMarkdown() { + if (!existsSync(ARQUIVO_COBERTURA)) { + return { badges: [], texto: '_Cobertura não disponível nesta execução._' } + } + const total = lerJson(ARQUIVO_COBERTURA).total + const itens = [ + ['Linhas', total.lines], + ['Branches', total.branches], + ['Funções', total.functions], + ['Statements', total.statements], + ] + const badges = itens.map(([nome, medida]) => + badge( + `cobertura ${nome.toLowerCase()}`, + `${decimal(medida.pct, 2)}%`, + corDaCobertura(medida.pct), + ), + ) + const linhas = itens.map( + ([nome, medida]) => + `| ${nome} | ${decimal(medida.pct, 2)}% | ${medida.covered} de ${medida.total} |`, + ) + const texto = ['| Medida | Cobertura | Cobertos |', '| --- | ---: | ---: |', ...linhas].join('\n') + return { badges, texto } +} + +function relatoriosDoPerfil(perfil) { + const pasta = join(PASTA_LIGHTHOUSE, perfil) + if (!existsSync(pasta)) return [] + return readdirSync(pasta) + .filter((arquivo) => arquivo.endsWith('.report.json')) + .map((arquivo) => lerJson(join(pasta, arquivo))) +} + +function nomeDaPagina(url) { + const { pathname, search } = new URL(url) + return `${pathname}${search}` +} + +/** A melhor das execuções de cada página: o desempenho varia, e o job usa o mesmo critério. */ +function melhoresPorPagina(relatorios) { + const paginas = new Map() + for (const lhr of relatorios) { + const pagina = nomeDaPagina(lhr.finalUrl) + const atual = paginas.get(pagina) + if (!atual || lhr.categories.performance.score > atual.categories.performance.score) { + paginas.set(pagina, lhr) + } + } + return [...paginas.entries()] +} + +function nota(lhr, categoria) { + return Math.round((lhr.categories[categoria]?.score ?? 0) * 100) +} + +function lighthouseEmMarkdown() { + const badges = [] + const blocos = [] + + for (const [perfil, titulo] of Object.entries(PERFIS)) { + const paginas = melhoresPorPagina(relatoriosDoPerfil(perfil)) + if (paginas.length === 0) continue + + for (const [categoria, nomeCategoria] of CATEGORIAS) { + const minima = Math.min(...paginas.map(([, lhr]) => nota(lhr, categoria))) + badges.push(badge(`${titulo} ${nomeCategoria}`, String(minima), corDaNota(minima))) + } + + const linhas = paginas.map(([pagina, lhr]) => { + const notas = CATEGORIAS.map(([categoria]) => nota(lhr, categoria)) + const lcp = decimal(lhr.audits['largest-contentful-paint'].numericValue / 1000, 1) + const cls = decimal(lhr.audits['cumulative-layout-shift'].numericValue, 2) + const tbt = Math.round(lhr.audits['total-blocking-time'].numericValue) + return `| \`${pagina}\` | ${notas.join(' | ')} | ${lcp} s | ${cls} | ${tbt} ms |` + }) + blocos.push( + [ + `#### ${titulo}`, + '', + `| Página | ${CATEGORIAS.map(([, nomeCategoria]) => nomeCategoria).join(' | ')} | LCP | CLS | TBT |`, + `| --- | ${CATEGORIAS.map(() => '---:').join(' | ')} | ---: | ---: | ---: |`, + ...linhas, + ].join('\n'), + ) + } + + if (blocos.length === 0) { + return { badges, texto: '_Lighthouse não disponível nesta execução._' } + } + return { badges, texto: blocos.join('\n\n') } +} + +function rodape() { + const { GITHUB_SERVER_URL, GITHUB_REPOSITORY, GITHUB_RUN_ID, COMMIT_DO_PR, GITHUB_SHA } = + process.env + if (!GITHUB_RUN_ID) return '' + const execucao = `${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}` + return `\n_Commit \`${(COMMIT_DO_PR || GITHUB_SHA)?.slice(0, 7)}\`. [Relatórios completos nos artefatos da execução](${execucao})._` +} + +const cobertura = coberturaEmMarkdown() +const lighthouse = lighthouseEmMarkdown() + +const resumo = [ + MARCADOR, + '## Resumo de qualidade', + '', + [...cobertura.badges, ...lighthouse.badges].join(' '), + '', + '### Cobertura de testes unitários', + '', + cobertura.texto, + '', + '### Lighthouse', + '', + 'Melhor de 2 execuções por página. As notas dos badges são a pior página de cada perfil.', + '', + lighthouse.texto, + rodape(), +] + +console.log(resumo.join('\n')) diff --git a/src/api/contrato.test.ts b/src/api/contrato.test.ts new file mode 100644 index 0000000..d7b1d58 --- /dev/null +++ b/src/api/contrato.test.ts @@ -0,0 +1,148 @@ +import { describe, expect, it } from 'vitest' +import schema from './schema.d.ts?raw' + +const modulos = import.meta.glob( + ['./*.ts', '!./*.test.ts', '!./schema.d.ts', '!./client.ts'], + { + query: '?raw', + import: 'default', + eager: true, + }, +) + +const METODOS = ['get', 'put', 'post', 'delete', 'options', 'head', 'patch', 'trace'] + +type Chamada = { arquivo: string; caminho: string; metodo: string } + +function lerPaths(texto: string) { + const inicio = texto.indexOf('export interface paths {') + const fim = texto.indexOf('export type webhooks') + const bloco = texto.slice(inicio, fim) + const paths = new Map>() + let atual: Set | null = null + for (const linha of bloco.split('\n')) { + const caminho = /^ {4}"(\/[^"]*)": \{$/.exec(linha) + if (caminho) { + atual = new Set() + paths.set(caminho[1] ?? '', atual) + continue + } + const metodo = /^ {8}(\w+)(\?)?: (.+);$/.exec(linha) + const nome = metodo?.[1] ?? '' + if (atual && metodo && METODOS.includes(nome) && !metodo[2] && metodo[3] !== 'never') { + atual.add(nome.toUpperCase()) + } + } + return paths +} + +function lerEsquemas(texto: string) { + const inicio = texto.indexOf('export interface components {') + const bloco = texto.slice(inicio) + const fim = bloco.indexOf('\n responses:') + const nomes = new Set() + for (const linha of bloco.slice(0, fim).split('\n')) { + const nome = /^ {8}(\w+): /.exec(linha) + if (nome) nomes.add(nome[1] ?? '') + } + return nomes +} + +function fechar(texto: string, abertura: number, abre: string, fecha: string) { + let nivel = 0 + for (let i = abertura; i < texto.length; i++) { + if (texto[i] === abre) nivel++ + else if (texto[i] === fecha && --nivel === 0) return i + } + throw new Error(`delimitador ${abre} sem fechamento`) +} + +function extrairChamadas(arquivo: string, texto: string): Chamada[] { + const chamadas: Chamada[] = [] + const inicio = /\brequisicao(?:Arquivo)?\b/g + for (let achado = inicio.exec(texto); achado; achado = inicio.exec(texto)) { + let pos = achado.index + achado[0].length + if (texto[pos] === '<') pos = fechar(texto, pos, '<', '>') + 1 + if (texto[pos] !== '(') continue + const argumentos = texto.slice(pos + 1, fechar(texto, pos, '(', ')')) + const literal = /^\s*(['`])((?:\\.|(?!\1)[^\\])*)\1/.exec(argumentos) + if (!literal) { + throw new Error( + `${arquivo}: chamada com caminho que não é literal: ${argumentos.slice(0, 60)}`, + ) + } + const caminho = (literal[2] ?? '').replace(/\$\{([^}]*)\}/g, (_, expressao: string) => { + const nome = /^\w+/.exec(expressao.trim())?.[0] ?? '' + return nome === 'recurso' ? '{*}' : '{}' + }) + const resto = argumentos.slice(literal[0].length) + const metodo = /metodo:\s*'(\w+)'/.exec(resto)?.[1] ?? 'GET' + chamadas.push({ arquivo, caminho, metodo }) + } + return chamadas +} + +function forma(caminho: string) { + return caminho.replace(/\{[^}]+\}/g, '{}') +} + +const paths = lerPaths(schema) +const formasDoSchema = new Map>() +for (const [caminho, metodos] of paths) { + const chave = forma(caminho) + formasDoSchema.set(chave, new Set([...(formasDoSchema.get(chave) ?? []), ...metodos])) +} + +function casar(caminho: string) { + if (!caminho.includes('{*}')) { + const metodos = formasDoSchema.get(caminho) + return metodos ? [metodos] : [] + } + const [prefixo = '', sufixo = ''] = caminho.split('{*}') + return [...formasDoSchema] + .filter( + ([chave]) => + chave.startsWith(prefixo) && + chave.endsWith(sufixo) && + !chave.slice(prefixo.length, chave.length - sufixo.length).includes('/') && + chave.slice(prefixo.length, chave.length - sufixo.length) !== '{}', + ) + .map(([, metodos]) => metodos) +} + +const chamadas = Object.entries(modulos).flatMap(([arquivo, texto]) => + extrairChamadas(arquivo.replace('./', 'src/api/'), texto), +) + +describe('contrato com a API (schema.d.ts)', () => { + it('lê o schema e os módulos', () => { + expect(paths.size).toBeGreaterThan(40) + expect(chamadas.length).toBeGreaterThan(60) + }) + + it('todo caminho chamado existe em paths do schema', () => { + const fora = chamadas + .filter(({ caminho }) => casar(caminho).length === 0) + .map(({ arquivo, metodo, caminho }) => `${arquivo}: ${metodo} ${caminho}`) + expect(fora, `Caminhos fora do contrato:\n${fora.join('\n')}`).toEqual([]) + }) + + it('todo método chamado existe no caminho do schema', () => { + const fora = chamadas + .filter(({ caminho }) => casar(caminho).length > 0) + .filter(({ caminho, metodo }) => !casar(caminho).every((metodos) => metodos.has(metodo))) + .map(({ arquivo, metodo, caminho }) => `${arquivo}: ${metodo} ${caminho}`) + expect(fora, `Métodos fora do contrato:\n${fora.join('\n')}`).toEqual([]) + }) + + it('todo Esquemas[...] referenciado existe em components.schemas', () => { + const existentes = lerEsquemas(schema) + const fora = Object.entries(modulos).flatMap(([arquivo, texto]) => + [...texto.matchAll(/Esquemas\['(\w+)'\]/g)] + .map((achado) => achado[1] ?? '') + .filter((nome) => !existentes.has(nome)) + .map((nome) => `${arquivo}: Esquemas['${nome}']`), + ) + expect(fora, `Esquemas inexistentes:\n${fora.join('\n')}`).toEqual([]) + }) +}) diff --git a/src/api/endpoints.test.ts b/src/api/endpoints.test.ts index 1c3d9f5..ea02aee 100644 --- a/src/api/endpoints.test.ts +++ b/src/api/endpoints.test.ts @@ -51,8 +51,10 @@ import { buscarPrevia, buscarResultado, cancelarPublicacao, + listarDiariasInformadas, listarPublicadas, publicarCampanha, + salvarDiariasInformadas, } from './resultados' import { buscarRhcVigente, corrigirRhc, excluirRhc, listarRhc, registrarRhc } from './rhc' import { @@ -287,6 +289,27 @@ describe('resultados', () => { metodo: 'DELETE', }) }) + + it('diárias informadas: lista e substitui com PUT', async () => { + await listarDiariasInformadas(42) + await salvarDiariasInformadas(42, { + diarias: [{ diariaMedia: 800 }, { tipoHospedagemCodigo: 'HOTEL', diariaMedia: 700 }], + fonte: 'Planilha', + }) + + expect(chamada(0)).toMatchObject({ + url: 'http://localhost:8080/api/campanhas/42/diarias', + metodo: 'GET', + }) + expect(chamada(1)).toMatchObject({ + url: 'http://localhost:8080/api/campanhas/42/diarias', + metodo: 'PUT', + corpo: { + diarias: [{ diariaMedia: 800 }, { tipoHospedagemCodigo: 'HOTEL', diariaMedia: 700 }], + fonte: 'Planilha', + }, + }) + }) }) describe('respostas', () => { diff --git a/src/api/resultados.ts b/src/api/resultados.ts index 7c2f981..0ced390 100644 --- a/src/api/resultados.ts +++ b/src/api/resultados.ts @@ -38,6 +38,21 @@ export function cancelarPublicacao(campanhaId: number) { return requisicao(`/api/campanhas/${campanhaId}/publicacao`, { metodo: 'DELETE' }) } +/** Só ADMIN. Diárias médias digitadas pela equipe; a geral vem com `tipoHospedagemCodigo` nulo. */ +export function listarDiariasInformadas(campanhaId: number, signal?: AbortSignal) { + return requisicao(`/api/campanhas/${campanhaId}/diarias`, { + signal, + }) +} + +/** Só ADMIN e antes da publicação. Substitui a lista inteira: o recorte que não vier volta à média das respostas. */ +export function salvarDiariasInformadas(campanhaId: number, dados: Esquemas['DiariasRequest']) { + return requisicao(`/api/campanhas/${campanhaId}/diarias`, { + metodo: 'PUT', + corpo: dados, + }) +} + export async function baixarResultadoCsv(campanhaId: number, signal?: AbortSignal) { const { blob, contentDisposition } = await requisicaoArquivo( `/api/campanhas/${campanhaId}/resultado.csv`, diff --git a/src/components/ui/Tabela.tsx b/src/components/ui/Tabela.tsx index 54412eb..1b1c21f 100644 --- a/src/components/ui/Tabela.tsx +++ b/src/components/ui/Tabela.tsx @@ -26,7 +26,7 @@ export function Tabela({ legenda, colunas, linhas, chave, vazio, acoes }: Tab const classe = (coluna: ColunaTabela) => (coluna.numerica ? styles.numero : undefined) return ( -
+
diff --git a/src/features/auth/MinhaSenhaPage.acessibilidade.test.tsx b/src/features/auth/MinhaSenhaPage.acessibilidade.test.tsx new file mode 100644 index 0000000..4e9dd9a --- /dev/null +++ b/src/features/auth/MinhaSenhaPage.acessibilidade.test.tsx @@ -0,0 +1,37 @@ +import { render, screen } from '@testing-library/react' +import { createMemoryRouter, RouterProvider } from 'react-router' +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' +import { Providers } from '@/app/Providers' +import { rotas } from '@/app/rotas' +import { limparSessao, salvarSessao } from '@/api/sessao' +import { violacoesDeAcessibilidade } from '@/test/acessibilidade' + +beforeEach(() => { + salvarSessao({ token: 'abc', expiraEm: new Date(Date.now() + 60_000).toISOString() }) + vi.stubGlobal( + 'fetch', + vi.fn( + async () => + new Response(JSON.stringify({ id: 2, nome: 'Rita Parceira', perfil: 'PARCEIRO' })), + ), + ) +}) + +afterEach(() => { + vi.unstubAllGlobals() + limparSessao() +}) + +describe('MinhaSenhaPage, acessibilidade', () => { + it('não tem violações dentro do layout', async () => { + const router = createMemoryRouter(rotas, { initialEntries: ['/minha-senha'] }) + render( + + + , + ) + await screen.findByLabelText('Senha atual') + + expect(await violacoesDeAcessibilidade(document.body, { verificarRegioes: true })).toEqual([]) + }) +}) diff --git a/src/features/cadastros/capacidades/CapacidadesPage.acessibilidade.test.tsx b/src/features/cadastros/capacidades/CapacidadesPage.acessibilidade.test.tsx new file mode 100644 index 0000000..321467b --- /dev/null +++ b/src/features/cadastros/capacidades/CapacidadesPage.acessibilidade.test.tsx @@ -0,0 +1,56 @@ +import { screen } from '@testing-library/react' +import userEvent from '@testing-library/user-event' +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' +import { violacoesDeAcessibilidade } from '@/test/acessibilidade' +import { criarApiFalsa } from '@/test/apiFalsa' +import { abrirTela } from '@/test/telas' +import { CapacidadesPage } from './CapacidadesPage' + +const BASE = { + id: 1, + vigenteDesde: '2025-01-01', + qtdUh: 40, + qtdUhPcd: 2, + qtdLeitos: 120, + maxLeitosPorUh: 4, + leitosUteis: 100, +} + +beforeEach(() => { + criarApiFalsa({ + 'GET /api/estabelecimentos/12': { corpo: { id: 12, dados: { nomeFantasia: 'Hotel Exemplo' } } }, + 'GET /api/estabelecimentos/12/capacidades': { + corpo: [ + BASE, + { ...BASE, id: 3, vigenteDesde: '2027-01-01' }, + { ...BASE, id: 2, vigenteDesde: '2026-03-01', leitosUteis: 102.5 }, + ], + }, + }) +}) +afterEach(() => vi.unstubAllGlobals()) + +function abrir() { + abrirTela(, { + rota: '/cadastros/estabelecimentos/:id/capacidades', + caminho: '/cadastros/estabelecimentos/12/capacidades', + }) +} + +describe('CapacidadesPage, acessibilidade', () => { + it('não tem violações na lista', async () => { + abrir() + await screen.findByRole('table', { name: 'Capacidades de Hotel Exemplo' }) + + expect(await violacoesDeAcessibilidade()).toEqual([]) + }) + + it('não tem violações com o diálogo de nova vigência aberto', async () => { + abrir() + await screen.findByRole('table') + await userEvent.click(screen.getByRole('button', { name: 'Nova vigência' })) + await screen.findByRole('dialog', { name: 'Nova vigência de capacidade' }) + + expect(await violacoesDeAcessibilidade()).toEqual([]) + }) +}) diff --git a/src/features/cadastros/estabelecimentos/EstabelecimentosPage.acessibilidade.test.tsx b/src/features/cadastros/estabelecimentos/EstabelecimentosPage.acessibilidade.test.tsx new file mode 100644 index 0000000..15b8400 --- /dev/null +++ b/src/features/cadastros/estabelecimentos/EstabelecimentosPage.acessibilidade.test.tsx @@ -0,0 +1,59 @@ +import { screen } from '@testing-library/react' +import userEvent from '@testing-library/user-event' +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' +import { violacoesDeAcessibilidade } from '@/test/acessibilidade' +import { criarApiFalsa } from '@/test/apiFalsa' +import { abrirTela } from '@/test/telas' +import { EstabelecimentosPage } from './EstabelecimentosPage' + +beforeEach(() => { + criarApiFalsa({ + 'GET /api/estabelecimentos': { + corpo: [ + { + id: 12, + nomeFantasia: 'Hotel Exemplo', + tipoHospedagemCodigo: 'HOTEL', + situacao: 'REGULAR', + ativo: true, + qtdUh: 1240, + qtdLeitos: 3600, + }, + { + id: 13, + nomeFantasia: 'Pousada Sol', + tipoHospedagemCodigo: 'POUSADA', + situacao: 'IRREGULAR', + ativo: false, + }, + ], + }, + 'GET /api/referencias': { + corpo: { + tiposHospedagem: [ + { codigo: 'HOTEL', nome: 'Hotel' }, + { codigo: 'POUSADA', nome: 'Pousada' }, + ], + }, + }, + }) +}) +afterEach(() => vi.unstubAllGlobals()) + +describe('EstabelecimentosPage, acessibilidade', () => { + it('não tem violações na lista', async () => { + abrirTela() + await screen.findByRole('row', { name: /Hotel Exemplo/ }) + + expect(await violacoesDeAcessibilidade()).toEqual([]) + }) + + it('não tem violações com o diálogo de novo estabelecimento aberto', async () => { + abrirTela() + await screen.findByRole('row', { name: /Hotel Exemplo/ }) + await userEvent.click(screen.getByRole('button', { name: 'Novo estabelecimento' })) + await screen.findByRole('dialog', { name: 'Novo estabelecimento' }) + + expect(await violacoesDeAcessibilidade()).toEqual([]) + }) +}) diff --git a/src/features/cadastros/estabelecimentos/EstabelecimentosPage.test.tsx b/src/features/cadastros/estabelecimentos/EstabelecimentosPage.test.tsx index 4187f72..6143440 100644 --- a/src/features/cadastros/estabelecimentos/EstabelecimentosPage.test.tsx +++ b/src/features/cadastros/estabelecimentos/EstabelecimentosPage.test.tsx @@ -168,6 +168,28 @@ describe('novo estabelecimento', () => { }) }) + it('envia a exigência do Cadastur e o funcionamento 24 horas escolhidos', async () => { + preparar({ + 'POST /api/estabelecimentos': { status: 201, corpo: { id: 20, dados: {} } }, + }) + const dialogo = await abrirNovo() + await preencherObrigatorios(dialogo) + await userEvent.selectOptions( + within(dialogo).getByLabelText('Exigência do Cadastur'), + 'OBRIGATORIO', + ) + await userEvent.selectOptions(within(dialogo).getByLabelText('Funciona 24 horas'), 'SIM') + + await userEvent.click( + within(dialogo).getByRole('button', { name: 'Cadastrar estabelecimento' }), + ) + + await waitFor(() => expect(api.envios()).toHaveLength(1)) + expect(api.envios()[0]?.corpo).toMatchObject({ + dados: { cadasturExigencia: 'OBRIGATORIO', funcionamento24h: true }, + }) + }) + it('valida antes de enviar, inclusive as UH PCD', async () => { const dialogo = await abrirNovo() diff --git a/src/features/cadastros/historico/HistoricoPage.acessibilidade.test.tsx b/src/features/cadastros/historico/HistoricoPage.acessibilidade.test.tsx new file mode 100644 index 0000000..06b75e3 --- /dev/null +++ b/src/features/cadastros/historico/HistoricoPage.acessibilidade.test.tsx @@ -0,0 +1,49 @@ +import { screen } from '@testing-library/react' +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' +import { violacoesDeAcessibilidade } from '@/test/acessibilidade' +import { criarApiFalsa } from '@/test/apiFalsa' +import { abrirTela } from '@/test/telas' +import { HistoricoPage } from './HistoricoPage' + +beforeEach(() => { + criarApiFalsa({ + 'GET /api/historico': { + corpo: [ + { + id: 1, + indicador: 'TAXA_OCUPACAO', + modalidade: 'CONSOLIDADA', + ano: 2024, + mes: 7, + valor: 68.4, + fonte: 'Indicadores do Turismo 2017-2025', + }, + { + id: 2, + indicador: 'FLUXO_TURISTAS', + modalidade: 'CONSOLIDADA', + ano: 2024, + feriadoCodigo: 'CARNAVAL', + valor: 98512, + fonte: 'Indicadores do Turismo 2017-2025', + }, + ], + }, + 'GET /api/referencias': { + corpo: { + feriados: [{ codigo: 'CARNAVAL', nome: 'Carnaval' }], + tiposHospedagem: [{ codigo: 'HOTEL', nome: 'Hotel' }], + }, + }, + }) +}) +afterEach(() => vi.unstubAllGlobals()) + +describe('HistoricoPage, acessibilidade', () => { + it('não tem violações com a série e o formulário de importação', async () => { + abrirTela() + await screen.findByRole('table', { name: 'Valores da série histórica' }) + + expect(await violacoesDeAcessibilidade()).toEqual([]) + }) +}) diff --git a/src/features/cadastros/historico/HistoricoPage.test.tsx b/src/features/cadastros/historico/HistoricoPage.test.tsx index 6b312fe..e347a74 100644 --- a/src/features/cadastros/historico/HistoricoPage.test.tsx +++ b/src/features/cadastros/historico/HistoricoPage.test.tsx @@ -224,6 +224,48 @@ describe('valores avulsos', () => { }) }) + it('grava um valor mensal de expectativa para um tipo de hospedagem', async () => { + preparar({ 'POST /api/historico': { corpo: { ...DIARIA, id: 10 } } }) + abrirTela() + await userEvent.click(await screen.findByRole('button', { name: 'Novo valor' })) + const dialogo = screen.getByRole('dialog', { name: 'Novo valor' }) + + await userEvent.selectOptions(within(dialogo).getByLabelText('Modalidade'), 'EXPECTATIVA') + await within(dialogo).findByRole('option', { name: 'Hotel' }) + await userEvent.selectOptions(within(dialogo).getByLabelText('Tipo de hospedagem'), 'HOTEL') + await userEvent.selectOptions(within(dialogo).getByLabelText('Mês'), '3') + await preencherCampo(within(dialogo).getByLabelText('Ano'), '2025') + await preencherCampo(within(dialogo).getByLabelText('Valor (%)'), '55') + await preencherCampo(within(dialogo).getByLabelText('Fonte'), 'Planilha') + await userEvent.click(within(dialogo).getByRole('button', { name: 'Gravar valor' })) + + await waitFor(() => expect(api.envios()).toHaveLength(1)) + expect(api.envios()[0]?.corpo).toEqual({ + indicador: 'TAXA_OCUPACAO', + modalidade: 'EXPECTATIVA', + ano: 2025, + mes: 3, + tipoHospedagemCodigo: 'HOTEL', + valor: 55, + fonte: 'Planilha', + }) + }) + + it('sem as referências, o formulário oferece só a opção de escolher', async () => { + preparar({ 'GET /api/referencias': { status: 500, corpo: {} } }) + abrirTela() + await userEvent.click(await screen.findByRole('button', { name: 'Novo valor' })) + const dialogo = screen.getByRole('dialog', { name: 'Novo valor' }) + + await userEvent.click(within(dialogo).getByRole('radio', { name: 'Feriado ou evento' })) + + const feriados = within(dialogo).getByLabelText('Feriado') + expect(within(feriados).getAllByRole('option')).toHaveLength(1) + const tipos = within(dialogo).getByLabelText('Tipo de hospedagem') + expect(within(tipos).getAllByRole('option')).toHaveLength(1) + expect(within(tipos).getByRole('option', { name: 'Geral da cidade' })).toBeInTheDocument() + }) + it('valida como a API: mês ou feriado, ano e taxa até 100%', async () => { abrirTela() await userEvent.click(await screen.findByRole('button', { name: 'Novo valor' })) diff --git a/src/features/cadastros/inventario/GrupoDoCatalogo.tsx b/src/features/cadastros/inventario/GrupoDoCatalogo.tsx index b11592a..27409ee 100644 --- a/src/features/cadastros/inventario/GrupoDoCatalogo.tsx +++ b/src/features/cadastros/inventario/GrupoDoCatalogo.tsx @@ -59,21 +59,21 @@ export function GrupoDoCatalogo({
{legenda}
diff --git a/src/features/metodologia/MetodologiaPage.acessibilidade.test.tsx b/src/features/metodologia/MetodologiaPage.acessibilidade.test.tsx new file mode 100644 index 0000000..4ed9433 --- /dev/null +++ b/src/features/metodologia/MetodologiaPage.acessibilidade.test.tsx @@ -0,0 +1,40 @@ +import { QueryClient, QueryClientProvider } from '@tanstack/react-query' +import { render, screen } from '@testing-library/react' +import { afterEach, describe, expect, it, vi } from 'vitest' +import { violacoesDeAcessibilidade } from '@/test/acessibilidade' +import { MetodologiaPage } from './MetodologiaPage' + +afterEach(() => vi.unstubAllGlobals()) + +describe('MetodologiaPage, acessibilidade', () => { + it('não tem violações com os parâmetros carregados', async () => { + vi.stubGlobal( + 'fetch', + vi.fn( + async () => + new Response( + JSON.stringify({ + vigenteDesde: '2024-01-01', + percentualDayUse: 15.15, + diasEmParques: 2, + diasPermanenciaMedia: 4, + gastoMedioIngresso: 105, + gastoMedioDiario: 250, + percentualMinimoLeitosPublicacao: 70, + fonte: 'Pesquisa de Demanda Turística 2024', + }), + ), + ), + ) + render( + + + , + ) + await screen.findByText('15,15%') + + expect(await violacoesDeAcessibilidade()).toEqual([]) + }) +}) diff --git a/src/features/metodologia/MetodologiaPage.test.tsx b/src/features/metodologia/MetodologiaPage.test.tsx index e223bdf..d2b58ab 100644 --- a/src/features/metodologia/MetodologiaPage.test.tsx +++ b/src/features/metodologia/MetodologiaPage.test.tsx @@ -1,5 +1,6 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query' import { render, screen } from '@testing-library/react' +import userEvent from '@testing-library/user-event' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { MetodologiaPage } from './MetodologiaPage' @@ -95,4 +96,16 @@ describe('MetodologiaPage', () => { ) expect(screen.getByRole('heading', { name: 'Leito útil' })).toBeInTheDocument() }) + + it('tenta de novo os parâmetros depois de uma falha', async () => { + fetchFalso + .mockResolvedValueOnce(new Response(null, { status: 500 })) + .mockResolvedValue(new Response(JSON.stringify({ percentualDayUse: 15.15 }))) + abrir() + + await userEvent.click(await screen.findByRole('button', { name: 'Tentar novamente' })) + + expect(await screen.findByText('15,15%')).toBeInTheDocument() + expect(screen.queryByRole('alert')).not.toBeInTheDocument() + }) }) diff --git a/src/features/painel/PainelPage.acessibilidade.test.tsx b/src/features/painel/PainelPage.acessibilidade.test.tsx new file mode 100644 index 0000000..d315742 --- /dev/null +++ b/src/features/painel/PainelPage.acessibilidade.test.tsx @@ -0,0 +1,46 @@ +import { screen } from '@testing-library/react' +import { afterEach, describe, expect, it, vi } from 'vitest' +import { violacoesDeAcessibilidade } from '@/test/acessibilidade' +import { criarApiFalsa } from '@/test/apiFalsa' +import { abrirTela } from '@/test/telas' +import type { Usuario } from '@/types/dominio' +import { referencias, resultado } from './dadosDeTeste' +import { PainelPage } from './PainelPage' + +const VISUALIZADOR: Usuario = { + id: 3, + nome: 'Ana Lima', + email: 'ana@oto.test', + perfil: 'VISUALIZADOR', + ativo: true, +} + +afterEach(() => vi.unstubAllGlobals()) + +describe('PainelPage, acessibilidade', () => { + it('não tem violações com o destaque e os indicadores carregados', async () => { + criarApiFalsa({ + 'GET /api/campanhas/publicadas': { + corpo: [ + { + campanhaId: 15, + nome: 'Agosto de 2026', + modalidade: 'CONSOLIDADA', + tipoPeriodo: 'MENSAL', + periodoInicio: '2026-08-01', + }, + ], + }, + 'GET /api/referencias': { corpo: referencias }, + 'GET /api/campanhas/15/resultado': { corpo: resultado }, + }) + abrirTela(, { usuario: VISUALIZADOR }) + await screen.findByRole( + 'heading', + { name: 'Taxa de ocupação hoteleira em agosto de 2026' }, + { timeout: 4000 }, + ) + + expect(await violacoesDeAcessibilidade()).toEqual([]) + }) +}) diff --git a/src/features/painel/PainelPage.module.css b/src/features/painel/PainelPage.module.css index 5d2406e..017fc55 100644 --- a/src/features/painel/PainelPage.module.css +++ b/src/features/painel/PainelPage.module.css @@ -59,3 +59,21 @@ .larguraTotal { grid-column: 1 / -1; } + +@media (max-width: 900px) { + .indicadores { + grid-template-columns: repeat(2, 1fr); + } + + .linhaMensal, + .linhaFluxo { + grid-template-columns: 1fr; + row-gap: var(--vao-cards); + } +} + +@media (max-width: 600px) { + .indicadores { + grid-template-columns: 1fr; + } +} diff --git a/src/features/painel/PainelPage.test.tsx b/src/features/painel/PainelPage.test.tsx index 7e0654b..0598d26 100644 --- a/src/features/painel/PainelPage.test.tsx +++ b/src/features/painel/PainelPage.test.tsx @@ -22,6 +22,7 @@ const PUBLICADAS = [ modalidade: 'CONSOLIDADA', tipoPeriodo: 'MENSAL', periodoInicio: '2026-08-01', + periodoFim: '2026-08-31', }, { campanhaId: 13, @@ -29,6 +30,7 @@ const PUBLICADAS = [ modalidade: 'CONSOLIDADA', tipoPeriodo: 'MENSAL', periodoInicio: '2026-07-01', + periodoFim: '2026-07-31', }, ] @@ -239,7 +241,7 @@ describe('RHC e parâmetros vigentes no fluxo de turistas', () => { ).toBeInTheDocument() for (const caminho of ['/api/rhc/vigente', '/api/parametros-calculo/vigente']) { const busca = api.chamadas.find((chamada) => chamada.caminho === caminho)?.busca - expect(new URLSearchParams(busca).get('data')).toBe('2026-08-01') + expect(new URLSearchParams(busca).get('data')).toBe('2026-08-31') } }) diff --git a/src/features/painel/PainelPage.tsx b/src/features/painel/PainelPage.tsx index a8bbcb8..62476c2 100644 --- a/src/features/painel/PainelPage.tsx +++ b/src/features/painel/PainelPage.tsx @@ -41,8 +41,8 @@ export function PainelPage() { const anoDaCampanha = partesDoPeriodo(selecionada?.periodoInicio)?.ano const expectativa = useFeriadosDoPainel('EXPECTATIVA', anoDaCampanha) const realizado = useFeriadosDoPainel('CONSOLIDADA', anoDaCampanha) - const parametros = useParametrosDoPainel(selecionada?.periodoInicio) - const rhc = useRhcDoPainel(selecionada?.periodoInicio, perfil) + const parametros = useParametrosDoPainel(selecionada?.periodoFim) + const rhc = useRhcDoPainel(selecionada?.periodoFim, perfil) const [busca] = useSearchParams() const tipoEscolhido = valorDoFiltro( busca, diff --git a/src/features/painel/components/PainelFiltros.module.css b/src/features/painel/components/PainelFiltros.module.css index 5c8e4c7..b25a78e 100644 --- a/src/features/painel/components/PainelFiltros.module.css +++ b/src/features/painel/components/PainelFiltros.module.css @@ -51,3 +51,21 @@ .exportar button { width: 100%; } + +@media (max-width: 900px) { + .filtros { + grid-template-columns: 1fr 1fr; + row-gap: var(--espaco-3); + } +} + +@media (max-width: 600px) { + .filtros { + position: static; + grid-template-columns: 1fr; + } + + .filtros::before { + content: none; + } +} diff --git a/src/features/painel/components/TaxaOcupacaoDestaque.module.css b/src/features/painel/components/TaxaOcupacaoDestaque.module.css index 7b786c4..69a1f00 100644 --- a/src/features/painel/components/TaxaOcupacaoDestaque.module.css +++ b/src/features/painel/components/TaxaOcupacaoDestaque.module.css @@ -54,3 +54,19 @@ font: var(--tipo-rotulo-campo); text-transform: uppercase; } + +@media (max-width: 900px) { + .destaque { + grid-template-columns: 1fr; + } +} + +@media (max-width: 600px) { + .destaque { + padding: 23px 20px 0 20px; + } + + .valores { + flex-wrap: wrap; + } +} diff --git a/src/features/painel/hooks/useVigenciasDoPainel.ts b/src/features/painel/hooks/useVigenciasDoPainel.ts index 99dd409..d4e7ef6 100644 --- a/src/features/painel/hooks/useVigenciasDoPainel.ts +++ b/src/features/painel/hooks/useVigenciasDoPainel.ts @@ -14,7 +14,7 @@ async function naoExistirEhNulo(busca: Promise): Promise { } } -/** Os parâmetros de cálculo vigentes no início do período da campanha. */ +/** Os parâmetros de cálculo vigentes no fim do período da campanha. */ export function useParametrosDoPainel(data: string | undefined) { return useQuery({ queryKey: ['parametros-calculo', 'vigente', data], @@ -27,7 +27,7 @@ export function podeVerRhc(perfil: Perfil | undefined): boolean { return perfil === 'ADMIN' || perfil === 'VISUALIZADOR' } -/** O RHC vigente no início do período da campanha. O PARCEIRO não tem acesso (D7). */ +/** O RHC vigente no fim do período da campanha. O PARCEIRO não tem acesso (D7). */ export function useRhcDoPainel(data: string | undefined, perfil: Perfil | undefined) { return useQuery({ queryKey: ['rhc', 'vigente', data], diff --git a/src/features/pesquisas/AcompanhamentoPage.acessibilidade.test.tsx b/src/features/pesquisas/AcompanhamentoPage.acessibilidade.test.tsx new file mode 100644 index 0000000..327fd8d --- /dev/null +++ b/src/features/pesquisas/AcompanhamentoPage.acessibilidade.test.tsx @@ -0,0 +1,32 @@ +import { screen } from '@testing-library/react' +import { afterEach, describe, expect, it, vi } from 'vitest' +import { violacoesDeAcessibilidade } from '@/test/acessibilidade' +import { AcompanhamentoPage } from './AcompanhamentoPage' +import { abrirTela, simularApi } from './apiDeTeste' +import { ACOMPANHAMENTO, RODADA } from './dadosDeTesteAcompanhamento' + +afterEach(() => vi.unstubAllGlobals()) + +describe('AcompanhamentoPage, acessibilidade', () => { + it('não tem violações com respondentes e pendentes', async () => { + simularApi({ + 'GET /api/rodadas/5': { corpo: RODADA }, + 'GET /api/rodadas/5/acompanhamento': { corpo: ACOMPANHAMENTO }, + 'GET /api/referencias': { + corpo: { + tiposHospedagem: [ + { codigo: 'HOTEL', nome: 'Hotel' }, + { codigo: 'POUSADA', nome: 'Pousada' }, + ], + }, + }, + }) + abrirTela( + [{ path: '/pesquisas/:id', element: }], + '/pesquisas/5', + ) + await screen.findByRole('rowheader', { name: 'Hotel Thermas' }) + + expect(await violacoesDeAcessibilidade()).toEqual([]) + }) +}) diff --git a/src/features/pesquisas/AcompanhamentoPage.test.tsx b/src/features/pesquisas/AcompanhamentoPage.test.tsx index 42d195c..a857622 100644 --- a/src/features/pesquisas/AcompanhamentoPage.test.tsx +++ b/src/features/pesquisas/AcompanhamentoPage.test.tsx @@ -3,66 +3,7 @@ import userEvent from '@testing-library/user-event' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { AcompanhamentoPage } from './AcompanhamentoPage' import { abrirTela, simularApi } from './apiDeTeste' - -const RODADA = { - id: 5, - codigo: '005/26', - titulo: 'Consolidada de outubro', - status: 'ABERTA', - dataAbertura: '2026-11-01', - prazoResposta: '2026-11-20', - campanhas: [{ id: 50, nome: 'Consolidada de outubro de 2026', publicada: false }], -} - -const ACOMPANHAMENTO = { - rodadaId: 5, - codigo: '005/26', - status: 'ABERTA', - campanhas: [ - { - campanhaId: 50, - nome: 'Consolidada de outubro de 2026', - qtdMh: 3, - qtdRespondentes: 2, - leitosTotal: 13508, - leitosRespondentes: 9237, - percentualLeitosRespondentes: 68.38, - percentualMinimoPublicacao: 70, - atingiuMinimo: false, - estabelecimentos: [ - { - estabelecimentoId: 7, - nomeFantasia: 'Hotel Thermas', - tipoHospedagemCodigo: 'HOTEL', - qtdLeitos: 4271, - respondeu: false, - contatoNome: 'Marta', - telefonePesquisas: '(17) 3281-0000', - aceitaPesquisas: true, - }, - { - estabelecimentoId: 8, - nomeFantasia: 'Pousada do Sol', - tipoHospedagemCodigo: 'POUSADA', - qtdLeitos: 37, - respondeu: true, - versao: 2, - enviadoEm: '2026-11-05T13:00:00Z', - aceitaPesquisas: false, - }, - { - estabelecimentoId: 9, - nomeFantasia: 'Resort Águas', - tipoHospedagemCodigo: 'RESORT', - qtdLeitos: 9200, - respondeu: true, - versao: 1, - enviadoEm: '2026-11-03T10:00:00Z', - }, - ], - }, - ], -} +import { ACOMPANHAMENTO, RODADA } from './dadosDeTesteAcompanhamento' let api: ReturnType diff --git a/src/features/pesquisas/LancarRespostaPage.acessibilidade.test.tsx b/src/features/pesquisas/LancarRespostaPage.acessibilidade.test.tsx new file mode 100644 index 0000000..8f55861 --- /dev/null +++ b/src/features/pesquisas/LancarRespostaPage.acessibilidade.test.tsx @@ -0,0 +1,49 @@ +import { screen } from '@testing-library/react' +import { afterEach, describe, expect, it, vi } from 'vitest' +import { violacoesDeAcessibilidade } from '@/test/acessibilidade' +import { abrirTela, simularApi } from './apiDeTeste' +import { LancarRespostaPage } from './LancarRespostaPage' + +afterEach(() => vi.unstubAllGlobals()) + +describe('LancarRespostaPage, acessibilidade', () => { + it('não tem violações no formulário de resposta', async () => { + simularApi({ + 'GET /api/rodadas/5': { + corpo: { + id: 5, + codigo: '005/26', + status: 'ENCERRADA', + campanhas: [{ id: 50, publicada: false }], + }, + }, + 'GET /api/rodadas/5/acompanhamento': { + corpo: { + rodadaId: 5, + campanhas: [ + { + campanhaId: 50, + nome: 'Consolidada de outubro de 2026', + estabelecimentos: [ + { estabelecimentoId: 7, nomeFantasia: 'Hotel Thermas', respondeu: false }, + ], + }, + ], + }, + }, + 'GET /api/campanhas/50/respostas': { corpo: [] }, + }) + abrirTela( + [ + { + path: '/pesquisas/:id/campanhas/:campanhaId/respostas/:estabelecimentoId', + element: , + }, + ], + '/pesquisas/5/campanhas/50/respostas/7', + ) + await screen.findByRole('heading', { name: 'Hotel Thermas' }) + + expect(await violacoesDeAcessibilidade()).toEqual([]) + }) +}) diff --git a/src/features/pesquisas/LancarRespostaPage.test.tsx b/src/features/pesquisas/LancarRespostaPage.test.tsx index dd44430..34fcf79 100644 --- a/src/features/pesquisas/LancarRespostaPage.test.tsx +++ b/src/features/pesquisas/LancarRespostaPage.test.tsx @@ -1,4 +1,4 @@ -import { screen } from '@testing-library/react' +import { screen, within } from '@testing-library/react' import userEvent from '@testing-library/user-event' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { abrirTela, simularApi } from './apiDeTeste' @@ -94,6 +94,95 @@ describe('LancarRespostaPage (ADMIN, RF-15)', () => { expect(screen.getByRole('button', { name: 'Enviar correção' })).toBeEnabled() }) + it('mostra as versões enviadas só quando o histórico é aberto', async () => { + api.rotas['GET /api/respostas/301/historico'] = { + corpo: [ + { versao: 2, taxaOcupacao: 60, diariaMedia: 300.5, enviadoEm: '2026-11-03T10:00:00Z' }, + { versao: 1, taxaOcupacao: 55, enviadoEm: '2026-11-01T09:00:00Z' }, + ], + } + abrir(8) + await screen.findByText('Última resposta enviada: versão 1') + expect(api.leituras('/api/respostas/301/historico')).toBe(0) + + await userEvent.click(screen.getByText('Ver todas as versões enviadas')) + + const tabela = await screen.findByRole('table', { name: 'Versões enviadas' }) + const linhas = within(tabela).getAllByRole('row').slice(1) + expect(linhas).toHaveLength(2) + expect(linhas[0]).toHaveTextContent('2') + expect(linhas[0]).toHaveTextContent('60,00%') + expect(linhas[0]).toHaveTextContent('300,50') + expect(linhas[0]).toHaveTextContent('03/11/2026') + expect(linhas[1]).toHaveTextContent('55,00%') + expect(api.leituras('/api/respostas/301/historico')).toBe(1) + }) + + it('avisa quando as versões não carregam', async () => { + api.rotas['GET /api/respostas/301/historico'] = { status: 500, corpo: { detail: 'Falhou.' } } + abrir(8) + await screen.findByText('Última resposta enviada: versão 1') + + await userEvent.click(screen.getByText('Ver todas as versões enviadas')) + + expect(await screen.findByText('Não foi possível carregar as versões.')).toBeInTheDocument() + }) + + it('depois de enviar, mostra a última resposta com as versões da resposta nova', async () => { + api.rotas['PUT /api/campanhas/50/respostas/7'] = { + corpo: { + id: 303, + taxaOcupacao: 64, + diariaMedia: 410, + versao: 1, + enviadoEm: '2026-11-20T13:00:00Z', + }, + } + api.rotas['GET /api/respostas/303/historico'] = { corpo: [] } + abrir() + await screen.findByRole('heading', { name: 'Hotel Thermas' }) + + await userEvent.type(screen.getByLabelText('Taxa de ocupação (%)'), '64') + await userEvent.type(screen.getByLabelText('Diária média (R$, opcional)'), '410') + await userEvent.click(screen.getByRole('button', { name: 'Enviar resposta' })) + + expect(await screen.findByText('Última resposta enviada: versão 1')).toBeInTheDocument() + expect(screen.getByText(/em 20\/11\/2026/)).toBeInTheDocument() + expect(screen.getByRole('button', { name: 'Enviar correção' })).toBeInTheDocument() + expect(api.escritas()[0]?.corpo).toEqual({ taxaOcupacao: 64, diariaMedia: 410 }) + await userEvent.click(screen.getByText('Ver todas as versões enviadas')) + expect(await screen.findByText('Nenhuma versão enviada')).toBeInTheDocument() + }) + + it('não envia com a taxa vazia e mostra o erro no campo', async () => { + abrir() + await screen.findByRole('heading', { name: 'Hotel Thermas' }) + + await userEvent.click(screen.getByRole('button', { name: 'Enviar resposta' })) + + expect(screen.getByLabelText('Taxa de ocupação (%)')).toHaveAttribute('aria-invalid', 'true') + expect(api.escritas()).toHaveLength(0) + }) + + it('a recusa da API aparece, com o erro de campo, e o digitado continua', async () => { + api.rotas['PUT /api/campanhas/50/respostas/7'] = { + status: 400, + corpo: { detail: 'Dados inválidos.', campos: { diariaMedia: 'valor acima do permitido' } }, + } + abrir() + await screen.findByRole('heading', { name: 'Hotel Thermas' }) + + await userEvent.type(screen.getByLabelText('Taxa de ocupação (%)'), '64') + await userEvent.type(screen.getByLabelText('Diária média (R$, opcional)'), '99999') + await userEvent.click(screen.getByRole('button', { name: 'Enviar resposta' })) + + expect(await screen.findByRole('alert')).toHaveTextContent( + 'Não foi possível enviar a resposta.', + ) + expect(screen.getByText(/valor acima do permitido/)).toBeInTheDocument() + expect(screen.getByLabelText('Taxa de ocupação (%)')).toHaveValue('64') + }) + it('campanha publicada não aceita resposta, e diz por quê', async () => { api.rotas['GET /api/rodadas/5'] = { corpo: { ...RODADA, campanhas: [{ id: 50, publicada: true }] }, diff --git a/src/features/pesquisas/NovaPesquisaPage.acessibilidade.test.tsx b/src/features/pesquisas/NovaPesquisaPage.acessibilidade.test.tsx new file mode 100644 index 0000000..4306444 --- /dev/null +++ b/src/features/pesquisas/NovaPesquisaPage.acessibilidade.test.tsx @@ -0,0 +1,35 @@ +import { QueryClient, QueryClientProvider } from '@tanstack/react-query' +import { render, screen } from '@testing-library/react' +import { createMemoryRouter, RouterProvider } from 'react-router' +import { afterEach, describe, expect, it, vi } from 'vitest' +import { violacoesDeAcessibilidade } from '@/test/acessibilidade' +import { NovaPesquisaPage } from './NovaPesquisaPage' + +afterEach(() => vi.unstubAllGlobals()) + +describe('NovaPesquisaPage, acessibilidade', () => { + it('não tem violações no formulário preenchido com as sugestões', async () => { + const corpos: Record = { + '/api/referencias': { feriados: [{ codigo: 'CARNAVAL', nome: 'Carnaval', ordem: 1 }] }, + '/api/rodadas': [{ id: 17, codigo: '017/26' }], + } + vi.stubGlobal( + 'fetch', + vi.fn(async (url: string) => new Response(JSON.stringify(corpos[new URL(url).pathname]))), + ) + const router = createMemoryRouter( + [{ path: '/pesquisas/nova', element: }], + { initialEntries: ['/pesquisas/nova'] }, + ) + render( + + + , + ) + await screen.findByDisplayValue('018/26') + + expect(await violacoesDeAcessibilidade()).toEqual([]) + }) +}) diff --git a/src/features/pesquisas/PreviaPage.acessibilidade.test.tsx b/src/features/pesquisas/PreviaPage.acessibilidade.test.tsx new file mode 100644 index 0000000..a1ead30 --- /dev/null +++ b/src/features/pesquisas/PreviaPage.acessibilidade.test.tsx @@ -0,0 +1,51 @@ +import { screen } from '@testing-library/react' +import { afterEach, describe, expect, it, vi } from 'vitest' +import { violacoesDeAcessibilidade } from '@/test/acessibilidade' +import { abrirTela, simularApi } from './apiDeTeste' +import { RESULTADO } from './dadosDeTestePrevia' +import { PreviaPage } from './PreviaPage' + +afterEach(() => vi.unstubAllGlobals()) + +describe('PreviaPage, acessibilidade', () => { + it('não tem violações com a prévia e o impedimento de publicação', async () => { + simularApi({ + 'GET /api/campanhas/50/previa': { + corpo: { + campanhaId: 50, + qtdMh: 74, + qtdRespondentes: 41, + leitosTotal: 13508, + leitosRespondentes: 9237, + percentualLeitosRespondentes: 68.38, + percentualMinimoPublicacao: 70, + podePublicar: false, + impedimentos: ['Leitos respondentes: 68,38% (mínimo para publicar: 70%).'], + avisos: [], + resultado: RESULTADO, + }, + }, + 'GET /api/rodadas/5': { + corpo: { + id: 5, + codigo: '005/26', + status: 'ENCERRADA', + campanhas: [{ id: 50, nome: 'Consolidada de outubro de 2026', publicada: false }], + }, + }, + 'GET /api/referencias': { + corpo: { tiposHospedagem: [{ codigo: 'HOTEL', nome: 'Hotel', calculaReceita: true }] }, + }, + 'GET /api/campanhas/50/diarias': { corpo: [] }, + }) + abrirTela( + [{ path: '/pesquisas/:id/campanhas/:campanhaId/previa', element: }], + '/pesquisas/5/campanhas/50/previa', + ) + await screen.findByRole('heading', { level: 1 }) + await screen.findByText(/mínimo para publicar/) + await screen.findByRole('table', { name: 'Diárias informadas pela equipe' }) + + expect(await violacoesDeAcessibilidade()).toEqual([]) + }) +}) diff --git a/src/features/pesquisas/PreviaPage.test.tsx b/src/features/pesquisas/PreviaPage.test.tsx index 349533b..fb05512 100644 --- a/src/features/pesquisas/PreviaPage.test.tsx +++ b/src/features/pesquisas/PreviaPage.test.tsx @@ -1,7 +1,10 @@ -import { screen, within } from '@testing-library/react' +import { QueryClient, QueryClientProvider } from '@tanstack/react-query' +import { render, screen, within } from '@testing-library/react' import userEvent from '@testing-library/user-event' +import { createMemoryRouter, RouterProvider } from 'react-router' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { abrirTela, simularApi } from './apiDeTeste' +import { RESULTADO } from './dadosDeTestePrevia' import { PreviaPage } from './PreviaPage' const RODADA = { @@ -10,38 +13,6 @@ const RODADA = { status: 'ENCERRADA', campanhas: [{ id: 50, nome: 'Consolidada de outubro de 2026', publicada: false }], } -const RESULTADO = { - campanha: { id: 50, nome: 'Consolidada de outubro de 2026', qtdDiarias: 31 }, - taxaOcupacao: 64.73, - faixa: { codigo: 'OTIMA', nome: 'Ótima' }, - qtdMh: 74, - qtdMhRespondentes: 41, - percentualMhRespondentes: 55.41, - leitosTotal: 13508, - leitosRespondentes: 9237, - percentualLeitosRespondentes: 68.38, - fluxoMh: 58931.79, - fluxoRhc: 9282.65, - fluxoDayUse: 12179.71, - fluxoTotal: 80394.15, - fluxoMedioDiario: 2593.36, - diariaMedia: 812.4, - receitaHospedagem: 17137719.18, - receitaSemHospedagem: 97276924.77, - porTipo: [ - { - tipoHospedagemCodigo: 'HOTEL', - nome: 'Hotel', - qtdMh: 20, - qtdUh: 980, - taxaOcupacao: 40.35, - diariaMedia: 657.13, - revpar: 265.12, - receitaEstimada: 776805.3, - omitido: false, - }, - ], -} const COM_IMPEDIMENTO = { campanhaId: 50, qtdMh: 74, @@ -70,6 +41,7 @@ beforeEach(() => { api = simularApi({ 'GET /api/campanhas/50/previa': { corpo: COM_IMPEDIMENTO }, 'GET /api/rodadas/5': { corpo: RODADA }, + 'GET /api/campanhas/50/diarias': { corpo: [] }, 'GET /api/referencias': { corpo: { tiposHospedagem: [{ codigo: 'HOTEL', nome: 'Hotel', calculaReceita: true }] }, }, @@ -219,6 +191,47 @@ describe('PreviaPage, publicação (FE-07)', () => { ]) }) + describe('a lista de campanhas publicadas do painel', () => { + const CHAVE_PUBLICADAS = ['campanhas', 'publicadas'] + + function abrirComCache() { + const queryClient = new QueryClient({ defaultOptions: { queries: { retry: false } } }) + queryClient.setQueryData(CHAVE_PUBLICADAS, [{ campanhaId: 50 }]) + const router = createMemoryRouter( + [{ path: '/pesquisas/:id/campanhas/:campanhaId/previa', element: }], + { initialEntries: ['/pesquisas/5/campanhas/50/previa'] }, + ) + render( + + + , + ) + return queryClient + } + + it('fica desatualizada depois de cancelar a publicação', async () => { + publicada() + const queryClient = abrirComCache() + await userEvent.click(await screen.findByRole('button', { name: 'Cancelar publicação' })) + api.rotas['GET /api/rodadas/5'] = { corpo: RODADA } + expect(queryClient.getQueryState(CHAVE_PUBLICADAS)?.isInvalidated).toBe(false) + + await userEvent.click(screen.getByRole('button', { name: 'Confirmar cancelamento' })) + + expect(await screen.findByText('Publicação cancelada.')).toBeInTheDocument() + expect(queryClient.getQueryState(CHAVE_PUBLICADAS)?.isInvalidated).toBe(true) + }) + + it('fica desatualizada depois de publicar', async () => { + api.rotas['GET /api/campanhas/50/previa'] = { corpo: LIVRE } + const queryClient = abrirComCache() + await userEvent.click(await screen.findByRole('button', { name: 'Publicar' })) + + expect(await screen.findByText('Campanha publicada.')).toBeInTheDocument() + expect(queryClient.getQueryState(CHAVE_PUBLICADAS)?.isInvalidated).toBe(true) + }) + }) + it('recusa da API aparece', async () => { api.rotas['GET /api/campanhas/50/previa'] = { corpo: LIVRE } api.rotas['POST /api/campanhas/50/publicacao'] = { diff --git a/src/features/pesquisas/PreviaPage.tsx b/src/features/pesquisas/PreviaPage.tsx index 06a28c5..19dc806 100644 --- a/src/features/pesquisas/PreviaPage.tsx +++ b/src/features/pesquisas/PreviaPage.tsx @@ -3,6 +3,7 @@ import { useState } from 'react' import { Link, useParams } from 'react-router' import { buscarReferencias } from '@/api/referencias' import { buscarPrevia, cancelarPublicacao, publicarCampanha } from '@/api/resultados' +import { CHAVE_PUBLICADAS } from '@/features/painel/hooks/useCampanhasPublicadas' import { buscarRodada } from '@/api/rodadas' import { Button } from '@/components/ui/Button' import { Confirmacao } from '@/components/ui/Confirmacao' @@ -14,6 +15,7 @@ import { DesempenhoPorTipoCard } from '@/features/painel/components/DesempenhoPo import { formatarData, formatarInteiro, formatarPercentual } from '@/lib/formatos' import type { Esquemas } from '@/types/dominio' import comum from './comum.module.css' +import { DiariasInformadas } from './components/DiariasInformadas' import { IndicadoresDaCampanha } from './components/IndicadoresDaCampanha' import { ProgressoComMinimo } from './components/ProgressoComMinimo' import styles from './PreviaPage.module.css' @@ -48,6 +50,7 @@ function Publicacao({ await Promise.all([ queryClient.invalidateQueries({ queryKey: ['rodadas'] }), queryClient.invalidateQueries({ queryKey: ['campanhas', campanhaId] }), + queryClient.invalidateQueries({ queryKey: CHAVE_PUBLICADAS }), ]) }, }) @@ -224,6 +227,13 @@ export function PreviaPage() { )} + + {resultado && ( }) titulo="Respostas de pesquisas encerradas" subtitulo="Compare a sua ocupação com a da cidade depois que o OTO publica o resultado." > -
{legenda}
- - - - - - - - - - {encerradas.map((resposta) => ( - - - - - +
+
CampanhaEstabelecimento - Sua taxa - - Taxa da cidade -
{resposta.campanhaNome}{resposta.nomeFantasia}{formatarDecimal(resposta.taxaOcupacao)}% - {ausente(resposta.taxaOcupacaoCidade) ? ( - Ainda não publicada - ) : ( - `${formatarDecimal(resposta.taxaOcupacaoCidade)}%` - )} -
+ + + + + + - ))} - -
CampanhaEstabelecimento + Sua taxa + + Taxa da cidade +
+ + + {encerradas.map((resposta) => ( + + {resposta.campanhaNome} + {resposta.nomeFantasia} + {formatarDecimal(resposta.taxaOcupacao)}% + + {ausente(resposta.taxaOcupacaoCidade) ? ( + Ainda não publicada + ) : ( + `${formatarDecimal(resposta.taxaOcupacaoCidade)}%` + )} + + + ))} + + +
) } diff --git a/src/features/pesquisas/RodadasPage.acessibilidade.test.tsx b/src/features/pesquisas/RodadasPage.acessibilidade.test.tsx new file mode 100644 index 0000000..c719474 --- /dev/null +++ b/src/features/pesquisas/RodadasPage.acessibilidade.test.tsx @@ -0,0 +1,53 @@ +import { screen } from '@testing-library/react' +import { afterEach, describe, expect, it, vi } from 'vitest' +import { violacoesDeAcessibilidade } from '@/test/acessibilidade' +import { abrirTela, simularApi } from './apiDeTeste' +import { RodadasPage } from './RodadasPage' + +afterEach(() => vi.unstubAllGlobals()) + +describe('RodadasPage, acessibilidade', () => { + it('não tem violações com rodadas em vários estados', async () => { + simularApi({ + 'GET /api/rodadas': { + corpo: [ + { id: 3, codigo: '003/26', titulo: 'Outubro', status: 'RASCUNHO', campanhas: [] }, + { + id: 2, + codigo: '002/26', + titulo: 'Consolidada de setembro', + status: 'ABERTA', + prazoResposta: '2026-11-20', + campanhas: [ + { + id: 21, + nome: 'Consolidada de setembro de 2026', + periodoInicio: '2026-09-01', + periodoFim: '2026-09-30', + }, + ], + }, + { + id: 1, + codigo: '001/26', + titulo: 'Consolidada de agosto', + status: 'ENCERRADA', + prazoResposta: '2026-09-10', + campanhas: [ + { + id: 11, + nome: 'Consolidada de agosto de 2026', + publicada: true, + publicadaEm: '2026-09-18', + }, + ], + }, + ], + }, + }) + abrirTela([{ path: '/pesquisas', element: }], '/pesquisas') + await screen.findByRole('table', { name: 'Pesquisas' }) + + expect(await violacoesDeAcessibilidade()).toEqual([]) + }) +}) diff --git a/src/features/pesquisas/components/DiariasInformadas.module.css b/src/features/pesquisas/components/DiariasInformadas.module.css new file mode 100644 index 0000000..5ca7874 --- /dev/null +++ b/src/features/pesquisas/components/DiariasInformadas.module.css @@ -0,0 +1,24 @@ +.bloco { + display: grid; + gap: var(--espaco-4); + margin-top: 20px; +} + +.nota { + max-width: 72ch; + color: var(--cor-texto); + font: var(--tipo-corpo); +} + +@media (max-width: 1180px) { + .bloco th, + .bloco td { + padding-inline: var(--espaco-2); + } +} + +@media (max-width: 600px) { + .bloco td button { + min-height: 44px; + } +} diff --git a/src/features/pesquisas/components/DiariasInformadas.test.tsx b/src/features/pesquisas/components/DiariasInformadas.test.tsx new file mode 100644 index 0000000..267c035 --- /dev/null +++ b/src/features/pesquisas/components/DiariasInformadas.test.tsx @@ -0,0 +1,332 @@ +import { screen, within } from '@testing-library/react' +import userEvent from '@testing-library/user-event' +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' +import { violacoesDeAcessibilidade } from '@/test/acessibilidade' +import { preencherCampo } from '@/test/telas' +import { abrirTela, simularApi } from '../apiDeTeste' +import { PreviaPage } from '../PreviaPage' + +const RODADA = { + id: 5, + codigo: '005/26', + status: 'ENCERRADA', + campanhas: [{ id: 50, nome: 'Consolidada de outubro de 2026', publicada: false }], +} +const RESULTADO = { + campanha: { id: 50, nome: 'Consolidada de outubro de 2026', qtdDiarias: 31 }, + taxaOcupacao: 64.73, + diariaMedia: 812.4, + receitaHospedagem: 17137719.18, + porTipo: [ + { tipoHospedagemCodigo: 'HOTEL', nome: 'Hotel', qtdMh: 20, diariaMedia: 700 }, + { tipoHospedagemCodigo: 'POUSADA', nome: 'Pousada', qtdMh: 12, diariaMedia: 380.5 }, + ], +} +const PREVIA = { + campanhaId: 50, + qtdMh: 74, + qtdRespondentes: 41, + leitosTotal: 13508, + leitosRespondentes: 9720, + percentualLeitosRespondentes: 71.96, + percentualMinimoPublicacao: 70, + podePublicar: true, + impedimentos: [], + avisos: [], + resultado: RESULTADO, +} +const HOTEL = { + tipoHospedagemCodigo: 'HOTEL', + diariaMedia: 700, + fonte: 'Planilha de tabulação', + registradoPor: 1, + registradoEm: '2026-11-12T17:30:00Z', +} +const POUSADA = { ...HOTEL, tipoHospedagemCodigo: 'POUSADA', diariaMedia: 410.5 } + +let api: ReturnType + +beforeEach(() => { + api = simularApi({ + 'GET /api/campanhas/50/previa': { corpo: PREVIA }, + 'GET /api/rodadas/5': { corpo: RODADA }, + 'GET /api/campanhas/50/diarias': { corpo: [HOTEL] }, + 'PUT /api/campanhas/50/diarias': { corpo: [] }, + 'GET /api/referencias': { + corpo: { + tiposHospedagem: [ + { codigo: 'HOTEL', nome: 'Hotel', calculaReceita: true }, + { codigo: 'POUSADA', nome: 'Pousada', calculaReceita: true }, + ], + }, + }, + }) +}) + +afterEach(() => vi.unstubAllGlobals()) + +function abrir() { + return abrirTela( + [{ path: '/pesquisas/:id/campanhas/:campanhaId/previa', element: }], + '/pesquisas/5/campanhas/50/previa', + ) +} + +async function tabela() { + return screen.findByRole('table', { name: 'Diárias informadas pela equipe' }) +} + +function bloco() { + return screen + .getByRole('heading', { level: 2, name: 'Diárias informadas pela equipe' }) + .closest('section')! +} + +function linha(tabela: HTMLElement, recorte: string) { + return within(within(tabela).getByRole('rowheader', { name: recorte }).closest('tr')!) +} + +describe('DiariasInformadas, lista', () => { + it('mostra a diária informada e a usada na prévia de cada recorte', async () => { + abrir() + const lista = await tabela() + + expect(linha(lista, 'Geral (todos os tipos)').getByText('Não informada')).toBeInTheDocument() + expect(linha(lista, 'Geral (todos os tipos)').getByText('R$ 812,40')).toBeInTheDocument() + expect( + linha(lista, 'Geral (todos os tipos)').getByText('média das respostas'), + ).toBeInTheDocument() + expect(linha(lista, 'Hotel').getAllByText('R$ 700,00')).toHaveLength(2) + expect(linha(lista, 'Hotel').getByText('informada pela equipe')).toBeInTheDocument() + expect(linha(lista, 'Pousada').getByText('Não informada')).toBeInTheDocument() + expect( + screen.getByText('Fonte: Planilha de tabulação. Última alteração em 12/11/2026 às 14:30.'), + ).toBeInTheDocument() + expect( + linha(lista, 'Hotel').getByRole('button', { name: 'Corrigir diária de Hotel' }), + ).toBeInTheDocument() + expect( + linha(lista, 'Hotel').getByRole('button', { name: 'Remover diária de Hotel' }), + ).toBeInTheDocument() + expect( + linha(lista, 'Pousada').queryByRole('button', { name: /Remover/ }), + ).not.toBeInTheDocument() + }) + + it('sem diárias informadas, o cálculo usa a média das respostas', async () => { + api.rotas['GET /api/campanhas/50/diarias'] = { corpo: [] } + abrir() + await tabela() + + expect( + screen.getByText('Nenhuma diária informada. O cálculo usa a média das respostas.'), + ).toBeInTheDocument() + expect(screen.getByRole('button', { name: 'Informar diária geral' })).toBeInTheDocument() + expect(screen.getByRole('button', { name: 'Informar diária de Hotel' })).toBeInTheDocument() + expect(screen.getByRole('button', { name: 'Informar diária de Pousada' })).toBeInTheDocument() + expect(screen.queryByRole('button', { name: /^Remover/ })).not.toBeInTheDocument() + }) + + it('erro ao carregar as diárias fica no bloco e permite tentar de novo', async () => { + api.rotas['GET /api/campanhas/50/diarias'] = [ + { status: 500, corpo: { detail: 'Falha no servidor.' } }, + { corpo: [] }, + ] + abrir() + + expect(await screen.findByRole('alert')).toHaveTextContent( + 'Não foi possível carregar as diárias informadas.', + ) + await userEvent.click(screen.getByRole('button', { name: 'Tentar novamente' })) + + expect(await tabela()).toBeInTheDocument() + }) + + it('campanha publicada: sem incluir, corrigir nem remover', async () => { + api.rotas['GET /api/rodadas/5'] = { + corpo: { ...RODADA, campanhas: [{ ...RODADA.campanhas[0], publicada: true }] }, + } + abrir() + const lista = await tabela() + + expect( + screen.getByText('A campanha já foi publicada. Cancele a publicação para mudar as diárias.'), + ).toBeInTheDocument() + expect(within(lista).queryByRole('button')).not.toBeInTheDocument() + expect(within(lista).queryByRole('columnheader', { name: 'Ações' })).not.toBeInTheDocument() + }) +}) + +describe('DiariasInformadas, edição', () => { + it('inclui a diária de um tipo, regrava a prévia e devolve o foco', async () => { + abrir() + await tabela() + api.rotas['PUT /api/campanhas/50/diarias'] = { corpo: [HOTEL, POUSADA] } + api.rotas['GET /api/campanhas/50/diarias'] = { corpo: [HOTEL, POUSADA] } + api.rotas['GET /api/campanhas/50/previa'] = { + corpo: { + ...PREVIA, + resultado: { + ...RESULTADO, + diariaMedia: 820.1, + porTipo: [RESULTADO.porTipo[0], { ...RESULTADO.porTipo[1], diariaMedia: 410.5 }], + }, + }, + } + + await userEvent.click(screen.getByRole('button', { name: 'Informar diária de Pousada' })) + const dialogo = screen.getByRole('dialog', { name: 'Informar diária de Pousada' }) + const campo = within(dialogo).getByRole('textbox', { name: 'Diária média (R$)' }) + expect(campo).toHaveFocus() + expect(campo).toHaveValue('') + expect(campo).toHaveAccessibleDescription('Média das respostas na prévia: R$ 380,50.') + expect(within(dialogo).getByRole('textbox', { name: 'Fonte (opcional)' })).toHaveValue( + 'Planilha de tabulação', + ) + await preencherCampo(campo, '410,5') + await userEvent.click(within(dialogo).getByRole('button', { name: 'Salvar' })) + + expect(await within(bloco()).findByRole('status')).toHaveTextContent( + 'Diária de Pousada salva. A prévia já usa o novo valor.', + ) + expect(screen.queryByRole('dialog')).not.toBeInTheDocument() + expect(api.escritas()).toEqual([ + expect.objectContaining({ + metodo: 'PUT', + caminho: '/api/campanhas/50/diarias', + corpo: { + diarias: [ + { tipoHospedagemCodigo: 'HOTEL', diariaMedia: 700 }, + { tipoHospedagemCodigo: 'POUSADA', diariaMedia: 410.5 }, + ], + fonte: 'Planilha de tabulação', + }, + }), + ]) + expect(api.leituras('/api/campanhas/50/previa')).toBe(2) + const lista = await tabela() + expect(linha(lista, 'Pousada').getAllByText('R$ 410,50')).toHaveLength(2) + expect(linha(lista, 'Pousada').getByText('informada pela equipe')).toBeInTheDocument() + expect(screen.getByRole('button', { name: 'Corrigir diária de Pousada' })).toHaveFocus() + }) + + it('corrige a diária informada a partir do valor atual', async () => { + abrir() + await tabela() + + await userEvent.click(screen.getByRole('button', { name: 'Corrigir diária de Hotel' })) + const dialogo = screen.getByRole('dialog', { name: 'Corrigir diária de Hotel' }) + const campo = within(dialogo).getByRole('textbox', { name: 'Diária média (R$)' }) + expect(campo).toHaveValue('700') + await preencherCampo(campo, '720.25') + await preencherCampo(within(dialogo).getByRole('textbox', { name: 'Fonte (opcional)' }), '') + await userEvent.click(within(dialogo).getByRole('button', { name: 'Salvar' })) + + expect(await within(bloco()).findByRole('status')).toHaveTextContent('Diária de Hotel salva.') + expect(api.escritas()[0]?.corpo).toEqual({ + diarias: [{ tipoHospedagemCodigo: 'HOTEL', diariaMedia: 720.25 }], + }) + }) + + it('a diária geral vai sem código de tipo', async () => { + api.rotas['GET /api/campanhas/50/diarias'] = { corpo: [] } + abrir() + await tabela() + + await userEvent.click(screen.getByRole('button', { name: 'Informar diária geral' })) + const dialogo = screen.getByRole('dialog', { name: 'Informar diária geral' }) + await preencherCampo(within(dialogo).getByRole('textbox', { name: 'Diária média (R$)' }), '800') + await userEvent.click(within(dialogo).getByRole('button', { name: 'Salvar' })) + + expect(await within(bloco()).findByRole('status')).toHaveTextContent('Diária geral salva.') + expect(api.escritas()[0]?.corpo).toEqual({ diarias: [{ diariaMedia: 800 }] }) + }) + + it('remove depois de confirmar e o cálculo volta à média', async () => { + abrir() + await tabela() + api.rotas['GET /api/campanhas/50/diarias'] = { corpo: [] } + + await userEvent.click(screen.getByRole('button', { name: 'Remover diária de Hotel' })) + const confirmacao = screen.getByRole('dialog', { name: 'Remover diária de Hotel?' }) + expect(confirmacao).toHaveAccessibleDescription('O cálculo volta a usar a média das respostas.') + expect(within(confirmacao).getByRole('button', { name: 'Cancelar' })).toHaveFocus() + await userEvent.click(within(confirmacao).getByRole('button', { name: 'Remover' })) + + expect(await within(bloco()).findByRole('status')).toHaveTextContent( + 'Diária de Hotel removida. O cálculo volta a usar a média das respostas.', + ) + expect(api.escritas()[0]?.corpo).toEqual({ diarias: [], fonte: 'Planilha de tabulação' }) + expect(api.leituras('/api/campanhas/50/previa')).toBe(2) + expect(screen.getByRole('button', { name: 'Informar diária de Hotel' })).toHaveFocus() + }) + + it('desistir da remoção não grava e devolve o foco', async () => { + abrir() + await tabela() + const remover = screen.getByRole('button', { name: 'Remover diária de Hotel' }) + + await userEvent.click(remover) + await userEvent.click(screen.getByRole('button', { name: 'Cancelar' })) + + expect(screen.queryByRole('dialog')).not.toBeInTheDocument() + expect(remover).toHaveFocus() + expect(api.escritas()).toEqual([]) + }) + + it.each([ + ['', 'Informe a diária média.'], + ['0', 'A diária precisa ser maior que zero.'], + ['410,555', 'Use no máximo duas casas decimais.'], + ['quatrocentos', 'Use só números, como 410,00.'], + ])('valida "%s" antes de enviar', async (texto, erro) => { + abrir() + await tabela() + + await userEvent.click(screen.getByRole('button', { name: 'Informar diária de Pousada' })) + const dialogo = screen.getByRole('dialog', { name: 'Informar diária de Pousada' }) + const campo = within(dialogo).getByRole('textbox', { name: 'Diária média (R$)' }) + await preencherCampo(campo, texto) + await userEvent.click(within(dialogo).getByRole('button', { name: 'Salvar' })) + + expect(campo).toHaveAttribute('aria-invalid', 'true') + expect(campo).toHaveAccessibleDescription(expect.stringContaining(erro)) + expect(campo).toHaveFocus() + expect(api.escritas()).toEqual([]) + }) + + it('recusa da API aparece no diálogo, que continua aberto', async () => { + api.rotas['PUT /api/campanhas/50/diarias'] = { + status: 422, + corpo: { detail: 'A campanha já foi publicada. Cancele a publicação para mudar as diárias.' }, + } + abrir() + await tabela() + + await userEvent.click(screen.getByRole('button', { name: 'Corrigir diária de Hotel' })) + const dialogo = screen.getByRole('dialog', { name: 'Corrigir diária de Hotel' }) + await userEvent.click(within(dialogo).getByRole('button', { name: 'Salvar' })) + + expect(await within(dialogo).findByRole('alert')).toHaveTextContent( + 'A campanha já foi publicada. Cancele a publicação para mudar as diárias.', + ) + expect(within(dialogo).getByRole('button', { name: 'Salvar' })).toBeEnabled() + expect(within(bloco()).queryByRole('status')).not.toBeInTheDocument() + }) +}) + +describe('DiariasInformadas, acessibilidade', () => { + it('não tem violações na lista nem no diálogo', async () => { + abrir() + await tabela() + + expect(await violacoesDeAcessibilidade()).toEqual([]) + + await userEvent.click(screen.getByRole('button', { name: 'Corrigir diária de Hotel' })) + await userEvent.click(screen.getByRole('button', { name: 'Salvar' })) + await within(bloco()).findByRole('status') + await userEvent.click(screen.getByRole('button', { name: 'Remover diária de Hotel' })) + + expect(await violacoesDeAcessibilidade()).toEqual([]) + }) +}) diff --git a/src/features/pesquisas/components/DiariasInformadas.tsx b/src/features/pesquisas/components/DiariasInformadas.tsx new file mode 100644 index 0000000..52a3754 --- /dev/null +++ b/src/features/pesquisas/components/DiariasInformadas.tsx @@ -0,0 +1,336 @@ +import { useQuery, type UseQueryResult } from '@tanstack/react-query' +import { useId, useRef, useState, type RefObject } from 'react' +import { listarDiariasInformadas, salvarDiariasInformadas } from '@/api/resultados' +import { Button } from '@/components/ui/Button' +import { CampoTexto } from '@/components/ui/CampoTexto' +import { Card } from '@/components/ui/Card' +import { Carregando } from '@/components/ui/Carregando' +import { Confirmacao } from '@/components/ui/Confirmacao' +import { Dialogo } from '@/components/ui/Dialogo' +import { ErroApi } from '@/components/ui/ErroApi' +import { Tabela, type ColunaTabela } from '@/components/ui/Tabela' +import { Formulario } from '@/features/cadastros/Formulario' +import type { FalhaDaApi } from '@/features/cadastros/falhaDaApi' +import { useMutacaoCadastro } from '@/features/cadastros/useMutacaoCadastro' +import { capitalizar, formatarDataHora } from '@/lib/formatos' +import type { Esquemas } from '@/types/dominio' +import comum from '../comum.module.css' +import { + GERAL, + fonteAtual, + linhasDeDiarias, + pedidoDeDiarias, + ultimaAlteracao, + validarDiaria, + type LinhaDiaria, +} from '../diarias' +import { lerNumero, paraCampo, textoDaDiaria } from '../respostas' +import styles from './DiariasInformadas.module.css' + +type Edicao = { tipo: 'informar' | 'remover'; linha: LinhaDiaria } +type Informadas = Esquemas['DiariaInformadaResponse'][] + +type DiariasInformadasProps = Readonly<{ + campanhaId: number + publicada: boolean + resultado: Esquemas['ResultadoResponse'] | undefined + tipos: Esquemas['TipoRef'][] +}> + +const COLUNAS: ColunaTabela[] = [ + { + titulo: 'Recorte', + celula: (linha) => (linha.codigo === GERAL ? 'Geral (todos os tipos)' : linha.nome), + }, + { + titulo: 'Diária informada', + numerica: true, + celula: (linha) => + linha.informada === null ? 'Não informada' : textoDaDiaria(linha.informada), + }, + { + titulo: 'Usada na prévia', + numerica: true, + celula: (linha) => ( + <> + {textoDaDiaria(linha.naPrevia)} + {linha.naPrevia !== null && ( + + {linha.informada === null ? 'média das respostas' : 'informada pela equipe'} + + )} + + ), + }, +] + +function rotuloDaAcao(linha: LinhaDiaria) { + return linha.informada === null ? 'Informar' : 'Corrigir' +} + +function notaDaLista(informadas: Informadas) { + if (informadas.length === 0) { + return 'Nenhuma diária informada. O cálculo usa a média das respostas.' + } + const fonte = fonteAtual(informadas) + const origem = fonte ? `Fonte: ${fonte}. ` : '' + return `${origem}Última alteração em ${formatarDataHora(ultimaAlteracao(informadas))}.` +} + +function ajudaDaDiaria(linha: LinhaDiaria) { + if (linha.informada === null && linha.naPrevia !== null) { + return `Média das respostas na prévia: ${textoDaDiaria(linha.naPrevia)}.` + } + return 'Use vírgula ou ponto, com até duas casas, como 410,50.' +} + +type AcoesDaLinhaProps = Readonly<{ + linha: LinhaDiaria + id: string + aoAbrir: (tipo: Edicao['tipo'], linha: LinhaDiaria) => void +}> + +function AcoesDaLinha({ linha, id, aoAbrir }: AcoesDaLinhaProps) { + const rotulo = rotuloDaAcao(linha) + return ( + <> + + {linha.informada !== null && ( + + )} + + ) +} + +type ListaDeDiariasProps = Readonly<{ + consulta: UseQueryResult + linhas: (informadas: Informadas) => LinhaDiaria[] + publicada: boolean + idPrincipal: (linha: LinhaDiaria) => string + aoAbrir: (tipo: Edicao['tipo'], linha: LinhaDiaria) => void +}> + +function ListaDeDiarias({ + consulta, + linhas, + publicada, + idPrincipal, + aoAbrir, +}: ListaDeDiariasProps) { + if (consulta.isError) { + return ( + void consulta.refetch()} + /> + ) + } + if (consulta.isPending) return + + return ( + <> +

{notaDaLista(consulta.data)}

+ linha.codigo || 'geral'} + vazio={{ titulo: 'Nenhum tipo de hospedagem cadastrado' }} + acoes={ + publicada + ? undefined + : (linha) => + } + /> + + ) +} + +type DialogoDeDiariaProps = Readonly<{ + linha: LinhaDiaria + diaria: string + fonte: string + erro: string | undefined + campo: RefObject + enviando: boolean + falha: FalhaDaApi | null + aoMudarDiaria: (valor: string) => void + aoMudarFonte: (valor: string) => void + aoEnviar: () => void + aoFechar: () => void +}> + +function DialogoDeDiaria({ + linha, + diaria, + fonte, + erro, + campo, + enviando, + falha, + aoMudarDiaria, + aoMudarFonte, + aoEnviar, + aoFechar, +}: DialogoDeDiariaProps) { + return ( + + + aoMudarDiaria(evento.target.value)} + erro={erro} + ajuda={ajudaDaDiaria(linha)} + /> + aoMudarFonte(evento.target.value)} + ajuda="Vale para todas as diárias informadas desta campanha." + /> + + + ) +} + +/** RF-18 a RF-21: a diária digitada pela equipe substitui a média das respostas no cálculo. */ +export function DiariasInformadas({ + campanhaId, + publicada, + resultado, + tipos, +}: DiariasInformadasProps) { + const prefixo = useId() + const campo = useRef(null) + const [edicao, setEdicao] = useState(null) + const [aviso, setAviso] = useState('') + const [diaria, setDiaria] = useState('') + const [fonte, setFonte] = useState('') + const [tentouEnviar, setTentouEnviar] = useState(false) + + const chave = ['campanhas', campanhaId, 'diarias'] + const consulta = useQuery({ + queryKey: chave, + queryFn: ({ signal }) => listarDiariasInformadas(campanhaId, signal), + }) + const informadas = consulta.data ?? [] + + const idPrincipal = (linha: LinhaDiaria) => `${prefixo}-${linha.codigo || 'geral'}` + const fechar = () => setEdicao(null) + + const salvar = useMutacaoCadastro({ + acao: ({ linha, valor }: { linha: LinhaDiaria; valor: number | null }) => + salvarDiariasInformadas(campanhaId, pedidoDeDiarias(informadas, linha.codigo, valor, fonte)), + invalidar: [chave, ['campanhas', campanhaId, 'previa']], + aoConcluir: (_, { linha, valor }) => { + setAviso( + valor === null + ? `${capitalizar(linha.rotulo)} removida. O cálculo volta a usar a média das respostas.` + : `${capitalizar(linha.rotulo)} salva. A prévia já usa o novo valor.`, + ) + fechar() + document.getElementById(idPrincipal(linha))?.focus() + }, + }) + + function abrir(tipo: Edicao['tipo'], linha: LinhaDiaria) { + salvar.reset() + setAviso('') + setDiaria(paraCampo(linha.informada)) + setFonte(fonteAtual(informadas)) + setTentouEnviar(false) + setEdicao({ tipo, linha }) + } + + function enviar(linha: LinhaDiaria) { + setTentouEnviar(true) + if (validarDiaria(diaria)) { + campo.current?.focus() + return + } + salvar.mutate({ linha, valor: lerNumero(diaria) }) + } + + return ( + +
+ linhasDeDiarias(tipos, lista, resultado)} + publicada={publicada} + idPrincipal={idPrincipal} + aoAbrir={abrir} + /> + + {aviso && {aviso}} +
+ + {!publicada && edicao?.tipo === 'informar' && ( + enviar(edicao.linha)} + aoFechar={fechar} + /> + )} + + {!publicada && edicao?.tipo === 'remover' && ( + salvar.mutate({ linha: edicao.linha, valor: null })} + aoCancelar={fechar} + /> + )} +
+ ) +} diff --git a/src/features/pesquisas/dadosDeTesteAcompanhamento.ts b/src/features/pesquisas/dadosDeTesteAcompanhamento.ts new file mode 100644 index 0000000..3809bad --- /dev/null +++ b/src/features/pesquisas/dadosDeTesteAcompanhamento.ts @@ -0,0 +1,59 @@ +export const RODADA = { + id: 5, + codigo: '005/26', + titulo: 'Consolidada de outubro', + status: 'ABERTA', + dataAbertura: '2026-11-01', + prazoResposta: '2026-11-20', + campanhas: [{ id: 50, nome: 'Consolidada de outubro de 2026', publicada: false }], +} + +export const ACOMPANHAMENTO = { + rodadaId: 5, + codigo: '005/26', + status: 'ABERTA', + campanhas: [ + { + campanhaId: 50, + nome: 'Consolidada de outubro de 2026', + qtdMh: 3, + qtdRespondentes: 2, + leitosTotal: 13508, + leitosRespondentes: 9237, + percentualLeitosRespondentes: 68.38, + percentualMinimoPublicacao: 70, + atingiuMinimo: false, + estabelecimentos: [ + { + estabelecimentoId: 7, + nomeFantasia: 'Hotel Thermas', + tipoHospedagemCodigo: 'HOTEL', + qtdLeitos: 4271, + respondeu: false, + contatoNome: 'Marta', + telefonePesquisas: '(17) 3281-0000', + aceitaPesquisas: true, + }, + { + estabelecimentoId: 8, + nomeFantasia: 'Pousada do Sol', + tipoHospedagemCodigo: 'POUSADA', + qtdLeitos: 37, + respondeu: true, + versao: 2, + enviadoEm: '2026-11-05T13:00:00Z', + aceitaPesquisas: false, + }, + { + estabelecimentoId: 9, + nomeFantasia: 'Resort Águas', + tipoHospedagemCodigo: 'RESORT', + qtdLeitos: 9200, + respondeu: true, + versao: 1, + enviadoEm: '2026-11-03T10:00:00Z', + }, + ], + }, + ], +} diff --git a/src/features/pesquisas/dadosDeTestePrevia.ts b/src/features/pesquisas/dadosDeTestePrevia.ts new file mode 100644 index 0000000..5e4624e --- /dev/null +++ b/src/features/pesquisas/dadosDeTestePrevia.ts @@ -0,0 +1,32 @@ +export const RESULTADO = { + campanha: { id: 50, nome: 'Consolidada de outubro de 2026', qtdDiarias: 31 }, + taxaOcupacao: 64.73, + faixa: { codigo: 'OTIMA', nome: 'Ótima' }, + qtdMh: 74, + qtdMhRespondentes: 41, + percentualMhRespondentes: 55.41, + leitosTotal: 13508, + leitosRespondentes: 9237, + percentualLeitosRespondentes: 68.38, + fluxoMh: 58931.79, + fluxoRhc: 9282.65, + fluxoDayUse: 12179.71, + fluxoTotal: 80394.15, + fluxoMedioDiario: 2593.36, + diariaMedia: 812.4, + receitaHospedagem: 17137719.18, + receitaSemHospedagem: 97276924.77, + porTipo: [ + { + tipoHospedagemCodigo: 'HOTEL', + nome: 'Hotel', + qtdMh: 20, + qtdUh: 980, + taxaOcupacao: 40.35, + diariaMedia: 657.13, + revpar: 265.12, + receitaEstimada: 776805.3, + omitido: false, + }, + ], +} diff --git a/src/features/pesquisas/diarias.test.ts b/src/features/pesquisas/diarias.test.ts new file mode 100644 index 0000000..1513652 --- /dev/null +++ b/src/features/pesquisas/diarias.test.ts @@ -0,0 +1,119 @@ +import { describe, expect, it } from 'vitest' +import { + GERAL, + fonteAtual, + linhasDeDiarias, + pedidoDeDiarias, + ultimaAlteracao, + validarDiaria, +} from './diarias' + +const TIPOS = [ + { codigo: 'HOTEL', nome: 'Hotel' }, + { codigo: 'POUSADA', nome: 'Pousada' }, +] +const INFORMADAS = [ + { tipoHospedagemCodigo: null as unknown as undefined, diariaMedia: 800, fonte: '' }, + { + tipoHospedagemCodigo: 'HOTEL', + diariaMedia: 700, + fonte: 'Planilha', + registradoEm: '2026-11-12T17:30:00Z', + }, + { tipoHospedagemCodigo: 'CAMPING', diariaMedia: 90, registradoEm: '2026-11-10T10:00:00Z' }, +] + +describe('linhasDeDiarias', () => { + it('a geral primeiro, depois os tipos e os informados fora das referências', () => { + const linhas = linhasDeDiarias(TIPOS, INFORMADAS, { + diariaMedia: 800, + porTipo: [ + { tipoHospedagemCodigo: 'HOTEL', diariaMedia: 700 }, + { tipoHospedagemCodigo: 'POUSADA', diariaMedia: null as unknown as undefined }, + ], + }) + + expect(linhas).toEqual([ + { codigo: GERAL, nome: 'Geral', rotulo: 'diária geral', informada: 800, naPrevia: 800 }, + { codigo: 'HOTEL', nome: 'Hotel', rotulo: 'diária de Hotel', informada: 700, naPrevia: 700 }, + { + codigo: 'POUSADA', + nome: 'Pousada', + rotulo: 'diária de Pousada', + informada: null, + naPrevia: null, + }, + { + codigo: 'CAMPING', + nome: 'CAMPING', + rotulo: 'diária de CAMPING', + informada: 90, + naPrevia: null, + }, + ]) + }) + + it('sem resultado e sem informadas, todas as linhas ficam vazias', () => { + const linhas = linhasDeDiarias([{ codigo: 'HOTEL' }], [], undefined) + + expect(linhas.map((linha) => [linha.nome, linha.informada, linha.naPrevia])).toEqual([ + ['Geral', null, null], + ['HOTEL', null, null], + ]) + }) +}) + +describe('validarDiaria', () => { + it.each([ + ['', 'Informe a diária média.'], + [' ', 'Informe a diária média.'], + ['abc', 'Use só números, como 410,00.'], + ['0', 'A diária precisa ser maior que zero.'], + ['410,555', 'Use no máximo duas casas decimais.'], + ['100000000', 'A diária média passa do limite aceito.'], + ])('"%s" → %s', (texto, erro) => { + expect(validarDiaria(texto)).toBe(erro) + }) + + it.each(['410', '410,5', '410.55', '1.234,56'])('"%s" vale', (texto) => { + expect(validarDiaria(texto)).toBeUndefined() + }) +}) + +describe('pedidoDeDiarias', () => { + it('inclui um tipo e mantém os demais', () => { + expect(pedidoDeDiarias(INFORMADAS, 'POUSADA', 410.5, ' Planilha ')).toEqual({ + diarias: [ + { diariaMedia: 800 }, + { tipoHospedagemCodigo: 'HOTEL', diariaMedia: 700 }, + { tipoHospedagemCodigo: 'CAMPING', diariaMedia: 90 }, + { tipoHospedagemCodigo: 'POUSADA', diariaMedia: 410.5 }, + ], + fonte: 'Planilha', + }) + }) + + it('corrige a geral sem mandar o código do tipo', () => { + expect(pedidoDeDiarias(INFORMADAS, GERAL, 820, '').diarias).toEqual([ + { tipoHospedagemCodigo: 'HOTEL', diariaMedia: 700 }, + { tipoHospedagemCodigo: 'CAMPING', diariaMedia: 90 }, + { diariaMedia: 820 }, + ]) + }) + + it('remove com valor nulo; sem fonte, ela não vai', () => { + expect(pedidoDeDiarias(INFORMADAS, 'HOTEL', null, '')).toEqual({ + diarias: [{ diariaMedia: 800 }, { tipoHospedagemCodigo: 'CAMPING', diariaMedia: 90 }], + fonte: undefined, + }) + }) +}) + +describe('fonte e data', () => { + it('a primeira fonte preenchida e o registro mais recente', () => { + expect(fonteAtual(INFORMADAS)).toBe('Planilha') + expect(fonteAtual([])).toBe('') + expect(ultimaAlteracao(INFORMADAS)).toBe('2026-11-12T17:30:00Z') + expect(ultimaAlteracao([])).toBeUndefined() + }) +}) diff --git a/src/features/pesquisas/diarias.ts b/src/features/pesquisas/diarias.ts new file mode 100644 index 0000000..74ca373 --- /dev/null +++ b/src/features/pesquisas/diarias.ts @@ -0,0 +1,106 @@ +import type { Esquemas } from '@/types/dominio' +import { validarResposta } from './resposta' +import { ausente } from './respostas' + +type Informada = Esquemas['DiariaInformadaResponse'] + +/** Chave da diária geral: a API a guarda com `tipoHospedagemCodigo` nulo. */ +export const GERAL = '' + +export type LinhaDiaria = { + /** código do tipo de hospedagem; `GERAL` para a diária geral */ + codigo: string + nome: string + /** "diária geral" ou "diária de Hotel", para botões e avisos */ + rotulo: string + informada: number | null + /** a diária que a prévia usou: a informada ou, sem ela, a média das respostas */ + naPrevia: number | null +} + +function chaveDe(codigo: string | null | undefined): string { + return codigo?.trim() ? codigo.trim() : GERAL +} + +function valor(numero: number | null | undefined): number | null { + return ausente(numero) ? null : numero +} + +/** Uma linha para a diária geral e uma por tipo, mais os tipos informados que saíram das referências. */ +export function linhasDeDiarias( + tipos: Esquemas['TipoRef'][], + informadas: Informada[], + resultado: Esquemas['ResultadoResponse'] | undefined, +): LinhaDiaria[] { + const porChave = new Map(informadas.map((d) => [chaveDe(d.tipoHospedagemCodigo), d.diariaMedia])) + const codigos = tipos.map((tipo) => tipo.codigo ?? '').filter(Boolean) + const extras = [...porChave.keys()].filter((chave) => chave !== GERAL && !codigos.includes(chave)) + const nomes = new Map(tipos.map((tipo) => [tipo.codigo ?? '', tipo.nome ?? tipo.codigo ?? ''])) + + const geral: LinhaDiaria = { + codigo: GERAL, + nome: 'Geral', + rotulo: 'diária geral', + informada: valor(porChave.get(GERAL)), + naPrevia: valor(resultado?.diariaMedia), + } + return [ + geral, + ...[...codigos, ...extras].map((codigo) => { + const nome = nomes.get(codigo) ?? codigo + return { + codigo, + nome, + rotulo: `diária de ${nome}`, + informada: valor(porChave.get(codigo)), + naPrevia: valor( + resultado?.porTipo?.find((tipo) => tipo.tipoHospedagemCodigo === codigo)?.diariaMedia, + ), + } + }), + ] +} + +/** As regras da diária da resposta (maior que zero, até duas casas), mas obrigatória. */ +export function validarDiaria(texto: string): string | undefined { + if (!texto.trim()) return 'Informe a diária média.' + return validarResposta({ taxaOcupacao: '0', diariaMedia: texto }).erros.diariaMedia +} + +/** + * Corpo do PUT, que substitui a lista inteira: as demais diárias seguem iguais, a do recorte + * muda e, com `diariaMedia` nulo, sai. A fonte vale para todas. + */ +export function pedidoDeDiarias( + informadas: Informada[], + codigo: string, + diariaMedia: number | null, + fonte: string, +): Esquemas['DiariasRequest'] { + const outras = informadas + .filter((d) => chaveDe(d.tipoHospedagemCodigo) !== codigo && !ausente(d.diariaMedia)) + .map((d) => ({ codigo: chaveDe(d.tipoHospedagemCodigo), diariaMedia: d.diariaMedia ?? 0 })) + const todas = diariaMedia === null ? outras : [...outras, { codigo, diariaMedia }] + return { + diarias: todas.map((d) => + d.codigo === GERAL + ? { diariaMedia: d.diariaMedia } + : { tipoHospedagemCodigo: d.codigo, diariaMedia: d.diariaMedia }, + ), + fonte: fonte.trim() || undefined, + } +} + +/** A fonte é uma só por envio; a primeira preenchida vale como a atual. */ +export function fonteAtual(informadas: Informada[]): string { + return informadas.find((d) => d.fonte?.trim())?.fonte?.trim() ?? '' +} + +/** O registro mais recente, para dizer quando a lista mudou pela última vez. */ +export function ultimaAlteracao(informadas: Informada[]): string | undefined { + return informadas + .map((d) => d.registradoEm) + .filter((data): data is string => Boolean(data)) + .toSorted((a, b) => a.localeCompare(b)) + .at(-1) +} diff --git a/src/features/relatorios/RelatoriosPage.test.tsx b/src/features/relatorios/RelatoriosPage.test.tsx index 122315c..17abce1 100644 --- a/src/features/relatorios/RelatoriosPage.test.tsx +++ b/src/features/relatorios/RelatoriosPage.test.tsx @@ -1,4 +1,4 @@ -import { screen, waitFor, within } from '@testing-library/react' +import { createEvent, fireEvent, screen, waitFor, within } from '@testing-library/react' import userEvent from '@testing-library/user-event' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { limparSessao, salvarSessao } from '@/api/sessao' @@ -186,6 +186,40 @@ describe('RelatoriosPage', () => { expect(screen.queryByRole('button', { name: 'Limpar filtros' })).not.toBeInTheDocument() }) + it('voltar a Todos em cada filtro tira o filtro da URL', async () => { + const router = abrir('/relatorios?modalidade=EXPECTATIVA&periodo=FERIADO&ano=2026') + await tabela() + + await userEvent.selectOptions(screen.getByLabelText('Modalidade'), '') + expect(router.state.location.search).toBe('?periodo=FERIADO&ano=2026') + await userEvent.selectOptions(screen.getByLabelText('Período'), '') + expect(router.state.location.search).toBe('?ano=2026') + await userEvent.selectOptions(screen.getByLabelText('Ano'), '') + expect(router.state.location.search).toBe('') + expect(screen.queryByRole('button', { name: 'Limpar filtros' })).not.toBeInTheDocument() + }) + + it('enviar o formulário de filtros não recarrega a página nem muda a URL', async () => { + const router = abrir('/relatorios?ano=2026') + await tabela() + + const evento = createEvent.submit(screen.getByRole('form', { name: 'Filtros dos relatórios' })) + fireEvent(screen.getByRole('form', { name: 'Filtros dos relatórios' }), evento) + + expect(evento.defaultPrevented).toBe(true) + expect(router.state.location.search).toBe('?ano=2026') + }) + + it('campanha sem identificador ainda aparece na lista', async () => { + api.rotas['GET /api/campanhas/publicadas'] = { + corpo: [{ ...AGOSTO, campanhaId: undefined, nome: 'Sem id' }], + } + abrir() + + expect(await screen.findByRole('rowheader', { name: /Sem id/ })).toBeInTheDocument() + expect(screen.getByText('1 campanha publicada')).toBeInTheDocument() + }) + it('filtro sem resultado sugere mudar os filtros', async () => { api.rotas['GET /api/campanhas/publicadas'] = [{ corpo: [AGOSTO] }, { corpo: [] }] abrir('/relatorios?periodo=FERIADO') diff --git a/vite.config.ts b/vite.config.ts index f3351fb..a54cab4 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -15,5 +15,20 @@ export default defineConfig({ setupFiles: './src/test/setup.ts', include: ['src/**/*.test.{ts,tsx}'], css: { modules: { classNameStrategy: 'non-scoped' } }, + coverage: { + provider: 'v8', + reporter: ['text-summary', 'html', 'json-summary'], + reportsDirectory: 'artifacts/coverage', + include: ['src/**/*.{ts,tsx}'], + exclude: [ + 'src/**/*.test.{ts,tsx}', + 'src/api/schema.d.ts', + 'src/test/**', + 'src/main.tsx', + 'src/env.d.ts', + '**/*.d.ts', + ], + thresholds: { lines: 98, functions: 97, statements: 98, branches: 92 }, + }, }, })