diff --git a/Elecciones-Web/frontend-admin/.gitignore b/Elecciones-Web/frontend-admin/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/Elecciones-Web/frontend-admin/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/Elecciones-Web/frontend-admin/README.md b/Elecciones-Web/frontend-admin/README.md new file mode 100644 index 0000000..7959ce4 --- /dev/null +++ b/Elecciones-Web/frontend-admin/README.md @@ -0,0 +1,69 @@ +# React + TypeScript + Vite + +This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. + +Currently, two official plugins are available: + +- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh +- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh + +## Expanding the ESLint configuration + +If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules: + +```js +export default tseslint.config([ + globalIgnores(['dist']), + { + files: ['**/*.{ts,tsx}'], + extends: [ + // Other configs... + + // Remove tseslint.configs.recommended and replace with this + ...tseslint.configs.recommendedTypeChecked, + // Alternatively, use this for stricter rules + ...tseslint.configs.strictTypeChecked, + // Optionally, add this for stylistic rules + ...tseslint.configs.stylisticTypeChecked, + + // Other configs... + ], + languageOptions: { + parserOptions: { + project: ['./tsconfig.node.json', './tsconfig.app.json'], + tsconfigRootDir: import.meta.dirname, + }, + // other options... + }, + }, +]) +``` + +You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules: + +```js +// eslint.config.js +import reactX from 'eslint-plugin-react-x' +import reactDom from 'eslint-plugin-react-dom' + +export default tseslint.config([ + globalIgnores(['dist']), + { + files: ['**/*.{ts,tsx}'], + extends: [ + // Other configs... + // Enable lint rules for React + reactX.configs['recommended-typescript'], + // Enable lint rules for React DOM + reactDom.configs.recommended, + ], + languageOptions: { + parserOptions: { + project: ['./tsconfig.node.json', './tsconfig.app.json'], + tsconfigRootDir: import.meta.dirname, + }, + // other options... + }, + }, +]) +``` diff --git a/Elecciones-Web/frontend-admin/eslint.config.js b/Elecciones-Web/frontend-admin/eslint.config.js new file mode 100644 index 0000000..d94e7de --- /dev/null +++ b/Elecciones-Web/frontend-admin/eslint.config.js @@ -0,0 +1,23 @@ +import js from '@eslint/js' +import globals from 'globals' +import reactHooks from 'eslint-plugin-react-hooks' +import reactRefresh from 'eslint-plugin-react-refresh' +import tseslint from 'typescript-eslint' +import { globalIgnores } from 'eslint/config' + +export default tseslint.config([ + globalIgnores(['dist']), + { + files: ['**/*.{ts,tsx}'], + extends: [ + js.configs.recommended, + tseslint.configs.recommended, + reactHooks.configs['recommended-latest'], + reactRefresh.configs.vite, + ], + languageOptions: { + ecmaVersion: 2020, + globals: globals.browser, + }, + }, +]) diff --git a/Elecciones-Web/frontend-admin/index.html b/Elecciones-Web/frontend-admin/index.html new file mode 100644 index 0000000..e4b78ea --- /dev/null +++ b/Elecciones-Web/frontend-admin/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + React + TS + + +
+ + + diff --git a/Elecciones-Web/frontend-admin/package-lock.json b/Elecciones-Web/frontend-admin/package-lock.json new file mode 100644 index 0000000..925de19 --- /dev/null +++ b/Elecciones-Web/frontend-admin/package-lock.json @@ -0,0 +1,3749 @@ +{ + "name": "frontend-admin", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "frontend-admin", + "version": "0.0.0", + "dependencies": { + "@dnd-kit/core": "^6.3.1", + "@dnd-kit/sortable": "^10.0.0", + "@tanstack/react-query": "^5.85.5", + "axios": "^1.11.0", + "react": "^19.1.1", + "react-dom": "^19.1.1" + }, + "devDependencies": { + "@eslint/js": "^9.33.0", + "@types/react": "^19.1.10", + "@types/react-dom": "^19.1.7", + "@vitejs/plugin-react": "^5.0.0", + "eslint": "^9.33.0", + "eslint-plugin-react-hooks": "^5.2.0", + "eslint-plugin-react-refresh": "^0.4.20", + "globals": "^16.3.0", + "typescript": "~5.8.3", + "typescript-eslint": "^8.39.1", + "vite": "^7.1.2" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.0.tgz", + "integrity": "sha512-60X7qkglvrap8mn1lh2ebxXdZYtUcpd7gsmy9kLaBJ4i/WdY8PqTSdxyA8qraikqKQK5C1KRBKXqznrVapyNaw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.3.tgz", + "integrity": "sha512-yDBHV9kQNcr2/sUr9jghVyz9C3Y5G2zUM2H2lo+9mKv4sFgbA8s8Z9t8D1jiTkGoO/NoIfKMyKWr4s6CN23ZwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.3", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-module-transforms": "^7.28.3", + "@babel/helpers": "^7.28.3", + "@babel/parser": "^7.28.3", + "@babel/template": "^7.27.2", + "@babel/traverse": "^7.28.3", + "@babel/types": "^7.28.2", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.3.tgz", + "integrity": "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.28.3", + "@babel/types": "^7.28.2", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", + "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.27.2", + "@babel/helper-validator-option": "^7.27.1", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", + "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz", + "integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1", + "@babel/traverse": "^7.28.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz", + "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.3.tgz", + "integrity": "sha512-PTNtvUQihsAsDHMOP5pfobP8C6CM4JWXmP8DrEIt46c3r2bf87Ua1zoqevsMo9g+tWDwgWrFP5EIxuBx5RudAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.3.tgz", + "integrity": "sha512-7+Ey1mAgYqFAx2h0RuoxcQT5+MlG3GTV0TQrgr7/ZliKsm/MNDxVVutlWaziMq7wJNAz8MTqz55XLpWvva6StA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.27.1.tgz", + "integrity": "sha512-6UzkCs+ejGdZ5mFFC/OCUrv028ab2fp1znZmCZjAOBKiBK2jXD1O+BPSfX8X2qjJ75fZBMSnQn3Rq2mrBJK2mw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.27.1.tgz", + "integrity": "sha512-zbwoTsBruTeKB9hSq73ha66iFeJHuaFkUbwvqElnygoNbj/jHRsSeokowZFN3CZ64IvEqcmmkVe89OPXc7ldAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.3.tgz", + "integrity": "sha512-7w4kZYHneL3A6NP2nxzHvT3HCZ7puDZZjFMqDpBPECub79sTtSO5CGXDkKrTQq8ksAwfD/XI2MRFX23njdDaIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.3", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.28.3", + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.2", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.28.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.2.tgz", + "integrity": "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@dnd-kit/accessibility": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@dnd-kit/accessibility/-/accessibility-3.1.1.tgz", + "integrity": "sha512-2P+YgaXF+gRsIihwwY1gCsQSYnu9Zyj2py8kY5fFvUM1qm2WA2u639R6YNVfU4GWr+ZM5mqEsfHZZLoRONbemw==", + "license": "MIT", + "dependencies": { + "tslib": "^2.0.0" + }, + "peerDependencies": { + "react": ">=16.8.0" + } + }, + "node_modules/@dnd-kit/core": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/@dnd-kit/core/-/core-6.3.1.tgz", + "integrity": "sha512-xkGBRQQab4RLwgXxoqETICr6S5JlogafbhNsidmrkVv2YRs5MLwpjoF2qpiGjQt8S9AoxtIV603s0GIUpY5eYQ==", + "license": "MIT", + "dependencies": { + "@dnd-kit/accessibility": "^3.1.1", + "@dnd-kit/utilities": "^3.2.2", + "tslib": "^2.0.0" + }, + "peerDependencies": { + "react": ">=16.8.0", + "react-dom": ">=16.8.0" + } + }, + "node_modules/@dnd-kit/sortable": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/@dnd-kit/sortable/-/sortable-10.0.0.tgz", + "integrity": "sha512-+xqhmIIzvAYMGfBYYnbKuNicfSsk4RksY2XdmJhT+HAC01nix6fHCztU68jooFiMUB01Ky3F0FyOvhG/BZrWkg==", + "license": "MIT", + "dependencies": { + "@dnd-kit/utilities": "^3.2.2", + "tslib": "^2.0.0" + }, + "peerDependencies": { + "@dnd-kit/core": "^6.3.0", + "react": ">=16.8.0" + } + }, + "node_modules/@dnd-kit/utilities": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@dnd-kit/utilities/-/utilities-3.2.2.tgz", + "integrity": "sha512-+MKAJEOfaBe5SmV6t34p80MMKhjvUz0vRrvVJbPT0WElzaOJ/1xs+D+KDv+tD/NE5ujfrChEcshd4fLn0wpiqg==", + "license": "MIT", + "dependencies": { + "tslib": "^2.0.0" + }, + "peerDependencies": { + "react": ">=16.8.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.9.tgz", + "integrity": "sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.9.tgz", + "integrity": "sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.9.tgz", + "integrity": "sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.9.tgz", + "integrity": "sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.9.tgz", + "integrity": "sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.9.tgz", + "integrity": "sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.9.tgz", + "integrity": "sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.9.tgz", + "integrity": "sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.9.tgz", + "integrity": "sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.9.tgz", + "integrity": "sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.9.tgz", + "integrity": "sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.9.tgz", + "integrity": "sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.9.tgz", + "integrity": "sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.9.tgz", + "integrity": "sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.9.tgz", + "integrity": "sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.9.tgz", + "integrity": "sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.9.tgz", + "integrity": "sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.9.tgz", + "integrity": "sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.9.tgz", + "integrity": "sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.9.tgz", + "integrity": "sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.9.tgz", + "integrity": "sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.9.tgz", + "integrity": "sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.9.tgz", + "integrity": "sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.9.tgz", + "integrity": "sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.9.tgz", + "integrity": "sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.9.tgz", + "integrity": "sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", + "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.0.tgz", + "integrity": "sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.6", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.1.tgz", + "integrity": "sha512-xR93k9WhrDYpXHORXpxVL5oHj3Era7wo6k/Wd8/IsQNnZUTzkGS29lyn3nAT05v6ltUuTFVCCYDEGfy2Or/sPA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz", + "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/js": { + "version": "9.34.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.34.0.tgz", + "integrity": "sha512-EoyvqQnBNsV1CWaEJ559rxXL4c8V92gxirbawSmVUOWXlsRxxQXl6LmCpdUblgxgSkDIqKnhzba2SjRTI/A5Rw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", + "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz", + "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.15.2", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.30", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.30.tgz", + "integrity": "sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.0-beta.32", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.32.tgz", + "integrity": "sha512-QReCdvxiUZAPkvp1xpAg62IeNzykOFA6syH2CnClif4YmALN1XKpB39XneL80008UbtMShthSVDKmrx05N1q/g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.48.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.48.1.tgz", + "integrity": "sha512-rGmb8qoG/zdmKoYELCBwu7vt+9HxZ7Koos3pD0+sH5fR3u3Wb/jGcpnqxcnWsPEKDUyzeLSqksN8LJtgXjqBYw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.48.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.48.1.tgz", + "integrity": "sha512-4e9WtTxrk3gu1DFE+imNJr4WsL13nWbD/Y6wQcyku5qadlKHY3OQ3LJ/INrrjngv2BJIHnIzbqMk1GTAC2P8yQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.48.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.48.1.tgz", + "integrity": "sha512-+XjmyChHfc4TSs6WUQGmVf7Hkg8ferMAE2aNYYWjiLzAS/T62uOsdfnqv+GHRjq7rKRnYh4mwWb4Hz7h/alp8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.48.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.48.1.tgz", + "integrity": "sha512-upGEY7Ftw8M6BAJyGwnwMw91rSqXTcOKZnnveKrVWsMTF8/k5mleKSuh7D4v4IV1pLxKAk3Tbs0Lo9qYmii5mQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.48.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.48.1.tgz", + "integrity": "sha512-P9ViWakdoynYFUOZhqq97vBrhuvRLAbN/p2tAVJvhLb8SvN7rbBnJQcBu8e/rQts42pXGLVhfsAP0k9KXWa3nQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.48.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.48.1.tgz", + "integrity": "sha512-VLKIwIpnBya5/saccM8JshpbxfyJt0Dsli0PjXozHwbSVaHTvWXJH1bbCwPXxnMzU4zVEfgD1HpW3VQHomi2AQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.48.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.48.1.tgz", + "integrity": "sha512-3zEuZsXfKaw8n/yF7t8N6NNdhyFw3s8xJTqjbTDXlipwrEHo4GtIKcMJr5Ed29leLpB9AugtAQpAHW0jvtKKaQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.48.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.48.1.tgz", + "integrity": "sha512-leo9tOIlKrcBmmEypzunV/2w946JeLbTdDlwEZ7OnnsUyelZ72NMnT4B2vsikSgwQifjnJUbdXzuW4ToN1wV+Q==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.48.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.48.1.tgz", + "integrity": "sha512-Vy/WS4z4jEyvnJm+CnPfExIv5sSKqZrUr98h03hpAMbE2aI0aD2wvK6GiSe8Gx2wGp3eD81cYDpLLBqNb2ydwQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.48.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.48.1.tgz", + "integrity": "sha512-x5Kzn7XTwIssU9UYqWDB9VpLpfHYuXw5c6bJr4Mzv9kIv242vmJHbI5PJJEnmBYitUIfoMCODDhR7KoZLot2VQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.48.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.48.1.tgz", + "integrity": "sha512-yzCaBbwkkWt/EcgJOKDUdUpMHjhiZT/eDktOPWvSRpqrVE04p0Nd6EGV4/g7MARXXeOqstflqsKuXVM3H9wOIQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.48.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.48.1.tgz", + "integrity": "sha512-UK0WzWUjMAJccHIeOpPhPcKBqax7QFg47hwZTp6kiMhQHeOYJeaMwzeRZe1q5IiTKsaLnHu9s6toSYVUlZ2QtQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.48.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.48.1.tgz", + "integrity": "sha512-3NADEIlt+aCdCbWVZ7D3tBjBX1lHpXxcvrLt/kdXTiBrOds8APTdtk2yRL2GgmnSVeX4YS1JIf0imFujg78vpw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.48.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.48.1.tgz", + "integrity": "sha512-euuwm/QTXAMOcyiFCcrx0/S2jGvFlKJ2Iro8rsmYL53dlblp3LkUQVFzEidHhvIPPvcIsxDhl2wkBE+I6YVGzA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.48.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.48.1.tgz", + "integrity": "sha512-w8mULUjmPdWLJgmTYJx/W6Qhln1a+yqvgwmGXcQl2vFBkWsKGUBRbtLRuKJUln8Uaimf07zgJNxOhHOvjSQmBQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.48.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.48.1.tgz", + "integrity": "sha512-90taWXCWxTbClWuMZD0DKYohY1EovA+W5iytpE89oUPmT5O1HFdf8cuuVIylE6vCbrGdIGv85lVRzTcpTRZ+kA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.48.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.48.1.tgz", + "integrity": "sha512-2Gu29SkFh1FfTRuN1GR1afMuND2GKzlORQUP3mNMJbqdndOg7gNsa81JnORctazHRokiDzQ5+MLE5XYmZW5VWg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.48.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.48.1.tgz", + "integrity": "sha512-6kQFR1WuAO50bxkIlAVeIYsz3RUx+xymwhTo9j94dJ+kmHe9ly7muH23sdfWduD0BA8pD9/yhonUvAjxGh34jQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.48.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.48.1.tgz", + "integrity": "sha512-RUyZZ/mga88lMI3RlXFs4WQ7n3VyU07sPXmMG7/C1NOi8qisUg57Y7LRarqoGoAiopmGmChUhSwfpvQ3H5iGSQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.48.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.48.1.tgz", + "integrity": "sha512-8a/caCUN4vkTChxkaIJcMtwIVcBhi4X2PQRoT+yCK3qRYaZ7cURrmJFL5Ux9H9RaMIXj9RuihckdmkBX3zZsgg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@tanstack/query-core": { + "version": "5.85.5", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.85.5.tgz", + "integrity": "sha512-KO0WTob4JEApv69iYp1eGvfMSUkgw//IpMnq+//cORBzXf0smyRwPLrUvEe5qtAEGjwZTXrjxg+oJNP/C00t6w==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + } + }, + "node_modules/@tanstack/react-query": { + "version": "5.85.5", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.85.5.tgz", + "integrity": "sha512-/X4EFNcnPiSs8wM2v+b6DqS5mmGeuJQvxBglmDxl6ZQb5V26ouD2SJYAcC3VjbNwqhY2zjxVD15rDA5nGbMn3A==", + "license": "MIT", + "dependencies": { + "@tanstack/query-core": "5.85.5" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "react": "^18 || ^19" + } + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + } + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "19.1.11", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.1.11.tgz", + "integrity": "sha512-lr3jdBw/BGj49Eps7EvqlUaoeA0xpj3pc0RoJkHpYaCHkVK7i28dKyImLQb3JVlqs3aYSXf7qYuWOW/fgZnTXQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "csstype": "^3.0.2" + } + }, + "node_modules/@types/react-dom": { + "version": "19.1.7", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.1.7.tgz", + "integrity": "sha512-i5ZzwYpqjmrKenzkoLM2Ibzt6mAsM7pxB6BCIouEVVmgiqaMj1TjaK7hnA36hbW5aZv20kx7Lw6hWzPWg0Rurw==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^19.0.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.41.0.tgz", + "integrity": "sha512-8fz6oa6wEKZrhXWro/S3n2eRJqlRcIa6SlDh59FXJ5Wp5XRZ8B9ixpJDcjadHq47hMx0u+HW6SNa6LjJQ6NLtw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.41.0", + "@typescript-eslint/type-utils": "8.41.0", + "@typescript-eslint/utils": "8.41.0", + "@typescript-eslint/visitor-keys": "8.41.0", + "graphemer": "^1.4.0", + "ignore": "^7.0.0", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.41.0", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.41.0.tgz", + "integrity": "sha512-gTtSdWX9xiMPA/7MV9STjJOOYtWwIJIYxkQxnSV1U3xcE+mnJSH3f6zI0RYP+ew66WSlZ5ed+h0VCxsvdC1jJg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.41.0", + "@typescript-eslint/types": "8.41.0", + "@typescript-eslint/typescript-estree": "8.41.0", + "@typescript-eslint/visitor-keys": "8.41.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.41.0.tgz", + "integrity": "sha512-b8V9SdGBQzQdjJ/IO3eDifGpDBJfvrNTp2QD9P2BeqWTGrRibgfgIlBSw6z3b6R7dPzg752tOs4u/7yCLxksSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.41.0", + "@typescript-eslint/types": "^8.41.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.41.0.tgz", + "integrity": "sha512-n6m05bXn/Cd6DZDGyrpXrELCPVaTnLdPToyhBoFkLIMznRUQUEQdSp96s/pcWSQdqOhrgR1mzJ+yItK7T+WPMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.41.0", + "@typescript-eslint/visitor-keys": "8.41.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.41.0.tgz", + "integrity": "sha512-TDhxYFPUYRFxFhuU5hTIJk+auzM/wKvWgoNYOPcOf6i4ReYlOoYN8q1dV5kOTjNQNJgzWN3TUUQMtlLOcUgdUw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.41.0.tgz", + "integrity": "sha512-63qt1h91vg3KsjVVonFJWjgSK7pZHSQFKH6uwqxAH9bBrsyRhO6ONoKyXxyVBzG1lJnFAJcKAcxLS54N1ee1OQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.41.0", + "@typescript-eslint/typescript-estree": "8.41.0", + "@typescript-eslint/utils": "8.41.0", + "debug": "^4.3.4", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.41.0.tgz", + "integrity": "sha512-9EwxsWdVqh42afLbHP90n2VdHaWU/oWgbH2P0CfcNfdKL7CuKpwMQGjwev56vWu9cSKU7FWSu6r9zck6CVfnag==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.41.0.tgz", + "integrity": "sha512-D43UwUYJmGhuwHfY7MtNKRZMmfd8+p/eNSfFe6tH5mbVDto+VQCayeAt35rOx3Cs6wxD16DQtIKw/YXxt5E0UQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.41.0", + "@typescript-eslint/tsconfig-utils": "8.41.0", + "@typescript-eslint/types": "8.41.0", + "@typescript-eslint/visitor-keys": "8.41.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.41.0.tgz", + "integrity": "sha512-udbCVstxZ5jiPIXrdH+BZWnPatjlYwJuJkDA4Tbo3WyYLh8NvB+h/bKeSZHDOFKfphsZYJQqaFtLeXEqurQn1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.41.0", + "@typescript-eslint/types": "8.41.0", + "@typescript-eslint/typescript-estree": "8.41.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.41.0.tgz", + "integrity": "sha512-+GeGMebMCy0elMNg67LRNoVnUFPIm37iu5CmHESVx56/9Jsfdpsvbv605DQ81Pi/x11IdKUsS5nzgTYbCQU9fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.41.0", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@vitejs/plugin-react": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-5.0.1.tgz", + "integrity": "sha512-DE4UNaBXwtVoDJ0ccBdLVjFTWL70NRuWNCxEieTI3lrq9ORB9aOCQEKstwDXBl87NvFdbqh/p7eINGyj0BthJA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.28.3", + "@babel/plugin-transform-react-jsx-self": "^7.27.1", + "@babel/plugin-transform-react-jsx-source": "^7.27.1", + "@rolldown/pluginutils": "1.0.0-beta.32", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.17.0" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" + } + }, + "node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "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/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/axios": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.11.0.tgz", + "integrity": "sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.4", + "proxy-from-env": "^1.1.0" + } + }, + "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/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.25.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.3.tgz", + "integrity": "sha512-cDGv1kkDI4/0e5yON9yM5G/0A5u8sf5TnmdX5C9qHzI9PPu++sQ9zjm1k9NiOrf3riY4OkK0zSGqfvJyJsgCBQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "caniuse-lite": "^1.0.30001735", + "electron-to-chromium": "^1.5.204", + "node-releases": "^2.0.19", + "update-browserslist-db": "^1.1.3" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001737", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001737.tgz", + "integrity": "sha512-BiloLiXtQNrY5UyF0+1nSJLXUENuhka2pzy2Fx5pGxqavdrxSCW4U6Pn/PoG3Efspi2frRbHpBV2XsrPE6EDlw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "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/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/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "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/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "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==", + "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/electron-to-chromium": { + "version": "1.5.209", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.209.tgz", + "integrity": "sha512-Xoz0uMrim9ZETCQt8UgM5FxQF9+imA7PBpokoGcZloA1uw2LeHzTlip5cb5KOAsXZLjh/moN2vReN3ZjJmjI9A==", + "dev": true, + "license": "ISC" + }, + "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==", + "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==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/esbuild": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.9.tgz", + "integrity": "sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.9", + "@esbuild/android-arm": "0.25.9", + "@esbuild/android-arm64": "0.25.9", + "@esbuild/android-x64": "0.25.9", + "@esbuild/darwin-arm64": "0.25.9", + "@esbuild/darwin-x64": "0.25.9", + "@esbuild/freebsd-arm64": "0.25.9", + "@esbuild/freebsd-x64": "0.25.9", + "@esbuild/linux-arm": "0.25.9", + "@esbuild/linux-arm64": "0.25.9", + "@esbuild/linux-ia32": "0.25.9", + "@esbuild/linux-loong64": "0.25.9", + "@esbuild/linux-mips64el": "0.25.9", + "@esbuild/linux-ppc64": "0.25.9", + "@esbuild/linux-riscv64": "0.25.9", + "@esbuild/linux-s390x": "0.25.9", + "@esbuild/linux-x64": "0.25.9", + "@esbuild/netbsd-arm64": "0.25.9", + "@esbuild/netbsd-x64": "0.25.9", + "@esbuild/openbsd-arm64": "0.25.9", + "@esbuild/openbsd-x64": "0.25.9", + "@esbuild/openharmony-arm64": "0.25.9", + "@esbuild/sunos-x64": "0.25.9", + "@esbuild/win32-arm64": "0.25.9", + "@esbuild/win32-ia32": "0.25.9", + "@esbuild/win32-x64": "0.25.9" + } + }, + "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-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": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "9.34.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.34.0.tgz", + "integrity": "sha512-RNCHRX5EwdrESy3Jc9o8ie8Bog+PeYvvSR8sDGoZxNFTvZ4dlxUB3WzQ3bQMztFrSRODGrLLj8g6OFuGY/aiQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.0", + "@eslint/config-helpers": "^0.3.1", + "@eslint/core": "^0.15.2", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.34.0", + "@eslint/plugin-kit": "^0.3.5", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-react-hooks": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.2.0.tgz", + "integrity": "sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0" + } + }, + "node_modules/eslint-plugin-react-refresh": { + "version": "0.4.20", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.20.tgz", + "integrity": "sha512-XpbHQ2q5gUF8BGOX4dHe+71qoirYMhApEPZ7sfhF/dNnOF1UXnCMGZf79SFTBO7Bz5YEIT4TMieSlJBWhP9WBA==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "eslint": ">=8.40" + } + }, + "node_modules/eslint-scope": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.15.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "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/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/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-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" + }, + "node_modules/follow-redirects": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "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==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "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==", + "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==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "16.3.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-16.3.0.tgz", + "integrity": "sha512-bqWEnJ1Nt3neqx2q5SFfGS8r/ahumIakg3HcwtNlrVlwXIeNumWn/c7Pn/wKzGhf6SaW6H6uWXLqC30STCMchQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, + "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/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "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": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "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==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "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==", + "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==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "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/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "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/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-releases": { + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", + "dev": true, + "license": "MIT" + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "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-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", + "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", + "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.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" + }, + "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/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "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/react": { + "version": "19.1.1", + "resolved": "https://registry.npmjs.org/react/-/react-19.1.1.tgz", + "integrity": "sha512-w8nqGImo45dmMIfljjMwOGtbmC/mk4CMYhWIicdSflH91J9TyCyczcPFXJzrZ/ZXcgGRFeP6BU0BEJTw6tZdfQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "19.1.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.1.1.tgz", + "integrity": "sha512-Dlq/5LAZgF0Gaz6yiqZCf6VCcZs1ghAJyrsu84Q/GT0gV+mCxbfmKNoGRKBYMJ8IEdGPqu49YWXD02GCknEDkw==", + "license": "MIT", + "dependencies": { + "scheduler": "^0.26.0" + }, + "peerDependencies": { + "react": "^19.1.1" + } + }, + "node_modules/react-refresh": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.17.0.tgz", + "integrity": "sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rollup": { + "version": "4.48.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.48.1.tgz", + "integrity": "sha512-jVG20NvbhTYDkGAty2/Yh7HK6/q3DGSRH4o8ALKGArmMuaauM9kLfoMZ+WliPwA5+JHr2lTn3g557FxBV87ifg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.8" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.48.1", + "@rollup/rollup-android-arm64": "4.48.1", + "@rollup/rollup-darwin-arm64": "4.48.1", + "@rollup/rollup-darwin-x64": "4.48.1", + "@rollup/rollup-freebsd-arm64": "4.48.1", + "@rollup/rollup-freebsd-x64": "4.48.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.48.1", + "@rollup/rollup-linux-arm-musleabihf": "4.48.1", + "@rollup/rollup-linux-arm64-gnu": "4.48.1", + "@rollup/rollup-linux-arm64-musl": "4.48.1", + "@rollup/rollup-linux-loongarch64-gnu": "4.48.1", + "@rollup/rollup-linux-ppc64-gnu": "4.48.1", + "@rollup/rollup-linux-riscv64-gnu": "4.48.1", + "@rollup/rollup-linux-riscv64-musl": "4.48.1", + "@rollup/rollup-linux-s390x-gnu": "4.48.1", + "@rollup/rollup-linux-x64-gnu": "4.48.1", + "@rollup/rollup-linux-x64-musl": "4.48.1", + "@rollup/rollup-win32-arm64-msvc": "4.48.1", + "@rollup/rollup-win32-ia32-msvc": "4.48.1", + "@rollup/rollup-win32-x64-msvc": "4.48.1", + "fsevents": "~2.3.2" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "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": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/scheduler": { + "version": "0.26.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.26.0.tgz", + "integrity": "sha512-NlHwttCI/l5gCPR3D1nNXtWABUmBwvZpEQiD4IXSbIDq8BzLIK/7Ir5gTFSGZDUu37K5cMNp0hFtzO38sC7gWA==", + "license": "MIT" + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "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/tinyglobby": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", + "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.4.4", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/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/tinyglobby/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-api-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/typescript": { + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.41.0.tgz", + "integrity": "sha512-n66rzs5OBXW3SFSnZHr2T685q1i4ODm2nulFJhMZBotaTavsS8TrI3d7bDlRSs9yWo7HmyWrN9qDu14Qv7Y0Dw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.41.0", + "@typescript-eslint/parser": "8.41.0", + "@typescript-eslint/typescript-estree": "8.41.0", + "@typescript-eslint/utils": "8.41.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", + "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/vite": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.3.tgz", + "integrity": "sha512-OOUi5zjkDxYrKhTV3V7iKsoS37VUM7v40+HuwEmcrsf11Cdx9y3DIr2Px6liIcZFwt3XSRpQvFpL3WVy7ApkGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.25.0", + "fdir": "^6.5.0", + "picomatch": "^4.0.3", + "postcss": "^8.5.6", + "rollup": "^4.43.0", + "tinyglobby": "^0.2.14" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "lightningcss": "^1.21.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vite/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/vite/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/Elecciones-Web/frontend-admin/package.json b/Elecciones-Web/frontend-admin/package.json new file mode 100644 index 0000000..203740b --- /dev/null +++ b/Elecciones-Web/frontend-admin/package.json @@ -0,0 +1,33 @@ +{ + "name": "frontend-admin", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc -b && vite build", + "lint": "eslint .", + "preview": "vite preview" + }, + "dependencies": { + "@dnd-kit/core": "^6.3.1", + "@dnd-kit/sortable": "^10.0.0", + "@tanstack/react-query": "^5.85.5", + "axios": "^1.11.0", + "react": "^19.1.1", + "react-dom": "^19.1.1" + }, + "devDependencies": { + "@eslint/js": "^9.33.0", + "@types/react": "^19.1.10", + "@types/react-dom": "^19.1.7", + "@vitejs/plugin-react": "^5.0.0", + "eslint": "^9.33.0", + "eslint-plugin-react-hooks": "^5.2.0", + "eslint-plugin-react-refresh": "^0.4.20", + "globals": "^16.3.0", + "typescript": "~5.8.3", + "typescript-eslint": "^8.39.1", + "vite": "^7.1.2" + } +} diff --git a/Elecciones-Web/frontend-admin/public/vite.svg b/Elecciones-Web/frontend-admin/public/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/Elecciones-Web/frontend-admin/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Elecciones-Web/frontend-admin/src/App.css b/Elecciones-Web/frontend-admin/src/App.css new file mode 100644 index 0000000..b9d355d --- /dev/null +++ b/Elecciones-Web/frontend-admin/src/App.css @@ -0,0 +1,42 @@ +#root { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +.logo { + height: 6em; + padding: 1.5em; + will-change: filter; + transition: filter 300ms; +} +.logo:hover { + filter: drop-shadow(0 0 2em #646cffaa); +} +.logo.react:hover { + filter: drop-shadow(0 0 2em #61dafbaa); +} + +@keyframes logo-spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +@media (prefers-reduced-motion: no-preference) { + a:nth-of-type(2) .logo { + animation: logo-spin infinite 20s linear; + } +} + +.card { + padding: 2em; +} + +.read-the-docs { + color: #888; +} diff --git a/Elecciones-Web/frontend-admin/src/App.tsx b/Elecciones-Web/frontend-admin/src/App.tsx new file mode 100644 index 0000000..1534b29 --- /dev/null +++ b/Elecciones-Web/frontend-admin/src/App.tsx @@ -0,0 +1,17 @@ +// src/App.tsx +import { useAuth } from './context/AuthContext'; +import { LoginPage } from './components/LoginPage'; +import { DashboardPage } from './components/DashboardPage'; +import './App.css'; // Puede añadir estilos globales aquí + +function App() { + const { isAuthenticated } = useAuth(); + + return ( +
+ {isAuthenticated ? : } +
+ ); +} + +export default App; \ No newline at end of file diff --git a/Elecciones-Web/frontend-admin/src/components/AgrupacionesManager.css b/Elecciones-Web/frontend-admin/src/components/AgrupacionesManager.css new file mode 100644 index 0000000..072b482 --- /dev/null +++ b/Elecciones-Web/frontend-admin/src/components/AgrupacionesManager.css @@ -0,0 +1,77 @@ +/* src/components/AgrupacionesManager.css */ +.admin-module { + padding: 1rem; + border: 1px solid #ccc; + border-radius: 8px; + margin-top: 2rem; +} + +table { + width: 100%; + border-collapse: collapse; + margin-top: 1rem; +} + +th, td { + border: 1px solid #ddd; + padding: 8px; + text-align: left; +} + +thead { + background-color: #f2f2f2; +} + +tr:nth-child(even) { + background-color: #f9f9f9; +} + +td input[type="text"] { + width: 100%; + padding: 4px; + box-sizing: border-box; +} + +td button { + margin-right: 5px; +} + +.sortable-list-horizontal { + list-style: none; + padding: 8px; + margin: 0; + border: 1px dashed #ccc; + border-radius: 4px; + display: flex; /* <-- La clave para la alineación horizontal */ + flex-wrap: wrap; /* <-- La clave para que salte de línea */ + gap: 8px; /* Espacio entre elementos */ + min-height: 50px; /* Un poco de altura para que la zona de drop sea visible */ +} + +.sortable-item { + padding: 8px 12px; + border: 1px solid #ddd; + background-color: white; + border-radius: 4px; + cursor: grab; + /* Opcional: para que no se puedan seleccionar el texto mientras se arrastra */ + user-select: none; +} + +.chamber-tabs { + display: flex; + margin-bottom: 1rem; + border: 1px solid #ccc; + border-radius: 6px; + overflow: hidden; +} +.chamber-tabs button { + flex: 1; + padding: 0.75rem 0.5rem; + border: none; + background-color: #f8f9fa; + cursor: pointer; + transition: all 0.2s; +} +.chamber-tabs button:first-child { border-right: 1px solid #ccc; } +.chamber-tabs button.active { background-color: #007bff; color: white; } \ No newline at end of file diff --git a/Elecciones-Web/frontend-admin/src/components/AgrupacionesManager.tsx b/Elecciones-Web/frontend-admin/src/components/AgrupacionesManager.tsx new file mode 100644 index 0000000..6fc6686 --- /dev/null +++ b/Elecciones-Web/frontend-admin/src/components/AgrupacionesManager.tsx @@ -0,0 +1,113 @@ +// src/components/AgrupacionesManager.tsx +import { useState, useEffect } from 'react'; +import { getAgrupaciones, updateAgrupacion } from '../services/apiService'; +import type { AgrupacionPolitica, UpdateAgrupacionData } from '../types'; +import './AgrupacionesManager.css'; + +export const AgrupacionesManager = () => { + const [agrupaciones, setAgrupaciones] = useState([]); + const [loading, setLoading] = useState(true); + const [error, setError] = useState(null); + const [editingId, setEditingId] = useState(null); + const [formData, setFormData] = useState({ + nombreCorto: '', + color: '#000000', + logoUrl: '', + }); + + useEffect(() => { + fetchAgrupaciones(); + }, []); + + const fetchAgrupaciones = async () => { + try { + setLoading(true); + const data = await getAgrupaciones(); + setAgrupaciones(data); + } catch (err) { + setError('No se pudieron cargar las agrupaciones.'); + } finally { + setLoading(false); + } + }; + + const handleEdit = (agrupacion: AgrupacionPolitica) => { + setEditingId(agrupacion.id); + setFormData({ + nombreCorto: agrupacion.nombreCorto || '', + color: agrupacion.color || '#000000', + logoUrl: agrupacion.logoUrl || '', + }); + }; + + const handleCancel = () => { + setEditingId(null); + }; + + const handleSave = async (id: string) => { + try { + await updateAgrupacion(id, formData); + setEditingId(null); + fetchAgrupaciones(); // Recargar datos para ver los cambios + } catch (err) { + alert('Error al guardar los cambios.'); + } + }; + + const handleChange = (e: React.ChangeEvent) => { + setFormData({ ...formData, [e.target.name]: e.target.value }); + }; + + if (loading) return

Cargando agrupaciones...

; + if (error) return

{error}

; + + return ( +
+

Gestión de Agrupaciones Políticas

+ + + + + + + + + + + + {agrupaciones.map((agrupacion) => ( + + {editingId === agrupacion.id ? ( + <> + + + + + + + ) : ( + <> + + + + + + + )} + + ))} + +
NombreNombre CortoColorLogo URLAcciones
{agrupacion.nombre} + + + {agrupacion.nombre}{agrupacion.nombreCorto} +
+
+ {agrupacion.color} +
+
{agrupacion.logoUrl} + +
+
+ ); +}; \ No newline at end of file diff --git a/Elecciones-Web/frontend-admin/src/components/BancasManager.tsx b/Elecciones-Web/frontend-admin/src/components/BancasManager.tsx new file mode 100644 index 0000000..9c2db97 --- /dev/null +++ b/Elecciones-Web/frontend-admin/src/components/BancasManager.tsx @@ -0,0 +1,121 @@ +// src/components/BancasManager.tsx +import { useState } from 'react'; +import { useQuery, useQueryClient } from '@tanstack/react-query'; +import { getBancadas, getAgrupaciones, updateBancada, type UpdateBancadaData } from '../services/apiService'; +import type { Bancada, AgrupacionPolitica } from '../types'; +import { OcupantesModal } from './OcupantesModal'; +import './AgrupacionesManager.css'; // Asegúrate de que este CSS tenga los estilos de .chamber-tabs + +const camaras = ['diputados', 'senadores'] as const; + +export const BancasManager = () => { + const [activeTab, setActiveTab] = useState<'diputados' | 'senadores'>('diputados'); + const [modalVisible, setModalVisible] = useState(false); + const [bancadaSeleccionada, setBancadaSeleccionada] = useState(null); + const queryClient = useQueryClient(); + + // Obtenemos todas las agrupaciones para poblar el handleAgrupacionChange(bancada.id, e.target.value || null)} + > + + {agrupaciones.map(a => )} + + + {bancada.ocupante?.nombreOcupante || 'Sin asignar'} + + + + + ))} + + + )} + + {modalVisible && bancadaSeleccionada && ( + setModalVisible(false)} + activeTab={activeTab} + /> + )} + + ); +}; \ No newline at end of file diff --git a/Elecciones-Web/frontend-admin/src/components/ConfiguracionGeneral.tsx b/Elecciones-Web/frontend-admin/src/components/ConfiguracionGeneral.tsx new file mode 100644 index 0000000..8e06efe --- /dev/null +++ b/Elecciones-Web/frontend-admin/src/components/ConfiguracionGeneral.tsx @@ -0,0 +1,110 @@ +// src/components/ConfiguracionGeneral.tsx +import { useState, useEffect } from 'react'; +import { getAgrupaciones, getConfiguracion, updateConfiguracion } from '../services/apiService'; +import type { AgrupacionPolitica } from '../types'; +import './AgrupacionesManager.css'; // Reutilizamos los estilos para mantener la consistencia + +export const ConfiguracionGeneral = () => { + const [agrupaciones, setAgrupaciones] = useState([]); + const [loading, setLoading] = useState(true); + const [error, setError] = useState(null); + // Estado específico para la configuración de la presidencia del Senado + const [presidenciaSenadoId, setPresidenciaSenadoId] = useState(''); + const [usarDatosOficiales, setUsarDatosOficiales] = useState(false); + + useEffect(() => { + const loadInitialData = async () => { + try { + setLoading(true); + setError(null); + + // Hacemos ambas llamadas a la API en paralelo para más eficiencia + const [agrupacionesData, configData] = await Promise.all([ + getAgrupaciones(), + getConfiguracion() + ]); + + setAgrupaciones(agrupacionesData); + + // Asignamos el valor guardado, si existe + if (configData && configData.PresidenciaSenadores) { + setPresidenciaSenadoId(configData.PresidenciaSenadores); + } + setUsarDatosOficiales(configData.UsarDatosDeBancadasOficiales === 'true'); + } catch (err) { + console.error("Error al cargar datos de configuración:", err); + setError("No se pudieron cargar los datos necesarios para la configuración."); + } finally { + setLoading(false); + } + }; + loadInitialData(); + }, []); + + const handleSave = async () => { + try { + await updateConfiguracion({ "PresidenciaSenadores": presidenciaSenadoId, "UsarDatosDeBancadasOficiales": usarDatosOficiales.toString() }); + alert('Configuración guardada con éxito.'); + } catch (err) { + console.error("Error al guardar la configuración:", err); + alert('Error al guardar la configuración.'); + } + }; + + if (loading) return

Cargando configuración...

; + if (error) return

{error}

; + + return ( +
+

Configuración General de Cámaras

+
+ +

+ Si está activo, el widget del Congreso mostrará la composición gestionada manualmente en esta página. Si está inactivo, mostrará la proyección en tiempo real de las elecciones. +

+
+
+ + +

+ Seleccione el partido político al que pertenece el Vicegobernador. El asiento presidencial del Senado se pintará con el color de este partido. +

+
+
+

+ Presidencia Cámara de Diputados +

+

+ Esta banca se asigna y colorea automáticamente según la agrupación política con la mayoría de bancas totales en la cámara. +

+
+ +
+ ); +}; \ No newline at end of file diff --git a/Elecciones-Web/frontend-admin/src/components/DashboardPage.tsx b/Elecciones-Web/frontend-admin/src/components/DashboardPage.tsx new file mode 100644 index 0000000..564cad2 --- /dev/null +++ b/Elecciones-Web/frontend-admin/src/components/DashboardPage.tsx @@ -0,0 +1,34 @@ +// src/components/DashboardPage.tsx +import { useAuth } from '../context/AuthContext'; +import { AgrupacionesManager } from './AgrupacionesManager'; +import { OrdenDiputadosManager } from './OrdenDiputadosManager'; +import { OrdenSenadoresManager } from './OrdenSenadoresManager'; +import { ConfiguracionGeneral } from './ConfiguracionGeneral'; +import { BancasManager } from './BancasManager'; + +export const DashboardPage = () => { + const { logout } = useAuth(); + + return ( +
+
+

