diff --git a/.all-contributorsrc b/.all-contributorsrc
new file mode 100644
index 00000000..e437b7e0
--- /dev/null
+++ b/.all-contributorsrc
@@ -0,0 +1,174 @@
+{
+ "projectName": "JavaScript-Snake",
+ "projectOwner": "patorjk",
+ "files": [
+ "README.md"
+ ],
+ "commitType": "docs",
+ "commitConvention": "angular",
+ "contributorsPerLine": 7,
+ "contributors": [
+ {
+ "login": "patorjk",
+ "name": "patorjk",
+ "avatar_url": "https://avatars.githubusercontent.com/u/521224?v=4",
+ "profile": "http://patorjk.com/",
+ "contributions": [
+ "code",
+ "doc",
+ "design",
+ "bug",
+ "example"
+ ]
+ },
+ {
+ "login": "ultra17",
+ "name": "ultra17",
+ "avatar_url": "https://avatars.githubusercontent.com/u/27869698?v=4",
+ "profile": "https://github.com/ultra17",
+ "contributions": [
+ "code",
+ "doc",
+ "design",
+ "bug"
+ ]
+ },
+ {
+ "login": "Rb64",
+ "name": "Rb64",
+ "avatar_url": "https://avatars.githubusercontent.com/u/91498309?v=4",
+ "profile": "https://github.com/Rb64",
+ "contributions": [
+ "code",
+ "bug"
+ ]
+ },
+ {
+ "login": "legoman8304",
+ "name": "Wyatt Nulton",
+ "avatar_url": "https://avatars.githubusercontent.com/u/43346988?v=4",
+ "profile": "https://github.com/legoman8304",
+ "contributions": [
+ "code",
+ "bug"
+ ]
+ },
+ {
+ "login": "ashishsiot",
+ "name": "Ashish Bhoir",
+ "avatar_url": "https://avatars.githubusercontent.com/u/63919950?v=4",
+ "profile": "https://github.com/ashishsiot",
+ "contributions": [
+ "doc"
+ ]
+ },
+ {
+ "login": "dginovker",
+ "name": "Dan G",
+ "avatar_url": "https://avatars.githubusercontent.com/u/32943174?v=4",
+ "profile": "http://dginovker.github.io",
+ "contributions": [
+ "code",
+ "bug"
+ ]
+ },
+ {
+ "login": "Megas4ever",
+ "name": "Megas4ever",
+ "avatar_url": "https://avatars.githubusercontent.com/u/28103886?v=4",
+ "profile": "https://github.com/Megas4ever",
+ "contributions": [
+ "code",
+ "design"
+ ]
+ },
+ {
+ "login": "mamamia5x",
+ "name": "Bugs Bunny",
+ "avatar_url": "https://avatars.githubusercontent.com/u/57536929?v=4",
+ "profile": "https://github.com/mamamia5x",
+ "contributions": [
+ "code",
+ "bug"
+ ]
+ },
+ {
+ "login": "Coteh",
+ "name": "James Cote",
+ "avatar_url": "https://avatars.githubusercontent.com/u/3276350?v=4",
+ "profile": "https://www.jamescote.ca",
+ "contributions": [
+ "code",
+ "bug",
+ "doc"
+ ]
+ },
+ {
+ "login": "yokesharun",
+ "name": "Arun Yokesh",
+ "avatar_url": "https://avatars.githubusercontent.com/u/12830078?v=4",
+ "profile": "http://yokesharun.github.io/",
+ "contributions": [
+ "code",
+ "design"
+ ]
+ },
+ {
+ "login": "GregFrench",
+ "name": "Greg French",
+ "avatar_url": "https://avatars.githubusercontent.com/u/17938510?v=4",
+ "profile": "https://github.com/GregFrench",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "KT360",
+ "name": "KT360",
+ "avatar_url": "https://avatars.githubusercontent.com/u/31077743?v=4",
+ "profile": "https://github.com/KT360",
+ "contributions": [
+ "code",
+ "design"
+ ]
+ },
+ {
+ "login": "Thusal06",
+ "name": "Thusal Ranawaka",
+ "avatar_url": "https://avatars.githubusercontent.com/u/66709891?v=4",
+ "profile": "https://thusal06.github.io/",
+ "contributions": [
+ "code",
+ "design"
+ ]
+ },
+ {
+ "login": "Furtano",
+ "name": "C. S.",
+ "avatar_url": "https://avatars.githubusercontent.com/u/4115133?v=4",
+ "profile": "https://github.com/Furtano",
+ "contributions": [
+ "code",
+ "design"
+ ]
+ },
+ {
+ "login": "akhill2606",
+ "name": "Akhil Manohar",
+ "avatar_url": "https://avatars.githubusercontent.com/u/56164681?v=4",
+ "profile": "https://github.com/akhill2606",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "DylanLCrocker",
+ "name": "Dylan Crocker",
+ "avatar_url": "https://avatars.githubusercontent.com/DylanLCrocker",
+ "profile": "https://github.com/DylanLCrocker",
+ "contributions": [
+ "code"
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..b7a73c74
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+.parcel-cache
+node_modules/
+dist/
diff --git a/.parcelrc b/.parcelrc
new file mode 100644
index 00000000..1f3df894
--- /dev/null
+++ b/.parcelrc
@@ -0,0 +1,4 @@
+{
+ "extends": ["@parcel/config-default"],
+ "reporters": ["...", "parcel-reporter-static-files-copy"]
+}
diff --git a/README.md b/README.md
index 7942c5ff..0956f864 100755
--- a/README.md
+++ b/README.md
@@ -8,21 +8,114 @@ You can now play and edit the game live in codesandbox:
https://codesandbox.io/s/github/patorjk/JavaScript-Snake?file=/index.html
-On first load sometimes the game frame will not load correctly and you'll need to press the refresh icon above its display panel to get the game to show.
+**2025: Looks like CSS inside the sandbox isn't working properly, in the game it works fine though**
+
+On first load sometimes the game frame will not load correctly and you'll need to press the refresh icon above its display panel to get the game to show.
Original game is located here:
http://patorjk.com/games/snake
-
## How to use
+
The index.html file should give an idea of how to use this code. However, below you can see how to initialize it into any div within a webpage.
- var mySnakeBoard = new SNAKE.Board( {
+ const mySnakeBoard = new SNAKE.Board( {
boardContainer: "game-area",
fullScreen: false,
width: 580,
height:400
});
-
+
The comments within the source code are formatted a little strange because at the time I was playing around with YUI Doc which generates documentation from code. Kind of sucks that there's so much churn in the JavaScript world. However, I'm glad the rest of the code doesn't use any external libraries, as this game still works the same after over a decade.
+
+## Running
+
+Clone project, then at command line:
+
+```
+npx parcel src/index.html
+```
+
+Runs on http://localhost:1234
+
+## AI Snake
+
+If you want to control the snake via an AI algorithm see the ai-init.js and ai-example files.
+
+Essentially all you have to do is run `params.startAIGame();` when initializing and pass in a `moveSnakeWithAI` method
+which is run before the snake does each move.
+
+```js
+ moveSnakeWithAI: ({
+ grid,
+ snakeHead,
+ currentDirection,
+ isFirstGameMove,
+ setDirection,
+ }) => {
+
+ /*
+ Direction:
+ 0
+ 3 1
+ 2
+ */
+
+ // This is NOT a real hamiltonian cycle. It misses some values, I'm just including this here as an example of
+ // a look-up type table that you could do.
+ const hamiltonianCycleGrid = [
+ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+ [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0],
+ [0, 0, 2, 3, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 0],
+ [0, 0, 2, 0, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0],
+ [0, 0, 2, 0, 2, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0],
+ [0, 0, 3, 0, 3, 3, 3, 3, 0, 3, 0, 3, 0, 3, 0],
+ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+ ];
+
+ const newDirection = hamiltonianCycleGrid[snakeHead.row][snakeHead.col];
+ setDirection(newDirection);
+ },
+ onInit: (params) => {
+ params.startAIGame(); // This start an AI game
+ },
+```
+
+## Contributors
+
+Thanks goes to these people: ([emoji key](https://allcontributors.org/docs/en/emoji-key))
+
+
+
+
+
+
+
+
+
+
diff --git a/css/Senura-snake.css b/css/Senura-snake.css
deleted file mode 100644
index 180ea4a3..00000000
--- a/css/Senura-snake.css
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
-JavaScript Snake
-By Patrick Gillespie
-http://patorjk.com/games/snake
-*/
-
-body {
- margin:0px;
- padding:0px;
- background-color:#000000;
-}
-
-.snake-toolbar {
- color: #847a87;
-}
-
-#game-area {
- margin:10px;
- padding:0px;
-}
-
-#game-area:focus { outline: none; }
-
-#mode-wrapper {
- font-family: Verdana, arial, helvetica, sans-serif;
- font-size: 14px;
- color: #f6f0f7;
-}
-
-a.snake-link, a.snake-link:link, a.snake-link:visited {
- color: #605d61;
-}
-
-a.snake-link:hover {
- color: #a500d6;
-}
-
-.snake-pause-screen {
- font-family: Verdana, arial, helvetica, sans-serif;
- font-size: 14px;
- position:absolute;
- width:300px;
- height:80px;
- text-align:center;
- top:50%;
- left:50%;
- margin-top:-40px;
- margin-left:-150px;
- display:none;
- background-color:#ffffff;
- color: #938996;
-}
-
-.snake-panel-component {
- position: absolute;
- font-family: Verdana, arial, helvetica, sans-serif;
- font-size: 14px;
- color: #cf6d6d;
- text-align: center;
- background-color: #550b70;
- padding: 8px;
- margin: 0px;
-}
-
-.snake-snakebody-block {
- margin: 0px;
- padding: 0px;
- background-color: #eddff2;
- position: absolute;
- border: 0px solid black;
- background-repeat: no-repeat;
-}
-
-.snake-snakebody-alive {
- background-image: url('./images/dark-snakeblock.png');
-}
-.snake-snakebody-dead {
- background-image: url('./images/dead-dark-snakeblock.png');
-}
-
-.snake-food-block {
- margin: 0px;
- padding: 0px;
- background-color: black;
- border: 2px solid #000000;
- position: absolute;
-}
-
-.snake-playing-field {
- margin: 0px;
- padding: 0px;
- position: absolute;
- background-color: #fcfcfc;
- border: 3px solid black;
-}
-
-.snake-game-container {
- margin: 0px;
- padding: 0px;
- border-width: 0px;
- border-style: none;
- zoom: 1;
- background-color: #3E2E44;
- position: relative;
-}
-
-.snake-welcome-dialog {
- padding: 8px;
- margin: 0px;
- background-color: black;
- color: #ab00de;
- font-family: Verdana, arial, helvetica, sans-serif;
- font-size: 14px;
- position: absolute;
- top: 50%;
- left: 50%;
- width: 300px;
- /*height: 150px;*/
- margin-top: -100px;
- margin-left: -158px;
- text-align: center;
- display: block;
-}
-
-.snake-try-again-dialog, .snake-win-dialog {
- padding: 8px;
- margin: 0px;
- background-color: black;
- color: #ab00de;
- font-family: Verdana, arial, helvetica, sans-serif;
- font-size: 14px;
- position: absolute;
- top: 50%;
- left: 50%;
- width: 300px;
- height: 100px;
- margin-top: -75px;
- margin-left: -158px;
- text-align: center;
- display: none;
-}
diff --git a/css/dark-snake.css b/css/dark-snake.css
deleted file mode 100644
index ab8728d4..00000000
--- a/css/dark-snake.css
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
-JavaScript Snake
-By Patrick Gillespie
-http://patorjk.com/games/snake
-*/
-
-body {
- margin:0px;
- padding:0px;
- background-color:#3E2E44;
-}
-
-.snake-toolbar {
- color: #938996;
-}
-
-#game-area {
- margin:10px;
- padding:0px;
-}
-
-#game-area:focus { outline: none; }
-
-#mode-wrapper {
- font-family: Verdana, arial, helvetica, sans-serif;
- font-size: 14px;
- color: #938996;
-}
-
-a.snake-link, a.snake-link:link, a.snake-link:visited {
- color: #938996;
-}
-
-a.snake-link:hover {
- color: #938996;
-}
-
-.snake-pause-screen {
- font-family: Verdana, arial, helvetica, sans-serif;
- font-size: 14px;
- position:absolute;
- width:300px;
- height:80px;
- text-align:center;
- top:50%;
- left:50%;
- margin-top:-40px;
- margin-left:-150px;
- display:none;
- background-color:#3E2E44;
- color: #938996;
-}
-
-.snake-panel-component {
- position: absolute;
- font-family: Verdana, arial, helvetica, sans-serif;
- font-size: 14px;
- color: #938996;
- text-align: center;
- background-color: #3E2E44;
- padding: 8px;
- margin: 0px;
-}
-
-.snake-snakebody-block {
- margin: 0px;
- padding: 0px;
- background-color: #3E2E44;
- position: absolute;
- border: 0px solid black;
- background-repeat: no-repeat;
-}
-
-.snake-snakebody-alive {
- background-image: url('./images/dark-snakeblock.png');
-}
-.snake-snakebody-dead {
- background-image: url('./images/dead-dark-snakeblock.png');
-}
-
-.snake-food-block {
- margin: 0px;
- padding: 0px;
- background-color: black;
- border: 2px solid #3E2E44;
- position: absolute;
-}
-
-.snake-playing-field {
- margin: 0px;
- padding: 0px;
- position: absolute;
- background-color: #312E44;
- border: 3px solid black;
-}
-
-.snake-game-container {
- margin: 0px;
- padding: 0px;
- border-width: 0px;
- border-style: none;
- zoom: 1;
- background-color: #3E2E44;
- position: relative;
-}
-
-.snake-welcome-dialog {
- padding: 8px;
- margin: 0px;
- background-color: black;
- color: #938996;
- font-family: Verdana, arial, helvetica, sans-serif;
- font-size: 14px;
- position: absolute;
- top: 50%;
- left: 50%;
- width: 300px;
- /*height: 150px;*/
- margin-top: -100px;
- margin-left: -158px;
- text-align: center;
- display: block;
-}
-
-.snake-try-again-dialog, .snake-win-dialog {
- padding: 8px;
- margin: 0px;
- background-color: black;
- color: #938996;
- font-family: Verdana, arial, helvetica, sans-serif;
- font-size: 14px;
- position: absolute;
- top: 50%;
- left: 50%;
- width: 300px;
- height: 100px;
- margin-top: -75px;
- margin-left: -158px;
- text-align: center;
- display: none;
-}
diff --git a/css/green-snake.css b/css/green-snake.css
deleted file mode 100644
index 17a347a3..00000000
--- a/css/green-snake.css
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
-JavaScript Snake
-By Patrick Gillespie
-http://patorjk.com/games/snake
-*/
-body {
- margin:0px;
- padding:0px;
- background-color: darkgreen;
-}
-
-.snake-toolbar {
- background-color: rgba(255,255,255,0.4);
- border-radius: 10px;
-}
-
-#game-area {
- margin:10px;
- padding:0px;
- background-color: lightgreen;
-}
-
-#mode-wrapper {
- color: #ffffff;
- font-family: Verdana, arial, helvetica, sans-serif;
- font-size: 14px;
-
-}
-
-#game-area:focus { outline: none; }
-
-a.snake-link, a.snake-link:link, a.snake-link:visited {
- color: black;
-}
-
-a.snake-link:hover {
- color: #FfFf54;
-}
-
-.snake-pause-screen {
- font-family: Verdana, arial, helvetica, sans-serif;
- font-size: 14px;
- position:absolute;
- width:300px;
- height:80px;
- text-align:center;
- top:50%;
- left:50%;
- margin-top:-40px;
- margin-left:-150px;
- display:none;
- background-color:black;
- color:white;
-}
-
-.snake-panel-component {
- position: absolute;
- font-family: Verdana, arial, helvetica, sans-serif;
- font-size: 14px;
- color: black;
- text-align: center;
- background-color: white;
- padding: 8px;
- margin: 0px;
-}
-
-.snake-snakebody-block {
- margin: 0px;
- padding: 0px;
- background-color: #FF0000;
- position: absolute;
- border: 0px solid #000080;
- background-repeat: no-repeat;
-}
-
-.snake-snakebody-alive {
- background-image: url('./images/snakeblock.png');
-}
-.snake-snakebody-dead {
- background-image: url('./images/deadblock.png');
-}
-
-.snake-food-block {
- margin: 0px;
- padding: 0px;
- background-color: black;
- border: 0px solid #000080;
- position: absolute;
-}
-
-.snake-playing-field {
- margin: 0px;
- padding: 0px;
- position: absolute;
- background-color: white;
- border: 0px solid #0000A8;
-}
-
-.snake-game-container {
- margin: 0px;
- padding: 0px;
- border-width: 0px;
- border-style: none;
- zoom: 1;
- background-color: #FC5454;
- position: relative;
-}
-
-.snake-welcome-dialog {
- padding: 8px;
- margin: 0px;
- background-color: #000000;
- color: #ffffff;
- font-family: Verdana, arial, helvetica, sans-serif;
- font-size: 14px;
- position: absolute;
- top: 50%;
- left: 50%;
- width: 300px;
- /*height: 150px;*/
- margin-top: -100px;
- margin-left: -158px;
- text-align: center;
- display: block;
-}
-
-.snake-try-again-dialog, .snake-win-dialog {
- padding: 8px;
- margin: 0px;
- background-color: #000000;
- color: #ffffff;
- font-family: Verdana, arial, helvetica, sans-serif;
- font-size: 14px;
- position: absolute;
- top: 50%;
- left: 50%;
- width: 300px;
- height: 100px;
- margin-top: -75px;
- margin-left: -158px;
- text-align: center;
- display: none;
-}
diff --git a/css/light-snake.css b/css/light-snake.css
deleted file mode 100644
index 069cbd88..00000000
--- a/css/light-snake.css
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
-JavaScript Snake
-By Patrick Gillespie
-http://patorjk.com/games/snake
-*/
-
-body {
- margin: 0px;
- padding: 0px;
- background-color: #f73378;
-}
-#game-area {
- margin: 10px;
- padding: 0px;
-}
-
-#mode-wrapper {
- color: #ffffff;
- font-family: Verdana, arial, helvetica, sans-serif;
- font-size: 14px;
-}
-#game-area:focus {
- outline: none;
-}
-a.snake-link, a.snake-link:link, a.snake-link:visited {
- color: #FCFC54;
-}
-a.snake-link:hover {
- color: #FfFf54;
-}
-.snake-pause-screen {
- font-family: Verdana, arial, helvetica, sans-serif;
- font-size: 14px;
- position: absolute;
- width: 300px;
- height: 80px;
- text-align: center;
- top: 50%;
- left: 50%;
- margin-top: -40px;
- margin-left: -150px;
- display: none;
- background-color: black;
- color: white;
-}
-.snake-panel-component {
- position: absolute;
- font-family: Verdana, arial, helvetica, sans-serif;
- font-size: 14px;
- color: #ffffff;
- text-align: center;
- padding: 8px;
- margin: 0px;
-}
-.snake-snakebody-block {
- margin: 0px;
- padding: 0px;
- background-color: #FF0000;
- position: absolute;
- border: 0px solid #000080;
- background-repeat: no-repeat;
-}
-.snake-snakebody-alive {
- background-image: url('./images/snakeblock.png');
-}
-.snake-snakebody-dead {
- background-image: url('./images/deadblock.png');
-}
-.snake-food-block {
- margin: 0px;
- padding: 0px;
- background-color: #6cfd6a;
- border: 0px solid #000080;
- position: absolute;
-}
-.snake-playing-field {
- margin: 0px;
- padding: 0px;
- position: absolute;
- background-color: #ab003c;
- border: 0px solid #ab003c;
-}
-.snake-game-container {
- margin: 0px;
- padding: 0px;
- border-width: 0px;
- border-style: none;
- zoom: 1;
- position: relative;
-}
-.snake-welcome-dialog {
- padding: 8px;
- margin: 0px;
- background-color: #000000;
- color: #ffffff;
- font-family: Verdana, arial, helvetica, sans-serif;
- font-size: 14px;
- position: absolute;
- top: 50%;
- left: 50%;
- width: 300px;
- /*height: 150px;*/
- margin-top: -100px;
- margin-left: -158px;
- text-align: center;
- display: block;
-}
-.snake-try-again-dialog, .snake-win-dialog {
- padding: 8px;
- margin: 0px;
- background-color: #000000;
- color: #ffffff;
- font-family: Verdana, arial, helvetica, sans-serif;
- font-size: 14px;
- position: absolute;
- top: 50%;
- left: 50%;
- width: 300px;
- height: 100px;
- margin-top: -75px;
- margin-left: -158px;
- text-align: center;
- display: none;
-}
diff --git a/css/main-snake.css b/css/main-snake.css
deleted file mode 100755
index 82a05adb..00000000
--- a/css/main-snake.css
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
-JavaScript Snake
-By Patrick Gillespie
-http://patorjk.com/games/snake
-*/
-body {
- margin:0px;
- padding:0px;
- background-color: #FC5454;
-}
-
-#game-area {
- margin:10px;
- padding:0px;
-}
-
-#mode-wrapper {
- color: #ffffff;
- font-family: Verdana, arial, helvetica, sans-serif;
- font-size: 14px;
-
-}
-
-#game-area:focus { outline: none; }
-
-a.snake-link, a.snake-link:link, a.snake-link:visited {
- color: #FCFC54;
-}
-
-a.snake-link:hover {
- color: #FfFf54;
-}
-
-.snake-pause-screen {
- font-family: Verdana, arial, helvetica, sans-serif;
- font-size: 14px;
- position:absolute;
- width:300px;
- height:80px;
- text-align:center;
- top:50%;
- left:50%;
- margin-top:-40px;
- margin-left:-150px;
- display:none;
- background-color:black;
- color:white;
-}
-
-.snake-panel-component {
- position: absolute;
- font-family: Verdana, arial, helvetica, sans-serif;
- font-size: 14px;
- color: #ffffff;
- text-align: center;
- padding: 8px;
- margin: 0px;
-}
-
-.snake-snakebody-block {
- margin: 0px;
- padding: 0px;
- background-color: #FF0000;
- position: absolute;
- border: 0px solid #000080;
- background-repeat: no-repeat;
-}
-
-.snake-snakebody-alive {
- background-image: url('./css/images/snakeblock.png'), url('./images/snakeblock.png');
-}
-.snake-snakebody-dead {
- background-image: url('./css/images/deadblock.png'), url('./images/deadblock.png');
-}
-
-.snake-food-block {
- margin: 0px;
- padding: 0px;
- background-color: #FF0000;
- border: 0px solid #000080;
- position: absolute;
-}
-
-.snake-playing-field {
- margin: 0px;
- padding: 0px;
- position: absolute;
- background-color: #0000A8;
- border: 0px solid #0000A8;
-}
-
-.snake-game-container {
- margin: 0px;
- padding: 0px;
- border-width: 0px;
- border-style: none;
- zoom: 1;
- position: relative;
-}
-
-.snake-welcome-dialog {
- padding: 8px;
- margin: 0px;
- background-color: #000000;
- color: #ffffff;
- font-family: Verdana, arial, helvetica, sans-serif;
- font-size: 14px;
- position: absolute;
- top: 50%;
- left: 50%;
- width: 300px;
- /*height: 150px;*/
- margin-top: -100px;
- margin-left: -158px;
- text-align: center;
- display: block;
-}
-
-.snake-try-again-dialog, .snake-win-dialog {
- padding: 8px;
- margin: 0px;
- background-color: #000000;
- color: #ffffff;
- font-family: Verdana, arial, helvetica, sans-serif;
- font-size: 14px;
- position: absolute;
- top: 50%;
- left: 50%;
- width: 300px;
- height: 100px;
- margin-top: -75px;
- margin-left: -158px;
- text-align: center;
- display: none;
-}
diff --git a/css/matrix-snake.css b/css/matrix-snake.css
deleted file mode 100644
index 5c8c79ce..00000000
--- a/css/matrix-snake.css
+++ /dev/null
@@ -1,134 +0,0 @@
-body {
-margin:0px;
-padding:0px;
-background-color: #00ff11;
-}
-
-#game-area {
-margin:10px;
-padding:0px;
-background-color: #00ff11;
-}
-
-#mode-wrapper {
-color: #000000;
-font-family: Verdana, arial, helvetica, sans-serif;
-font-size: 14px;
-
-}
-
-#game-area:focus { outline: none; }
-
-a.snake-link, a.snake-link:link, a.snake-link:visited {
-color: #FCFC54;
-}
-
-a.snake-link:hover {
-color: #FfFf54;
-}
-
-.snake-pause-screen {
-font-family: Verdana, arial, helvetica, sans-serif;
-font-size: 14px;
-position:absolute;
-width:300px;
-height:80px;
-text-align:center;
-top:50%;
-left:50%;
-margin-top:-40px;
-margin-left:-150px;
-display:none;
-background-color:black;
-color:white;
-}
-
-.snake-panel-component {
-position: absolute;
-font-family: Verdana, arial, helvetica, sans-serif;
-font-size: 14px;
-color: #000000;
-text-align: center;
-background-color: #00ff11;
-padding: 8px;
-margin: 0px;
-}
-
-.snake-snakebody-block {
-margin: 0px;
-padding: 0px;
-background-color: #FF0000;
-position: absolute;
-border: 0px solid #000080;
-background-repeat: no-repeat;
-}
-
-.snake-snakebody-alive {
-background-image: url('./images/matrix-snake-block.png');
-}
-.snake-snakebody-dead {
-background-image: url('./images/deadblock.png');
-}
-
-.snake-food-block {
-margin: 0px;
-padding: 0px;
-background-color: #FF0000;
-border: 0px solid #000080;
-position: absolute;
-background-image: url("./images/matrix-food-block.png")
-}
-
-.snake-playing-field {
-margin: 0px;
-padding: 0px;
-position: absolute;
-background-color: #000000;
-border: 0px solid #000000;
-}
-
-.snake-game-container {
-margin: 0px;
-padding: 0px;
-border-width: 0px;
-border-style: none;
-zoom: 1;
-background-color: #00ff11;
-position: relative;
-}
-
-.snake-welcome-dialog {
-padding: 8px;
-margin: 0px;
-background-color: #000000;
-color: #00ff11;
-font-family: Verdana, arial, helvetica, sans-serif;
-font-size: 14px;
-position: absolute;
-top: 50%;
-left: 50%;
-width: 300px;
-/height: 150px;/
-margin-top: -100px;
-margin-left: -158px;
-text-align: center;
-display: block;
-}
-
-.snake-try-again-dialog, .snake-win-dialog {
-padding: 8px;
-margin: 0px;
-background-color: #000000;
-color: #ff0000;
-font-family: Verdana, arial, helvetica, sans-serif;
-font-size: 14px;
-position: absolute;
-top: 50%;
-left: 50%;
-width: 300px;
-height: 100px;
-margin-top: -75px;
-margin-left: -158px;
-text-align: center;
-display: none;
-}
\ No newline at end of file
diff --git a/css/teal-snake.css b/css/teal-snake.css
deleted file mode 100644
index f3ad07d1..00000000
--- a/css/teal-snake.css
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
-JavaScript Snake
-By Patrick Gillespie
-http://patorjk.com/games/snake
-*/
-@import url('https://fonts.googleapis.com/css2?family=Electrolize&display=swap');
-
-
-body {
- margin:0px;
- padding:0px;
- background-color:teal;
-}
-
-.snake-toolbar {
- font-family: Electrolize;
- color: white;
-}
-
-#game-area {
- margin:10px;
- padding:0px;
-}
-
-#game-area:focus { outline: none; }
-
-#mode-wrapper {
- font-family: Electrolize;
- font-size: 14px;
- color: whitesmoke;
-}
-
-a.snake-link, a.snake-link:link, a.snake-link:visited {
- color: white;
-}
-
-a.snake-link:hover {
- color: white;
-}
-
-.snake-pause-screen {
- font-family: Electrolize;
- font-size: 16px;
- position:absolute;
- width:300px;
- height:80px;
- text-align:center;
- top:50%;
- left:50%;
- margin-top:-40px;
- margin-left:-150px;
- display:none;
- background-color:#3E2E44;
- color: whitesmoke;
-}
-
-.snake-panel-component {
- position: absolute;
- font-family: Electrolize;
- font-size: 16px;
- color: #938996;
- text-align: center;
- background-color: #3E2E44;
- padding: 8px;
- margin: 0px;
-}
-
-.snake-snakebody-block {
- margin: 0px;
- padding: 0px;
- background-color: orange;
- position: absolute;
- border: 0px solid black;
- background-repeat: no-repeat;
-}
-
-.snake-snakebody-alive {
- background-image: url('./images/snakeblock.png');
-}
-.snake-snakebody-dead {
- background-image: url('./images/dead-dark-snakeblock.png');
-}
-
-.snake-food-block {
- margin: 0px;
- padding: 0px;
- background-color: red;
- border: 2px solid black;
- position: absolute;
-}
-
-.snake-playing-field {
- margin: 0px;
- padding: 0px;
- position: absolute;
- background-color: rgb(0, 180, 180);
- border: 3px solid black;
-}
-
-.snake-game-container {
- margin: 0px;
- padding: 0px;
- border-width: 0px;
- border-style: none;
- zoom: 1;
- background-color: #3E2E44;
- position: relative;
-}
-
-.snake-welcome-dialog {
- padding: 8px;
- margin: 0px;
- background-color: black;
- color: whitesmoke;
- font-family: Electrolize;
- font-size: 14px;
- position: absolute;
- top: 50%;
- left: 50%;
- width: 300px;
- /*height: 150px;*/
- margin-top: -100px;
- margin-left: -158px;
- text-align: center;
- display: block;
-}
-
-.snake-try-again-dialog, .snake-win-dialog {
- padding: 8px;
- margin: 0px;
- background-color: black;
- color: whitesmoke;
- font-family: Electrolize;
- font-size: 16px;
- position: absolute;
- top: 50%;
- left: 50%;
- width: 300px;
- height: 100px;
- margin-top: -75px;
- margin-left: -158px;
- text-align: center;
- display: none;
-}
diff --git a/index.html b/index.html
deleted file mode 100755
index 94589039..00000000
--- a/index.html
+++ /dev/null
@@ -1,141 +0,0 @@
-
-
-
-
-
- JavaScript Snake
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/js/init.js b/js/init.js
deleted file mode 100644
index a72cb2b8..00000000
--- a/js/init.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var mySnakeBoard = new SNAKE.Board({
- boardContainer: "game-area",
- fullScreen: true
-});
diff --git a/js/snake.js b/js/snake.js
deleted file mode 100644
index a78dc5a9..00000000
--- a/js/snake.js
+++ /dev/null
@@ -1,1080 +0,0 @@
-/*
-JavaScript Snake
-First version by Patrick Gillespie - I've since merged in a good number of github pull requests
-http://patorjk.com/games/snake
-*/
-
-/**
-* @module Snake
-* @class SNAKE
-*/
-
-var SNAKE = SNAKE || {};
-window.SNAKE = SNAKE; // this will allow us to access the game in other JS files when the app is loaded up in a codesandbox.com sandbox, that's the only reason it's here
-
-/**
-* @method addEventListener
-* @param {Object} obj The object to add an event listener to.
-* @param {String} event The event to listen for.
-* @param {Function} funct The function to execute when the event is triggered.
-* @param {Boolean} evtCapturing True to do event capturing, false to do event bubbling.
-*/
-SNAKE.addEventListener = (function() {
- if (window.addEventListener) {
- return function(obj, event, funct, evtCapturing) {
- obj.addEventListener(event, funct, evtCapturing);
- };
- } else if (window.attachEvent) {
- return function(obj, event, funct) {
- obj.attachEvent("on" + event, funct);
- };
- }
-})();
-
-/**
-* @method removeEventListener
-* @param {Object} obj The object to remove an event listener from.
-* @param {String} event The event that was listened for.
-* @param {Function} funct The function that was executed when the event is triggered.
-* @param {Boolean} evtCapturing True if event capturing was done, false otherwise.
-*/
-
-SNAKE.removeEventListener = (function() {
- if (window.removeEventListener) {
- return function(obj, event, funct, evtCapturing) {
- obj.removeEventListener(event, funct, evtCapturing);
- };
- } else if (window.detachEvent) {
- return function(obj, event, funct) {
- obj.detachEvent("on" + event, funct);
- };
- }
-})();
-
-/**
-* This class manages the snake which will reside inside of a SNAKE.Board object.
-* @class Snake
-* @constructor
-* @namespace SNAKE
-* @param {Object} config The configuration object for the class. Contains playingBoard (the SNAKE.Board that this snake resides in), startRow and startCol.
-*/
-SNAKE.Snake = SNAKE.Snake || (function() {
-
- // -------------------------------------------------------------------------
- // Private static variables and methods
- // -------------------------------------------------------------------------
-
- var instanceNumber = 0;
- var blockPool = [];
-
- var SnakeBlock = function() {
- this.elm = null;
- this.elmStyle = null;
- this.row = -1;
- this.col = -1;
- this.xPos = -1000;
- this.yPos = -1000;
- this.next = null;
- this.prev = null;
- };
-
- // this function is adapted from the example at http://greengeckodesign.com/blog/2007/07/get-highest-z-index-in-javascript.html
- function getNextHighestZIndex(myObj) {
- var highestIndex = 0,
- currentIndex = 0,
- ii;
- for (ii in myObj) {
- if (myObj[ii].elm.currentStyle){
- currentIndex = parseFloat(myObj[ii].elm.style["z-index"],10);
- }else if(window.getComputedStyle) {
- currentIndex = parseFloat(document.defaultView.getComputedStyle(myObj[ii].elm,null).getPropertyValue("z-index"),10);
- }
- if(!isNaN(currentIndex) && currentIndex > highestIndex){
- highestIndex = currentIndex;
- }
- }
- return(highestIndex+1);
- }
-
- // -------------------------------------------------------------------------
- // Contructor + public and private definitions
- // -------------------------------------------------------------------------
-
- /*
- config options:
- playingBoard - the SnakeBoard that this snake belongs too.
- startRow - The row the snake should start on.
- startCol - The column the snake should start on.
- */
- return function(config) {
-
- if (!config||!config.playingBoard) {return;}
- if (localStorage.jsSnakeHighScore === undefined) localStorage.setItem('jsSnakeHighScore', 0);
-
- // ----- private variables -----
-
- var me = this,
- playingBoard = config.playingBoard,
- myId = instanceNumber++,
- growthIncr = 5,
- lastMove = 1,
- preMove = -1,
- isFirstMove = true,
- isFirstGameMove = true,
- currentDirection = -1, // 0: up, 1: left, 2: down, 3: right
- columnShift = [0, 1, 0, -1],
- rowShift = [-1, 0, 1, 0],
- xPosShift = [],
- yPosShift = [],
- snakeSpeed = 80,
- isDead = false,
- isPaused = false;
-
- function setModeListener (mode, speed) {
- document.getElementById(mode).addEventListener('click', function () { snakeSpeed = speed; });
- }
-
- var modeDropdown = document.getElementById('selectMode');
- if ( modeDropdown ) {
- modeDropdown.addEventListener('change', function(evt) {
- evt = evt || {};
- var val = evt.target ? parseInt(evt.target.value) : 75;
-
- if (isNaN(val)) {
- val = 75;
- } else if (val < 50) {
- val = 75
- }
-
- snakeSpeed = val;
-
- setTimeout(function() {
- document.getElementById('game-area').focus();
- }, 10);
- });
- }
-
- //setModeListener('Easy', 100);
- //setModeListener('Medium', 75);
- //setModeListener('Difficult', 50);
-
- // ----- public variables -----
- me.snakeBody = {};
- me.snakeBody["b0"] = new SnakeBlock(); // create snake head
- me.snakeBody["b0"].row = config.startRow || 1;
- me.snakeBody["b0"].col = config.startCol || 1;
- me.snakeBody["b0"].xPos = me.snakeBody["b0"].row * playingBoard.getBlockWidth();
- me.snakeBody["b0"].yPos = me.snakeBody["b0"].col * playingBoard.getBlockHeight();
- me.snakeBody["b0"].elm = createSnakeElement();
- me.snakeBody["b0"].elmStyle = me.snakeBody["b0"].elm.style;
- playingBoard.getBoardContainer().appendChild( me.snakeBody["b0"].elm );
- me.snakeBody["b0"].elm.style.left = me.snakeBody["b0"].xPos + "px";
- me.snakeBody["b0"].elm.style.top = me.snakeBody["b0"].yPos + "px";
- me.snakeBody["b0"].next = me.snakeBody["b0"];
- me.snakeBody["b0"].prev = me.snakeBody["b0"];
-
- me.snakeLength = 1;
- me.snakeHead = me.snakeBody["b0"];
- me.snakeTail = me.snakeBody["b0"];
- me.snakeHead.elm.className = me.snakeHead.elm.className.replace(/\bsnake-snakebody-dead\b/,'');
- me.snakeHead.elm.className += " snake-snakebody-alive";
-
- // ----- private methods -----
-
- function createSnakeElement() {
- var tempNode = document.createElement("div");
- tempNode.className = "snake-snakebody-block";
- tempNode.style.left = "-1000px";
- tempNode.style.top = "-1000px";
- tempNode.style.width = playingBoard.getBlockWidth() + "px";
- tempNode.style.height = playingBoard.getBlockHeight() + "px";
- return tempNode;
- }
-
- function createBlocks(num) {
- var tempBlock;
- var tempNode = createSnakeElement();
-
- for (var ii = 1; ii < num; ii++){
- tempBlock = new SnakeBlock();
- tempBlock.elm = tempNode.cloneNode(true);
- tempBlock.elmStyle = tempBlock.elm.style;
- playingBoard.getBoardContainer().appendChild( tempBlock.elm );
- blockPool[blockPool.length] = tempBlock;
- }
-
- tempBlock = new SnakeBlock();
- tempBlock.elm = tempNode;
- playingBoard.getBoardContainer().appendChild( tempBlock.elm );
- blockPool[blockPool.length] = tempBlock;
- }
-
- function recordScore() {
- var highScore = localStorage.jsSnakeHighScore;
- if (me.snakeLength > highScore) {
- alert('Congratulations! You have beaten your previous high score, which was ' + highScore + '.');
- localStorage.setItem('jsSnakeHighScore', me.snakeLength);
- }
- }
-
- function handleEndCondition(handleFunc) {
- recordScore();
- me.snakeHead.elm.style.zIndex = getNextHighestZIndex(me.snakeBody);
- me.snakeHead.elm.className = me.snakeHead.elm.className.replace(/\bsnake-snakebody-alive\b/, '')
- me.snakeHead.elm.className += " snake-snakebody-dead";
-
- isDead = true;
- handleFunc();
- }
-
- // ----- public methods -----
-
- me.setPaused = function(val) {
- isPaused = val;
- };
- me.getPaused = function() {
- return isPaused;
- };
-
- /**
- * This method is called when a user presses a key. It logs arrow key presses in "currentDirection", which is used when the snake needs to make its next move.
- * @method handleArrowKeys
- * @param {Number} keyNum A number representing the key that was pressed.
- */
- /*
- Handles what happens when an arrow key is pressed.
- Direction explained (0 = up, etc etc)
- 0
- 3 1
- 2
- */
- me.handleArrowKeys = function(keyNum) {
- if (isDead || isPaused) {return;}
-
- var snakeLength = me.snakeLength;
-
- //console.log("lastmove="+lastMove);
- //console.log("dir="+keyNum);
-
- let directionFound = -1;
-
- switch (keyNum) {
- case 37:
- case 65:
- directionFound = 3;
- break;
- case 38:
- case 87:
- directionFound = 0;
- break;
- case 39:
- case 68:
- directionFound = 1;
- break;
- case 40:
- case 83:
- directionFound = 2;
- break;
- }
- if (currentDirection !== lastMove) // Allow a queue of 1 premove so you can turn again before the first turn registers
- {
- preMove = directionFound;
- }
- if (Math.abs(directionFound - lastMove) !== 2 && isFirstMove || isFirstGameMove) // Prevent snake from turning 180 degrees
- {
- currentDirection = directionFound;
- isFirstMove = false;
- isFirstGameMove = false;
- }
- };
-
- /**
- * This method is executed for each move of the snake. It determines where the snake will go and what will happen to it. This method needs to run quickly.
- * @method go
- */
- me.go = function() {
-
- var oldHead = me.snakeHead,
- newHead = me.snakeTail,
- grid = playingBoard.grid; // cache grid for quicker lookup
-
- if (isPaused === true) {
- setTimeout(function(){me.go();}, snakeSpeed);
- return;
- }
-
- me.snakeTail = newHead.prev;
- me.snakeHead = newHead;
-
- // clear the old board position
- if ( grid[newHead.row] && grid[newHead.row][newHead.col] ) {
- grid[newHead.row][newHead.col] = 0;
- }
-
- if (currentDirection !== -1){
- lastMove = currentDirection;
- if (preMove !== -1) // If the user queued up another move after the current one
- {
- currentDirection = preMove; // Execute that move next time (unless overwritten)
- preMove = -1;
- }
- }
- isFirstMove = true;
-
- newHead.col = oldHead.col + columnShift[lastMove];
- newHead.row = oldHead.row + rowShift[lastMove];
- newHead.xPos = oldHead.xPos + xPosShift[lastMove];
- newHead.yPos = oldHead.yPos + yPosShift[lastMove];
-
- if ( !newHead.elmStyle ) {
- newHead.elmStyle = newHead.elm.style;
- }
-
- newHead.elmStyle.left = newHead.xPos + "px";
- newHead.elmStyle.top = newHead.yPos + "px";
-
- // check the new spot the snake moved into
-
- if (grid[newHead.row][newHead.col] === 0) {
- grid[newHead.row][newHead.col] = 1;
- setTimeout(function(){me.go();}, snakeSpeed);
- } else if (grid[newHead.row][newHead.col] > 0) {
- me.handleDeath();
- } else if (grid[newHead.row][newHead.col] === playingBoard.getGridFoodValue()) {
- grid[newHead.row][newHead.col] = 1;
- if (!me.eatFood()) {
- me.handleWin();
- return;
- }
- setTimeout(function(){me.go();}, snakeSpeed);
- }
- };
-
- /**
- * This method is called when it is determined that the snake has eaten some food.
- * @method eatFood
- * @return {bool} Whether a new food was able to spawn (true)
- * or not (false) after the snake eats food.
- */
- me.eatFood = function() {
- if (blockPool.length <= growthIncr) {
- createBlocks(growthIncr*2);
- }
- var blocks = blockPool.splice(0, growthIncr);
-
- var ii = blocks.length,
- index,
- prevNode = me.snakeTail;
- while (ii--) {
- index = "b" + me.snakeLength++;
- me.snakeBody[index] = blocks[ii];
- me.snakeBody[index].prev = prevNode;
- me.snakeBody[index].elm.className = me.snakeHead.elm.className.replace(/\bsnake-snakebody-dead\b/,'')
- me.snakeBody[index].elm.className += " snake-snakebody-alive";
- prevNode.next = me.snakeBody[index];
- prevNode = me.snakeBody[index];
- }
- me.snakeTail = me.snakeBody[index];
- me.snakeTail.next = me.snakeHead;
- me.snakeHead.prev = me.snakeTail;
-
- if (!playingBoard.foodEaten()) {
- return false;
- }
-
- return true;
- };
-
- /**
- * This method handles what happens when the snake dies.
- * @method handleDeath
- */
- me.handleDeath = function() {
- handleEndCondition(playingBoard.handleDeath);
- };
-
- /**
- * This method handles what happens when the snake wins.
- * @method handleDeath
- */
- me.handleWin = function() {
- handleEndCondition(playingBoard.handleWin);
- };
-
- /**
- * This method sets a flag that lets the snake be alive again.
- * @method rebirth
- */
- me.rebirth = function() {
- isDead = false;
- isFirstMove = true;
- isFirstGameMove = true;
- preMove = -1;
- };
-
- /**
- * This method reset the snake so it is ready for a new game.
- * @method reset
- */
- me.reset = function() {
- if (isDead === false) {return;}
-
- var blocks = [],
- curNode = me.snakeHead.next,
- nextNode;
- while (curNode !== me.snakeHead) {
- nextNode = curNode.next;
- curNode.prev = null;
- curNode.next = null;
- blocks.push(curNode);
- curNode = nextNode;
- }
- me.snakeHead.next = me.snakeHead;
- me.snakeHead.prev = me.snakeHead;
- me.snakeTail = me.snakeHead;
- me.snakeLength = 1;
-
- for (var ii = 0; ii < blocks.length; ii++) {
- blocks[ii].elm.style.left = "-1000px";
- blocks[ii].elm.style.top = "-1000px";
- blocks[ii].elm.className = me.snakeHead.elm.className.replace(/\bsnake-snakebody-dead\b/,'')
- blocks[ii].elm.className += " snake-snakebody-alive";
- }
-
- blockPool.concat(blocks);
- me.snakeHead.elm.className = me.snakeHead.elm.className.replace(/\bsnake-snakebody-dead\b/,'')
- me.snakeHead.elm.className += " snake-snakebody-alive";
- me.snakeHead.row = config.startRow || 1;
- me.snakeHead.col = config.startCol || 1;
- me.snakeHead.xPos = me.snakeHead.row * playingBoard.getBlockWidth();
- me.snakeHead.yPos = me.snakeHead.col * playingBoard.getBlockHeight();
- me.snakeHead.elm.style.left = me.snakeHead.xPos + "px";
- me.snakeHead.elm.style.top = me.snakeHead.yPos + "px";
- };
-
- // ---------------------------------------------------------------------
- // Initialize
- // ---------------------------------------------------------------------
- createBlocks(growthIncr*2);
- xPosShift[0] = 0;
- xPosShift[1] = playingBoard.getBlockWidth();
- xPosShift[2] = 0;
- xPosShift[3] = -1 * playingBoard.getBlockWidth();
-
- yPosShift[0] = -1 * playingBoard.getBlockHeight();
- yPosShift[1] = 0;
- yPosShift[2] = playingBoard.getBlockHeight();
- yPosShift[3] = 0;
- };
-})();
-
-/**
-* This class manages the food which the snake will eat.
-* @class Food
-* @constructor
-* @namespace SNAKE
-* @param {Object} config The configuration object for the class. Contains playingBoard (the SNAKE.Board that this food resides in).
-*/
-
-SNAKE.Food = SNAKE.Food || (function() {
-
- // -------------------------------------------------------------------------
- // Private static variables and methods
- // -------------------------------------------------------------------------
-
- var instanceNumber = 0;
-
- function getRandomPosition(x, y){
- return Math.floor(Math.random()*(y+1-x)) + x;
- }
-
- // -------------------------------------------------------------------------
- // Contructor + public and private definitions
- // -------------------------------------------------------------------------
-
- /*
- config options:
- playingBoard - the SnakeBoard that this object belongs too.
- */
- return function(config) {
-
- if (!config||!config.playingBoard) {return;}
-
- // ----- private variables -----
-
- var me = this;
- var playingBoard = config.playingBoard;
- var fRow, fColumn;
- var myId = instanceNumber++;
-
- var elmFood = document.createElement("div");
- elmFood.setAttribute("id", "snake-food-"+myId);
- elmFood.className = "snake-food-block";
- elmFood.style.width = playingBoard.getBlockWidth() + "px";
- elmFood.style.height = playingBoard.getBlockHeight() + "px";
- elmFood.style.left = "-1000px";
- elmFood.style.top = "-1000px";
- playingBoard.getBoardContainer().appendChild(elmFood);
-
- // ----- public methods -----
-
- /**
- * @method getFoodElement
- * @return {DOM Element} The div the represents the food.
- */
- me.getFoodElement = function() {
- return elmFood;
- };
-
- /**
- * Randomly places the food onto an available location on the playing board.
- * @method randomlyPlaceFood
- * @return {bool} Whether a food was able to spawn (true) or not (false).
- */
- me.randomlyPlaceFood = function() {
- // if there exist some food, clear its presence from the board
- if (playingBoard.grid[fRow] && playingBoard.grid[fRow][fColumn] === playingBoard.getGridFoodValue()){
- playingBoard.grid[fRow][fColumn] = 0;
- }
-
- var row = 0, col = 0, numTries = 0;
-
- var maxRows = playingBoard.grid.length-1;
- var maxCols = playingBoard.grid[0].length-1;
-
- while (playingBoard.grid[row][col] !== 0){
- row = getRandomPosition(1, maxRows);
- col = getRandomPosition(1, maxCols);
-
- // in some cases there may not be any room to put food anywhere
- // instead of freezing, exit out (and return false to indicate
- // that the player beat the game)
- numTries++;
- if (numTries > 20000){
- return false;
- }
- }
-
- playingBoard.grid[row][col] = playingBoard.getGridFoodValue();
- fRow = row;
- fColumn = col;
- elmFood.style.top = row * playingBoard.getBlockHeight() + "px";
- elmFood.style.left = col * playingBoard.getBlockWidth() + "px";
- return true;
- };
- };
-})();
-
-/**
-* This class manages playing board for the game.
-* @class Board
-* @constructor
-* @namespace SNAKE
-* @param {Object} config The configuration object for the class. Set fullScreen equal to true if you want the game to take up the full screen, otherwise, set the top, left, width and height parameters.
-*/
-
-SNAKE.Board = SNAKE.Board || (function() {
-
- // -------------------------------------------------------------------------
- // Private static variables and methods
- // -------------------------------------------------------------------------
-
- var instanceNumber = 0;
-
- // this function is adapted from the example at http://greengeckodesign.com/blog/2007/07/get-highest-z-index-in-javascript.html
- function getNextHighestZIndex(myObj) {
- var highestIndex = 0,
- currentIndex = 0,
- ii;
- for (ii in myObj) {
- if (myObj[ii].elm.currentStyle){
- currentIndex = parseFloat(myObj[ii].elm.style["z-index"],10);
- }else if(window.getComputedStyle) {
- currentIndex = parseFloat(document.defaultView.getComputedStyle(myObj[ii].elm,null).getPropertyValue("z-index"),10);
- }
- if(!isNaN(currentIndex) && currentIndex > highestIndex){
- highestIndex = currentIndex;
- }
- }
- return(highestIndex+1);
- }
-
- /*
- This function returns the width of the available screen real estate that we have
- */
- function getClientWidth(){
- var myWidth = 0;
- if( typeof window.innerWidth === "number" ) {
- myWidth = window.innerWidth;//Non-IE
- } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
- myWidth = document.documentElement.clientWidth;//IE 6+ in 'standards compliant mode'
- } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
- myWidth = document.body.clientWidth;//IE 4 compatible
- }
- return myWidth;
- }
- /*
- This function returns the height of the available screen real estate that we have
- */
- function getClientHeight(){
- var myHeight = 0;
- if( typeof window.innerHeight === "number" ) {
- myHeight = window.innerHeight;//Non-IE
- } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
- myHeight = document.documentElement.clientHeight;//IE 6+ in 'standards compliant mode'
- } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
- myHeight = document.body.clientHeight;//IE 4 compatible
- }
- return myHeight;
- }
-
- // -------------------------------------------------------------------------
- // Contructor + public and private definitions
- // -------------------------------------------------------------------------
-
- return function(inputConfig) {
-
- // --- private variables ---
- var me = this,
- myId = instanceNumber++,
- config = inputConfig || {},
- MAX_BOARD_COLS = 250,
- MAX_BOARD_ROWS = 250,
- blockWidth = 20,
- blockHeight = 20,
- GRID_FOOD_VALUE = -1, // the value of a spot on the board that represents snake food, MUST BE NEGATIVE
- myFood,
- mySnake,
- boardState = 1, // 0: in active; 1: awaiting game start; 2: playing game
- myKeyListener,
- isPaused = false,//note: both the board and the snake can be paused
- // Board components
- elmContainer, elmPlayingField, elmAboutPanel, elmLengthPanel, elmHighscorePanel, elmWelcome, elmTryAgain, elmWin, elmPauseScreen;
-
- // --- public variables ---
- me.grid = [];
-
- // ---------------------------------------------------------------------
- // private functions
- // ---------------------------------------------------------------------
-
- function createBoardElements() {
- elmPlayingField = document.createElement("div");
- elmPlayingField.setAttribute("id", "playingField");
- elmPlayingField.className = "snake-playing-field";
-
- SNAKE.addEventListener(elmPlayingField, "click", function() {
- elmContainer.focus();
- }, false);
-
- elmPauseScreen = document.createElement("div");
- elmPauseScreen.className = "snake-pause-screen";
- elmPauseScreen.innerHTML = "[Paused]
Press [space] to unpause.
";
-
- elmAboutPanel = document.createElement("div");
- elmAboutPanel.className = "snake-panel-component";
- elmAboutPanel.innerHTML = "more patorjk.com apps - source code - pat's youtube";
-
- elmLengthPanel = document.createElement("div");
- elmLengthPanel.className = "snake-panel-component";
- elmLengthPanel.innerHTML = "Length: 1";
-
- elmHighscorePanel = document.createElement("div");
- elmHighscorePanel.className = "snake-panel-component";
- elmHighscorePanel.innerHTML = "Highscore: " + (localStorage.jsSnakeHighScore || 0);
-
- elmWelcome = createWelcomeElement();
- elmTryAgain = createTryAgainElement();
- elmWin = createWinElement();
-
- SNAKE.addEventListener( elmContainer, "keyup", function(evt) {
- if (!evt) var evt = window.event;
- evt.cancelBubble = true;
- if (evt.stopPropagation) {evt.stopPropagation();}
- if (evt.preventDefault) {evt.preventDefault();}
- return false;
- }, false);
-
- elmContainer.className = "snake-game-container";
-
- elmPauseScreen.style.zIndex = 10000;
- elmContainer.appendChild(elmPauseScreen);
- elmContainer.appendChild(elmPlayingField);
- elmContainer.appendChild(elmAboutPanel);
- elmContainer.appendChild(elmLengthPanel);
- elmContainer.appendChild(elmHighscorePanel);
- elmContainer.appendChild(elmWelcome);
- elmContainer.appendChild(elmTryAgain);
- elmContainer.appendChild(elmWin);
-
- mySnake = new SNAKE.Snake({playingBoard:me,startRow:2,startCol:2});
- myFood = new SNAKE.Food({playingBoard: me});
-
- elmWelcome.style.zIndex = 1000;
- }
- function maxBoardWidth() {
- return MAX_BOARD_COLS * me.getBlockWidth();
- }
- function maxBoardHeight() {
- return MAX_BOARD_ROWS * me.getBlockHeight();
- }
-
- function createWelcomeElement() {
- var tmpElm = document.createElement("div");
- tmpElm.id = "sbWelcome" + myId;
- tmpElm.className = "snake-welcome-dialog";
-
- var welcomeTxt = document.createElement("div");
- var fullScreenText = "";
- if (config.fullScreen) {
- fullScreenText = "On Windows, press F11 to play in Full Screen mode.";
- }
- welcomeTxt.innerHTML = "JavaScript SnakeUse the arrow keys on your keyboard to play the game. " + fullScreenText + "";
- var welcomeStart = document.createElement("button");
- welcomeStart.appendChild(document.createTextNode("Play Game"));
- var loadGame = function() {
- SNAKE.removeEventListener(window, "keyup", kbShortcut, false);
- tmpElm.style.display = "none";
- me.setBoardState(1);
- me.getBoardContainer().focus();
- };
-
- var kbShortcut = function(evt) {
- if (!evt) var evt = window.event;
- var keyNum = (evt.which) ? evt.which : evt.keyCode;
- if (keyNum === 32 || keyNum === 13) {
- loadGame();
- }
- };
- SNAKE.addEventListener(window, "keyup", kbShortcut, false);
- SNAKE.addEventListener(welcomeStart, "click", loadGame, false);
-
- tmpElm.appendChild(welcomeTxt);
- tmpElm.appendChild(welcomeStart);
- return tmpElm;
- }
-
- function createGameEndElement(message, elmId, elmClassName) {
- var tmpElm = document.createElement("div");
- tmpElm.id = elmId + myId;
- tmpElm.className = elmClassName;
-
- var gameEndTxt = document.createElement("div");
- gameEndTxt.innerHTML = "JavaScript Snake" + message + "";
- var gameEndStart = document.createElement("button");
- gameEndStart.appendChild(document.createTextNode("Play Again?"));
-
- var reloadGame = function () {
- tmpElm.style.display = "none";
- me.resetBoard();
- me.setBoardState(1);
- me.getBoardContainer().focus();
- };
-
- var kbGameEndShortcut = function (evt) {
- if (boardState !== 0 || tmpElm.style.display !== "block") { return; }
- if (!evt) var evt = window.event;
- var keyNum = (evt.which) ? evt.which : evt.keyCode;
- if (keyNum === 32 || keyNum === 13) {
- reloadGame();
- }
- };
- SNAKE.addEventListener(window, "keyup", kbGameEndShortcut, true);
-
- SNAKE.addEventListener(gameEndStart, "click", reloadGame, false);
- tmpElm.appendChild(gameEndTxt);
- tmpElm.appendChild(gameEndStart);
- return tmpElm;
- }
-
- function createTryAgainElement() {
- return createGameEndElement("You died :(", "sbTryAgain", "snake-try-again-dialog");
- }
-
- function createWinElement() {
- return createGameEndElement("You win! :D", "sbWin", "snake-win-dialog");
- }
-
- function handleEndCondition(elmDialog) {
- var index = Math.max(getNextHighestZIndex(mySnake.snakeBody), getNextHighestZIndex({ tmp: { elm: myFood.getFoodElement() } }));
- elmContainer.removeChild(elmDialog);
- elmContainer.appendChild(elmDialog);
- elmDialog.style.zIndex = index;
- elmDialog.style.display = "block";
- me.setBoardState(0);
- }
-
- // ---------------------------------------------------------------------
- // public functions
- // ---------------------------------------------------------------------
-
- me.setPaused = function(val) {
- isPaused = val;
- mySnake.setPaused(val);
- if (isPaused) {
- elmPauseScreen.style.display = "block";
- } else {
- elmPauseScreen.style.display = "none";
- }
- };
- me.getPaused = function() {
- return isPaused;
- };
-
- /**
- * Resets the playing board for a new game.
- * @method resetBoard
- */
- me.resetBoard = function() {
- SNAKE.removeEventListener(elmContainer, "keydown", myKeyListener, false);
- mySnake.reset();
- elmLengthPanel.innerHTML = "Length: 1";
- me.setupPlayingField();
- };
- /**
- * Gets the current state of the playing board. There are 3 states: 0 - Welcome or Try Again dialog is present. 1 - User has pressed "Start Game" on the Welcome or Try Again dialog but has not pressed an arrow key to move the snake. 2 - The game is in progress and the snake is moving.
- * @method getBoardState
- * @return {Number} The state of the board.
- */
- me.getBoardState = function() {
- return boardState;
- };
- /**
- * Sets the current state of the playing board. There are 3 states: 0 - Welcome or Try Again dialog is present. 1 - User has pressed "Start Game" on the Welcome or Try Again dialog but has not pressed an arrow key to move the snake. 2 - The game is in progress and the snake is moving.
- * @method setBoardState
- * @param {Number} state The state of the board.
- */
- me.setBoardState = function(state) {
- boardState = state;
- };
- /**
- * @method getGridFoodValue
- * @return {Number} A number that represents food on a number representation of the playing board.
- */
- me.getGridFoodValue = function() {
- return GRID_FOOD_VALUE;
- };
- /**
- * @method getPlayingFieldElement
- * @return {DOM Element} The div representing the playing field (this is where the snake can move).
- */
- me.getPlayingFieldElement = function() {
- return elmPlayingField;
- };
- /**
- * @method setBoardContainer
- * @param {DOM Element or String} myContainer Sets the container element for the game.
- */
- me.setBoardContainer = function(myContainer) {
- if (typeof myContainer === "string") {
- myContainer = document.getElementById(myContainer);
- }
- if (myContainer === elmContainer) {return;}
- elmContainer = myContainer;
- elmPlayingField = null;
-
- me.setupPlayingField();
- };
- /**
- * @method getBoardContainer
- * @return {DOM Element}
- */
- me.getBoardContainer = function() {
- return elmContainer;
- };
- /**
- * @method getBlockWidth
- * @return {Number}
- */
- me.getBlockWidth = function() {
- return blockWidth;
- };
- /**
- * @method getBlockHeight
- * @return {Number}
- */
- me.getBlockHeight = function() {
- return blockHeight;
- };
- /**
- * Sets up the playing field.
- * @method setupPlayingField
- */
- me.setupPlayingField = function () {
-
- if (!elmPlayingField) {createBoardElements();} // create playing field
-
- // calculate width of our game container
- var cWidth, cHeight;
- var cTop, cLeft;
- if (config.fullScreen === true) {
- cTop = 0;
- cLeft = 0;
- cWidth = getClientWidth()-20;
- cHeight = getClientHeight()-20;
-
- } else {
- cTop = config.top;
- cLeft = config.left;
- cWidth = config.width;
- cHeight = config.height;
- }
-
- // define the dimensions of the board and playing field
- var wEdgeSpace = me.getBlockWidth()*2 + (cWidth % me.getBlockWidth());
- var fWidth = Math.min(maxBoardWidth()-wEdgeSpace,cWidth-wEdgeSpace);
- var hEdgeSpace = me.getBlockHeight()*3 + (cHeight % me.getBlockHeight());
- var fHeight = Math.min(maxBoardHeight()-hEdgeSpace,cHeight-hEdgeSpace);
-
- elmContainer.style.left = cLeft + "px";
- elmContainer.style.top = cTop + "px";
- elmContainer.style.width = cWidth + "px";
- elmContainer.style.height = cHeight + "px";
- elmPlayingField.style.left = me.getBlockWidth() + "px";
- elmPlayingField.style.top = me.getBlockHeight() + "px";
- elmPlayingField.style.width = fWidth + "px";
- elmPlayingField.style.height = fHeight + "px";
-
- // the math for this will need to change depending on font size, padding, etc
- // assuming height of 14 (font size) + 8 (padding)
- var bottomPanelHeight = hEdgeSpace - me.getBlockHeight();
- var pLabelTop = me.getBlockHeight() + fHeight + Math.round((bottomPanelHeight - 30)/2) + "px";
-
- elmAboutPanel.style.top = pLabelTop;
- elmAboutPanel.style.width = "450px";
- elmAboutPanel.style.left = Math.round(cWidth/2) - Math.round(450/2) + "px";
-
- elmLengthPanel.style.top = pLabelTop;
- elmLengthPanel.style.left = 30 + "px";
-
- elmHighscorePanel.style.top = pLabelTop;
- elmHighscorePanel.style.left = cWidth - 140 + "px";
-
- // if width is too narrow, hide the about panel
- if (cWidth < 700) {
- elmAboutPanel.style.display = "none";
- } else {
- elmAboutPanel.style.display = "block";
- }
-
- me.grid = [];
- var numBoardCols = fWidth / me.getBlockWidth() + 2;
- var numBoardRows = fHeight / me.getBlockHeight() + 2;
-
- for (var row = 0; row < numBoardRows; row++) {
- me.grid[row] = [];
- for (var col = 0; col < numBoardCols; col++) {
- if (col === 0 || row === 0 || col === (numBoardCols-1) || row === (numBoardRows-1)) {
- me.grid[row][col] = 1; // an edge
- } else {
- me.grid[row][col] = 0; // empty space
- }
- }
- }
-
- myFood.randomlyPlaceFood();
-
- myKeyListener = function(evt) {
- if (!evt) var evt = window.event;
- var keyNum = (evt.which) ? evt.which : evt.keyCode;
-
- if (me.getBoardState() === 1) {
- if ( !(keyNum >= 37 && keyNum <= 40) && !(keyNum === 87 || keyNum === 65 || keyNum === 83 || keyNum === 68)) {return;} // if not an arrow key, leave
-
- // This removes the listener added at the #listenerX line
- SNAKE.removeEventListener(elmContainer, "keydown", myKeyListener, false);
-
- myKeyListener = function(evt) {
- if (!evt) var evt = window.event;
- var keyNum = (evt.which) ? evt.which : evt.keyCode;
-
- //console.log(keyNum);
- if (keyNum === 32) {
- if(me.getBoardState()!=0)
- me.setPaused(!me.getPaused());
- }
-
- mySnake.handleArrowKeys(keyNum);
-
- evt.cancelBubble = true;
- if (evt.stopPropagation) {evt.stopPropagation();}
- if (evt.preventDefault) {evt.preventDefault();}
- return false;
- };
- SNAKE.addEventListener( elmContainer, "keydown", myKeyListener, false);
-
- mySnake.rebirth();
- mySnake.handleArrowKeys(keyNum);
- me.setBoardState(2); // start the game!
- mySnake.go();
- }
-
- evt.cancelBubble = true;
- if (evt.stopPropagation) {evt.stopPropagation();}
- if (evt.preventDefault) {evt.preventDefault();}
- return false;
- };
-
- // Search for #listenerX to see where this is removed
- SNAKE.addEventListener( elmContainer, "keydown", myKeyListener, false);
- };
-
- /**
- * This method is called when the snake has eaten some food.
- * @method foodEaten
- * @return {bool} Whether a new food was able to spawn (true)
- * or not (false) after the snake eats food.
- */
- me.foodEaten = function() {
- elmLengthPanel.innerHTML = "Length: " + mySnake.snakeLength;
- if (mySnake.snakeLength > localStorage.jsSnakeHighScore)
- {
- localStorage.setItem("jsSnakeHighScore", mySnake.snakeLength);
- elmHighscorePanel.innerHTML = "Highscore: " + localStorage.jsSnakeHighScore;
- }
- if (!myFood.randomlyPlaceFood()) {
- return false;
- }
- return true;
- };
-
- /**
- * This method is called when the snake dies.
- * @method handleDeath
- */
- me.handleDeath = function() {
- handleEndCondition(elmTryAgain);
- };
-
- /**
- * This method is called when the snake wins.
- * @method handleWin
- */
- me.handleWin = function () {
- handleEndCondition(elmWin);
- };
-
- // ---------------------------------------------------------------------
- // Initialize
- // ---------------------------------------------------------------------
-
- config.fullScreen = (typeof config.fullScreen === "undefined") ? false : config.fullScreen;
- config.top = (typeof config.top === "undefined") ? 0 : config.top;
- config.left = (typeof config.left === "undefined") ? 0 : config.left;
- config.width = (typeof config.width === "undefined") ? 400 : config.width;
- config.height = (typeof config.height === "undefined") ? 400 : config.height;
-
- if (config.fullScreen) {
- SNAKE.addEventListener(window,"resize", function() {
- me.setupPlayingField();
- }, false);
- }
-
- me.setBoardState(0);
-
- if (config.boardContainer) {
- me.setBoardContainer(config.boardContainer);
- }
-
- }; // end return function
-})();
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 00000000..01b82863
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,3103 @@
+{
+ "name": "javascript-snake",
+ "version": "1.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "javascript-snake",
+ "version": "1.0.0",
+ "license": "MIT",
+ "devDependencies": {
+ "parcel": "^2.13.3",
+ "parcel-reporter-static-files-copy": "^1.5.3"
+ }
+ },
+ "node_modules/@lezer/common": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.2.3.tgz",
+ "integrity": "sha512-w7ojc8ejBqr2REPsWxJjrMFsA/ysDCFICn8zEOR9mrqzOu2amhITYuLD8ag6XZf0CFXDrhKqw7+tW8cX66NaDA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@lezer/lr": {
+ "version": "1.4.2",
+ "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.2.tgz",
+ "integrity": "sha512-pu0K1jCIdnQ12aWNaAVU5bzi7Bd1w54J3ECgANPmYLtQKP0HBj2cE/5coBD66MT10xbtIuUr7tg0Shbsvk0mDA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@lezer/common": "^1.0.0"
+ }
+ },
+ "node_modules/@lmdb/lmdb-darwin-arm64": {
+ "version": "2.8.5",
+ "resolved": "https://registry.npmjs.org/@lmdb/lmdb-darwin-arm64/-/lmdb-darwin-arm64-2.8.5.tgz",
+ "integrity": "sha512-KPDeVScZgA1oq0CiPBcOa3kHIqU+pTOwRFDIhxvmf8CTNvqdZQYp5cCKW0bUk69VygB2PuTiINFWbY78aR2pQw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@lmdb/lmdb-darwin-x64": {
+ "version": "2.8.5",
+ "resolved": "https://registry.npmjs.org/@lmdb/lmdb-darwin-x64/-/lmdb-darwin-x64-2.8.5.tgz",
+ "integrity": "sha512-w/sLhN4T7MW1nB3R/U8WK5BgQLz904wh+/SmA2jD8NnF7BLLoUgflCNxOeSPOWp8geP6nP/+VjWzZVip7rZ1ug==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@lmdb/lmdb-linux-arm": {
+ "version": "2.8.5",
+ "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-arm/-/lmdb-linux-arm-2.8.5.tgz",
+ "integrity": "sha512-c0TGMbm2M55pwTDIfkDLB6BpIsgxV4PjYck2HiOX+cy/JWiBXz32lYbarPqejKs9Flm7YVAKSILUducU9g2RVg==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@lmdb/lmdb-linux-arm64": {
+ "version": "2.8.5",
+ "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-arm64/-/lmdb-linux-arm64-2.8.5.tgz",
+ "integrity": "sha512-vtbZRHH5UDlL01TT5jB576Zox3+hdyogvpcbvVJlmU5PdL3c5V7cj1EODdh1CHPksRl+cws/58ugEHi8bcj4Ww==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@lmdb/lmdb-linux-x64": {
+ "version": "2.8.5",
+ "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-x64/-/lmdb-linux-x64-2.8.5.tgz",
+ "integrity": "sha512-Xkc8IUx9aEhP0zvgeKy7IQ3ReX2N8N1L0WPcQwnZweWmOuKfwpS3GRIYqLtK5za/w3E60zhFfNdS+3pBZPytqQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@lmdb/lmdb-win32-x64": {
+ "version": "2.8.5",
+ "resolved": "https://registry.npmjs.org/@lmdb/lmdb-win32-x64/-/lmdb-win32-x64-2.8.5.tgz",
+ "integrity": "sha512-4wvrf5BgnR8RpogHhtpCPJMKBmvyZPhhUtEwMJbXh0ni2BucpfF07jlmyM11zRqQ2XIq6PbC2j7W7UCCcm1rRQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@mischnic/json-sourcemap": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/@mischnic/json-sourcemap/-/json-sourcemap-0.1.1.tgz",
+ "integrity": "sha512-iA7+tyVqfrATAIsIRWQG+a7ZLLD0VaOCKV2Wd/v4mqIU3J9c4jx9p7S0nw1XH3gJCKNBOOwACOPYYSUu9pgT+w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@lezer/common": "^1.0.0",
+ "@lezer/lr": "^1.0.0",
+ "json5": "^2.2.1"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ }
+ },
+ "node_modules/@msgpackr-extract/msgpackr-extract-darwin-arm64": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-3.0.4.tgz",
+ "integrity": "sha512-LCkGo6JDfaBhgST7UpPWgNgLINpcpabaHfyz5OBx75nUYxBsaEPxjnyNjWpeb/xBup/682QnBfRBy2/LvPutZQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@msgpackr-extract/msgpackr-extract-darwin-x64": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-x64/-/msgpackr-extract-darwin-x64-3.0.4.tgz",
+ "integrity": "sha512-zExlW9zUJKZH/tOtVMttwjKa4Xm/3KcNjnE3dPN92uCktwavMxpgCA3MoJK/DOnTWsQgo224OaST27/mPNAf+w==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@msgpackr-extract/msgpackr-extract-linux-arm": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm/-/msgpackr-extract-linux-arm-3.0.4.tgz",
+ "integrity": "sha512-Tg3yX65f5GbtXLkrYEHE5oibZG9epyYWas7FogTTEJeDEF9JlXJzKgXaNhT3UXlTOeA+AfZpYZYZ0uPj7Cfquw==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@msgpackr-extract/msgpackr-extract-linux-arm64": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm64/-/msgpackr-extract-linux-arm64-3.0.4.tgz",
+ "integrity": "sha512-dgX0P/9wGPJeHFBG+ZmhgE6bmtMt7NP5CRBGyyktpopdk/mW4POnrpQsSLtKI1dwpc+pPLuXHDh6vvskyQE/sw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@msgpackr-extract/msgpackr-extract-linux-x64": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-x64/-/msgpackr-extract-linux-x64-3.0.4.tgz",
+ "integrity": "sha512-8TNXMEjJc3QEy7R/x1INhgiU+XakDAFUzBhaz7+Rbrs8NH5UQeHQxxmzsSBJGyV6I1jW79undiQm8tOI+D+8FQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@msgpackr-extract/msgpackr-extract-win32-x64": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-3.0.4.tgz",
+ "integrity": "sha512-CmCXPQrkbwExx3j946/PtHWHbYJiCRBRDl4BlkRQcJB/YOwQxJRTpoo7aTsortjgoJ1x7opzTSxn7C+ASSLVjQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@parcel/bundler-default": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/bundler-default/-/bundler-default-2.16.4.tgz",
+ "integrity": "sha512-Nb8peNvhfm1+660CLwssWh4weY+Mv6vEGS6GPKqzJmTMw50udi0eS1YuWFzvmhSiu1KsYcUD37mqQ1LuIDtWoA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/diagnostic": "2.16.4",
+ "@parcel/graph": "3.6.4",
+ "@parcel/plugin": "2.16.4",
+ "@parcel/rust": "2.16.4",
+ "@parcel/utils": "2.16.4",
+ "nullthrows": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/cache": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/cache/-/cache-2.16.4.tgz",
+ "integrity": "sha512-+uCyeElSga2MBbmbXpIj/WVKH7TByCrKaxtHbelfKKIJpYMgEHVjO4cuc7GUfTrUAmRUS8ZGvnX7Etgq6/jQhw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/fs": "2.16.4",
+ "@parcel/logger": "2.16.4",
+ "@parcel/utils": "2.16.4",
+ "lmdb": "2.8.5"
+ },
+ "engines": {
+ "node": ">= 16.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ },
+ "peerDependencies": {
+ "@parcel/core": "^2.16.4"
+ }
+ },
+ "node_modules/@parcel/codeframe": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/codeframe/-/codeframe-2.16.4.tgz",
+ "integrity": "sha512-s64aMfOJoPrXhKH+Y98ahX0O8aXWvTR+uNlOaX4yFkpr4FFDnviLcGngDe/Yo4Qq2FJZ0P6dNswbJTUH9EGxkQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "chalk": "^4.1.2"
+ },
+ "engines": {
+ "node": ">= 16.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/compressor-raw": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/compressor-raw/-/compressor-raw-2.16.4.tgz",
+ "integrity": "sha512-IK8IpNhw61B2HKgA1JhGhO9y+ZJFRZNTEmvhN1NdLdPqvgEXm2EunT+m6D9z7xeoeT6XnUKqM0eRckEdD0OXbA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/plugin": "2.16.4"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/config-default": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/config-default/-/config-default-2.16.4.tgz",
+ "integrity": "sha512-kBxuTY/5trEVnvXk92l7LVkYjNuz3SaqWymFhPjEnc8GY4ZVdcWrWdXWTB9hUhpmRYJctFCyGvM0nN05JTiM2g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/bundler-default": "2.16.4",
+ "@parcel/compressor-raw": "2.16.4",
+ "@parcel/namer-default": "2.16.4",
+ "@parcel/optimizer-css": "2.16.4",
+ "@parcel/optimizer-html": "2.16.4",
+ "@parcel/optimizer-image": "2.16.4",
+ "@parcel/optimizer-svg": "2.16.4",
+ "@parcel/optimizer-swc": "2.16.4",
+ "@parcel/packager-css": "2.16.4",
+ "@parcel/packager-html": "2.16.4",
+ "@parcel/packager-js": "2.16.4",
+ "@parcel/packager-raw": "2.16.4",
+ "@parcel/packager-svg": "2.16.4",
+ "@parcel/packager-wasm": "2.16.4",
+ "@parcel/reporter-dev-server": "2.16.4",
+ "@parcel/resolver-default": "2.16.4",
+ "@parcel/runtime-browser-hmr": "2.16.4",
+ "@parcel/runtime-js": "2.16.4",
+ "@parcel/runtime-rsc": "2.16.4",
+ "@parcel/runtime-service-worker": "2.16.4",
+ "@parcel/transformer-babel": "2.16.4",
+ "@parcel/transformer-css": "2.16.4",
+ "@parcel/transformer-html": "2.16.4",
+ "@parcel/transformer-image": "2.16.4",
+ "@parcel/transformer-js": "2.16.4",
+ "@parcel/transformer-json": "2.16.4",
+ "@parcel/transformer-node": "2.16.4",
+ "@parcel/transformer-postcss": "2.16.4",
+ "@parcel/transformer-posthtml": "2.16.4",
+ "@parcel/transformer-raw": "2.16.4",
+ "@parcel/transformer-react-refresh-wrap": "2.16.4",
+ "@parcel/transformer-svg": "2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ },
+ "peerDependencies": {
+ "@parcel/core": "^2.16.4"
+ }
+ },
+ "node_modules/@parcel/core": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/core/-/core-2.16.4.tgz",
+ "integrity": "sha512-a0CgrW5A5kwuSu5J1RFRoMQaMs9yagvfH2jJMYVw56+/7NRI4KOtu612SG9Y1ERWfY55ZwzyFxtLWvD6LO+Anw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@mischnic/json-sourcemap": "^0.1.1",
+ "@parcel/cache": "2.16.4",
+ "@parcel/diagnostic": "2.16.4",
+ "@parcel/events": "2.16.4",
+ "@parcel/feature-flags": "2.16.4",
+ "@parcel/fs": "2.16.4",
+ "@parcel/graph": "3.6.4",
+ "@parcel/logger": "2.16.4",
+ "@parcel/package-manager": "2.16.4",
+ "@parcel/plugin": "2.16.4",
+ "@parcel/profiler": "2.16.4",
+ "@parcel/rust": "2.16.4",
+ "@parcel/source-map": "^2.1.1",
+ "@parcel/types": "2.16.4",
+ "@parcel/utils": "2.16.4",
+ "@parcel/workers": "2.16.4",
+ "base-x": "^3.0.11",
+ "browserslist": "^4.24.5",
+ "clone": "^2.1.2",
+ "dotenv": "^16.5.0",
+ "dotenv-expand": "^11.0.7",
+ "json5": "^2.2.3",
+ "msgpackr": "^1.11.2",
+ "nullthrows": "^1.1.1",
+ "semver": "^7.7.1"
+ },
+ "engines": {
+ "node": ">= 16.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/diagnostic": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/diagnostic/-/diagnostic-2.16.4.tgz",
+ "integrity": "sha512-YN5CfX7lFd6yRLxyZT4Sj3sR6t7nnve4TdXSIqapXzQwL7Bw+sj79D95wTq2rCm3mzk5SofGxFAXul2/nG6gcQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@mischnic/json-sourcemap": "^0.1.1",
+ "nullthrows": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 16.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/error-overlay": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/error-overlay/-/error-overlay-2.16.4.tgz",
+ "integrity": "sha512-e8KYKnMsfmQnqIhsUWBUZAXlDK30wkxsAGle1tZ0gOdoplaIdVq/WjGPatHLf6igLM76c3tRn2vw8jZFput0jw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 16.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/events": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/events/-/events-2.16.4.tgz",
+ "integrity": "sha512-slWQkBRAA7o0cN0BLEd+yCckPmlVRVhBZn5Pn6ktm4EzEtrqoMzMeJOxxH8TXaRzrQDYnTcnYIHFgXWd4kkUfg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 16.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/feature-flags": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/feature-flags/-/feature-flags-2.16.4.tgz",
+ "integrity": "sha512-nYdx53siKPLYikHHxfzgjzzgxdrjquK6DMnuSgOTyIdRG4VHdEN0+NqKijRLuVgiUFo/dtxc2h+amwqFENMw8w==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 16.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/fs": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/fs/-/fs-2.16.4.tgz",
+ "integrity": "sha512-maCMOiVn7oJYZlqlfxgLne8n6tSktIT1k0AeyBp4UGWCXyeJUJ+nL7QYShFpKNLtMLeF0cEtgwRAknWzbcDS1g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/feature-flags": "2.16.4",
+ "@parcel/rust": "2.16.4",
+ "@parcel/types-internal": "2.16.4",
+ "@parcel/utils": "2.16.4",
+ "@parcel/watcher": "^2.0.7",
+ "@parcel/workers": "2.16.4"
+ },
+ "engines": {
+ "node": ">= 16.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ },
+ "peerDependencies": {
+ "@parcel/core": "^2.16.4"
+ }
+ },
+ "node_modules/@parcel/graph": {
+ "version": "3.6.4",
+ "resolved": "https://registry.npmjs.org/@parcel/graph/-/graph-3.6.4.tgz",
+ "integrity": "sha512-Cj9yV+/k88kFhE+D+gz0YuNRpvNOCVDskO9pFqkcQhGbsGq6kg2XpZ9V7HlYraih31xf8Vb589bZOwjKIiHixQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/feature-flags": "2.16.4",
+ "nullthrows": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 16.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/logger": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/logger/-/logger-2.16.4.tgz",
+ "integrity": "sha512-QR8QLlKo7xAy9JBpPDAh0RvluaixqPCeyY7Fvo2K7hrU3r85vBNNi06pHiPbWoDmB4x1+QoFwMaGnJOHR+/fMA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/diagnostic": "2.16.4",
+ "@parcel/events": "2.16.4"
+ },
+ "engines": {
+ "node": ">= 16.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/markdown-ansi": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/markdown-ansi/-/markdown-ansi-2.16.4.tgz",
+ "integrity": "sha512-0+oQApAVF3wMcQ6d1ZfZ0JsRzaMUYj9e4U+naj6YEsFsFGOPp+pQYKXBf1bobQeeB7cPKPT3SUHxFqced722Hw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "chalk": "^4.1.2"
+ },
+ "engines": {
+ "node": ">= 16.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/namer-default": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/namer-default/-/namer-default-2.16.4.tgz",
+ "integrity": "sha512-CE+0lFg881sJq575EXxj2lKUn81tsS5itpNUUErHxit195m3PExyAhoXM6ed/SXxwi+uv+T5FS/jjDLBNuUFDA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/diagnostic": "2.16.4",
+ "@parcel/plugin": "2.16.4",
+ "nullthrows": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/node-resolver-core": {
+ "version": "3.7.4",
+ "resolved": "https://registry.npmjs.org/@parcel/node-resolver-core/-/node-resolver-core-3.7.4.tgz",
+ "integrity": "sha512-b3VDG+um6IWW5CTod6M9hQsTX5mdIelKmam7mzxzgqg4j5hnycgTWqPMc9UxhYoUY/Q/PHfWepccNcKtvP5JiA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@mischnic/json-sourcemap": "^0.1.1",
+ "@parcel/diagnostic": "2.16.4",
+ "@parcel/fs": "2.16.4",
+ "@parcel/rust": "2.16.4",
+ "@parcel/utils": "2.16.4",
+ "nullthrows": "^1.1.1",
+ "semver": "^7.7.1"
+ },
+ "engines": {
+ "node": ">= 16.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/optimizer-css": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/optimizer-css/-/optimizer-css-2.16.4.tgz",
+ "integrity": "sha512-aqdXCtmvpcXYgJFGk2DtXF34wuM2TD1fZorKMrJdKB9sSkWVRs1tq6RAXQrbi0ZPDH9wfE/9An3YdkTex7RHuQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/diagnostic": "2.16.4",
+ "@parcel/plugin": "2.16.4",
+ "@parcel/source-map": "^2.1.1",
+ "@parcel/utils": "2.16.4",
+ "browserslist": "^4.24.5",
+ "lightningcss": "^1.30.1",
+ "nullthrows": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/optimizer-html": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/optimizer-html/-/optimizer-html-2.16.4.tgz",
+ "integrity": "sha512-vg/R2uuSni+NYYUUV8m+5bz8p5zBv8wc/nNleoBnGuCDwn7uaUwTZ8Gt9CjZO8jjG0xCLILoc/TW+e2FF3pfgQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/plugin": "2.16.4",
+ "@parcel/rust": "2.16.4",
+ "@parcel/utils": "2.16.4"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/optimizer-image": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/optimizer-image/-/optimizer-image-2.16.4.tgz",
+ "integrity": "sha512-2RV54WnvMYr18lxSx7Zlx/DXpJwMzOiPxDnoFyvaUoYutvgHO6chtcgFgh1Bvw/PoI95vYzlTkZ8QfUOk5A0JA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/diagnostic": "2.16.4",
+ "@parcel/plugin": "2.16.4",
+ "@parcel/rust": "2.16.4",
+ "@parcel/utils": "2.16.4",
+ "@parcel/workers": "2.16.4"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ },
+ "peerDependencies": {
+ "@parcel/core": "^2.16.4"
+ }
+ },
+ "node_modules/@parcel/optimizer-svg": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/optimizer-svg/-/optimizer-svg-2.16.4.tgz",
+ "integrity": "sha512-22+BqIffCrVErg8y2XwhasbTaFNn75OKXZ3KTDBIfOSAZKLUKs1iHfDXETzTRN7cVcS+Q36/6EHd7N/RA8i1fg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/plugin": "2.16.4",
+ "@parcel/rust": "2.16.4",
+ "@parcel/utils": "2.16.4"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/optimizer-swc": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/optimizer-swc/-/optimizer-swc-2.16.4.tgz",
+ "integrity": "sha512-+URqwnB6u1gqaLbG1O1DDApH+UVj4WCbK9No1fdxLBxQ9a84jyli25o1kK1hYB9Nb/JMyYNnEBfvYUW6RphOxw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/diagnostic": "2.16.4",
+ "@parcel/plugin": "2.16.4",
+ "@parcel/source-map": "^2.1.1",
+ "@parcel/utils": "2.16.4",
+ "@swc/core": "^1.11.24",
+ "nullthrows": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/package-manager": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/package-manager/-/package-manager-2.16.4.tgz",
+ "integrity": "sha512-obWv9gZgdnkT3Kd+fBkKjhdNEY7zfOP5gVaox5i4nQstVCaVnDlMv5FwLEXwehL+WbwEcGyEGGxOHHkAFKk7Cg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/diagnostic": "2.16.4",
+ "@parcel/fs": "2.16.4",
+ "@parcel/logger": "2.16.4",
+ "@parcel/node-resolver-core": "3.7.4",
+ "@parcel/types": "2.16.4",
+ "@parcel/utils": "2.16.4",
+ "@parcel/workers": "2.16.4",
+ "@swc/core": "^1.11.24",
+ "semver": "^7.7.1"
+ },
+ "engines": {
+ "node": ">= 16.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ },
+ "peerDependencies": {
+ "@parcel/core": "^2.16.4"
+ }
+ },
+ "node_modules/@parcel/packager-css": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/packager-css/-/packager-css-2.16.4.tgz",
+ "integrity": "sha512-rWRtfiX+VVIOZvq64jpeNUKkvWAbnokfHQsk/js1s5jD4ViNQgPcNLiRaiIANjymqL6+dQqWvGUSW2a5FAZYfg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/diagnostic": "2.16.4",
+ "@parcel/plugin": "2.16.4",
+ "@parcel/source-map": "^2.1.1",
+ "@parcel/utils": "2.16.4",
+ "lightningcss": "^1.30.1",
+ "nullthrows": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/packager-html": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/packager-html/-/packager-html-2.16.4.tgz",
+ "integrity": "sha512-AWo5f6SSqBsg2uWOsX0gPX8hCx2iE6GYLg2Z4/cDy2mPlwDICN8/bxItEztSZFmObi+ti26eetBKRDxAUivyIQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/plugin": "2.16.4",
+ "@parcel/rust": "2.16.4",
+ "@parcel/types": "2.16.4",
+ "@parcel/utils": "2.16.4"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/packager-js": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/packager-js/-/packager-js-2.16.4.tgz",
+ "integrity": "sha512-L2o39f/fhta+hxto7w8OTUKdstY+te5BmHZREckbQm0KTBg93BG7jB0bfoxLSZF0d8uuAYIVXjzeHNqha+du1g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/diagnostic": "2.16.4",
+ "@parcel/plugin": "2.16.4",
+ "@parcel/rust": "2.16.4",
+ "@parcel/source-map": "^2.1.1",
+ "@parcel/types": "2.16.4",
+ "@parcel/utils": "2.16.4",
+ "globals": "^13.24.0",
+ "nullthrows": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/packager-raw": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/packager-raw/-/packager-raw-2.16.4.tgz",
+ "integrity": "sha512-A9j60G9OmbTkEeE4WRMXCiErEprHLs9NkUlC4HXCxmSrPMOVaMaMva2LdejE3A9kujZqYtYfuc8+a+jN+Nro4w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/plugin": "2.16.4"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/packager-svg": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/packager-svg/-/packager-svg-2.16.4.tgz",
+ "integrity": "sha512-LT9l7eInFrAZJ6w3mYzAUgDq3SIzYbbQyW46Dz26M9lJQbf6uCaATUTac3BEHegW0ikDuw4OOGHK41BVqeeusg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/plugin": "2.16.4",
+ "@parcel/rust": "2.16.4",
+ "@parcel/types": "2.16.4",
+ "@parcel/utils": "2.16.4"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/packager-wasm": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/packager-wasm/-/packager-wasm-2.16.4.tgz",
+ "integrity": "sha512-AY96Aqu/RpmaSZK2RGkIrZWjAperDw8DAlxLAiaP1D/RPVnikZtl5BmcUt/Wz3PrzG7/q9ZVqqKkWsLmhkjXZQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/plugin": "2.16.4"
+ },
+ "engines": {
+ "node": ">=16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/plugin": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/plugin/-/plugin-2.16.4.tgz",
+ "integrity": "sha512-aN2VQoRGC1eB41ZCDbPR/Sp0yKOxe31oemzPx1nJzOuebK2Q6FxSrJ9Bjj9j/YCaLzDtPwelsuLOazzVpXJ6qg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/types": "2.16.4"
+ },
+ "engines": {
+ "node": ">= 16.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/profiler": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/profiler/-/profiler-2.16.4.tgz",
+ "integrity": "sha512-R3JhfcnoReTv2sVFHPR2xKZvs3d3IRrBl9sWmAftbIJFwT4rU70/W7IdwfaJVkD/6PzHq9mcgOh1WKL4KAxPdA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/diagnostic": "2.16.4",
+ "@parcel/events": "2.16.4",
+ "@parcel/types-internal": "2.16.4",
+ "chrome-trace-event": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 16.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/reporter-cli": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/reporter-cli/-/reporter-cli-2.16.4.tgz",
+ "integrity": "sha512-DQx9TwcTZrDv828+tcwEi//xyW7OHTGzGX1+UEVxPp0mSzuOmDn0zfER8qNIqGr1i4D/FXhb5UJQDhGHV8mOpQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/plugin": "2.16.4",
+ "@parcel/types": "2.16.4",
+ "@parcel/utils": "2.16.4",
+ "chalk": "^4.1.2",
+ "term-size": "^2.2.1"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/reporter-dev-server": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/reporter-dev-server/-/reporter-dev-server-2.16.4.tgz",
+ "integrity": "sha512-YWvay25htQDifpDRJ0+yFh6xUxKnbfeJxYkPYyuXdxpEUhq4T0UWW0PbPCN/wFX7StgeUTXq5Poeo/+eys9m3w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/codeframe": "2.16.4",
+ "@parcel/plugin": "2.16.4",
+ "@parcel/source-map": "^2.1.1",
+ "@parcel/utils": "2.16.4"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/reporter-tracer": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/reporter-tracer/-/reporter-tracer-2.16.4.tgz",
+ "integrity": "sha512-JKnlXpPepak0/ZybmZn9JtyjJiDBWYrt7ZUlXQhQb0xzNcd/k+RqfwVkTKIwyFHsWtym0cwibkvsi2bWFzS7tw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/plugin": "2.16.4",
+ "@parcel/utils": "2.16.4",
+ "chrome-trace-event": "^1.0.3",
+ "nullthrows": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/resolver-default": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/resolver-default/-/resolver-default-2.16.4.tgz",
+ "integrity": "sha512-wJe9XQS0hn/t32pntQpJbls3ZL8mGVVhK9L7s7BTmZT9ufnvP2nif1psJz/nbgnP9LF6mLSk43OdMJKpoStsjQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/node-resolver-core": "3.7.4",
+ "@parcel/plugin": "2.16.4"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/runtime-browser-hmr": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.16.4.tgz",
+ "integrity": "sha512-asx7p3NjUSfibI3bC7+8+jUIGHWVk2Zuq9SjJGCGDt+auT9A4uSGljnsk1BWWPqqZ0WILubq4czSAqm0+wt4cw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/plugin": "2.16.4",
+ "@parcel/utils": "2.16.4"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/runtime-js": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/runtime-js/-/runtime-js-2.16.4.tgz",
+ "integrity": "sha512-gUKmsjg+PULQBu2QbX0QKll9tXSqHPO8NrfxHwWb2lz5xDKDos1oV0I7BoMWbHhUHkoToXZrm654oGViujtVUA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/diagnostic": "2.16.4",
+ "@parcel/plugin": "2.16.4",
+ "@parcel/utils": "2.16.4",
+ "nullthrows": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/runtime-rsc": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/runtime-rsc/-/runtime-rsc-2.16.4.tgz",
+ "integrity": "sha512-CHkotYE/cNiUjJmrc5FD9YhlFp1UF5wMNNJmoWaL40eBzsqcaV0sSn5V3bNapwewn3wrMYgdPgvOTHfaZaG73A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/plugin": "2.16.4",
+ "@parcel/rust": "2.16.4",
+ "@parcel/utils": "2.16.4",
+ "nullthrows": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 12.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/runtime-service-worker": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/runtime-service-worker/-/runtime-service-worker-2.16.4.tgz",
+ "integrity": "sha512-FT0Q58bf5Re+dq5cL2XHbxqHHFZco6qtRijeVpT3TSPMRPlniMArypSytTeZzVNL7h/hxjWsNu7fRuC0yLB5hA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/plugin": "2.16.4",
+ "@parcel/utils": "2.16.4",
+ "nullthrows": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/rust": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/rust/-/rust-2.16.4.tgz",
+ "integrity": "sha512-RBMKt9rCdv6jr4vXG6LmHtxzO5TuhQvXo1kSoSIF7fURRZ81D1jzBtLxwLmfxCPsofJNqWwdhy5vIvisX+TLlQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 16.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ },
+ "optionalDependencies": {
+ "@parcel/rust-darwin-arm64": "2.16.4",
+ "@parcel/rust-darwin-x64": "2.16.4",
+ "@parcel/rust-linux-arm-gnueabihf": "2.16.4",
+ "@parcel/rust-linux-arm64-gnu": "2.16.4",
+ "@parcel/rust-linux-arm64-musl": "2.16.4",
+ "@parcel/rust-linux-x64-gnu": "2.16.4",
+ "@parcel/rust-linux-x64-musl": "2.16.4",
+ "@parcel/rust-win32-x64-msvc": "2.16.4"
+ },
+ "peerDependencies": {
+ "napi-wasm": "^1.1.2"
+ },
+ "peerDependenciesMeta": {
+ "napi-wasm": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@parcel/rust-darwin-arm64": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/rust-darwin-arm64/-/rust-darwin-arm64-2.16.4.tgz",
+ "integrity": "sha512-P3Se36H9EO1fOlwXqQNQ+RsVKTGn5ztRSUGbLcT8ba6oOMmU1w7J4R810GgsCbwCuF10TJNUMkuD3Q2Sz15Q3Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 10"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/rust-darwin-x64": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/rust-darwin-x64/-/rust-darwin-x64-2.16.4.tgz",
+ "integrity": "sha512-8aNKNyPIx3EthYpmVJevIdHmFsOApXAEYGi3HU69jTxLgSIfyEHDdGE9lEsMvhSrd/SSo4/euAtiV+pqK04wnA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 10"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/rust-linux-arm-gnueabihf": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/rust-linux-arm-gnueabihf/-/rust-linux-arm-gnueabihf-2.16.4.tgz",
+ "integrity": "sha512-QrvqiSHaWRLc0JBHgUHVvDthfWSkA6AFN+ikV1UGENv4j2r/QgvuwJiG0VHrsL6pH5dRqj0vvngHzEgguke9DA==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 10"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/rust-linux-arm64-gnu": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/rust-linux-arm64-gnu/-/rust-linux-arm64-gnu-2.16.4.tgz",
+ "integrity": "sha512-f3gBWQHLHRUajNZi3SMmDQiEx54RoRbXtZYQNuBQy7+NolfFcgb1ik3QhkT7xovuTF/LBmaqP3UFy0PxvR/iwQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 10"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/rust-linux-arm64-musl": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/rust-linux-arm64-musl/-/rust-linux-arm64-musl-2.16.4.tgz",
+ "integrity": "sha512-cwml18RNKsBwHyZnrZg4jpecXkWjaY/mCArocWUxkFXjjB97L56QWQM9W86f2/Y3HcFcnIGJwx1SDDKJrV6OIA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 10"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/rust-linux-x64-gnu": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/rust-linux-x64-gnu/-/rust-linux-x64-gnu-2.16.4.tgz",
+ "integrity": "sha512-0xIjQaN8hiG0F9R8coPYidHslDIrbfOS/qFy5GJNbGA3S49h61wZRBMQqa7JFW4+2T8R0J9j0SKHhLXpbLXrIg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 10"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/rust-linux-x64-musl": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/rust-linux-x64-musl/-/rust-linux-x64-musl-2.16.4.tgz",
+ "integrity": "sha512-fYn21GIecHK9RoZPKwT9NOwxwl3Gy3RYPR6zvsUi0+hpFo19Ph9EzFXN3lT8Pi5KiwQMCU4rsLb5HoWOBM1FeA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 10"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/rust-win32-x64-msvc": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/rust-win32-x64-msvc/-/rust-win32-x64-msvc-2.16.4.tgz",
+ "integrity": "sha512-TcpWC3I1mJpfP2++018lgvM7UX0P8IrzNxceBTHUKEIDMwmAYrUKAQFiaU0j1Ldqk6yP8SPZD3cvphumsYpJOQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 10"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/source-map": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@parcel/source-map/-/source-map-2.1.1.tgz",
+ "integrity": "sha512-Ejx1P/mj+kMjQb8/y5XxDUn4reGdr+WyKYloBljpppUy8gs42T+BNoEOuRYqDVdgPc6NxduzIDoJS9pOFfV5Ew==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "detect-libc": "^1.0.3"
+ },
+ "engines": {
+ "node": "^12.18.3 || >=14"
+ }
+ },
+ "node_modules/@parcel/transformer-babel": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/transformer-babel/-/transformer-babel-2.16.4.tgz",
+ "integrity": "sha512-CMDUOQYX7+cmeyHxHSFnoPcwvXNL7rRFE+Q06uVFzsYYiVhbwGF/1J5Bx4cW3Froumqla4YTytTsEteJEybkdA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/diagnostic": "2.16.4",
+ "@parcel/plugin": "2.16.4",
+ "@parcel/source-map": "^2.1.1",
+ "@parcel/utils": "2.16.4",
+ "browserslist": "^4.24.5",
+ "json5": "^2.2.3",
+ "nullthrows": "^1.1.1",
+ "semver": "^7.7.1"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/transformer-css": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/transformer-css/-/transformer-css-2.16.4.tgz",
+ "integrity": "sha512-VG/+DbDci2HKe20GFRDs65ZQf5GUFfnmZAa1BhVl/MO+ijT3XC3eoVUy5cExRkq4VLcPY4ytL0g/1T2D6x7lBQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/diagnostic": "2.16.4",
+ "@parcel/plugin": "2.16.4",
+ "@parcel/source-map": "^2.1.1",
+ "@parcel/utils": "2.16.4",
+ "browserslist": "^4.24.5",
+ "lightningcss": "^1.30.1",
+ "nullthrows": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/transformer-html": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/transformer-html/-/transformer-html-2.16.4.tgz",
+ "integrity": "sha512-w6JErYTeNS+KAzUAER18NHFIFFvxiLGd4Fht1UYcb/FDjJdLAMB/FljyEs0Rto/WAhZ2D0MuSL25HQh837R62g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/diagnostic": "2.16.4",
+ "@parcel/plugin": "2.16.4",
+ "@parcel/rust": "2.16.4"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/transformer-image": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/transformer-image/-/transformer-image-2.16.4.tgz",
+ "integrity": "sha512-ZzIn3KvvRqMfcect4Dy+57C9XoQXZhpVJKBdQWMp9wM1qJEgsVgGDcaSBYCs/UYSKMRMP6Wm20pKCt408RkQzg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/plugin": "2.16.4",
+ "@parcel/utils": "2.16.4",
+ "@parcel/workers": "2.16.4",
+ "nullthrows": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "peerDependencies": {
+ "@parcel/core": "^2.16.4"
+ }
+ },
+ "node_modules/@parcel/transformer-js": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/transformer-js/-/transformer-js-2.16.4.tgz",
+ "integrity": "sha512-FD2fdO6URwAGBPidb3x1dDgLBt972mko0LelcSU05aC/pcKaV9mbCtINbPul1MlStzkxDelhuImcCYIyerheVQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/diagnostic": "2.16.4",
+ "@parcel/plugin": "2.16.4",
+ "@parcel/rust": "2.16.4",
+ "@parcel/source-map": "^2.1.1",
+ "@parcel/utils": "2.16.4",
+ "@parcel/workers": "2.16.4",
+ "@swc/helpers": "^0.5.0",
+ "browserslist": "^4.24.5",
+ "nullthrows": "^1.1.1",
+ "regenerator-runtime": "^0.14.1",
+ "semver": "^7.7.1"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ },
+ "peerDependencies": {
+ "@parcel/core": "^2.16.4"
+ }
+ },
+ "node_modules/@parcel/transformer-json": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/transformer-json/-/transformer-json-2.16.4.tgz",
+ "integrity": "sha512-pB3ZNqgokdkBCJ+4G0BrPYcIkyM9K1HVk0GvjzcLEFDKsoAp8BGEM68FzagFM/nVq9anYTshIaoh349GK0M/bg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/plugin": "2.16.4",
+ "json5": "^2.2.3"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/transformer-node": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/transformer-node/-/transformer-node-2.16.4.tgz",
+ "integrity": "sha512-7t43CPGfMJk1LqFokwxHSsRi+kKC2QvDXaMtqiMShmk50LCwn81WgzuFvNhMwf6lSiBihWupGwF3Fqksg+aisg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/plugin": "2.16.4"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/transformer-postcss": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/transformer-postcss/-/transformer-postcss-2.16.4.tgz",
+ "integrity": "sha512-jfmh9ho03H+qwz9S1b/a/oaOmgfMovtHKYDweIGMjKULKIee3AFRqo8RZIOuUMjDuqHWK8SqQmjery4syFV3Xw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/diagnostic": "2.16.4",
+ "@parcel/plugin": "2.16.4",
+ "@parcel/rust": "2.16.4",
+ "@parcel/utils": "2.16.4",
+ "clone": "^2.1.2",
+ "nullthrows": "^1.1.1",
+ "postcss-value-parser": "^4.2.0",
+ "semver": "^7.7.1"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/transformer-posthtml": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/transformer-posthtml/-/transformer-posthtml-2.16.4.tgz",
+ "integrity": "sha512-+GXsmGx1L25KQGQnwclgEuQe1t4QU+IoDkgN+Ikj+EnQCOWG4/ts2VpMBeqP5F18ZT4cCSRafj6317o/2lSGJg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/plugin": "2.16.4",
+ "@parcel/utils": "2.16.4"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/transformer-raw": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/transformer-raw/-/transformer-raw-2.16.4.tgz",
+ "integrity": "sha512-7WDUPq+bW11G9jKxaQIVL+NPGolV99oq/GXhpjYip0SaGaLzRCW7gEk60cftuk0O7MsDaX5jcAJm3G/AX+LJKg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/plugin": "2.16.4"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/transformer-react-refresh-wrap": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.16.4.tgz",
+ "integrity": "sha512-MiLNZrsGQJTANKKa4lzZyUbGj/en0Hms474mMdQkCBFg6GmjfmXwaMMgtTfPA3ZwSp2+3LeObCyca/f9B2gBZQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/error-overlay": "2.16.4",
+ "@parcel/plugin": "2.16.4",
+ "@parcel/utils": "2.16.4",
+ "react-refresh": "^0.16.0"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/transformer-svg": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/transformer-svg/-/transformer-svg-2.16.4.tgz",
+ "integrity": "sha512-0dm4cQr/WpfQP6N0xjFtwdLTxcONDfoLgTOMk4eNUWydHipSgmLtvUk/nOc/FWkwztRScfAObtZXOiPOd3Oy9A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/diagnostic": "2.16.4",
+ "@parcel/plugin": "2.16.4",
+ "@parcel/rust": "2.16.4"
+ },
+ "engines": {
+ "node": ">= 16.0.0",
+ "parcel": "^2.16.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/types": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/types/-/types-2.16.4.tgz",
+ "integrity": "sha512-ctx4mBskZHXeDVHg4OjMwx18jfYH9BzI/7yqbDQVGvd5lyA+/oVVzYdpele2J2i2sSaJ87cA8nb57GDQ8kHAqA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/types-internal": "2.16.4",
+ "@parcel/workers": "2.16.4"
+ }
+ },
+ "node_modules/@parcel/types-internal": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/types-internal/-/types-internal-2.16.4.tgz",
+ "integrity": "sha512-PE6Qmt5cjzBxX+6MPLiF7r+twoC+V9Skt3zyuBQ+H1c0i9o07Bbz2NKX10nvlPukfmW6Fu/1RvTLkzBZR1bU6A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/diagnostic": "2.16.4",
+ "@parcel/feature-flags": "2.16.4",
+ "@parcel/source-map": "^2.1.1",
+ "utility-types": "^3.11.0"
+ }
+ },
+ "node_modules/@parcel/utils": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/utils/-/utils-2.16.4.tgz",
+ "integrity": "sha512-lkmxQHcHyOWZLbV8t+h2CGZIkPiBurLm/TS5wNT7+tq0qt9KbVwL7FP2K93TbXhLMGTmpI79Bf3qKniPM167Mw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/codeframe": "2.16.4",
+ "@parcel/diagnostic": "2.16.4",
+ "@parcel/logger": "2.16.4",
+ "@parcel/markdown-ansi": "2.16.4",
+ "@parcel/rust": "2.16.4",
+ "@parcel/source-map": "^2.1.1",
+ "chalk": "^4.1.2",
+ "nullthrows": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 16.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/watcher": {
+ "version": "2.5.6",
+ "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.6.tgz",
+ "integrity": "sha512-tmmZ3lQxAe/k/+rNnXQRawJ4NjxO2hqiOLTHvWchtGZULp4RyFeh6aU4XdOYBFe2KE1oShQTv4AblOs2iOrNnQ==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "dependencies": {
+ "detect-libc": "^2.0.3",
+ "is-glob": "^4.0.3",
+ "node-addon-api": "^7.0.0",
+ "picomatch": "^4.0.3"
+ },
+ "engines": {
+ "node": ">= 10.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ },
+ "optionalDependencies": {
+ "@parcel/watcher-android-arm64": "2.5.6",
+ "@parcel/watcher-darwin-arm64": "2.5.6",
+ "@parcel/watcher-darwin-x64": "2.5.6",
+ "@parcel/watcher-freebsd-x64": "2.5.6",
+ "@parcel/watcher-linux-arm-glibc": "2.5.6",
+ "@parcel/watcher-linux-arm-musl": "2.5.6",
+ "@parcel/watcher-linux-arm64-glibc": "2.5.6",
+ "@parcel/watcher-linux-arm64-musl": "2.5.6",
+ "@parcel/watcher-linux-x64-glibc": "2.5.6",
+ "@parcel/watcher-linux-x64-musl": "2.5.6",
+ "@parcel/watcher-win32-arm64": "2.5.6",
+ "@parcel/watcher-win32-ia32": "2.5.6",
+ "@parcel/watcher-win32-x64": "2.5.6"
+ }
+ },
+ "node_modules/@parcel/watcher-android-arm64": {
+ "version": "2.5.6",
+ "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.6.tgz",
+ "integrity": "sha512-YQxSS34tPF/6ZG7r/Ih9xy+kP/WwediEUsqmtf0cuCV5TPPKw/PQHRhueUo6JdeFJaqV3pyjm0GdYjZotbRt/A==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">= 10.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/watcher-darwin-arm64": {
+ "version": "2.5.6",
+ "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.6.tgz",
+ "integrity": "sha512-Z2ZdrnwyXvvvdtRHLmM4knydIdU9adO3D4n/0cVipF3rRiwP+3/sfzpAwA/qKFL6i1ModaabkU7IbpeMBgiVEA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 10.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/watcher-darwin-x64": {
+ "version": "2.5.6",
+ "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.6.tgz",
+ "integrity": "sha512-HgvOf3W9dhithcwOWX9uDZyn1lW9R+7tPZ4sug+NGrGIo4Rk1hAXLEbcH1TQSqxts0NYXXlOWqVpvS1SFS4fRg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 10.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/watcher-freebsd-x64": {
+ "version": "2.5.6",
+ "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.6.tgz",
+ "integrity": "sha512-vJVi8yd/qzJxEKHkeemh7w3YAn6RJCtYlE4HPMoVnCpIXEzSrxErBW5SJBgKLbXU3WdIpkjBTeUNtyBVn8TRng==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">= 10.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/watcher-linux-arm-glibc": {
+ "version": "2.5.6",
+ "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.6.tgz",
+ "integrity": "sha512-9JiYfB6h6BgV50CCfasfLf/uvOcJskMSwcdH1PHH9rvS1IrNy8zad6IUVPVUfmXr+u+Km9IxcfMLzgdOudz9EQ==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 10.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/watcher-linux-arm-musl": {
+ "version": "2.5.6",
+ "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.6.tgz",
+ "integrity": "sha512-Ve3gUCG57nuUUSyjBq/MAM0CzArtuIOxsBdQ+ftz6ho8n7s1i9E1Nmk/xmP323r2YL0SONs1EuwqBp2u1k5fxg==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 10.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/watcher-linux-arm64-glibc": {
+ "version": "2.5.6",
+ "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.6.tgz",
+ "integrity": "sha512-f2g/DT3NhGPdBmMWYoxixqYr3v/UXcmLOYy16Bx0TM20Tchduwr4EaCbmxh1321TABqPGDpS8D/ggOTaljijOA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 10.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/watcher-linux-arm64-musl": {
+ "version": "2.5.6",
+ "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.6.tgz",
+ "integrity": "sha512-qb6naMDGlbCwdhLj6hgoVKJl2odL34z2sqkC7Z6kzir8b5W65WYDpLB6R06KabvZdgoHI/zxke4b3zR0wAbDTA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 10.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/watcher-linux-x64-glibc": {
+ "version": "2.5.6",
+ "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.6.tgz",
+ "integrity": "sha512-kbT5wvNQlx7NaGjzPFu8nVIW1rWqV780O7ZtkjuWaPUgpv2NMFpjYERVi0UYj1msZNyCzGlaCWEtzc+exjMGbQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 10.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/watcher-linux-x64-musl": {
+ "version": "2.5.6",
+ "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.6.tgz",
+ "integrity": "sha512-1JRFeC+h7RdXwldHzTsmdtYR/Ku8SylLgTU/reMuqdVD7CtLwf0VR1FqeprZ0eHQkO0vqsbvFLXUmYm/uNKJBg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 10.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/watcher-win32-arm64": {
+ "version": "2.5.6",
+ "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.6.tgz",
+ "integrity": "sha512-3ukyebjc6eGlw9yRt678DxVF7rjXatWiHvTXqphZLvo7aC5NdEgFufVwjFfY51ijYEWpXbqF5jtrK275z52D4Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 10.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/watcher-win32-ia32": {
+ "version": "2.5.6",
+ "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.6.tgz",
+ "integrity": "sha512-k35yLp1ZMwwee3Ez/pxBi5cf4AoBKYXj00CZ80jUz5h8prpiaQsiRPKQMxoLstNuqe2vR4RNPEAEcjEFzhEz/g==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 10.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/watcher-win32-x64": {
+ "version": "2.5.6",
+ "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.6.tgz",
+ "integrity": "sha512-hbQlYcCq5dlAX9Qx+kFb0FHue6vbjlf0FrNzSKdYK2APUf7tGfGxQCk2ihEREmbR6ZMc0MVAD5RIX/41gpUzTw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 10.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@parcel/watcher/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/@parcel/workers": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/@parcel/workers/-/workers-2.16.4.tgz",
+ "integrity": "sha512-dkBEWqnHXDZnRbTZouNt4uEGIslJT+V0c8OH1MPOfjISp1ucD6/u9ET8k9d/PxS9h1hL53og0SpBuuSEPLDl6A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/diagnostic": "2.16.4",
+ "@parcel/logger": "2.16.4",
+ "@parcel/profiler": "2.16.4",
+ "@parcel/types-internal": "2.16.4",
+ "@parcel/utils": "2.16.4",
+ "nullthrows": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 16.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ },
+ "peerDependencies": {
+ "@parcel/core": "^2.16.4"
+ }
+ },
+ "node_modules/@swc/core": {
+ "version": "1.15.43",
+ "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.15.43.tgz",
+ "integrity": "sha512-1CuKjFkPxIgGdeHVuNbkxmBxkcbdc08u0aiI43pFq6yY1tTVKmXT9hFEooyyKs/sJ3xf1GPHyEwTtk9Xl8dvQw==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@swc/counter": "^0.1.3",
+ "@swc/types": "^0.1.27"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/swc"
+ },
+ "optionalDependencies": {
+ "@swc/core-darwin-arm64": "1.15.43",
+ "@swc/core-darwin-x64": "1.15.43",
+ "@swc/core-linux-arm-gnueabihf": "1.15.43",
+ "@swc/core-linux-arm64-gnu": "1.15.43",
+ "@swc/core-linux-arm64-musl": "1.15.43",
+ "@swc/core-linux-ppc64-gnu": "1.15.43",
+ "@swc/core-linux-s390x-gnu": "1.15.43",
+ "@swc/core-linux-x64-gnu": "1.15.43",
+ "@swc/core-linux-x64-musl": "1.15.43",
+ "@swc/core-win32-arm64-msvc": "1.15.43",
+ "@swc/core-win32-ia32-msvc": "1.15.43",
+ "@swc/core-win32-x64-msvc": "1.15.43"
+ },
+ "peerDependencies": {
+ "@swc/helpers": ">=0.5.17"
+ },
+ "peerDependenciesMeta": {
+ "@swc/helpers": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@swc/core-darwin-arm64": {
+ "version": "1.15.43",
+ "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.15.43.tgz",
+ "integrity": "sha512-v1aVuvXdo/BHxJzco9V2xpHrvwWmhfS8t6gziY5wJxd+Z2h8AeJRnAwPD8itCDaGXVBwJ/CaKfxEzTkG0Va0OA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-darwin-x64": {
+ "version": "1.15.43",
+ "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.15.43.tgz",
+ "integrity": "sha512-lp3d4Lamc8dt5huYdGLSR+9hLxmfr1jb0l+4XXG2zPqZwYWRN9R0U2qYoTrggiU2RWW0oV9VbWM3kBnqIc2kdQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-linux-arm-gnueabihf": {
+ "version": "1.15.43",
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.15.43.tgz",
+ "integrity": "sha512-JWTQQELtsG5GgphDrr/XqqmM2pDN3cZqbMS0Mrg+iTiXL3F74sn/S2IyYE/5u4h2KLkTf9qQ7dXyxsbx7YzkeA==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-linux-arm64-gnu": {
+ "version": "1.15.43",
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.15.43.tgz",
+ "integrity": "sha512-B4otJRdPWIsmiSBf0uG7Z/+vMWmkufjz5MmYxubwKuZazDW14Zd3symga1N62QR4RT+kEFeHEgsXfZGyn/w0hw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-linux-arm64-musl": {
+ "version": "1.15.43",
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.15.43.tgz",
+ "integrity": "sha512-6zB6OnpViBxYy4tgY3v2i6AZY9fwkcHZ032UOwtwUuW1d19sdT07qF0kZe6/3UR1tUaK6jjg2rmVcUIBCEYVjQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-linux-ppc64-gnu": {
+ "version": "1.15.43",
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-ppc64-gnu/-/core-linux-ppc64-gnu-1.15.43.tgz",
+ "integrity": "sha512-coxE1ZWdB3uSDVNoEtYNrRi/1epvckZx9cTJ8ICUxTMTxGk+yvQ/Twacp3ruZSaMPGCriUjP86C37VhaT6nyRg==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-linux-s390x-gnu": {
+ "version": "1.15.43",
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-s390x-gnu/-/core-linux-s390x-gnu-1.15.43.tgz",
+ "integrity": "sha512-lXfLhs+LpBsD5inuYx+YDH5WsPPBQ95KPUiy8P5wq9ob9xKDZFqwNfU2QW6bGO8NqRO/H9JQomTSt5Yyh+FGfA==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-linux-x64-gnu": {
+ "version": "1.15.43",
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.15.43.tgz",
+ "integrity": "sha512-07XnKwTmKy8TGOZG3D9fRnLWGynxPjwQnZLVmBFbo6F+7vHYzBIOuwXEhemrChBWb6yDNZsVCcMWCPX6FDD2xg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-linux-x64-musl": {
+ "version": "1.15.43",
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.15.43.tgz",
+ "integrity": "sha512-TJc+bsSIaBh+hZvZ5GRtW/K1bw66TJ9vsUwvVIsZdiWxU5ObLwZvfcnZ3UpgVfMnFibRes9uriJrQNBHEEogRQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-win32-arm64-msvc": {
+ "version": "1.15.43",
+ "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.15.43.tgz",
+ "integrity": "sha512-jfd7s2/bUQYkOHLs+LWQNKZdmDa8+sufKLllhpWAhVQ2GDCwsHe3vR/j+OSiItZNtkzFuaawa3+SAKz9y5gYfw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-win32-ia32-msvc": {
+ "version": "1.15.43",
+ "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.15.43.tgz",
+ "integrity": "sha512-rLAE8JvucqEW1ZGohxPQrQWPBQeJG4+ypKbWfdlU/qmKScvCkxf9/Jxnzki1dkUQCQ7P5Enp13RlvqOlvx/32g==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-win32-x64-msvc": {
+ "version": "1.15.43",
+ "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.15.43.tgz",
+ "integrity": "sha512-h8MLDHZcfIukwQWj03rIJZx1I0E81AYj2X7J/nGErG4nz+QAv6G1Z+peotvinL3lqpbo32tLYSMFo32/ySzxKg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/counter": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz",
+ "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==",
+ "dev": true,
+ "license": "Apache-2.0"
+ },
+ "node_modules/@swc/helpers": {
+ "version": "0.5.23",
+ "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.23.tgz",
+ "integrity": "sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "tslib": "^2.8.0"
+ }
+ },
+ "node_modules/@swc/types": {
+ "version": "0.1.27",
+ "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.27.tgz",
+ "integrity": "sha512-K6h3iUlqeM946U4sXFYeahefR1YBbXJvko+hv8WS8/0BNJ4OHiHRywMnQUJCqkR7Y9+hqQ1TvEpiKqUhz7NEFg==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@swc/counter": "^0.1.3"
+ }
+ },
+ "node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/base-x": {
+ "version": "3.0.11",
+ "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.11.tgz",
+ "integrity": "sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/baseline-browser-mapping": {
+ "version": "2.11.22",
+ "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.22.tgz",
+ "integrity": "sha512-pWc4w51fBFd7mav43/zKRC+RI6f4yfzQoVlfvE8dECePyfkn1bzLp01Fj0QACcyCZyFhiEMyD2qScfKRWgWibA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "bin": {
+ "baseline-browser-mapping": "dist/cli.cjs"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/browserslist": {
+ "version": "4.28.9",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.9.tgz",
+ "integrity": "sha512-EWazOblFYUvlGZcfGhPUPmYh3nikUxBVb+y9MJun5f3hBi812X+8MSQTujLBtgK3cf51fJWbWfOjyeO954d+Eg==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "baseline-browser-mapping": "^2.11.20",
+ "caniuse-lite": "^1.0.30001810",
+ "electron-to-chromium": "^1.5.420",
+ "node-releases": "^2.0.54",
+ "update-browserslist-db": "^1.3.2"
+ },
+ "bin": {
+ "browserslist": "cli.js"
+ },
+ "engines": {
+ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
+ }
+ },
+ "node_modules/caniuse-lite": {
+ "version": "1.0.30001810",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001810.tgz",
+ "integrity": "sha512-TITQPUkaz+aVk5GL6NhOdwk1aEaNTSDPsGFWrTuhKGtjTF70jL/Oht2W4c6rXUe5fu7Ie19VIahAXHIIiWWNeg==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "CC-BY-4.0"
+ },
+ "node_modules/chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/chrome-trace-event": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz",
+ "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.0"
+ }
+ },
+ "node_modules/clone": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
+ "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.8"
+ }
+ },
+ "node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/commander": {
+ "version": "12.1.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz",
+ "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/detect-libc": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
+ "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "bin": {
+ "detect-libc": "bin/detect-libc.js"
+ },
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
+ "node_modules/dotenv": {
+ "version": "16.6.1",
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz",
+ "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://dotenvx.com"
+ }
+ },
+ "node_modules/dotenv-expand": {
+ "version": "11.0.7",
+ "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-11.0.7.tgz",
+ "integrity": "sha512-zIHwmZPRshsCdpMDyVsqGmgyP0yT8GAgXUnkdAoJisxvf33k7yO6OuoKmcTGuXPWSsm8Oh88nZicRLA9Y0rUeA==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "dotenv": "^16.4.5"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://dotenvx.com"
+ }
+ },
+ "node_modules/electron-to-chromium": {
+ "version": "1.5.422",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.422.tgz",
+ "integrity": "sha512-UvA/32XqrLDdZSn7Jllo1AYNcWji/G0d5M0GTViE7KoGBiMunw3a34Sb2KO4ZZyrSEhqsxFoVhWWJshdyfKqJA==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/escalade": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
+ "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/get-port": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/get-port/-/get-port-4.2.0.tgz",
+ "integrity": "sha512-/b3jarXkH8KJoOMQc3uVGHASwGLPq3gSFJ7tgJm2diza+bydJPTGOibin2steecKeOylE8oY2JERlVWkAJO6yw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/globals": {
+ "version": "13.24.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz",
+ "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "type-fest": "^0.20.2"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-extglob": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/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/lightningcss": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz",
+ "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==",
+ "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.32.0",
+ "lightningcss-darwin-arm64": "1.32.0",
+ "lightningcss-darwin-x64": "1.32.0",
+ "lightningcss-freebsd-x64": "1.32.0",
+ "lightningcss-linux-arm-gnueabihf": "1.32.0",
+ "lightningcss-linux-arm64-gnu": "1.32.0",
+ "lightningcss-linux-arm64-musl": "1.32.0",
+ "lightningcss-linux-x64-gnu": "1.32.0",
+ "lightningcss-linux-x64-musl": "1.32.0",
+ "lightningcss-win32-arm64-msvc": "1.32.0",
+ "lightningcss-win32-x64-msvc": "1.32.0"
+ }
+ },
+ "node_modules/lightningcss-android-arm64": {
+ "version": "1.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz",
+ "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==",
+ "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.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz",
+ "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==",
+ "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.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz",
+ "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==",
+ "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.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz",
+ "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==",
+ "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.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz",
+ "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==",
+ "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.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz",
+ "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==",
+ "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.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz",
+ "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==",
+ "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.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz",
+ "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==",
+ "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.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz",
+ "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==",
+ "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.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz",
+ "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==",
+ "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.32.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz",
+ "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==",
+ "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/lightningcss/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/lmdb": {
+ "version": "2.8.5",
+ "resolved": "https://registry.npmjs.org/lmdb/-/lmdb-2.8.5.tgz",
+ "integrity": "sha512-9bMdFfc80S+vSldBmG3HOuLVHnxRdNTlpzR6QDnzqCQtCzGUEAGTzBKYMeIM+I/sU4oZfgbcbS7X7F65/z/oxQ==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "dependencies": {
+ "msgpackr": "^1.9.5",
+ "node-addon-api": "^6.1.0",
+ "node-gyp-build-optional-packages": "5.1.1",
+ "ordered-binary": "^1.4.1",
+ "weak-lru-cache": "^1.2.2"
+ },
+ "bin": {
+ "download-lmdb-prebuilds": "bin/download-prebuilds.js"
+ },
+ "optionalDependencies": {
+ "@lmdb/lmdb-darwin-arm64": "2.8.5",
+ "@lmdb/lmdb-darwin-x64": "2.8.5",
+ "@lmdb/lmdb-linux-arm": "2.8.5",
+ "@lmdb/lmdb-linux-arm64": "2.8.5",
+ "@lmdb/lmdb-linux-x64": "2.8.5",
+ "@lmdb/lmdb-win32-x64": "2.8.5"
+ }
+ },
+ "node_modules/lmdb/node_modules/node-addon-api": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz",
+ "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/msgpackr": {
+ "version": "1.12.1",
+ "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.12.1.tgz",
+ "integrity": "sha512-4EUH9tQHnMmEgzW/MdAP0KIfa1T9AF+htl0ffe2n5vb2EKn9y2co8ccpgWko6S52Jy1PQZKwRnx5/KkYjtd9MQ==",
+ "dev": true,
+ "license": "MIT",
+ "optionalDependencies": {
+ "msgpackr-extract": "^3.0.2"
+ }
+ },
+ "node_modules/msgpackr-extract": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/msgpackr-extract/-/msgpackr-extract-3.0.4.tgz",
+ "integrity": "sha512-4kmO/MdyUIkLIvTPr8VHLil4AtoKIoniWPIEk5+CDy0xnWC84azhSFmuJ7PxZdsYtiP5kEeQsORAVIeMgxT+Hw==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "node-gyp-build-optional-packages": "5.2.2"
+ },
+ "bin": {
+ "download-msgpackr-prebuilds": "bin/download-prebuilds.js"
+ },
+ "optionalDependencies": {
+ "@msgpackr-extract/msgpackr-extract-darwin-arm64": "3.0.4",
+ "@msgpackr-extract/msgpackr-extract-darwin-x64": "3.0.4",
+ "@msgpackr-extract/msgpackr-extract-linux-arm": "3.0.4",
+ "@msgpackr-extract/msgpackr-extract-linux-arm64": "3.0.4",
+ "@msgpackr-extract/msgpackr-extract-linux-x64": "3.0.4",
+ "@msgpackr-extract/msgpackr-extract-win32-x64": "3.0.4"
+ }
+ },
+ "node_modules/msgpackr-extract/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",
+ "optional": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/msgpackr-extract/node_modules/node-gyp-build-optional-packages": {
+ "version": "5.2.2",
+ "resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.2.2.tgz",
+ "integrity": "sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "detect-libc": "^2.0.1"
+ },
+ "bin": {
+ "node-gyp-build-optional-packages": "bin.js",
+ "node-gyp-build-optional-packages-optional": "optional.js",
+ "node-gyp-build-optional-packages-test": "build-test.js"
+ }
+ },
+ "node_modules/node-addon-api": {
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz",
+ "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/node-gyp-build-optional-packages": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.1.1.tgz",
+ "integrity": "sha512-+P72GAjVAbTxjjwUmwjVrqrdZROD4nf8KgpBoDxqXXTiYZZt/ud60dE5yvCSr9lRO8e8yv6kgJIC0K0PfZFVQw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "detect-libc": "^2.0.1"
+ },
+ "bin": {
+ "node-gyp-build-optional-packages": "bin.js",
+ "node-gyp-build-optional-packages-optional": "optional.js",
+ "node-gyp-build-optional-packages-test": "build-test.js"
+ }
+ },
+ "node_modules/node-gyp-build-optional-packages/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/node-releases": {
+ "version": "2.0.54",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.54.tgz",
+ "integrity": "sha512-YHs7BmmcsdAI5Ozuf8JZo6PT0mv2GIWC9vMfvUC3dp65M8hn7Ux8CPL+2oBI7juNuj9d0ndhTcznq2ODBps9cQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/nullthrows": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/nullthrows/-/nullthrows-1.1.1.tgz",
+ "integrity": "sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/ordered-binary": {
+ "version": "1.6.1",
+ "resolved": "https://registry.npmjs.org/ordered-binary/-/ordered-binary-1.6.1.tgz",
+ "integrity": "sha512-QkCdPooczexPLiXIrbVOPYkR3VO3T6v2OyKRkR1Xbhpy7/LAVXwahnRCgRp78Oe/Ehf0C/HATAxfSr6eA1oX+w==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/parcel": {
+ "version": "2.16.4",
+ "resolved": "https://registry.npmjs.org/parcel/-/parcel-2.16.4.tgz",
+ "integrity": "sha512-RQlrqs4ujYNJpTQi+dITqPKNhRWEqpjPd1YBcGp50Wy3FcJHpwu0/iRm7XWz2dKU/Bwp2qCcVYPIeEDYi2uOUw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/config-default": "2.16.4",
+ "@parcel/core": "2.16.4",
+ "@parcel/diagnostic": "2.16.4",
+ "@parcel/events": "2.16.4",
+ "@parcel/feature-flags": "2.16.4",
+ "@parcel/fs": "2.16.4",
+ "@parcel/logger": "2.16.4",
+ "@parcel/package-manager": "2.16.4",
+ "@parcel/reporter-cli": "2.16.4",
+ "@parcel/reporter-dev-server": "2.16.4",
+ "@parcel/reporter-tracer": "2.16.4",
+ "@parcel/utils": "2.16.4",
+ "chalk": "^4.1.2",
+ "commander": "^12.1.0",
+ "get-port": "^4.2.0"
+ },
+ "bin": {
+ "parcel": "lib/bin.js"
+ },
+ "engines": {
+ "node": ">= 16.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/parcel-reporter-static-files-copy": {
+ "version": "1.5.3",
+ "resolved": "https://registry.npmjs.org/parcel-reporter-static-files-copy/-/parcel-reporter-static-files-copy-1.5.3.tgz",
+ "integrity": "sha512-Ukq2SyJYn3GFIPCLamXuQ+2t+0j54llujjOUoRjtmVvfsuGnJDEpMznADeIoKuQDvy0jpxtWzWkQvxqI/j+U4A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@parcel/plugin": "^2.0.0-beta.1"
+ },
+ "engines": {
+ "parcel": "^2.0.0-beta.1"
+ }
+ },
+ "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.5",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz",
+ "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/postcss-value-parser": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
+ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/react-refresh": {
+ "version": "0.16.0",
+ "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.16.0.tgz",
+ "integrity": "sha512-FPvF2XxTSikpJxcr+bHut2H4gJ17+18Uy20D5/F+SKzFap62R3cM5wH6b8WN3LyGSYeQilLEcJcR1fjBSI2S1A==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/regenerator-runtime": {
+ "version": "0.14.1",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",
+ "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/semver": {
+ "version": "7.8.5",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",
+ "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",
+ "dev": true,
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/term-size": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz",
+ "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/tslib": {
+ "version": "2.8.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
+ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
+ "dev": true,
+ "license": "0BSD"
+ },
+ "node_modules/type-fest": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
+ "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
+ "dev": true,
+ "license": "(MIT OR CC0-1.0)",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/update-browserslist-db": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.2.tgz",
+ "integrity": "sha512-UQ+MSxlhRm1bzjhU+DcuXfjFO1FzNtqhK5+9Yvlp90ItDLk5vT932A0rFu619nf7RVS+Y/VeaUW1jaRDqZ8VJw==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "escalade": "^3.2.0",
+ "picocolors": "^1.1.1"
+ },
+ "bin": {
+ "update-browserslist-db": "cli.js"
+ },
+ "peerDependencies": {
+ "browserslist": ">= 4.21.0"
+ }
+ },
+ "node_modules/utility-types": {
+ "version": "3.11.0",
+ "resolved": "https://registry.npmjs.org/utility-types/-/utility-types-3.11.0.tgz",
+ "integrity": "sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/weak-lru-cache": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/weak-lru-cache/-/weak-lru-cache-1.2.2.tgz",
+ "integrity": "sha512-DEAoo25RfSYMuTGc9vPJzZcZullwIqRDSI9LOy+fkCJPi6hykCnfKaXTuPBDuXAUcqHXyOgFtHNp/kB2FjYHbw==",
+ "dev": true,
+ "license": "MIT"
+ }
+ }
+}
diff --git a/package.json b/package.json
index a8e13a48..6ff84628 100644
--- a/package.json
+++ b/package.json
@@ -2,10 +2,9 @@
"name": "javascript-snake",
"version": "1.0.0",
"description": "JavaScript Snake
By Patrick Gillespie
License: MIT
http://patorjk.com/games/snake",
- "main": "index.html",
"scripts": {
- "start": "parcel index.html --open",
- "build": "parcel build index.html",
+ "start": "parcel src/index.html --open",
+ "build": "parcel build src/index.html",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
@@ -18,8 +17,12 @@
"url": "https://github.com/patorjk/JavaScript-Snake/issues"
},
"homepage": "https://github.com/patorjk/JavaScript-Snake#readme",
- "dependencies": {},
"devDependencies": {
- "parcel-bundler": "^1.6.1"
+ "parcel": "^2.13.3",
+ "parcel-reporter-static-files-copy": "^1.5.3"
+ },
+ "staticFiles": {
+ "staticPath": "src/css",
+ "staticOutPath": "css"
}
}
diff --git a/src/ai-example.html b/src/ai-example.html
new file mode 100644
index 00000000..97190591
--- /dev/null
+++ b/src/ai-example.html
@@ -0,0 +1,159 @@
+
+
+
+
+
+
+ JavaScript Snake - AI Example
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/css/Senura-snake.css b/src/css/Senura-snake.css
new file mode 100644
index 00000000..7e43a321
--- /dev/null
+++ b/src/css/Senura-snake.css
@@ -0,0 +1,82 @@
+/*
+JavaScript Snake
+By Patrick Gillespie
+http://patorjk.com/games/snake
+*/
+
+body {
+ background-color: #000000;
+}
+
+.snake-toolbar {
+ color: #847a87;
+}
+
+#mode-wrapper {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ color: #f6f0f7;
+}
+
+a.snake-link,
+a.snake-link:link,
+a.snake-link:visited {
+ color: #605d61;
+}
+
+a.snake-link:hover {
+ color: #a500d6;
+}
+
+.snake-pause-screen {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ background-color: #ffffff;
+ color: #938996;
+}
+
+.snake-panel-component {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ color: #cf6d6d;
+ background-color: #550b70;
+}
+
+.snake-snakebody-block {
+ background-color: #eddff2;
+ border: 0px solid black;
+}
+
+.snake-snakebody-alive {
+ background-image: url("src/css/images/dark-snakeblock.png");
+}
+.snake-snakebody-dead {
+ background-image: url("src/css/images/dead-dark-snakeblock.png");
+}
+
+.snake-food-block {
+ background-color: black;
+ border: 2px solid #000000;
+}
+
+.snake-playing-field {
+ background-color: #fcfcfc;
+ border: 3px solid black;
+}
+
+.snake-game-container {
+ background-color: #3e2e44;
+}
+
+.snake-welcome-dialog {
+ background-color: black;
+ color: #ab00de;
+ font-family: Verdana, arial, helvetica, sans-serif;
+}
+
+.snake-try-again-dialog,
+.snake-win-dialog {
+ background-color: black;
+ color: #ab00de;
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+}
diff --git a/src/css/black-snake.css b/src/css/black-snake.css
new file mode 100644
index 00000000..d2980ad4
--- /dev/null
+++ b/src/css/black-snake.css
@@ -0,0 +1,75 @@
+/*
+JavaScript Snake
+By Patrick Gillespie
+http://patorjk.com/games/snake
+*/
+body {
+ background-color: black;
+ color: white;
+}
+
+#mode-wrapper {
+ color: #ffffff;
+ font-family: Verdana, arial, helvetica, sans-serif;
+}
+
+a.snake-link,
+a.snake-link:link,
+a.snake-link:visited {
+ color: #fcfc54;
+}
+
+a.snake-link:hover {
+ color: #ffff54;
+}
+
+.snake-pause-screen {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ background-color: black;
+ color: white;
+}
+
+.snake-panel-component {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ color: #ffffff;
+}
+
+.snake-snakebody-block {
+ background-color: #ff0000;
+ border: 0px solid #000080;
+}
+
+.snake-snakebody-alive {
+ background-image: url("src/cssss/images/snakeblock.png"),
+ url("src/css/images/snakeblock.png");
+}
+.snake-snakebody-dead {
+ background-image: url("src/cssss/images/deadblock.png"),
+ url("src/css/images/deadblock.png");
+}
+
+.snake-food-block {
+ background-color: aqua;
+ border: 0px solid #000080;
+}
+
+.snake-playing-field {
+ background-color: purple;
+ border: 0px solid purple;
+}
+
+.snake-welcome-dialog {
+ background-color: #000000;
+ color: #ffffff;
+ font-family: Verdana, arial, helvetica, sans-serif;
+}
+
+.snake-try-again-dialog,
+.snake-win-dialog {
+ background-color: #000000;
+ color: #ffffff;
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+}
diff --git a/src/css/blue-snake.css b/src/css/blue-snake.css
new file mode 100644
index 00000000..a6e36ac0
--- /dev/null
+++ b/src/css/blue-snake.css
@@ -0,0 +1,75 @@
+body {
+ background-color: rgb(0, 70, 32);
+}
+
+#mode-wrapper {
+ color: #ffffff;
+ font-family: Verdana, arial, helvetica, sans-serif;
+}
+
+a.snake-link,
+a.snake-link:link,
+a.snake-link:visited {
+ color: #ffffff;
+}
+
+.snake-pause-screen {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ background-color: rgb(0, 70, 32);
+ color: white;
+}
+
+.snake-panel-component {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ color: #ffffff;
+}
+
+#snake-snakehead-alive {
+ background-image: url("src/css/images/green-head-snakeblock.png");
+ margin: 0px;
+ padding: 0px;
+ background-color: rgb(6, 104, 134);
+ position: absolute;
+ border: 0px solid #000000;
+ background-repeat: no-repeat;
+ border-radius: 4px;
+}
+
+.snake-snakebody-block {
+ background-color: #247fb4;
+}
+
+.snake-snakebody-alive {
+ background-image: url("src/css/images/snakeblock.png");
+}
+
+.snake-snakebody-dead {
+ background-image: url("src/css/images/deadblock.png");
+}
+
+.snake-food-block {
+ background-color: rgb(207, 33, 33);
+ border: 0px solid #000000;
+ border-radius: 6px;
+}
+
+.snake-playing-field {
+ background-color: rgb(20, 156, 54);
+ border: 0px solid #000000;
+}
+
+.snake-welcome-dialog {
+ background-color: #000000;
+ color: #ffffff;
+ font-family: Verdana, arial, helvetica, sans-serif;
+}
+
+.snake-try-again-dialog,
+.snake-win-dialog {
+ background-color: #000000;
+ color: #ffffff;
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+}
\ No newline at end of file
diff --git a/src/css/clean-snake.css b/src/css/clean-snake.css
new file mode 100644
index 00000000..84519d5e
--- /dev/null
+++ b/src/css/clean-snake.css
@@ -0,0 +1,70 @@
+body {
+ background-color: black;
+ color: white;
+}
+
+#mode-wrapper {
+ color: #ffffff;
+ font-family: Verdana, arial, helvetica, sans-serif;
+}
+
+a.snake-link,
+a.snake-link:link,
+a.snake-link:visited {
+ color: #fcfc54;
+}
+
+a.snake-link:hover {
+ color: #ffff54;
+}
+
+.snake-pause-screen {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ background-color: black;
+ color: white;
+}
+
+.snake-panel-component {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ color: #ffffff;
+}
+
+.snake-snakebody-block {
+ background-color: #00e1ff;
+ border: 0px solid #00e1ff;
+}
+
+.snake-snakebody-alive {
+ background-image: url("src/cssss/images/snakeblock.png"),
+ url("src/css/images/snakeblock.png");
+}
+.snake-snakebody-dead {
+ background-image: url("src/cssss/images/deadblock.png"),
+ url("src/css/images/deadblock.png");
+}
+
+.snake-food-block {
+ background-color: rgb(126, 37, 161);
+ border: 0px solid rgb(126, 37, 161);
+}
+
+.snake-playing-field {
+ background-color: rgb(2, 51, 14);
+ border: 0px solid rgb(2, 51, 14);
+}
+
+.snake-welcome-dialog {
+ background-color: #000000;
+ color: #ffffff;
+ font-family: Verdana, arial, helvetica, sans-serif;
+}
+
+.snake-try-again-dialog,
+.snake-win-dialog {
+ background-color: #000000;
+ color: #ffffff;
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+}
diff --git a/src/css/common-snake.css b/src/css/common-snake.css
new file mode 100644
index 00000000..577f87f5
--- /dev/null
+++ b/src/css/common-snake.css
@@ -0,0 +1,111 @@
+/*
+JavaScript Snake - structural rules shared by every theme.
+
+This file is always loaded (it is not swapped when the theme changes) and it
+loads BEFORE the theme stylesheet, so a theme can override anything in here.
+Theme files should only need to define colors, fonts, borders, and images.
+*/
+
+body {
+ margin: 0px;
+ padding: 0px;
+}
+
+/* on touch devices, stop long-presses from selecting text or
+ popping up the link-preview callout during play */
+@media (pointer: coarse) {
+ body {
+ user-select: none;
+ -webkit-user-select: none;
+ -webkit-touch-callout: none;
+ }
+}
+
+#game-area {
+ margin: 10px;
+ padding: 0px;
+}
+
+#game-area:focus {
+ outline: none;
+}
+
+#mode-wrapper {
+ font-size: 14px;
+}
+
+.snake-game-container {
+ margin: 0px;
+ padding: 0px;
+ border-width: 0px;
+ border-style: none;
+ zoom: 1;
+ position: relative;
+}
+
+.snake-playing-field {
+ margin: 0px;
+ padding: 0px;
+ position: absolute;
+}
+
+.snake-snakebody-block {
+ margin: 0px;
+ padding: 0px;
+ position: absolute;
+ background-repeat: no-repeat;
+}
+
+.snake-food-block {
+ margin: 0px;
+ padding: 0px;
+ position: absolute;
+}
+
+.snake-panel-component {
+ position: absolute;
+ text-align: center;
+ padding: 8px;
+ margin: 0px;
+}
+
+.snake-pause-screen {
+ position: absolute;
+ width: 300px;
+ height: 80px;
+ text-align: center;
+ top: 50%;
+ left: 50%;
+ margin-top: -40px;
+ margin-left: -150px;
+ display: none;
+}
+
+.snake-welcome-dialog {
+ padding: 8px;
+ margin: 0px;
+ font-size: 14px;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: 300px;
+ margin-top: -100px;
+ margin-left: -158px;
+ text-align: center;
+ display: block;
+}
+
+.snake-try-again-dialog,
+.snake-win-dialog {
+ padding: 8px;
+ margin: 0px;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: 300px;
+ height: 100px;
+ margin-top: -75px;
+ margin-left: -158px;
+ text-align: center;
+ display: none;
+}
diff --git a/src/css/cotton-candy-snake.css b/src/css/cotton-candy-snake.css
new file mode 100644
index 00000000..29a7bac0
--- /dev/null
+++ b/src/css/cotton-candy-snake.css
@@ -0,0 +1,97 @@
+/*
+JavaScript Snake
+By Patrick Gillespie
+http://patorjk.com/games/snake
+*/
+body {
+ background-color: rgb(156, 192, 212);
+}
+
+.snake-toolbar {
+ background-color: rgb(167, 237, 255);
+ border-radius: 10px;
+}
+
+#game-area {
+ background-color: rgb(255, 197, 197);
+}
+
+#mode-wrapper {
+ color: #ff9c9c;
+ font-family: Verdana, arial, helvetica, sans-serif;
+}
+
+a.snake-link,
+a.snake-link:link,
+a.snake-link:visited {
+ color: rgb(255, 187, 187);
+}
+
+a.snake-link:hover {
+ color: #94bfff;
+}
+
+.snake-pause-screen {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ background-color: rgb(255, 192, 192);
+ color: rgb(175, 219, 255);
+}
+
+.snake-panel-component {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ color: rgb(255, 75, 75);
+ background-color: rgb(153, 226, 255);
+}
+
+.snake-snakebody-block {
+ background-color: #ff9595;
+ border: 0px solid #000080;
+}
+
+.snake-snakebody-alive {
+ background-image: url("src/css/images/snakeblock.png");
+}
+.snake-snakebody-dead {
+ background-image: url("src/css/images/deadblock.png");
+}
+
+.snake-food-block {
+ background-color: rgb(108, 172, 255);
+ border: 0px solid #000080;
+}
+
+.snake-playing-field {
+ background-color: rgb(207, 252, 255);
+ border: 0px solid #0d0d66;
+}
+
+.snake-game-container {
+ background-color: #f89c9c;
+}
+
+.snake-welcome-dialog {
+ background-color: #ffcaca;
+ color: #b2fff9;
+ font-family: Verdana, arial, helvetica, sans-serif;
+}
+
+#snake-snakehead-alive {
+ background-image: url("src/css/images/green-head-snakeblock.png");
+ margin: 0px;
+ padding: 0px;
+ background-color: rgb(255, 215, 215);
+ position: absolute;
+ border: 0px solid #000080;
+ background-repeat: no-repeat;
+ border-radius: 4px;
+}
+
+.snake-try-again-dialog,
+.snake-win-dialog {
+ background-color: #ffc1c1;
+ color: #acfcff;
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+}
diff --git a/src/css/dark-snake.css b/src/css/dark-snake.css
new file mode 100644
index 00000000..641bc03c
--- /dev/null
+++ b/src/css/dark-snake.css
@@ -0,0 +1,82 @@
+/*
+JavaScript Snake
+By Patrick Gillespie
+http://patorjk.com/games/snake
+*/
+
+body {
+ background-color: #3e2e44;
+}
+
+.snake-toolbar {
+ color: #938996;
+}
+
+#mode-wrapper {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ color: #938996;
+}
+
+a.snake-link,
+a.snake-link:link,
+a.snake-link:visited {
+ color: #938996;
+}
+
+a.snake-link:hover {
+ color: #938996;
+}
+
+.snake-pause-screen {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ background-color: #3e2e44;
+ color: #938996;
+}
+
+.snake-panel-component {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ color: #938996;
+ background-color: #3e2e44;
+}
+
+.snake-snakebody-block {
+ background-color: #3e2e44;
+ border: 0px solid black;
+}
+
+.snake-snakebody-alive {
+ background-image: url("src/css/images/dark-snakeblock.png");
+}
+.snake-snakebody-dead {
+ background-image: url("src/css/images/dead-dark-snakeblock.png");
+}
+
+.snake-food-block {
+ background-color: black;
+ border: 2px solid #3e2e44;
+}
+
+.snake-playing-field {
+ background-color: #312e44;
+ border: 3px solid black;
+}
+
+.snake-game-container {
+ background-color: #3e2e44;
+}
+
+.snake-welcome-dialog {
+ background-color: black;
+ color: #938996;
+ font-family: Verdana, arial, helvetica, sans-serif;
+}
+
+.snake-try-again-dialog,
+.snake-win-dialog {
+ background-color: black;
+ color: #938996;
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+}
diff --git a/src/css/dos-snake.css b/src/css/dos-snake.css
new file mode 100644
index 00000000..20df3046
--- /dev/null
+++ b/src/css/dos-snake.css
@@ -0,0 +1,93 @@
+/*
+JavaScript Snake, DOS design experiment, built on TuiCss v2.1.2
+(https://github.com/vinibiavatti1/TuiCss, vendored in css/tuicss/).
+
+Load order is: tuicss.min.css, common-snake.css, this file, then the theme stylesheet.
+*/
+
+@font-face {
+ font-family: "DOS";
+ src:
+ url("tuicss/fonts/perfect-dos-vga-437.woff2") format("woff2"),
+ url("tuicss/fonts/Perfect DOS VGA 437 Win.ttf") format("truetype");
+ font-display: swap;
+}
+
+html {
+ font-family: "DOS", "Lucida Console", monospace;
+ font-size: 16px;
+}
+
+.snake-welcome-dialog.tui-window,
+.snake-try-again-dialog.tui-window,
+.snake-win-dialog.tui-window,
+.snake-pause-screen.tui-window {
+ background-color: rgb(0, 0, 168);
+ color: white;
+ font-family: inherit;
+ font-size: 1rem;
+ width: 340px;
+ height: auto;
+ margin: 0;
+ transform: translate(-50%, -50%);
+ padding: 16px;
+}
+
+/* This is to overwrite font sizes and families in the themes, I'm still not sure if
+ this is a great idea or if the themes should be updated */
+body .snake-panel-component {
+ font-family: inherit;
+ font-size: 18px;
+}
+
+.snake-dialog-controls {
+ margin-top: 20px;
+ text-align: left;
+}
+
+.snake-dialog-controls .snake-control-row {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ margin-bottom: 8px;
+}
+
+.snake-dialog-controls label {
+ flex: 0 0 4.5rem;
+}
+
+.snake-dialog-controls select {
+ flex: 1 1 auto;
+ width: auto;
+ min-width: 0;
+}
+
+.snake-dialog-controls .snake-control-buttons {
+ margin-top: 14px;
+ text-align: center;
+}
+
+.snake-dos-overlay {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ z-index: 100000;
+ background: rgba(0, 0, 0, 0.35);
+}
+
+.snake-dos-alert {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ min-width: 280px;
+ max-width: 420px;
+ padding: 16px;
+ text-align: center;
+}
+
+.snake-dos-alert-message {
+ margin-bottom: 16px;
+}
diff --git a/src/css/golden-snake.css b/src/css/golden-snake.css
new file mode 100644
index 00000000..d68395b3
--- /dev/null
+++ b/src/css/golden-snake.css
@@ -0,0 +1,81 @@
+body {
+ background-color: rgb(255, 243, 137);
+ color: rgb(216, 139, 38);
+}
+
+#mode-wrapper {
+ color: #ffffff;
+ font-family: Verdana, arial, helvetica, sans-serif;
+}
+
+a.snake-link,
+a.snake-link:link,
+a.snake-link:visited {
+ color: #ffff4e;
+}
+
+a.snake-link:hover {
+ color: #ffff54;
+}
+
+.snake-pause-screen {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ background-color: black;
+ color: rgb(255, 217, 0);
+}
+
+.snake-panel-component {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ color: #ffffff;
+}
+
+#snake-snakehead-alive {
+ background-image: url("src/css/images/green-head-snakeblock.png");
+ margin: 0px;
+ padding: 0px;
+ background-color: rgb(255, 232, 28);
+ position: absolute;
+ border: 0px solid #000022;
+ background-repeat: no-repeat;
+ border-radius: 4px;
+}
+
+.snake-snakebody-block {
+ background-color: #c4480f;
+ border: 0px solid #ffd900;
+}
+
+.snake-snakebody-alive {
+ background-image: url("src/cssss/images/snakeblock.png"),
+ url("src/css/images/snakeblock.png");
+}
+.snake-snakebody-dead {
+ background-image: url("src/cssss/images/deadblock.png"),
+ url("src/css/images/deadblock.png");
+}
+
+.snake-food-block {
+ background-color: #ffbb00;
+ border: 0px solid #fff170;
+}
+
+.snake-playing-field {
+ background-color: rgb(185, 162, 29);
+ border: 0px solid rgba(175, 153, 28, 0.5);
+}
+
+.snake-welcome-dialog {
+ background-color: #000000;
+ color: #a6ff00;
+ font-family: Verdana, arial, helvetica, sans-serif;
+}
+
+.snake-try-again-dialog,
+.snake-win-dialog {
+ background-color: #000000;
+ color: #380000;
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+}
\ No newline at end of file
diff --git a/src/css/green-snake.css b/src/css/green-snake.css
new file mode 100644
index 00000000..7151db88
--- /dev/null
+++ b/src/css/green-snake.css
@@ -0,0 +1,86 @@
+/*
+JavaScript Snake
+By Patrick Gillespie
+http://patorjk.com/games/snake
+*/
+body {
+ background-color: darkgreen;
+}
+
+.snake-toolbar {
+ background-color: rgba(255, 255, 255, 0.4);
+ border-radius: 10px;
+}
+
+#game-area {
+ background-color: lightgreen;
+}
+
+#mode-wrapper {
+ color: #ffffff;
+ font-family: Verdana, arial, helvetica, sans-serif;
+}
+
+a.snake-link,
+a.snake-link:link,
+a.snake-link:visited {
+ color: black;
+}
+
+a.snake-link:hover {
+ color: #ffff54;
+}
+
+.snake-pause-screen {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ background-color: black;
+ color: white;
+}
+
+.snake-panel-component {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ color: black;
+ background-color: white;
+}
+
+.snake-snakebody-block {
+ background-color: #ff0000;
+ border: 0px solid #000080;
+}
+
+.snake-snakebody-alive {
+ background-image: url("src/css/images/snakeblock.png");
+}
+.snake-snakebody-dead {
+ background-image: url("src/css/images/deadblock.png");
+}
+
+.snake-food-block {
+ background-color: black;
+ border: 0px solid #000080;
+}
+
+.snake-playing-field {
+ background-color: white;
+ border: 0px solid #0000a8;
+}
+
+.snake-game-container {
+ background-color: #fc5454;
+}
+
+.snake-welcome-dialog {
+ background-color: #000000;
+ color: #ffffff;
+ font-family: Verdana, arial, helvetica, sans-serif;
+}
+
+.snake-try-again-dialog,
+.snake-win-dialog {
+ background-color: #000000;
+ color: #ffffff;
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+}
diff --git a/src/css/head-snake.css b/src/css/head-snake.css
new file mode 100644
index 00000000..ec4fa0c5
--- /dev/null
+++ b/src/css/head-snake.css
@@ -0,0 +1,81 @@
+body {
+ background-color: rgb(0, 0, 0);
+}
+
+#mode-wrapper {
+ color: #ffffff;
+ font-family: Verdana, arial, helvetica, sans-serif;
+}
+
+a.snake-link,
+a.snake-link:link,
+a.snake-link:visited {
+ color: #fcfc54;
+}
+
+a.snake-link:hover {
+ color: #ffff54;
+}
+
+.snake-pause-screen {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ background-color: black;
+ color: white;
+}
+
+.snake-panel-component {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ color: #ffffff;
+}
+
+#snake-snakehead-alive {
+ background-image: url("src/css/images/green-head-snakeblock.png");
+ margin: 0px;
+ padding: 0px;
+ background-color: rgb(10, 173, 10);
+ position: absolute;
+ border: 0px solid #000080;
+ background-repeat: no-repeat;
+ border-radius: 4px;
+}
+
+.snake-snakebody-block {
+ background-color: #ff0000;
+ border: 0px solid #000080;
+}
+
+.snake-snakebody-alive {
+ background-image: url("src/css/images/green-body-snakeblock.png"),
+ url("src/css/images/green-body-snakeblock.png");
+}
+.snake-snakebody-dead {
+ background-image: url("src/css/images/deadblock.png"),
+ url("src/css/images/deadblock.png");
+}
+
+.snake-food-block {
+ background-color: rgb(182, 11, 11);
+ border: 0px solid #000080;
+ border-radius: 6px;
+}
+
+.snake-playing-field {
+ background-color: rgb(245, 245, 220);
+ border: 0px solid #0000a8;
+}
+
+.snake-welcome-dialog {
+ background-color: #000000;
+ color: #ffffff;
+ font-family: Verdana, arial, helvetica, sans-serif;
+}
+
+.snake-try-again-dialog,
+.snake-win-dialog {
+ background-color: #000000;
+ color: #ffffff;
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+}
diff --git a/css/images/Thumbs.db b/src/css/images/Thumbs.db
similarity index 100%
rename from css/images/Thumbs.db
rename to src/css/images/Thumbs.db
diff --git a/css/images/dark-snakeblock.png b/src/css/images/dark-snakeblock.png
similarity index 100%
rename from css/images/dark-snakeblock.png
rename to src/css/images/dark-snakeblock.png
diff --git a/css/images/dead-dark-snakeblock.png b/src/css/images/dead-dark-snakeblock.png
similarity index 100%
rename from css/images/dead-dark-snakeblock.png
rename to src/css/images/dead-dark-snakeblock.png
diff --git a/css/images/deadblock.png b/src/css/images/deadblock.png
similarity index 100%
rename from css/images/deadblock.png
rename to src/css/images/deadblock.png
diff --git a/css/images/deadblock_border.png b/src/css/images/deadblock_border.png
similarity index 100%
rename from css/images/deadblock_border.png
rename to src/css/images/deadblock_border.png
diff --git a/css/images/favicon.png b/src/css/images/favicon.png
similarity index 100%
rename from css/images/favicon.png
rename to src/css/images/favicon.png
diff --git a/src/css/images/green-body-snakeblock.png b/src/css/images/green-body-snakeblock.png
new file mode 100644
index 00000000..fa9d23de
Binary files /dev/null and b/src/css/images/green-body-snakeblock.png differ
diff --git a/src/css/images/green-head-snakeblock.png b/src/css/images/green-head-snakeblock.png
new file mode 100644
index 00000000..5d235cd5
Binary files /dev/null and b/src/css/images/green-head-snakeblock.png differ
diff --git a/css/images/matrix-food-block.png b/src/css/images/matrix-food-block.png
similarity index 100%
rename from css/images/matrix-food-block.png
rename to src/css/images/matrix-food-block.png
diff --git a/css/images/matrix-snake-block.png b/src/css/images/matrix-snake-block.png
similarity index 100%
rename from css/images/matrix-snake-block.png
rename to src/css/images/matrix-snake-block.png
diff --git a/src/css/images/neon-body-snakeblock.png b/src/css/images/neon-body-snakeblock.png
new file mode 100644
index 00000000..d66f7717
Binary files /dev/null and b/src/css/images/neon-body-snakeblock.png differ
diff --git a/src/css/images/neon-dead-snakeblock.png b/src/css/images/neon-dead-snakeblock.png
new file mode 100644
index 00000000..55da41ab
Binary files /dev/null and b/src/css/images/neon-dead-snakeblock.png differ
diff --git a/css/images/snakeblock.png b/src/css/images/snakeblock.png
similarity index 100%
rename from css/images/snakeblock.png
rename to src/css/images/snakeblock.png
diff --git a/src/css/light-snake.css b/src/css/light-snake.css
new file mode 100644
index 00000000..e8e0b08a
--- /dev/null
+++ b/src/css/light-snake.css
@@ -0,0 +1,63 @@
+/*
+JavaScript Snake
+By Patrick Gillespie
+http://patorjk.com/games/snake
+*/
+
+body {
+ background-color: #f73378;
+}
+
+#mode-wrapper {
+ color: #ffffff;
+ font-family: Verdana, arial, helvetica, sans-serif;
+}
+a.snake-link,
+a.snake-link:link,
+a.snake-link:visited {
+ color: #fcfc54;
+}
+a.snake-link:hover {
+ color: #ffff54;
+}
+.snake-pause-screen {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ background-color: black;
+ color: white;
+}
+.snake-panel-component {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ color: #ffffff;
+}
+.snake-snakebody-block {
+ background-color: #ff0000;
+ border: 0px solid #000080;
+}
+.snake-snakebody-alive {
+ background-image: url("src/css/images/snakeblock.png");
+}
+.snake-snakebody-dead {
+ background-image: url("src/css/images/deadblock.png");
+}
+.snake-food-block {
+ background-color: #6cfd6a;
+ border: 0px solid #000080;
+}
+.snake-playing-field {
+ background-color: #ab003c;
+ border: 0px solid #ab003c;
+}
+.snake-welcome-dialog {
+ background-color: #000000;
+ color: #ffffff;
+ font-family: Verdana, arial, helvetica, sans-serif;
+}
+.snake-try-again-dialog,
+.snake-win-dialog {
+ background-color: #000000;
+ color: #ffffff;
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+}
diff --git a/src/css/main-snake.css b/src/css/main-snake.css
new file mode 100755
index 00000000..de88b258
--- /dev/null
+++ b/src/css/main-snake.css
@@ -0,0 +1,73 @@
+/*
+JavaScript Snake
+By Patrick Gillespie
+http://patorjk.com/games/snake
+*/
+body {
+ background-color: #fc5454;
+}
+
+#mode-wrapper {
+ color: #ffffff;
+ font-family: Verdana, arial, helvetica, sans-serif;
+}
+
+a.snake-link,
+a.snake-link:link,
+a.snake-link:visited {
+ color: #fcfc54;
+}
+
+a.snake-link:hover {
+ color: #ffff54;
+}
+
+.snake-pause-screen {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ background-color: black;
+ color: white;
+}
+
+.snake-panel-component {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ color: #ffffff;
+}
+
+.snake-snakebody-block {
+ background-color: #ff0000;
+ border: 0px solid #000080;
+}
+
+.snake-snakebody-alive {
+ background-image: url("./images/snakeblock.png"),
+ url("./images/snakeblock.png");
+}
+.snake-snakebody-dead {
+ background-image: url("./images/deadblock.png"), url("./images/deadblock.png");
+}
+
+.snake-food-block {
+ background-color: #ff0000;
+ border: 0px solid #000080;
+}
+
+.snake-playing-field {
+ background-color: #0000a8;
+ border: 0px solid #0000a8;
+}
+
+.snake-welcome-dialog {
+ background-color: #000000;
+ color: #ffffff;
+ font-family: Verdana, arial, helvetica, sans-serif;
+}
+
+.snake-try-again-dialog,
+.snake-win-dialog {
+ background-color: #000000;
+ color: #ffffff;
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+}
diff --git a/src/css/matrix-snake.css b/src/css/matrix-snake.css
new file mode 100644
index 00000000..b14e45ec
--- /dev/null
+++ b/src/css/matrix-snake.css
@@ -0,0 +1,74 @@
+body {
+ background-color: #00ff11;
+}
+
+#game-area {
+ background-color: #00ff11;
+}
+
+#mode-wrapper {
+ color: #000000;
+ font-family: Verdana, arial, helvetica, sans-serif;
+}
+
+a.snake-link, a.snake-link:link, a.snake-link:visited {
+color: #FCFC54;
+}
+
+a.snake-link:hover {
+color: #FfFf54;
+}
+
+.snake-pause-screen {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ background-color:black;
+ color:white;
+}
+
+.snake-panel-component {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ color: #000000;
+ background-color: #00ff11;
+}
+
+.snake-snakebody-block {
+ background-color: #FF0000;
+ border: 0px solid #000080;
+}
+
+.snake-snakebody-alive {
+background-image: url('src/css/images/matrix-snake-block.png');
+}
+.snake-snakebody-dead {
+background-image: url('src/css/images/deadblock.png');
+}
+
+.snake-food-block {
+ background-color: #FF0000;
+ border: 0px solid #000080;
+ background-image: url("src/css/images/matrix-food-block.png");
+}
+
+.snake-playing-field {
+ background-color: #000000;
+ border: 0px solid #000000;
+}
+
+.snake-game-container {
+ background-color: #00ff11;
+}
+
+.snake-welcome-dialog {
+ background-color: #000000;
+ color: #00ff11;
+ font-family: Verdana, arial, helvetica, sans-serif;
+}
+
+.snake-try-again-dialog, .snake-win-dialog {
+ background-color: #000000;
+ color: #ff0000;
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+}
diff --git a/src/css/neon-snake.css b/src/css/neon-snake.css
new file mode 100644
index 00000000..556a94cf
--- /dev/null
+++ b/src/css/neon-snake.css
@@ -0,0 +1,78 @@
+/*
+JavaScript Snake
+By Patrick Gillespie
+http://patorjk.com/games/snake
+*/
+body {
+ background-color: #000000;
+}
+
+.snake-toolbar {
+ color: #ffffff;
+}
+
+#mode-wrapper {
+ color: #ffffff;
+ font-family: Verdana, arial, helvetica, sans-serif;
+}
+
+a.snake-link,
+a.snake-link:link,
+a.snake-link:visited {
+ color: #00ffe0;
+}
+
+a.snake-link:hover {
+ color: #0fff00;
+}
+
+.snake-pause-screen {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ background-color: #0fff00;
+ color: #000000;
+}
+
+.snake-panel-component {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ color: #ffffff;
+}
+
+.snake-snakebody-block {
+ background-color: #ff0000;
+ border: 0px solid #000080;
+}
+
+.snake-snakebody-alive {
+ background-image: url("src/css/images/neon-body-snakeblock.png"),
+ url("src/cssss/images/neon-body-snakeblock.png");
+}
+.snake-snakebody-dead {
+ background-image: url("src/css/images/neon-dead-snakeblock.png"),
+ url("src/cssss/images/neon-dead-snakeblock.png");
+}
+
+.snake-food-block {
+ background-color: #ff0000;
+ border: 0px solid #000080;
+}
+
+.snake-playing-field {
+ background-color: #00ffd4;
+ border: 0px solid #0000a8;
+}
+
+.snake-welcome-dialog {
+ background-color: #0fff00;
+ color: #000000;
+ font-family: Verdana, arial, helvetica, sans-serif;
+}
+
+.snake-try-again-dialog,
+.snake-win-dialog {
+ background-color: #0fff00;
+ color: #000000;
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+}
diff --git a/src/css/og-snake.css b/src/css/og-snake.css
new file mode 100644
index 00000000..fa14f7fe
--- /dev/null
+++ b/src/css/og-snake.css
@@ -0,0 +1,98 @@
+/*
+JavaScript Snake
+By Patrick Gillespie
+http://patorjk.com/games/snake
+*/
+body {
+ background-color: darkgreen;
+}
+
+.snake-toolbar {
+ background-color: rgba(255, 255, 255, 0.4);
+ border-radius: 10px;
+}
+
+#game-area {
+ background-color: lightgreen;
+}
+
+#mode-wrapper {
+ color: #ffffff;
+ font-family: Verdana, arial, helvetica, sans-serif;
+}
+
+a.snake-link,
+a.snake-link:link,
+a.snake-link:visited {
+ color: black;
+}
+
+a.snake-link:hover {
+ color: #ffff54;
+}
+
+.snake-pause-screen {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ background-color: black;
+ color: white;
+}
+
+.snake-panel-component {
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+ color: black;
+ background-color: white;
+}
+
+#snake-snakehead-alive {
+ background-image: url("src/css/images/green-head-snakeblock.png");
+ margin: 0px;
+ padding: 0px;
+ background-color: rgb(10, 48, 173);
+ position: absolute;
+ border: 0px solid #000000;
+ background-repeat: no-repeat;
+ border-radius: 4px;
+}
+
+.snake-snakebody-block {
+ background-color: #4E7CF6;
+ border: 0px solid #000080;
+}
+
+.snake-snakebody-alive {
+ background-image: url("src/css/images/snakeblock.png");
+}
+
+.snake-snakebody-dead {
+ background-image: url("src/css/images/deadblock.png");
+}
+
+.snake-food-block {
+ background-color: #E7471D;
+ border: 0px solid #000080;
+}
+
+.snake-playing-field {
+ background-color: #AAD751;
+ border: 0px solid #0000a8;
+}
+
+.snake-game-container {
+ background-color: #4E7CF6;
+}
+
+.snake-welcome-dialog {
+ background-color: #000000;
+ color: #ffffff;
+ font-family: Verdana, arial, helvetica, sans-serif;
+}
+
+.snake-try-again-dialog,
+.snake-win-dialog {
+ background-color: #000000;
+ color: #ffffff;
+ font-family: Verdana, arial, helvetica, sans-serif;
+ font-size: 14px;
+}
\ No newline at end of file
diff --git a/src/css/teal-snake.css b/src/css/teal-snake.css
new file mode 100644
index 00000000..ab9b87da
--- /dev/null
+++ b/src/css/teal-snake.css
@@ -0,0 +1,86 @@
+/*
+JavaScript Snake
+By Patrick Gillespie
+http://patorjk.com/games/snake
+*/
+@import url("https://fonts.googleapis.com/css2?family=Electrolize&display=swap");
+
+body {
+ margin: 0px;
+ padding: 0px;
+ background-color: teal;
+}
+
+.snake-toolbar {
+ font-family: Electrolize;
+ color: white;
+}
+
+#mode-wrapper {
+ font-family: Electrolize;
+ color: whitesmoke;
+}
+
+a.snake-link,
+a.snake-link:link,
+a.snake-link:visited {
+ color: white;
+}
+
+a.snake-link:hover {
+ color: white;
+}
+
+.snake-pause-screen {
+ font-family: Electrolize;
+ font-size: 16px;
+ background-color: #3e2e44;
+ color: whitesmoke;
+}
+
+.snake-panel-component {
+ font-family: Electrolize;
+ font-size: 16px;
+ color: #938996;
+ background-color: #3e2e44;
+}
+
+.snake-snakebody-block {
+ background-color: orange;
+ border: 0px solid black;
+}
+
+.snake-snakebody-alive {
+ background-image: url("src/css/images/snakeblock.png");
+}
+.snake-snakebody-dead {
+ background-image: url("src/css/images/dead-dark-snakeblock.png");
+}
+
+.snake-food-block {
+ background-color: red;
+ border: 2px solid black;
+}
+
+.snake-playing-field {
+ background-color: rgb(0, 180, 180);
+ border: 3px solid black;
+}
+
+.snake-game-container {
+ background-color: #3e2e44;
+}
+
+.snake-welcome-dialog {
+ background-color: black;
+ color: whitesmoke;
+ font-family: Electrolize;
+}
+
+.snake-try-again-dialog,
+.snake-win-dialog {
+ background-color: black;
+ color: whitesmoke;
+ font-family: Electrolize;
+ font-size: 16px;
+}
diff --git a/src/css/tuicss/LICENSE.md b/src/css/tuicss/LICENSE.md
new file mode 100644
index 00000000..95af7331
--- /dev/null
+++ b/src/css/tuicss/LICENSE.md
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 Vinicius Reif Biavatti
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/src/css/tuicss/fonts/Perfect DOS VGA 437 Win.ttf b/src/css/tuicss/fonts/Perfect DOS VGA 437 Win.ttf
new file mode 100644
index 00000000..d03b1c5e
Binary files /dev/null and b/src/css/tuicss/fonts/Perfect DOS VGA 437 Win.ttf differ
diff --git a/src/css/tuicss/fonts/Perfect DOS VGA 437.ttf b/src/css/tuicss/fonts/Perfect DOS VGA 437.ttf
new file mode 100644
index 00000000..f5cbfc06
Binary files /dev/null and b/src/css/tuicss/fonts/Perfect DOS VGA 437.ttf differ
diff --git a/src/css/tuicss/fonts/dos437.txt b/src/css/tuicss/fonts/dos437.txt
new file mode 100644
index 00000000..b757d3de
--- /dev/null
+++ b/src/css/tuicss/fonts/dos437.txt
@@ -0,0 +1,72 @@
+ /
+/(_____________ ____
+\ /______)\ | |
+:\ | / \:| |:::::::::: : .. . : .. . . :. .
+ \_____| / | \| |______
+___ / ________ \... . . .
+\______________ \ | | /.. . . . . .
+ \ |__| /
+--x--x-----x----\______ |-/_____/-x--x-xx--x-- - -x -- - - -- - - -
+. . . . . . . . . . . .\____|. . . . . .
+-------------------------------------------------------------------------------
+>> perfect dos vga 437 - general information >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+-------------------------------------------------------------------------------
+
+ "Perfect DOS VGA 437" and "Perfect DOS VGA 437 Win" are truetype fonts
+ designed to emulate the MS-DOS/Text mode standard font, used on VGA monitors,
+ with the 437 Codepage (standard US/International). This is a "bitmap" font,
+ meaning it emulates a bitmap font and can only be used at a given size (8 or
+ multiples of it like 16, 24, 32, etc). It's optimized for Flash too, so it
+ won't produce antialias if used at round positions.
+
+ There are two fonts available. "Perfect DOS VGA 437" uses the original DOS
+ codepage 437. It should be used, for example, if you're opening DOS ASCII
+ files on notepad or another windows-based editor. Since it's faithful to the
+ original DOS codes, it won't accent correctly in windows ("é" would produce
+ something different, not an "e" with an acute).
+
+ There's also "Perfect DOS VGA 437 Win" which is the exactly same font adapted
+ to a windows codepage. This should use accented characters correctly but won't
+ work if you're opening a DOS-based text file.
+
+ UPDATE: this is a new version, updated in august/2008. It has fixed leading
+ metrics for Mac systems.
+
+-------------------------------------------------------------------------------
+>> perfect dos vga 437 - creation process >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+-------------------------------------------------------------------------------
+
+ This font was created to be used on a Flash-based ANSi viewer I'm working. To
+ create it, I created a small Quick Basic program to write all characters on
+ screen,
+
+ CLS
+ FOR l = 0 TO 255
+ charWrite 1 + (l MOD 20), 1 + (l \ 20) * 6 + (l MOD 2), LTRIM$(RTRIM$(STR$(l))) + CHR$(l)
+ NEXT
+ SUB charWrite (lin, col, char$)
+ DEF SEG = &HB800
+ FOR i = 1 TO LEN(char$)
+ POKE ((lin - 1) * 160) + ((col - 2 + i) * 2), ASC(MID$(char$, i, 1))
+ IF (i = LEN(char$)) THEN POKE ((lin - 1) * 160) + ((col - 2 + i) * 2) + 1, 113
+ NEXT
+ END SUB
+
+ Then captured the text screen using SCREEN THIEF (a very, very old screen
+ capture TSR program which converts text screens to images accurately). I then
+ recreated the font polygon by polygon on Fontlab, while looking at the image
+ on Photoshop. No conversion took place.
+
+-------------------------------------------------------------------------------
+>> author >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+-------------------------------------------------------------------------------
+
+ zeh fernando remembers the old days. SMASH DAH FUCKING ENTAH.
+
+ http://www.fatorcaos.com.br
+
+ rorshack ^ maiden brazil
+
+-------------------------------------------------------------------------------
+^zehPULLSdahTRICK^kudosOUTtoWHOkeepsITreal^smashDAHfuckingENTAH!!!^lowres4ever^
+-------------------------------------------------------------------------------
diff --git a/src/css/tuicss/fonts/perfect-dos-vga-437.woff2 b/src/css/tuicss/fonts/perfect-dos-vga-437.woff2
new file mode 100644
index 00000000..44a9bc31
Binary files /dev/null and b/src/css/tuicss/fonts/perfect-dos-vga-437.woff2 differ
diff --git a/src/css/tuicss/images/bg-blue-black.png b/src/css/tuicss/images/bg-blue-black.png
new file mode 100644
index 00000000..aa55706d
Binary files /dev/null and b/src/css/tuicss/images/bg-blue-black.png differ
diff --git a/src/css/tuicss/images/bg-blue-white.png b/src/css/tuicss/images/bg-blue-white.png
new file mode 100644
index 00000000..45409ed4
Binary files /dev/null and b/src/css/tuicss/images/bg-blue-white.png differ
diff --git a/src/css/tuicss/images/bg-cyan-black.png b/src/css/tuicss/images/bg-cyan-black.png
new file mode 100644
index 00000000..12db210f
Binary files /dev/null and b/src/css/tuicss/images/bg-cyan-black.png differ
diff --git a/src/css/tuicss/images/bg-cyan-white.png b/src/css/tuicss/images/bg-cyan-white.png
new file mode 100644
index 00000000..41ce1813
Binary files /dev/null and b/src/css/tuicss/images/bg-cyan-white.png differ
diff --git a/src/css/tuicss/images/bg-green-black.png b/src/css/tuicss/images/bg-green-black.png
new file mode 100644
index 00000000..2f83f3c8
Binary files /dev/null and b/src/css/tuicss/images/bg-green-black.png differ
diff --git a/src/css/tuicss/images/bg-green-white.png b/src/css/tuicss/images/bg-green-white.png
new file mode 100644
index 00000000..85cd3f91
Binary files /dev/null and b/src/css/tuicss/images/bg-green-white.png differ
diff --git a/src/css/tuicss/images/bg-orange-black.png b/src/css/tuicss/images/bg-orange-black.png
new file mode 100644
index 00000000..05e86628
Binary files /dev/null and b/src/css/tuicss/images/bg-orange-black.png differ
diff --git a/src/css/tuicss/images/bg-orange-white.png b/src/css/tuicss/images/bg-orange-white.png
new file mode 100644
index 00000000..8c82141e
Binary files /dev/null and b/src/css/tuicss/images/bg-orange-white.png differ
diff --git a/src/css/tuicss/images/bg-purple-black.png b/src/css/tuicss/images/bg-purple-black.png
new file mode 100644
index 00000000..240217f5
Binary files /dev/null and b/src/css/tuicss/images/bg-purple-black.png differ
diff --git a/src/css/tuicss/images/bg-purple-white.png b/src/css/tuicss/images/bg-purple-white.png
new file mode 100644
index 00000000..5ae0ca2f
Binary files /dev/null and b/src/css/tuicss/images/bg-purple-white.png differ
diff --git a/src/css/tuicss/images/bg-red-black.png b/src/css/tuicss/images/bg-red-black.png
new file mode 100644
index 00000000..dc2c0be2
Binary files /dev/null and b/src/css/tuicss/images/bg-red-black.png differ
diff --git a/src/css/tuicss/images/bg-red-white.png b/src/css/tuicss/images/bg-red-white.png
new file mode 100644
index 00000000..4470d9ba
Binary files /dev/null and b/src/css/tuicss/images/bg-red-white.png differ
diff --git a/src/css/tuicss/images/bg-yellow-black.png b/src/css/tuicss/images/bg-yellow-black.png
new file mode 100644
index 00000000..ace85f9d
Binary files /dev/null and b/src/css/tuicss/images/bg-yellow-black.png differ
diff --git a/src/css/tuicss/images/bg-yellow-white.png b/src/css/tuicss/images/bg-yellow-white.png
new file mode 100644
index 00000000..457edd32
Binary files /dev/null and b/src/css/tuicss/images/bg-yellow-white.png differ
diff --git a/src/css/tuicss/images/scroll-blue.png b/src/css/tuicss/images/scroll-blue.png
new file mode 100644
index 00000000..4ac322b9
Binary files /dev/null and b/src/css/tuicss/images/scroll-blue.png differ
diff --git a/src/css/tuicss/images/scroll-cyan.png b/src/css/tuicss/images/scroll-cyan.png
new file mode 100644
index 00000000..ca628121
Binary files /dev/null and b/src/css/tuicss/images/scroll-cyan.png differ
diff --git a/src/css/tuicss/images/scroll-green.png b/src/css/tuicss/images/scroll-green.png
new file mode 100644
index 00000000..d09971f3
Binary files /dev/null and b/src/css/tuicss/images/scroll-green.png differ
diff --git a/src/css/tuicss/images/scroll-orange.png b/src/css/tuicss/images/scroll-orange.png
new file mode 100644
index 00000000..ec202196
Binary files /dev/null and b/src/css/tuicss/images/scroll-orange.png differ
diff --git a/src/css/tuicss/images/scroll-purple.png b/src/css/tuicss/images/scroll-purple.png
new file mode 100644
index 00000000..67a0550b
Binary files /dev/null and b/src/css/tuicss/images/scroll-purple.png differ
diff --git a/src/css/tuicss/images/scroll-red.png b/src/css/tuicss/images/scroll-red.png
new file mode 100644
index 00000000..1dccb6ab
Binary files /dev/null and b/src/css/tuicss/images/scroll-red.png differ
diff --git a/src/css/tuicss/images/scroll-white.png b/src/css/tuicss/images/scroll-white.png
new file mode 100644
index 00000000..c972a5e2
Binary files /dev/null and b/src/css/tuicss/images/scroll-white.png differ
diff --git a/src/css/tuicss/images/scroll-yellow.png b/src/css/tuicss/images/scroll-yellow.png
new file mode 100644
index 00000000..e1a915c2
Binary files /dev/null and b/src/css/tuicss/images/scroll-yellow.png differ
diff --git a/src/css/tuicss/tuicss.min.css b/src/css/tuicss/tuicss.min.css
new file mode 100644
index 00000000..a99923fc
--- /dev/null
+++ b/src/css/tuicss/tuicss.min.css
@@ -0,0 +1 @@
+@charset "UTF-8";@font-face{font-family:DOS;src:url("fonts/Perfect DOS VGA 437 Win.ttf")}html{font-family:"Lucida Console",monospace;font-size:18px;box-sizing:border-box}body{margin:0}*,:after,:before{font-family:inherit;font-size:inherit;box-sizing:inherit}ul{margin:0;padding:0;list-style-type:none}ul li{list-style-type:none}ul li a{display:block}a{color:inherit;text-decoration:none}span{margin:0}hr{border:none;border-bottom:2px solid #fff}input,select,textarea{width:200px}@media only screen and (max-width :600px){.hide-on-small-and-down,.hide-on-small-only{display:none!important}}@media only screen and (max-width :992px){.hide-on-med-and-down{display:none!important}}@media only screen and (min-width :601px){.hide-on-med-and-up{display:none!important}}@media only screen and (min-width:600px) and (max-width:992px){.hide-on-med-only{display:none!important}}@media only screen and (min-width :993px){.hide-on-large-only{display:none!important}}@media only screen and (min-width :1201px){.hide-on-extra-large-only{display:none!important}}@media only screen and (min-width :1201px){.show-on-extra-large{display:block!important}}@media only screen and (min-width :993px){.show-on-large{display:block!important}}@media only screen and (min-width:600px) and (max-width:992px){.show-on-medium{display:block!important}}@media only screen and (max-width :600px){.show-on-small{display:block!important}}@media only screen and (min-width :601px){.show-on-medium-and-up{display:block!important}}@media only screen and (max-width :992px){.show-on-medium-and-down{display:block!important}}.primary{background-color:#0000a8}.primary-text{color:#0000a8}.primary-border{border-color:#0000a8}.primary-hover:hover{background-color:#0000a8}.primary-text-hover:hover{color:#0000a8}.primary-border-hover:hover{border-color:#0000a8}.secondary{background-color:#a8a8a8}.secondary-text{color:#a8a8a8}.secondary-border{border-color:#a8a8a8}.secondary-hover:hover{background-color:#a8a8a8}.secondary-text-hover:hover{color:#a8a8a8}.secondary-border-hover:hover{border-color:#a8a8a8}.success{background-color:#00a800}.success-text{color:#00a800}.success-border{border-color:#00a800}.success-hover:hover{background-color:#00a800}.success-text-hover:hover{color:#00a800}.success-border-hover:hover{border-color:#00a800}.danger{background-color:#a80000}.danger-text{color:#a80000}.danger-border{border-color:#a80000}.danger-hover:hover{background-color:#a80000}.danger-text-hover:hover{color:#a80000}.danger-border-hover:hover{border-color:#a80000}.warning{background-color:#a8a800}.warning-text{color:#a8a800}.warning-border{border-color:#a8a800}.warning-hover:hover{background-color:#a8a800}.warning-text-hover:hover{color:#a8a800}.warning-border-hover:hover{border-color:#a8a800}.info{background-color:#00a8a8}.info-text{color:#00a8a8}.info-border{border-color:#00a8a8}.info-hover:hover{background-color:#00a8a8}.info-text-hover:hover{color:#00a8a8}.info-border-hover:hover{border-color:#00a8a8}.black-168{background-color:#000!important}.blue-168{background-color:#0000a8!important}.green-168{background-color:#00a800!important}.cyan-168{background-color:#00a8a8!important}.red-168{background-color:#a80000!important}.purple-168{background-color:#a800a8!important}.yellow-168{background-color:#a8a800!important}.white-168{background-color:#a8a8a8!important}.orange-168{background-color:#a85600!important}.black-168-text{color:#000!important}.blue-168-text{color:#0000a8!important}.green-168-text{color:#00a800!important}.cyan-168-text{color:#00a8a8!important}.red-168-text{color:#a80000!important}.purple-168-text{color:#a800a8!important}.yellow-168-text{color:#a8a800!important}.white-168-text{color:#a8a8a8!important}.orange-168-text{color:#a85600!important}.black-168-border{border-color:#000!important}.blue-168-border{border-color:#0000a8!important}.green-168-border{border-color:#00a800!important}.cyan-168-border{border-color:#00a8a8!important}.red-168-border{border-color:#a80000!important}.purple-168-border{border-color:#a800a8!important}.yellow-168-border{border-color:#a8a800!important}.white-168-border{border-color:#a8a8a8!important}.orange-168-border{border-color:#a85600!important}.black-168-hover:hover{background-color:#000!important}.blue-168-hover:hover{background-color:#0000a8!important}.green-168-hover:hover{background-color:#00a800!important}.cyan-168-hover:hover{background-color:#00a8a8!important}.red-168-hover:hover{background-color:#a80000!important}.purple-168-hover:hover{background-color:#a800a8!important}.yellow-168-hover:hover{background-color:#a8a800!important}.white-168-hover:hover{background-color:#a8a8a8!important}.orange-168-hover:hover{background-color:#a85600!important}.black-168-text-hover:hover{color:#000!important}.blue-168-text-hover:hover{color:#0000a8!important}.green-168-text-hover:hover{color:#00a800!important}.cyan-168-text-hover:hover{color:#00a8a8!important}.red-168-text-hover:hover{color:#a80000!important}.purple-168-text-hover:hover{color:#a800a8!important}.yellow-168-text-hover:hover{color:#a8a800!important}.white-168-text-hover:hover{color:#a8a8a8!important}.orange-168-text-hover:hover{color:#a85600!important}.black-168-border-hover:hover{border-color:#000!important}.blue-168-border-hover:hover{border-color:#0000a8!important}.green-168-border-hover:hover{border-color:#00a800!important}.cyan-168-border-hover:hover{border-color:#00a8a8!important}.red-168-border-hover:hover{border-color:#a80000!important}.purple-168-border-hover:hover{border-color:#a800a8!important}.yellow-168-border-hover:hover{border-color:#a8a800!important}.white-168-border-hover:hover{border-color:#a8a8a8!important}.orange-168-border-hover:hover{border-color:#a85600!important}.black-255{background-color:#000!important}.blue-255{background-color:#00f!important}.green-255{background-color:#0f0!important}.cyan-255{background-color:#0ff!important}.red-255{background-color:red!important}.purple-255{background-color:#f0f!important}.yellow-255{background-color:#ff0!important}.white-255{background-color:#fff!important}.orange-255{background-color:#ffa800!important}.black-255-text{color:#000!important}.blue-255-text{color:#00f!important}.green-255-text{color:#0f0!important}.cyan-255-text{color:#0ff!important}.red-255-text{color:red!important}.purple-255-text{color:#f0f!important}.yellow-255-text{color:#ff0!important}.white-255-text{color:#fff!important}.orange-255-text{color:#ffa800!important}.black-255-border{border-color:#000!important}.blue-255-border{border-color:#00f!important}.green-255-border{border-color:#0f0!important}.cyan-255-border{border-color:#0ff!important}.red-255-border{border-color:red!important}.purple-255-border{border-color:#f0f!important}.yellow-255-border{border-color:#ff0!important}.white-255-border{border-color:#fff!important}.orange-255-border{border-color:#ffa800!important}.black-255-hover:hover{background-color:#000!important}.blue-255-hover:hover{background-color:#00f!important}.green-255-hover:hover{background-color:#0f0!important}.cyan-255-hover:hover{background-color:#0ff!important}.red-255-hover:hover{background-color:red!important}.purple-255-hover:hover{background-color:#f0f!important}.yellow-255-hover:hover{background-color:#ff0!important}.white-255-hover:hover{background-color:#fff!important}.orange-255-hover:hover{background-color:#ffa800!important}.black-255-text-hover:hover{color:#000!important}.blue-255-text-hover:hover{color:#00f!important}.green-255-text-hover:hover{color:#0f0!important}.cyan-255-text-hover:hover{color:#0ff!important}.red-255-text-hover:hover{color:red!important}.purple-255-text-hover:hover{color:#f0f!important}.yellow-255-text-hover:hover{color:#ff0!important}.white-255-text-hover:hover{color:#fff!important}.orange-255-text-hover:hover{color:#ffa800!important}.black-255-border-hover:hover{border-color:#000!important}.blue-255-border-hover:hover{border-color:#00f!important}.green-255-border-hover:hover{border-color:#0f0!important}.cyan-255-border-hover:hover{border-color:#0ff!important}.red-255-border-hover:hover{border-color:red!important}.purple-255-border-hover:hover{border-color:#f0f!important}.yellow-255-border-hover:hover{border-color:#ff0!important}.white-255-border-hover:hover{border-color:#fff!important}.orange-255-border-hover:hover{border-color:#ffa800!important}.black{background-color:#000!important}.black-text{color:#000!important}.black-border{border-color:#000!important}.black-hover:hover{background-color:#000!important}.black-text-hover:hover{color:#000!important}.black-border-hover:hover{border-color:#000!important}.white{background-color:#fff!important}.white-text{color:#fff!important}.white-border{border-color:#fff!important}.white-hover:hover{background-color:#fff!important}.white-text-hover:hover{color:#fff!important}.white-border-hover:hover{border-color:#fff!important}.left{float:left!important}.right{float:right!important}.center{text-align:center}.left-align{text-align:left}.right-align{text-align:right}.center-align{text-align:center}.full-width{width:100%!important}.full-height{height:100%!important}.inline{display:inline!important}.inline-block{display:inline-block!important}.block{display:block!important}.valign-top{vertical-align:top!important}.valign-middle{vertical-align:middle!important}.valign-bottom{vertical-align:bottom!important}.fixed{position:fixed!important}.absolute{position:absolute!important}.relative{position:relative!important}.static{position:static!important}.no-shadow{box-shadow:none!important}.no-padding{padding:0!important}.no-border{border:none!important}.content{padding:12px}.disable-select{user-select:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none}.cursor-pointer{cursor:pointer!important}.cursor-default{cursor:default!important}.disabled{cursor:not-allowed!important}.tui-button{display:inline-block;outline:0;padding:1px 10px;background-color:#00a800;color:#000;border:none;cursor:pointer;text-align:center;box-shadow:10px 10px #000;border-radius:0;user-select:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none}.tui-button.disabled{text-decoration:line-through}.tui-button:active{background-color:#00a8a8!important;color:#000!important;box-shadow:none!important}.tui-button:focus{color:#0ff!important}input[type=button]{width:initial}.tui-checkbox{display:block;position:relative;cursor:pointer;color:#fff;padding-left:30px;user-select:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none}.tui-checkbox.disabled{color:#a8a8a8}.tui-checkbox input{position:absolute;opacity:0;cursor:pointer;top:0;left:0;pointer-events:none}.tui-checkbox span{position:absolute;width:10px;height:10px;cursor:pointer;top:0;left:0}.tui-checkbox input:checked~span::after{content:"[√]";color:#0ff}.tui-checkbox input:not(checked)~span::after{content:"[ ]"}.tui-divider{border-bottom:2px solid #fff;display:block}.tui-black-divider{border-bottom:2px solid #000;display:block}.tui-dropdown{position:relative;display:inline-block;cursor:pointer;user-select:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none}.tui-dropdown-content{display:none;position:absolute;background-color:#a8a8a8;min-width:200px;padding:6px;z-index:9}.tui-dropdown-content ul{border:2px #000 solid}.tui-dropdown-content ul li{display:block!important;margin:6px}.tui-dropdown-content ul li a:hover{background-color:#00a800}.tui-dropdown:hover>.tui-dropdown-content:first-of-type{display:block}.tui-fieldset{border:6px #fff double;padding:12px;background-color:inherit;margin-bottom:6px}.tui-fieldset.no-legend{margin-top:6px}.tui-input-fieldset{border-top:6px #fff double;border-bottom:6px #fff double;border-left:2px #fff solid;border-right:2px #fff solid;padding:5px;background-color:inherit}.tui-input-fieldset legend{color:#fff}.tui-input-fieldset:hover{border-color:#ff0}.tui-input-fieldset:hover legend{color:#ff0}.tui-fieldset-button{position:absolute;top:0;right:16px;color:#fff;background-color:inherit;z-index:2;border:none;cursor:pointer;outline:0;padding:2px;user-select:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none}.tui-fieldset-button.left{right:initial;left:16px!important}.tui-fieldset-button.bottom{bottom:0;top:initial}.tui-fieldset-text{position:absolute;bottom:0;left:16px;color:#fff;background-color:inherit;z-index:2;padding:2px}.tui-fieldset-text.right{left:initial;right:16px}.tui-fieldset-text.top{top:0;bottom:initial}.tui-fieldset-button::before{content:"["}.tui-fieldset-button::after{content:"]"}.tui-fieldset-button:active{color:#0ff!important}.tui-input{background-color:#000;color:#fff;outline:0;border:none;border-radius:0}.tui-input.disabled{background-color:#a8a8a8;color:#000}.tui-input:focus{background-color:#ff0!important;color:#000!important}.tui-nav{width:100%;background-color:#a8a8a8;padding:0 2px;z-index:9;display:block;position:fixed}.tui-nav ul li{display:inline-block;margin-left:10px;padding:1px 3px}.tui-nav ul li a{display:block;user-select:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none}.tui-nav ul li:hover{background-color:#00a800}.tui-panel{background-color:#0000a8;display:inline-block;color:#fff;box-shadow:10px 10px #000}.tui-panel-content{padding:12px}.tui-panel-header{padding-top:2px;display:block;background:#fff;text-align:center}.tui-progress-bar{display:block;position:relative;height:20px;width:200px;background-color:#00a8a8;overflow:hidden}.tui-progress{position:absolute;left:0;background-color:#0ff;height:100%;display:inline-block}.tui-progress-bar .tui-indeterminate{position:absolute;left:0;background-color:#0ff;height:20px;width:20px;display:inline-block;animation:indeterminate 1s backwards;animation-iteration-count:infinite;animation-timing-function:linear}.tui-progress-label{position:absolute;top:50%;left:50%;transform:translateX(-50%) translateY(-50%);z-index:1}@keyframes indeterminate{from{margin-left:-10%}to{margin-left:100%}}.tui-radio{display:block;position:relative;cursor:pointer;color:#fff;padding-left:30px;user-select:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none}.tui-radio.disabled{color:#a8a8a8}.tui-radio input{position:absolute;opacity:0;cursor:pointer;top:0;left:0;pointer-events:none}.tui-radio span{position:absolute;width:10px;height:10px;cursor:pointer;top:0;left:0}.tui-radio input:checked~span:after{content:"(•)";color:#0ff!important}.tui-radio input:not(checked)~span:after{content:"( )"}::-webkit-scrollbar{width:10px}::-webkit-scrollbar-track{background-image:url(images/scroll-cyan.png);background-repeat:repeat}::-webkit-scrollbar-thumb{background-color:#00a8a8}::-webkit-scrollbar-thumb:hover{background-color:#00a8a8}.tui-scroll-blue ::-webkit-scrollbar-track{background-image:url(images/scroll-blue.png)}.tui-scroll-blue ::-webkit-scrollbar-thumb{background-color:#0000a8}.tui-scroll-blue ::-webkit-scrollbar-thumb:hover{background-color:#0000a8}.tui-scroll-green ::-webkit-scrollbar-track{background-image:url(images/scroll-green.png)}.tui-scroll-green ::-webkit-scrollbar-thumb{background-color:#00a800}.tui-scroll-green ::-webkit-scrollbar-thumb:hover{background-color:#00a800}.tui-scroll-cyan ::-webkit-scrollbar-track{background-image:url(images/scroll-cyan.png)}.tui-scroll-cyan ::-webkit-scrollbar-thumb{background-color:#00a8a8}.tui-scroll-cyan ::-webkit-scrollbar-thumb:hover{background-color:#00a8a8}.tui-scroll-red ::-webkit-scrollbar-track{background-image:url(images/scroll-red.png)}.tui-scroll-red ::-webkit-scrollbar-thumb{background-color:#a80000}.tui-scroll-red ::-webkit-scrollbar-thumb:hover{background-color:#a80000}.tui-scroll-purple ::-webkit-scrollbar-track{background-image:url(images/scroll-purple.png)}.tui-scroll-purple ::-webkit-scrollbar-thumb{background-color:#a800a8}.tui-scroll-purple ::-webkit-scrollbar-thumb:hover{background-color:#a800a8}.tui-scroll-yellow ::-webkit-scrollbar-track{background-image:url(images/scroll-yellow.png)}.tui-scroll-yellow ::-webkit-scrollbar-thumb{background-color:#a8a800}.tui-scroll-yellow ::-webkit-scrollbar-thumb:hover{background-color:#a8a800}.tui-scroll-white ::-webkit-scrollbar-track{background-image:url(images/scroll-white.png)}.tui-scroll-white ::-webkit-scrollbar-thumb{background-color:#a8a8a8}.tui-scroll-white ::-webkit-scrollbar-thumb:hover{background-color:#a8a8a8}.tui-sidenav{position:fixed;top:0;left:0;background-color:#00a8a8;min-width:200px;box-shadow:10px 10px #000!important;padding:6px;z-index:10;height:100%;z-index:8;display:none}.tui-sidenav.right{left:initial;right:0}.tui-sidenav.active{display:block!important}.tui-sidenav ul{margin-top:20px;border:2px #000 solid}.tui-sidenav ul li{display:block;margin:6px}.tui-sidenav ul li a{display:block;user-select:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none}.tui-sidenav ul li:hover{background-color:#ff0}.tui-sidenav-button{cursor:pointer;user-select:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none}.tui-statusbar{width:100%;background-color:#a8a8a8;padding:0 1px;left:0;bottom:0;z-index:9;position:fixed}.tui-statusbar ul li{display:inline-block;margin-left:10px;padding:2px 3px}.tui-statusbar ul li:active{background-color:#0000a8;color:#fff}.tui-statusbar ul li a{user-select:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none}.tui-statusbar-divider{border-right:2px #000 solid;display:inline;margin:0 3px}.tui-table{border:2px solid #a8a8a8;padding:5px;border-collapse:collapse}.tui-table.hovered-blue tbody tr:hover{background-color:#00f!important;color:#000}.tui-table.hovered-green tbody tr:hover{background-color:#0f0!important;color:#000}.tui-table.hovered-cyan tbody tr:hover{background-color:#0ff!important;color:#000}.tui-table.hovered-red tbody tr:hover{background-color:red!important;color:#fff}.tui-table.hovered-purple tbody tr:hover{background-color:#f0f!important;color:#fff}.tui-table.hovered-yellow tbody tr:hover{background-color:#ff0!important;color:#000}.tui-table.hovered-white tbody tr:hover{background-color:#fff!important;color:#000}.tui-table.hovered-orange tbody tr:hover{background-color:#ffa800!important;color:#000}.tui-table.hovered tbody tr:hover{background-color:#0ff!important;color:#000}.tui-table.striped-blue tbody tr:nth-child(even){background-color:#0000a8}.tui-table.striped-green tbody tr:nth-child(even){background-color:#00a800}.tui-table.striped-cyan tbody tr:nth-child(even){background-color:#00a8a8}.tui-table.striped-red tbody tr:nth-child(even){background-color:#a80000}.tui-table.striped-purple tbody tr:nth-child(even){background-color:#a800a8}.tui-table.striped-yellow tbody tr:nth-child(even){background-color:#a8a800}.tui-table.striped-white tbody tr:nth-child(even){background-color:#a8a8a8;color:#000}.tui-table.striped-orange tbody tr:nth-child(even){background-color:#a85600}.tui-table tbody{background-color:inherit;color:#fff}.tui-table tbody tr td{border-right:2px solid #a8a8a8;padding:0 2px}.tui-table thead{background-color:inherit;color:#ff0;text-align:center}.tui-table tfoot{background-color:inherit;color:#ff0;text-align:center}.tui-table-grid{border-collapse:collapse;width:100%}.tui-table-grid tbody tr td,.tui-table-grid tbody tr th,.tui-table-grid thead tr td,.tui-table-grid thead tr th{border:2px solid #000;padding:10px;vertical-align:top}.tui-tabs{background-color:#0000a8;width:100%;padding:0 10px 0 10px}.tui-tabs ul li{display:inline-block}.tui-tabs ul li a{display:block;user-select:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none}.tui-tab{padding:2px 10px 0 10px;color:#a8a8a8;cursor:pointer}.tui-tab.active{background-color:#a8a8a8;color:#0000a8}.tui-tab.disabled{text-decoration:line-through}.tui-tab-content{display:none}.tui-textarea{background-color:inherit;border:none;padding:0;color:#ff0;outline:0}.tui-textarea.disabled{background-color:#a8a8a8;color:#000}.tui-window{background-color:#0000a8;padding:1px;display:inline-block;position:relative;box-shadow:10px 10px #000;color:#fff}.tui-screen-640-480{width:640px;height:480px}.tui-screen-800-600{width:800px;height:600px}.tui-screen-1024-768{width:1024px;height:768px}.tui-screen-1024-768,.tui-screen-640-480,.tui-screen-800-600{position:relative;overflow:hidden}.tui-screen-1024-768.bordered,.tui-screen-640-480.bordered,.tui-screen-800-600.bordered{border:2px solid #000}.tui-screen-1024-768.centered,.tui-screen-640-480.centered,.tui-screen-800-600.centered{margin:auto;margin-top:20px}.tui-datetime{padding:1px 0 1px 0;margin-right:10px;float:right}.tui-shortcut{float:right}.tui-shadow,.tui-shadow-1{box-shadow:10px 10px #000!important}.tui-shadow-2{box-shadow:15px 15px #000}.tui-shadow-3{box-shadow:20px 20px #000}.tui-shadow-4{box-shadow:25px 25px #000}.tui-shadow-5{box-shadow:30px 30px #000}.tui-shadow-left,.tui-shadow-left-1{box-shadow:-10px 10px #000!important}.tui-shadow-left-2{box-shadow:-15px 15px #000!important}.tui-shadow-left-3{box-shadow:-20px 20px #000!important}.tui-shadow-left-4{box-shadow:-25px 25px #000!important}.tui-shadow-left-5{box-shadow:-30px 30px #000!important}.tui-no-shadow{box-shadow:none!important}.tui-bg-blue-white{background-image:url(images/bg-blue-white.png);background-repeat:repeat}.tui-bg-blue-black{background-image:url(images/bg-blue-black.png);background-repeat:repeat}.tui-bg-green-white{background-image:url(images/bg-green-white.png);background-repeat:repeat}.tui-bg-green-black{background-image:url(images/bg-green-black.png);background-repeat:repeat}.tui-bg-cyan-white{background-image:url(images/bg-cyan-white.png);background-repeat:repeat}.tui-bg-cyan-black{background-image:url(images/bg-cyan-black.png);background-repeat:repeat}.tui-bg-red-white{background-image:url(images/bg-red-white.png);background-repeat:repeat}.tui-bg-red-black{background-image:url(images/bg-red-black.png);background-repeat:repeat}.tui-bg-purple-white{background-image:url(images/bg-purple-white.png);background-repeat:repeat}.tui-bg-purple-black{background-image:url(images/bg-purple-black.png);background-repeat:repeat}.tui-bg-yellow-white{background-image:url(images/bg-yellow-white.png);background-repeat:repeat}.tui-bg-yellow-black{background-image:url(images/bg-yellow-black.png);background-repeat:repeat}.tui-bg-orange-white{background-image:url(images/bg-orange-white.png);background-repeat:repeat}.tui-bg-orange-black{background-image:url(images/bg-orange-black.png);background-repeat:repeat}.tui-border-solid{border-style:solid!important;border-width:2px!important}.tui-border-dashed{border-style:dashed!important;border-width:2px!important}.tui-border-dotted{border-style:dotted!important;border-width:2px!important}.tui-border-double{border-style:double!important;border-width:6px!important}.container{margin:0 auto;max-width:1280px;width:90%}@media only screen and (min-width :601px){.container{width:85%}}@media only screen and (min-width :993px){.container{width:70%}}.col .row{margin-left:-.75rem;margin-right:-.75rem}.section{padding-top:1rem;padding-bottom:1rem}.section.no-pad{padding:0}.section.no-pad-bot{padding-bottom:0}.section.no-pad-top{padding-top:0}.row{margin-left:auto;margin-right:auto;margin-bottom:20px}.row:after{content:"";display:table;clear:both}.row .col{float:left;box-sizing:border-box;padding:0 .75rem;min-height:1px}.row .col[class*=pull-],.row .col[class*=push-]{position:relative}.row .col.s1{width:8.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.s2{width:16.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.s3{width:25%;margin-left:auto;left:auto;right:auto}.row .col.s4{width:33.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.s5{width:41.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.s6{width:50%;margin-left:auto;left:auto;right:auto}.row .col.s7{width:58.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.s8{width:66.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.s9{width:75%;margin-left:auto;left:auto;right:auto}.row .col.s10{width:83.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.s11{width:91.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.s12{width:100%;margin-left:auto;left:auto;right:auto}.row .col.offset-s1{margin-left:8.3333333333%}.row .col.pull-s1{right:8.3333333333%}.row .col.push-s1{left:8.3333333333%}.row .col.offset-s2{margin-left:16.6666666667%}.row .col.pull-s2{right:16.6666666667%}.row .col.push-s2{left:16.6666666667%}.row .col.offset-s3{margin-left:25%}.row .col.pull-s3{right:25%}.row .col.push-s3{left:25%}.row .col.offset-s4{margin-left:33.3333333333%}.row .col.pull-s4{right:33.3333333333%}.row .col.push-s4{left:33.3333333333%}.row .col.offset-s5{margin-left:41.6666666667%}.row .col.pull-s5{right:41.6666666667%}.row .col.push-s5{left:41.6666666667%}.row .col.offset-s6{margin-left:50%}.row .col.pull-s6{right:50%}.row .col.push-s6{left:50%}.row .col.offset-s7{margin-left:58.3333333333%}.row .col.pull-s7{right:58.3333333333%}.row .col.push-s7{left:58.3333333333%}.row .col.offset-s8{margin-left:66.6666666667%}.row .col.pull-s8{right:66.6666666667%}.row .col.push-s8{left:66.6666666667%}.row .col.offset-s9{margin-left:75%}.row .col.pull-s9{right:75%}.row .col.push-s9{left:75%}.row .col.offset-s10{margin-left:83.3333333333%}.row .col.pull-s10{right:83.3333333333%}.row .col.push-s10{left:83.3333333333%}.row .col.offset-s11{margin-left:91.6666666667%}.row .col.pull-s11{right:91.6666666667%}.row .col.push-s11{left:91.6666666667%}.row .col.offset-s12{margin-left:100%}.row .col.pull-s12{right:100%}.row .col.push-s12{left:100%}@media only screen and (min-width :601px){.row .col.m1{width:8.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.m2{width:16.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.m3{width:25%;margin-left:auto;left:auto;right:auto}.row .col.m4{width:33.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.m5{width:41.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.m6{width:50%;margin-left:auto;left:auto;right:auto}.row .col.m7{width:58.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.m8{width:66.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.m9{width:75%;margin-left:auto;left:auto;right:auto}.row .col.m10{width:83.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.m11{width:91.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.m12{width:100%;margin-left:auto;left:auto;right:auto}.row .col.offset-m1{margin-left:8.3333333333%}.row .col.pull-m1{right:8.3333333333%}.row .col.push-m1{left:8.3333333333%}.row .col.offset-m2{margin-left:16.6666666667%}.row .col.pull-m2{right:16.6666666667%}.row .col.push-m2{left:16.6666666667%}.row .col.offset-m3{margin-left:25%}.row .col.pull-m3{right:25%}.row .col.push-m3{left:25%}.row .col.offset-m4{margin-left:33.3333333333%}.row .col.pull-m4{right:33.3333333333%}.row .col.push-m4{left:33.3333333333%}.row .col.offset-m5{margin-left:41.6666666667%}.row .col.pull-m5{right:41.6666666667%}.row .col.push-m5{left:41.6666666667%}.row .col.offset-m6{margin-left:50%}.row .col.pull-m6{right:50%}.row .col.push-m6{left:50%}.row .col.offset-m7{margin-left:58.3333333333%}.row .col.pull-m7{right:58.3333333333%}.row .col.push-m7{left:58.3333333333%}.row .col.offset-m8{margin-left:66.6666666667%}.row .col.pull-m8{right:66.6666666667%}.row .col.push-m8{left:66.6666666667%}.row .col.offset-m9{margin-left:75%}.row .col.pull-m9{right:75%}.row .col.push-m9{left:75%}.row .col.offset-m10{margin-left:83.3333333333%}.row .col.pull-m10{right:83.3333333333%}.row .col.push-m10{left:83.3333333333%}.row .col.offset-m11{margin-left:91.6666666667%}.row .col.pull-m11{right:91.6666666667%}.row .col.push-m11{left:91.6666666667%}.row .col.offset-m12{margin-left:100%}.row .col.pull-m12{right:100%}.row .col.push-m12{left:100%}}@media only screen and (min-width :993px){.row .col.l1{width:8.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.l2{width:16.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.l3{width:25%;margin-left:auto;left:auto;right:auto}.row .col.l4{width:33.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.l5{width:41.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.l6{width:50%;margin-left:auto;left:auto;right:auto}.row .col.l7{width:58.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.l8{width:66.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.l9{width:75%;margin-left:auto;left:auto;right:auto}.row .col.l10{width:83.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.l11{width:91.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.l12{width:100%;margin-left:auto;left:auto;right:auto}.row .col.offset-l1{margin-left:8.3333333333%}.row .col.pull-l1{right:8.3333333333%}.row .col.push-l1{left:8.3333333333%}.row .col.offset-l2{margin-left:16.6666666667%}.row .col.pull-l2{right:16.6666666667%}.row .col.push-l2{left:16.6666666667%}.row .col.offset-l3{margin-left:25%}.row .col.pull-l3{right:25%}.row .col.push-l3{left:25%}.row .col.offset-l4{margin-left:33.3333333333%}.row .col.pull-l4{right:33.3333333333%}.row .col.push-l4{left:33.3333333333%}.row .col.offset-l5{margin-left:41.6666666667%}.row .col.pull-l5{right:41.6666666667%}.row .col.push-l5{left:41.6666666667%}.row .col.offset-l6{margin-left:50%}.row .col.pull-l6{right:50%}.row .col.push-l6{left:50%}.row .col.offset-l7{margin-left:58.3333333333%}.row .col.pull-l7{right:58.3333333333%}.row .col.push-l7{left:58.3333333333%}.row .col.offset-l8{margin-left:66.6666666667%}.row .col.pull-l8{right:66.6666666667%}.row .col.push-l8{left:66.6666666667%}.row .col.offset-l9{margin-left:75%}.row .col.pull-l9{right:75%}.row .col.push-l9{left:75%}.row .col.offset-l10{margin-left:83.3333333333%}.row .col.pull-l10{right:83.3333333333%}.row .col.push-l10{left:83.3333333333%}.row .col.offset-l11{margin-left:91.6666666667%}.row .col.pull-l11{right:91.6666666667%}.row .col.push-l11{left:91.6666666667%}.row .col.offset-l12{margin-left:100%}.row .col.pull-l12{right:100%}.row .col.push-l12{left:100%}}@media only screen and (min-width :1201px){.row .col.xl1{width:8.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.xl2{width:16.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.xl3{width:25%;margin-left:auto;left:auto;right:auto}.row .col.xl4{width:33.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.xl5{width:41.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.xl6{width:50%;margin-left:auto;left:auto;right:auto}.row .col.xl7{width:58.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.xl8{width:66.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.xl9{width:75%;margin-left:auto;left:auto;right:auto}.row .col.xl10{width:83.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.xl11{width:91.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.xl12{width:100%;margin-left:auto;left:auto;right:auto}.row .col.offset-xl1{margin-left:8.3333333333%}.row .col.pull-xl1{right:8.3333333333%}.row .col.push-xl1{left:8.3333333333%}.row .col.offset-xl2{margin-left:16.6666666667%}.row .col.pull-xl2{right:16.6666666667%}.row .col.push-xl2{left:16.6666666667%}.row .col.offset-xl3{margin-left:25%}.row .col.pull-xl3{right:25%}.row .col.push-xl3{left:25%}.row .col.offset-xl4{margin-left:33.3333333333%}.row .col.pull-xl4{right:33.3333333333%}.row .col.push-xl4{left:33.3333333333%}.row .col.offset-xl5{margin-left:41.6666666667%}.row .col.pull-xl5{right:41.6666666667%}.row .col.push-xl5{left:41.6666666667%}.row .col.offset-xl6{margin-left:50%}.row .col.pull-xl6{right:50%}.row .col.push-xl6{left:50%}.row .col.offset-xl7{margin-left:58.3333333333%}.row .col.pull-xl7{right:58.3333333333%}.row .col.push-xl7{left:58.3333333333%}.row .col.offset-xl8{margin-left:66.6666666667%}.row .col.pull-xl8{right:66.6666666667%}.row .col.push-xl8{left:66.6666666667%}.row .col.offset-xl9{margin-left:75%}.row .col.pull-xl9{right:75%}.row .col.push-xl9{left:75%}.row .col.offset-xl10{margin-left:83.3333333333%}.row .col.pull-xl10{right:83.3333333333%}.row .col.push-xl10{left:83.3333333333%}.row .col.offset-xl11{margin-left:91.6666666667%}.row .col.pull-xl11{right:91.6666666667%}.row .col.push-xl11{left:91.6666666667%}.row .col.offset-xl12{margin-left:100%}.row .col.pull-xl12{right:100%}.row .col.push-xl12{left:100%}}.tui-modal{position:absolute;left:0;right:0;top:100px;z-index:101;display:none}.tui-modal.active{display:block!important}.tui-overlap{position:absolute;top:0;left:0;right:0;bottom:0;z-index:100;display:none}.tui-overlap.active{display:block!important}.tui-chart-vertical{position:relative;background-color:#000}.tui-chart-horizontal{position:relative;background-color:#000}.tui-chart-vertical .tui-chart-display{display:flex;position:absolute;top:0;left:50px;right:0;bottom:30px;align-items:flex-end;border-bottom:2px solid #fff;border-left:2px solid #fff}.tui-chart-vertical .tui-chart-display.no-x-axis{bottom:0}.tui-chart-vertical .tui-chart-display.no-y-axis{left:0}.tui-chart-horizontal .tui-chart-display{display:flex;position:absolute;flex-direction:column;top:0;left:50px;right:0;bottom:30px;align-items:stretch;border-bottom:2px solid #fff;border-left:2px solid #fff}.tui-chart-horizontal .tui-chart-display.no-x-axis{bottom:0}.tui-chart-horizontal .tui-chart-display.no-y-axis{left:0}.tui-chart-x-axis{display:flex;position:absolute;height:30px;left:50px;right:0;bottom:0;line-height:30px}.tui-chart-y-axis{display:flex;flex-direction:column;position:absolute;top:0;left:0;bottom:30px;width:50px}.tui-chart-vertical .tui-chart-x-axis .tui-chart-legend{flex:0 1 100%;text-align:center}.tui-chart-vertical .tui-chart-y-axis .tui-chart-legend{flex:1;text-align:right;padding-right:2px;display:flex;align-items:flex-start;justify-content:flex-end}.tui-chart-horizontal .tui-chart-x-axis .tui-chart-legend{flex:0 1 100%;text-align:right}.tui-chart-horizontal .tui-chart-y-axis .tui-chart-legend{flex:1;text-align:right;padding-right:2px;display:flex;align-items:center;justify-content:flex-end}.tui-chart-vertical .tui-chart-display .tui-chart-value{flex:0 1 100%;text-align:center;overflow:hidden}.tui-chart-horizontal .tui-chart-display .tui-chart-value{flex:1;text-align:right;display:flex;align-items:center;align-content:flex-start;justify-content:flex-end;overflow:hidden}
\ No newline at end of file
diff --git a/src/index.html b/src/index.html
new file mode 100755
index 00000000..632ce798
--- /dev/null
+++ b/src/index.html
@@ -0,0 +1,202 @@
+
+
+
+
+
+
+
+ JavaScript Snake
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/js/ai-init.js b/src/js/ai-init.js
new file mode 100644
index 00000000..5f3e46bb
--- /dev/null
+++ b/src/js/ai-init.js
@@ -0,0 +1,58 @@
+const mySnakeBoard = new SNAKE.Board({
+ boardContainer: "game-area",
+ fullScreen: true,
+ premoveOnPause: false,
+ moveSnakeWithAI: ({
+ grid,
+ snakeHead,
+ currentDirection,
+ isFirstGameMove,
+ setDirection,
+ }) => {
+
+ /*
+ Direction:
+ 0
+ 3 1
+ 2
+ */
+
+ // This is NOT a real hamiltonian cycle. It misses some values, I'm just including this here as an example of
+ // a look-up type table that you could do.
+ const hamiltonianCycleGrid = [
+ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+ [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0],
+ [0, 0, 2, 3, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 0],
+ [0, 0, 2, 0, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0],
+ [0, 0, 2, 0, 2, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0],
+ [0, 0, 3, 0, 3, 3, 3, 3, 0, 3, 0, 3, 0, 3, 0],
+ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+ ]
+
+ console.log(JSON.parse(JSON.stringify(grid)))
+ console.log(snakeHead, currentDirection)
+
+ const newDirection = hamiltonianCycleGrid[snakeHead.row][snakeHead.col];
+ console.log(newDirection);
+ setDirection(newDirection);
+ },
+ onLengthUpdate: (length) => {
+ console.log(`Length: ${length}`);
+ },
+ onPauseToggle: (isPaused) => {
+ console.log(`Is paused: ${isPaused}`);
+ },
+ onInit: (params) => {
+ console.log("init!");
+ console.log(params);
+ params.startAIGame();
+ },
+ onWin: (params) => {
+ console.log("win!");
+ //params.startAIGame();
+ },
+ onDeath: (params) => {
+ console.log("dead!");
+ //params.startAIGame();
+ },
+});
diff --git a/src/js/init.js b/src/js/init.js
new file mode 100644
index 00000000..78d7a12b
--- /dev/null
+++ b/src/js/init.js
@@ -0,0 +1,40 @@
+// Reserve room for the on-screen gamepad (visible on touch devices only) so
+// the board ends above it instead of underneath it. When the gamepad is
+// hidden (desktop), offsetHeight is 0 and no space is reserved.
+const gamepad = document.getElementById("snake-gamepad");
+const gamepadOffset =
+ gamepad && gamepad.offsetHeight
+ ? Math.round(window.innerHeight - gamepad.getBoundingClientRect().top)
+ : 0;
+
+const mySnakeBoard = new SNAKE.Board({
+ boardContainer: "game-area",
+ fullScreen: true,
+ bottomOffset: gamepadOffset,
+ premoveOnPause: false,
+ dialogControls: document.getElementById("snake-dialog-controls"),
+ onLengthUpdate: (length) => {
+ console.log(`Length: ${length}`);
+ },
+ onPauseToggle: (isPaused) => {
+ console.log(`Is paused: ${isPaused}`);
+ },
+ onInit: (params) => {
+ console.log("init!");
+ console.log(params);
+ },
+ onWin: () => {
+ console.log("wn!");
+ },
+ onDeath: () => {
+ console.log("dead!");
+ },
+});
+
+// Wire up the on-screen gamepad shown on touch devices (markup in index.html).
+document.querySelectorAll("#snake-gamepad button").forEach((btn) => {
+ btn.addEventListener("pointerdown", (evt) => {
+ evt.preventDefault();
+ mySnakeBoard.simulateKeyPress(parseInt(btn.dataset.key, 10));
+ });
+});
diff --git a/src/js/snake.js b/src/js/snake.js
new file mode 100644
index 00000000..10d11238
--- /dev/null
+++ b/src/js/snake.js
@@ -0,0 +1,1606 @@
+/*
+JavaScript Snake
+First version by Patrick Gillespie - I've since merged in a good number of github pull requests
+http://patorjk.com/games/snake
+*/
+
+/**
+ * @module Snake
+ * @class SNAKE
+ */
+
+// this will allow us to access the game in other JS files when the app is loaded up in a codesandbox.com sandbox, that's the only reason it's here
+if (!window.SNAKE) {
+ window.SNAKE = {};
+}
+
+/*
+ Direction explained (0 = up, etc etc)
+ 0
+ 3 1
+ 2
+*/
+const MOVE_NONE = -1;
+const MOVE_UP = 0;
+const MOVE_LEFT = 3;
+const MOVE_DOWN = 2;
+const MOVE_RIGHT = 1;
+
+const MIN_SNAKE_SPEED = 25;
+const RUSH_INCR = 5;
+
+const DEFAULT_SNAKE_SPEED = 80;
+
+// On touch devices the snake moves a bit slower (more ms per move) for every
+// difficulty setting.
+const TOUCH_SPEED_FACTOR = 2;
+
+function adjustSpeedForDevice(speed) {
+ const isTouchDevice =
+ window.matchMedia && window.matchMedia("(pointer: coarse)").matches;
+ return isTouchDevice ? Math.round(speed * TOUCH_SPEED_FACTOR) : speed;
+}
+
+const BOARD_NOT_READY = 0;
+const BOARD_READY = 1;
+const BOARD_IN_PLAY = 2;
+
+const HIGH_SCORE_KEY = "jsSnakeHighScore";
+
+/**
+ * @method addEventListener
+ * @param {Object} obj The object to add an event listener to.
+ * @param {String} event The event to listen for.
+ * @param {Function} funct The function to execute when the event is triggered.
+ * @param {Boolean} evtCapturing True to do event capturing, false to do event bubbling.
+ */
+SNAKE.addEventListener = (function () {
+ if (window.addEventListener) {
+ return function (obj, event, funct, evtCapturing) {
+ obj.addEventListener(event, funct, evtCapturing);
+ };
+ } else if (window.attachEvent) {
+ return function (obj, event, funct) {
+ obj.attachEvent("on" + event, funct);
+ };
+ }
+})();
+
+/**
+ * @method removeEventListener
+ * @param {Object} obj The object to remove an event listener from.
+ * @param {String} event The event that was listened for.
+ * @param {Function} funct The function that was executed when the event is triggered.
+ * @param {Boolean} evtCapturing True if event capturing was done, false otherwise.
+ */
+
+SNAKE.removeEventListener = (function () {
+ if (window.removeEventListener) {
+ return function (obj, event, funct, evtCapturing) {
+ obj.removeEventListener(event, funct, evtCapturing);
+ };
+ } else if (window.detachEvent) {
+ return function (obj, event, funct) {
+ obj.detachEvent("on" + event, funct);
+ };
+ }
+})();
+
+/**
+ * Displays a DOS-style dialog.
+ *
+ * @method showAlert
+ * @param {String} message The text to display.
+ * @param {Function} onClose Optional function to call once the dialog is dismissed.
+ */
+SNAKE.showAlert = function (message, onClose) {
+ const overlay = document.createElement("div");
+ overlay.className = "snake-dos-overlay";
+
+ const dialog = document.createElement("div");
+ dialog.className = "snake-dos-alert tui-window tui-border-double";
+
+ const dialogTxt = document.createElement("div");
+ dialogTxt.className = "snake-dos-alert-message";
+ dialogTxt.appendChild(document.createTextNode(message));
+
+ const dialogBtn = document.createElement("button");
+ dialogBtn.className = "tui-button";
+ dialogBtn.appendChild(document.createTextNode("OK"));
+
+ // pressing enter with the button focused fires both a click and the keyup listener
+ let isClosed = false;
+ const close = function () {
+ if (isClosed) {
+ return;
+ }
+ isClosed = true;
+ SNAKE.removeEventListener(window, "keyup", kbShortcut, true);
+ document.body.removeChild(overlay);
+ if (onClose) {
+ onClose();
+ }
+ };
+
+ const kbShortcut = function (evt) {
+ if (!evt) evt = window.event;
+ const keyNum = evt.which ? evt.which : evt.keyCode;
+ if (keyNum === 13 || keyNum === 32 || keyNum === 27) {
+ close();
+ }
+ };
+
+ SNAKE.addEventListener(window, "keyup", kbShortcut, true);
+ SNAKE.addEventListener(dialogBtn, "click", close, false);
+
+ dialog.appendChild(dialogTxt);
+ dialog.appendChild(dialogBtn);
+ overlay.appendChild(dialog);
+ document.body.appendChild(overlay);
+ dialogBtn.focus();
+};
+
+/**
+ * This class manages the snake which will reside inside of a SNAKE.Board object.
+ * @class Snake
+ * @constructor
+ * @namespace SNAKE
+ * @param {Object} config The configuration object for the class. Contains playingBoard (the SNAKE.Board that this snake resides in), startRow and startCol.
+ */
+SNAKE.Snake =
+ SNAKE.Snake ||
+ (function () {
+ // -------------------------------------------------------------------------
+ // Private static variables and methods
+ // -------------------------------------------------------------------------
+
+ const blockPool = [];
+
+ const SnakeBlock = function () {
+ this.elm = null;
+ this.elmStyle = null;
+ this.row = -1;
+ this.col = -1;
+ this.next = null;
+ this.prev = null;
+ };
+
+ // this function is adapted from the example at http://greengeckodesign.com/blog/2007/07/get-highest-z-index-in-javascript.html
+ function getNextHighestZIndex(myObj) {
+ let highestIndex = 0,
+ currentIndex = 0,
+ ii;
+ for (ii in myObj) {
+ if (myObj[ii].elm.currentStyle) {
+ currentIndex = parseFloat(myObj[ii].elm.style["z-index"], 10);
+ } else if (window.getComputedStyle) {
+ currentIndex = parseFloat(
+ document.defaultView
+ .getComputedStyle(myObj[ii].elm, null)
+ .getPropertyValue("z-index"),
+ 10,
+ );
+ }
+ if (!isNaN(currentIndex) && currentIndex > highestIndex) {
+ highestIndex = currentIndex;
+ }
+ }
+ return highestIndex + 1;
+ }
+
+ // -------------------------------------------------------------------------
+ // Contructor + public and private definitions
+ // -------------------------------------------------------------------------
+
+ /*
+ config options:
+ playingBoard - the SnakeBoard that this snake belongs too.
+ startRow - The row the snake should start on.
+ startCol - The column the snake should start on.
+ moveSnakeWithAI - function to move the snake with AI
+ */
+ return function (config) {
+ if (!config || !config.playingBoard) {
+ return;
+ }
+ if (localStorage[HIGH_SCORE_KEY] === undefined)
+ localStorage.setItem(HIGH_SCORE_KEY, 0);
+
+ // ----- private variables -----
+
+ const me = this;
+ const playingBoard = config.playingBoard;
+ const growthIncr = 5;
+ const columnShift = [0, 1, 0, -1];
+ const rowShift = [-1, 0, 1, 0];
+ let prevNode;
+
+ let lastMove = 1,
+ preMove = MOVE_NONE,
+ isFirstGameMove = true,
+ currentDirection = MOVE_NONE, // 0: up, 1: left, 2: down, 3: right
+ snakeSpeed = adjustSpeedForDevice(DEFAULT_SNAKE_SPEED),
+ isDead = false,
+ isPaused = false;
+
+ const modeDropdown = document.getElementById("selectMode");
+ if (modeDropdown) {
+ modeDropdown.addEventListener("change", function (evt) {
+ evt = evt || {};
+ let val = evt.target
+ ? parseInt(evt.target.value)
+ : DEFAULT_SNAKE_SPEED;
+
+ if (isNaN(val)) {
+ val = DEFAULT_SNAKE_SPEED;
+ } else if (val < MIN_SNAKE_SPEED) {
+ val = DEFAULT_SNAKE_SPEED;
+ }
+
+ snakeSpeed = adjustSpeedForDevice(val);
+
+ setTimeout(function () {
+ document.getElementById("game-area").focus();
+ }, 10);
+ });
+ }
+
+ // ----- public variables -----
+ me.snakeBody = {};
+ me.snakeBody["b0"] = new SnakeBlock(); // create snake head
+ me.snakeBody["b0"].row = config.startRow || 1;
+ me.snakeBody["b0"].col = config.startCol || 1;
+ me.snakeBody["b0"].elm = createSnakeElement();
+ me.snakeBody["b0"].elmStyle = me.snakeBody["b0"].elm.style;
+ playingBoard.getBoardContainer().appendChild(me.snakeBody["b0"].elm);
+ me.snakeBody["b0"].elm.style.left = getLeftPosition(me.snakeBody["b0"]);
+ me.snakeBody["b0"].elm.style.top = getTopPosition(me.snakeBody["b0"]);
+ me.snakeBody["b0"].next = me.snakeBody["b0"];
+ me.snakeBody["b0"].prev = me.snakeBody["b0"];
+
+ me.snakeLength = 1;
+ me.snakeHead = me.snakeBody["b0"];
+ me.snakeTail = me.snakeBody["b0"];
+ me.snakeHead.elm.className = me.snakeHead.elm.className.replace(
+ /\bsnake-snakebody-dead\b/,
+ "",
+ );
+ me.snakeHead.elm.id = "snake-snakehead-alive";
+ me.snakeHead.elm.className += " snake-snakebody-alive";
+
+ // ----- private methods -----
+
+ function getTopPosition(block) {
+ const num = block.row * playingBoard.getBlockHeight();
+ return `${num}px`;
+ }
+
+ function getLeftPosition(block) {
+ const num = block.col * playingBoard.getBlockWidth();
+ return `${num}px`;
+ }
+
+ function createSnakeElement() {
+ const tempNode = document.createElement("div");
+ tempNode.className = "snake-snakebody-block";
+ tempNode.style.left = "-1000px";
+ tempNode.style.top = "-1000px";
+ tempNode.style.width = playingBoard.getBlockWidth() + "px";
+ tempNode.style.height = playingBoard.getBlockHeight() + "px";
+ return tempNode;
+ }
+
+ function createBlocks(num) {
+ let tempBlock;
+ const tempNode = createSnakeElement();
+
+ for (let ii = 1; ii < num; ii++) {
+ tempBlock = new SnakeBlock();
+ tempBlock.elm = tempNode.cloneNode(true);
+ tempBlock.elmStyle = tempBlock.elm.style;
+ playingBoard.getBoardContainer().appendChild(tempBlock.elm);
+ blockPool[blockPool.length] = tempBlock;
+ }
+
+ tempBlock = new SnakeBlock();
+ tempBlock.elm = tempNode;
+ playingBoard.getBoardContainer().appendChild(tempBlock.elm);
+ blockPool[blockPool.length] = tempBlock;
+ }
+
+ function recordScore(onDone) {
+ const highScore = localStorage[HIGH_SCORE_KEY];
+ if (me.snakeLength > highScore) {
+ localStorage.setItem(HIGH_SCORE_KEY, me.snakeLength);
+ SNAKE.showAlert(
+ "Congratulations! You have beaten your previous high score, which was " +
+ highScore +
+ ".",
+ onDone,
+ );
+ return;
+ }
+ onDone();
+ }
+
+ function handleEndCondition(handleFunc) {
+ me.snakeHead.elm.style.zIndex = getNextHighestZIndex(me.snakeBody);
+ me.snakeHead.elm.className = me.snakeHead.elm.className.replace(
+ /\bsnake-snakebody-alive\b/,
+ "",
+ );
+ me.snakeHead.elm.className += " snake-snakebody-dead";
+
+ isDead = true;
+ recordScore(handleFunc);
+ }
+
+ // ----- public methods -----
+
+ me.setPaused = function (val) {
+ isPaused = val;
+ };
+ me.getPaused = function () {
+ return isPaused;
+ };
+
+ /**
+ * This method sets the snake direction
+ * @param direction
+ */
+ me.setDirection = (direction) => {
+ if (currentDirection !== lastMove) {
+ // Allow a queue of 1 premove so you can turn again before the first turn registers
+ preMove = direction;
+ }
+ if (Math.abs(direction - lastMove) !== 2 || isFirstGameMove) {
+ // Prevent snake from turning 180 degrees
+ currentDirection = direction;
+ isFirstGameMove = false;
+ }
+ };
+
+ /**
+ * This method is called when a user presses a key. It logs arrow key presses in "currentDirection", which is used when the snake needs to make its next move.
+ * @method handleArrowKeys
+ * @param {Number} keyNum A number representing the key that was pressed.
+ */
+ /*
+ Handles what happens when an arrow key is pressed.
+ Direction explained (0 = up, etc etc)
+ 0
+ 3 1
+ 2
+ */
+ me.handleArrowKeys = function (keyNum) {
+ if (isDead || (isPaused && !config.premoveOnPause)) {
+ return;
+ }
+
+ const keyToDirection = {
+ 37: MOVE_LEFT, // Left arrow
+ 65: MOVE_LEFT, // 'A' key
+ 38: MOVE_UP, // Up arrow
+ 87: MOVE_UP, // 'W' key
+ 39: MOVE_RIGHT, // Right arrow
+ 68: MOVE_RIGHT, // 'D' key
+ 40: MOVE_DOWN, // Down arrow
+ 83: MOVE_DOWN // 'S' key
+ };
+
+ const directionFound = keyToDirection[keyNum] ?? MOVE_NONE;
+ me.setDirection(directionFound);
+ };
+
+ /**
+ * This method is executed for each move of the snake. It determines where the snake will go and what will happen to it. This method needs to run quickly.
+ * @method go
+ */
+ me.go = function () {
+ const oldHead = me.snakeHead,
+ newHead = me.snakeTail,
+ grid = playingBoard.grid; // cache grid for quicker lookup
+
+ if (isPaused === true) {
+ setTimeout(function () {
+ me.go();
+ }, snakeSpeed);
+ return;
+ }
+
+ // code to execute if snake is being moved by AI
+ if (config.moveSnakeWithAI) {
+ config.moveSnakeWithAI({
+ grid,
+ snakeHead: me.snakeHead,
+ currentDirection,
+ isFirstGameMove,
+ setDirection: me.setDirection,
+ });
+ }
+
+ me.snakeTail = newHead.prev;
+ me.snakeHead = newHead;
+
+ // clear the old board position
+ if (grid[newHead.row] && grid[newHead.row][newHead.col]) {
+ grid[newHead.row][newHead.col] = 0;
+ }
+
+ if (currentDirection !== MOVE_NONE) {
+ lastMove = currentDirection;
+ if (preMove !== MOVE_NONE) {
+ // If the user queued up another move after the current one
+ currentDirection = preMove; // Execute that move next time (unless overwritten)
+ preMove = MOVE_NONE;
+ }
+ }
+
+ newHead.col = oldHead.col + columnShift[lastMove];
+ newHead.row = oldHead.row + rowShift[lastMove];
+
+ if (!newHead.elmStyle) {
+ newHead.elmStyle = newHead.elm.style;
+ }
+
+ newHead.elmStyle.left = getLeftPosition(newHead);
+ newHead.elmStyle.top = getTopPosition(newHead);
+ if (me.snakeLength > 1) {
+ newHead.elm.id = "snake-snakehead-alive";
+ oldHead.elm.id = "";
+ }
+
+ // check the new spot the snake moved into
+
+ if (grid[newHead.row][newHead.col] === 0) {
+ grid[newHead.row][newHead.col] = 1;
+ setTimeout(function () {
+ me.go();
+ }, snakeSpeed);
+ } else if (grid[newHead.row][newHead.col] > 0) {
+ me.handleDeath();
+ } else if (
+ grid[newHead.row][newHead.col] === playingBoard.getGridFoodValue()
+ ) {
+ grid[newHead.row][newHead.col] = 1;
+ if (!me.eatFood()) {
+ me.handleWin();
+ return;
+ }
+ setTimeout(function () {
+ me.go();
+ }, snakeSpeed);
+ }
+ };
+
+ /**
+ * This method is called when it is determined that the snake has eaten some food.
+ * @method eatFood
+ * @return {bool} Whether a new food was able to spawn (true)
+ * or not (false) after the snake eats food.
+ */
+ me.eatFood = function () {
+ if (blockPool.length <= growthIncr) {
+ createBlocks(growthIncr * 2);
+ }
+ const blocks = blockPool.splice(0, growthIncr);
+
+ let ii = blocks.length,
+ index;
+ prevNode = me.snakeTail;
+ while (ii--) {
+ index = "b" + me.snakeLength++;
+ me.snakeBody[index] = blocks[ii];
+ me.snakeBody[index].prev = prevNode;
+ me.snakeBody[index].elm.className =
+ me.snakeHead.elm.className.replace(/\bsnake-snakebody-dead\b/, "");
+ me.snakeBody[index].elm.className += " snake-snakebody-alive";
+ prevNode.next = me.snakeBody[index];
+ prevNode = me.snakeBody[index];
+ }
+ me.snakeTail = me.snakeBody[index];
+ me.snakeTail.next = me.snakeHead;
+ me.snakeHead.prev = me.snakeTail;
+
+ if (!playingBoard.foodEaten()) {
+ return false;
+ }
+
+ //Checks if the current selected option is that of "Rush"
+ //If so, "increase" the snake speed
+ const selectDropDown = document.getElementById("selectMode");
+ const selectedOption =
+ selectDropDown.options[selectDropDown.selectedIndex];
+
+ if (selectedOption.text.localeCompare("Rush") == 0) {
+ if (snakeSpeed > adjustSpeedForDevice(MIN_SNAKE_SPEED) + RUSH_INCR) {
+ snakeSpeed -= RUSH_INCR;
+ }
+ }
+
+ return true;
+ };
+
+ /**
+ * This method handles what happens when the snake dies.
+ * @method handleDeath
+ */
+ me.handleDeath = function () {
+ //Reset speed
+ const selectedSpeed = document.getElementById("selectMode").value;
+ snakeSpeed = adjustSpeedForDevice(parseInt(selectedSpeed));
+
+ handleEndCondition(playingBoard.handleDeath);
+ };
+
+ /**
+ * This method handles what happens when the snake wins.
+ * @method handleDeath
+ */
+ me.handleWin = function () {
+ handleEndCondition(playingBoard.handleWin);
+ };
+
+ /**
+ * This method sets a flag that lets the snake be alive again.
+ * @method rebirth
+ */
+ me.rebirth = function () {
+ isDead = false;
+ isFirstGameMove = true;
+ preMove = MOVE_NONE;
+ };
+
+ /**
+ * This method reset the snake so it is ready for a new game.
+ * @method reset
+ */
+ me.reset = function () {
+ if (isDead === false) {
+ return;
+ }
+
+ const blocks = [];
+ let curNode = me.snakeHead.next;
+ let nextNode;
+
+ while (curNode !== me.snakeHead) {
+ nextNode = curNode.next;
+ curNode.prev = null;
+ curNode.next = null;
+ blocks.push(curNode);
+ curNode = nextNode;
+ }
+ me.snakeHead.next = me.snakeHead;
+ me.snakeHead.prev = me.snakeHead;
+ me.snakeTail = me.snakeHead;
+ me.snakeLength = 1;
+
+ for (let ii = 0; ii < blocks.length; ii++) {
+ blocks[ii].elm.style.left = "-1000px";
+ blocks[ii].elm.style.top = "-1000px";
+ blocks[ii].elm.className = me.snakeHead.elm.className.replace(
+ /\bsnake-snakebody-dead\b/,
+ "",
+ );
+ blocks[ii].elm.className += " snake-snakebody-alive";
+ }
+
+ blockPool.concat(blocks);
+ me.snakeHead.elm.className = me.snakeHead.elm.className.replace(
+ /\bsnake-snakebody-dead\b/,
+ "",
+ );
+ me.snakeHead.elm.className += " snake-snakebody-alive";
+ me.snakeHead.elm.id = "snake-snakehead-alive";
+ me.snakeHead.row = config.startRow || 1;
+ me.snakeHead.col = config.startCol || 1;
+ me.snakeHead.elm.style.left = getLeftPosition(me.snakeHead);
+ me.snakeHead.elm.style.top = getTopPosition(me.snakeHead);
+ };
+
+ me.getSpeed = () => {
+ return snakeSpeed;
+ };
+ me.setSpeed = (speed) => {
+ snakeSpeed = speed;
+ };
+
+ // ---------------------------------------------------------------------
+ // Initialize
+ // ---------------------------------------------------------------------
+ createBlocks(growthIncr * 2);
+ };
+ })();
+
+/**
+ * This class manages the food which the snake will eat.
+ * @class Food
+ * @constructor
+ * @namespace SNAKE
+ * @param {Object} config The configuration object for the class. Contains playingBoard (the SNAKE.Board that this food resides in).
+ */
+
+SNAKE.Food =
+ SNAKE.Food ||
+ (function () {
+ // -------------------------------------------------------------------------
+ // Private static variables and methods
+ // -------------------------------------------------------------------------
+
+ let instanceNumber = 0;
+
+ function getRandomPosition(x, y) {
+ return Math.floor(Math.random() * (y + 1 - x)) + x;
+ }
+
+ // -------------------------------------------------------------------------
+ // Constructor + public and private definitions
+ // -------------------------------------------------------------------------
+
+ /*
+ config options:
+ playingBoard - the SnakeBoard that this object belongs too.
+ */
+ return function (config) {
+ if (!config || !config.playingBoard) {
+ return;
+ }
+
+ // ----- private variables -----
+
+ const me = this;
+ const playingBoard = config.playingBoard;
+ let fRow, fColumn;
+ const myId = instanceNumber++;
+
+ const elmFood = document.createElement("div");
+ elmFood.setAttribute("id", "snake-food-" + myId);
+ elmFood.className = "snake-food-block";
+ elmFood.style.width = playingBoard.getBlockWidth() + "px";
+ elmFood.style.height = playingBoard.getBlockHeight() + "px";
+ elmFood.style.left = "-1000px";
+ elmFood.style.top = "-1000px";
+ playingBoard.getBoardContainer().appendChild(elmFood);
+
+ // ----- public methods -----
+
+ /**
+ * @method getFoodElement
+ * @return {DOM Element} The div the represents the food.
+ */
+ me.getFoodElement = function () {
+ return elmFood;
+ };
+
+ /**
+ * Randomly places the food onto an available location on the playing board.
+ * @method randomlyPlaceFood
+ * @return {bool} Whether a food was able to spawn (true) or not (false).
+ */
+ me.randomlyPlaceFood = function () {
+ // if there exist some food, clear its presence from the board
+ if (
+ playingBoard.grid[fRow] &&
+ playingBoard.grid[fRow][fColumn] === playingBoard.getGridFoodValue()
+ ) {
+ playingBoard.grid[fRow][fColumn] = 0;
+ }
+
+ let row = 0,
+ col = 0,
+ numTries = 0;
+
+ const maxRows = playingBoard.grid.length - 1;
+ const maxCols = playingBoard.grid[0].length - 1;
+
+ while (playingBoard.grid[row][col] !== 0) {
+ row = getRandomPosition(1, maxRows);
+ col = getRandomPosition(1, maxCols);
+
+ // in some cases there may not be any room to put food anywhere
+ // instead of freezing, exit out (and return false to indicate
+ // that the player beat the game)
+ numTries++;
+ if (numTries > 20000) {
+ return false;
+ }
+ }
+
+ playingBoard.grid[row][col] = playingBoard.getGridFoodValue();
+ fRow = row;
+ fColumn = col;
+ elmFood.style.top = row * playingBoard.getBlockHeight() + "px";
+ elmFood.style.left = col * playingBoard.getBlockWidth() + "px";
+ return true;
+ };
+ };
+ })();
+
+/**
+ * This class manages playing board for the game.
+ * @class Board
+ * @constructor
+ * @namespace SNAKE
+ * @param {Object} config The configuration object for the class. Set fullScreen equal to true if you want the game to take up the full screen, otherwise, set the top, left, width and height parameters.
+ */
+
+SNAKE.Board =
+ SNAKE.Board ||
+ (function () {
+ // -------------------------------------------------------------------------
+ // Private static variables and methods
+ // -------------------------------------------------------------------------
+
+ let instanceNumber = 0;
+
+ // this function is adapted from the example at http://greengeckodesign.com/blog/2007/07/get-highest-z-index-in-javascript.html
+ function getNextHighestZIndex(myObj) {
+ let highestIndex = 0,
+ currentIndex = 0,
+ ii;
+ for (ii in myObj) {
+ if (myObj[ii].elm.currentStyle) {
+ currentIndex = parseFloat(myObj[ii].elm.style["z-index"], 10);
+ } else if (window.getComputedStyle) {
+ currentIndex = parseFloat(
+ document.defaultView
+ .getComputedStyle(myObj[ii].elm, null)
+ .getPropertyValue("z-index"),
+ 10,
+ );
+ }
+ if (!isNaN(currentIndex) && currentIndex > highestIndex) {
+ highestIndex = currentIndex;
+ }
+ }
+ return highestIndex + 1;
+ }
+
+ /*
+ This function returns the width of the available screen real estate that we have
+ */
+ function getClientWidth() {
+ let myWidth = 0;
+ if (typeof window.innerWidth === "number") {
+ myWidth = window.innerWidth; //Non-IE
+ } else if (
+ document.documentElement &&
+ (document.documentElement.clientWidth ||
+ document.documentElement.clientHeight)
+ ) {
+ myWidth = document.documentElement.clientWidth; //IE 6+ in 'standards compliant mode'
+ } else if (
+ document.body &&
+ (document.body.clientWidth || document.body.clientHeight)
+ ) {
+ myWidth = document.body.clientWidth; //IE 4 compatible
+ }
+ return myWidth;
+ }
+
+ /*
+ This function returns the height of the available screen real estate that we have
+ */
+ function getClientHeight() {
+ let myHeight = 0;
+ if (typeof window.innerHeight === "number") {
+ myHeight = window.innerHeight; //Non-IE
+ } else if (
+ document.documentElement &&
+ (document.documentElement.clientWidth ||
+ document.documentElement.clientHeight)
+ ) {
+ myHeight = document.documentElement.clientHeight; //IE 6+ in 'standards compliant mode'
+ } else if (
+ document.body &&
+ (document.body.clientWidth || document.body.clientHeight)
+ ) {
+ myHeight = document.body.clientHeight; //IE 4 compatible
+ }
+ return myHeight;
+ }
+
+ // -------------------------------------------------------------------------
+ // Contructor + public and private definitions
+ // -------------------------------------------------------------------------
+
+ return function (inputConfig) {
+ // --- private variables ---
+ const me = this;
+ const myId = instanceNumber++;
+ const config = inputConfig || {};
+ const MAX_BOARD_COLS = 250;
+ const MAX_BOARD_ROWS = 250;
+ const blockWidth = 20;
+ const blockHeight = 20;
+ const GRID_FOOD_VALUE = -1; // the value of a spot on the board that represents snake food; MUST BE NEGATIVE
+
+ // defaults
+ if (!config.onLengthUpdate) {
+ config.onLengthUpdate = () => { };
+ }
+
+ if (!config.onPauseToggle) {
+ config.onPauseToggle = () => { };
+ }
+ if (!config.onWin) {
+ config.onWin = () => { };
+ }
+ if (!config.onDeath) {
+ config.onDeath = () => { };
+ }
+
+ const dialogControls = config.dialogControls || null;
+ if (dialogControls) {
+ SNAKE.addEventListener(
+ dialogControls,
+ "keydown",
+ function (evt) {
+ if (!evt) evt = window.event;
+ evt.cancelBubble = true;
+ if (evt.stopPropagation) {
+ evt.stopPropagation();
+ }
+ },
+ false,
+ );
+ }
+
+ let myFood,
+ mySnake,
+ boardState = BOARD_READY, // 0: in active, 1: awaiting game start, 2: playing game
+ myKeyListener,
+ myWindowListener,
+ isPaused = false; //note: both the board and the snake can be paused
+
+ // Board components
+ let elmContainer,
+ elmPlayingField,
+ elmAboutPanel,
+ elmLengthPanel,
+ elmHighscorePanel,
+ elmMobileLinksPanel,
+ elmWelcome,
+ elmTryAgain,
+ elmWin,
+ elmPauseScreen;
+
+ // --- public variables ---
+ me.grid = [];
+
+ // ---------------------------------------------------------------------
+ // private functions
+ // ---------------------------------------------------------------------
+
+ function getStartRow() {
+ return config.startRow || 2;
+ }
+
+ function getStartCol() {
+ return config.startCol || 2;
+ }
+
+ function createBoardElements() {
+ elmPlayingField = document.createElement("div");
+ elmPlayingField.setAttribute("id", "playingField");
+ elmPlayingField.className = "snake-playing-field";
+
+ SNAKE.addEventListener(
+ elmPlayingField,
+ "click",
+ function () {
+ elmContainer.focus();
+ },
+ false,
+ );
+
+ elmPauseScreen = document.createElement("div");
+ elmPauseScreen.className =
+ "snake-pause-screen tui-window tui-border-double";
+ elmPauseScreen.innerHTML =
+ "[Paused]
Press [space] to unpause.
";
+
+ elmAboutPanel = document.createElement("div");
+ elmAboutPanel.className = "snake-panel-component";
+ elmAboutPanel.innerHTML =
+ "patorjk.com - source code - pat's youtube";
+
+ elmLengthPanel = document.createElement("div");
+ elmLengthPanel.className = "snake-panel-component";
+ elmLengthPanel.style.paddingLeft = "0px";
+ elmLengthPanel.style.paddingRight = "0px";
+ elmLengthPanel.style.textAlign = "left";
+ elmLengthPanel.innerHTML = "Length: 1";
+
+ elmHighscorePanel = document.createElement("div");
+ elmHighscorePanel.className = "snake-panel-component";
+ elmHighscorePanel.style.paddingLeft = "0px";
+ elmHighscorePanel.style.paddingRight = "0px";
+ elmHighscorePanel.style.textAlign = "right";
+ elmHighscorePanel.innerHTML =
+ "Highscore: " + (localStorage[HIGH_SCORE_KEY] || 0);
+
+ // stacked links shown under the highscore in the compact
+ // (mobile/on-screen-controls) layout; replaces the about panel
+ elmMobileLinksPanel = document.createElement("div");
+ elmMobileLinksPanel.className = "snake-panel-component";
+ elmMobileLinksPanel.style.display = "none";
+ elmMobileLinksPanel.innerHTML =
+ "patorjk.com
" +
+ "pat's youtube";
+
+ // if it's not AI, show the dialogs
+ if (!config.moveSnakeWithAI) {
+ elmWelcome = createWelcomeElement();
+ elmTryAgain = createTryAgainElement();
+ elmWin = createWinElement();
+ }
+
+ SNAKE.addEventListener(
+ elmContainer,
+ "keyup",
+ function (evt) {
+ if (!evt) evt = window.event;
+ evt.cancelBubble = true;
+ if (evt.stopPropagation) {
+ evt.stopPropagation();
+ }
+ if (evt.preventDefault) {
+ evt.preventDefault();
+ }
+ return false;
+ },
+ false,
+ );
+
+ elmContainer.className = "snake-game-container";
+
+ elmPauseScreen.style.zIndex = 10000;
+ elmContainer.appendChild(elmPauseScreen);
+ elmContainer.appendChild(elmPlayingField);
+ elmContainer.appendChild(elmAboutPanel);
+ elmContainer.appendChild(elmLengthPanel);
+ elmContainer.appendChild(elmHighscorePanel);
+ elmContainer.appendChild(elmMobileLinksPanel);
+
+ // nothing to attach if using AI
+ if (!config.moveSnakeWithAI) {
+ elmContainer.appendChild(elmWelcome);
+ elmContainer.appendChild(elmTryAgain);
+ elmContainer.appendChild(elmWin);
+ }
+
+ mySnake = new SNAKE.Snake({
+ playingBoard: me,
+ startRow: getStartRow(),
+ startCol: getStartCol(),
+ premoveOnPause: config.premoveOnPause,
+ moveSnakeWithAI: config.moveSnakeWithAI,
+ });
+ myFood = new SNAKE.Food({ playingBoard: me });
+
+ if (elmWelcome) {
+ elmWelcome.style.zIndex = 1000;
+ }
+ }
+
+ function attachDialogControls(dialogElm) {
+ if (dialogControls) {
+ dialogElm.appendChild(dialogControls);
+ }
+ }
+
+ // true if a keyboard event is aimed at one of the dialog controls rather than the dialog itself
+ function isControlKeyEvent(evt) {
+ const target = evt.target || evt.srcElement;
+ return (
+ target &&
+ (target.tagName === "SELECT" || target.tagName === "BUTTON")
+ );
+ }
+
+ function maxBoardWidth() {
+ return MAX_BOARD_COLS * me.getBlockWidth();
+ }
+
+ function maxBoardHeight() {
+ return MAX_BOARD_ROWS * me.getBlockHeight();
+ }
+
+ function createWelcomeElement() {
+ const tmpElm = document.createElement("div");
+ tmpElm.id = "sbWelcome" + myId;
+ tmpElm.className = "snake-welcome-dialog tui-window tui-border-double";
+
+ const welcomeTxt = document.createElement("div");
+ // same condition that shows the on-screen game pad (see index.html)
+ const isTouchDevice =
+ window.matchMedia && window.matchMedia("(pointer: coarse)").matches;
+ let fullScreenText = "";
+ if (config.fullScreen) {
+ fullScreenText = "On Windows, press F11 to play in Full Screen mode.";
+ }
+ welcomeTxt.innerHTML = isTouchDevice
+ ? "JavaScript SnakeUse the on-screen game pad to play the game."
+ : "JavaScript SnakeUse the arrow keys on your keyboard to play the game. " +
+ fullScreenText +
+ "";
+ const welcomeStart = document.createElement("button");
+ welcomeStart.className = "tui-button";
+ welcomeStart.appendChild(document.createTextNode("Play Game"));
+
+ const loadGame = function () {
+ SNAKE.removeEventListener(window, "keyup", kbShortcut, false);
+ tmpElm.style.display = "none";
+ me.setBoardState(BOARD_READY);
+ me.getBoardContainer().focus();
+ };
+
+ const kbShortcut = function (evt) {
+ if (!evt) evt = window.event;
+ if (isControlKeyEvent(evt)) {
+ return;
+ }
+ const keyNum = evt.which ? evt.which : evt.keyCode;
+ if (keyNum === 32 || keyNum === 13) {
+ loadGame();
+ }
+ };
+
+ SNAKE.addEventListener(window, "keyup", kbShortcut, false);
+ SNAKE.addEventListener(welcomeStart, "click", loadGame, false);
+
+ tmpElm.appendChild(welcomeTxt);
+ tmpElm.appendChild(welcomeStart);
+ attachDialogControls(tmpElm);
+ return tmpElm;
+ }
+
+ function createGameEndElement(message, elmId, elmClassName) {
+ const tmpElm = document.createElement("div");
+ tmpElm.id = elmId + myId;
+ tmpElm.className = elmClassName + " tui-window tui-border-double";
+
+ const gameEndTxt = document.createElement("div");
+ gameEndTxt.innerHTML = "JavaScript Snake" + message + "";
+ const gameEndStart = document.createElement("button");
+ gameEndStart.className = "tui-button";
+ gameEndStart.appendChild(document.createTextNode("Play Again?"));
+
+ const reloadGame = function () {
+ tmpElm.style.display = "none";
+ me.resetBoard();
+ me.setBoardState(BOARD_READY);
+ me.getBoardContainer().focus();
+ };
+
+ const kbGameEndShortcut = function (evt) {
+ if (boardState !== 0 || tmpElm.style.display !== "block") {
+ return;
+ }
+ if (!evt) evt = window.event;
+ if (isControlKeyEvent(evt)) {
+ return;
+ }
+ const keyNum = evt.which ? evt.which : evt.keyCode;
+ if (keyNum === 32 || keyNum === 13) {
+ reloadGame();
+ }
+ };
+ SNAKE.addEventListener(window, "keyup", kbGameEndShortcut, true);
+
+ SNAKE.addEventListener(gameEndStart, "click", reloadGame, false);
+ tmpElm.appendChild(gameEndTxt);
+ tmpElm.appendChild(gameEndStart);
+ return tmpElm;
+ }
+
+ function createTryAgainElement() {
+ return createGameEndElement(
+ "You died :(",
+ "sbTryAgain",
+ "snake-try-again-dialog",
+ );
+ }
+
+ function createWinElement() {
+ return createGameEndElement("You win! :D", "sbWin", "snake-win-dialog");
+ }
+
+ function handleEndCondition(elmDialog) {
+ const index = Math.max(
+ getNextHighestZIndex(mySnake.snakeBody),
+ getNextHighestZIndex({ tmp: { elm: myFood.getFoodElement() } }),
+ );
+ if (elmDialog) {
+ attachDialogControls(elmDialog);
+ elmContainer.removeChild(elmDialog);
+ elmContainer.appendChild(elmDialog);
+ elmDialog.style.zIndex = index;
+ elmDialog.style.display = "block";
+ }
+ me.setBoardState(BOARD_NOT_READY);
+ }
+
+ // ---------------------------------------------------------------------
+ // public functions
+ // ---------------------------------------------------------------------
+
+ me.setPaused = function (val) {
+ isPaused = val;
+ mySnake.setPaused(val);
+ if (isPaused) {
+ attachDialogControls(elmPauseScreen);
+ elmPauseScreen.style.display = "block";
+ } else {
+ elmPauseScreen.style.display = "none";
+ }
+ config.onPauseToggle(isPaused);
+ };
+ me.getPaused = function () {
+ return isPaused;
+ };
+
+ /**
+ * Feeds a simulated key press into the board's current key handler so
+ * on-screen (touch) controls behave exactly like the keyboard. Accepts
+ * the same key codes: 37-40 for the arrow keys, 32 (space) for pause.
+ * @method simulateKeyPress
+ * @param {Number} keyNum The key code to simulate.
+ */
+ me.simulateKeyPress = function (keyNum) {
+ if (myKeyListener) {
+ myKeyListener({ which: keyNum });
+ }
+ };
+
+ /**
+ * Resets the playing board for a new game.
+ * @method resetBoard
+ */
+ me.resetBoard = function () {
+ SNAKE.removeEventListener(
+ elmContainer,
+ "keydown",
+ myKeyListener,
+ false,
+ );
+ SNAKE.removeEventListener(
+ elmContainer,
+ "visibilitychange",
+ myWindowListener,
+ false,
+ );
+ mySnake.reset();
+ config.onLengthUpdate(1);
+ elmLengthPanel.innerHTML = "Length: 1";
+ me.setupPlayingField();
+ me.grid[getStartRow()][getStartCol()] = 1; // snake head
+ };
+ /**
+ * Gets the current state of the playing board. There are 3 states: 0 - Welcome or Try Again dialog is present. 1 - User has pressed "Start Game" on the Welcome or Try Again dialog but has not pressed an arrow key to move the snake. 2 - The game is in progress and the snake is moving.
+ * @method getBoardState
+ * @return {Number} The state of the board.
+ */
+ me.getBoardState = function () {
+ return boardState;
+ };
+ /**
+ * Sets the current state of the playing board. There are 3 states: 0 - Welcome or Try Again dialog is present. 1 - User has pressed "Start Game" on the Welcome or Try Again dialog but has not pressed an arrow key to move the snake. 2 - The game is in progress and the snake is moving.
+ * @method setBoardState
+ * @param {Number} state The state of the board.
+ */
+ me.setBoardState = function (state) {
+ boardState = state;
+ };
+ /**
+ * @method getGridFoodValue
+ * @return {Number} A number that represents food on a number representation of the playing board.
+ */
+ me.getGridFoodValue = function () {
+ return GRID_FOOD_VALUE;
+ };
+ /**
+ * @method getPlayingFieldElement
+ * @return {DOM Element} The div representing the playing field (this is where the snake can move).
+ */
+ me.getPlayingFieldElement = function () {
+ return elmPlayingField;
+ };
+ /**
+ * @method setBoardContainer
+ * @param {DOM Element or String} myContainer Sets the container element for the game.
+ */
+ me.setBoardContainer = function (myContainer) {
+ if (typeof myContainer === "string") {
+ myContainer = document.getElementById(myContainer);
+ }
+ if (myContainer === elmContainer) {
+ return;
+ }
+ elmContainer = myContainer;
+ elmPlayingField = null;
+ me.setupPlayingField();
+ me.grid[getStartRow()][getStartCol()] = 1; // snake head
+ };
+ /**
+ * @method getBoardContainer
+ * @return {DOM Element}
+ */
+ me.getBoardContainer = function () {
+ return elmContainer;
+ };
+ /**
+ * @method getBlockWidth
+ * @return {Number}
+ */
+ me.getBlockWidth = function () {
+ return blockWidth;
+ };
+ /**
+ * @method getBlockHeight
+ * @return {Number}
+ */
+ me.getBlockHeight = function () {
+ return blockHeight;
+ };
+ /**
+ * Sets up the playing field.
+ * @method setupPlayingField
+ */
+ me.setupPlayingField = function () {
+ if (!elmPlayingField) {
+ createBoardElements();
+ } // create playing field
+
+ // calculate width of our game container
+ let cWidth, cHeight;
+ let cTop, cLeft;
+ if (config.fullScreen === true) {
+ cTop = 0;
+ cLeft = 0;
+ cWidth = getClientWidth() - 20;
+ cHeight = getClientHeight() - 20 - config.bottomOffset;
+ } else {
+ cTop = config.top;
+ cLeft = config.left;
+ cWidth = config.width;
+ cHeight = config.height;
+ }
+
+ // When space is reserved at the bottom of the screen for on-screen
+ // controls (mobile), use a compact layout: the playing field extends
+ // to the bottom of the container and the score labels stack in the
+ // reserved strip beside the gamepad.
+ const compact = config.fullScreen === true && config.bottomOffset > 0;
+
+ // define the dimensions of the board and playing field
+ const wEdgeSpace =
+ me.getBlockWidth() * 2 + (cWidth % me.getBlockWidth());
+ const fWidth = Math.min(
+ maxBoardWidth() - wEdgeSpace,
+ cWidth - wEdgeSpace,
+ );
+ const hEdgeSpace = compact
+ ? me.getBlockHeight() + (cHeight % me.getBlockHeight())
+ : me.getBlockHeight() * 3 + (cHeight % me.getBlockHeight());
+ const fHeight = Math.min(
+ maxBoardHeight() - hEdgeSpace,
+ cHeight - hEdgeSpace,
+ );
+
+ if (config.fullScreen === true) {
+ const vSlack =
+ cHeight -
+ fHeight -
+ (compact ? me.getBlockHeight() : me.getBlockHeight() * 3);
+ cWidth = fWidth + me.getBlockWidth() * 2;
+ cHeight =
+ fHeight +
+ (compact ? me.getBlockHeight() : me.getBlockHeight() * 3);
+ elmContainer.style.marginLeft = "auto";
+ elmContainer.style.marginRight = "auto";
+ if (!compact) {
+ elmContainer.style.marginTop =
+ me.getBlockHeight() + Math.floor(vSlack / 2) + "px";
+ elmContainer.style.marginBottom = "0px";
+ }
+ }
+
+ elmContainer.style.left = cLeft + "px";
+ elmContainer.style.top = cTop + "px";
+ elmContainer.style.width = cWidth + "px";
+ elmContainer.style.height = cHeight + "px";
+ elmPlayingField.style.left = me.getBlockWidth() + "px";
+ elmPlayingField.style.top = me.getBlockHeight() + "px";
+ elmPlayingField.style.width = fWidth + "px";
+ elmPlayingField.style.height = fHeight + "px";
+
+ if (compact) {
+ const labelTop = me.getBlockHeight() + fHeight + 6;
+ elmLengthPanel.style.top = labelTop + "px";
+ elmLengthPanel.style.left = me.getBlockWidth() + "px";
+ elmLengthPanel.style.right = "auto";
+ elmHighscorePanel.style.top = labelTop + 30 + "px";
+ elmHighscorePanel.style.left = me.getBlockWidth() + "px";
+ elmHighscorePanel.style.right = "auto";
+ elmMobileLinksPanel.style.top = labelTop + 60 + "px";
+ elmMobileLinksPanel.style.left = me.getBlockWidth() + "px";
+ elmMobileLinksPanel.style.display = "block";
+ elmAboutPanel.style.display = "none";
+ } else {
+ // the math for this will need to change depending on font size, padding, etc
+ // assuming height of 18 (font size) + 16 (padding)
+ const bottomPanelHeight = cHeight - me.getBlockHeight() - fHeight;
+ const pLabelTop =
+ me.getBlockHeight() +
+ fHeight +
+ Math.round((bottomPanelHeight - 34) / 2) +
+ "px";
+
+ // wide enough for the links to stay on one line in the 18px DOS font
+ elmAboutPanel.style.top = pLabelTop;
+ elmAboutPanel.style.width = "560px";
+ elmAboutPanel.style.left =
+ Math.round(cWidth / 2) - Math.round(560 / 2) + "px";
+
+ // flush with the left and right edges of the grid
+ elmLengthPanel.style.top = pLabelTop;
+ elmLengthPanel.style.left = me.getBlockWidth() + "px";
+ elmLengthPanel.style.right = "auto";
+
+ elmHighscorePanel.style.top = pLabelTop;
+ elmHighscorePanel.style.left = "auto";
+ elmHighscorePanel.style.right =
+ cWidth - me.getBlockWidth() - fWidth + "px";
+
+ elmMobileLinksPanel.style.display = "none";
+
+ // if width is too narrow, hide the about panel
+ if (cWidth < 700) {
+ elmAboutPanel.style.display = "none";
+ } else {
+ elmAboutPanel.style.display = "block";
+ }
+ }
+
+ me.grid = [];
+ const numBoardCols = fWidth / me.getBlockWidth() + 2;
+ const numBoardRows = fHeight / me.getBlockHeight() + 2;
+
+ for (let row = 0; row < numBoardRows; row++) {
+ me.grid[row] = [];
+ for (let col = 0; col < numBoardCols; col++) {
+ if (
+ col === 0 ||
+ row === 0 ||
+ col === numBoardCols - 1 ||
+ row === numBoardRows - 1
+ ) {
+ me.grid[row][col] = 1; // an edge
+ } else {
+ me.grid[row][col] = 0; // empty space
+ }
+ }
+ }
+
+ myFood.randomlyPlaceFood();
+ config.onLengthUpdate(1);
+
+ if (me.getBoardState() === BOARD_IN_PLAY) {
+ return;
+ }
+ if (myKeyListener) {
+ SNAKE.removeEventListener(
+ elmContainer,
+ "keydown",
+ myKeyListener,
+ false,
+ );
+ }
+
+ myKeyListener = function (evt) {
+ if (!evt) evt = window.event;
+ const keyNum = evt.which ? evt.which : evt.keyCode;
+
+ if (me.getBoardState() === BOARD_READY) {
+ if (
+ !(keyNum >= 37 && keyNum <= 40) &&
+ !(
+ keyNum === 87 ||
+ keyNum === 65 ||
+ keyNum === 83 ||
+ keyNum === 68
+ )
+ ) {
+ return;
+ } // if not an arrow key, leave
+
+ // This removes the listener added at the #listenerX line
+ SNAKE.removeEventListener(
+ elmContainer,
+ "keydown",
+ myKeyListener,
+ false,
+ );
+ SNAKE.removeEventListener(
+ elmContainer,
+ "visibilitychange",
+ myWindowListener,
+ false,
+ );
+
+ myKeyListener = function (evt) {
+ if (!evt) evt = window.event;
+ const keyNum = evt.which ? evt.which : evt.keyCode;
+
+ if (keyNum === 32) {
+ if (me.getBoardState() != BOARD_NOT_READY)
+ me.setPaused(!me.getPaused());
+ }
+
+ mySnake.handleArrowKeys(keyNum);
+
+ evt.cancelBubble = true;
+ if (evt.stopPropagation) {
+ evt.stopPropagation();
+ }
+ if (evt.preventDefault) {
+ evt.preventDefault();
+ }
+ return false;
+ };
+
+ //listener for pausing the game if user change tab or minimize the browser window
+ document.addEventListener("visibilitychange", () => {
+ if (document.visibilityState === "hidden") {
+ if (me.getBoardState() != BOARD_NOT_READY && !me.getPaused())
+ me.setPaused(true);
+ }
+ });
+
+ SNAKE.addEventListener(
+ elmContainer,
+ "keydown",
+ myKeyListener,
+ false,
+ );
+ SNAKE.addEventListener(
+ elmContainer,
+ "visibilitychange",
+ myWindowListener,
+ false,
+ );
+
+ mySnake.rebirth();
+ mySnake.handleArrowKeys(keyNum);
+ me.setBoardState(BOARD_IN_PLAY); // start the game!
+ mySnake.go();
+ }
+
+ evt.cancelBubble = true;
+ if (evt.stopPropagation) {
+ evt.stopPropagation();
+ }
+ if (evt.preventDefault) {
+ evt.preventDefault();
+ }
+ return false;
+ };
+
+ // Search for #listenerX to see where this is removed
+ if (!config.moveSnakeWithAI) {
+ SNAKE.addEventListener(elmContainer, "keydown", myKeyListener, false);
+ SNAKE.addEventListener(
+ elmContainer,
+ "visibilitychange",
+ myWindowListener,
+ false,
+ );
+ }
+ };
+
+ /**
+ * This method is called when the snake has eaten some food.
+ * @method foodEaten
+ * @return {bool} Whether a new food was able to spawn (true)
+ * or not (false) after the snake eats food.
+ */
+ me.foodEaten = function () {
+ config.onLengthUpdate(mySnake.snakeLength);
+ elmLengthPanel.innerHTML = "Length: " + mySnake.snakeLength;
+ if (mySnake.snakeLength > localStorage[HIGH_SCORE_KEY]) {
+ elmHighscorePanel.innerHTML = "Highscore: " + mySnake.snakeLength;
+ }
+ if (!myFood.randomlyPlaceFood()) {
+ return false;
+ }
+ return true;
+ };
+
+ /**
+ * This method is called when the snake dies.
+ * @method handleDeath
+ */
+ me.handleDeath = function () {
+ handleEndCondition(elmTryAgain);
+ config.onDeath({ startAIGame: me.startAIGame });
+ };
+
+ /**
+ * This method is called when the snake wins.
+ * @method handleWin
+ */
+ me.handleWin = function () {
+ handleEndCondition(elmWin);
+ config.onWin({ startAIGame: me.startAIGame });
+ };
+
+ me.setSpeed = (speed) => {
+ mySnake.setSpeed(speed);
+ };
+ me.getSpeed = () => {
+ return mySnake.getSpeed();
+ };
+
+ me.startAIGame = () => {
+ me.resetBoard();
+ mySnake.rebirth();
+ me.setBoardState(BOARD_IN_PLAY); // start the game!
+ mySnake.go();
+ };
+
+ // ---------------------------------------------------------------------
+ // Initialize
+ // ---------------------------------------------------------------------
+
+ config.fullScreen =
+ typeof config.fullScreen === "undefined" ? false : config.fullScreen;
+ config.top = typeof config.top === "undefined" ? 0 : config.top;
+ config.left = typeof config.left === "undefined" ? 0 : config.left;
+ config.width = typeof config.width === "undefined" ? 400 : config.width;
+ config.height =
+ typeof config.height === "undefined" ? 400 : config.height;
+ config.premoveOnPause =
+ typeof config.premoveOnPause === "undefined"
+ ? false
+ : config.premoveOnPause;
+ // extra space to leave free at the bottom of the screen in fullScreen
+ // mode (e.g. for on-screen touch controls)
+ config.bottomOffset =
+ typeof config.bottomOffset === "undefined" ? 0 : config.bottomOffset;
+
+ if (config.fullScreen) {
+ SNAKE.addEventListener(
+ window,
+ "resize",
+ function () {
+ me.setupPlayingField();
+ },
+ false,
+ );
+ }
+
+ me.setBoardState(BOARD_NOT_READY);
+
+ if (config.boardContainer) {
+ me.setBoardContainer(config.boardContainer);
+ }
+
+ const reloadGame = function () {
+ me.resetBoard();
+ me.setBoardState(BOARD_READY);
+ me.getBoardContainer().focus();
+ };
+
+ if (config.onInit) {
+ config.onInit({
+ reloadGame,
+ getSpeed: me.getSpeed,
+ setSpeed: me.setSpeed,
+ startAIGame: me.startAIGame,
+ });
+ }
+ }; // end return function
+ })();