68 Commits
Author SHA1 Message Date
Sansan bd250ecaee Run tests in CI and build multi-arch Docker images
Build / test (push) Successful in 38s
Build / docker (push) Successful in 2m2s
- Build (main, develop): vet and unit tests, then a linux/amd64 and
  linux/arm64 image build without pushing
- Publish (version branches): same tests, then build and push both
  platforms
- Integration tests (manual): run the testcontainers suite
2026-10-06 15:22:13 +02:00
Sansan 59dfff38bc Clean up build tooling and Dockerfile
- Dockerfile cross-compiles Go for the target platform (amd64/arm64
  without emulation), uses templ pinned in go.mod, runs as uid 1000 on
  alpine and lets FRONTEND_IMAGE pin the frontend version
- justfile: tools via go tool, `test` (unit) and `test-integration`
  (uses the active docker context), no hardcoded paths, no tailwind or
  frontend recipes
- Removed app.yaml, init.sh, tailwind.config.js and the tracked .idea
  folder
2026-10-06 15:21:46 +02:00
Sansan 7b144ae419 Rewrite tests to run without a database
- Unit tests use an in-memory fake database (internal/testutil/fakedb),
  temp folders and httptest; `go test ./...` needs no Docker or env vars
- Integration tests (build tag "integration") start PostgreSQL with
  testcontainers: migrations step by step, SQL dumps (skipped if
  missing) and a full sync against a real database
- Removed tests that only checked copies of the logic or had empty
  bodies, the broken root integration_test.go, compose.test.yaml and
  .env.test with hardcoded paths
- testMusic MP3s replaced with tiny placeholders (sync never decodes
  audio), 194 MB -> 168 KB
2026-10-06 15:20:31 +02:00
Sansan 090e794460 Restructure backend into services and fix security, crash and sync issues
Security
- Serve character images through os.Root so names like ../ can't escape
  the characters folder
- Sync start and /sync/reset are POST only (legacy and /api/v1)
- /api/v1/token/cleanup requires a token, password compared in constant
  time, tokens no longer logged
- Echo's rate limiter replaces the custom one; TRUSTED_PROXIES enables
  X-Forwarded-For for reverse proxies

Crashes and races
- Sync state lives in SyncService with atomics and a mutex instead of
  unsynchronised globals (fixes concurrent map writes during full sync)
- Only one sync can run; /api/v1 sync and music routes are locked during
  sync like the legacy ones
- No log.Fatal outside startup: errors become 4xx/5xx responses
- Search uses an in-order character match instead of unescaped regexes
- Empty queue / no songs return 404 instead of panicking or looping

Behaviour
- Sync result is computed once and stays the same between polls
- Swagger and /openapi serve the embedded spec
- Shutdown stops HTTP before closing the database
- Expired tokens are deleted with a context that outlives the request
- Files are served with Range support and correct content types; audio
  has no write deadline

Performance
- Migration 000006 adds soundtrack.fingerprint (names, sizes, mtimes) so
  unchanged folders are skipped without reading any files
- Songs are reconciled per soundtrack with one query plus needed writes;
  renames keep play counts
- Moved MUSIC_PATH updates soundtrack and song paths
- .id cleanup only runs for changed soundtracks or a full sync
- Classic random uses one SQL query; Gitea release lookups are cached
  with a timeout

Structure
- internal/config reads all environment variables once
- sqlc emits a Querier interface; backend globals become services
  injected into handlers
- One route registration shared by legacy and /api/v1
- Removed dead code (dbHelper.go, unused middleware, duplicate Gitea
  functions, embedded Swagger UI copy) and lib/pq
- templ and swag pinned as go tools
2026-10-06 15:20:14 +02:00
Sansan 75b6f0c1cf Remove frontend source from cmd
The frontend is built separately and copied into the Docker image from
the musicfrontend image.
2026-10-06 15:19:49 +02:00
Sansan 2406fe9eb6 Ignore database dumps
Build / build (push) Failing after 34s
2026-10-05 18:49:15 +02:00
Sansan 581d91f78b Fixed workflow file
Build / build (push) Successful in 39s
Publish / publish (push) Successful in 49s
2026-09-26 17:16:23 +02:00
Sansan a8a2602f50 #9 Major routes refactor and expansion, #15 Added API for statistics, Added search cache backend and functionality tests, Backend sync improvements
Build / build (push) Successful in 56s
2026-09-26 16:48:40 +02:00
Sansan e86c0f8e04 Combine Issue #28 (UUID Phase 2 - NOT NULL) into migration 000005
- Add NOT NULL constraints to soundtrack.uuid, song.uuid, and song.soundtrack_uuid
- Add corresponding DROP NOT NULL in down migration
- Update header comments to reflect combined Phase 1 & 2