Panel de Administración Electoral

+ +
+
+ + + +
+
+ +
+
+ +
+
+ +
+
+ ); +} \ No newline at end of file diff --git a/Elecciones-Web/frontend-admin/src/components/LoginPage.tsx b/Elecciones-Web/frontend-admin/src/components/LoginPage.tsx new file mode 100644 index 0000000..8b7e31e --- /dev/null +++ b/Elecciones-Web/frontend-admin/src/components/LoginPage.tsx @@ -0,0 +1,49 @@ +// src/components/LoginPage.tsx +import { useState } from 'react'; +import { useAuth } from '../context/AuthContext'; + +export const LoginPage = () => { + const [username, setUsername] = useState(''); + const [password, setPassword] = useState(''); + const [error, setError] = useState(''); + const { login } = useAuth(); + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + setError(''); + const success = await login({ username, password }); + if (!success) { + setError('Usuario o contraseña incorrectos.'); + } + }; + + return ( +
+

Panel de Administración

+
+
+ + setUsername(e.target.value)} + required + /> +
+
+ + setPassword(e.target.value)} + required + /> +
+ {error &&

{error}

} + +
+
+ ); +}; \ No newline at end of file diff --git a/Elecciones-Web/frontend-admin/src/components/OcupantesModal.css b/Elecciones-Web/frontend-admin/src/components/OcupantesModal.css new file mode 100644 index 0000000..d323ff2 --- /dev/null +++ b/Elecciones-Web/frontend-admin/src/components/OcupantesModal.css @@ -0,0 +1,47 @@ +.modal-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.6); + display: flex; + justify-content: center; + align-items: center; + z-index: 1000; +} +.modal-content { + background: white; + padding: 2rem; + border-radius: 8px; + width: 90%; + max-width: 500px; + position: relative; +} +.modal-close { + position: absolute; + top: 10px; + right: 15px; + border: none; + background: none; + font-size: 1.5rem; + cursor: pointer; +} +.modal-content h4 { margin-top: 0; } +.modal-content h5 { margin-top: 0; color: #666; } +.form-group { + margin-bottom: 1rem; +} +.form-group label { + display: block; + margin-bottom: 0.5rem; +} +.form-group input { + width: 100%; + padding: 8px; + box-sizing: border-box; +} +.modal-actions { + text-align: right; + margin-top: 1.5rem; +} \ No newline at end of file diff --git a/Elecciones-Web/frontend-admin/src/components/OcupantesModal.tsx b/Elecciones-Web/frontend-admin/src/components/OcupantesModal.tsx new file mode 100644 index 0000000..7df0878 --- /dev/null +++ b/Elecciones-Web/frontend-admin/src/components/OcupantesModal.tsx @@ -0,0 +1,64 @@ +// src/components/OcupantesModal.tsx +import { useState } from 'react'; +import { useQueryClient } from '@tanstack/react-query'; +import { updateBancada, type UpdateBancadaData } from '../services/apiService'; +import type { Bancada } from '../types'; +import './OcupantesModal.css'; // Crearemos este archivo + +interface Props { + bancada: Bancada; + onClose: () => void; + activeTab: 'diputados' | 'senadores'; +} + +export const OcupantesModal = ({ bancada, onClose, activeTab }: Props) => { + const queryClient = useQueryClient(); + const [nombre, setNombre] = useState(bancada.ocupante?.nombreOcupante || ''); + const [fotoUrl, setFotoUrl] = useState(bancada.ocupante?.fotoUrl || ''); + const [periodo, setPeriodo] = useState(bancada.ocupante?.periodo || ''); + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + const payload: UpdateBancadaData = { + agrupacionPoliticaId: bancada.agrupacionPoliticaId, + nombreOcupante: nombre || null, + fotoUrl: fotoUrl || null, + periodo: periodo || null, + }; + try { + await updateBancada(bancada.id, payload); + // Invalida la query para que la tabla principal se actualice + queryClient.invalidateQueries({ queryKey: ['bancadas', activeTab] }); + onClose(); + } catch (err) { + alert("Error al guardar el ocupante."); + } + }; + + return ( +
+
e.stopPropagation()}> + +

Ocupante de la Banca #{bancada.id}

+
{bancada.agrupacionPolitica?.nombre || 'Banca Vacante'}
+
+
+ + setNombre(e.target.value)} /> +
+
+ + setFotoUrl(e.target.value)} /> +
+
+ + setPeriodo(e.target.value)} /> +
+
+ +
+
+
+
+ ); +}; \ No newline at end of file diff --git a/Elecciones-Web/frontend-admin/src/components/OrdenDiputadosManager.tsx b/Elecciones-Web/frontend-admin/src/components/OrdenDiputadosManager.tsx new file mode 100644 index 0000000..0662825 --- /dev/null +++ b/Elecciones-Web/frontend-admin/src/components/OrdenDiputadosManager.tsx @@ -0,0 +1,114 @@ +// src/components/OrdenDiputadosManager.tsx +import { useState, useEffect } from 'react'; +import { + DndContext, + closestCenter, + KeyboardSensor, + PointerSensor, + useSensor, + useSensors, + type DragEndEvent, +} from '@dnd-kit/core'; +import { + arrayMove, + SortableContext, + sortableKeyboardCoordinates, + horizontalListSortingStrategy, +} from '@dnd-kit/sortable'; + +import { getAgrupaciones } from '../services/apiService'; +import type { AgrupacionPolitica } from '../types'; +import { SortableItem } from './SortableItem'; +import './AgrupacionesManager.css'; // Reutilizamos los estilos + +// Función para llamar al endpoint específico de diputados +const updateOrdenDiputadosApi = async (ids: string[]) => { + const token = localStorage.getItem('admin-jwt-token'); + const response = await fetch('http://localhost:5217/api/admin/agrupaciones/orden-diputados', { + method: 'PUT', + headers: { + 'Content-Type': 'application/json', + 'Authorization': `Bearer ${token}` + }, + body: JSON.stringify(ids) + }); + if (!response.ok) { + throw new Error("Failed to save Diputados order"); + } +}; + +export const OrdenDiputadosManager = () => { + const [agrupaciones, setAgrupaciones] = useState([]); + const [loading, setLoading] = useState(true); + const sensors = useSensors( + useSensor(PointerSensor), + useSensor(KeyboardSensor, { coordinateGetter: sortableKeyboardCoordinates }) + ); + + useEffect(() => { + const fetchAndSortAgrupaciones = async () => { + setLoading(true); + try { + const data = await getAgrupaciones(); + // Ordenar por el orden de Diputados. Los nulos van al final. + data.sort((a, b) => (a.ordenDiputados || 999) - (b.ordenDiputados || 999)); + setAgrupaciones(data); + } catch (error) { + console.error("Failed to fetch agrupaciones for Diputados:", error); + } finally { + setLoading(false); + } + }; + fetchAndSortAgrupaciones(); + }, []); + + const handleDragEnd = (event: DragEndEvent) => { + const { active, over } = event; + if (over && active.id !== over.id) { + setAgrupaciones((items) => { + const oldIndex = items.findIndex((item) => item.id === active.id); + const newIndex = items.findIndex((item) => item.id === over.id); + return arrayMove(items, oldIndex, newIndex); + }); + } + }; + + const handleSaveOrder = async () => { + const idsOrdenados = agrupaciones.map(a => a.id); + try { + await updateOrdenDiputadosApi(idsOrdenados); + alert('Orden de Diputados guardado con éxito!'); + } catch (error) { + alert('Error al guardar el orden de Diputados.'); + } + }; + + if (loading) return

Cargando orden de Diputados...

; + + return ( +
+

Ordenar Agrupaciones (Diputados)

+

Arrastre para reordenar.

+

Ancla izquierda. Prioridad de izquierda a derecha y de arriba abajo.

+ + a.id)} + strategy={horizontalListSortingStrategy} + > +
    + {agrupaciones.map(agrupacion => ( + + {agrupacion.nombreCorto || agrupacion.nombre} + + ))} +
+
+
+ +
+ ); +}; \ No newline at end of file diff --git a/Elecciones-Web/frontend-admin/src/components/OrdenSenadoresManager.tsx b/Elecciones-Web/frontend-admin/src/components/OrdenSenadoresManager.tsx new file mode 100644 index 0000000..f58701d --- /dev/null +++ b/Elecciones-Web/frontend-admin/src/components/OrdenSenadoresManager.tsx @@ -0,0 +1,114 @@ +// src/components/OrdenSenadoresManager.tsx +import { useState, useEffect } from 'react'; +import { + DndContext, + closestCenter, + KeyboardSensor, + PointerSensor, + useSensor, + useSensors, + type DragEndEvent, +} from '@dnd-kit/core'; +import { + arrayMove, + SortableContext, + sortableKeyboardCoordinates, + horizontalListSortingStrategy, +} from '@dnd-kit/sortable'; + +import { getAgrupaciones } from '../services/apiService'; +import type { AgrupacionPolitica } from '../types'; +import { SortableItem } from './SortableItem'; +import './AgrupacionesManager.css'; // Reutilizamos los estilos + +// Función para llamar al endpoint específico de senadores +const updateOrdenSenadoresApi = async (ids: string[]) => { + const token = localStorage.getItem('admin-jwt-token'); + const response = await fetch('http://localhost:5217/api/admin/agrupaciones/orden-senadores', { + method: 'PUT', + headers: { + 'Content-Type': 'application/json', + 'Authorization': `Bearer ${token}` + }, + body: JSON.stringify(ids) + }); + if (!response.ok) { + throw new Error("Failed to save Senadores order"); + } +}; + +export const OrdenSenadoresManager = () => { + const [agrupaciones, setAgrupaciones] = useState([]); + const [loading, setLoading] = useState(true); + const sensors = useSensors( + useSensor(PointerSensor), + useSensor(KeyboardSensor, { coordinateGetter: sortableKeyboardCoordinates }) + ); + + useEffect(() => { + const fetchAndSortAgrupaciones = async () => { + setLoading(true); + try { + const data = await getAgrupaciones(); + // Ordenar por el orden de Senadores. Los nulos van al final. + data.sort((a, b) => (a.ordenSenadores || 999) - (b.ordenSenadores || 999)); + setAgrupaciones(data); + } catch (error) { + console.error("Failed to fetch agrupaciones for Senadores:", error); + } finally { + setLoading(false); + } + }; + fetchAndSortAgrupaciones(); + }, []); + + const handleDragEnd = (event: DragEndEvent) => { + const { active, over } = event; + if (over && active.id !== over.id) { + setAgrupaciones((items) => { + const oldIndex = items.findIndex((item) => item.id === active.id); + const newIndex = items.findIndex((item) => item.id === over.id); + return arrayMove(items, oldIndex, newIndex); + }); + } + }; + + const handleSaveOrder = async () => { + const idsOrdenados = agrupaciones.map(a => a.id); + try { + await updateOrdenSenadoresApi(idsOrdenados); + alert('Orden de Senadores guardado con éxito!'); + } catch (error) { + alert('Error al guardar el orden de Senadores.'); + } + }; + + if (loading) return

Cargando orden de Senadores...

; + + return ( +
+

Ordenar Agrupaciones (Senado)

+

Arrastre para reordenar.

+

Ancla izquierda. Prioridad de izquierda a derecha y de arriba abajo.

+ + a.id)} + strategy={horizontalListSortingStrategy} + > +
    + {agrupaciones.map(agrupacion => ( + + {agrupacion.nombreCorto || agrupacion.nombre} + + ))} +
