diff --git a/.dockerignore b/.dockerignore
deleted file mode 100644
index 61a7393..0000000
--- a/.dockerignore
+++ /dev/null
@@ -1,45 +0,0 @@
-# This file excludes paths from the Docker build context.
-#
-# By default, Docker's build context includes all files (and folders) in the
-# current directory. Even if a file isn't copied into the container it is still sent to
-# the Docker daemon.
-#
-# There are multiple reasons to exclude files from the build context:
-#
-# 1. Prevent nested folders from being copied into the container (ex: exclude
-# /assets/node_modules when copying /assets)
-# 2. Reduce the size of the build context and improve build time (ex. /build, /deps, /doc)
-# 3. Avoid sending files containing sensitive information
-#
-# More information on using .dockerignore is available here:
-# https://docs.docker.com/engine/reference/builder/#dockerignore-file
-
-.dockerignore
-
-# Ignore git, but keep git HEAD and refs to access current commit hash if needed:
-#
-# $ cat .git/HEAD | awk '{print ".git/"$2}' | xargs cat
-# d0b8727759e1e0e7aa3d41707d12376e373d5ecc
-.git
-!.git/HEAD
-!.git/refs
-
-# Common development/test artifacts
-/cover/
-/doc/
-/test/
-/tmp/
-.elixir_ls
-
-# Mix artifacts
-/_build/
-/deps/
-*.ez
-
-# Generated on crash by the VM
-erl_crash.dump
-
-# Static artifacts - These should be fetched and built inside the Docker image
-/assets/node_modules/
-/priv/static/assets/
-/priv/static/cache_manifest.json
diff --git a/.formatter.exs b/.formatter.exs
deleted file mode 100644
index ef8840c..0000000
--- a/.formatter.exs
+++ /dev/null
@@ -1,6 +0,0 @@
-[
- import_deps: [:ecto, :ecto_sql, :phoenix],
- subdirectories: ["priv/*/migrations"],
- plugins: [Phoenix.LiveView.HTMLFormatter],
- inputs: ["*.{heex,ex,exs}", "{config,lib,test}/**/*.{heex,ex,exs}", "priv/*/seeds.exs"]
-]
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..56e47c6
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,39 @@
+name: CI
+
+on:
+ push:
+ branches: ["**"]
+ pull_request:
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: npm
+ - run: npm ci
+ - run: npm run typecheck
+ - run: npm test
+ - run: npm run build
+
+ deploy:
+ # Deploys main to Cloudflare. Needs the CLOUDFLARE_API_TOKEN and
+ # CLOUDFLARE_ACCOUNT_ID repository secrets (see README).
+ needs: test
+ if: github.ref == 'refs/heads/main' && github.event_name == 'push'
+ runs-on: ubuntu-latest
+ concurrency: deploy
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: npm
+ - run: npm ci
+ - run: npm run deploy
+ env:
+ CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
+ CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
diff --git a/.github/workflows/fly-deploy.yml b/.github/workflows/fly-deploy.yml
deleted file mode 100644
index b0c246e..0000000
--- a/.github/workflows/fly-deploy.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-# See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/
-
-name: Fly Deploy
-on:
- push:
- branches:
- - main
-jobs:
- deploy:
- name: Deploy app
- runs-on: ubuntu-latest
- concurrency: deploy-group # optional: ensure only one action runs at a time
- steps:
- - uses: actions/checkout@v4
- - uses: superfly/flyctl-actions/setup-flyctl@master
- - run: flyctl deploy --remote-only
- env:
- FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
diff --git a/.gitignore b/.gitignore
index 83e8450..e95c817 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,49 +1,12 @@
-# The directory Mix will write compiled artifacts to.
-/_build/
-
-# If you run "mix test --cover", coverage assets end up here.
-/cover/
-
-# The directory Mix downloads your dependencies sources to.
-/deps/
-
-# Where 3rd-party dependencies like ExDoc output generated docs.
-/doc/
-
-# Ignore .fetch files in case you like to edit your project deps locally.
-/.fetch
-
-# If the VM crashes, it generates a dump, let's ignore it too.
-erl_crash.dump
-
-# Also ignore archive artifacts (built via "mix archive.build").
-*.ez
-
-# Temporary files, for example, from tests.
-/tmp/
-
-# Ignore package tarball (built via "mix hex.build").
-pling-*.tar
-
-# Ignore assets that are produced by build tools.
-/priv/static/assets/
-
-# Ignore digested assets cache.
-/priv/static/cache_manifest.json
-
-# In case you use Node.js/npm, you want to ignore these.
-npm-debug.log
-/assets/node_modules/
-
-# Database files
-*.db
-*.db-*
-
-*.duckdb
-*.duckdb.*
-
-*.db.wal
-
-.elixir_ls
-
-*.env
\ No newline at end of file
+node_modules/
+dist/
+.wrangler/
+.dev.vars*
+!.dev.vars.example
+*.log
+.DS_Store
+coverage/
+
+# Generated by `wrangler types` on npm install
+.cloudflare/
+src/paraglide/
diff --git a/Dockerfile b/Dockerfile
deleted file mode 100644
index 5397d9b..0000000
--- a/Dockerfile
+++ /dev/null
@@ -1,97 +0,0 @@
-# Find eligible builder and runner images on Docker Hub. We use Ubuntu/Debian
-# instead of Alpine to avoid DNS resolution issues in production.
-#
-# https://hub.docker.com/r/hexpm/elixir/tags?page=1&name=ubuntu
-# https://hub.docker.com/_/ubuntu?tab=tags
-#
-# This file is based on these images:
-#
-# - https://hub.docker.com/r/hexpm/elixir/tags - for the build image
-# - https://hub.docker.com/_/debian?tab=tags&page=1&name=bullseye-20241202-slim - for the release image
-# - https://pkgs.org/ - resource for finding needed packages
-# - Ex: hexpm/elixir:1.17.3-erlang-27.2-debian-bullseye-20241202-slim
-#
-ARG ELIXIR_VERSION=1.17.3
-ARG OTP_VERSION=27.2
-ARG DEBIAN_VERSION=bullseye-20241202-slim
-
-ARG BUILDER_IMAGE="hexpm/elixir:${ELIXIR_VERSION}-erlang-${OTP_VERSION}-debian-${DEBIAN_VERSION}"
-ARG RUNNER_IMAGE="debian:${DEBIAN_VERSION}"
-
-FROM ${BUILDER_IMAGE} as builder
-
-# install build dependencies
-RUN apt-get update -y && apt-get install -y build-essential git \
- && apt-get clean && rm -f /var/lib/apt/lists/*_*
-
-# prepare build dir
-WORKDIR /app
-
-# install hex + rebar
-RUN mix local.hex --force && \
- mix local.rebar --force
-
-# set build ENV
-ENV MIX_ENV="prod"
-
-# install mix dependencies
-COPY mix.exs mix.lock ./
-RUN mix deps.get --only $MIX_ENV
-RUN mkdir config
-
-# copy compile-time config files before we compile dependencies
-# to ensure any relevant config change will trigger the dependencies
-# to be re-compiled.
-COPY config/config.exs config/${MIX_ENV}.exs config/
-RUN mix deps.compile
-
-COPY priv priv
-
-COPY lib lib
-
-COPY assets assets
-
-# compile assets
-RUN mix assets.deploy
-
-# Compile the release
-RUN mix compile
-
-# Changes to config/runtime.exs don't require recompiling the code
-COPY config/runtime.exs config/
-
-COPY rel rel
-RUN mix release
-
-# start a new build stage so that the final image will only contain
-# the compiled release and other runtime necessities
-FROM ${RUNNER_IMAGE}
-
-RUN apt-get update -y && \
- apt-get install -y libstdc++6 openssl libncurses5 locales ca-certificates \
- && apt-get clean && rm -f /var/lib/apt/lists/*_*
-
-# Set the locale
-RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
-
-ENV LANG en_US.UTF-8
-ENV LANGUAGE en_US:en
-ENV LC_ALL en_US.UTF-8
-
-WORKDIR "/app"
-RUN chown nobody /app
-
-# set runner ENV
-ENV MIX_ENV="prod"
-
-# Only copy the final release from the build stage
-COPY --from=builder --chown=nobody:root /app/_build/${MIX_ENV}/rel/pling ./
-
-USER nobody
-
-# If using an environment that doesn't automatically reap zombie processes, it is
-# advised to add an init process such as tini via `apt-get install`
-# above and adding an entrypoint. See https://github.com/krallin/tini for details
-# ENTRYPOINT ["/tini", "--"]
-
-CMD ["/app/bin/server"]
diff --git a/README.md b/README.md
index f4f033a..fad88ae 100644
--- a/README.md
+++ b/README.md
@@ -1,31 +1,136 @@
# Pling
+A real-time music buzzer game for the living room. One phone is the host and
+plays the songs in Spotify; everyone else's phone is a buzzer. First to hit
+**PLING** answers, and the host judges.
-This multiplayer game is a tech demo, and a learning project. I think format is quite promising, not a lot of people makes ten real-time games every month, but I think it might just be possible if we build the right foundations first. This project is about finding the proper foundations.
+It started as a tech demo for building real-time games quickly. This version
+runs on Cloudflare: one [Durable Object](https://developers.cloudflare.com/durable-objects/)
+per room via [PartyServer](https://github.com/cloudflare/partykit/tree/main/packages/partyserver),
+and a React app served as static assets from the same Worker.
+## How a game works
-Server code is in https://github.com/kluvin/pling/tree/main/lib/pling
+1. The host creates a room (Red vs Blue, or free-for-all) and shares the code or QR code.
+2. The host taps **Play in Spotify**: the song opens in the host's own Spotify app
+ (connect that phone to a speaker) and the round timer starts.
+3. Players buzz from their phones. In Red vs Blue, one phone can be a shared
+ buzzer with a button per team.
+4. The host pauses the music and marks the answer right or wrong. A wrong answer
+ locks that team (or player) out for the rest of the song.
-Client code is in https://github.com/kluvin/pling/tree/main/lib/pling_web
+**Music:** the host picks a built-in deck, imports a list, starts a **Blend**,
+shares a **Spotify Blend, collaborative playlist or Jam**, or chooses
+**Own music** and plays anything from any app.
-Git hygiene is optional.
+**Blend:** every player can add their own playlist from their phone (**Music**
+at the top). The host mixes them: songs that are on several lists come first,
+then an equal share from each list, however long it is. Optionally keep only the
+songs you have in common. When a song is revealed, it shows whose list it came
+from. Nobody sees what others added until it's played.
-"eugh" has to be the worst worst way to name your first commit.
+**Spotify Blend, collaborative playlist or Jam:** let Spotify collect the music.
+The host makes one in Spotify, copies its share link and pastes it under
+**Music → Spotify**. Players get a button (*Join the Spotify Blend*, *Add songs
+to the playlist* or *Join the Jam*) that opens it in their own Spotify app. The
+host plays it on shuffle, skips to the next song and starts each round; Pling
+does the buzzers and scores. Pling can't see these songs, so there's no reveal
+card. Only links on Spotify's own domains (`open.spotify.com`, `spotify.link`)
+are accepted.
+- **Spotify Blend:** mixes the taste of up to 10 people into one playlist.
+- **Collaborative playlist:** everyone adds songs from their phone.
+- **Spotify Jam:** a shared live queue for up to 32 people. Only the host needs
+ Premium.
-To start your Phoenix server:
+**Getting a playlist in** (for a blend or as the deck):
- * Run `mix setup` to install and setup dependencies
- * Start Phoenix endpoint with `mix phx.server` or inside IEx with `iex -S mix phx.server`
+- **Spotify on a computer:** open the playlist, select all songs (Ctrl/⌘+A),
+ copy (Ctrl/⌘+C) and paste into Pling. You get one link per song. Spotify only
+ copies links, so these songs show their name once opened in Spotify.
+- **A CSV file**, for example from a playlist export tool like Exportify, or any
+ sheet with artist and title columns.
+- **Your Spotify data export** (`Playlist1.json`, `YourLibrary.json`).
+- Typing or pasting **"Artist - Title"** lines.
-Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.
+### Spotify and compliance
-Ready to run in production? Please [check our deployment guides](https://hexdocs.pm/phoenix/deployment.html).
+Pling does not use Spotify's Web API, SDKs or embedded player. It only shows
+plain `open.spotify.com` links that the host taps, so playback happens in the
+host's own Spotify app on their own account. Song lists come from the built-in
+decks or from what players paste or import from files they already have.
+There is deliberately no "log in with Spotify": that would use Spotify's Web API,
+whose developer terms don't allow games or quizzes.
+Starter decks only store artist and title, so their links open a Spotify search;
+pasted or imported tracks link straight to the song. Pling is not affiliated
+with Spotify.
-## Learn more
+## Code layout
- * Official website: https://www.phoenixframework.org/
- * Guides: https://hexdocs.pm/phoenix/overview.html
- * Docs: https://hexdocs.pm/phoenix
- * Forum: https://elixirforum.com/c/phoenix-forum
- * Source: https://github.com/phoenixframework/phoenix
+| Path | What it is |
+|---|---|
+| `src/shared/game.ts` | All game rules as pure functions (no I/O, time passed in). |
+| `src/shared/view.ts` | What each client is sent; players never see the song until it's revealed. |
+| `src/shared/spotify.ts` | Spotify links, and reading pasted lists, CSV files and data exports. |
+| `src/shared/blend.ts` | The blend: matching songs across lists and picking a fair cross-section. |
+| `src/shared/decks.ts` | Built-in starter decks. |
+| `src/server/index.ts` | The Worker and the `Room` Durable Object. |
+| `src/client/` | The React app. |
+| `messages/en.json`, `messages/nb.json` | UI text in English and Norwegian (Bokmål), compiled by Paraglide. |
+| `cloudflare.config.ts` | Worker, static assets and the `Room` Durable Object, for the `cf` CLI. |
+| `test/` | Unit tests (Vitest). |
+
+The room server follows one loop: apply the change with the pure rules, save the
+state to Durable Object storage, set a single alarm for the next thing that has
+to happen (round timeout, host handover, deleting an empty room), and send each
+connection its view. Rooms hibernate when idle, so quiet rooms cost nothing.
+
+## Development
+
+```bash
+npm install # also generates Worker types in .cloudflare/types (cf workers types)
+npm run dev # cf dev: Vite + the real Workers runtime, with hot reload
+npm test # unit tests
+npm run typecheck
+npm run preview # build, then run the production build locally
+```
+
+## Languages
+
+The UI is in English and Norwegian (Bokmål), using [Paraglide](https://paraglidejs.com).
+A saved choice wins, then the browser's language (`nb`, `nn` and `no` all get
+Norwegian), then English. Players switch under **Settings → Language** or on the
+home page.
+
+To change or add text, edit `messages/en.json` and `messages/nb.json` (same keys
+in both) and use it as `m.key()` from `src/client/i18n.ts`. `npm run i18n`
+compiles the messages to `src/paraglide/` (also done by `npm install`, `dev`
+and `build`). The message-format plugin is loaded from `node_modules`, not a
+CDN, so builds work offline. The server sends errors in English; the client
+translates the ones it knows (`translateServerError`).
+
+## Deploying to Cloudflare
+
+Pling uses Cloudflare's `cf` CLI (installed as a dev dependency), not Wrangler.
+
+Run it once by hand:
+
+```bash
+npx cf auth login
+npm run deploy
+```
+
+`cf deploy` builds, uploads and prints the `*.workers.dev` URL. Durable Objects with SQLite storage are
+available on the Workers Free plan.
+
+For automatic deploys on every push to `main`, add two repository secrets in
+GitHub (Settings → Secrets and variables → Actions):
+
+- `CLOUDFLARE_ACCOUNT_ID`: shown in the Cloudflare dashboard sidebar.
+- `CLOUDFLARE_API_TOKEN`: create one from the **Edit Cloudflare Workers** template.
+
+## History
+
+The first version was a Phoenix LiveView app on Fly.io using the Spotify embed
+player and a separate playlist-fetcher service. It's in the git history before
+the move to Cloudflare.
diff --git a/assets/css/app.css b/assets/css/app.css
deleted file mode 100644
index 46dc3dc..0000000
--- a/assets/css/app.css
+++ /dev/null
@@ -1,232 +0,0 @@
-@import "tailwindcss";
-
-/* This file is for your main application CSS */
-
-
-:root {
- --accent: 136, 58, 234;
- --accent-light: 224, 204, 250;
- --accent-dark: 49, 10, 101;
- --accent-gradient: linear-gradient(
- 45deg,
- rgb(var(--accent)),
- rgb(var(--accent-light)) 30%,
- white 60%
- );
-}
-
-/* https://stackoverflow.com/a/47131647 */
-button {
- touch-action: manipulation;
-}
-
-html {
- overscroll-behavior: none;
- ::-webkit-scrollbar { display: none; }
- @apply bg-[#FFFDF2];
- /* @apply bg-[#FFFBEB]; */
-
- font-family: system-ui, sans-serif;
- font-weight: 600;
- background-size: 224px;
-}
-code {
- font-family:
- Menlo,
- Monaco,
- Lucida Console,
- Liberation Mono,
- DejaVu Sans Mono,
- Bitstream Vera Sans Mono,
- Courier New,
- monospace;
-}
-
-:root {
---shadow-color: 213deg 10% 57%;
---shadow-color-secondary: #047857
---shadow-elevation-a:
-0.5px 0.5px 0.8px hsl(var(--shadow-color) / 0.34),
-0.9px 0.8px 1.4px -1.2px hsl(var(--shadow-color) / 0.34),
-2.1px 1.9px 3.2px -2.4px hsl(var(--shadow-color) / 0.35);
---shadow-elevation-b:
-0.5px 0.5px 0.8px hsl(var(--shadow-color) / 0.35),
-1.8px 1.6px 2.7px -0.8px hsl(var(--shadow-color) / 0.36),
-4.4px 4px 6.7px -1.6px hsl(var(--shadow-color) / 0.36),
-10.6px 9.7px 16.3px -2.4px hsl(var(--shadow-color) / 0.36);
---shadow-elevation-c:
-0.5px 0.5px 0.8px hsl(var(--shadow-color) / 0.33),
-3.1px 2.9px 4.8px -0.4px hsl(var(--shadow-color) / 0.33),
-5.8px 5.4px 9px -0.7px hsl(var(--shadow-color) / 0.33),
-9.5px 8.8px 14.7px -1px hsl(var(--shadow-color) / 0.33),
-15.2px 13.9px 23.3px -1.4px hsl(var(--shadow-color) / 0.34),
-23.7px 21.7px 36.4px -1.8px hsl(var(--shadow-color) / 0.34),
-35.9px 33px 55.2px -2.1px hsl(var(--shadow-color) / 0.34),
-52.9px 48.5px 81.3px -2.4px hsl(var(--shadow-color) / 0.34);
-
---shadow-elevation-c-secondary:
-0.5px 0.5px 0.8px hsl(var(--shadow-color-secondary) / 0.33),
-3.1px 2.9px 4.8px -0.4px hsl(var(--shadow-color-secondary) / 0.33),
-5.8px 5.4px 9px -0.7px hsl(var(--shadow-color-secondary) / 0.33),
-9.5px 8.8px 14.7px -1px hsl(var(--shadow-color-secondary) / 0.33),
-15.2px 13.9px 23.3px -1.4px hsl(var(--shadow-color-secondary) / 0.34),
-23.7px 21.7px 36.4px -1.8px hsl(var(--shadow-color-secondary) / 0.34),
-35.9px 33px 55.2px -2.1px hsl(var(--shadow-color-secondary) / 0.34),
-52.9px 48.5px 81.3px -2.4px hsl(var(--shadow-color-secondary) / 0.34);
-}
-
-/* Define classes to apply these shadows */
-.shadow-a {
-box-shadow: var(--shadow-elevation-a);
-}
-
-.shadow-b {
-box-shadow: var(--shadow-elevation-b);
-}
-
-.shadow-c {
-box-shadow: var(--shadow-elevation-c);
-}
-
-.shadow-c-secondary {
-box-shadow: var(--shadow-elevation-c);
-}
-
-
-/* button */
-.pushable {
- position: relative;
- border: none;
- background: transparent;
- padding: 0;
- cursor: pointer;
- outline-offset: 4px;
- transition: filter 250ms;
-}
-.shadow {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- border-radius: 999px;
- background: hsl(0deg 0% 0% / 0.25);
- will-change: transform;
- transform: translateY(12px);
- transition:
- transform
- 600ms
- cubic-bezier(.3, .7, .4, 1);
-}
-.edge {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- border-radius: 999px;
-}
-.front {
- display: block;
- position: relative;
- padding: 9rem;
- border-radius: 999px;
- font-size: 1.25rem;
- color: white;
- will-change: transform;
- transform: translateY(-4px);
- transition:
- transform
- 600ms
- cubic-bezier(.3, .7, .4, 1);
-}
-.pushable:hover {
- filter: brightness(110%);
-}
-.pushable:hover .front {
- transform: translateY(-6px);
- transition:
- transform
- 250ms
- cubic-bezier(.3, .7, .4, 1.5);
-}
-.pushable:active .front {
- transform: translateY(-2px);
- transition: transform 34ms;
-}
-.pushable:hover .shadow {
- transform: translateY(4px);
- transition:
- transform
- 250ms
- cubic-bezier(.3, .7, .4, 1.5);
-}
-.pushable:active .shadow {
- transform: translateY(1px);
- transition: transform 34ms;
-}
-.pushable:focus:not(:focus-visible) {
- outline: none;
-}
-
-
-@layer base {
- :root {
- --background: 0 0% 100%;
- --foreground: 224 71.4% 4.1%;
- --card: 0 0% 100%;
- --card-foreground: 224 71.4% 4.1%;
- --popover: 0 0% 100%;
- --popover-foreground: 224 71.4% 4.1%;
- --primary: 220.9 39.3% 11%;
- --primary-foreground: 210 20% 98%;
- --secondary: 220 14.3% 95.9%;
- --secondary-foreground: 220.9 39.3% 11%;
- --muted: 220 14.3% 95.9%;
- --muted-foreground: 220 8.9% 46.1%;
- --accent: 220 14.3% 95.9%;
- --accent-foreground: 220.9 39.3% 11%;
- --destructive: 0 84.2% 60.2%;
- --destructive-foreground: 210 20% 98%;
- --border: 220 13% 91%;
- --input: 220 13% 91%;
- --ring: 224 71.4% 4.1%;
- --radius: 1rem;
- --chart-1: 12 76% 61%;
- --chart-2: 173 58% 39%;
- --chart-3: 197 37% 24%;
- --chart-4: 43 74% 66%;
- --chart-5: 27 87% 67%;
-}
-
-.dark {
- --background: 224 71.4% 4.1%;
- --foreground: 210 20% 98%;
- --card: 224 71.4% 4.1%;
- --card-foreground: 210 20% 98%;
- --popover: 224 71.4% 4.1%;
- --popover-foreground: 210 20% 98%;
- --primary: 210 20% 98%;
- --primary-foreground: 220.9 39.3% 11%;
- --secondary: 215 27.9% 16.9%;
- --secondary-foreground: 210 20% 98%;
- --muted: 215 27.9% 16.9%;
- --muted-foreground: 217.9 10.6% 64.9%;
- --accent: 215 27.9% 16.9%;
- --accent-foreground: 210 20% 98%;
- --destructive: 0 62.8% 30.6%;
- --destructive-foreground: 210 20% 98%;
- --border: 215 27.9% 16.9%;
- --input: 215 27.9% 16.9%;
- --ring: 216 12.2% 83.9%;
- --chart-1: 220 70% 50%;
- --chart-2: 160 60% 45%;
- --chart-3: 30 80% 55%;
- --chart-4: 280 65% 60%;
- --chart-5: 340 75% 55%;
-}
-
- * {
- border-color: hsl(var(--border)) !important;
- }
-}
diff --git a/assets/js/app.js b/assets/js/app.js
deleted file mode 100644
index b4acbb6..0000000
--- a/assets/js/app.js
+++ /dev/null
@@ -1,131 +0,0 @@
-// assets/js/app.js
-
-import "phoenix_html";
-import { Socket } from "phoenix";
-import { LiveSocket } from "phoenix_live_view";
-import topbar from "../vendor/topbar";
-
-let csrfToken = document
- .querySelector("meta[name='csrf-token']")
- .getAttribute("content");
-
-let togglePlayLocked = false;
-
-let Hooks = {
- PlingButton: {
- mounted() {
- this.el.addEventListener("pointerdown", (e) => {
- const button = e.currentTarget.querySelector("button");
- if (!button.disabled) {
- this.handlePointerDown();
- }
- });
- },
-
- handlePointerDown() {
- console.log("click");
- setTimeout(() => {
- if (togglePlayLocked) {
- this.pushEvent("toggle_play");
- window.EmbedController?.togglePlay();
- const wrapper = document.querySelector(".embed-wrapper");
- if (wrapper) {
- // wrapper.classList.toggle("hidden");
- }
- } else {
- this.pushEvent("toggle_play");
- window.EmbedController?.togglePlay();
- const wrapper = document.querySelector(".embed-wrapper");
- if (wrapper) {
- // wrapper.classList.toggle("hidden");
- }
- }
- }, 300);
- },
- },
-};
-
-let liveSocket = new LiveSocket("/live", Socket, {
- longPollFallbackMs: 2500,
- params: { _csrf_token: csrfToken },
- hooks: Hooks,
-});
-
-// Show progress bar on live navigation and form submits
-topbar.config({ barColors: { 0: "#29d" }, shadowColor: "rgba(0,0,0,.3)" });
-window.addEventListener("phx:page-loading-start", (_info) => topbar.show(300));
-window.addEventListener("phx:page-loading-stop", (_info) => topbar.hide());
-
-window.onSpotifyIframeApiReady = (IFrameAPI) => {
- console.log("Spotify IFrame API ready");
- const element = document.getElementById("embed-iframe");
- if (!element) {
- console.warn("Spotify embed iframe not found");
- return;
- }
-
- const initialTrack = element.getAttribute("data-initial-track");
- const callback = (EmbedController) => {
- console.log("Spotify Embed Controller initialized");
- window.EmbedController = EmbedController;
- };
-
- let options = {
- uri: initialTrack || "spotify:track:3SFXsFpeGmBTtQvKiwYMDA",
- theme: "dark",
- };
-
- setTimeout(() => {
- console.log("Creating Spotify controller with options:", options);
- IFrameAPI.createController(element, options, callback);
- }, 0);
-};
-
-window.addEventListener("phx:spotify:load_track", (event) => {
- const track = event.detail.track;
- console.log("Loading track:", track.uri);
- window.EmbedController?.loadUri(track.uri);
-
- togglePlayLocked = true;
- setTimeout(() => {
- togglePlayLocked = false;
- }, 200);
-});
-
-window.addEventListener("phx:ring_bell", (event) => {
- console.log("Playing bell sound");
- const startTime = event.detail.start_time;
- const now = Date.now();
-
- const bell = document.getElementById("bell");
- bell?.play();
-});
-
-window.addEventListener("popstate", (_event) => {
- console.log("Browser back detected - pausing player");
- window.EmbedController?.pause();
-});
-
-window.addEventListener("phx:spotify:play", (_event) => {
- window.EmbedController?.play();
- const wrapper = document.querySelector(".embed-wrapper");
- // if (wrapper) wrapper.classList.remove("hidden");
-});
-
-window.addEventListener("phx:spotify:pause", (_event) => {
- window.EmbedController?.pause();
- const wrapper = document.querySelector(".embed-wrapper");
- // if (wrapper) wrapper.classList.add("hidden");
-});
-
-// connect if there are any LiveViews on the page
-liveSocket.connect();
-
-window.liveSocket = liveSocket;
-
-// Allows to execute JS commands from the server
-window.addEventListener("phx:js-exec", ({detail}) => {
- document.querySelectorAll(detail.to).forEach(el => {
- liveSocket.execJS(el, el.getAttribute(detail.attr))
- })
-})
diff --git a/assets/static/bell.mp3 b/assets/static/bell.mp3
deleted file mode 100644
index 36d6ba8..0000000
Binary files a/assets/static/bell.mp3 and /dev/null differ
diff --git a/assets/tailwind.colors.json b/assets/tailwind.colors.json
deleted file mode 100644
index bb1841b..0000000
--- a/assets/tailwind.colors.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "accent": {
- "DEFAULT": "hsl(var(--accent))",
- "foreground": "hsl(var(--accent-foreground))"
- },
- "background": "hsl(var(--background))",
- "border": "hsl(var(--border))",
- "card": {
- "DEFAULT": "hsl(var(--card))",
- "foreground": "hsl(var(--card-foreground))"
- },
- "destructive": {
- "DEFAULT": "hsl(var(--destructive))",
- "foreground": "hsl(var(--destructive-foreground))"
- },
- "foreground": "hsl(var(--foreground))",
- "input": "hsl(var(--input))",
- "muted": {
- "DEFAULT": "hsl(var(--muted))",
- "foreground": "hsl(var(--muted-foreground))"
- },
- "popover": {
- "DEFAULT": "hsl(var(--popover))",
- "foreground": "hsl(var(--popover-foreground))"
- },
- "primary": {
- "DEFAULT": "hsl(var(--primary))",
- "foreground": "hsl(var(--primary-foreground))"
- },
- "ring": "hsl(var(--ring))",
- "secondary": {
- "DEFAULT": "hsl(var(--secondary))",
- "foreground": "hsl(var(--secondary-foreground))"
- }
-}
diff --git a/assets/tailwind.config.js b/assets/tailwind.config.js
deleted file mode 100644
index 82e04ba..0000000
--- a/assets/tailwind.config.js
+++ /dev/null
@@ -1,75 +0,0 @@
-// See the Tailwind configuration guide for advanced usage
-// https://tailwindcss.com/docs/configuration
-
-const plugin = require("tailwindcss/plugin")
-const fs = require("fs")
-const path = require("path")
-
-module.exports = {
- content: [
- "./js/**/*.js",
- "../lib/pling_web.ex",
- "../lib/pling_web/**/*.*ex"
- ],
- theme: {
- extend: {
- colors: require("./tailwind.colors.json")
- },
- },
- plugins: [
- require("@tailwindcss/typography"),
- require("./vendor/tailwindcss-animate"),
- require("@tailwindcss/forms"),
- // Allows prefixing tailwind classes with LiveView classes to add rules
- // only when LiveView classes are applied, for example:
- //
- //
- //
- plugin(({addVariant}) => addVariant("phx-no-feedback", [".phx-no-feedback&", ".phx-no-feedback &"])),
- plugin(({addVariant}) => addVariant("phx-click-loading", [".phx-click-loading&", ".phx-click-loading &"])),
- plugin(({addVariant}) => addVariant("phx-submit-loading", [".phx-submit-loading&", ".phx-submit-loading &"])),
- plugin(({addVariant}) => addVariant("phx-change-loading", [".phx-change-loading&", ".phx-change-loading &"])),
-
- // Embeds Heroicons (https://heroicons.com) into your app.css bundle
- // See your `CoreComponents.icon/1` for more information.
- //
- plugin(function({matchComponents, theme}) {
- let iconsDir = path.join(__dirname, "../deps/heroicons/optimized")
- let values = {}
- let icons = [
- ["", "/24/outline"],
- ["-solid", "/24/solid"],
- ["-mini", "/20/solid"],
- ["-micro", "/16/solid"]
- ]
- icons.forEach(([suffix, dir]) => {
- fs.readdirSync(path.join(iconsDir, dir)).forEach(file => {
- let name = path.basename(file, ".svg") + suffix
- values[name] = {name, fullPath: path.join(iconsDir, dir, file)}
- })
- })
- matchComponents({
- "hero": ({name, fullPath}) => {
- let content = fs.readFileSync(fullPath).toString().replace(/\r?\n|\r/g, "")
- let size = theme("spacing.6")
- if (name.endsWith("-mini")) {
- size = theme("spacing.5")
- } else if (name.endsWith("-micro")) {
- size = theme("spacing.4")
- }
- return {
- [`--hero-${name}`]: `url('data:image/svg+xml;utf8,${content}')`,
- "-webkit-mask": `var(--hero-${name})`,
- "mask": `var(--hero-${name})`,
- "mask-repeat": "no-repeat",
- "background-color": "currentColor",
- "vertical-align": "middle",
- "display": "inline-block",
- "width": size,
- "height": size
- }
- }
- }, {values})
- })
- ]
-}
diff --git a/assets/vendor/tailwindcss-animate.js b/assets/vendor/tailwindcss-animate.js
deleted file mode 100644
index 1021698..0000000
--- a/assets/vendor/tailwindcss-animate.js
+++ /dev/null
@@ -1,188 +0,0 @@
-const plugin = require("tailwindcss/plugin")
-
-function filterDefault(values) {
- return Object.fromEntries(
- Object.entries(values).filter(([key]) => key !== "DEFAULT"),
- )
-}
-
-module.exports = plugin(
- ({ addUtilities, matchUtilities, theme }) => {
- addUtilities({
- "@keyframes enter": theme("keyframes.enter"),
- "@keyframes exit": theme("keyframes.exit"),
- ".animate-in": {
- animationName: "enter",
- animationDuration: theme("animationDuration.DEFAULT"),
- "--tw-enter-opacity": "initial",
- "--tw-enter-scale": "initial",
- "--tw-enter-rotate": "initial",
- "--tw-enter-translate-x": "initial",
- "--tw-enter-translate-y": "initial",
- },
- ".animate-out": {
- animationName: "exit",
- animationDuration: theme("animationDuration.DEFAULT"),
- "--tw-exit-opacity": "initial",
- "--tw-exit-scale": "initial",
- "--tw-exit-rotate": "initial",
- "--tw-exit-translate-x": "initial",
- "--tw-exit-translate-y": "initial",
- },
- })
-
- matchUtilities(
- {
- "fade-in": (value) => ({ "--tw-enter-opacity": value }),
- "fade-out": (value) => ({ "--tw-exit-opacity": value }),
- },
- { values: theme("animationOpacity") },
- )
-
- matchUtilities(
- {
- "zoom-in": (value) => ({ "--tw-enter-scale": value }),
- "zoom-out": (value) => ({ "--tw-exit-scale": value }),
- },
- { values: theme("animationScale") },
- )
-
- matchUtilities(
- {
- "spin-in": (value) => ({ "--tw-enter-rotate": value }),
- "spin-out": (value) => ({ "--tw-exit-rotate": value }),
- },
- { values: theme("animationRotate") },
- )
-
- matchUtilities(
- {
- "slide-in-from-top": (value) => ({
- "--tw-enter-translate-y": `-${value}`,
- }),
- "slide-in-from-bottom": (value) => ({
- "--tw-enter-translate-y": value,
- }),
- "slide-in-from-left": (value) => ({
- "--tw-enter-translate-x": `-${value}`,
- }),
- "slide-in-from-right": (value) => ({
- "--tw-enter-translate-x": value,
- }),
- "slide-out-to-top": (value) => ({
- "--tw-exit-translate-y": `-${value}`,
- }),
- "slide-out-to-bottom": (value) => ({
- "--tw-exit-translate-y": value,
- }),
- "slide-out-to-left": (value) => ({
- "--tw-exit-translate-x": `-${value}`,
- }),
- "slide-out-to-right": (value) => ({
- "--tw-exit-translate-x": value,
- }),
- },
- { values: theme("animationTranslate") },
- )
-
- matchUtilities(
- { duration: (value) => ({ animationDuration: value }) },
- { values: filterDefault(theme("animationDuration")) },
- )
-
- matchUtilities(
- { delay: (value) => ({ animationDelay: value }) },
- { values: theme("animationDelay") },
- )
-
- matchUtilities(
- { ease: (value) => ({ animationTimingFunction: value }) },
- { values: filterDefault(theme("animationTimingFunction")) },
- )
-
- addUtilities({
- ".running": { animationPlayState: "running" },
- ".paused": { animationPlayState: "paused" },
- })
-
- matchUtilities(
- { "fill-mode": (value) => ({ animationFillMode: value }) },
- { values: theme("animationFillMode") },
- )
-
- matchUtilities(
- { direction: (value) => ({ animationDirection: value }) },
- { values: theme("animationDirection") },
- )
-
- matchUtilities(
- { repeat: (value) => ({ animationIterationCount: value }) },
- { values: theme("animationRepeat") },
- )
- },
- {
- theme: {
- extend: {
- animationDelay: ({ theme }) => ({
- ...theme("transitionDelay"),
- }),
- animationDuration: ({ theme }) => ({
- 0: "0ms",
- ...theme("transitionDuration"),
- }),
- animationTimingFunction: ({ theme }) => ({
- ...theme("transitionTimingFunction"),
- }),
- animationFillMode: {
- none: "none",
- forwards: "forwards",
- backwards: "backwards",
- both: "both",
- },
- animationDirection: {
- normal: "normal",
- reverse: "reverse",
- alternate: "alternate",
- "alternate-reverse": "alternate-reverse",
- },
- animationOpacity: ({ theme }) => ({
- DEFAULT: 0,
- ...theme("opacity"),
- }),
- animationTranslate: ({ theme }) => ({
- DEFAULT: "100%",
- ...theme("translate"),
- }),
- animationScale: ({ theme }) => ({
- DEFAULT: 0,
- ...theme("scale"),
- }),
- animationRotate: ({ theme }) => ({
- DEFAULT: "30deg",
- ...theme("rotate"),
- }),
- animationRepeat: {
- 0: "0",
- 1: "1",
- infinite: "infinite",
- },
- keyframes: {
- enter: {
- from: {
- opacity: "var(--tw-enter-opacity, 1)",
- transform:
- "translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))",
- },
- },
- exit: {
- to: {
- opacity: "var(--tw-exit-opacity, 1)",
- transform:
- "translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))",
- },
- },
- },
- },
- },
- },
-)
diff --git a/assets/vendor/topbar.js b/assets/vendor/topbar.js
deleted file mode 100644
index 4195727..0000000
--- a/assets/vendor/topbar.js
+++ /dev/null
@@ -1,165 +0,0 @@
-/**
- * @license MIT
- * topbar 2.0.0, 2023-02-04
- * https://buunguyen.github.io/topbar
- * Copyright (c) 2021 Buu Nguyen
- */
-(function (window, document) {
- "use strict";
-
- // https://gist.github.com/paulirish/1579671
- (function () {
- var lastTime = 0;
- var vendors = ["ms", "moz", "webkit", "o"];
- for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
- window.requestAnimationFrame =
- window[vendors[x] + "RequestAnimationFrame"];
- window.cancelAnimationFrame =
- window[vendors[x] + "CancelAnimationFrame"] ||
- window[vendors[x] + "CancelRequestAnimationFrame"];
- }
- if (!window.requestAnimationFrame)
- window.requestAnimationFrame = function (callback, element) {
- var currTime = new Date().getTime();
- var timeToCall = Math.max(0, 16 - (currTime - lastTime));
- var id = window.setTimeout(function () {
- callback(currTime + timeToCall);
- }, timeToCall);
- lastTime = currTime + timeToCall;
- return id;
- };
- if (!window.cancelAnimationFrame)
- window.cancelAnimationFrame = function (id) {
- clearTimeout(id);
- };
- })();
-
- var canvas,
- currentProgress,
- showing,
- progressTimerId = null,
- fadeTimerId = null,
- delayTimerId = null,
- addEvent = function (elem, type, handler) {
- if (elem.addEventListener) elem.addEventListener(type, handler, false);
- else if (elem.attachEvent) elem.attachEvent("on" + type, handler);
- else elem["on" + type] = handler;
- },
- options = {
- autoRun: true,
- barThickness: 3,
- barColors: {
- 0: "rgba(26, 188, 156, .9)",
- ".25": "rgba(52, 152, 219, .9)",
- ".50": "rgba(241, 196, 15, .9)",
- ".75": "rgba(230, 126, 34, .9)",
- "1.0": "rgba(211, 84, 0, .9)",
- },
- shadowBlur: 10,
- shadowColor: "rgba(0, 0, 0, .6)",
- className: null,
- },
- repaint = function () {
- canvas.width = window.innerWidth;
- canvas.height = options.barThickness * 5; // need space for shadow
-
- var ctx = canvas.getContext("2d");
- ctx.shadowBlur = options.shadowBlur;
- ctx.shadowColor = options.shadowColor;
-
- var lineGradient = ctx.createLinearGradient(0, 0, canvas.width, 0);
- for (var stop in options.barColors)
- lineGradient.addColorStop(stop, options.barColors[stop]);
- ctx.lineWidth = options.barThickness;
- ctx.beginPath();
- ctx.moveTo(0, options.barThickness / 2);
- ctx.lineTo(
- Math.ceil(currentProgress * canvas.width),
- options.barThickness / 2
- );
- ctx.strokeStyle = lineGradient;
- ctx.stroke();
- },
- createCanvas = function () {
- canvas = document.createElement("canvas");
- var style = canvas.style;
- style.position = "fixed";
- style.top = style.left = style.right = style.margin = style.padding = 0;
- style.zIndex = 100001;
- style.display = "none";
- if (options.className) canvas.classList.add(options.className);
- document.body.appendChild(canvas);
- addEvent(window, "resize", repaint);
- },
- topbar = {
- config: function (opts) {
- for (var key in opts)
- if (options.hasOwnProperty(key)) options[key] = opts[key];
- },
- show: function (delay) {
- if (showing) return;
- if (delay) {
- if (delayTimerId) return;
- delayTimerId = setTimeout(() => topbar.show(), delay);
- } else {
- showing = true;
- if (fadeTimerId !== null) window.cancelAnimationFrame(fadeTimerId);
- if (!canvas) createCanvas();
- canvas.style.opacity = 1;
- canvas.style.display = "block";
- topbar.progress(0);
- if (options.autoRun) {
- (function loop() {
- progressTimerId = window.requestAnimationFrame(loop);
- topbar.progress(
- "+" + 0.05 * Math.pow(1 - Math.sqrt(currentProgress), 2)
- );
- })();
- }
- }
- },
- progress: function (to) {
- if (typeof to === "undefined") return currentProgress;
- if (typeof to === "string") {
- to =
- (to.indexOf("+") >= 0 || to.indexOf("-") >= 0
- ? currentProgress
- : 0) + parseFloat(to);
- }
- currentProgress = to > 1 ? 1 : to;
- repaint();
- return currentProgress;
- },
- hide: function () {
- clearTimeout(delayTimerId);
- delayTimerId = null;
- if (!showing) return;
- showing = false;
- if (progressTimerId != null) {
- window.cancelAnimationFrame(progressTimerId);
- progressTimerId = null;
- }
- (function loop() {
- if (topbar.progress("+.1") >= 1) {
- canvas.style.opacity -= 0.05;
- if (canvas.style.opacity <= 0.05) {
- canvas.style.display = "none";
- fadeTimerId = null;
- return;
- }
- }
- fadeTimerId = window.requestAnimationFrame(loop);
- })();
- },
- };
-
- if (typeof module === "object" && typeof module.exports === "object") {
- module.exports = topbar;
- } else if (typeof define === "function" && define.amd) {
- define(function () {
- return topbar;
- });
- } else {
- this.topbar = topbar;
- }
-}.call(this, window, document));
diff --git a/cloudflare.config.ts b/cloudflare.config.ts
new file mode 100644
index 0000000..7a304e9
--- /dev/null
+++ b/cloudflare.config.ts
@@ -0,0 +1,27 @@
+import { bindings, defineConfig, exports } from "cf/config";
+
+export default defineConfig({
+ worker: {
+ name: "pling",
+ compatibilityDate: "2026-10-01",
+ entrypoint: "src/server/index.ts",
+ observability: {
+ enabled: true,
+ },
+ assets: {
+ notFoundHandling: "single-page-application",
+ runWorkerFirst: ["/parties/*"],
+ },
+ env: {
+ Room: bindings.durableObject({
+ worker: "pling",
+ exportName: "Room",
+ }),
+ },
+ exports: {
+ Room: exports.durableObject({
+ storage: "sqlite",
+ }),
+ },
+ },
+});
diff --git a/config/config.exs b/config/config.exs
deleted file mode 100644
index 91b4eda..0000000
--- a/config/config.exs
+++ /dev/null
@@ -1,75 +0,0 @@
-# This file is responsible for configuring your application
-# and its dependencies with the aid of the Config module.
-#
-# This configuration file is loaded before any dependency and
-# is restricted to this project.
-
-# General application configuration
-import Config
-
-config :pling,
- ecto_repos: [Pling.Repo],
- generators: [timestamp_type: :utc_datetime]
-
-# Configure Gettext
-config :pling, PlingWeb.Gettext,
- default_locale: "nb",
- locales: ~w(en nb)
-
-# Configures the endpoint
-config :pling, PlingWeb.Endpoint,
- url: [host: "localhost"],
- adapter: Bandit.PhoenixAdapter,
- server: true,
- render_errors: [
- formats: [html: PlingWeb.ErrorHTML, json: PlingWeb.ErrorJSON],
- layout: false
- ],
- pubsub_server: Pling.PubSub,
- live_view: [signing_salt: "Kv4Mctnk"]
-
-# Configures the mailer
-#
-# By default it uses the "Local" adapter which stores the emails
-# locally. You can see the emails in your browser, at "/dev/mailbox".
-#
-# For production it's recommended to configure a different adapter
-# at the `config/runtime.exs`.
-config :pling, Pling.Mailer, adapter: Swoosh.Adapters.Local
-
-# Configure esbuild (the version is required)
-config :esbuild,
- version: "0.17.11",
- pling: [
- args:
- ~w(js/app.js --bundle --target=es2017 --outdir=../priv/static/assets --external:/fonts/* --external:/images/*),
- cd: Path.expand("../assets", __DIR__),
- env: %{"NODE_PATH" => Path.expand("../deps", __DIR__)}
- ]
-
-# Configure tailwind (the version is required)
-config :tailwind,
- version: "4.0.0",
- pling: [
- args: ~w(
- --input=assets/css/app.css
- --output=./priv/static/assets/app.css
- ),
- cd: Path.expand("../", __DIR__)
- ]
-
-# Configures Elixir's Logger
-config :logger, :console,
- format: "$time $metadata[$level] $message\n",
- metadata: [:request_id]
-
-# config :phoenix_analytics,
-# duckdb_path: System.get_env("DUCKDB_PATH"),
-# app_domain: System.get_env("PHX_HOST") || "https://pling.fly.dev"
-
-# Use Jason for JSON parsing in Phoenix
-config :phoenix, :json_library, Jason
-
-# Import environment specific config. This must remain at the bottom
-# of this file so it overrides the configuration defined above.
-import_config "#{config_env()}.exs"
diff --git a/config/dev.exs b/config/dev.exs
deleted file mode 100644
index 8b74e6b..0000000
--- a/config/dev.exs
+++ /dev/null
@@ -1,88 +0,0 @@
-import Config
-
-# Configure your database
-config :pling, Pling.Repo,
- database: Path.expand("../pling_dev.db", Path.dirname(__ENV__.file)),
- pool_size: 5,
- stacktrace: true,
- show_sensitive_data_on_connection_error: true
-
-# For development, we disable any cache and enable
-# debugging and code reloading.
-#
-# The watchers configuration can be used to run external
-# watchers to your application. For example, we can use it
-# to bundle .js and .css sources.
-config :pling, PlingWeb.Endpoint,
- # Binding to loopback ipv4 address prevents access from other machines.
- # Change to `ip: {0, 0, 0, 0}` to allow access from other machines.
- http: [ip: {0, 0, 0, 0}, port: 4000],
- check_origin: false,
- code_reloader: true,
- debug_errors: true,
- secret_key_base: "D/3UmqgHABbjyOJ6+5yUa53mKPyYqVzbznL7FvrbRNOkHzU1xQN5cNgKJflJFB3g",
- watchers: [
- esbuild: {Esbuild, :install_and_run, [:pling, ~w(--sourcemap=inline --watch)]},
- tailwind: {Tailwind, :install_and_run, [:pling, ~w(--watch)]}
- ]
-
-# ## SSL Support
-#
-# In order to use HTTPS in development, a self-signed
-# certificate can be generated by running the following
-# Mix task:
-#
-# mix phx.gen.cert
-#
-# Run `mix help phx.gen.cert` for more information.
-#
-# The `http:` config above can be replaced with:
-#
-# https: [
-# port: 4001,
-# cipher_suite: :strong,
-# keyfile: "priv/cert/selfsigned_key.pem",
-# certfile: "priv/cert/selfsigned.pem"
-# ],
-#
-# If desired, both `http:` and `https:` keys can be
-# configured to run both http and https servers on
-# different ports.
-
-# Watch static and templates for browser reloading.
-config :pling, PlingWeb.Endpoint,
- live_reload: [
- patterns: [
- ~r"priv/static/(?!uploads/).*(js|css|png|jpeg|jpg|gif|svg)$",
- ~r"priv/gettext/.*(po)$",
- ~r"lib/pling_web/(controllers|live|components)/.*(ex|heex)$"
- ]
- ]
-
-# Enable dev routes for dashboard and mailbox
-config :pling, dev_routes: true
-
-config :logger, :console,
- format: "[$level] $message $metadata\n",
- metadata: [:playlist_id, :error, :chunk, :track_id],
- level: :debug
-
-# Set a higher stacktrace during development. Avoid configuring such
-# in production as building large stacktraces may be expensive.
-config :phoenix, :stacktrace_depth, 20
-
-# Initialize plugs at runtime for faster development compilation
-config :phoenix, :plug_init_mode, :runtime
-
-# Include HEEx debug annotations as HTML comments in rendered markup
-config :phoenix_live_view, :debug_heex_annotations, true
-
-# Disable swoosh api client as it is only required for production adapters.
-config :swoosh, :api_client, false
-
-# # Set DuckDB path for development
-# config :phoenix_analytics,
-# duckdb_path: "analytics.db"
-
-# Path to install SaladUI components
-config :salad_ui, components_path: Path.join(File.cwd!(), "lib/pling_web/components")
diff --git a/config/prod.exs b/config/prod.exs
deleted file mode 100644
index d027c22..0000000
--- a/config/prod.exs
+++ /dev/null
@@ -1,20 +0,0 @@
-import Config
-
-# Note we also include the path to a cache manifest
-# containing the digested version of static files. This
-# manifest is generated by the `mix assets.deploy` task,
-# which you should run after static files are built and
-# before starting your production server.
-config :pling, PlingWeb.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json"
-
-# Configures Swoosh API Client
-config :swoosh, api_client: Swoosh.ApiClient.Finch, finch_name: Pling.Finch
-
-# Disable Swoosh Local Memory Storage
-config :swoosh, local: false
-
-# Do not print debug messages in production
-config :logger, level: :info
-
-# Runtime production configuration, including reading
-# of environment variables, is done on config/runtime.exs.
diff --git a/config/runtime.exs b/config/runtime.exs
deleted file mode 100644
index 7c8fbaf..0000000
--- a/config/runtime.exs
+++ /dev/null
@@ -1,114 +0,0 @@
-import Config
-
-# config/runtime.exs is executed for all environments, including
-# during releases. It is executed after compilation and before the
-# system starts, so it is typically used to load production configuration
-# and secrets from environment variables or elsewhere. Do not define
-# any compile-time configuration in here, as it won't be applied.
-# The block below contains prod specific runtime configuration.
-
-# ## Using releases
-#
-# If you use `mix release`, you need to explicitly enable the server
-# by passing the PHX_SERVER=true when you start it:
-#
-# PHX_SERVER=true bin/pling start
-#
-# Alternatively, you can use `mix phx.gen.release` to generate a `bin/server`
-# script that automatically sets the env var above.
-if System.get_env("PHX_SERVER") do
- config :pling, PlingWeb.Endpoint, server: true
-end
-
-if config_env() == :prod do
- database_path =
- System.get_env("DATABASE_PATH") ||
- raise """
- environment variable DATABASE_PATH is missing.
- For example: /etc/pling/pling.db
- """
-
- config :pling, Pling.Repo,
- database: database_path,
- pool_size: String.to_integer(System.get_env("POOL_SIZE") || "5")
-
- # The secret key base is used to sign/encrypt cookies and other secrets.
- # A default value is used in config/dev.exs and config/test.exs but you
- # want to use a different value for prod and you most likely don't want
- # to check this value into version control, so we use an environment
- # variable instead.
- secret_key_base =
- System.get_env("SECRET_KEY_BASE") ||
- raise """
- environment variable SECRET_KEY_BASE is missing.
- You can generate one by calling: mix phx.gen.secret
- """
-
- host = System.get_env("PHX_HOST") || "example.com"
- port = String.to_integer(System.get_env("PORT") || "4000")
-
- config :pling, :dns_cluster_query, System.get_env("DNS_CLUSTER_QUERY")
-
- config :pling, PlingWeb.Endpoint,
- url: [host: host, port: 443, scheme: "https"],
- http: [
- # Enable IPv6 and bind on all interfaces.
- # Set it to {0, 0, 0, 0, 0, 0, 0, 1} for local network only access.
- # See the documentation on https://hexdocs.pm/bandit/Bandit.html#t:options/0
- # for details about using IPv6 vs IPv4 and loopback vs public addresses.
- ip: {0, 0, 0, 0, 0, 0, 0, 0},
- port: port
- ],
- secret_key_base: secret_key_base,
- check_origin: ["https://pling.fly.dev"]
-
- # ## SSL Support
- #
- # To get SSL working, you will need to add the `https` key
- # to your endpoint configuration:
- #
- # config :pling, PlingWeb.Endpoint,
- # https: [
- # ...,
- # port: 443,
- # cipher_suite: :strong,
- # keyfile: System.get_env("SOME_APP_SSL_KEY_PATH"),
- # certfile: System.get_env("SOME_APP_SSL_CERT_PATH")
- # ]
- #
- # The `cipher_suite` is set to `:strong` to support only the
- # latest and more secure SSL ciphers. This means old browsers
- # and clients may not be supported. You can set it to
- # `:compatible` for wider support.
- #
- # `:keyfile` and `:certfile` expect an absolute path to the key
- # and cert in disk or a relative path inside priv, for example
- # "priv/ssl/server.key". For all supported SSL configuration
- # options, see https://hexdocs.pm/plug/Plug.SSL.html#configure/1
- #
- # We also recommend setting `force_ssl` in your config/prod.exs,
- # ensuring no data is ever sent via http, always redirecting to https:
- #
- # config :pling, PlingWeb.Endpoint,
- # force_ssl: [hsts: true]
- #
- # Check `Plug.SSL` for all available options in `force_ssl`.
-
- # ## Configuring the mailer
- #
- # In production you need to configure the mailer to use a different adapter.
- # Also, you may need to configure the Swoosh API client of your choice if you
- # are not using SMTP. Here is an example of the configuration:
- #
- # config :pling, Pling.Mailer,
- # adapter: Swoosh.Adapters.Mailgun,
- # api_key: System.get_env("MAILGUN_API_KEY"),
- # domain: System.get_env("MAILGUN_DOMAIN")
- #
- # For this example you need include a HTTP client required by Swoosh API client.
- # Swoosh supports Hackney and Finch out of the box:
- #
- # config :swoosh, :api_client, Swoosh.ApiClient.Hackney
- #
- # See https://hexdocs.pm/swoosh/Swoosh.html#module-installation for details.
-end
diff --git a/config/test.exs b/config/test.exs
deleted file mode 100644
index ee873af..0000000
--- a/config/test.exs
+++ /dev/null
@@ -1,30 +0,0 @@
-import Config
-
-# Configure your database
-#
-# The MIX_TEST_PARTITION environment variable can be used
-# to provide built-in test partitioning in CI environment.
-# Run `mix help test` for more information.
-config :pling, Pling.Repo,
- database: Path.expand("../pling_test.db", Path.dirname(__ENV__.file)),
- pool_size: 5,
- pool: Ecto.Adapters.SQL.Sandbox
-
-# We don't run a server during test. If one is required,
-# you can enable the server option below.
-config :pling, PlingWeb.Endpoint,
- http: [ip: {127, 0, 0, 1}, port: 4002],
- secret_key_base: "V3QJbf22IRUp1Qn37DbRpVTomFcKl1kC7kttGdCU7LLHh58OPhZdg36mHZDDSyoH",
- server: false
-
-# In test we don't send emails.
-config :pling, Pling.Mailer, adapter: Swoosh.Adapters.Test
-
-# Disable swoosh api client as it is only required for production adapters.
-config :swoosh, :api_client, false
-
-# Print only warnings and errors during test
-config :logger, level: :warning
-
-# Initialize plugs at runtime for faster test compilation
-config :phoenix, :plug_init_mode, :runtime
diff --git a/fly.toml b/fly.toml
deleted file mode 100644
index 1049c48..0000000
--- a/fly.toml
+++ /dev/null
@@ -1,38 +0,0 @@
-# fly.toml app configuration file generated for pling on 2024-12-22T00:36:17+01:00
-#
-# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
-#
-
-app = 'pling'
-primary_region = 'arn'
-kill_signal = 'SIGTERM'
-
-[build]
-
-[env]
- DUCKDB_PATH = "/data/duck.db"
- DATABASE_PATH = "/data/db.db"
- PHX_HOST = "https://pling.fly.dev"
- PORT = '8080'
-
-[mounts]
- source = "data"
- destination = "/data"
-
-[http_service]
- internal_port = 8080
- force_https = true
- auto_stop_machines = 'stop'
- auto_start_machines = true
- min_machines_running = 0
- processes = ['app']
-
- [http_service.concurrency]
- type = 'connections'
- hard_limit = 1000
- soft_limit = 1000
-
-[[vm]]
- memory = '1gb'
- cpu_kind = 'shared'
- cpus = 1
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..f3e851d
--- /dev/null
+++ b/index.html
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Pling
+
+
+
+
+
+
+
diff --git a/lib/pling.ex b/lib/pling.ex
deleted file mode 100644
index d45f41e..0000000
--- a/lib/pling.ex
+++ /dev/null
@@ -1,9 +0,0 @@
-defmodule Pling do
- @moduledoc """
- Pling keeps the contexts that define your domain
- and business logic.
-
- Contexts are also responsible for managing your data, regardless
- if it comes from the database, an external API or others.
- """
-end
diff --git a/lib/pling/application.ex b/lib/pling/application.ex
deleted file mode 100644
index 5cd6f06..0000000
--- a/lib/pling/application.ex
+++ /dev/null
@@ -1,48 +0,0 @@
-defmodule Pling.Application do
- # See https://hexdocs.pm/elixir/Application.html
- # for more information on OTP Applications
- @moduledoc false
-
- use Application
-
- @impl true
- def start(_type, _args) do
- children = [
- PlingWeb.Telemetry,
- Pling.Repo,
- {Ecto.Migrator,
- repos: Application.fetch_env!(:pling, :ecto_repos), skip: skip_migrations?()},
- {DNSCluster, query: Application.get_env(:pling, :dns_cluster_query) || :ignore},
- {Phoenix.PubSub, name: Pling.PubSub},
- # Start the Finch HTTP client for sending emails
- {Finch, name: Pling.Finch},
- # Start a worker by calling: Pling.Worker.start_link(arg)
- # {Pling.Worker, arg},
- # Start to serve requests, typically the last entry
- Pling.Presence,
- TwMerge.Cache,
- PlingWeb.Endpoint,
- {Registry, keys: :unique, name: Pling.Rooms.ServerRegistry},
- {Registry, keys: :duplicate, name: Pling.Rooms.ClientRegistry},
- {DynamicSupervisor, strategy: :one_for_one, name: Pling.Rooms.RoomSupervisor}
- ]
-
- # See https://hexdocs.pm/elixir/Supervisor.html
- # for other strategies and supported options
- opts = [strategy: :one_for_one, name: Pling.Supervisor]
- Supervisor.start_link(children, opts)
- end
-
- # Tell Phoenix to update the endpoint configuration
- # whenever the application is updated.
- @impl true
- def config_change(changed, _new, removed) do
- PlingWeb.Endpoint.config_change(changed, removed)
- :ok
- end
-
- defp skip_migrations?() do
- # By default, sqlite migrations are run when using a release
- System.get_env("RELEASE_NAME") != nil
- end
-end
diff --git a/lib/pling/mailer.ex b/lib/pling/mailer.ex
deleted file mode 100644
index 05a6442..0000000
--- a/lib/pling/mailer.ex
+++ /dev/null
@@ -1,3 +0,0 @@
-defmodule Pling.Mailer do
- use Swoosh.Mailer, otp_app: :pling
-end
diff --git a/lib/pling/playlists.ex b/lib/pling/playlists.ex
deleted file mode 100644
index e81ae87..0000000
--- a/lib/pling/playlists.ex
+++ /dev/null
@@ -1,187 +0,0 @@
-defmodule Pling.Playlists do
- @moduledoc """
- The Playlists context.
- Handles CRUD operations for playlists and tracks.
- """
-
- alias Pling.Repo
- alias Pling.Playlists.{Playlist, Track}
-
- # Playlist Operations
-
- @doc """
- Returns the list of playlists.
- """
- def list_playlists do
- Repo.all(Playlist)
- end
-
- @doc """
- Gets a single playlist by spotify_id.
- Returns nil if the Playlist does not exist.
- """
- def get_playlist(spotify_id) when is_binary(spotify_id) do
- Repo.get(Playlist, spotify_id)
- end
-
- @doc """
- Gets a single playlist by spotify_id with preloaded tracks.
- Returns nil if the Playlist does not exist.
- """
- def get_playlist_with_tracks(spotify_id) when is_binary(spotify_id) do
- Playlist
- |> Repo.get(spotify_id)
- |> Repo.preload(:tracks)
- end
-
- @doc """
- Creates a playlist.
- """
- def create_playlist(attrs \\ %{}) do
- %Playlist{}
- |> Playlist.changeset(attrs)
- |> Repo.insert()
- end
-
- @doc """
- Updates a playlist.
- """
- def update_playlist(%Playlist{} = playlist, attrs) do
- playlist
- |> Playlist.changeset(attrs)
- |> Repo.update()
- end
-
- @doc """
- Deletes a playlist and its associations.
- Returns {:ok, struct} if successful, {:error, reason} otherwise.
- """
- def delete_playlist(%Playlist{} = playlist) do
- Repo.transaction(fn ->
- case Repo.delete(playlist) do
- {:ok, playlist} -> playlist
- {:error, reason} -> Repo.rollback(reason)
- end
- end)
- end
-
- @doc """
- Returns an `%Ecto.Changeset{}` for tracking playlist changes.
- """
- def change_playlist(%Playlist{} = playlist, attrs \\ %{}) do
- Playlist.changeset(playlist, attrs)
- end
-
- @playlist_id_length 22
-
- @doc """
- Extracts and validates a Spotify playlist ID from either a full Spotify URL or a raw ID.
- Returns nil if the input is invalid.
- """
- def extract_playlist_id("https://open.spotify.com/playlist/" <> potential_id) do
- potential_id = String.slice(potential_id, 0, @playlist_id_length)
- validate_playlist_id(potential_id)
- end
-
- def extract_playlist_id(potential_id) when is_binary(potential_id) do
- validate_playlist_id(potential_id)
- end
-
- def extract_playlist_id(_), do: nil
-
- # IDs are 22 chars
- defp validate_playlist_id(id) do
- if byte_size(id) == @playlist_id_length and id =~ ~r/^[a-zA-Z0-9]{#{@playlist_id_length}}$/ do
- id
- else
- nil
- end
- end
-
- # Track Operations
-
- @doc """
- Returns the list of tracks.
- """
- def list_tracks do
- Repo.all(Track)
- end
-
- @doc """
- Gets a single track by spotify_id.
- Returns nil if the Track does not exist.
- """
- def get_track(spotify_id) when is_binary(spotify_id) do
- Repo.get(Track, spotify_id)
- end
-
- @doc """
- Gets a single track by spotify_id with preloaded playlists.
- Returns nil if the Track does not exist.
- """
- def get_track_with_playlists(spotify_id) when is_binary(spotify_id) do
- Track
- |> Repo.get(spotify_id)
- |> Repo.preload(:playlists)
- end
-
- @doc """
- Creates a track.
- """
- def create_track(attrs \\ %{}) do
- %Track{}
- |> Track.changeset(attrs)
- |> Repo.insert()
- end
-
- @doc """
- Updates a track.
- """
- def update_track(%Track{} = track, attrs) do
- track
- |> Track.changeset(attrs)
- |> Repo.update()
- end
-
- @doc """
- Deletes a track and its associations.
- Returns {:ok, struct} if successful, {:error, reason} otherwise.
- """
- def delete_track(%Track{} = track) do
- Repo.transaction(fn ->
- case Repo.delete(track) do
- {:ok, track} -> track
- {:error, reason} -> Repo.rollback(reason)
- end
- end)
- end
-
- @doc """
- Returns an `%Ecto.Changeset{}` for tracking track changes.
- """
- def change_track(%Track{} = track, attrs \\ %{}) do
- Track.changeset(track, attrs)
- end
-
- # Association Operations
-
- @doc """
- Adds a track to a playlist.
- """
- def add_track_to_playlist(%Playlist{} = playlist, %Track{} = track) do
- playlist = Repo.preload(playlist, :tracks)
- track = Repo.preload(track, :playlists)
-
- # Check if association already exists
- if Enum.any?(playlist.tracks, fn t -> t.spotify_id == track.spotify_id end) do
- {:error, :already_exists}
- else
- tracks = [track | playlist.tracks]
-
- playlist
- |> Ecto.Changeset.change()
- |> Ecto.Changeset.put_assoc(:tracks, tracks)
- |> Repo.update()
- end
- end
-end
diff --git a/lib/pling/playlists/music_library.ex b/lib/pling/playlists/music_library.ex
deleted file mode 100644
index 7437546..0000000
--- a/lib/pling/playlists/music_library.ex
+++ /dev/null
@@ -1,195 +0,0 @@
-defmodule Pling.Playlists.MusicLibrary do
- @moduledoc """
- Manages music playlists and track selection from the database.
- Playlists are organized by decades, with tracks associated to each playlist.
- """
- import Ecto.Query
- require Logger
- alias Pling.Repo
- alias Pling.Playlists.{Playlist, Track}
-
- @notification_key :first_track_notified
- @default_playlist_id "4DIYG1WrBI9jRJiul9vmxj"
-
- @doc """
- Loads all playlists from the database and returns them as a map with spotify_id keys.
- """
- def load_playlists do
- Playlist
- |> preload(:tracks)
- |> Repo.all()
- |> Enum.map(fn playlist -> {playlist.spotify_id, playlist} end)
- |> Enum.into(%{})
- end
-
- @doc """
- Gets all tracks from all playlists when playlist is "mix",
- otherwise gets tracks for the specified playlist.
- """
- def get_tracks(playlist_id, _playlists) when playlist_id == "mix" do
- Repo.all(Track)
- end
-
- def get_tracks(playlist_id, _playlists) when is_binary(playlist_id) do
- Playlist
- |> where([p], p.spotify_id == ^playlist_id)
- |> preload(:tracks)
- |> Repo.one()
- |> case do
- nil -> []
- playlist -> playlist.tracks
- end
- end
-
- @doc """
- Gets a playlist by Spotify ID, fetching it from Spotify if it doesn't exist locally.
- Returns the playlist as soon as it has basic info and at least one track.
- """
- def get_or_fetch_playlist(spotify_id) do
- case Repo.get(Playlist, spotify_id) do
- nil -> fetch_playlist_from_spotify(spotify_id)
- playlist -> {:ok, :exists, playlist}
- end
- end
-
- defp fetch_playlist_from_spotify(spotify_id) do
- ref = make_ref()
- parent = self()
-
- Task.start(fn ->
- callback = build_playlist_callback(spotify_id, ref, parent)
-
- case Pling.Services.Spotify.stream_playlist(spotify_id, callback) do
- :ok -> :ok
- {:error, reason} -> send(parent, {:playlist_error, ref, reason})
- end
- end)
-
- await_playlist_result(ref, spotify_id)
- end
-
- defp build_playlist_callback(spotify_id, ref, parent) do
- fn
- %{"playlist_info" => info} ->
- create_playlist(spotify_id, info)
-
- %{"track" => track} ->
- process_track(track, spotify_id, ref, parent)
- end
- end
-
- defp create_playlist(spotify_id, info) do
- playlist = %Playlist{
- spotify_id: spotify_id,
- name: info["name"],
- owner: info["owner"],
- image_url: get_first_image_url(info["images"]),
- official: false
- }
-
- {:ok, _} = Repo.insert(playlist)
- :ok
- end
-
- defp process_track(track, spotify_id, ref, parent) do
- case create_track_with_association(track, spotify_id) do
- {:ok, _} -> maybe_notify_first_track(ref, parent, spotify_id)
- _ -> :ok
- end
- end
-
- defp create_track_with_association(track, spotify_id) do
- Repo.transaction(fn ->
- track_entry = %Track{
- uri: track["uri"],
- title: track["name"],
- artists: Enum.map(track["artists"], & &1["name"]),
- popularity: track["popularity"],
- album: track["album"]["name"]
- }
-
- {:ok, saved_track} = Repo.insert(track_entry, on_conflict: :nothing)
-
- if saved_track.uri do
- create_playlist_track_association(saved_track.uri, spotify_id)
- end
-
- saved_track
- end)
- end
-
- defp create_playlist_track_association(track_uri, spotify_id) do
- now = NaiveDateTime.utc_now() |> NaiveDateTime.truncate(:second)
-
- {1, _} =
- Repo.insert_all(
- "playlist_tracks",
- [
- %{
- track_uri: track_uri,
- playlist_spotify_id: spotify_id,
- inserted_at: now,
- updated_at: now
- }
- ],
- on_conflict: :nothing
- )
- end
-
- defp maybe_notify_first_track(ref, parent, spotify_id) do
- if !Process.get(@notification_key) do
- Process.put(@notification_key, true)
- send(parent, {:first_track_saved, ref, spotify_id})
- end
-
- :ok
- end
-
- defp await_playlist_result(ref, spotify_id) do
- receive do
- {:first_track_saved, ^ref, ^spotify_id} ->
- case Repo.get(Playlist, spotify_id) do
- nil -> {:error, :playlist_fetch_failed}
- playlist -> {:ok, :first_track_saved, playlist}
- end
-
- {:playlist_error, ^ref, reason} ->
- {:error, reason}
- end
- end
-
- @doc """
- Returns a callback that just outputs the streaming data.
- Useful for debugging or monitoring the stream.
- """
- def debug_callback do
- fn
- %{"playlist_info" => info} ->
- IO.puts("Playlist Info:")
- IO.inspect(info, pretty: true)
- :ok
-
- %{"track" => track} ->
- IO.puts("\nTrack:")
- IO.inspect(track, pretty: true)
- :ok
- end
- end
-
- defp get_first_image_url([%{"url" => url} | _]), do: url
- defp get_first_image_url(_), do: nil
-
- @doc """
- Loads the default playlist along with its tracks.
- """
- def load_default_playlist do
- case get_or_fetch_playlist(@default_playlist_id) do
- {:ok, _, playlist} ->
- {:ok, playlist}
-
- {:error, reason} ->
- Logger.error("Failed to load default playlist: #{inspect(reason)}")
- {:error, reason}
- end
- end
-end
diff --git a/lib/pling/playlists/playlist.ex b/lib/pling/playlists/playlist.ex
deleted file mode 100644
index 1c136c4..0000000
--- a/lib/pling/playlists/playlist.ex
+++ /dev/null
@@ -1,26 +0,0 @@
-defmodule Pling.Playlists.Playlist do
- use Ecto.Schema
- import Ecto.Changeset
-
- @derive {Jason.Encoder, only: [:spotify_id, :name, :image_url, :owner, :official]}
- @primary_key {:spotify_id, :string, autogenerate: false}
- schema "playlists" do
- field :name, :string
- field :image_url, :string
- field :owner, :string
- field :official, :boolean, default: false
-
- many_to_many :tracks, Pling.Playlists.Track,
- join_through: "playlist_tracks",
- join_keys: [playlist_spotify_id: :spotify_id, track_uri: :uri]
-
- timestamps()
- end
-
- def changeset(playlist, attrs) do
- playlist
- |> cast(attrs, [:spotify_id, :name, :official, :image_url, :owner])
- |> validate_required([:spotify_id, :name, :owner])
- |> unique_constraint(:spotify_id, name: :playlists_pkey)
- end
-end
diff --git a/lib/pling/playlists/track.ex b/lib/pling/playlists/track.ex
deleted file mode 100644
index f9c0674..0000000
--- a/lib/pling/playlists/track.ex
+++ /dev/null
@@ -1,26 +0,0 @@
-defmodule Pling.Playlists.Track do
- use Ecto.Schema
- import Ecto.Changeset
-
- @derive {Jason.Encoder, only: [:uri, :title, :artists, :popularity, :album]}
- @primary_key {:uri, :string, autogenerate: false}
- @foreign_key_type :string
- schema "tracks" do
- field :title, :string
- field :artists, {:array, :string}
- field :popularity, :integer
- field :album, :string
-
- many_to_many :playlists, Pling.Playlists.Playlist,
- join_through: "playlist_tracks",
- join_keys: [track_uri: :uri, playlist_spotify_id: :spotify_id]
-
- timestamps()
- end
-
- def changeset(track, attrs) do
- track
- |> cast(attrs, [:uri, :title, :artists, :popularity, :album])
- |> validate_required([:uri, :title, :artists])
- end
-end
diff --git a/lib/pling/presence.ex b/lib/pling/presence.ex
deleted file mode 100644
index 061583d..0000000
--- a/lib/pling/presence.ex
+++ /dev/null
@@ -1,35 +0,0 @@
-defmodule Pling.Presence do
- @moduledoc """
- Provides presence tracking to channels and processes.
-
- This module combines the core Phoenix.Presence functionality with room-specific
- presence tracking capabilities.
- """
- use Phoenix.Presence,
- otp_app: :pling,
- pubsub_server: Pling.PubSub
-
- def topic(room_code), do: "room:#{room_code}"
-
- @doc """
- Tracks a user's presence in a room.
- """
- def track(room_code, user_id) do
- track(self(), topic(room_code), user_id, %{
- user_id: user_id,
- joined_at: DateTime.utc_now()
- })
- end
-
- @doc """
- Lists all users in a room, sorted by join time.
- """
- def list_users(room_code) do
- topic(room_code)
- |> list()
- |> Enum.map(fn {user_id, %{metas: [meta | _]}} ->
- %{user_id: user_id, joined_at: meta.joined_at}
- end)
- |> Enum.sort_by(& &1.joined_at)
- end
-end
diff --git a/lib/pling/release.ex b/lib/pling/release.ex
deleted file mode 100644
index 5c1464f..0000000
--- a/lib/pling/release.ex
+++ /dev/null
@@ -1,34 +0,0 @@
-defmodule Pling.Release do
- @moduledoc """
- Used for executing DB release tasks when run in production without Mix
- installed.
- """
- @app :pling
-
- def migrate do
- load_app()
-
- for repo <- repos() do
- {:ok, _, _} = Ecto.Migrator.with_repo(repo, &Ecto.Migrator.run(&1, :up, all: true))
- end
- end
-
- def rollback(repo, version) do
- load_app()
- {:ok, _, _} = Ecto.Migrator.with_repo(repo, &Ecto.Migrator.run(&1, :down, to: version))
- end
-
- defp repos do
- Application.fetch_env!(@app, :ecto_repos)
- end
-
- defp load_app do
- Application.load(@app)
- end
-
- def seed do
- load_app()
- Application.ensure_all_started(@app)
- Code.eval_file("#{Application.app_dir(@app)}/priv/repo/seeds.exs")
- end
-end
diff --git a/lib/pling/repo.ex b/lib/pling/repo.ex
deleted file mode 100644
index 9033afe..0000000
--- a/lib/pling/repo.ex
+++ /dev/null
@@ -1,5 +0,0 @@
-defmodule Pling.Repo do
- use Ecto.Repo,
- otp_app: :pling,
- adapter: Ecto.Adapters.SQLite3
-end
diff --git a/lib/pling/rooms.ex b/lib/pling/rooms.ex
deleted file mode 100644
index 0ac0098..0000000
--- a/lib/pling/rooms.ex
+++ /dev/null
@@ -1,89 +0,0 @@
-defmodule Pling.Rooms do
- @moduledoc """
- The Room API module - provides the public interface for room operations.
- """
-
- alias Pling.Rooms.Room.Server
- require Logger
-
- def get_state(room_code) do
- GenServer.call(via_tuple(room_code), :get_state)
- end
-
- def update_score(room_code, identifier, amount) do
- GenServer.cast(via_tuple(room_code), {:update_score, identifier, amount})
- end
-
- def play(room_code) do
- GenServer.call(via_tuple(room_code), :play)
- end
-
- def pause(room_code) do
- GenServer.call(via_tuple(room_code), :pause)
- end
-
- def update_track(room_code) do
- GenServer.call(via_tuple(room_code), :update_track)
- end
-
- def set_playlist(room_code, playlist) do
- GenServer.call(via_tuple(room_code), {:set_playlist, playlist})
- end
-
- def process_tick(room_code) do
- GenServer.cast(via_tuple(room_code), :process_tick)
- end
-
- def join_room(room_code, user_id, pid, game_mode, playlist \\ nil) do
- Logger.metadata(room_code: room_code, user_id: user_id)
- Logger.info("Joining room", event: :room_join, game_mode: game_mode)
-
- case get_or_create_room(room_code, game_mode, user_id, playlist) do
- {:ok, room_pid} ->
- case GenServer.call(room_pid, {:monitor_liveview, pid}) do
- :ok ->
- Logger.info("Room joined successfully", event: :room_join_success)
- {:ok, get_state(room_code)}
-
- error ->
- Logger.error("Failed to join room", event: :room_join_error, error: inspect(error))
- error
- end
-
- error ->
- Logger.error("Failed to create room", event: :room_create_error, error: inspect(error))
- error
- end
- end
-
- defp get_or_create_room(room_code, game_mode, leader_id, playlist) do
- case get_room_pid(room_code) do
- {:ok, pid} ->
- Logger.debug("Using existing room", event: :room_found)
- {:ok, pid}
-
- :error ->
- Logger.info("Creating new room", event: :room_create)
-
- DynamicSupervisor.start_child(
- Pling.Rooms.RoomSupervisor,
- {Server, {room_code, game_mode, leader_id, playlist}}
- )
- end
- end
-
- defp via_tuple(room_code) do
- {:via, Registry, {Pling.Rooms.ServerRegistry, room_code}}
- end
-
- @doc """
- Gets the PID of a room by its room code.
- Returns {:ok, pid} if the room exists, :error otherwise.
- """
- def get_room_pid(room_code) do
- case Registry.lookup(Pling.Rooms.ServerRegistry, room_code) do
- [{pid, _}] -> {:ok, pid}
- [] -> :error
- end
- end
-end
diff --git a/lib/pling/rooms/presence.ex b/lib/pling/rooms/presence.ex
deleted file mode 100644
index c56284c..0000000
--- a/lib/pling/rooms/presence.ex
+++ /dev/null
@@ -1,45 +0,0 @@
-defmodule Pling.Rooms.Presence do
- @moduledoc """
- Handles user presence and leadership election in rooms.
- """
-
- alias Pling.{Presence, Rooms}
-
- @doc """
- Determines if the given user is the leader in the room.
- """
- def elect_leader(user_id, current_state) do
- current_state.leader_id == user_id
- end
-
- @doc """
- Initializes room presence by tracking the user and subscribing to the topic.
- """
- def initialize_presence(room_code, user_id) do
- topic = Presence.topic(room_code)
-
- Presence.track(room_code, user_id)
- PlingWeb.Endpoint.subscribe(topic)
-
- users = Presence.list_users(room_code)
- current_state = Rooms.get_state(room_code)
- leader? = elect_leader(user_id, current_state)
-
- {users, leader?}
- end
-
- @doc """
- Updates room presence for a user and returns the current users list and leader status.
- """
- def update_presence(room_code, user_id) do
- users = Presence.list_users(room_code)
- current_state = Rooms.get_state(room_code)
- leader? = elect_leader(user_id, current_state)
-
- if Enum.empty?(users) do
- Pling.Rooms.Room.Impl.terminate_room(room_code)
- end
-
- {users, leader?}
- end
-end
diff --git a/lib/pling/rooms/room/impl.ex b/lib/pling/rooms/room/impl.ex
deleted file mode 100644
index 7cac052..0000000
--- a/lib/pling/rooms/room/impl.ex
+++ /dev/null
@@ -1,180 +0,0 @@
-defmodule Pling.Rooms.Room.Impl do
- @moduledoc """
- Handles core business logic for room operations.
- """
-
- alias Pling.{Rooms.RoomState, Playlists.MusicLibrary}
- require Logger
-
- def initialize(room_code, game_mode, leader_id, playlist \\ nil) do
- initial_state = RoomState.initialize(room_code, game_mode, leader_id)
- playlists = MusicLibrary.load_playlists()
-
- state =
- if playlist do
- updated_playlists = Map.put(playlists, playlist.spotify_id, playlist)
- tracks = MusicLibrary.get_tracks(playlist.spotify_id, updated_playlists)
- track = List.first(tracks) || nil
-
- %{
- initial_state
- | playlists: updated_playlists,
- selection: %{playlist: playlist.spotify_id, track: track}
- }
- else
- initial_state = %{initial_state | playlists: playlists}
- update_track(initial_state)
- end
-
- update_track(state)
- end
-
- def play(state) do
- state
- |> Map.put(:timer_ref, cancel_timer(state))
- |> Map.put(:playing?, true)
- |> Map.put(:countdown, 30)
- |> schedule_next_tick()
- end
-
- def pause(state) do
- state
- |> Map.put(:timer_ref, cancel_timer(state))
- |> Map.put(:countdown, 7)
- |> Map.put(:playing?, false)
- |> schedule_next_tick()
- end
-
- def update_track(state) do
- current_selection = state.selection
-
- {new_track, new_queue} =
- case current_selection.queue do
- [next_track | remaining_tracks] ->
- {next_track, remaining_tracks}
-
- [] ->
- tracks =
- current_selection.playlist
- |> MusicLibrary.get_tracks(state.playlists)
- |> shuffle_tracks()
-
- {hd(tracks), tl(tracks)}
- end
-
- %{state | selection: %{
- playlist: current_selection.playlist,
- track: new_track,
- queue: new_queue
- }}
- |> Map.put(:countdown, 30)
- end
-
- def set_playlist(state, playlist_id) do
- playlists = MusicLibrary.load_playlists()
- playlist = Map.get(playlists, playlist_id)
-
- tracks =
- playlist_id
- |> MusicLibrary.get_tracks(playlists)
- |> Enum.shuffle()
- {initial_track, initial_queue} =
- {hd(tracks), tl(tracks)}
-
- state
- |> Map.put(:playlists, playlists)
- |> Map.put(:selection, %{
- playlist: playlist,
- track: initial_track,
- queue: initial_queue
- })
- |> reset_playback()
- end
-
- def process_tick(state) do
- new_state = tick(state)
-
- if new_state.countdown && new_state.countdown > 0 do
- schedule_next_tick(new_state)
- else
- %{new_state | timer_ref: nil}
- end
- end
-
- def update_score(state, identifier, amount) do
- current_score = Map.get(state.scores, identifier, 0)
- put_in(state.scores[identifier], current_score + amount)
- end
-
- def handle_liveview_down(room_code, _pid, _reason) do
- client_count = count_clients(room_code)
-
- if client_count <= 1 do
- terminate_room(room_code)
- end
-
- :ok
- end
-
- def terminate_room(room_code) do
- case get_room_pid(room_code) do
- {:ok, pid} ->
- GenServer.stop(pid)
- :ok
-
- :error ->
- :ok
- end
- end
-
- defp tick(state) do
- case state do
- %{countdown: nil} -> state
- %{countdown: 0} -> handle_timeout(state)
- %{countdown: count} -> update_countdown(state, count - 1)
- end
- end
-
- defp handle_timeout(state) do
- if state.playing? do
- new_state =
- state
- |> update_track()
- |> Map.put(:countdown, 30)
-
- schedule_next_tick(new_state)
- else
- %{state | countdown: nil}
- end
- end
-
- defp update_countdown(state, new_count) do
- %{state | countdown: new_count}
- end
-
- defp schedule_next_tick(state) do
- timer_ref = Process.send_after(self(), :tick, 1000)
- %{state | timer_ref: timer_ref}
- end
-
- defp cancel_timer(%{timer_ref: ref}) when is_reference(ref), do: Process.cancel_timer(ref)
- defp cancel_timer(_), do: :ok
-
- defp reset_playback(state) do
- %{state | playing?: false, countdown: nil, timer_ref: nil}
- end
-
- defp count_clients(room_code) do
- Registry.lookup(Pling.Rooms.ClientRegistry, room_code)
- |> length()
- end
-
- defp get_room_pid(room_code) do
- case Registry.lookup(Pling.Rooms.ServerRegistry, room_code) do
- [{pid, _}] -> {:ok, pid}
- [] -> :error
- end
- end
-
- defp shuffle_tracks(tracks), do: Enum.shuffle(tracks)
-end
diff --git a/lib/pling/rooms/room/server.ex b/lib/pling/rooms/room/server.ex
deleted file mode 100644
index 6ee1127..0000000
--- a/lib/pling/rooms/room/server.ex
+++ /dev/null
@@ -1,108 +0,0 @@
-defmodule Pling.Rooms.Room.Server do
- use GenServer
- alias Pling.{Rooms.Room.Impl, Presence, Rooms.RoomState}
- require Logger
-
- def start_link({room_code, _game_mode, _leader_id, _playlist} = args) do
- Logger.metadata(room_code: room_code)
- Logger.info("Starting room server", event: :room_start)
- GenServer.start_link(__MODULE__, args, name: via_tuple(room_code))
- end
-
- defp via_tuple(room_code) do
- {:via, Registry, {Pling.Rooms.ServerRegistry, room_code}}
- end
-
- @impl true
- def init({room_code, game_mode, leader_id, playlist}) do
- Logger.metadata(room_code: room_code)
- Logger.info("Initializing room", event: :room_init)
- state = Impl.initialize(room_code, game_mode, leader_id, playlist)
- {:ok, state}
- end
-
- @impl true
- def handle_cast({:update_score, identifier, amount}, state) do
- new_state = Impl.update_score(state, identifier, amount)
- broadcast_state_update(new_state)
- {:noreply, new_state}
- end
-
- @impl true
- def handle_cast(:process_tick, state) do
- new_state = Impl.process_tick(state)
- broadcast_state_update(new_state)
- {:noreply, new_state}
- end
-
- @impl true
- def handle_call(:get_state, _from, state), do: {:reply, state, state}
-
- @impl true
- def handle_call(:play, _from, state) do
- new_state = Impl.play(state)
- broadcast(new_state, "spotify:play", %{playing?: true})
- broadcast_state_update(new_state)
- {:reply, new_state, new_state}
- end
-
- @impl true
- def handle_call(:pause, _from, state) do
- new_state = Impl.pause(state)
- broadcast(new_state, "spotify:pause", %{playing?: false})
- broadcast(new_state, "ring_bell", %{})
- broadcast_state_update(new_state)
- {:reply, new_state, new_state}
- end
-
- @impl true
- def handle_call(:update_track, _from, state) do
- new_state = Impl.update_track(state)
- broadcast_state_update(new_state)
- {:reply, new_state, new_state}
- end
-
- @impl true
- def handle_call({:set_playlist, playlist}, _from, state) do
- new_state = Impl.set_playlist(state, playlist)
- broadcast_state_update(new_state)
- {:reply, {:ok, new_state}, new_state}
- end
-
- @impl true
- def handle_call({:monitor_liveview, pid}, _from, state) do
- Logger.debug("Monitoring LiveView process", pid: inspect(pid))
- Registry.register(Pling.Rooms.ClientRegistry, state.room_code, pid)
- Process.monitor(pid)
- {:reply, :ok, state}
- end
-
- @impl true
- def handle_info(:tick, state) do
- new_state = Impl.process_tick(state)
- broadcast_state_update(new_state)
- {:noreply, new_state}
- end
-
- @impl true
- def handle_info({:DOWN, _ref, :process, pid, reason}, state) do
- Logger.debug("LiveView process down", pid: inspect(pid), reason: inspect(reason))
- Impl.handle_liveview_down(state.room_code, pid, reason)
- {:noreply, state}
- end
-
- defp broadcast(state, event, payload) do
- PlingWeb.Endpoint.broadcast(Presence.topic(state.room_code), event, payload)
- end
-
- defp broadcast_state_update(state) do
- broadcast(state, "state_update", %{state: RoomState.for_client(state)})
- end
-
- @impl true
- def terminate(reason, state) do
- Logger.metadata(room_code: state.room_code)
- Logger.warning("Room server terminating", event: :room_terminate, reason: inspect(reason))
- :ok
- end
-end
diff --git a/lib/pling/rooms/room_state.ex b/lib/pling/rooms/room_state.ex
deleted file mode 100644
index 8e52b6c..0000000
--- a/lib/pling/rooms/room_state.ex
+++ /dev/null
@@ -1,62 +0,0 @@
-defmodule Pling.Rooms.RoomState do
- @moduledoc """
- Defines the core room state structure and provides client-facing state transformations.
- """
-
- @default_track_duration 30
- @default_playlist_id "4DIYG1WrBI9jRJiul9vmxj"
-
- def initialize(room_code, game_mode \\ "vs", leader_id \\ nil) do
- if leader_id == nil do
- raise "leader_id must be provided when initializing a room"
- end
-
- # Load default playlist
- {:ok, default_playlist} = Pling.Playlists.MusicLibrary.load_default_playlist()
-
- %{
- scores: %{},
- playing?: false,
- countdown: nil,
- timer_ref: nil,
- timer_threshold: 10,
- spotify_track_duration: @default_track_duration,
- playlists: %{@default_playlist_id => default_playlist},
- room_code: room_code,
- game_mode: game_mode,
- leader_id: leader_id,
- recent_plings: [],
- selection: %{
- playlist: default_playlist,
- track: nil,
- queue: Pling.Playlists.MusicLibrary.get_tracks(@default_playlist_id, %{})
- }
- }
- end
-
- def for_client(state) do
- %{
- playing?: state.playing?,
- countdown: state.countdown,
- timer_threshold: state.timer_threshold,
- playlists: format_playlists(state.playlists),
- game_mode: state.game_mode,
- scores: state.scores,
- leader_id: state.leader_id,
- recent_plings: state.recent_plings,
- selection: %{
- playlist: state.selection.playlist,
- track: List.first(state.selection.queue) || nil
- }
- }
- end
-
- defp format_playlist(playlist), do: Map.take(playlist, [:spotify_id, :name, :official, :image_url])
-
- defp format_playlists(playlists) when is_map(playlists) do
- playlists
- |> Map.new(fn {spotify_id, playlist} ->
- {spotify_id, format_playlist(playlist)}
- end)
- end
-end
diff --git a/lib/pling/services/names_service.ex b/lib/pling/services/names_service.ex
deleted file mode 100644
index bb6e9ff..0000000
--- a/lib/pling/services/names_service.ex
+++ /dev/null
@@ -1,408 +0,0 @@
-defmodule Pling.Services.NamesService do
- @adjectives [
- "Stor",
- "Liten",
- "Vakker",
- "Stygg",
- "Rask",
- "Langsom",
- "Smart",
- "Dum",
- "Lykkelig",
- "Trist",
- "Modig",
- "Feig",
- "Vennlig",
- "Frodig",
- "Sterk",
- "Svak",
- "Aktiv",
- "Lat",
- "Høy",
- "Lav",
- "Rik",
- "Fattig",
- "Ung",
- "Gammel",
- "Kreativ",
- "Uoriginal",
- "Spennende",
- "Kjedelig",
- "Søt",
- "Sur",
- "Kald",
- "Varm",
- "Morsom",
- "Alvorlig",
- "Flittig",
- "Sløv",
- "Dyktig",
- "Udyktig",
- "Snill",
- "Slem",
- "Lys",
- "Mørk",
- "Tynn",
- "Tykk",
- "Enkel",
- "Komplisert",
- "Rund",
- "Firkantet",
- "Myk",
- "Hard",
- "Klar",
- "Uklar",
- "Tom",
- "Full",
- "Skarp",
- "Utydelig",
- "Glatt",
- "Ru",
- "Ren",
- "Skitten",
- "Tung",
- "Lett",
- "Våt",
- "Tørr",
- "Rask",
- "Treg",
- "Frisk",
- "Syk",
- "Pen",
- "Stygg",
- "Stille",
- "Høylytt",
- "Ensom",
- "Populær",
- "Ny",
- "Gammel",
- "Tidløs",
- "Modern",
- "Tradisjonell",
- "Lokal",
- "Global",
- "Ekte",
- "Falsk",
- "Sulten",
- "Mett",
- "Ren",
- "Uren",
- "Glatt",
- "Humpete",
- "Våken",
- "Trøtt",
- "Åpen",
- "Lukket",
- "Tett",
- "Løs",
- "Kort",
- "Lang",
- "Skarp",
- "Flat",
- "Fersk",
- "Støl",
- "Frisk",
- "Muggen",
- "Lykkelig",
- "Elendig",
- "Optimal",
- "Dårlig",
- "Første",
- "Siste",
- "Øverste",
- "Nederste",
- "Innenfor",
- "Utenfor",
- "Langt",
- "Kort",
- "Fjern",
- "Nær",
- "Lys",
- "Tung",
- "Tom",
- "Hel",
- "Delvis",
- "Fullstendig",
- "Ufullstendig",
- "Fleksibel",
- "Stiv",
- "Stor",
- "Liten",
- "Koselig",
- "Hyggelig",
- "Rolig",
- "Travel",
- "Glad",
- "Sint",
- "Spent",
- "Nervøs",
- "Ivrig",
- "Sliten",
- "Energisk",
- "Munter",
- "Søvnig",
- "Sulten",
- "Tørst",
- "Varm",
- "Kjølig",
- "Frodig",
- "Tørr",
- "Våt",
- "Myk",
- "Krøllete",
- "Glatt",
- "Skinnende",
- "Dustete",
- "Morsom",
- "Rar",
- "Merkelig",
- "Vanlig",
- "Uvanlig",
- "Deilig",
- "Herlig",
- "Praktfull",
- "Nydelig",
- "Fantastisk",
- "Utrolig",
- "Magisk",
- "Mystisk",
- "Hemmelig",
- "Åpen",
- "Fnisende",
- "Hoppende",
- "Dansende",
- "Syngende",
- "Drømmende",
- "Sovende",
- "Busete",
- "Lurvete",
- "Glinsende",
- "Strålende",
- "Skinnende",
- "Blinkende",
- "Hoppende",
- "Sprettende",
- "Rullende",
- "Klumsete",
- "Elegant",
- "Grasiøs",
- "Klønete",
- "Tullete",
- "Tøysete",
- "Leken",
- "Lattermild",
- "Smilende",
- "Gapende",
- "Hylende",
- "Hviskende",
- "Brølende",
- "Trallende",
- "Plystende",
- "Glitrende",
- "Funklende",
- "Sprudlende",
- "Boblende",
- "Susende",
- "Hvinende",
- "Durende",
- "Surrende",
- "Knirkende",
- "Knitrende"
- ]
-
- @nouns [
- "Hund",
- "Katt",
- "Bil",
- "Hus",
- "Tre",
- "Elv",
- "Fjell",
- "Sjø",
- "Bok",
- "Sko",
- "Data",
- "Hage",
- "Fugl",
- "Vind",
- "Stol",
- "Bord",
- "Lampe",
- "Dør",
- "Vindu",
- "Himmel",
- "Sol",
- "Måne",
- "Stjerne",
- "Hav",
- "Strand",
- "By",
- "Landsby",
- "Skog",
- "Ørken",
- "Snø",
- "Regn",
- "Sommer",
- "Vinter",
- "Høst",
- "Vår",
- "Klokke",
- "Telefon",
- "Datamaskin",
- "TV",
- "Radio",
- "Kamera",
- "Tog",
- "Fly",
- "Båt",
- "Sykkel",
- "Mat",
- "Drikke",
- "Vann",
- "Melk",
- "Brød",
- "Ost",
- "Frukt",
- "Grønnsak",
- "Kjøtt",
- "Sukker",
- "Salt",
- "Pepper",
- "Krydder",
- "Blomst",
- "Gress",
- "Rot",
- "Blad",
- "Gren",
- "Fugl",
- "Fisk",
- "Flue",
- "Insekt",
- "Menneske",
- "Barn",
- "Voksen",
- "Lærer",
- "Student",
- "Leger",
- "Sykepleier",
- "Advokat",
- "Politi",
- "Brannmann",
- "Kokk",
- "Mekaniker",
- "Kunstner",
- "Musiker",
- "Sanger",
- "Skuespiller",
- "Idrettsutøver",
- "Spill",
- "Lek",
- "Sport",
- "Musikk",
- "Kunst",
- "Film",
- "Teater",
- "Bok",
- "Magasin",
- "Avis",
- "Penn",
- "Blyant",
- "Tusj",
- "Farge",
- "Lyd",
- "Bilde",
- "Kaffe",
- "Te",
- "Juice",
- "Kake",
- "Bolle",
- "Suppe",
- "Middag",
- "Frokost",
- "Lunsj",
- "Kjøkken",
- "Stue",
- "Soverom",
- "Bad",
- "Gang",
- "Trapp",
- "Vegg",
- "Tak",
- "Gulv",
- "Pute",
- "Teppe",
- "Sofa",
- "Seng",
- "Hylle",
- "Skap",
- "Skuff",
- "Speil",
- "Klær",
- "Sko",
- "Jakke",
- "Bukse",
- "Genser",
- "Skjerf",
- "Lue",
- "Vott",
- "Sokk",
- "Veske",
- "Nøkkel",
- "Lommebok",
- "Paraply",
- "Solbriller",
- "Boble",
- "Ballong",
- "Sirkus",
- "Karusell",
- "Rutsjebane",
- "Gynge",
- "Klovn",
- "Sjonglør",
- "Akrobat",
- "Tryllekunst",
- "Eventyr",
- "Drøm",
- "Latter",
- "Smil",
- "Tåke",
- "Regnbue",
- "Stjerneskudd",
- "Nordlys",
- "Måneskin",
- "Solstråle",
- "Sommerfugl",
- "Marihøne",
- "Gresshoppe",
- "Tusenbein",
- "Pingvin",
- "Sjiraff",
- "Nesehorn",
- "Kenguru",
- "Panda",
- "Koala",
- "Isbjørn",
- "Delfin",
- "Flamingo",
- "Papegøye",
- "Ugle",
- "Pingvin",
- "Ekorn",
- "Kanin",
- "Pinnsvin",
- "Grevling"
- ]
-
- # S = N^2 = ?k
- def generate do
- "#{random_adjective()}-#{random_noun()}"
- end
-
- def random_adjective do
- Enum.random(@adjectives)
- end
-
- def random_noun do
- Enum.random(@nouns)
- end
-end
diff --git a/lib/pling/services/ndjson_stream.ex b/lib/pling/services/ndjson_stream.ex
deleted file mode 100644
index 35e8fe2..0000000
--- a/lib/pling/services/ndjson_stream.ex
+++ /dev/null
@@ -1,94 +0,0 @@
-defmodule Pling.Services.NDJsonStream do
- @moduledoc """
- Handles streaming of newline-delimited JSON (NDJSON) data, processing complete objects
- as they arrive and handling partial chunks internally.
- """
- require Logger
-
- @buffer_key :ndjson_buffer
-
- @doc """
- Creates a streaming function that processes NDJSON data and calls the callback
- for each complete JSON object.
-
- The function handles:
- - Complete JSON objects
- - Multiple objects in one chunk
- - Partial objects across chunks
- - Invalid JSON gracefully
- - Final buffer processing
- """
- def stream_fn(callback) when is_function(callback, 1) do
- Process.put(@buffer_key, "")
-
- fn
- {:data, data}, _acc ->
- current_buffer = Process.get(@buffer_key)
- process_chunk(current_buffer <> data, false, callback)
-
- {:done, data}, _acc ->
- current_buffer = Process.get(@buffer_key)
- result = process_chunk(current_buffer <> (data || ""), true, callback)
- Process.delete(@buffer_key)
- result
-
- _, _acc ->
- {:cont, Process.get(@buffer_key)}
- end
- end
-
- defp process_chunk(data, is_final?, callback) do
- parts = String.split(data, "\n")
-
- case {parts, is_final?} do
- {[], _} ->
- Process.put(@buffer_key, "")
- {:cont, ""}
-
- {[single], true} ->
- process_json(single, callback)
- Process.put(@buffer_key, "")
- {:cont, ""}
-
- {parts, true} ->
- process_all_parts(parts, callback)
- Process.put(@buffer_key, "")
- {:cont, ""}
-
- {parts, false} ->
- result = process_parts(parts, callback)
- Process.put(@buffer_key, elem(result, 1))
- result
- end
- end
-
- defp process_all_parts(parts, callback) do
- Enum.each(parts, &process_json(&1, callback))
- end
-
- defp process_parts([partial], _callback), do: {:cont, partial}
-
- defp process_parts(parts, callback) do
- [last | rest] = Enum.reverse(parts)
-
- rest
- |> Enum.reverse()
- |> Enum.each(&process_json(&1, callback))
-
- {:cont, last}
- end
-
- defp process_json("", _callback), do: :ok
-
- defp process_json(line, callback) do
- case Jason.decode(line) do
- {:ok, decoded} ->
- callback.(decoded)
-
- {:error, error} ->
- Logger.warning(
- "Failed to decode JSON line: #{inspect(error)}\nLine content: #{inspect(line)}"
- )
- end
- end
-end
diff --git a/lib/pling/services/spotify.ex b/lib/pling/services/spotify.ex
deleted file mode 100644
index c99daad..0000000
--- a/lib/pling/services/spotify.ex
+++ /dev/null
@@ -1,49 +0,0 @@
-defmodule Pling.Services.Spotify do
- require Logger
- alias Pling.Services.NDJsonStream
-
- @base_url "https://playlist-fetcher-1031294514094.europe-north1.run.app"
- @api_key "1367a6ef2cb6f3cd2bfb3f73978292fdae3bc9a5e885ca7632d4eb3fc15eb4d4"
-
- def stream_playlist(playlist_id, callback) when is_function(callback, 1) do
- Logger.info("Starting playlist stream", playlist_id: playlist_id)
-
- req =
- Req.new(
- base_url: @base_url,
- headers: [{"x-api-key", @api_key}]
- )
-
- stream_fn = NDJsonStream.stream_fn(callback)
-
- try do
- Req.get!(req,
- url: "/playlist/#{playlist_id}",
- params: [stream: true],
- into: fn
- {:data, data}, {req, resp} ->
- {_, _} = stream_fn.({:data, data}, nil)
- {:cont, {req, resp}}
-
- {:done, data}, {req, resp} ->
- stream_fn.({:done, data}, nil)
- {:cont, {req, resp}}
-
- _, state ->
- {:cont, state}
- end
- )
-
- Logger.info("Completed playlist stream", playlist_id: playlist_id)
- :ok
- catch
- kind, error ->
- Logger.error("Failed to stream playlist",
- playlist_id: playlist_id,
- error: Exception.format(kind, error, __STACKTRACE__)
- )
-
- {:error, error}
- end
- end
-end
diff --git a/lib/pling_web.ex b/lib/pling_web.ex
deleted file mode 100644
index aa396eb..0000000
--- a/lib/pling_web.ex
+++ /dev/null
@@ -1,117 +0,0 @@
-defmodule PlingWeb do
- @moduledoc """
- The entrypoint for defining your web interface, such
- as controllers, components, channels, and so on.
-
- This can be used in your application as:
-
- use PlingWeb, :controller
- use PlingWeb, :html
-
- The definitions below will be executed for every controller,
- component, etc, so keep them short and clean, focused
- on imports, uses and aliases.
-
- Do NOT define functions inside the quoted expressions
- below. Instead, define additional modules and import
- those modules here.
- """
-
- def static_paths, do: ~w(assets fonts images favicon.ico audio robots.txt)
-
- def router do
- quote do
- use Phoenix.Router, helpers: false
-
- # Import common connection and controller functions to use in pipelines
- import Plug.Conn
- import Phoenix.Controller
- import Phoenix.LiveView.Router
- end
- end
-
- def channel do
- quote do
- use Phoenix.Channel
- end
- end
-
- def controller do
- quote do
- use Phoenix.Controller,
- formats: [:html, :json],
- layouts: [html: PlingWeb.Layouts]
-
- import Plug.Conn
- use Gettext, backend: PlingWeb.Gettext
-
- unquote(verified_routes())
- end
- end
-
- def live_view do
- quote do
- use Phoenix.LiveView,
- layout: {PlingWeb.Layouts, :app}
-
- use Gettext, backend: PlingWeb.Gettext
-
- unquote(html_helpers())
- end
- end
-
- def live_component do
- quote do
- use Phoenix.LiveComponent
-
- use Gettext, backend: PlingWeb.Gettext
-
- unquote(html_helpers())
- end
- end
-
- def html do
- quote do
- use Phoenix.Component
-
- # Import convenience functions from controllers
- import Phoenix.Controller,
- only: [get_csrf_token: 0, view_module: 1, view_template: 1]
-
- # Include general helpers for rendering HTML
- unquote(html_helpers())
- end
- end
-
- defp html_helpers do
- quote do
- # HTML escaping functionality
- import Phoenix.HTML
- # Core UI components and translation
- import PlingWeb.CoreComponents
- use Gettext, backend: PlingWeb.Gettext
-
- # Shortcut for generating JS commands
- alias Phoenix.LiveView.JS
-
- # Routes generation with the ~p sigil
- unquote(verified_routes())
- end
- end
-
- def verified_routes do
- quote do
- use Phoenix.VerifiedRoutes,
- endpoint: PlingWeb.Endpoint,
- router: PlingWeb.Router,
- statics: PlingWeb.static_paths()
- end
- end
-
- @doc """
- When used, dispatch to the appropriate controller/view/etc.
- """
- defmacro __using__(which) when is_atom(which) do
- apply(__MODULE__, which, [])
- end
-end
diff --git a/lib/pling_web/channels/presence.ex b/lib/pling_web/channels/presence.ex
deleted file mode 100644
index 09336a2..0000000
--- a/lib/pling_web/channels/presence.ex
+++ /dev/null
@@ -1,18 +0,0 @@
-defmodule PlingWeb.PresenceChannel do
- use Phoenix.Channel
- alias Pling.Presence
-
- def join("room:" <> room_code, _params, socket) do
- {:ok, assign(socket, :room_code, room_code)}
- end
-
- def handle_in("track_user", %{"user_id" => user_id}, socket) do
- Presence.track(socket.assigns.room_code, user_id)
-
- broadcast_from!(socket, "presence_diff", %{
- users: Presence.list_users(socket.assigns.room_code)
- })
-
- {:noreply, socket}
- end
-end
diff --git a/lib/pling_web/components/component.ex b/lib/pling_web/components/component.ex
deleted file mode 100644
index 81cc430..0000000
--- a/lib/pling_web/components/component.ex
+++ /dev/null
@@ -1,27 +0,0 @@
-defmodule PlingWeb.Component do
- @moduledoc """
- The entrypoint for defining UI components.
-
- This can be used in your components as:
-
- use PlingWeb.Component
-
- Do NOT define functions inside the quoted expressions
- below. Instead, define additional modules and import
- those modules here.
- """
-
- defmacro __using__(_) do
- quote do
- use Phoenix.Component
-
- import PlingWeb.ComponentHelpers
-
- alias Phoenix.LiveView.JS
-
- defp classes(input) do
- TwMerge.merge(input)
- end
- end
- end
-end
diff --git a/lib/pling_web/components/core_components.ex b/lib/pling_web/components/core_components.ex
deleted file mode 100644
index 20dc3a5..0000000
--- a/lib/pling_web/components/core_components.ex
+++ /dev/null
@@ -1,675 +0,0 @@
-defmodule PlingWeb.CoreComponents do
- @moduledoc """
- Provides core UI components.
-
- At first glance, this module may seem daunting, but its goal is to provide
- core building blocks for your application, such as modals, tables, and
- forms. The components consist mostly of markup and are well-documented
- with doc strings and declarative assigns. You may customize and style
- them in any way you want, based on your application growth and needs.
-
- The default components use Tailwind CSS, a utility-first CSS framework.
- See the [Tailwind CSS documentation](https://tailwindcss.com) to learn
- how to customize them or feel free to swap in another framework altogether.
-
- Icons are provided by [heroicons](https://heroicons.com). See `icon/1` for usage.
- """
- use Phoenix.Component
- use Gettext, backend: PlingWeb.Gettext
-
- alias Phoenix.LiveView.JS
-
- @doc """
- Renders a modal.
-
- ## Examples
-
- <.modal id="confirm-modal">
- This is a modal.
-
-
- JS commands may be passed to the `:on_cancel` to configure
- the closing/cancel event, for example:
-
- <.modal id="confirm" on_cancel={JS.navigate(~p"/posts")}>
- This is another modal.
-
-
- """
- attr :id, :string, required: true
- attr :show, :boolean, default: false
- attr :on_cancel, JS, default: %JS{}
- slot :inner_block, required: true
-
- def modal(assigns) do
- ~H"""
-
-
-
-
-
- <.focus_wrap
- id={"#{@id}-container"}
- phx-window-keydown={JS.exec("data-cancel", to: "##{@id}")}
- phx-key="escape"
- phx-click-away={JS.exec("data-cancel", to: "##{@id}")}
- class="shadow-zinc-700/10 ring-zinc-700/10 relative hidden rounded-2xl bg-white p-14 shadow-lg ring-1 transition"
- >
-
-
- <.icon name="hero-x-mark-solid" class="h-5 w-5" />
-
-
-
- {render_slot(@inner_block)}
-
-
-
-
-
-
- """
- end
-
- @doc """
- Renders flash notices.
-
- ## Examples
-
- <.flash kind={:info} flash={@flash} />
- <.flash kind={:info} phx-mounted={show("#flash")}>Welcome Back!
- """
- attr :id, :string, doc: "the optional id of flash container"
- attr :flash, :map, default: %{}, doc: "the map of flash messages to display"
- attr :title, :string, default: nil
- attr :kind, :atom, values: [:info, :error], doc: "used for styling and flash lookup"
- attr :rest, :global, doc: "the arbitrary HTML attributes to add to the flash container"
-
- slot :inner_block, doc: "the optional inner block that renders the flash message"
-
- def flash(assigns) do
- assigns = assign_new(assigns, :id, fn -> "flash-#{assigns.kind}" end)
-
- ~H"""
-
hide("##{@id}")}
- role="alert"
- class={[
- "fixed top-2 right-2 mr-2 w-80 sm:w-96 z-50 rounded-lg p-3 ring-1",
- @kind == :info && "bg-emerald-50 text-emerald-800 ring-emerald-500 fill-cyan-900",
- @kind == :error && "bg-rose-50 text-rose-900 shadow-md ring-rose-500 fill-rose-900"
- ]}
- {@rest}
- >
-
- <.icon :if={@kind == :info} name="hero-information-circle-mini" class="h-4 w-4" />
- <.icon :if={@kind == :error} name="hero-exclamation-circle-mini" class="h-4 w-4" />
- {@title}
-
-
{msg}
-
- <.icon name="hero-x-mark-solid" class="h-5 w-5 opacity-40 group-hover:opacity-70" />
-
-
- """
- end
-
- @doc """
- Shows the flash group with standard titles and content.
-
- ## Examples
-
- <.flash_group flash={@flash} />
- """
- attr :flash, :map, required: true, doc: "the map of flash messages"
- attr :id, :string, default: "flash-group", doc: "the optional id of flash container"
-
- def flash_group(assigns) do
- ~H"""
-
- <.flash kind={:info} title={gettext("Success!")} flash={@flash} />
- <.flash kind={:error} title={gettext("Error!")} flash={@flash} />
- <.flash
- id="client-error"
- kind={:error}
- title={gettext("We can't find the internet")}
- phx-disconnected={show(".phx-client-error #client-error")}
- phx-connected={hide("#client-error")}
- hidden
- >
- {gettext("Attempting to reconnect")}
- <.icon name="hero-arrow-path" class="ml-1 h-3 w-3 animate-spin" />
-
-
- <.flash
- id="server-error"
- kind={:error}
- title={gettext("Something went wrong!")}
- phx-disconnected={show(".phx-server-error #server-error")}
- phx-connected={hide("#server-error")}
- hidden
- >
- {gettext("Hang in there while we get back on track")}
- <.icon name="hero-arrow-path" class="ml-1 h-3 w-3 animate-spin" />
-
-
- """
- end
-
- @doc """
- Renders a simple form.
-
- ## Examples
-
- <.simple_form for={@form} phx-change="validate" phx-submit="save">
- <.input field={@form[:email]} label="Email"/>
- <.input field={@form[:username]} label="Username" />
- <:actions>
- <.button>Save
-
-
- """
- attr :for, :any, required: true, doc: "the datastructure for the form"
- attr :as, :any, default: nil, doc: "the server side parameter to collect all input under"
-
- attr :rest, :global,
- include: ~w(autocomplete name rel action enctype method novalidate target multipart),
- doc: "the arbitrary HTML attributes to apply to the form tag"
-
- slot :inner_block, required: true
- slot :actions, doc: "the slot for form actions, such as a submit button"
-
- def simple_form(assigns) do
- ~H"""
- <.form :let={f} for={@for} as={@as} {@rest}>
-
- {render_slot(@inner_block, f)}
-
- {render_slot(action, f)}
-
-
-
- """
- end
-
- @doc """
- Renders a button.
-
- ## Examples
-
- <.button>Send!
- <.button phx-click="go" class="ml-2">Send!
- """
- attr :type, :string, default: nil
- attr :class, :string, default: nil
- attr :rest, :global, include: ~w(disabled form name value)
-
- slot :inner_block, required: true
-
- def button(assigns) do
- ~H"""
-
- {render_slot(@inner_block)}
-
- """
- end
-
- @doc """
- Renders an input with label and error messages.
-
- A `Phoenix.HTML.FormField` may be passed as argument,
- which is used to retrieve the input name, id, and values.
- Otherwise all attributes may be passed explicitly.
-
- ## Types
-
- This function accepts all HTML input types, considering that:
-
- * You may also set `type="select"` to render a `
` tag
-
- * `type="checkbox"` is used exclusively to render boolean values
-
- * For live file uploads, see `Phoenix.Component.live_file_input/1`
-
- See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input
- for more information.
-
- ## Examples
-
- <.input field={@form[:email]} type="email" />
- <.input name="my-input" errors={["oh no!"]} />
- """
- attr :id, :any, default: nil
- attr :name, :any
- attr :label, :string, default: nil
- attr :value, :any
-
- attr :type, :string,
- default: "text",
- values: ~w(checkbox color date datetime-local email file hidden month number password
- range radio search select tel text textarea time url week)
-
- attr :field, Phoenix.HTML.FormField,
- doc: "a form field struct retrieved from the form, for example: @form[:email]"
-
- attr :errors, :list, default: []
- attr :checked, :boolean, doc: "the checked flag for checkbox inputs"
- attr :prompt, :string, default: nil, doc: "the prompt for select inputs"
- attr :options, :list, doc: "the options to pass to Phoenix.HTML.Form.options_for_select/2"
- attr :multiple, :boolean, default: false, doc: "the multiple flag for select inputs"
-
- attr :rest, :global,
- include: ~w(accept autocomplete capture cols disabled form list max maxlength min minlength
- multiple pattern placeholder readonly required rows size step)
-
- slot :inner_block
-
- def input(%{field: %Phoenix.HTML.FormField{} = field} = assigns) do
- assigns
- |> assign(field: nil, id: assigns.id || field.id)
- |> assign(:errors, Enum.map(field.errors, &translate_error(&1)))
- |> assign_new(:name, fn -> if assigns.multiple, do: field.name <> "[]", else: field.name end)
- |> assign_new(:value, fn -> field.value end)
- |> input()
- end
-
- def input(%{type: "checkbox"} = assigns) do
- assigns =
- assign_new(assigns, :checked, fn ->
- Phoenix.HTML.Form.normalize_value("checkbox", assigns[:value])
- end)
-
- ~H"""
-
-
-
-
- {@label}
-
- <.error :for={msg <- @errors}>{msg}
-
- """
- end
-
- def input(%{type: "select"} = assigns) do
- ~H"""
-
- <.label for={@id}>{@label}
-
- {@prompt}
- {Phoenix.HTML.Form.options_for_select(@options, @value)}
-
- <.error :for={msg <- @errors}>{msg}
-
- """
- end
-
- def input(%{type: "textarea"} = assigns) do
- ~H"""
-
- <.label for={@id}>{@label}
-
- <.error :for={msg <- @errors}>{msg}
-
- """
- end
-
- # All other inputs text, datetime-local, url, password, etc. are handled here...
- def input(assigns) do
- ~H"""
-
- <.label for={@id}>{@label}
-
- <.error :for={msg <- @errors}>{msg}
-
- """
- end
-
- @doc """
- Renders a label.
- """
- attr :for, :string, default: nil
- slot :inner_block, required: true
-
- def label(assigns) do
- ~H"""
-
- {render_slot(@inner_block)}
-
- """
- end
-
- @doc """
- Generates a generic error message.
- """
- slot :inner_block, required: true
-
- def error(assigns) do
- ~H"""
-
- <.icon name="hero-exclamation-circle-mini" class="mt-0.5 h-5 w-5 flex-none" />
- {render_slot(@inner_block)}
-
- """
- end
-
- @doc """
- Renders a header with title.
- """
- attr :class, :string, default: nil
-
- slot :inner_block, required: true
- slot :subtitle
- slot :actions
-
- def header(assigns) do
- ~H"""
-
- """
- end
-
- @doc ~S"""
- Renders a table with generic styling.
-
- ## Examples
-
- <.table id="users" rows={@users}>
- <:col :let={user} label="id"><%= user.id %>
- <:col :let={user} label="username"><%= user.username %>
-
- """
- attr :id, :string, required: true
- attr :rows, :list, required: true
- attr :row_id, :any, default: nil, doc: "the function for generating the row id"
- attr :row_click, :any, default: nil, doc: "the function for handling phx-click on each row"
-
- attr :row_item, :any,
- default: &Function.identity/1,
- doc: "the function for mapping each row before calling the :col and :action slots"
-
- slot :col, required: true do
- attr :label, :string
- end
-
- slot :action, doc: "the slot for showing user actions in the last table column"
-
- def table(assigns) do
- assigns =
- with %{rows: %Phoenix.LiveView.LiveStream{}} <- assigns do
- assign(assigns, row_id: assigns.row_id || fn {id, _item} -> id end)
- end
-
- ~H"""
-
-
-
-
- {col[:label]}
-
- {gettext("Actions")}
-
-
-
-
-
-
-
-
-
- {render_slot(col, @row_item.(row))}
-
-
-
-
-
-
-
- {render_slot(action, @row_item.(row))}
-
-
-
-
-
-
-
- """
- end
-
- @doc """
- Renders a data list.
-
- ## Examples
-
- <.list>
- <:item title="Title"><%= @post.title %>
- <:item title="Views"><%= @post.views %>
-
- """
- slot :item, required: true do
- attr :title, :string, required: true
- end
-
- def list(assigns) do
- ~H"""
-
-
-
-
{item.title}
- {render_slot(item)}
-
-
-
- """
- end
-
- @doc """
- Renders a back navigation link.
-
- ## Examples
-
- <.back navigate={~p"/posts"}>Back to posts
- """
- attr :navigate, :any, required: true
- slot :inner_block, required: true
-
- def back(assigns) do
- ~H"""
-
- <.link
- navigate={@navigate}
- class="text-sm font-semibold leading-6 text-zinc-900 hover:text-zinc-700"
- >
- <.icon name="hero-arrow-left-solid" class="h-3 w-3" />
- {render_slot(@inner_block)}
-
-
- """
- end
-
- @doc """
- Renders a [Heroicon](https://heroicons.com).
-
- Heroicons come in three styles – outline, solid, and mini.
- By default, the outline style is used, but solid and mini may
- be applied by using the `-solid` and `-mini` suffix.
-
- You can customize the size and colors of the icons by setting
- width, height, and background color classes.
-
- Icons are extracted from the `deps/heroicons` directory and bundled within
- your compiled app.css by the plugin in your `assets/tailwind.config.js`.
-
- ## Examples
-
- <.icon name="hero-x-mark-solid" />
- <.icon name="hero-arrow-path" class="ml-1 w-3 h-3 animate-spin" />
- """
- attr :name, :string, required: true
- attr :class, :string, default: nil
-
- def icon(%{name: "hero-" <> _} = assigns) do
- ~H"""
-
- """
- end
-
- ## JS Commands
-
- def show(js \\ %JS{}, selector) do
- JS.show(js,
- to: selector,
- transition:
- {"transition-all transform ease-out duration-300",
- "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
- "opacity-100 translate-y-0 sm:scale-100"}
- )
- end
-
- def hide(js \\ %JS{}, selector) do
- JS.hide(js,
- to: selector,
- time: 200,
- transition:
- {"transition-all transform ease-in duration-200",
- "opacity-100 translate-y-0 sm:scale-100",
- "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"}
- )
- end
-
- def show_modal(js \\ %JS{}, id) when is_binary(id) do
- js
- |> JS.show(to: "##{id}")
- |> JS.show(
- to: "##{id}-bg",
- transition: {"transition-all transform ease-out duration-300", "opacity-0", "opacity-100"}
- )
- |> show("##{id}-container")
- |> JS.add_class("overflow-hidden", to: "body")
- |> JS.focus_first(to: "##{id}-content")
- end
-
- def hide_modal(js \\ %JS{}, id) do
- js
- |> JS.hide(
- to: "##{id}-bg",
- transition: {"transition-all transform ease-in duration-200", "opacity-100", "opacity-0"}
- )
- |> hide("##{id}-container")
- |> JS.hide(to: "##{id}", transition: {"block", "block", "hidden"})
- |> JS.remove_class("overflow-hidden", to: "body")
- |> JS.pop_focus()
- end
-
- @doc """
- Translates an error message using gettext.
- """
- def translate_error({msg, opts}) do
- # When using gettext, we typically pass the strings we want
- # to translate as a static argument:
- #
- # # Translate the number of files with plural rules
- # dngettext("errors", "1 file", "%{count} files", count)
- #
- # However the error messages in our forms and APIs are generated
- # dynamically, so we need to translate them by calling Gettext
- # with our gettext backend as first argument. Translations are
- # available in the errors.po file (as we use the "errors" domain).
- if count = opts[:count] do
- Gettext.dngettext(PlingWeb.Gettext, "errors", msg, msg, count, opts)
- else
- Gettext.dgettext(PlingWeb.Gettext, "errors", msg, opts)
- end
- end
-
- @doc """
- Translates the errors for a field from a keyword list of errors.
- """
- def translate_errors(errors, field) when is_list(errors) do
- for {^field, {msg, opts}} <- errors, do: translate_error({msg, opts})
- end
-end
diff --git a/lib/pling_web/components/helpers.ex b/lib/pling_web/components/helpers.ex
deleted file mode 100644
index ddd40c5..0000000
--- a/lib/pling_web/components/helpers.ex
+++ /dev/null
@@ -1,343 +0,0 @@
-defmodule PlingWeb.ComponentHelpers do
- @moduledoc false
- use Phoenix.Component
-
- import Phoenix.Component
-
- @doc """
- Prepare input assigns for use in a form. Extract required attribute from the Form.Field struct and update current assigns.
- """
- def prepare_assign(%{field: %Phoenix.HTML.FormField{} = field} = assigns) do
- assigns
- |> assign(field: nil, id: assigns[:id] || field.id)
- |> assign(:errors, Enum.map(field.errors, &translate_error(&1)))
- |> assign(:name, assigns[:name] || if(assigns[:multiple], do: field.name <> "[]", else: field.name))
- |> assign(:value, assigns[:value] || field.value)
- |> prepare_assign()
- end
-
- # use default value if value is not provided or empty
- def prepare_assign(assigns) do
- value =
- if assigns[:value] in [nil, "", []] do
- assigns[:"default-value"]
- else
- assigns[:value]
- end
-
- assign(assigns, value: value)
- end
-
- # normalize_integer
- def normalize_integer(value) when is_integer(value), do: value
-
- def normalize_integer(value) when is_binary(value) do
- case Integer.parse(value) do
- {integer, _} -> integer
- _ -> nil
- end
- end
-
- def normalize_integer(_), do: nil
-
- def normalize_boolean(value) do
- case value do
- "true" -> true
- "false" -> false
- true -> true
- false -> false
- _ -> false
- end
- end
-
- @doc """
- Normalize id to be used in HTML id attribute
- It will replace all non-alphanumeric characters with `-` and downcase the string
- """
- def id(id) do
- id
- |> String.replace(~r/[^a-zA-Z0-9]/, "-")
- |> String.downcase()
- end
-
- @doc """
- Variant helper for generating classes based on side and align
- """
- @variants %{
- side: %{
- "top" => "bottom-full mb-2",
- "bottom" => "top-full mt-2",
- "left" => "right-full mr-2",
- "right" => "left-full ml-2"
- },
- align: %{
- "start-horizontal" => "left-0",
- "center-horizontal" => "left-1/2 -translate-x-1/2 slide-in-from-left-1/2",
- "end-horizontal" => "right-0",
- "start-vertical" => "top-0",
- "center-vertical" => "top-1/2 -translate-y-1/2 slide-in-from-top-1/2",
- "end-vertical" => "bottom-0"
- }
- }
-
- @spec side_variant(String.t(), String.t()) :: String.t()
- def side_variant(side, align \\ "center") do
- Enum.map_join(%{side: side, align: align(align, side)}, " ", fn {key, value} -> @variants[key][value] end)
- end
-
- # decide align class based on side
- defp align(align, side) do
- cond do
- side in ["top", "bottom"] ->
- "#{align}-horizontal"
-
- side in ["left", "right"] ->
- "#{align}-vertical"
- end
- end
-
- @variants %{
- variant: %{
- "default" => "bg-primary text-primary-foreground shadow hover:bg-primary/90",
- "destructive" => "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
- "outline" => "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
- "secondary" => "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
- "ghost" => "hover:bg-accent hover:text-accent-foreground",
- "link" => "text-primary underline-offset-4 hover:underline"
- },
- size: %{
- "default" => "h-9 px-4 py-2",
- "sm" => "h-8 rounded-md px-3 text-xs",
- "lg" => "h-10 rounded-md px-8",
- "icon" => "h-9 w-9"
- }
- }
-
- @default_variants %{
- variant: "default",
- size: "default"
- }
-
- @doc """
- Reuseable button variant helper. Support 2 variant
- - size: `default|sm|lg|icon`
- - variant: `default|destructive|outline|secondary|ghost|link`
- """
- def button_variant(props \\ %{}) do
- variants = Map.take(props, ~w(variant size)a)
- variants = Map.merge(@default_variants, variants)
-
- variation_classes = Enum.map_join(variants, " ", fn {key, value} -> @variants[key][value] end)
-
- shared_classes =
- "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-1 disabled:pointer-events-none disabled:opacity-50"
-
- "#{shared_classes} #{variation_classes}"
- end
-
- @doc """
- Common function for building variant
-
- ## Examples
-
- ```elixir
- config =
- %{
- variants: %{
- variant: %{
- default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
- outline:
- "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]",
- },
- size: %{
- default: "h-8 text-sm",
- sm: "h-7 text-xs",
- lg: "h-12 text-sm group-data-[collapsible=icon]:!p-0",
- },
- },
- default_variants: %{
- variant: "default",
- size: "default",
- },
- }
-
- class_input = %{variant: "outline", size: "lg"}
- variant_class(config, class_input)
- ```
-
- """
- def variant_class(config, class_input) do
- variants = Map.get(config, :variants, %{})
- default_variants = Map.get(config, :default_variants, %{})
-
- variants
- |> Map.keys()
- |> Enum.map(fn variant_key ->
- # Get the variant value from input or use default
- variant_value =
- Map.get(class_input, variant_key) ||
- Map.get(default_variants, variant_key)
-
- # Get the variant options map
- variant_options = Map.get(variants, variant_key, %{})
-
- # Get the CSS classes for this variant value
- Map.get(variant_options, String.to_existing_atom(variant_value))
- end)
- |> Enum.reject(&is_nil/1)
- |> Enum.join(" ")
- end
-
- @doc """
- This function build css style string from map of css style
-
- ## Examples
-
- ```elixir
- css_style = %{
- "background-color": "red",
- "color": "white",
- "font-size": "16px",
- }
-
- style(css_style)
-
- # => "background-color: red; color: white; font-size: 16px;"
- ```
- """
- def style(items) when is_list(items) do
- {acc_map, acc_list} =
- Enum.reduce(items, {%{}, []}, fn item, {acc_map, acc_list} ->
- cond do
- is_map(item) ->
- {Map.merge(acc_map, item), acc_list}
-
- is_binary(item) ->
- {acc_map, [item | acc_list]}
-
- true ->
- {acc_map, [item | acc_list]}
- end
- end)
-
- style = Enum.map_join(acc_map, "; ", fn {k, v} -> "#{k}: #{v}" end) <> ";"
- Enum.join([style | acc_list], "; ")
- end
-
- @doc """
- This function build js script to invoke JS stored in given attribute.
- Similar to JS.exec/2 but this function target the nearest ancestor element.
-
- ## Examples
-
- ```heex
-
- Close
-
- ```
- """
- def exec_closest(attribute, ancestor_selector) do
- """
- var el = this.closest("#{ancestor_selector}"); liveSocket.execJS(el, el.getAttribute("#{attribute}"));
- """
- end
-
- @doc """
- This component is used to render dynamic tag based on the `tag` attribute. `tag` attribute can be a string or a function component.
-
- This is just a wrapper around `dynamic_tag` function from Phoenix LiveView which only support string tag.
-
- ## Examples
-
- ```heex
- <.dynamic tag={@tag} class="bg-primary text-primary-foreground">
- Hello World
-
- ```
- """
- def dynamic(%{tag: name} = assigns) when is_function(name, 1) do
- assigns = Map.delete(assigns, :tag)
- name.(assigns)
- end
-
- def dynamic(assigns) do
- name = assigns[:tag] || "div"
-
- assigns =
- assigns
- |> Map.delete(:tag)
- |> assign(:tag_name, name)
- |> assign(:name, name)
-
- dynamic_tag(assigns)
- end
-
- @doc """
- This component mimic behavior of `asChild` attribute from shadcn/ui.
- It works by passing all attribute from `as_child` tag to `tag` function component, add pass `child` attribute to the `as_tag` attribute of the `tag` function component.
-
- The `tag` function component should accept `as_tag` attribute to render the child component.
-
- ## Examples
-
- ```heex
- <.as_child tag={&dropdown_menu_trigger/1} child={&sidebar_menu_button/1} class="bg-primary text-primary-foreground">
- Hello World
-
- ```
-
- Normally this can be archieved by using `dropdown_menu_trigger` component directly but this will fire copile warning.
-
- ```heex
- <.dropdown_menu_trigger as_tag={&sidebar_menu_button/1} class="bg-primary text-primary-foreground">
- Hello World
-
- """
- def as_child(%{tag: tag, child: child_tag} = assigns) when is_function(tag, 1) do
- assigns
- |> Map.drop([:tag, :child])
- |> assign(:as_tag, child_tag)
- |> tag.()
- end
-
- # Translate error message
- # borrowed from https://github.com/petalframework/petal_components/blob/main/lib/petal_components/field.ex#L414
- defp translate_error({msg, opts}) do
- config_translator = get_translator_from_config() || (&fallback_translate_error/1)
-
- config_translator.({msg, opts})
- end
-
- defp fallback_translate_error({msg, opts}) do
- Enum.reduce(opts, msg, fn {key, value}, acc ->
- try do
- String.replace(acc, "%{#{key}}", to_string(value))
- rescue
- e ->
- IO.warn(
- """
- the fallback message translator for the form_field_error function cannot handle the given value.
-
- Hint: you can set up the `error_translator_function` to route all errors to your application helpers:
-
- config :salad_ui, :error_translator_function, {MyAppWeb.CoreComponents, :translate_error}
-
- Given value: #{inspect(value)}
-
- Exception: #{Exception.message(e)}
- """,
- __STACKTRACE__
- )
-
- "invalid value"
- end
- end)
- end
-
- defp get_translator_from_config do
- case Application.get_env(:salad_ui, :error_translator_function) do
- {module, function} -> &apply(module, function, [&1])
- nil -> nil
- end
- end
-end
diff --git a/lib/pling_web/components/layouts.ex b/lib/pling_web/components/layouts.ex
deleted file mode 100644
index 048964b..0000000
--- a/lib/pling_web/components/layouts.ex
+++ /dev/null
@@ -1,5 +0,0 @@
-defmodule PlingWeb.Layouts do
- use PlingWeb, :html
-
- embed_templates "layouts/*"
-end
diff --git a/lib/pling_web/components/layouts/app.html.heex b/lib/pling_web/components/layouts/app.html.heex
deleted file mode 100644
index b66a6ec..0000000
--- a/lib/pling_web/components/layouts/app.html.heex
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
- <.flash_group flash={@flash} />
- {@inner_content}
-
-
diff --git a/lib/pling_web/components/layouts/root.html.heex b/lib/pling_web/components/layouts/root.html.heex
deleted file mode 100644
index a222cf3..0000000
--- a/lib/pling_web/components/layouts/root.html.heex
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
-
-
-
- <.live_title suffix="">
- {assigns[:page_title] || gettext("Pling")}
-
-
-
-
-
-
-
- {@inner_content}
-
-
-
-
-
-
diff --git a/lib/pling_web/controllers/error_html.ex b/lib/pling_web/controllers/error_html.ex
deleted file mode 100644
index e48858a..0000000
--- a/lib/pling_web/controllers/error_html.ex
+++ /dev/null
@@ -1,19 +0,0 @@
-defmodule PlingWeb.ErrorHTML do
- use PlingWeb, :html
-
- # If you want to customize your error pages,
- # uncomment the embed_templates/1 call below
- # and add pages to the error directory:
- #
- # * lib/pling_web/controllers/error_html/404.html.heex
- # * lib/pling_web/controllers/error_html/500.html.heex
- #
- # embed_templates "error_html/*"
-
- # The default is to render a plain text page based on
- # the template name. For example, "404.html" becomes
- # "Not Found".
- def render(template, _assigns) do
- Phoenix.Controller.status_message_from_template(template)
- end
-end
diff --git a/lib/pling_web/controllers/error_json.ex b/lib/pling_web/controllers/error_json.ex
deleted file mode 100644
index 5bf21bc..0000000
--- a/lib/pling_web/controllers/error_json.ex
+++ /dev/null
@@ -1,15 +0,0 @@
-defmodule PlingWeb.ErrorJSON do
- # If you want to customize a particular status code,
- # you may add your own clauses, such as:
- #
- # def render("500.json", _assigns) do
- # %{errors: %{detail: "Internal Server Error"}}
- # end
-
- # By default, Phoenix returns the status message from
- # the template name. For example, "404.json" becomes
- # "Not Found".
- def render(template, _assigns) do
- %{errors: %{detail: Phoenix.Controller.status_message_from_template(template)}}
- end
-end
diff --git a/lib/pling_web/controllers/login_controller.ex b/lib/pling_web/controllers/login_controller.ex
deleted file mode 100644
index fb2b3f8..0000000
--- a/lib/pling_web/controllers/login_controller.ex
+++ /dev/null
@@ -1,25 +0,0 @@
-defmodule PlingWeb.LoginController do
- use PlingWeb, :controller
- alias Pling.Services.NamesService
-
- def login(conn, _params) do
- conn =
- case get_session(conn, :user_id) do
- nil ->
- conn
- |> put_session(:user_id, NamesService.generate())
- |> configure_session(renew: true)
-
- _existing_user ->
- conn
- end
-
- redirect(conn, to: "/")
- end
-
- def logout(conn, _params) do
- conn
- |> clear_session()
- |> redirect(to: "/login")
- end
-end
diff --git a/lib/pling_web/controllers/page_html.ex b/lib/pling_web/controllers/page_html.ex
deleted file mode 100644
index eb87138..0000000
--- a/lib/pling_web/controllers/page_html.ex
+++ /dev/null
@@ -1,5 +0,0 @@
-defmodule PlingWeb.PageHTML do
- use PlingWeb, :html
-
- embed_templates "page_html/*"
-end
diff --git a/lib/pling_web/endpoint.ex b/lib/pling_web/endpoint.ex
deleted file mode 100644
index c52bbad..0000000
--- a/lib/pling_web/endpoint.ex
+++ /dev/null
@@ -1,55 +0,0 @@
-defmodule PlingWeb.Endpoint do
- use Phoenix.Endpoint, otp_app: :pling
-
- # The session will be stored in the cookie and signed,
- # this means its contents can be read but not tampered with.
- # Set :encryption_salt if you would also like to encrypt it.
- @session_options [
- store: :cookie,
- key: "_pling_key",
- signing_salt: "iS3qrDZ9",
- same_site: "Lax"
- ]
-
- socket "/live", Phoenix.LiveView.Socket,
- websocket: [connect_info: [session: @session_options]],
- longpoll: [connect_info: [session: @session_options]]
-
- # Serve at "/" the static files from "priv/static" directory.
- #
- # You should set gzip to true if you are running phx.digest
- # when deploying your static files in production.
- plug Plug.Static,
- at: "/",
- from: :pling,
- gzip: false,
- only: PlingWeb.static_paths()
-
- # plug PhoenixAnalytics.Plugs.RequestTracker
-
- # Code reloading can be explicitly enabled under the
- # :code_reloader configuration of your endpoint.
- if code_reloading? do
- socket "/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket
- plug Phoenix.LiveReloader
- plug Phoenix.CodeReloader
- plug Phoenix.Ecto.CheckRepoStatus, otp_app: :pling
- end
-
- plug Phoenix.LiveDashboard.RequestLogger,
- param_key: "request_logger",
- cookie_key: "request_logger"
-
- plug Plug.RequestId
- plug Plug.Telemetry, event_prefix: [:phoenix, :endpoint]
-
- plug Plug.Parsers,
- parsers: [:urlencoded, :multipart, :json],
- pass: ["*/*"],
- json_decoder: Phoenix.json_library()
-
- plug Plug.MethodOverride
- plug Plug.Head
- plug Plug.Session, @session_options
- plug PlingWeb.Router
-end
diff --git a/lib/pling_web/gettext.ex b/lib/pling_web/gettext.ex
deleted file mode 100644
index 49e7049..0000000
--- a/lib/pling_web/gettext.ex
+++ /dev/null
@@ -1,24 +0,0 @@
-defmodule PlingWeb.Gettext do
- @moduledoc """
- A module providing Internationalization with a gettext-based API.
-
- By using [Gettext](https://hexdocs.pm/gettext),
- your module gains a set of macros for translations, for example:
-
- import PlingWeb.Gettext
-
- # Simple translation
- gettext("Here is the string to translate")
-
- # Plural translation
- ngettext("Here is the string to translate",
- "Here are the strings to translate",
- 3)
-
- # Domain-based translation
- dgettext("errors", "Here is the error message to translate")
-
- See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage.
- """
- use Gettext.Backend, otp_app: :pling
-end
diff --git a/lib/pling_web/live/home_live.ex b/lib/pling_web/live/home_live.ex
deleted file mode 100644
index 7bd558c..0000000
--- a/lib/pling_web/live/home_live.ex
+++ /dev/null
@@ -1,31 +0,0 @@
-defmodule PlingWeb.HomeLive do
- use PlingWeb, :live_view
- require Logger
- alias Pling.Services.NamesService
-
- @impl true
- def mount(_params, _session, socket) do
- {:ok, assign(socket, show_rules_modal: false)}
- end
-
- @impl true
- def handle_event("create_room", %{"game_mode" => game_mode}, socket) do
- room_code = generate_room_code()
- {:noreply, push_navigate(socket, to: ~p"/#{game_mode}/#{room_code}")}
- end
-
- @impl true
- def handle_event("join_room", %{"room_code" => room_code}, socket) do
- upper_room_code = String.upcase(room_code)
- Logger.info("Joining room: #{upper_room_code}")
- {:noreply, push_navigate(socket, to: ~p"/vs/#{upper_room_code}")}
- end
-
- defp generate_room_code do
- noun1 = NamesService.random_noun()
- noun2 = NamesService.random_noun()
-
- (noun1 <> noun2)
- |> String.upcase()
- end
-end
diff --git a/lib/pling_web/live/home_live.html.heex b/lib/pling_web/live/home_live.html.heex
deleted file mode 100644
index bd67698..0000000
--- a/lib/pling_web/live/home_live.html.heex
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
- <.header>
- {gettext("Welcome to Pling")}
- <:subtitle>{gettext("A real-time music game")}
-
-
-
-
- <.button phx-click={JS.push("create_room", value: %{game_mode: "vs"})} class="w-full">
- {gettext("Create Versus Room")}
-
- <.button phx-click={JS.push("create_room", value: %{game_mode: "ffa"})} class="w-full">
- {gettext("Create Free-for-All Room (beta)")}
-
-
-
-
-
- <.simple_form for={%{}} phx-submit="join_room" class="space-y-4">
- <.input
- type="text"
- label={gettext("Enter a room code")}
- name="room_code"
- value=""
- required
- class="uppercase"
- />
- <.button class="w-full">{gettext("Join Room")}
-
-
-
- <.button phx-click={show_modal("rules-modal")}>
- {gettext("How to Play")}
-
-
-
-
-
-
-<.modal id="rules-modal" show={@show_rules_modal}>
- <.header>
- {gettext("How to Play Pling")}
- <:subtitle>{gettext("Game Rules and Instructions")}
-
-
-
-
{gettext("Versus Mode")}
-
- {gettext(
- "In Versus mode, two teams compete to identify songs faster than their opponents. Each correct guess earns points for your team. The team with the most points at the end wins!"
- )}
-
-
-
{gettext("Free-for-All Mode (Beta)")}
-
- {gettext(
- "In Free-for-All mode, every player plays individually. Be the first to identify the song to earn points. The player with the most points at the end of the game wins!"
- )}
-
-
-
{gettext("How to Play")}
-
- {gettext("Create a room or join an existing one with a room code")}
- {gettext("Share the room code with your friends")}
- {gettext("Listen to the song clips and type your guesses")}
- {gettext("Score points by being the first to correctly identify songs")}
-
-
-
diff --git a/lib/pling_web/live/room_live.ex b/lib/pling_web/live/room_live.ex
deleted file mode 100644
index a2c232d..0000000
--- a/lib/pling_web/live/room_live.ex
+++ /dev/null
@@ -1,512 +0,0 @@
-defmodule PlingWeb.RoomLive do
- use PlingWeb, :live_view
- alias Phoenix.LiveView.JS
- alias Pling.Rooms
- alias Pling.Rooms.Presence
- require Logger
-
- @playlist_id_length 22
-
- @impl true
- def mount(
- %{"room_code" => room_code, "game_mode" => game_mode} = params,
- %{"user_id" => user_id},
- socket
- ) do
- socket = init_assigns(socket, room_code, game_mode, user_id)
-
- if connected?(socket) do
- Logger.debug("LiveView connected for room: #{room_code}")
-
- {:ok, state} =
- case params do
- %{"playlist_id" => playlist_id} when not is_nil(playlist_id) ->
- handle_playlist_join(room_code, user_id, game_mode, playlist_id)
-
- %{"list" => playlist_id} when not is_nil(playlist_id) ->
- handle_playlist_join(room_code, user_id, game_mode, playlist_id)
-
- _ ->
- Rooms.join_room(room_code, user_id, self(), game_mode)
- end
-
- {users, leader?} = Presence.initialize_presence(room_code, user_id)
- PlingWeb.Endpoint.subscribe("room:#{room_code}")
-
- {:ok,
- socket
- |> assign(users: users, leader?: leader?)
- |> assign(state)
- |> maybe_load_track(state.selection.track)}
- else
- Logger.debug("LiveView initial render for room: #{room_code}")
- {:ok, init_assigns(socket, room_code, game_mode, user_id)}
- end
- end
-
- @impl true
- def mount(_params, _session, socket) do
- {:ok, redirect(socket, to: ~p"/login")}
- end
-
- defp init_assigns(socket, room_code, game_mode, user_id) do
- assign(socket,
- room_code: room_code,
- user_id: user_id,
- show_playlist_modal: false,
- game_mode: game_mode,
- current_track: nil,
- leader?: false,
- users: [],
- selection: %{playlist: nil, track: nil},
- playlists: nil,
- playing?: false,
- countdown: nil,
- timer_threshold: 10,
- scores: %{},
- recent_plings: []
- )
- end
-
- # ------------------------------------------------------------------
- # Presence diff
- # ------------------------------------------------------------------
- @impl true
- def handle_info(%{event: "presence_diff"}, socket) do
- {users, leader?} = Presence.update_presence(socket.assigns.room_code, socket.assigns.user_id)
- {:noreply, assign(socket, users: users, leader?: leader?)}
- end
-
- # ------------------------------------------------------------------
- # State and ephemeral(events(from(server)))
- # ------------------------------------------------------------------
- @impl true
- def handle_info(%{event: "state_update", payload: %{state: new_state}}, socket) do
- socket = assign(socket, new_state)
- {:noreply, maybe_load_track(socket, new_state.selection.track)}
- end
-
- @impl true
- def handle_info(%{event: "ring_bell"}, socket) do
- {:noreply, push_event(socket, "ring_bell", %{})}
- end
-
- @impl true
- def handle_info(%{event: "spotify:play"}, socket) do
- {:noreply, push_event(socket, "spotify:play", %{})}
- end
-
- @impl true
- def handle_info(%{event: "spotify:pause"}, socket) do
- {:noreply, push_event(socket, "spotify:pause", %{})}
- end
-
- # ------------------------------------------------------------------
- # UI Events -> Server Calls
- # ------------------------------------------------------------------
- @impl true
- def handle_event("counter:increment", %{"counter_id" => counter_id}, socket) do
- Rooms.update_score(socket.assigns.room_code, counter_id, 1)
- {:noreply, socket}
- end
-
- @impl true
- def handle_event("counter:decrement", %{"counter_id" => counter_id}, socket) do
- Rooms.update_score(socket.assigns.room_code, counter_id, -1)
- {:noreply, socket}
- end
-
- @impl true
- def handle_event("set_playlist", %{"playlist_id" => playlist_id}, socket) do
- cleaned_playlist_id = extract_playlist_id(playlist_id)
-
- {:noreply,
- socket
- |> assign(show_playlist_modal: false)
- |> push_patch(
- to:
- ~p"/#{socket.assigns.game_mode}/#{socket.assigns.room_code}?list=#{cleaned_playlist_id}"
- )}
- end
-
- @impl true
- def handle_event("toggle_play", _params, %{assigns: %{leader?: false}} = socket) do
- {:noreply, socket}
- end
-
- @impl true
- def handle_event("toggle_play", _params, socket) do
- current_state = Rooms.get_state(socket.assigns.room_code)
-
- if current_state.playing? do
- Rooms.pause(socket.assigns.room_code)
- else
- Rooms.play(socket.assigns.room_code)
- end
-
- {:noreply, socket}
- end
-
- @impl true
- def handle_event("update_track", _params, %{assigns: %{leader?: false}} = socket) do
- {:noreply, socket}
- end
-
- @impl true
- def handle_event("update_track", _params, socket) do
- Rooms.update_track(socket.assigns.room_code)
- {:noreply, socket}
- end
-
- # ------------------------------------------------------------------
- # Private Functions
- # ------------------------------------------------------------------
- defp maybe_load_track(%{assigns: %{leader?: true}} = socket, track) do
- if track != socket.assigns.current_track do
- socket
- |> assign(:current_track, track)
- |> push_event("spotify:load_track", %{track: track})
- else
- socket
- end
- end
-
- defp maybe_load_track(socket, _track), do: socket
-
- # ------------------------------------------------------------------
- # Components
- # ------------------------------------------------------------------
- def room_info(assigns) do
- ~H"""
-
-
- <.user_list users={@users} user_id={@user_id} room_code={@room_code} />
-
-
- <.playlist_info selection={@selection} playlists={@playlists} />
-
- """
- end
-
- defp playlist_info(%{selection: selection} = assigns) do
- playlist_name =
- if selection.playlist do
- selection.playlist.name || gettext("Unknown Playlist")
- else
- nil
- end
-
- assigns = assign(assigns, :playlist_name, playlist_name)
-
- ~H"""
-
- {gettext("and listening to")}
- <%= if @playlist_name do %>
- {@playlist_name}
- <% end %>
-
- """
- end
-
- defp user_list(%{users: []} = assigns) do
- ~H"""
- {gettext("Waiting for users...")}
- """
- end
-
- defp user_list(%{users: [single_user], user_id: user_id, room_code: room_code} = assigns) do
- assigns =
- assigns
- |> assign(:is_current_user?, single_user.user_id == user_id)
- |> assign(:single_user, single_user)
- |> assign(:room_code, room_code)
-
- ~H"""
-
- {@single_user.user_id}
-
- {gettext("is in")}
- {@room_code}
- """
- end
-
- defp user_list(%{users: users, user_id: user_id} = assigns) do
- users_with_current =
- Enum.map(users, fn user ->
- %{user: user, is_current?: user.user_id == user_id}
- end)
-
- [first_user_with_current | other_users_with_current] = users_with_current
-
- assigns =
- assigns
- |> assign(:first_user_with_current, first_user_with_current)
- |> assign(:other_users_with_current, other_users_with_current)
-
- ~H"""
-
- {@first_user_with_current.user.user_id}
-
- {gettext("is joined by")}
- <%= for {user_with_current, index} <- Enum.with_index(@other_users_with_current) do %>
-
- {user_with_current.user.user_id}
-
- {if index < length(@other_users_with_current) - 1, do: ", "}
- <% end %>
- {gettext("is in")}
- {@room_code} {gettext("room")}
- """
- end
-
- def pling_button(assigns) do
- assigns = assign(assigns, :disabled?, !assigns.playing? && !assigns.leader?)
-
- ~H"""
-
-
-
- <%= cond do %>
- <%!-- if we are counting down from --%>
- <% @countdown && @countdown <= @timer_threshold -> %>
- {@countdown}
- <%!-- Otherwise, we are playing --%>
- <% @playing? -> %>
- {gettext("PLING")}
- <%!-- If we're not, leader will see Play --%>
- <% @leader? -> %>
- {gettext("PLAY")}
- <%!-- Everyone else gets Pling --%>
- <% true -> %>
- {gettext("PLING")}
- <% end %>
-
-
-
-
-
-
-
-
-
- """
- end
-
- def render_scores(assigns) do
- ~H"""
-
-
-
{gettext("Scores")}
- <%= if @leader? && length(@recent_plings) > 0 do %>
- <.button phx-click="clear_plings">
- {gettext("Clear Recent")}
-
- <% end %>
-
-
-
- <%= for user <- @users do %>
-
-
- {user.user_id}
-
-
-
- {Map.get(@scores, user.user_id, 0)}
-
- <%= if @leader? do %>
-
- <.button phx-click="counter:decrement" phx-value-counter_id={user.user_id}>
- -1
-
- <.button phx-click="counter:increment" phx-value-counter_id={user.user_id}>
- +1
-
-
- <% end %>
-
-
- <% end %>
-
-
- """
- end
-
- defp counter_button(assigns) do
- {edge_class, bg_class} =
- case assigns.counter_id do
- "blue" -> {"bg-blue-800", "bg-gradient-to-b from-blue-500 to-blue-600"}
- "red" -> {"bg-red-800", "bg-gradient-to-b from-red-500 to-red-600"}
- _ -> {"bg-slate-800", "bg-gradient-to-b from-slate-500 to-slate-600"}
- end
-
- count_value = Map.get(assigns.scores || %{}, assigns.counter_id, 0)
-
- assigns =
- assign(assigns,
- edge_class: edge_class,
- bg_class: bg_class,
- count: count_value
- )
-
- ~H"""
-
-
-
-
-
- {@count}
-
-
-
-
-
-
- -
-
-
-
- """
- end
-
- defp playlist_grid(
- %{
- selection: selection,
- playlists: playlists
- } = assigns
- ) do
- playlists_with_active =
- if playlists do
- playlists
- |> Map.values()
- |> Enum.filter(& &1.official)
- |> Enum.map(fn playlist ->
- Map.put(playlist, :active?, selection.playlist.spotify_id == playlist.spotify_id)
- end)
- else
- []
- end
-
- assigns = assign(assigns, :playlists_with_active, playlists_with_active)
-
- ~H"""
- <.modal id="playlist-modal" show={@show_playlist_modal}>
- <.header>
- {gettext("Select a Playlist")}
-
-
-
-
- <%= for playlist <- @playlists_with_active do %>
- <.playlist id={playlist.spotify_id} name={playlist.name} active?={playlist.active?} />
- <% end %>
-
-
-
- {gettext("Or use your own playlist:")}
-
-
-
-
- """
- end
-
- def playlist(assigns) do
- active? = assigns[:active?]
-
- active_class =
- if active?, do: "bg-red-600 text-red-50", else: "bg-red-50 text-red-900"
-
- assigns = assign(assigns, :active_class, active_class)
-
- ~H"""
- @active_class}
- phx-click="set_playlist"
- phx-value-playlist_id={@id}
- >
- {@name}
-
- """
- end
-
- defp handle_playlist_join(room_code, user_id, game_mode, playlist_id) do
- cleaned_playlist_id = extract_playlist_id(playlist_id)
-
- case Pling.Playlists.MusicLibrary.get_or_fetch_playlist(cleaned_playlist_id) do
- {:ok, :first_track_saved, playlist} ->
- {:ok, _state} = Rooms.join_room(room_code, user_id, self(), game_mode, playlist)
- {:ok, state} = Rooms.set_playlist(room_code, cleaned_playlist_id)
- state
-
- {:ok, _, playlist} ->
- Rooms.join_room(room_code, user_id, self(), game_mode, playlist)
-
- {:error, reason} ->
- Logger.error("Failed to load playlist in UI: #{inspect(reason)}")
- Rooms.join_room(room_code, user_id, self(), game_mode)
- end
- end
-
- defp extract_playlist_id("https://open.spotify.com/playlist/" <> potential_id) do
- potential_id = String.slice(potential_id, 0, @playlist_id_length)
- validate_playlist_id(potential_id)
- end
-
- defp extract_playlist_id(potential_id) when is_binary(potential_id) do
- validate_playlist_id(potential_id)
- end
-
- defp extract_playlist_id(_), do: nil
-
- # IDs are 22 chars
- defp validate_playlist_id(id) do
- if byte_size(id) == @playlist_id_length and id =~ ~r/^[a-zA-Z0-9]{#{@playlist_id_length}}$/ do
- id
- else
- nil
- end
- end
-
- @impl true
- def handle_params(%{"list" => playlist_id}, _uri, socket) do
- cleaned_playlist_id = extract_playlist_id(playlist_id)
-
- if cleaned_playlist_id do
- Rooms.set_playlist(socket.assigns.room_code, cleaned_playlist_id)
- end
-
- {:noreply, socket}
- end
-
- # Fallback for when there's no list parameter
- @impl true
- def handle_params(_params, _uri, socket) do
- {:noreply, socket}
- end
-end
diff --git a/lib/pling_web/live/room_live.html.heex b/lib/pling_web/live/room_live.html.heex
deleted file mode 100644
index d95e827..0000000
--- a/lib/pling_web/live/room_live.html.heex
+++ /dev/null
@@ -1,53 +0,0 @@
-<%!--
- <%= inspect(Map.take(assigns, [:room_code, :user_id, :users, :playing?, :countdown, :timer_threshold, :leader?, :show_playlist, :selection, :game_mode, :scores]), pretty: true) %>
- --%>
-
- <.room_info
- room_code={@room_code}
- users={@users}
- user_id={@user_id}
- selection={@selection}
- playlists={@playlists}
- />
- <.pling_button
- playing?={@playing?}
- countdown={@countdown}
- timer_threshold={@timer_threshold}
- leader?={@leader?}
- />
- <%= if @leader? do %>
- <.button phx-click="update_track" class="ml-auto" disabled={@playing?}>
- {gettext("Next Track")}
-
- <% end %>
-
-
- <%= if @game_mode == "vs" do %>
- <.counter_button counter_id="red" scores={@scores} />
-
- <.icon
- :if={!@playing?}
- name="hero-chevron-double-up-solid"
- class="h-16 w-16 text-zinc-700"
- />
-
- {gettext("swipe to see song")}
-
-
- <.counter_button counter_id="blue" scores={@scores} />
- <% else %>
- <.render_scores {assigns} />
- <% end %>
- <.button phx-click={show_modal("playlist-modal")} class="col-span-3 text-sm font-semibold">
- {gettext("show playlists")}
-
-
-
-
-<.playlist_grid
- selection={@selection}
- playlists={@playlists}
- show_playlist_modal={@show_playlist_modal}
- game_mode={@game_mode}
- room_code={@room_code}
-/>
diff --git a/lib/pling_web/router.ex b/lib/pling_web/router.ex
deleted file mode 100644
index 5878427..0000000
--- a/lib/pling_web/router.ex
+++ /dev/null
@@ -1,85 +0,0 @@
-defmodule PlingWeb.Router do
- use PlingWeb, :router
- import Phoenix.LiveView.Router
-
- import Plug.BasicAuth
-
- pipeline :browser do
- plug :accepts, ["html"]
- plug :fetch_session
- plug :fetch_live_flash
- plug :put_root_layout, html: {PlingWeb.Layouts, :root}
- plug :protect_from_forgery
- plug :put_secure_browser_headers
- plug :upcase_room_code
- end
-
- pipeline :api do
- plug :accepts, ["json"]
- end
-
- pipeline :dashboard_auth do
- plug :basic_auth, username: "blur", password: "thenarcissist"
- end
-
- scope "/", PlingWeb do
- pipe_through [:browser, :dashboard_auth]
- end
-
- scope "/", PlingWeb do
- pipe_through :browser
-
- get "/login", LoginController, :login
- get "/logout", LoginController, :logout
-
- pipe_through :require_login
- live "/", HomeLive
- live "/:game_mode/:room_code", RoomLive
- end
-
- pipeline :require_login do
- plug :ensure_authenticated
- end
-
- defp ensure_authenticated(conn, _opts) do
- if get_session(conn, :user_id) do
- conn
- else
- conn
- |> redirect(to: "/login")
- |> halt()
- end
- end
-
- defp upcase_room_code(conn, _opts) do
- case conn.path_params do
- %{"room_code" => room_code} = params ->
- %{conn | path_params: %{params | "room_code" => String.upcase(room_code)}}
-
- _ ->
- conn
- end
- end
-
- # Other scopes may use custom stacks.
- # scope "/api", PlingWeb do
- # pipe_through :api
- # end
-
- # Enable LiveDashboard and Swoosh mailbox preview in development
- if Application.compile_env(:pling, :dev_routes) do
- # If you want to use the LiveDashboard in production, you should put
- # it behind authentication and allow only admins to access it.
- # If your application does not have an admins-only section yet,
- # you can use Plug.BasicAuth to set up some basic authentication
- # as long as you are also using SSL (which you should anyway).
- import Phoenix.LiveDashboard.Router
-
- scope "/dev" do
- pipe_through :browser
-
- live_dashboard "/dashboard", metrics: PlingWeb.Telemetry
- forward "/mailbox", Plug.Swoosh.MailboxPreview
- end
- end
-end
diff --git a/lib/pling_web/telemetry.ex b/lib/pling_web/telemetry.ex
deleted file mode 100644
index 4c3d0c0..0000000
--- a/lib/pling_web/telemetry.ex
+++ /dev/null
@@ -1,92 +0,0 @@
-defmodule PlingWeb.Telemetry do
- use Supervisor
- import Telemetry.Metrics
-
- def start_link(arg) do
- Supervisor.start_link(__MODULE__, arg, name: __MODULE__)
- end
-
- @impl true
- def init(_arg) do
- children = [
- # Telemetry poller will execute the given period measurements
- # every 10_000ms. Learn more here: https://hexdocs.pm/telemetry_metrics
- {:telemetry_poller, measurements: periodic_measurements(), period: 10_000}
- # Add reporters as children of your supervision tree.
- # {Telemetry.Metrics.ConsoleReporter, metrics: metrics()}
- ]
-
- Supervisor.init(children, strategy: :one_for_one)
- end
-
- def metrics do
- [
- # Phoenix Metrics
- summary("phoenix.endpoint.start.system_time",
- unit: {:native, :millisecond}
- ),
- summary("phoenix.endpoint.stop.duration",
- unit: {:native, :millisecond}
- ),
- summary("phoenix.router_dispatch.start.system_time",
- tags: [:route],
- unit: {:native, :millisecond}
- ),
- summary("phoenix.router_dispatch.exception.duration",
- tags: [:route],
- unit: {:native, :millisecond}
- ),
- summary("phoenix.router_dispatch.stop.duration",
- tags: [:route],
- unit: {:native, :millisecond}
- ),
- summary("phoenix.socket_connected.duration",
- unit: {:native, :millisecond}
- ),
- summary("phoenix.channel_joined.duration",
- unit: {:native, :millisecond}
- ),
- summary("phoenix.channel_handled_in.duration",
- tags: [:event],
- unit: {:native, :millisecond}
- ),
-
- # Database Metrics
- summary("pling.repo.query.total_time",
- unit: {:native, :millisecond},
- description: "The sum of the other measurements"
- ),
- summary("pling.repo.query.decode_time",
- unit: {:native, :millisecond},
- description: "The time spent decoding the data received from the database"
- ),
- summary("pling.repo.query.query_time",
- unit: {:native, :millisecond},
- description: "The time spent executing the query"
- ),
- summary("pling.repo.query.queue_time",
- unit: {:native, :millisecond},
- description: "The time spent waiting for a database connection"
- ),
- summary("pling.repo.query.idle_time",
- unit: {:native, :millisecond},
- description:
- "The time the connection spent waiting before being checked out for the query"
- ),
-
- # VM Metrics
- summary("vm.memory.total", unit: {:byte, :kilobyte}),
- summary("vm.total_run_queue_lengths.total"),
- summary("vm.total_run_queue_lengths.cpu"),
- summary("vm.total_run_queue_lengths.io")
- ]
- end
-
- defp periodic_measurements do
- [
- # A module, function and arguments to be invoked periodically.
- # This function must call :telemetry.execute/3 and a metric must be added above.
- # {PlingWeb, :count_users, []}
- ]
- end
-end
diff --git a/makefile b/makefile
deleted file mode 100644
index acdeebc..0000000
--- a/makefile
+++ /dev/null
@@ -1,56 +0,0 @@
-.PHONY: all dev note
-
-
-dev:
- @mix phx.server
-
-
-release:
- @fly deploy
-
-# https://hexdocs.pm/phoenix_analytics/readme.html#installation
-init_analytics:
- @iex -S mix PhoenixAnalytics.Migration.up()
-
-clean:
- @mix clean
- @rm analytics.db
- @rm analytics.db.wal
-
-prod:
- @MIX_ENV=prod mix phx.server
-
-seed:
- @mix run priv/repo/seeds.exs
-
-reset_db:
- @mix ecto.reset
-
-test:
- @mix test
-
-test.watch:
- @mix test.watch
-
-
-# ops commands for prod. should be automated.
-# some of this toruble is due to db lock conflicts with duckdb
-prod_seed:
- fly ssh console -C "\
- /app/bin/pling eval 'Application.ensure_all_started(:pling)' && \
- /app/bin/pling eval 'Code.eval_file(\"/app/lib/pling-0.1.0/priv/repo/seeds.exs\")'"
-
-prod_migrate:
- fly ssh console -C "\
- /app/bin/pling eval 'Application.load(:pling)' && \
- /app/bin/pling eval 'Pling.Release.migrate()'"
-
-prod_reset:
- fly ssh console -C "\
- rm -f /data/pling.db* && \
- /app/bin/pling eval 'Pling.Release.migrate()' && \
- /app/bin/pling eval 'Application.load(:pling)' && \
- /app/bin/pling eval 'Application.put_env(:pling, :server, true)' && \
- /app/bin/pling eval 'Application.ensure_all_started(:pling)' && \
- /app/bin/pling eval ':timer.sleep(2000)' && \
- /app/bin/pling eval 'Code.eval_file(\"/app/lib/pling-0.1.0/priv/repo/seeds.exs\")'"
\ No newline at end of file
diff --git a/messages/en.json b/messages/en.json
new file mode 100644
index 0000000..bb93498
--- /dev/null
+++ b/messages/en.json
@@ -0,0 +1,280 @@
+{
+ "$schema": "https://inlang.com/schema/inlang-message-format",
+ "red": "Red",
+ "blue": "Blue",
+ "someone": "Someone",
+ "close": "Close",
+ "language": "Language",
+ "and": "and",
+ "mode_vs": "Red vs Blue",
+ "mode_ffa": "Free-for-all",
+ "own_music": "Own music",
+ "n_songs": [
+ {
+ "declarations": [
+ "input count",
+ "local countPlural = count: plural"
+ ],
+ "selectors": [
+ "countPlural"
+ ],
+ "match": {
+ "countPlural=one": "{count} song",
+ "countPlural=other": "{count} songs"
+ }
+ }
+ ],
+ "home_tagline": "A music buzzer game for the living room.",
+ "home_new_vs": "New game · Red vs Blue",
+ "home_new_ffa": "New game · Free-for-all",
+ "home_join_label": "Or join a room",
+ "home_code_placeholder": "ROOM CODE",
+ "join": "Join",
+ "how_to_play": "How to play",
+ "rules_1": "The host makes a room. Everyone else joins with the code.",
+ "rules_2": "The host plays each song in Spotify, on a speaker.",
+ "rules_3": "Everyone else buzzes on their phone. First to PLING answers.",
+ "rules_4": "Wrong answer? You're out until the next song.",
+ "rules_vs": "Pick a team, or share one phone with a button per team.",
+ "rules_ffa": "Everyone for themselves.",
+ "rules_own": "Other music app? Pick Own music.",
+ "rules_spotify": "Let everyone pick songs: Music → Spotify.",
+ "joining": "Joining…",
+ "back_home": "Back home",
+ "invite_players": "Invite players",
+ "room": "Room",
+ "invite": "Invite",
+ "music": "Music",
+ "settings": "Settings",
+ "you_are_host": "You're the host",
+ "host_is": "Host: {name}",
+ "nobody": "nobody",
+ "you_are": "You are",
+ "here_count": "{count} here",
+ "reconnecting": "Reconnecting…",
+ "host_left": "The host left.",
+ "host_now": "Host now",
+ "song_of": "Song {number} · {name}",
+ "blend_outdated": "Someone changed their music. Rebuild the blend?",
+ "rebuild": "Rebuild",
+ "only_you_see": "Only you see this",
+ "start_any_app": "Play a song in any app, then start the round.",
+ "start_round": "Start round",
+ "play_in_spotify": "▶ Play in Spotify",
+ "skip_song": "Skip song",
+ "listening": "Listening…",
+ "locked_out_list": "Locked out: {names}",
+ "open_spotify_again": "Back to Spotify",
+ "end_round": "End round",
+ "for_team": "for {team}",
+ "pause_judge": "Pause the music.",
+ "wrong": "✗ Wrong",
+ "correct": "✓ Correct",
+ "point_to": "Point to {name}!",
+ "nobody_got_it": "Nobody got it",
+ "round_ended": "Round ended",
+ "next_song": "Next song",
+ "start_next_round": "Start next round",
+ "show_song": "Show song to players",
+ "fullscreen_enter": "⛶ Full screen",
+ "fullscreen_exit": "Exit full screen",
+ "fullscreen_ios_hint": "iPhone: Share → Add to Home Screen for full screen.",
+ "fullscreen_setting": "Screen",
+ "host_controls": "Host controls",
+ "buzzer": "Buzzer",
+ "which_team": "Which team?",
+ "shared_buzzer": "Shared buzzer",
+ "buzz_for_red": "Pling for Red",
+ "buzz_for_blue": "Pling for Blue",
+ "red_caps": "RED",
+ "blue_caps": "BLUE",
+ "waiting_host": "Waiting for the host…",
+ "locked_out": "Locked out for this song",
+ "know_it": "Know it?",
+ "your_answer": "Your answer!",
+ "buzzed": "{name} buzzed",
+ "you_scored": "You scored! 🎉",
+ "point_to_plain": "Point to {name}",
+ "round_over": "Round over",
+ "the_song_was": "The song was",
+ "add_to_blend": "Add my music",
+ "spotify_link_song": "Spotify song",
+ "name_in_spotify": "Name shows in Spotify.",
+ "from_lists": [
+ {
+ "declarations": [
+ "input count",
+ "local countPlural = count: plural"
+ ],
+ "selectors": [
+ "countPlural"
+ ],
+ "match": {
+ "countPlural=one": "From {names}'s list",
+ "countPlural=other": "From {names}'s lists"
+ }
+ }
+ ],
+ "open_in_spotify": "Open in Spotify",
+ "take_point": "Take a point from {name}",
+ "give_point": "Give a point to {name}",
+ "no_players_yet": "No players yet",
+ "waiting_players": "Waiting for players…",
+ "your_name": "Your name",
+ "save": "Save",
+ "your_team": "Your team",
+ "shared": "Shared",
+ "seconds_to_guess": "Seconds to guess",
+ "seconds_to_answer": "Seconds to answer",
+ "less": "Less: {label}",
+ "more": "More: {label}",
+ "game_mode": "Game mode (resets scores)",
+ "hand_over": "Hand over hosting",
+ "reset_confirm": "Reset all scores to 0?",
+ "reset_scores": "Reset scores",
+ "scan_to_join": "Scan or enter the code.",
+ "copy_link": "Copy link",
+ "copied": "Copied!",
+ "share": "Share",
+ "share_title": "Join my Pling game",
+ "share_spotify": "{name}:",
+ "choose_music": "Choose music",
+ "tab_decks": "Decks",
+ "tab_blend": "Blend",
+ "tab_blend_n": "Blend ({count})",
+ "tab_spotify": "Spotify",
+ "tab_import": "Import",
+ "own_music_desc": "Any app. Pling keeps score.",
+ "now_playing": "Now playing “{name}”.",
+ "play_these": [
+ {
+ "declarations": [
+ "input count",
+ "local countPlural = count: plural"
+ ],
+ "selectors": [
+ "countPlural"
+ ],
+ "match": {
+ "countPlural=one": "Play this {count} song",
+ "countPlural=other": "Play these {count} songs"
+ }
+ }
+ ],
+ "blend_intro": "Everyone adds a playlist under Music. Shared songs come first.",
+ "nobody_added": "Nobody has added music yet.",
+ "overlap": "{shared} of {total} songs shared",
+ "how_many": "How many songs",
+ "common_only": "Only shared songs",
+ "add_my_music": "Add my music",
+ "play_blend": "Play the blend",
+ "kind_of_link": "Kind of link",
+ "link_label": "{name} link",
+ "link_invalid": "Paste a link from Share → Copy link.",
+ "blend_name": "Spotify Blend",
+ "blend_short": "Mixes the taste of up to 10 people.",
+ "blend_how_1": "In Spotify: + → Blend, and invite people.",
+ "blend_how_2": "Open it: ⋯ → Share → Copy link. Paste below.",
+ "blend_join": "Join the Spotify Blend",
+ "blend_host_tip": "Shuffle the Blend. Skip a song in Spotify, then start the round.",
+ "blend_use": "Use this Blend",
+ "blend_open": "▶ Open the Blend in Spotify",
+ "collab_name": "Collaborative playlist",
+ "collab_short": "Everyone adds songs.",
+ "collab_how_1": "In Spotify: make a playlist, tap the add-person icon, copy the link.",
+ "collab_how_2": "Paste it below.",
+ "collab_join": "Add songs to the playlist",
+ "collab_host_tip": "Shuffle the playlist. Skip a song in Spotify, then start the round.",
+ "collab_use": "Use this playlist",
+ "collab_open": "▶ Open the playlist in Spotify",
+ "jam_name": "Spotify Jam",
+ "jam_short": "Live queue for up to 32. Only the host needs Premium.",
+ "jam_how_1": "In Spotify: play something, tap devices → Start a Jam.",
+ "jam_how_2": "Invite → Share link → Copy link. Paste below.",
+ "jam_join": "Join the Jam",
+ "jam_host_tip": "Skip a song in Spotify, then start the round.",
+ "jam_use": "Use this Jam",
+ "jam_open": "▶ Open the Jam in Spotify",
+ "add_your_music": "Add your music",
+ "contribute_intro": "The host mixes everyone's lists. Your songs stay hidden until they play.",
+ "spotify_link_intro": "This game plays from a {name}. Add your songs:",
+ "you_added": [
+ {
+ "declarations": [
+ "input count",
+ "local countPlural = count: plural"
+ ],
+ "selectors": [
+ "countPlural"
+ ],
+ "match": {
+ "countPlural=one": "You added {playlist} · {count} song",
+ "countPlural=other": "You added {playlist} · {count} songs"
+ }
+ }
+ ],
+ "remove": "Remove",
+ "added_so_far": "Added so far: {list}",
+ "add_n_songs": [
+ {
+ "declarations": [
+ "input count",
+ "local countPlural = count: plural"
+ ],
+ "selectors": [
+ "countPlural"
+ ],
+ "match": {
+ "countPlural=one": "Add {count} song",
+ "countPlural=other": "Add {count} songs"
+ }
+ }
+ ],
+ "replace_n_songs": [
+ {
+ "declarations": [
+ "input count",
+ "local countPlural = count: plural"
+ ],
+ "selectors": [
+ "countPlural"
+ ],
+ "match": {
+ "countPlural=one": "Replace with {count} song",
+ "countPlural=other": "Replace with {count} songs"
+ }
+ }
+ ],
+ "paste_songs": "Paste songs",
+ "from_file": "From a file",
+ "how_get_playlist": "How do I get my songs?",
+ "help_computer_title": "Computer:",
+ "help_computer": "open a playlist, select all (Ctrl+A / ⌘A), copy, paste here.",
+ "help_phone_title": "Phone:",
+ "help_phone": "Share → Copy song link, or type “Artist - Title”, one per line.",
+ "list_name_placeholder": "Name this list (optional)",
+ "list_name_label": "List name",
+ "my_songs": "My songs",
+ "file_error": "Couldn't find any songs in that file.",
+ "file_csv": "A playlist CSV with artist and title, e.g. from Exportify.",
+ "file_export": "Your Spotify data export: Playlist1.json or YourLibrary.json.",
+ "err_locked_out": "Locked out this round",
+ "err_name_empty": "Name can't be empty",
+ "err_no_round": "No round running",
+ "err_no_common": "No songs are on more than one list yet",
+ "err_no_usable": "No usable songs in that list",
+ "err_nobody_added": "Nobody has added music yet",
+ "err_nobody_buzzed": "Nobody has buzzed",
+ "err_nothing_to_buzz": "Nothing to buzz for right now",
+ "err_host_only": "Only the host can do that",
+ "err_pick_team": "Pick a team first",
+ "err_pick_team_buzz": "Pick a team to buzz for",
+ "err_room_full": "Room is full",
+ "err_round_running": "Round already running",
+ "err_not_spotify": "That isn't a Spotify share link",
+ "err_player_gone": "That player isn't here",
+ "err_host_cant_buzz": "The host can't buzz",
+ "err_host_here": "The host is still here",
+ "err_bad_room": "That room code isn't valid",
+ "err_generic": "Something went wrong"
+}
diff --git a/messages/nb.json b/messages/nb.json
new file mode 100644
index 0000000..547d672
--- /dev/null
+++ b/messages/nb.json
@@ -0,0 +1,280 @@
+{
+ "$schema": "https://inlang.com/schema/inlang-message-format",
+ "red": "Rød",
+ "blue": "Blå",
+ "someone": "Noen",
+ "close": "Lukk",
+ "language": "Språk",
+ "and": "og",
+ "mode_vs": "Rød mot Blå",
+ "mode_ffa": "Alle mot alle",
+ "own_music": "Egen musikk",
+ "n_songs": [
+ {
+ "declarations": [
+ "input count",
+ "local countPlural = count: plural"
+ ],
+ "selectors": [
+ "countPlural"
+ ],
+ "match": {
+ "countPlural=one": "{count} sang",
+ "countPlural=other": "{count} sanger"
+ }
+ }
+ ],
+ "home_tagline": "Et musikkspill med buzzere for stua.",
+ "home_new_vs": "Nytt spill · Rød mot Blå",
+ "home_new_ffa": "Nytt spill · Alle mot alle",
+ "home_join_label": "Eller bli med i et rom",
+ "home_code_placeholder": "ROMKODE",
+ "join": "Bli med",
+ "how_to_play": "Slik spiller du",
+ "rules_1": "Verten lager et rom. Alle andre blir med med koden.",
+ "rules_2": "Verten spiller hver sang i Spotify, på en høyttaler.",
+ "rules_3": "Alle andre buzzer på telefonen. Første til PLING svarer.",
+ "rules_4": "Feil svar? Du er ute til neste sang.",
+ "rules_vs": "Velg lag, eller del én telefon med én knapp per lag.",
+ "rules_ffa": "Alle mot alle.",
+ "rules_own": "Annen musikkapp? Velg Egen musikk.",
+ "rules_spotify": "La alle velge sanger: Musikk → Spotify.",
+ "joining": "Kobler til…",
+ "back_home": "Til forsiden",
+ "invite_players": "Inviter spillere",
+ "room": "Rom",
+ "invite": "Inviter",
+ "music": "Musikk",
+ "settings": "Innstillinger",
+ "you_are_host": "Du er vert",
+ "host_is": "Vert: {name}",
+ "nobody": "ingen",
+ "you_are": "Du er",
+ "here_count": "{count} her",
+ "reconnecting": "Kobler til igjen…",
+ "host_left": "Verten har gått.",
+ "host_now": "Bli vert",
+ "song_of": "Sang {number} · {name}",
+ "blend_outdated": "Noen har endret musikken sin. Lag blandingen på nytt?",
+ "rebuild": "Lag på nytt",
+ "only_you_see": "Bare du ser dette",
+ "start_any_app": "Spill en sang i en hvilken som helst app, og start runden.",
+ "start_round": "Start runden",
+ "play_in_spotify": "▶ Spill i Spotify",
+ "skip_song": "Hopp over",
+ "listening": "Lytter…",
+ "locked_out_list": "Utestengt: {names}",
+ "open_spotify_again": "Tilbake til Spotify",
+ "end_round": "Avslutt runden",
+ "for_team": "for {team}",
+ "pause_judge": "Pause musikken.",
+ "wrong": "✗ Feil",
+ "correct": "✓ Riktig",
+ "point_to": "Poeng til {name}!",
+ "nobody_got_it": "Ingen klarte den",
+ "round_ended": "Runden er over",
+ "next_song": "Neste sang",
+ "start_next_round": "Start neste runde",
+ "show_song": "Vis sangen til spillerne",
+ "fullscreen_enter": "⛶ Fullskjerm",
+ "fullscreen_exit": "Avslutt fullskjerm",
+ "fullscreen_ios_hint": "iPhone: Del → Legg til på Hjem-skjerm for fullskjerm.",
+ "fullscreen_setting": "Skjerm",
+ "host_controls": "Vertskontroller",
+ "buzzer": "Buzzer",
+ "which_team": "Hvilket lag?",
+ "shared_buzzer": "Felles buzzer",
+ "buzz_for_red": "Pling for Rød",
+ "buzz_for_blue": "Pling for Blå",
+ "red_caps": "RØD",
+ "blue_caps": "BLÅ",
+ "waiting_host": "Venter på verten…",
+ "locked_out": "Utestengt fra denne sangen",
+ "know_it": "Kan du den?",
+ "your_answer": "Ditt svar!",
+ "buzzed": "{name} buzzet",
+ "you_scored": "Du fikk poeng! 🎉",
+ "point_to_plain": "Poeng til {name}",
+ "round_over": "Runden er over",
+ "the_song_was": "Sangen var",
+ "add_to_blend": "Legg til musikken min",
+ "spotify_link_song": "Spotify-sang",
+ "name_in_spotify": "Navnet vises i Spotify.",
+ "from_lists": [
+ {
+ "declarations": [
+ "input count",
+ "local countPlural = count: plural"
+ ],
+ "selectors": [
+ "countPlural"
+ ],
+ "match": {
+ "countPlural=one": "Fra listen til {names}",
+ "countPlural=other": "Fra listene til {names}"
+ }
+ }
+ ],
+ "open_in_spotify": "Åpne i Spotify",
+ "take_point": "Trekk et poeng fra {name}",
+ "give_point": "Gi et poeng til {name}",
+ "no_players_yet": "Ingen spillere ennå",
+ "waiting_players": "Venter på spillere…",
+ "your_name": "Navnet ditt",
+ "save": "Lagre",
+ "your_team": "Laget ditt",
+ "shared": "Felles",
+ "seconds_to_guess": "Sekunder til å gjette",
+ "seconds_to_answer": "Sekunder til å svare",
+ "less": "Mindre: {label}",
+ "more": "Mer: {label}",
+ "game_mode": "Spillmodus (nullstiller poeng)",
+ "hand_over": "Gi bort vertsrollen",
+ "reset_confirm": "Sette alle poeng til 0?",
+ "reset_scores": "Nullstill poeng",
+ "scan_to_join": "Skann eller skriv inn koden.",
+ "copy_link": "Kopier lenke",
+ "copied": "Kopiert!",
+ "share": "Del",
+ "share_title": "Bli med i Pling-spillet mitt",
+ "share_spotify": "{name}:",
+ "choose_music": "Velg musikk",
+ "tab_decks": "Kortstokker",
+ "tab_blend": "Blanding",
+ "tab_blend_n": "Blanding ({count})",
+ "tab_spotify": "Spotify",
+ "tab_import": "Importer",
+ "own_music_desc": "Hvilken som helst app. Pling holder poeng.",
+ "now_playing": "Spiller nå «{name}».",
+ "play_these": [
+ {
+ "declarations": [
+ "input count",
+ "local countPlural = count: plural"
+ ],
+ "selectors": [
+ "countPlural"
+ ],
+ "match": {
+ "countPlural=one": "Spill denne ene sangen",
+ "countPlural=other": "Spill disse {count} sangene"
+ }
+ }
+ ],
+ "blend_intro": "Alle legger inn en spilleliste under Musikk. Felles sanger kommer først.",
+ "nobody_added": "Ingen har lagt inn musikk ennå.",
+ "overlap": "{shared} av {total} sanger er felles",
+ "how_many": "Hvor mange sanger",
+ "common_only": "Bare felles sanger",
+ "add_my_music": "Legg inn musikken min",
+ "play_blend": "Spill blandingen",
+ "kind_of_link": "Type lenke",
+ "link_label": "Lenke til {name}",
+ "link_invalid": "Lim inn en lenke fra Del → Kopier lenke.",
+ "blend_name": "Spotify Blend",
+ "blend_short": "Blander smaken til opptil 10 personer.",
+ "blend_how_1": "I Spotify: + → Blend, og inviter folk.",
+ "blend_how_2": "Åpne den: ⋯ → Del → Kopier lenke. Lim inn under.",
+ "blend_join": "Bli med i Spotify Blend",
+ "blend_host_tip": "Spill blandingen tilfeldig. Hopp til neste sang i Spotify, og start runden.",
+ "blend_use": "Bruk denne blandingen",
+ "blend_open": "▶ Åpne blandingen i Spotify",
+ "collab_name": "Samarbeidsspilleliste",
+ "collab_short": "Alle legger til sanger.",
+ "collab_how_1": "I Spotify: lag en spilleliste, trykk legg-til-person-ikonet, kopier lenken.",
+ "collab_how_2": "Lim den inn under.",
+ "collab_join": "Legg til sanger i spillelisten",
+ "collab_host_tip": "Spill spillelisten tilfeldig. Hopp til neste sang i Spotify, og start runden.",
+ "collab_use": "Bruk denne spillelisten",
+ "collab_open": "▶ Åpne spillelisten i Spotify",
+ "jam_name": "Spotify Jam",
+ "jam_short": "Felles kø for opptil 32. Bare verten trenger Premium.",
+ "jam_how_1": "I Spotify: spill noe, trykk enheter → Start en Jam.",
+ "jam_how_2": "Inviter → Del lenke → Kopier lenke. Lim inn under.",
+ "jam_join": "Bli med i Jam-en",
+ "jam_host_tip": "Hopp til neste sang i Spotify, og start runden.",
+ "jam_use": "Bruk denne Jam-en",
+ "jam_open": "▶ Åpne Jam-en i Spotify",
+ "add_your_music": "Legg inn musikken din",
+ "contribute_intro": "Verten blander alles lister. Sangene dine er skjult til de spilles.",
+ "spotify_link_intro": "Spillet bruker en {name}. Legg til sangene dine:",
+ "you_added": [
+ {
+ "declarations": [
+ "input count",
+ "local countPlural = count: plural"
+ ],
+ "selectors": [
+ "countPlural"
+ ],
+ "match": {
+ "countPlural=one": "Du la inn {playlist} · {count} sang",
+ "countPlural=other": "Du la inn {playlist} · {count} sanger"
+ }
+ }
+ ],
+ "remove": "Fjern",
+ "added_so_far": "Lagt inn så langt: {list}",
+ "add_n_songs": [
+ {
+ "declarations": [
+ "input count",
+ "local countPlural = count: plural"
+ ],
+ "selectors": [
+ "countPlural"
+ ],
+ "match": {
+ "countPlural=one": "Legg inn {count} sang",
+ "countPlural=other": "Legg inn {count} sanger"
+ }
+ }
+ ],
+ "replace_n_songs": [
+ {
+ "declarations": [
+ "input count",
+ "local countPlural = count: plural"
+ ],
+ "selectors": [
+ "countPlural"
+ ],
+ "match": {
+ "countPlural=one": "Bytt ut med {count} sang",
+ "countPlural=other": "Bytt ut med {count} sanger"
+ }
+ }
+ ],
+ "paste_songs": "Lim inn sanger",
+ "from_file": "Fra en fil",
+ "how_get_playlist": "Hvordan får jeg sangene mine?",
+ "help_computer_title": "Datamaskin:",
+ "help_computer": "åpne en spilleliste, merk alt (Ctrl+A / ⌘A), kopier, lim inn her.",
+ "help_phone_title": "Telefon:",
+ "help_phone": "Del → Kopier sanglenke, eller skriv «Artist - Tittel», én per linje.",
+ "list_name_placeholder": "Gi listen et navn (valgfritt)",
+ "list_name_label": "Listenavn",
+ "my_songs": "Sangene mine",
+ "file_error": "Fant ingen sanger i den filen.",
+ "file_csv": "En CSV med artist og tittel, f.eks. fra Exportify.",
+ "file_export": "Dataeksporten din fra Spotify: Playlist1.json eller YourLibrary.json.",
+ "err_locked_out": "Du er utestengt denne runden",
+ "err_name_empty": "Navnet kan ikke være tomt",
+ "err_no_round": "Ingen runde pågår",
+ "err_no_common": "Ingen sanger er på mer enn én liste ennå",
+ "err_no_usable": "Ingen brukbare sanger i den listen",
+ "err_nobody_added": "Ingen har lagt inn musikk ennå",
+ "err_nobody_buzzed": "Ingen har buzzet",
+ "err_nothing_to_buzz": "Det er ingenting å buzze for nå",
+ "err_host_only": "Bare verten kan gjøre det",
+ "err_pick_team": "Velg lag først",
+ "err_pick_team_buzz": "Velg hvilket lag du buzzer for",
+ "err_room_full": "Rommet er fullt",
+ "err_round_running": "Runden er allerede i gang",
+ "err_not_spotify": "Det er ikke en delingslenke fra Spotify",
+ "err_player_gone": "Den spilleren er ikke her",
+ "err_host_cant_buzz": "Verten kan ikke buzze",
+ "err_host_here": "Verten er fortsatt her",
+ "err_bad_room": "Den romkoden er ikke gyldig",
+ "err_generic": "Noe gikk galt"
+}
diff --git a/mix.exs b/mix.exs
deleted file mode 100644
index 6aeab93..0000000
--- a/mix.exs
+++ /dev/null
@@ -1,91 +0,0 @@
-defmodule Pling.MixProject do
- use Mix.Project
-
- def project do
- [
- app: :pling,
- version: "0.1.0",
- elixir: "~> 1.14",
- elixirc_paths: elixirc_paths(Mix.env()),
- start_permanent: Mix.env() == :prod,
- aliases: aliases(),
- deps: deps()
- ]
- end
-
- # Configuration for the OTP application.
- #
- # Type `mix help compile.app` for more information.
- def application do
- [
- mod: {Pling.Application, []},
- extra_applications: [:logger, :runtime_tools, :tesla]
- ]
- end
-
- # Specifies which paths to compile per environment.
- defp elixirc_paths(:test), do: ["lib", "test/support"]
- defp elixirc_paths(_), do: ["lib"]
-
- # Specifies your project dependencies.
- #
- # Type `mix help deps` for examples and options.
- defp deps do
- [
- {:phoenix, "~> 1.7.18"},
- {:phoenix_ecto, "~> 4.4"},
- {:ecto_sql, "~> 3.10"},
- {:ecto_sqlite3, ">= 0.0.0"},
- {:phoenix_html, "~> 4.0"},
- {:phoenix_live_reload, "~> 1.2", only: :dev},
- {:phoenix_live_view, "~> 1.0.1"},
- {:floki, ">= 0.30.0", only: :test},
- {:phoenix_live_dashboard, "~> 0.8.3"},
- {:oauth2, "~> 2.1"},
- {:salad_ui, "~> 0.14"},
- {:esbuild, "~> 0.8", runtime: Mix.env() == :dev},
- {:tailwind, "~> 0.2", runtime: Mix.env() == :dev},
- {:mix_test_watch, "~> 1.0", only: [:dev, :test], runtime: false},
- {:heroicons,
- github: "tailwindlabs/heroicons",
- tag: "v2.1.1",
- sparse: "optimized",
- app: false,
- compile: false,
- depth: 1},
- {:swoosh, "~> 1.5"},
- {:finch, "~> 0.13"},
- {:telemetry_metrics, "~> 0.6"},
- {:telemetry_poller, "~> 1.0"},
- {:gettext, "~> 0.20"},
- {:req, "~> 0.5.0"},
- {:dns_cluster, "~> 0.1.1"},
- {:bandit, "~> 1.2"},
- {:tesla, "~> 1.7"},
- {:jason, "~> 1.4"},
- {:meck, "~> 0.9.2", only: :test}
- ]
- end
-
- # Aliases are shortcuts or tasks specific to the current project.
- # For example, to install project dependencies and perform other setup tasks, run:
- #
- # $ mix setup
- #
- # See the documentation for `Mix` for more info on aliases.
- defp aliases do
- [
- setup: ["deps.get", "ecto.setup", "assets.setup", "assets.build"],
- "ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
- "ecto.reset": ["ecto.drop", "ecto.setup"],
- test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"],
- "assets.setup": ["tailwind.install --if-missing", "esbuild.install --if-missing"],
- "assets.build": ["tailwind pling", "esbuild pling"],
- "assets.deploy": [
- "tailwind pling --minify",
- "esbuild pling --minify",
- "phx.digest"
- ]
- ]
- end
-end
diff --git a/mix.lock b/mix.lock
deleted file mode 100644
index 47dd661..0000000
--- a/mix.lock
+++ /dev/null
@@ -1,71 +0,0 @@
-%{
- "bandit": {:hex, :bandit, "1.6.1", "9e01b93d72ddc21d8c576a704949e86ee6cde7d11270a1d3073787876527a48f", [:mix], [{:hpax, "~> 1.0", [hex: :hpax, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:thousand_island, "~> 1.0", [hex: :thousand_island, repo: "hexpm", optional: false]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "5a904bf010ea24b67979835e0507688e31ac873d4ffc8ed0e5413e8d77455031"},
- "cachex": {:hex, :cachex, "3.6.0", "14a1bfbeee060dd9bec25a5b6f4e4691e3670ebda28c8ba2884b12fe30b36bf8", [:mix], [{:eternal, "~> 1.2", [hex: :eternal, repo: "hexpm", optional: false]}, {:jumper, "~> 1.0", [hex: :jumper, repo: "hexpm", optional: false]}, {:sleeplocks, "~> 1.1", [hex: :sleeplocks, repo: "hexpm", optional: false]}, {:unsafe, "~> 1.0", [hex: :unsafe, repo: "hexpm", optional: false]}], "hexpm", "ebf24e373883bc8e0c8d894a63bbe102ae13d918f790121f5cfe6e485cc8e2e2"},
- "castore": {:hex, :castore, "1.0.10", "43bbeeac820f16c89f79721af1b3e092399b3a1ecc8df1a472738fd853574911", [:mix], [], "hexpm", "1b0b7ea14d889d9ea21202c43a4fa015eb913021cb535e8ed91946f4b77a8848"},
- "cc_precompiler": {:hex, :cc_precompiler, "0.1.10", "47c9c08d8869cf09b41da36538f62bc1abd3e19e41701c2cea2675b53c704258", [:mix], [{:elixir_make, "~> 0.7", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "f6e046254e53cd6b41c6bacd70ae728011aa82b2742a80d6e2214855c6e06b22"},
- "certifi": {:hex, :certifi, "2.12.0", "2d1cca2ec95f59643862af91f001478c9863c2ac9cb6e2f89780bfd8de987329", [:rebar3], [], "hexpm", "ee68d85df22e554040cdb4be100f33873ac6051387baf6a8f6ce82272340ff1c"},
- "db_connection": {:hex, :db_connection, "2.7.0", "b99faa9291bb09892c7da373bb82cba59aefa9b36300f6145c5f201c7adf48ec", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "dcf08f31b2701f857dfc787fbad78223d61a32204f217f15e881dd93e4bdd3ff"},
- "decimal": {:hex, :decimal, "2.3.0", "3ad6255aa77b4a3c4f818171b12d237500e63525c2fd056699967a3e7ea20f62", [:mix], [], "hexpm", "a4d66355cb29cb47c3cf30e71329e58361cfcb37c34235ef3bf1d7bf3773aeac"},
- "deep_merge": {:hex, :deep_merge, "1.0.0", "b4aa1a0d1acac393bdf38b2291af38cb1d4a52806cf7a4906f718e1feb5ee961", [:mix], [], "hexpm", "ce708e5f094b9cd4e8f2be4f00d2f4250c4095be93f8cd6d018c753894885430"},
- "dns_cluster": {:hex, :dns_cluster, "0.1.3", "0bc20a2c88ed6cc494f2964075c359f8c2d00e1bf25518a6a6c7fd277c9b0c66", [:mix], [], "hexpm", "46cb7c4a1b3e52c7ad4cbe33ca5079fbde4840dedeafca2baf77996c2da1bc33"},
- "duckdbex": {:hex, :duckdbex, "0.3.8", "672b5509a2ec10c4b14183acc3cee79bb63b8ac456fbbe245011853740010758", [:make, :mix], [{:cc_precompiler, "~> 0.1", [hex: :cc_precompiler, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.8", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "46d99160f5bfec56b4bbf415c5e927c020f28463a801a3c009533c5b2a17a047"},
- "ecto": {:hex, :ecto, "3.12.5", "4a312960ce612e17337e7cefcf9be45b95a3be6b36b6f94dfb3d8c361d631866", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "6eb18e80bef8bb57e17f5a7f068a1719fbda384d40fc37acb8eb8aeca493b6ea"},
- "ecto_sql": {:hex, :ecto_sql, "3.12.1", "c0d0d60e85d9ff4631f12bafa454bc392ce8b9ec83531a412c12a0d415a3a4d0", [:mix], [{:db_connection, "~> 2.4.1 or ~> 2.5", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.12", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.7", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.19 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "aff5b958a899762c5f09028c847569f7dfb9cc9d63bdb8133bff8a5546de6bf5"},
- "ecto_sqlite3": {:hex, :ecto_sqlite3, "0.18.0", "dd25010d7b536bb00857f3bf47193f293619b0c30538bf912d4bd82861d25fba", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:ecto, "~> 3.12", [hex: :ecto, repo: "hexpm", optional: false]}, {:ecto_sql, "~> 3.12", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:exqlite, "~> 0.22", [hex: :exqlite, repo: "hexpm", optional: false]}], "hexpm", "e42ef8252e22c6f65e5421289f9e5ceffd1a4a7e01cb2818d5eab78205d3cce7"},
- "elixir_make": {:hex, :elixir_make, "0.9.0", "6484b3cd8c0cee58f09f05ecaf1a140a8c97670671a6a0e7ab4dc326c3109726", [:mix], [], "hexpm", "db23d4fd8b757462ad02f8aa73431a426fe6671c80b200d9710caf3d1dd0ffdb"},
- "elixir_uuid": {:hex, :elixir_uuid, "1.2.1", "dce506597acb7e6b0daeaff52ff6a9043f5919a4c3315abb4143f0b00378c097", [:mix], [], "hexpm", "f7eba2ea6c3555cea09706492716b0d87397b88946e6380898c2889d68585752"},
- "esbuild": {:hex, :esbuild, "0.8.2", "5f379dfa383ef482b738e7771daf238b2d1cfb0222bef9d3b20d4c8f06c7a7ac", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "558a8a08ed78eb820efbfda1de196569d8bfa9b51e8371a1934fbb31345feda7"},
- "eternal": {:hex, :eternal, "1.2.2", "d1641c86368de99375b98d183042dd6c2b234262b8d08dfd72b9eeaafc2a1abd", [:mix], [], "hexpm", "2c9fe32b9c3726703ba5e1d43a1d255a4f3f2d8f8f9bc19f094c7cb1a7a9e782"},
- "expo": {:hex, :expo, "1.1.0", "f7b9ed7fb5745ebe1eeedf3d6f29226c5dd52897ac67c0f8af62a07e661e5c75", [:mix], [], "hexpm", "fbadf93f4700fb44c331362177bdca9eeb8097e8b0ef525c9cc501cb9917c960"},
- "exqlite": {:hex, :exqlite, "0.27.1", "73fc0b3dc3b058a77a2b3771f82a6af2ddcf370b069906968a34083d2ffd2884", [:make, :mix], [{:cc_precompiler, "~> 0.1", [hex: :cc_precompiler, repo: "hexpm", optional: false]}, {:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.8", [hex: :elixir_make, repo: "hexpm", optional: false]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "79ef5756451cfb022e8013e1ed00d0f8f7d1333c19502c394dc16b15cfb4e9b4"},
- "file_system": {:hex, :file_system, "1.0.1", "79e8ceaddb0416f8b8cd02a0127bdbababe7bf4a23d2a395b983c1f8b3f73edd", [:mix], [], "hexpm", "4414d1f38863ddf9120720cd976fce5bdde8e91d8283353f0e31850fa89feb9e"},
- "finch": {:hex, :finch, "0.19.0", "c644641491ea854fc5c1bbaef36bfc764e3f08e7185e1f084e35e0672241b76d", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.6.2 or ~> 1.7", [hex: :mint, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.4 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 1.1", [hex: :nimble_pool, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "fc5324ce209125d1e2fa0fcd2634601c52a787aff1cd33ee833664a5af4ea2b6"},
- "floki": {:hex, :floki, "0.37.0", "b83e0280bbc6372f2a403b2848013650b16640cd2470aea6701f0632223d719e", [:mix], [], "hexpm", "516a0c15a69f78c47dc8e0b9b3724b29608aa6619379f91b1ffa47109b5d0dd3"},
- "gettext": {:hex, :gettext, "0.26.2", "5978aa7b21fada6deabf1f6341ddba50bc69c999e812211903b169799208f2a8", [:mix], [{:expo, "~> 0.5.1 or ~> 1.0", [hex: :expo, repo: "hexpm", optional: false]}], "hexpm", "aa978504bcf76511efdc22d580ba08e2279caab1066b76bb9aa81c4a1e0a32a5"},
- "hackney": {:hex, :hackney, "1.20.1", "8d97aec62ddddd757d128bfd1df6c5861093419f8f7a4223823537bad5d064e2", [:rebar3], [{:certifi, "~> 2.12.0", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~> 6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~> 1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~> 1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.4.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~> 1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "fe9094e5f1a2a2c0a7d10918fee36bfec0ec2a979994cff8cfe8058cd9af38e3"},
- "heroicons": {:git, "https://github.com/tailwindlabs/heroicons.git", "88ab3a0d790e6a47404cba02800a6b25d2afae50", [tag: "v2.1.1", sparse: "optimized", depth: 1]},
- "hpax": {:hex, :hpax, "1.0.2", "762df951b0c399ff67cc57c3995ec3cf46d696e41f0bba17da0518d94acd4aac", [:mix], [], "hexpm", "2f09b4c1074e0abd846747329eaa26d535be0eb3d189fa69d812bfb8bfefd32f"},
- "httpoison": {:hex, :httpoison, "2.2.1", "87b7ed6d95db0389f7df02779644171d7319d319178f6680438167d7b69b1f3d", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "51364e6d2f429d80e14fe4b5f8e39719cacd03eb3f9a9286e61e216feac2d2df"},
- "idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"},
- "jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"},
- "jumper": {:hex, :jumper, "1.0.2", "68cdcd84472a00ac596b4e6459a41b3062d4427cbd4f1e8c8793c5b54f1406a7", [:mix], [], "hexpm", "9b7782409021e01ab3c08270e26f36eb62976a38c1aa64b2eaf6348422f165e1"},
- "live_react": {:hex, :live_react, "0.1.0", "5b406ee4108125f833938c52d7a0eb4611854d421e9a345def5cca450711dfe8", [:mix], [{:jason, "~> 1.2", [hex: :jason, repo: "hexpm", optional: false]}, {:phoenix, ">= 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, ">= 3.3.1", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_live_view, ">= 0.18.0", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}], "hexpm", "1d499253bcaf8f4391454b96af3abfff6cdd35ef99b1104edf6c802e06726050"},
- "meck": {:hex, :meck, "0.9.2", "85ccbab053f1db86c7ca240e9fc718170ee5bda03810a6292b5306bf31bae5f5", [:rebar3], [], "hexpm", "81344f561357dc40a8344afa53767c32669153355b626ea9fcbc8da6b3045826"},
- "metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm", "69b09adddc4f74a40716ae54d140f93beb0fb8978d8636eaded0c31b6f099f16"},
- "mime": {:hex, :mime, "2.0.6", "8f18486773d9b15f95f4f4f1e39b710045fa1de891fada4516559967276e4dc2", [:mix], [], "hexpm", "c9945363a6b26d747389aac3643f8e0e09d30499a138ad64fe8fd1d13d9b153e"},
- "mimerl": {:hex, :mimerl, "1.3.0", "d0cd9fc04b9061f82490f6581e0128379830e78535e017f7780f37fea7545726", [:rebar3], [], "hexpm", "a1e15a50d1887217de95f0b9b0793e32853f7c258a5cd227650889b38839fe9d"},
- "mint": {:hex, :mint, "1.6.2", "af6d97a4051eee4f05b5500671d47c3a67dac7386045d87a904126fd4bbcea2e", [:mix], [{:castore, "~> 0.1.0 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:hpax, "~> 0.1.1 or ~> 0.2.0 or ~> 1.0", [hex: :hpax, repo: "hexpm", optional: false]}], "hexpm", "5ee441dffc1892f1ae59127f74afe8fd82fda6587794278d924e4d90ea3d63f9"},
- "mix_test_watch": {:hex, :mix_test_watch, "1.2.0", "1f9acd9e1104f62f280e30fc2243ae5e6d8ddc2f7f4dc9bceb454b9a41c82b42", [:mix], [{:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}], "hexpm", "278dc955c20b3fb9a3168b5c2493c2e5cffad133548d307e0a50c7f2cfbf34f6"},
- "nimble_options": {:hex, :nimble_options, "1.1.1", "e3a492d54d85fc3fd7c5baf411d9d2852922f66e69476317787a7b2bb000a61b", [:mix], [], "hexpm", "821b2470ca9442c4b6984882fe9bb0389371b8ddec4d45a9504f00a66f650b44"},
- "nimble_parsec": {:hex, :nimble_parsec, "1.4.2", "8efba0122db06df95bfaa78f791344a89352ba04baedd3849593bfce4d0dc1c6", [:mix], [], "hexpm", "4b21398942dda052b403bbe1da991ccd03a053668d147d53fb8c4e0efe09c973"},
- "nimble_pool": {:hex, :nimble_pool, "1.1.0", "bf9c29fbdcba3564a8b800d1eeb5a3c58f36e1e11d7b7fb2e084a643f645f06b", [:mix], [], "hexpm", "af2e4e6b34197db81f7aad230c1118eac993acc0dae6bc83bac0126d4ae0813a"},
- "oauth2": {:hex, :oauth2, "2.1.0", "beb657f393814a3a7a8a15bd5e5776ecae341fd344df425342a3b6f1904c2989", [:mix], [{:tesla, "~> 1.5", [hex: :tesla, repo: "hexpm", optional: false]}], "hexpm", "8ac07f85b3307dd1acfeb0ec852f64161b22f57d0ce0c15e616a1dfc8ebe2b41"},
- "parse_trans": {:hex, :parse_trans, "3.4.1", "6e6aa8167cb44cc8f39441d05193be6e6f4e7c2946cb2759f015f8c56b76e5ff", [:rebar3], [], "hexpm", "620a406ce75dada827b82e453c19cf06776be266f5a67cff34e1ef2cbb60e49a"},
- "phoenix": {:hex, :phoenix, "1.7.18", "5310c21443514be44ed93c422e15870aef254cf1b3619e4f91538e7529d2b2e4", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.7", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:websock_adapter, "~> 0.5.3", [hex: :websock_adapter, repo: "hexpm", optional: false]}], "hexpm", "1797fcc82108442a66f2c77a643a62980f342bfeb63d6c9a515ab8294870004e"},
- "phoenix_analytics": {:hex, :phoenix_analytics, "0.2.1", "0471c61bb125354da9a30fe7c5aa99510b67d0ebfc76f76c491b77ddee03ccaf", [:mix], [{:cachex, "~> 3.6", [hex: :cachex, repo: "hexpm", optional: false]}, {:duckdbex, "~> 0.3", [hex: :duckdbex, repo: "hexpm", optional: false]}, {:elixir_uuid, "~> 1.2", [hex: :elixir_uuid, repo: "hexpm", optional: false]}, {:live_react, "~> 0.1", [hex: :live_react, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 1.0-rc.1", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}, {:plug, "~> 1.16", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.2", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "cc043c0a91aad820c2535b58bbe31d61b0e5f72c2ce39214a7ee3c3428508b33"},
- "phoenix_ecto": {:hex, :phoenix_ecto, "4.6.3", "f686701b0499a07f2e3b122d84d52ff8a31f5def386e03706c916f6feddf69ef", [:mix], [{:ecto, "~> 3.5", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.1", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.16 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}], "hexpm", "909502956916a657a197f94cc1206d9a65247538de8a5e186f7537c895d95764"},
- "phoenix_html": {:hex, :phoenix_html, "4.2.0", "83a4d351b66f472ebcce242e4ae48af1b781866f00ef0eb34c15030d4e2069ac", [:mix], [], "hexpm", "9713b3f238d07043583a94296cc4bbdceacd3b3a6c74667f4df13971e7866ec8"},
- "phoenix_live_dashboard": {:hex, :phoenix_live_dashboard, "0.8.5", "d5f44d7dbd7cfacaa617b70c5a14b2b598d6f93b9caa8e350c51d56cd4350a9b", [:mix], [{:ecto, "~> 3.6.2 or ~> 3.7", [hex: :ecto, repo: "hexpm", optional: true]}, {:ecto_mysql_extras, "~> 0.5", [hex: :ecto_mysql_extras, repo: "hexpm", optional: true]}, {:ecto_psql_extras, "~> 0.7", [hex: :ecto_psql_extras, repo: "hexpm", optional: true]}, {:ecto_sqlite3_extras, "~> 1.1.7 or ~> 1.2.0", [hex: :ecto_sqlite3_extras, repo: "hexpm", optional: true]}, {:mime, "~> 1.6 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 0.19 or ~> 1.0", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}, {:telemetry_metrics, "~> 0.6 or ~> 1.0", [hex: :telemetry_metrics, repo: "hexpm", optional: false]}], "hexpm", "1d73920515554d7d6c548aee0bf10a4780568b029d042eccb336db29ea0dad70"},
- "phoenix_live_reload": {:hex, :phoenix_live_reload, "1.5.3", "f2161c207fda0e4fb55165f650f7f8db23f02b29e3bff00ff7ef161d6ac1f09d", [:mix], [{:file_system, "~> 0.3 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}], "hexpm", "b4ec9cd73cb01ff1bd1cac92e045d13e7030330b74164297d1aee3907b54803c"},
- "phoenix_live_view": {:hex, :phoenix_live_view, "1.0.1", "5389a30658176c0de816636ce276567478bffd063c082515a6e8368b8fc9a0db", [:mix], [{:floki, "~> 0.36", [hex: :floki, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.15", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c0f517e6f290f10dbb94343ac22e0109437fb1fa6f0696e7c73967b789c1c285"},
- "phoenix_pubsub": {:hex, :phoenix_pubsub, "2.1.3", "3168d78ba41835aecad272d5e8cd51aa87a7ac9eb836eabc42f6e57538e3731d", [:mix], [], "hexpm", "bba06bc1dcfd8cb086759f0edc94a8ba2bc8896d5331a1e2c2902bf8e36ee502"},
- "phoenix_template": {:hex, :phoenix_template, "1.0.4", "e2092c132f3b5e5b2d49c96695342eb36d0ed514c5b252a77048d5969330d639", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "2c0c81f0e5c6753faf5cca2f229c9709919aba34fab866d3bc05060c9c444206"},
- "plug": {:hex, :plug, "1.16.1", "40c74619c12f82736d2214557dedec2e9762029b2438d6d175c5074c933edc9d", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "a13ff6b9006b03d7e33874945b2755253841b238c34071ed85b0e86057f8cddc"},
- "plug_crypto": {:hex, :plug_crypto, "2.1.0", "f44309c2b06d249c27c8d3f65cfe08158ade08418cf540fd4f72d4d6863abb7b", [:mix], [], "hexpm", "131216a4b030b8f8ce0f26038bc4421ae60e4bb95c5cf5395e1421437824c4fa"},
- "req": {:hex, :req, "0.5.8", "50d8d65279d6e343a5e46980ac2a70e97136182950833a1968b371e753f6a662", [:mix], [{:brotli, "~> 0.3.1", [hex: :brotli, repo: "hexpm", optional: true]}, {:ezstd, "~> 1.0", [hex: :ezstd, repo: "hexpm", optional: true]}, {:finch, "~> 0.17", [hex: :finch, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:mime, "~> 2.0.6 or ~> 2.1", [hex: :mime, repo: "hexpm", optional: false]}, {:nimble_csv, "~> 1.0", [hex: :nimble_csv, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "d7fc5898a566477e174f26887821a3c5082b243885520ee4b45555f5d53f40ef"},
- "salad_ui": {:hex, :salad_ui, "0.14.6", "01a50ce1cdb540f8b26a22b2c8a9747945597ded8529e2fad8dbb0dfcea5da57", [:mix], [{:phoenix_live_view, "~> 1.0", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}, {:tw_merge, "~> 0.1", [hex: :tw_merge, repo: "hexpm", optional: false]}], "hexpm", "ad24cfd21366767fae1d2bc9f8d8a273e82f9467909673f6d00efaa4ab9f81a8"},
- "sleeplocks": {:hex, :sleeplocks, "1.1.3", "96a86460cc33b435c7310dbd27ec82ca2c1f24ae38e34f8edde97f756503441a", [:rebar3], [], "hexpm", "d3b3958552e6eb16f463921e70ae7c767519ef8f5be46d7696cc1ed649421321"},
- "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"},
- "swoosh": {:hex, :swoosh, "1.17.5", "14910d267a2633d4335917b37846e376e2067815601592629366c39845dad145", [:mix], [{:bandit, ">= 1.0.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:cowboy, "~> 1.1 or ~> 2.4", [hex: :cowboy, repo: "hexpm", optional: true]}, {:ex_aws, "~> 2.1", [hex: :ex_aws, repo: "hexpm", optional: true]}, {:finch, "~> 0.6", [hex: :finch, repo: "hexpm", optional: true]}, {:gen_smtp, "~> 0.13 or ~> 1.0", [hex: :gen_smtp, repo: "hexpm", optional: true]}, {:hackney, "~> 1.9", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:mail, "~> 0.2", [hex: :mail, repo: "hexpm", optional: true]}, {:mime, "~> 1.1 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mua, "~> 0.2.3", [hex: :mua, repo: "hexpm", optional: true]}, {:multipart, "~> 0.4", [hex: :multipart, repo: "hexpm", optional: true]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: true]}, {:plug_cowboy, ">= 1.0.0", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:req, "~> 0.5 or ~> 1.0", [hex: :req, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "629113d477bc82c4c3bffd15a25e8becc1c7ccc0f0e67743b017caddebb06f04"},
- "tailwind": {:hex, :tailwind, "0.2.4", "5706ec47182d4e7045901302bf3a333e80f3d1af65c442ba9a9eed152fb26c2e", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}], "hexpm", "c6e4a82b8727bab593700c998a4d98cf3d8025678bfde059aed71d0000c3e463"},
- "telemetry": {:hex, :telemetry, "1.3.0", "fedebbae410d715cf8e7062c96a1ef32ec22e764197f70cda73d82778d61e7a2", [:rebar3], [], "hexpm", "7015fc8919dbe63764f4b4b87a95b7c0996bd539e0d499be6ec9d7f3875b79e6"},
- "telemetry_metrics": {:hex, :telemetry_metrics, "0.6.2", "2caabe9344ec17eafe5403304771c3539f3b6e2f7fb6a6f602558c825d0d0bfb", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "9b43db0dc33863930b9ef9d27137e78974756f5f198cae18409970ed6fa5b561"},
- "telemetry_poller": {:hex, :telemetry_poller, "1.1.0", "58fa7c216257291caaf8d05678c8d01bd45f4bdbc1286838a28c4bb62ef32999", [:rebar3], [{:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "9eb9d9cbfd81cbd7cdd24682f8711b6e2b691289a0de6826e58452f28c103c8f"},
- "tesla": {:hex, :tesla, "1.13.2", "85afa342eb2ac0fee830cf649dbd19179b6b359bec4710d02a3d5d587f016910", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:exjsx, ">= 3.0.0", [hex: :exjsx, repo: "hexpm", optional: true]}, {:finch, "~> 0.13", [hex: :finch, repo: "hexpm", optional: true]}, {:fuse, "~> 2.4", [hex: :fuse, repo: "hexpm", optional: true]}, {:gun, ">= 1.0.0", [hex: :gun, repo: "hexpm", optional: true]}, {:hackney, "~> 1.6", [hex: :hackney, repo: "hexpm", optional: true]}, {:ibrowse, "4.4.2", [hex: :ibrowse, repo: "hexpm", optional: true]}, {:jason, ">= 1.0.0", [hex: :jason, repo: "hexpm", optional: true]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.0", [hex: :mint, repo: "hexpm", optional: true]}, {:mox, "~> 1.0", [hex: :mox, repo: "hexpm", optional: true]}, {:msgpax, "~> 2.3", [hex: :msgpax, repo: "hexpm", optional: true]}, {:poison, ">= 1.0.0", [hex: :poison, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "960609848f1ef654c3cdfad68453cd84a5febecb6ed9fed9416e36cd9cd724f9"},
- "thousand_island": {:hex, :thousand_island, "1.3.7", "1da7598c0f4f5f50562c097a3f8af308ded48cd35139f0e6f17d9443e4d0c9c5", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "0139335079953de41d381a6134d8b618d53d084f558c734f2662d1a72818dd12"},
- "tw_merge": {:hex, :tw_merge, "0.1.1", "88127783b0039bd85cdc0d8d7f4498f794c4fe30c9c0b35fdc8dcc1f0f18b4dc", [:mix], [{:deep_merge, "~> 1.0", [hex: :deep_merge, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "443f683fe21e171ac1fe1a5105b8b5862d85e0385595c983e8e09d053129e04f"},
- "unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"},
- "unsafe": {:hex, :unsafe, "1.0.2", "23c6be12f6c1605364801f4b47007c0c159497d0446ad378b5cf05f1855c0581", [:mix], [], "hexpm", "b485231683c3ab01a9cd44cb4a79f152c6f3bb87358439c6f68791b85c2df675"},
- "websock": {:hex, :websock, "0.5.3", "2f69a6ebe810328555b6fe5c831a851f485e303a7c8ce6c5f675abeb20ebdadc", [:mix], [], "hexpm", "6105453d7fac22c712ad66fab1d45abdf049868f253cf719b625151460b8b453"},
- "websock_adapter": {:hex, :websock_adapter, "0.5.8", "3b97dc94e407e2d1fc666b2fb9acf6be81a1798a2602294aac000260a7c4a47d", [:mix], [{:bandit, ">= 0.6.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "315b9a1865552212b5f35140ad194e67ce31af45bcee443d4ecb96b5fd3f3782"},
-}
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..08bcb92
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,5034 @@
+{
+ "name": "pling",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "pling",
+ "hasInstallScript": true,
+ "dependencies": {
+ "partyserver": "^0.5.10",
+ "partysocket": "^1.3.0",
+ "qrcode": "^1.5.4",
+ "react": "^19.3.1",
+ "react-dom": "^19.3.1"
+ },
+ "devDependencies": {
+ "@cloudflare/vite-plugin": "^2.0.0-rc.0",
+ "@cloudflare/workers-types": "^5.20261201.1",
+ "@inlang/paraglide-js": "^3.2.2",
+ "@inlang/plugin-message-format": "^4.6.3",
+ "@tailwindcss/vite": "^4.3.5",
+ "@types/qrcode": "^1.5.6",
+ "@types/react": "^19.3.3",
+ "@types/react-dom": "^19.3.0",
+ "@vitejs/plugin-react": "^6.3.1",
+ "cf": "^1.0.0-rc.7",
+ "tailwindcss": "^4.3.5",
+ "typescript": "^7.0.2",
+ "vite": "^8.4.1",
+ "vitest": "^5.1.2"
+ }
+ },
+ "node_modules/@bytecodealliance/jco-node-fs": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/@bytecodealliance/jco-node-fs/-/jco-node-fs-0.3.2.tgz",
+ "integrity": "sha512-yxvqQreNcOQdMsEKZomkSqThtkxrAz3f1Cmy8BsV0UHi9saa2/D1KDB14IAXPYwDq/maS6lCzS+MuMQx6QkUgA==",
+ "dev": true,
+ "license": "(Apache-2.0 WITH LLVM-exception)",
+ "engines": {
+ "node": ">=20"
+ },
+ "optionalDependencies": {
+ "@bytecodealliance/jco-node-fs-darwin-arm64": "0.3.2",
+ "@bytecodealliance/jco-node-fs-darwin-x64": "0.3.2",
+ "@bytecodealliance/jco-node-fs-linux-arm64-gnu": "0.3.2",
+ "@bytecodealliance/jco-node-fs-linux-arm64-musl": "0.3.2",
+ "@bytecodealliance/jco-node-fs-linux-x64-gnu": "0.3.2",
+ "@bytecodealliance/jco-node-fs-linux-x64-musl": "0.3.2",
+ "@bytecodealliance/jco-node-fs-win32-arm64-msvc": "0.3.2",
+ "@bytecodealliance/jco-node-fs-win32-x64-msvc": "0.3.2"
+ }
+ },
+ "node_modules/@bytecodealliance/jco-node-fs-darwin-arm64": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/@bytecodealliance/jco-node-fs-darwin-arm64/-/jco-node-fs-darwin-arm64-0.3.2.tgz",
+ "integrity": "sha512-WXQq1tRVUWhbK+ImH0G8Kni2AR0sdokLf/KyXRw5P6n4A9ZbgMHOuPfN/PEsYgw4eosuTAonutK0xILk/hA81A==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "(Apache-2.0 WITH LLVM-exception)",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/@bytecodealliance/jco-node-fs-darwin-x64": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/@bytecodealliance/jco-node-fs-darwin-x64/-/jco-node-fs-darwin-x64-0.3.2.tgz",
+ "integrity": "sha512-Fy/OjHnto7hNE5ksewVkmAMXG/uXyj+RAKFZWQFTzFkp73UyT5vuPjKq3nvx9KolUGWBG37BudEMb4ZAoD9TbQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "(Apache-2.0 WITH LLVM-exception)",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/@bytecodealliance/jco-node-fs-linux-arm64-gnu": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/@bytecodealliance/jco-node-fs-linux-arm64-gnu/-/jco-node-fs-linux-arm64-gnu-0.3.2.tgz",
+ "integrity": "sha512-OafRtRu3tfOFQARfkia/LDEqSo2R3yAL1xPwzf4RcRW6JqkOY7qKWsUS5+LPVo/aFaSkMX7F7bdFGpFPmcoZJg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "(Apache-2.0 WITH LLVM-exception)",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/@bytecodealliance/jco-node-fs-linux-arm64-musl": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/@bytecodealliance/jco-node-fs-linux-arm64-musl/-/jco-node-fs-linux-arm64-musl-0.3.2.tgz",
+ "integrity": "sha512-JblDiwD7+Y+w0d/tjaNDX4QdGvh5lyuDc+S/jDeT7sYA1caA9yiwIjLa8PC/lm2xudqSxD+Cuy4AosXvl+qI0g==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "(Apache-2.0 WITH LLVM-exception)",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/@bytecodealliance/jco-node-fs-linux-x64-gnu": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/@bytecodealliance/jco-node-fs-linux-x64-gnu/-/jco-node-fs-linux-x64-gnu-0.3.2.tgz",
+ "integrity": "sha512-6FzmHoLOsa6b4X9AuFLsvlpNF66Dt4sRRftZHaT1I1pYzCWrJkkpgNJhRXxf67ZPmOwBZJT4dan/g752Rx4xRw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "(Apache-2.0 WITH LLVM-exception)",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/@bytecodealliance/jco-node-fs-linux-x64-musl": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/@bytecodealliance/jco-node-fs-linux-x64-musl/-/jco-node-fs-linux-x64-musl-0.3.2.tgz",
+ "integrity": "sha512-SbAJG2PDV8YAHBESHU9sVSckOitJyvlezdF4CGP5/mOp01JnijVkLVXzGK62yVSfa5TpAybbSd1rk+v36NAW/Q==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "(Apache-2.0 WITH LLVM-exception)",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/@bytecodealliance/jco-node-fs-win32-arm64-msvc": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/@bytecodealliance/jco-node-fs-win32-arm64-msvc/-/jco-node-fs-win32-arm64-msvc-0.3.2.tgz",
+ "integrity": "sha512-nUWYdFysRQJGsIOCk0KAYN2smkNYiHG7rZ7m+0ZXqP+5wqWxKEjkDsORwXiBjdaWFLVww0anZ3SBxrju6P7hXQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "(Apache-2.0 WITH LLVM-exception)",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/@bytecodealliance/jco-node-fs-win32-x64-msvc": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/@bytecodealliance/jco-node-fs-win32-x64-msvc/-/jco-node-fs-win32-x64-msvc-0.3.2.tgz",
+ "integrity": "sha512-RsPj2t8TvltsMWK7/Z7JcVC/IWPMi07/AJkNLiNTCuGTdT/sseqTThJJwhuz3sjFw7dJdxA+bSGT+23y/KT0fw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "(Apache-2.0 WITH LLVM-exception)",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/@bytecodealliance/jco-transpile": {
+ "version": "0.13.0",
+ "resolved": "https://registry.npmjs.org/@bytecodealliance/jco-transpile/-/jco-transpile-0.13.0.tgz",
+ "integrity": "sha512-9hZ2GMqOlYP1Bf7qQ8v3sCsmkFoXGbgi0HtjHipzrgyk+9GGDzvvbehTGe0oM54rcbKJacvyjpPDn7wtpgzwYA==",
+ "dev": true,
+ "license": "(Apache-2.0 WITH LLVM-exception)",
+ "dependencies": {
+ "@bytecodealliance/preview2-shim": "^0.24.1",
+ "@bytecodealliance/preview3-shim": "^0.6.0",
+ "binaryen": "^130.0.0",
+ "oxc-minify": "^0.136.0"
+ }
+ },
+ "node_modules/@bytecodealliance/preview2-shim": {
+ "version": "0.24.1",
+ "resolved": "https://registry.npmjs.org/@bytecodealliance/preview2-shim/-/preview2-shim-0.24.1.tgz",
+ "integrity": "sha512-QGZsKD5M76xBhwu3BzLWqYDEpaMX90QWrrfhkQPn2pN9t378koumtdAVH4lr25mqGCZt10YNXkWvyWkw/vJbLQ==",
+ "dev": true,
+ "license": "(Apache-2.0 WITH LLVM-exception)",
+ "dependencies": {
+ "@bytecodealliance/jco-node-fs": "0.3.2"
+ }
+ },
+ "node_modules/@bytecodealliance/preview3-shim": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/@bytecodealliance/preview3-shim/-/preview3-shim-0.6.1.tgz",
+ "integrity": "sha512-61mEfjfgGmZhEMA0H3waawPKvYd3za9y0vJ7pmQz/9yvm4FR6Ef+cmqhnxDE7ezsM07MY1btP92ymmgsgFwxmg==",
+ "dev": true,
+ "license": "(Apache-2.0 WITH LLVM-exception)",
+ "dependencies": {
+ "@bytecodealliance/jco-node-fs": "0.3.2",
+ "@bytecodealliance/preview2-shim": "^0.25.0"
+ }
+ },
+ "node_modules/@bytecodealliance/preview3-shim/node_modules/@bytecodealliance/preview2-shim": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@bytecodealliance/preview2-shim/-/preview2-shim-0.25.0.tgz",
+ "integrity": "sha512-6ZSDRJ8hJc/febZepzd68z3KzLcOXyCOKtRm8LB2rgAU88xV7ykq6dMb5I4a+sBh1cuV2Yb1159gDzI1q8UsoQ==",
+ "dev": true,
+ "license": "(Apache-2.0 WITH LLVM-exception)",
+ "dependencies": {
+ "@bytecodealliance/jco-node-fs": "0.3.2"
+ }
+ },
+ "node_modules/@cloudflare/build-output-utils": {
+ "version": "1.0.0-rc.7",
+ "resolved": "https://registry.npmjs.org/@cloudflare/build-output-utils/-/build-output-utils-1.0.0-rc.7.tgz",
+ "integrity": "sha512-iDrhpPp42D2oXw9K10GdZNwsFr/1uD78pAHL2JyY5NeVzERNBzeXNOato4GZBOKGhX0KBffh/yp58Ka6+oWEIA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@cloudflare/config": "1.0.0-rc.6"
+ }
+ },
+ "node_modules/@cloudflare/config": {
+ "version": "1.0.0-rc.6",
+ "resolved": "https://registry.npmjs.org/@cloudflare/config/-/config-1.0.0-rc.6.tgz",
+ "integrity": "sha512-5RCB/U5jItAod/CZFw+c+YlfyuWv4BzAs9gzEKKTTbczMjDU4/yCdzIALhSoF/TBsi1uyN+dNgrwszriit3l1A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "zod": "4.6.6"
+ }
+ },
+ "node_modules/@cloudflare/runtime-types": {
+ "version": "0.1.37",
+ "resolved": "https://registry.npmjs.org/@cloudflare/runtime-types/-/runtime-types-0.1.37.tgz",
+ "integrity": "sha512-54niMVvqrMpLta7O1OETst7GZOu3LA2XO0Ojg3HiiVCfLyQ0mnnleopSt/RC2sVUME/tkZUH9D2lt3CAcsiVhA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "miniflare": "5.20261129.0-beta",
+ "workerd": "1.20261129.1"
+ }
+ },
+ "node_modules/@cloudflare/unenv-preset": {
+ "version": "2.16.2",
+ "resolved": "https://registry.npmjs.org/@cloudflare/unenv-preset/-/unenv-preset-2.16.2.tgz",
+ "integrity": "sha512-JBP1+Z7ZSNG/d4mRP+y8VC5dka3tZVMLEZRvS+rzQ4DGV1EoxRFQckcJTTkXbHSQiTj0DtNI01Zwb/V2fX0mvQ==",
+ "dev": true,
+ "license": "MIT OR Apache-2.0",
+ "peerDependencies": {
+ "unenv": "2.0.0-rc.24",
+ "workerd": ">1.20260305.0 <2.0.0-0"
+ },
+ "peerDependenciesMeta": {
+ "workerd": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@cloudflare/vite-plugin": {
+ "version": "2.0.0-rc.8",
+ "resolved": "https://registry.npmjs.org/@cloudflare/vite-plugin/-/vite-plugin-2.0.0-rc.8.tgz",
+ "integrity": "sha512-gSSLXhoWDAqL3x3w9utln4tC2ses2VevUb4xt/BDBInLhTODSF2hrmuTw7NCYRfNBB2JnekSKVvqOW79yEi08A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@cloudflare/build-output-utils": "1.0.0-rc.7",
+ "@cloudflare/config": "1.0.0-rc.6",
+ "@cloudflare/runtime-types": "0.1.37",
+ "@cloudflare/unenv-preset": "2.16.2",
+ "miniflare": "5.20261129.0-beta",
+ "unenv": "2.0.0-rc.24",
+ "ws": "8.21.0"
+ },
+ "peerDependencies": {
+ "vite": "^7.0.0 || ^8.0.0"
+ }
+ },
+ "node_modules/@cloudflare/workerd-darwin-64": {
+ "version": "1.20261129.1",
+ "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20261129.1.tgz",
+ "integrity": "sha512-3CBFQhU+hPjGUEVuBydhVIlV1vpFG2BR9Xv62LbgIL/DzY8F6oLgA+2iRzN49OZCyUbHFa7WEv766KcL2Amfrg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/@cloudflare/workerd-darwin-arm64": {
+ "version": "1.20261129.1",
+ "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20261129.1.tgz",
+ "integrity": "sha512-8Jj+pF2yLP9iYEXAtioO6F8S+D9Vn1u/7VDcGxELMxg299cN37xS0JG10mmOTGQbsmabRAV/aKuYwApLufogNA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/@cloudflare/workerd-linux-64": {
+ "version": "1.20261129.1",
+ "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20261129.1.tgz",
+ "integrity": "sha512-MDIGDtM+yOV95KNN48GcGbOTl9+ngWVr2J32T09Ou88fdhL4S+vDTAiVMOZsK+ipZWprtBW+crcU7ek2MpXkyQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/@cloudflare/workerd-linux-arm64": {
+ "version": "1.20261129.1",
+ "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20261129.1.tgz",
+ "integrity": "sha512-0U7jPlNHfiAaeD2TROHzzZZUYwSX4SJTu5SA/A89jqlqhBY4raZBlRf1IzQwfYvQwKzmtlvju2ZjguvapwsFqg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/@cloudflare/workerd-windows-64": {
+ "version": "1.20261129.1",
+ "resolved": "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20261129.1.tgz",
+ "integrity": "sha512-Wzli8yhmD7Hj16hCDrwBTfF5L0xt2B/yr09UJFRYs32IVx0gmOYd8d9EhHQ9S4DODAQBKUnMWdZipdqZWK/k0g==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/@cloudflare/workers-types": {
+ "version": "5.20261201.1",
+ "resolved": "https://registry.npmjs.org/@cloudflare/workers-types/-/workers-types-5.20261201.1.tgz",
+ "integrity": "sha512-L34Vr3QDacBmZY9nVxyqU/dj6XNgl/c+MduZDcxlwE9f4qH7uifcyIfDHmdekn6XFL0VMzpj6Z7QVnuFZ30pug==",
+ "license": "MIT OR Apache-2.0"
+ },
+ "node_modules/@cspotcode/source-map-support": {
+ "version": "0.8.1",
+ "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
+ "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/trace-mapping": "0.3.9"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": {
+ "version": "0.3.9",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
+ "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/resolve-uri": "^3.0.3",
+ "@jridgewell/sourcemap-codec": "^1.4.10"
+ }
+ },
+ "node_modules/@emnapi/core": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.1.tgz",
+ "integrity": "sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "@emnapi/wasi-threads": "1.2.2",
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@emnapi/runtime": {
+ "version": "1.11.3",
+ "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.3.tgz",
+ "integrity": "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@emnapi/wasi-threads": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz",
+ "integrity": "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@esbuild/aix-ppc64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz",
+ "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "aix"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.2.tgz",
+ "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz",
+ "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-x64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.2.tgz",
+ "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-arm64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz",
+ "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-x64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz",
+ "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-arm64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz",
+ "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-x64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz",
+ "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz",
+ "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz",
+ "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ia32": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz",
+ "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-loong64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz",
+ "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-mips64el": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz",
+ "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==",
+ "cpu": [
+ "mips64el"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ppc64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz",
+ "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-riscv64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz",
+ "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-s390x": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz",
+ "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-x64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz",
+ "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-arm64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz",
+ "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-x64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz",
+ "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-arm64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz",
+ "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-x64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz",
+ "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openharmony-arm64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz",
+ "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/sunos-x64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz",
+ "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-arm64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz",
+ "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-ia32": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz",
+ "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-x64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz",
+ "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@img/colour": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.1.0.tgz",
+ "integrity": "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@img/sharp-darwin-arm64": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.35.5.tgz",
+ "integrity": "sha512-QRUlFQ0WxvdWyqqG/WtI3iupfD5rBzmCHXSdPsY91sAtVtTo7Q4cb6zOccZ3gqEqkr0f1As1ehLqmEpDsRf+lg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-darwin-arm64": "1.3.4"
+ }
+ },
+ "node_modules/@img/sharp-darwin-x64": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.35.5.tgz",
+ "integrity": "sha512-+BR255RhDlpygUpOc/Jdt1nT6DQ3XG/ERo5wbcdOf5Q320dKtPCKPLR1LJs9VGXRaMa8l1uUa0tkCNOXiAxZUw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-darwin-x64": "1.3.4"
+ }
+ },
+ "node_modules/@img/sharp-freebsd-wasm32": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-freebsd-wasm32/-/sharp-freebsd-wasm32-0.35.5.tgz",
+ "integrity": "sha512-Y/z91nEZ4uIBX5X3nfTovjU9lHNKFYbL2lpHCLVNmXQK03VIZvXBBt0KxbPGp2SdGSF+2mQU4e+hQaWOt86iAw==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "dependencies": {
+ "@img/sharp-wasm32": "0.35.5"
+ },
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-darwin-arm64": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.3.4.tgz",
+ "integrity": "sha512-5R89nBYiRdUlSWJxPhO+GVtaXzXSxKnRu/xqMn3KTA3L9EB9Oy/P+Nn2f2vlhPuUdy/Zusb2DarbyTpGCfEDuw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-darwin-x64": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.3.4.tgz",
+ "integrity": "sha512-iR2OKH80yi0U+dUplyh3/xdpFvps6YkCwsXenIJxqxR1v9o+xtKTGbS9H7cps+2Vxjc8B1j96p75NmTGjIhtpQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-arm": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.3.4.tgz",
+ "integrity": "sha512-LmRtTsOHuvM2+wlO2Db37dx5MiZhB0FvSunciw48YjdOkZz9KAiRbm8ujeMOA1INqmei5NapFxYEK1D1ZSidmw==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-arm64": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.3.4.tgz",
+ "integrity": "sha512-Y3dgX/6lE2QhQb+Gxy0WZxfg9MEm/JBjamZpS2IklP7xIQoKN4hzAm7KcMVGtaVDt3neE9OKBC7vAfonA/Lr1A==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-ppc64": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.3.4.tgz",
+ "integrity": "sha512-Le6boB8Tai0Nis+gIxIpKx68UDVVIqdR8Tin5Yf1z2LJJQLDJvCDRqRu+jC2qCoD+eIomonmOwB4smBRxfVpYQ==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-riscv64": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.3.4.tgz",
+ "integrity": "sha512-aHkkIEHPRdQEegJN20MLmGtxYD9R2wQr3Cwpddnu5+YKMt6Uzax7S9h5gpZTo8wyrGuZSlfQ63OevL5mTyOC7Q==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-s390x": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.3.4.tgz",
+ "integrity": "sha512-ra/mB6MikESDUO7Yg+Mi95bFBb9GsObURuhnOv3OqknjGe9sZrG8tCe9q0xSIGrtLgvgw0gKnFWcK4blSgQOuQ==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-x64": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.3.4.tgz",
+ "integrity": "sha512-GJ//SSXbnwSDes02umB3nDJLFcQzw8a18V8fyhqr6tV515tOEMdImjjxj1AoafMRz56F3PHgftnj1QEKSU1zkw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linuxmusl-arm64": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.3.4.tgz",
+ "integrity": "sha512-hvulFwtjUcagsis6BBxHwGFwWoNZjgYmULGVrZcyfNbjA8hKILbRxGg15/7w5HDyXHXUos/j6baAWqnCyQ2DWA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linuxmusl-x64": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.3.4.tgz",
+ "integrity": "sha512-6zXKeE/p39I1AmA3cJG35eyBGNqNddLnUXjhwBnsGjFPWqf5VKkDBEqaEkPDoTEtkxwi2vv8Tcr2mDyP4So7Fg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-linux-arm": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.35.5.tgz",
+ "integrity": "sha512-LEaXK2WdXVK5ykcw0buWyPMsmLLL2vpHLD6yrNSW+JGEL3BZPA4tpKN6iaMc4AxTTAoaX/sU1rOL51lcIz48ZQ==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-arm": "1.3.4"
+ }
+ },
+ "node_modules/@img/sharp-linux-arm64": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.35.5.tgz",
+ "integrity": "sha512-LYVx5JTsOM2CBzmxreh+nl64/3H6Xb09iSLknqH47z2T2DFFxDeFLP5y4dJwe6H7uGQlHPyEEtIqyo3DYsRwdQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-arm64": "1.3.4"
+ }
+ },
+ "node_modules/@img/sharp-linux-ppc64": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.35.5.tgz",
+ "integrity": "sha512-QVxAAq8evVRI9ia2vqgwrmWucn5Dfv+JdWzj75pD8omHLPSP7f8p20O8jxzjCcuCEQEOtYOZUmX1hkiZ0kdevA==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-ppc64": "1.3.4"
+ }
+ },
+ "node_modules/@img/sharp-linux-riscv64": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.35.5.tgz",
+ "integrity": "sha512-LtdreXguaavKODPIfzJ4kffx7UNt1omwtK0rch4EBbbSTXPnxWmYSayXdLJw0fJzQ97kHt1gL/yh4tvU+nCyRQ==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-riscv64": "1.3.4"
+ }
+ },
+ "node_modules/@img/sharp-linux-s390x": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.35.5.tgz",
+ "integrity": "sha512-UZasTOFiYzotTsGOCu42BfUzP6Tu6Do/947iRm1RsLKvlllxwGcn4RN27LibGWceix4Y+Pmw3jsnTcCQIgWjqA==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-s390x": "1.3.4"
+ }
+ },
+ "node_modules/@img/sharp-linux-x64": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.35.5.tgz",
+ "integrity": "sha512-SxFtLTeJInhAA9Q836kux2vZNeOBQEx658qvbboZScr0wIARym3IcGmW7KpVD5sbVg0Ojy+udFQdayYIZyoNog==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-x64": "1.3.4"
+ }
+ },
+ "node_modules/@img/sharp-linuxmusl-arm64": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.35.5.tgz",
+ "integrity": "sha512-9HbMclmI1zlNkFRs3z9/eBtDjfD0sGlrX1z6b1qwmiFY5ElDLh4BC0LPBdVp7z1DXFiKlIcznf+ZlsuZzLxQqg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linuxmusl-arm64": "1.3.4"
+ }
+ },
+ "node_modules/@img/sharp-linuxmusl-x64": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.35.5.tgz",
+ "integrity": "sha512-4KOphqB035HrVdqLZfCgMzzERrQkkzOwRhl4OAkRO1YCldbaFjySXMaK534Mo0V+LndnlJk+sbUyLeU0ULyD1A==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linuxmusl-x64": "1.3.4"
+ }
+ },
+ "node_modules/@img/sharp-wasm32": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.35.5.tgz",
+ "integrity": "sha512-Ptsga1su4tQx+LLF1ECS9U6nz5kmrXKo6XVbtR48Ke3ZRxxgaWBu7IDtEe1quo8hiupwm6WFqxVlXaSf7IINGQ==",
+ "dev": true,
+ "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT",
+ "optional": true,
+ "dependencies": {
+ "@emnapi/runtime": "^1.11.3"
+ },
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-webcontainers-wasm32": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-webcontainers-wasm32/-/sharp-webcontainers-wasm32-0.35.5.tgz",
+ "integrity": "sha512-hfhF/FmoQyTUkA0bIKFOtw536BQSeBMe6BF6QyWlrPxT754+TFLaZ7sKKTfvvM0yJgKgaYTwnFCIZ/GuDw5SUA==",
+ "cpu": [
+ "wasm32"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "dependencies": {
+ "@img/sharp-wasm32": "0.35.5"
+ },
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-win32-arm64": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.35.5.tgz",
+ "integrity": "sha512-X4t7g+7ZA5DKblCBEXGjUqqemj4vczING/5viFwAL8h4N3qYeyjwdCvRLHi4EdOUI+2Z7UFlp1VM+p/AuEtm6Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-win32-ia32": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.35.5.tgz",
+ "integrity": "sha512-5Zm82LoBc43nhwNybZlG7Y1KO//Zhsn306fQl29ZOuStHLGTo3BWL83q3cznX0poxSAMuYL1On/BHBxkBeKr6A==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-win32-x64": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.35.5.tgz",
+ "integrity": "sha512-x76eH0vEiHlcMQu8Y8IenntaACtddpT6W0wmXtWrnKcnKI7ME5DdgqhAD6SEWOEl1v2zDvkZDhFA9KnURwpfqg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@inlang/paraglide-js": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/@inlang/paraglide-js/-/paraglide-js-3.2.2.tgz",
+ "integrity": "sha512-YoQ2aHmzSgC+yfUgKwcJew3F0lFfwLJsriGCbwQHiJfjKGNjhQnbRr0OXoxsy2ulY2/gK8vYpiphuTv2J0wf5Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@inlang/recommend-sherlock": "^0.2.1",
+ "@inlang/sdk": "^4.2.0",
+ "commander": "11.1.0",
+ "consola": "3.4.0",
+ "jiti": "^2.7.0",
+ "json5": "2.2.3",
+ "magic-string": "^0.30.21",
+ "unplugin": "^2.1.2",
+ "urlpattern-polyfill": "^10.0.0",
+ "valibot": "^1.4.2"
+ },
+ "bin": {
+ "paraglide-js": "bin/run.js"
+ },
+ "peerDependencies": {
+ "eslint": "^9.0.0 || ^10.0.0",
+ "vite": ">=5.0.0"
+ },
+ "peerDependenciesMeta": {
+ "eslint": {
+ "optional": true
+ },
+ "vite": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@inlang/paraglide-js/node_modules/magic-string": {
+ "version": "0.30.21",
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz",
+ "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/sourcemap-codec": "^1.5.5"
+ }
+ },
+ "node_modules/@inlang/plugin-message-format": {
+ "version": "4.6.3",
+ "resolved": "https://registry.npmjs.org/@inlang/plugin-message-format/-/plugin-message-format-4.6.3.tgz",
+ "integrity": "sha512-u0a2x8MhSyEEcejltcgANhKWVfiH/vJG7YtIMxhucKBEGhTfmfl4xw4WTffOovBEItQE7MK6FihPsnYDix3qxQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@inlang/sdk": "4.3.1",
+ "@sinclair/typebox": "^0.31.17"
+ }
+ },
+ "node_modules/@inlang/recommend-sherlock": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/@inlang/recommend-sherlock/-/recommend-sherlock-0.2.2.tgz",
+ "integrity": "sha512-HKhzE++z+G9ZhiQGChxIB7XJMdVhS93iyNSHWQeMdKrKxqfkLXXQXIV15xB11IvH7qeB00Cca+wtPmFIRwlsrA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "comment-json": "^4.2.3"
+ }
+ },
+ "node_modules/@inlang/sdk": {
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/@inlang/sdk/-/sdk-4.3.1.tgz",
+ "integrity": "sha512-l44ZFnTrPXUbrjBKwuFdXtjhm15LarlvDtWG7sHaCkgiAT7Mx3IPbwgPtD+ULFg05nRTbRrfMPyg9UuKbPW11Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@lix-js/sdk": "0.20.1",
+ "@sinclair/typebox": "^0.31.17",
+ "kysely": "^0.28.12",
+ "uuid": "^14.0.0"
+ },
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/@jridgewell/gen-mapping": {
+ "version": "0.3.13",
+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
+ "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/sourcemap-codec": "^1.5.0",
+ "@jridgewell/trace-mapping": "^0.3.24"
+ }
+ },
+ "node_modules/@jridgewell/remapping": {
+ "version": "2.3.5",
+ "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz",
+ "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/gen-mapping": "^0.3.5",
+ "@jridgewell/trace-mapping": "^0.3.24"
+ }
+ },
+ "node_modules/@jridgewell/resolve-uri": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.3.tgz",
+ "integrity": "sha512-lhTtjtoEArWBjismtfS761S9Hlyn+nIZqOZVYoZ1Xn82PMNMVnk+jj/NhC4fAXGTs7ydONcJiR5vyQBTMDu27g==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/sourcemap-codec": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz",
+ "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@jridgewell/trace-mapping": {
+ "version": "0.3.31",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz",
+ "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/resolve-uri": "^3.1.0",
+ "@jridgewell/sourcemap-codec": "^1.4.14"
+ }
+ },
+ "node_modules/@lix-js/sdk": {
+ "version": "0.20.1",
+ "resolved": "https://registry.npmjs.org/@lix-js/sdk/-/sdk-0.20.1.tgz",
+ "integrity": "sha512-oscOFP8Cr1My6Wh2KVYC9+aJ1mHs+d7vnD+7PPJaA4L+Y1FR37Sm99SrFGfvUizaj/XtRi2GlDF2IOFt9iXMNQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@bytecodealliance/jco-transpile": "0.13.0",
+ "binaryen": "130.0.0",
+ "fflate": "^0.8.3"
+ }
+ },
+ "node_modules/@napi-rs/wasm-runtime": {
+ "version": "1.2.7",
+ "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.7.tgz",
+ "integrity": "sha512-zJccwplOAbgfZju95IUHazLnx9RAPtPN2YGJXI6UbrgeaR9QfPjGrQL6ERkSAtnVCA4Q+83ApGyaX5zdpCaKkQ==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "@tybys/wasm-util": "^0.10.3"
+ },
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=23.5.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/Brooooooklyn"
+ },
+ "peerDependencies": {
+ "@emnapi/core": "^1.7.1 || 2.0.0-beta.2 || 2.0.0-beta.3",
+ "@emnapi/runtime": "^1.7.1 || 2.0.0-beta.2 || 2.0.0-beta.3"
+ }
+ },
+ "node_modules/@oxc-minify/binding-android-arm-eabi": {
+ "version": "0.136.0",
+ "resolved": "https://registry.npmjs.org/@oxc-minify/binding-android-arm-eabi/-/binding-android-arm-eabi-0.136.0.tgz",
+ "integrity": "sha512-gk1jzky1vLeOcK7w9Ib2RT/UooZ7O21s8YSeXCsy4tzsmguKb3Cbsv/Ra2fKhMp4mKeKCzvC1Xa41OfSBWfWdQ==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-minify/binding-android-arm64": {
+ "version": "0.136.0",
+ "resolved": "https://registry.npmjs.org/@oxc-minify/binding-android-arm64/-/binding-android-arm64-0.136.0.tgz",
+ "integrity": "sha512-5GIYanqud/ohXEcg2dsdn0+eSKXqclw5qlRUkvSM1sKEa4ZQ7hqOk8XPJBNPh3LXXw+Qw85B6jkmOFLKsCHp5w==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-minify/binding-darwin-arm64": {
+ "version": "0.136.0",
+ "resolved": "https://registry.npmjs.org/@oxc-minify/binding-darwin-arm64/-/binding-darwin-arm64-0.136.0.tgz",
+ "integrity": "sha512-QAMpHKXWOoMCTenSZjQjVT5YmMooujlCKAf1T3PHFl2LuaA6ukQFXba0bgSLgAxRrAeX/itkwi4lzVQXtYmnRg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-minify/binding-darwin-x64": {
+ "version": "0.136.0",
+ "resolved": "https://registry.npmjs.org/@oxc-minify/binding-darwin-x64/-/binding-darwin-x64-0.136.0.tgz",
+ "integrity": "sha512-rDnoPj8hztiU8C1VNKuzujh7SgTJlgiUvUCiWQjTnVSLsABsLW9ZWd1l1Ji0VN3UW39wGpptgvahIWTrHnGH/A==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-minify/binding-freebsd-x64": {
+ "version": "0.136.0",
+ "resolved": "https://registry.npmjs.org/@oxc-minify/binding-freebsd-x64/-/binding-freebsd-x64-0.136.0.tgz",
+ "integrity": "sha512-9fGSgP7uyPLCTjMx9z3AUV4UjnfOVoGTH5JzamLegPwGLJ97Gr1jht1437CRk8ZNabGmxQR6qNn3e+Tox2lswg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-minify/binding-linux-arm-gnueabihf": {
+ "version": "0.136.0",
+ "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-0.136.0.tgz",
+ "integrity": "sha512-k0QvZS+x6ROI4O5Ikqn9dDU2dmkEJ46Yh6baZJI/eUk/a1k1GOs9/vyXItLZrKlwYrSgdEx2BFXbKgyd1NyRPw==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-minify/binding-linux-arm-musleabihf": {
+ "version": "0.136.0",
+ "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-0.136.0.tgz",
+ "integrity": "sha512-iRFxUc8ubotVfuyq3e4LPGbHrjvWd1/B3499a55GueMLc1EDJ0fHzNXJiCx2eMQGfzHtHodjmvrJ2BSvSXBNhQ==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-minify/binding-linux-arm64-gnu": {
+ "version": "0.136.0",
+ "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.136.0.tgz",
+ "integrity": "sha512-hbKxNCXJsULrb6EyG5SumzJKuPfP8Y0UQ/TElRgXVUhyyPf6cBPlF8HMq+MAylF98ACBzV8jBp2Mm62lJyTo+w==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-minify/binding-linux-arm64-musl": {
+ "version": "0.136.0",
+ "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.136.0.tgz",
+ "integrity": "sha512-T+u/CGKW0UXemJeVux4ix6rK+ug3bQCUEbu5hFlX9K61KQNd44rOcrM15mDK99L7USaXwmiwHeIkEDvmmyDMSA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-minify/binding-linux-ppc64-gnu": {
+ "version": "0.136.0",
+ "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-0.136.0.tgz",
+ "integrity": "sha512-WNPTN2F448tb49BoqjV9IMRzZWa0WB8GHzrB+bnxKQPOyzz07T6rmDKrr4Hjl81ADGjDYSsr1fgXcjyLQFdMdw==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-minify/binding-linux-riscv64-gnu": {
+ "version": "0.136.0",
+ "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-0.136.0.tgz",
+ "integrity": "sha512-MvcCfu8OeabrmNN9wqhh8Gqizg68RQ3iOvXBJmlLMy5p1PC6az9bAwqOk98lsCmKI4I5LpULekOlfxRYh3o5Kw==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-minify/binding-linux-riscv64-musl": {
+ "version": "0.136.0",
+ "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-0.136.0.tgz",
+ "integrity": "sha512-rwJXFUFFA0egAULtOOgfW8YhhLhtWrr2qFxftvZ7/U6Xtxiev8i+eCwSNW1RpHiX74QMsJVpRE3ykoefqb1MtQ==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-minify/binding-linux-s390x-gnu": {
+ "version": "0.136.0",
+ "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-0.136.0.tgz",
+ "integrity": "sha512-qizAxHmj7VHm5/D5qiIlvzxAS2tlmadDOJ5XFI7zx/wfnk/+fdk5iVaHOv+C4tDE/4wLQyMoBYVIs6R1LeN91w==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-minify/binding-linux-x64-gnu": {
+ "version": "0.136.0",
+ "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.136.0.tgz",
+ "integrity": "sha512-gcyLAad0UblkEhGjVfx5Mwq63OSx8r04IbcfwzpZYpHisO/vioMsrs4GkDsQZ2Ejc8cdUk6YMIrf9FwNBzh+Dw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-minify/binding-linux-x64-musl": {
+ "version": "0.136.0",
+ "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-x64-musl/-/binding-linux-x64-musl-0.136.0.tgz",
+ "integrity": "sha512-QAK6kwBjljX6luYzeppVdRP3gTaFNFfp9iS/V0cCvU43wUZay5xFXBgmzBHYrzZV2MhzURNnXfEZRo9poAxyvA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-minify/binding-openharmony-arm64": {
+ "version": "0.136.0",
+ "resolved": "https://registry.npmjs.org/@oxc-minify/binding-openharmony-arm64/-/binding-openharmony-arm64-0.136.0.tgz",
+ "integrity": "sha512-nIGxkTOnN9GwslmooxbZ3Ti2RgbX9QLHy0X9uO0pslOT+4dsNVUawBU/6r4M5cWM+ZdRD2tOF4V+n0l8tS59nQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-minify/binding-wasm32-wasi": {
+ "version": "0.136.0",
+ "resolved": "https://registry.npmjs.org/@oxc-minify/binding-wasm32-wasi/-/binding-wasm32-wasi-0.136.0.tgz",
+ "integrity": "sha512-YB3G8AHT6PpDS8/DfjlJrQjywj+/6gCkNBcAJdYzcYbQRIZE6SaTNowiGuZPR1m1jOl1WjcjefniKSmVxzhvRA==",
+ "cpu": [
+ "wasm32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "@emnapi/core": "1.11.1",
+ "@emnapi/runtime": "1.11.1",
+ "@napi-rs/wasm-runtime": "^1.1.5"
+ },
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-minify/binding-wasm32-wasi/node_modules/@emnapi/runtime": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.1.tgz",
+ "integrity": "sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@oxc-minify/binding-win32-arm64-msvc": {
+ "version": "0.136.0",
+ "resolved": "https://registry.npmjs.org/@oxc-minify/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-0.136.0.tgz",
+ "integrity": "sha512-UVRH3BlNc2rmla+sbSd5xTF/u+esCqZS6VSWPolZybcBh3TlVe1Sf5MOuHQWUaFoyv5uFOvee4hOfS/14nPvZw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-minify/binding-win32-ia32-msvc": {
+ "version": "0.136.0",
+ "resolved": "https://registry.npmjs.org/@oxc-minify/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-0.136.0.tgz",
+ "integrity": "sha512-zFGkUd82jci0E+isc2O36lVmmXVUDXyEMN2RYIyez+MBNqhdjPLIGx62FCsrJtLKeuiPf/8XkFv977aUtndUng==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-minify/binding-win32-x64-msvc": {
+ "version": "0.136.0",
+ "resolved": "https://registry.npmjs.org/@oxc-minify/binding-win32-x64-msvc/-/binding-win32-x64-msvc-0.136.0.tgz",
+ "integrity": "sha512-VHgPwd5xibC9UYxBeq7nURTjY+wxhdumllij6JaCIUVfD9IRcrA66SVlJ5fPNoUXcRp8ZXhJfoIZwVz9wAEGJw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-project/types": {
+ "version": "0.160.0",
+ "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.160.0.tgz",
+ "integrity": "sha512-gw4k9syEmnckbOgw2A2FU1TBDdX9hfwV9jEn/uio65pguPzwWiXQS3OIJDMEhv9m06tj9XiEe6RoD0YA+LgreA==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/oxc-project"
+ }
+ },
+ "node_modules/@poppinss/colors": {
+ "version": "4.1.6",
+ "resolved": "https://registry.npmjs.org/@poppinss/colors/-/colors-4.1.6.tgz",
+ "integrity": "sha512-H9xkIdFswbS8n1d6vmRd8+c10t2Qe+rZITbbDHHkQixH5+2x1FDGmi/0K+WgWiqQFKPSlIYB7jlH6Kpfn6Fleg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "kleur": "^4.1.5"
+ }
+ },
+ "node_modules/@poppinss/dumper": {
+ "version": "0.6.5",
+ "resolved": "https://registry.npmjs.org/@poppinss/dumper/-/dumper-0.6.5.tgz",
+ "integrity": "sha512-NBdYIb90J7LfOI32dOewKI1r7wnkiH6m920puQ3qHUeZkxNkQiFnXVWoE6YtFSv6QOiPPf7ys6i+HWWecDz7sw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@poppinss/colors": "^4.1.5",
+ "@sindresorhus/is": "^7.0.2",
+ "supports-color": "^10.0.0"
+ }
+ },
+ "node_modules/@poppinss/exception": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/@poppinss/exception/-/exception-1.2.3.tgz",
+ "integrity": "sha512-dCED+QRChTVatE9ibtoaxc+WkdzOSjYTKi/+uacHWIsfodVfpsueo3+DKpgU5Px8qXjgmXkSvhXvSCz3fnP9lw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@rolldown/binding-android-arm-eabi": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.3.4.tgz",
+ "integrity": "sha512-xCW8CkL/ualx/SbYqeG9iK87lJCZGDQ0soE+kaORJ0Bd+pHALyE4qK7BStmEAyYWLEzZ3/biSIpA6/7GDFvzIg==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-android-arm64": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.3.4.tgz",
+ "integrity": "sha512-5lifIO+b/prcM9sx/bkPN4w6UEToEfQ3gjhx0+0neuL+dkYskI792CfAq03T51jc8JFcaYXs2hi3l8RjiH/VWQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-darwin-arm64": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.3.4.tgz",
+ "integrity": "sha512-RCgxTI4AJQxhVF//BI3ImQOsXTHrF4Eg+f99jBy8WoETA2kSEGFxpnrVmW0leQq/2aBR4R5AC6csmy3rc66e3Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-darwin-x64": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.3.4.tgz",
+ "integrity": "sha512-zNPJVVPUaDEj+L0lImoK3rFv2b+Z5gNijI6DWu/fcD3/1TfmRXKb9ZyxbSN+2AhlctqjbNzUvCsMa+EBhnEM4Q==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-freebsd-x64": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.3.4.tgz",
+ "integrity": "sha512-upP6g7ZIRy5by1RDQ/EphHIdJ5xK0eUD7sUgfZFWJ49s4XdbYsIvIlAPtrFpayR70Hhf9J22lb4Pm8/9FhrZmg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-arm-gnueabihf": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.3.4.tgz",
+ "integrity": "sha512-SAX5C5+poMLCxu8dkPF6h5yst40rkzs+9Y3cbPn2OFSydmHjAEprrGi64zGgnYyPIVZfdGUFqJ2fJbfbnHI+mA==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-arm64-gnu": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.3.4.tgz",
+ "integrity": "sha512-nwHqdlRZS6GWBef3dG5/pMY6RNTBBUjj7s0Da+m6xsFpe7jx6IC46SLZcCu8f46JOfCovZmwnrz51EzGE+7Fyw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-arm64-musl": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.3.4.tgz",
+ "integrity": "sha512-Gr78X2ur/AgLCkmZgHffk/FerIX8S5zb/eII4bCcvJo0ANzeXhTShahdNbpnY6bpiszIAgIfiuKS9ziziWsamw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-ppc64-gnu": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.3.4.tgz",
+ "integrity": "sha512-o9Wcn8nWrsQasaBRYM4d//FwhlBsTJYWkPVlhlt6FwzpwEoovY4IopRZjk5Fq3+ntRuSDORJjF/nA8sFeF2q6w==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-s390x-gnu": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.3.4.tgz",
+ "integrity": "sha512-UDWu4jkVcx2kiBKm3Ec//4lVCbeTWj8gmJ9SyLWCdLWtTlyq7fQVeVV/14nXvRtSLErvJ2+yA/Ux5taS31Y17Q==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-x64-gnu": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.3.4.tgz",
+ "integrity": "sha512-W9mGtTa0w4fWh8RLMNPyaEhhcuqUfO07Q4I1bBc4PDMNg7gQSw0yPQNQ3D0qwbkXwxbyL4YrIzc8n6k1vuFExQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-x64-musl": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.3.4.tgz",
+ "integrity": "sha512-8B+ofyQZ7/aCmkqnyMonPr5zKLqMVNczhRGFNtdIuItiwNn8iQWJawMq2E58r7bxD1XEbtRRsULY/eCWwZQ01Q==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-openharmony-arm64": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.3.4.tgz",
+ "integrity": "sha512-TlD0FSZaC7o2B4NCe9V5N11ugTnhzTM9ksj4sgRLvrKosDzjEkvlsTX3ehkw4ZlPv8AADimZZTvJGEa16pfXug==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-wasm32-wasi": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.3.4.tgz",
+ "integrity": "sha512-jwO8P3o53ygo7b5061B7BeaJ1BGv3BKZ6jroFdw/01qWry7Z+qNBlDvulzbTle5s/A0Fc1FRgsTxrke9DvsSbA==",
+ "cpu": [
+ "wasm32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "@oxc-project/types": "0.160.0"
+ },
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=23.5.0"
+ }
+ },
+ "node_modules/@rolldown/binding-win32-arm64-msvc": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.3.4.tgz",
+ "integrity": "sha512-8adGMrNtrdzi2WD1ozhYapER59gD8Q/DV6SCKJlyG2HqULPdeQUBvMa33lTsiEYwIqTZUaIU2MmvPp5f1wbtXA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-win32-x64-msvc": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.3.4.tgz",
+ "integrity": "sha512-rIMjtESdXJCIoOiUTroQ1Y1rjVDZkuUVRUxs3APX2vNv175D7TDWvzdELiIhzGq9cUNUFat+co+PTmPHPqSREg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/pluginutils": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.1.1.tgz",
+ "integrity": "sha512-glFIJDvLNDtJhT9qrMFWLPbvS+skxgt4L0K8Ei2YtnhPysAJnsI7nyxSJxKj4ADeKX0OLjC4ntRkwpLOoS3rwA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@sinclair/typebox": {
+ "version": "0.31.30",
+ "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.31.30.tgz",
+ "integrity": "sha512-MGsM7bVmHg3sUKCphlu3SGQ+T+5JTbygZWYArfKQCW5anJeACHeqLhcnf+R7XlCWZ+QR3C8JTBx3kCKJTN69ow==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@sindresorhus/is": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-7.2.0.tgz",
+ "integrity": "sha512-P1Cz1dWaFfR4IR+U13mqqiGsLFf1KbayybWwdd2vfctdV6hDpUkgCY0nKOLLTMSoRd/jJNjtbqzf13K8DCCXQw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/is?sponsor=1"
+ }
+ },
+ "node_modules/@speed-highlight/core": {
+ "version": "1.2.24",
+ "resolved": "https://registry.npmjs.org/@speed-highlight/core/-/core-1.2.24.tgz",
+ "integrity": "sha512-qeW2e1l78afw8VhRPfPQ1Gjj+KU5XFQ/OFV5ti6eTa9bruO7mJyZtA4vw0ofqmA3tKCkROE9xLk3VZoeRc98nw==",
+ "dev": true,
+ "license": "CC0-1.0"
+ },
+ "node_modules/@tailwindcss/node": {
+ "version": "4.3.5",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.5.tgz",
+ "integrity": "sha512-yT53FzV4ke0cr/BguDxhWMpm5MJu1O2muzk+tKw6lKHjODAsYArBbWwFbJiaksfzFv1tpkO9QHGzmfs1hJT66g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/remapping": "^2.3.5",
+ "enhanced-resolve": "^5.24.5",
+ "jiti": "^2.7.0",
+ "lightningcss": "1.33.0",
+ "magic-string": "^1.1.0",
+ "source-map-js": "^1.2.1",
+ "tailwindcss": "4.3.5"
+ }
+ },
+ "node_modules/@tailwindcss/oxide": {
+ "version": "4.3.5",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.3.5.tgz",
+ "integrity": "sha512-PynqGLZsZvwM9tqD/CUxkOIfyd6K5elZ2MooauzJryP/UqXYgi3yYbtt3N0Xe+MHV/eFKPFQCEfIKAqlAS1CBg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 20"
+ },
+ "optionalDependencies": {
+ "@tailwindcss/oxide-android-arm64": "4.3.5",
+ "@tailwindcss/oxide-darwin-arm64": "4.3.5",
+ "@tailwindcss/oxide-darwin-x64": "4.3.5",
+ "@tailwindcss/oxide-freebsd-x64": "4.3.5",
+ "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.5",
+ "@tailwindcss/oxide-linux-arm64-gnu": "4.3.5",
+ "@tailwindcss/oxide-linux-arm64-musl": "4.3.5",
+ "@tailwindcss/oxide-linux-x64-gnu": "4.3.5",
+ "@tailwindcss/oxide-linux-x64-musl": "4.3.5",
+ "@tailwindcss/oxide-wasm32-wasi": "4.3.5",
+ "@tailwindcss/oxide-win32-arm64-msvc": "4.3.5",
+ "@tailwindcss/oxide-win32-x64-msvc": "4.3.5"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-android-arm64": {
+ "version": "4.3.5",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.5.tgz",
+ "integrity": "sha512-Se0z5xMqcSQanJD1IYmO0cGpK3iv0fp3ZsIT7xRJZ1Da5PghvNoc46zz4jIQn+aan3dV9T8AermFNN9QPmsh0Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-darwin-arm64": {
+ "version": "4.3.5",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.5.tgz",
+ "integrity": "sha512-UPrgTDuUbvmqGMZuCnmI3FKee/tYKzKdp00/kuB4oSGB213VYg8QTdF7lVhnPoBXq/mIfJ+ILoBFqNOboWcMwQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-darwin-x64": {
+ "version": "4.3.5",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.5.tgz",
+ "integrity": "sha512-E+p7HEtjI0b8D7kbbWxH067cGui6d4c79COGko9fAPVE3rwc1E7ld2HFCbaG86AOGWS5VKQYqZOaf38ya4uxTQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-freebsd-x64": {
+ "version": "4.3.5",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.5.tgz",
+ "integrity": "sha512-yWEWcWyAG7rWOcTpJTjdhQ3pcaFY2h+0bqTRfgU3G2fz87ZU3AKdvdZKhslD+kyHnjBUWKvNdRYwIYC5dI1tIg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": {
+ "version": "4.3.5",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.5.tgz",
+ "integrity": "sha512-WmeVjtJhZlr+smpqcdR2kQkkn6arHIJnUIBxTO2EJcTLGY1ecVXNo2hbSn8xc0IH2aEtys936iMWKGyj0GaKnA==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-linux-arm64-gnu": {
+ "version": "4.3.5",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.5.tgz",
+ "integrity": "sha512-DTCSyucc6ShMp1QMqV5R94Z7xlgNgUzkGmFF1rL5HH2Qjy4eSmEqy+YLGkqqYvWa4sILtgrBt1JjRKbneQtiFQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-linux-arm64-musl": {
+ "version": "4.3.5",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.5.tgz",
+ "integrity": "sha512-H9lsvO4x9E4nE4Hi8h7NHHw0O/kcVSu+iOyFHNGdYzazGgDjFHZbE6S3hQ8kMcbNXSBlMdNi67LV5EVqtpaJtw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-linux-x64-gnu": {
+ "version": "4.3.5",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.5.tgz",
+ "integrity": "sha512-4uxQvtBvPuIdl13WfUBj9xMZHH14PtHZ8OZdtLmdyDtG66sCa1t599NZT+jagkUzRtWhuul1qRZQ1nAJscXN5g==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-linux-x64-musl": {
+ "version": "4.3.5",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.5.tgz",
+ "integrity": "sha512-0JQAzs7jwbA7O6+z/adU+Jk3AXwsu3npAhtr5escXS7TqEqWcaDV7qHuI+0Vy/KQRuVGnLQREcSJWYauyV3oqg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-wasm32-wasi": {
+ "version": "4.3.5",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.5.tgz",
+ "integrity": "sha512-OJhFmlEfdzMr+avACdi40RPtnkW0B6hXyxL/8r+tnEHBWZji36CYRjEXrrvgBmaYsD3oEOBqwYFRKsYvzFe7Bw==",
+ "bundleDependencies": [
+ "@napi-rs/wasm-runtime",
+ "@emnapi/core",
+ "@emnapi/runtime",
+ "@tybys/wasm-util",
+ "@emnapi/wasi-threads",
+ "tslib"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "@emnapi/core": "^1.11.3",
+ "@emnapi/runtime": "^1.11.3",
+ "@emnapi/wasi-threads": "^1.2.3",
+ "@napi-rs/wasm-runtime": "^1.2.2",
+ "@tybys/wasm-util": "^0.10.3",
+ "tslib": "^2.8.1"
+ },
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=23.5.0"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/core": {
+ "version": "1.11.3",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "@emnapi/wasi-threads": "1.2.3",
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/runtime": {
+ "version": "1.11.3",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/wasi-threads": {
+ "version": "1.2.3",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@napi-rs/wasm-runtime": {
+ "version": "1.2.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "@tybys/wasm-util": "^0.10.3"
+ },
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=23.5.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/Brooooooklyn"
+ },
+ "peerDependencies": {
+ "@emnapi/core": "^1.7.1 || ^2.0.0-alpha.3",
+ "@emnapi/runtime": "^1.7.1 || ^2.0.0-alpha.3"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@tybys/wasm-util": {
+ "version": "0.10.3",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/tslib": {
+ "version": "2.8.1",
+ "dev": true,
+ "inBundle": true,
+ "license": "0BSD",
+ "optional": true
+ },
+ "node_modules/@tailwindcss/oxide-win32-arm64-msvc": {
+ "version": "4.3.5",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.5.tgz",
+ "integrity": "sha512-9o8jgthi+QE5eandnboiJT64VQfnIArfZzSTdgbhEK5aafdiu2jTW9Honi/mwYHxBZuH1vAC57IFyrh+0iK5Gg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-win32-x64-msvc": {
+ "version": "4.3.5",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.5.tgz",
+ "integrity": "sha512-XiKFfIy1RWe7qK4WqByxNW7Oz1/nkOy8o/BWhHminyV1PmpUd8Eedj5v2A8h2kpqeVlz6xRnwk9Fr/ZXNLcZfg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/@tailwindcss/vite": {
+ "version": "4.3.5",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.3.5.tgz",
+ "integrity": "sha512-BCNiY0a1ZjdOHVqw7kyb7U72BwfMF3dfUuN+tQsLWky/J5JOI/r7abibglXfygrZhVO/3u3V+E25kkKTeMkXaQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@tailwindcss/node": "4.3.5",
+ "@tailwindcss/oxide": "4.3.5",
+ "tailwindcss": "4.3.5"
+ },
+ "peerDependencies": {
+ "vite": "^5.2.0 || ^6 || ^7 || ^8"
+ }
+ },
+ "node_modules/@tybys/wasm-util": {
+ "version": "0.10.5",
+ "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.5.tgz",
+ "integrity": "sha512-dOGOPxlaNV+G046mZzN+9C0dAcQZeSKcXiVaM0TYy/LM4ttTmgSBDxYfovcYI8Em3+eAbiAYpvWLOv8+ZVRJKA==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@types/chai": {
+ "version": "5.2.3",
+ "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz",
+ "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/deep-eql": "*",
+ "assertion-error": "^2.0.1"
+ }
+ },
+ "node_modules/@types/deep-eql": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz",
+ "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/estree": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.11.tgz",
+ "integrity": "sha512-YBdNe5JcjYR0sPhJW1QIeRCmI11YhYvaRuGCs9+WCeTTb+Yhb2BE2XMe5/wAqF10FK5g3+q1PDhQABfT7aX0gg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/node": {
+ "version": "26.6.11",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.11.tgz",
+ "integrity": "sha512-uUyQ2XLEz+EXh34lmS3GhKrkqn/8FU7KUiKRpk347At2bmnMVWss45yz8b4FG/tUtmV1tV/+TVkITItPROyeeQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "undici-types": "~8.9.0"
+ }
+ },
+ "node_modules/@types/qrcode": {
+ "version": "1.5.6",
+ "resolved": "https://registry.npmjs.org/@types/qrcode/-/qrcode-1.5.6.tgz",
+ "integrity": "sha512-te7NQcV2BOvdj2b1hCAHzAoMNuj65kNBMz0KBaxM6c3VGBOhU0dURQKOtH8CFNI/dsKkwlv32p26qYQTWoB5bw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/react": {
+ "version": "19.3.3",
+ "resolved": "https://registry.npmjs.org/@types/react/-/react-19.3.3.tgz",
+ "integrity": "sha512-K8uWpJc4teiuOPdiP1umjeA9rGMgVPiXuoL66fcS1QlwBT1WMqY8PORmub9FadopIs+RCW6siYEs7Lpq+vDlog==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "csstype": "^3.2.2"
+ }
+ },
+ "node_modules/@types/react-dom": {
+ "version": "19.3.0",
+ "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.3.0.tgz",
+ "integrity": "sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q==",
+ "dev": true,
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "^19.3.0"
+ }
+ },
+ "node_modules/@typescript/typescript-aix-ppc64": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/@typescript/typescript-aix-ppc64/-/typescript-aix-ppc64-7.0.2.tgz",
+ "integrity": "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "aix"
+ ],
+ "engines": {
+ "node": ">=16.20.0"
+ }
+ },
+ "node_modules/@typescript/typescript-darwin-arm64": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-arm64/-/typescript-darwin-arm64-7.0.2.tgz",
+ "integrity": "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=16.20.0"
+ }
+ },
+ "node_modules/@typescript/typescript-darwin-x64": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-x64/-/typescript-darwin-x64-7.0.2.tgz",
+ "integrity": "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=16.20.0"
+ }
+ },
+ "node_modules/@typescript/typescript-freebsd-arm64": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-arm64/-/typescript-freebsd-arm64-7.0.2.tgz",
+ "integrity": "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=16.20.0"
+ }
+ },
+ "node_modules/@typescript/typescript-freebsd-x64": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-x64/-/typescript-freebsd-x64-7.0.2.tgz",
+ "integrity": "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=16.20.0"
+ }
+ },
+ "node_modules/@typescript/typescript-linux-arm": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm/-/typescript-linux-arm-7.0.2.tgz",
+ "integrity": "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=16.20.0"
+ }
+ },
+ "node_modules/@typescript/typescript-linux-arm64": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm64/-/typescript-linux-arm64-7.0.2.tgz",
+ "integrity": "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=16.20.0"
+ }
+ },
+ "node_modules/@typescript/typescript-linux-loong64": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-loong64/-/typescript-linux-loong64-7.0.2.tgz",
+ "integrity": "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=16.20.0"
+ }
+ },
+ "node_modules/@typescript/typescript-linux-mips64el": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-mips64el/-/typescript-linux-mips64el-7.0.2.tgz",
+ "integrity": "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==",
+ "cpu": [
+ "mips64el"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=16.20.0"
+ }
+ },
+ "node_modules/@typescript/typescript-linux-ppc64": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-ppc64/-/typescript-linux-ppc64-7.0.2.tgz",
+ "integrity": "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=16.20.0"
+ }
+ },
+ "node_modules/@typescript/typescript-linux-riscv64": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-riscv64/-/typescript-linux-riscv64-7.0.2.tgz",
+ "integrity": "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=16.20.0"
+ }
+ },
+ "node_modules/@typescript/typescript-linux-s390x": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-s390x/-/typescript-linux-s390x-7.0.2.tgz",
+ "integrity": "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=16.20.0"
+ }
+ },
+ "node_modules/@typescript/typescript-linux-x64": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-x64/-/typescript-linux-x64-7.0.2.tgz",
+ "integrity": "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=16.20.0"
+ }
+ },
+ "node_modules/@typescript/typescript-netbsd-arm64": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-arm64/-/typescript-netbsd-arm64-7.0.2.tgz",
+ "integrity": "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=16.20.0"
+ }
+ },
+ "node_modules/@typescript/typescript-netbsd-x64": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-x64/-/typescript-netbsd-x64-7.0.2.tgz",
+ "integrity": "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=16.20.0"
+ }
+ },
+ "node_modules/@typescript/typescript-openbsd-arm64": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-arm64/-/typescript-openbsd-arm64-7.0.2.tgz",
+ "integrity": "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=16.20.0"
+ }
+ },
+ "node_modules/@typescript/typescript-openbsd-x64": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-x64/-/typescript-openbsd-x64-7.0.2.tgz",
+ "integrity": "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=16.20.0"
+ }
+ },
+ "node_modules/@typescript/typescript-sunos-x64": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/@typescript/typescript-sunos-x64/-/typescript-sunos-x64-7.0.2.tgz",
+ "integrity": "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "engines": {
+ "node": ">=16.20.0"
+ }
+ },
+ "node_modules/@typescript/typescript-win32-arm64": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-arm64/-/typescript-win32-arm64-7.0.2.tgz",
+ "integrity": "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=16.20.0"
+ }
+ },
+ "node_modules/@typescript/typescript-win32-x64": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-x64/-/typescript-win32-x64-7.0.2.tgz",
+ "integrity": "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=16.20.0"
+ }
+ },
+ "node_modules/@vitejs/plugin-react": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-6.3.1.tgz",
+ "integrity": "sha512-kYc/mQZ8hnpFXNJXdrbm6kUbLya+V+Q5o3V2j06tR+4lVSyY9Pgx0eBw+eYTVseNUiMY2hr/3PM/EHVOYNKuHw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@rolldown/pluginutils": "^1.1.1"
+ },
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ },
+ "peerDependencies": {
+ "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0 || ^0.3.0",
+ "babel-plugin-react-compiler": "^1.0.0",
+ "oxc-transform-react": ">=0.152.0 <0.157.0",
+ "vite": "^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@rolldown/plugin-babel": {
+ "optional": true
+ },
+ "babel-plugin-react-compiler": {
+ "optional": true
+ },
+ "oxc-transform-react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@vitest/mocker": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-5.1.2.tgz",
+ "integrity": "sha512-UGc97wUIy0Ji2+9GxzHEJiOhiwkaukgE7VYcUNnjpX3sWnwQ8XogmNXX4WyOukxYgKb8Nh2XFa7KId0ZjpmVhQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/trace-mapping": "0.3.31",
+ "@vitest/spy": "5.1.2",
+ "estree-walker": "^3.0.3",
+ "magic-string": "^1.4.5"
+ },
+ "funding": {
+ "url": "https://opencollective.com/vitest"
+ },
+ "peerDependencies": {
+ "msw": "^2.4.9 || ^3.0.0",
+ "vite": "^6.0.0 || ^7.0.0 || ^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "msw": {
+ "optional": true
+ },
+ "vite": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@vitest/spy": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-5.1.2.tgz",
+ "integrity": "sha512-PQl0/3+p9GaY71+MHywN6oyHfLhVDD5kcbm7oNRldA2F0ExMU3S8RQdnpteJ9gFAdK5P6KCgE6LqCpUgy57KzA==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "url": "https://opencollective.com/vitest"
+ }
+ },
+ "node_modules/acorn": {
+ "version": "8.19.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.19.0.tgz",
+ "integrity": "sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "license": "MIT",
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/array-timsort": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/array-timsort/-/array-timsort-1.0.3.tgz",
+ "integrity": "sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/assertion-error": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz",
+ "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/binaryen": {
+ "version": "130.0.0",
+ "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-130.0.0.tgz",
+ "integrity": "sha512-XDrb+zql0RbFPKgj7MuH9zOc78R3Fa/P/VSGnnpdwYsvNZPWjcMYMdAkKCOQEL2A7yqgjSMTDRFp6gfSDW+/QQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "bin": {
+ "wasm-as": "bin/wasm-as",
+ "wasm-ctor-eval": "bin/wasm-ctor-eval",
+ "wasm-dis": "bin/wasm-dis",
+ "wasm-merge": "bin/wasm-merge",
+ "wasm-metadce": "bin/wasm-metadce",
+ "wasm-opt": "bin/wasm-opt",
+ "wasm-reduce": "bin/wasm-reduce",
+ "wasm-shell": "bin/wasm-shell",
+ "wasm2js": "bin/wasm2js"
+ }
+ },
+ "node_modules/blake3-wasm": {
+ "version": "2.1.5",
+ "resolved": "https://registry.npmjs.org/blake3-wasm/-/blake3-wasm-2.1.5.tgz",
+ "integrity": "sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/camelcase": {
+ "version": "5.3.1",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
+ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/cf": {
+ "version": "1.0.0-rc.7",
+ "resolved": "https://registry.npmjs.org/cf/-/cf-1.0.0-rc.7.tgz",
+ "integrity": "sha512-UE+XKdKo6ka2G/Du+B/ei6RyCBB3Tiy8170My9f8+0/ql52p4G1TOKHDLRYYTDmb4i1fNbYFkPkC6rUikLfxZg==",
+ "dev": true,
+ "license": "MIT OR Apache-2.0",
+ "dependencies": {
+ "@cloudflare/build-output-utils": "1.0.0-rc.6",
+ "@cloudflare/config": "1.0.0-rc.5",
+ "@cloudflare/runtime-types": "0.1.36",
+ "blake3-wasm": "2.1.5",
+ "miniflare": "5.20261127.1-beta"
+ },
+ "bin": {
+ "cf": "bin/cf",
+ "cloudflare": "bin/cf"
+ },
+ "engines": {
+ "node": "^22.23.0 || ^24.22.0 || ^26.12.0"
+ }
+ },
+ "node_modules/cf/node_modules/@cloudflare/build-output-utils": {
+ "version": "1.0.0-rc.6",
+ "resolved": "https://registry.npmjs.org/@cloudflare/build-output-utils/-/build-output-utils-1.0.0-rc.6.tgz",
+ "integrity": "sha512-76HLkywpc/bIuWhY8nmNzy1pcLHCeK3p8SC6wdAtB1MYcbJK9fp+E2O+vwh4TcqWUJZJ9mNnMOxulF1zbHL5LA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@cloudflare/config": "1.0.0-rc.5"
+ }
+ },
+ "node_modules/cf/node_modules/@cloudflare/config": {
+ "version": "1.0.0-rc.5",
+ "resolved": "https://registry.npmjs.org/@cloudflare/config/-/config-1.0.0-rc.5.tgz",
+ "integrity": "sha512-EJGL1OqAj4NZpAscupy8i+tOcYpjJI0WPCg3rAytBHKoV+DtrrOVgZZIq52fDj7k99AAdrw+J5KjPJYVfluKMg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "zod": "4.6.6"
+ }
+ },
+ "node_modules/cf/node_modules/@cloudflare/runtime-types": {
+ "version": "0.1.36",
+ "resolved": "https://registry.npmjs.org/@cloudflare/runtime-types/-/runtime-types-0.1.36.tgz",
+ "integrity": "sha512-I3HSTmvL5T1ZLKTdCH6+T4qnOCMWHeS4C6DZbUd2daNEBgrn+R9ivvHHIuBCMdfebv4ymIfsDoeg0EzNWZeZvQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "miniflare": "5.20261127.1-beta",
+ "workerd": "1.20261127.1"
+ }
+ },
+ "node_modules/cf/node_modules/@cloudflare/workerd-darwin-64": {
+ "version": "1.20261127.1",
+ "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20261127.1.tgz",
+ "integrity": "sha512-7kDdqYmmWX8S/P9pE6ae9BFU807UjivLqtF2dzUGXIQVYEenY+S8zQcKtaRm9wzhkmq8ZYyIjm0XYW5SEc8kMg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/cf/node_modules/@cloudflare/workerd-darwin-arm64": {
+ "version": "1.20261127.1",
+ "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20261127.1.tgz",
+ "integrity": "sha512-mSgMwlIlMsfLfzWTUi3ngrahDb8P+TKTbtic4nvEJOnnYM1KtZNf8EfYQHtB2GVoXau79uK0UEdS+kAN0WItAg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/cf/node_modules/@cloudflare/workerd-linux-64": {
+ "version": "1.20261127.1",
+ "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20261127.1.tgz",
+ "integrity": "sha512-/7c3pJfyn9tg38nXEzLqdZPTwWolhlVOVyBv85FoWSmMPC23eQsFunRQAgsWi1Os/h1a6n3505MAChgqYrpq7w==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/cf/node_modules/@cloudflare/workerd-linux-arm64": {
+ "version": "1.20261127.1",
+ "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20261127.1.tgz",
+ "integrity": "sha512-x/MJ8Vd+Q9VamNtj3pFRJZdZc9r3HcSqOpU6XfhcOTFuQEpA9t/0/DWdP27NrzxKNdHV5139XYxUw+x/oGY/Kw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/cf/node_modules/@cloudflare/workerd-windows-64": {
+ "version": "1.20261127.1",
+ "resolved": "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20261127.1.tgz",
+ "integrity": "sha512-ebko9XaZy6iqDHLr4WH2dC01Hf8L8xQe2GxBwqdsUfAmhMPGbnk33GtvR5FFaae+CPCPiU/H2TY1WeJ8cNSKdQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/cf/node_modules/miniflare": {
+ "version": "5.20261127.1-beta",
+ "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-5.20261127.1-beta.tgz",
+ "integrity": "sha512-QEmP4WEmcKYtfL0ymm1zW443zwDLFGi32wAex7H9HHpFJ5sNhzQO/IoXJaum8vwQnduogmMf+2+6s8bK49Hzmw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@cspotcode/source-map-support": "0.8.1",
+ "sharp": "0.35.5",
+ "undici": "7.30.2",
+ "workerd": "1.20261127.1",
+ "ws": "8.21.0",
+ "youch": "4.1.0-beta.10"
+ },
+ "engines": {
+ "node": ">=22.12.0"
+ },
+ "peerDependencies": {
+ "kerberos": "^2.0.0"
+ },
+ "peerDependenciesMeta": {
+ "kerberos": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/cf/node_modules/workerd": {
+ "version": "1.20261127.1",
+ "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20261127.1.tgz",
+ "integrity": "sha512-0iiH4PRpbGnXCh9MWYczOWciw6d0ddFZ1W/I/W8qCRS2oZSNv6swptZ/n1U5pJRyrYaO9Eh6oo3Kc7+iPix4hg==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "Apache-2.0",
+ "bin": {
+ "workerd": "bin/workerd"
+ },
+ "engines": {
+ "node": ">=16"
+ },
+ "optionalDependencies": {
+ "@cloudflare/workerd-darwin-64": "1.20261127.1",
+ "@cloudflare/workerd-darwin-arm64": "1.20261127.1",
+ "@cloudflare/workerd-linux-64": "1.20261127.1",
+ "@cloudflare/workerd-linux-arm64": "1.20261127.1",
+ "@cloudflare/workerd-windows-64": "1.20261127.1"
+ }
+ },
+ "node_modules/chai": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/chai/-/chai-6.3.0.tgz",
+ "integrity": "sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/cliui": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
+ "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
+ "license": "ISC",
+ "dependencies": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.0",
+ "wrap-ansi": "^6.2.0"
+ }
+ },
+ "node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "license": "MIT",
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "license": "MIT"
+ },
+ "node_modules/commander": {
+ "version": "11.1.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz",
+ "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/comment-json": {
+ "version": "4.6.2",
+ "resolved": "https://registry.npmjs.org/comment-json/-/comment-json-4.6.2.tgz",
+ "integrity": "sha512-R2rze/hDX30uul4NZoIZ76ImSJLFxn/1/ZxtKC1L77y2X1k+yYu1joKbAtMA2Fg3hZrTOiw0I5mwVMo0cf250w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "array-timsort": "^1.0.3",
+ "esprima": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/consola": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.0.tgz",
+ "integrity": "sha512-EiPU8G6dQG0GFHNR8ljnZFki/8a+cQwEQ+7wpxdChl02Q8HXlwEZWD5lqAF8vC2sEC3Tehr8hy7vErz88LHyUA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^14.18.0 || >=16.10.0"
+ }
+ },
+ "node_modules/cookie": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.1.1.tgz",
+ "integrity": "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/csstype": {
+ "version": "3.2.4",
+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.4.tgz",
+ "integrity": "sha512-PoKaoPzQapnEoqUSnHx1u6W6ku8CVEgKsnpmmzU3m1nwkidpPBQ8V/Zq2+bWNrsOKoKLwTGdbx6xF7BXP1zLVQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/decamelize": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
+ "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/detect-libc": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
+ "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/dijkstrajs": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.3.tgz",
+ "integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==",
+ "license": "MIT"
+ },
+ "node_modules/emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "license": "MIT"
+ },
+ "node_modules/enhanced-resolve": {
+ "version": "5.27.1",
+ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.27.1.tgz",
+ "integrity": "sha512-QnT3ioXm47iCbUZ4yz+I04XStINU9hslvd0XuifFqp9VjkEP3tOAhmhfbRCn4W5uFlpP76XqzFh4eQ8wRGRWMQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "graceful-fs": "^4.2.4",
+ "tapable": "^2.3.3"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/error-stack-parser-es": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/error-stack-parser-es/-/error-stack-parser-es-1.0.5.tgz",
+ "integrity": "sha512-5qucVt2XcuGMcEGgWI7i+yZpmpByQ8J1lHhcL7PwqCwu9FPP3VUXzT4ltHe5i2z9dePwEHcDVOAfSnHsOlCXRA==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/antfu"
+ }
+ },
+ "node_modules/es-module-lexer": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.2.tgz",
+ "integrity": "sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/esbuild": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz",
+ "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "optional": true,
+ "peer": true,
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "optionalDependencies": {
+ "@esbuild/aix-ppc64": "0.28.2",
+ "@esbuild/android-arm": "0.28.2",
+ "@esbuild/android-arm64": "0.28.2",
+ "@esbuild/android-x64": "0.28.2",
+ "@esbuild/darwin-arm64": "0.28.2",
+ "@esbuild/darwin-x64": "0.28.2",
+ "@esbuild/freebsd-arm64": "0.28.2",
+ "@esbuild/freebsd-x64": "0.28.2",
+ "@esbuild/linux-arm": "0.28.2",
+ "@esbuild/linux-arm64": "0.28.2",
+ "@esbuild/linux-ia32": "0.28.2",
+ "@esbuild/linux-loong64": "0.28.2",
+ "@esbuild/linux-mips64el": "0.28.2",
+ "@esbuild/linux-ppc64": "0.28.2",
+ "@esbuild/linux-riscv64": "0.28.2",
+ "@esbuild/linux-s390x": "0.28.2",
+ "@esbuild/linux-x64": "0.28.2",
+ "@esbuild/netbsd-arm64": "0.28.2",
+ "@esbuild/netbsd-x64": "0.28.2",
+ "@esbuild/openbsd-arm64": "0.28.2",
+ "@esbuild/openbsd-x64": "0.28.2",
+ "@esbuild/openharmony-arm64": "0.28.2",
+ "@esbuild/sunos-x64": "0.28.2",
+ "@esbuild/win32-arm64": "0.28.2",
+ "@esbuild/win32-ia32": "0.28.2",
+ "@esbuild/win32-x64": "0.28.2"
+ }
+ },
+ "node_modules/esprima": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "bin": {
+ "esparse": "bin/esparse.js",
+ "esvalidate": "bin/esvalidate.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/estree-walker": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
+ "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "^1.0.0"
+ }
+ },
+ "node_modules/event-target-polyfill": {
+ "version": "0.0.4",
+ "resolved": "https://registry.npmjs.org/event-target-polyfill/-/event-target-polyfill-0.0.4.tgz",
+ "integrity": "sha512-Gs6RLjzlLRdT8X9ZipJdIZI/Y6/HhRLyq9RdDlCsnpxr/+Nn6bU2EFGuC94GjxqhM+Nmij2Vcq98yoHrU8uNFQ==",
+ "license": "MIT"
+ },
+ "node_modules/expect-type": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz",
+ "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=12.0.0"
+ }
+ },
+ "node_modules/fdir": {
+ "version": "6.5.0",
+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "peerDependencies": {
+ "picomatch": "^3 || ^4"
+ },
+ "peerDependenciesMeta": {
+ "picomatch": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/fflate": {
+ "version": "0.8.3",
+ "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.3.tgz",
+ "integrity": "sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "license": "MIT",
+ "dependencies": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
+ "node_modules/get-caller-file": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
+ "license": "ISC",
+ "engines": {
+ "node": "6.* || 8.* || >= 10.*"
+ }
+ },
+ "node_modules/graceful-fs": {
+ "version": "4.2.12",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.12.tgz",
+ "integrity": "sha512-iuyGF2E4oafQfPsRrG2wtY2ILupMhvtdrhzrxB+0VcjsPpSPttpfYdjnGFGsTi5MaJFjI1jOKHPQ6UTbTj9TAw==",
+ "dev": true,
+ "license": "BlueOak-1.0.0"
+ },
+ "node_modules/is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/jiti": {
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz",
+ "integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "jiti": "lib/jiti-cli.mjs"
+ }
+ },
+ "node_modules/json5": {
+ "version": "2.2.3",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
+ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "json5": "lib/cli.js"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/kleur": {
+ "version": "4.1.5",
+ "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz",
+ "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/kysely": {
+ "version": "0.28.20",
+ "resolved": "https://registry.npmjs.org/kysely/-/kysely-0.28.20.tgz",
+ "integrity": "sha512-D7rXCs0Psxq2hqjg15PGzk/k2bsWY1ohT9o/Xzl8SzgWExT6GiHCz4Z0NP1z5uOE3WBG7gJ46kYdgLYCOlaLoA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/lightningcss": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz",
+ "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==",
+ "dev": true,
+ "license": "MPL-2.0",
+ "dependencies": {
+ "detect-libc": "^2.0.3"
+ },
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ },
+ "optionalDependencies": {
+ "lightningcss-android-arm64": "1.33.0",
+ "lightningcss-darwin-arm64": "1.33.0",
+ "lightningcss-darwin-x64": "1.33.0",
+ "lightningcss-freebsd-x64": "1.33.0",
+ "lightningcss-linux-arm-gnueabihf": "1.33.0",
+ "lightningcss-linux-arm64-gnu": "1.33.0",
+ "lightningcss-linux-arm64-musl": "1.33.0",
+ "lightningcss-linux-x64-gnu": "1.33.0",
+ "lightningcss-linux-x64-musl": "1.33.0",
+ "lightningcss-win32-arm64-msvc": "1.33.0",
+ "lightningcss-win32-x64-msvc": "1.33.0"
+ }
+ },
+ "node_modules/lightningcss-android-arm64": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz",
+ "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-darwin-arm64": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz",
+ "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-darwin-x64": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz",
+ "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-freebsd-x64": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz",
+ "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-linux-arm-gnueabihf": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz",
+ "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-linux-arm64-gnu": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz",
+ "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-linux-arm64-musl": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz",
+ "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-linux-x64-gnu": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz",
+ "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-linux-x64-musl": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz",
+ "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-win32-arm64-msvc": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz",
+ "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-win32-x64-msvc": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz",
+ "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "license": "MIT",
+ "dependencies": {
+ "p-locate": "^4.1.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/magic-string": {
+ "version": "1.4.5",
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.4.5.tgz",
+ "integrity": "sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/sourcemap-codec": "^1.6.0"
+ }
+ },
+ "node_modules/miniflare": {
+ "version": "5.20261129.0-beta",
+ "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-5.20261129.0-beta.tgz",
+ "integrity": "sha512-JMvkB+pBXW1pK0FTF4yANLhLfCv0TdwoXeOAkkw/EaQ9+qzJAO5jnEuXFj9lDeBcXXr/5oYkMNHNyOpgxt03Sg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@cspotcode/source-map-support": "0.8.1",
+ "sharp": "0.35.5",
+ "undici": "7.30.2",
+ "workerd": "1.20261129.1",
+ "ws": "8.21.0",
+ "youch": "4.1.0-beta.10"
+ },
+ "engines": {
+ "node": ">=22.12.0"
+ },
+ "peerDependencies": {
+ "kerberos": "^2.0.0"
+ },
+ "peerDependenciesMeta": {
+ "kerberos": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/nanoid": {
+ "version": "5.1.16",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.1.16.tgz",
+ "integrity": "sha512-kVrnsrJqMR8+oLJnGEmSWw9BivK5mt7H3FZatVRjrc5wGqFYuBxX1yG7+A7Gi5AefkX6t/oCkizcQgpu0cY1dQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "bin": {
+ "nanoid": "bin/nanoid.js"
+ },
+ "engines": {
+ "node": "^18 || >=20"
+ }
+ },
+ "node_modules/napi-windows-process-start-time": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/napi-windows-process-start-time/-/napi-windows-process-start-time-0.1.0.tgz",
+ "integrity": "sha512-zHxhzKsIFu3elch3eFw69WEUGc79DFhbc3nD/WEOzWL/pFFLZRW13EHnuO0c+0YjncE5uCaS9ICHxOBXkb6vPw==",
+ "cpu": [
+ "x64",
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/obug": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/obug/-/obug-3.0.0.tgz",
+ "integrity": "sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw==",
+ "dev": true,
+ "funding": [
+ "https://github.com/sponsors/sxzz",
+ "https://opencollective.com/debug"
+ ],
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.20.0"
+ }
+ },
+ "node_modules/oxc-minify": {
+ "version": "0.136.0",
+ "resolved": "https://registry.npmjs.org/oxc-minify/-/oxc-minify-0.136.0.tgz",
+ "integrity": "sha512-u9UvPFTYVwQ/i1kpp/c20S/SbvLaLV0Ngzyhgi0YV4B1SlxM7RgnnePl4vY9N3Z9sTRcozL1MRStI3PlUN9RFA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/Boshen"
+ },
+ "optionalDependencies": {
+ "@oxc-minify/binding-android-arm-eabi": "0.136.0",
+ "@oxc-minify/binding-android-arm64": "0.136.0",
+ "@oxc-minify/binding-darwin-arm64": "0.136.0",
+ "@oxc-minify/binding-darwin-x64": "0.136.0",
+ "@oxc-minify/binding-freebsd-x64": "0.136.0",
+ "@oxc-minify/binding-linux-arm-gnueabihf": "0.136.0",
+ "@oxc-minify/binding-linux-arm-musleabihf": "0.136.0",
+ "@oxc-minify/binding-linux-arm64-gnu": "0.136.0",
+ "@oxc-minify/binding-linux-arm64-musl": "0.136.0",
+ "@oxc-minify/binding-linux-ppc64-gnu": "0.136.0",
+ "@oxc-minify/binding-linux-riscv64-gnu": "0.136.0",
+ "@oxc-minify/binding-linux-riscv64-musl": "0.136.0",
+ "@oxc-minify/binding-linux-s390x-gnu": "0.136.0",
+ "@oxc-minify/binding-linux-x64-gnu": "0.136.0",
+ "@oxc-minify/binding-linux-x64-musl": "0.136.0",
+ "@oxc-minify/binding-openharmony-arm64": "0.136.0",
+ "@oxc-minify/binding-wasm32-wasi": "0.136.0",
+ "@oxc-minify/binding-win32-arm64-msvc": "0.136.0",
+ "@oxc-minify/binding-win32-ia32-msvc": "0.136.0",
+ "@oxc-minify/binding-win32-x64-msvc": "0.136.0"
+ }
+ },
+ "node_modules/p-limit": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+ "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+ "license": "MIT",
+ "dependencies": {
+ "p-try": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "license": "MIT",
+ "dependencies": {
+ "p-limit": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/p-try": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
+ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/partyserver": {
+ "version": "0.5.10",
+ "resolved": "https://registry.npmjs.org/partyserver/-/partyserver-0.5.10.tgz",
+ "integrity": "sha512-t2B3mhTL1IOxCsj8rZgn4TxTuub7oLhypjc1/fGPNsbgnn9OsHms6uR3QEd5bFJ/7xrFo771j3DdUlll8cxgBg==",
+ "license": "ISC",
+ "dependencies": {
+ "nanoid": "^5.1.9"
+ },
+ "peerDependencies": {
+ "@cloudflare/workers-types": "^4.20260424.1 || ^5.20260703.1"
+ }
+ },
+ "node_modules/partysocket": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/partysocket/-/partysocket-1.3.0.tgz",
+ "integrity": "sha512-1zToNyolZFK/7nuAw/K2bZrNzFqaZyRoCEkS+9vG6WSC5ikrN6qWRe96q6ImU51uptz2r+dAwSkwhJVdQi4LiA==",
+ "license": "MIT",
+ "dependencies": {
+ "event-target-polyfill": "^0.0.4"
+ },
+ "peerDependencies": {
+ "react": ">=17"
+ },
+ "peerDependenciesMeta": {
+ "react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/pathe": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz",
+ "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/picocolors": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/picomatch": {
+ "version": "4.0.7",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz",
+ "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/pngjs": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz",
+ "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/postcss": {
+ "version": "8.5.34",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.34.tgz",
+ "integrity": "sha512-P1Qzj0XXZjMda74C7qiVnBG90UKNbyNUAOeQRBW8X63RsIMV57gevRqjnkELdwtZ/S2/uQFksJhmwuN8xShLPw==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/postcss"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "nanoid": "^3.3.20",
+ "picocolors": "^1.1.1",
+ "source-map-js": "^1.2.4"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ }
+ },
+ "node_modules/postcss/node_modules/nanoid": {
+ "version": "3.3.20",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz",
+ "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "bin": {
+ "nanoid": "bin/nanoid.cjs"
+ },
+ "engines": {
+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+ }
+ },
+ "node_modules/qrcode": {
+ "version": "1.5.4",
+ "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.4.tgz",
+ "integrity": "sha512-1ca71Zgiu6ORjHqFBDpnSMTR2ReToX4l1Au1VFLyVeBTFavzQnv5JxMFr3ukHVKpSrSA2MCk0lNJSykjUfz7Zg==",
+ "license": "MIT",
+ "dependencies": {
+ "dijkstrajs": "^1.0.1",
+ "pngjs": "^5.0.0",
+ "yargs": "^15.3.1"
+ },
+ "bin": {
+ "qrcode": "bin/qrcode"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/react": {
+ "version": "19.3.1",
+ "resolved": "https://registry.npmjs.org/react/-/react-19.3.1.tgz",
+ "integrity": "sha512-QNhWdt7nrgVWWQG58QuGsAR3jv3Hbe4mb4vz7w2csnHavciZJgda1CPNaldF6eVxv90ud3jUXpKlHL69gO38yw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/react-dom": {
+ "version": "19.3.1",
+ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.3.1.tgz",
+ "integrity": "sha512-Y0bARz53lhEC1NMCASs0/j+faB/zqt3R8hpvg1e8+61ZVJ4UL0UdC4cBbXfZMcIuhrfgeILTLe+ZeBCavQPtKQ==",
+ "license": "MIT",
+ "dependencies": {
+ "scheduler": "^0.28.0"
+ },
+ "peerDependencies": {
+ "react": "^19.3.1"
+ }
+ },
+ "node_modules/require-directory": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
+ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/require-main-filename": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
+ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
+ "license": "ISC"
+ },
+ "node_modules/rolldown": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.3.4.tgz",
+ "integrity": "sha512-p2rq4bfBmF0M6yaR8+A89fbkBQynZI2fxUW4G07eq9kpctAkpo7q5BZ4X4Mo4XZ7HHROu33cX9PeopUFN6u+2Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@oxc-project/types": "=0.160.0",
+ "@rolldown/pluginutils": "^1.0.0"
+ },
+ "bin": {
+ "rolldown": "bin/cli.mjs"
+ },
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ },
+ "optionalDependencies": {
+ "@rolldown/binding-android-arm-eabi": "1.3.4",
+ "@rolldown/binding-android-arm64": "1.3.4",
+ "@rolldown/binding-darwin-arm64": "1.3.4",
+ "@rolldown/binding-darwin-x64": "1.3.4",
+ "@rolldown/binding-freebsd-x64": "1.3.4",
+ "@rolldown/binding-linux-arm-gnueabihf": "1.3.4",
+ "@rolldown/binding-linux-arm64-gnu": "1.3.4",
+ "@rolldown/binding-linux-arm64-musl": "1.3.4",
+ "@rolldown/binding-linux-ppc64-gnu": "1.3.4",
+ "@rolldown/binding-linux-s390x-gnu": "1.3.4",
+ "@rolldown/binding-linux-x64-gnu": "1.3.4",
+ "@rolldown/binding-linux-x64-musl": "1.3.4",
+ "@rolldown/binding-openharmony-arm64": "1.3.4",
+ "@rolldown/binding-wasm32-wasi": "1.3.4",
+ "@rolldown/binding-win32-arm64-msvc": "1.3.4",
+ "@rolldown/binding-win32-x64-msvc": "1.3.4"
+ }
+ },
+ "node_modules/scheduler": {
+ "version": "0.28.0",
+ "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.28.0.tgz",
+ "integrity": "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw==",
+ "license": "MIT"
+ },
+ "node_modules/semver": {
+ "version": "7.8.6",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.6.tgz",
+ "integrity": "sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==",
+ "dev": true,
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/set-blocking": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
+ "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",
+ "license": "ISC"
+ },
+ "node_modules/sharp": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.35.5.tgz",
+ "integrity": "sha512-Ywn4OnzGukp7CDMrp08RQ50YKmuwG47brZgIVPTvBaaAfQlRlygrRqSrxdCiL9M+LlzLBiJ68IR1QqvzHyjC7g==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@img/colour": "^1.1.0",
+ "detect-libc": "^2.1.2",
+ "semver": "^7.8.5"
+ },
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-darwin-arm64": "0.35.5",
+ "@img/sharp-darwin-x64": "0.35.5",
+ "@img/sharp-freebsd-wasm32": "0.35.5",
+ "@img/sharp-libvips-darwin-arm64": "1.3.4",
+ "@img/sharp-libvips-darwin-x64": "1.3.4",
+ "@img/sharp-libvips-linux-arm": "1.3.4",
+ "@img/sharp-libvips-linux-arm64": "1.3.4",
+ "@img/sharp-libvips-linux-ppc64": "1.3.4",
+ "@img/sharp-libvips-linux-riscv64": "1.3.4",
+ "@img/sharp-libvips-linux-s390x": "1.3.4",
+ "@img/sharp-libvips-linux-x64": "1.3.4",
+ "@img/sharp-libvips-linuxmusl-arm64": "1.3.4",
+ "@img/sharp-libvips-linuxmusl-x64": "1.3.4",
+ "@img/sharp-linux-arm": "0.35.5",
+ "@img/sharp-linux-arm64": "0.35.5",
+ "@img/sharp-linux-ppc64": "0.35.5",
+ "@img/sharp-linux-riscv64": "0.35.5",
+ "@img/sharp-linux-s390x": "0.35.5",
+ "@img/sharp-linux-x64": "0.35.5",
+ "@img/sharp-linuxmusl-arm64": "0.35.5",
+ "@img/sharp-linuxmusl-x64": "0.35.5",
+ "@img/sharp-webcontainers-wasm32": "0.35.5",
+ "@img/sharp-win32-arm64": "0.35.5",
+ "@img/sharp-win32-ia32": "0.35.5",
+ "@img/sharp-win32-x64": "0.35.5"
+ },
+ "peerDependenciesMeta": {
+ "@types/node": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/source-map-js": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.3.0.tgz",
+ "integrity": "sha512-pdUVfIWcK0kCgK831ibqkZDcL7I9zljjOu0TQFnA+fiQ6y1CYqYB7RkTOHHO45FGMg5P/Mvk/+4ToQ7gAYAL5Q==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/std-env": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.3.0.tgz",
+ "integrity": "sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "license": "MIT",
+ "dependencies": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/supports-color": {
+ "version": "10.2.2",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.2.2.tgz",
+ "integrity": "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/supports-color?sponsor=1"
+ }
+ },
+ "node_modules/tailwindcss": {
+ "version": "4.3.5",
+ "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.5.tgz",
+ "integrity": "sha512-FcQk9BuffmEHJP2G0XmB2SplU1aLTI7j07Kunk+U74Ny+XiWOtzXz9aujFZ/avntw1e2cOv/3PkgzflQ7gX2vQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/tapable": {
+ "version": "2.3.4",
+ "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.4.tgz",
+ "integrity": "sha512-NHFiWnAbMJxNNpBwiO7jJVGDuqMxT9/oV8v57RR+fgBQShkJil5inGD8/xWy0hjLyHQyX1tu27QANhlz3KBqCg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ }
+ },
+ "node_modules/tinybench": {
+ "version": "6.2.5",
+ "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-6.2.5.tgz",
+ "integrity": "sha512-b/8GRMdnY4cqkfCLyaFpTGIv1qwfi3oT0mWaepwT++6Z/ZrYehNfZZ2JDKVLKGhNoEkS3IIB1ELtCT0XS5DtOA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/tinyexec": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.4.0.tgz",
+ "integrity": "sha512-PV6lIcJQh57aFeJDwx16JNHmgFRh5xguzallrDW1qe8nAghYgr5MKz2K5k7wEyV/ygZhdnIAP8+HZSarHPBCsg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tinyglobby": {
+ "version": "0.2.17",
+ "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz",
+ "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "fdir": "^6.5.0",
+ "picomatch": "^4.0.4"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/SuperchupuDev"
+ }
+ },
+ "node_modules/tslib": {
+ "version": "2.9.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.9.1.tgz",
+ "integrity": "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA==",
+ "dev": true,
+ "license": "0BSD",
+ "optional": true
+ },
+ "node_modules/typescript": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-7.0.2.tgz",
+ "integrity": "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "bin": {
+ "tsc": "bin/tsc"
+ },
+ "engines": {
+ "node": ">=16.20.0"
+ },
+ "optionalDependencies": {
+ "@typescript/typescript-aix-ppc64": "7.0.2",
+ "@typescript/typescript-darwin-arm64": "7.0.2",
+ "@typescript/typescript-darwin-x64": "7.0.2",
+ "@typescript/typescript-freebsd-arm64": "7.0.2",
+ "@typescript/typescript-freebsd-x64": "7.0.2",
+ "@typescript/typescript-linux-arm": "7.0.2",
+ "@typescript/typescript-linux-arm64": "7.0.2",
+ "@typescript/typescript-linux-loong64": "7.0.2",
+ "@typescript/typescript-linux-mips64el": "7.0.2",
+ "@typescript/typescript-linux-ppc64": "7.0.2",
+ "@typescript/typescript-linux-riscv64": "7.0.2",
+ "@typescript/typescript-linux-s390x": "7.0.2",
+ "@typescript/typescript-linux-x64": "7.0.2",
+ "@typescript/typescript-netbsd-arm64": "7.0.2",
+ "@typescript/typescript-netbsd-x64": "7.0.2",
+ "@typescript/typescript-openbsd-arm64": "7.0.2",
+ "@typescript/typescript-openbsd-x64": "7.0.2",
+ "@typescript/typescript-sunos-x64": "7.0.2",
+ "@typescript/typescript-win32-arm64": "7.0.2",
+ "@typescript/typescript-win32-x64": "7.0.2"
+ }
+ },
+ "node_modules/undici": {
+ "version": "7.30.2",
+ "resolved": "https://registry.npmjs.org/undici/-/undici-7.30.2.tgz",
+ "integrity": "sha512-mLyPQnHwUxaM/rideoK/+KL8DaAJLRl4aBCfmX444aCSLnIaomqPLtNRe2jdCYcsk5wZzXrDIQC8ZeYNRAYyIA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=20.18.1"
+ }
+ },
+ "node_modules/undici-types": {
+ "version": "8.9.0",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz",
+ "integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/unenv": {
+ "version": "2.0.0-rc.24",
+ "resolved": "https://registry.npmjs.org/unenv/-/unenv-2.0.0-rc.24.tgz",
+ "integrity": "sha512-i7qRCmY42zmCwnYlh9H2SvLEypEFGye5iRmEMKjcGi7zk9UquigRjFtTLz0TYqr0ZGLZhaMHl/foy1bZR+Cwlw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "pathe": "^2.0.3"
+ }
+ },
+ "node_modules/unplugin": {
+ "version": "2.3.11",
+ "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-2.3.11.tgz",
+ "integrity": "sha512-5uKD0nqiYVzlmCRs01Fhs2BdkEgBS3SAVP6ndrBsuK42iC2+JHyxM05Rm9G8+5mkmRtzMZGY8Ct5+mliZxU/Ww==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/remapping": "^2.3.5",
+ "acorn": "^8.15.0",
+ "picomatch": "^4.0.3",
+ "webpack-virtual-modules": "^0.6.2"
+ },
+ "engines": {
+ "node": ">=18.12.0"
+ }
+ },
+ "node_modules/urlpattern-polyfill": {
+ "version": "10.1.0",
+ "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.1.0.tgz",
+ "integrity": "sha512-IGjKp/o0NL3Bso1PymYURCJxMPNAf/ILOpendP9f5B6e1rTJgdgiOvgfoT8VxCAdY+Wisb9uhGaJJf3yZ2V9nw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/uuid": {
+ "version": "14.0.3",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.3.tgz",
+ "integrity": "sha512-Sc5u1VVln93y1Xnz4R+CunOZc7R9LUcTmhj7Rc7Eg3HVcf7rVn2FOoa812fe0W8p3jD7xeoGSYbfqCGGH2B6xw==",
+ "dev": true,
+ "funding": [
+ "https://github.com/sponsors/broofa",
+ "https://github.com/sponsors/ctavan"
+ ],
+ "license": "MIT",
+ "bin": {
+ "uuid": "dist-node/bin/uuid"
+ }
+ },
+ "node_modules/valibot": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/valibot/-/valibot-1.5.0.tgz",
+ "integrity": "sha512-nil6AkP2TChWL43Z5uJ6GTxX01CUA+g8LWUM+N/rB9NBbkUMaUsi9PUNzlUPgoKASgmx9f7eGOYpJ04/fSa6FQ==",
+ "dev": true,
+ "license": "MIT",
+ "peerDependencies": {
+ "typescript": ">=5"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/vite": {
+ "version": "8.4.1",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-8.4.1.tgz",
+ "integrity": "sha512-2bl8n3+GkKBKQQR8CZC+t+3NvjWCBNh9S0Dbfu7hr7+Jjeg71jcZk7uKF6mo8GZXjIws+Nl6jhvAfHUO320VuQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "lightningcss": "^1.33.0",
+ "picomatch": "^4.0.7",
+ "postcss": "^8.5.34",
+ "rolldown": "~1.3.4",
+ "tinyglobby": "^0.2.17"
+ },
+ "bin": {
+ "vite": "bin/vite.js"
+ },
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ },
+ "funding": {
+ "url": "https://github.com/vitejs/vite?sponsor=1"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.3",
+ "napi-windows-process-start-time": "^0.1.0"
+ },
+ "peerDependencies": {
+ "@types/node": "^20.19.0 || >=22.12.0",
+ "@vitejs/devtools": "^0.7.1 || ^0.8.0",
+ "esbuild": "^0.27.0 || ^0.28.0",
+ "jiti": ">=1.21.0",
+ "less": "^4.0.0",
+ "sass": "^1.70.0",
+ "sass-embedded": "^1.70.0",
+ "stylus": ">=0.54.8",
+ "sugarss": "^5.0.0",
+ "terser": "^5.16.0",
+ "tsx": "^4.8.1",
+ "yaml": "^2.4.2"
+ },
+ "peerDependenciesMeta": {
+ "@types/node": {
+ "optional": true
+ },
+ "@vitejs/devtools": {
+ "optional": true
+ },
+ "esbuild": {
+ "optional": true
+ },
+ "jiti": {
+ "optional": true
+ },
+ "less": {
+ "optional": true
+ },
+ "sass": {
+ "optional": true
+ },
+ "sass-embedded": {
+ "optional": true
+ },
+ "stylus": {
+ "optional": true
+ },
+ "sugarss": {
+ "optional": true
+ },
+ "terser": {
+ "optional": true
+ },
+ "tsx": {
+ "optional": true
+ },
+ "yaml": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/vitest": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/vitest/-/vitest-5.1.2.tgz",
+ "integrity": "sha512-VIa2wXV208WraXUbzH+dQUrGcFpPuaiRA8HlhXS8R6/sy9cynw6OMqGj8fmAlH1hot7huTCtWUE14+FdXU3eLw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/chai": "^5.2.2",
+ "@vitest/mocker": "5.1.2",
+ "chai": "^6.3.0",
+ "es-module-lexer": "^2.3.2",
+ "expect-type": "^1.4.0",
+ "magic-string": "^1.4.5",
+ "obug": "^3.0.0",
+ "picomatch": "^4.0.7",
+ "std-env": "^4.3.0",
+ "tinybench": "^6.2.3",
+ "tinyexec": "^1.3.1",
+ "tinyglobby": "^0.2.17",
+ "why-is-node-running": "3.2.1"
+ },
+ "bin": {
+ "vitest": "vitest.mjs"
+ },
+ "engines": {
+ "node": "^22.12.0 || ^24.0.0 || >=26.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/vitest"
+ },
+ "peerDependencies": {
+ "@edge-runtime/vm": "*",
+ "@opentelemetry/api": "^1.9.0",
+ "@types/node": "^22.0.0 || >=24.0.0",
+ "@vitest/browser-playwright": "5.1.2",
+ "@vitest/browser-preview": "5.1.2",
+ "@vitest/browser-webdriverio": "^5.0.0-beta.5 || >=5.0.0",
+ "@vitest/coverage-istanbul": "5.1.2",
+ "@vitest/coverage-v8": "5.1.2",
+ "@vitest/ui": "5.1.2",
+ "happy-dom": "*",
+ "jsdom": "*",
+ "vite": "^6.4.0 || ^7.0.0 || ^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@edge-runtime/vm": {
+ "optional": true
+ },
+ "@opentelemetry/api": {
+ "optional": true
+ },
+ "@types/node": {
+ "optional": true
+ },
+ "@vitest/browser-playwright": {
+ "optional": true
+ },
+ "@vitest/browser-preview": {
+ "optional": true
+ },
+ "@vitest/browser-webdriverio": {
+ "optional": true
+ },
+ "@vitest/coverage-istanbul": {
+ "optional": true
+ },
+ "@vitest/coverage-v8": {
+ "optional": true
+ },
+ "@vitest/ui": {
+ "optional": true
+ },
+ "happy-dom": {
+ "optional": true
+ },
+ "jsdom": {
+ "optional": true
+ },
+ "vite": {
+ "optional": false
+ }
+ }
+ },
+ "node_modules/webpack-virtual-modules": {
+ "version": "0.6.2",
+ "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz",
+ "integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/which-module": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz",
+ "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==",
+ "license": "ISC"
+ },
+ "node_modules/why-is-node-running": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-3.2.1.tgz",
+ "integrity": "sha512-Tb2FUhB4vUsGQlfSquQLYkApkuPAFQXGFzxWKHHumVz2dK+X1RUm/HnID4+TfIGYJ1kTcwOaCk/buYCEJr6YjQ==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "why-is-node-running": "cli.js"
+ },
+ "engines": {
+ "node": ">=20.11"
+ }
+ },
+ "node_modules/workerd": {
+ "version": "1.20261129.1",
+ "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20261129.1.tgz",
+ "integrity": "sha512-ASqCkTnd53qhWVKaqkPHOS/KbzaO8ps58nMuvRxfKsQOaXvzf0ncoyCdODEW+ond8tUHArF8Y9h2zfYqXcm8jw==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "Apache-2.0",
+ "bin": {
+ "workerd": "bin/workerd"
+ },
+ "engines": {
+ "node": ">=16"
+ },
+ "optionalDependencies": {
+ "@cloudflare/workerd-darwin-64": "1.20261129.1",
+ "@cloudflare/workerd-darwin-arm64": "1.20261129.1",
+ "@cloudflare/workerd-linux-64": "1.20261129.1",
+ "@cloudflare/workerd-linux-arm64": "1.20261129.1",
+ "@cloudflare/workerd-windows-64": "1.20261129.1"
+ }
+ },
+ "node_modules/wrap-ansi": {
+ "version": "6.2.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
+ "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/ws": {
+ "version": "8.21.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz",
+ "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": ">=5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/y18n": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz",
+ "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==",
+ "license": "ISC"
+ },
+ "node_modules/yargs": {
+ "version": "15.4.1",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",
+ "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==",
+ "license": "MIT",
+ "dependencies": {
+ "cliui": "^6.0.0",
+ "decamelize": "^1.2.0",
+ "find-up": "^4.1.0",
+ "get-caller-file": "^2.0.1",
+ "require-directory": "^2.1.1",
+ "require-main-filename": "^2.0.0",
+ "set-blocking": "^2.0.0",
+ "string-width": "^4.2.0",
+ "which-module": "^2.0.0",
+ "y18n": "^4.0.0",
+ "yargs-parser": "^18.1.2"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/yargs-parser": {
+ "version": "18.1.3",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz",
+ "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
+ "license": "ISC",
+ "dependencies": {
+ "camelcase": "^5.0.0",
+ "decamelize": "^1.2.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/youch": {
+ "version": "4.1.0-beta.10",
+ "resolved": "https://registry.npmjs.org/youch/-/youch-4.1.0-beta.10.tgz",
+ "integrity": "sha512-rLfVLB4FgQneDr0dv1oddCVZmKjcJ6yX6mS4pU82Mq/Dt9a3cLZQ62pDBL4AUO+uVrCvtWz3ZFUL2HFAFJ/BXQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@poppinss/colors": "^4.1.5",
+ "@poppinss/dumper": "^0.6.4",
+ "@speed-highlight/core": "^1.2.7",
+ "cookie": "^1.0.2",
+ "youch-core": "^0.3.3"
+ }
+ },
+ "node_modules/youch-core": {
+ "version": "0.3.3",
+ "resolved": "https://registry.npmjs.org/youch-core/-/youch-core-0.3.3.tgz",
+ "integrity": "sha512-ho7XuGjLaJ2hWHoK8yFnsUGy2Y5uDpqSTq1FkHLK4/oqKtyUU1AFbOOxY4IpC9f0fTLjwYbslUz0Po5BpD1wrA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@poppinss/exception": "^1.2.2",
+ "error-stack-parser-es": "^1.0.5"
+ }
+ },
+ "node_modules/zod": {
+ "version": "4.6.6",
+ "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.6.tgz",
+ "integrity": "sha512-4UmzQUF5fxvfcYHlbjBmejU+w+hbDnWFx4aS8kBx7nPBHcO2SqPbpAG8snbdg+Xse4pRefR98hgjFgIMCI/UhA==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/colinhacks"
+ }
+ }
+ }
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..76cd32f
--- /dev/null
+++ b/package.json
@@ -0,0 +1,39 @@
+{
+ "name": "pling",
+ "private": true,
+ "type": "module",
+ "scripts": {
+ "dev": "cf dev",
+ "build": "cf build",
+ "preview": "npm run build && vite preview",
+ "deploy": "cf deploy",
+ "typecheck": "npm run i18n && tsc -p tsconfig.app.json && tsc -p tsconfig.worker.json",
+ "test": "vitest run",
+ "cf-typegen": "cf workers types",
+ "postinstall": "cf workers types && npm run i18n",
+ "i18n": "paraglide-js compile --project ./project.inlang --outdir ./src/paraglide --strategy localStorage preferredLanguage baseLocale --silent"
+ },
+ "dependencies": {
+ "partyserver": "^0.5.10",
+ "partysocket": "^1.3.0",
+ "qrcode": "^1.5.4",
+ "react": "^19.3.1",
+ "react-dom": "^19.3.1"
+ },
+ "devDependencies": {
+ "@cloudflare/vite-plugin": "^2.0.0-rc.0",
+ "@cloudflare/workers-types": "^5.20261201.1",
+ "@inlang/paraglide-js": "^3.2.2",
+ "@inlang/plugin-message-format": "^4.6.3",
+ "@tailwindcss/vite": "^4.3.5",
+ "@types/qrcode": "^1.5.6",
+ "@types/react": "^19.3.3",
+ "@types/react-dom": "^19.3.0",
+ "@vitejs/plugin-react": "^6.3.1",
+ "cf": "^1.0.0-rc.7",
+ "tailwindcss": "^4.3.5",
+ "typescript": "^7.0.2",
+ "vite": "^8.4.1",
+ "vitest": "^5.1.2"
+ }
+}
diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot
deleted file mode 100644
index d40a38b..0000000
--- a/priv/gettext/default.pot
+++ /dev/null
@@ -1,226 +0,0 @@
-## This file is a PO Template file.
-##
-## "msgid"s here are often extracted from source code.
-## Add new messages manually only if they're dynamic
-## messages that can't be statically extracted.
-##
-## Run "mix gettext.extract" to bring this file up to
-## date. Leave "msgstr"s empty as changing them here has no
-## effect: edit them in PO (.po) files instead.
-#
-msgid ""
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:5
-#, elixir-autogen, elixir-format
-msgid "A real-time music game"
-msgstr ""
-
-#: lib/pling_web/components/core_components.ex:483
-#, elixir-autogen, elixir-format
-msgid "Actions"
-msgstr ""
-
-#: lib/pling_web/components/core_components.ex:160
-#, elixir-autogen, elixir-format
-msgid "Attempting to reconnect"
-msgstr ""
-
-#: lib/pling_web/live/room_live.ex:319
-#, elixir-autogen, elixir-format
-msgid "Clear Recent"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:14
-#, elixir-autogen, elixir-format
-msgid "Create Free-for-All Room (beta)"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:11
-#, elixir-autogen, elixir-format
-msgid "Create Versus Room"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:66
-#, elixir-autogen, elixir-format
-msgid "Create a room or join an existing one with a room code"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:25
-#, elixir-autogen, elixir-format
-msgid "Enter a room code"
-msgstr ""
-
-#: lib/pling_web/components/core_components.ex:151
-#, elixir-autogen, elixir-format
-msgid "Error!"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:57
-#, elixir-autogen, elixir-format
-msgid "Free-for-All Mode (Beta)"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:46
-#, elixir-autogen, elixir-format
-msgid "Game Rules and Instructions"
-msgstr ""
-
-#: lib/pling_web/components/core_components.ex:172
-#, elixir-autogen, elixir-format
-msgid "Hang in there while we get back on track"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:36
-#: lib/pling_web/live/home_live.html.heex:64
-#, elixir-autogen, elixir-format
-msgid "How to Play"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:45
-#, elixir-autogen, elixir-format
-msgid "How to Play Pling"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:59
-#, elixir-autogen, elixir-format
-msgid "In Free-for-All mode, every player plays individually. Be the first to identify the song to earn points. The player with the most points at the end of the game wins!"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:52
-#, elixir-autogen, elixir-format
-msgid "In Versus mode, two teams compete to identify songs faster than their opponents. Each correct guess earns points for your team. The team with the most points at the end wins!"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:31
-#, elixir-autogen, elixir-format
-msgid "Join Room"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:68
-#, elixir-autogen, elixir-format
-msgid "Listen to the song clips and type your guesses"
-msgstr ""
-
-#: lib/pling_web/live/room_live.html.heex:20
-#, elixir-autogen, elixir-format
-msgid "Next Track"
-msgstr ""
-
-#: lib/pling_web/live/room_live.ex:295
-#, elixir-autogen, elixir-format
-msgid "PLAY"
-msgstr ""
-
-#: lib/pling_web/live/room_live.ex:292
-#: lib/pling_web/live/room_live.ex:298
-#, elixir-autogen, elixir-format
-msgid "PLING"
-msgstr ""
-
-#: lib/pling_web/components/layouts/root.html.heex:15
-#, elixir-autogen, elixir-format
-msgid "Pling"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:69
-#, elixir-autogen, elixir-format
-msgid "Score points by being the first to correctly identify songs"
-msgstr ""
-
-#: lib/pling_web/live/room_live.ex:316
-#, elixir-autogen, elixir-format
-msgid "Scores"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:67
-#, elixir-autogen, elixir-format
-msgid "Share the room code with your friends"
-msgstr ""
-
-#: lib/pling_web/components/core_components.ex:167
-#, elixir-autogen, elixir-format
-msgid "Something went wrong!"
-msgstr ""
-
-#: lib/pling_web/components/core_components.ex:150
-#, elixir-autogen, elixir-format
-msgid "Success!"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:50
-#, elixir-autogen, elixir-format
-msgid "Versus Mode"
-msgstr ""
-
-#: lib/pling_web/components/core_components.ex:155
-#, elixir-autogen, elixir-format
-msgid "We can't find the internet"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:4
-#, elixir-autogen, elixir-format
-msgid "Welcome to Pling"
-msgstr ""
-
-#: lib/pling_web/components/core_components.ex:76
-#: lib/pling_web/components/core_components.ex:130
-#, elixir-autogen, elixir-format
-msgid "close"
-msgstr ""
-
-#: lib/pling_web/live/room_live.html.heex:46
-#, elixir-autogen, elixir-format
-msgid "hide playlists"
-msgstr ""
-
-#: lib/pling_web/live/room_live.ex:267
-#, elixir-autogen, elixir-format
-msgid "is joined by"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:19
-#, elixir-autogen, elixir-format
-msgid "or"
-msgstr ""
-
-#: lib/pling_web/live/room_live.html.heex:46
-#, elixir-autogen, elixir-format
-msgid "show playlists"
-msgstr ""
-
-#: lib/pling_web/live/room_live.html.heex:37
-#, elixir-autogen, elixir-format
-msgid "swipe to see song"
-msgstr ""
-
-#: lib/pling_web/live/room_live.ex:231
-#, elixir-autogen, elixir-format
-msgid "Waiting for users..."
-msgstr ""
-
-#: lib/pling_web/live/room_live.ex:246
-#, elixir-autogen, elixir-format
-msgid "is in the"
-msgstr ""
-
-#: lib/pling_web/live/room_live.ex:247
-#: lib/pling_web/live/room_live.ex:275
-#, elixir-autogen, elixir-format
-msgid "room"
-msgstr ""
-
-#: lib/pling_web/live/room_live.ex:274
-#, elixir-autogen, elixir-format
-msgid "in the"
-msgstr ""
-
-#: lib/pling_web/live/room_live.ex:212
-#, elixir-autogen, elixir-format
-msgid "Unknown Playlist"
-msgstr ""
-
-#: lib/pling_web/live/room_live.ex:219
-#, elixir-autogen, elixir-format
-msgid "and listening to"
-msgstr ""
diff --git a/priv/gettext/en/LC_MESSAGES/default.po b/priv/gettext/en/LC_MESSAGES/default.po
deleted file mode 100644
index e75a6cb..0000000
--- a/priv/gettext/en/LC_MESSAGES/default.po
+++ /dev/null
@@ -1,226 +0,0 @@
-## "msgid"s in this file come from POT (.pot) files.
-###
-### Do not add, change, or remove "msgid"s manually here as
-### they're tied to the ones in the corresponding POT file
-### (with the same domain).
-###
-### Use "mix gettext.extract --merge" or "mix gettext.merge"
-### to merge POT files into PO files.
-msgid ""
-msgstr ""
-"Language: en\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: lib/pling_web/live/home_live.html.heex:5
-#, elixir-autogen, elixir-format
-msgid "A real-time music game"
-msgstr ""
-
-#: lib/pling_web/components/core_components.ex:483
-#, elixir-autogen, elixir-format
-msgid "Actions"
-msgstr ""
-
-#: lib/pling_web/components/core_components.ex:160
-#, elixir-autogen, elixir-format
-msgid "Attempting to reconnect"
-msgstr ""
-
-#: lib/pling_web/live/room_live.ex:319
-#, elixir-autogen, elixir-format
-msgid "Clear Recent"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:14
-#, elixir-autogen, elixir-format
-msgid "Create Free-for-All Room (beta)"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:11
-#, elixir-autogen, elixir-format
-msgid "Create Versus Room"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:66
-#, elixir-autogen, elixir-format
-msgid "Create a room or join an existing one with a room code"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:25
-#, elixir-autogen, elixir-format
-msgid "Enter a room code"
-msgstr ""
-
-#: lib/pling_web/components/core_components.ex:151
-#, elixir-autogen, elixir-format
-msgid "Error!"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:57
-#, elixir-autogen, elixir-format
-msgid "Free-for-All Mode (Beta)"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:46
-#, elixir-autogen, elixir-format
-msgid "Game Rules and Instructions"
-msgstr ""
-
-#: lib/pling_web/components/core_components.ex:172
-#, elixir-autogen, elixir-format
-msgid "Hang in there while we get back on track"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:36
-#: lib/pling_web/live/home_live.html.heex:64
-#, elixir-autogen, elixir-format
-msgid "How to Play"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:45
-#, elixir-autogen, elixir-format
-msgid "How to Play Pling"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:59
-#, elixir-autogen, elixir-format
-msgid "In Free-for-All mode, every player plays individually. Be the first to identify the song to earn points. The player with the most points at the end of the game wins!"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:52
-#, elixir-autogen, elixir-format
-msgid "In Versus mode, two teams compete to identify songs faster than their opponents. Each correct guess earns points for your team. The team with the most points at the end wins!"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:31
-#, elixir-autogen, elixir-format
-msgid "Join Room"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:68
-#, elixir-autogen, elixir-format
-msgid "Listen to the song clips and type your guesses"
-msgstr ""
-
-#: lib/pling_web/live/room_live.html.heex:20
-#, elixir-autogen, elixir-format
-msgid "Next Track"
-msgstr ""
-
-#: lib/pling_web/live/room_live.ex:295
-#, elixir-autogen, elixir-format
-msgid "PLAY"
-msgstr ""
-
-#: lib/pling_web/live/room_live.ex:292
-#: lib/pling_web/live/room_live.ex:298
-#, elixir-autogen, elixir-format
-msgid "PLING"
-msgstr ""
-
-#: lib/pling_web/components/layouts/root.html.heex:15
-#, elixir-autogen, elixir-format
-msgid "Pling"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:69
-#, elixir-autogen, elixir-format
-msgid "Score points by being the first to correctly identify songs"
-msgstr ""
-
-#: lib/pling_web/live/room_live.ex:316
-#, elixir-autogen, elixir-format
-msgid "Scores"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:67
-#, elixir-autogen, elixir-format
-msgid "Share the room code with your friends"
-msgstr ""
-
-#: lib/pling_web/components/core_components.ex:167
-#, elixir-autogen, elixir-format
-msgid "Something went wrong!"
-msgstr ""
-
-#: lib/pling_web/components/core_components.ex:150
-#, elixir-autogen, elixir-format
-msgid "Success!"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:50
-#, elixir-autogen, elixir-format
-msgid "Versus Mode"
-msgstr ""
-
-#: lib/pling_web/components/core_components.ex:155
-#, elixir-autogen, elixir-format
-msgid "We can't find the internet"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:4
-#, elixir-autogen, elixir-format
-msgid "Welcome to Pling"
-msgstr ""
-
-#: lib/pling_web/components/core_components.ex:76
-#: lib/pling_web/components/core_components.ex:130
-#, elixir-autogen, elixir-format
-msgid "close"
-msgstr ""
-
-#: lib/pling_web/live/room_live.html.heex:46
-#, elixir-autogen, elixir-format
-msgid "hide playlists"
-msgstr ""
-
-#: lib/pling_web/live/room_live.ex:267
-#, elixir-autogen, elixir-format
-msgid "is joined by"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:19
-#, elixir-autogen, elixir-format
-msgid "or"
-msgstr ""
-
-#: lib/pling_web/live/room_live.html.heex:46
-#, elixir-autogen, elixir-format
-msgid "show playlists"
-msgstr ""
-
-#: lib/pling_web/live/room_live.html.heex:37
-#, elixir-autogen, elixir-format
-msgid "swipe to see song"
-msgstr ""
-
-#: lib/pling_web/live/room_live.ex:231
-#, elixir-autogen, elixir-format
-msgid "Waiting for users..."
-msgstr ""
-
-#: lib/pling_web/live/room_live.ex:246
-#, elixir-autogen, elixir-format
-msgid "is in the"
-msgstr ""
-
-#: lib/pling_web/live/room_live.ex:247
-#: lib/pling_web/live/room_live.ex:275
-#, elixir-autogen, elixir-format
-msgid "room"
-msgstr ""
-
-#: lib/pling_web/live/room_live.ex:274
-#, elixir-autogen, elixir-format, fuzzy
-msgid "in the"
-msgstr ""
-
-#: lib/pling_web/live/room_live.ex:212
-#, elixir-autogen, elixir-format
-msgid "Unknown Playlist"
-msgstr ""
-
-#: lib/pling_web/live/room_live.ex:219
-#, elixir-autogen, elixir-format
-msgid "and listening to"
-msgstr ""
diff --git a/priv/gettext/en/LC_MESSAGES/errors.po b/priv/gettext/en/LC_MESSAGES/errors.po
deleted file mode 100644
index 844c4f5..0000000
--- a/priv/gettext/en/LC_MESSAGES/errors.po
+++ /dev/null
@@ -1,112 +0,0 @@
-## `msgid`s in this file come from POT (.pot) files.
-##
-## Do not add, change, or remove `msgid`s manually here as
-## they're tied to the ones in the corresponding POT file
-## (with the same domain).
-##
-## Use `mix gettext.extract --merge` or `mix gettext.merge`
-## to merge POT files into PO files.
-msgid ""
-msgstr ""
-"Language: en\n"
-
-## From Ecto.Changeset.cast/4
-msgid "can't be blank"
-msgstr ""
-
-## From Ecto.Changeset.unique_constraint/3
-msgid "has already been taken"
-msgstr ""
-
-## From Ecto.Changeset.put_change/3
-msgid "is invalid"
-msgstr ""
-
-## From Ecto.Changeset.validate_acceptance/3
-msgid "must be accepted"
-msgstr ""
-
-## From Ecto.Changeset.validate_format/3
-msgid "has invalid format"
-msgstr ""
-
-## From Ecto.Changeset.validate_subset/3
-msgid "has an invalid entry"
-msgstr ""
-
-## From Ecto.Changeset.validate_exclusion/3
-msgid "is reserved"
-msgstr ""
-
-## From Ecto.Changeset.validate_confirmation/3
-msgid "does not match confirmation"
-msgstr ""
-
-## From Ecto.Changeset.no_assoc_constraint/3
-msgid "is still associated with this entry"
-msgstr ""
-
-msgid "are still associated with this entry"
-msgstr ""
-
-## From Ecto.Changeset.validate_length/3
-msgid "should have %{count} item(s)"
-msgid_plural "should have %{count} item(s)"
-msgstr[0] ""
-msgstr[1] ""
-
-msgid "should be %{count} character(s)"
-msgid_plural "should be %{count} character(s)"
-msgstr[0] ""
-msgstr[1] ""
-
-msgid "should be %{count} byte(s)"
-msgid_plural "should be %{count} byte(s)"
-msgstr[0] ""
-msgstr[1] ""
-
-msgid "should have at least %{count} item(s)"
-msgid_plural "should have at least %{count} item(s)"
-msgstr[0] ""
-msgstr[1] ""
-
-msgid "should be at least %{count} character(s)"
-msgid_plural "should be at least %{count} character(s)"
-msgstr[0] ""
-msgstr[1] ""
-
-msgid "should be at least %{count} byte(s)"
-msgid_plural "should be at least %{count} byte(s)"
-msgstr[0] ""
-msgstr[1] ""
-
-msgid "should have at most %{count} item(s)"
-msgid_plural "should have at most %{count} item(s)"
-msgstr[0] ""
-msgstr[1] ""
-
-msgid "should be at most %{count} character(s)"
-msgid_plural "should be at most %{count} character(s)"
-msgstr[0] ""
-msgstr[1] ""
-
-msgid "should be at most %{count} byte(s)"
-msgid_plural "should be at most %{count} byte(s)"
-msgstr[0] ""
-msgstr[1] ""
-
-## From Ecto.Changeset.validate_number/3
-msgid "must be less than %{number}"
-msgstr ""
-
-msgid "must be greater than %{number}"
-msgstr ""
-
-msgid "must be less than or equal to %{number}"
-msgstr ""
-
-msgid "must be greater than or equal to %{number}"
-msgstr ""
-
-msgid "must be equal to %{number}"
-msgstr ""
diff --git a/priv/gettext/errors.pot b/priv/gettext/errors.pot
deleted file mode 100644
index eef2de2..0000000
--- a/priv/gettext/errors.pot
+++ /dev/null
@@ -1,109 +0,0 @@
-## This is a PO Template file.
-##
-## `msgid`s here are often extracted from source code.
-## Add new translations manually only if they're dynamic
-## translations that can't be statically extracted.
-##
-## Run `mix gettext.extract` to bring this file up to
-## date. Leave `msgstr`s empty as changing them here has no
-## effect: edit them in PO (`.po`) files instead.
-## From Ecto.Changeset.cast/4
-msgid "can't be blank"
-msgstr ""
-
-## From Ecto.Changeset.unique_constraint/3
-msgid "has already been taken"
-msgstr ""
-
-## From Ecto.Changeset.put_change/3
-msgid "is invalid"
-msgstr ""
-
-## From Ecto.Changeset.validate_acceptance/3
-msgid "must be accepted"
-msgstr ""
-
-## From Ecto.Changeset.validate_format/3
-msgid "has invalid format"
-msgstr ""
-
-## From Ecto.Changeset.validate_subset/3
-msgid "has an invalid entry"
-msgstr ""
-
-## From Ecto.Changeset.validate_exclusion/3
-msgid "is reserved"
-msgstr ""
-
-## From Ecto.Changeset.validate_confirmation/3
-msgid "does not match confirmation"
-msgstr ""
-
-## From Ecto.Changeset.no_assoc_constraint/3
-msgid "is still associated with this entry"
-msgstr ""
-
-msgid "are still associated with this entry"
-msgstr ""
-
-## From Ecto.Changeset.validate_length/3
-msgid "should have %{count} item(s)"
-msgid_plural "should have %{count} item(s)"
-msgstr[0] ""
-msgstr[1] ""
-
-msgid "should be %{count} character(s)"
-msgid_plural "should be %{count} character(s)"
-msgstr[0] ""
-msgstr[1] ""
-
-msgid "should be %{count} byte(s)"
-msgid_plural "should be %{count} byte(s)"
-msgstr[0] ""
-msgstr[1] ""
-
-msgid "should have at least %{count} item(s)"
-msgid_plural "should have at least %{count} item(s)"
-msgstr[0] ""
-msgstr[1] ""
-
-msgid "should be at least %{count} character(s)"
-msgid_plural "should be at least %{count} character(s)"
-msgstr[0] ""
-msgstr[1] ""
-
-msgid "should be at least %{count} byte(s)"
-msgid_plural "should be at least %{count} byte(s)"
-msgstr[0] ""
-msgstr[1] ""
-
-msgid "should have at most %{count} item(s)"
-msgid_plural "should have at most %{count} item(s)"
-msgstr[0] ""
-msgstr[1] ""
-
-msgid "should be at most %{count} character(s)"
-msgid_plural "should be at most %{count} character(s)"
-msgstr[0] ""
-msgstr[1] ""
-
-msgid "should be at most %{count} byte(s)"
-msgid_plural "should be at most %{count} byte(s)"
-msgstr[0] ""
-msgstr[1] ""
-
-## From Ecto.Changeset.validate_number/3
-msgid "must be less than %{number}"
-msgstr ""
-
-msgid "must be greater than %{number}"
-msgstr ""
-
-msgid "must be less than or equal to %{number}"
-msgstr ""
-
-msgid "must be greater than or equal to %{number}"
-msgstr ""
-
-msgid "must be equal to %{number}"
-msgstr ""
diff --git a/priv/gettext/nb/LC_MESSAGES/default.po b/priv/gettext/nb/LC_MESSAGES/default.po
deleted file mode 100644
index b45facf..0000000
--- a/priv/gettext/nb/LC_MESSAGES/default.po
+++ /dev/null
@@ -1,218 +0,0 @@
-msgid ""
-msgstr ""
-"Language: nb\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: lib/pling_web/live/home_live.html.heex:5
-#, elixir-autogen, elixir-format
-msgid "A real-time music game"
-msgstr "Et sanntids musikkspill"
-
-#: lib/pling_web/components/core_components.ex:483
-#, elixir-autogen, elixir-format
-msgid "Actions"
-msgstr "Handlinger"
-
-#: lib/pling_web/components/core_components.ex:160
-#, elixir-autogen, elixir-format
-msgid "Attempting to reconnect"
-msgstr "Kobler på"
-
-#: lib/pling_web/live/room_live.ex:319
-#, elixir-autogen, elixir-format
-msgid "Clear Recent"
-msgstr "Fjern nylige"
-
-#: lib/pling_web/live/home_live.html.heex:14
-#, elixir-autogen, elixir-format
-msgid "Create Free-for-All Room (beta)"
-msgstr "Opprett alle-mot-alle-rom (beta)"
-
-#: lib/pling_web/live/home_live.html.heex:11
-#, elixir-autogen, elixir-format
-msgid "Create Versus Room"
-msgstr "Opprett lag-mot-lag rom"
-
-#: lib/pling_web/live/home_live.html.heex:66
-#, elixir-autogen, elixir-format
-msgid "Create a room or join an existing one with a room code"
-msgstr "Opprett et rom eller bli med i et eksisterende med en romkode"
-
-#: lib/pling_web/live/home_live.html.heex:25
-#, elixir-autogen, elixir-format
-msgid "Enter a room code"
-msgstr "Skriv inn romkode"
-
-#: lib/pling_web/components/core_components.ex:151
-#, elixir-autogen, elixir-format
-msgid "Error!"
-msgstr "Error!"
-
-#: lib/pling_web/live/home_live.html.heex:57
-#, elixir-autogen, elixir-format
-msgid "Free-for-All Mode (Beta)"
-msgstr "Alle-mot-alle-modus (Beta)"
-
-#: lib/pling_web/live/home_live.html.heex:46
-#, elixir-autogen, elixir-format
-msgid "Game Rules and Instructions"
-msgstr "Spillregler og instruksjoner"
-
-#: lib/pling_web/components/core_components.ex:172
-#, elixir-autogen, elixir-format
-msgid "Hang in there while we get back on track"
-msgstr "Vent litt mens vi finner ut av det"
-
-#: lib/pling_web/live/home_live.html.heex:36
-#: lib/pling_web/live/home_live.html.heex:64
-#, elixir-autogen, elixir-format
-msgid "How to Play"
-msgstr "Hvordan spille"
-
-#: lib/pling_web/live/home_live.html.heex:45
-#, elixir-autogen, elixir-format
-msgid "How to Play Pling"
-msgstr "Hvordan spille Pling"
-
-#: lib/pling_web/live/home_live.html.heex:59
-#, elixir-autogen, elixir-format
-msgid "In Free-for-All mode, every player plays individually. Be the first to identify the song to earn points. The player with the most points at the end of the game wins!"
-msgstr "I alle-mot-alle-modus spiller alle individuelt. Vær først til å identifisere sangen for å få poeng. Spilleren med flest poeng ved spillets slutt vinner!"
-
-#: lib/pling_web/live/home_live.html.heex:52
-#, elixir-autogen, elixir-format
-msgid "In Versus mode, two teams compete to identify songs faster than their opponents. Each correct guess earns points for your team. The team with the most points at the end wins!"
-msgstr "I lag mot lag-modus konkurrerer to lag om å identifisere sanger raskere enn motstanderne. Hvert riktig gjett gir poeng til laget ditt. Laget med flest poeng til slutt vinner!"
-
-#: lib/pling_web/live/home_live.html.heex:31
-#, elixir-autogen, elixir-format
-msgid "Join Room"
-msgstr "Bli med i rom"
-
-#: lib/pling_web/live/home_live.html.heex:68
-#, elixir-autogen, elixir-format
-msgid "Listen to the song clips and type your guesses"
-msgstr "Lytt til sangklippene og skriv inn gjetningene dine"
-
-#: lib/pling_web/live/room_live.html.heex:20
-#, elixir-autogen, elixir-format
-msgid "Next Track"
-msgstr "Neste sang"
-
-#: lib/pling_web/live/room_live.ex:295
-#, elixir-autogen, elixir-format
-msgid "PLAY"
-msgstr "SPILL"
-
-#: lib/pling_web/live/room_live.ex:292
-#: lib/pling_web/live/room_live.ex:298
-#, elixir-autogen, elixir-format
-msgid "PLING"
-msgstr "PLING"
-
-#: lib/pling_web/components/layouts/root.html.heex:15
-#, elixir-autogen, elixir-format
-msgid "Pling"
-msgstr "Pling"
-
-#: lib/pling_web/live/home_live.html.heex:69
-#, elixir-autogen, elixir-format
-msgid "Score points by being the first to correctly identify songs"
-msgstr "Få poeng ved å være først til å identifisere sanger korrekt"
-
-#: lib/pling_web/live/room_live.ex:316
-#, elixir-autogen, elixir-format
-msgid "Scores"
-msgstr "Poeng"
-
-#: lib/pling_web/live/home_live.html.heex:67
-#, elixir-autogen, elixir-format
-msgid "Share the room code with your friends"
-msgstr "Del romkoden med vennene dine"
-
-#: lib/pling_web/components/core_components.ex:167
-#, elixir-autogen, elixir-format
-msgid "Something went wrong!"
-msgstr "Noe gikk gale!"
-
-#: lib/pling_web/components/core_components.ex:150
-#, elixir-autogen, elixir-format
-msgid "Success!"
-msgstr "Suksess!"
-
-#: lib/pling_web/live/home_live.html.heex:50
-#, elixir-autogen, elixir-format
-msgid "Versus Mode"
-msgstr "lag mot lag-modus"
-
-#: lib/pling_web/components/core_components.ex:155
-#, elixir-autogen, elixir-format
-msgid "We can't find the internet"
-msgstr "Vi finner ikke internett"
-
-#: lib/pling_web/live/home_live.html.heex:4
-#, elixir-autogen, elixir-format
-msgid "Welcome to Pling"
-msgstr "Velkommen til Pling"
-
-#: lib/pling_web/components/core_components.ex:76
-#: lib/pling_web/components/core_components.ex:130
-#, elixir-autogen, elixir-format
-msgid "close"
-msgstr "lukk"
-
-#: lib/pling_web/live/room_live.html.heex:46
-#, elixir-autogen, elixir-format
-msgid "hide playlists"
-msgstr "skjul spillelister"
-
-#: lib/pling_web/live/room_live.ex:267
-#, elixir-autogen, elixir-format
-msgid "is joined by"
-msgstr "er sammen med"
-
-#: lib/pling_web/live/home_live.html.heex:19
-#, elixir-autogen, elixir-format
-msgid "or"
-msgstr "eller"
-
-#: lib/pling_web/live/room_live.html.heex:46
-#, elixir-autogen, elixir-format
-msgid "show playlists"
-msgstr "vis spillelister"
-
-#: lib/pling_web/live/room_live.html.heex:37
-#, elixir-autogen, elixir-format
-msgid "swipe to see song"
-msgstr "sveip for å se sang"
-
-#: lib/pling_web/live/room_live.ex:231
-#, elixir-autogen, elixir-format
-msgid "Waiting for users..."
-msgstr "Venter på brukere"
-
-#: lib/pling_web/live/room_live.ex:246
-#, elixir-autogen, elixir-format
-msgid "is in the"
-msgstr "er i"
-
-#: lib/pling_web/live/room_live.ex:247
-#: lib/pling_web/live/room_live.ex:275
-#, elixir-autogen, elixir-format
-msgid "room"
-msgstr "rommet"
-
-#: lib/pling_web/live/room_live.ex:274
-#, elixir-autogen, elixir-format, fuzzy
-msgid "in the"
-msgstr "i"
-
-#: lib/pling_web/live/room_live.ex:212
-#, elixir-autogen, elixir-format
-msgid "Unknown Playlist"
-msgstr "Ukjent spilleliste"
-
-#: lib/pling_web/live/room_live.ex:219
-#, elixir-autogen, elixir-format
-msgid "and listening to"
-msgstr "og lytter til"
diff --git a/priv/gettext/nb/LC_MESSAGES/errors.po b/priv/gettext/nb/LC_MESSAGES/errors.po
deleted file mode 100644
index d2d1b98..0000000
--- a/priv/gettext/nb/LC_MESSAGES/errors.po
+++ /dev/null
@@ -1,102 +0,0 @@
-## "msgid"s in this file come from POT (.pot) files.
-###
-### Do not add, change, or remove "msgid"s manually here as
-### they're tied to the ones in the corresponding POT file
-### (with the same domain).
-###
-### Use "mix gettext.extract --merge" or "mix gettext.merge"
-### to merge POT files into PO files.
-msgid ""
-msgstr ""
-"Language: nb\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-msgid "can't be blank"
-msgstr "kan ikke være tom"
-
-msgid "has already been taken"
-msgstr "er allerede tatt"
-
-msgid "is invalid"
-msgstr "er ugyldig"
-
-msgid "must be accepted"
-msgstr "må aksepteres"
-
-msgid "has invalid format"
-msgstr "har ugyldig format"
-
-msgid "has an invalid entry"
-msgstr "har en ugyldig oppføring"
-
-msgid "is reserved"
-msgstr "er reservert"
-
-msgid "does not match confirmation"
-msgstr "samsvarer ikke med bekreftelsen"
-
-msgid "is still associated with this entry"
-msgstr "er fortsatt knyttet til denne oppføringen"
-
-msgid "are still associated with this entry"
-msgstr "er fortsatt knyttet til denne oppføringen"
-
-msgid "should have %{count} item(s)"
-msgid_plural "should have %{count} item(s)"
-msgstr[0] "skal ha %{count} element"
-msgstr[1] "skal ha %{count} elementer"
-
-msgid "should be %{count} character(s)"
-msgid_plural "should be %{count} character(s)"
-msgstr[0] "skal være %{count} tegn"
-msgstr[1] "skal være %{count} tegn"
-
-msgid "should be %{count} byte(s)"
-msgid_plural "should be %{count} byte(s)"
-msgstr[0] "skal være %{count} byte"
-msgstr[1] "skal være %{count} byte"
-
-msgid "should have at least %{count} item(s)"
-msgid_plural "should have at least %{count} item(s)"
-msgstr[0] "skal ha minst %{count} element"
-msgstr[1] "skal ha minst %{count} elementer"
-
-msgid "should be at least %{count} character(s)"
-msgid_plural "should be at least %{count} character(s)"
-msgstr[0] "skal være minst %{count} tegn"
-msgstr[1] "skal være minst %{count} tegn"
-
-msgid "should be at least %{count} byte(s)"
-msgid_plural "should be at least %{count} byte(s)"
-msgstr[0] "skal være minst %{count} byte"
-msgstr[1] "skal være minst %{count} byte"
-
-msgid "should have at most %{count} item(s)"
-msgid_plural "should have at most %{count} item(s)"
-msgstr[0] "skal ha maksimalt %{count} element"
-msgstr[1] "skal ha maksimalt %{count} elementer"
-
-msgid "should be at most %{count} character(s)"
-msgid_plural "should be at most %{count} character(s)"
-msgstr[0] "skal være maksimalt %{count} tegn"
-msgstr[1] "skal være maksimalt %{count} tegn"
-
-msgid "should be at most %{count} byte(s)"
-msgid_plural "should be at most %{count} byte(s)"
-msgstr[0] "skal være maksimalt %{count} byte"
-msgstr[1] "skal være maksimalt %{count} byte"
-
-msgid "must be less than %{number}"
-msgstr "må være mindre enn %{number}"
-
-msgid "must be greater than %{number}"
-msgstr "må være større enn %{number}"
-
-msgid "must be less than or equal to %{number}"
-msgstr "må være mindre enn eller lik %{number}"
-
-msgid "must be greater than or equal to %{number}"
-msgstr "må være større enn eller lik %{number}"
-
-msgid "must be equal to %{number}"
-msgstr "må være lik %{number}"
diff --git a/priv/gettext/sv/LC_MESSAGES/default.po b/priv/gettext/sv/LC_MESSAGES/default.po
deleted file mode 100644
index eb9ea27..0000000
--- a/priv/gettext/sv/LC_MESSAGES/default.po
+++ /dev/null
@@ -1,226 +0,0 @@
-## "msgid"s in this file come from POT (.pot) files.
-##
-## Do not add, change, or remove "msgid"s manually here as
-## they're tied to the ones in the corresponding POT file
-## (with the same domain).
-##
-## Use "mix gettext.extract --merge" or "mix gettext.merge"
-## to merge POT files into PO files.
-msgid ""
-msgstr ""
-"Language: sv\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: lib/pling_web/live/home_live.html.heex:5
-#, elixir-autogen, elixir-format
-msgid "A real-time music game"
-msgstr "Ett musikspel i realtid"
-
-#: lib/pling_web/components/core_components.ex:483
-#, elixir-autogen, elixir-format
-msgid "Actions"
-msgstr "Åtgärder"
-
-#: lib/pling_web/components/core_components.ex:160
-#, elixir-autogen, elixir-format
-msgid "Attempting to reconnect"
-msgstr "Försöker återansluta"
-
-#: lib/pling_web/live/room_live.ex:319
-#, elixir-autogen, elixir-format
-msgid "Clear Recent"
-msgstr "Rensa senaste"
-
-#: lib/pling_web/live/home_live.html.heex:14
-#, elixir-autogen, elixir-format
-msgid "Create Free-for-All Room (beta)"
-msgstr "Skapa Alla-mot-alla-rum (beta)"
-
-#: lib/pling_web/live/home_live.html.heex:11
-#, elixir-autogen, elixir-format
-msgid "Create Versus Room"
-msgstr "Skapa Mot-varandra-rum"
-
-#: lib/pling_web/live/home_live.html.heex:66
-#, elixir-autogen, elixir-format
-msgid "Create a room or join an existing one with a room code"
-msgstr "Skapa ett rum eller gå med i ett befintligt med en rumskod"
-
-#: lib/pling_web/live/home_live.html.heex:25
-#, elixir-autogen, elixir-format
-msgid "Enter a room code"
-msgstr "Ange en rumskod"
-
-#: lib/pling_web/components/core_components.ex:151
-#, elixir-autogen, elixir-format
-msgid "Error!"
-msgstr "Fel!"
-
-#: lib/pling_web/live/home_live.html.heex:57
-#, elixir-autogen, elixir-format
-msgid "Free-for-All Mode (Beta)"
-msgstr "Alla-mot-alla-läge (Beta)"
-
-#: lib/pling_web/live/home_live.html.heex:46
-#, elixir-autogen, elixir-format
-msgid "Game Rules and Instructions"
-msgstr "Spelregler och instruktioner"
-
-#: lib/pling_web/components/core_components.ex:172
-#, elixir-autogen, elixir-format
-msgid "Hang in there while we get back on track"
-msgstr "Häng kvar medan vi kommer tillbaka på spåret"
-
-#: lib/pling_web/live/home_live.html.heex:36
-#: lib/pling_web/live/home_live.html.heex:64
-#, elixir-autogen, elixir-format
-msgid "How to Play"
-msgstr "Hur man spelar"
-
-#: lib/pling_web/live/home_live.html.heex:45
-#, elixir-autogen, elixir-format
-msgid "How to Play Pling"
-msgstr "Hur man spelar Pling"
-
-#: lib/pling_web/live/home_live.html.heex:59
-#, elixir-autogen, elixir-format
-msgid "In Free-for-All mode, every player plays individually. Be the first to identify the song to earn points. The player with the most points at the end of the game wins!"
-msgstr "I Alla-mot-alla-läget spelar varje spelare individuellt. Var först med att identifiera låten för att få poäng. Spelaren med flest poäng i slutet av spelet vinner!"
-
-#: lib/pling_web/live/home_live.html.heex:52
-#, elixir-autogen, elixir-format
-msgid "In Versus mode, two teams compete to identify songs faster than their opponents. Each correct guess earns points for your team. The team with the most points at the end wins!"
-msgstr "I Mot-varandra-läget tävlar två lag om att identifiera låtar snabbare än motståndarna. Varje rätt gissning ger poäng till ditt lag. Laget med flest poäng i slutet vinner!"
-
-#: lib/pling_web/live/home_live.html.heex:31
-#, elixir-autogen, elixir-format
-msgid "Join Room"
-msgstr "Gå med i rum"
-
-#: lib/pling_web/live/home_live.html.heex:68
-#, elixir-autogen, elixir-format
-msgid "Listen to the song clips and type your guesses"
-msgstr "Lyssna på låtklippen och skriv dina gissningar"
-
-#: lib/pling_web/live/room_live.html.heex:20
-#, elixir-autogen, elixir-format
-msgid "Next Track"
-msgstr "Nästa låt"
-
-#: lib/pling_web/live/room_live.ex:295
-#, elixir-autogen, elixir-format
-msgid "PLAY"
-msgstr "SPELA"
-
-#: lib/pling_web/live/room_live.ex:292
-#: lib/pling_web/live/room_live.ex:298
-#, elixir-autogen, elixir-format
-msgid "PLING"
-msgstr "PLING"
-
-#: lib/pling_web/components/layouts/root.html.heex:15
-#, elixir-autogen, elixir-format
-msgid "Pling"
-msgstr "Pling"
-
-#: lib/pling_web/live/home_live.html.heex:69
-#, elixir-autogen, elixir-format
-msgid "Score points by being the first to correctly identify songs"
-msgstr "Få poäng genom att vara först med att korrekt identifiera låtar"
-
-#: lib/pling_web/live/room_live.ex:316
-#, elixir-autogen, elixir-format
-msgid "Scores"
-msgstr "Poäng"
-
-#: lib/pling_web/live/home_live.html.heex:67
-#, elixir-autogen, elixir-format
-msgid "Share the room code with your friends"
-msgstr ""
-
-#: lib/pling_web/components/core_components.ex:167
-#, elixir-autogen, elixir-format
-msgid "Something went wrong!"
-msgstr ""
-
-#: lib/pling_web/components/core_components.ex:150
-#, elixir-autogen, elixir-format
-msgid "Success!"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:50
-#, elixir-autogen, elixir-format
-msgid "Versus Mode"
-msgstr ""
-
-#: lib/pling_web/components/core_components.ex:155
-#, elixir-autogen, elixir-format
-msgid "We can't find the internet"
-msgstr ""
-
-#: lib/pling_web/live/home_live.html.heex:4
-#, elixir-autogen, elixir-format
-msgid "Welcome to Pling"
-msgstr ""
-
-#: lib/pling_web/components/core_components.ex:76
-#: lib/pling_web/components/core_components.ex:130
-#, elixir-autogen, elixir-format
-msgid "close"
-msgstr ""
-
-#: lib/pling_web/live/room_live.html.heex:46
-#, elixir-autogen, elixir-format
-msgid "hide playlists"
-msgstr "dölj spellistor"
-
-#: lib/pling_web/live/room_live.ex:267
-#, elixir-autogen, elixir-format
-msgid "is joined by"
-msgstr "spelar med"
-
-#: lib/pling_web/live/home_live.html.heex:19
-#, elixir-autogen, elixir-format
-msgid "or"
-msgstr ""
-
-#: lib/pling_web/live/room_live.html.heex:46
-#, elixir-autogen, elixir-format
-msgid "show playlists"
-msgstr "visa spellistor"
-
-#: lib/pling_web/live/room_live.html.heex:37
-#, elixir-autogen, elixir-format
-msgid "swipe to see song"
-msgstr "svep för att se låten"
-
-#: lib/pling_web/live/room_live.ex:231
-#, elixir-autogen, elixir-format
-msgid "Waiting for users..."
-msgstr ""
-
-#: lib/pling_web/live/room_live.ex:246
-#, elixir-autogen, elixir-format
-msgid "is in the"
-msgstr ""
-
-#: lib/pling_web/live/room_live.ex:247
-#: lib/pling_web/live/room_live.ex:275
-#, elixir-autogen, elixir-format
-msgid "room"
-msgstr ""
-
-#: lib/pling_web/live/room_live.ex:274
-#, elixir-autogen, elixir-format, fuzzy
-msgid "in the"
-msgstr ""
-
-#: lib/pling_web/live/room_live.ex:212
-#, elixir-autogen, elixir-format
-msgid "Unknown Playlist"
-msgstr ""
-
-#: lib/pling_web/live/room_live.ex:219
-#, elixir-autogen, elixir-format
-msgid "and listening to"
-msgstr ""
diff --git a/priv/gettext/sv/LC_MESSAGES/errors.po b/priv/gettext/sv/LC_MESSAGES/errors.po
deleted file mode 100644
index 3c18bf6..0000000
--- a/priv/gettext/sv/LC_MESSAGES/errors.po
+++ /dev/null
@@ -1,102 +0,0 @@
-## "msgid"s in this file come from POT (.pot) files.
-###
-### Do not add, change, or remove "msgid"s manually here as
-### they're tied to the ones in the corresponding POT file
-### (with the same domain).
-###
-### Use "mix gettext.extract --merge" or "mix gettext.merge"
-### to merge POT files into PO files.
-msgid ""
-msgstr ""
-"Language: sv\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-msgid "can't be blank"
-msgstr "får inte vara tomt"
-
-msgid "has already been taken"
-msgstr "är redan taget"
-
-msgid "is invalid"
-msgstr "är ogiltigt"
-
-msgid "must be accepted"
-msgstr "måste accepteras"
-
-msgid "has invalid format"
-msgstr "har ogiltigt format"
-
-msgid "has an invalid entry"
-msgstr "har en ogiltig post"
-
-msgid "is reserved"
-msgstr "är reserverat"
-
-msgid "does not match confirmation"
-msgstr "matchar inte bekräftelsen"
-
-msgid "is still associated with this entry"
-msgstr "är fortfarande kopplad till denna post"
-
-msgid "are still associated with this entry"
-msgstr "är fortfarande kopplade till denna post"
-
-msgid "should have %{count} item(s)"
-msgid_plural "should have %{count} item(s)"
-msgstr[0] "ska ha %{count} objekt"
-msgstr[1] "ska ha %{count} objekt"
-
-msgid "should be %{count} character(s)"
-msgid_plural "should be %{count} character(s)"
-msgstr[0] "ska vara %{count} tecken"
-msgstr[1] "ska vara %{count} tecken"
-
-msgid "should be %{count} byte(s)"
-msgid_plural "should be %{count} byte(s)"
-msgstr[0] "ska vara %{count} byte"
-msgstr[1] "ska vara %{count} byte"
-
-msgid "should have at least %{count} item(s)"
-msgid_plural "should have at least %{count} item(s)"
-msgstr[0] "ska ha minst %{count} objekt"
-msgstr[1] "ska ha minst %{count} objekt"
-
-msgid "should be at least %{count} character(s)"
-msgid_plural "should be at least %{count} character(s)"
-msgstr[0] "ska vara minst %{count} tecken"
-msgstr[1] "ska vara minst %{count} tecken"
-
-msgid "should be at least %{count} byte(s)"
-msgid_plural "should be at least %{count} byte(s)"
-msgstr[0] "ska vara minst %{count} byte"
-msgstr[1] "ska vara minst %{count} byte"
-
-msgid "should have at most %{count} item(s)"
-msgid_plural "should have at most %{count} item(s)"
-msgstr[0] "ska ha högst %{count} objekt"
-msgstr[1] "ska ha högst %{count} objekt"
-
-msgid "should be at most %{count} character(s)"
-msgid_plural "should be at most %{count} character(s)"
-msgstr[0] "ska vara högst %{count} tecken"
-msgstr[1] "ska vara högst %{count} tecken"
-
-msgid "should be at most %{count} byte(s)"
-msgid_plural "should be at most %{count} byte(s)"
-msgstr[0] "ska vara högst %{count} byte"
-msgstr[1] "ska vara högst %{count} byte"
-
-msgid "must be less than %{number}"
-msgstr "måste vara mindre än %{number}"
-
-msgid "must be greater than %{number}"
-msgstr "måste vara större än %{number}"
-
-msgid "must be less than or equal to %{number}"
-msgstr "måste vara mindre än eller lika med %{number}"
-
-msgid "must be greater than or equal to %{number}"
-msgstr "måste vara större än eller lika med %{number}"
-
-msgid "must be equal to %{number}"
-msgstr "måste vara lika med %{number}"
diff --git a/priv/repo/migrations/.formatter.exs b/priv/repo/migrations/.formatter.exs
deleted file mode 100644
index 49f9151..0000000
--- a/priv/repo/migrations/.formatter.exs
+++ /dev/null
@@ -1,4 +0,0 @@
-[
- import_deps: [:ecto_sql],
- inputs: ["*.exs"]
-]
diff --git a/priv/repo/migrations/20250104194553_track_playlist_join_table.exs b/priv/repo/migrations/20250104194553_track_playlist_join_table.exs
deleted file mode 100644
index dcf6be6..0000000
--- a/priv/repo/migrations/20250104194553_track_playlist_join_table.exs
+++ /dev/null
@@ -1,53 +0,0 @@
-defmodule Pling.Repo.Migrations.TrackPlaylistJoinTable do
- use Ecto.Migration
-
- def change do
- # Create playlists table with spotify_id as primary key
- create table(:playlists, primary_key: false) do
- add :spotify_id, :string, primary_key: true, null: false
- add :name, :string, null: false
- add :official, :boolean, default: false, null: false
- add :image_url, :string
- add :owner, :string, null: false
-
- timestamps()
- end
-
- create unique_index(:playlists, [:spotify_id])
-
- # Create tracks table with uri as primary key (full spotify URI format)
- create table(:tracks, primary_key: false) do
- add :uri, :string, primary_key: true, null: false, size: 100
- add :title, :string, null: false
- add :artists, {:array, :string}, null: false
- add :popularity, :integer
- add :album, :string
-
- timestamps()
- end
-
- create unique_index(:tracks, [:uri])
-
- # Create the join table for many-to-many relationship
- create table(:playlist_tracks, primary_key: false) do
- add :playlist_spotify_id,
- references(:playlists, column: :spotify_id, type: :string, on_delete: :delete_all),
- null: false
-
- add :track_uri,
- references(:tracks, column: :uri, type: :string, on_delete: :delete_all),
- null: false
-
- timestamps()
- end
-
- # Add indexes for better query performance
- create index(:playlist_tracks, [:playlist_spotify_id])
- create index(:playlist_tracks, [:track_uri])
-
- # Ensure no duplicate combinations of playlist and track
- create unique_index(:playlist_tracks, [:playlist_spotify_id, :track_uri],
- name: :playlist_track_unique_assoc
- )
- end
-end
diff --git a/priv/repo/seeds.exs b/priv/repo/seeds.exs
deleted file mode 100644
index a5e9778..0000000
--- a/priv/repo/seeds.exs
+++ /dev/null
@@ -1,28 +0,0 @@
-alias Pling.Repo
-alias Pling.Playlists.{MusicLibrary, Playlist}
-
-playlists = [
- "4mUy5wCcZi5Nq6azLEM9ik",
- "3wvTJnQoBgxZe99WDF1zcN",
- "4DIYG1WrBI9jRJiul9vmxj",
- "24wKd8i8ANGZhMZq4U7Eaj",
- "50nqzehFR03d6ULmqTQFn4"
-]
-
-
-# Import each playlist
-Enum.each(playlists, fn spotify_id ->
- # Skip if playlist already exists
- unless Repo.get(Playlist, spotify_id) do
- case MusicLibrary.get_or_fetch_playlist(spotify_id) do
- {:error, reason} ->
- IO.puts("Failed to import playlist: (#{spotify_id}): #{inspect(reason)}")
-
- {:ok, _status, playlist} ->
- playlist
- |> Playlist.changeset(%{official: true})
- |> Repo.update!()
- IO.puts("Imported playlist: #{playlist.name}")
- end
- end
-end)
diff --git a/priv/static/audio/bell.mp3 b/priv/static/audio/bell.mp3
deleted file mode 100644
index 36d6ba8..0000000
Binary files a/priv/static/audio/bell.mp3 and /dev/null differ
diff --git a/priv/static/robots.txt b/priv/static/robots.txt
deleted file mode 100644
index 26e06b5..0000000
--- a/priv/static/robots.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
-#
-# To ban all spiders from the entire site uncomment the next two lines:
-# User-agent: *
-# Disallow: /
diff --git a/project.inlang/settings.json b/project.inlang/settings.json
new file mode 100644
index 0000000..e0dbd35
--- /dev/null
+++ b/project.inlang/settings.json
@@ -0,0 +1,9 @@
+{
+ "$schema": "https://inlang.com/schema/project-settings",
+ "baseLocale": "en",
+ "locales": ["en", "nb"],
+ "modules": ["./node_modules/@inlang/plugin-message-format/dist/index.js"],
+ "plugin.inlang.messageFormat": {
+ "pathPattern": "./messages/{locale}.json"
+ }
+}
diff --git a/public/audio/bell.mp3 b/public/audio/bell.mp3
new file mode 100644
index 0000000..799a0aa
Binary files /dev/null and b/public/audio/bell.mp3 differ
diff --git a/priv/static/favicon.ico b/public/favicon.ico
similarity index 100%
rename from priv/static/favicon.ico
rename to public/favicon.ico
diff --git a/public/icon-180.png b/public/icon-180.png
new file mode 100644
index 0000000..d89b4e1
Binary files /dev/null and b/public/icon-180.png differ
diff --git a/public/icon-192.png b/public/icon-192.png
new file mode 100644
index 0000000..d371b24
Binary files /dev/null and b/public/icon-192.png differ
diff --git a/public/icon-512.png b/public/icon-512.png
new file mode 100644
index 0000000..1585356
Binary files /dev/null and b/public/icon-512.png differ
diff --git a/priv/static/images/logo.svg b/public/logo.svg
similarity index 100%
rename from priv/static/images/logo.svg
rename to public/logo.svg
diff --git a/public/manifest.webmanifest b/public/manifest.webmanifest
new file mode 100644
index 0000000..47d7a27
--- /dev/null
+++ b/public/manifest.webmanifest
@@ -0,0 +1,15 @@
+{
+ "name": "Pling",
+ "short_name": "Pling",
+ "description": "A music buzzer game for the living room.",
+ "start_url": "/",
+ "display": "fullscreen",
+ "display_override": ["fullscreen", "standalone"],
+ "background_color": "#FFFDF2",
+ "theme_color": "#FFFDF2",
+ "icons": [
+ { "src": "/icon-192.png", "sizes": "192x192", "type": "image/png" },
+ { "src": "/icon-512.png", "sizes": "512x512", "type": "image/png" },
+ { "src": "/logo.svg", "sizes": "any", "type": "image/svg+xml" }
+ ]
+}
diff --git a/rel/overlays/bin/migrate b/rel/overlays/bin/migrate
deleted file mode 100755
index 2dea35d..0000000
--- a/rel/overlays/bin/migrate
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-set -eu
-
-cd -P -- "$(dirname -- "$0")"
-exec ./pling eval Pling.Release.migrate
diff --git a/rel/overlays/bin/migrate.bat b/rel/overlays/bin/migrate.bat
deleted file mode 100755
index ce35024..0000000
--- a/rel/overlays/bin/migrate.bat
+++ /dev/null
@@ -1 +0,0 @@
-call "%~dp0\pling" eval Pling.Release.migrate
diff --git a/rel/overlays/bin/server b/rel/overlays/bin/server
deleted file mode 100755
index 664747c..0000000
--- a/rel/overlays/bin/server
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-set -eu
-
-cd -P -- "$(dirname -- "$0")"
-PHX_SERVER=true exec ./pling start
diff --git a/rel/overlays/bin/server.bat b/rel/overlays/bin/server.bat
deleted file mode 100755
index 167a6ce..0000000
--- a/rel/overlays/bin/server.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-set PHX_SERVER=true
-call "%~dp0\pling" start
diff --git a/src/client/App.tsx b/src/client/App.tsx
new file mode 100644
index 0000000..4b1f82d
--- /dev/null
+++ b/src/client/App.tsx
@@ -0,0 +1,38 @@
+import { useEffect, useState } from "react";
+import type { Mode } from "../shared/game";
+import { isValidRoomCode, normalizeRoomCode } from "../shared/names";
+import { Home } from "./Home";
+import { Room } from "./Room";
+
+type Route = { page: "home" } | { page: "room"; code: string; mode: Mode | null };
+
+function parseRoute(): Route {
+ const { pathname, search } = window.location;
+ const params = new URLSearchParams(search);
+ // "/r/CODE" today; "/vs/CODE" and "/ffa/CODE" from the old Elixir app.
+ const match = /^\/(r|vs|ffa)\/([^/]+)\/?$/.exec(pathname);
+ if (match) {
+ const code = normalizeRoomCode(decodeURIComponent(match[2]));
+ const modeParam = match[1] === "r" ? params.get("mode") : match[1];
+ const mode = modeParam === "vs" || modeParam === "ffa" ? modeParam : null;
+ if (isValidRoomCode(code)) return { page: "room", code, mode };
+ }
+ return { page: "home" };
+}
+
+export function navigate(path: string) {
+ window.history.pushState(null, "", path);
+ window.dispatchEvent(new PopStateEvent("popstate"));
+}
+
+export function App() {
+ const [route, setRoute] = useState(parseRoute);
+ useEffect(() => {
+ const onPop = () => setRoute(parseRoute());
+ window.addEventListener("popstate", onPop);
+ return () => window.removeEventListener("popstate", onPop);
+ }, []);
+
+ if (route.page === "room") return ;
+ return ;
+}
diff --git a/src/client/Home.tsx b/src/client/Home.tsx
new file mode 100644
index 0000000..9574c8a
--- /dev/null
+++ b/src/client/Home.tsx
@@ -0,0 +1,87 @@
+import { useState } from "react";
+import type { Mode } from "../shared/game";
+import { isValidRoomCode, normalizeRoomCode, randomRoomCode } from "../shared/names";
+import { navigate } from "./App";
+import { Button, Modal } from "./components/ui";
+import { m } from "./i18n";
+import { LanguagePicker } from "./components/LanguagePicker";
+
+export function Home() {
+ const [code, setCode] = useState("");
+ const [showRules, setShowRules] = useState(false);
+ const create = (mode: Mode) => navigate(`/r/${randomRoomCode()}?mode=${mode}`);
+ const normalized = normalizeRoomCode(code);
+
+ return (
+
+
+
+ Pling
+ {m.home_tagline()}
+
+
+
+ create("vs")}>
+ {m.home_new_vs()}
+
+ create("ffa")}>
+ {m.home_new_ffa()}
+
+
+
+
+
+ setShowRules(true)}>
+ {m.how_to_play()}
+
+
+ {showRules && (
+ setShowRules(false)}>
+
+
+ {m.rules_1()}
+ {m.rules_2()}
+ {m.rules_3()}
+ {m.rules_4()}
+
+
+ {m.mode_vs()}: {m.rules_vs()}
+
+
+ {m.mode_ffa()}: {m.rules_ffa()}
+
+
+ {m.rules_spotify()} {m.rules_own()}
+
+
+
+ )}
+
+
+
+ );
+}
diff --git a/src/client/Room.tsx b/src/client/Room.tsx
new file mode 100644
index 0000000..72a8add
--- /dev/null
+++ b/src/client/Room.tsx
@@ -0,0 +1,106 @@
+import { useState } from "react";
+import type { Mode } from "../shared/game";
+import { navigate } from "./App";
+import { ContributeModal } from "./components/ContributeModal";
+import { DeckPicker } from "./components/DeckPicker";
+import { HostPanel } from "./components/HostPanel";
+import { PlayerPanel, TeamPicker } from "./components/PlayerPanel";
+import { Scoreboard } from "./components/Scoreboard";
+import { SettingsModal } from "./components/SettingsModal";
+import { ShareModal } from "./components/ShareModal";
+import { Button } from "./components/ui";
+import { useNow, useRoom } from "./useRoom";
+import { m } from "./i18n";
+
+type Dialog = "share" | "deck" | "settings" | "contribute" | null;
+
+export function Room({ code, mode }: { code: string; mode: Mode | null }) {
+ const { view, connected, error, lastBuzz, clockOffset, send } = useRoom(code, mode);
+ const [dialog, setDialog] = useState(null);
+ const ticking = view?.round.phase === "playing" || view?.round.phase === "buzzed";
+ const now = useNow(ticking, clockOffset);
+
+ if (!view) {
+ return (
+
+
+
{error ?? m.joining()}
+ {error &&
navigate("/")}>{m.back_home()} }
+
+
+ );
+ }
+
+ const me = view.players.find((p) => p.id === view.you);
+ const isHost = view.hostId === view.you;
+ const host = view.players.find((p) => p.id === view.hostId);
+ const buzzedKey = view.round.phase === "buzzed" ? view.round.key : undefined;
+ const flash = lastBuzz && Date.now() - lastBuzz.at < 600;
+
+ return (
+
+
+
+
+ {isHost ? m.you_are_host() : m.host_is({ name: host?.name ?? m.nobody() })} · {m.you_are()} {me?.name}
+ {" · "}
+ {m.here_count({ count: view.players.filter((p) => p.online).length })}
+
+
+ {!connected && {m.reconnecting()}
}
+
+ {!isHost && !view.hostOnline && (
+
+ {m.host_left()}
+ send({ t: "claimHost" })}>{m.host_now()}
+
+ )}
+
+
+ {isHost ? (
+
+ ) : view.mode === "vs" && !me?.seat ? (
+
+ ) : (
+
setDialog("contribute")} />
+ )}
+
+
+
+
+ {error && (
+
+ {error}
+
+ )}
+
+ {dialog === "share" && setDialog(null)} />}
+ {dialog === "deck" && (
+ setDialog(null)} onAddMusic={() => setDialog("contribute")} />
+ )}
+ {dialog === "contribute" && setDialog(null)} />}
+ {dialog === "settings" && setDialog(null)} />}
+
+ );
+}
diff --git a/src/client/blendOptions.ts b/src/client/blendOptions.ts
new file mode 100644
index 0000000..023af3c
--- /dev/null
+++ b/src/client/blendOptions.ts
@@ -0,0 +1,27 @@
+// Remembers the host's last blend choices so "Rebuild blend" uses the same ones.
+
+export interface BlendChoice {
+ size: number;
+ commonOnly: boolean;
+}
+
+const KEY = "pling.blendOptions";
+const DEFAULT: BlendChoice = { size: 50, commonOnly: false };
+
+export function blendOptions(): BlendChoice {
+ try {
+ const saved = JSON.parse(localStorage.getItem(KEY) ?? "null");
+ if (saved && typeof saved.size === "number" && typeof saved.commonOnly === "boolean") return saved;
+ } catch {
+ // Storage blocked or corrupted: fall back to defaults.
+ }
+ return DEFAULT;
+}
+
+export function saveBlendOptions(choice: BlendChoice) {
+ try {
+ localStorage.setItem(KEY, JSON.stringify(choice));
+ } catch {
+ // Not worth surfacing.
+ }
+}
diff --git a/src/client/components/ContributeModal.tsx b/src/client/components/ContributeModal.tsx
new file mode 100644
index 0000000..66b7267
--- /dev/null
+++ b/src/client/components/ContributeModal.tsx
@@ -0,0 +1,59 @@
+import type { ClientMessage } from "../../shared/game";
+import type { RoomView } from "../../shared/view";
+import { linkKind } from "../spotifyLinks";
+import { ImportPanel } from "./ImportPanel";
+import { Button, Modal } from "./ui";
+import { m } from "../i18n";
+
+export function ContributeModal({ view, send, onClose }: { view: RoomView; send: (m: ClientMessage) => void; onClose: () => void }) {
+ const mine = view.contributions.find((c) => c.playerId === view.you);
+ const others = view.contributions.filter((c) => c.playerId !== view.you);
+
+ return (
+
+
+ {view.spotifyLink && (
+
+ )}
+
{m.contribute_intro()}
+
+ {mine ? (
+
+
+ {m.you_added({ playlist: mine.playlist, count: mine.size })}
+
+ send({ t: "withdraw" })}>
+ {m.remove()}
+
+
+ ) : null}
+
+ {others.length > 0 && (
+
+ {m.added_so_far({ list: others.map((c) => `${c.playerName} (${c.size})`).join(", ") })}
+
+ )}
+
+
(mine ? m.replace_n_songs({ count }) : m.add_n_songs({ count }))}
+ onPick={(playlist, tracks) => {
+ send({ t: "contribute", playlist, tracks });
+ onClose();
+ }}
+ />
+
+
+ );
+}
diff --git a/src/client/components/Countdown.tsx b/src/client/components/Countdown.tsx
new file mode 100644
index 0000000..41f772a
--- /dev/null
+++ b/src/client/components/Countdown.tsx
@@ -0,0 +1,15 @@
+import { secondsLeft } from "../format";
+
+export function Countdown({ until, now, total, tone = "stone" }: { until: number; now: number; total: number; tone?: "stone" | "amber" }) {
+ const left = Math.max(0, until - now);
+ const pct = Math.min(100, (left / (total * 1000)) * 100);
+ const bar = tone === "amber" ? "bg-amber-500" : "bg-ink";
+ return (
+
+
+
{secondsLeft(until, now)}s
+
+ );
+}
diff --git a/src/client/components/DeckPicker.tsx b/src/client/components/DeckPicker.tsx
new file mode 100644
index 0000000..fa5e8ed
--- /dev/null
+++ b/src/client/components/DeckPicker.tsx
@@ -0,0 +1,188 @@
+import { useState } from "react";
+import { BUILTIN_DECKS } from "../../shared/decks";
+import { BLEND_SIZES, SPOTIFY_LINK_KINDS, type ClientMessage, type SpotifyLinkKind } from "../../shared/game";
+import { cleanSpotifyShareUrl } from "../../shared/spotify";
+import type { RoomView } from "../../shared/view";
+import { blendOptions, saveBlendOptions } from "../blendOptions";
+import { linkKind } from "../spotifyLinks";
+import { ImportPanel } from "./ImportPanel";
+import { Button, Modal } from "./ui";
+import { m } from "../i18n";
+
+type Tab = "decks" | "blend" | "spotify" | "import";
+
+export function DeckPicker({
+ view,
+ send,
+ onClose,
+ onAddMusic,
+}: {
+ view: RoomView;
+ send: (m: ClientMessage) => void;
+ onClose: () => void;
+ onAddMusic: () => void;
+}) {
+ const [tab, setTab] = useState(view.spotifyLink ? "spotify" : view.contributions.length > 0 ? "blend" : "decks");
+ const choose = (msg: ClientMessage) => {
+ send(msg);
+ onClose();
+ };
+ const tabClass = (t: Tab) => `flex-1 rounded-lg py-2 text-sm ${tab === t ? "bg-white shadow-sm" : "text-stone-500"}`;
+ const option = (active: boolean) =>
+ `flex w-full items-center justify-between rounded-xl px-4 py-3 text-left ring-1 ${active ? "bg-ink text-white ring-ink" : "bg-white ring-stone-200 hover:bg-stone-50"}`;
+
+ return (
+
+
+ setTab("decks")}>
+ {m.tab_decks()}
+
+ setTab("blend")}>
+ {view.contributions.length > 0 ? m.tab_blend_n({ count: view.contributions.length }) : m.tab_blend()}
+
+ setTab("spotify")}>
+ {m.tab_spotify()}
+
+ setTab("import")}>
+ {m.tab_import()}
+
+
+
+ {tab === "decks" && (
+
+ {BUILTIN_DECKS.map((d) => (
+
choose({ t: "deck", id: d.id })}>
+ {d.name}
+ {m.n_songs({ count: d.tracks.length })}
+
+ ))}
+
choose({ t: "ownMusic" })}>
+
+ {m.own_music()}
+ {m.own_music_desc()}
+
+
+ {view.deck && !BUILTIN_DECKS.some((d) => d.id === view.deck?.id) && (
+
{m.now_playing({ name: view.deck.name })}
+ )}
+
+ )}
+
+ {tab === "blend" && choose(msg)} onAddMusic={onAddMusic} />}
+
+ {tab === "spotify" && choose(msg)} />}
+
+ {tab === "import" && (
+ m.play_these({ count })} onPick={(name, tracks) => choose({ t: "customDeck", name, tracks })} />
+ )}
+
+ );
+}
+
+function BlendTab({ view, onBuild, onAddMusic }: { view: RoomView; onBuild: (m: ClientMessage) => void; onAddMusic: () => void }) {
+ const [options, setOptions] = useState(blendOptions);
+ const update = (next: typeof options) => {
+ setOptions(next);
+ saveBlendOptions(next);
+ };
+ const { shared, total } = view.blendStats;
+ const mine = view.contributions.some((c) => c.playerId === view.you);
+ const canBuild = view.contributions.length > 0 && (!options.commonOnly || shared > 0);
+
+ return (
+
+
{m.blend_intro()}
+
+ {view.contributions.length === 0 ? (
+
{m.nobody_added()}
+ ) : (
+
+ {view.contributions.map((c) => (
+
+
+ {c.playerName} · {c.playlist}
+
+ {c.size}
+
+ ))}
+
+ )}
+ {view.contributions.length > 1 && (
+
+ {m.overlap({ shared, total })}
+
+ )}
+
+
+
{m.how_many()}
+
+ {BLEND_SIZES.map((size) => (
+ update({ ...options, size })}>
+ {size}
+
+ ))}
+
+
+ update({ ...options, commonOnly: e.target.checked })} />
+ {m.common_only()}
+
+
+
+
+ {!mine && (
+
+ {m.add_my_music()}
+
+ )}
+ onBuild({ t: "blend", ...options })}>
+ {m.play_blend()}
+
+
+
+ );
+}
+
+function SpotifyTab({ view, onUse }: { view: RoomView; onUse: (m: ClientMessage) => void }) {
+ const [kind, setKind] = useState(view.spotifyLink?.kind ?? "jam");
+ const [text, setText] = useState(view.spotifyLink?.url ?? "");
+ const url = cleanSpotifyShareUrl(text);
+ const info = linkKind(kind);
+
+ return (
+
+
+ {SPOTIFY_LINK_KINDS.map((k) => (
+ setKind(k)}
+ >
+ {linkKind(k).name}
+ {linkKind(k).short}
+
+ ))}
+
+
+ {info.how.map((step) => (
+ {step}
+ ))}
+
+
+ {m.link_label({ name: info.name })}
+ setText(e.target.value)}
+ />
+
+ {text.trim() && !url &&
{m.link_invalid()}
}
+
url && onUse({ t: "spotifyLink", kind, url })}>
+ {info.use}
+
+
+ );
+}
diff --git a/src/client/components/FullscreenButton.tsx b/src/client/components/FullscreenButton.tsx
new file mode 100644
index 0000000..acf2389
--- /dev/null
+++ b/src/client/components/FullscreenButton.tsx
@@ -0,0 +1,15 @@
+import { m } from "../i18n";
+import { isStandalone, useFullscreen } from "../useFullscreen";
+import { Button } from "./ui";
+
+/** Full screen on browsers that allow it; on iPhone, a hint to add Pling to the home screen. */
+export function FullscreenButton({ className = "" }: { className?: string }) {
+ const { supported, active, toggle } = useFullscreen();
+ if (isStandalone()) return null;
+ if (!supported) return {m.fullscreen_ios_hint()}
;
+ return (
+
+ {active ? m.fullscreen_exit() : m.fullscreen_enter()}
+
+ );
+}
diff --git a/src/client/components/HostPanel.tsx b/src/client/components/HostPanel.tsx
new file mode 100644
index 0000000..45c7218
--- /dev/null
+++ b/src/client/components/HostPanel.tsx
@@ -0,0 +1,142 @@
+import type { ClientMessage } from "../../shared/game";
+import type { RoomView } from "../../shared/view";
+import { blendOptions } from "../blendOptions";
+import { keyName, playerName } from "../format";
+import { linkKind } from "../spotifyLinks";
+import { Countdown } from "./Countdown";
+import { TrackCard } from "./TrackCard";
+import { Button } from "./ui";
+import { m } from "../i18n";
+
+const PLAY_LINK =
+ "block w-full rounded-2xl bg-[#1DB954] px-6 py-5 text-center text-xl font-black text-black shadow-md transition hover:brightness-105 active:scale-[0.99]";
+
+export function HostPanel({ view, now, send }: { view: RoomView; now: number; send: (m: ClientMessage) => void }) {
+ const { round, track, deck, spotifyLink } = view;
+ const ownMusic = !deck;
+ const linkInfo = spotifyLink && linkKind(spotifyLink.kind);
+
+ return (
+
+
+ {m.song_of({ number: view.roundNo, name: deck ? deck.name : linkInfo ? linkInfo.name : m.own_music() })}
+
+
+ {spotifyLink && linkInfo && (round.phase === "idle" || round.phase === "over") && (
+
+ {linkInfo.open}
+
+ )}
+
+ {view.blendOutdated && (round.phase === "idle" || round.phase === "over") && (
+
+ {m.blend_outdated()}
+ send({ t: "blend", ...blendOptions() })}>
+ {m.rebuild()}
+
+
+ )}
+
+ {track && }
+
+ {round.phase === "idle" && (
+
+ {ownMusic || !track?.url ? (
+ <>
+
+ {linkInfo ? linkInfo.hostTip : m.start_any_app()}
+
+
send({ t: "start" })}>
+ {m.start_round()}
+
+ >
+ ) : (
+ <>
+
send({ t: "start" })}
+ >
+ {m.play_in_spotify()}
+
+ >
+ )}
+ {deck && (
+
send({ t: "next" })}>
+ {m.skip_song()}
+
+ )}
+
+ )}
+
+ {round.phase === "playing" && (
+
+
{m.listening()}
+
+ {round.lockedOut.length > 0 && (
+
+ {m.locked_out_list({ names: round.lockedOut.map((k) => keyName(view, k)).join(", ") })}
+
+ )}
+
+
+ )}
+
+ {round.phase === "buzzed" && (
+
+
🔔 {playerName(view, round.playerId)}
+ {view.mode === "vs" &&
{m.for_team({ team: keyName(view, round.key) })}
}
+
{m.pause_judge()}
+
+
+ send({ t: "judge", correct: false })}>
+ {m.wrong()}
+
+ send({ t: "judge", correct: true })}>
+ {m.correct()}
+
+
+
+ )}
+
+ {round.phase === "over" && (
+
+
+ {round.outcome === "correct"
+ ? m.point_to({ name: keyName(view, round.key) })
+ : round.outcome === "timeout"
+ ? m.nobody_got_it()
+ : m.round_ended()}
+
+ {deck ? (
+
send({ t: "next" })}>
+ {m.next_song()}
+
+ ) : (
+
send({ t: "start" })}>
+ {m.start_next_round()}
+
+ )}
+
+ )}
+
+ {track && round.phase !== "over" && (
+
+ send({ t: "reveal", revealed: e.target.checked })} />
+ {m.show_song()}
+
+ )}
+
+ );
+}
diff --git a/src/client/components/ImportPanel.tsx b/src/client/components/ImportPanel.tsx
new file mode 100644
index 0000000..3efe0a7
--- /dev/null
+++ b/src/client/components/ImportPanel.tsx
@@ -0,0 +1,94 @@
+import { useState } from "react";
+import type { Track } from "../../shared/game";
+import { parseImportFile, parsePastedTracks, type ImportedPlaylist } from "../../shared/spotify";
+import { Button } from "./ui";
+import { m } from "../i18n";
+
+type Tab = "paste" | "file";
+
+/** Paste or pick a file; calls `onPick` with one list of songs. Nothing leaves the device until then. */
+export function ImportPanel({ actionLabel, onPick }: { actionLabel: (count: number) => string; onPick: (name: string, tracks: Track[]) => void }) {
+ const [tab, setTab] = useState("paste");
+ const [pasted, setPasted] = useState("");
+ const [name, setName] = useState("");
+ const [lists, setLists] = useState(null);
+ const [fileError, setFileError] = useState(null);
+ const pastedTracks = parsePastedTracks(pasted);
+
+ async function readFiles(files: FileList | null) {
+ setFileError(null);
+ if (!files?.length) return;
+ const found: ImportedPlaylist[] = [];
+ for (const file of Array.from(files)) found.push(...parseImportFile(file.name, await file.text()));
+ setLists(found);
+ if (found.length === 0) setFileError(m.file_error());
+ }
+
+ const tabClass = (t: Tab) => `flex-1 rounded-lg py-1.5 text-sm ${tab === t ? "bg-white shadow-sm" : "text-stone-500"}`;
+
+ return (
+
+
+ setTab("paste")}>
+ {m.paste_songs()}
+
+ setTab("file")}>
+ {m.from_file()}
+
+
+
+ {tab === "paste" && (
+ <>
+
+ {m.how_get_playlist()}
+
+
+ {m.help_computer_title()} {m.help_computer()}
+
+
+ {m.help_phone_title()} {m.help_phone()}
+
+
+
+
+ );
+}
diff --git a/src/client/components/LanguagePicker.tsx b/src/client/components/LanguagePicker.tsx
new file mode 100644
index 0000000..d5e2095
--- /dev/null
+++ b/src/client/components/LanguagePicker.tsx
@@ -0,0 +1,21 @@
+import { getLocale, LOCALE_NAMES, locales, m, setLocale } from "../i18n";
+
+/** English / Norsk. Switching reloads the page; the room reconnects by itself. */
+export function LanguagePicker({ className = "" }: { className?: string }) {
+ const current = getLocale();
+ return (
+
+ {locales.map((locale) => (
+ locale !== current && setLocale(locale)}
+ >
+ {LOCALE_NAMES[locale]}
+
+ ))}
+
+ );
+}
diff --git a/src/client/components/PlayerPanel.tsx b/src/client/components/PlayerPanel.tsx
new file mode 100644
index 0000000..61384fe
--- /dev/null
+++ b/src/client/components/PlayerPanel.tsx
@@ -0,0 +1,116 @@
+import type { ClientMessage, Team } from "../../shared/game";
+import type { RoomView } from "../../shared/view";
+import { keyName, playerName } from "../format";
+import { linkKind } from "../spotifyLinks";
+import { Countdown } from "./Countdown";
+import { TrackCard } from "./TrackCard";
+import { Button, PushButton } from "./ui";
+import { m } from "../i18n";
+import { FullscreenButton } from "./FullscreenButton";
+
+function buzz(send: (m: ClientMessage) => void, team?: Team) {
+ navigator.vibrate?.(40);
+ send({ t: "buzz", ...(team ? { team } : {}) });
+}
+
+export function TeamPicker({ send }: { send: (m: ClientMessage) => void }) {
+ return (
+
+ {m.which_team()}
+
+ send({ t: "seat", seat: "red" })}>
+ {m.red()}
+
+ send({ t: "seat", seat: "blue" })}>
+ {m.blue()}
+
+
+ send({ t: "seat", seat: "shared" })}>
+ {m.shared_buzzer()}
+
+
+ );
+}
+
+export function PlayerPanel({
+ view,
+ now,
+ send,
+ onAddMusic,
+}: {
+ view: RoomView;
+ now: number;
+ send: (m: ClientMessage) => void;
+ onAddMusic: () => void;
+}) {
+ const me = view.players.find((p) => p.id === view.you);
+ const { round } = view;
+ const myKey = view.mode === "ffa" ? view.you : me?.seat;
+ const lockedOut = (key: string | null | undefined) => round.phase === "playing" && !!key && round.lockedOut.includes(key);
+ const canBuzz = (key: string | null | undefined) => round.phase === "playing" && !lockedOut(key);
+
+ let status: string;
+ if (round.phase === "idle") status = m.waiting_host();
+ else if (round.phase === "playing") status = lockedOut(myKey) ? m.locked_out() : m.know_it();
+ else if (round.phase === "buzzed")
+ status =
+ round.playerId === view.you
+ ? m.your_answer()
+ : m.buzzed({ name: `${playerName(view, round.playerId)}${view.mode === "vs" ? ` (${keyName(view, round.key)})` : ""}` });
+ else if (round.outcome === "correct") status = round.key === myKey ? m.you_scored() : m.point_to_plain({ name: keyName(view, round.key) });
+ else status = round.outcome === "timeout" ? m.nobody_got_it() : m.round_over();
+
+ return (
+
+
+ {status}
+
+
+ {me?.seat === "shared" && view.mode === "vs" ? (
+
+
buzz(send, "red")}>
+ {m.red_caps()}
+
+
buzz(send, "blue")}>
+ {m.blue_caps()}
+
+
+ ) : (
+ buzz(send)}
+ >
+ PLING
+
+ )}
+
+
+ {round.phase === "playing" && }
+ {round.phase === "buzzed" && (
+
+ )}
+
+
+ {view.track && }
+
+ {view.spotifyLink ? (
+
+ {linkKind(view.spotifyLink.kind).join}
+
+ ) : round.phase === "idle" && !view.contributions.some((c) => c.playerId === view.you) && (
+
+ {m.add_to_blend()}
+
+ )}
+
+
+
+ );
+}
diff --git a/src/client/components/Scoreboard.tsx b/src/client/components/Scoreboard.tsx
new file mode 100644
index 0000000..912bf08
--- /dev/null
+++ b/src/client/components/Scoreboard.tsx
@@ -0,0 +1,74 @@
+import type { ClientMessage } from "../../shared/game";
+import type { RoomView } from "../../shared/view";
+import { m } from "../i18n";
+
+const TEAM_TILE = {
+ red: "bg-gradient-to-b from-red-500 to-red-600",
+ blue: "bg-gradient-to-b from-blue-500 to-blue-600",
+} as const;
+
+function Adjust({ onAdjust, label }: { onAdjust: (delta: 1 | -1) => void; label: string }) {
+ return (
+
+ onAdjust(-1)}>
+ −
+
+ onAdjust(1)}>
+ +
+
+
+ );
+}
+
+export function Scoreboard({ view, send, highlight }: { view: RoomView; send: (m: ClientMessage) => void; highlight?: string }) {
+ const isHost = view.hostId === view.you;
+ const adjust = (key: string) => (delta: 1 | -1) => send({ t: "score", key, delta });
+
+ if (view.mode === "vs") {
+ return (
+
+ {(["red", "blue"] as const).map((team) => {
+ const members = view.players.filter((p) => p.seat === team && p.id !== view.hostId);
+ return (
+
+
+
{team === "red" ? m.red() : m.blue()}
+ {isHost &&
}
+
+
+ {view.scores[team] ?? 0}
+
+
{members.map((m) => m.name).join(", ") || m.no_players_yet()}
+
+ );
+ })}
+
+ );
+ }
+
+ const ranked = view.players
+ .filter((p) => p.id !== view.hostId)
+ .sort((a, b) => (view.scores[b.id] ?? 0) - (view.scores[a.id] ?? 0));
+ return (
+
+ {ranked.length === 0 && {m.waiting_players()} }
+ {ranked.map((p) => (
+
+ {p.name}
+
+ {isHost && }
+
+ {view.scores[p.id] ?? 0}
+
+
+
+ ))}
+
+ );
+}
diff --git a/src/client/components/SettingsModal.tsx b/src/client/components/SettingsModal.tsx
new file mode 100644
index 0000000..a34e51f
--- /dev/null
+++ b/src/client/components/SettingsModal.tsx
@@ -0,0 +1,164 @@
+import { useEffect, useRef, useState } from "react";
+import { LIMITS, type ClientMessage } from "../../shared/game";
+import type { RoomView } from "../../shared/view";
+import { saveName } from "../identity";
+import { Button, Modal } from "./ui";
+import { m } from "../i18n";
+import { LanguagePicker } from "./LanguagePicker";
+import { FullscreenButton } from "./FullscreenButton";
+
+export function SettingsModal({ view, send, onClose }: { view: RoomView; send: (m: ClientMessage) => void; onClose: () => void }) {
+ const me = view.players.find((p) => p.id === view.you);
+ const isHost = view.hostId === view.you;
+ const [name, setName] = useState(me?.name ?? "");
+ const others = view.players.filter((p) => p.id !== view.you && p.online);
+
+ return (
+
+
+
+
+
{m.fullscreen_setting()}
+
+
+
+
+ {view.mode === "vs" && !isHost && (
+
+
{m.your_team()}
+
+ {(["red", "blue", "shared"] as const).map((seat) => (
+ send({ t: "seat", seat })}>
+ {seat === "shared" ? m.shared() : seat === "red" ? m.red() : m.blue()}
+
+ ))}
+
+
+ )}
+
+ {isHost && (
+ <>
+
+ send({ t: "settings", roundSeconds })}
+ />
+ send({ t: "settings", answerSeconds })}
+ />
+
+
+
+
{m.game_mode()}
+
+ send({ t: "mode", mode: "vs" })}>
+ {m.mode_vs()}
+
+ send({ t: "mode", mode: "ffa" })}>
+ {m.mode_ffa()}
+
+
+
+
+ {others.length > 0 && (
+
+
{m.hand_over()}
+
+ {others.map((p) => (
+ send({ t: "makeHost", playerId: p.id })}>
+ {p.name}
+
+ ))}
+
+
+ )}
+
+
{
+ if (confirm(m.reset_confirm())) send({ t: "resetScores" });
+ }}
+ >
+ {m.reset_scores()}
+
+ >
+ )}
+
+
+ );
+}
+
+function NumberSetting({
+ label,
+ value,
+ range,
+ onChange,
+}: {
+ label: string;
+ value: number;
+ range: readonly [number, number];
+ onChange: (v: number) => void;
+}) {
+ // Count taps locally so quick taps add up. Echoes of earlier taps arrive
+ // while you're still tapping, so only take the server's value once you pause.
+ const [current, setCurrent] = useState(value);
+ const lastTap = useRef(0);
+ useEffect(() => {
+ const wait = lastTap.current + 1000 - Date.now();
+ if (wait <= 0) return setCurrent(value);
+ const timer = setTimeout(() => setCurrent(value), wait);
+ return () => clearTimeout(timer);
+ }, [value]);
+ const step = (d: number) => {
+ const next = Math.min(range[1], Math.max(range[0], current + d));
+ lastTap.current = Date.now();
+ setCurrent(next);
+ onChange(next);
+ };
+ return (
+
+
{label}
+
+ step(-5)}>
+ −
+
+ {current}
+ step(5)}>
+ +
+
+
+
+ );
+}
diff --git a/src/client/components/ShareModal.tsx b/src/client/components/ShareModal.tsx
new file mode 100644
index 0000000..9c58c82
--- /dev/null
+++ b/src/client/components/ShareModal.tsx
@@ -0,0 +1,48 @@
+import QRCode from "qrcode";
+import { useEffect, useState } from "react";
+import type { SpotifyLink } from "../../shared/game";
+import { linkKind } from "../spotifyLinks";
+import { Button, Modal } from "./ui";
+import { m } from "../i18n";
+
+export function ShareModal({ code, spotifyLink, onClose }: { code: string; spotifyLink: SpotifyLink | null; onClose: () => void }) {
+ const url = `${window.location.origin}/r/${code}`;
+ const [svg, setSvg] = useState("");
+ const [copied, setCopied] = useState(false);
+
+ useEffect(() => {
+ QRCode.toString(url, { type: "svg", margin: 1 }).then(setSvg).catch(() => setSvg(""));
+ }, [url]);
+
+ return (
+
+
+
{m.scan_to_join()}
+
+
{code}
+
+ navigator.clipboard?.writeText(url).then(() => setCopied(true))}
+ >
+ {copied ? m.copied() : m.copy_link()}
+
+ {"share" in navigator && (
+ navigator.share({ title: m.share_title(), url }).catch(() => {})}>
+ {m.share()}
+
+ )}
+
+ {spotifyLink && (
+
+ {m.share_spotify({ name: linkKind(spotifyLink.kind).name })}{" "}
+
+ {spotifyLink.url}
+
+
+ )}
+
+
+ );
+}
diff --git a/src/client/components/TrackCard.tsx b/src/client/components/TrackCard.tsx
new file mode 100644
index 0000000..c179946
--- /dev/null
+++ b/src/client/components/TrackCard.tsx
@@ -0,0 +1,27 @@
+import type { TrackView } from "../../shared/view";
+import { joinNames, m } from "../i18n";
+
+
+export function TrackCard({ track, label, showLink }: { track: TrackView; label?: string; showLink?: boolean }) {
+ // Songs pasted as bare Spotify links have no name: Pling can't look it up
+ // without Spotify's API, but Spotify shows it when the link is opened.
+ const named = Boolean(track.title);
+ return (
+
+ {label &&
{label}
}
+
{named ? track.title : m.spotify_link_song()}
+ {named && track.artist &&
{track.artist}
}
+ {!named &&
{m.name_in_spotify()}
}
+ {track.from && track.from.length > 0 && (
+
+ {m.from_lists({ names: joinNames(track.from), count: track.from.length })}
+
+ )}
+ {showLink && track.url && (
+
+ {m.open_in_spotify()}
+
+ )}
+
+ );
+}
diff --git a/src/client/components/ui.tsx b/src/client/components/ui.tsx
new file mode 100644
index 0000000..6ec347c
--- /dev/null
+++ b/src/client/components/ui.tsx
@@ -0,0 +1,101 @@
+import { useEffect, type ButtonHTMLAttributes, type ReactNode } from "react";
+import { m } from "../i18n";
+
+type Variant = "primary" | "secondary" | "ghost" | "danger" | "success";
+
+const VARIANTS: Record = {
+ primary: "bg-ink text-white hover:bg-stone-700",
+ secondary: "bg-white text-ink ring-1 ring-stone-300 hover:bg-stone-50",
+ ghost: "text-stone-600 hover:bg-stone-200/60",
+ danger: "bg-red-600 text-white hover:bg-red-500",
+ success: "bg-emerald-600 text-white hover:bg-emerald-500",
+};
+
+export function Button({
+ variant = "primary",
+ className = "",
+ ...props
+}: ButtonHTMLAttributes & { variant?: Variant }) {
+ return (
+
+ );
+}
+
+export function Modal({ title, onClose, children }: { title: string; onClose: () => void; children: ReactNode }) {
+ useEffect(() => {
+ const onKey = (e: KeyboardEvent) => e.key === "Escape" && onClose();
+ window.addEventListener("keydown", onKey);
+ return () => window.removeEventListener("keydown", onKey);
+ }, [onClose]);
+ return (
+
+
e.stopPropagation()}
+ >
+
+
{title}
+
+ ✕
+
+
+ {children}
+
+
+ );
+}
+
+const TEAM_STYLE = {
+ red: { edge: "bg-red-800", front: "bg-gradient-to-b from-red-500 to-red-600" },
+ blue: { edge: "bg-blue-800", front: "bg-gradient-to-b from-blue-500 to-blue-600" },
+ off: { edge: "bg-slate-700", front: "bg-gradient-to-b from-slate-400 to-slate-500" },
+} as const;
+
+/** The big round 3D button. */
+export function PushButton({
+ color,
+ size = "lg",
+ disabled,
+ onPress,
+ label,
+ children,
+}: {
+ color: "red" | "blue";
+ size?: "lg" | "md" | "sm";
+ disabled?: boolean;
+ onPress: () => void;
+ label: string;
+ children: ReactNode;
+}) {
+ const style = TEAM_STYLE[disabled ? "off" : color];
+ const dims = { lg: "h-64 w-64 text-6xl", md: "h-40 w-40 text-4xl", sm: "h-14 w-14 text-xl" }[size];
+ return (
+ {
+ if (disabled || e.button > 0) return;
+ onPress();
+ }}
+ // Holding the button is still a press: no long-press menu.
+ onContextMenu={(e) => e.preventDefault()}
+ onKeyDown={(e) => {
+ if (!disabled && (e.key === "Enter" || e.key === " ")) {
+ e.preventDefault();
+ onPress();
+ }
+ }}
+ >
+
+
+ {children}
+
+ );
+}
diff --git a/src/client/format.ts b/src/client/format.ts
new file mode 100644
index 0000000..f358ae3
--- /dev/null
+++ b/src/client/format.ts
@@ -0,0 +1,19 @@
+import type { RoomView } from "../shared/view";
+import { m } from "./i18n";
+
+export const teamName = (team: string): string => (team === "red" ? m.red() : team === "blue" ? m.blue() : team);
+
+/** "Red" / "Blue" in versus mode, the player's name in free-for-all. */
+export function keyName(view: RoomView, key: string | undefined): string {
+ if (!key) return "";
+ if (view.mode === "vs") return teamName(key);
+ return view.players.find((p) => p.id === key)?.name ?? m.someone();
+}
+
+export function playerName(view: RoomView, id: string): string {
+ return view.players.find((p) => p.id === id)?.name ?? m.someone();
+}
+
+export function secondsLeft(until: number, now: number): number {
+ return Math.max(0, Math.ceil((until - now) / 1000));
+}
diff --git a/src/client/i18n.ts b/src/client/i18n.ts
new file mode 100644
index 0000000..0de543f
--- /dev/null
+++ b/src/client/i18n.ts
@@ -0,0 +1,56 @@
+import { m } from "../paraglide/messages.js";
+import { getLocale, locales, setLocale, type Locale } from "../paraglide/runtime.js";
+
+export { getLocale, locales, m, setLocale, type Locale };
+
+export const LOCALE_NAMES: Record = { en: "English", nb: "Norsk" };
+
+const STORAGE_KEY = "PARAGLIDE_LOCALE";
+
+/**
+ * Paraglide matches the browser language exactly, so "no" and "nn" (common on
+ * Norwegian phones) wouldn't pick Bokmål. Map them before the first render.
+ */
+export function initLocale() {
+ try {
+ if (!localStorage.getItem(STORAGE_KEY)) {
+ const norwegian = navigator.languages?.some((l) => /^(no|nb|nn)\b/i.test(l));
+ if (norwegian && getLocale() !== "nb") setLocale("nb", { reload: false });
+ }
+ } catch {
+ // Storage blocked: fall back to Paraglide's own detection.
+ }
+ document.documentElement.lang = getLocale();
+}
+
+// The server sends errors in English; show the ones we know in the user's language.
+const SERVER_ERRORS: Record string> = {
+ "Locked out this round": m.err_locked_out,
+ "Name can't be empty": m.err_name_empty,
+ "No round running": m.err_no_round,
+ "No songs are on more than one list yet": m.err_no_common,
+ "No usable songs in that list": m.err_no_usable,
+ "Nobody has added music yet": m.err_nobody_added,
+ "Nobody has buzzed": m.err_nobody_buzzed,
+ "Nothing to buzz for right now": m.err_nothing_to_buzz,
+ "Only the host can do that": m.err_host_only,
+ "Pick a team first": m.err_pick_team,
+ "Pick a team to buzz for": m.err_pick_team_buzz,
+ "Room is full": m.err_room_full,
+ "Round already running": m.err_round_running,
+ "That isn't a Spotify share link": m.err_not_spotify,
+ "That player isn't here": m.err_player_gone,
+ "The host can't buzz": m.err_host_cant_buzz,
+ "The host is still here": m.err_host_here,
+ "That room code isn't valid": m.err_bad_room,
+ "Something went wrong": m.err_generic,
+};
+
+export function translateServerError(message: string): string {
+ return SERVER_ERRORS[message]?.() ?? message;
+}
+
+/** "Ola", "Ola and Kari", "Ola, Kari and Per". */
+export function joinNames(names: string[]): string {
+ return names.length > 1 ? `${names.slice(0, -1).join(", ")} ${m.and()} ${names.at(-1)}` : (names[0] ?? "");
+}
diff --git a/src/client/identity.ts b/src/client/identity.ts
new file mode 100644
index 0000000..b4a8a57
--- /dev/null
+++ b/src/client/identity.ts
@@ -0,0 +1,45 @@
+import { randomName } from "../shared/names";
+
+// A stable id per browser, so refreshing or reconnecting keeps your seat,
+// score and host role. Stored locally only.
+
+function read(key: string): string | null {
+ try {
+ return localStorage.getItem(key);
+ } catch {
+ return null;
+ }
+}
+
+function write(key: string, value: string) {
+ try {
+ localStorage.setItem(key, value);
+ } catch {
+ // Private mode or storage blocked: the id just won't survive a reload.
+ }
+}
+
+let cachedId: string | null = null;
+
+export function playerId(): string {
+ if (cachedId) return cachedId;
+ cachedId = read("pling.playerId");
+ if (!cachedId || !/^[A-Za-z0-9_-]{8,64}$/.test(cachedId)) {
+ cachedId = crypto.randomUUID().replace(/-/g, "");
+ write("pling.playerId", cachedId);
+ }
+ return cachedId;
+}
+
+export function savedName(): string {
+ let name = read("pling.name");
+ if (!name) {
+ name = randomName();
+ write("pling.name", name);
+ }
+ return name;
+}
+
+export function saveName(name: string) {
+ write("pling.name", name);
+}
diff --git a/src/client/main.tsx b/src/client/main.tsx
new file mode 100644
index 0000000..22de525
--- /dev/null
+++ b/src/client/main.tsx
@@ -0,0 +1,13 @@
+import { StrictMode } from "react";
+import { createRoot } from "react-dom/client";
+import { App } from "./App";
+import { initLocale } from "./i18n";
+import "./styles.css";
+
+initLocale();
+
+createRoot(document.getElementById("root")!).render(
+
+
+ ,
+);
diff --git a/src/client/spotifyLinks.ts b/src/client/spotifyLinks.ts
new file mode 100644
index 0000000..2254d92
--- /dev/null
+++ b/src/client/spotifyLinks.ts
@@ -0,0 +1,48 @@
+import type { SpotifyLinkKind } from "../shared/game";
+import { m } from "./i18n";
+
+interface LinkKindText {
+ name: string;
+ short: string;
+ how: string[];
+ join: string;
+ hostTip: string;
+ use: string;
+ open: string;
+}
+
+/** Text for each kind of Spotify link a host can share with the room, in the current language. */
+export function linkKind(kind: SpotifyLinkKind): LinkKindText {
+ switch (kind) {
+ case "blend":
+ return {
+ name: m.blend_name(),
+ short: m.blend_short(),
+ how: [m.blend_how_1(), m.blend_how_2()],
+ join: m.blend_join(),
+ hostTip: m.blend_host_tip(),
+ use: m.blend_use(),
+ open: m.blend_open(),
+ };
+ case "collab":
+ return {
+ name: m.collab_name(),
+ short: m.collab_short(),
+ how: [m.collab_how_1(), m.collab_how_2()],
+ join: m.collab_join(),
+ hostTip: m.collab_host_tip(),
+ use: m.collab_use(),
+ open: m.collab_open(),
+ };
+ case "jam":
+ return {
+ name: m.jam_name(),
+ short: m.jam_short(),
+ how: [m.jam_how_1(), m.jam_how_2()],
+ join: m.jam_join(),
+ hostTip: m.jam_host_tip(),
+ use: m.jam_use(),
+ open: m.jam_open(),
+ };
+ }
+}
diff --git a/src/client/styles.css b/src/client/styles.css
new file mode 100644
index 0000000..1ee1581
--- /dev/null
+++ b/src/client/styles.css
@@ -0,0 +1,93 @@
+@import "tailwindcss";
+
+@theme {
+ --color-paper: #fffdf2;
+ --color-ink: #1c1917;
+ --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
+}
+
+html {
+ overscroll-behavior: none;
+ background: var(--color-paper);
+ color: var(--color-ink);
+ font-weight: 600;
+ -webkit-tap-highlight-color: transparent;
+}
+
+button,
+a {
+ touch-action: manipulation;
+}
+
+/* The 3D push button from the original Pling. */
+.pushable {
+ position: relative;
+ border: none;
+ background: transparent;
+ padding: 0;
+ cursor: pointer;
+ outline-offset: 4px;
+ transition: filter 250ms;
+ user-select: none;
+ -webkit-user-select: none;
+ /* A long press must not open the callout menu, start a selection or pan the page. */
+ -webkit-touch-callout: none;
+ touch-action: none;
+}
+.pushable .shadow {
+ position: absolute;
+ inset: 0;
+ border-radius: 999px;
+ background: hsl(0deg 0% 0% / 0.25);
+ transform: translateY(12px);
+ transition: transform 600ms cubic-bezier(0.3, 0.7, 0.4, 1);
+}
+.pushable .edge {
+ position: absolute;
+ inset: 0;
+ border-radius: 999px;
+}
+.pushable .front {
+ display: grid;
+ place-items: center;
+ position: relative;
+ border-radius: 999px;
+ color: white;
+ transform: translateY(-6px);
+ transition: transform 600ms cubic-bezier(0.3, 0.7, 0.4, 1);
+}
+.pushable:not(:disabled):hover {
+ filter: brightness(110%);
+}
+.pushable:not(:disabled):active .front {
+ transform: translateY(-2px);
+ transition: transform 34ms;
+}
+.pushable:not(:disabled):active .shadow {
+ transform: translateY(1px);
+ transition: transform 34ms;
+}
+.pushable:disabled {
+ cursor: default;
+}
+.pushable:focus:not(:focus-visible) {
+ outline: none;
+}
+
+@keyframes ring {
+ 0%,
+ 100% {
+ transform: rotate(0);
+ }
+ 20%,
+ 60% {
+ transform: rotate(-8deg);
+ }
+ 40%,
+ 80% {
+ transform: rotate(8deg);
+ }
+}
+.animate-ring {
+ animation: ring 500ms ease-in-out;
+}
diff --git a/src/client/useFullscreen.ts b/src/client/useFullscreen.ts
new file mode 100644
index 0000000..4382ece
--- /dev/null
+++ b/src/client/useFullscreen.ts
@@ -0,0 +1,69 @@
+import { useCallback, useEffect, useState } from "react";
+
+type FsDocument = Document & { webkitFullscreenElement?: Element; webkitExitFullscreen?: () => Promise };
+type FsElement = HTMLElement & { webkitRequestFullscreen?: () => Promise };
+
+const doc = () => document as FsDocument;
+const isFullscreen = () => Boolean(doc().fullscreenElement ?? doc().webkitFullscreenElement);
+
+/** Launched from the home screen as an app (already full screen, e.g. on iPhone). */
+export const isStandalone = () =>
+ typeof window !== "undefined" &&
+ (window.matchMedia?.("(display-mode: fullscreen)").matches ||
+ window.matchMedia?.("(display-mode: standalone)").matches ||
+ (navigator as Navigator & { standalone?: boolean }).standalone === true);
+
+/**
+ * Browser full screen (Android, desktop, iPad) plus a screen wake lock while it's
+ * on, so a buzzer phone doesn't go to sleep mid-game. iPhone Safari has no
+ * full-screen API for pages; there, adding Pling to the home screen does it.
+ */
+export function useFullscreen() {
+ const root = document.documentElement as FsElement;
+ const supported = Boolean(root.requestFullscreen ?? root.webkitRequestFullscreen);
+ const [active, setActive] = useState(isFullscreen);
+
+ useEffect(() => {
+ const sync = () => setActive(isFullscreen());
+ document.addEventListener("fullscreenchange", sync);
+ document.addEventListener("webkitfullscreenchange", sync);
+ return () => {
+ document.removeEventListener("fullscreenchange", sync);
+ document.removeEventListener("webkitfullscreenchange", sync);
+ };
+ }, []);
+
+ // Keep the screen on while full screen (or running as a home-screen app).
+ useEffect(() => {
+ if (!(active || isStandalone()) || !("wakeLock" in navigator)) return;
+ let lock: WakeLockSentinel | null = null;
+ let cancelled = false;
+ const request = () => {
+ if (document.visibilityState !== "visible") return;
+ navigator.wakeLock
+ .request("screen")
+ .then((l) => {
+ if (cancelled) l.release().catch(() => {});
+ else lock = l;
+ })
+ .catch(() => {});
+ };
+ request();
+ document.addEventListener("visibilitychange", request); // the lock is dropped when the tab is hidden
+ return () => {
+ cancelled = true;
+ document.removeEventListener("visibilitychange", request);
+ lock?.release().catch(() => {});
+ };
+ }, [active]);
+
+ const toggle = useCallback(() => {
+ if (isFullscreen()) {
+ (document.exitFullscreen ?? doc().webkitExitFullscreen)?.call(document).catch(() => {});
+ } else {
+ (root.requestFullscreen ?? root.webkitRequestFullscreen)?.call(root).catch(() => {});
+ }
+ }, [root]);
+
+ return { supported, active, toggle };
+}
diff --git a/src/client/useRoom.ts b/src/client/useRoom.ts
new file mode 100644
index 0000000..481b466
--- /dev/null
+++ b/src/client/useRoom.ts
@@ -0,0 +1,96 @@
+import usePartySocket from "partysocket/react";
+import { useCallback, useEffect, useRef, useState } from "react";
+import type { ClientMessage, GameEvent, Mode } from "../shared/game";
+import type { RoomView, ServerMessage } from "../shared/view";
+import { playerId, savedName } from "./identity";
+import { translateServerError } from "./i18n";
+
+export interface RoomConnection {
+ view: RoomView | null;
+ connected: boolean;
+ error: string | null;
+ lastBuzz: (GameEvent & { at: number }) | null;
+ /** Server time minus local time, so countdowns match the server. */
+ clockOffset: number;
+ send: (msg: ClientMessage) => void;
+}
+
+export function useRoom(code: string, mode: Mode | null): RoomConnection {
+ const [view, setView] = useState(null);
+ const [connected, setConnected] = useState(false);
+ const [error, setError] = useState(null);
+ const [lastBuzz, setLastBuzz] = useState(null);
+ const [clockOffset, setClockOffset] = useState(0);
+ const errorTimer = useRef>(undefined);
+
+ const socket = usePartySocket({
+ party: "room",
+ room: code,
+ query: { pid: playerId(), name: savedName(), ...(mode ? { mode } : {}) },
+ onOpen: () => setConnected(true),
+ onClose: () => setConnected(false),
+ onMessage(event) {
+ const msg = JSON.parse(event.data as string) as ServerMessage;
+ if (msg.t === "state") {
+ setView(msg.view);
+ setClockOffset(msg.now - Date.now());
+ } else if (msg.t === "event" && msg.event.t === "buzz") {
+ setLastBuzz({ ...msg.event, at: Date.now() });
+ ringBell();
+ } else if (msg.t === "error") {
+ setError(translateServerError(msg.message));
+ clearTimeout(errorTimer.current);
+ errorTimer.current = setTimeout(() => setError(null), 3500);
+ }
+ },
+ });
+
+ const send = useCallback((msg: ClientMessage) => socket.send(JSON.stringify(msg)), [socket]);
+ return { view, connected, error, lastBuzz, clockOffset, send };
+}
+
+/** Re-renders every `ms` while `active`, for countdowns. */
+export function useNow(active: boolean, offset: number, ms = 100): number {
+ const [now, setNow] = useState(() => Date.now() + offset);
+ useEffect(() => {
+ setNow(Date.now() + offset);
+ if (!active) return;
+ const id = setInterval(() => setNow(Date.now() + offset), ms);
+ return () => clearInterval(id);
+ }, [active, offset, ms]);
+ return now;
+}
+
+// --- Bell -------------------------------------------------------------------
+// Mobile browsers only allow audio after a user gesture, so the bell is
+// "unlocked" silently on the first tap anywhere.
+
+let bell: HTMLAudioElement | null = null;
+
+function getBell(): HTMLAudioElement {
+ bell ??= new Audio("/audio/bell.mp3");
+ return bell;
+}
+
+if (typeof document !== "undefined") {
+ const unlock = () => {
+ const audio = getBell();
+ audio.muted = true;
+ audio
+ .play()
+ .then(() => {
+ audio.pause();
+ audio.currentTime = 0;
+ })
+ .catch(() => {})
+ .finally(() => (audio.muted = false));
+ document.removeEventListener("pointerdown", unlock);
+ };
+ document.addEventListener("pointerdown", unlock);
+}
+
+function ringBell() {
+ const audio = getBell();
+ audio.currentTime = 0;
+ audio.play().catch(() => {});
+}
diff --git a/src/server/index.ts b/src/server/index.ts
new file mode 100644
index 0000000..cfdfeac
--- /dev/null
+++ b/src/server/index.ts
@@ -0,0 +1,291 @@
+import { routePartykitRequest, Server, type Connection, type ConnectionContext, type WSMessage } from "partyserver";
+import { blendStats, buildBlend, type BlendInput } from "../shared/blend";
+import { builtinDeck, DEFAULT_DECK_ID } from "../shared/decks";
+import {
+ apply,
+ createRoom,
+ ensurePlayer,
+ GameError,
+ isExpired,
+ isHostOnly,
+ LIMITS,
+ MUSIC_MESSAGES,
+ nextWakeup,
+ setContribution,
+ setDeck,
+ setSpotifyLink,
+ SPOTIFY_LINK_KINDS,
+ syncPresence,
+ tick,
+ type ClientMessage,
+ type Deck,
+ type DeckMeta,
+ type GameEvent,
+ type Mode,
+ type RoomState,
+ type Track,
+} from "../shared/game";
+import { isValidRoomCode } from "../shared/names";
+import { cleanSpotifyShareUrl, cleanTrack } from "../shared/spotify";
+import { viewFor, type ServerMessage } from "../shared/view";
+
+interface ConnState {
+ playerId: string;
+}
+
+const CUSTOM_DECK_ID = "custom";
+const BLEND_DECK_ID = "blend";
+const CONTRIB_PREFIX = "contrib:";
+
+interface StoredContribution {
+ playlist: string;
+ tracks: Track[];
+}
+const PLAYER_ID = /^[A-Za-z0-9_-]{8,64}$/;
+
+const meta = (deck: Deck): DeckMeta => ({ id: deck.id, name: deck.name, size: deck.tracks.length });
+
+function cleanTracks(raw: unknown): Track[] {
+ if (!Array.isArray(raw)) throw new GameError("No tracks");
+ const tracks = raw
+ .slice(0, LIMITS.deckTracks)
+ .map(cleanTrack)
+ .filter((t) => t !== null);
+ if (tracks.length === 0) throw new GameError("No usable songs in that list");
+ return tracks;
+}
+
+function cleanListName(raw: unknown, fallback: string): string {
+ return String(raw ?? "").trim().slice(0, LIMITS.deckName) || fallback;
+}
+
+/**
+ * One Durable Object per room. It holds the room state, persists it to its own
+ * storage (so it survives hibernation and deploys), and keeps a single alarm
+ * for the next thing that has to happen.
+ */
+export class Room extends Server {
+ static options = { hibernate: true };
+
+ private room: RoomState | null = null;
+ private deck: Deck | null = null;
+
+ async onStart() {
+ const stored = await this.ctx.storage.get("state");
+ // Fill in fields added after a room was first saved.
+ this.room = stored
+ ? {
+ ...stored,
+ contributions: stored.contributions ?? {},
+ blendStats: stored.blendStats ?? { shared: 0, total: 0 },
+ contribVersion: stored.contribVersion ?? 0,
+ blendVersion: stored.blendVersion ?? null,
+ spotifyLink: stored.spotifyLink ?? null,
+ }
+ : null;
+ if (this.room?.deck?.id === CUSTOM_DECK_ID || this.room?.deck?.id === BLEND_DECK_ID) {
+ this.deck = (await this.ctx.storage.get("deck")) ?? null;
+ } else if (this.room?.deck) {
+ this.deck = builtinDeck(this.room.deck.id) ?? null;
+ }
+ }
+
+ async onConnect(conn: Connection, ctx: ConnectionContext) {
+ const url = new URL(ctx.request.url);
+ const playerId = url.searchParams.get("pid") ?? "";
+ if (!isValidRoomCode(this.name)) return this.reject(conn, "That room code isn't valid");
+ if (!PLAYER_ID.test(playerId)) return this.reject(conn, "Missing player id");
+ conn.setState({ playerId });
+
+ const now = Date.now();
+ let room = this.room;
+ if (!room) {
+ const mode: Mode = url.searchParams.get("mode") === "ffa" ? "ffa" : "vs";
+ this.deck = builtinDeck(DEFAULT_DECK_ID) ?? null;
+ room = createRoom(this.name, mode, this.deck && meta(this.deck), now, Math.random);
+ }
+ try {
+ room = ensurePlayer(room, playerId, url.searchParams.get("name") || "Player", now);
+ } catch (error) {
+ return this.reject(conn, error instanceof GameError ? error.message : "Couldn't join");
+ }
+ await this.commit(syncPresence(room, this.onlineCounts(), now));
+ }
+
+ async onClose(conn: Connection) {
+ if (!this.room) return;
+ await this.commit(syncPresence(this.room, this.onlineCounts(conn.id), Date.now()));
+ }
+
+ async onMessage(conn: Connection, raw: WSMessage) {
+ const playerId = conn.state?.playerId;
+ if (!this.room || !playerId) return;
+ let msg: ClientMessage;
+ try {
+ msg = JSON.parse(typeof raw === "string" ? raw : new TextDecoder().decode(raw));
+ if (!msg || typeof msg !== "object" || typeof msg.t !== "string") throw new Error();
+ } catch {
+ return this.send(conn, { t: "error", message: "Bad message" });
+ }
+
+ const now = Date.now();
+ try {
+ let room = tick(this.room, now);
+ let events: GameEvent[] = [];
+ if (MUSIC_MESSAGES.has(msg.t)) {
+ if (isHostOnly(msg) && room.hostId !== playerId) throw new GameError("Only the host can do that");
+ if (!room.players[playerId]) throw new GameError("Unknown player");
+ room = await this.changeMusic(room, playerId, msg);
+ } else {
+ ({ state: room, events } = apply(room, playerId, msg, now, Math.random));
+ }
+ await this.commit(room);
+ for (const event of events) this.broadcast(JSON.stringify({ t: "event", event } satisfies ServerMessage));
+ } catch (error) {
+ if (!(error instanceof GameError)) console.error("message failed", msg.t, error);
+ this.send(conn, { t: "error", message: error instanceof GameError ? error.message : "Something went wrong" });
+ }
+ }
+
+ async onAlarm() {
+ if (!this.room) return;
+ const now = Date.now();
+ if (isExpired(this.room, now)) {
+ // Nobody has been here for a long time: forget the room entirely.
+ this.room = null;
+ this.deck = null;
+ await this.ctx.storage.deleteAlarm();
+ await this.ctx.storage.deleteAll();
+ return;
+ }
+ await this.commit(this.room);
+ }
+
+ private async changeMusic(room: RoomState, playerId: string, msg: ClientMessage): Promise {
+ if (msg.t === "ownMusic") {
+ this.deck = null;
+ await this.ctx.storage.delete("deck");
+ return setDeck(room, null, Math.random);
+ }
+ if (msg.t === "deck") {
+ const deck = builtinDeck(msg.id);
+ if (!deck) throw new GameError("Unknown deck");
+ this.deck = deck;
+ await this.ctx.storage.delete("deck");
+ return setDeck(room, meta(deck), Math.random);
+ }
+ if (msg.t === "customDeck") {
+ const deck: Deck = { id: CUSTOM_DECK_ID, name: cleanListName(msg.name, "Imported deck"), tracks: cleanTracks(msg.tracks) };
+ await this.ctx.storage.put("deck", deck);
+ this.deck = deck;
+ return setDeck(room, meta(deck), Math.random);
+ }
+ if (msg.t === "contribute" || msg.t === "withdraw") {
+ const key = CONTRIB_PREFIX + playerId;
+ let contribution: StoredContribution | null = null;
+ if (msg.t === "contribute") {
+ contribution = { playlist: cleanListName(msg.playlist, "My music"), tracks: cleanTracks(msg.tracks) };
+ await this.ctx.storage.put(key, contribution);
+ } else {
+ await this.ctx.storage.delete(key);
+ }
+ const inputs = await this.blendInputs(room);
+ return setContribution(
+ room,
+ playerId,
+ contribution && { playlist: contribution.playlist, size: contribution.tracks.length },
+ blendStats(inputs),
+ );
+ }
+ if (msg.t === "blend") {
+ const inputs = await this.blendInputs(room);
+ if (inputs.length === 0) throw new GameError("Nobody has added music yet");
+ const size = Math.min(LIMITS.deckTracks, Math.max(1, Math.floor(Number(msg.size)) || 50));
+ const tracks = buildBlend(inputs, { size, commonOnly: Boolean(msg.commonOnly) }, Math.random);
+ if (tracks.length === 0) throw new GameError("No songs are on more than one list yet");
+ const names = inputs.map((i) => i.name);
+ const name = `Blend: ${names.length > 3 ? `${names.slice(0, 3).join(", ")} +${names.length - 3}` : names.join(", ")}`;
+ const deck: Deck = { id: BLEND_DECK_ID, name: name.slice(0, LIMITS.deckName), tracks };
+ await this.ctx.storage.put("deck", deck);
+ this.deck = deck;
+ return { ...setDeck(room, meta(deck), Math.random), blendVersion: room.contribVersion };
+ }
+ if (msg.t === "spotifyLink") {
+ if (!SPOTIFY_LINK_KINDS.includes(msg.kind)) throw new GameError("Unknown kind of link");
+ const url = cleanSpotifyShareUrl(msg.url);
+ if (!url) throw new GameError("That isn't a Spotify share link");
+ this.deck = null;
+ await this.ctx.storage.delete("deck");
+ return setSpotifyLink(room, { kind: msg.kind, url }, Math.random);
+ }
+ throw new GameError("Unknown music change");
+ }
+
+ /** Every player's added list, labelled with their current name. */
+ private async blendInputs(room: RoomState): Promise {
+ const stored = await this.ctx.storage.list({ prefix: CONTRIB_PREFIX });
+ const lists: { joinedAt: number; input: BlendInput }[] = [];
+ for (const [key, c] of stored) {
+ const player = room.players[key.slice(CONTRIB_PREFIX.length)];
+ if (player && c.tracks.length) lists.push({ joinedAt: player.joinedAt, input: { name: player.name, tracks: c.tracks } });
+ }
+ // Storage keys are random ids; list players in the order they joined.
+ return lists.sort((a, b) => a.joinedAt - b.joinedAt).map((l) => l.input);
+ }
+
+ /** Applies anything due, saves, re-arms the single alarm and sends every connection its view. */
+ private async commit(room: RoomState) {
+ const now = Date.now();
+ this.room = tick(room, now);
+ await this.ctx.storage.put("state", this.room);
+ const wake = nextWakeup(this.room);
+ if (wake === null) await this.ctx.storage.deleteAlarm();
+ else await this.ctx.storage.setAlarm(Math.max(wake, now + 50));
+ this.sendViews();
+ }
+
+ private sendViews() {
+ if (!this.room) return;
+ const cache = new Map();
+ for (const conn of this.getConnections()) {
+ const playerId = conn.state?.playerId;
+ if (!playerId) continue;
+ let payload = cache.get(playerId);
+ if (!payload) {
+ payload = JSON.stringify({
+ t: "state",
+ view: viewFor(this.room, this.deck, playerId),
+ now: Date.now(),
+ } satisfies ServerMessage);
+ cache.set(playerId, payload);
+ }
+ conn.send(payload);
+ }
+ }
+
+ /** Live connections per player, optionally ignoring one that is closing. */
+ private onlineCounts(excludeConnectionId?: string): Record {
+ const counts: Record = {};
+ for (const conn of this.getConnections()) {
+ const playerId = conn.state?.playerId;
+ if (!playerId || conn.id === excludeConnectionId) continue;
+ counts[playerId] = (counts[playerId] ?? 0) + 1;
+ }
+ return counts;
+ }
+
+ private send(conn: Connection, msg: ServerMessage) {
+ conn.send(JSON.stringify(msg));
+ }
+
+ private reject(conn: Connection, message: string) {
+ this.send(conn, { t: "error", message });
+ conn.close(4000, message);
+ }
+}
+
+export default {
+ async fetch(request: Request, env: Env): Promise {
+ return (await routePartykitRequest(request, env)) ?? new Response("Not found", { status: 404 });
+ },
+} satisfies ExportedHandler;
diff --git a/src/shared/blend.ts b/src/shared/blend.ts
new file mode 100644
index 0000000..0fa690b
--- /dev/null
+++ b/src/shared/blend.ts
@@ -0,0 +1,105 @@
+import type { BlendStats, Rng, Track } from "./game";
+import { shuffledIndexes } from "./game";
+
+export interface BlendInput {
+ /** Shown on the reveal ("From Ola's list"). */
+ name: string;
+ tracks: Track[];
+}
+
+export interface BlendOptions {
+ size: number;
+ /** Only songs that are on at least two lists. */
+ commonOnly: boolean;
+}
+
+/** Identifies "the same song" across lists: the Spotify id, else a normalized artist + title. */
+export function trackKey(track: Track): string {
+ if (track.spotifyId) return `id:${track.spotifyId}`;
+ const norm = (s?: string) =>
+ (s ?? "")
+ .toLowerCase()
+ .normalize("NFKD")
+ .replace(/[̀-ͯ]/g, "")
+ // "Song - Remastered 2011", "Song (feat. X)" count as the same song.
+ .replace(/\s+-\s+.*$|\s*[([].*?[)\]]/g, "")
+ .replace(/[^a-z0-9]+/g, " ")
+ .trim();
+ return `name:${norm(track.artist)}|${norm(track.title)}`;
+}
+
+interface Entry {
+ track: Track;
+ owners: number[];
+}
+
+function collect(inputs: BlendInput[]): Map {
+ const entries = new Map();
+ inputs.forEach((input, owner) => {
+ for (const track of input.tracks) {
+ const key = trackKey(track);
+ const entry = entries.get(key);
+ if (!entry) {
+ entries.set(key, { track, owners: [owner] });
+ } else {
+ if (!entry.owners.includes(owner)) entry.owners.push(owner);
+ // Prefer the copy that can link straight to the song, then the one with a name.
+ if (!entry.track.spotifyId && track.spotifyId) entry.track = { ...track, title: track.title ?? entry.track.title, artist: track.artist ?? entry.track.artist };
+ else if (!entry.track.title && track.title) entry.track = { ...entry.track, title: track.title, artist: track.artist };
+ }
+ }
+ });
+ return entries;
+}
+
+export function blendStats(inputs: BlendInput[]): BlendStats {
+ const entries = [...collect(inputs).values()];
+ return { shared: entries.filter((e) => e.owners.length > 1).length, total: entries.length };
+}
+
+function shuffle(items: T[], rng: Rng): T[] {
+ return shuffledIndexes(items.length, rng).map((i) => items[i]);
+}
+
+/**
+ * A cross-section of everyone's lists, like Spotify's Blend:
+ * 1. songs on several lists come first (most lists first);
+ * 2. then each player's remaining songs are taken in turns, so every list
+ * gets an equal share however long it is.
+ * The result is in pick order; the room shuffles it when it becomes the deck.
+ */
+export function buildBlend(inputs: BlendInput[], options: BlendOptions, rng: Rng): Track[] {
+ const size = Math.max(1, Math.floor(options.size));
+ const entries = collect(inputs);
+ const withFrom = (e: Entry): Track => ({ ...e.track, from: e.owners.map((o) => inputs[o].name) });
+
+ const shared = shuffle(
+ [...entries.values()].filter((e) => e.owners.length > 1),
+ rng,
+ ).sort((a, b) => b.owners.length - a.owners.length);
+ const picked = shared.slice(0, size);
+ if (options.commonOnly || picked.length >= size) return picked.map(withFrom);
+
+ const taken = new Set(picked);
+ const perOwner = inputs.map((_, owner) =>
+ shuffle(
+ [...entries.values()].filter((e) => e.owners.length === 1 && e.owners[0] === owner),
+ rng,
+ ),
+ );
+ // Start the turns with a random player so nobody's list always leads.
+ const start = Math.floor(rng() * Math.max(1, inputs.length));
+ for (let round = 0; picked.length < size; round++) {
+ let addedThisRound = false;
+ for (let i = 0; i < perOwner.length && picked.length < size; i++) {
+ const list = perOwner[(start + i) % perOwner.length];
+ const entry = list[round];
+ if (!entry || taken.has(entry)) continue;
+ taken.add(entry);
+ picked.push(entry);
+ addedThisRound = true;
+ }
+ if (!addedThisRound) break;
+ }
+ return picked.map(withFrom);
+}
diff --git a/src/shared/decks.ts b/src/shared/decks.ts
new file mode 100644
index 0000000..7e48956
--- /dev/null
+++ b/src/shared/decks.ts
@@ -0,0 +1,175 @@
+import type { Deck, Track } from "./game";
+
+// Starter decks: artist and title only. Without a Spotify track ID the host's
+// "Play" link opens a Spotify search for the song. Decks you paste or import
+// from a Spotify data export can carry exact track links instead.
+
+const t = (artist: string, title: string): Track => ({ artist, title });
+
+export const BUILTIN_DECKS: Deck[] = [
+ {
+ id: "classics",
+ name: "Classics (60s–90s)",
+ tracks: [
+ t("Queen", "Bohemian Rhapsody"),
+ t("ABBA", "Dancing Queen"),
+ t("Michael Jackson", "Billie Jean"),
+ t("The Beatles", "Hey Jude"),
+ t("The Rolling Stones", "(I Can't Get No) Satisfaction"),
+ t("Bee Gees", "Stayin' Alive"),
+ t("Whitney Houston", "I Wanna Dance with Somebody (Who Loves Me)"),
+ t("Madonna", "Like a Prayer"),
+ t("Prince", "Purple Rain"),
+ t("Bon Jovi", "Livin' on a Prayer"),
+ t("Toto", "Africa"),
+ t("Journey", "Don't Stop Believin'"),
+ t("Survivor", "Eye of the Tiger"),
+ t("Cyndi Lauper", "Girls Just Want to Have Fun"),
+ t("Wham!", "Wake Me Up Before You Go-Go"),
+ t("Eurythmics", "Sweet Dreams (Are Made of This)"),
+ t("Nirvana", "Smells Like Teen Spirit"),
+ t("Oasis", "Wonderwall"),
+ t("Spice Girls", "Wannabe"),
+ t("Backstreet Boys", "I Want It That Way"),
+ t("Britney Spears", "...Baby One More Time"),
+ t("Aqua", "Barbie Girl"),
+ t("Elton John", "Your Song"),
+ t("Fleetwood Mac", "Dreams"),
+ t("Eagles", "Hotel California"),
+ t("Gloria Gaynor", "I Will Survive"),
+ t("Village People", "Y.M.C.A."),
+ t("Dire Straits", "Sultans of Swing"),
+ t("The Police", "Every Breath You Take"),
+ t("Tina Turner", "The Best"),
+ t("Simple Minds", "Don't You (Forget About Me)"),
+ t("Roxette", "It Must Have Been Love"),
+ t("Europe", "The Final Countdown"),
+ t("Guns N' Roses", "Sweet Child o' Mine"),
+ t("Bryan Adams", "Summer of '69"),
+ t("Stevie Wonder", "Superstition"),
+ t("Aretha Franklin", "Respect"),
+ t("Ben E. King", "Stand by Me"),
+ t("The Beach Boys", "Good Vibrations"),
+ t("Chuck Berry", "Johnny B. Goode"),
+ t("Elvis Presley", "Jailhouse Rock"),
+ t("Dolly Parton", "Jolene"),
+ t("Kate Bush", "Running Up That Hill"),
+ t("Cher", "Believe"),
+ t("Ricky Martin", "Livin' la Vida Loca"),
+ t("Lou Bega", "Mambo No. 5"),
+ t("R.E.M.", "Losing My Religion"),
+ t("Red Hot Chili Peppers", "Under the Bridge"),
+ t("Haddaway", "What Is Love"),
+ t("Ace of Base", "The Sign"),
+ ],
+ },
+ {
+ id: "2000s-2010s",
+ name: "2000s & 2010s",
+ tracks: [
+ t("Beyoncé", "Crazy in Love"),
+ t("OutKast", "Hey Ya!"),
+ t("The Killers", "Mr. Brightside"),
+ t("Amy Winehouse", "Rehab"),
+ t("Rihanna", "Umbrella"),
+ t("Lady Gaga", "Poker Face"),
+ t("Black Eyed Peas", "I Gotta Feeling"),
+ t("Kanye West", "Gold Digger"),
+ t("Eminem", "Lose Yourself"),
+ t("Gnarls Barkley", "Crazy"),
+ t("Coldplay", "Viva la Vida"),
+ t("Kings of Leon", "Sex on Fire"),
+ t("Katy Perry", "I Kissed a Girl"),
+ t("Adele", "Rolling in the Deep"),
+ t("Gotye", "Somebody That I Used to Know"),
+ t("Carly Rae Jepsen", "Call Me Maybe"),
+ t("PSY", "Gangnam Style"),
+ t("Pharrell Williams", "Happy"),
+ t("Daft Punk", "Get Lucky"),
+ t("Avicii", "Wake Me Up"),
+ t("Avicii", "Levels"),
+ t("Mark Ronson", "Uptown Funk"),
+ t("Ed Sheeran", "Shape of You"),
+ t("Luis Fonsi", "Despacito"),
+ t("Taylor Swift", "Shake It Off"),
+ t("Justin Bieber", "Sorry"),
+ t("The Weeknd", "Blinding Lights"),
+ t("Billie Eilish", "Bad Guy"),
+ t("Lorde", "Royals"),
+ t("Sia", "Chandelier"),
+ t("Robyn", "Dancing On My Own"),
+ t("Swedish House Mafia", "Don't You Worry Child"),
+ t("Shakira", "Hips Don't Lie"),
+ t("Nelly Furtado", "Promiscuous"),
+ t("Kelly Clarkson", "Since U Been Gone"),
+ t("Gwen Stefani", "Hollaback Girl"),
+ t("Alicia Keys", "Fallin'"),
+ t("Usher", "Yeah!"),
+ t("Arctic Monkeys", "Do I Wanna Know?"),
+ t("MGMT", "Kids"),
+ t("Florence + The Machine", "Dog Days Are Over"),
+ t("Bruno Mars", "Just the Way You Are"),
+ t("Rihanna", "We Found Love"),
+ t("LMFAO", "Party Rock Anthem"),
+ t("Drake", "Hotline Bling"),
+ t("Dua Lipa", "New Rules"),
+ t("Lil Nas X", "Old Town Road"),
+ ],
+ },
+ {
+ id: "norsk",
+ name: "Norsk",
+ tracks: [
+ t("a-ha", "Take On Me"),
+ t("a-ha", "The Sun Always Shines on T.V."),
+ t("Kygo", "Firestone"),
+ t("Kygo", "It Ain't Me"),
+ t("Alan Walker", "Faded"),
+ t("Alan Walker", "Alone"),
+ t("Sigrid", "Don't Kill My Vibe"),
+ t("Sigrid", "Strangers"),
+ t("Aurora", "Runaway"),
+ t("Aurora", "Running with the Wolves"),
+ t("Röyksopp", "Eple"),
+ t("Röyksopp", "Remind Me"),
+ t("Madcon", "Beggin'"),
+ t("Lene Marlin", "Sitting Down Here"),
+ t("Lene Marlin", "Unforgivable Sinner"),
+ t("M2M", "Pretty Boy"),
+ t("Alexander Rybak", "Fairytale"),
+ t("KEiiNO", "Spirit in the Sky"),
+ t("Ylvis", "The Fox (What Does the Fox Say?)"),
+ t("TIX", "Fallen Angel"),
+ t("Wig Wam", "In My Dreams"),
+ t("Kurt Nilsen", "She's So High"),
+ t("Bobbysocks!", "La det swinge"),
+ t("Jahn Teigen", "Mil etter mil"),
+ t("Nico & Vinz", "Am I Wrong"),
+ t("Matoma", "Old Thing Back"),
+ t("Astrid S", "Hurts So Good"),
+ t("Marcus & Martinus", "Elektrisk"),
+ t("Gabrielle", "Ring meg"),
+ t("DDE", "Rai rai"),
+ t("DDE", "Vi drar til fjells"),
+ t("Postgirobygget", "En solskinnsdag"),
+ t("Dum Dum Boys", "Splitter pine"),
+ t("deLillos", "Tyven, tyven"),
+ t("Jokke & Valentinerne", "Her kommer vinteren"),
+ t("Odd Nordstoga", "Kveldssong for deg og meg"),
+ t("Åge Aleksandersen", "Lys og varme"),
+ t("Kings of Convenience", "I'd Rather Dance with You"),
+ t("Bigbang", "Girl in Oslo"),
+ t("Kaizers Orchestra", "Hjerteknuser"),
+ t("Seigmen", "Hjernen er alene"),
+ t("Vamp", "Tir n'a Nog"),
+ t("Raga Rockers", "Hun er fri"),
+ t("Cezinando", "Håper du har plass"),
+ ],
+ },
+];
+
+export const DEFAULT_DECK_ID = BUILTIN_DECKS[0].id;
+
+export function builtinDeck(id: string): Deck | undefined {
+ return BUILTIN_DECKS.find((d) => d.id === id);
+}
diff --git a/src/shared/game.ts b/src/shared/game.ts
new file mode 100644
index 0000000..d8516c0
--- /dev/null
+++ b/src/shared/game.ts
@@ -0,0 +1,537 @@
+// Pure game rules. No I/O, no timers, no randomness of its own: the room server
+// passes in `now` and an `rng`, which keeps every rule unit-testable.
+//
+// How the old Elixir bugs are designed out here:
+// - Timers (bug 1): there is no tick chain. A round stores its end time, and
+// `nextWakeup` returns the single earliest moment the server must act. The
+// server keeps exactly one Durable Object alarm set to that moment.
+// - Room lifecycle (bugs 2, 3): presence is recomputed from the live
+// connections (`syncPresence`), never counted by hand, and nobody stops the
+// room process. Idle rooms are deleted by the same single alarm.
+// - Duplicate events (bug 4): the server sends each event once per connection.
+// - Shape mix-ups and empty decks (bugs 5, 6): one typed state shape, and the
+// queue holds track indexes, with empty decks handled explicitly.
+// - Lost host (bug 7): when the host goes offline another player is promoted
+// after a grace period, and anyone can take over straight away.
+
+export type Mode = "vs" | "ffa";
+export type Team = "red" | "blue";
+export const TEAMS: readonly Team[] = ["red", "blue"];
+/** Where a player sits in versus mode. "shared" is one device used by both teams. */
+export type Seat = Team | "shared" | null;
+
+export interface Track {
+ title?: string;
+ artist?: string;
+ spotifyId?: string;
+ /** In a blend: names of the players whose lists had this song. */
+ from?: string[];
+}
+
+export interface Deck {
+ id: string;
+ name: string;
+ tracks: Track[];
+}
+
+export interface DeckMeta {
+ id: string;
+ name: string;
+ size: number;
+}
+
+/**
+ * A link to music that lives in Spotify: a Spotify Blend, a collaborative
+ * playlist or a Jam. Pling only shows the link; everything else happens in
+ * people's own Spotify apps.
+ */
+export type SpotifyLinkKind = "blend" | "collab" | "jam";
+export const SPOTIFY_LINK_KINDS: readonly SpotifyLinkKind[] = ["blend", "collab", "jam"];
+
+export interface SpotifyLink {
+ kind: SpotifyLinkKind;
+ url: string;
+}
+
+/** A playlist a player added to the room for blending. The tracks live in server storage. */
+export interface Contribution {
+ playlist: string;
+ size: number;
+}
+
+export interface BlendStats {
+ /** Songs that are on at least two players' lists. */
+ shared: number;
+ /** Distinct songs across all lists. */
+ total: number;
+}
+
+export interface Player {
+ id: string;
+ name: string;
+ seat: Seat;
+ joinedAt: number;
+ online: boolean;
+}
+
+export type Round =
+ | { phase: "idle" }
+ | { phase: "playing"; endsAt: number; lockedOut: string[] }
+ | {
+ phase: "buzzed";
+ playerId: string;
+ key: string;
+ answerEndsAt: number;
+ /** Listening time left when the buzz happened, restored on a wrong answer. */
+ remainingMs: number;
+ lockedOut: string[];
+ }
+ | { phase: "over"; outcome: "correct" | "timeout" | "skipped"; key?: string };
+
+export interface Settings {
+ roundSeconds: number;
+ answerSeconds: number;
+}
+
+export interface RoomState {
+ code: string;
+ mode: Mode;
+ createdAt: number;
+ hostId: string | null;
+ /** When the host's last connection closed; null while the host is online. */
+ hostLeftAt: number | null;
+ players: Record;
+ /** Keyed by team in versus mode, by player id in free-for-all. */
+ scores: Record;
+ settings: Settings;
+ /** Null means "own music": the host plays songs from any app. */
+ deck: DeckMeta | null;
+ /** In own-music mode: an optional Spotify Blend, collaborative playlist or Jam everyone can join. */
+ spotifyLink: SpotifyLink | null;
+ queue: number[];
+ trackIndex: number | null;
+ revealed: boolean;
+ round: Round;
+ roundNo: number;
+ /** When the last connection closed; null while anyone is connected. */
+ emptySince: number | null;
+ /** Playlists players have added, keyed by player id. */
+ contributions: Record;
+ blendStats: BlendStats;
+ /** Bumped whenever a contribution changes, so the host can see a blend is out of date. */
+ contribVersion: number;
+ /** `contribVersion` when the current blend deck was built; null if the deck isn't a blend. */
+ blendVersion: number | null;
+}
+
+export type ClientMessage =
+ | { t: "rename"; name: string }
+ | { t: "seat"; seat: Exclude }
+ | { t: "buzz"; team?: Team }
+ | { t: "start" }
+ | { t: "judge"; correct: boolean }
+ | { t: "skip" }
+ | { t: "next" }
+ | { t: "reveal"; revealed: boolean }
+ | { t: "score"; key: string; delta: number }
+ | { t: "resetScores" }
+ | { t: "settings"; roundSeconds?: number; answerSeconds?: number }
+ | { t: "mode"; mode: Mode }
+ | { t: "claimHost" }
+ | { t: "makeHost"; playerId: string }
+ // Deck changes are resolved by the server (it owns the track lists).
+ | { t: "deck"; id: string }
+ | { t: "customDeck"; name: string; tracks: Track[] }
+ | { t: "ownMusic" }
+ // Blend: anyone can add or remove their own list; the host builds the blend.
+ | { t: "contribute"; playlist: string; tracks: Track[] }
+ | { t: "withdraw" }
+ | { t: "blend"; size: number; commonOnly: boolean }
+ | { t: "spotifyLink"; kind: SpotifyLinkKind; url: string };
+
+export type GameEvent = { t: "buzz"; playerId: string; name: string; key: string };
+
+export const LIMITS = {
+ name: 24,
+ deckName: 60,
+ field: 200,
+ deckTracks: 1000,
+ players: 50,
+ roundSeconds: [5, 120] as const,
+ answerSeconds: [3, 60] as const,
+};
+
+export const HOST_GRACE_MS = 20_000;
+export const ROOM_TTL_MS = 12 * 60 * 60 * 1000;
+export const DEFAULT_SETTINGS: Settings = { roundSeconds: 30, answerSeconds: 7 };
+export const BLEND_SIZES = [25, 50, 100, 250] as const;
+
+export type Rng = () => number;
+
+export class GameError extends Error {}
+
+export function createRoom(code: string, mode: Mode, deck: DeckMeta | null, now: number, rng: Rng): RoomState {
+ const state: RoomState = {
+ code,
+ mode,
+ createdAt: now,
+ hostId: null,
+ hostLeftAt: null,
+ players: {},
+ scores: initialScores(mode),
+ settings: { ...DEFAULT_SETTINGS },
+ deck: null,
+ spotifyLink: null,
+ queue: [],
+ trackIndex: null,
+ revealed: false,
+ round: { phase: "idle" },
+ roundNo: 1,
+ emptySince: null,
+ contributions: {},
+ blendStats: { shared: 0, total: 0 },
+ contribVersion: 0,
+ blendVersion: null,
+ };
+ return setDeck(state, deck, rng);
+}
+
+function initialScores(mode: Mode): Record {
+ return mode === "vs" ? { red: 0, blue: 0 } : {};
+}
+
+export function cleanName(name: unknown): string {
+ const cleaned = String(name ?? "")
+ .replace(/\s+/g, " ")
+ .trim()
+ .slice(0, LIMITS.name);
+ if (!cleaned) throw new GameError("Name can't be empty");
+ return cleaned;
+}
+
+/** Adds the player if new. Presence is updated separately by `syncPresence`. */
+export function ensurePlayer(state: RoomState, id: string, name: string, now: number): RoomState {
+ if (state.players[id]) return state;
+ if (Object.keys(state.players).length >= LIMITS.players) throw new GameError("Room is full");
+ const player: Player = { id, name: cleanName(name), seat: null, joinedAt: now, online: false };
+ const scores = state.mode === "ffa" ? { ...state.scores, [id]: state.scores[id] ?? 0 } : state.scores;
+ return { ...state, players: { ...state.players, [id]: player }, scores };
+}
+
+/**
+ * Recomputes who is online from the server's live connection count per player.
+ * This is the only place presence changes.
+ */
+export function syncPresence(state: RoomState, online: Record, now: number): RoomState {
+ const players: Record = {};
+ for (const [id, p] of Object.entries(state.players)) {
+ players[id] = { ...p, online: (online[id] ?? 0) > 0 };
+ }
+ let next: RoomState = { ...state, players };
+
+ const anyoneOnline = Object.values(players).some((p) => p.online);
+ next.emptySince = anyoneOnline ? null : (state.emptySince ?? now);
+
+ if (!next.hostId || !players[next.hostId]) {
+ next = promoteHost(next, null);
+ }
+ const host = next.hostId ? players[next.hostId] : undefined;
+ if (host?.online) next.hostLeftAt = null;
+ else if (host) next.hostLeftAt = state.hostLeftAt ?? now;
+ return next;
+}
+
+/** Earliest-joined online player other than `exclude` becomes host. */
+function promoteHost(state: RoomState, exclude: string | null): RoomState {
+ const candidate = Object.values(state.players)
+ .filter((p) => p.online && p.id !== exclude)
+ .sort((a, b) => a.joinedAt - b.joinedAt)[0];
+ if (!candidate) return state;
+ return { ...state, hostId: candidate.id, hostLeftAt: null };
+}
+
+/** Applies everything that is due at `now`. Safe to call any number of times. */
+export function tick(state: RoomState, now: number): RoomState {
+ let next = state;
+ if (next.round.phase === "playing" && now >= next.round.endsAt) {
+ next = { ...next, round: { phase: "over", outcome: "timeout" }, revealed: true };
+ }
+ if (next.hostLeftAt !== null && now - next.hostLeftAt >= HOST_GRACE_MS) {
+ next = promoteHost(next, next.hostId);
+ }
+ return next;
+}
+
+/** Whether the room has been empty long enough to delete. */
+export function isExpired(state: RoomState, now: number): boolean {
+ return state.emptySince !== null && now - state.emptySince >= ROOM_TTL_MS;
+}
+
+/** The single next moment the server has to wake up, or null for never. */
+export function nextWakeup(state: RoomState): number | null {
+ const times: number[] = [];
+ if (state.round.phase === "playing") times.push(state.round.endsAt);
+ const someoneCanTakeOver = Object.values(state.players).some((p) => p.online && p.id !== state.hostId);
+ if (state.hostLeftAt !== null && someoneCanTakeOver) times.push(state.hostLeftAt + HOST_GRACE_MS);
+ if (state.emptySince !== null) times.push(state.emptySince + ROOM_TTL_MS);
+ return times.length ? Math.min(...times) : null;
+}
+
+export function shuffledIndexes(size: number, rng: Rng, avoidFirst: number | null = null): number[] {
+ const out = Array.from({ length: size }, (_, i) => i);
+ for (let i = out.length - 1; i > 0; i--) {
+ const j = Math.floor(rng() * (i + 1));
+ [out[i], out[j]] = [out[j], out[i]];
+ }
+ // Don't repeat the track that was just played when the queue wraps around.
+ if (avoidFirst !== null && out.length > 1 && out[0] === avoidFirst) {
+ [out[0], out[out.length - 1]] = [out[out.length - 1], out[0]];
+ }
+ return out;
+}
+
+/** Records that a player added (or with `null`, removed) their list. */
+export function setContribution(
+ state: RoomState,
+ playerId: string,
+ contribution: Contribution | null,
+ stats: BlendStats,
+): RoomState {
+ const contributions = { ...state.contributions };
+ if (contribution) contributions[playerId] = contribution;
+ else delete contributions[playerId];
+ return { ...state, contributions, blendStats: stats, contribVersion: state.contribVersion + 1 };
+}
+
+/** Switches deck and puts its first track up, without skipping any. */
+export function setDeck(state: RoomState, deck: DeckMeta | null, rng: Rng): RoomState {
+ const base: RoomState = {
+ ...state,
+ deck,
+ blendVersion: null,
+ spotifyLink: null,
+ queue: [],
+ trackIndex: null,
+ revealed: false,
+ round: { phase: "idle" },
+ };
+ if (!deck || deck.size === 0) return { ...base, deck: null };
+ const [first, ...rest] = shuffledIndexes(deck.size, rng);
+ return { ...base, trackIndex: first, queue: rest };
+}
+
+function advance(state: RoomState, rng: Rng): RoomState {
+ let { queue, trackIndex } = state;
+ if (state.deck && state.deck.size > 0) {
+ if (queue.length === 0) queue = shuffledIndexes(state.deck.size, rng, trackIndex);
+ [trackIndex, ...queue] = queue;
+ } else {
+ trackIndex = null;
+ }
+ return {
+ ...state,
+ queue,
+ trackIndex,
+ revealed: false,
+ round: { phase: "idle" },
+ roundNo: state.roundNo + 1,
+ };
+}
+
+function scoreKeyFor(state: RoomState, player: Player, team?: Team): string {
+ if (state.mode === "ffa") return player.id;
+ if (player.seat === "shared") {
+ if (!team || !TEAMS.includes(team)) throw new GameError("Pick a team to buzz for");
+ return team;
+ }
+ if (!player.seat) throw new GameError("Pick a team first");
+ return player.seat;
+}
+
+function isValidScoreKey(state: RoomState, key: string): boolean {
+ return state.mode === "vs" ? (TEAMS as readonly string[]).includes(key) : key in state.players;
+}
+
+function clampInt(value: unknown, [min, max]: readonly [number, number]): number | undefined {
+ if (typeof value !== "number" || !Number.isFinite(value)) return undefined;
+ return Math.min(max, Math.max(min, Math.round(value)));
+}
+
+const HOST_ONLY = new Set([
+ "start",
+ "judge",
+ "skip",
+ "next",
+ "reveal",
+ "score",
+ "resetScores",
+ "settings",
+ "mode",
+ "makeHost",
+ "deck",
+ "customDeck",
+ "ownMusic",
+ "blend",
+ "spotifyLink",
+]);
+
+export function isHostOnly(msg: ClientMessage): boolean {
+ return HOST_ONLY.has(msg.t);
+}
+
+export interface ApplyResult {
+ state: RoomState;
+ events: GameEvent[];
+}
+
+/** Messages that need the server's track storage; it handles them and calls `setDeck`/`setContribution`. */
+export const MUSIC_MESSAGES = new Set([
+ "deck",
+ "customDeck",
+ "ownMusic",
+ "contribute",
+ "withdraw",
+ "blend",
+ "spotifyLink",
+]);
+
+/** Plays music from a Spotify link: own-music rounds, with the link shown to everyone. */
+export function setSpotifyLink(state: RoomState, link: SpotifyLink, rng: Rng): RoomState {
+ return { ...setDeck(state, null, rng), spotifyLink: link };
+}
+
+/** Applies one player message (all but the music messages above). */
+export function apply(state: RoomState, playerId: string, msg: ClientMessage, now: number, rng: Rng): ApplyResult {
+ state = tick(state, now);
+ const player = state.players[playerId];
+ if (!player) throw new GameError("Unknown player");
+ const isHost = state.hostId === playerId;
+ if (isHostOnly(msg) && !isHost) throw new GameError("Only the host can do that");
+ const { round } = state;
+ const events: GameEvent[] = [];
+
+ switch (msg.t) {
+ case "rename": {
+ const name = cleanName(msg.name);
+ state = { ...state, players: { ...state.players, [playerId]: { ...player, name } } };
+ break;
+ }
+ case "seat": {
+ if (!["red", "blue", "shared"].includes(msg.seat)) throw new GameError("Unknown team");
+ state = { ...state, players: { ...state.players, [playerId]: { ...player, seat: msg.seat } } };
+ break;
+ }
+ case "buzz": {
+ if (isHost) throw new GameError("The host can't buzz");
+ if (round.phase !== "playing") throw new GameError("Nothing to buzz for right now");
+ const key = scoreKeyFor(state, player, msg.team);
+ if (round.lockedOut.includes(key)) throw new GameError("Locked out this round");
+ state = {
+ ...state,
+ round: {
+ phase: "buzzed",
+ playerId,
+ key,
+ answerEndsAt: now + state.settings.answerSeconds * 1000,
+ remainingMs: Math.max(0, round.endsAt - now),
+ lockedOut: round.lockedOut,
+ },
+ };
+ events.push({ t: "buzz", playerId, name: player.name, key });
+ break;
+ }
+ case "start": {
+ if (round.phase === "playing" || round.phase === "buzzed") throw new GameError("Round already running");
+ if (round.phase === "over") state = advance(state, rng);
+ state = {
+ ...state,
+ round: { phase: "playing", endsAt: now + state.settings.roundSeconds * 1000, lockedOut: [] },
+ };
+ break;
+ }
+ case "judge": {
+ if (round.phase !== "buzzed") throw new GameError("Nobody has buzzed");
+ if (msg.correct) {
+ state = {
+ ...state,
+ scores: { ...state.scores, [round.key]: (state.scores[round.key] ?? 0) + 1 },
+ round: { phase: "over", outcome: "correct", key: round.key },
+ revealed: true,
+ };
+ } else {
+ const lockedOut = [...round.lockedOut, round.key];
+ const everyoneOut = state.mode === "vs" && TEAMS.every((t) => lockedOut.includes(t));
+ state = everyoneOut
+ ? { ...state, round: { phase: "over", outcome: "timeout" }, revealed: true }
+ : { ...state, round: { phase: "playing", endsAt: now + round.remainingMs, lockedOut } };
+ }
+ break;
+ }
+ case "skip": {
+ if (round.phase !== "playing" && round.phase !== "buzzed") throw new GameError("No round running");
+ state = { ...state, round: { phase: "over", outcome: "skipped" }, revealed: true };
+ break;
+ }
+ case "next": {
+ state = advance(state, rng);
+ break;
+ }
+ case "reveal": {
+ state = { ...state, revealed: Boolean(msg.revealed) };
+ break;
+ }
+ case "score": {
+ if (!isValidScoreKey(state, msg.key)) throw new GameError("Unknown team or player");
+ const delta = Math.sign(Number(msg.delta)) || 0;
+ state = { ...state, scores: { ...state.scores, [msg.key]: (state.scores[msg.key] ?? 0) + delta } };
+ break;
+ }
+ case "resetScores": {
+ state = { ...state, scores: freshScores(state) };
+ break;
+ }
+ case "settings": {
+ const roundSeconds = clampInt(msg.roundSeconds, LIMITS.roundSeconds) ?? state.settings.roundSeconds;
+ const answerSeconds = clampInt(msg.answerSeconds, LIMITS.answerSeconds) ?? state.settings.answerSeconds;
+ state = { ...state, settings: { roundSeconds, answerSeconds } };
+ break;
+ }
+ case "mode": {
+ if (msg.mode !== "vs" && msg.mode !== "ffa") throw new GameError("Unknown mode");
+ if (msg.mode !== state.mode) {
+ state = { ...state, mode: msg.mode, round: { phase: "idle" } };
+ state = { ...state, scores: freshScores(state) };
+ }
+ break;
+ }
+ case "claimHost": {
+ if (isHost) break;
+ const host = state.hostId ? state.players[state.hostId] : undefined;
+ if (host?.online) throw new GameError("The host is still here");
+ state = { ...state, hostId: playerId, hostLeftAt: null };
+ break;
+ }
+ case "makeHost": {
+ const target = state.players[msg.playerId];
+ if (!target?.online) throw new GameError("That player isn't here");
+ state = { ...state, hostId: target.id, hostLeftAt: null };
+ break;
+ }
+ case "deck":
+ case "customDeck":
+ case "ownMusic":
+ case "contribute":
+ case "withdraw":
+ case "blend":
+ case "spotifyLink":
+ throw new GameError("Music changes are handled by the server");
+ default:
+ throw new GameError("Unknown message");
+ }
+ return { state, events };
+}
+
+function freshScores(state: RoomState): Record {
+ if (state.mode === "vs") return initialScores("vs");
+ return Object.fromEntries(Object.keys(state.players).map((id) => [id, 0]));
+}
diff --git a/src/shared/names.ts b/src/shared/names.ts
new file mode 100644
index 0000000..b2c16ce
--- /dev/null
+++ b/src/shared/names.ts
@@ -0,0 +1,392 @@
+// Norwegian word lists, carried over from the original Elixir app.
+
+export const ADJECTIVES = [
+ "Stor",
+ "Liten",
+ "Vakker",
+ "Stygg",
+ "Rask",
+ "Langsom",
+ "Smart",
+ "Dum",
+ "Lykkelig",
+ "Trist",
+ "Modig",
+ "Feig",
+ "Vennlig",
+ "Frodig",
+ "Sterk",
+ "Svak",
+ "Aktiv",
+ "Lat",
+ "Høy",
+ "Lav",
+ "Rik",
+ "Fattig",
+ "Ung",
+ "Gammel",
+ "Kreativ",
+ "Uoriginal",
+ "Spennende",
+ "Kjedelig",
+ "Søt",
+ "Sur",
+ "Kald",
+ "Varm",
+ "Morsom",
+ "Alvorlig",
+ "Flittig",
+ "Sløv",
+ "Dyktig",
+ "Udyktig",
+ "Snill",
+ "Slem",
+ "Lys",
+ "Mørk",
+ "Tynn",
+ "Tykk",
+ "Enkel",
+ "Komplisert",
+ "Rund",
+ "Firkantet",
+ "Myk",
+ "Hard",
+ "Klar",
+ "Uklar",
+ "Tom",
+ "Full",
+ "Skarp",
+ "Utydelig",
+ "Glatt",
+ "Ru",
+ "Ren",
+ "Skitten",
+ "Tung",
+ "Lett",
+ "Våt",
+ "Tørr",
+ "Treg",
+ "Frisk",
+ "Syk",
+ "Pen",
+ "Stille",
+ "Høylytt",
+ "Ensom",
+ "Populær",
+ "Ny",
+ "Tidløs",
+ "Modern",
+ "Tradisjonell",
+ "Lokal",
+ "Global",
+ "Ekte",
+ "Falsk",
+ "Sulten",
+ "Mett",
+ "Uren",
+ "Humpete",
+ "Våken",
+ "Trøtt",
+ "Åpen",
+ "Lukket",
+ "Tett",
+ "Løs",
+ "Kort",
+ "Lang",
+ "Flat",
+ "Fersk",
+ "Støl",
+ "Muggen",
+ "Elendig",
+ "Optimal",
+ "Dårlig",
+ "Første",
+ "Siste",
+ "Øverste",
+ "Nederste",
+ "Innenfor",
+ "Utenfor",
+ "Langt",
+ "Fjern",
+ "Nær",
+ "Hel",
+ "Delvis",
+ "Fullstendig",
+ "Ufullstendig",
+ "Fleksibel",
+ "Stiv",
+ "Koselig",
+ "Hyggelig",
+ "Rolig",
+ "Travel",
+ "Glad",
+ "Sint",
+ "Spent",
+ "Nervøs",
+ "Ivrig",
+ "Sliten",
+ "Energisk",
+ "Munter",
+ "Søvnig",
+ "Tørst",
+ "Kjølig",
+ "Krøllete",
+ "Skinnende",
+ "Dustete",
+ "Rar",
+ "Merkelig",
+ "Vanlig",
+ "Uvanlig",
+ "Deilig",
+ "Herlig",
+ "Praktfull",
+ "Nydelig",
+ "Fantastisk",
+ "Utrolig",
+ "Magisk",
+ "Mystisk",
+ "Hemmelig",
+ "Fnisende",
+ "Hoppende",
+ "Dansende",
+ "Syngende",
+ "Drømmende",
+ "Sovende",
+ "Busete",
+ "Lurvete",
+ "Glinsende",
+ "Strålende",
+ "Blinkende",
+ "Sprettende",
+ "Rullende",
+ "Klumsete",
+ "Elegant",
+ "Grasiøs",
+ "Klønete",
+ "Tullete",
+ "Tøysete",
+ "Leken",
+ "Lattermild",
+ "Smilende",
+ "Gapende",
+ "Hylende",
+ "Hviskende",
+ "Brølende",
+ "Trallende",
+ "Plystende",
+ "Glitrende",
+ "Funklende",
+ "Sprudlende",
+ "Boblende",
+ "Susende",
+ "Hvinende",
+ "Durende",
+ "Surrende",
+ "Knirkende",
+ "Knitrende",
+];
+
+export const NOUNS = [
+ "Hund",
+ "Katt",
+ "Bil",
+ "Hus",
+ "Tre",
+ "Elv",
+ "Fjell",
+ "Sjø",
+ "Bok",
+ "Sko",
+ "Data",
+ "Hage",
+ "Fugl",
+ "Vind",
+ "Stol",
+ "Bord",
+ "Lampe",
+ "Dør",
+ "Vindu",
+ "Himmel",
+ "Sol",
+ "Måne",
+ "Stjerne",
+ "Hav",
+ "Strand",
+ "By",
+ "Landsby",
+ "Skog",
+ "Ørken",
+ "Snø",
+ "Regn",
+ "Sommer",
+ "Vinter",
+ "Høst",
+ "Vår",
+ "Klokke",
+ "Telefon",
+ "Datamaskin",
+ "TV",
+ "Radio",
+ "Kamera",
+ "Tog",
+ "Fly",
+ "Båt",
+ "Sykkel",
+ "Mat",
+ "Drikke",
+ "Vann",
+ "Melk",
+ "Brød",
+ "Ost",
+ "Frukt",
+ "Grønnsak",
+ "Kjøtt",
+ "Sukker",
+ "Salt",
+ "Pepper",
+ "Krydder",
+ "Blomst",
+ "Gress",
+ "Rot",
+ "Blad",
+ "Gren",
+ "Fisk",
+ "Flue",
+ "Insekt",
+ "Menneske",
+ "Barn",
+ "Voksen",
+ "Lærer",
+ "Student",
+ "Leger",
+ "Sykepleier",
+ "Advokat",
+ "Politi",
+ "Brannmann",
+ "Kokk",
+ "Mekaniker",
+ "Kunstner",
+ "Musiker",
+ "Sanger",
+ "Skuespiller",
+ "Idrettsutøver",
+ "Spill",
+ "Lek",
+ "Sport",
+ "Musikk",
+ "Kunst",
+ "Film",
+ "Teater",
+ "Magasin",
+ "Avis",
+ "Penn",
+ "Blyant",
+ "Tusj",
+ "Farge",
+ "Lyd",
+ "Bilde",
+ "Kaffe",
+ "Te",
+ "Juice",
+ "Kake",
+ "Bolle",
+ "Suppe",
+ "Middag",
+ "Frokost",
+ "Lunsj",
+ "Kjøkken",
+ "Stue",
+ "Soverom",
+ "Bad",
+ "Gang",
+ "Trapp",
+ "Vegg",
+ "Tak",
+ "Gulv",
+ "Pute",
+ "Teppe",
+ "Sofa",
+ "Seng",
+ "Hylle",
+ "Skap",
+ "Skuff",
+ "Speil",
+ "Klær",
+ "Jakke",
+ "Bukse",
+ "Genser",
+ "Skjerf",
+ "Lue",
+ "Vott",
+ "Sokk",
+ "Veske",
+ "Nøkkel",
+ "Lommebok",
+ "Paraply",
+ "Solbriller",
+ "Boble",
+ "Ballong",
+ "Sirkus",
+ "Karusell",
+ "Rutsjebane",
+ "Gynge",
+ "Klovn",
+ "Sjonglør",
+ "Akrobat",
+ "Tryllekunst",
+ "Eventyr",
+ "Drøm",
+ "Latter",
+ "Smil",
+ "Tåke",
+ "Regnbue",
+ "Stjerneskudd",
+ "Nordlys",
+ "Måneskin",
+ "Solstråle",
+ "Sommerfugl",
+ "Marihøne",
+ "Gresshoppe",
+ "Tusenbein",
+ "Pingvin",
+ "Sjiraff",
+ "Nesehorn",
+ "Kenguru",
+ "Panda",
+ "Koala",
+ "Isbjørn",
+ "Delfin",
+ "Flamingo",
+ "Papegøye",
+ "Ugle",
+ "Ekorn",
+ "Kanin",
+ "Pinnsvin",
+ "Grevling",
+];
+
+const pick = (list: readonly T[], rng: () => number = Math.random): T => list[Math.floor(rng() * list.length)];
+
+/** A random player name like "Glad-Pingvin". */
+export function randomName(rng: () => number = Math.random): string {
+ return `${pick(ADJECTIVES, rng)}-${pick(NOUNS, rng)}`;
+}
+
+// Room codes only use nouns without æ/ø/å so they are easy to type anywhere.
+const CODE_NOUNS = NOUNS.filter((n) => /^[A-Za-z]{2,8}$/.test(n));
+
+/** A random room code like "KATTSOFA". */
+export function randomRoomCode(rng: () => number = Math.random): string {
+ return `${pick(CODE_NOUNS, rng)}${pick(CODE_NOUNS, rng)}`.toUpperCase();
+}
+
+export function normalizeRoomCode(input: string): string {
+ return input
+ .toUpperCase()
+ .replace(/[^A-Z0-9]/g, "")
+ .slice(0, 24);
+}
+
+export function isValidRoomCode(code: string): boolean {
+ return /^[A-Z0-9]{2,24}$/.test(code);
+}
diff --git a/src/shared/spotify.ts b/src/shared/spotify.ts
new file mode 100644
index 0000000..42e3c95
--- /dev/null
+++ b/src/shared/spotify.ts
@@ -0,0 +1,222 @@
+import { LIMITS, type Track } from "./game";
+
+// Pling never calls Spotify's API or embeds its player. It only builds normal
+// open.spotify.com links that the host taps, so the song plays in the host's
+// own Spotify app, on their own account.
+
+const TRACK_ID_SOURCE = String.raw`(?:open\.spotify\.com\/(?:intl-[a-z-]+\/)?track\/|spotify:track:)([A-Za-z0-9]{22})`;
+const TRACK_ID = new RegExp(TRACK_ID_SOURCE);
+
+export function parseSpotifyTrackId(input: string): string | undefined {
+ return TRACK_ID.exec(input)?.[1];
+}
+
+function allTrackIds(input: string): string[] {
+ return [...input.matchAll(new RegExp(TRACK_ID_SOURCE, "g"))].map((m) => m[1]);
+}
+
+// Hosts that Spotify uses for share links (open.spotify.com/playlist/…,
+// open.spotify.com/socialsession/… for Jams, and spotify.link short links).
+// Only these are accepted, so a host can't push arbitrary links to players.
+const SHARE_HOSTS = new Set(["open.spotify.com", "spotify.link", "spotify.app.link"]);
+
+/** Returns a normalized Spotify share link, or null if it isn't one. */
+export function cleanSpotifyShareUrl(input: unknown): string | null {
+ if (typeof input !== "string") return null;
+ const match = /https?:\/\/\S+/i.exec(input.trim()); // share text can include words around the link
+ if (!match || match[0].length > 500) return null;
+ try {
+ const url = new URL(match[0]);
+ if (!SHARE_HOSTS.has(url.hostname.toLowerCase())) return null;
+ url.protocol = "https:";
+ url.hash = "";
+ return url.toString();
+ } catch {
+ return null;
+ }
+}
+
+/** A link that opens the track in Spotify, or a Spotify search when we only know the name. */
+export function trackUrl(track: Track): string | null {
+ if (track.spotifyId) return `https://open.spotify.com/track/${track.spotifyId}`;
+ const query = [track.artist, track.title].filter(Boolean).join(" ");
+ return query ? `https://open.spotify.com/search/${encodeURIComponent(query)}` : null;
+}
+
+function clip(value: unknown): string | undefined {
+ if (typeof value !== "string") return undefined;
+ const v = value.replace(/\s+/g, " ").trim().slice(0, LIMITS.field);
+ return v || undefined;
+}
+
+/** Validates and trims a track that came from a client. */
+export function cleanTrack(raw: unknown): Track | null {
+ if (!raw || typeof raw !== "object") return null;
+ const r = raw as Record;
+ const spotifyId = typeof r.spotifyId === "string" && /^[A-Za-z0-9]{22}$/.test(r.spotifyId) ? r.spotifyId : undefined;
+ const track: Track = { title: clip(r.title), artist: clip(r.artist), spotifyId };
+ return track.spotifyId || track.title ? track : null;
+}
+
+/**
+ * One track per line. Accepts Spotify track links/URIs (optionally followed by
+ * "Artist - Title"), or plain "Artist - Title" lines.
+ */
+export function parsePastedTracks(text: string): Track[] {
+ const tracks: Track[] = [];
+ for (const rawLine of text.split(/\r?\n/)) {
+ const line = rawLine.trim();
+ if (!line) continue;
+ const ids = allTrackIds(line);
+ if (ids.length > 1) {
+ // Several links on one line (e.g. separated by spaces): links only.
+ tracks.push(...ids.map((spotifyId) => ({ spotifyId })));
+ continue;
+ }
+ const spotifyId = ids[0];
+ const rest = line
+ .replace(/\S*(?:open\.spotify\.com|spotify:track:)\S*/g, "")
+ .replace(/^[\s|,;–—-]+|[\s|,;]+$/g, "")
+ .trim();
+ let artist: string | undefined;
+ let title: string | undefined;
+ if (rest) {
+ const split = rest.split(/\s+[-–—]\s+/);
+ if (split.length >= 2) {
+ artist = split[0];
+ title = split.slice(1).join(" - ");
+ } else {
+ title = rest;
+ }
+ }
+ const track = cleanTrack({ spotifyId, artist, title });
+ if (track) tracks.push(track);
+ }
+ return compact(tracks);
+}
+
+export interface ImportedPlaylist {
+ name: string;
+ tracks: Track[];
+}
+
+/**
+ * Reads the JSON files from a Spotify account data export ("Download your
+ * data" in Spotify's privacy settings): playlist files (Playlist1.json, ...)
+ * and the library file (YourLibrary.json). Parsing is lenient about field names.
+ */
+export function parseSpotifyExport(json: unknown): ImportedPlaylist[] {
+ if (!json || typeof json !== "object") return [];
+ const root = json as Record;
+ const out: ImportedPlaylist[] = [];
+
+ if (Array.isArray(root.playlists)) {
+ for (const p of root.playlists) {
+ if (!p || typeof p !== "object") continue;
+ const pl = p as Record;
+ const items = Array.isArray(pl.items) ? pl.items : [];
+ const tracks = items.map((item) => exportTrack((item as Record)?.track ?? item));
+ out.push({ name: clip(pl.name) ?? "Playlist", tracks: compact(tracks) });
+ }
+ }
+ if (Array.isArray(root.tracks)) {
+ out.push({ name: "Liked songs", tracks: compact(root.tracks.map(exportTrack)) });
+ }
+ if (Array.isArray(json)) {
+ out.push({ name: "Imported tracks", tracks: compact(json.map(exportTrack)) });
+ }
+ return out.filter((p) => p.tracks.length > 0);
+}
+
+/**
+ * A CSV with a header row, such as an Exportify export ("Track URI",
+ * "Track Name", "Artist Name(s)") or any sheet with uri/title/artist columns.
+ */
+export function parseCsvTracks(text: string): Track[] {
+ const rows = parseCsv(text);
+ if (rows.length < 2) return [];
+ const header = rows[0].map((h) => h.toLowerCase().trim());
+ const find = (...patterns: RegExp[]) => header.findIndex((h) => patterns.some((p) => p.test(h)));
+ const uriCol = find(/track uri/, /spotify uri/, /^uri$/, /link|url/);
+ const titleCol = find(/track name/, /^title$/, /^song/, /^track$/, /^name$/);
+ const artistCol = find(/artist name/, /^artists?$/);
+ if (uriCol < 0 && titleCol < 0) return [];
+ const tracks = rows.slice(1).map((row) => {
+ const uri = uriCol >= 0 ? row[uriCol] ?? "" : "";
+ // Exportify separates several artists with commas; keep the first for a cleaner reveal.
+ const artist = artistCol >= 0 ? (row[artistCol] ?? "").split(/,(?!\s)/)[0] : undefined;
+ return cleanTrack({ spotifyId: parseSpotifyTrackId(uri), title: titleCol >= 0 ? row[titleCol] : undefined, artist });
+ });
+ return compact(tracks);
+}
+
+/** Minimal RFC 4180 CSV reader (quotes, escaped quotes, newlines in quotes). */
+function parseCsv(text: string): string[][] {
+ const rows: string[][] = [];
+ let row: string[] = [];
+ let field = "";
+ let quoted = false;
+ const src = text.replace(/^\uFEFF/, "");
+ for (let i = 0; i < src.length; i++) {
+ const c = src[i];
+ if (quoted) {
+ if (c === '"' && src[i + 1] === '"') {
+ field += '"';
+ i++;
+ } else if (c === '"') quoted = false;
+ else field += c;
+ } else if (c === '"') quoted = true;
+ else if (c === ",") {
+ row.push(field);
+ field = "";
+ } else if (c === "\n" || c === "\r") {
+ if (c === "\r" && src[i + 1] === "\n") i++;
+ row.push(field);
+ if (row.some((f) => f !== "")) rows.push(row);
+ row = [];
+ field = "";
+ } else field += c;
+ }
+ row.push(field);
+ if (row.some((f) => f !== "")) rows.push(row);
+ return rows;
+}
+
+/** Reads a file the user picked: a Spotify data export (.json) or a playlist CSV. */
+export function parseImportFile(fileName: string, text: string): ImportedPlaylist[] {
+ const base = fileName.replace(/\.[^.]+$/, "").replace(/[_-]+/g, " ").trim() || "Imported";
+ if (/\.json$/i.test(fileName) || /^\s*[[{]/.test(text)) {
+ try {
+ return parseSpotifyExport(JSON.parse(text));
+ } catch {
+ return [];
+ }
+ }
+ const tracks = parseCsvTracks(text);
+ if (tracks.length) return [{ name: base, tracks }];
+ const pasted = parsePastedTracks(text);
+ return pasted.length ? [{ name: base, tracks: pasted }] : [];
+}
+
+function exportTrack(raw: unknown): Track | null {
+ if (!raw || typeof raw !== "object") return null;
+ const r = raw as Record;
+ const uri = [r.trackUri, r.uri, r.spotify_track_uri].find((v) => typeof v === "string") as string | undefined;
+ const title = r.trackName ?? r.master_metadata_track_name ?? (typeof r.track === "string" ? r.track : undefined);
+ const artist = r.artistName ?? r.master_metadata_album_artist_name ?? r.artist;
+ return cleanTrack({ spotifyId: uri ? parseSpotifyTrackId(uri) : undefined, title, artist });
+}
+
+function compact(tracks: (Track | null)[]): Track[] {
+ const seen = new Set();
+ const out: Track[] = [];
+ for (const t of tracks) {
+ if (!t) continue;
+ const key = t.spotifyId ?? `${t.artist}|${t.title}`.toLowerCase();
+ if (seen.has(key)) continue;
+ seen.add(key);
+ out.push(t);
+ if (out.length >= LIMITS.deckTracks) break;
+ }
+ return out;
+}
diff --git a/src/shared/view.ts b/src/shared/view.ts
new file mode 100644
index 0000000..af0ec68
--- /dev/null
+++ b/src/shared/view.ts
@@ -0,0 +1,85 @@
+import type { BlendStats, Deck, DeckMeta, GameEvent, Mode, Round, RoomState, Seat, Settings, SpotifyLink } from "./game";
+import { trackUrl } from "./spotify";
+
+export interface TrackView {
+ title?: string;
+ artist?: string;
+ url: string | null;
+ /** In a blend: whose lists the song came from. */
+ from?: string[];
+}
+
+export interface ContributionView {
+ playerId: string;
+ playerName: string;
+ playlist: string;
+ size: number;
+}
+
+export interface PlayerView {
+ id: string;
+ name: string;
+ seat: Seat;
+ online: boolean;
+}
+
+export interface RoomView {
+ code: string;
+ mode: Mode;
+ you: string;
+ hostId: string | null;
+ hostOnline: boolean;
+ players: PlayerView[];
+ scores: Record;
+ settings: Settings;
+ deck: DeckMeta | null;
+ spotifyLink: SpotifyLink | null;
+ roundNo: number;
+ round: Round;
+ revealed: boolean;
+ /** Only sent to the host, or to everyone once revealed, so players can't peek. */
+ track: TrackView | null;
+ contributions: ContributionView[];
+ blendStats: BlendStats;
+ /** The deck is a blend and someone has added or removed a list since it was built. */
+ blendOutdated: boolean;
+}
+
+export type ServerMessage =
+ | { t: "state"; view: RoomView; now: number }
+ | { t: "event"; event: GameEvent }
+ | { t: "error"; message: string };
+
+export function viewFor(state: RoomState, deck: Deck | null, you: string): RoomView {
+ const isHost = state.hostId === you;
+ const raw = deck && state.trackIndex !== null ? deck.tracks[state.trackIndex] : undefined;
+ const track =
+ raw && (isHost || state.revealed) ? { title: raw.title, artist: raw.artist, url: trackUrl(raw), from: raw.from } : null;
+ const host = state.hostId ? state.players[state.hostId] : undefined;
+ return {
+ code: state.code,
+ mode: state.mode,
+ you,
+ hostId: state.hostId,
+ hostOnline: Boolean(host?.online),
+ players: Object.values(state.players)
+ .sort((a, b) => a.joinedAt - b.joinedAt)
+ .map(({ id, name, seat, online }) => ({ id, name, seat, online })),
+ scores: state.scores,
+ settings: state.settings,
+ deck: state.deck,
+ spotifyLink: state.spotifyLink,
+ roundNo: state.roundNo,
+ round: state.round,
+ revealed: state.revealed,
+ track,
+ contributions: Object.entries(state.contributions).map(([playerId, c]) => ({
+ playerId,
+ playerName: state.players[playerId]?.name ?? "Someone",
+ playlist: c.playlist,
+ size: c.size,
+ })),
+ blendStats: state.blendStats,
+ blendOutdated: state.blendVersion !== null && state.blendVersion !== state.contribVersion,
+ };
+}
diff --git a/test/blend.test.ts b/test/blend.test.ts
new file mode 100644
index 0000000..b63f199
--- /dev/null
+++ b/test/blend.test.ts
@@ -0,0 +1,84 @@
+import { describe, expect, it } from "vitest";
+import { blendStats, buildBlend, trackKey, type BlendInput } from "../src/shared/blend";
+import type { Track } from "../src/shared/game";
+
+const rng = () => {
+ let i = 0;
+ return () => ((i++ * 0.618) % 1);
+};
+const songs = (prefix: string, n: number): Track[] => Array.from({ length: n }, (_, i) => ({ artist: prefix, title: `${prefix} ${i}` }));
+const titles = (tracks: Track[]) => tracks.map((t) => t.title);
+
+describe("trackKey", () => {
+ it("matches the same song across sources", () => {
+ expect(trackKey({ artist: "Queen", title: "Bohemian Rhapsody - Remastered 2011" })).toBe(trackKey({ artist: "queen", title: "Bohemian Rhapsody" }));
+ expect(trackKey({ artist: "Röyksopp", title: "Eple" })).toBe(trackKey({ artist: "Royksopp", title: "Eple (feat. Nobody)" }));
+ expect(trackKey({ spotifyId: "a".repeat(22), title: "X" })).toBe(trackKey({ spotifyId: "a".repeat(22) }));
+ });
+});
+
+describe("buildBlend", () => {
+ const common: Track = { artist: "a-ha", title: "Take On Me" };
+ const commonToAll: Track = { artist: "ABBA", title: "Dancing Queen" };
+ const ola: BlendInput = { name: "Ola", tracks: [common, commonToAll, ...songs("Ola", 20)] };
+ const kari: BlendInput = { name: "Kari", tracks: [common, commonToAll, ...songs("Kari", 3)] };
+ const per: BlendInput = { name: "Per", tracks: [commonToAll, ...songs("Per", 20)] };
+
+ it("puts songs that are on the most lists first, and credits everyone who had them", () => {
+ const blend = buildBlend([ola, kari, per], { size: 10, commonOnly: false }, rng());
+ expect(blend[0]).toMatchObject({ title: "Dancing Queen", from: ["Ola", "Kari", "Per"] });
+ expect(blend[1]).toMatchObject({ title: "Take On Me", from: ["Ola", "Kari"] });
+ });
+
+ it("gives each list an equal share after the shared songs, even when lists differ in length", () => {
+ const blend = buildBlend([ola, kari, per], { size: 11, commonOnly: false }, rng());
+ const rest = blend.slice(2);
+ const count = (who: string) => rest.filter((t) => t.from?.[0] === who).length;
+ expect(count("Kari")).toBe(3);
+ expect(count("Ola")).toBe(3);
+ expect(count("Per")).toBe(3);
+ });
+
+ it("uses up short lists and keeps filling from the others", () => {
+ const blend = buildBlend([ola, kari], { size: 100, commonOnly: false }, rng());
+ expect(blend).toHaveLength(2 + 20 + 3);
+ expect(new Set(titles(blend)).size).toBe(blend.length);
+ });
+
+ it("can keep only songs in common", () => {
+ expect(titles(buildBlend([ola, kari, per], { size: 50, commonOnly: true }, rng()))).toEqual(["Dancing Queen", "Take On Me"]);
+ expect(buildBlend([{ name: "A", tracks: songs("A", 3) }, { name: "B", tracks: songs("B", 3) }], { size: 50, commonOnly: true }, rng())).toEqual([]);
+ });
+
+ it("works with a single list, and ignores duplicates within a list", () => {
+ const blend = buildBlend([{ name: "Solo", tracks: [...songs("S", 5), ...songs("S", 5)] }], { size: 50, commonOnly: false }, rng());
+ expect(blend).toHaveLength(5);
+ });
+
+ it("prefers a copy that links straight to the song", () => {
+ const id = "b".repeat(22);
+ const blend = buildBlend(
+ [
+ { name: "A", tracks: [{ artist: "Toto", title: "Africa" }] },
+ { name: "B", tracks: [{ artist: "Toto", title: "Africa", spotifyId: id }] },
+ ],
+ { size: 5, commonOnly: false },
+ rng(),
+ );
+ // Different keys (one has an id), so both are kept; each still has a playable link.
+ expect(blend.every((t) => t.title === "Africa")).toBe(true);
+ const merged = buildBlend(
+ [
+ { name: "A", tracks: [{ spotifyId: id }] },
+ { name: "B", tracks: [{ spotifyId: id, artist: "Toto", title: "Africa" }] },
+ ],
+ { size: 5, commonOnly: false },
+ rng(),
+ );
+ expect(merged).toEqual([{ spotifyId: id, artist: "Toto", title: "Africa", from: ["A", "B"] }]);
+ });
+
+ it("reports shared and total counts", () => {
+ expect(blendStats([ola, kari, per])).toEqual({ shared: 2, total: 2 + 20 + 3 + 20 });
+ });
+});
diff --git a/test/game.test.ts b/test/game.test.ts
new file mode 100644
index 0000000..43aa06c
--- /dev/null
+++ b/test/game.test.ts
@@ -0,0 +1,307 @@
+import { describe, expect, it } from "vitest";
+import {
+ apply,
+ createRoom,
+ ensurePlayer,
+ GameError,
+ HOST_GRACE_MS,
+ isExpired,
+ nextWakeup,
+ ROOM_TTL_MS,
+ setDeck,
+ syncPresence,
+ tick,
+ type ClientMessage,
+ type Mode,
+ type RoomState,
+} from "../src/shared/game";
+import { viewFor } from "../src/shared/view";
+
+const T0 = 1_000_000;
+const seq = () => {
+ let i = 0;
+ return () => ((i++ * 0.37) % 1);
+};
+
+function room(mode: Mode = "vs", size = 5): RoomState {
+ return createRoom("TEST", mode, size ? { id: "d", name: "Deck", size } : null, T0, seq());
+}
+
+/** Adds players and marks them online, like the server does on connect. */
+function join(state: RoomState, ids: string[], now = T0): RoomState {
+ for (const [i, id] of ids.entries()) state = ensurePlayer(state, id, `P${id}`, now + i);
+ return syncPresence(state, Object.fromEntries(ids.map((id) => [id, 1])), now);
+}
+
+function act(state: RoomState, who: string, msg: ClientMessage, now = T0) {
+ return apply(state, who, msg, now, seq());
+}
+
+/** Host "host", red player "r", blue player "b", round started at T0. */
+function playingVs(): RoomState {
+ let s = join(room("vs"), ["host", "r", "b"]);
+ s = act(s, "r", { t: "seat", seat: "red" }).state;
+ s = act(s, "b", { t: "seat", seat: "blue" }).state;
+ return act(s, "host", { t: "start" }).state;
+}
+
+describe("bug 1: round timers", () => {
+ it("has exactly one wakeup, at the round end, however many rounds are played", () => {
+ let s = playingVs(); // started at T0
+ for (let round = 0; round < 5; round++) {
+ const startedAt = T0 + round * 100_000;
+ if (round > 0) s = act(s, "host", { t: "start" }, startedAt).state;
+ expect(s.round.phase).toBe("playing");
+ expect(nextWakeup(s)).toBe(startedAt + 30_000);
+ s = act(s, "host", { t: "skip" }, startedAt + 1_000).state;
+ expect(nextWakeup(s)).toBeNull();
+ }
+ });
+
+ it("times the round out once, and tick is idempotent", () => {
+ const s = playingVs();
+ const end = T0 + 30_000;
+ expect(tick(s, end - 1).round.phase).toBe("playing");
+ const over = tick(s, end);
+ expect(over.round).toEqual({ phase: "over", outcome: "timeout" });
+ expect(tick(tick(over, end + 5_000), end + 10_000)).toEqual(over);
+ expect(nextWakeup(over)).toBeNull();
+ });
+
+ it("restores only the remaining listening time after a wrong answer", () => {
+ let s = playingVs();
+ s = act(s, "r", { t: "buzz" }, T0 + 10_000).state;
+ expect(nextWakeup(s)).toBeNull(); // no timer runs while someone answers
+ s = act(s, "host", { t: "judge", correct: false }, T0 + 20_000).state;
+ expect(s.round).toMatchObject({ phase: "playing", endsAt: T0 + 40_000, lockedOut: ["red"] });
+ });
+
+ it("rejects buzzes that arrive after the round ended", () => {
+ const s = playingVs();
+ expect(() => act(s, "r", { t: "buzz" }, T0 + 30_001)).toThrow(GameError);
+ });
+});
+
+describe("bugs 2 and 3: presence and room lifecycle", () => {
+ it("derives presence from live connections, including several tabs per player", () => {
+ let s = join(room(), ["a", "b"]);
+ s = syncPresence(s, { a: 2, b: 1 }, T0);
+ s = syncPresence(s, { a: 1 }, T0); // one of a's tabs and b closed
+ expect(s.players.a.online).toBe(true);
+ expect(s.players.b.online).toBe(false);
+ expect(s.emptySince).toBeNull();
+ });
+
+ it("keeps scores when a lone player refreshes", () => {
+ let s = join(room("ffa"), ["solo"]);
+ s = act(s, "solo", { t: "score", key: "solo", delta: 1 }).state;
+ s = syncPresence(s, {}, T0 + 1); // page unloads
+ s = syncPresence(s, { solo: 1 }, T0 + 500); // page reloads
+ expect(s.scores.solo).toBe(1);
+ expect(s.hostId).toBe("solo");
+ expect(s.hostLeftAt).toBeNull();
+ });
+
+ it("only expires a room after it has been empty for the full TTL", () => {
+ let s = join(room(), ["a"]);
+ s = syncPresence(s, {}, T0 + 1);
+ expect(nextWakeup(s)).toBe(T0 + 1 + ROOM_TTL_MS);
+ expect(isExpired(s, T0 + ROOM_TTL_MS)).toBe(false);
+ expect(isExpired(s, T0 + 1 + ROOM_TTL_MS)).toBe(true);
+ s = syncPresence(s, { a: 1 }, T0 + 1000);
+ expect(isExpired(s, T0 + 10 * ROOM_TTL_MS)).toBe(false);
+ });
+});
+
+describe("bug 4: one event per buzz", () => {
+ it("emits a single buzz event and locks the round", () => {
+ const s = playingVs();
+ const first = act(s, "r", { t: "buzz" }, T0 + 1000);
+ expect(first.events).toEqual([{ t: "buzz", playerId: "r", name: "Pr", key: "red" }]);
+ expect(() => act(first.state, "b", { t: "buzz" }, T0 + 1001)).toThrow("Nothing to buzz for");
+ });
+});
+
+describe("bugs 5 and 6: decks and track queue", () => {
+ it("starts on the deck's first shuffled track without skipping it", () => {
+ const s = room("vs", 3);
+ expect(s.trackIndex).not.toBeNull();
+ expect([s.trackIndex, ...s.queue].sort()).toEqual([0, 1, 2]);
+ });
+
+ it("plays every track once before reshuffling, and never repeats back to back", () => {
+ let s = join(room("vs", 4), ["host"]);
+ const seen: number[] = [s.trackIndex!];
+ for (let i = 0; i < 11; i++) {
+ s = act(s, "host", { t: "next" }).state;
+ seen.push(s.trackIndex!);
+ }
+ expect(seen.slice(0, 4).sort()).toEqual([0, 1, 2, 3]);
+ expect(seen.slice(4, 8).sort()).toEqual([0, 1, 2, 3]);
+ for (let i = 1; i < seen.length; i++) expect(seen[i]).not.toBe(seen[i - 1]);
+ });
+
+ it("handles a one-track deck, an empty deck and own-music mode without crashing", () => {
+ let one = join(room("vs", 1), ["host"]);
+ one = act(one, "host", { t: "next" }).state;
+ expect(one.trackIndex).toBe(0);
+
+ const empty = setDeck(join(room(), ["host"]), { id: "x", name: "Empty", size: 0 }, seq());
+ expect(empty.deck).toBeNull();
+ expect(empty.trackIndex).toBeNull();
+
+ let own = join(room("vs", 0), ["host"]);
+ own = act(own, "host", { t: "start" }).state;
+ own = act(own, "host", { t: "skip" }).state;
+ own = act(own, "host", { t: "start" }).state; // starting from "over" advances the round
+ expect(own.round.phase).toBe("playing");
+ expect(own.roundNo).toBe(2);
+ });
+
+ it("hides the track from players until it is revealed", () => {
+ const deck = { id: "d", name: "Deck", tracks: [{ artist: "A", title: "Song" }] };
+ let s = join(createRoom("TEST", "vs", { id: "d", name: "Deck", size: 1 }, T0, seq()), ["host", "p"]);
+ expect(viewFor(s, deck, "host").track?.title).toBe("Song");
+ expect(viewFor(s, deck, "p").track).toBeNull();
+ s = act(s, "host", { t: "reveal", revealed: true }).state;
+ expect(viewFor(s, deck, "p").track?.title).toBe("Song");
+ });
+});
+
+describe("bug 7: host handoff", () => {
+ it("makes the first player host, and promotes someone after the host is gone for the grace period", () => {
+ let s = join(room(), ["host", "p1", "p2"]);
+ expect(s.hostId).toBe("host");
+ s = syncPresence(s, { p1: 1, p2: 1 }, T0 + 1000);
+ expect(s.hostLeftAt).toBe(T0 + 1000);
+ expect(nextWakeup(s)).toBe(T0 + 1000 + HOST_GRACE_MS);
+ expect(tick(s, T0 + 1000 + HOST_GRACE_MS - 1).hostId).toBe("host");
+ expect(tick(s, T0 + 1000 + HOST_GRACE_MS).hostId).toBe("p1");
+ });
+
+ it("lets a player take over straight away when the host is offline, but not when online", () => {
+ let s = join(room(), ["host", "p1"]);
+ expect(() => act(s, "p1", { t: "claimHost" })).toThrow("still here");
+ s = syncPresence(s, { p1: 1 }, T0 + 1);
+ s = act(s, "p1", { t: "claimHost" }, T0 + 2).state;
+ expect(s.hostId).toBe("p1");
+ expect(s.hostLeftAt).toBeNull();
+ });
+
+ it("does not hand over when the host just refreshes", () => {
+ let s = join(room(), ["host", "p1"]);
+ s = syncPresence(s, { p1: 1 }, T0 + 1);
+ s = syncPresence(s, { host: 1, p1: 1 }, T0 + 800);
+ expect(tick(s, T0 + 10 * HOST_GRACE_MS).hostId).toBe("host");
+ });
+});
+
+describe("game rules", () => {
+ it("scores the buzzing team on a correct answer", () => {
+ let s = playingVs();
+ s = act(s, "b", { t: "buzz" }, T0 + 5_000).state;
+ s = act(s, "host", { t: "judge", correct: true }, T0 + 6_000).state;
+ expect(s.scores).toEqual({ red: 0, blue: 1 });
+ expect(s.round).toEqual({ phase: "over", outcome: "correct", key: "blue" });
+ expect(s.revealed).toBe(true);
+ });
+
+ it("ends the round when both teams have answered wrong", () => {
+ let s = playingVs();
+ s = act(s, "r", { t: "buzz" }, T0 + 1_000).state;
+ s = act(s, "host", { t: "judge", correct: false }, T0 + 2_000).state;
+ expect(() => act(s, "r", { t: "buzz" }, T0 + 3_000)).toThrow("Locked out");
+ s = act(s, "b", { t: "buzz" }, T0 + 3_000).state;
+ s = act(s, "host", { t: "judge", correct: false }, T0 + 4_000).state;
+ expect(s.round).toEqual({ phase: "over", outcome: "timeout" });
+ });
+
+ it("lets a shared device buzz for either team", () => {
+ let s = join(room("vs"), ["host", "table"]);
+ s = act(s, "table", { t: "seat", seat: "shared" }).state;
+ s = act(s, "host", { t: "start" }).state;
+ expect(() => act(s, "table", { t: "buzz" })).toThrow("Pick a team");
+ expect(act(s, "table", { t: "buzz", team: "blue" }).state.round).toMatchObject({ key: "blue" });
+ });
+
+ it("scores individuals in free-for-all", () => {
+ let s = join(room("ffa"), ["host", "a", "b"]);
+ s = act(s, "host", { t: "start" }).state;
+ s = act(s, "a", { t: "buzz" }, T0 + 100).state;
+ s = act(s, "host", { t: "judge", correct: true }, T0 + 200).state;
+ expect(s.scores).toEqual({ host: 0, a: 1, b: 0 });
+ });
+
+ it("keeps host-only actions for the host, and stops the host buzzing", () => {
+ const s = playingVs();
+ expect(() => act(s, "r", { t: "next" })).toThrow("Only the host");
+ expect(() => act(s, "r", { t: "score", key: "red", delta: 5 })).toThrow("Only the host");
+ expect(() => act(s, "host", { t: "buzz" })).toThrow("host can't buzz");
+ });
+
+ it("validates names, settings and score keys", () => {
+ let s = join(room(), ["host"]);
+ expect(() => act(s, "host", { t: "rename", name: " " })).toThrow("empty");
+ s = act(s, "host", { t: "rename", name: "x".repeat(100) }).state;
+ expect(s.players.host.name).toHaveLength(24);
+ s = act(s, "host", { t: "settings", roundSeconds: 9999, answerSeconds: 0 }).state;
+ expect(s.settings).toEqual({ roundSeconds: 120, answerSeconds: 3 });
+ expect(() => act(s, "host", { t: "score", key: "green", delta: 1 })).toThrow("Unknown team");
+ expect(act(s, "host", { t: "score", key: "red", delta: 50 }).state.scores.red).toBe(1);
+ });
+
+ it("resets scores when switching mode", () => {
+ let s = join(room("vs"), ["host", "a"]);
+ s = act(s, "host", { t: "score", key: "red", delta: 1 }).state;
+ s = act(s, "host", { t: "mode", mode: "ffa" }).state;
+ expect(s.scores).toEqual({ host: 0, a: 0 });
+ });
+});
+
+describe("blend bookkeeping", () => {
+ it("marks a blend as outdated when someone adds or removes a list", async () => {
+ const { setContribution } = await import("../src/shared/game");
+ let s = join(room(), ["host", "p"]);
+ s = setContribution(s, "p", { playlist: "Mine", size: 10 }, { shared: 0, total: 10 });
+ s = { ...setDeck(s, { id: "blend", name: "Blend", size: 10 }, seq()), blendVersion: s.contribVersion };
+ expect(viewFor(s, null, "host").blendOutdated).toBe(false);
+ s = setContribution(s, "host", { playlist: "Host's", size: 5 }, { shared: 1, total: 14 });
+ expect(viewFor(s, null, "host").blendOutdated).toBe(true);
+ expect(viewFor(s, null, "p").contributions.map((c) => c.playerName)).toEqual(["Pp", "Phost"]);
+ // Choosing another deck clears the blend marker.
+ s = setDeck(s, { id: "d", name: "Deck", size: 3 }, seq());
+ expect(viewFor(s, null, "host").blendOutdated).toBe(false);
+ });
+
+ it("leaves music messages to the server", () => {
+ const s = join(room(), ["host"]);
+ expect(() => act(s, "host", { t: "withdraw" })).toThrow("handled by the server");
+ });
+});
+
+describe("Spotify links (Blend, collaborative playlist, Jam)", () => {
+ it("switches to own-music rounds and shows the link to everyone", async () => {
+ const { setSpotifyLink } = await import("../src/shared/game");
+ let s = join(room(), ["host", "p"]);
+ s = setSpotifyLink(s, { kind: "jam", url: "https://open.spotify.com/socialsession/abc" }, seq());
+ expect(s.deck).toBeNull();
+ expect(viewFor(s, null, "p").spotifyLink).toEqual({ kind: "jam", url: "https://open.spotify.com/socialsession/abc" });
+ // Own-music rounds still work.
+ s = act(s, "host", { t: "start" }).state;
+ expect(s.round.phase).toBe("playing");
+ });
+
+ it("is cleared when the host picks a deck or plain own music", async () => {
+ const { setSpotifyLink } = await import("../src/shared/game");
+ let s = setSpotifyLink(join(room(), ["host"]), { kind: "blend", url: "https://open.spotify.com/playlist/x" }, seq());
+ expect(setDeck(s, { id: "d", name: "Deck", size: 3 }, seq()).spotifyLink).toBeNull();
+ expect(setDeck(s, null, seq()).spotifyLink).toBeNull();
+ });
+
+ it("is host-only and handled by the server", async () => {
+ const { isHostOnly } = await import("../src/shared/game");
+ const msg: ClientMessage = { t: "spotifyLink", kind: "collab", url: "https://open.spotify.com/playlist/x" };
+ expect(isHostOnly(msg)).toBe(true);
+ expect(() => act(join(room(), ["host"]), "host", msg)).toThrow("handled by the server");
+ });
+});
diff --git a/test/pling/playlists/music_library_test.exs b/test/pling/playlists/music_library_test.exs
deleted file mode 100644
index 5468fef..0000000
--- a/test/pling/playlists/music_library_test.exs
+++ /dev/null
@@ -1,84 +0,0 @@
-defmodule Pling.Playlists.MusicLibraryTest do
- use Pling.DataCase, async: true
- alias Pling.Playlists.{MusicLibrary, Playlist, Track}
-
- describe "get_or_fetch_playlist/1" do
- test "returns existing playlist when it exists" do
- playlist = %Playlist{
- spotify_id: "existing_id",
- name: "Test Playlist",
- owner: "test_owner",
- image_url: "http://example.com/image.jpg",
- official: false
- }
-
- {:ok, _} = Repo.insert(playlist)
-
- assert {:ok, :exists, fetched_playlist} = MusicLibrary.get_or_fetch_playlist("existing_id")
- assert fetched_playlist.spotify_id == "existing_id"
- assert fetched_playlist.name == "Test Playlist"
- end
-
- test "fetches new playlist from Spotify when it doesn't exist" do
- playlist_id = "new_playlist_id"
-
- # Mock the Spotify.stream_playlist function
- :meck.new(Pling.Services.Spotify, [:passthrough])
-
- :meck.expect(Pling.Services.Spotify, :stream_playlist, fn ^playlist_id, callback ->
- # Simulate playlist info
- callback.(%{
- "playlist_info" => %{
- "name" => "New Playlist",
- "owner" => "spotify_user",
- "images" => [%{"url" => "http://example.com/new.jpg"}]
- }
- })
-
- # Simulate track data
- callback.(%{
- "track" => %{
- "uri" => "spotify:track:123",
- "name" => "Test Track",
- "artists" => [%{"name" => "Test Artist"}],
- "popularity" => 80,
- "album" => %{"name" => "Test Album"}
- }
- })
-
- :ok
- end)
-
- try do
- assert {:ok, :first_track_saved, playlist} =
- MusicLibrary.get_or_fetch_playlist(playlist_id)
-
- assert playlist.spotify_id == playlist_id
- assert playlist.name == "New Playlist"
-
- # Verify track was saved
- track = Repo.get_by(Track, uri: "spotify:track:123")
- assert track.title == "Test Track"
- after
- :meck.unload(Pling.Services.Spotify)
- end
- end
-
- test "handles errors during playlist fetch" do
- playlist_id = "error_playlist_id"
-
- # Mock the Spotify service with an error
- :meck.new(Pling.Services.Spotify, [:passthrough])
-
- :meck.expect(Pling.Services.Spotify, :stream_playlist, fn ^playlist_id, _callback ->
- {:error, "API Error"}
- end)
-
- try do
- assert {:error, "API Error"} = MusicLibrary.get_or_fetch_playlist(playlist_id)
- after
- :meck.unload(Pling.Services.Spotify)
- end
- end
- end
-end
diff --git a/test/pling/rooms/presence_test.exs b/test/pling/rooms/presence_test.exs
deleted file mode 100644
index e69de29..0000000
diff --git a/test/pling/rooms/room_state_test.exs b/test/pling/rooms/room_state_test.exs
deleted file mode 100644
index 764cc39..0000000
--- a/test/pling/rooms/room_state_test.exs
+++ /dev/null
@@ -1,49 +0,0 @@
-defmodule Pling.Rooms.RoomStateTest do
- use ExUnit.Case, async: true
- alias Pling.Rooms.RoomState
- alias Pling.Playlists.Playlist
-
- describe "initialize/3" do
- test "creates initial state with required fields" do
- state = RoomState.initialize("room1", "vs", "leader1")
-
- assert state.room_code == "room1"
- assert state.game_mode == "vs"
- assert state.leader_id == "leader1"
- assert state.playing? == false
- assert state.countdown == nil
- assert state.timer_ref == nil
- assert state.scores == %{}
- assert state.playlists == %{}
- assert state.selection.playlist != nil
- assert state.selection.queue == []
- end
-
- test "raises error when leader_id is nil" do
- assert_raise RuntimeError, "leader_id must be provided when initializing a room", fn ->
- RoomState.initialize("room1", "vs", nil)
- end
- end
- end
-
- describe "for_client/1" do
- test "formats state for client consumption" do
- playlist = %Playlist{spotify_id: "test_id", name: "Test Playlist", tracks: []}
- state = %{
- RoomState.initialize("room1", "vs", "leader1") |
- playlists: %{"test_id" => playlist}
- }
-
- client_state = RoomState.for_client(state)
-
- assert client_state.playing? == false
- assert client_state.game_mode == "vs"
- assert client_state.leader_id == "leader1"
- assert client_state.playlists["test_id"] == %{
- spotify_id: "test_id",
- name: "Test Playlist"
- }
- refute Map.has_key?(client_state, :timer_ref)
- end
- end
-end
diff --git a/test/pling/services/ndjson_stream_test.exs b/test/pling/services/ndjson_stream_test.exs
deleted file mode 100644
index e80937b..0000000
--- a/test/pling/services/ndjson_stream_test.exs
+++ /dev/null
@@ -1,73 +0,0 @@
-defmodule Pling.Services.NDJsonStreamTest do
- use ExUnit.Case, async: true
- import ExUnit.CaptureLog
-
- alias Pling.Services.NDJsonStream
-
- describe "stream_fn/1" do
- test "processes complete objects" do
- test_pid = self()
- stream_fn = NDJsonStream.stream_fn(fn obj -> send(test_pid, {:object, obj}) end)
-
- {:cont, buffer} = stream_fn.({:data, ~s({"id": 1, "name": "test"}\n)}, "")
- assert_received {:object, %{"id" => 1, "name" => "test"}}
- assert buffer == ""
- end
-
- test "handles multiple objects in one chunk" do
- test_pid = self()
- stream_fn = NDJsonStream.stream_fn(fn obj -> send(test_pid, {:object, obj}) end)
-
- {:cont, buffer} = stream_fn.({:data, ~s({"id": 1}\n{"id": 2}\n)}, "")
- assert_received {:object, %{"id" => 1}}
- assert_received {:object, %{"id" => 2}}
- assert buffer == ""
- end
-
- test "handles partial objects across chunks" do
- test_pid = self()
- stream_fn = NDJsonStream.stream_fn(fn obj -> send(test_pid, {:object, obj}) end)
-
- {:cont, buffer1} = stream_fn.({:data, ~s({"id": 1, "na)}, "")
- refute_received {:object, _}
- assert buffer1 == ~s({"id": 1, "na)
-
- {:cont, buffer2} = stream_fn.({:data, ~s(me": "test"}\n)}, buffer1)
- assert_received {:object, %{"id" => 1, "name" => "test"}}
- assert buffer2 == ""
- end
-
- test "handles invalid JSON gracefully" do
- test_pid = self()
- stream_fn = NDJsonStream.stream_fn(fn obj -> send(test_pid, {:object, obj}) end)
-
- capture_log(fn ->
- {:cont, _} = stream_fn.({:data, ~s({"valid": true}\n{invalid}\n{"also_valid": 1}\n)}, "")
- end)
-
- assert_received {:object, %{"valid" => true}}
- assert_received {:object, %{"also_valid" => 1}}
- refute_received {:object, _}
- end
-
- test "processes final buffer on done" do
- test_pid = self()
- stream_fn = NDJsonStream.stream_fn(fn obj -> send(test_pid, {:object, obj}) end)
-
- {:cont, buffer} = stream_fn.({:data, ~s({"id": 1}\n{"id": 2})}, "")
- assert_received {:object, %{"id" => 1}}
-
- {:cont, _} = stream_fn.({:done, nil}, buffer)
- assert_received {:object, %{"id" => 2}}
- end
-
- test "ignores unknown messages" do
- test_pid = self()
- stream_fn = NDJsonStream.stream_fn(fn obj -> send(test_pid, {:object, obj}) end)
-
- {:cont, buffer} = stream_fn.(:unknown, "some buffer")
- assert buffer == "some buffer"
- refute_received {:object, _}
- end
- end
-end
diff --git a/test/pling_web/controllers/error_html_test.exs b/test/pling_web/controllers/error_html_test.exs
deleted file mode 100644
index 3c238fe..0000000
--- a/test/pling_web/controllers/error_html_test.exs
+++ /dev/null
@@ -1,14 +0,0 @@
-defmodule PlingWeb.ErrorHTMLTest do
- use PlingWeb.ConnCase, async: true
-
- # Bring render_to_string/4 for testing custom views
- import Phoenix.Template
-
- test "renders 404.html" do
- assert render_to_string(PlingWeb.ErrorHTML, "404", "html", []) == "Not Found"
- end
-
- test "renders 500.html" do
- assert render_to_string(PlingWeb.ErrorHTML, "500", "html", []) == "Internal Server Error"
- end
-end
diff --git a/test/pling_web/controllers/error_json_test.exs b/test/pling_web/controllers/error_json_test.exs
deleted file mode 100644
index a9d4d9b..0000000
--- a/test/pling_web/controllers/error_json_test.exs
+++ /dev/null
@@ -1,12 +0,0 @@
-defmodule PlingWeb.ErrorJSONTest do
- use PlingWeb.ConnCase, async: true
-
- test "renders 404" do
- assert PlingWeb.ErrorJSON.render("404.json", %{}) == %{errors: %{detail: "Not Found"}}
- end
-
- test "renders 500" do
- assert PlingWeb.ErrorJSON.render("500.json", %{}) ==
- %{errors: %{detail: "Internal Server Error"}}
- end
-end
diff --git a/test/pling_web/smoke_test.exs b/test/pling_web/smoke_test.exs
deleted file mode 100644
index ff26cb2..0000000
--- a/test/pling_web/smoke_test.exs
+++ /dev/null
@@ -1,9 +0,0 @@
-defmodule PlingWeb.SmokeTest do
- use ExUnit.Case
- use PlingWeb.ConnCase
-
- test "smoke test - root path redirects to login" do
- conn = get(build_conn(), "/")
- assert redirected_to(conn, 302) =~ "/login"
- end
-end
diff --git a/test/spotify.test.ts b/test/spotify.test.ts
new file mode 100644
index 0000000..ec8b9ac
--- /dev/null
+++ b/test/spotify.test.ts
@@ -0,0 +1,128 @@
+import { describe, expect, it } from "vitest";
+import { cleanSpotifyShareUrl, cleanTrack, parseCsvTracks, parseImportFile, parsePastedTracks, parseSpotifyExport, parseSpotifyTrackId, trackUrl } from "../src/shared/spotify";
+
+const ID = "3SFXsFpeGmBTtQvKiwYMDA";
+const ID2 = "7ouMYWpwJ422jRcDASZB7P";
+
+describe("spotify links", () => {
+ it("reads track ids from links and URIs", () => {
+ expect(parseSpotifyTrackId(`https://open.spotify.com/track/${ID}?si=abc`)).toBe(ID);
+ expect(parseSpotifyTrackId(`https://open.spotify.com/intl-de/track/${ID}`)).toBe(ID);
+ expect(parseSpotifyTrackId(`spotify:track:${ID}`)).toBe(ID);
+ expect(parseSpotifyTrackId(`https://open.spotify.com/playlist/${ID}`)).toBeUndefined();
+ });
+
+ it("links to the track, or to a search when there is no id", () => {
+ expect(trackUrl({ spotifyId: ID })).toBe(`https://open.spotify.com/track/${ID}`);
+ expect(trackUrl({ artist: "a-ha", title: "Take On Me" })).toBe("https://open.spotify.com/search/a-ha%20Take%20On%20Me");
+ expect(trackUrl({})).toBeNull();
+ });
+
+ it("rejects junk tracks from clients", () => {
+ expect(cleanTrack({ spotifyId: "nope" })).toBeNull();
+ expect(cleanTrack("hello")).toBeNull();
+ expect(cleanTrack({ title: "x".repeat(500) })?.title).toHaveLength(200);
+ });
+});
+
+describe("pasted track lists", () => {
+ it("accepts links, links with names, and 'Artist - Title' lines", () => {
+ const tracks = parsePastedTracks(
+ [`https://open.spotify.com/track/${ID}?si=x`, `spotify:track:${ID2} | Queen - Bohemian Rhapsody`, "", "ABBA - Dancing Queen", "Just a title"].join(
+ "\n",
+ ),
+ );
+ expect(tracks).toEqual([
+ { spotifyId: ID, title: undefined, artist: undefined },
+ { spotifyId: ID2, artist: "Queen", title: "Bohemian Rhapsody" },
+ { spotifyId: undefined, artist: "ABBA", title: "Dancing Queen" },
+ { spotifyId: undefined, artist: undefined, title: "Just a title" },
+ ]);
+ });
+});
+
+describe("Spotify data export", () => {
+ it("reads playlist files", () => {
+ const playlists = parseSpotifyExport({
+ playlists: [
+ {
+ name: "Party",
+ items: [
+ { track: { trackName: "Take On Me", artistName: "a-ha", trackUri: `spotify:track:${ID}` } },
+ { track: { trackName: "Take On Me", artistName: "a-ha", trackUri: `spotify:track:${ID}` } },
+ { episode: { name: "A podcast" } },
+ ],
+ },
+ { name: "Empty", items: [] },
+ ],
+ });
+ expect(playlists).toEqual([{ name: "Party", tracks: [{ title: "Take On Me", artist: "a-ha", spotifyId: ID }] }]);
+ });
+
+ it("reads the library file", () => {
+ const playlists = parseSpotifyExport({ tracks: [{ artist: "ABBA", album: "Arrival", track: "Dancing Queen", uri: `spotify:track:${ID}` }] });
+ expect(playlists).toEqual([{ name: "Liked songs", tracks: [{ title: "Dancing Queen", artist: "ABBA", spotifyId: ID }] }]);
+ });
+
+ it("ignores files it doesn't understand", () => {
+ expect(parseSpotifyExport({ userdata: true })).toEqual([]);
+ expect(parseSpotifyExport(null)).toEqual([]);
+ });
+});
+
+describe("more import formats", () => {
+ it("reads several links on one line, and drops duplicates", () => {
+ expect(parsePastedTracks(`spotify:track:${ID} spotify:track:${ID2}\nhttps://open.spotify.com/track/${ID}`)).toEqual([
+ { spotifyId: ID },
+ { spotifyId: ID2 },
+ ]);
+ });
+
+ it("reads an Exportify CSV", () => {
+ const csv = [
+ '"Track URI","Track Name","Artist Name(s)","Album Name"',
+ `"spotify:track:${ID}","Take On Me","a-ha","Hunting High and Low"`,
+ `"spotify:track:${ID2}","Under Pressure","Queen,David Bowie","Hot Space"`,
+ `"spotify:track:${ID2}","Under Pressure","Queen,David Bowie","Hot Space"`,
+ ].join("\r\n");
+ expect(parseCsvTracks(csv)).toEqual([
+ { spotifyId: ID, title: "Take On Me", artist: "a-ha" },
+ { spotifyId: ID2, title: "Under Pressure", artist: "Queen" },
+ ]);
+ });
+
+ it("reads a plain spreadsheet CSV with quotes and commas", () => {
+ expect(parseCsvTracks('Artist,Title\nABBA,"Waterloo"\n"Earth, Wind & Fire","September"\n')).toEqual([
+ { spotifyId: undefined, title: "Waterloo", artist: "ABBA" },
+ { spotifyId: undefined, title: "September", artist: "Earth, Wind & Fire" },
+ ]);
+ });
+
+ it("picks the right reader from the file", () => {
+ expect(parseImportFile("Party_Mix.csv", `Track URI,Track Name\nspotify:track:${ID},X`)).toEqual([
+ { name: "Party Mix", tracks: [{ spotifyId: ID, title: "X", artist: undefined }] },
+ ]);
+ expect(parseImportFile("YourLibrary.json", JSON.stringify({ tracks: [{ track: "Y", artist: "Z" }] }))[0].name).toBe("Liked songs");
+ expect(parseImportFile("links.txt", `https://open.spotify.com/track/${ID}`)).toEqual([{ name: "links", tracks: [{ spotifyId: ID, title: undefined, artist: undefined }] }]);
+ expect(parseImportFile("broken.json", "{nope")).toEqual([]);
+ });
+});
+
+describe("Spotify share links", () => {
+ it("accepts Spotify's own share links and strips text around them", () => {
+ expect(cleanSpotifyShareUrl("https://open.spotify.com/playlist/37i9dQZF1EJ?si=abc&pt=1")).toBe(
+ "https://open.spotify.com/playlist/37i9dQZF1EJ?si=abc&pt=1",
+ );
+ expect(cleanSpotifyShareUrl("Join my Jam on Spotify! https://spotify.link/AbCdEf")).toBe("https://spotify.link/AbCdEf");
+ expect(cleanSpotifyShareUrl("http://open.spotify.com/socialsession/xyz#top")).toBe("https://open.spotify.com/socialsession/xyz");
+ });
+
+ it("rejects anything else", () => {
+ expect(cleanSpotifyShareUrl("https://evil.example/open.spotify.com")).toBeNull();
+ expect(cleanSpotifyShareUrl("https://open.spotify.com.evil.example/x")).toBeNull();
+ expect(cleanSpotifyShareUrl("javascript:alert(1)")).toBeNull();
+ expect(cleanSpotifyShareUrl("no link here")).toBeNull();
+ expect(cleanSpotifyShareUrl(42)).toBeNull();
+ expect(cleanSpotifyShareUrl(`https://open.spotify.com/${"a".repeat(600)}`)).toBeNull();
+ });
+});
diff --git a/test/support/conn_case.ex b/test/support/conn_case.ex
deleted file mode 100644
index 40c3123..0000000
--- a/test/support/conn_case.ex
+++ /dev/null
@@ -1,38 +0,0 @@
-defmodule PlingWeb.ConnCase do
- @moduledoc """
- This module defines the test case to be used by
- tests that require setting up a connection.
-
- Such tests rely on `Phoenix.ConnTest` and also
- import other functionality to make it easier
- to build common data structures and query the data layer.
-
- Finally, if the test case interacts with the database,
- we enable the SQL sandbox, so changes done to the database
- are reverted at the end of every test. If you are using
- PostgreSQL, you can even run database tests asynchronously
- by setting `use PlingWeb.ConnCase, async: true`, although
- this option is not recommended for other databases.
- """
-
- use ExUnit.CaseTemplate
-
- using do
- quote do
- # The default endpoint for testing
- @endpoint PlingWeb.Endpoint
-
- use PlingWeb, :verified_routes
-
- # Import conveniences for testing with connections
- import Plug.Conn
- import Phoenix.ConnTest
- import PlingWeb.ConnCase
- end
- end
-
- setup tags do
- Pling.DataCase.setup_sandbox(tags)
- {:ok, conn: Phoenix.ConnTest.build_conn()}
- end
-end
diff --git a/test/support/data_case.ex b/test/support/data_case.ex
deleted file mode 100644
index 275e923..0000000
--- a/test/support/data_case.ex
+++ /dev/null
@@ -1,58 +0,0 @@
-defmodule Pling.DataCase do
- @moduledoc """
- This module defines the setup for tests requiring
- access to the application's data layer.
-
- You may define functions here to be used as helpers in
- your tests.
-
- Finally, if the test case interacts with the database,
- we enable the SQL sandbox, so changes done to the database
- are reverted at the end of every test. If you are using
- PostgreSQL, you can even run database tests asynchronously
- by setting `use Pling.DataCase, async: true`, although
- this option is not recommended for other databases.
- """
-
- use ExUnit.CaseTemplate
-
- using do
- quote do
- alias Pling.Repo
-
- import Ecto
- import Ecto.Changeset
- import Ecto.Query
- import Pling.DataCase
- end
- end
-
- setup tags do
- Pling.DataCase.setup_sandbox(tags)
- :ok
- end
-
- @doc """
- Sets up the sandbox based on the test tags.
- """
- def setup_sandbox(tags) do
- pid = Ecto.Adapters.SQL.Sandbox.start_owner!(Pling.Repo, shared: not tags[:async])
- on_exit(fn -> Ecto.Adapters.SQL.Sandbox.stop_owner(pid) end)
- end
-
- @doc """
- A helper that transforms changeset errors into a map of messages.
-
- assert {:error, changeset} = Accounts.create_user(%{password: "short"})
- assert "password is too short" in errors_on(changeset).password
- assert %{password: ["password is too short"]} = errors_on(changeset)
-
- """
- def errors_on(changeset) do
- Ecto.Changeset.traverse_errors(changeset, fn {message, opts} ->
- Regex.replace(~r"%{(\w+)}", message, fn _, key ->
- opts |> Keyword.get(String.to_existing_atom(key), key) |> to_string()
- end)
- end)
- end
-end
diff --git a/test/test_helper.exs b/test/test_helper.exs
deleted file mode 100644
index 70a1030..0000000
--- a/test/test_helper.exs
+++ /dev/null
@@ -1,2 +0,0 @@
-ExUnit.start()
-Ecto.Adapters.SQL.Sandbox.mode(Pling.Repo, :manual)
diff --git a/tsconfig.app.json b/tsconfig.app.json
new file mode 100644
index 0000000..044bf01
--- /dev/null
+++ b/tsconfig.app.json
@@ -0,0 +1,17 @@
+{
+ "compilerOptions": {
+ "target": "ES2022",
+ "lib": ["ES2023", "DOM", "DOM.Iterable"],
+ "module": "ESNext",
+ "moduleResolution": "bundler",
+ "jsx": "react-jsx",
+ "strict": true,
+ "noEmit": true,
+ "skipLibCheck": true,
+ "isolatedModules": true,
+ "noUnusedLocals": true,
+ "noFallthroughCasesInSwitch": true,
+ "types": ["vite/client"]
+ },
+ "include": ["src/client", "src/shared", "test", "vite.config.ts", "vitest.config.ts"]
+}
diff --git a/tsconfig.json b/tsconfig.json
new file mode 100644
index 0000000..244e9ec
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,4 @@
+{
+ "files": [],
+ "references": [{ "path": "./tsconfig.app.json" }, { "path": "./tsconfig.worker.json" }]
+}
diff --git a/tsconfig.worker.json b/tsconfig.worker.json
new file mode 100644
index 0000000..734808d
--- /dev/null
+++ b/tsconfig.worker.json
@@ -0,0 +1,15 @@
+{
+ "compilerOptions": {
+ "target": "ES2022",
+ "lib": ["ES2023"],
+ "module": "ESNext",
+ "moduleResolution": "bundler",
+ "strict": true,
+ "noEmit": true,
+ "skipLibCheck": true,
+ "isolatedModules": true,
+ "noUnusedLocals": true,
+ "types": []
+ },
+ "include": ["src/server", "src/shared", ".cloudflare/types/index.d.ts"]
+}
diff --git a/vite.config.ts b/vite.config.ts
new file mode 100644
index 0000000..8151048
--- /dev/null
+++ b/vite.config.ts
@@ -0,0 +1,20 @@
+import { cloudflare } from "@cloudflare/vite-plugin";
+import { paraglideVitePlugin } from "@inlang/paraglide-js";
+import tailwindcss from "@tailwindcss/vite";
+import react from "@vitejs/plugin-react";
+import { defineConfig } from "vite";
+
+export default defineConfig({
+ plugins: [
+ paraglideVitePlugin({
+ project: "./project.inlang",
+ outdir: "./src/paraglide",
+ emitTsDeclarations: true,
+ // A saved choice wins, then the browser's language, then English.
+ strategy: ["localStorage", "preferredLanguage", "baseLocale"],
+ }),
+ react(),
+ tailwindcss(),
+ cloudflare(),
+ ],
+});
diff --git a/vitest.config.ts b/vitest.config.ts
new file mode 100644
index 0000000..f1f5322
--- /dev/null
+++ b/vitest.config.ts
@@ -0,0 +1,7 @@
+import { defineConfig } from "vitest/config";
+
+// Kept separate from vite.config.ts so unit tests run in plain Node without the
+// Cloudflare and React plugins.
+export default defineConfig({
+ test: { include: ["test/**/*.test.ts"], environment: "node" },
+});