This eliminates the need for a separate migration 000007 while maintaining
proper rollback capability. The NOT NULL constraints are added AFTER
all UUID backfills are complete, ensuring data integrity.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-07-28 14:16:04 +02:00
Sansan eda60e0c07 Added fuzzy finder to search, made sync check as middleware, .id file is never used
Build / build (push) Successful in 45s
2026-07-02 09:30:24 +02:00
Sansan a8df738108 #9 Changed the term game to soundtrack everywhere
Build / build (push) Successful in 45s
2026-06-29 18:39:09 +02:00
Sansan dbef39b828 Merge pull request 'Feature/statistics api' (#26) from feature/statistics-api into develop
Build / build (push) Successful in 51s
Reviewed-on: #26
2026-06-14 11:48:36 +02:00
Sansan 4e5bdc4ee2 Fixed some small bugs after merge 2026-06-14 11:30:58 +02:00
Sansan 0894d65ec5 Merge branch 'develop' into feature/statistics-api
# Conflicts:
#	internal/backend/music.go
#	internal/backend/sync.go
#	internal/server/server.go
#	internal/server/syncHandler.go
#	internal/server/sync_handler_test.go
#	internal/server/test_helpers.go
#	internal/server/zz_music_handler_test.go
2026-06-13 11:51:56 +02:00
Sansan 4033899a68 Merge pull request 'Feature/session token api' (#25) from feature/session-token-api into develop
Build / build (push) Successful in 50s
Reviewed-on: #25
2026-06-13 11:30:08 +02:00
Sansan c6a07e69e7 Fixed some small bugs. Frontend is now included in the docker image 2026-06-13 11:26:52 +02:00
Sansan 6d4a034753 Fix duplicate import in routes.go
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-08 20:44:17 +02:00
SansanandMistral Vibe b0418b4f38 feat: Add id column to song table and prep for UUID migration
- Add id serial4 PK to song table (was composite PK)
- Update queries to use soundtrack_id + path
- Add UUID columns to soundtrack and song (nullable)
- Add migration tracking table

TODO: Run sqlc generate, then create backfill migration (000008)

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-08 20:36:12 +02:00
Sansan 176848bb6d feat: Add deprecation notice for global Dbpool and Ctx variables
- Enhanced TODO comment to clearly mark Dbpool and Ctx as DEPRECATED
- Direct developers to use Database struct from database.go instead
- Migration test already includes manual data insertion (5 games, 8 songs)

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-08 20:36:12 +02:00
SansanandMistral Vibe fb387901cf test: Add migration test with manual data insertion
- TestMigrationsStepByStep: tests incremental migration workflow
  - Step 1: Apply first 4 migrations (creates game, song tables)
  - Step 2: Manually insert 5 games with 8 songs
  - Step 3: Apply migration 5 (rename game→soundtrack)
  - Step 4: Verify data preserved in soundtrack table
- Helper functions: cleanupDB, createTestDB, applyMigrations
- Tests data integrity through full migration cycle

Requires: DB_HOST, DB_PORT, DB_USERNAME, DB_PASSWORD env vars
Run: migrate -path internal/db/migrations -database "postgres://user:pass@host:port/db?sslmode=disable" up N

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-08 20:36:12 +02:00
Sansan 0f29c33b1a test: Add statistics test with manual data insertion
- TestStatisticsEndpoints: tests /api/v1/statistics/summary endpoint
- TestPartialMigrationThenSyncThenComplete: tests migration + sync workflow
- insertTestData: helper to insert 5 soundtracks with 8 songs
- getTestToken: helper to get auth token for tests
- Updated other test files to use FindAllSoundtracks instead of FindAllGames

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-08 20:36:12 +02:00
Sansan cec408187d feat: Rename game to soundtrack throughout codebase
- Database migration: rename game table to soundtrack
- Rename game_name to soundtrack_name, game_id to soundtrack_id
- Update all SQL queries in soundtrack.sql, song.sql, song_list.sql, statistics.sql
- Regenerate sqlc code (soundtrack.sql.go, song.sql.go, etc.)
- Update backend: music.go, sync.go, statistics.go
- Update server: musicHandler.go, syncHandler.go, routes.go
- Update frontend: hello.go
- Keep URL paths as /games for backward compatibility

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-08 20:36:12 +02:00
Sansan c60f40d7e3 feat: Complete DI cleanup - migrate test helpers to Database struct
- Update internal/db/test_helpers.go to use Database struct instead of globals
- Update internal/server/test_helpers.go to use TestDatabase.Pool
- Add TODO comment to old Dbpool/Ctx globals in dbHelper.go
- Remove db.Testf() usage from production code (kept for deprecated /dbtest endpoint)

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-08 20:36:12 +02:00
Sansan 2f407f6eef feat: Add deprecation middleware for legacy endpoints
- Create middleware/deprecation.go with DeprecationMiddleware
- Adds Warning and Deprecation headers to old endpoints
- Apply middleware to all non-/api/v1 routes:
  /version, /dbtest, /health, /character*, /download*, /sync/*,
  /music/*
- Message: 'Deprecated: This endpoint is deprecated. Use /api/v1/ endpoints instead.'

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-08 20:36:12 +02:00
Sansan 4c2db11cc5 feat: Implement Statistics API with 8 endpoints under /api/v1/statistics/
- Add statistics.sql with 8 SQL queries for play count statistics
- Generate repository code via sqlc
- Add backend/statistics.go with business logic
- Add server/statistics_handler.go with Echo handlers
- Register protected routes under /api/v1/statistics/ with token auth
- Endpoints: games/most-played, games/least-played, games/never-played,
  games/last-played, games/oldest-played, songs/most-played,
  songs/least-played, summary

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-08 20:33:29 +02:00
Sansan 06cbad708d feat: Remove global db.Dbpool with dependency injection (Phase 0)
- Add Database struct in internal/db/database.go with Pool, Ctx, and RunMigrations()
- Update server.go to use Database struct with NewServerInstance()
- Add backend.go with InitBackend(), BackendRepo(), BackendCtx(), BackendPool()
- Update music.go and sync.go to use BackendRepo() and BackendCtx() instead of db.Dbpool/db.Ctx
- Update token_handler.go to accept pool parameter
- Update routes.go to use s.db.Pool for middleware
- Update cmd/main.go to use NewServerInstance() and HTTPServer()
- Update test_helpers.go to initialize backend with test database
- Update test files to use backend.BackendPool() and backend.BackendCtx()

Benefits:
- Easier to mock database for unit tests
- Follows Go best practices (dependency injection)
- Better architecture with explicit dependencies
- RunMigrations() replaces old Migrate_db() function

Note: Global db.Dbpool and db.Ctx still exist in dbHelper.go for backward compatibility
with test_helpers.go, but production code no longer uses them.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-08 20:33:29 +02:00
Sansan 89e884fae9 feat: Implement Session Token System with /api/v1 base path
- Add migration 000004 for sessions table and performance indexes
- Create session.sql queries for CRUD operations
- Generate session repository code with sqlc
- Create token auth middleware for Echo framework
- Create token handler with create/delete/cleanup endpoints
- Add /api/v1 router with token authentication infrastructure
- Update dbHelper.go to use Up() instead of Migrate(2)
- Update server.go to initialize token handler
- Existing endpoints remain functional (to be deprecated)

New endpoints:
- POST /api/v1/token - Create new session token
- DELETE /api/v1/token - Invalidate token
- POST /api/v1/token/cleanup - Remove expired sessions

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-08 20:33:29 +02:00
Sansan 24a9111333 feat: Remove global db.Dbpool with dependency injection (Phase 0)
- Add Database struct in internal/db/database.go with Pool, Ctx, and RunMigrations()
- Update server.go to use Database struct with NewServerInstance()
- Add backend.go with InitBackend(), BackendRepo(), BackendCtx(), BackendPool()
- Update music.go and sync.go to use BackendRepo() and BackendCtx() instead of db.Dbpool/db.Ctx
- Update token_handler.go to accept pool parameter
- Update routes.go to use s.db.Pool for middleware
- Update cmd/main.go to use NewServerInstance() and HTTPServer()
- Update test_helpers.go to initialize backend with test database
- Update test files to use backend.BackendPool() and backend.BackendCtx()

Benefits:
- Easier to mock database for unit tests
- Follows Go best practices (dependency injection)
- Better architecture with explicit dependencies
- RunMigrations() replaces old Migrate_db() function

Note: Global db.Dbpool and db.Ctx still exist in dbHelper.go for backward compatibility
with test_helpers.go, but production code no longer uses them.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-08 20:15:38 +02:00
Sansan 6cc014ffa3 feat: Implement Session Token System with /api/v1 base path
- Add migration 000004 for sessions table and performance indexes
- Create session.sql queries for CRUD operations
- Generate session repository code with sqlc
- Create token auth middleware for Echo framework
- Create token handler with create/delete/cleanup endpoints
- Add /api/v1 router with token authentication infrastructure
- Update dbHelper.go to use Up() instead of Migrate(2)
- Update server.go to initialize token handler
- Existing endpoints remain functional (to be deprecated)

New endpoints:
- POST /api/v1/token - Create new session token
- DELETE /api/v1/token - Invalidate token
- POST /api/v1/token/cleanup - Remove expired sessions

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-08 20:15:38 +02:00
Sansan 8f8b555ea5 Refactor handlers and update changelog for 5.0.0-Beta
Build / build (push) Successful in 48s
- Split IndexHandler into HealthHandler, VersionHandler, and CharacterHandler
- Rename index.go to version.go in backend
- Change VersionData.Changelog from string to []string
- Add changelog entries for issues #16-#23
- Remove TestDB function and related code
- Fix import ordering in several files

Closes #21, #22
References #16, #17, #18, #19, #20, #23

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-08 20:08:06 +02:00
Sansan a446dad7b6 Make pool and poolSong global variables
Build / build (push) Successful in 48s
2026-05-26 20:54:12 +02:00
Sansan d152ec1f11 fix: use podman-compose (installed via Homebrew) instead of podman compose
Build / build (push) Successful in 45s
2026-05-23 21:57:15 +02:00
Sansan 7a3934babf fix: use 'podman compose' instead of 'podman-compose'
Build / build (push) Successful in 41s
2026-05-23 20:18:25 +02:00
Sansan 08f539abd9 test: add justfile commands for running integration tests with podman
Build / build (push) Successful in 43s
2026-05-23 20:02:25 +02:00
Sansan 87a1a2d89a test: reduce testMusic size for faster CI runs
Build / build (push) Successful in 47s
2026-05-23 19:41:10 +02:00
Sansan 1ada52f5f8 test: add test data directories (testMusic and testCharacters) 2026-05-23 01:06:43 +02:00
Sansan 92b82da3af test: add simple unit tests for backend and logging packages
Build / build (push) Successful in 31s
2026-05-22 22:49:25 +02:00
Sansan b71072f6c8 fix: remove tailwind from dockerfile and add podman-build command
Build / build (push) Successful in 33s
2026-05-22 22:31:10 +02:00
Sansan d481be04a7 Fix YAML formatting in Gitea workflows
Build / build (push) Failing after 2m7s
2026-05-21 23:45:23 +02:00
Sansan 870f1787cb Fix for workflow 2026-05-21 23:35:26 +02:00
Sansan 89c31c2856 Replace all log.Println and fmt.Printf with Zap structured logging 2026-05-21 23:24:55 +02:00
Sansan f0653489d6 Added some files 2026-05-21 22:25:31 +02:00
Sansan d0fbba86f1 Remove frontend-build from build command 2026-05-21 09:56:23 +02:00
Sansan bd0e7f4a8d Add frontend-build command to justfile 2026-05-21 09:54:12 +02:00
Sansan b5926e3b31 Fix frontend build by updating dependencies and ESLint configuration 2026-05-21 09:51:14 +02:00
Sansan 37909139de Add Zap logging framework with structured logging for Echo and Grafana 2026-05-20 22:29:45 +02:00
Sansan 82252ce1ff Use latest for templ CLI in justfile 2026-05-20 22:08:37 +02:00
Sansan 1dab9d6e7c Update all dependencies including templ CLI to latest versions 2026-05-20 22:05:39 +02:00
Sansan b80ad90eab Add echo-swagger/v2 for Echo v5 compatibility 2026-05-20 22:00:52 +02:00
Sansan 2cff8d16d7 Upgrade Echo framework from v4 to v5 2026-05-20 21:56:06 +02:00
Sansan 12f18ba12c Replace Tailwind CSS with pure CSS for frontend 2026-05-20 21:30:20 +02:00
Sansan 6e2c381d90 Update generate_godot_openapi.py to pass base_url as parameter to _init 2026-05-20 21:23:09 +02:00
Sansan efca22834b Update generate_godot_openapi.py to take file input and generate one file per API tag 2026-05-20 21:19:20 +02:00
Sansan e57609725e Add Swag annotations to all handler endpoints for OpenAPI documentation 2026-05-18 21:50:53 +02:00
Sansan fabd6a6931 Fix OpenAPI endpoint to serve swagger.json directly 2026-05-18 21:46:51 +02:00
Sansan f03e001bdd Add swag-generate to justfile and include in build 2026-05-18 21:44:58 +02:00
Sansan 1d77ae491c Add OpenAPI endpoint at /openapi with Swagger documentation 2026-05-18 21:43:06 +02:00
Sansan c0d1aaa4d1 Update Echo framework to v5.1.1 2026-05-18 21:36:50 +02:00
Sansan 76aaa884fa Change domain from sanplex.tech to sanplex.xyz 2026-05-18 21:27:34 +02:00
Sansan 290d79ef5e Changed how time are sent to frontend during sync
Build / build (push) Successful in 40s
2025-11-15 14:55:03 +01:00
Sansan aa0b8275e7 Fix so that ending slash doesn't matter for characters path
Build / build (push) Successful in 40s
2025-11-08 12:04:44 +01:00
Sansan c369b13fae Added characters to Dockerfile
Build / build (push) Successful in 39s
Publish / publish (push) Successful in 47s
2025-11-08 11:54:51 +01:00
Sansan bef915ac6d Fixed gitea script
Build / build (push) Successful in 39s
2025-11-07 21:10:40 +01:00
Sansan cff777f278 Small fixes to getting character images
Build / build (push) Successful in 44s
Publish / publish (push) Successful in 51s
2025-11-07 20:24:46 +01:00
Sansan 61cab73ffc Small fix to update song played
Build / build (push) Successful in 50s
2025-10-26 20:40:48 +01:00
Sansan a6294e46f2 Small changes to sync progress
Build / build (push) Successful in 52s
2025-09-19 22:10:27 +02:00
Sansan 5f91643b4d Added time to sync and progress respond
Build / build (push) Successful in 1m58s
2025-08-30 13:36:45 +02:00
Sansan 806e88adeb #1 - Created request to check newest version of the app
Build / build (push) Successful in 2m35s
#2 - Added request to download the newest version of the app
#3 - Added request to check progress during sync
#4 - Now blocking all request while sync is in progress
#5 - Implemented ants for thread pooling
#6 - Changed the sync request to now only start the sync
2025-08-23 11:36:03 +02:00
214 changed files with 12297 additions and 35293 deletions

No files matched your search

+1 -1
View File
@@ -6,7 +6,7 @@ tmp_dir = "tmp"
bin = "./tmp/main" bin = "./tmp/main"
cmd = "go build -o ./tmp/main ./cmd" cmd = "go build -o ./tmp/main ./cmd"
delay = 1000 delay = 1000
exclude_dir = ["assets", "tmp", "vendor", "testdata", "frontend", "swagger", "cmd/frontend", "cmd/swagger"] exclude_dir = ["assets", "tmp", "vendor", "testdata", "swagger", "cmd/swagger"]
exclude_file = [] exclude_file = []
exclude_regex = ["_test.go"] exclude_regex = ["_test.go"]
exclude_unchanged = false exclude_unchanged = false
+25
View File
@@ -0,0 +1,25 @@
# Directories
.gitea
git
.idea
testMusic
testCharacters
# Files
Dockerfile
docker-compose*
compose.yaml
.dockerignore
.gitignore
*.pprof
main
conf.yaml
.env
# Test files and fixtures
*_test.go
internal/testutil
*_dump.sql
# OS
.DS_Store
+28 -20
View File
@@ -1,40 +1,48 @@
name: Build name: Build
run-name: ${{ gitea.actor }} is runs ci pipeline
#on:
# release:
# types: [published]
on: on:
push: push:
branches: [main, develop] branches:
- main
- develop
jobs: jobs:
# test: test:
# runs-on: ubuntu-latest
# steps:
# - run: echo "The release ${{ gitea.ref }} ${{ gitea.ref_name }} was published"
build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: https://github.com/actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Generate templ components
run: go tool templ generate
- name: Vet
run: go vet ./...
- name: Unit tests
run: go test -race ./...
docker:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
with: with:
config-inline: | config-inline: |
[registry."gitea.sanplex.tech/sansan"] [registry."gitea.sanplex.xyz/sansan"]
http = true http = true
insecure = true insecure = true
- name: Login to Gitea - name: Login to Gitea
uses: docker/login-action@v2 uses: docker/login-action@v3
with: with:
registry: gitea.sanplex.tech registry: gitea.sanplex.xyz
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
password: ${{ secrets.TOKEN }} password: ${{ secrets.TOKEN }}
- name: Build - name: Build
uses: https://github.com/docker/build-push-action@v5 uses: docker/build-push-action@v6
with: with:
context: . context: .
file: ./Dockerfile file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: false push: false
#tags: "gitea.sanplex.tech/sansan/musicserver:${{gitea.ref_name}}, gitea.sanplex.tech/sansan/musicserver:latest"
+28 -19
View File
@@ -1,41 +1,50 @@
name: Publish name: Publish
run-name: ${{ gitea.actor }} is runs ci pipeline
#on:
# release:
# types: [published]
on: on:
push: push:
branches: branches:
- '*.*' - '*.*'
jobs: jobs:
# test: test:
# runs-on: ubuntu-latest
# steps:
# - run: echo "The release ${{ gitea.ref }} ${{ gitea.ref_name }} was published"
publish:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: https://github.com/actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Generate templ components
run: go tool templ generate
- name: Vet
run: go vet ./...
- name: Unit tests
run: go test -race ./...
publish:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
with: with:
config-inline: | config-inline: |
[registry."gitea.sanplex.tech/sansan"] [registry."gitea.sanplex.xyz/sansan"]
http = true http = true
insecure = true insecure = true
- name: Login to Gitea - name: Login to Gitea
uses: docker/login-action@v2 uses: docker/login-action@v3
with: with:
registry: gitea.sanplex.tech registry: gitea.sanplex.xyz
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
password: ${{ secrets.TOKEN }} password: ${{ secrets.TOKEN }}
- name: Build and push Docker image - name: Build and push Docker image
uses: https://github.com/docker/build-push-action@v5 uses: docker/build-push-action@v6
with: with:
context: . context: .
file: ./Dockerfile file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true push: true
tags: "gitea.sanplex.tech/sansan/musicserver:${{gitea.ref_name}}, gitea.sanplex.tech/sansan/musicserver:latest" tags: |
gitea.sanplex.xyz/sansan/musicserver:${{ gitea.ref_name }}
gitea.sanplex.xyz/sansan/musicserver:latest
+18
View File
@@ -0,0 +1,18 @@
name: Integration Tests
on:
workflow_dispatch: # Manual trigger only
jobs:
integration-test:
# Needs access to a Docker daemon: the tests start PostgreSQL with testcontainers.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Generate templ components
run: go tool templ generate
- name: Integration tests
run: go test -tags integration -race -timeout 15m ./...
+3 -5
View File
@@ -3,12 +3,10 @@ tmp
.idea .idea
*templ.go *templ.go
conf.yaml conf.yaml
output.css
compose.yaml compose.yaml
tailwindcss
.env .env
node_modules
package.json
package-lock.json
cpu.pprof cpu.pprof
main main
# Database dumps
*_dump.sql
-8
View File
@@ -1,8 +0,0 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
-16
View File
@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="Go" enabled="true">
<buildTags>
<option name="customFlags">
<array>
<option value="prod" />
</array>
</option>
</buildTags>
</component>
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
-5
View File
@@ -1,5 +0,0 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>
-29
View File
@@ -1,29 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="music_prod@192.168.86.100" uuid="e63caf71-2b1a-400d-9cc4-4b87b1f9b807">
<driver-ref>postgresql</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.postgresql.Driver</jdbc-driver>
<jdbc-url>jdbc:postgresql://192.168.86.100:5432/music_prod</jdbc-url>
</data-source>
<data-source source="LOCAL" name="music_test@192.168.86.100" uuid="d063e147-d7f0-48db-9f04-57a108261ef1">
<driver-ref>postgresql</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.postgresql.Driver</jdbc-driver>
<jdbc-url>jdbc:postgresql://192.168.86.100:5432/music_test</jdbc-url>
</data-source>
<data-source source="LOCAL" name="music_test@ssh.sanplex.xyz" uuid="a9cf3eb8-abc2-479b-9f27-12b4cbbfc321">
<driver-ref>postgresql</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.postgresql.Driver</jdbc-driver>
<jdbc-url>jdbc:postgresql://ssh.sanplex.xyz:9432/music_test</jdbc-url>
</data-source>
<data-source source="LOCAL" name="music_prod@ssh.sanplex.xyz" uuid="20917ace-4e9a-4273-bdb7-13ebc774cbba">
<driver-ref>postgresql</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.postgresql.Driver</jdbc-driver>
<jdbc-url>jdbc:postgresql://ssh.sanplex.xyz:9432/music_prod</jdbc-url>
</data-source>
</component>
</project>
-8
View File
@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/MusicServer.iml" filepath="$PROJECT_DIR$/.idea/MusicServer.iml" />
</modules>
</component>
</project>
Generated
-6
View File
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
+31 -28
View File
@@ -1,36 +1,39 @@
FROM golang:1.23-alpine as build_go # The frontend is built and published separately; override to pin a version.
RUN apk add --no-cache curl npm ARG FRONTEND_IMAGE=gitea.sanplex.xyz/sansan/musicfrontend:latest
# Stage 1: Build the backend on the build machine and cross-compile for the target platform,
# so multi-platform builds need no emulation.
FROM --platform=$BUILDPLATFORM golang:1.25-alpine AS build
ARG TARGETOS TARGETARCH
WORKDIR /app WORKDIR /app
COPY go.mod go.sum ./ COPY go.mod go.sum ./
RUN go mod download RUN go mod download
COPY cmd/ ./cmd/
COPY internal/ ./internal/
RUN go tool templ generate
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH \
go build -trimpath -ldflags="-s -w" -tags timetzdata -o main ./cmd
COPY . . # Stage 2: Frontend static files (the same for every platform)
FROM --platform=$BUILDPLATFORM ${FRONTEND_IMAGE} AS frontend
# Empty API_HOSTNAME makes the frontend use relative paths
RUN echo "window.__RUNTIME_CONFIG__ = { API_HOSTNAME: '' };" > /usr/share/nginx/html/config.js
RUN go install github.com/a-h/templ/cmd/templ@latest # Stage 3: Final image. No RUN steps here, so no emulation is needed for other architectures.
RUN npm install tailwindcss @tailwindcss/cli FROM alpine:3.22
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
RUN templ generate WORKDIR /app
RUN npx @tailwindcss/cli -i ./cmd/web/assets/css/input.css -o ./cmd/web/assets/css/output.css COPY --from=build /app/main .
COPY --from=frontend /usr/share/nginx/html /frontend
RUN go build -o main cmd/main.go
# Stage 2, distribution container
FROM golang:1.23-alpine
EXPOSE 8080
VOLUME /sorted
VOLUME /frontend
ENV PORT 8080
ENV DB_HOST ""
ENV DB_PORT ""
ENV DB_USERNAME ""
ENV DB_PASSWORD ""
ENV DB_NAME ""
ENV MUSIC_PATH ""
COPY --from=build_go /app/main .
COPY ./songs/ ./songs/ COPY ./songs/ ./songs/
CMD ./main # The music volume must be readable by uid 1000, and writable for the .id file cleanup during sync.
USER 1000:1000
EXPOSE 8080
VOLUME /sorted
VOLUME /characters
# Required: DB_HOST, DB_PORT, DB_USERNAME, DB_PASSWORD, DB_NAME, MUSIC_PATH, CHARACTERS_PATH
ENV PORT=8080
CMD ["./main"]
-8
View File
@@ -1,8 +0,0 @@
application: musicserver
version: 2.2.0
runtime: go115
api_version: go1
handlers:
- url: /.*
script: _go_app
+1503 -9
View File
File diff suppressed because it is too large. Load diff
+224
View File
@@ -0,0 +1,224 @@
#!/usr/bin/env python3
import argparse
import json
import re
from pathlib import Path
from collections import defaultdict
def load_openapi_spec(path: str) -> dict:
"""Load OpenAPI spec from YAML or JSON file."""
try:
import yaml
with open(path, "r") as f:
return yaml.safe_load(f)
except ImportError:
# Fallback to JSON if PyYAML is not installed
with open(path, "r") as f:
return json.load(f)
def map_type(openapi_type: str) -> str:
"""Map OpenAPI types to GDScript types."""
type_mapping = {
"integer": "int",
"number": "float",
"boolean": "bool",
"array": "Array",
"object": "Dictionary",
}
return type_mapping.get(openapi_type, "String")
def default_value(openapi_type: str):
"""Return default values for GDScript types."""
default_mapping = {
"integer": "0",
"number": "0.0",
"boolean": "false",
"array": "[]",
"object": "{}",
}
return default_mapping.get(openapi_type, '""')
def sanitize_class_name(name: str) -> str:
"""Convert a name to a valid GDScript class name."""
# Replace invalid characters with underscores
name = re.sub(r"[^a-zA-Z0-9_]", "_", name)
# Capitalize first letter
return name[0].upper() + name[1:] if name else "Model"
def generate_model_class(class_name: str, schema: dict) -> str:
"""Generate a GDScript class for a model."""
lines = [
f"class_name {class_name}",
"extends RefCounted",
"",
]
# Add properties
properties = schema.get("properties", {})
for prop_name, prop_schema in properties.items():
prop_type = map_type(prop_schema.get("type", "string"))
lines.append(f"var {prop_name}: {prop_type}")
# Add _init method
lines.extend([
"",
"func _init(data: Dictionary):",
])
for prop_name in properties:
prop_type = map_type(properties[prop_name].get("type", "string"))
default = default_value(properties[prop_name].get("type", "string"))
lines.append(f' {prop_name} = data.get("{prop_name}", {default})')
return "\n".join(lines)
def generate_api_client(path: str, method: str, endpoint: dict) -> str:
"""Generate a GDScript API client for an endpoint."""
# Sanitize path for class name
class_name = sanitize_class_name(path.replace("/", "_").replace("{", "").replace("}", "")) + method.capitalize()
# Format URL (replace {param} with %s for Godot's string formatting)
url = path.replace("{", "%").replace("}", "s")
full_url = f'"{BASE_URL}{url}"'
lines = [
f"class_name {class_name}",
"extends RefCounted",
"",
"var http_request: HTTPRequest",
"",
"func _init(node: Node):",
" http_request = HTTPRequest.new()",
" node.add_child(http_request)",
' http_request.connect("request_completed", self, "_on_request_completed")',
"",
f"func call(params: Dictionary, callback: Callable):",
f" var url := {full_url}",
' var headers = ["User-Agent: MyGodotApp"]',
" var error := http_request.request(url, headers)",
" if error != OK:",
' push_error("HTTP request failed.")',
" return",
" http_request.set_meta(\"callback\", callback)",
"",
"func _on_request_completed(result: int, response_code: int, headers: PoolStringArray, body: PoolByteArray):",
" var callback := http_request.get_meta(\"callback\")",
" if callback:",
" var response_body = body.get_string_from_utf8()",
" var json = JSON.new()",
" if json.parse(response_body) == OK:",
" callback.call(json.get_data())",
" else:",
" callback.call(null)",
]
return "\n".join(lines)
def generate_tag_client(tag: str, endpoints: list) -> str:
"""Generate a GDScript API client for all endpoints with a given tag."""
class_name = sanitize_class_name(tag) + "API"
lines = [
f"class_name {class_name}",
"extends RefCounted",
"",
"var http_request: HTTPRequest",
"var base_url: String",
"",
"func _init(node: Node, base_url_param: String):",
" http_request = HTTPRequest.new()",
" node.add_child(http_request)",
' http_request.connect("request_completed", self, "_on_request_completed")',
" base_url = base_url_param",
"",
]
# Generate a method for each endpoint
for path, method, endpoint in endpoints:
# Sanitize method name for GDScript
method_name = method.lower()
# Create a valid function name from the path
func_name = "call_" + path.replace("/", "_").replace("{", "").replace("}", "").replace("-", "_")
# Format URL (replace {param} with %s for Godot's string formatting)
url = path.replace("{", "%").replace("}", "s")
lines.extend([
f"func {func_name}(params: Dictionary = {{}}, callback: Callable):",
f' var url := base_url + "{url}"',
' var headers = ["User-Agent: MyGodotApp"]',
f" var error := http_request.request(url, headers, false, HTTPClient.METHOD_{method.upper()})",
" if error != OK:",
' push_error("HTTP request failed.")',
" return",
" http_request.set_meta(\"callback\", callback)",
"",
])
# Add the completion handler
lines.extend([
"func _on_request_completed(result: int, response_code: int, headers: PoolStringArray, body: PoolByteArray):",
" var callback := http_request.get_meta(\"callback\")",
" if callback:",
" var response_body = body.get_string_from_utf8()",
" var json = JSON.new()",
" if json.parse(response_body) == OK:",
" callback.call(json.get_data())",
" else:",
" callback.call(null)",
])
return "\n".join(lines)
def generate_code(spec: dict, output_dir: str):
"""Generate all GDScript files from the OpenAPI spec."""
# Create output directory
Path(output_dir).mkdir(parents=True, exist_ok=True)
# Generate models
schemas = spec.get("definitions", {}) # Swagger 2.0 uses "definitions"
if not schemas:
schemas = spec.get("components", {}).get("schemas", {})
for schema_name, schema in schemas.items():
class_name = sanitize_class_name(schema_name)
code = generate_model_class(class_name, schema)
output_path = Path(output_dir) / f"{class_name}.gd"
with open(output_path, "w") as f:
f.write(code)
print(f"Generated model: {output_path}")
# Group endpoints by tag
paths = spec.get("paths", {})
tag_endpoints = defaultdict(list)
for path, methods in paths.items():
for method, endpoint in methods.items():
tags = endpoint.get("tags", ["default"])
for tag in tags:
tag_endpoints[tag].append((path, method, endpoint))
# Generate one file per tag
for tag, endpoints in tag_endpoints.items():
code = generate_tag_client(tag, endpoints)
class_name = sanitize_class_name(tag) + "API"
output_path = Path(output_dir) / f"{class_name}.gd"
with open(output_path, "w") as f:
f.write(code)
print(f"Generated API client for tag '{tag}': {output_path}")
def main():
parser = argparse.ArgumentParser(description="Generate Godot API clients from OpenAPI spec")
parser.add_argument("input", help="Path to the OpenAPI JSON/YAML file")
parser.add_argument("-o", "--output", default="godot_generated", help="Output directory for GDScript files")
args = parser.parse_args()
spec = load_openapi_spec(args.input)
generate_code(spec, args.output)
print("Done!")
print("Note: When initializing the API classes, pass the base URL as a parameter:")
print(" var music_api = MusicAPI.new()")
print(" music_api._init(get_node('/root'), 'http://localhost:8080')")
if __name__ == "__main__":
main()
+1502 -8
View File
File diff suppressed because it is too large. Load diff
+991 -8
View File
File diff suppressed because it is too large. Load diff
-21
View File
@@ -1,21 +0,0 @@
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
-24
View File
@@ -1,24 +0,0 @@
# music-randomizer-vue
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
-5
View File
@@ -1,5 +0,0 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
-26
View File
@@ -1,26 +0,0 @@
const express = require("express");
const path = require("path");
const routes = require("./routes.js");
const app = express();
const cors = require("cors");
/* const bodyParser = require("body-parser"); */
const PORT = process.env.PORT || 5005;
const mainUrl = "test";
console.log(`Server started on port ${PORT}`);
//app.use(bodyParser.json());
//Routes
/* app.use(express.static(path.join(__dirname, "public"))); */
/* app.use(express.static(path.join(__dirname, "assets"))); */
app.use(express.static(path.join(__dirname)));
app.use(express.static(path.join(__dirname, "dist")));
/* app.use(express.static(path.join(__dirname, "public"))); */
/* console.log(__dirname); */
app.use(cors());
app.use(routes);
app.listen(PORT, "0.0.0.0");
-29100
View File
File diff suppressed because it is too large. Load diff
-51
View File
@@ -1,51 +0,0 @@
{
"name": "music-randomizer-vue",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.21.1",
"config.js": "^0.1.0",
"core-js": "^3.8.2",
"cors": "^2.8.5",
"express": "^4.17.1",
"nodemon": "^2.0.7",
"vue": "^3.0.5",
"vue-axios": "^3.2.2",
"vuex": "^4.0.0-rc.2"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.5.10",
"@vue/cli-plugin-eslint": "^4.5.10",
"@vue/cli-service": "^4.5.10",
"@vue/compiler-sfc": "^3.0.5",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^7.4.1"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/vue3-essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {
"no-debugger": 1
}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black" width="36px" height="36px"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/></svg>

Before

Width:  |  Height:  |  Size: 330 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 788 B

Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

-19
View File
@@ -1,19 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black" width="36px" height="36px"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"/></svg>

Before

Width:  |  Height:  |  Size: 212 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black" width="36px" height="36px"><path d="M0 0h24v24H0z" fill="none"/><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"/></svg>

Before

Width:  |  Height:  |  Size: 201 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" viewBox="0 0 24 24" fill="black" width="36px" height="36px"><g><rect fill="none" height="24" width="24"/></g><g><path d="M13,8c0-2.21-1.79-4-4-4S5,5.79,5,8s1.79,4,4,4S13,10.21,13,8z M15,10v2h3v3h2v-3h3v-2h-3V7h-2v3H15z M1,18v2h16v-2 c0-2.66-5.33-4-8-4S1,15.34,1,18z"/></g></svg>

Before

Width:  |  Height:  |  Size: 352 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" viewBox="0 0 24 24" fill="black" width="36px" height="36px"><g><rect fill="none" height="24" width="24"/></g><g><path d="M14,8c0-2.21-1.79-4-4-4S6,5.79,6,8s1.79,4,4,4S14,10.21,14,8z M17,10v2h6v-2H17z M2,18v2h16v-2c0-2.66-5.33-4-8-4 S2,15.34,2,18z"/></g></svg>

Before

Width:  |  Height:  |  Size: 333 B

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
View File
Whitespace-only changes.
-147
View File
@@ -1,147 +0,0 @@
<template>
<the-header @start-sound-test="startSoundTest"></the-header>
<the-main ref="theMain"></the-main>
</template>
<script>
import TheHeader from "./components/layout/TheHeader.vue";
import TheMain from "./components/layout/TheMain.vue";
export default {
components: {
TheHeader,
TheMain,
},
data() {
return {
screenWidth: 1000,
};
},
computed: {
displayWhenDesktop() {
if (this.screenWidth > 600) {
return true;
} else {
return false;
}
},
},
methods: {
startSoundTest() {
this.$refs.theMain.startSoundTest();
},
},
mounted() {
this.screenWidth = window.innerWidth;
window.addEventListener("resize", () => (this.screenWidth = window.innerWidth));
},
};
</script>
<style>
* {
margin: 0;
padding: 0;
font-family: Helvetica;
}
button {
background: rgb(54, 54, 54);
border-radius: 10px;
border-color: #ff9c00;
color: #ff9c00;
font-size: 1em;
padding: 10px;
outline: none;
}
.app {
display: flex;
height: 100vh;
}
body {
background-color: #555;
}
/* Global modal stuff */
.modalAni-enter-from,
.modalAni-leave-to {
opacity: 0;
transform: translateY(-20px);
}
.modalAni-enter-to,
.modalAni-leave-from {
opacity: 1;
}
.modalAni-enter-active,
.modalAni-leave-active {
transition: all 0.25s ease-out;
}
.modal {
position: fixed; /* Stay in place */
z-index: 10; /* Sit on top */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: hidden;
background-color: rgb(0, 0, 0); /* Fallback color */
background-color: rgba(0, 0, 0, 0.5); /* Black w/ opacity */
}
.modalContainer {
background-color: #eeeeee;
margin: 10% auto; /* 15% from the top and centered */
border: 1px solid #888;
width: 50%; /* Could be more or less, depending on screen size */
}
.modalWrapper {
display: flex;
position: relative;
flex-wrap: wrap;
padding: 10px 40px;
}
.modalWrapper:last-child {
margin-bottom: 50px;
}
.closeModalImg {
position: absolute;
right: 8px;
top: 8px;
cursor: pointer;
opacity: 70%;
}
.modal h1 {
color: black;
margin-left: auto;
margin-right: auto;
padding-top: 10px;
font-size: 1.9rem;
}
.modal p {
color: black;
}
@media only screen and (max-width: 1000px) {
.modalContainer {
margin: 10% auto; /* 15% from the top and centered */
width: 93%; /* Could be more or less, depending on screen size */
}
.modalWrapper {
padding: 10px 10px;
}
.modalWrapper:last-child {
margin-bottom: 10px;
}
.modal h1 {
padding-top: 10px;
font-size: 1.6rem;
}
}
</style>
-3
View File
@@ -1,3 +0,0 @@
export default {
hostname: "$HOSTNAME",
}
@@ -1,95 +0,0 @@
<template>
<!-- <div class="currentlyPlayingDiv">
<div class="textWrapper">
<transition-group name="displayingInfo" appear>
<p v-if="currentTrackHidden" :key="1">????????</p>
<p v-else :key="2">{{ currentGame }}</p>
<p v-if="currentTrackHidden" :key="3">??????</p>
<p v-else :key="4">{{ currentTrack }}</p>
</transition-group>
</div>
</div> -->
<div class="currentlyPlayingDiv">
<transition name="displayingInfo">
<div v-if="currentTrackHidden" class="textWrapper">
<p>????????</p>
<p>??????</p>
</div>
<div v-else class="textWrapper">
<p>{{ currentGame }}</p>
<p>{{ currentTrack }}</p>
</div>
</transition>
</div>
</template>
<script>
import { mapState } from "vuex";
export default {
computed: {
...mapState(["currentGame", "currentTrack", "currentTrackHidden"]),
},
};
</script>
<style scoped>
.displayingInfo-enter-from,
.displayingInfo-leave-to {
opacity: 0;
}
.displayingInfo-enter-to,
.displayingInfo-leave-from {
opacity: 1;
}
.displayingInfo-enter-active {
transition: opacity 0.7s ease-out;
}
.displayingInfo-leave-active {
display: none;
}
.currentlyPlayingDiv {
display: flex;
flex-wrap: wrap;
justify-content: center;
width: 60vw;
height: 27vh;
margin-right: 0.5vw;
color: #ff8800;
background-color: #333;
border-radius: 10px;
text-align: center;
overflow: hidden;
}
.currentlyPlayingDiv .textWrapper {
padding: 0.75vw;
}
.currentlyPlayingDiv .textWrapper p {
width: 100%;
font-size: 2.3em;
}
.currentlyPlayingDiv p:first-child {
margin-top: 1.5vw;
margin-bottom: 1.5vw;
font-size: 2.8em;
}
@media only screen and (max-width: 1000px) {
.currentlyPlayingDiv {
width: 100vw;
height: 35vw;
margin-right: 0;
border-radius: 0px;
align-content: center;
}
.currentlyPlayingDiv .textWrapper p {
font-size: 1.1em;
}
.currentlyPlayingDiv p:first-child {
margin-bottom: 2vw;
font-size: 1.4em;
}
}
</style>
@@ -1,170 +0,0 @@
<template>
<div class="inspirationDiv">
<div class="inspirationHeader">
<div class="inspirationTitle">
<h1>Inspiration</h1>
</div>
<div class="searchInput">
<input
v-model="searchInputText"
type="text"
@input="searchGame()"
ref="inputField"
/>
</div>
<button @click="clearSearch()">Clear</button>
</div>
<transition-group
tag="ul"
name="inspirationList"
class="inspirationList"
ref="inspirationList"
>
<li v-for="game in showingGamesList" class="inspirationEntry" :key="game">
{{ game }}
</li>
</transition-group>
</div>
</template>
<script>
import arne from '../../arne.js'
import {mapState} from "vuex";
export default {
data() {
return {
allGamesList: [],
showingGamesList: [],
scrollDown: true,
searchInputText: "",
};
},
computed: {
...mapState(["reloadGamesList"]),
},
watch: {
reloadGamesList(newValue) {
if (newValue) {
this.reloadGames();
this.$store.dispatch("reloadGamesList", false);
}
}
},
methods: {
clearSearch() {
this.searchInputText = "";
this.searchGame();
},
searchGame() {
this.showingGamesList = [];
for (const game of this.allGamesList) {
if (this.searchInputText === "" ||
game.toLowerCase().replace(/\s/g, "")
.includes(this.searchInputText.toLowerCase().replace(/\s/g, ""))) {
this.showingGamesList.push(game);
}
}
if (this.searchInputText.replace(/\s/g, "") !== "") {
this.showingGamesList.sort((n1, n2) => {
if (n1 > n2) {
return 1;
}
if (n1 < n2) {
return -1;
}
return 0;
});
}
},
scrollInspiration() {
let inspirationListDOM = document.querySelector(".inspirationList");
let scrollSpeed = 1;
let currentScrollLocation = 0;
currentScrollLocation = inspirationListDOM.scrollTop;
this.scrollDown
? inspirationListDOM.scrollBy(0, scrollSpeed)
: inspirationListDOM.scrollBy(0, -scrollSpeed);
if (currentScrollLocation === inspirationListDOM.scrollTop) {
this.scrollDown = !this.scrollDown;
}
},
reloadGames() {
this.axios({
method: "get",
url: `${arne.hostname}/music/all`,
})
.then((response) => {
this.allGamesList = response.data;
this.searchInputText = "";
this.searchGame();
this.$store.dispatch("updateHowManyGames", this.allGamesList.length);
})
.catch(function(error) {
console.log(error);
});
}
},
mounted() {
this.reloadGames();
window.setInterval(() => {
this.scrollInspiration();
}, 40);
},
};
</script>
<style scoped>
.inspirationDiv {
width: 38vw;
height: 20vh;
color: white;
}
.inspirationTitle {
display: flex;
flex: auto;
align-items: flex-start;
justify-content: flex-start;
padding: 5px 10px;
}
.searchInput {
display: flex;
flex: auto;
align-items: flex-end;
justify-content: flex-end;
padding: 0 10px;
}
.inspirationHeader {
display: flex;
background-color: #333;
height: 5vh;
justify-content: center;
align-items: center;
}
.inspirationList {
display: inline-block;
background-color: rgb(66, 66, 66);
width: 38vw;
height: 22vh;
list-style: none;
overflow: hidden;
}
.inspirationEntry {
width: 100%;
max-width: 38vw;
padding: 0.3vh 0.8vh;
font-size: 1.2rem;
}
@media only screen and (max-width: 1000px) {
.inspirationDiv {
display: none;
}
}
</style>
@@ -1,78 +0,0 @@
<template>
<transition name="modalAni">
<div v-if="show" class="modal" @click="checkIfClickShouldCloseModal">
<div class="modalContainer">
<div class="modalWrapper">
<img
class="closeModalImg"
src="cancel-black-36dp.svg"
alt="closeModalIMG"
@click="closeModal"
/>
<h1>Music Player Randomizer v0.1</h1>
<p class="descriptionText">
Try your video game music knowledge with this VGM randomizer,
invite your friends and see who is the best.
</p>
<p class="creditText">
Back-end done by Sebastian Olsson,
<a href="https://twitter.com/Raida91">Twitter</a>
</p>
<p class="creditText">
Front-end done by Peter Johansson,
<a href="https://twitter.com/WebDevPJ">Twitter</a>
</p>
<!-- <p class="patchNotesText">
Full patch notes can be found
<a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ">here</a>
</p> -->
</div>
</div>
</div>
</transition>
</template>
<script>
export default {
data() {
return {
show: false,
};
},
methods: {
closeModal() {
this.show = false;
},
openModal() {
this.show = true;
},
checkIfClickShouldCloseModal(event) {
if (event.target.classList[0] === "modal") {
this.closeModal();
}
},
},
};
</script>
<style scoped>
p {
font-size: 1.2rem;
width: 100%;
}
.descriptionText {
margin-top: 35px;
}
.creditText {
margin-top: 30px;
}
.creditText:nth-child(5) {
margin-top: 0px;
}
.patchNotesText {
margin-top: 20px;
}
</style>
@@ -1,160 +0,0 @@
<template>
<transition name="modalAni">
<div v-if="show" class="modal" @click="checkIfClickShouldCloseModal">
<div class="modalContainer">
<div class="modalWrapper">
<img
class="closeModalImg"
src="cancel-black-36dp.svg"
alt="closeModalIMG"
@click="closeModal"
/>
<h1 @click="test">{{ playerName }}, choose your fighter!</h1>
<div class="fighterDiv">
<div class="fighter" @click="chooseFighter('Adol')">
<img src="characters/Adol.png" alt="adol" />
<p>Adol Christin</p>
</div>
<div class="fighter" @click="chooseFighter('Link')">
<img src="characters/Link.png" alt="link" />
<p>Link</p>
</div>
<div class="fighter" @click="chooseFighter('Barbarian')">
<img src="characters/Barbarian.png" alt="barbarian" />
<p>Barbarian</p>
</div>
<div class="fighter" @click="chooseFighter('Layton')">
<img src="characters/Layton.png" alt="layton" />
<p>Professor Layton</p>
</div>
<div class="fighter" @click="chooseFighter('Kiryu')">
<img src="characters/Kiryu.png" alt="kiryu" />
<p>Kazuma Kiryu</p>
</div>
<div class="fighter" @click="chooseFighter('Miles')">
<img src="characters/Miles.png" alt="miles" />
<p>Miles Edgeworth</p>
</div>
<div class="fighter" @click="chooseFighter('Lemmings')">
<img src="characters/Lemmings.png" alt="lemmings" />
<p>Lemmings</p>
</div>
<div class="fighter" @click="chooseFighter('Samus')">
<img src="characters/Samus.png" alt="samus" />
<p>Samus</p>
</div>
<div class="fighter" @click="chooseFighter('Kratos')">
<img src="characters/Kratos.png" alt="kratos" />
<p>Kratos</p>
</div>
<div class="fighter" @click="chooseFighter('Aloy')">
<img src="characters/Aloy.png" alt="aloy" />
<p>Aloy</p>
</div>
<div class="fighter" @click="chooseFighter('Sora')">
<img src="characters/Sora.png" alt="sora" />
<p>Sora</p>
</div>
<div class="fighter" @click="chooseFighter('Raiden')">
<img src="characters/Raiden.png" alt="raiden" />
<p>Raiden</p>
</div>
<div class="fighter" @click="chooseFighter('PaperMario')">
<img src="characters/PaperMario.png" alt="paper mario" />
<p>Paper Mario</p>
</div>
</div>
</div>
</div>
</div>
</transition>
</template>
<script>
export default {
data() {
return {
show: false,
playerName: "",
};
},
methods: {
closeModal() {
this.show = false;
},
openModal(playerName) {
this.playerName = playerName;
this.show = true;
},
checkIfClickShouldCloseModal(event) {
if (event.target.classList[0] === "modal") {
this.closeModal();
}
},
chooseFighter(profilePicSrc) {
let payload = {
playerName: this.playerName,
profile: "characters/" + profilePicSrc + ".png",
};
this.$store.dispatch("changePlayerProfile", payload);
this.closeModal();
},
},
};
</script>
<style scoped>
.modalContainer {
width: 80%; /* Could be more or less, depending on screen size */
}
.fighterDiv {
display: flex;
width: 100%;
justify-content: center;
margin-top: 30px;
flex-wrap: wrap;
}
.fighterDiv img {
width: 180px;
height: 90px;
}
.fighter {
display: flex;
flex-wrap: wrap;
justify-content: center;
text-align: center;
width: 14vw;
margin-top: 30px;
}
.fighter > * {
width: 100%;
}
.fighter:hover {
outline: 1px solid rgb(128, 83, 0);
outline-offset: 2px;
cursor: pointer;
}
.fighter p {
margin-top: 8px;
font-size: 1.3rem;
}
@media only screen and (max-width: 1000px) {
.modalContainer {
width: 95%; /* Could be more or less, depending on screen size */
}
.fighterDiv {
margin-top: 30px;
}
.fighterDiv img {
width: 80px;
height: 40px;
}
.fighter {
width: 25vw;
}
}
</style>
@@ -1,111 +0,0 @@
<template>
<div class="extraButtonsDiv">
<button @click="resetPlaylist">Reset playlist</button>
<button @click="resetPoints">Reset points</button>
<button @click="syncGames">Sync games</button>
<button @click="startSoundTest">Sound test</button>
</div>
</template>
<script>
import arne from '../../arne.js'
export default {
data() {
return {
emptyPlaylist: [],
};
},
methods: {
async resetPoints() {
this.$store.dispatch("resetPlayerScore");
this.$store.dispatch("resetPlayerWelcomed");
this.$store.dispatch("resetPlayerMatchPoint");
this.$store.dispatch("setRoundStarted", false);
},
async resetPlaylist() {
await this.APIresetPlaylist();
this.$store.dispatch("updatePlaylistHistory", this.emptyPlaylist);
this.$store.dispatch("setCurrentlyLoadingTrack", "N/A");
this.$store.dispatch("setCurrentTrackHidden", false);
},
async syncGames() {
await this.APIsyncGames();
await this.APIresetPlaylist();
this.$store.dispatch("resetPlayerScore");
this.$store.dispatch("resetPlayerWelcomed");
this.$store.dispatch("resetPlayerMatchPoint");
this.$store.dispatch("setRoundStarted", false);
this.$store.dispatch("updatePlaylistHistory", this.emptyPlaylist);
this.$store.dispatch("setCurrentlyLoadingTrack", "N/A");
this.$store.dispatch("setCurrentTrackHidden", false);
this.$store.dispatch("reloadGamesList", true);
},
startSoundTest() {
this.$emit("start-sound-test");
},
APIresetPlaylist() {
return new Promise((resolve, reject) => {
this.axios({
method: "get",
url: `${arne.hostname}/music/reset`,
})
.then(() => {
resolve();
})
.catch(function(error) {
console.log(error);
reject();
});
});
},
APIsyncGames() {
return new Promise((resolve, reject) => {
this.axios({
method: "get",
url: `${arne.hostname}/sync`,
})
.then(() => {
resolve();
})
.catch(function(error) {
console.log(error);
reject();
});
});
},
},
};
</script>
<style scoped>
.extraButtonsDiv {
display: flex;
margin-top: 2px;
margin-left: 10px;
}
button {
display: flex;
align-items: center;
height: 65%;
margin-right: 0.4vw;
border-radius: 10px;
border-width: 1px;
}
@media only screen and (max-width: 1000px) {
.extraButtonsDiv {
display: flex;
position: relative;
flex-wrap: wrap;
justify-content: center;
}
button {
width: 51vw;
height: 40px;
margin-bottom: 10px;
justify-content: center;
}
}
</style>
@@ -1,136 +0,0 @@
<template>
<div
v-if="show"
class="mobileMenu"
@click="checkIfClickShouldCloseMobileMenu"
>
<transition name="mobileMenuAni">
<div v-if="showContent" class="mobileMenuContainer">
<div class="mobileMenuWrapper">
<h1>Menu</h1>
<button class="settingsButton" @click="showSettingsModal">
Settings
</button>
<button class="statisticsButton" @click="showStatisticsModal">
Statistics
</button>
<button class="aboutButton" @click="showAboutModal">
About
</button>
<h1>Control</h1>
<extra-buttons
@start-sound-test="startSoundTest"
></extra-buttons>
</div>
</div>
</transition>
</div>
</template>
<script>
import extraButtons from "./extraButtons.vue";
export default {
components: {
extraButtons,
},
data() {
return {
show: false,
showContent: false,
};
},
methods: {
closeMobileMenu() {
this.showContent = false;
setTimeout(() => {
this.show = false;
}, 250);
},
openMobileMenu() {
this.show = true;
},
openMobileMenuContent() {
this.showContent = true;
},
checkIfClickShouldCloseMobileMenu(event) {
if (event.target.classList[0] === "mobileMenu") {
this.closeMobileMenu();
}
},
showSettingsModal() {
this.show = false;
this.showContent = false;
this.$emit("show-settings-modal");
},
showStatisticsModal() {
this.show = false;
this.showContent = false;
this.$emit("show-statistics-modal");
},
showAboutModal() {
this.show = false;
this.showContent = false;
this.$emit("show-about-modal");
},
startSoundTest() {
this.$emit("start-sound-test");
},
},
};
</script>
<style scoped>
.mobileMenuAni-enter-from,
.mobileMenuAni-leave-to {
opacity: 0.6;
transform: translateX(80vw);
}
.mobileMenuAni-enter-to,
.mobileMenuAni-leave-from {
opacity: 1;
transform: translateX(0vw);
}
.mobileMenuAni-enter-active,
.mobileMenuAni-leave-active {
transition: all 0.3s ease-out;
}
.mobileMenu {
position: fixed;
z-index: 8;
right: 0;
bottom: 0;
width: 100%;
height: 100%;
overflow: hidden;
background-color: rgb(0, 0, 0);
background-color: rgba(0, 0, 0, 0.5);
}
.mobileMenuContainer {
background-color: #c4c4c4;
width: 80vw;
height: 100%;
margin-left: 20%;
}
.mobileMenuWrapper {
display: flex;
position: relative;
flex-wrap: wrap;
justify-content: center;
}
h1 {
margin: 10px 0px;
width: 100%;
text-align: center;
}
button {
width: 51vw;
height: 40px;
margin-bottom: 10px;
}
</style>
@@ -1,354 +0,0 @@
<template>
<div class="playersWindowDiv">
<div @click="toggleDisplay" class="playerListTitle">
<img v-if="display" class="arrow arrowToggle" src="keyboard_arrow_up-black-36dp.svg" />
<img v-else class="arrow arrowToggle" src="keyboard_arrow_down-black-36dp.svg" />
<h1>Players</h1>
<img
src="person_add_alt_1-black-36dp.svg"
alt="addPlayer"
class="addPlayerIMG"
@click="toggleNewPlayerInput()"
/>
</div>
<transition-group tag="div" v-if="display" name="playerList" class="playerList">
<div class="player" v-for="player in listOfPlayers" :key="player.playerName">
<p>{{ player.playerName }}: {{ player.score }}</p>
<img
class="profilePicture"
:src="player.profile"
@click="openCharacterModal(player.playerName)"
/>
<button @click="changeScore(player.playerName, 1)">+1</button>
<button @click="changeScore(player.playerName, -1)">-1</button>
<img
src="person_remove-black-36dp.svg"
@click="removePlayer(player.playerName)"
alt=""
/>
</div>
<div class="newPlayerInput" v-if="showNewPlayerInput === true">
<input
v-model="newPlayerInputText"
type="text"
@keypress.enter="addNewPlayer()"
ref="inputField"
placeholder="Player name"
/>
<button @click="addNewPlayer()">Add</button>
</div>
</transition-group>
<winning-modal ref="winningModal"></winning-modal>
<character-modal ref="characterModal"></character-modal>
</div>
</template>
<script>
import { mapState } from "vuex";
import winningModal from "../items/winningModal.vue";
import characterModal from "../items/characterModal.vue";
export default {
components: {
winningModal,
characterModal,
},
data() {
return {
showNewPlayerInput: false,
newPlayerInputText: "",
display: true,
};
},
computed: {
...mapState(["listOfPlayers", "winningScore"]),
},
methods: {
removePlayer(playerName) {
this.$store.dispatch("removePlayer", playerName);
},
newPlayerValidation() {
/* Validation variables */
let errors = [];
let newName = this.newPlayerInputText;
/* Check for empty value */
if (newName.trim() === "") {
errors.push("No player name was entered");
}
/* Prepare data of players and check for already entered ones */
let copyOfPlayerList = this.listOfPlayers;
let arrayOfPlayers = copyOfPlayerList.map((player) => player.playerName.toLowerCase());
if (arrayOfPlayers.includes(newName.toLowerCase())) {
errors.push("This player already exists");
}
/* Check amount of players */
if (arrayOfPlayers.length > 6) {
errors.push("Too many players already exists");
}
/* If everything went fine, return an empty */
return errors;
},
addNewPlayer() {
let errors = this.newPlayerValidation();
if (errors.length === 0) {
this.$store.dispatch("addNewPlayer", this.newPlayerInputText);
this.newPlayerInputText = "";
} else {
console.log(errors);
}
},
toggleNewPlayerInput() {
this.showNewPlayerInput = !this.showNewPlayerInput;
if (this.showNewPlayerInput === true) {
this.$nextTick(() => this.$refs.inputField.focus());
}
},
changeScore(playerName, score) {
let payload = {
playerName: playerName,
score: score,
};
this.$store.dispatch("changePlayerScore", payload);
for (let i = 0; i < this.listOfPlayers.length; i++) {
/* If a player received their first point */
if (this.listOfPlayers[i].score == 1 && this.listOfPlayers[i].welcomed === false) {
let payload = {
playerName: playerName,
welcomeSet: true,
};
this.$store.dispatch("changePlayerWelcomed", payload);
this.$emit("play-welcome-sound");
}
/* If a player reach match point */
if (this.listOfPlayers[i].score === this.winningScore-1) {
let payload = {
playerName: playerName,
matchPointSet: true,
};
this.$store.dispatch("changePlayerMatchPoint", payload);
this.$emit("play-match-point-sound");
}
/* If a player won */
if (this.listOfPlayers[i].score === this.winningScore) {
this.$refs.winningModal.openModal(this.listOfPlayers[i].playerName);
this.$emit("play-winning-sound");
}
}
},
openCharacterModal(playerName) {
this.$refs.characterModal.openModal(playerName);
},
getProfileSrc(profileToGet) {
console.log(this.listOfPlayers[0]);
let src = `characters/${profileToGet}`;
console.log(src);
return src;
},
toggleDisplay(event) {
if (event.target.classList[0] != "addPlayerIMG") {
if (window.innerWidth < 600) {
this.display = !this.display;
}
}
},
},
};
</script>
<style scoped>
.playerList-enter-from,
.playerList-leave-to {
opacity: 0;
}
.playerList-enter-to,
.playerList-leave-from {
opacity: 1;
}
.playerList-enter-active {
transition: all 0.5s ease-out;
}
.playerList-leave-active {
position: absolute;
transition: all 0.2s ease-in;
}
.playerList-move {
transition: 0.25s;
transition-property: transform, opacity;
}
.playerList-move.newPlayerInput {
transition: 0.2s;
transition-property: transform;
}
/* End of Animation block */
.playersWindowDiv {
display: inline-block;
width: 38vw;
color: white;
}
.playerListTitle {
display: flex;
width: 100%;
background-color: #333;
height: 5vh;
align-content: center;
align-items: center;
text-align: center;
}
.playerListTitle h1 {
text-align: center;
position: relative;
margin-left: auto;
margin-right: auto;
flex-grow: 100;
}
.playerListTitle .addPlayerIMG {
justify-self: flex-end;
margin-left: auto;
margin-right: 5px;
flex-grow: 1;
filter: invert(66%) sepia(96%) saturate(2783%) hue-rotate(1deg) brightness(105%) contrast(103%);
}
.playerListTitle .arrow {
flex-grow: 1;
}
.playerListTitle .arrowToggle {
display: none;
}
.playerList {
display: inline-block;
background-color: rgb(66, 66, 66);
min-height: 37vh;
}
.playerList .player {
display: flex;
flex-wrap: nowrap;
justify-content: flex-end;
width: 38vw;
height: 6vh;
font-size: 1.8rem;
align-content: center;
align-items: center;
}
.playerList .player p {
margin-left: 5px;
margin-right: auto;
}
.playerList .player .profilePicture {
width: 100px;
height: 50px;
background-color: red;
margin-right: 2vw;
cursor: pointer;
}
.playerList .player button {
align-content: center;
padding: 3px;
width: 50px;
height: 4vh;
margin-right: 0.6vw;
line-height: 0;
}
.playerList .player button:last-of-type {
margin-right: 3vw;
}
.playerList .player img {
margin-right: 5px;
}
.newPlayerInput {
display: flex;
width: 38vw;
height: 50px;
align-items: center;
justify-content: center;
padding: 5px 0;
background-color: rgb(107, 106, 106);
}
.newPlayerInput p {
font-size: 1.3rem;
flex-grow: 1;
text-align: center;
}
.newPlayerInput input {
height: 70%;
width: 250px;
font-size: 1.5rem;
margin: 0 5px;
text-align: center;
}
.newPlayerInput button {
margin: 0 10px;
height: 80%;
align-self: center;
}
@media only screen and (max-width: 1000px) {
.playersWindowDiv {
width: 100%;
}
.playerListTitle {
height: 10vw;
font-size: 0.8rem;
}
.playerListTitle .addPlayerIMG {
height: 9vw;
}
.playerListTitle .arrowToggle {
display: block;
max-height: 100%;
left: 0;
filter: invert(77%) sepia(8%) saturate(6%) hue-rotate(317deg) brightness(95%) contrast(87%);
}
.playerList {
width: 100%;
height: 60vw;
min-height: 190px;
overflow: scroll;
}
.playerList .player {
width: 100vw;
height: 12vw;
font-size: 1rem;
}
.playerList .player .profilePicture {
width: 60px;
height: 30px;
margin-right: 1.5vw;
}
.playerList .player button {
align-content: center;
padding: 3px;
width: 45px;
height: 10vw;
margin-right: 1vw;
line-height: 0;
}
.newPlayerInput {
width: 100%;
height: 30px;
}
.newPlayerInput input {
height: 90%;
width: 200px;
font-size: 1.2rem;
}
.newPlayerInput button {
margin: 0 10px;
height: 40px;
border-radius: 2px;
}
}
</style>
@@ -1,191 +0,0 @@
<template>
<div class="playlistHistoryDiv">
<div @click="toggleDisplay" class="playlistHistoryTitle">
<h1>Playlist history</h1>
<img v-if="display" src="keyboard_arrow_up-black-36dp.svg" alt="" />
<img v-else src="keyboard_arrow_down-black-36dp.svg" alt="" />
</div>
<transition-group
tag="div"
v-if="display"
name="playlistHistory"
class="playlistHistory"
ref="playlistHistory"
>
<div
class="track"
v-for="track in playlistHistory"
:key="track.SongNo"
@click="playSelectedTrack(track, $event)"
>
<p
v-if="checkIfHidden(track, playlistHistory)"
:class="{ activeTrack: track.CurrentlyPlaying }"
>
??? - ???
</p>
<p v-else-if="track.Game !== ''" :class="{ activeTrack: track.CurrentlyPlaying }">
{{ track.SongNo + 1 }}. {{ track.Game }} -
{{ displayTrack(track.Song) }}
</p>
<span v-if="currentlyLoadingTrack === track.SongNo" class="loadingTrack">
-- Loading --
</span>
</div>
</transition-group>
</div>
</template>
<script>
import { mapState } from "vuex";
export default {
data() {
return {
display: true,
};
},
computed: {
...mapState(["playlistHistory", "currentTrackHidden", "currentlyLoadingTrack"]),
},
methods: {
checkIfHidden(track, playlistHistory) {
return track.SongNo === playlistHistory.length - 1 && this.currentTrackHidden;
},
displayTrack(trackName) {
/* Todo: Is this if-check necessary? */
if (trackName === undefined) {
return "";
} else {
return trackName.replace(".mp3", "");
}
},
playSelectedTrack(track, event) {
console.log(event.path);
this.$store.dispatch("setCurrentlyLoadingTrack", track.SongNo);
this.$emit("play-selected-track", track);
},
scrollToBottom() {
if (this.display) {
this.$nextTick(() => {
this.$refs.playlistHistory.$el.scrollTop = this.$refs.playlistHistory.$el.scrollHeight;
});
}
},
toggleDisplay() {
if (window.innerWidth < 600) {
this.display = !this.display;
}
},
},
created() {
if (window.innerWidth < 600) {
this.display = false;
}
},
};
</script>
<style scoped>
/* Scroll */
.playlistHistory::-webkit-scrollbar {
width: 17px;
}
.playlistHistory {
scrollbar-color: #4f5253c2;
}
.playlistHistory::-webkit-scrollbar-track {
background: #393c4179;
border-radius: 5px;
}
.playlistHistory::-webkit-scrollbar-thumb {
background-color: #6d7679c2;
border-radius: 5px;
border: 2px solid #3c434e79;
}
/* End of Scroll */
.playlistHistoryDiv {
display: inline-block;
width: 60vw;
color: white;
margin-right: 0.5vw;
}
.playlistHistoryTitle {
display: flex;
background-color: #333;
height: 5vh;
justify-content: center;
align-items: center;
}
.playlistHistoryTitle img {
display: none;
}
.playlistHistory {
background-color: rgb(66, 66, 66);
width: 60vw;
height: 37vh;
overflow-x: hidden;
overflow-y: scroll;
}
.playlistHistory .track {
display: flex;
flex-wrap: nowrap;
justify-content: flex-start;
width: 57vw;
height: auto;
min-height: 30px;
line-height: 1.5;
font-size: 1.1rem;
align-items: center;
padding: 0.3vh 0.6vh;
cursor: pointer;
}
.playlistHistory .track:nth-child(even) {
background-color: #4e4e4e;
}
.playlistHistory .activeTrack {
color: yellow;
}
.loadingTrack {
color: #ff9c00;
margin-left: 20px;
}
@media only screen and (max-width: 1000px) {
.playlistHistory::-webkit-scrollbar {
width: 5px;
}
.playlistHistoryDiv {
width: 100%;
margin: 0 0 0.3vw;
}
.playlistHistoryTitle {
height: 10vw;
font-size: 0.8rem;
}
.playlistHistoryTitle img {
display: block;
position: absolute;
max-height: 100%;
left: 0;
filter: invert(77%) sepia(8%) saturate(6%) hue-rotate(317deg) brightness(95%) contrast(87%);
}
.playlistHistory {
width: 100vw;
height: 56vw;
}
.playlistHistory .track {
width: 98vw;
font-size: 0.8rem;
padding: 1.5vw 1vw;
}
.loadingTrack {
display: none;
}
}
</style>
@@ -1,209 +0,0 @@
<template>
<!-- Round Settings, Stop after current, Don't hide title -->
<transition name="modalAni">
<div v-if="show" class="modal" @click="checkIfClickShouldCloseModal">
<div class="modalContainer">
<div class="modalWrapper">
<img
class="closeModalImg"
src="cancel-black-36dp.svg"
alt="closeModalIMG"
@click="closeModal"
/>
<h1>Settings</h1>
<div class="checkboxDiv">
<input
type="checkbox"
name="stopAfterCurrent"
id="stopAfterCurrent"
v-model="checkboxStopAfterCurrent"
@change="updateOptionStopAfterCurrent"
/>
<label for="stopAfterCurrent">Stop after current</label>
</div>
<div class="checkboxDiv">
<input
type="checkbox"
name="hideTitle"
id="hideTitle"
v-model="checkboxHideTitle"
@change="updateOptionHideTitle"
/>
<label for="hideTitle">Hide next track</label>
</div>
<div class="checkboxDiv">
<input
type="checkbox"
name="addPlayed"
id="addPlayed"
v-model="checkboxAddPlayed"
@change="updateOptionAddPlayed"
/>
<label for="addPlayed">Turn on played to database</label>
</div>
<div class="checkboxDiv">
<input
type="checkbox"
name="lowPlayed"
id="lowPlayed"
v-model="checkboxLowPlayed"
@change="updateOptionLowPlayed"
/>
<label for="lowPlayed">Use low played mode</label>
</div>
<div class="winningScoreDiv">
<span>Winning Score: {{ winningScore }}</span>
<button
:class="{ disabled: roundStarted }"
:disabled="roundStarted"
@click="changeScore(-1)"
>
-1
</button>
<button
:class="{ disabled: roundStarted }"
:disabled="roundStarted"
@click="changeScore(1)"
>
+1
</button>
</div>
</div>
</div>
</div>
</transition>
</template>
<script>
import { mapState } from "vuex";
export default {
data() {
return {
show: false,
checkboxStopAfterCurrent: false,
checkboxHideTitle: false,
checkboxAddPlayed: false,
checkboxLowPlayed: false,
};
},
computed: {
...mapState(["winningScore", "roundStarted", "stopAfterCurrent", "hideNextTrack", "addPlayed", "lowPlayed"]),
},
methods: {
closeModal() {
this.show = false;
},
openModal() {
this.show = true;
},
checkIfClickShouldCloseModal(event) {
if (event.target.classList[0] === "modal") {
this.closeModal();
}
},
updateOptionHideTitle() {
if (this.checkboxHideTitle) {
this.$store.dispatch("updateHideNextTitle", true);
} else {
this.$store.dispatch("updateHideNextTitle", false);
}
},
updateOptionAddPlayed() {
if (this.checkboxAddPlayed) {
this.$store.dispatch("updateAddPlayed", true);
} else {
this.$store.dispatch("updateAddPlayed", false);
}
},
updateOptionLowPlayed() {
if (this.checkboxLowPlayed) {
this.$store.dispatch("updateLowPlayed", true);
} else {
this.$store.dispatch("updateLowPlayed", false);
}
},
updateOptionStopAfterCurrent() {
if (this.checkboxStopAfterCurrent) {
this.$store.dispatch("updateStopAfterCurrent", true);
} else {
this.$store.dispatch("updateStopAfterCurrent", false);
}
},
changeScore(score) {
if (score < 0) {
this.$store.dispatch("setWinningScore", -1);
} else {
this.$store.dispatch("setWinningScore", 1);
}
},
},
mounted() {
this.checkboxStopAfterCurrent = this.stopAfterCurrent;
this.checkboxHideTitle = this.hideNextTrack;
this.checkboxAddPlayed = this.addPlayed;
this.checkboxLowPlayed = this.lowPlayed;
},
};
</script>
<style scoped>
.winningScoreDiv {
width: 100%;
display: inline-flex;
align-items: center;
flex-wrap: nowrap;
margin-top: 30px;
}
.checkboxDiv {
margin: 5px;
width: 100%;
}
.checkboxDiv:first-of-type {
margin-top: 20px;
}
.checkboxDiv input {
transform: scale(1.3);
}
.checkboxDiv label {
margin-left: 10px;
font-size: 1.5rem;
}
.winningScoreDiv span {
font-size: 1.7rem;
margin-right: 10px;
width: 245px;
}
.winningScoreDiv button {
display: flex;
width: 50px;
height: 33px;
background: rgb(16, 99, 194);
color: rgb(235, 235, 235);
border-color: rgb(161, 161, 161);
justify-content: center;
align-items: center;
line-height: 0;
font-size: 1.5rem;
margin: 3px;
}
.disabled {
opacity: 50%;
}
@media only screen and (max-width: 1000px) {
.checkboxDiv label {
font-size: 1.3rem;
}
.winningScoreDiv span {
font-size: 1.3rem;
margin-right: 10px;
width: 245px;
}
}
</style>
@@ -1,68 +0,0 @@
<template>
<transition name="modalAni">
<div v-if="show" class="modal" @click="checkIfClickShouldCloseModal">
<div class="modalContainer">
<div class="modalWrapper">
<img
class="closeModalImg"
src="cancel-black-36dp.svg"
alt="closeModalIMG"
@click="closeModal"
/>
<h1>Statistics</h1>
<p>Total amount of games in the playlist: {{ howManyGames }}</p>
</div>
</div>
</div>
</transition>
</template>
<script>
import { mapState } from "vuex";
export default {
data() {
return {
show: false,
};
},
computed: {
...mapState(["howManyGames"]),
},
methods: {
closeModal() {
this.show = false;
},
openModal() {
this.show = true;
},
checkIfClickShouldCloseModal(event) {
if (event.target.classList[0] === "modal") {
this.closeModal();
}
},
},
};
</script>
<style scoped>
p {
font-size: 1.2rem;
width: 100%;
margin-top: 30px;
}
.descriptionText {
margin-top: 35px;
}
.creditText {
margin-top: 30px;
}
.creditText:nth-child(5) {
margin-top: 0px;
}
.patchNotesText {
margin-top: 20px;
}
</style>
@@ -1,50 +0,0 @@
<template>
<transition name="modalAni">
<div v-if="show" class="modal" @click="checkIfClickShouldCloseModal">
<div class="modalContainer">
<div class="modalWrapper">
<img
class="closeModalImg"
src="cancel-black-36dp.svg"
alt="closeModalIMG"
@click="closeModal"
/>
<h1>{{ playerName }} won!!</h1>
</div>
</div>
</div>
</transition>
</template>
<script>
export default {
data() {
return {
show: false,
playerName: "",
};
},
methods: {
closeModal() {
this.show = false;
},
showPeter() {
let randomNumber = Math.floor(Math.random() * 10);
console.log(randomNumber);
console.log("Test");
return randomNumber < 2;
},
openModal(playerName) {
this.playerName = playerName;
this.show = true;
},
checkIfClickShouldCloseModal(event) {
if (event.target.classList[0] === "modal") {
this.closeModal();
}
},
},
};
</script>
<style scoped></style>
@@ -1,441 +0,0 @@
<template>
<footer>
<div class="audioAndButtonsDiv">
<div class="audioButtonsDiv">
<button
class="bigButton"
:class="{ disabled: disableButtons }"
:disabled="disableButtons"
@click="randomizeTrack()"
>
<p v-if="!disableButtons"><u>R</u>andomize new track</p>
<p v-else>Loading...</p>
</button>
<button class="bigButton" @click="showAnswer()"><u>S</u>how answer</button>
</div>
<div class="audioDiv">
<audio
controls
class="audioPlayer"
:src="currentTrackSrcFile"
ref="audioPlayer"
:onended="trackHasEnded"
></audio>
</div>
</div>
</footer>
</template>
<script>
import { mapState } from "vuex";
import arne from "../../arne.js";
export default {
data() {
return {
currentTrackSrcFile: "",
disableButtons: false,
loadingBar: "",
};
},
computed: {
...mapState([
"stopAfterCurrent",
"localPlaylist",
"hideNextTrack",
"roundStarted",
"specialTrackIsPlaying",
"addPlayed",
"lowPlayed",
]),
},
methods: {
async randomizeTrack() {
console.log("Randomizing track");
/* Prevents anyone from changing the winning score after the round has started */
if (this.roundStarted === false) {
this.$store.dispatch("setRoundStarted", true);
}
let trackAddedToQue = false;
this.disableButtons = true;
let copyOfPlaylist = this.localPlaylist;
setTimeout(() => this.isHidden = false, 2000);
//If the local playlist of MP3s is empty, wait for a new track to load
if (copyOfPlaylist.length === 0) {
console.log("No track preloaded, loading a new one");
if (this.lowPlayed) {
await this.APIgetRandomizedLowTrack();
} else {
await this.APIgetRandomizedTrack();
}
if (this.addPlayed) {
await this.APIaddPlayed();
}
await this.APIaddToQue();
trackAddedToQue = true;
}
//Update the source file for the media player (binded property to Audio tag in the template)
this.currentTrackSrcFile = window.URL.createObjectURL(copyOfPlaylist[0]);
if (!trackAddedToQue) {
if (this.addPlayed) {
await this.APIaddPlayed();
}
await this.APIaddToQue();
}
await this.APIgetPlaylistHistory();
this.$refs.audioPlayer.play();
this.$emit("scroll-to-bottom-playlist-history");
copyOfPlaylist.shift();
if (this.hideNextTrack) {
this.$store.dispatch("setCurrentTrackHidden", true);
} else {
this.$store.dispatch("setCurrentTrackHidden", false);
}
await this.APIgetInfoAboutCurrentTrack();
await this.randomizeTrackInAdvance();
this.disableButtons = false;
},
async randomizeTrackInAdvance() {
console.log("Randomizing track in advance");
try {
if (this.lowPlayed) {
await this.APIgetRandomizedLowTrack();
} else {
await this.APIgetRandomizedTrack();
}
} catch (error) {
console.log(error);
console.log("Error: A track couldn't be loaded in advance");
}
return new Promise((resolve) => {
resolve();
});
},
async playSpecificTrack(track) {
await this.APIplaySpecificTrack(track.SongNo);
this.$store.dispatch("setCurrentlyLoadingTrack", "");
await this.APIgetPlaylistHistory();
this.$store.dispatch("setCurrentTrackHidden", false);
await this.APIgetInfoAboutCurrentTrack();
},
showAnswer() {
this.$store.dispatch("setCurrentTrackHidden", false);
},
startSoundTest() {
this.$refs.audioPlayer.pause();
this.currentTrackSrcFile = "sounds/check.mp3";
this.$store.dispatch("setSpecialTrackIsPlaying", true);
this.$nextTick(() => {
this.$refs.audioPlayer.currentTime = 0;
this.$refs.audioPlayer.play();
});
},
playWelcomeSound() {
let randomNumber = Math.floor(Math.random() * 10);
this.$refs.audioPlayer.pause();
if (randomNumber === 0) {
this.currentTrackSrcFile = "sounds/sound1.mp3";
} else if (randomNumber < 5) {
this.currentTrackSrcFile = "sounds/intro_short.mp3";
} else {
this.currentTrackSrcFile = "sounds/intro_long.mp3";
}
this.$store.dispatch("setSpecialTrackIsPlaying", true);
this.$nextTick(() => {
this.$refs.audioPlayer.currentTime = 0;
this.$refs.audioPlayer.play();
});
},
playMatchSound() {
this.$refs.audioPlayer.pause();
this.currentTrackSrcFile = "sounds/sound0.mp3";
this.$store.dispatch("setSpecialTrackIsPlaying", true);
this.$nextTick(() => {
this.$refs.audioPlayer.currentTime = 0;
this.$refs.audioPlayer.play();
});
},
playWinningSound() {
this.$refs.audioPlayer.pause();
this.currentTrackSrcFile = "sounds/winning.mp3";
this.$store.dispatch("setSpecialTrackIsPlaying", true);
this.$nextTick(() => {
this.$refs.audioPlayer.currentTime = 0;
this.$refs.audioPlayer.play();
});
},
APIgetRandomizedTrack() {
return new Promise((resolve, reject) => {
this.axios({
method: "get",
url: `${arne.hostname}/music/rand`,
responseType: "blob",
onDownloadProgress: (progressEvent) => {
let percentCompleted = Math.round(
(progressEvent.loaded * 100) / progressEvent.total
);
if (percentCompleted % 10 === 0) {
//Debug for slow downloading
//console.log(percentCompleted);
}
},
})
.then((response) => {
let mp3 = new Blob([response.data], { type: "audio/mp3" });
this.$store.dispatch("updateLocalPlaylist", mp3);
this.$nextTick(() => {
resolve();
});
})
.catch(function(error) {
console.log("An error happened when fetching the track");
console.log(error);
reject();
});
});
},
APIgetRandomizedLowTrack() {
return new Promise((resolve, reject) => {
this.axios({
method: "get",
url: `${arne.hostname}/music/rand/low`,
responseType: "blob",
onDownloadProgress: (progressEvent) => {
let percentCompleted = Math.round(
(progressEvent.loaded * 100) / progressEvent.total
);
if (percentCompleted % 10 === 0) {
//Debug for slow downloading
//console.log(percentCompleted);
}
},
})
.then((response) => {
let mp3 = new Blob([response.data], { type: "audio/mp3" });
this.$store.dispatch("updateLocalPlaylist", mp3);
this.$nextTick(() => {
resolve();
});
})
.catch(function(error) {
console.log("An error happened when fetching the track");
console.log(error);
reject();
});
});
},
APIaddPlayed() {
return new Promise((resolve, reject) => {
this.axios({
method: "get",
url: `${arne.hostname}/music/addPlayed`,
})
.then(() => {
resolve(false);
})
.catch(function(error) {
console.log(error);
reject();
});
});
},
APIaddToQue() {
return new Promise((resolve, reject) => {
this.axios({
method: "get",
url: `${arne.hostname}/music/addQue`,
})
.then(() => {
resolve(false);
})
.catch(function(error) {
console.log(error);
reject();
});
});
},
APIgetInfoAboutCurrentTrack() {
return new Promise((resolve, reject) => {
this.axios({
method: "get",
url: `${arne.hostname}/music/info`,
})
.then((response) => {
let gameInfoObject = {
game: response.data.Game,
track: response.data.Song.replace(".mp3", ""),
songNo: response.data.SongNo,
};
this.$store.dispatch("setCurrentGame", gameInfoObject.game);
this.$store.dispatch("setCurrentTrack", gameInfoObject.track);
resolve(false);
})
.catch(function(error) {
console.log(error);
reject();
});
});
},
APIgetPlaylistHistory() {
return new Promise((resolve, reject) => {
this.axios({
method: "get",
url: `${arne.hostname}/music/list`,
})
.then((response) => {
let tracklistArray = response.data;
this.$store.dispatch("updatePlaylistHistory", tracklistArray);
resolve();
})
.catch(function(error) {
console.log(error);
reject();
});
});
},
APIplaySpecificTrack(trackNumber) {
return new Promise((resolve, reject) => {
this.axios({
method: "get",
url: `${arne.hostname}/music?song=${trackNumber}`,
responseType: "blob",
})
.then((response) => {
let mp3 = new Blob([response.data], { type: "audio/mp3" });
this.currentTrackSrcFile = window.URL.createObjectURL(mp3);
this.$nextTick(() => {
this.$refs.audioPlayer.play();
resolve();
});
})
.catch(function(error) {
console.log(error);
reject();
});
});
},
trackHasEnded() {
if (this.specialTrackIsPlaying) {
this.$store.dispatch("setSpecialTrackIsPlaying", false);
return 0;
}
if (!this.stopAfterCurrent) {
this.randomizeTrack();
}
},
},
async mounted() {
await this.APIgetPlaylistHistory();
},
};
</script>
<style scoped>
footer {
display: flex;
position: absolute;
bottom: 0;
justify-content: flex-end;
width: 100%;
}
.audioAndButtonsDiv {
display: flex;
flex-wrap: wrap;
width: 80vw;
margin-right: 1vh;
}
.audioButtonsDiv {
display: flex;
flex-direction: row-reverse;
width: 100%;
margin-bottom: 2vh;
align-items: center;
}
.audioButtonsDiv button:nth-child(1) {
margin-right: 3vw;
width: 200px;
}
.audioButtonsDiv button:nth-child(2) {
margin-right: 25vw;
width: 220px;
}
.audioButtonsDiv .bigButton {
height: 7vh;
}
.disabled {
opacity: 0.5;
}
.audioDiv {
width: 100%;
}
.audioDiv audio {
width: 100%;
font-size: 2rem;
}
audio::-webkit-media-controls-panel {
background-color: rgb(185, 185, 185);
}
audio::-webkit-media-controls-current-time-display {
color: rgb(0, 0, 0);
font-size: 4em;
}
audio::-webkit-media-controls-time-remaining-display {
color: rgb(0, 0, 0);
font-size: 4em;
}
@media only screen and (max-width: 1000px) {
footer {
position: static;
justify-content: center;
}
.audioAndButtonsDiv {
width: 100vw;
margin: 0;
}
.audioButtonsDiv {
margin-bottom: 2vw;
font-size: 1rem;
}
.audioButtonsDiv button:nth-child(1) {
margin: 0;
width: 50vw;
border-radius: 2px;
}
.audioButtonsDiv button:nth-child(2) {
margin: 0;
width: 50vw;
border-radius: 2px;
}
.audioButtonsDiv .bigButton {
height: 22vw;
}
.disabled {
opacity: 0.5;
}
.audioDiv {
width: 100%;
}
.audioDiv audio {
font-size: 1rem;
}
audio::-webkit-media-controls-panel {
background-color: rgb(185, 185, 185);
border-radius: 2px;
}
audio::-webkit-media-controls-current-time-display {
color: rgb(0, 0, 0);
font-size: 2em;
}
audio::-webkit-media-controls-time-remaining-display {
color: rgb(0, 0, 0);
font-size: 2em;
}
}
</style>
@@ -1,139 +0,0 @@
<template>
<nav>
<p class="title">Music Player Randomizer</p>
<div class="navMenuWrapper">
<button class="settingsButton" @click="showSettingsModal">
Settings
</button>
<button class="statisticsButton" @click="showStatisticsModal">
Statistics
</button>
<button class="aboutButton" @click="showAboutModal">About</button>
</div>
<p v-if="!$parent.displayWhenDesktop" class="mobileMenuButton" @click="showMobileMenu">
Menu
</p>
<settingsModal ref="settingsModal"></settingsModal>
<statisticsModal ref="statisticsModal"></statisticsModal>
<aboutModal ref="aboutModal"></aboutModal>
<mobileMenu
ref="mobileMenu"
@start-sound-test="startSoundTest"
@show-settings-modal="showSettingsModal"
@show-statistics-modal="showStatisticsModal"
@show-about-modal="showAboutModal"
></mobileMenu>
</nav>
</template>
<script>
import aboutModal from "../items/aboutModal.vue";
import statisticsModal from "../items/statisticsModal.vue";
import settingsModal from "../items/settingsModal.vue";
import mobileMenu from "../items/mobileMenu.vue";
export default {
components: {
aboutModal,
settingsModal,
statisticsModal,
mobileMenu,
},
methods: {
playSelectedTrack(track) {
this.$refs.theFooter.playSpecificTrack(track);
},
scrollToBottomPlaylistHistory() {
this.$refs.playlistHistory.scrollToBottom();
},
showAboutModal() {
this.$refs.aboutModal.openModal();
},
showSettingsModal() {
this.$refs.settingsModal.openModal();
},
showStatisticsModal() {
this.$refs.statisticsModal.openModal();
},
showMobileMenu() {
this.$refs.mobileMenu.openMobileMenu();
this.showMobileMenuContent();
},
showMobileMenuContent() {
setTimeout(() => {
this.$refs.mobileMenu.openMobileMenuContent();
}, 20);
},
startSoundTest() {
this.$emit("start-sound-test");
},
},
};
</script>
<style scoped>
nav {
background: #333;
display: flex;
align-content: center;
align-items: center;
width: 100%;
height: 5vh;
}
.title {
color: #fff;
font-size: 2rem;
margin-left: 2vw;
font-style: normal;
}
.navMenuWrapper {
margin-left: auto;
height: 5vh;
}
.navMenuWrapper button {
background: #333;
color: #ff9c00;
font-size: 1.3rem;
outline: none;
cursor: pointer;
border: none;
border-radius: 3px;
height: 100%;
padding: 0 20px;
}
.navMenuWrapper button:hover {
background-color: #555;
}
/* Mobile */
@media only screen and (max-width: 1000px) {
nav {
justify-content: center;
height: 10vw;
}
.title {
font-size: 1.2rem;
margin: 0;
padding: 0;
width: 100%;
margin-left: 5px;
/* text-align: ; */
}
.navMenuWrapper {
display: none;
}
.mobileMenuButton {
color: white;
background: grey;
padding: 6px;
border-top-left-radius: 7px;
border-bottom-left-radius: 7px;
}
}
</style>
@@ -1,103 +0,0 @@
<template>
<div class="theMainDiv">
<div class="mainFirstRow">
<currently-playing></currently-playing>
<inspiration-window></inspiration-window>
</div>
<div class="mainSecondRow">
<playlist-history
ref="playlistHistory"
@play-selected-track="playSelectedTrack"
></playlist-history>
<players-window
@play-welcome-sound="playWelcomeSound"
@play-match-point-sound="playMatchSound"
@play-winning-sound="playWinningSound"
></players-window>
</div>
<extra-buttons
v-if="$parent.displayWhenDesktop"
@start-sound-test="startSoundTest"
></extra-buttons>
<the-footer
ref="theFooter"
@scroll-to-bottom-playlist-history="scrollToBottomPlaylistHistory"
></the-footer>
<!-- <the-footer ref="theFooter"></the-footer> -->
</div>
</template>
<script>
import currentlyPlaying from "../items/CurrentlyPlaying.vue";
import inspirationWindow from "../items/InspirationWindow.vue";
import playersWindow from "../items/playersWindow.vue";
import playlistHistory from "../items/playlistHistory.vue";
import extraButtons from "../items/extraButtons.vue";
import theFooter from "./TheFooter.vue";
export default {
components: {
currentlyPlaying,
playersWindow,
playlistHistory,
inspirationWindow,
extraButtons,
theFooter,
},
methods: {
playSelectedTrack(track) {
this.$refs.theFooter.playSpecificTrack(track);
},
scrollToBottomPlaylistHistory() {
this.$refs.playlistHistory.scrollToBottom();
},
startSoundTest() {
this.$refs.theFooter.startSoundTest();
},
playWelcomeSound() {
this.$refs.theFooter.playWelcomeSound();
},
playMatchSound() {
this.$refs.theFooter.playMatchSound();
},
playWinningSound() {
this.$refs.theFooter.playWinningSound();
},
},
};
</script>
<style scoped>
.theMainDiv {
display: flex;
flex-wrap: wrap;
width: 100%;
}
.mainFirstRow {
display: flex;
flex-wrap: nowrap;
width: 100%;
margin: 0.5vw;
}
.mainSecondRow {
display: flex;
flex-wrap: nowrap;
width: 100%;
margin: 0 0.5vw;
}
@media only screen and (max-width: 1000px) {
.mainFirstRow {
margin: 0;
margin-top: 0.5vw;
}
.mainSecondRow {
display: flex;
flex-wrap: wrap;
width: 100%;
margin: 0;
margin-top: 0.5vw;
}
}
</style>
-261
View File
@@ -1,261 +0,0 @@
import { createApp } from "vue";
import { createStore } from "vuex";
import App from "./App.vue";
import axios from "axios";
import VueAxios from "vue-axios";
const store = createStore({
state() {
return {
currentGame: "",
currentTrack: ``,
currentTrackHidden: false,
currentlyLoadingTrack: "",
specialTrackIsPlaying: false,
someoneHasWon: false,
winningScore: 20,
roundStarted: false,
reloadGamesList: false,
listOfPlayers: [],
localPlaylist: [],
playlistHistory: [
{
SongNo: "",
Game: "",
Song: "",
},
],
/* Stats */
howManyGames: 0,
/* Options */
stopAfterCurrent: true,
hideNextTrack: true,
addPlayed: true,
lowPlayed: false,
};
},
mutations: {
setCurrentGame(state, payload) {
state.currentGame = payload;
},
setCurrentTrack(state, payload) {
state.currentTrack = payload;
},
setCurrentTrackHidden(state, payload) {
state.currentTrackHidden = payload;
},
setCurrentlyLoadingTrack(state, payload) {
state.currentlyLoadingTrack = payload;
},
setSpecialTrackIsPlaying(state, payload) {
state.specialTrackIsPlaying = payload;
},
setSomeoneHasWon(state, payload) {
state.someoneHasWon = payload;
},
setWinningScore(state, payload) {
state.winningScore += payload;
},
setRoundStarted(state, payload) {
state.roundStarted = payload;
},
updateListOfPlayers(state, payload) {
state.listOfPlayers = payload;
},
changePlayerScore(state, payload) {
state.listOfPlayers[payload.indexOfPlayer].score += payload.scoreToChange;
},
changePlayerWelcomed(state, payload) {
state.listOfPlayers[payload.indexOfPlayer].welcomed = payload.playerWelcomeTrueOrFalse;
},
changePlayerMatchPoint(state, payload) {
state.listOfPlayers[payload.indexOfPlayer].matchPoint = payload.playerMatchPointTrueOrFalse;
},
changePlayerProfile(state, payload) {
state.listOfPlayers[payload.indexOfPlayer].profile = payload.profileSrc;
},
resetPlayerScore(state, payload) {
state.listOfPlayers = payload;
},
resetPlayerWelcomed(state, payload) {
state.listOfPlayers = payload;
},
resetPlayerMatchPoint(state, payload) {
state.listOfPlayers = payload;
},
updateLocalPlaylist(state, payload) {
state.localPlaylist.push(payload);
},
updatePlaylistHistory(state, payload) {
state.playlistHistory = payload;
},
updateHowManyGames(state, payload) {
state.howManyGames = payload;
},
reloadGamesList(state, payload) {
state.reloadGamesList = payload;
},
updateStopAfterCurrent(state, payload) {
state.stopAfterCurrent = payload;
},
updateHideNextTitle(state, payload) {
state.hideNextTrack = payload;
},
updateAddPlayed(state, payload) {
state.addPlayed = payload;
},
updateLowPlayed(state, payload) {
state.lowPlayed = payload;
},
},
actions: {
setCurrentGame(context, payload) {
context.commit("setCurrentGame", payload);
},
setCurrentTrack(context, payload) {
context.commit("setCurrentTrack", payload);
},
setCurrentTrackHidden(context, payload) {
context.commit("setCurrentTrackHidden", payload);
},
setCurrentlyLoadingTrack(context, payload) {
context.commit("setCurrentlyLoadingTrack", payload);
},
setSpecialTrackIsPlaying(context, payload) {
context.commit("setSpecialTrackIsPlaying", payload);
},
setSomeoneHasWon(context, payload) {
context.commit("someoneHasWon", payload);
},
setWinningScore(context, payload) {
context.commit("setWinningScore", payload);
},
setRoundStarted(context, payload) {
context.commit("setRoundStarted", payload);
},
removePlayer(context, payload) {
let newPlayerList = this.state.listOfPlayers.filter(
(player) => player.playerName != payload
);
context.commit("updateListOfPlayers", newPlayerList);
},
addNewPlayer(context, payload) {
let newPlayerList = this.state.listOfPlayers;
let newPlayer = {
playerName: payload,
score: 0,
welcomed: false,
matchPoint: false,
profile: "characters/noCharacter.png",
};
newPlayerList.push(newPlayer);
context.commit("updateListOfPlayers", newPlayerList);
},
changePlayerScore(context, payload) {
let copyOfPlayerList = this.state.listOfPlayers;
let indexOfPlayer = copyOfPlayerList.findIndex(
(player) => player.playerName === payload.playerName
);
let scoreToChange = payload.score;
context.commit("changePlayerScore", {
indexOfPlayer,
scoreToChange,
});
},
changePlayerWelcomed(context, payload) {
let copyOfPlayerList = this.state.listOfPlayers;
let indexOfPlayer = copyOfPlayerList.findIndex(
(player) => player.playerName === payload.playerName
);
let playerWelcomeTrueOrFalse = payload.welcomeSet;
context.commit("changePlayerWelcomed", {
indexOfPlayer,
playerWelcomeTrueOrFalse,
});
},
changePlayerMatchPoint(context, payload) {
let copyOfPlayerList = this.state.listOfPlayers;
let indexOfPlayer = copyOfPlayerList.findIndex(
(player) => player.playerName === payload.playerName
);
let playerMatchPointTrueOrFalse = payload.matchPointSet;
context.commit("changePlayerMatchPoint", {
indexOfPlayer,
playerMatchPointTrueOrFalse,
});
},
changePlayerProfile(context, payload) {
let copyOfPlayerList = this.state.listOfPlayers;
let indexOfPlayer = copyOfPlayerList.findIndex(
(player) => player.playerName === payload.playerName
);
let profileSrc = payload.profile;
context.commit("changePlayerProfile", {
indexOfPlayer,
profileSrc,
});
},
resetPlayerScore(context) {
/* The JSON.parse and JSON.stringify parts are used to make a copy that doesn't affect the original */
let copyOfPlayerList = JSON.parse(JSON.stringify(this.state.listOfPlayers));
for (let i = 0; i < copyOfPlayerList.length; i++) {
copyOfPlayerList[i].score = 0;
}
context.commit("resetPlayerScore", copyOfPlayerList);
},
resetPlayerWelcomed(context) {
/* The JSON.parse and JSON.stringify parts are used to make a copy that doesn't affect the original */
let copyOfPlayerList = JSON.parse(JSON.stringify(this.state.listOfPlayers));
for (let i = 0; i < copyOfPlayerList.length; i++) {
copyOfPlayerList[i].welcomed = false;
}
context.commit("resetPlayerWelcomed", copyOfPlayerList);
},
resetPlayerMatchPoint(context) {
/* The JSON.parse and JSON.stringify parts are used to make a copy that doesn't affect the original */
let copyOfPlayerList = JSON.parse(JSON.stringify(this.state.listOfPlayers));
for (let i = 0; i < copyOfPlayerList.length; i++) {
copyOfPlayerList[i].matchPoint = false;
}
context.commit("resetPlayerMatchPoint", copyOfPlayerList);
},
updateLocalPlaylist(context, payload) {
context.commit("updateLocalPlaylist", payload);
},
updatePlaylistHistory(context, payload) {
context.commit("updatePlaylistHistory", payload);
},
updateHowManyGames(context, payload) {
context.commit("updateHowManyGames", payload);
},
reloadGamesList(context, payload) {
context.commit("reloadGamesList", payload);
},
updateStopAfterCurrent(context, payload) {
context.commit("updateStopAfterCurrent", payload);
},
updateHideNextTitle(context, payload) {
context.commit("updateHideNextTitle", payload);
},
updateAddPlayed(context, payload) {
context.commit("updateAddPlayed", payload);
},
updateLowPlayed(context, payload) {
context.commit("updateLowPlayed", payload);
},
},
getters: {
/* Empty ATM */
/* getListOfPlayers: (state) => {
return state.listOfPlayers;
}, */
},
});
const app = createApp(App);
app.use(store);
app.use(VueAxios, axios);
app.mount("#app");
+23 -61
View File
@@ -2,79 +2,41 @@ package main
import ( import (
"context" "context"
"fmt"
"log"
"music-server/internal/db"
"music-server/internal/server"
"net/http"
"os"
"os/signal" "os/signal"
"runtime/pprof"
"syscall" "syscall"
"time" "time"
"music-server/internal/logging"
"music-server/internal/server"
"go.uber.org/zap"
) )
// @title Swagger Example API const shutdownTimeout = 5 * time.Second
// @version 0.5
// @description This is a sample server Petstore server.
// @termsOfService http://swagger.io/terms/
// @contact.name Sebastian Olsson
// @contact.email zarnor91@gmail.com
// @license.name Apache 2.0
// @license.url http://www.apache.org/licenses/LICENSE-2.0.html
// @host localhost:8080
func main() { func main() {
f, perr := os.Create("cpu.pprof")
if perr != nil {
log.Fatal(perr)
}
pprof.StartCPUProfile(f)
defer pprof.StopCPUProfile()
server := server.NewServer()
// Create a done channel to signal when the shutdown is complete
done := make(chan bool, 1)
// Run graceful shutdown in a separate goroutine
go gracefulShutdown(server, done)
log.Printf("Open http://localhost%s in the browser", server.Addr)
err := server.ListenAndServe()
if err != nil && err != http.ErrServerClosed {
panic(fmt.Sprintf("http server error: %s", err))
}
// Wait for the graceful shutdown to complete
<-done
log.Println("Graceful shutdown complete.")
}
func gracefulShutdown(apiServer *http.Server, done chan bool) {
// Create context that listens for the interrupt signal from the OS.
ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM) ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
defer stop() defer stop()
// Listen for the interrupt signal. s := server.NewServerInstance()
<-ctx.Done()
log.Println("shutting down gracefully, press Ctrl+C again to force") serveErr := make(chan error, 1)
db.CloseDb() go func() { serveErr <- s.ListenAndServe() }()
// The context is used to inform the server it has 5 seconds to finish select {
// the request it is currently handling case err := <-serveErr:
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) if err != nil {
defer cancel() logging.GetLogger().Fatal("HTTP server error", zap.Error(err))
if err := apiServer.Shutdown(ctx); err != nil { }
log.Printf("Server forced to shutdown with error: %v", err) case <-ctx.Done():
stop()
logging.GetLogger().Info("Shutting down gracefully, press Ctrl+C again to force")
} }
log.Println("Server exiting") shutdownCtx, cancel := context.WithTimeout(context.Background(), shutdownTimeout)
defer cancel()
// Notify the main goroutine that the shutdown is complete if err := s.Shutdown(shutdownCtx); err != nil {
done <- true logging.GetLogger().Error("Server forced to shutdown with error", zap.Error(err))
}
logging.GetLogger().Info("Graceful shutdown complete")
} }
-18
View File
@@ -1,18 +0,0 @@
@import "tailwindcss";
#search-container {
text-align: center;
}
#search_term {
width: 60vw;
font-size: 2vh;
}
#clear {
font-size: 2vh;
}
#games-container{
font-size: 2vh;
}
+149
View File
@@ -0,0 +1,149 @@
/* Pure CSS styles for Music Search */
:root {
/* Light mode colors (default) */
--bg-primary: #f3f4f6;
--bg-secondary: #e5e7eb;
--bg-tertiary: #dcfce7;
--text-primary: #000;
--text-secondary: #374151;
--border-primary: #9ca3af;
--border-focus: #6b7280;
--accent-primary: #f97316;
--accent-hover: #ea580c;
--shadow-color: rgba(0, 0, 0, 0.1);
}
[data-theme="dark"] {
/* Dark mode colors matching frontend */
--bg-primary: #555;
--bg-secondary: #333;
--bg-tertiary: #2a2a2a;
--text-primary: #fff;
--text-secondary: #ff9c00;
--border-primary: #666;
--border-focus: #ff9c00;
--accent-primary: #ff9c00;
--accent-hover: #e68a00;
--shadow-color: rgba(0, 0, 0, 0.3);
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html, body {
height: 100%;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.5;
background-color: var(--bg-primary);
color: var(--text-primary);
transition: background-color 0.3s ease, color 0.3s ease;
}
main {
max-width: 1200px;
margin: 0 auto;
padding: 1rem;
}
#search-container {
text-align: center;
margin-bottom: 2rem;
}
#search_term {
width: 60vw;
max-width: 600px;
font-size: 1.5rem;
padding: 0.5rem;
border: 1px solid var(--border-primary);
border-radius: 0.5rem;
background-color: var(--bg-secondary);
color: var(--text-primary);
}
#search_term:focus {
outline: none;
border-color: var(--border-focus);
}
#clear {
font-size: 1.5rem;
padding: 0.5rem 1rem;
border: none;
border-radius: 0.5rem;
background-color: var(--accent-primary);
color: var(--text-primary);
cursor: pointer;
margin-left: 1rem;
}
#clear:hover {
background-color: var(--accent-hover);
}
#games-container {
font-size: 1.5rem;
}
.game-text {
color: var(--text-primary);
word-break: break-word;
}
/* Dark mode toggle */
#dark-mode-toggle {
position: fixed;
top: 1rem;
right: 1rem;
font-size: 1.2rem;
padding: 0.4rem 0.8rem;
border: none;
border-radius: 0.5rem;
background-color: var(--bg-secondary);
color: var(--text-primary);
cursor: pointer;
z-index: 1000;
transition: all 0.3s ease;
}
#dark-mode-toggle:hover {
background-color: var(--border-primary);
}
/* Game result cards */
.bg-green-100 {
background-color: var(--bg-tertiary);
}
.p-4 {
padding: 1rem;
}
.shadow-md {
box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
}
.rounded-lg {
border-radius: 0.5rem;
}
.mt-6 {
margin-top: 1.5rem;
}
/* Responsive adjustments */
@media (max-width: 768px) {
#search_term {
width: 80vw;
font-size: 1.2rem;
}
#clear {
font-size: 1.2rem;
padding: 0.4rem 0.8rem;
}
}
+4 -4
View File
@@ -2,15 +2,15 @@ package web
templ Base() { templ Base() {
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en" class="h-screen"> <html lang="en" data-theme="dark">
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<title>Music Search</title> <title>Music Search</title>
<link href="assets/css/output.css" rel="stylesheet"/> <link href="assets/css/styles.css" rel="stylesheet"/>
<script src="assets/js/htmx.min.js"></script> <script src="assets/js/htmx.min.js"></script>
</head> </head>
<body class="bg-gray-100"> <body>
<main class="mx-auto p-4"> <main>
{ children... } { children... }
</main> </main>
</body> </body>
-3
View File
@@ -4,6 +4,3 @@ import "embed"
//go:embed "assets" //go:embed "assets"
var Assets embed.FS var Assets embed.FS
//go:embed "swagger"
var Swagger embed.FS
-117
View File
@@ -1,117 +0,0 @@
package web
import (
"log"
"music-server/internal/backend"
"net/http"
"regexp"
"strings"
)
var games_added []string
func FindGameWebHandler(w http.ResponseWriter, r *http.Request) {
err := r.ParseForm()
if err != nil {
http.Error(w, "Bad Request", http.StatusBadRequest)
}
search_term := r.FormValue("search_term")
search(search_term)
component := FoundGames(games_added)
err = component.Render(r.Context(), w)
if err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
log.Fatalf("Error rendering in FindGameWebHandler: %e", err)
}
}
func search(searchText string) {
games_added = nil
games := backend.GetAllGames()
for _, game := range games {
if is_match_exact(searchText, game) {
add_game(game)
}
}
for _, game := range games {
if is_match_contains(clean_term(searchText), clean_term(game)) {
add_game(game)
}
}
for _, game := range games {
if is_match_regex(clean_term(searchText), clean_term(game)) {
add_game(game)
}
}
}
func is_match_exact(search_term string, game_name string) bool {
search_term = strings.ToLower(search_term)
game_name = strings.ToLower(game_name)
if search_term == "" {
return true
} else if strings.Contains(game_name, search_term) {
return true
} else {
return false
}
}
func is_match_contains(search_term string, game_name string) bool {
if search_term == "" {
return true
} else if strings.Contains(game_name, search_term) {
return true
} else {
return false
}
}
func is_match_regex(search_term string, game_name string) bool {
if search_term == "" {
return true
} else if compile_regex(search_term).MatchString(game_name) {
return true
} else {
return false
}
}
func add_game(game string) {
if !check_if_game_exists(game) {
games_added = append(games_added, game)
}
}
func check_if_game_exists(gameName string) bool {
game_exists := false
for _, child := range games_added {
if child == gameName {
game_exists = true
}
}
return game_exists
}
func compile_regex(search_term string) *regexp.Regexp {
regText := ".*"
for _, letter := range search_term {
regText += string(letter) + ".*"
}
r, _ := regexp.Compile(regText)
return r
}
func clean_term(term string) string {
term = strings.ReplaceAll(term, " ", "")
term = strings.ReplaceAll(term, "é", "e")
term = strings.ReplaceAll(term, "+", "plus")
term = strings.ReplaceAll(term, "&", "and")
term = strings.ReplaceAll(term, "'n", "and")
return strings.ToLower(term)
}
-32
View File
@@ -1,32 +0,0 @@
package web
templ HelloForm() {
@Base() {
<div id="search-container">
<input class="bg-gray-200 text-black p-2 border border-gray-400 rounded-lg" id="search_term" name="search_term" type="text" hx-post="/find" hx-trigger="keyup changed delay:0.25s" hx-target="#games-container"/>
<button type="button" class="bg-orange-500 hover:bg-orange-700 text-white py-2 px-4 rounded" id="clear" name="clear">Clear</button>
</div>
<div id="games-container"></div>
<script>
document.addEventListener('readystatechange', () => {
if (document.readyState == 'complete') {
htmx.ajax('POST', '/find', '#games-container');
document.getElementById("search_term").focus();
}
});
document.getElementById("clear").addEventListener("click", function (event) {
document.getElementById("search_term").value = "";
htmx.ajax('POST', '/find', '#games-container');
document.getElementById("search_term").focus();
});
</script>
}
}
templ FoundGames(games []string) {
for _, game := range games {
<div class="bg-green-100 p-4 shadow-md rounded-lg mt-6">
<p>{ game }</p>
</div>
}
}
+57
View File
@@ -0,0 +1,57 @@
package web
import (
"net/http"
"strings"
"music-server/internal/backend"
"music-server/internal/logging"
"go.uber.org/zap"
)
// NewSearchHandler returns a handler that renders the soundtracks matching the posted search term.
func NewSearchHandler(cache *backend.SearchCache) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if err := r.ParseForm(); err != nil {
http.Error(w, "Bad Request", http.StatusBadRequest)
return
}
soundtracks, err := cache.Get(r.Context())
if err != nil {
logging.GetLogger().Error("Failed to load search data", zap.Error(err))
http.Error(w, "Internal Server Error", http.StatusInternalServerError)
return
}
results := search(r.FormValue("search_term"), soundtracks)
if err := FoundSoundtracks(results).Render(r.Context(), w); err != nil {
logging.GetLogger().Error("Failed to render search results", zap.Error(err))
http.Error(w, "Internal Server Error", http.StatusInternalServerError)
}
})
}
// search returns the soundtracks matching searchText: exact matches first, then matches
// ignoring spaces and special characters, then matches with the letters in order.
func search(searchText string, soundtrackData []backend.SoundtrackData) []string {
var results []string
seen := make(map[string]bool)
add := func(match func(backend.SoundtrackData) bool) {
for _, data := range soundtrackData {
if !seen[data.Original] && match(data) {
results = append(results, data.Original)
seen[data.Original] = true
}
}
}
lowercase := strings.ToLower(searchText)
cleaned := backend.CleanSearchTerm(searchText)
add(func(d backend.SoundtrackData) bool { return strings.Contains(d.Lowercase, lowercase) })
add(func(d backend.SoundtrackData) bool { return strings.Contains(d.Cleaned, cleaned) })
add(func(d backend.SoundtrackData) bool { return backend.MatchesSubsequence(cleaned, d.Cleaned) })
return results
}
+51
View File
@@ -0,0 +1,51 @@
package web
templ SearchForm() {
@Base() {
<button id="dark-mode-toggle">🌙</button>
<input id="search_term" name="search_term" type="text" hx-post="/find" hx-trigger="keyup changed delay:0.25s" hx-target="#soundtracks-container"/>
<button type="button" id="clear" name="clear">Clear</button>
<div id="soundtracks-container"></div>
<script>
document.addEventListener('readystatechange', () => {
if (document.readyState == 'complete') {
// Initialize search
htmlx.ajax('POST', '/find', '#soundtracks-container');
document.getElementById("search_term").focus();
// Initialize theme from localStorage (default to dark)
const savedTheme = localStorage.getItem('theme') || 'dark';
document.documentElement.setAttribute('data-theme', savedTheme);
document.getElementById('dark-mode-toggle').textContent = savedTheme === 'dark' ? '☀️' : '🌙';
}
});
// Dark mode toggle functionality
document.getElementById("dark-mode-toggle").addEventListener("click", function() {
const html = document.documentElement;
const currentTheme = html.getAttribute('data-theme');
const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
html.setAttribute('data-theme', newTheme);
localStorage.setItem('theme', newTheme);
// Update toggle button text
this.textContent = newTheme === 'dark' ? '☀️' : '🌙';
});
document.getElementById("clear").addEventListener("click", function (event) {
document.getElementById("search_term").value = "";
htmlx.ajax('POST', '/find', '#soundtracks-container');
document.getElementById("search_term").focus();
});
</script>
}
}
templ FoundSoundtracks(soundtracks []string) {
for _, soundtrack := range soundtracks {
<div class="bg-green-100 p-4 shadow-md rounded-lg mt-6">
<p class="soundtrack-text">{ soundtrack }</p>
</div>
}
}
+100
View File
@@ -0,0 +1,100 @@
package web
import (
"context"
"errors"
"net/http"
"net/http/httptest"
"net/url"
"strings"
"testing"
"music-server/internal/backend"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
var soundtracks = []string{
"Call of Duty: Modern Warfare",
"Final Fantasy VII",
"Joe & Mac",
"Kingdom Hearts",
"Lemmings (SNES + Mega Drive)",
"MG",
"Metal Gear Solid 4 - Guns of the Patriots",
"Pokémon HeartGold & SoulSilver",
"Resident Evil 2 (Remake)",
"Ys III - Wanderers from Ys (+The Oath in Felghana)",
}
func newCache(names []string) *backend.SearchCache {
return backend.NewSearchCache(func(context.Context) ([]string, error) { return names, nil })
}
func searchData(t *testing.T) []backend.SoundtrackData {
data, err := newCache(soundtracks).Get(context.Background())
require.NoError(t, err)
return data
}
func TestSearch(t *testing.T) {
data := searchData(t)
tests := []struct {
query string
want []string
}{
// Exact (case-insensitive) substring
{"resident", []string{"Resident Evil 2 (Remake)"}},
// Ignoring spaces and special characters
{"joeandmac", []string{"Joe & Mac"}},
{"snes+mega", []string{"Lemmings (SNES + Mega Drive)"}},
{"pokemon", []string{"Pokémon HeartGold & SoulSilver"}},
// Letters in order
{"codmw", []string{"Call of Duty: Modern Warfare"}},
{"mgs4gotp", []string{"Metal Gear Solid 4 - Guns of the Patriots"}},
{"re2r", []string{"Resident Evil 2 (Remake)"}},
// No match
{"zzz", nil},
// Regex special characters are plain text
{"(remake)", []string{"Resident Evil 2 (Remake)"}},
{"[", nil},
}
for _, tt := range tests {
t.Run(tt.query, func(t *testing.T) {
assert.Equal(t, tt.want, search(tt.query, data))
})
}
}
func TestSearchEmptyReturnsEverything(t *testing.T) {
assert.Equal(t, soundtracks, search("", searchData(t)))
}
func TestSearchOrdering(t *testing.T) {
// "MG" is an exact match, "Metal Gear Solid..." only matches by letters in order.
results := search("mg", searchData(t))
require.GreaterOrEqual(t, len(results), 2)
assert.Equal(t, "MG", results[0])
assert.Contains(t, results, "Metal Gear Solid 4 - Guns of the Patriots")
}
func TestSearchHandler(t *testing.T) {
handler := NewSearchHandler(newCache(soundtracks))
req := httptest.NewRequest(http.MethodPost, "/find", strings.NewReader(url.Values{"search_term": {"kingdom"}}.Encode()))
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
rec := httptest.NewRecorder()
handler.ServeHTTP(rec, req)
assert.Equal(t, http.StatusOK, rec.Code)
assert.Contains(t, rec.Body.String(), "Kingdom Hearts")
assert.NotContains(t, rec.Body.String(), "Final Fantasy")
}
func TestSearchHandlerLoadError(t *testing.T) {
cache := backend.NewSearchCache(func(context.Context) ([]string, error) { return nil, errors.New("db down") })
rec := httptest.NewRecorder()
NewSearchHandler(cache).ServeHTTP(rec, httptest.NewRequest(http.MethodPost, "/find", nil))
assert.Equal(t, http.StatusInternalServerError, rec.Code)
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 628 B

-60
View File
@@ -1,60 +0,0 @@
<!-- HTML for static distribution bundle build -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Swagger UI</title>
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" />
<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
<style>
html
{
box-sizing: border-box;
overflow: -moz-scrollbars-vertical;
overflow-y: scroll;
}
*,
*:before,
*:after
{
box-sizing: inherit;
}
body
{
margin:0;
background: #fafafa;
}
</style>
</head>
<body>
<div id="swagger-ui"></div>
<script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
<script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
<script>
window.onload = function() {
// Begin Swagger UI call region
const ui = SwaggerUIBundle({
url: "./swagger.yaml",
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout"
});
// End Swagger UI call region
window.ui = ui;
};
</script>
</body>
</html>
-75
View File
@@ -1,75 +0,0 @@
<!doctype html>
<html lang="en-US">
<head>
<title>Swagger UI: OAuth2 Redirect</title>
</head>
<body>
<script>
'use strict';
function run () {
var oauth2 = window.opener.swaggerUIRedirectOauth2;
var sentState = oauth2.state;
var redirectUrl = oauth2.redirectUrl;
var isValid, qp, arr;
if (/code|token|error/.test(window.location.hash)) {
qp = window.location.hash.substring(1);
} else {
qp = location.search.substring(1);
}
arr = qp.split("&");
arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';});
qp = qp ? JSON.parse('{' + arr.join() + '}',
function (key, value) {
return key === "" ? value : decodeURIComponent(value);
}
) : {};
isValid = qp.state === sentState;
if ((
oauth2.auth.schema.get("flow") === "accessCode" ||
oauth2.auth.schema.get("flow") === "authorizationCode" ||
oauth2.auth.schema.get("flow") === "authorization_code"
) && !oauth2.auth.code) {
if (!isValid) {
oauth2.errCb({
authId: oauth2.auth.name,
source: "auth",
level: "warning",
message: "Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"
});
}
if (qp.code) {
delete oauth2.state;
oauth2.auth.code = qp.code;
oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
} else {
let oauthErrorMsg;
if (qp.error) {
oauthErrorMsg = "["+qp.error+"]: " +
(qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
(qp.error_uri ? "More info: "+qp.error_uri : "");
}
oauth2.errCb({
authId: oauth2.auth.name,
source: "auth",
level: "error",
message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server"
});
}
} else {
oauth2.callback({auth: oauth2.auth, token: qp, isValid: isValid, redirectUrl: redirectUrl});
}
window.close();
}
window.addEventListener('DOMContentLoaded', function () {
run();
});
</script>
</body>
</html>
-3
View File
@@ -1,3 +0,0 @@
/*! For license information please see swagger-ui-bundle.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SwaggerUIBundle=t():e.SwaggerUIBundle=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist",n(n.s=479)}([function(e,t,n){"use strict";e.exports=n(555)},function(e,t,n){e.exports=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return i(e)?e:J(e)}function r(e){return u(e)?e:K(e)}function o(e){return s(e)?e:Y(e)}function a(e){return i(e)&&!c(e)?e:G(e)}function i(e){return!(!e||!e[f])}function u(e){return!(!e||!e[p])}function s(e){return!(!e||!e[h])}function c(e){return u(e)||s(e)}function l(e){return!(!e||!e[d])}t(r,n),t(o,n),t(a,n),n.isIterable=i,n.isKeyed=u,n.isIndexed=s,n.isAssociative=c,n.isOrdered=l,n.Keyed=r,n.Indexed=o,n.Set=a;var f="@@__IMMUTABLE_ITERABLE__@@",p="@@__IMMUTABLE_KEYED__@@",h="@@__IMMUTABLE_INDEXED__@@",d="@@__IMMUTABLE_ORDERED__@@",m="delete",v=5,g=1<<v,y=g-1,b={},w={value:!1},x={value:!1};function E(e){return e.value=!1,e}function _(e){e&&(e.value=!0)}function S(){}function k(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),o=0;o<n;o++)r[o]=e[o+t];return r}function A(e){return void 0===e.size&&(e.size=e.__iterate(C)),e.size}function O(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?A(e)+t:t}function C(){return!0}function j(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function T(e,t){return P(e,t,0)}function I(e,t){return P(e,t,t)}function P(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var N=0,M=1,R=2,D="function"==typeof Symbol&&Symbol.iterator,L="@@iterator",B=D||L;function F(e){this.next=e}function z(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function U(){return{value:void 0,done:!0}}function q(e){return!!H(e)}function V(e){return e&&"function"==typeof e.next}function W(e){var t=H(e);return t&&t.call(e)}function H(e){var t=e&&(D&&e[D]||e[L]);if("function"==typeof t)return t}function $(e){return e&&"number"==typeof e.length}function J(e){return null==e?ie():i(e)?e.toSeq():ce(e)}function K(e){return null==e?ie().toKeyedSeq():i(e)?u(e)?e.toSeq():e.fromEntrySeq():ue(e)}function Y(e){return null==e?ie():i(e)?u(e)?e.entrySeq():e.toIndexedSeq():se(e)}function G(e){return(null==e?ie():i(e)?u(e)?e.entrySeq():e:se(e)).toSetSeq()}F.prototype.toString=function(){return"[Iterator]"},F.KEYS=N,F.VALUES=M,F.ENTRIES=R,F.prototype.inspect=F.prototype.toSource=function(){return this.toString()},F.prototype[B]=function(){return this},t(J,n),J.of=function(){return J(arguments)},J.prototype.toSeq=function(){return this},J.prototype.toString=function(){return this.__toString("Seq {","}")},J.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},J.prototype.__iterate=function(e,t){return fe(this,e,t,!0)},J.prototype.__iterator=function(e,t){return pe(this,e,t,!0)},t(K,J),K.prototype.toKeyedSeq=function(){return this},t(Y,J),Y.of=function(){return Y(arguments)},Y.prototype.toIndexedSeq=function(){return this},Y.prototype.toString=function(){return this.__toString("Seq [","]")},Y.prototype.__iterate=function(e,t){return fe(this,e,t,!1)},Y.prototype.__iterator=function(e,t){return pe(this,e,t,!1)},t(G,J),G.of=function(){return G(arguments)},G.prototype.toSetSeq=function(){return this},J.isSeq=ae,J.Keyed=K,J.Set=G,J.Indexed=Y;var Q,Z,X,ee="@@__IMMUTABLE_SEQ__@@";function te(e){this._array=e,this.size=e.length}function ne(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function re(e){this._iterable=e,this.size=e.length||e.size}function oe(e){this._iterator=e,this._iteratorCache=[]}function ae(e){return!(!e||!e[ee])}function ie(){return Q||(Q=new te([]))}function ue(e){var t=Array.isArray(e)?new te(e).fromEntrySeq():V(e)?new oe(e).fromEntrySeq():q(e)?new re(e).fromEntrySeq():"object"==typeof e?new ne(e):void 0;if(Line truncated
//# sourceMappingURL=swagger-ui-bundle.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"sources":["webpack://SwaggerUIBundle/webpack/universalModuleDefinition","webpack://SwaggerUIBundle/webpack/bootstrap","webpack://SwaggerUIBundle/./node_modules/react/index.js","webpack://SwaggerUIBundle/./node_modules/immutable/dist/immutable.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/defineProperty.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/map.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/classCallCheck.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/createClass.js","webpack://SwaggerUIBundle/./src/core/utils.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/inherits.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/createSuper.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/assertThisInitialized.js","webpack://SwaggerUIBundle/./node_modules/prop-types/index.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/slicedToArray.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/toConsumableArray.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/export.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/global.js","webpack://SwaggerUIBundle/./node_modules/reselect/es/defaultMemoize.js","webpack://SwaggerUIBundle/./node_modules/reselect/es/index.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/typeof.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/index-of.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/slice.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/array/is-array.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/for-each.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/object/assign.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/objectSpread2.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/extends.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/function-uncurry-this.js","webpack://SwaggerUIBundle/./src/core/window.js","webpack://SwaggerUIBundle/./node_modules/react-immutable-proptypes/dist/ImmutablePropTypes.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/json/stringify.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/reduce.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/includes.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/an-object.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/fails.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/path.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/object-is-prototype-of.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/function-call.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/is-pure.js","webpack://SwaggerUIBundle/./src/core/plugins/oas3/helpers.jsx","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/well-known-symbol.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/entry-virtual.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/is-callable.js","webpack://SwaggerUIBundle/./node_modules/lodash/get.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/regenerator/index.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/is-object.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/a-callable.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/has-own-property.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/define-well-known-symbol.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/iterate.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/bind.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/descriptors.js","webpack://SwaggerUIBundle/./src/core/plugins/spec/actions.js","webpack://SwaggerUIBundle/./node_modules/classnames/index.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/function-bind-context.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/find.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/hLine truncated
@@ -1,3 +0,0 @@
/*! For license information please see swagger-ui-es-bundle-core.js.LICENSE.txt */
module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist",n(n.s=452)}([function(e,t){e.exports=require("react")},function(e,t){e.exports=require("immutable")},function(e,t,n){e.exports=n(492)},function(e,t,n){var r=n(178);e.exports=function(e,t,n){return t in e?r(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){e.exports=n(522)},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(178);function a(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),r(e,a.key,a)}}e.exports=function(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),r(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";(function(e){n.d(t,"z",(function(){return be})),n.d(t,"i",(function(){return Ee})),n.d(t,"v",(function(){return xe})),n.d(t,"r",(function(){return Se})),n.d(t,"t",(function(){return we})),n.d(t,"s",(function(){return je})),n.d(t,"p",(function(){return Oe})),n.d(t,"u",(function(){return Ce})),n.d(t,"x",(function(){return _e})),n.d(t,"y",(function(){return Ae})),n.d(t,"J",(function(){return ke})),n.d(t,"f",(function(){return Ie})),n.d(t,"n",(function(){return Pe})),n.d(t,"h",(function(){return Te})),n.d(t,"D",(function(){return Re})),n.d(t,"K",(function(){return Me})),n.d(t,"o",(function(){return ze})),n.d(t,"C",(function(){return Ve})),n.d(t,"a",(function(){return Fe})),n.d(t,"H",(function(){return Je})),n.d(t,"b",(function(){return We})),n.d(t,"G",(function(){return He})),n.d(t,"F",(function(){return $e})),n.d(t,"E",(function(){return Ke})),n.d(t,"k",(function(){return Ye})),n.d(t,"d",(function(){return Ge})),n.d(t,"g",(function(){return Ze})),n.d(t,"m",(function(){return Xe})),n.d(t,"l",(function(){return Qe})),n.d(t,"e",(function(){return et})),n.d(t,"I",(function(){return tt})),n.d(t,"w",(function(){return nt})),n.d(t,"A",(function(){return rt})),n.d(t,"B",(function(){return at})),n.d(t,"j",(function(){return ot})),n.d(t,"c",(function(){return it})),n.d(t,"q",(function(){return ct}));var r=n(14),a=n.n(r),o=(n(13),n(19)),i=n.n(o),s=n(56),c=n.n(s),u=n(22),l=n.n(u),p=n(4),f=n.n(p),d=n(83),h=n.n(d),m=n(2),v=n.n(m),g=n(23),y=n.n(g),b=n(12),E=n.n(b),x=n(15),S=n.n(x),w=(n(50),n(31)),j=n.n(w),O=n(24),C=n.n(O),_=n(194),A=n.n(_),k=n(21),I=n.n(k),P=n(74),T=n.n(P),R=(n(32),n(30)),N=n.n(R),M=n(20),q=n.n(M),D=n(55),B=n.n(D),U=n(106),L=n.n(U),z=n(104),V=n.n(z),F=n(1),J=n.n(F),W=n(418),H=n(419),$=n.n(H),K=n(244),Y=n.n(K),G=n(107),Z=n.n(G),X=n(420),Q=n.n(X),ee=n(306),te=n.n(ee),ne=n(102),re=n.n(ne),ae=n(103),oe=n.n(ae),ie=n(133),se=n(28),ce=n(424),ue=n.n(ce),le=n(138),pe=n(117),fe=n.n(pe),de=n(425),he=n.n(de),me=n(73),ve=n.n(me),ge="default",ye=function(e){return J.a.Iterable.isIterable(e)};function be(e){return we(e)?ye(e)?e.toJS():e:{}}function Ee(e){var t,n;if(ye(e))return e;if(e instanceof se.a.File)return e;if(!we(e))return e;if(l()(e))return f()(n=J.a.Seq(e)).call(n,Ee).toList();if(oe()(h()(e))){var r,a=function(e){if(!oe()(h()(e)))return e;var t,n={},r="_**[]",a={},o=c()(h()(e).call(e));try{for(o.s();!(t=o.n()).done;){var i=t.value;if(n[i[0]]||a[i[0]]&&a[i[0]].containsMultiple){var s,u,l,p;if(!a[i[0]])a[i[0]]={containsMultiple:!0,length:1},n[v()(l=v()(p="".concat(i[0])).call(p,r)).call(l,a[i[0]].length)]=n[i[0]],delete n[i[0]];a[i[0]].length+=1,n[v()(s=v()(u="".concat(i[0])).call(u,r)).call(s,a[i[0]].length)]=i[1]}else n[i[0]]=i[1]}}catch(e){o.e(e)}finally{o.f()}return n}(e);return f()(r=J.a.OrderedMap(a)).call(r,Ee)}return f()(t=J.a.OrderedMap(e)).call(t,Ee)}function xe(e){return l()(e)?e:[e]}function Se(e){return"function"==typeof e}function we(e){return!!e&&"object"===i()(e)}function je(e){return"function"==typeof e}function Oe(e){return l()(e)}var Ce=Z.a;function _e(e,t){var n;return j()(n=S()(e)).call(n,(function(n,r){return n[r]=t(e[r],r),n}),{})}function Ae(e,t){var n;return j()(n=S()(e)).call(n,(function(n,r){var a=t(e[r],r);retuLine truncated
//# sourceMappingURL=swagger-ui-es-bundle-core.js.map
@@ -1 +0,0 @@
{"version":3,"sources":["webpack://SwaggerUIBundle/webpack/bootstrap","webpack://SwaggerUIBundle/external \"react\"","webpack://SwaggerUIBundle/external \"immutable\"","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/defineProperty.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/map.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/classCallCheck.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/createClass.js","webpack://SwaggerUIBundle/./src/core/utils.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/inherits.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/createSuper.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/assertThisInitialized.js","webpack://SwaggerUIBundle/external \"prop-types\"","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/slicedToArray.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/toConsumableArray.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/export.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/global.js","webpack://SwaggerUIBundle/external \"reselect\"","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/typeof.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/index-of.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/slice.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/array/is-array.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/for-each.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/object/assign.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/objectSpread2.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/extends.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/function-uncurry-this.js","webpack://SwaggerUIBundle/./src/core/window.js","webpack://SwaggerUIBundle/external \"react-immutable-proptypes\"","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/json/stringify.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/reduce.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/includes.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/an-object.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/fails.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/path.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/object-is-prototype-of.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/function-call.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/is-pure.js","webpack://SwaggerUIBundle/./src/core/plugins/oas3/helpers.jsx","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/well-known-symbol.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/entry-virtual.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/is-callable.js","webpack://SwaggerUIBundle/./node_modules/lodash/get.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/regenerator/index.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/is-object.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/a-callable.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/has-own-property.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/define-well-known-symbol.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/iterate.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/bind.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/descriptors.js","webpack://SwaggerUIBundle/./src/core/plugins/spec/actions.js","webpack://SwaggerUIBundle/external \"classnames\"","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/function-bind-context.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/find.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/createForOfIteratorHelper.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/get-built-in.js","webpack://SwaggerUIBundle/./node_modules/lodash/isArray.js","webpack://SwaggerUIBundle/./node_modules/@babel/ruLine truncated
-3
View File
@@ -1,3 +0,0 @@
/*! For license information please see swagger-ui-es-bundle.js.LICENSE.txt */
module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist",n(n.s=479)}([function(e,t,n){"use strict";e.exports=n(555)},function(e,t,n){e.exports=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return i(e)?e:J(e)}function r(e){return u(e)?e:K(e)}function o(e){return s(e)?e:Y(e)}function a(e){return i(e)&&!c(e)?e:G(e)}function i(e){return!(!e||!e[f])}function u(e){return!(!e||!e[p])}function s(e){return!(!e||!e[h])}function c(e){return u(e)||s(e)}function l(e){return!(!e||!e[d])}t(r,n),t(o,n),t(a,n),n.isIterable=i,n.isKeyed=u,n.isIndexed=s,n.isAssociative=c,n.isOrdered=l,n.Keyed=r,n.Indexed=o,n.Set=a;var f="@@__IMMUTABLE_ITERABLE__@@",p="@@__IMMUTABLE_KEYED__@@",h="@@__IMMUTABLE_INDEXED__@@",d="@@__IMMUTABLE_ORDERED__@@",m="delete",v=5,g=1<<v,y=g-1,b={},w={value:!1},x={value:!1};function E(e){return e.value=!1,e}function _(e){e&&(e.value=!0)}function S(){}function k(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),o=0;o<n;o++)r[o]=e[o+t];return r}function A(e){return void 0===e.size&&(e.size=e.__iterate(C)),e.size}function O(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?A(e)+t:t}function C(){return!0}function j(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function T(e,t){return P(e,t,0)}function I(e,t){return P(e,t,t)}function P(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var N=0,M=1,R=2,D="function"==typeof Symbol&&Symbol.iterator,L="@@iterator",B=D||L;function F(e){this.next=e}function z(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function U(){return{value:void 0,done:!0}}function q(e){return!!H(e)}function V(e){return e&&"function"==typeof e.next}function W(e){var t=H(e);return t&&t.call(e)}function H(e){var t=e&&(D&&e[D]||e[L]);if("function"==typeof t)return t}function $(e){return e&&"number"==typeof e.length}function J(e){return null==e?ie():i(e)?e.toSeq():ce(e)}function K(e){return null==e?ie().toKeyedSeq():i(e)?u(e)?e.toSeq():e.fromEntrySeq():ue(e)}function Y(e){return null==e?ie():i(e)?u(e)?e.entrySeq():e.toIndexedSeq():se(e)}function G(e){return(null==e?ie():i(e)?u(e)?e.entrySeq():e:se(e)).toSetSeq()}F.prototype.toString=function(){return"[Iterator]"},F.KEYS=N,F.VALUES=M,F.ENTRIES=R,F.prototype.inspect=F.prototype.toSource=function(){return this.toString()},F.prototype[B]=function(){return this},t(J,n),J.of=function(){return J(arguments)},J.prototype.toSeq=function(){return this},J.prototype.toString=function(){return this.__toString("Seq {","}")},J.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},J.prototype.__iterate=function(e,t){return fe(this,e,t,!0)},J.prototype.__iterator=function(e,t){return pe(this,e,t,!0)},t(K,J),K.prototype.toKeyedSeq=function(){return this},t(Y,J),Y.of=function(){return Y(arguments)},Y.prototype.toIndexedSeq=function(){return this},Y.prototype.toString=function(){return this.__toString("Seq [","]")},Y.prototype.__iterate=function(e,t){return fe(this,e,t,!1)},Y.prototype.__iterator=function(e,t){return pe(this,e,t,!1)},t(G,J),G.of=function(){return G(arguments)},G.prototype.toSetSeq=function(){return this},J.isSeq=ae,J.Keyed=K,J.Set=G,J.Indexed=Y;var Q,Z,X,ee="@@__IMMUTABLE_SEQ__@@";function te(e){this._array=e,this.size=e.length}function ne(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function re(e){this._iterable=e,this.size=e.length||e.size}function oe(e){this._iterator=e,this._iteratorCache=[]}function ae(e){return!(!e||!e[ee])}function ie(){return Q||(Q=new te([]))}function ue(e){var t=Array.isArray(e)?new te(e).fromEntrySeq():V(e)?new oe(e).fromEntrySeq():q(e)?new re(e).fromEntrySeq():"object"==typeof e?new ne(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function se(e){var t=le(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return tLine truncated
//# sourceMappingURL=swagger-ui-es-bundle.js.map
@@ -1 +0,0 @@
{"version":3,"sources":["webpack://SwaggerUIBundle/webpack/bootstrap","webpack://SwaggerUIBundle/./node_modules/react/index.js","webpack://SwaggerUIBundle/./node_modules/immutable/dist/immutable.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/defineProperty.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/map.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/classCallCheck.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/createClass.js","webpack://SwaggerUIBundle/./src/core/utils.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/inherits.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/createSuper.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/assertThisInitialized.js","webpack://SwaggerUIBundle/./node_modules/prop-types/index.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/slicedToArray.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/toConsumableArray.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/export.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/global.js","webpack://SwaggerUIBundle/./node_modules/reselect/es/defaultMemoize.js","webpack://SwaggerUIBundle/./node_modules/reselect/es/index.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/typeof.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/index-of.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/slice.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/array/is-array.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/for-each.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/object/assign.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/objectSpread2.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/extends.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/function-uncurry-this.js","webpack://SwaggerUIBundle/./src/core/window.js","webpack://SwaggerUIBundle/./node_modules/react-immutable-proptypes/dist/ImmutablePropTypes.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/json/stringify.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/reduce.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/includes.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/an-object.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/fails.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/path.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/object-is-prototype-of.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/function-call.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/is-pure.js","webpack://SwaggerUIBundle/./src/core/plugins/oas3/helpers.jsx","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/well-known-symbol.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/entry-virtual.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/is-callable.js","webpack://SwaggerUIBundle/./node_modules/lodash/get.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/regenerator/index.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/is-object.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/a-callable.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/has-own-property.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/define-well-known-symbol.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/iterate.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/bind.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/descriptors.js","webpack://SwaggerUIBundle/./src/core/plugins/spec/actions.js","webpack://SwaggerUIBundle/./node_modules/classnames/index.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/function-bind-context.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/find.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/createForOfIteratorHelper.js","webpack://SwaggerUIBundlLine truncated
@@ -1,3 +0,0 @@
/*! For license information please see swagger-ui-standalone-preset.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.SwaggerUIStandalonePreset=e():t.SwaggerUIStandalonePreset=e()}(this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist",n(n.s=247)}([function(t,e,n){"use strict";var r=n(1),i=n(72),o=n(6),u=n(15),s=n(74).f,a=n(256),c=n(16),f=n(25),l=n(51),p=n(20),h=function(t){var e=function(n,r,o){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,r)}return new t(n,r,o)}return i(t,this,arguments)};return e.prototype=t.prototype,e};t.exports=function(t,e){var n,i,d,y,v,g,w,M,_=t.target,L=t.global,x=t.stat,m=t.proto,j=L?r:x?r[_]:(r[_]||{}).prototype,b=L?c:c[_]||l(c,_,{})[_],N=b.prototype;for(d in e)n=!a(L?d:_+(x?".":"#")+d,t.forced)&&j&&p(j,d),v=b[d],n&&(g=t.noTargetGet?(M=s(j,d))&&M.value:j[d]),y=n&&g?g:e[d],n&&typeof v==typeof y||(w=t.bind&&n?f(y,r):t.wrap&&n?h(y):m&&u(y)?o(y):y,(t.sham||y&&y.sham||v&&v.sham)&&l(w,"sham",!0),l(b,d,w),m&&(p(c,i=_+"Prototype")||l(c,i,{}),l(c[i],d,y),t.real&&N&&!N[d]&&l(N,d,y)))}},function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,n(33))},function(t,e,n){"use strict";t.exports=n(320)},function(t,e,n){t.exports=function(){"use strict";var t=Array.prototype.slice;function e(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function n(t){return u(t)?t:J(t)}function r(t){return s(t)?t:Z(t)}function i(t){return a(t)?t:X(t)}function o(t){return u(t)&&!c(t)?t:V(t)}function u(t){return!(!t||!t[l])}function s(t){return!(!t||!t[p])}function a(t){return!(!t||!t[h])}function c(t){return s(t)||a(t)}function f(t){return!(!t||!t[d])}e(r,n),e(i,n),e(o,n),n.isIterable=u,n.isKeyed=s,n.isIndexed=a,n.isAssociative=c,n.isOrdered=f,n.Keyed=r,n.Indexed=i,n.Set=o;var l="@@__IMMUTABLE_ITERABLE__@@",p="@@__IMMUTABLE_KEYED__@@",h="@@__IMMUTABLE_INDEXED__@@",d="@@__IMMUTABLE_ORDERED__@@",y="delete",v=5,g=1<<v,w=g-1,M={},_={value:!1},L={value:!1};function x(t){return t.value=!1,t}function m(t){t&&(t.value=!0)}function j(){}function b(t,e){e=e||0;for(var n=Math.max(0,t.length-e),r=new Array(n),i=0;i<n;i++)r[i]=t[i+e];return r}function N(t){return void 0===t.size&&(t.size=t.__iterate(D)),t.size}function S(t,e){if("number"!=typeof e){var n=e>>>0;if(""+n!==e||4294967295===n)return NaN;e=n}return e<0?N(t)+e:e}function D(){return!0}function I(t,e,n){return(0===t||void 0!==n&&t<=-n)&&(void 0===e||void 0!==n&&e>=n)}function A(t,e){return C(t,e,0)}function T(t,e){return C(t,e,e)}function C(t,e,n){return void 0===t?n:t<0?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}var E=0,O=1,z=2,k="function"==typeof Symbol&&Symbol.iterator,U="@@iterator",Y=k||U;function R(t){this.next=t}function P(t,e,n,r){var i=0===t?e:1===t?n:[e,n];return r?r.value=i:r={value:i,done:!1},r}function Q(){return{value:void 0,done:!0}}function B(t){return!!W(t)}function F(t){return t&&"function"==typeof t.next}function G(t){var e=W(t);return e&&e.call(t)}function W(t){var e=t&&(k&&t[k]||t[U]);if("function"==typeof e)return e}function q(t){return t&&"number"==typeof t.length}function J(t){return null==t?ut():u(t)?t.toSeq():ct(t)}function Z(t){return null==t?ut().toKeyedSeq():u(t)?s(t)?t.toSeq():t.fromEntrySeq():st(t)}function X(t){return null==t?ut():u(t)?s(t)?t.entrySeq():t.toIndexedSeq():at(t)}function V(t){return(null==t?ut():u(t)?s(t)?t.entrySeq():t:at(t)).toSetSeq()}R.prototype.toString=function(){return"[Iterator]"},R.KEYS=E,R.VALUES=O,R.ENTRIES=z,R.prototype.inspect=R.prototype.toSource=function(){return this.toString()},R.prototype[Y]=function(){return this},e(J,n),J.of=function(){return J(arguments)},J.prototype.toSeq=function(){return this},J.prototype.toString=function(){return this.__toString("Seq {","}")},J.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().Line truncated
//# sourceMappingURL=swagger-ui-standalone-preset.js.map
@@ -1 +0,0 @@
{"version":3,"sources":["webpack://SwaggerUIStandalonePreset/webpack/universalModuleDefinition","webpack://SwaggerUIStandalonePreset/webpack/bootstrap","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/export.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/global.js","webpack://SwaggerUIStandalonePreset/./node_modules/react/index.js","webpack://SwaggerUIStandalonePreset/./node_modules/immutable/dist/immutable.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/an-object.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/fails.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/function-uncurry-this.js","webpack://SwaggerUIStandalonePreset/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js","webpack://SwaggerUIStandalonePreset/./node_modules/@babel/runtime-corejs3/core-js-stable/array/is-array.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/object-is-prototype-of.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/is-pure.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/function-call.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/define-well-known-symbol.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/well-known-symbol.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/entry-virtual.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/is-callable.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/path.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/a-callable.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/descriptors.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/is-object.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/has-own-property.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/iterate.js","webpack://SwaggerUIStandalonePreset/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/for-each.js","webpack://SwaggerUIStandalonePreset/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/map.js","webpack://SwaggerUIStandalonePreset/./src/core/utils.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/function-bind-context.js","webpack://SwaggerUIStandalonePreset/./node_modules/@babel/runtime-corejs3/helpers/defineProperty.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/to-object.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/object-define-property.js","webpack://SwaggerUIStandalonePreset/./node_modules/inherits/inherits_browser.js","webpack://SwaggerUIStandalonePreset/./node_modules/safe-buffer/index.js","webpack://SwaggerUIStandalonePreset/./node_modules/@babel/runtime-corejs3/helpers/typeof.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/get-built-in.js","webpack://SwaggerUIStandalonePreset/(webpack)/buildin/global.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/length-of-array-like.js","webpack://SwaggerUIStandalonePreset/./node_modules/lodash/isArray.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/get-map-iterator.js","webpack://SwaggerUIStandalonePreset/./node_modules/@babel/runtime-corejs3/helpers/classCallCheck.js","webpack://SwaggerUIStandalonePreset/./node_modules/@babel/runtime-corejs3/helpers/createClass.js","webpack://SwaggerUIStandalonePreset/./node_modules/@babel/runtime-corejs3/helpers/inherits.js","webpack://SwaggerUIStandalonePreset/./node_modules/@babel/runtime-corejs3/helpers/createSuper.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/to-indexed-object.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/array-iteration.js","webpack://SwaggerUIStandalonePreset/./node_modules/lodash/_root.js","webpack://SwaggerUIStandalonePreset/./node_modules/@babel/runtime-corejs3/helpers/assertThisInitialized.js","webpack://SwaggerUIStandalonePreset/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js","webpack://SwaggerUIStandalonePreset/./node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/classof.js","webpack://SwaggerUIStandalonePreset/./node_modules/lodash/memoize.js","webpack://SwaggerUIStandalonePreset/./node_modules/@babel/runtime-corejs3/helpers/toConsumableArray.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/classof-raw.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/create-non-enumerable-property.js","webpack://SwaggerUIStandalonePresetLine truncated
-4
View File
@@ -1,4 +0,0 @@
.swagger-ui{color:#3b4151;
/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */font-family:sans-serif}.swagger-ui html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;line-height:1.15}.swagger-ui body{margin:0}.swagger-ui article,.swagger-ui aside,.swagger-ui footer,.swagger-ui header,.swagger-ui nav,.swagger-ui section{display:block}.swagger-ui h1{font-size:2em;margin:.67em 0}.swagger-ui figcaption,.swagger-ui figure,.swagger-ui main{display:block}.swagger-ui figure{margin:1em 40px}.swagger-ui hr{box-sizing:content-box;height:0;overflow:visible}.swagger-ui pre{font-family:monospace,monospace;font-size:1em}.swagger-ui a{-webkit-text-decoration-skip:objects;background-color:transparent}.swagger-ui abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.swagger-ui b,.swagger-ui strong{font-weight:inherit;font-weight:bolder}.swagger-ui code,.swagger-ui kbd,.swagger-ui samp{font-family:monospace,monospace;font-size:1em}.swagger-ui dfn{font-style:italic}.swagger-ui mark{background-color:#ff0;color:#000}.swagger-ui small{font-size:80%}.swagger-ui sub,.swagger-ui sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.swagger-ui sub{bottom:-.25em}.swagger-ui sup{top:-.5em}.swagger-ui audio,.swagger-ui video{display:inline-block}.swagger-ui audio:not([controls]){display:none;height:0}.swagger-ui img{border-style:none}.swagger-ui svg:not(:root){overflow:hidden}.swagger-ui button,.swagger-ui input,.swagger-ui optgroup,.swagger-ui select,.swagger-ui textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}.swagger-ui button,.swagger-ui input{overflow:visible}.swagger-ui button,.swagger-ui select{text-transform:none}.swagger-ui [type=reset],.swagger-ui [type=submit],.swagger-ui button,.swagger-ui html [type=button]{-webkit-appearance:button}.swagger-ui [type=button]::-moz-focus-inner,.swagger-ui [type=reset]::-moz-focus-inner,.swagger-ui [type=submit]::-moz-focus-inner,.swagger-ui button::-moz-focus-inner{border-style:none;padding:0}.swagger-ui [type=button]:-moz-focusring,.swagger-ui [type=reset]:-moz-focusring,.swagger-ui [type=submit]:-moz-focusring,.swagger-ui button:-moz-focusring{outline:1px dotted ButtonText}.swagger-ui fieldset{padding:.35em .75em .625em}.swagger-ui legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}.swagger-ui progress{display:inline-block;vertical-align:baseline}.swagger-ui textarea{overflow:auto}.swagger-ui [type=checkbox],.swagger-ui [type=radio]{box-sizing:border-box;padding:0}.swagger-ui [type=number]::-webkit-inner-spin-button,.swagger-ui [type=number]::-webkit-outer-spin-button{height:auto}.swagger-ui [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.swagger-ui [type=search]::-webkit-search-cancel-button,.swagger-ui [type=search]::-webkit-search-decoration{-webkit-appearance:none}.swagger-ui ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.swagger-ui details,.swagger-ui menu{display:block}.swagger-ui summary{display:list-item}.swagger-ui canvas{display:inline-block}.swagger-ui [hidden],.swagger-ui template{display:none}.swagger-ui .debug *{outline:1px solid gold}.swagger-ui .debug-white *{outline:1px solid #fff}.swagger-ui .debug-black *{outline:1px solid #000}.swagger-ui .debug-grid{background:transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MTRDOTY4N0U2N0VFMTFFNjg2MzZDQjkwNkQ4MjgwMEIiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MTRDOTY4N0Q2N0VFMTFFNjg2MzZDQjkwNkQ4MjgwMEIiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3NjcyQkQ3NjY3QzUxMUU2QjJCQ0UyNDA4MTAwMjE3MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3NjcyQkQ3NzY3QzUxMUU2QjJCQ0UyNDA4MTAwMjE3MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsBS+GMAAAAjSURBVHjaYvz//z8DLsD4gcGXiYEAGBIKGBne//fFpwAgwAB98AaF2pjlUQAAAABJRU5ErkJggg==) repeat 0 0}.swagger-ui .debug-grid-16{background:transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eLine truncated
/*# sourceMappingURL=swagger-ui.css.map*/
-1
View File
@@ -1 +0,0 @@
{"version":3,"sources":["webpack:///./src/style/main.scss","webpack:///./src/style/_type.scss","webpack:///./src/style/_variables.scss","webpack:///./node_modules/tachyons-sass/scss/_normalize.scss","webpack:///./node_modules/tachyons-sass/scss/_debug-children.scss","webpack:///./node_modules/tachyons-sass/scss/_debug-grid.scss","webpack:///./node_modules/tachyons-sass/scss/_box-sizing.scss","webpack:///./node_modules/tachyons-sass/scss/_aspect-ratios.scss","webpack:///./node_modules/tachyons-sass/scss/_images.scss","webpack:///./node_modules/tachyons-sass/scss/_background-size.scss","webpack:///./node_modules/tachyons-sass/scss/_background-position.scss","webpack:///./node_modules/tachyons-sass/scss/_outlines.scss","webpack:///./node_modules/tachyons-sass/scss/_borders.scss","webpack:///./node_modules/tachyons-sass/scss/_border-colors.scss","webpack:///./node_modules/tachyons-sass/scss/_border-radius.scss","webpack:///./node_modules/tachyons-sass/scss/_border-style.scss","webpack:///./node_modules/tachyons-sass/scss/_border-widths.scss","webpack:///./node_modules/tachyons-sass/scss/_box-shadow.scss","webpack:///./node_modules/tachyons-sass/scss/_code.scss","webpack:///./node_modules/tachyons-sass/scss/_coordinates.scss","webpack:///./node_modules/tachyons-sass/scss/_clears.scss","webpack:///./node_modules/tachyons-sass/scss/_flexbox.scss","webpack:///./node_modules/tachyons-sass/scss/_display.scss","webpack:///./node_modules/tachyons-sass/scss/_floats.scss","webpack:///./node_modules/tachyons-sass/scss/_font-family.scss","webpack:///./node_modules/tachyons-sass/scss/_font-style.scss","webpack:///./node_modules/tachyons-sass/scss/_font-weight.scss","webpack:///./node_modules/tachyons-sass/scss/_forms.scss","webpack:///./node_modules/tachyons-sass/scss/_heights.scss","webpack:///./node_modules/tachyons-sass/scss/_letter-spacing.scss","webpack:///./node_modules/tachyons-sass/scss/_line-height.scss","webpack:///./node_modules/tachyons-sass/scss/_links.scss","webpack:///./node_modules/tachyons-sass/scss/_lists.scss","webpack:///./node_modules/tachyons-sass/scss/_max-widths.scss","webpack:///./node_modules/tachyons-sass/scss/_widths.scss","webpack:///./node_modules/tachyons-sass/scss/_overflow.scss","webpack:///./node_modules/tachyons-sass/scss/_position.scss","webpack:///./node_modules/tachyons-sass/scss/_opacity.scss","webpack:///./node_modules/tachyons-sass/scss/_rotations.scss","webpack:///./node_modules/tachyons-sass/scss/_skins.scss","webpack:///./node_modules/tachyons-sass/scss/_skins-pseudo.scss","webpack:///./node_modules/tachyons-sass/scss/_spacing.scss","webpack:///./node_modules/tachyons-sass/scss/_variables.scss","webpack:///./node_modules/tachyons-sass/scss/_negative-margins.scss","webpack:///./node_modules/tachyons-sass/scss/_tables.scss","webpack:///./node_modules/tachyons-sass/scss/_text-decoration.scss","webpack:///./node_modules/tachyons-sass/scss/_text-align.scss","webpack:///./node_modules/tachyons-sass/scss/_text-transform.scss","webpack:///./node_modules/tachyons-sass/scss/_type-scale.scss","webpack:///./node_modules/tachyons-sass/scss/_typography.scss","webpack:///./node_modules/tachyons-sass/scss/_utilities.scss","webpack:///./node_modules/tachyons-sass/scss/_visibility.scss","webpack:///./node_modules/tachyons-sass/scss/_white-space.scss","webpack:///./node_modules/tachyons-sass/scss/_vertical-align.scss","webpack:///./node_modules/tachyons-sass/scss/_hovers.scss","webpack:///./node_modules/tachyons-sass/scss/_z-index.scss","webpack:///./node_modules/tachyons-sass/scss/_nested.scss","webpack:///./src/style/_layout.scss","webpack:///./src/style/_buttons.scss","webpack:///./src/style/_mixins.scss","webpack:///./src/style/_form.scss","webpack:///./src/style/_modal.scss","webpack:///./src/style/_models.scss","webpack:///./src/style/_servers.scss","webpack:///./src/style/_table.scss","webpack:///./src/style/_topbar.scss","webpack:///./src/style/_information.scss","webpack:///./src/style/_authorize.scss","webpack:///./src/style/_errors.scss","webpack:///./src/style/_split-pane-mode.scss","webpack:///./src/style/_markdown.scss"],"names":[],"mappings":"AAAA,YCII,aCYU;ECTd,4EFLI,sBDqhCJ,CGrgCA,iBAEE,0BACA,8BAFA,gBH4gCF,CGhgCA,iBACE,QHkgCF,CG3/BA,gHAME,aH6/BF,CGr/BA,eACE,cACA,cHu/BF,CG5+BA,2DAGE,aH++BF,CGx+BA,mBACE,eH0+BF,CGl+BA,eACE,uBACA,SACA,gBHu+BF,CG/9BA,gBACE,gCACA,aHm+BF,CGx9BA,cAEE,qCADA,4BH69BF,CGp9BA,wBACE,mBACA,0BACA,yEHy9BF,CGl9BA,iCAEE,oBASA,kBH28BF,CGn8BA,kDAGE,gCACA,aH28BF,CGp8BA,gBACE,iBHs8BF,CG/7BA,iBACE,sBACA,UHi8BF,CG17BA,kBACE,aH47BF,CGp7BA,gCAEE,cACA,cACA,kBACA,uBHs7BF,CGn7BA,gBACE,aHq7BF,CGl7BA,gBACE,SHo7BF,CG16BA,oCAEE,oBH46BF,CGr6BA,kCACE,aACA,QHu6BF,CGh6BA,gBACE,iBHk6BF,CG35BA,2BACE,eH65BF,CGl5BA,kGAKE,uBACA,eACA,iBACA,QHw5BF,CGh5BA,qCAEE,gBHm5BF,CG34BA,sCAEE,mBH84BF,CGr4BA,qGAIE,yBHw4BF,CGj4BA,wKAIE,kBACA,SHm4BF,CG53BA,4JAIE,6BH83BF,CGv3BA,qBACE,0BHy3BF,CG/2BA,mBACE,sBACA,cACA,cACA,eACA,UACA,kBHu3BF,CG/2BA,qBACE,qBACA,uBHm3BF,CG52BA,qBACE,aH82BF,CGt2BA,qDAEE,sBACA,SH02BLine truncated
Loaded 100 of 214 files, more files were not shown because too many files have changed in this diff. Show more