+
+
+ +
+ ); +}; \ No newline at end of file diff --git a/Elecciones-Web/frontend-admin/src/components/SortableItem.tsx b/Elecciones-Web/frontend-admin/src/components/SortableItem.tsx new file mode 100644 index 0000000..7f40c0f --- /dev/null +++ b/Elecciones-Web/frontend-admin/src/components/SortableItem.tsx @@ -0,0 +1,26 @@ +// src/components/SortableItem.tsx +import { useSortable } from '@dnd-kit/sortable'; +import { CSS } from '@dnd-kit/utilities'; + +export function SortableItem(props: { id: string, children: React.ReactNode }) { + const { + attributes, + listeners, + setNodeRef, + transform, + transition, + } = useSortable({ id: props.id }); + + // La única propiedad de estilo que necesitamos en línea es la que calcula dnd-kit + const style = { + transform: CSS.Transform.toString(transform), + transition, + }; + + // Añadimos la clase CSS que creamos + return ( +
  • + {props.children} +
  • + ); +} \ No newline at end of file diff --git a/Elecciones-Web/frontend-admin/src/context/AuthContext.tsx b/Elecciones-Web/frontend-admin/src/context/AuthContext.tsx new file mode 100644 index 0000000..aeaa757 --- /dev/null +++ b/Elecciones-Web/frontend-admin/src/context/AuthContext.tsx @@ -0,0 +1,71 @@ +// src/context/AuthContext.tsx +import { createContext, useState, useContext, type ReactNode, useEffect } from 'react'; +import { loginUser } from '../services/apiService'; // Importaremos esta función +import type { LoginCredentials } from '../services/apiService'; // y este tipo +import { subscribeToLogout } from './authUtils'; + +interface AuthContextType { + isAuthenticated: boolean; + token: string | null; + login: (credentials: LoginCredentials) => Promise; + logout: () => void; +} + +const AuthContext = createContext(undefined); + +export const AuthProvider = ({ children }: { children: ReactNode }) => { + const [token, setToken] = useState(null); + + useEffect(() => { + // Al cargar la app, revisamos si ya hay un token guardado + const storedToken = localStorage.getItem('admin-jwt-token'); + if (storedToken) { + setToken(storedToken); + } + }, []); + + const logout = () => { + localStorage.removeItem('admin-jwt-token'); + setToken(null); + }; + + useEffect(() => { + // Nos suscribimos al evento de logout global. + const handleLogout = () => logout(); + subscribeToLogout(handleLogout); + }, []); // Se ejecuta solo una vez + + const login = async (credentials: LoginCredentials): Promise => { + try { + const receivedToken = await loginUser(credentials); + if (receivedToken) { + localStorage.setItem('admin-jwt-token', receivedToken); + setToken(receivedToken); + return true; + } + return false; + } catch (error) { + console.error("Login failed:", error); + // Asegurarse de que el usuario esté deslogueado si falla + logout(); + return false; + } + }; + + const value = { + isAuthenticated: !!token, + token, + login, + logout, + }; + + return {children}; +}; + +export const useAuth = () => { + const context = useContext(AuthContext); + if (context === undefined) { + throw new Error('useAuth must be used within an AuthProvider'); + } + return context; +}; \ No newline at end of file diff --git a/Elecciones-Web/frontend-admin/src/context/authUtils.ts b/Elecciones-Web/frontend-admin/src/context/authUtils.ts new file mode 100644 index 0000000..9e87c52 --- /dev/null +++ b/Elecciones-Web/frontend-admin/src/context/authUtils.ts @@ -0,0 +1,14 @@ +// src/context/authUtils.ts + +// Creamos un "emisor de eventos" muy simple. +const events = new EventTarget(); + +// La API escuchará este evento personalizado. +export function subscribeToLogout(callback: () => void) { + events.addEventListener('logout', callback); +} + +// El interceptor llamará a esta función para disparar el evento. +export function triggerLogout() { + events.dispatchEvent(new Event('logout')); +} \ No newline at end of file diff --git a/Elecciones-Web/frontend-admin/src/index.css b/Elecciones-Web/frontend-admin/src/index.css new file mode 100644 index 0000000..e69de29 diff --git a/Elecciones-Web/frontend-admin/src/main.tsx b/Elecciones-Web/frontend-admin/src/main.tsx new file mode 100644 index 0000000..5692b4f --- /dev/null +++ b/Elecciones-Web/frontend-admin/src/main.tsx @@ -0,0 +1,22 @@ +// src/main.tsx +import React from 'react'; +import ReactDOM from 'react-dom/client'; +import App from './App.tsx'; +import './index.css'; +import { AuthProvider } from './context/AuthContext.tsx'; + +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; + +// 1. Crear una instancia del cliente de query +const queryClient = new QueryClient(); + +ReactDOM.createRoot(document.getElementById('root')!).render( + + {/* 2. Envolver la aplicación con el proveedor */} + + + + + + +); \ No newline at end of file diff --git a/Elecciones-Web/frontend-admin/src/services/apiService.ts b/Elecciones-Web/frontend-admin/src/services/apiService.ts new file mode 100644 index 0000000..7216e21 --- /dev/null +++ b/Elecciones-Web/frontend-admin/src/services/apiService.ts @@ -0,0 +1,97 @@ +// src/services/apiService.ts +import axios from 'axios'; +import { triggerLogout } from '../context/authUtils'; +import type { AgrupacionPolitica, UpdateAgrupacionData, Bancada } from '../types'; + +const AUTH_API_URL = 'http://localhost:5217/api/auth'; +const ADMIN_API_URL = 'http://localhost:5217/api/admin'; + +const adminApiClient = axios.create({ + baseURL: ADMIN_API_URL, +}); + +// --- INTERCEPTORES (una sola vez) --- + +// Interceptor de Peticiones: Añade el token JWT a cada llamada +adminApiClient.interceptors.request.use( + (config) => { + const token = localStorage.getItem('admin-jwt-token'); + if (token) { + config.headers['Authorization'] = `Bearer ${token}`; + } + return config; + }, + (error) => Promise.reject(error) +); + +// Interceptor de Respuestas: Maneja la expiración del token (error 401) +adminApiClient.interceptors.response.use( + (response) => response, + (error) => { + if (axios.isAxiosError(error) && error.response?.status === 401) { + console.log("Token expirado o inválido. Deslogueando..."); + triggerLogout(); + } + return Promise.reject(error); + } +); + +// --- SERVICIOS DE API --- + +// 1. Autenticación +export interface LoginCredentials { username: string; password: string; } + +export const loginUser = async (credentials: LoginCredentials): Promise => { + try { + const response = await axios.post(`${AUTH_API_URL}/login`, credentials); + return response.data.token; + } catch (error) { + console.error("Error during login request:", error); + throw error; + } +}; + +// 2. Agrupaciones Políticas +export const getAgrupaciones = async (): Promise => { + const response = await adminApiClient.get('/agrupaciones'); + return response.data; +}; + +export const updateAgrupacion = async (id: string, data: UpdateAgrupacionData): Promise => { + await adminApiClient.put(`/agrupaciones/${id}`, data); +}; + +// 3. Ordenamiento de Agrupaciones +export const updateOrden = async (camara: 'diputados' | 'senadores', ids: string[]): Promise => { + await adminApiClient.put(`/agrupaciones/orden-${camara}`, ids); +}; + +// 4. Gestión de Bancas y Ocupantes +export const getBancadas = async (camara: 'diputados' | 'senadores'): Promise => { + const camaraId = camara === 'diputados' ? 0 : 1; + const response = await adminApiClient.get(`/bancadas/${camaraId}`); + return response.data; +}; + +export interface UpdateBancadaData { + agrupacionPoliticaId: string | null; + nombreOcupante: string | null; + fotoUrl: string | null; + periodo: string | null; +} + +export const updateBancada = async (bancadaId: number, data: UpdateBancadaData): Promise => { + await adminApiClient.put(`/bancadas/${bancadaId}`, data); +}; + +// 5. Configuración General +export type ConfiguracionResponse = Record; + +export const getConfiguracion = async (): Promise => { + const response = await adminApiClient.get('/configuracion'); + return response.data; +}; + +export const updateConfiguracion = async (data: Record): Promise => { + await adminApiClient.put('/configuracion', data); +}; \ No newline at end of file diff --git a/Elecciones-Web/frontend-admin/src/types/index.ts b/Elecciones-Web/frontend-admin/src/types/index.ts new file mode 100644 index 0000000..0107a48 --- /dev/null +++ b/Elecciones-Web/frontend-admin/src/types/index.ts @@ -0,0 +1,42 @@ +// src/types/index.ts + +export interface AgrupacionPolitica { + id: string; + idTelegrama: string; + nombre: string; + nombreCorto: string | null; + color: string | null; + logoUrl: string | null; + ordenDiputados: number | null; + ordenSenadores: number | null; +} + +export interface UpdateAgrupacionData { + nombreCorto: string | null; + color: string | null; + logoUrl: string | null; +} + +export const TipoCamara = { + Diputados: 0, + Senadores: 1, +} as const; + +export type TipoCamaraValue = typeof TipoCamara[keyof typeof TipoCamara]; + +export interface OcupanteBanca { + id: number; + bancadaId: number; + nombreOcupante: string; + fotoUrl: string | null; + periodo: string | null; +} + +// Nueva interfaz para la Bancada +export interface Bancada { + id: number; + camara: TipoCamaraValue; + agrupacionPoliticaId: string | null; + agrupacionPolitica: AgrupacionPolitica | null; + ocupante: OcupanteBanca | null; +} \ No newline at end of file diff --git a/Elecciones-Web/frontend-admin/src/vite-env.d.ts b/Elecciones-Web/frontend-admin/src/vite-env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/Elecciones-Web/frontend-admin/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/Elecciones-Web/frontend-admin/tsconfig.app.json b/Elecciones-Web/frontend-admin/tsconfig.app.json new file mode 100644 index 0000000..227a6c6 --- /dev/null +++ b/Elecciones-Web/frontend-admin/tsconfig.app.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", + "target": "ES2022", + "useDefineForClassFields": true, + "lib": ["ES2022", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "moduleDetection": "force", + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "erasableSyntaxOnly": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedSideEffectImports": true + }, + "include": ["src"] +} diff --git a/Elecciones-Web/frontend-admin/tsconfig.json b/Elecciones-Web/frontend-admin/tsconfig.json new file mode 100644 index 0000000..1ffef60 --- /dev/null +++ b/Elecciones-Web/frontend-admin/tsconfig.json @@ -0,0 +1,7 @@ +{ + "files": [], + "references": [ + { "path": "./tsconfig.app.json" }, + { "path": "./tsconfig.node.json" } + ] +} diff --git a/Elecciones-Web/frontend-admin/tsconfig.node.json b/Elecciones-Web/frontend-admin/tsconfig.node.json new file mode 100644 index 0000000..f85a399 --- /dev/null +++ b/Elecciones-Web/frontend-admin/tsconfig.node.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", + "target": "ES2023", + "lib": ["ES2023"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "moduleDetection": "force", + "noEmit": true, + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "erasableSyntaxOnly": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedSideEffectImports": true + }, + "include": ["vite.config.ts"] +} diff --git a/Elecciones-Web/frontend-admin/vite.config.ts b/Elecciones-Web/frontend-admin/vite.config.ts new file mode 100644 index 0000000..8b0f57b --- /dev/null +++ b/Elecciones-Web/frontend-admin/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' + +// https://vite.dev/config/ +export default defineConfig({ + plugins: [react()], +}) diff --git a/Elecciones-Web/frontend/src/apiService.ts b/Elecciones-Web/frontend/src/apiService.ts index b5957d9..f496f23 100644 --- a/Elecciones-Web/frontend/src/apiService.ts +++ b/Elecciones-Web/frontend/src/apiService.ts @@ -2,6 +2,51 @@ import axios from 'axios'; import type { ResumenProvincial, ProyeccionBancas, MunicipioSimple, TelegramaData, CatalogoItem } from './types/types'; +interface PartidoData { + id: string; + nombre: string; + nombreCorto: string | null; + bancasTotales: number; + color: string | null; +} + +interface CamaraData { + camaraNombre: string; + totalBancas: number; + bancasEnJuego: number; + partidos: PartidoData[]; + presidenteBancada: { color: string | null } | null; +} + +export interface ComposicionData { + diputados: CamaraData; + senadores: CamaraData; +} + +export interface OcupanteBanca { + id: number; + nombreOcupante: string; + fotoUrl: string; + periodo: string; +} + +interface PartidoData { + id: string; + nombre: string; + nombreCorto: string | null; + bancasTotales: number; + bancasEnJuego: number; + color: string | null; + ocupantes: OcupanteBanca[]; +} + +export interface BancadaDetalle { + id: number; // Este es el ID de la Bancada + camara: number; // 0 o 1 + agrupacionPoliticaId: string | null; + ocupante: OcupanteBanca | null; +} + const API_BASE_URL = 'http://localhost:5217/api'; const apiClient = axios.create({ @@ -36,26 +81,36 @@ export const getTelegramaPorId = async (mesaId: string): Promise }; export const getSecciones = async (): Promise => { - const response = await apiClient.get('/catalogos/secciones'); - return response.data; + const response = await apiClient.get('/catalogos/secciones'); + return response.data; }; export const getMunicipiosPorSeccion = async (seccionId: string): Promise => { - const response = await apiClient.get(`/catalogos/municipios/${seccionId}`); - return response.data; + const response = await apiClient.get(`/catalogos/municipios/${seccionId}`); + return response.data; }; export const getCircuitosPorMunicipio = async (municipioId: string): Promise => { - const response = await apiClient.get(`/catalogos/circuitos/${municipioId}`); - return response.data; + const response = await apiClient.get(`/catalogos/circuitos/${municipioId}`); + return response.data; }; export const getEstablecimientosPorCircuito = async (circuitoId: string): Promise => { - const response = await apiClient.get(`/catalogos/establecimientos/${circuitoId}`); - return response.data; + const response = await apiClient.get(`/catalogos/establecimientos/${circuitoId}`); + return response.data; }; export const getMesasPorEstablecimiento = async (establecimientoId: string): Promise => { - const response = await apiClient.get(`/catalogos/mesas/${establecimientoId}`); - return response.data; + const response = await apiClient.get(`/catalogos/mesas/${establecimientoId}`); + return response.data; +}; + +export const getComposicionCongreso = async (): Promise => { + const response = await apiClient.get('/resultados/composicion-congreso'); + return response.data; +}; + +export const getBancadasDetalle = async (): Promise => { + const response = await apiClient.get('/resultados/bancadas-detalle'); + return response.data; }; \ No newline at end of file diff --git a/Elecciones-Web/frontend/src/components/CongresoWidget.css b/Elecciones-Web/frontend/src/components/CongresoWidget.css index 9c6a7f6..96f1c4d 100644 --- a/Elecciones-Web/frontend/src/components/CongresoWidget.css +++ b/Elecciones-Web/frontend/src/components/CongresoWidget.css @@ -31,8 +31,15 @@ } @keyframes fadeIn { - from { opacity: 0; transform: scale(0.9); } - to { opacity: 1; transform: scale(1); } + from { + opacity: 0; + transform: scale(0.9); + } + + to { + opacity: 1; + transform: scale(1); + } } .congreso-summary { @@ -138,6 +145,7 @@ flex-direction: column; padding: 1.5rem; } + .congreso-summary { border-left: none; padding-left: 0; @@ -145,4 +153,52 @@ border-top: 1px solid #e0e0e0; padding-top: 1.5rem; } +} + +.seat-tooltip { + display: flex; + flex-direction: column; + align-items: center; + gap: 5px; + padding: 5px; + background-color: white; + border-radius: 4px; + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); +} + +.seat-tooltip img { + width: 60px; + height: 60px; + border-radius: 50%; + object-fit: cover; + border: 2px solid #ccc; +} + +.seat-tooltip p { + margin: 0; + font-size: 12px; + font-weight: bold; + color: #333; +} + +.seat-tooltip { + display: flex; + flex-direction: column; + align-items: center; + gap: 5px; + padding: 8px; + background-color: white; +} +.seat-tooltip img { + width: 60px; + height: 60px; + border-radius: 50%; + object-fit: cover; + border: 2px solid #ccc; +} +.seat-tooltip p { + margin: 0; + font-size: 12px; + font-weight: bold; + color: #333; } \ No newline at end of file diff --git a/Elecciones-Web/frontend/src/components/CongresoWidget.tsx b/Elecciones-Web/frontend/src/components/CongresoWidget.tsx index f0c6d6a..48f97cf 100644 --- a/Elecciones-Web/frontend/src/components/CongresoWidget.tsx +++ b/Elecciones-Web/frontend/src/components/CongresoWidget.tsx @@ -1,125 +1,109 @@ // src/components/CongresoWidget.tsx -import { useState, useEffect } from 'react'; -// 1. Importar ambos layouts +import { useState, useMemo } from 'react'; +import { useQuery } from '@tanstack/react-query'; import { ParliamentLayout } from './ParliamentLayout'; -import { SenateLayout } from './SenateLayout'; +import { SenateLayout } from './SenateLayout'; +import { getComposicionCongreso, getBancadasDetalle } from '../apiService'; +import type { ComposicionData, BancadaDetalle } from '../apiService'; +import { Tooltip } from 'react-tooltip'; import './CongresoWidget.css'; -// ... (Interfaces sin cambios) type CamaraType = 'diputados' | 'senadores'; - -interface PartidoData { - id: string; - nombre: string; - bancasTotales: number; - bancasEnJuego: number; - color: string; -} - -interface CamaraData { - camaraNombre: string; - totalBancas: number; - bancasEnJuego: number; - partidos: PartidoData[]; -} - -interface ComposicionData { - diputados: CamaraData; - senadores: CamaraData; -} - +const DEFAULT_COLOR = '#808080'; export const CongresoWidget = () => { - const [data, setData] = useState(null); const [camaraActiva, setCamaraActiva] = useState('diputados'); - const [loading, setLoading] = useState(true); - const [error, setError] = useState(null); - useEffect(() => { - // ... (fetchData sin cambios) - const fetchData = async () => { - try { - const response = await fetch('http://localhost:5217/api/resultados/composicion-congreso'); - if (!response.ok) throw new Error('La respuesta de la red no fue exitosa'); - const result: ComposicionData = await response.json(); - setData(result); - } catch (err) { - console.error("Error cargando datos de composición:", err); - setError("No se pudieron cargar los datos de composición del congreso."); - } finally { - setLoading(false); - } - }; - fetchData(); - }, []); - - if (loading) return
    Cargando...
    ; - if (error) return
    {error}
    ; - - const datosCamaraActual = data ? data[camaraActiva] : null; - - if (!datosCamaraActual) { - return
    Datos no disponibles para la cámara seleccionada.
    ; - } - - const partidosOrdenados = datosCamaraActual.partidos; - - const seatFillData = partidosOrdenados.flatMap(party => { - const retainedSeats = party.bancasTotales - party.bancasEnJuego; - const inPlaySeats = party.bancasEnJuego; - return [ - ...Array(retainedSeats).fill({ color: party.color, isEnJuego: false }), - ...Array(inPlaySeats).fill({ color: party.color, isEnJuego: true }), - ]; + const { data: composicionData, isLoading: isLoadingComposicion, error: errorComposicion } = useQuery({ + queryKey: ['composicionCongreso'], + queryFn: getComposicionCongreso, }); - + + const { data: bancadasDetalle = [] } = useQuery({ + queryKey: ['bancadasDetalle'], + queryFn: getBancadasDetalle, + enabled: !!composicionData, + }); + + const datosCamaraActual = composicionData ? composicionData[camaraActiva] : null; + + // --- LÓGICA DE SEATFILLDATA --- + const seatFillData = useMemo(() => { + if (!datosCamaraActual || !bancadasDetalle.length) return []; + + const camaraId = camaraActiva === 'diputados' ? 0 : 1; + const bancadasDeCamara = bancadasDetalle.filter(b => b.camara === camaraId); + + // Creamos un mapa de AgrupacionId -> Color para un acceso rápido + const colorMap = new Map(); + datosCamaraActual.partidos.forEach(p => { + if (p.id && p.color) { + colorMap.set(p.id, p.color); + } + }); + + // 1. Aseguramos que la lista de bancas esté en orden físico (por su ID). + const bancadasOrdenadas = bancadasDeCamara.sort((a, b) => a.id - b.id); + + // 2. Mapeamos cada banca física a un objeto SeatFillData. + // El índice del array corresponderá al asiento visual. + return bancadasOrdenadas.map(bancada => ({ + color: bancada.agrupacionPoliticaId ? colorMap.get(bancada.agrupacionPoliticaId) || DEFAULT_COLOR : DEFAULT_COLOR, + ocupante: bancada.ocupante + })); + + }, [datosCamaraActual, bancadasDetalle, camaraActiva]); + + if (isLoadingComposicion) return
    Cargando...
    ; + if (errorComposicion || !datosCamaraActual) return
    No se pudo cargar la composición.
    ; + + const partidosOrdenados = datosCamaraActual.partidos; + return (
    - {/* --- INICIO DE LA MODIFICACIÓN: RENDERIZADO CONDICIONAL --- */} {camaraActiva === 'diputados' ? ( - + ) : ( - + )} - {/* --- FIN DE LA MODIFICACIÓN --- */}
    - - + +
    - +

    {datosCamaraActual.camaraNombre}

    Total de Bancas {datosCamaraActual.totalBancas}
    -
    - Bancas en juego - {datosCamaraActual.bancasEnJuego} -

      {partidosOrdenados.map(partido => (
    • - - {partido.nombre} + + + {partido.nombreCorto || partido.nombre} + {partido.bancasTotales}
    • ))}
    + {/* Es importante que el Tooltip esté fuera del div que se re-renderiza con el cambio de pestaña */} +
    ); }; \ No newline at end of file diff --git a/Elecciones-Web/frontend/src/components/MapaBsAs.tsx b/Elecciones-Web/frontend/src/components/MapaBsAs.tsx index b04e7c4..b40f372 100644 --- a/Elecciones-Web/frontend/src/components/MapaBsAs.tsx +++ b/Elecciones-Web/frontend/src/components/MapaBsAs.tsx @@ -7,7 +7,6 @@ import { useQuery } from '@tanstack/react-query'; import axios from 'axios'; import type { Feature, Geometry } from 'geojson'; import { geoCentroid } from 'd3-geo'; - import './MapaBsAs.css'; // --- Interfaces y Tipos --- @@ -17,6 +16,7 @@ interface ResultadoMapa { ambitoId: number; departamentoNombre: string; agrupacionGanadoraId: string; + colorGanador: string | null; } interface ResultadoDetalladoMunicipio { @@ -44,14 +44,11 @@ type PartidoGeography = Feature & { rsmKey: string // --- Constantes --- const API_BASE_URL = 'http://localhost:5217/api'; -const COLORES_BASE: string[] = ["#FF5733", "#33FF57", "#3357FF", "#FF33A1", "#A133FF", "#33FFA1", "#FFC300", "#C70039", "#900C3F", "#581845"]; const MIN_ZOOM = 1; const MAX_ZOOM = 8; -// Define los límites del paneo: [[x0, y0], [x1, y1]]. -// Esto evita que el mapa se "pierda" fuera de la vista. -// Estos valores pueden necesitar ajuste fino según el tamaño final del contenedor del mapa. const TRANSLATE_EXTENT: [[number, number], [number, number]] = [[-100, -600], [1100, 300]]; -const INITIAL_POSITION = { center: [-60, -37.25] as PointTuple, zoom: MIN_ZOOM }; +const INITIAL_POSITION = { center: [-60.5, -37.2] as PointTuple, zoom: MIN_ZOOM }; +const DEFAULT_MAP_COLOR = '#E0E0E0'; // --- Componente Principal --- const MapaBsAs = () => { @@ -71,26 +68,34 @@ const MapaBsAs = () => { queryFn: async () => (await axios.get(`${API_BASE_URL}/Catalogos/agrupaciones`)).data, }); - const { nombresAgrupaciones, coloresPartidos, resultadosPorDepartamento } = useMemo(() => { - const nombresMap = new Map(); - const coloresMap = new Map(); - const resultadosMap = new Map(); - if (agrupacionesData) { - agrupacionesData.forEach((agrupacion, index) => { - nombresMap.set(agrupacion.id, agrupacion.nombre); - coloresMap.set(agrupacion.id, COLORES_BASE[index % COLORES_BASE.length]); - }); - } - // Se cambia el color por defecto a uno más apropiado para fondo claro - coloresMap.set('default', '#E0E0E0'); - if (resultadosData) { - resultadosData.forEach(r => resultadosMap.set(r.departamentoNombre.toUpperCase(), r)); - } - return { nombresAgrupaciones: nombresMap, coloresPartidos: coloresMap, resultadosPorDepartamento: resultadosMap }; + // --- SU SOLUCIÓN CORRECTA INTEGRADA --- + const { nombresAgrupaciones, resultadosPorDepartamento } = useMemo<{ + nombresAgrupaciones: Map; + resultadosPorDepartamento: Map; + }>(() => { + const nombresMap = new Map(); + const resultadosMap = new Map(); + + if (agrupacionesData) { + agrupacionesData.forEach((agrupacion) => { + nombresMap.set(agrupacion.id, agrupacion.nombre); + }); + } + + if (resultadosData) { + resultadosData.forEach(r => resultadosMap.set(r.departamentoNombre.toUpperCase(), r)); + } + + return { + nombresAgrupaciones: nombresMap, + resultadosPorDepartamento: resultadosMap + }; }, [agrupacionesData, resultadosData]); const isLoading = isLoadingResultados || isLoadingAgrupaciones || isLoadingGeo; + // ... (el resto del componente no necesita cambios) + const handleReset = useCallback(() => { setSelectedAmbitoId(null); setPosition(INITIAL_POSITION); @@ -111,22 +116,15 @@ const MapaBsAs = () => { }, [selectedAmbitoId, handleReset, resultadosPorDepartamento]); const handleMoveEnd = (newPosition: { coordinates: PointTuple; zoom: number }) => { - // La lógica de reseteo cuando se hace zoom out completamente con la rueda del ratón se mantiene. - // El `translateExtent` ya previene que el mapa se mueva fuera de los límites. if (newPosition.zoom <= MIN_ZOOM) { if (position.zoom > MIN_ZOOM || selectedAmbitoId !== null) { handleReset(); } return; } - - // Si se está haciendo zoom out desde una vista detallada, se deselecciona el municipio - // para volver a la vista general sin resetear completamente la posición. if (newPosition.zoom < position.zoom && selectedAmbitoId !== null) { setSelectedAmbitoId(null); } - - // Actualiza el estado con la nueva posición y zoom del paneo/zoom del usuario. setPosition({ center: newPosition.coordinates, zoom: newPosition.zoom }); }; @@ -144,8 +142,10 @@ const MapaBsAs = () => { const getPartyFillColor = (departamentoNombre: string) => { const resultado = resultadosPorDepartamento.get(departamentoNombre.toUpperCase()); - if (!resultado) return coloresPartidos.get('default') || '#D6D6DA'; - return coloresPartidos.get(resultado.agrupacionGanadoraId) || coloresPartidos.get('default'); + if (!resultado || !resultado.colorGanador) { + return DEFAULT_MAP_COLOR; + } + return resultado.colorGanador; }; const handleMouseEnter = (e: MouseEvent) => { @@ -160,8 +160,7 @@ const MapaBsAs = () => { return (
    - {/* Se elimina el 'style' con el backgroundColor para que lo controle el CSS */} - + { minZoom={MIN_ZOOM} maxZoom={MAX_ZOOM} filterZoomEvent={(e: WheelEvent) => { - // Detectamos si la rueda se mueve hacia atrás (zoom out) if (e.deltaY > 0) { handleReset(); } else if (e.deltaY < 0) { @@ -198,7 +196,6 @@ const MapaBsAs = () => { data-tooltip-content={`${geo.properties.departamento}: ${nombreAgrupacionGanadora}`} className={`rsm-geography ${isSelected ? 'selected' : ''} ${isFaded ? 'faded' : ''}`} fill={getPartyFillColor(geo.properties.departamento)} - // Se elimina la prop 'stroke' para que la controle el CSS onClick={() => handleGeographyClick(geo)} onMouseEnter={handleMouseEnter} /> @@ -209,13 +206,12 @@ const MapaBsAs = () => { )} - {/* Se añade una variante 'light' al Tooltip para que combine mejor */} {selectedAmbitoId !== null && }
    - +
    ); @@ -264,9 +260,34 @@ const DetalleMunicipio = ({ ambitoId, onReset }: { ambitoId: number | null; onRe ); }; -const Legend = ({ colores, nombres }: { colores: Map; nombres: Map }) => { - const legendItems = Array.from(colores.entries()).filter(([id]) => id !== 'default').map(([id, color]) => ({ nombre: nombres.get(id) || 'Desconocido', color: color })); - return (

    Leyenda de Ganadores

    {legendItems.map(item => (
    {item.nombre}
    ))}
    ); +const Legend = ({ resultados, nombresAgrupaciones }: { resultados: Map, nombresAgrupaciones: Map }) => { + + const legendItems = useMemo(() => { + const ganadoresUnicos = new Map(); + + resultados.forEach(resultado => { + if (resultado.colorGanador && !ganadoresUnicos.has(resultado.agrupacionGanadoraId)) { + ganadoresUnicos.set(resultado.agrupacionGanadoraId, { + nombre: nombresAgrupaciones.get(resultado.agrupacionGanadoraId) || 'Desconocido', + color: resultado.colorGanador + }); + } + }); + + return Array.from(ganadoresUnicos.values()); + }, [resultados, nombresAgrupaciones]); + + return ( +
    +

    Leyenda de Ganadores

    + {legendItems.map(item => ( +
    +
    + {item.nombre} +
    + ))} +
    + ); }; export default MapaBsAs; \ No newline at end of file diff --git a/Elecciones-Web/frontend/src/components/ParliamentLayout.tsx b/Elecciones-Web/frontend/src/components/ParliamentLayout.tsx index d742c59..b285e10 100644 --- a/Elecciones-Web/frontend/src/components/ParliamentLayout.tsx +++ b/Elecciones-Web/frontend/src/components/ParliamentLayout.tsx @@ -1,139 +1,169 @@ // src/components/ParliamentLayout.tsx import React from 'react'; -// Interfaces (sin cambios) +// Interfaces (no cambian) interface SeatFillData { color: string; - isEnJuego: boolean; + // Añadimos la propiedad opcional 'ocupante' + ocupante?: { + nombreOcupante: string; + fotoUrl: string | null; + } | null; } interface ParliamentLayoutProps { seatData: SeatFillData[]; size?: number; + presidenteBancada: { color: string | null } | null; } +const PRESIDENTE_SEAT_INDEX = 91; + export const ParliamentLayout: React.FC = ({ seatData, size = 400, + presidenteBancada, }) => { const uniqueColors = [...new Set(seatData.map(d => d.color))]; - // La plantilla de círculos estáticos + // --- NUEVO ARRAY DE ELEMENTOS ORDENADO --- const seatElements = [ - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , ]; - const renderedElements = seatElements.map((child, index) => { - // Si no hay datos para este asiento (ej. en la cámara de senadores que tiene menos de 92 bancas) - // lo pintamos de gris. - if (index >= seatData.length) { - return React.cloneElement(child, { - fill: '#E0E0E0', - stroke: '#ffffff', - strokeWidth: 1.5, - }); + // Creamos una copia mutable de los datos de asientos para poder modificarla. + const finalSeatData = [...seatData]; + + // Si hay un presidente y su partido tiene bancas, le quitamos una para asignarla. + if (presidenteBancada && presidenteBancada.color) { + // Encontramos el índice del último asiento que pertenece al partido del presidente. + const lastSeatIndex = finalSeatData.map(s => s.color).lastIndexOf(presidenteBancada.color); + + if (lastSeatIndex !== -1) { + // Eliminamos ese asiento de la lista de asientos electorales. + finalSeatData.splice(lastSeatIndex, 1); } + } - const seat = seatData[index]; - const patternId = `stripes-${seat.color.replace('#', '')}`; - + const renderedElements = seatElements.map((child, index) => { + // El asiento presidencial sigue siendo un caso especial + if (index === PRESIDENTE_SEAT_INDEX) { return React.cloneElement(child, { - fill: seat.isEnJuego ? `url(#${patternId})` : seat.color, - stroke: '#ffffff', - strokeWidth: 1.5, + fill: presidenteBancada?.color || '#A9A9A9', + stroke: '#000000', + strokeWidth: 2, }); + } + + // La lógica ahora es simple: el asiento en el índice X del SVG + // corresponde al asiento en el índice X de los datos. + const seat = seatData[index]; + + if (!seat) { + return React.cloneElement(child, { fill: '#E0E0E0', stroke: '#ffffff', strokeWidth: 1.5 }); + } + + return React.cloneElement(child, { + fill: seat.color, + stroke: '#ffffff', + strokeWidth: 1.5, + 'data-tooltip-id': seat.ocupante ? 'seat-tooltip' : undefined, + 'data-tooltip-html': seat.ocupante + ? `
    ${seat.ocupante.nombreOcupante}

    ${seat.ocupante.nombreOcupante}

    ` + : undefined, }); +}); return ( diff --git a/Elecciones-Web/frontend/src/components/SenateLayout.tsx b/Elecciones-Web/frontend/src/components/SenateLayout.tsx index ffe7d34..e00e79c 100644 --- a/Elecciones-Web/frontend/src/components/SenateLayout.tsx +++ b/Elecciones-Web/frontend/src/components/SenateLayout.tsx @@ -1,89 +1,121 @@ // src/components/SenateLayout.tsx import React from 'react'; -// Las interfaces son las mismas que para el otro layout +// Interfaces interface SeatFillData { color: string; - isEnJuego: boolean; + // Añadimos la propiedad opcional 'ocupante' + ocupante?: { + nombreOcupante: string; + fotoUrl: string | null; + } | null; } interface SenateLayoutProps { seatData: SeatFillData[]; size?: number; + presidenteBancada: { color: string | null } | null; } +const PRESIDENTE_SEAT_INDEX = 45; // El último asiento (índice 45 de 46) + export const SenateLayout: React.FC = ({ seatData, size = 400, + presidenteBancada, }) => { const uniqueColors = [...new Set(seatData.map(d => d.color).filter(Boolean))]; - // Plantilla estática de los 46 asientos del Senado, ordenados para el llenado por columnas. + // --- NUEVO ARRAY DE ELEMENTOS ORDENADO PARA EL SENADO --- const seatElements = [ - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , ]; + // Creamos una copia mutable de los datos de asientos para poder modificarla. + const finalSeatData = [...seatData]; + + // Si hay un presidente y su partido tiene bancas, le quitamos una para asignarla. + if (presidenteBancada && presidenteBancada.color) { + // Encontramos el índice del último asiento que pertenece al partido del presidente. + const lastSeatIndex = finalSeatData.map(s => s.color).lastIndexOf(presidenteBancada.color); + + if (lastSeatIndex !== -1) { + // Eliminamos ese asiento de la lista de asientos electorales. + finalSeatData.splice(lastSeatIndex, 1); + } + } + const renderedElements = seatElements.map((child, index) => { - if (index >= seatData.length) { + // El asiento presidencial sigue siendo un caso especial + if (index === PRESIDENTE_SEAT_INDEX) { return React.cloneElement(child, { - fill: '#E0E0E0', - stroke: '#ffffff', - strokeWidth: 1.5, + fill: presidenteBancada?.color || '#A9A9A9', + stroke: '#000000', + strokeWidth: 2, }); } + // La lógica ahora es simple: el asiento en el índice X del SVG + // corresponde al asiento en el índice X de los datos. const seat = seatData[index]; - const patternId = `stripes-${seat.color.replace('#', '')}`; + + if (!seat) { + return React.cloneElement(child, { fill: '#E0E0E0', stroke: '#ffffff', strokeWidth: 1.5 }); + } return React.cloneElement(child, { - fill: seat.isEnJuego ? `url(#${patternId})` : seat.color, + fill: seat.color, stroke: '#ffffff', strokeWidth: 1.5, + 'data-tooltip-id': seat.ocupante ? 'seat-tooltip' : undefined, + 'data-tooltip-html': seat.ocupante + ? `
    ${seat.ocupante.nombreOcupante}

    ${seat.ocupante.nombreOcupante}

    ` + : undefined, }); }); diff --git a/Elecciones-Web/frontend/src/components/TelegramaWidget.tsx b/Elecciones-Web/frontend/src/components/TelegramaWidget.tsx index 6f9894f..0e5ef56 100644 --- a/Elecciones-Web/frontend/src/components/TelegramaWidget.tsx +++ b/Elecciones-Web/frontend/src/components/TelegramaWidget.tsx @@ -51,7 +51,6 @@ export const TelegramaWidget = () => { } }, [selectedSeccion]); - // Y así sucesivamente para los demás filtros... useEffect(() => { if (selectedMunicipio) { setCircuitos([]); setEstablecimientos([]); setMesas([]); diff --git a/Elecciones-Web/src/Elecciones.Api/Controllers/AdminController.cs b/Elecciones-Web/src/Elecciones.Api/Controllers/AdminController.cs new file mode 100644 index 0000000..9efedcd --- /dev/null +++ b/Elecciones-Web/src/Elecciones.Api/Controllers/AdminController.cs @@ -0,0 +1,181 @@ +// src/Elecciones.Api/Controllers/AdminController.cs +using Elecciones.Database; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using Elecciones.Core.DTOs.ApiRequests; +using Elecciones.Database.Entities; +using Microsoft.AspNetCore.Authorization; +using Elecciones.Core.Enums; + +namespace Elecciones.Api.Controllers; + +[ApiController] +[Route("api/[controller]")] +[Authorize] +public class AdminController : ControllerBase +{ + private readonly EleccionesDbContext _dbContext; + private readonly ILogger _logger; + + public AdminController(EleccionesDbContext dbContext, ILogger logger) + { + _dbContext = dbContext; + _logger = logger; + } + + // Endpoint para obtener todas las agrupaciones para el panel de admin + [HttpGet("agrupaciones")] + public async Task GetAgrupaciones() + { + var agrupaciones = await _dbContext.AgrupacionesPoliticas + .AsNoTracking() + .OrderBy(a => a.Nombre) + .ToListAsync(); + + return Ok(agrupaciones); + } + + [HttpPut("agrupaciones/{id}")] + public async Task UpdateAgrupacion(string id, [FromBody] UpdateAgrupacionDto agrupacionDto) + { + // Buscamos la agrupación en la base de datos por su ID. + var agrupacion = await _dbContext.AgrupacionesPoliticas.FindAsync(id); + + if (agrupacion == null) + { + // Si no existe, devolvemos un error 404 Not Found. + return NotFound(new { message = $"No se encontró la agrupación con ID {id}" }); + } + + // Actualizamos las propiedades de la entidad con los valores del DTO. + agrupacion.NombreCorto = agrupacionDto.NombreCorto; + agrupacion.Color = agrupacionDto.Color; + agrupacion.LogoUrl = agrupacionDto.LogoUrl; + + // Guardamos los cambios en la base de datos. + await _dbContext.SaveChangesAsync(); + _logger.LogInformation("Se actualizó la agrupación: {Id}", id); + + // Devolvemos una respuesta 204 No Content, que es el estándar para un PUT exitoso sin devolver datos. + return NoContent(); + } + + [HttpPut("agrupaciones/orden-diputados")] + public async Task UpdateDiputadosOrden([FromBody] List idsAgrupacionesOrdenadas) + { + // Reseteamos solo el orden de diputados + await _dbContext.AgrupacionesPoliticas.ExecuteUpdateAsync(s => s.SetProperty(a => a.OrdenDiputados, (int?)null)); + + for (int i = 0; i < idsAgrupacionesOrdenadas.Count; i++) + { + var agrupacion = await _dbContext.AgrupacionesPoliticas.FindAsync(idsAgrupacionesOrdenadas[i]); + if (agrupacion != null) agrupacion.OrdenDiputados = i + 1; + } + await _dbContext.SaveChangesAsync(); + return Ok(); + } + + [HttpPut("agrupaciones/orden-senadores")] + public async Task UpdateSenadoresOrden([FromBody] List idsAgrupacionesOrdenadas) + { + // Reseteamos solo el orden de senadores + await _dbContext.AgrupacionesPoliticas.ExecuteUpdateAsync(s => s.SetProperty(a => a.OrdenSenadores, (int?)null)); + + for (int i = 0; i < idsAgrupacionesOrdenadas.Count; i++) + { + var agrupacion = await _dbContext.AgrupacionesPoliticas.FindAsync(idsAgrupacionesOrdenadas[i]); + if (agrupacion != null) agrupacion.OrdenSenadores = i + 1; + } + await _dbContext.SaveChangesAsync(); + return Ok(); + } + + // LEER todas las configuraciones + [HttpGet("configuracion")] + public async Task GetConfiguracion() + { + var configs = await _dbContext.Configuraciones.AsNoTracking().ToListAsync(); + // Devolvemos un diccionario para que sea fácil de consumir en el frontend + return Ok(configs.ToDictionary(c => c.Clave, c => c.Valor)); + } + + // GUARDAR un conjunto de configuraciones + [HttpPut("configuracion")] + public async Task UpdateConfiguracion([FromBody] Dictionary nuevasConfiguraciones) + { + foreach (var kvp in nuevasConfiguraciones) + { + var config = await _dbContext.Configuraciones.FindAsync(kvp.Key); + if (config == null) + { + // Si no existe, la creamos + _dbContext.Configuraciones.Add(new Configuracion { Clave = kvp.Key, Valor = kvp.Value }); + } + else + { + // Si existe, la actualizamos + config.Valor = kvp.Value; + } + } + await _dbContext.SaveChangesAsync(); + return NoContent(); + } + + // LEER: Obtener todas las bancadas para una cámara, con su partido y ocupante actual + [HttpGet("bancadas/{camara}")] + public async Task GetBancadas(TipoCamara camara) + { + var bancadas = await _dbContext.Bancadas + .AsNoTracking() + .Include(b => b.AgrupacionPolitica) + .Include(b => b.Ocupante) + .Where(b => b.Camara == camara) + .OrderBy(b => b.Id) // Ordenar por ID para consistencia + .ToListAsync(); + + return Ok(bancadas); + } + + // ACTUALIZAR: Asignar un partido y/o un ocupante a una bancada específica + [HttpPut("bancadas/{bancadaId}")] + public async Task UpdateBancada(int bancadaId, [FromBody] UpdateBancadaDto dto) + { + var bancada = await _dbContext.Bancadas + .Include(b => b.Ocupante) + .FirstOrDefaultAsync(b => b.Id == bancadaId); + + if (bancada == null) + { + return NotFound(new { message = "La bancada especificada no existe." }); + } + + // 1. Actualizar la agrupación de la bancada + bancada.AgrupacionPoliticaId = dto.AgrupacionPoliticaId; + + // 2. Lógica de "Upsert" (Update/Insert/Delete) para el ocupante + if (string.IsNullOrEmpty(dto.NombreOcupante)) + { + // Si no se envía nombre, se elimina el ocupante existente + if (bancada.Ocupante != null) + { + _dbContext.OcupantesBancas.Remove(bancada.Ocupante); + } + } + else + { + // Si se envía un nombre, se crea o actualiza el ocupante + if (bancada.Ocupante == null) + { + bancada.Ocupante = new OcupanteBanca(); // Crea uno nuevo si no existía + } + bancada.Ocupante.NombreOcupante = dto.NombreOcupante; + bancada.Ocupante.FotoUrl = dto.FotoUrl; + bancada.Ocupante.Periodo = dto.Periodo; + } + + await _dbContext.SaveChangesAsync(); + _logger.LogInformation("Se actualizó la bancada con ID: {BancadaId}", bancadaId); + + return NoContent(); + } +} \ No newline at end of file diff --git a/Elecciones-Web/src/Elecciones.Api/Controllers/AuthController.cs b/Elecciones-Web/src/Elecciones.Api/Controllers/AuthController.cs new file mode 100644 index 0000000..9c9a20d --- /dev/null +++ b/Elecciones-Web/src/Elecciones.Api/Controllers/AuthController.cs @@ -0,0 +1,64 @@ +using Elecciones.Core.Services; +using Elecciones.Database; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using Microsoft.IdentityModel.Tokens; +using System.IdentityModel.Tokens.Jwt; +using System.Security.Claims; +using System.Text; + +namespace Elecciones.Api.Controllers; + +[ApiController] +[Route("api/[controller]")] +public class AuthController : ControllerBase +{ + private readonly EleccionesDbContext _context; + private readonly IPasswordHasher _passwordHasher; + private readonly IConfiguration _configuration; + + public AuthController(EleccionesDbContext context, IPasswordHasher passwordHasher, IConfiguration configuration) + { + _context = context; + _passwordHasher = passwordHasher; + _configuration = configuration; + } + + public record LoginRequest(string Username, string Password); + + [HttpPost("login")] + public async Task Login([FromBody] LoginRequest loginRequest) + { + var user = await _context.AdminUsers + .FirstOrDefaultAsync(u => u.Username == loginRequest.Username); + + if (user == null || !_passwordHasher.VerifyPassword(loginRequest.Password, user.PasswordHash, user.PasswordSalt)) + { + return Unauthorized(new { message = "Credenciales inválidas." }); + } + + var token = GenerateJwtToken(user); + return Ok(new { token }); + } + + private string GenerateJwtToken(Database.Entities.AdminUser user) + { + var securityKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(_configuration["Jwt:Key"]!)); + var credentials = new SigningCredentials(securityKey, SecurityAlgorithms.HmacSha256); + + var claims = new[] + { + new Claim(JwtRegisteredClaimNames.Sub, user.Username), + new Claim(JwtRegisteredClaimNames.Jti, Guid.NewGuid().ToString()) + }; + + var token = new JwtSecurityToken( + issuer: _configuration["Jwt:Issuer"], + audience: _configuration["Jwt:Audience"], + claims: claims, + expires: DateTime.UtcNow.AddHours(8), // El token expira en 8 horas + signingCredentials: credentials); + + return new JwtSecurityTokenHandler().WriteToken(token); + } +} \ No newline at end of file diff --git a/Elecciones-Web/src/Elecciones.Api/Controllers/CatalogosController.cs b/Elecciones-Web/src/Elecciones.Api/Controllers/CatalogosController.cs index ebe951e..2ed8776 100644 --- a/Elecciones-Web/src/Elecciones.Api/Controllers/CatalogosController.cs +++ b/Elecciones-Web/src/Elecciones.Api/Controllers/CatalogosController.cs @@ -2,8 +2,6 @@ using Elecciones.Core.DTOs.ApiResponses; using Elecciones.Database; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; -using System.Linq; -using System.Threading.Tasks; namespace Elecciones.Api.Controllers; diff --git a/Elecciones-Web/src/Elecciones.Api/Controllers/ResultadosController.cs b/Elecciones-Web/src/Elecciones.Api/Controllers/ResultadosController.cs index ecb3254..325e6fa 100644 --- a/Elecciones-Web/src/Elecciones.Api/Controllers/ResultadosController.cs +++ b/Elecciones-Web/src/Elecciones.Api/Controllers/ResultadosController.cs @@ -1,13 +1,9 @@ // src/Elecciones.Api/Controllers/ResultadosController.cs using Elecciones.Core.DTOs.ApiResponses; using Elecciones.Database; +using Elecciones.Database.Entities; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Elecciones.Core.DTOs.Configuration; namespace Elecciones.Api.Controllers; @@ -208,28 +204,23 @@ public class ResultadosController : ControllerBase }); var resultadosGanadores = await _dbContext.ResultadosVotos - .Join( - maxVotosPorAmbito, - voto => new { AmbitoId = voto.AmbitoGeograficoId, Votos = voto.CantidadVotos }, - max => new { AmbitoId = max.AmbitoId, Votos = max.MaxVotos }, - (voto, max) => voto - ) - .Include(rv => rv.AmbitoGeografico) - .Where(rv => rv.AmbitoGeografico.NivelId == 30) // Aseguramos que solo sean los ámbitos de nivel 30 - .Select(rv => new - { - // CORRECCIÓN CLAVE: Devolvemos los campos que el frontend necesita para funcionar. - - // 1. El ID de la BD para hacer clic y pedir detalles. - AmbitoId = rv.AmbitoGeografico.Id, - - // 2. El NOMBRE del departamento/municipio para encontrar y colorear el polígono. - DepartamentoNombre = rv.AmbitoGeografico.Nombre, - - // 3. El ID del partido ganador. - AgrupacionGanadoraId = rv.AgrupacionPoliticaId - }) - .ToListAsync(); + .Join( + maxVotosPorAmbito, + voto => new { AmbitoId = voto.AmbitoGeograficoId, Votos = voto.CantidadVotos }, + max => new { AmbitoId = max.AmbitoId, Votos = max.MaxVotos }, + (voto, max) => voto + ) + .Include(rv => rv.AmbitoGeografico) + .Include(rv => rv.AgrupacionPolitica) + .Where(rv => rv.AmbitoGeografico.NivelId == 30) + .Select(rv => new + { + AmbitoId = rv.AmbitoGeografico.Id, + DepartamentoNombre = rv.AmbitoGeografico.Nombre, + AgrupacionGanadoraId = rv.AgrupacionPoliticaId, + ColorGanador = rv.AgrupacionPolitica.Color + }) + .ToListAsync(); return Ok(resultadosGanadores); } @@ -298,18 +289,239 @@ public class ResultadosController : ControllerBase } [HttpGet("composicion-congreso")] - public IActionResult GetComposicionCongreso() + public async Task GetComposicionCongreso() { - // El framework .NET se encarga de leer appsettings.json y mapearlo a nuestras clases. - var composicionConfig = _configuration.GetSection("ComposicionCongreso") - .Get(); + var config = await _dbContext.Configuraciones + .AsNoTracking() + .ToDictionaryAsync(c => c.Clave, c => c.Valor); - if (composicionConfig == null) + config.TryGetValue("UsarDatosDeBancadasOficiales", out var usarDatosOficialesValue); + bool usarDatosOficiales = usarDatosOficialesValue == "true"; + + if (usarDatosOficiales) { - // Devolvemos un error si la sección no se encuentra en el archivo de configuración. - return NotFound("La configuración para la composición del congreso no fue encontrada."); + return await GetComposicionDesdeBancadasOficiales(config); + } + else + { + return await GetComposicionDesdeProyecciones(config); + } + } + + private async Task GetComposicionDesdeBancadasOficiales(Dictionary config) + { + config.TryGetValue("MostrarOcupantes", out var mostrarOcupantesValue); + bool mostrarOcupantes = mostrarOcupantesValue == "true"; + + // Se declara la variable explícitamente como IQueryable + IQueryable bancadasQuery = _dbContext.Bancadas.AsNoTracking() + .Include(b => b.AgrupacionPolitica); + + if (mostrarOcupantes) + { + // Ahora sí podemos añadir otro .Include() sin problemas de tipo + bancadasQuery = bancadasQuery.Include(b => b.Ocupante); } - return Ok(composicionConfig); + var bancadas = await bancadasQuery.ToListAsync(); + + // --- CAMBIO 2: Eliminar la carga manual de Ocupantes --- + // Ya no necesitamos 'ocupantesLookup'. Se puede borrar todo este bloque: + /* + var ocupantesLookup = new Dictionary(); + if (mostrarOcupantes) + { + ocupantesLookup = (await _dbContext.OcupantesBancas.AsNoTracking() + .ToListAsync()) + .ToDictionary(o => o.BancadaId); + } + */ + + var bancasPorAgrupacion = bancadas + .Where(b => b.AgrupacionPoliticaId != null) + .GroupBy(b => new { b.AgrupacionPoliticaId, b.Camara }) + .Select(g => new + { + Agrupacion = g.First().AgrupacionPolitica, + g.Key.Camara, + BancasTotales = g.Count() + }) + .ToList(); + + var presidenteDiputados = bancasPorAgrupacion + .Where(b => b.Camara == Core.Enums.TipoCamara.Diputados) + .OrderByDescending(b => b.BancasTotales) + .FirstOrDefault()?.Agrupacion; + + config.TryGetValue("PresidenciaSenadores", out var idPartidoPresidenteSenadores); + var presidenteSenadores = await _dbContext.AgrupacionesPoliticas.FindAsync(idPartidoPresidenteSenadores); + + object MapearPartidos(Core.Enums.TipoCamara camara) + { + // 1. Filtramos las bancadas que nos interesan (por cámara y que tengan partido). + var bancadasDeCamara = bancadas + .Where(b => b.Camara == camara && b.AgrupacionPolitica != null); + + // 2. --- ¡EL CAMBIO CLAVE ESTÁ AQUÍ! --- + // Agrupamos por el ID de la Agrupación, no por el objeto. + // Esto garantiza que todas las bancadas del mismo partido terminen en el MISMO grupo. + var partidosDeCamara = bancadasDeCamara + .GroupBy(b => b.AgrupacionPolitica!.Id) + .Select(g => new + { + // La Agrupacion la podemos tomar del primer elemento del grupo, + // ya que todas las bancadas del grupo pertenecen al mismo partido. + Agrupacion = g.First().AgrupacionPolitica!, + // g ahora contiene la lista COMPLETA de bancadas para esta agrupación. + BancasDelPartido = g.ToList() + }); + + // 3. Ordenamos, como antes, pero ahora sobre una lista de grupos correcta. + var partidosOrdenados = (camara == Core.Enums.TipoCamara.Diputados) + ? partidosDeCamara.OrderBy(p => p.Agrupacion.OrdenDiputados ?? 999) + : partidosDeCamara.OrderBy(p => p.Agrupacion.OrdenSenadores ?? 999); + + // 4. Mapeamos al resultado final. + return partidosOrdenados + .ThenByDescending(p => p.BancasDelPartido.Count) + .Select(p => + { + // Ahora 'p.BancasDelPartido' contiene TODAS las bancadas del partido (en tu caso, las 2). + // Cuando hagamos el .Select() aquí, recorrerá ambas y encontrará a los ocupantes. + var ocupantesDelPartido = p.BancasDelPartido + .Select(b => b.Ocupante) + .Where(o => o != null) + .ToList(); + + return new + { + p.Agrupacion.Id, + p.Agrupacion.Nombre, + p.Agrupacion.NombreCorto, + p.Agrupacion.Color, + BancasTotales = p.BancasDelPartido.Count, + // ¡Esta lista ahora debería contener a tus 2 ocupantes! + Ocupantes = mostrarOcupantes ? ocupantesDelPartido : new List() + }; + }).ToList(); + } + + // El resto del método permanece igual... + var diputados = new + { + CamaraNombre = "Cámara de Diputados", + TotalBancas = 92, + BancasEnJuego = 0, + Partidos = MapearPartidos(Core.Enums.TipoCamara.Diputados), + PresidenteBancada = presidenteDiputados != null ? new { presidenteDiputados.Color } : null + }; + + var senadores = new + { + CamaraNombre = "Cámara de Senadores", + TotalBancas = 46, + BancasEnJuego = 0, + Partidos = MapearPartidos(Core.Enums.TipoCamara.Senadores), + PresidenteBancada = presidenteSenadores != null ? new { presidenteSenadores.Color } : null + }; + + return Ok(new { Diputados = diputados, Senadores = senadores }); + } + + private async Task GetComposicionDesdeProyecciones(Dictionary config) + { + var bancasPorAgrupacion = await _dbContext.ProyeccionesBancas + .AsNoTracking() + .GroupBy(p => new { p.AgrupacionPoliticaId, p.CategoriaId }) + .Select(g => new + { + AgrupacionId = g.Key.AgrupacionPoliticaId, + CategoriaId = g.Key.CategoriaId, + BancasTotales = g.Sum(p => p.NroBancas) + }) + .ToListAsync(); + + var todasAgrupaciones = await _dbContext.AgrupacionesPoliticas.AsNoTracking().ToDictionaryAsync(a => a.Id); + + config.TryGetValue("PresidenciaSenadores", out var idPartidoPresidenteSenadores); + todasAgrupaciones.TryGetValue(idPartidoPresidenteSenadores ?? "", out var presidenteSenadores); + + string? idPartidoPresidenteDiputados = bancasPorAgrupacion + .Where(b => b.CategoriaId == 6) + .OrderByDescending(b => b.BancasTotales) + .FirstOrDefault()?.AgrupacionId; + todasAgrupaciones.TryGetValue(idPartidoPresidenteDiputados ?? "", out var presidenteDiputados); + + object MapearPartidos(int categoriaId) + { + var partidosDeCamara = bancasPorAgrupacion + .Where(b => b.CategoriaId == categoriaId && b.BancasTotales > 0) + .Select(b => new { Bancas = b, Agrupacion = todasAgrupaciones[b.AgrupacionId] }); + + if (categoriaId == 6) // Diputados + partidosDeCamara = partidosDeCamara.OrderBy(b => b.Agrupacion.OrdenDiputados ?? 999) + .ThenByDescending(b => b.Bancas.BancasTotales); + else // Senadores + partidosDeCamara = partidosDeCamara.OrderBy(b => b.Agrupacion.OrdenSenadores ?? 999) + .ThenByDescending(b => b.Bancas.BancasTotales); + + return partidosDeCamara + .Select(b => new + { + b.Agrupacion.Id, + b.Agrupacion.Nombre, + b.Agrupacion.NombreCorto, + b.Agrupacion.Color, + b.Bancas.BancasTotales + }) + .ToList(); + } + + var diputados = new + { + CamaraNombre = "Cámara de Diputados", + TotalBancas = 92, + BancasEnJuego = 46, + Partidos = MapearPartidos(6), + PresidenteBancada = presidenteDiputados != null ? new { presidenteDiputados.Color } : null + }; + + var senadores = new + { + CamaraNombre = "Cámara de Senadores", + TotalBancas = 46, + BancasEnJuego = 23, + Partidos = MapearPartidos(5), + PresidenteBancada = presidenteSenadores != null ? new { presidenteSenadores.Color } : null + }; + + return Ok(new { Diputados = diputados, Senadores = senadores }); + } + + [HttpGet("bancadas-detalle")] + public async Task GetBancadasConOcupantes() + { + var config = await _dbContext.Configuraciones.AsNoTracking().ToDictionaryAsync(c => c.Clave, c => c.Valor); + config.TryGetValue("MostrarOcupantes", out var mostrarOcupantesValue); + if (mostrarOcupantesValue != "true") + { + // Si la opción está desactivada, devolvemos un array vacío. + return Ok(new List()); + } + + var bancadasConOcupantes = await _dbContext.Bancadas + .AsNoTracking() + .Include(b => b.Ocupante) + .Where(b => b.Ocupante != null) // Solo las que tienen un ocupante asignado + .Select(b => new + { + b.Id, + b.Camara, + b.AgrupacionPoliticaId, + Ocupante = b.Ocupante + }) + .ToListAsync(); + + return Ok(bancadasConOcupantes); } } \ No newline at end of file diff --git a/Elecciones-Web/src/Elecciones.Api/Controllers/TelegramasController.cs b/Elecciones-Web/src/Elecciones.Api/Controllers/TelegramasController.cs index afe9c91..ac1c00c 100644 --- a/Elecciones-Web/src/Elecciones.Api/Controllers/TelegramasController.cs +++ b/Elecciones-Web/src/Elecciones.Api/Controllers/TelegramasController.cs @@ -1,9 +1,6 @@ -using Elecciones.Core.DTOs.ApiResponses; using Elecciones.Database; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; -using System.Linq; -using System.Threading.Tasks; namespace Elecciones.Api.Controllers; diff --git a/Elecciones-Web/src/Elecciones.Api/Elecciones.Api.csproj b/Elecciones-Web/src/Elecciones.Api/Elecciones.Api.csproj index c72d54f..e091f7b 100644 --- a/Elecciones-Web/src/Elecciones.Api/Elecciones.Api.csproj +++ b/Elecciones-Web/src/Elecciones.Api/Elecciones.Api.csproj @@ -8,6 +8,7 @@ + diff --git a/Elecciones-Web/src/Elecciones.Api/Program.cs b/Elecciones-Web/src/Elecciones.Api/Program.cs index 8fa3961..b4cc494 100644 --- a/Elecciones-Web/src/Elecciones.Api/Program.cs +++ b/Elecciones-Web/src/Elecciones.Api/Program.cs @@ -1,6 +1,13 @@ using Elecciones.Database; using Microsoft.EntityFrameworkCore; using Serilog; +using Elecciones.Core.Services; +using Elecciones.Infrastructure.Services; +using System.Text; +using Microsoft.AspNetCore.Authentication.JwtBearer; +using Microsoft.IdentityModel.Tokens; +using Elecciones.Database.Entities; +using System.Text.Json.Serialization; // Esta es la estructura estándar y recomendada. var builder = WebApplication.CreateBuilder(args); @@ -18,22 +25,44 @@ var connectionString = builder.Configuration.GetConnectionString("DefaultConnect builder.Services.AddDbContext(options => options.UseSqlServer(connectionString)); -builder.Services.AddControllers(); +builder.Services.AddScoped(); -var allowedOrigins = builder.Configuration["AllowedOrigins"]?.Split(',') ?? Array.Empty(); +builder.Services.AddControllers().AddJsonOptions(options => +{ + // Esto le dice al serializador que maneje las referencias circulares + options.JsonSerializerOptions.ReferenceHandler = ReferenceHandler.IgnoreCycles; +}); + +var MyAllowSpecificOrigins = "_myAllowSpecificOrigins"; builder.Services.AddCors(options => { - options.AddDefaultPolicy(policy => - { - if (allowedOrigins.Any()) - { - policy.WithOrigins(allowedOrigins) - .AllowAnyHeader() - .AllowAnyMethod(); - } - }); + options.AddPolicy(name: MyAllowSpecificOrigins, + policy => + { + policy.WithOrigins( + "http://localhost:5173", // Para widgets + "http://localhost:5174" // Para admin + ) + .AllowAnyHeader() + .AllowAnyMethod(); + }); }); +builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) + .AddJwtBearer(options => + { + options.TokenValidationParameters = new TokenValidationParameters + { + ValidateIssuer = true, + ValidateAudience = true, + ValidateLifetime = true, + ValidateIssuerSigningKey = true, + ValidIssuer = builder.Configuration["Jwt:Issuer"], + ValidAudience = builder.Configuration["Jwt:Audience"], + IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(builder.Configuration["Jwt:Key"]!)) + }; + }); + builder.Services.AddEndpointsApiExplorer(); builder.Services.AddSwaggerGen(); @@ -41,7 +70,72 @@ builder.Services.AddSwaggerGen(); // 3. Construir la aplicación. var app = builder.Build(); -// 4. Configurar el pipeline de peticiones HTTP. +// Seeder para el usuario admin +using (var scope = app.Services.CreateScope()) +{ + var services = scope.ServiceProvider; + try + { + var context = services.GetRequiredService(); + var hasher = services.GetRequiredService(); + if (!context.AdminUsers.Any()) + { + var (hash, salt) = hasher.HashPassword("PTP847elec"); + context.AdminUsers.Add(new Elecciones.Database.Entities.AdminUser + { + Username = "admin", + PasswordHash = hash, + PasswordSalt = salt + }); + context.SaveChanges(); + Console.WriteLine("--> Admin user seeded."); + } + } + catch (Exception ex) + { + var logger = services.GetRequiredService>(); + logger.LogError(ex, "An error occurred while seeding the database."); + } +} + +// Seeder para las bancas vacías +using (var scope = app.Services.CreateScope()) +{ + var services = scope.ServiceProvider; + var context = services.GetRequiredService(); + if (!context.Bancadas.Any()) + { + var bancas = new List(); + // 92 bancas de diputados + for (int i = 0; i < 92; i++) + { + bancas.Add(new Bancada { Camara = Elecciones.Core.Enums.TipoCamara.Diputados }); + } + // 46 bancas de senadores + for (int i = 0; i < 46; i++) + { + bancas.Add(new Bancada { Camara = Elecciones.Core.Enums.TipoCamara.Senadores }); + } + context.Bancadas.AddRange(bancas); + context.SaveChanges(); + Console.WriteLine("--> Seeded 138 empty bancas."); + } +} + +// Seeder para las configuraciones por defecto +using (var scope = app.Services.CreateScope()) +{ + var services = scope.ServiceProvider; + var context = services.GetRequiredService(); + if (!context.Configuraciones.Any(c => c.Clave == "MostrarOcupantes")) + { + context.Configuraciones.Add(new Configuracion { Clave = "MostrarOcupantes", Valor = "true" }); + context.SaveChanges(); + Console.WriteLine("--> Seeded default configuration 'MostrarOcupantes'."); + } +} + +// Configurar el pipeline de peticiones HTTP. // Añadimos el logging de peticiones de Serilog aquí. app.UseSerilogRequestLogging(); @@ -51,11 +145,27 @@ if (app.Environment.IsDevelopment()) app.UseSwaggerUI(); } -app.UseHttpsRedirection(); -app.UseCors(); +// 1. Redirección a HTTPS (si se usa) +//app.UseHttpsRedirection(); + +// 2. Middleware de Enrutamiento. ¡CLAVE! +// Determina a qué endpoint irá la petición. +app.UseRouting(); + +// 3. Middleware de CORS. +// Ahora se ejecuta sabiendo a qué endpoint se dirige la petición. +app.UseCors(MyAllowSpecificOrigins); + +// 4. Middleware de Autenticación. +// Identifica quién es el usuario a partir del token. +app.UseAuthentication(); + +// 5. Middleware de Autorización. +// Verifica si el usuario identificado tiene permiso para acceder al endpoint. app.UseAuthorization(); + +// 6. Mapea los controladores a los endpoints que el enrutador descubrió. app.MapControllers(); // 5. Ejecutar la aplicación. -// El try/catch/finally se puede omitir; el logging de Serilog ya se encarga de los errores fatales. app.Run(); \ No newline at end of file diff --git a/Elecciones-Web/src/Elecciones.Api/Security/ApiKeyAuthAttribute.cs b/Elecciones-Web/src/Elecciones.Api/Security/ApiKeyAuthAttribute.cs new file mode 100644 index 0000000..04447cb --- /dev/null +++ b/Elecciones-Web/src/Elecciones.Api/Security/ApiKeyAuthAttribute.cs @@ -0,0 +1,24 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.Filters; + +namespace Elecciones.Api.Security; + +[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)] +public class ApiKeyAuthAttribute : Attribute, IAsyncActionFilter +{ + private const string ApiKeyHeaderName = "X-Api-Key"; + + public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) + { + var configuration = context.HttpContext.RequestServices.GetRequiredService(); + var apiKey = configuration.GetValue("ApiKey"); + + if (!context.HttpContext.Request.Headers.TryGetValue(ApiKeyHeaderName, out var potentialApiKey) || apiKey == null || !apiKey.Equals(potentialApiKey)) + { + context.Result = new UnauthorizedResult(); + return; + } + + await next(); + } +} \ No newline at end of file diff --git a/Elecciones-Web/src/Elecciones.Api/appsettings.Development.json b/Elecciones-Web/src/Elecciones.Api/appsettings.Development.json index e332b0c..d8910ba 100644 --- a/Elecciones-Web/src/Elecciones.Api/appsettings.Development.json +++ b/Elecciones-Web/src/Elecciones.Api/appsettings.Development.json @@ -8,7 +8,6 @@ "Microsoft.AspNetCore": "Warning" } }, - "AllowedOrigins": "http://localhost:5173", "ComposicionCongreso": { "Diputados": { @@ -34,5 +33,11 @@ { "Id": "507_S", "Nombre": "CANDIDATURA 507", "BancasTotales": 5, "BancasEnJuego": 2, "Color": "#9467bd" } ] } + }, + "ApiKey": "badb1a38d221c9e23bcf70958840ca7f5a5dc54f2047dadf7ce45b578b5bc3e2", + "Jwt": { + "Key": "badb1a38d221c9e23bcf70958840ca7f5a5dc54f2047dadf7ce45b578b5bc3e2", + "Issuer": "EleccionesApi", + "Audience": "AdminPanel" } } \ No newline at end of file diff --git a/Elecciones-Web/src/Elecciones.Api/bin/Debug/net9.0/Elecciones.Api.deps.json b/Elecciones-Web/src/Elecciones.Api/bin/Debug/net9.0/Elecciones.Api.deps.json index 81a502b..ada48fa 100644 --- a/Elecciones-Web/src/Elecciones.Api/bin/Debug/net9.0/Elecciones.Api.deps.json +++ b/Elecciones-Web/src/Elecciones.Api/bin/Debug/net9.0/Elecciones.Api.deps.json @@ -10,6 +10,7 @@ "dependencies": { "Elecciones.Database": "1.0.0", "Elecciones.Infrastructure": "1.0.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "9.0.8", "Microsoft.AspNetCore.OpenApi": "9.0.5", "Microsoft.EntityFrameworkCore.SqlServer": "9.0.8", "Microsoft.EntityFrameworkCore.Tools": "9.0.8", @@ -64,6 +65,17 @@ } } }, + "Microsoft.AspNetCore.Authentication.JwtBearer/9.0.8": { + "dependencies": { + "Microsoft.IdentityModel.Protocols.OpenIdConnect": "8.0.1" + }, + "runtime": { + "lib/net9.0/Microsoft.AspNetCore.Authentication.JwtBearer.dll": { + "assemblyVersion": "9.0.8.0", + "fileVersion": "9.0.825.36808" + } + } + }, "Microsoft.AspNetCore.OpenApi/9.0.5": { "dependencies": { "Microsoft.OpenApi": "1.6.23" @@ -371,14 +383,13 @@ } } }, - "Microsoft.CSharp/4.5.0": {}, "Microsoft.Data.SqlClient/5.1.6": { "dependencies": { "Azure.Identity": "1.11.4", "Microsoft.Data.SqlClient.SNI.runtime": "5.1.1", "Microsoft.Identity.Client": "4.61.3", - "Microsoft.IdentityModel.JsonWebTokens": "6.35.0", - "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.35.0", + "Microsoft.IdentityModel.JsonWebTokens": "8.0.1", + "Microsoft.IdentityModel.Protocols.OpenIdConnect": "8.0.1", "Microsoft.SqlServer.Server": "1.0.0", "System.Configuration.ConfigurationManager": "6.0.1", "System.Diagnostics.DiagnosticSource": "6.0.1", @@ -719,7 +730,7 @@ }, "Microsoft.Identity.Client/4.61.3": { "dependencies": { - "Microsoft.IdentityModel.Abstractions": "6.35.0", + "Microsoft.IdentityModel.Abstractions": "8.0.1", "System.Diagnostics.DiagnosticSource": "6.0.1" }, "runtime": { @@ -741,78 +752,70 @@ } } }, - "Microsoft.IdentityModel.Abstractions/6.35.0": { + "Microsoft.IdentityModel.Abstractions/8.0.1": { "runtime": { - "lib/net6.0/Microsoft.IdentityModel.Abstractions.dll": { - "assemblyVersion": "6.35.0.0", - "fileVersion": "6.35.0.41201" + "lib/net9.0/Microsoft.IdentityModel.Abstractions.dll": { + "assemblyVersion": "8.0.1.0", + "fileVersion": "8.0.1.50722" } } }, - "Microsoft.IdentityModel.JsonWebTokens/6.35.0": { + "Microsoft.IdentityModel.JsonWebTokens/8.0.1": { "dependencies": { - "Microsoft.IdentityModel.Tokens": "6.35.0", - "System.Text.Encoding": "4.3.0", - "System.Text.Encodings.Web": "6.0.0", - "System.Text.Json": "9.0.8" + "Microsoft.IdentityModel.Tokens": "8.0.1" }, "runtime": { - "lib/net6.0/Microsoft.IdentityModel.JsonWebTokens.dll": { - "assemblyVersion": "6.35.0.0", - "fileVersion": "6.35.0.41201" + "lib/net9.0/Microsoft.IdentityModel.JsonWebTokens.dll": { + "assemblyVersion": "8.0.1.0", + "fileVersion": "8.0.1.50722" } } }, - "Microsoft.IdentityModel.Logging/6.35.0": { + "Microsoft.IdentityModel.Logging/8.0.1": { "dependencies": { - "Microsoft.IdentityModel.Abstractions": "6.35.0" + "Microsoft.IdentityModel.Abstractions": "8.0.1" }, "runtime": { - "lib/net6.0/Microsoft.IdentityModel.Logging.dll": { - "assemblyVersion": "6.35.0.0", - "fileVersion": "6.35.0.41201" + "lib/net9.0/Microsoft.IdentityModel.Logging.dll": { + "assemblyVersion": "8.0.1.0", + "fileVersion": "8.0.1.50722" } } }, - "Microsoft.IdentityModel.Protocols/6.35.0": { + "Microsoft.IdentityModel.Protocols/8.0.1": { "dependencies": { - "Microsoft.IdentityModel.Logging": "6.35.0", - "Microsoft.IdentityModel.Tokens": "6.35.0" + "Microsoft.IdentityModel.Tokens": "8.0.1" }, "runtime": { - "lib/net6.0/Microsoft.IdentityModel.Protocols.dll": { - "assemblyVersion": "6.35.0.0", - "fileVersion": "6.35.0.41201" + "lib/net9.0/Microsoft.IdentityModel.Protocols.dll": { + "assemblyVersion": "8.0.1.0", + "fileVersion": "8.0.1.50722" } } }, - "Microsoft.IdentityModel.Protocols.OpenIdConnect/6.35.0": { + "Microsoft.IdentityModel.Protocols.OpenIdConnect/8.0.1": { "dependencies": { - "Microsoft.IdentityModel.Protocols": "6.35.0", - "System.IdentityModel.Tokens.Jwt": "6.35.0" + "Microsoft.IdentityModel.Protocols": "8.0.1", + "System.IdentityModel.Tokens.Jwt": "8.0.1" }, "runtime": { - "lib/net6.0/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll": { - "assemblyVersion": "6.35.0.0", - "fileVersion": "6.35.0.41201" + "lib/net9.0/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll": { + "assemblyVersion": "8.0.1.0", + "fileVersion": "8.0.1.50722" } } }, - "Microsoft.IdentityModel.Tokens/6.35.0": { + "Microsoft.IdentityModel.Tokens/8.0.1": { "dependencies": { - "Microsoft.CSharp": "4.5.0", - "Microsoft.IdentityModel.Logging": "6.35.0", - "System.Security.Cryptography.Cng": "5.0.0" + "Microsoft.IdentityModel.Logging": "8.0.1" }, "runtime": { - "lib/net6.0/Microsoft.IdentityModel.Tokens.dll": { - "assemblyVersion": "6.35.0.0", - "fileVersion": "6.35.0.41201" + "lib/net9.0/Microsoft.IdentityModel.Tokens.dll": { + "assemblyVersion": "8.0.1.0", + "fileVersion": "8.0.1.50722" } } }, - "Microsoft.NETCore.Platforms/1.1.0": {}, - "Microsoft.NETCore.Targets/1.1.0": {}, "Microsoft.OpenApi/1.6.23": { "runtime": { "lib/netstandard2.0/Microsoft.OpenApi.dll": { @@ -1134,15 +1137,15 @@ } } }, - "System.IdentityModel.Tokens.Jwt/6.35.0": { + "System.IdentityModel.Tokens.Jwt/8.0.1": { "dependencies": { - "Microsoft.IdentityModel.JsonWebTokens": "6.35.0", - "Microsoft.IdentityModel.Tokens": "6.35.0" + "Microsoft.IdentityModel.JsonWebTokens": "8.0.1", + "Microsoft.IdentityModel.Tokens": "8.0.1" }, "runtime": { - "lib/net6.0/System.IdentityModel.Tokens.Jwt.dll": { - "assemblyVersion": "6.35.0.0", - "fileVersion": "6.35.0.41201" + "lib/net9.0/System.IdentityModel.Tokens.Jwt.dll": { + "assemblyVersion": "8.0.1.0", + "fileVersion": "8.0.1.50722" } } }, @@ -1166,12 +1169,6 @@ "System.Collections.Immutable": "7.0.0" } }, - "System.Runtime/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, "System.Runtime.Caching/6.0.0": { "dependencies": { "System.Configuration.ConfigurationManager": "6.0.1" @@ -1227,13 +1224,6 @@ } }, "System.Security.Principal.Windows/5.0.0": {}, - "System.Text.Encoding/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, "System.Text.Encoding.CodePages/6.0.0": { "dependencies": { "System.Runtime.CompilerServices.Unsafe": "6.0.0" @@ -1291,6 +1281,7 @@ }, "Elecciones.Database/1.0.0": { "dependencies": { + "Elecciones.Core": "1.0.0", "Microsoft.EntityFrameworkCore.SqlServer": "9.0.8" }, "runtime": { @@ -1343,6 +1334,13 @@ "path": "humanizer.core/2.14.1", "hashPath": "humanizer.core.2.14.1.nupkg.sha512" }, + "Microsoft.AspNetCore.Authentication.JwtBearer/9.0.8": { + "type": "package", + "serviceable": true, + "sha512": "sha512-pEuE/xaXHk2Rr2YiTraS7i2MNoTXSnX79VlJcdKx9MczrhDfBO4tHdF4HWOo542WPbjSeZx2PFjmHygo0XnK3Q==", + "path": "microsoft.aspnetcore.authentication.jwtbearer/9.0.8", + "hashPath": "microsoft.aspnetcore.authentication.jwtbearer.9.0.8.nupkg.sha512" + }, "Microsoft.AspNetCore.OpenApi/9.0.5": { "type": "package", "serviceable": true, @@ -1413,13 +1411,6 @@ "path": "microsoft.codeanalysis.workspaces.msbuild/4.8.0", "hashPath": "microsoft.codeanalysis.workspaces.msbuild.4.8.0.nupkg.sha512" }, - "Microsoft.CSharp/4.5.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-kaj6Wb4qoMuH3HySFJhxwQfe8R/sJsNJnANrvv8WdFPMoNbKY5htfNscv+LHCu5ipz+49m2e+WQXpLXr9XYemQ==", - "path": "microsoft.csharp/4.5.0", - "hashPath": "microsoft.csharp.4.5.0.nupkg.sha512" - }, "Microsoft.Data.SqlClient/5.1.6": { "type": "package", "serviceable": true, @@ -1630,61 +1621,47 @@ "path": "microsoft.identity.client.extensions.msal/4.61.3", "hashPath": "microsoft.identity.client.extensions.msal.4.61.3.nupkg.sha512" }, - "Microsoft.IdentityModel.Abstractions/6.35.0": { + "Microsoft.IdentityModel.Abstractions/8.0.1": { "type": "package", "serviceable": true, - "sha512": "sha512-xuR8E4Rd96M41CnUSCiOJ2DBh+z+zQSmyrYHdYhD6K4fXBcQGVnRCFQ0efROUYpP+p0zC1BLKr0JRpVuujTZSg==", - "path": "microsoft.identitymodel.abstractions/6.35.0", - "hashPath": "microsoft.identitymodel.abstractions.6.35.0.nupkg.sha512" + "sha512": "sha512-OtlIWcyX01olfdevPKZdIPfBEvbcioDyBiE/Z2lHsopsMD7twcKtlN9kMevHmI5IIPhFpfwCIiR6qHQz1WHUIw==", + "path": "microsoft.identitymodel.abstractions/8.0.1", + "hashPath": "microsoft.identitymodel.abstractions.8.0.1.nupkg.sha512" }, - "Microsoft.IdentityModel.JsonWebTokens/6.35.0": { + "Microsoft.IdentityModel.JsonWebTokens/8.0.1": { "type": "package", "serviceable": true, - "sha512": "sha512-9wxai3hKgZUb4/NjdRKfQd0QJvtXKDlvmGMYACbEC8DFaicMFCFhQFZq9ZET1kJLwZahf2lfY5Gtcpsx8zYzbg==", - "path": "microsoft.identitymodel.jsonwebtokens/6.35.0", - "hashPath": "microsoft.identitymodel.jsonwebtokens.6.35.0.nupkg.sha512" + "sha512": "sha512-s6++gF9x0rQApQzOBbSyp4jUaAlwm+DroKfL8gdOHxs83k8SJfUXhuc46rDB3rNXBQ1MVRxqKUrqFhO/M0E97g==", + "path": "microsoft.identitymodel.jsonwebtokens/8.0.1", + "hashPath": "microsoft.identitymodel.jsonwebtokens.8.0.1.nupkg.sha512" }, - "Microsoft.IdentityModel.Logging/6.35.0": { + "Microsoft.IdentityModel.Logging/8.0.1": { "type": "package", "serviceable": true, - "sha512": "sha512-jePrSfGAmqT81JDCNSY+fxVWoGuJKt9e6eJ+vT7+quVS55nWl//jGjUQn4eFtVKt4rt5dXaleZdHRB9J9AJZ7Q==", - "path": "microsoft.identitymodel.logging/6.35.0", - "hashPath": "microsoft.identitymodel.logging.6.35.0.nupkg.sha512" + "sha512": "sha512-UCPF2exZqBXe7v/6sGNiM6zCQOUXXQ9+v5VTb9gPB8ZSUPnX53BxlN78v2jsbIvK9Dq4GovQxo23x8JgWvm/Qg==", + "path": "microsoft.identitymodel.logging/8.0.1", + "hashPath": "microsoft.identitymodel.logging.8.0.1.nupkg.sha512" }, - "Microsoft.IdentityModel.Protocols/6.35.0": { + "Microsoft.IdentityModel.Protocols/8.0.1": { "type": "package", "serviceable": true, - "sha512": "sha512-BPQhlDzdFvv1PzaUxNSk+VEPwezlDEVADIKmyxubw7IiELK18uJ06RQ9QKKkds30XI+gDu9n8j24XQ8w7fjWcg==", - "path": "microsoft.identitymodel.protocols/6.35.0", - "hashPath": "microsoft.identitymodel.protocols.6.35.0.nupkg.sha512" + "sha512": "sha512-uA2vpKqU3I2mBBEaeJAWPTjT9v1TZrGWKdgK6G5qJd03CLx83kdiqO9cmiK8/n1erkHzFBwU/RphP83aAe3i3g==", + "path": "microsoft.identitymodel.protocols/8.0.1", + "hashPath": "microsoft.identitymodel.protocols.8.0.1.nupkg.sha512" }, - "Microsoft.IdentityModel.Protocols.OpenIdConnect/6.35.0": { + "Microsoft.IdentityModel.Protocols.OpenIdConnect/8.0.1": { "type": "package", "serviceable": true, - "sha512": "sha512-LMtVqnECCCdSmyFoCOxIE5tXQqkOLrvGrL7OxHg41DIm1bpWtaCdGyVcTAfOQpJXvzND9zUKIN/lhngPkYR8vg==", - "path": "microsoft.identitymodel.protocols.openidconnect/6.35.0", - "hashPath": "microsoft.identitymodel.protocols.openidconnect.6.35.0.nupkg.sha512" + "sha512": "sha512-AQDbfpL+yzuuGhO/mQhKNsp44pm5Jv8/BI4KiFXR7beVGZoSH35zMV3PrmcfvSTsyI6qrcR898NzUauD6SRigg==", + "path": "microsoft.identitymodel.protocols.openidconnect/8.0.1", + "hashPath": "microsoft.identitymodel.protocols.openidconnect.8.0.1.nupkg.sha512" }, - "Microsoft.IdentityModel.Tokens/6.35.0": { + "Microsoft.IdentityModel.Tokens/8.0.1": { "type": "package", "serviceable": true, - "sha512": "sha512-RN7lvp7s3Boucg1NaNAbqDbxtlLj5Qeb+4uSS1TeK5FSBVM40P4DKaTKChT43sHyKfh7V0zkrMph6DdHvyA4bg==", - "path": "microsoft.identitymodel.tokens/6.35.0", - "hashPath": "microsoft.identitymodel.tokens.6.35.0.nupkg.sha512" - }, - "Microsoft.NETCore.Platforms/1.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==", - "path": "microsoft.netcore.platforms/1.1.0", - "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512" - }, - "Microsoft.NETCore.Targets/1.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==", - "path": "microsoft.netcore.targets/1.1.0", - "hashPath": "microsoft.netcore.targets.1.1.0.nupkg.sha512" + "sha512": "sha512-kDimB6Dkd3nkW2oZPDkMkVHfQt3IDqO5gL0oa8WVy3OP4uE8Ij+8TXnqg9TOd9ufjsY3IDiGz7pCUbnfL18tjg==", + "path": "microsoft.identitymodel.tokens/8.0.1", + "hashPath": "microsoft.identitymodel.tokens.8.0.1.nupkg.sha512" }, "Microsoft.OpenApi/1.6.23": { "type": "package", @@ -1896,12 +1873,12 @@ "path": "system.formats.asn1/9.0.8", "hashPath": "system.formats.asn1.9.0.8.nupkg.sha512" }, - "System.IdentityModel.Tokens.Jwt/6.35.0": { + "System.IdentityModel.Tokens.Jwt/8.0.1": { "type": "package", "serviceable": true, - "sha512": "sha512-yxGIQd3BFK7F6S62/7RdZk3C/mfwyVxvh6ngd1VYMBmbJ1YZZA9+Ku6suylVtso0FjI0wbElpJ0d27CdsyLpBQ==", - "path": "system.identitymodel.tokens.jwt/6.35.0", - "hashPath": "system.identitymodel.tokens.jwt.6.35.0.nupkg.sha512" + "sha512": "sha512-GJw3bYkWpOgvN3tJo5X4lYUeIFA2HD293FPUhKmp7qxS+g5ywAb34Dnd3cDAFLkcMohy5XTpoaZ4uAHuw0uSPQ==", + "path": "system.identitymodel.tokens.jwt/8.0.1", + "hashPath": "system.identitymodel.tokens.jwt.8.0.1.nupkg.sha512" }, "System.IO.Pipelines/7.0.0": { "type": "package", @@ -1938,13 +1915,6 @@ "path": "system.reflection.metadata/7.0.0", "hashPath": "system.reflection.metadata.7.0.0.nupkg.sha512" }, - "System.Runtime/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", - "path": "system.runtime/4.3.0", - "hashPath": "system.runtime.4.3.0.nupkg.sha512" - }, "System.Runtime.Caching/6.0.0": { "type": "package", "serviceable": true, @@ -1994,13 +1964,6 @@ "path": "system.security.principal.windows/5.0.0", "hashPath": "system.security.principal.windows.5.0.0.nupkg.sha512" }, - "System.Text.Encoding/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", - "path": "system.text.encoding/4.3.0", - "hashPath": "system.text.encoding.4.3.0.nupkg.sha512" - }, "System.Text.Encoding.CodePages/6.0.0": { "type": "package", "serviceable": true, diff --git a/Elecciones-Web/src/Elecciones.Api/bin/Debug/net9.0/appsettings.Development.json b/Elecciones-Web/src/Elecciones.Api/bin/Debug/net9.0/appsettings.Development.json index e332b0c..d8910ba 100644 --- a/Elecciones-Web/src/Elecciones.Api/bin/Debug/net9.0/appsettings.Development.json +++ b/Elecciones-Web/src/Elecciones.Api/bin/Debug/net9.0/appsettings.Development.json @@ -8,7 +8,6 @@ "Microsoft.AspNetCore": "Warning" } }, - "AllowedOrigins": "http://localhost:5173", "ComposicionCongreso": { "Diputados": { @@ -34,5 +33,11 @@ { "Id": "507_S", "Nombre": "CANDIDATURA 507", "BancasTotales": 5, "BancasEnJuego": 2, "Color": "#9467bd" } ] } + }, + "ApiKey": "badb1a38d221c9e23bcf70958840ca7f5a5dc54f2047dadf7ce45b578b5bc3e2", + "Jwt": { + "Key": "badb1a38d221c9e23bcf70958840ca7f5a5dc54f2047dadf7ce45b578b5bc3e2", + "Issuer": "EleccionesApi", + "Audience": "AdminPanel" } } \ No newline at end of file diff --git a/Elecciones-Web/src/Elecciones.Api/obj/Debug/net9.0/Elecciones.Api.AssemblyInfo.cs b/Elecciones-Web/src/Elecciones.Api/obj/Debug/net9.0/Elecciones.Api.AssemblyInfo.cs index 9c9de2b..e5f523e 100644 --- a/Elecciones-Web/src/Elecciones.Api/obj/Debug/net9.0/Elecciones.Api.AssemblyInfo.cs +++ b/Elecciones-Web/src/Elecciones.Api/obj/Debug/net9.0/Elecciones.Api.AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("Elecciones.Api")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+0d33db9e6dc7807fbb1853c621b81002ea764411")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+55954e18a797dce22f76f00b645832f361d97362")] [assembly: System.Reflection.AssemblyProductAttribute("Elecciones.Api")] [assembly: System.Reflection.AssemblyTitleAttribute("Elecciones.Api")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/Elecciones-Web/src/Elecciones.Api/obj/Debug/net9.0/Elecciones.Api.csproj.FileListAbsolute.txt b/Elecciones-Web/src/Elecciones.Api/obj/Debug/net9.0/Elecciones.Api.csproj.FileListAbsolute.txt index 843caf0..3cfab30 100644 --- a/Elecciones-Web/src/Elecciones.Api/obj/Debug/net9.0/Elecciones.Api.csproj.FileListAbsolute.txt +++ b/Elecciones-Web/src/Elecciones.Api/obj/Debug/net9.0/Elecciones.Api.csproj.FileListAbsolute.txt @@ -9,6 +9,7 @@ E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Elecciones E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Azure.Core.dll E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Azure.Identity.dll E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Humanizer.dll +E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.AspNetCore.Authentication.JwtBearer.dll E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.AspNetCore.OpenApi.dll E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.Bcl.AsyncInterfaces.dll E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.Build.Locator.dll @@ -26,13 +27,19 @@ E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft. E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.EntityFrameworkCore.SqlServer.dll E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.Extensions.Caching.Abstractions.dll E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.Extensions.Caching.Memory.dll +E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.Extensions.Configuration.dll E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.Extensions.Configuration.Abstractions.dll +E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.Extensions.Configuration.Binder.dll E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.Extensions.DependencyInjection.dll E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.Extensions.DependencyModel.dll +E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.Extensions.Diagnostics.dll +E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.Extensions.Diagnostics.Abstractions.dll +E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.Extensions.Http.dll E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.Extensions.Logging.dll E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.Extensions.Logging.Abstractions.dll E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.Extensions.Options.dll +E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.Extensions.Primitives.dll E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.Identity.Client.dll E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.Identity.Client.Extensions.Msal.dll @@ -46,6 +53,15 @@ E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft. E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.SqlServer.Server.dll E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.Win32.SystemEvents.dll E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Mono.TextTemplating.dll +E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Serilog.dll +E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Serilog.AspNetCore.dll +E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Serilog.Extensions.Hosting.dll +E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Serilog.Extensions.Logging.dll +E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Serilog.Formatting.Compact.dll +E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Serilog.Settings.Configuration.dll +E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Serilog.Sinks.Console.dll +E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Serilog.Sinks.Debug.dll +E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Serilog.Sinks.File.dll E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Swashbuckle.AspNetCore.Swagger.dll E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Swashbuckle.AspNetCore.SwaggerGen.dll E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Swashbuckle.AspNetCore.SwaggerUI.dll @@ -65,6 +81,7 @@ E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\System.Run E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\System.Security.Cryptography.ProtectedData.dll E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\System.Security.Permissions.dll E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\System.Text.Json.dll +E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\System.Threading.RateLimiting.dll E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\System.Windows.Extensions.dll E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\cs\Microsoft.CodeAnalysis.resources.dll E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\de\Microsoft.CodeAnalysis.resources.dll @@ -167,19 +184,3 @@ E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\obj\Debug\net9.0\refint\Ele E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\obj\Debug\net9.0\Elecciones.Api.pdb E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\obj\Debug\net9.0\Elecciones.Api.genruntimeconfig.cache E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\obj\Debug\net9.0\ref\Elecciones.Api.dll -E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.Extensions.Configuration.dll -E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.Extensions.Configuration.Binder.dll -E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.Extensions.Diagnostics.dll -E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.Extensions.Diagnostics.Abstractions.dll -E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.Extensions.Http.dll -E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll -E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Serilog.dll -E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Serilog.AspNetCore.dll -E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Serilog.Extensions.Hosting.dll -E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Serilog.Extensions.Logging.dll -E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Serilog.Formatting.Compact.dll -E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Serilog.Settings.Configuration.dll -E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Serilog.Sinks.Console.dll -E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Serilog.Sinks.Debug.dll -E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\Serilog.Sinks.File.dll -E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Api\bin\Debug\net9.0\System.Threading.RateLimiting.dll diff --git a/Elecciones-Web/src/Elecciones.Api/obj/Debug/net9.0/rjsmcshtml.dswa.cache.json b/Elecciones-Web/src/Elecciones.Api/obj/Debug/net9.0/rjsmcshtml.dswa.cache.json index e65d9bd..77f38f2 100644 --- a/Elecciones-Web/src/Elecciones.Api/obj/Debug/net9.0/rjsmcshtml.dswa.cache.json +++ b/Elecciones-Web/src/Elecciones.Api/obj/Debug/net9.0/rjsmcshtml.dswa.cache.json @@ -1 +1 @@ -{"GlobalPropertiesHash":"b5T/+ta4fUd8qpIzUTm3KyEwAYYUsU5ASo+CSFM3ByE=","FingerprintPatternsHash":"8ZRc1sGeVrPBx4lD717BgRaQekyh78QKV9SKsdt638U=","PropertyOverridesHash":"8ZRc1sGeVrPBx4lD717BgRaQekyh78QKV9SKsdt638U=","InputHashes":["FcPFHNuKs9rpM6p2fQ3PQFvYqx5ErYLwhh645T9bWO0=","t631p0kaOa0gMRIcaPzz1ZVPZ1kuq4pq4kYPWQgoPcM=","PA/Beu9jJpOBY5r5Y1CiSyqrARA2j7LHeWYUnEZpQO8=","ywKm3DCyXg4YCbZAIx3JUlT8N4Irff3GswYUVDST\u002BjQ=","6WTvWQ72AaZBYOVSmaxaci9tc1dW5p7IK9Kscjj2cb0=","vAy46VJ9Gp8QqG/Px4J1mj8jL6ws4/A01UKRmMYfYek=","cdgbHR/E4DJsddPc\u002BTpzoUMOVNaFJZm33Pw7AxU9Ees=","4r4JGR4hS5m4rsLfuCSZxzrknTBxKFkLQDXc\u002B2KbqTU=","yVoZ4UnBcSOapsJIi046hnn7ylD3jAcEBUxQ\u002Brkvj/4=","/GfbpJthEWmsuz0uFx1QLHM7gyM1wLLeQgAIl4SzUD4=","i5\u002B5LcfxQD8meRAkQbVf4wMvjxSE4\u002BjCd2/FdPtMpms=","ZJX2c4LV\u002BYIn48VQilINT/Er9ydx\u002BF/pffY0J1mGFn4=","P8JRhYPpULTLMAydvl3Ky\u002B92/tYDIjui0l66En4aXuQ=","HlaBteUK6BYZn6ZcnalIbUis9O08fQFj0pX7AkkgymQ="],"CachedAssets":{},"CachedCopyCandidates":{}} \ No newline at end of file +{"GlobalPropertiesHash":"b5T/+ta4fUd8qpIzUTm3KyEwAYYUsU5ASo+CSFM3ByE=","FingerprintPatternsHash":"8ZRc1sGeVrPBx4lD717BgRaQekyh78QKV9SKsdt638U=","PropertyOverridesHash":"8ZRc1sGeVrPBx4lD717BgRaQekyh78QKV9SKsdt638U=","InputHashes":["BNGxWTPjjFD1Fj56FltRDUvsBzgMlQvuqV\u002BraH2IhwQ=","t631p0kaOa0gMRIcaPzz1ZVPZ1kuq4pq4kYPWQgoPcM=","PA/Beu9jJpOBY5r5Y1CiSyqrARA2j7LHeWYUnEZpQO8=","ywKm3DCyXg4YCbZAIx3JUlT8N4Irff3GswYUVDST\u002BjQ=","6WTvWQ72AaZBYOVSmaxaci9tc1dW5p7IK9Kscjj2cb0=","vAy46VJ9Gp8QqG/Px4J1mj8jL6ws4/A01UKRmMYfYek=","cdgbHR/E4DJsddPc\u002BTpzoUMOVNaFJZm33Pw7AxU9Ees=","4r4JGR4hS5m4rsLfuCSZxzrknTBxKFkLQDXc\u002B2KbqTU=","yVoZ4UnBcSOapsJIi046hnn7ylD3jAcEBUxQ\u002Brkvj/4=","/GfbpJthEWmsuz0uFx1QLHM7gyM1wLLeQgAIl4SzUD4=","i5\u002B5LcfxQD8meRAkQbVf4wMvjxSE4\u002BjCd2/FdPtMpms=","AvSkxVPIg0GjnB1RJ4hDNyo9p9GONrzDs8uVuixH\u002BOE=","IgT9pOgRnK37qfILj2QcjFoBZ180HMt\u002BScgje2iYOo4=","ezUlOMzNZmyKDIe1wwXqvX\u002BvhwfB992xNVts7r2zcTc=","GeIeP3tog3JZwKJCFe6prPm1MG/MSEFptilJTMpLZdk=","P8JRhYPpULTLMAydvl3Ky\u002B92/tYDIjui0l66En4aXuQ=","DfeTw\u002BIdhmMK9IhKuwlSfgckGaIOiGMaYzhCKVkysII="],"CachedAssets":{},"CachedCopyCandidates":{}} \ No newline at end of file diff --git a/Elecciones-Web/src/Elecciones.Api/obj/Debug/net9.0/rjsmrazor.dswa.cache.json b/Elecciones-Web/src/Elecciones.Api/obj/Debug/net9.0/rjsmrazor.dswa.cache.json index d3cef90..6c84d94 100644 --- a/Elecciones-Web/src/Elecciones.Api/obj/Debug/net9.0/rjsmrazor.dswa.cache.json +++ b/Elecciones-Web/src/Elecciones.Api/obj/Debug/net9.0/rjsmrazor.dswa.cache.json @@ -1 +1 @@ -{"GlobalPropertiesHash":"tJTBjV/i0Ihkc6XuOu69wxL8PBac9c9Kak6srMso4pU=","FingerprintPatternsHash":"8ZRc1sGeVrPBx4lD717BgRaQekyh78QKV9SKsdt638U=","PropertyOverridesHash":"8ZRc1sGeVrPBx4lD717BgRaQekyh78QKV9SKsdt638U=","InputHashes":["FcPFHNuKs9rpM6p2fQ3PQFvYqx5ErYLwhh645T9bWO0=","t631p0kaOa0gMRIcaPzz1ZVPZ1kuq4pq4kYPWQgoPcM=","PA/Beu9jJpOBY5r5Y1CiSyqrARA2j7LHeWYUnEZpQO8=","ywKm3DCyXg4YCbZAIx3JUlT8N4Irff3GswYUVDST\u002BjQ=","6WTvWQ72AaZBYOVSmaxaci9tc1dW5p7IK9Kscjj2cb0=","vAy46VJ9Gp8QqG/Px4J1mj8jL6ws4/A01UKRmMYfYek=","cdgbHR/E4DJsddPc\u002BTpzoUMOVNaFJZm33Pw7AxU9Ees=","4r4JGR4hS5m4rsLfuCSZxzrknTBxKFkLQDXc\u002B2KbqTU=","yVoZ4UnBcSOapsJIi046hnn7ylD3jAcEBUxQ\u002Brkvj/4=","/GfbpJthEWmsuz0uFx1QLHM7gyM1wLLeQgAIl4SzUD4=","i5\u002B5LcfxQD8meRAkQbVf4wMvjxSE4\u002BjCd2/FdPtMpms=","ZJX2c4LV\u002BYIn48VQilINT/Er9ydx\u002BF/pffY0J1mGFn4=","P8JRhYPpULTLMAydvl3Ky\u002B92/tYDIjui0l66En4aXuQ=","HlaBteUK6BYZn6ZcnalIbUis9O08fQFj0pX7AkkgymQ="],"CachedAssets":{},"CachedCopyCandidates":{}} \ No newline at end of file +{"GlobalPropertiesHash":"tJTBjV/i0Ihkc6XuOu69wxL8PBac9c9Kak6srMso4pU=","FingerprintPatternsHash":"8ZRc1sGeVrPBx4lD717BgRaQekyh78QKV9SKsdt638U=","PropertyOverridesHash":"8ZRc1sGeVrPBx4lD717BgRaQekyh78QKV9SKsdt638U=","InputHashes":["BNGxWTPjjFD1Fj56FltRDUvsBzgMlQvuqV\u002BraH2IhwQ=","t631p0kaOa0gMRIcaPzz1ZVPZ1kuq4pq4kYPWQgoPcM=","PA/Beu9jJpOBY5r5Y1CiSyqrARA2j7LHeWYUnEZpQO8=","ywKm3DCyXg4YCbZAIx3JUlT8N4Irff3GswYUVDST\u002BjQ=","6WTvWQ72AaZBYOVSmaxaci9tc1dW5p7IK9Kscjj2cb0=","vAy46VJ9Gp8QqG/Px4J1mj8jL6ws4/A01UKRmMYfYek=","cdgbHR/E4DJsddPc\u002BTpzoUMOVNaFJZm33Pw7AxU9Ees=","4r4JGR4hS5m4rsLfuCSZxzrknTBxKFkLQDXc\u002B2KbqTU=","yVoZ4UnBcSOapsJIi046hnn7ylD3jAcEBUxQ\u002Brkvj/4=","/GfbpJthEWmsuz0uFx1QLHM7gyM1wLLeQgAIl4SzUD4=","i5\u002B5LcfxQD8meRAkQbVf4wMvjxSE4\u002BjCd2/FdPtMpms=","AvSkxVPIg0GjnB1RJ4hDNyo9p9GONrzDs8uVuixH\u002BOE=","IgT9pOgRnK37qfILj2QcjFoBZ180HMt\u002BScgje2iYOo4=","ezUlOMzNZmyKDIe1wwXqvX\u002BvhwfB992xNVts7r2zcTc=","GeIeP3tog3JZwKJCFe6prPm1MG/MSEFptilJTMpLZdk=","P8JRhYPpULTLMAydvl3Ky\u002B92/tYDIjui0l66En4aXuQ=","DfeTw\u002BIdhmMK9IhKuwlSfgckGaIOiGMaYzhCKVkysII="],"CachedAssets":{},"CachedCopyCandidates":{}} \ No newline at end of file diff --git a/Elecciones-Web/src/Elecciones.Api/obj/Debug/net9.0/rpswa.dswa.cache.json b/Elecciones-Web/src/Elecciones.Api/obj/Debug/net9.0/rpswa.dswa.cache.json index cc809e1..ec28f6e 100644 --- a/Elecciones-Web/src/Elecciones.Api/obj/Debug/net9.0/rpswa.dswa.cache.json +++ b/Elecciones-Web/src/Elecciones.Api/obj/Debug/net9.0/rpswa.dswa.cache.json @@ -1 +1 @@ -{"GlobalPropertiesHash":"O7YawHw32G/Fh2bs+snZgm9O7okI0WYgTQmXM931znY=","FingerprintPatternsHash":"gq3WsqcKBUGTSNle7RKKyXRIwh7M8ccEqOqYvIzoM04=","PropertyOverridesHash":"8ZRc1sGeVrPBx4lD717BgRaQekyh78QKV9SKsdt638U=","InputHashes":["FcPFHNuKs9rpM6p2fQ3PQFvYqx5ErYLwhh645T9bWO0=","t631p0kaOa0gMRIcaPzz1ZVPZ1kuq4pq4kYPWQgoPcM="],"CachedAssets":{},"CachedCopyCandidates":{}} \ No newline at end of file +{"GlobalPropertiesHash":"O7YawHw32G/Fh2bs+snZgm9O7okI0WYgTQmXM931znY=","FingerprintPatternsHash":"gq3WsqcKBUGTSNle7RKKyXRIwh7M8ccEqOqYvIzoM04=","PropertyOverridesHash":"8ZRc1sGeVrPBx4lD717BgRaQekyh78QKV9SKsdt638U=","InputHashes":["BNGxWTPjjFD1Fj56FltRDUvsBzgMlQvuqV\u002BraH2IhwQ=","t631p0kaOa0gMRIcaPzz1ZVPZ1kuq4pq4kYPWQgoPcM="],"CachedAssets":{},"CachedCopyCandidates":{}} \ No newline at end of file diff --git a/Elecciones-Web/src/Elecciones.Api/obj/Elecciones.Api.csproj.nuget.dgspec.json b/Elecciones-Web/src/Elecciones.Api/obj/Elecciones.Api.csproj.nuget.dgspec.json index 113b095..3c95727 100644 --- a/Elecciones-Web/src/Elecciones.Api/obj/Elecciones.Api.csproj.nuget.dgspec.json +++ b/Elecciones-Web/src/Elecciones.Api/obj/Elecciones.Api.csproj.nuget.dgspec.json @@ -57,6 +57,10 @@ "net9.0": { "targetAlias": "net9.0", "dependencies": { + "Microsoft.AspNetCore.Authentication.JwtBearer": { + "target": "Package", + "version": "[9.0.8, )" + }, "Microsoft.AspNetCore.OpenApi": { "target": "Package", "version": "[9.0.5, )" @@ -199,7 +203,11 @@ "frameworks": { "net9.0": { "targetAlias": "net9.0", - "projectReferences": {} + "projectReferences": { + "E:\\Elecciones-2025\\Elecciones-Web\\src\\Elecciones.Core\\Elecciones.Core.csproj": { + "projectPath": "E:\\Elecciones-2025\\Elecciones-Web\\src\\Elecciones.Core\\Elecciones.Core.csproj" + } + } } }, "warningProperties": { diff --git a/Elecciones-Web/src/Elecciones.Core/DTOs/ApiRequests/ComposicionCalculadaDto.cs b/Elecciones-Web/src/Elecciones.Core/DTOs/ApiRequests/ComposicionCalculadaDto.cs new file mode 100644 index 0000000..e32fbf4 --- /dev/null +++ b/Elecciones-Web/src/Elecciones.Core/DTOs/ApiRequests/ComposicionCalculadaDto.cs @@ -0,0 +1,21 @@ +// src/Elecciones.Core/DTOs/ApiResponses/ComposicionCalculadaDto.cs + +using Elecciones.Core.Enums; + +namespace Elecciones.Core.DTOs.ApiResponses; + +public class ComposicionCalculadaDto +{ + // Propiedades de la Agrupación + public string Id { get; set; } = null!; + public string Nombre { get; set; } = null!; + public string? NombreCorto { get; set; } + public string? Color { get; set; } + public int? OrdenDiputados { get; set; } + public int? OrdenSenadores { get; set; } + + // Propiedades calculadas + public TipoCamara Camara { get; set; } + public int BancasTotales { get; set; } + public int BancasEnJuego { get; set; } +} \ No newline at end of file diff --git a/Elecciones-Web/src/Elecciones.Core/DTOs/ApiRequests/OcupanteBancaDto.cs b/Elecciones-Web/src/Elecciones.Core/DTOs/ApiRequests/OcupanteBancaDto.cs new file mode 100644 index 0000000..cdec51c --- /dev/null +++ b/Elecciones-Web/src/Elecciones.Core/DTOs/ApiRequests/OcupanteBancaDto.cs @@ -0,0 +1,9 @@ +// src/Elecciones.Core/DTOs/ApiRequests/OcupanteBancaDto.cs +namespace Elecciones.Core.DTOs.ApiRequests; + +public class OcupanteBancaDto +{ + public string NombreOcupante { get; set; } = null!; + public string FotoUrl { get; set; } = null!; + public string Periodo { get; set; } = null!; +} \ No newline at end of file diff --git a/Elecciones-Web/src/Elecciones.Core/DTOs/ApiRequests/UpdateAgrupacionDto.cs b/Elecciones-Web/src/Elecciones.Core/DTOs/ApiRequests/UpdateAgrupacionDto.cs new file mode 100644 index 0000000..842e182 --- /dev/null +++ b/Elecciones-Web/src/Elecciones.Core/DTOs/ApiRequests/UpdateAgrupacionDto.cs @@ -0,0 +1,11 @@ +// src/Elecciones.Core/DTOs/ApiRequests/UpdateAgrupacionDto.cs +namespace Elecciones.Core.DTOs.ApiRequests; + +public class UpdateAgrupacionDto +{ + // Usamos strings que aceptan nulos (?) para permitir que el admin + // borre un valor si lo desea (ej. quitar un logo). + public string? NombreCorto { get; set; } + public string? Color { get; set; } + public string? LogoUrl { get; set; } +} \ No newline at end of file diff --git a/Elecciones-Web/src/Elecciones.Core/DTOs/ApiRequests/UpdateBancadaDto.cs b/Elecciones-Web/src/Elecciones.Core/DTOs/ApiRequests/UpdateBancadaDto.cs new file mode 100644 index 0000000..2f67521 --- /dev/null +++ b/Elecciones-Web/src/Elecciones.Core/DTOs/ApiRequests/UpdateBancadaDto.cs @@ -0,0 +1,13 @@ +// src/Elecciones.Core/DTOs/ApiRequests/UpdateBancadaDto.cs +namespace Elecciones.Core.DTOs.ApiRequests; + +public class UpdateBancadaDto +{ + // El ID de la agrupación a la que se asigna la banca (puede ser null para dejarla vacante) + public string? AgrupacionPoliticaId { get; set; } + + // Datos del ocupante (opcionales) + public string? NombreOcupante { get; set; } + public string? FotoUrl { get; set; } + public string? Periodo { get; set; } +} \ No newline at end of file diff --git a/Elecciones-Web/src/Elecciones.Core/Enums/TipoCamara.cs b/Elecciones-Web/src/Elecciones.Core/Enums/TipoCamara.cs new file mode 100644 index 0000000..e5d310f --- /dev/null +++ b/Elecciones-Web/src/Elecciones.Core/Enums/TipoCamara.cs @@ -0,0 +1,4 @@ +// src/Elecciones.Core/Enums/TipoCamara.cs +namespace Elecciones.Core.Enums; + +public enum TipoCamara { Diputados, Senadores } \ No newline at end of file diff --git a/Elecciones-Web/src/Elecciones.Core/Services/IPasswordHasher.cs b/Elecciones-Web/src/Elecciones.Core/Services/IPasswordHasher.cs new file mode 100644 index 0000000..23ebfbb --- /dev/null +++ b/Elecciones-Web/src/Elecciones.Core/Services/IPasswordHasher.cs @@ -0,0 +1,7 @@ +namespace Elecciones.Core.Services; + +public interface IPasswordHasher +{ + (string hash, string salt) HashPassword(string password); + bool VerifyPassword(string password, string storedHash, string storedSalt); +} \ No newline at end of file diff --git a/Elecciones-Web/src/Elecciones.Core/Services/PasswordHasher.cs b/Elecciones-Web/src/Elecciones.Core/Services/PasswordHasher.cs new file mode 100644 index 0000000..2fd8a3f --- /dev/null +++ b/Elecciones-Web/src/Elecciones.Core/Services/PasswordHasher.cs @@ -0,0 +1,40 @@ +// src/Elecciones.Infrastructure/Services/PasswordHasher.cs +using Elecciones.Core.Services; +using System.Security.Cryptography; +using System.Text; + +namespace Elecciones.Infrastructure.Services; + +public class PasswordHasher : IPasswordHasher +{ + private const int SaltSize = 16; // 128 bit + private const int KeySize = 32; // 256 bit + private const int Iterations = 10000; + private static readonly HashAlgorithmName _hashAlgorithm = HashAlgorithmName.SHA256; + + public (string hash, string salt) HashPassword(string password) + { + var salt = RandomNumberGenerator.GetBytes(SaltSize); + var hash = Rfc2898DeriveBytes.Pbkdf2( + Encoding.UTF8.GetBytes(password), + salt, + Iterations, + _hashAlgorithm, + KeySize); + + return (Convert.ToBase64String(hash), Convert.ToBase64String(salt)); + } + + public bool VerifyPassword(string password, string storedHash, string storedSalt) + { + var salt = Convert.FromBase64String(storedSalt); + var hashToCompare = Rfc2898DeriveBytes.Pbkdf2( + Encoding.UTF8.GetBytes(password), + salt, + Iterations, + _hashAlgorithm, + KeySize); + + return CryptographicOperations.FixedTimeEquals(hashToCompare, Convert.FromBase64String(storedHash)); + } +} \ No newline at end of file diff --git a/Elecciones-Web/src/Elecciones.Core/obj/Debug/net9.0/Elecciones.Core.AssemblyInfo.cs b/Elecciones-Web/src/Elecciones.Core/obj/Debug/net9.0/Elecciones.Core.AssemblyInfo.cs index 6352360..24b3bd0 100644 --- a/Elecciones-Web/src/Elecciones.Core/obj/Debug/net9.0/Elecciones.Core.AssemblyInfo.cs +++ b/Elecciones-Web/src/Elecciones.Core/obj/Debug/net9.0/Elecciones.Core.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("Elecciones.Core")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+0d33db9e6dc7807fbb1853c621b81002ea764411")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+55954e18a797dce22f76f00b645832f361d97362")] [assembly: System.Reflection.AssemblyProductAttribute("Elecciones.Core")] [assembly: System.Reflection.AssemblyTitleAttribute("Elecciones.Core")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/Elecciones-Web/src/Elecciones.Database/Elecciones.Database.csproj b/Elecciones-Web/src/Elecciones.Database/Elecciones.Database.csproj index e3bbf76..24ddca8 100644 --- a/Elecciones-Web/src/Elecciones.Database/Elecciones.Database.csproj +++ b/Elecciones-Web/src/Elecciones.Database/Elecciones.Database.csproj @@ -14,4 +14,8 @@ + + + + diff --git a/Elecciones-Web/src/Elecciones.Database/EleccionesDbContext.cs b/Elecciones-Web/src/Elecciones.Database/EleccionesDbContext.cs index 4c13c41..f011b9f 100644 --- a/Elecciones-Web/src/Elecciones.Database/EleccionesDbContext.cs +++ b/Elecciones-Web/src/Elecciones.Database/EleccionesDbContext.cs @@ -15,11 +15,17 @@ public class EleccionesDbContext(DbContextOptions options) public DbSet ResumenesVotos { get; set; } public DbSet EstadosRecuentosGenerales { get; set; } public DbSet CategoriasElectorales { get; set; } + public DbSet AdminUsers { get; set; } + public DbSet Configuraciones { get; set; } + public DbSet Bancadas { get; set; } + public DbSet OcupantesBancas { get; set; } protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); + modelBuilder.UseCollation("Modern_Spanish_CI_AS"); + modelBuilder.Entity() .HasIndex(r => new { r.AmbitoGeograficoId, r.CategoriaId, r.AgrupacionPoliticaId }) .IsUnique(); @@ -43,19 +49,31 @@ public class EleccionesDbContext(DbContextOptions options) .Property(e => e.VotosPorcentaje).HasPrecision(5, 2); modelBuilder.Entity(entity => - { - // Le decimos a EF que la combinación única es (AmbitoGeograficoId, CategoriaId) - entity.HasKey(e => new { e.AmbitoGeograficoId, e.CategoriaId }); + { + // Le decimos a EF que la combinación única es (AmbitoGeograficoId, CategoriaId) + entity.HasKey(e => new { e.AmbitoGeograficoId, e.CategoriaId }); - // Mantener la configuración de precisión - entity.Property(e => e.MesasTotalizadasPorcentaje).HasPrecision(5, 2); - entity.Property(e => e.ParticipacionPorcentaje).HasPrecision(5, 2); - }); + // Mantener la configuración de precisión + entity.Property(e => e.MesasTotalizadasPorcentaje).HasPrecision(5, 2); + entity.Property(e => e.ParticipacionPorcentaje).HasPrecision(5, 2); + }); modelBuilder.Entity(entity => { // La combinación de ámbito, categoría y agrupación debe ser única. entity.HasIndex(p => new { p.AmbitoGeograficoId, p.CategoriaId, p.AgrupacionPoliticaId }) .IsUnique(); }); + modelBuilder.Entity(entity => + { + // Define la relación uno a uno: una Bancada tiene un Ocupante. + entity.HasOne(b => b.Ocupante) + .WithOne(o => o.Bancada) + .HasForeignKey(o => o.BancadaId); + }); + modelBuilder.Entity(entity => + { + // Opcional: puede definir un índice + entity.HasIndex(o => o.BancadaId).IsUnique(); + }); } } \ No newline at end of file diff --git a/Elecciones-Web/src/Elecciones.Database/Entities/AdminUser.cs b/Elecciones-Web/src/Elecciones.Database/Entities/AdminUser.cs new file mode 100644 index 0000000..c61b62e --- /dev/null +++ b/Elecciones-Web/src/Elecciones.Database/Entities/AdminUser.cs @@ -0,0 +1,20 @@ +// src/Elecciones.Database/Entities/AdminUser.cs +using System.ComponentModel.DataAnnotations; + +namespace Elecciones.Database.Entities; + +public class AdminUser +{ + [Key] + public int Id { get; set; } + + [Required] + [MaxLength(100)] + public string Username { get; set; } = null!; + + [Required] + public string PasswordHash { get; set; } = null!; + + [Required] + public string PasswordSalt { get; set; } = null!; +} \ No newline at end of file diff --git a/Elecciones-Web/src/Elecciones.Database/Entities/AgrupacionPolitica.cs b/Elecciones-Web/src/Elecciones.Database/Entities/AgrupacionPolitica.cs index d38d29d..eec34e5 100644 --- a/Elecciones-Web/src/Elecciones.Database/Entities/AgrupacionPolitica.cs +++ b/Elecciones-Web/src/Elecciones.Database/Entities/AgrupacionPolitica.cs @@ -10,4 +10,10 @@ public class AgrupacionPolitica public string IdTelegrama { get; set; } = null!; [Required] public string Nombre { get; set; } = null!; + public string? NombreCorto { get; set; } // Para leyendas y gráficos + public string? Color { get; set; } // Código hexadecimal, ej: "#1f77b4" + public string? LogoUrl { get; set; } // URL a la imagen del logo + // Puede ser nulo si una agrupación no tiene una posición definida. + public int? OrdenDiputados { get; set; } + public int? OrdenSenadores { get; set; } } \ No newline at end of file diff --git a/Elecciones-Web/src/Elecciones.Database/Entities/Bancada.cs b/Elecciones-Web/src/Elecciones.Database/Entities/Bancada.cs new file mode 100644 index 0000000..29743ff --- /dev/null +++ b/Elecciones-Web/src/Elecciones.Database/Entities/Bancada.cs @@ -0,0 +1,23 @@ +// src/Elecciones.Database/Entities/Bancada.cs +using Elecciones.Core.Enums; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Elecciones.Database.Entities; + +public class Bancada +{ + [Key] + public int Id { get; set; } + + [Required] + public TipoCamara Camara { get; set; } + + public string? AgrupacionPoliticaId { get; set; } + + [ForeignKey("AgrupacionPoliticaId")] + public AgrupacionPolitica? AgrupacionPolitica { get; set; } + + // Relación uno a uno con OcupanteBanca + public OcupanteBanca? Ocupante { get; set; } +} \ No newline at end of file diff --git a/Elecciones-Web/src/Elecciones.Database/Entities/Configuracion.cs b/Elecciones-Web/src/Elecciones.Database/Entities/Configuracion.cs new file mode 100644 index 0000000..9673ab7 --- /dev/null +++ b/Elecciones-Web/src/Elecciones.Database/Entities/Configuracion.cs @@ -0,0 +1,15 @@ +// src/Elecciones.Database/Entities/Configuracion.cs +using System.ComponentModel.DataAnnotations; + +namespace Elecciones.Database.Entities; + +public class Configuracion +{ + [Key] // La clave será un string, ej: "PresidenciaDiputados" + [MaxLength(100)] + public string Clave { get; set; } = null!; + + // El valor será el ID de la AgrupacionPolitica + [MaxLength(100)] + public string Valor { get; set; } = null!; +} \ No newline at end of file diff --git a/Elecciones-Web/src/Elecciones.Database/Entities/OcupanteBanca.cs b/Elecciones-Web/src/Elecciones.Database/Entities/OcupanteBanca.cs new file mode 100644 index 0000000..e024997 --- /dev/null +++ b/Elecciones-Web/src/Elecciones.Database/Entities/OcupanteBanca.cs @@ -0,0 +1,24 @@ +// src/Elecciones.Database/Entities/OcupanteBanca.cs +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Elecciones.Database.Entities; + +public class OcupanteBanca +{ + [Key] + public int Id { get; set; } + + // Esta será la clave primaria y foránea para la relación 1-a-1 + public int BancadaId { get; set; } + + [ForeignKey("BancadaId")] + public Bancada Bancada { get; set; } = null!; + + [Required] + public string NombreOcupante { get; set; } = null!; + + public string? FotoUrl { get; set; } + + public string? Periodo { get; set; } +} \ No newline at end of file diff --git a/Elecciones-Web/src/Elecciones.Database/Migrations/20250825184951_AddConfigBancas.Designer.cs b/Elecciones-Web/src/Elecciones.Database/Migrations/20250825184951_AddConfigBancas.Designer.cs new file mode 100644 index 0000000..ed1404f --- /dev/null +++ b/Elecciones-Web/src/Elecciones.Database/Migrations/20250825184951_AddConfigBancas.Designer.cs @@ -0,0 +1,468 @@ +// +using System; +using Elecciones.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Elecciones.Database.Migrations +{ + [DbContext(typeof(EleccionesDbContext))] + [Migration("20250825184951_AddConfigBancas")] + partial class AddConfigBancas + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .UseCollation("Modern_Spanish_CI_AS") + .HasAnnotation("ProductVersion", "9.0.8") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("ComposicionBancada", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AgrupacionPoliticaId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("BancasEnJuego") + .HasColumnType("int"); + + b.Property("BancasTotales") + .HasColumnType("int"); + + b.Property("Camara") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("AgrupacionPoliticaId"); + + b.ToTable("ComposicionBancadas"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.AgrupacionPolitica", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Color") + .HasColumnType("nvarchar(max)"); + + b.Property("IdTelegrama") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("LogoUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("Nombre") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NombreCorto") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("AgrupacionesPoliticas"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.AmbitoGeografico", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CircuitoId") + .HasColumnType("nvarchar(max)"); + + b.Property("DistritoId") + .HasColumnType("nvarchar(max)"); + + b.Property("EstablecimientoId") + .HasColumnType("nvarchar(max)"); + + b.Property("MesaId") + .HasColumnType("nvarchar(max)"); + + b.Property("MunicipioId") + .HasColumnType("nvarchar(max)"); + + b.Property("NivelId") + .HasColumnType("int"); + + b.Property("Nombre") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeccionId") + .HasColumnType("nvarchar(max)"); + + b.Property("SeccionProvincialId") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("AmbitosGeograficos"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.CategoriaElectoral", b => + { + b.Property("Id") + .HasColumnType("int"); + + b.Property("Nombre") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Orden") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("CategoriasElectorales"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.EstadoRecuento", b => + { + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("CategoriaId") + .HasColumnType("int"); + + b.Property("CantidadElectores") + .HasColumnType("int"); + + b.Property("CantidadVotantes") + .HasColumnType("int"); + + b.Property("FechaTotalizacion") + .HasColumnType("datetime2"); + + b.Property("MesasEsperadas") + .HasColumnType("int"); + + b.Property("MesasTotalizadas") + .HasColumnType("int"); + + b.Property("MesasTotalizadasPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.Property("ParticipacionPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.Property("VotosEnBlanco") + .HasColumnType("bigint"); + + b.Property("VotosEnBlancoPorcentaje") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("VotosNulos") + .HasColumnType("bigint"); + + b.Property("VotosNulosPorcentaje") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("VotosRecurridos") + .HasColumnType("bigint"); + + b.Property("VotosRecurridosPorcentaje") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.HasKey("AmbitoGeograficoId", "CategoriaId"); + + b.ToTable("EstadosRecuentos"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.EstadoRecuentoGeneral", b => + { + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("CategoriaId") + .HasColumnType("int"); + + b.Property("CantidadElectores") + .HasColumnType("int"); + + b.Property("CantidadVotantes") + .HasColumnType("int"); + + b.Property("FechaTotalizacion") + .HasColumnType("datetime2"); + + b.Property("MesasEsperadas") + .HasColumnType("int"); + + b.Property("MesasTotalizadas") + .HasColumnType("int"); + + b.Property("MesasTotalizadasPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.Property("ParticipacionPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.HasKey("AmbitoGeograficoId", "CategoriaId"); + + b.HasIndex("CategoriaId"); + + b.ToTable("EstadosRecuentosGenerales"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ProyeccionBanca", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AgrupacionPoliticaId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("CategoriaId") + .HasColumnType("int"); + + b.Property("FechaTotalizacion") + .HasColumnType("datetime2"); + + b.Property("NroBancas") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("AgrupacionPoliticaId"); + + b.HasIndex("AmbitoGeograficoId", "CategoriaId", "AgrupacionPoliticaId") + .IsUnique(); + + b.ToTable("ProyeccionesBancas"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ResultadoVoto", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AgrupacionPoliticaId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("CantidadVotos") + .HasColumnType("bigint"); + + b.Property("CategoriaId") + .HasColumnType("int"); + + b.Property("PorcentajeVotos") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.HasKey("Id"); + + b.HasIndex("AgrupacionPoliticaId"); + + b.HasIndex("AmbitoGeograficoId", "CategoriaId", "AgrupacionPoliticaId") + .IsUnique(); + + b.ToTable("ResultadosVotos"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ResumenVoto", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AgrupacionPoliticaId") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("Votos") + .HasColumnType("bigint"); + + b.Property("VotosPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.HasKey("Id"); + + b.ToTable("ResumenesVotos"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.Telegrama", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("ContenidoBase64") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("FechaEscaneo") + .HasColumnType("datetime2"); + + b.Property("FechaTotalizacion") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("Telegramas"); + }); + + modelBuilder.Entity("OcupanteBanca", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ComposicionBancadaId") + .HasColumnType("int"); + + b.Property("FotoUrl") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NombreOcupante") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Periodo") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ComposicionBancadaId"); + + b.ToTable("OcupantesBancas"); + }); + + modelBuilder.Entity("ComposicionBancada", b => + { + b.HasOne("Elecciones.Database.Entities.AgrupacionPolitica", "AgrupacionPolitica") + .WithMany() + .HasForeignKey("AgrupacionPoliticaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AgrupacionPolitica"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.EstadoRecuento", b => + { + b.HasOne("Elecciones.Database.Entities.AmbitoGeografico", "AmbitoGeografico") + .WithMany() + .HasForeignKey("AmbitoGeograficoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AmbitoGeografico"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.EstadoRecuentoGeneral", b => + { + b.HasOne("Elecciones.Database.Entities.CategoriaElectoral", "CategoriaElectoral") + .WithMany() + .HasForeignKey("CategoriaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CategoriaElectoral"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ProyeccionBanca", b => + { + b.HasOne("Elecciones.Database.Entities.AgrupacionPolitica", "AgrupacionPolitica") + .WithMany() + .HasForeignKey("AgrupacionPoliticaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Elecciones.Database.Entities.AmbitoGeografico", "AmbitoGeografico") + .WithMany() + .HasForeignKey("AmbitoGeograficoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AgrupacionPolitica"); + + b.Navigation("AmbitoGeografico"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ResultadoVoto", b => + { + b.HasOne("Elecciones.Database.Entities.AgrupacionPolitica", "AgrupacionPolitica") + .WithMany() + .HasForeignKey("AgrupacionPoliticaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Elecciones.Database.Entities.AmbitoGeografico", "AmbitoGeografico") + .WithMany() + .HasForeignKey("AmbitoGeograficoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AgrupacionPolitica"); + + b.Navigation("AmbitoGeografico"); + }); + + modelBuilder.Entity("OcupanteBanca", b => + { + b.HasOne("ComposicionBancada", null) + .WithMany() + .HasForeignKey("ComposicionBancadaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Elecciones-Web/src/Elecciones.Database/Migrations/20250825184951_AddConfigBancas.cs b/Elecciones-Web/src/Elecciones.Database/Migrations/20250825184951_AddConfigBancas.cs new file mode 100644 index 0000000..7bfac98 --- /dev/null +++ b/Elecciones-Web/src/Elecciones.Database/Migrations/20250825184951_AddConfigBancas.cs @@ -0,0 +1,114 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Elecciones.Database.Migrations +{ + /// + public partial class AddConfigBancas : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase( + collation: "Modern_Spanish_CI_AS"); + + migrationBuilder.AddColumn( + name: "Color", + table: "AgrupacionesPoliticas", + type: "nvarchar(max)", + nullable: true); + + migrationBuilder.AddColumn( + name: "LogoUrl", + table: "AgrupacionesPoliticas", + type: "nvarchar(max)", + nullable: true); + + migrationBuilder.AddColumn( + name: "NombreCorto", + table: "AgrupacionesPoliticas", + type: "nvarchar(max)", + nullable: true); + + migrationBuilder.CreateTable( + name: "ComposicionBancadas", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + AgrupacionPoliticaId = table.Column(type: "nvarchar(450)", nullable: false), + Camara = table.Column(type: "int", nullable: false), + BancasTotales = table.Column(type: "int", nullable: false), + BancasEnJuego = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ComposicionBancadas", x => x.Id); + table.ForeignKey( + name: "FK_ComposicionBancadas_AgrupacionesPoliticas_AgrupacionPoliticaId", + column: x => x.AgrupacionPoliticaId, + principalTable: "AgrupacionesPoliticas", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "OcupantesBancas", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + ComposicionBancadaId = table.Column(type: "int", nullable: false), + NombreOcupante = table.Column(type: "nvarchar(max)", nullable: false), + FotoUrl = table.Column(type: "nvarchar(max)", nullable: false), + Periodo = table.Column(type: "nvarchar(max)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_OcupantesBancas", x => x.Id); + table.ForeignKey( + name: "FK_OcupantesBancas_ComposicionBancadas_ComposicionBancadaId", + column: x => x.ComposicionBancadaId, + principalTable: "ComposicionBancadas", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_ComposicionBancadas_AgrupacionPoliticaId", + table: "ComposicionBancadas", + column: "AgrupacionPoliticaId"); + + migrationBuilder.CreateIndex( + name: "IX_OcupantesBancas_ComposicionBancadaId", + table: "OcupantesBancas", + column: "ComposicionBancadaId"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "OcupantesBancas"); + + migrationBuilder.DropTable( + name: "ComposicionBancadas"); + + migrationBuilder.DropColumn( + name: "Color", + table: "AgrupacionesPoliticas"); + + migrationBuilder.DropColumn( + name: "LogoUrl", + table: "AgrupacionesPoliticas"); + + migrationBuilder.DropColumn( + name: "NombreCorto", + table: "AgrupacionesPoliticas"); + + migrationBuilder.AlterDatabase( + oldCollation: "Modern_Spanish_CI_AS"); + } + } +} diff --git a/Elecciones-Web/src/Elecciones.Database/Migrations/20250826003245_AddAdminUserTable.Designer.cs b/Elecciones-Web/src/Elecciones.Database/Migrations/20250826003245_AddAdminUserTable.Designer.cs new file mode 100644 index 0000000..e98528b --- /dev/null +++ b/Elecciones-Web/src/Elecciones.Database/Migrations/20250826003245_AddAdminUserTable.Designer.cs @@ -0,0 +1,494 @@ +// +using System; +using Elecciones.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Elecciones.Database.Migrations +{ + [DbContext(typeof(EleccionesDbContext))] + [Migration("20250826003245_AddAdminUserTable")] + partial class AddAdminUserTable + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .UseCollation("Modern_Spanish_CI_AS") + .HasAnnotation("ProductVersion", "9.0.8") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("ComposicionBancada", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AgrupacionPoliticaId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("BancasEnJuego") + .HasColumnType("int"); + + b.Property("BancasTotales") + .HasColumnType("int"); + + b.Property("Camara") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("AgrupacionPoliticaId"); + + b.ToTable("ComposicionBancadas"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.AdminUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("PasswordHash") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PasswordSalt") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Username") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Id"); + + b.ToTable("AdminUsers"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.AgrupacionPolitica", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Color") + .HasColumnType("nvarchar(max)"); + + b.Property("IdTelegrama") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("LogoUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("Nombre") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NombreCorto") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("AgrupacionesPoliticas"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.AmbitoGeografico", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CircuitoId") + .HasColumnType("nvarchar(max)"); + + b.Property("DistritoId") + .HasColumnType("nvarchar(max)"); + + b.Property("EstablecimientoId") + .HasColumnType("nvarchar(max)"); + + b.Property("MesaId") + .HasColumnType("nvarchar(max)"); + + b.Property("MunicipioId") + .HasColumnType("nvarchar(max)"); + + b.Property("NivelId") + .HasColumnType("int"); + + b.Property("Nombre") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeccionId") + .HasColumnType("nvarchar(max)"); + + b.Property("SeccionProvincialId") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("AmbitosGeograficos"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.CategoriaElectoral", b => + { + b.Property("Id") + .HasColumnType("int"); + + b.Property("Nombre") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Orden") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("CategoriasElectorales"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.EstadoRecuento", b => + { + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("CategoriaId") + .HasColumnType("int"); + + b.Property("CantidadElectores") + .HasColumnType("int"); + + b.Property("CantidadVotantes") + .HasColumnType("int"); + + b.Property("FechaTotalizacion") + .HasColumnType("datetime2"); + + b.Property("MesasEsperadas") + .HasColumnType("int"); + + b.Property("MesasTotalizadas") + .HasColumnType("int"); + + b.Property("MesasTotalizadasPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.Property("ParticipacionPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.Property("VotosEnBlanco") + .HasColumnType("bigint"); + + b.Property("VotosEnBlancoPorcentaje") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("VotosNulos") + .HasColumnType("bigint"); + + b.Property("VotosNulosPorcentaje") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("VotosRecurridos") + .HasColumnType("bigint"); + + b.Property("VotosRecurridosPorcentaje") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.HasKey("AmbitoGeograficoId", "CategoriaId"); + + b.ToTable("EstadosRecuentos"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.EstadoRecuentoGeneral", b => + { + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("CategoriaId") + .HasColumnType("int"); + + b.Property("CantidadElectores") + .HasColumnType("int"); + + b.Property("CantidadVotantes") + .HasColumnType("int"); + + b.Property("FechaTotalizacion") + .HasColumnType("datetime2"); + + b.Property("MesasEsperadas") + .HasColumnType("int"); + + b.Property("MesasTotalizadas") + .HasColumnType("int"); + + b.Property("MesasTotalizadasPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.Property("ParticipacionPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.HasKey("AmbitoGeograficoId", "CategoriaId"); + + b.HasIndex("CategoriaId"); + + b.ToTable("EstadosRecuentosGenerales"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ProyeccionBanca", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AgrupacionPoliticaId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("CategoriaId") + .HasColumnType("int"); + + b.Property("FechaTotalizacion") + .HasColumnType("datetime2"); + + b.Property("NroBancas") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("AgrupacionPoliticaId"); + + b.HasIndex("AmbitoGeograficoId", "CategoriaId", "AgrupacionPoliticaId") + .IsUnique(); + + b.ToTable("ProyeccionesBancas"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ResultadoVoto", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AgrupacionPoliticaId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("CantidadVotos") + .HasColumnType("bigint"); + + b.Property("CategoriaId") + .HasColumnType("int"); + + b.Property("PorcentajeVotos") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.HasKey("Id"); + + b.HasIndex("AgrupacionPoliticaId"); + + b.HasIndex("AmbitoGeograficoId", "CategoriaId", "AgrupacionPoliticaId") + .IsUnique(); + + b.ToTable("ResultadosVotos"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ResumenVoto", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AgrupacionPoliticaId") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("Votos") + .HasColumnType("bigint"); + + b.Property("VotosPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.HasKey("Id"); + + b.ToTable("ResumenesVotos"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.Telegrama", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("ContenidoBase64") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("FechaEscaneo") + .HasColumnType("datetime2"); + + b.Property("FechaTotalizacion") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("Telegramas"); + }); + + modelBuilder.Entity("OcupanteBanca", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ComposicionBancadaId") + .HasColumnType("int"); + + b.Property("FotoUrl") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NombreOcupante") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Periodo") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ComposicionBancadaId"); + + b.ToTable("OcupantesBancas"); + }); + + modelBuilder.Entity("ComposicionBancada", b => + { + b.HasOne("Elecciones.Database.Entities.AgrupacionPolitica", "AgrupacionPolitica") + .WithMany() + .HasForeignKey("AgrupacionPoliticaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AgrupacionPolitica"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.EstadoRecuento", b => + { + b.HasOne("Elecciones.Database.Entities.AmbitoGeografico", "AmbitoGeografico") + .WithMany() + .HasForeignKey("AmbitoGeograficoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AmbitoGeografico"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.EstadoRecuentoGeneral", b => + { + b.HasOne("Elecciones.Database.Entities.CategoriaElectoral", "CategoriaElectoral") + .WithMany() + .HasForeignKey("CategoriaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CategoriaElectoral"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ProyeccionBanca", b => + { + b.HasOne("Elecciones.Database.Entities.AgrupacionPolitica", "AgrupacionPolitica") + .WithMany() + .HasForeignKey("AgrupacionPoliticaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Elecciones.Database.Entities.AmbitoGeografico", "AmbitoGeografico") + .WithMany() + .HasForeignKey("AmbitoGeograficoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AgrupacionPolitica"); + + b.Navigation("AmbitoGeografico"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ResultadoVoto", b => + { + b.HasOne("Elecciones.Database.Entities.AgrupacionPolitica", "AgrupacionPolitica") + .WithMany() + .HasForeignKey("AgrupacionPoliticaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Elecciones.Database.Entities.AmbitoGeografico", "AmbitoGeografico") + .WithMany() + .HasForeignKey("AmbitoGeograficoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AgrupacionPolitica"); + + b.Navigation("AmbitoGeografico"); + }); + + modelBuilder.Entity("OcupanteBanca", b => + { + b.HasOne("ComposicionBancada", null) + .WithMany() + .HasForeignKey("ComposicionBancadaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Elecciones-Web/src/Elecciones.Database/Migrations/20250826003245_AddAdminUserTable.cs b/Elecciones-Web/src/Elecciones.Database/Migrations/20250826003245_AddAdminUserTable.cs new file mode 100644 index 0000000..664bd4a --- /dev/null +++ b/Elecciones-Web/src/Elecciones.Database/Migrations/20250826003245_AddAdminUserTable.cs @@ -0,0 +1,36 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Elecciones.Database.Migrations +{ + /// + public partial class AddAdminUserTable : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AdminUsers", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + Username = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + PasswordHash = table.Column(type: "nvarchar(max)", nullable: false), + PasswordSalt = table.Column(type: "nvarchar(max)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AdminUsers", x => x.Id); + }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AdminUsers"); + } + } +} diff --git a/Elecciones-Web/src/Elecciones.Database/Migrations/20250826023006_AddOrdenIdeologicoToAgrupaciones.Designer.cs b/Elecciones-Web/src/Elecciones.Database/Migrations/20250826023006_AddOrdenIdeologicoToAgrupaciones.Designer.cs new file mode 100644 index 0000000..8e446c0 --- /dev/null +++ b/Elecciones-Web/src/Elecciones.Database/Migrations/20250826023006_AddOrdenIdeologicoToAgrupaciones.Designer.cs @@ -0,0 +1,497 @@ +// +using System; +using Elecciones.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Elecciones.Database.Migrations +{ + [DbContext(typeof(EleccionesDbContext))] + [Migration("20250826023006_AddOrdenIdeologicoToAgrupaciones")] + partial class AddOrdenIdeologicoToAgrupaciones + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .UseCollation("Modern_Spanish_CI_AS") + .HasAnnotation("ProductVersion", "9.0.8") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("ComposicionBancada", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AgrupacionPoliticaId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("BancasEnJuego") + .HasColumnType("int"); + + b.Property("BancasTotales") + .HasColumnType("int"); + + b.Property("Camara") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("AgrupacionPoliticaId"); + + b.ToTable("ComposicionBancadas"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.AdminUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("PasswordHash") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PasswordSalt") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Username") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Id"); + + b.ToTable("AdminUsers"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.AgrupacionPolitica", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Color") + .HasColumnType("nvarchar(max)"); + + b.Property("IdTelegrama") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("LogoUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("Nombre") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NombreCorto") + .HasColumnType("nvarchar(max)"); + + b.Property("OrdenIdeologico") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AgrupacionesPoliticas"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.AmbitoGeografico", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CircuitoId") + .HasColumnType("nvarchar(max)"); + + b.Property("DistritoId") + .HasColumnType("nvarchar(max)"); + + b.Property("EstablecimientoId") + .HasColumnType("nvarchar(max)"); + + b.Property("MesaId") + .HasColumnType("nvarchar(max)"); + + b.Property("MunicipioId") + .HasColumnType("nvarchar(max)"); + + b.Property("NivelId") + .HasColumnType("int"); + + b.Property("Nombre") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeccionId") + .HasColumnType("nvarchar(max)"); + + b.Property("SeccionProvincialId") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("AmbitosGeograficos"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.CategoriaElectoral", b => + { + b.Property("Id") + .HasColumnType("int"); + + b.Property("Nombre") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Orden") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("CategoriasElectorales"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.EstadoRecuento", b => + { + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("CategoriaId") + .HasColumnType("int"); + + b.Property("CantidadElectores") + .HasColumnType("int"); + + b.Property("CantidadVotantes") + .HasColumnType("int"); + + b.Property("FechaTotalizacion") + .HasColumnType("datetime2"); + + b.Property("MesasEsperadas") + .HasColumnType("int"); + + b.Property("MesasTotalizadas") + .HasColumnType("int"); + + b.Property("MesasTotalizadasPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.Property("ParticipacionPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.Property("VotosEnBlanco") + .HasColumnType("bigint"); + + b.Property("VotosEnBlancoPorcentaje") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("VotosNulos") + .HasColumnType("bigint"); + + b.Property("VotosNulosPorcentaje") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("VotosRecurridos") + .HasColumnType("bigint"); + + b.Property("VotosRecurridosPorcentaje") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.HasKey("AmbitoGeograficoId", "CategoriaId"); + + b.ToTable("EstadosRecuentos"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.EstadoRecuentoGeneral", b => + { + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("CategoriaId") + .HasColumnType("int"); + + b.Property("CantidadElectores") + .HasColumnType("int"); + + b.Property("CantidadVotantes") + .HasColumnType("int"); + + b.Property("FechaTotalizacion") + .HasColumnType("datetime2"); + + b.Property("MesasEsperadas") + .HasColumnType("int"); + + b.Property("MesasTotalizadas") + .HasColumnType("int"); + + b.Property("MesasTotalizadasPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.Property("ParticipacionPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.HasKey("AmbitoGeograficoId", "CategoriaId"); + + b.HasIndex("CategoriaId"); + + b.ToTable("EstadosRecuentosGenerales"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ProyeccionBanca", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AgrupacionPoliticaId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("CategoriaId") + .HasColumnType("int"); + + b.Property("FechaTotalizacion") + .HasColumnType("datetime2"); + + b.Property("NroBancas") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("AgrupacionPoliticaId"); + + b.HasIndex("AmbitoGeograficoId", "CategoriaId", "AgrupacionPoliticaId") + .IsUnique(); + + b.ToTable("ProyeccionesBancas"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ResultadoVoto", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AgrupacionPoliticaId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("CantidadVotos") + .HasColumnType("bigint"); + + b.Property("CategoriaId") + .HasColumnType("int"); + + b.Property("PorcentajeVotos") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.HasKey("Id"); + + b.HasIndex("AgrupacionPoliticaId"); + + b.HasIndex("AmbitoGeograficoId", "CategoriaId", "AgrupacionPoliticaId") + .IsUnique(); + + b.ToTable("ResultadosVotos"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ResumenVoto", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AgrupacionPoliticaId") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("Votos") + .HasColumnType("bigint"); + + b.Property("VotosPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.HasKey("Id"); + + b.ToTable("ResumenesVotos"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.Telegrama", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("ContenidoBase64") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("FechaEscaneo") + .HasColumnType("datetime2"); + + b.Property("FechaTotalizacion") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("Telegramas"); + }); + + modelBuilder.Entity("OcupanteBanca", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ComposicionBancadaId") + .HasColumnType("int"); + + b.Property("FotoUrl") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NombreOcupante") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Periodo") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ComposicionBancadaId"); + + b.ToTable("OcupantesBancas"); + }); + + modelBuilder.Entity("ComposicionBancada", b => + { + b.HasOne("Elecciones.Database.Entities.AgrupacionPolitica", "AgrupacionPolitica") + .WithMany() + .HasForeignKey("AgrupacionPoliticaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AgrupacionPolitica"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.EstadoRecuento", b => + { + b.HasOne("Elecciones.Database.Entities.AmbitoGeografico", "AmbitoGeografico") + .WithMany() + .HasForeignKey("AmbitoGeograficoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AmbitoGeografico"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.EstadoRecuentoGeneral", b => + { + b.HasOne("Elecciones.Database.Entities.CategoriaElectoral", "CategoriaElectoral") + .WithMany() + .HasForeignKey("CategoriaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CategoriaElectoral"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ProyeccionBanca", b => + { + b.HasOne("Elecciones.Database.Entities.AgrupacionPolitica", "AgrupacionPolitica") + .WithMany() + .HasForeignKey("AgrupacionPoliticaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Elecciones.Database.Entities.AmbitoGeografico", "AmbitoGeografico") + .WithMany() + .HasForeignKey("AmbitoGeograficoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AgrupacionPolitica"); + + b.Navigation("AmbitoGeografico"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ResultadoVoto", b => + { + b.HasOne("Elecciones.Database.Entities.AgrupacionPolitica", "AgrupacionPolitica") + .WithMany() + .HasForeignKey("AgrupacionPoliticaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Elecciones.Database.Entities.AmbitoGeografico", "AmbitoGeografico") + .WithMany() + .HasForeignKey("AmbitoGeograficoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AgrupacionPolitica"); + + b.Navigation("AmbitoGeografico"); + }); + + modelBuilder.Entity("OcupanteBanca", b => + { + b.HasOne("ComposicionBancada", null) + .WithMany() + .HasForeignKey("ComposicionBancadaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Elecciones-Web/src/Elecciones.Database/Migrations/20250826023006_AddOrdenIdeologicoToAgrupaciones.cs b/Elecciones-Web/src/Elecciones.Database/Migrations/20250826023006_AddOrdenIdeologicoToAgrupaciones.cs new file mode 100644 index 0000000..9427033 --- /dev/null +++ b/Elecciones-Web/src/Elecciones.Database/Migrations/20250826023006_AddOrdenIdeologicoToAgrupaciones.cs @@ -0,0 +1,28 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Elecciones.Database.Migrations +{ + /// + public partial class AddOrdenIdeologicoToAgrupaciones : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "OrdenIdeologico", + table: "AgrupacionesPoliticas", + type: "int", + nullable: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "OrdenIdeologico", + table: "AgrupacionesPoliticas"); + } + } +} diff --git a/Elecciones-Web/src/Elecciones.Database/Migrations/20250826155219_AddOrdenPorCamaraToAgrupaciones.Designer.cs b/Elecciones-Web/src/Elecciones.Database/Migrations/20250826155219_AddOrdenPorCamaraToAgrupaciones.Designer.cs new file mode 100644 index 0000000..aefa90d --- /dev/null +++ b/Elecciones-Web/src/Elecciones.Database/Migrations/20250826155219_AddOrdenPorCamaraToAgrupaciones.Designer.cs @@ -0,0 +1,500 @@ +// +using System; +using Elecciones.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Elecciones.Database.Migrations +{ + [DbContext(typeof(EleccionesDbContext))] + [Migration("20250826155219_AddOrdenPorCamaraToAgrupaciones")] + partial class AddOrdenPorCamaraToAgrupaciones + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .UseCollation("Modern_Spanish_CI_AS") + .HasAnnotation("ProductVersion", "9.0.8") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Elecciones.Database.Entities.AdminUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("PasswordHash") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PasswordSalt") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Username") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Id"); + + b.ToTable("AdminUsers"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.AgrupacionPolitica", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Color") + .HasColumnType("nvarchar(max)"); + + b.Property("IdTelegrama") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("LogoUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("Nombre") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NombreCorto") + .HasColumnType("nvarchar(max)"); + + b.Property("OrdenDiputados") + .HasColumnType("int"); + + b.Property("OrdenSenadores") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AgrupacionesPoliticas"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.AmbitoGeografico", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CircuitoId") + .HasColumnType("nvarchar(max)"); + + b.Property("DistritoId") + .HasColumnType("nvarchar(max)"); + + b.Property("EstablecimientoId") + .HasColumnType("nvarchar(max)"); + + b.Property("MesaId") + .HasColumnType("nvarchar(max)"); + + b.Property("MunicipioId") + .HasColumnType("nvarchar(max)"); + + b.Property("NivelId") + .HasColumnType("int"); + + b.Property("Nombre") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeccionId") + .HasColumnType("nvarchar(max)"); + + b.Property("SeccionProvincialId") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("AmbitosGeograficos"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.CategoriaElectoral", b => + { + b.Property("Id") + .HasColumnType("int"); + + b.Property("Nombre") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Orden") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("CategoriasElectorales"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ComposicionBancada", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AgrupacionPoliticaId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("BancasEnJuego") + .HasColumnType("int"); + + b.Property("BancasTotales") + .HasColumnType("int"); + + b.Property("Camara") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("AgrupacionPoliticaId"); + + b.ToTable("ComposicionBancadas"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.EstadoRecuento", b => + { + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("CategoriaId") + .HasColumnType("int"); + + b.Property("CantidadElectores") + .HasColumnType("int"); + + b.Property("CantidadVotantes") + .HasColumnType("int"); + + b.Property("FechaTotalizacion") + .HasColumnType("datetime2"); + + b.Property("MesasEsperadas") + .HasColumnType("int"); + + b.Property("MesasTotalizadas") + .HasColumnType("int"); + + b.Property("MesasTotalizadasPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.Property("ParticipacionPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.Property("VotosEnBlanco") + .HasColumnType("bigint"); + + b.Property("VotosEnBlancoPorcentaje") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("VotosNulos") + .HasColumnType("bigint"); + + b.Property("VotosNulosPorcentaje") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("VotosRecurridos") + .HasColumnType("bigint"); + + b.Property("VotosRecurridosPorcentaje") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.HasKey("AmbitoGeograficoId", "CategoriaId"); + + b.ToTable("EstadosRecuentos"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.EstadoRecuentoGeneral", b => + { + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("CategoriaId") + .HasColumnType("int"); + + b.Property("CantidadElectores") + .HasColumnType("int"); + + b.Property("CantidadVotantes") + .HasColumnType("int"); + + b.Property("FechaTotalizacion") + .HasColumnType("datetime2"); + + b.Property("MesasEsperadas") + .HasColumnType("int"); + + b.Property("MesasTotalizadas") + .HasColumnType("int"); + + b.Property("MesasTotalizadasPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.Property("ParticipacionPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.HasKey("AmbitoGeograficoId", "CategoriaId"); + + b.HasIndex("CategoriaId"); + + b.ToTable("EstadosRecuentosGenerales"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ProyeccionBanca", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AgrupacionPoliticaId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("CategoriaId") + .HasColumnType("int"); + + b.Property("FechaTotalizacion") + .HasColumnType("datetime2"); + + b.Property("NroBancas") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("AgrupacionPoliticaId"); + + b.HasIndex("AmbitoGeograficoId", "CategoriaId", "AgrupacionPoliticaId") + .IsUnique(); + + b.ToTable("ProyeccionesBancas"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ResultadoVoto", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AgrupacionPoliticaId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("CantidadVotos") + .HasColumnType("bigint"); + + b.Property("CategoriaId") + .HasColumnType("int"); + + b.Property("PorcentajeVotos") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.HasKey("Id"); + + b.HasIndex("AgrupacionPoliticaId"); + + b.HasIndex("AmbitoGeograficoId", "CategoriaId", "AgrupacionPoliticaId") + .IsUnique(); + + b.ToTable("ResultadosVotos"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ResumenVoto", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AgrupacionPoliticaId") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("Votos") + .HasColumnType("bigint"); + + b.Property("VotosPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.HasKey("Id"); + + b.ToTable("ResumenesVotos"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.Telegrama", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("ContenidoBase64") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("FechaEscaneo") + .HasColumnType("datetime2"); + + b.Property("FechaTotalizacion") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("Telegramas"); + }); + + modelBuilder.Entity("OcupanteBanca", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ComposicionBancadaId") + .HasColumnType("int"); + + b.Property("FotoUrl") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NombreOcupante") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Periodo") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ComposicionBancadaId"); + + b.ToTable("OcupantesBancas"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ComposicionBancada", b => + { + b.HasOne("Elecciones.Database.Entities.AgrupacionPolitica", "AgrupacionPolitica") + .WithMany() + .HasForeignKey("AgrupacionPoliticaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AgrupacionPolitica"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.EstadoRecuento", b => + { + b.HasOne("Elecciones.Database.Entities.AmbitoGeografico", "AmbitoGeografico") + .WithMany() + .HasForeignKey("AmbitoGeograficoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AmbitoGeografico"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.EstadoRecuentoGeneral", b => + { + b.HasOne("Elecciones.Database.Entities.CategoriaElectoral", "CategoriaElectoral") + .WithMany() + .HasForeignKey("CategoriaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CategoriaElectoral"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ProyeccionBanca", b => + { + b.HasOne("Elecciones.Database.Entities.AgrupacionPolitica", "AgrupacionPolitica") + .WithMany() + .HasForeignKey("AgrupacionPoliticaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Elecciones.Database.Entities.AmbitoGeografico", "AmbitoGeografico") + .WithMany() + .HasForeignKey("AmbitoGeograficoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AgrupacionPolitica"); + + b.Navigation("AmbitoGeografico"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ResultadoVoto", b => + { + b.HasOne("Elecciones.Database.Entities.AgrupacionPolitica", "AgrupacionPolitica") + .WithMany() + .HasForeignKey("AgrupacionPoliticaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Elecciones.Database.Entities.AmbitoGeografico", "AmbitoGeografico") + .WithMany() + .HasForeignKey("AmbitoGeograficoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AgrupacionPolitica"); + + b.Navigation("AmbitoGeografico"); + }); + + modelBuilder.Entity("OcupanteBanca", b => + { + b.HasOne("Elecciones.Database.Entities.ComposicionBancada", null) + .WithMany() + .HasForeignKey("ComposicionBancadaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Elecciones-Web/src/Elecciones.Database/Migrations/20250826155219_AddOrdenPorCamaraToAgrupaciones.cs b/Elecciones-Web/src/Elecciones.Database/Migrations/20250826155219_AddOrdenPorCamaraToAgrupaciones.cs new file mode 100644 index 0000000..d3daa88 --- /dev/null +++ b/Elecciones-Web/src/Elecciones.Database/Migrations/20250826155219_AddOrdenPorCamaraToAgrupaciones.cs @@ -0,0 +1,38 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Elecciones.Database.Migrations +{ + /// + public partial class AddOrdenPorCamaraToAgrupaciones : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "OrdenIdeologico", + table: "AgrupacionesPoliticas", + newName: "OrdenSenadores"); + + migrationBuilder.AddColumn( + name: "OrdenDiputados", + table: "AgrupacionesPoliticas", + type: "int", + nullable: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "OrdenDiputados", + table: "AgrupacionesPoliticas"); + + migrationBuilder.RenameColumn( + name: "OrdenSenadores", + table: "AgrupacionesPoliticas", + newName: "OrdenIdeologico"); + } + } +} diff --git a/Elecciones-Web/src/Elecciones.Database/Migrations/20250827152442_AddConfiguracionTable.Designer.cs b/Elecciones-Web/src/Elecciones.Database/Migrations/20250827152442_AddConfiguracionTable.Designer.cs new file mode 100644 index 0000000..5ab545d --- /dev/null +++ b/Elecciones-Web/src/Elecciones.Database/Migrations/20250827152442_AddConfiguracionTable.Designer.cs @@ -0,0 +1,516 @@ +// +using System; +using Elecciones.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Elecciones.Database.Migrations +{ + [DbContext(typeof(EleccionesDbContext))] + [Migration("20250827152442_AddConfiguracionTable")] + partial class AddConfiguracionTable + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .UseCollation("Modern_Spanish_CI_AS") + .HasAnnotation("ProductVersion", "9.0.8") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Elecciones.Database.Entities.AdminUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("PasswordHash") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PasswordSalt") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Username") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Id"); + + b.ToTable("AdminUsers"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.AgrupacionPolitica", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Color") + .HasColumnType("nvarchar(max)"); + + b.Property("IdTelegrama") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("LogoUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("Nombre") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NombreCorto") + .HasColumnType("nvarchar(max)"); + + b.Property("OrdenDiputados") + .HasColumnType("int"); + + b.Property("OrdenSenadores") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AgrupacionesPoliticas"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.AmbitoGeografico", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CircuitoId") + .HasColumnType("nvarchar(max)"); + + b.Property("DistritoId") + .HasColumnType("nvarchar(max)"); + + b.Property("EstablecimientoId") + .HasColumnType("nvarchar(max)"); + + b.Property("MesaId") + .HasColumnType("nvarchar(max)"); + + b.Property("MunicipioId") + .HasColumnType("nvarchar(max)"); + + b.Property("NivelId") + .HasColumnType("int"); + + b.Property("Nombre") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeccionId") + .HasColumnType("nvarchar(max)"); + + b.Property("SeccionProvincialId") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("AmbitosGeograficos"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.CategoriaElectoral", b => + { + b.Property("Id") + .HasColumnType("int"); + + b.Property("Nombre") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Orden") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("CategoriasElectorales"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ComposicionBancada", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AgrupacionPoliticaId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("BancasEnJuego") + .HasColumnType("int"); + + b.Property("BancasTotales") + .HasColumnType("int"); + + b.Property("Camara") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("AgrupacionPoliticaId"); + + b.ToTable("ComposicionBancadas"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.Configuracion", b => + { + b.Property("Clave") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Valor") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Clave"); + + b.ToTable("Configuraciones"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.EstadoRecuento", b => + { + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("CategoriaId") + .HasColumnType("int"); + + b.Property("CantidadElectores") + .HasColumnType("int"); + + b.Property("CantidadVotantes") + .HasColumnType("int"); + + b.Property("FechaTotalizacion") + .HasColumnType("datetime2"); + + b.Property("MesasEsperadas") + .HasColumnType("int"); + + b.Property("MesasTotalizadas") + .HasColumnType("int"); + + b.Property("MesasTotalizadasPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.Property("ParticipacionPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.Property("VotosEnBlanco") + .HasColumnType("bigint"); + + b.Property("VotosEnBlancoPorcentaje") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("VotosNulos") + .HasColumnType("bigint"); + + b.Property("VotosNulosPorcentaje") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("VotosRecurridos") + .HasColumnType("bigint"); + + b.Property("VotosRecurridosPorcentaje") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.HasKey("AmbitoGeograficoId", "CategoriaId"); + + b.ToTable("EstadosRecuentos"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.EstadoRecuentoGeneral", b => + { + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("CategoriaId") + .HasColumnType("int"); + + b.Property("CantidadElectores") + .HasColumnType("int"); + + b.Property("CantidadVotantes") + .HasColumnType("int"); + + b.Property("FechaTotalizacion") + .HasColumnType("datetime2"); + + b.Property("MesasEsperadas") + .HasColumnType("int"); + + b.Property("MesasTotalizadas") + .HasColumnType("int"); + + b.Property("MesasTotalizadasPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.Property("ParticipacionPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.HasKey("AmbitoGeograficoId", "CategoriaId"); + + b.HasIndex("CategoriaId"); + + b.ToTable("EstadosRecuentosGenerales"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ProyeccionBanca", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AgrupacionPoliticaId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("CategoriaId") + .HasColumnType("int"); + + b.Property("FechaTotalizacion") + .HasColumnType("datetime2"); + + b.Property("NroBancas") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("AgrupacionPoliticaId"); + + b.HasIndex("AmbitoGeograficoId", "CategoriaId", "AgrupacionPoliticaId") + .IsUnique(); + + b.ToTable("ProyeccionesBancas"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ResultadoVoto", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AgrupacionPoliticaId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("CantidadVotos") + .HasColumnType("bigint"); + + b.Property("CategoriaId") + .HasColumnType("int"); + + b.Property("PorcentajeVotos") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.HasKey("Id"); + + b.HasIndex("AgrupacionPoliticaId"); + + b.HasIndex("AmbitoGeograficoId", "CategoriaId", "AgrupacionPoliticaId") + .IsUnique(); + + b.ToTable("ResultadosVotos"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ResumenVoto", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AgrupacionPoliticaId") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("Votos") + .HasColumnType("bigint"); + + b.Property("VotosPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.HasKey("Id"); + + b.ToTable("ResumenesVotos"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.Telegrama", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("ContenidoBase64") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("FechaEscaneo") + .HasColumnType("datetime2"); + + b.Property("FechaTotalizacion") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("Telegramas"); + }); + + modelBuilder.Entity("OcupanteBanca", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ComposicionBancadaId") + .HasColumnType("int"); + + b.Property("FotoUrl") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NombreOcupante") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Periodo") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ComposicionBancadaId"); + + b.ToTable("OcupantesBancas"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ComposicionBancada", b => + { + b.HasOne("Elecciones.Database.Entities.AgrupacionPolitica", "AgrupacionPolitica") + .WithMany() + .HasForeignKey("AgrupacionPoliticaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AgrupacionPolitica"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.EstadoRecuento", b => + { + b.HasOne("Elecciones.Database.Entities.AmbitoGeografico", "AmbitoGeografico") + .WithMany() + .HasForeignKey("AmbitoGeograficoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AmbitoGeografico"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.EstadoRecuentoGeneral", b => + { + b.HasOne("Elecciones.Database.Entities.CategoriaElectoral", "CategoriaElectoral") + .WithMany() + .HasForeignKey("CategoriaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CategoriaElectoral"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ProyeccionBanca", b => + { + b.HasOne("Elecciones.Database.Entities.AgrupacionPolitica", "AgrupacionPolitica") + .WithMany() + .HasForeignKey("AgrupacionPoliticaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Elecciones.Database.Entities.AmbitoGeografico", "AmbitoGeografico") + .WithMany() + .HasForeignKey("AmbitoGeograficoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AgrupacionPolitica"); + + b.Navigation("AmbitoGeografico"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ResultadoVoto", b => + { + b.HasOne("Elecciones.Database.Entities.AgrupacionPolitica", "AgrupacionPolitica") + .WithMany() + .HasForeignKey("AgrupacionPoliticaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Elecciones.Database.Entities.AmbitoGeografico", "AmbitoGeografico") + .WithMany() + .HasForeignKey("AmbitoGeograficoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AgrupacionPolitica"); + + b.Navigation("AmbitoGeografico"); + }); + + modelBuilder.Entity("OcupanteBanca", b => + { + b.HasOne("Elecciones.Database.Entities.ComposicionBancada", null) + .WithMany() + .HasForeignKey("ComposicionBancadaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Elecciones-Web/src/Elecciones.Database/Migrations/20250827152442_AddConfiguracionTable.cs b/Elecciones-Web/src/Elecciones.Database/Migrations/20250827152442_AddConfiguracionTable.cs new file mode 100644 index 0000000..d4e024f --- /dev/null +++ b/Elecciones-Web/src/Elecciones.Database/Migrations/20250827152442_AddConfiguracionTable.cs @@ -0,0 +1,33 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Elecciones.Database.Migrations +{ + /// + public partial class AddConfiguracionTable : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "Configuraciones", + columns: table => new + { + Clave = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + Valor = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Configuraciones", x => x.Clave); + }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "Configuraciones"); + } + } +} diff --git a/Elecciones-Web/src/Elecciones.Database/Migrations/20250828174425_AddBancadasAndOcupantesSchema.Designer.cs b/Elecciones-Web/src/Elecciones.Database/Migrations/20250828174425_AddBancadasAndOcupantesSchema.Designer.cs new file mode 100644 index 0000000..fd826e9 --- /dev/null +++ b/Elecciones-Web/src/Elecciones.Database/Migrations/20250828174425_AddBancadasAndOcupantesSchema.Designer.cs @@ -0,0 +1,513 @@ +// +using System; +using Elecciones.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Elecciones.Database.Migrations +{ + [DbContext(typeof(EleccionesDbContext))] + [Migration("20250828174425_AddBancadasAndOcupantesSchema")] + partial class AddBancadasAndOcupantesSchema + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .UseCollation("Modern_Spanish_CI_AS") + .HasAnnotation("ProductVersion", "9.0.8") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Elecciones.Database.Entities.AdminUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("PasswordHash") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PasswordSalt") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Username") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Id"); + + b.ToTable("AdminUsers"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.AgrupacionPolitica", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Color") + .HasColumnType("nvarchar(max)"); + + b.Property("IdTelegrama") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("LogoUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("Nombre") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NombreCorto") + .HasColumnType("nvarchar(max)"); + + b.Property("OrdenDiputados") + .HasColumnType("int"); + + b.Property("OrdenSenadores") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AgrupacionesPoliticas"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.AmbitoGeografico", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CircuitoId") + .HasColumnType("nvarchar(max)"); + + b.Property("DistritoId") + .HasColumnType("nvarchar(max)"); + + b.Property("EstablecimientoId") + .HasColumnType("nvarchar(max)"); + + b.Property("MesaId") + .HasColumnType("nvarchar(max)"); + + b.Property("MunicipioId") + .HasColumnType("nvarchar(max)"); + + b.Property("NivelId") + .HasColumnType("int"); + + b.Property("Nombre") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeccionId") + .HasColumnType("nvarchar(max)"); + + b.Property("SeccionProvincialId") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("AmbitosGeograficos"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.Bancada", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AgrupacionPoliticaId") + .HasColumnType("nvarchar(450)"); + + b.Property("Camara") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("AgrupacionPoliticaId"); + + b.ToTable("Bancadas"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.CategoriaElectoral", b => + { + b.Property("Id") + .HasColumnType("int"); + + b.Property("Nombre") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Orden") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("CategoriasElectorales"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.Configuracion", b => + { + b.Property("Clave") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Valor") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Clave"); + + b.ToTable("Configuraciones"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.EstadoRecuento", b => + { + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("CategoriaId") + .HasColumnType("int"); + + b.Property("CantidadElectores") + .HasColumnType("int"); + + b.Property("CantidadVotantes") + .HasColumnType("int"); + + b.Property("FechaTotalizacion") + .HasColumnType("datetime2"); + + b.Property("MesasEsperadas") + .HasColumnType("int"); + + b.Property("MesasTotalizadas") + .HasColumnType("int"); + + b.Property("MesasTotalizadasPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.Property("ParticipacionPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.Property("VotosEnBlanco") + .HasColumnType("bigint"); + + b.Property("VotosEnBlancoPorcentaje") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("VotosNulos") + .HasColumnType("bigint"); + + b.Property("VotosNulosPorcentaje") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("VotosRecurridos") + .HasColumnType("bigint"); + + b.Property("VotosRecurridosPorcentaje") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.HasKey("AmbitoGeograficoId", "CategoriaId"); + + b.ToTable("EstadosRecuentos"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.EstadoRecuentoGeneral", b => + { + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("CategoriaId") + .HasColumnType("int"); + + b.Property("CantidadElectores") + .HasColumnType("int"); + + b.Property("CantidadVotantes") + .HasColumnType("int"); + + b.Property("FechaTotalizacion") + .HasColumnType("datetime2"); + + b.Property("MesasEsperadas") + .HasColumnType("int"); + + b.Property("MesasTotalizadas") + .HasColumnType("int"); + + b.Property("MesasTotalizadasPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.Property("ParticipacionPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.HasKey("AmbitoGeograficoId", "CategoriaId"); + + b.HasIndex("CategoriaId"); + + b.ToTable("EstadosRecuentosGenerales"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.OcupanteBanca", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BancadaId") + .HasColumnType("int"); + + b.Property("FotoUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("NombreOcupante") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Periodo") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BancadaId") + .IsUnique(); + + b.ToTable("OcupantesBancas"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ProyeccionBanca", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AgrupacionPoliticaId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("CategoriaId") + .HasColumnType("int"); + + b.Property("FechaTotalizacion") + .HasColumnType("datetime2"); + + b.Property("NroBancas") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("AgrupacionPoliticaId"); + + b.HasIndex("AmbitoGeograficoId", "CategoriaId", "AgrupacionPoliticaId") + .IsUnique(); + + b.ToTable("ProyeccionesBancas"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ResultadoVoto", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AgrupacionPoliticaId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("CantidadVotos") + .HasColumnType("bigint"); + + b.Property("CategoriaId") + .HasColumnType("int"); + + b.Property("PorcentajeVotos") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.HasKey("Id"); + + b.HasIndex("AgrupacionPoliticaId"); + + b.HasIndex("AmbitoGeograficoId", "CategoriaId", "AgrupacionPoliticaId") + .IsUnique(); + + b.ToTable("ResultadosVotos"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ResumenVoto", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AgrupacionPoliticaId") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("Votos") + .HasColumnType("bigint"); + + b.Property("VotosPorcentaje") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.HasKey("Id"); + + b.ToTable("ResumenesVotos"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.Telegrama", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("AmbitoGeograficoId") + .HasColumnType("int"); + + b.Property("ContenidoBase64") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("FechaEscaneo") + .HasColumnType("datetime2"); + + b.Property("FechaTotalizacion") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("Telegramas"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.Bancada", b => + { + b.HasOne("Elecciones.Database.Entities.AgrupacionPolitica", "AgrupacionPolitica") + .WithMany() + .HasForeignKey("AgrupacionPoliticaId"); + + b.Navigation("AgrupacionPolitica"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.EstadoRecuento", b => + { + b.HasOne("Elecciones.Database.Entities.AmbitoGeografico", "AmbitoGeografico") + .WithMany() + .HasForeignKey("AmbitoGeograficoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AmbitoGeografico"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.EstadoRecuentoGeneral", b => + { + b.HasOne("Elecciones.Database.Entities.CategoriaElectoral", "CategoriaElectoral") + .WithMany() + .HasForeignKey("CategoriaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CategoriaElectoral"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.OcupanteBanca", b => + { + b.HasOne("Elecciones.Database.Entities.Bancada", "Bancada") + .WithOne("Ocupante") + .HasForeignKey("Elecciones.Database.Entities.OcupanteBanca", "BancadaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Bancada"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ProyeccionBanca", b => + { + b.HasOne("Elecciones.Database.Entities.AgrupacionPolitica", "AgrupacionPolitica") + .WithMany() + .HasForeignKey("AgrupacionPoliticaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Elecciones.Database.Entities.AmbitoGeografico", "AmbitoGeografico") + .WithMany() + .HasForeignKey("AmbitoGeograficoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AgrupacionPolitica"); + + b.Navigation("AmbitoGeografico"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.ResultadoVoto", b => + { + b.HasOne("Elecciones.Database.Entities.AgrupacionPolitica", "AgrupacionPolitica") + .WithMany() + .HasForeignKey("AgrupacionPoliticaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Elecciones.Database.Entities.AmbitoGeografico", "AmbitoGeografico") + .WithMany() + .HasForeignKey("AmbitoGeograficoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AgrupacionPolitica"); + + b.Navigation("AmbitoGeografico"); + }); + + modelBuilder.Entity("Elecciones.Database.Entities.Bancada", b => + { + b.Navigation("Ocupante"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Elecciones-Web/src/Elecciones.Database/Migrations/20250828174425_AddBancadasAndOcupantesSchema.cs b/Elecciones-Web/src/Elecciones.Database/Migrations/20250828174425_AddBancadasAndOcupantesSchema.cs new file mode 100644 index 0000000..5e90add --- /dev/null +++ b/Elecciones-Web/src/Elecciones.Database/Migrations/20250828174425_AddBancadasAndOcupantesSchema.cs @@ -0,0 +1,164 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Elecciones.Database.Migrations +{ + /// + public partial class AddBancadasAndOcupantesSchema : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_OcupantesBancas_ComposicionBancadas_ComposicionBancadaId", + table: "OcupantesBancas"); + + migrationBuilder.DropTable( + name: "ComposicionBancadas"); + + migrationBuilder.DropIndex( + name: "IX_OcupantesBancas_ComposicionBancadaId", + table: "OcupantesBancas"); + + migrationBuilder.RenameColumn( + name: "ComposicionBancadaId", + table: "OcupantesBancas", + newName: "BancadaId"); + + migrationBuilder.AlterColumn( + name: "Periodo", + table: "OcupantesBancas", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "FotoUrl", + table: "OcupantesBancas", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.CreateTable( + name: "Bancadas", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + Camara = table.Column(type: "int", nullable: false), + AgrupacionPoliticaId = table.Column(type: "nvarchar(450)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Bancadas", x => x.Id); + table.ForeignKey( + name: "FK_Bancadas_AgrupacionesPoliticas_AgrupacionPoliticaId", + column: x => x.AgrupacionPoliticaId, + principalTable: "AgrupacionesPoliticas", + principalColumn: "Id"); + }); + + migrationBuilder.CreateIndex( + name: "IX_OcupantesBancas_BancadaId", + table: "OcupantesBancas", + column: "BancadaId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Bancadas_AgrupacionPoliticaId", + table: "Bancadas", + column: "AgrupacionPoliticaId"); + + migrationBuilder.AddForeignKey( + name: "FK_OcupantesBancas_Bancadas_BancadaId", + table: "OcupantesBancas", + column: "BancadaId", + principalTable: "Bancadas", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_OcupantesBancas_Bancadas_BancadaId", + table: "OcupantesBancas"); + + migrationBuilder.DropTable( + name: "Bancadas"); + + migrationBuilder.DropIndex( + name: "IX_OcupantesBancas_BancadaId", + table: "OcupantesBancas"); + + migrationBuilder.RenameColumn( + name: "BancadaId", + table: "OcupantesBancas", + newName: "ComposicionBancadaId"); + + migrationBuilder.AlterColumn( + name: "Periodo", + table: "OcupantesBancas", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "FotoUrl", + table: "OcupantesBancas", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.CreateTable( + name: "ComposicionBancadas", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + AgrupacionPoliticaId = table.Column(type: "nvarchar(450)", nullable: false), + BancasEnJuego = table.Column(type: "int", nullable: false), + BancasTotales = table.Column(type: "int", nullable: false), + Camara = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ComposicionBancadas", x => x.Id); + table.ForeignKey( + name: "FK_ComposicionBancadas_AgrupacionesPoliticas_AgrupacionPoliticaId", + column: x => x.AgrupacionPoliticaId, + principalTable: "AgrupacionesPoliticas", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_OcupantesBancas_ComposicionBancadaId", + table: "OcupantesBancas", + column: "ComposicionBancadaId"); + + migrationBuilder.CreateIndex( + name: "IX_ComposicionBancadas_AgrupacionPoliticaId", + table: "ComposicionBancadas", + column: "AgrupacionPoliticaId"); + + migrationBuilder.AddForeignKey( + name: "FK_OcupantesBancas_ComposicionBancadas_ComposicionBancadaId", + table: "OcupantesBancas", + column: "ComposicionBancadaId", + principalTable: "ComposicionBancadas", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + } + } +} diff --git a/Elecciones-Web/src/Elecciones.Database/Migrations/EleccionesDbContextModelSnapshot.cs b/Elecciones-Web/src/Elecciones.Database/Migrations/EleccionesDbContextModelSnapshot.cs index df18e27..b4d12fb 100644 --- a/Elecciones-Web/src/Elecciones.Database/Migrations/EleccionesDbContextModelSnapshot.cs +++ b/Elecciones-Web/src/Elecciones.Database/Migrations/EleccionesDbContextModelSnapshot.cs @@ -17,24 +17,66 @@ namespace Elecciones.Database.Migrations { #pragma warning disable 612, 618 modelBuilder + .UseCollation("Modern_Spanish_CI_AS") .HasAnnotation("ProductVersion", "9.0.8") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + modelBuilder.Entity("Elecciones.Database.Entities.AdminUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("PasswordHash") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PasswordSalt") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Username") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Id"); + + b.ToTable("AdminUsers"); + }); + modelBuilder.Entity("Elecciones.Database.Entities.AgrupacionPolitica", b => { b.Property("Id") .HasColumnType("nvarchar(450)"); + b.Property("Color") + .HasColumnType("nvarchar(max)"); + b.Property("IdTelegrama") .IsRequired() .HasColumnType("nvarchar(max)"); + b.Property("LogoUrl") + .HasColumnType("nvarchar(max)"); + b.Property("Nombre") .IsRequired() .HasColumnType("nvarchar(max)"); + b.Property("NombreCorto") + .HasColumnType("nvarchar(max)"); + + b.Property("OrdenDiputados") + .HasColumnType("int"); + + b.Property("OrdenSenadores") + .HasColumnType("int"); + b.HasKey("Id"); b.ToTable("AgrupacionesPoliticas"); @@ -81,6 +123,27 @@ namespace Elecciones.Database.Migrations b.ToTable("AmbitosGeograficos"); }); + modelBuilder.Entity("Elecciones.Database.Entities.Bancada", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AgrupacionPoliticaId") + .HasColumnType("nvarchar(450)"); + + b.Property("Camara") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("AgrupacionPoliticaId"); + + b.ToTable("Bancadas"); + }); + modelBuilder.Entity("Elecciones.Database.Entities.CategoriaElectoral", b => { b.Property("Id") @@ -98,6 +161,22 @@ namespace Elecciones.Database.Migrations b.ToTable("CategoriasElectorales"); }); + modelBuilder.Entity("Elecciones.Database.Entities.Configuracion", b => + { + b.Property("Clave") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Valor") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Clave"); + + b.ToTable("Configuraciones"); + }); + modelBuilder.Entity("Elecciones.Database.Entities.EstadoRecuento", b => { b.Property("AmbitoGeograficoId") @@ -193,6 +272,35 @@ namespace Elecciones.Database.Migrations b.ToTable("EstadosRecuentosGenerales"); }); + modelBuilder.Entity("Elecciones.Database.Entities.OcupanteBanca", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BancadaId") + .HasColumnType("int"); + + b.Property("FotoUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("NombreOcupante") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Periodo") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BancadaId") + .IsUnique(); + + b.ToTable("OcupantesBancas"); + }); + modelBuilder.Entity("Elecciones.Database.Entities.ProyeccionBanca", b => { b.Property("Id") @@ -312,6 +420,15 @@ namespace Elecciones.Database.Migrations b.ToTable("Telegramas"); }); + modelBuilder.Entity("Elecciones.Database.Entities.Bancada", b => + { + b.HasOne("Elecciones.Database.Entities.AgrupacionPolitica", "AgrupacionPolitica") + .WithMany() + .HasForeignKey("AgrupacionPoliticaId"); + + b.Navigation("AgrupacionPolitica"); + }); + modelBuilder.Entity("Elecciones.Database.Entities.EstadoRecuento", b => { b.HasOne("Elecciones.Database.Entities.AmbitoGeografico", "AmbitoGeografico") @@ -334,6 +451,17 @@ namespace Elecciones.Database.Migrations b.Navigation("CategoriaElectoral"); }); + modelBuilder.Entity("Elecciones.Database.Entities.OcupanteBanca", b => + { + b.HasOne("Elecciones.Database.Entities.Bancada", "Bancada") + .WithOne("Ocupante") + .HasForeignKey("Elecciones.Database.Entities.OcupanteBanca", "BancadaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Bancada"); + }); + modelBuilder.Entity("Elecciones.Database.Entities.ProyeccionBanca", b => { b.HasOne("Elecciones.Database.Entities.AgrupacionPolitica", "AgrupacionPolitica") @@ -371,6 +499,11 @@ namespace Elecciones.Database.Migrations b.Navigation("AmbitoGeografico"); }); + + modelBuilder.Entity("Elecciones.Database.Entities.Bancada", b => + { + b.Navigation("Ocupante"); + }); #pragma warning restore 612, 618 } } diff --git a/Elecciones-Web/src/Elecciones.Database/bin/Debug/net9.0/Elecciones.Database.deps.json b/Elecciones-Web/src/Elecciones.Database/bin/Debug/net9.0/Elecciones.Database.deps.json index 3497693..58aaae1 100644 --- a/Elecciones-Web/src/Elecciones.Database/bin/Debug/net9.0/Elecciones.Database.deps.json +++ b/Elecciones-Web/src/Elecciones.Database/bin/Debug/net9.0/Elecciones.Database.deps.json @@ -8,6 +8,7 @@ ".NETCoreApp,Version=v9.0": { "Elecciones.Database/1.0.0": { "dependencies": { + "Elecciones.Core": "1.0.0", "Microsoft.EntityFrameworkCore.Design": "9.0.8", "Microsoft.EntityFrameworkCore.SqlServer": "9.0.8" }, @@ -1001,6 +1002,14 @@ "fileVersion": "6.0.21.52210" } } + }, + "Elecciones.Core/1.0.0": { + "runtime": { + "Elecciones.Core.dll": { + "assemblyVersion": "1.0.0.0", + "fileVersion": "1.0.0.0" + } + } } } }, @@ -1555,6 +1564,11 @@ "sha512": "sha512-IXoJOXIqc39AIe+CIR7koBtRGMiCt/LPM3lI+PELtDIy9XdyeSrwXFdWV9dzJ2Awl0paLWUaknLxFQ5HpHZUog==", "path": "system.windows.extensions/6.0.0", "hashPath": "system.windows.extensions.6.0.0.nupkg.sha512" + }, + "Elecciones.Core/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" } } } \ No newline at end of file diff --git a/Elecciones-Web/src/Elecciones.Database/obj/Debug/net9.0/Eleccion.FD0E0EFF.Up2Date b/Elecciones-Web/src/Elecciones.Database/obj/Debug/net9.0/Eleccion.FD0E0EFF.Up2Date new file mode 100644 index 0000000..e69de29 diff --git a/Elecciones-Web/src/Elecciones.Database/obj/Debug/net9.0/Elecciones.Database.AssemblyInfo.cs b/Elecciones-Web/src/Elecciones.Database/obj/Debug/net9.0/Elecciones.Database.AssemblyInfo.cs index d06e2a4..9a199b9 100644 --- a/Elecciones-Web/src/Elecciones.Database/obj/Debug/net9.0/Elecciones.Database.AssemblyInfo.cs +++ b/Elecciones-Web/src/Elecciones.Database/obj/Debug/net9.0/Elecciones.Database.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("Elecciones.Database")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+0d33db9e6dc7807fbb1853c621b81002ea764411")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+55954e18a797dce22f76f00b645832f361d97362")] [assembly: System.Reflection.AssemblyProductAttribute("Elecciones.Database")] [assembly: System.Reflection.AssemblyTitleAttribute("Elecciones.Database")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/Elecciones-Web/src/Elecciones.Database/obj/Debug/net9.0/Elecciones.Database.csproj.FileListAbsolute.txt b/Elecciones-Web/src/Elecciones.Database/obj/Debug/net9.0/Elecciones.Database.csproj.FileListAbsolute.txt index 45b327c..6e3128b 100644 --- a/Elecciones-Web/src/Elecciones.Database/obj/Debug/net9.0/Elecciones.Database.csproj.FileListAbsolute.txt +++ b/Elecciones-Web/src/Elecciones.Database/obj/Debug/net9.0/Elecciones.Database.csproj.FileListAbsolute.txt @@ -12,3 +12,6 @@ E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Database\obj\Debug\net9.0\refin E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Database\obj\Debug\net9.0\Elecciones.Database.pdb E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Database\obj\Debug\net9.0\Elecciones.Database.genruntimeconfig.cache E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Database\obj\Debug\net9.0\ref\Elecciones.Database.dll +E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Database\bin\Debug\net9.0\Elecciones.Core.dll +E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Database\bin\Debug\net9.0\Elecciones.Core.pdb +E:\Elecciones-2025\Elecciones-Web\src\Elecciones.Database\obj\Debug\net9.0\Eleccion.FD0E0EFF.Up2Date diff --git a/Elecciones-Web/src/Elecciones.Database/obj/Elecciones.Database.csproj.nuget.dgspec.json b/Elecciones-Web/src/Elecciones.Database/obj/Elecciones.Database.csproj.nuget.dgspec.json index 3f645d5..5b9ba22 100644 --- a/Elecciones-Web/src/Elecciones.Database/obj/Elecciones.Database.csproj.nuget.dgspec.json +++ b/Elecciones-Web/src/Elecciones.Database/obj/Elecciones.Database.csproj.nuget.dgspec.json @@ -4,6 +4,71 @@ "E:\\Elecciones-2025\\Elecciones-Web\\src\\Elecciones.Database\\Elecciones.Database.csproj": {} }, "projects": { + "E:\\Elecciones-2025\\Elecciones-Web\\src\\Elecciones.Core\\Elecciones.Core.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "E:\\Elecciones-2025\\Elecciones-Web\\src\\Elecciones.Core\\Elecciones.Core.csproj", + "projectName": "Elecciones.Core", + "projectPath": "E:\\Elecciones-2025\\Elecciones-Web\\src\\Elecciones.Core\\Elecciones.Core.csproj", + "packagesPath": "C:\\Users\\dmolinari\\.nuget\\packages\\", + "outputPath": "E:\\Elecciones-2025\\Elecciones-Web\\src\\Elecciones.Core\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "D:\\Microsoft\\VisualStudio\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\Users\\dmolinari\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net9.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net9.0": { + "targetAlias": "net9.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "direct" + }, + "SdkAnalysisLevel": "9.0.300" + }, + "frameworks": { + "net9.0": { + "targetAlias": "net9.0", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.300/PortableRuntimeIdentifierGraph.json" + } + } + }, "E:\\Elecciones-2025\\Elecciones-Web\\src\\Elecciones.Database\\Elecciones.Database.csproj": { "version": "1.0.0", "restore": { @@ -31,7 +96,11 @@ "frameworks": { "net9.0": { "targetAlias": "net9.0", - "projectReferences": {} + "projectReferences": { + "E:\\Elecciones-2025\\Elecciones-Web\\src\\Elecciones.Core\\Elecciones.Core.csproj": { + "projectPath": "E:\\Elecciones-2025\\Elecciones-Web\\src\\Elecciones.Core\\Elecciones.Core.csproj" + } + } } }, "warningProperties": { diff --git a/Elecciones-Web/src/Elecciones.Infrastructure/obj/Debug/net9.0/Elecciones.Infrastructure.AssemblyInfo.cs b/Elecciones-Web/src/Elecciones.Infrastructure/obj/Debug/net9.0/Elecciones.Infrastructure.AssemblyInfo.cs index ac3a022..ba8da55 100644 --- a/Elecciones-Web/src/Elecciones.Infrastructure/obj/Debug/net9.0/Elecciones.Infrastructure.AssemblyInfo.cs +++ b/Elecciones-Web/src/Elecciones.Infrastructure/obj/Debug/net9.0/Elecciones.Infrastructure.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("Elecciones.Infrastructure")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+0d33db9e6dc7807fbb1853c621b81002ea764411")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+55954e18a797dce22f76f00b645832f361d97362")] [assembly: System.Reflection.AssemblyProductAttribute("Elecciones.Infrastructure")] [assembly: System.Reflection.AssemblyTitleAttribute("Elecciones.Infrastructure")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/Elecciones-Web/src/Elecciones.Worker/obj/Debug/net9.0/Elecciones.Worker.AssemblyInfo.cs b/Elecciones-Web/src/Elecciones.Worker/obj/Debug/net9.0/Elecciones.Worker.AssemblyInfo.cs index 9b8b758..d23efa7 100644 --- a/Elecciones-Web/src/Elecciones.Worker/obj/Debug/net9.0/Elecciones.Worker.AssemblyInfo.cs +++ b/Elecciones-Web/src/Elecciones.Worker/obj/Debug/net9.0/Elecciones.Worker.AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("Elecciones.Worker")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+18e6e8d3c0a378a172ad8e8afd31109673460717")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+55954e18a797dce22f76f00b645832f361d97362")] [assembly: System.Reflection.AssemblyProductAttribute("Elecciones.Worker")] [assembly: System.Reflection.AssemblyTitleAttribute("Elecciones.Worker")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/Elecciones-Web/src/Elecciones.Worker/obj/Elecciones.Worker.csproj.nuget.dgspec.json b/Elecciones-Web/src/Elecciones.Worker/obj/Elecciones.Worker.csproj.nuget.dgspec.json index de8fa96..f8a0b75 100644 --- a/Elecciones-Web/src/Elecciones.Worker/obj/Elecciones.Worker.csproj.nuget.dgspec.json +++ b/Elecciones-Web/src/Elecciones.Worker/obj/Elecciones.Worker.csproj.nuget.dgspec.json @@ -96,7 +96,11 @@ "frameworks": { "net9.0": { "targetAlias": "net9.0", - "projectReferences": {} + "projectReferences": { + "E:\\Elecciones-2025\\Elecciones-Web\\src\\Elecciones.Core\\Elecciones.Core.csproj": { + "projectPath": "E:\\Elecciones-2025\\Elecciones-Web\\src\\Elecciones.Core\\Elecciones.Core.csproj" + } + } } }, "warningProperties": { diff --git a/pdf.worker.entry.js b/pdf.worker.entry.js deleted file mode 100644 index 2f08bd5..0000000 --- a/pdf.worker.entry.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * PDF.js worker entry file. - * - * This file is identical to Mozilla's pdf.worker.entry.js, with one exception being placed inside - * this bundle, not theirs. - */ -(typeof window !== 'undefined' ? window : {}).pdfjsWorker = - // @ts-expect-error - pdfjs-dist does not ship with types - await import('pdfjs-dist/build/pdf.worker.mjs'); -export {}; diff --git a/reconcile_ids.js b/reconcile_ids.js deleted file mode 100644 index 8c033a6..0000000 --- a/reconcile_ids.js +++ /dev/null @@ -1,78 +0,0 @@ -// reconcile_ids.js -const fs = require('fs'); -const path = require('path'); -const http = require('http'); - -// --- CONFIGURACIÓN --- -const API_URL = 'http://localhost:5217/api/catalogos/municipios'; // ¡Asegúrate que tu API esté corriendo en este puerto! -const GEOJSON_PATH = path.join(__dirname, 'Elecciones-Web', 'frontend', 'public', 'buenos-aires-municipios.geojson'); -const OUTPUT_PATH = path.join(__dirname, 'Elecciones-Web', 'frontend', 'public', 'municipioIdMap.json'); - -const normalizeString = (str) => { - if (!str) return ''; - return str.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(); -}; - -async function reconcile() { - console.log('Iniciando el script de reconciliación de IDs...'); - - try { - const apiData = await new Promise((resolve, reject) => { - http.get(API_URL, res => { - const { statusCode } = res; - if (statusCode !== 200) { - reject(new Error(`La petición a la API falló con el código de estado: ${statusCode}`)); - res.resume(); - return; - } - let data = ''; - res.on('data', chunk => data += chunk); - res.on('end', () => resolve(JSON.parse(data))); - }).on('error', reject); - }); - console.log(`Se obtuvieron ${apiData.length} municipios desde la API.`); - - const apiNameMap = new Map(apiData.map(m => [normalizeString(m.nombre), m.id])); - - const geoJsonRaw = fs.readFileSync(GEOJSON_PATH, 'utf8'); - const geoJsonData = JSON.parse(geoJsonRaw); - console.log(`Se leyeron ${geoJsonData.features.length} features desde el GeoJSON.`); - - const finalIdMap = {}; - let matches = 0; - const notFound = []; - - // --- CAMBIO CLAVE: YA NO NECESITAMOS ALIAS MANUALES --- - - for (const feature of geoJsonData.features) { - const geoJsonId = feature.properties.cca; - const nombreGeoJson = normalizeString(feature.properties.nam); - - if (apiNameMap.has(nombreGeoJson)) { - const apiId = apiNameMap.get(nombreGeoJson); - finalIdMap[geoJsonId] = apiId; - matches++; - } else { - notFound.push(feature.properties.nam); - } - } - - console.log(`\n--- RESULTADOS ---`); - console.log(`Coincidencias encontradas: ${matches} de ${geoJsonData.features.length}`); - if (notFound.length > 0) { - console.warn(`\nNo se encontró coincidencia para los siguientes ${notFound.length} municipios del GeoJSON:`); - console.warn(notFound.join(', ')); - } - - fs.writeFileSync(OUTPUT_PATH, JSON.stringify(finalIdMap, null, 2)); - console.log(`\n¡Éxito! El mapa de IDs se ha guardado en: ${OUTPUT_PATH}`); - - } catch (error) { - console.error('\nOcurrió un error:', error.message); - if(error.code === 'ECONNREFUSED') { - console.error('Asegúrate de que tu servicio de API esté corriendo en la URL especificada.'); - } - } -} - -reconcile(); \ No newline at end of file