initialisation
3
svelte/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
/node_modules/
|
||||
|
||||
.DS_Store
|
109
svelte/README.md
Normal file
@@ -0,0 +1,109 @@
|
||||
*Psst — looking for a more complete solution? Check out [SvelteKit](https://kit.svelte.dev), the official framework for building web applications of all sizes, with a beautiful development experience and flexible filesystem-based routing.*
|
||||
|
||||
*Looking for a shareable component template instead? You can [use SvelteKit for that as well](https://kit.svelte.dev/docs#packaging) or the older [sveltejs/component-template](https://github.com/sveltejs/component-template)*
|
||||
|
||||
---
|
||||
|
||||
# svelte app
|
||||
|
||||
This is a project template for [Svelte](https://svelte.dev) apps. It lives at https://github.com/sveltejs/template.
|
||||
|
||||
To create a new project based on this template using [degit](https://github.com/Rich-Harris/degit):
|
||||
|
||||
```bash
|
||||
npx degit sveltejs/template svelte-app
|
||||
cd svelte-app
|
||||
```
|
||||
|
||||
*Note that you will need to have [Node.js](https://nodejs.org) installed.*
|
||||
|
||||
|
||||
## Get started
|
||||
|
||||
Install the dependencies...
|
||||
|
||||
```bash
|
||||
cd svelte-app
|
||||
npm install
|
||||
```
|
||||
|
||||
...then start [Rollup](https://rollupjs.org):
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Navigate to [localhost:8080](http://localhost:8080). You should see your app running. Edit a component file in `src`, save it, and reload the page to see your changes.
|
||||
|
||||
By default, the server will only respond to requests from localhost. To allow connections from other computers, edit the `sirv` commands in package.json to include the option `--host 0.0.0.0`.
|
||||
|
||||
If you're using [Visual Studio Code](https://code.visualstudio.com/) we recommend installing the official extension [Svelte for VS Code](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode). If you are using other editors you may need to install a plugin in order to get syntax highlighting and intellisense.
|
||||
|
||||
## Building and running in production mode
|
||||
|
||||
To create an optimised version of the app:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
You can run the newly built app with `npm run start`. This uses [sirv](https://github.com/lukeed/sirv), which is included in your package.json's `dependencies` so that the app will work when you deploy to platforms like [Heroku](https://heroku.com).
|
||||
|
||||
|
||||
## Single-page app mode
|
||||
|
||||
By default, sirv will only respond to requests that match files in `public`. This is to maximise compatibility with static fileservers, allowing you to deploy your app anywhere.
|
||||
|
||||
If you're building a single-page app (SPA) with multiple routes, sirv needs to be able to respond to requests for *any* path. You can make it so by editing the `"start"` command in package.json:
|
||||
|
||||
```js
|
||||
"start": "sirv public --single"
|
||||
```
|
||||
|
||||
## Using TypeScript
|
||||
|
||||
This template comes with a script to set up a TypeScript development environment, you can run it immediately after cloning the template with:
|
||||
|
||||
```bash
|
||||
node scripts/setupTypeScript.js
|
||||
```
|
||||
|
||||
Or remove the script via:
|
||||
|
||||
```bash
|
||||
rm scripts/setupTypeScript.js
|
||||
```
|
||||
|
||||
If you want to use `baseUrl` or `path` aliases within your `tsconfig`, you need to set up `@rollup/plugin-alias` to tell Rollup to resolve the aliases. For more info, see [this StackOverflow question](https://stackoverflow.com/questions/63427935/setup-tsconfig-path-in-svelte).
|
||||
|
||||
## Deploying to the web
|
||||
|
||||
### With [Vercel](https://vercel.com)
|
||||
|
||||
Install `vercel` if you haven't already:
|
||||
|
||||
```bash
|
||||
npm install -g vercel
|
||||
```
|
||||
|
||||
Then, from within your project folder:
|
||||
|
||||
```bash
|
||||
cd public
|
||||
vercel deploy --name my-project
|
||||
```
|
||||
|
||||
### With [surge](https://surge.sh/)
|
||||
|
||||
Install `surge` if you haven't already:
|
||||
|
||||
```bash
|
||||
npm install -g surge
|
||||
```
|
||||
|
||||
Then, from within your project folder:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
surge public my-project.surge.sh
|
||||
```
|
788
svelte/package-lock.json
generated
Normal file
@@ -0,0 +1,788 @@
|
||||
{
|
||||
"name": "svelte-app",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@babel/code-frame": {
|
||||
"version": "7.16.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz",
|
||||
"integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/highlight": "^7.16.7"
|
||||
}
|
||||
},
|
||||
"@babel/helper-validator-identifier": {
|
||||
"version": "7.16.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz",
|
||||
"integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==",
|
||||
"dev": true
|
||||
},
|
||||
"@babel/highlight": {
|
||||
"version": "7.16.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz",
|
||||
"integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-validator-identifier": "^7.16.7",
|
||||
"chalk": "^2.0.0",
|
||||
"js-tokens": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"@polka/url": {
|
||||
"version": "1.0.0-next.21",
|
||||
"resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz",
|
||||
"integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g=="
|
||||
},
|
||||
"@rollup/plugin-commonjs": {
|
||||
"version": "17.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-17.1.0.tgz",
|
||||
"integrity": "sha512-PoMdXCw0ZyvjpCMT5aV4nkL0QywxP29sODQsSGeDpr/oI49Qq9tRtAsb/LbYbDzFlOydVEqHmmZWFtXJEAX9ew==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@rollup/pluginutils": "^3.1.0",
|
||||
"commondir": "^1.0.1",
|
||||
"estree-walker": "^2.0.1",
|
||||
"glob": "^7.1.6",
|
||||
"is-reference": "^1.2.1",
|
||||
"magic-string": "^0.25.7",
|
||||
"resolve": "^1.17.0"
|
||||
}
|
||||
},
|
||||
"@rollup/plugin-node-resolve": {
|
||||
"version": "11.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.2.1.tgz",
|
||||
"integrity": "sha512-yc2n43jcqVyGE2sqV5/YCmocy9ArjVAP/BeXyTtADTBBX6V0e5UMqwO8CdQ0kzjb6zu5P1qMzsScCMRvE9OlVg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@rollup/pluginutils": "^3.1.0",
|
||||
"@types/resolve": "1.17.1",
|
||||
"builtin-modules": "^3.1.0",
|
||||
"deepmerge": "^4.2.2",
|
||||
"is-module": "^1.0.0",
|
||||
"resolve": "^1.19.0"
|
||||
}
|
||||
},
|
||||
"@rollup/pluginutils": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz",
|
||||
"integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/estree": "0.0.39",
|
||||
"estree-walker": "^1.0.1",
|
||||
"picomatch": "^2.2.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"estree-walker": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz",
|
||||
"integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"@types/estree": {
|
||||
"version": "0.0.39",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz",
|
||||
"integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "17.0.18",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.18.tgz",
|
||||
"integrity": "sha512-eKj4f/BsN/qcculZiRSujogjvp5O/k4lOW5m35NopjZM/QwLOR075a8pJW5hD+Rtdm2DaCVPENS6KtSQnUD6BA==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/resolve": {
|
||||
"version": "1.17.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz",
|
||||
"integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
|
||||
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"color-convert": "^1.9.0"
|
||||
}
|
||||
},
|
||||
"anymatch": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz",
|
||||
"integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"normalize-path": "^3.0.0",
|
||||
"picomatch": "^2.0.4"
|
||||
}
|
||||
},
|
||||
"balanced-match": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
|
||||
"dev": true
|
||||
},
|
||||
"binary-extensions": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
|
||||
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
|
||||
"dev": true
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"braces": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
||||
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fill-range": "^7.0.1"
|
||||
}
|
||||
},
|
||||
"buffer-from": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
|
||||
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
|
||||
"dev": true
|
||||
},
|
||||
"builtin-modules": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz",
|
||||
"integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==",
|
||||
"dev": true
|
||||
},
|
||||
"chalk": {
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
|
||||
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^3.2.1",
|
||||
"escape-string-regexp": "^1.0.5",
|
||||
"supports-color": "^5.3.0"
|
||||
}
|
||||
},
|
||||
"chokidar": {
|
||||
"version": "3.5.3",
|
||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
|
||||
"integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"anymatch": "~3.1.2",
|
||||
"braces": "~3.0.2",
|
||||
"fsevents": "~2.3.2",
|
||||
"glob-parent": "~5.1.2",
|
||||
"is-binary-path": "~2.1.0",
|
||||
"is-glob": "~4.0.1",
|
||||
"normalize-path": "~3.0.0",
|
||||
"readdirp": "~3.6.0"
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
"version": "1.9.3",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
|
||||
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"color-name": "1.1.3"
|
||||
}
|
||||
},
|
||||
"color-name": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
|
||||
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
|
||||
"dev": true
|
||||
},
|
||||
"commander": {
|
||||
"version": "2.20.3",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
|
||||
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
|
||||
"dev": true
|
||||
},
|
||||
"commondir": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
|
||||
"integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=",
|
||||
"dev": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
||||
"dev": true
|
||||
},
|
||||
"console-clear": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/console-clear/-/console-clear-1.1.1.tgz",
|
||||
"integrity": "sha512-pMD+MVR538ipqkG5JXeOEbKWS5um1H4LUUccUQG68qpeqBYbzYy79Gh55jkd2TtPdRfUaLWdv6LPP//5Zt0aPQ=="
|
||||
},
|
||||
"deepmerge": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz",
|
||||
"integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==",
|
||||
"dev": true
|
||||
},
|
||||
"escape-string-regexp": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
||||
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
|
||||
"dev": true
|
||||
},
|
||||
"estree-walker": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
|
||||
"integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
|
||||
"dev": true
|
||||
},
|
||||
"fill-range": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"to-regex-range": "^5.0.1"
|
||||
}
|
||||
},
|
||||
"fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
|
||||
"dev": true
|
||||
},
|
||||
"fsevents": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
|
||||
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"function-bind": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
|
||||
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
|
||||
"dev": true
|
||||
},
|
||||
"get-port": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz",
|
||||
"integrity": "sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw="
|
||||
},
|
||||
"glob": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz",
|
||||
"integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.0.4",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"glob-parent": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
|
||||
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-glob": "^4.0.1"
|
||||
}
|
||||
},
|
||||
"has": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
|
||||
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"function-bind": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
||||
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
|
||||
"dev": true
|
||||
},
|
||||
"inflight": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"once": "^1.3.0",
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"inherits": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
||||
"dev": true
|
||||
},
|
||||
"is-binary-path": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
|
||||
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"binary-extensions": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"is-core-module": {
|
||||
"version": "2.8.1",
|
||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz",
|
||||
"integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"has": "^1.0.3"
|
||||
}
|
||||
},
|
||||
"is-extglob": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
|
||||
"integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
|
||||
"dev": true
|
||||
},
|
||||
"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,
|
||||
"requires": {
|
||||
"is-extglob": "^2.1.1"
|
||||
}
|
||||
},
|
||||
"is-module": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz",
|
||||
"integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=",
|
||||
"dev": true
|
||||
},
|
||||
"is-number": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
||||
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
||||
"dev": true
|
||||
},
|
||||
"is-reference": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz",
|
||||
"integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/estree": "*"
|
||||
}
|
||||
},
|
||||
"jest-worker": {
|
||||
"version": "26.6.2",
|
||||
"resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz",
|
||||
"integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/node": "*",
|
||||
"merge-stream": "^2.0.0",
|
||||
"supports-color": "^7.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"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
|
||||
},
|
||||
"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,
|
||||
"requires": {
|
||||
"has-flag": "^4.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"js-tokens": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
|
||||
"dev": true
|
||||
},
|
||||
"kleur": {
|
||||
"version": "4.1.4",
|
||||
"resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.4.tgz",
|
||||
"integrity": "sha512-8QADVssbrFjivHWQU7KkMgptGTl6WAcSdlbBPY4uNF+mWr6DGcKrvY2w4FQJoXch7+fKMjj0dRrL75vk3k23OA=="
|
||||
},
|
||||
"livereload": {
|
||||
"version": "0.9.3",
|
||||
"resolved": "https://registry.npmjs.org/livereload/-/livereload-0.9.3.tgz",
|
||||
"integrity": "sha512-q7Z71n3i4X0R9xthAryBdNGVGAO2R5X+/xXpmKeuPMrteg+W2U8VusTKV3YiJbXZwKsOlFlHe+go6uSNjfxrZw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"chokidar": "^3.5.0",
|
||||
"livereload-js": "^3.3.1",
|
||||
"opts": ">= 1.2.0",
|
||||
"ws": "^7.4.3"
|
||||
}
|
||||
},
|
||||
"livereload-js": {
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-3.3.3.tgz",
|
||||
"integrity": "sha512-a7Jipme3XIBIryJluWP5LQrEAvhobDPyScBe+q+MYwxBiMT2Ck7msy4tAdF8TAa33FMdJqX4guP81Yhiu6BkmQ==",
|
||||
"dev": true
|
||||
},
|
||||
"local-access": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/local-access/-/local-access-1.1.0.tgz",
|
||||
"integrity": "sha512-XfegD5pyTAfb+GY6chk283Ox5z8WexG56OvM06RWLpAc/UHozO8X6xAxEkIitZOtsSMM1Yr3DkHgW5W+onLhCw=="
|
||||
},
|
||||
"magic-string": {
|
||||
"version": "0.25.7",
|
||||
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz",
|
||||
"integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"sourcemap-codec": "^1.4.4"
|
||||
}
|
||||
},
|
||||
"merge-stream": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
|
||||
"integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
|
||||
"dev": true
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
},
|
||||
"mri": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
|
||||
"integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA=="
|
||||
},
|
||||
"mrmime": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.0.tgz",
|
||||
"integrity": "sha512-a70zx7zFfVO7XpnQ2IX1Myh9yY4UYvfld/dikWRnsXxbyvMcfz+u6UfgNAtH+k2QqtJuzVpv6eLTx1G2+WKZbQ=="
|
||||
},
|
||||
"normalize-path": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
|
||||
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
|
||||
"dev": true
|
||||
},
|
||||
"once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"opts": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/opts/-/opts-2.0.2.tgz",
|
||||
"integrity": "sha512-k41FwbcLnlgnFh69f4qdUfvDQ+5vaSDnVPFI/y5XuhKRq97EnVVneO9F1ESVCdiVu4fCS2L8usX3mU331hB7pg==",
|
||||
"dev": true
|
||||
},
|
||||
"path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
|
||||
"dev": true
|
||||
},
|
||||
"path-parse": {
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
|
||||
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
|
||||
"dev": true
|
||||
},
|
||||
"picomatch": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
|
||||
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
|
||||
"dev": true
|
||||
},
|
||||
"randombytes": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
|
||||
"integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"safe-buffer": "^5.1.0"
|
||||
}
|
||||
},
|
||||
"readdirp": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
|
||||
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"picomatch": "^2.2.1"
|
||||
}
|
||||
},
|
||||
"require-relative": {
|
||||
"version": "0.8.7",
|
||||
"resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz",
|
||||
"integrity": "sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4=",
|
||||
"dev": true
|
||||
},
|
||||
"resolve": {
|
||||
"version": "1.22.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz",
|
||||
"integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-core-module": "^2.8.1",
|
||||
"path-parse": "^1.0.7",
|
||||
"supports-preserve-symlinks-flag": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"rollup": {
|
||||
"version": "2.67.2",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.67.2.tgz",
|
||||
"integrity": "sha512-hoEiBWwZtf1QdK3jZIq59L0FJj4Fiv4RplCO4pvCRC86qsoFurWB4hKQIjoRf3WvJmk5UZ9b0y5ton+62fC7Tw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fsevents": "~2.3.2"
|
||||
}
|
||||
},
|
||||
"rollup-plugin-css-only": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/rollup-plugin-css-only/-/rollup-plugin-css-only-3.1.0.tgz",
|
||||
"integrity": "sha512-TYMOE5uoD76vpj+RTkQLzC9cQtbnJNktHPB507FzRWBVaofg7KhIqq1kGbcVOadARSozWF883Ho9KpSPKH8gqA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@rollup/pluginutils": "4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@rollup/pluginutils": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.1.2.tgz",
|
||||
"integrity": "sha512-ROn4qvkxP9SyPeHaf7uQC/GPFY6L/OWy9+bd9AwcjOAWQwxRscoEyAUD8qCY5o5iL4jqQwoLk2kaTKJPb/HwzQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"estree-walker": "^2.0.1",
|
||||
"picomatch": "^2.2.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"rollup-plugin-livereload": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/rollup-plugin-livereload/-/rollup-plugin-livereload-2.0.5.tgz",
|
||||
"integrity": "sha512-vqQZ/UQowTW7VoiKEM5ouNW90wE5/GZLfdWuR0ELxyKOJUIaj+uismPZZaICU4DnWPVjnpCDDxEqwU7pcKY/PA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"livereload": "^0.9.1"
|
||||
}
|
||||
},
|
||||
"rollup-plugin-svelte": {
|
||||
"version": "7.1.0",
|
||||
"resolved": "https://registry.npmjs.org/rollup-plugin-svelte/-/rollup-plugin-svelte-7.1.0.tgz",
|
||||
"integrity": "sha512-vopCUq3G+25sKjwF5VilIbiY6KCuMNHP1PFvx2Vr3REBNMDllKHFZN2B9jwwC+MqNc3UPKkjXnceLPEjTjXGXg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"require-relative": "^0.8.7",
|
||||
"rollup-pluginutils": "^2.8.2"
|
||||
}
|
||||
},
|
||||
"rollup-plugin-terser": {
|
||||
"version": "7.0.2",
|
||||
"resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz",
|
||||
"integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.10.4",
|
||||
"jest-worker": "^26.2.1",
|
||||
"serialize-javascript": "^4.0.0",
|
||||
"terser": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"rollup-pluginutils": {
|
||||
"version": "2.8.2",
|
||||
"resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz",
|
||||
"integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"estree-walker": "^0.6.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"estree-walker": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz",
|
||||
"integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"sade": {
|
||||
"version": "1.8.1",
|
||||
"resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz",
|
||||
"integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==",
|
||||
"requires": {
|
||||
"mri": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"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
|
||||
},
|
||||
"semiver": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/semiver/-/semiver-1.1.0.tgz",
|
||||
"integrity": "sha512-QNI2ChmuioGC1/xjyYwyZYADILWyW6AmS1UH6gDj/SFUUUS4MBAWs/7mxnkRPc/F4iHezDP+O8t0dO8WHiEOdg=="
|
||||
},
|
||||
"serialize-javascript": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz",
|
||||
"integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"randombytes": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"sirv": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.2.tgz",
|
||||
"integrity": "sha512-4Qog6aE29nIjAOKe/wowFTxOdmbEZKb+3tsLljaBRzJwtqto0BChD2zzH0LhgCSXiI+V7X+Y45v14wBZQ1TK3w==",
|
||||
"requires": {
|
||||
"@polka/url": "^1.0.0-next.20",
|
||||
"mrmime": "^1.0.0",
|
||||
"totalist": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"sirv-cli": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/sirv-cli/-/sirv-cli-2.0.2.tgz",
|
||||
"integrity": "sha512-OtSJDwxsF1NWHc7ps3Sa0s+dPtP15iQNJzfKVz+MxkEo3z72mCD+yu30ct79rPr0CaV1HXSOBp+MIY5uIhHZ1A==",
|
||||
"requires": {
|
||||
"console-clear": "^1.1.0",
|
||||
"get-port": "^3.2.0",
|
||||
"kleur": "^4.1.4",
|
||||
"local-access": "^1.0.1",
|
||||
"sade": "^1.6.0",
|
||||
"semiver": "^1.0.0",
|
||||
"sirv": "^2.0.0",
|
||||
"tinydate": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.7.3",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz",
|
||||
"integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==",
|
||||
"dev": true
|
||||
},
|
||||
"source-map-support": {
|
||||
"version": "0.5.21",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
|
||||
"integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"buffer-from": "^1.0.0",
|
||||
"source-map": "^0.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"sourcemap-codec": {
|
||||
"version": "1.4.8",
|
||||
"resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz",
|
||||
"integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==",
|
||||
"dev": true
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "5.5.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
||||
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"has-flag": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"supports-preserve-symlinks-flag": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
|
||||
"integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
|
||||
"dev": true
|
||||
},
|
||||
"svelte": {
|
||||
"version": "3.46.4",
|
||||
"resolved": "https://registry.npmjs.org/svelte/-/svelte-3.46.4.tgz",
|
||||
"integrity": "sha512-qKJzw6DpA33CIa+C/rGp4AUdSfii0DOTCzj/2YpSKKayw5WGSS624Et9L1nU1k2OVRS9vaENQXp2CVZNU+xvIg==",
|
||||
"dev": true
|
||||
},
|
||||
"terser": {
|
||||
"version": "5.10.0",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.10.0.tgz",
|
||||
"integrity": "sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"commander": "^2.20.0",
|
||||
"source-map": "~0.7.2",
|
||||
"source-map-support": "~0.5.20"
|
||||
}
|
||||
},
|
||||
"tinydate": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/tinydate/-/tinydate-1.3.0.tgz",
|
||||
"integrity": "sha512-7cR8rLy2QhYHpsBDBVYnnWXm8uRTr38RoZakFSW7Bs7PzfMPNZthuMLkwqZv7MTu8lhQ91cOFYS5a7iFj2oR3w=="
|
||||
},
|
||||
"to-regex-range": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-number": "^7.0.0"
|
||||
}
|
||||
},
|
||||
"totalist": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.0.tgz",
|
||||
"integrity": "sha512-eM+pCBxXO/njtF7vdFsHuqb+ElbxqtI4r5EAvk6grfAFyJ6IvWlSkfZ5T9ozC6xWw3Fj1fGoSmrl0gUs46JVIw=="
|
||||
},
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
|
||||
"dev": true
|
||||
},
|
||||
"ws": {
|
||||
"version": "7.5.7",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz",
|
||||
"integrity": "sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
}
|
23
svelte/package.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "svelte-app",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "rollup -c",
|
||||
"dev": "rollup -c -w",
|
||||
"start": "sirv public --no-clear"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-commonjs": "^17.0.0",
|
||||
"@rollup/plugin-node-resolve": "^11.0.0",
|
||||
"rollup": "^2.3.4",
|
||||
"rollup-plugin-css-only": "^3.1.0",
|
||||
"rollup-plugin-livereload": "^2.0.0",
|
||||
"rollup-plugin-svelte": "^7.0.0",
|
||||
"rollup-plugin-terser": "^7.0.0",
|
||||
"svelte": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"sirv-cli": "^2.0.0"
|
||||
}
|
||||
}
|
1
svelte/public/bundle.css
Normal file
@@ -0,0 +1 @@
|
||||
main.svelte-urompm{display:flex;flex-direction:row}.joueurs.svelte-urompm{float:right}#board.svelte-1s8m8k5{background:url(images/euMap.jpg);background-size:contain;width:850px;height:548px;border:1px var(--col-dark) solid;border-radius:8px;box-shadow:2px 2px 2px var(--col-dark)}.ville.svelte-1s8m8k5{stroke:none;fill:#0000}.route.svelte-1s8m8k5{stroke:none;fill:#0000}.no-pointer.svelte-1s8m8k5{pointer-events:none}.joueur.svelte-vqlws6.svelte-vqlws6{color:var(--col-dark);border:1px solid var(--col-dark);border-radius:8px;width:280px;padding:4px;margin-left:4px;margin-bottom:4px;box-shadow:2px 2px 2px var(--col-dark)}.joueur.BLEU.svelte-vqlws6.svelte-vqlws6{background:var(--col-light-BLEU)}.joueur.VERT.svelte-vqlws6.svelte-vqlws6{background:var(--col-light-VERT)}.joueur.ROSE.svelte-vqlws6.svelte-vqlws6{background:var(--col-light-ROSE)}.joueur.ROUGE.svelte-vqlws6.svelte-vqlws6{background:var(--col-light-ROUGE)}.joueur.JAUNE.svelte-vqlws6.svelte-vqlws6{background:var(--col-light-JAUNE)}.header.svelte-vqlws6.svelte-vqlws6{display:flex;flex-direction:row;justify-content:space-between;margin-bottom:4px}.info.svelte-vqlws6.svelte-vqlws6{width:100%}.nom.svelte-vqlws6.svelte-vqlws6{width:100%;text-align:center;font-size:1.5em;font-weight:bold}.avatar.svelte-vqlws6.svelte-vqlws6{height:84px;width:66px}.secret.svelte-vqlws6.svelte-vqlws6{display:none}.joueur.svelte-vqlws6:hover .secret.svelte-vqlws6,.joueur.actif.svelte-vqlws6 .secret.svelte-vqlws6{display:block}.destinations.svelte-vqlws6.svelte-vqlws6{align-content:right}.cartes-wagon.svelte-vqlws6.svelte-vqlws6{display:flex;flex-wrap:wrap;flex-direction:row;width:250px}.carte-wagon.svelte-vqlws6.svelte-vqlws6{border:1px solid var(--col-dark);border-radius:4px;overflow:hidden;position:relative;width:calc(248px * 0.3);height:calc(160px * 0.3);padding:0;margin-right:-42px}.carte-wagon.svelte-vqlws6 .overlay.svelte-vqlws6{position:absolute;top:0;left:0;width:100%;height:100%;background:var(--col-dark);opacity:0.5}.image-wagon.svelte-vqlws6.svelte-vqlws6{width:100%;height:100%;background-size:cover}.nom-joueur.svelte-19y2w7e{font-weight:bold}#piles.svelte-1eir9gx.svelte-1eir9gx{justify-content:space-around}.carte.svelte-1eir9gx.svelte-1eir9gx{width:100px;font-size:0.8em;text-align:center}.carte-stub.svelte-1eir9gx.svelte-1eir9gx{width:100px;height:67px;margin-bottom:5px}.carte.svelte-1eir9gx img.svelte-1eir9gx{margin-bottom:5px;border-radius:4px;border:1px var(--col-dark) solid;box-shadow:2px 2px 2px var(--col-dark)}#cartes-visibles.svelte-1eir9gx.svelte-1eir9gx{width:500px;height:89px;flex-direction:row-reverse}#defausse-cartes-wagon.svelte-1eir9gx.svelte-1eir9gx{flex-direction:column-reverse}#defausse-cartes-wagon.svelte-1eir9gx img.svelte-1eir9gx{margin-top:-55px;display:none}#defausse-cartes-wagon.svelte-1eir9gx:hover img.svelte-1eir9gx{display:block}#defausse-cartes-wagon.svelte-1eir9gx img.svelte-1eir9gx:last-child{margin-top:0;display:block}#pile-destinations.svelte-1eir9gx.svelte-1eir9gx,#pile-cartes-wagon.svelte-1eir9gx.svelte-1eir9gx{margin-left:10px}#log.svelte-1r9y78z{margin:5px 0;padding:10px 30px 12px 26px;width:408px;height:263px;font-family:monospace;background:url(images/dialogue-box_Big.png);background-size:cover}#inner-log.svelte-1r9y78z{padding:0px;height:100%;overflow:overlay}.svelte-1r9y78z::-webkit-scrollbar{background-color:transparent}
|
3672
svelte/public/bundle.js
Normal file
1
svelte/public/bundle.js.map
Normal file
BIN
svelte/public/favicon.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
157
svelte/public/global.css
Normal file
@@ -0,0 +1,157 @@
|
||||
@import url('https://fonts.googleapis.com/css2?family=IM+Fell+English+SC&display=swap');
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html {
|
||||
--col-BLEU: #205099;
|
||||
--col-light-BLEU: #87BDE1;
|
||||
--col-ROUGE: #D64036;
|
||||
--col-light-ROUGE: #CC916C;
|
||||
--col-VERT: #65964C;
|
||||
--col-light-VERT: #C6E370;
|
||||
--col-JAUNE: #C69943;
|
||||
--col-light-JAUNE: #F6E678;
|
||||
--col-ROSE: #5E3182;
|
||||
--col-light-ROSE: #D89FDB;
|
||||
--col-dark: #373F3B;
|
||||
}
|
||||
|
||||
html, body {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
color: var(--col-dark);
|
||||
margin: 0;
|
||||
padding: 8px;
|
||||
box-sizing: border-box;
|
||||
font-family: "IM Fell English SC", serif;
|
||||
background: #E1E5E7;
|
||||
}
|
||||
|
||||
a {
|
||||
color: rgb(0, 100, 200);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: rgb(0, 80, 160);
|
||||
}
|
||||
|
||||
label {
|
||||
display: block;
|
||||
}
|
||||
|
||||
input, button, select, textarea {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
-webkit-padding: 0.4em 0;
|
||||
padding: 0.4em;
|
||||
margin: 0 0 0.5em 0;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
input:disabled {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
button {
|
||||
color: #333;
|
||||
background-color: #f4f4f4;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
button:disabled {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
button:not(:disabled):active {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
button:focus {
|
||||
border-color: #666;
|
||||
}
|
||||
|
||||
.column {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
#log .tour {
|
||||
margin-left: 100px;
|
||||
font-weight: bold;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#log .joueur {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#log .ville, #log .route {
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#log .couleur {
|
||||
text-decoration: underline;
|
||||
text-decoration-thickness: 2px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#log .couleur.rouge {
|
||||
text-decoration-color: #be3c33;
|
||||
}
|
||||
|
||||
#log .couleur.vert {
|
||||
text-decoration-color: #96c156;
|
||||
}
|
||||
|
||||
#log .couleur.bleu {
|
||||
text-decoration-color: #489fd9;
|
||||
}
|
||||
|
||||
#log .couleur.jaune {
|
||||
text-decoration-color: #fbe969;
|
||||
}
|
||||
|
||||
#log .couleur.orange {
|
||||
text-decoration-color: #d58b44;
|
||||
}
|
||||
|
||||
#log .couleur.noir {
|
||||
text-decoration-color: #3a4f59;
|
||||
}
|
||||
|
||||
#log .couleur.blanc {
|
||||
text-decoration-color: #e8e9ec;
|
||||
}
|
||||
|
||||
#log .couleur.rose {
|
||||
text-decoration-color: #b991bb;
|
||||
}
|
||||
|
||||
#log .couleur.gris {
|
||||
text-decoration-color: #969b9d;
|
||||
}
|
||||
|
||||
img.couleur {
|
||||
width: 1.5em;
|
||||
height: 1.5em;
|
||||
margin-bottom: -0.5em;
|
||||
}
|
BIN
svelte/public/images/avatar-BLEU.png
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
svelte/public/images/avatar-JAUNE.png
Normal file
After Width: | Height: | Size: 52 KiB |
BIN
svelte/public/images/avatar-ROSE.png
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
svelte/public/images/avatar-ROUGE.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
svelte/public/images/avatar-VERT.png
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
svelte/public/images/carte-wagon-BLANC.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
svelte/public/images/carte-wagon-BLEU.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
svelte/public/images/carte-wagon-JAUNE.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
svelte/public/images/carte-wagon-LOCOMOTIVE.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
svelte/public/images/carte-wagon-NOIR.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
svelte/public/images/carte-wagon-ORANGE.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
svelte/public/images/carte-wagon-ROSE.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
svelte/public/images/carte-wagon-ROUGE.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
svelte/public/images/carte-wagon-VERT.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
svelte/public/images/carte-wagon.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
svelte/public/images/destination.jpg
Normal file
After Width: | Height: | Size: 136 KiB |
BIN
svelte/public/images/dialogue-box_Big.png
Normal file
After Width: | Height: | Size: 1.0 MiB |
BIN
svelte/public/images/euMap.jpg
Normal file
After Width: | Height: | Size: 2.5 MiB |
BIN
svelte/public/images/eu_TicketBack.png
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
svelte/public/images/gare-BLEU.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
svelte/public/images/gare-JAUNE.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
svelte/public/images/gare-ROSE.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
svelte/public/images/gare-ROUGE.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
svelte/public/images/gare-VERT.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
svelte/public/images/gare-shadow.png
Normal file
After Width: | Height: | Size: 799 B |
BIN
svelte/public/images/image-wagon-BLEU.png
Normal file
After Width: | Height: | Size: 7.4 KiB |
BIN
svelte/public/images/image-wagon-JAUNE.png
Normal file
After Width: | Height: | Size: 6.5 KiB |
BIN
svelte/public/images/image-wagon-ROSE.png
Normal file
After Width: | Height: | Size: 7.3 KiB |
BIN
svelte/public/images/image-wagon-ROUGE.png
Normal file
After Width: | Height: | Size: 6.5 KiB |
BIN
svelte/public/images/image-wagon-VERT.png
Normal file
After Width: | Height: | Size: 6.4 KiB |
BIN
svelte/public/images/symbole-BLANC.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
svelte/public/images/symbole-BLEU.png
Normal file
After Width: | Height: | Size: 6.7 KiB |
BIN
svelte/public/images/symbole-JAUNE.png
Normal file
After Width: | Height: | Size: 6.6 KiB |
BIN
svelte/public/images/symbole-LOCOMOTIVE.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
svelte/public/images/symbole-NOIR.png
Normal file
After Width: | Height: | Size: 6.4 KiB |
BIN
svelte/public/images/symbole-ORANGE.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
svelte/public/images/symbole-ROSE.png
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
svelte/public/images/symbole-ROUGE.png
Normal file
After Width: | Height: | Size: 7.1 KiB |
BIN
svelte/public/images/symbole-VERT.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
svelte/public/images/toggle-button.png
Normal file
After Width: | Height: | Size: 26 KiB |
18
svelte/public/index.html
Normal file
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<meta name='viewport' content='width=device-width,initial-scale=1'>
|
||||
|
||||
<title>Svelte app</title>
|
||||
|
||||
<link rel='icon' type='image/png' href='/favicon.png'>
|
||||
<link rel='stylesheet' href='global.css'>
|
||||
<link rel='stylesheet' href='bundle.css'>
|
||||
|
||||
<script defer src='bundle.js'></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
76
svelte/rollup.config.js
Normal file
@@ -0,0 +1,76 @@
|
||||
import svelte from 'rollup-plugin-svelte';
|
||||
import commonjs from '@rollup/plugin-commonjs';
|
||||
import resolve from '@rollup/plugin-node-resolve';
|
||||
import livereload from 'rollup-plugin-livereload';
|
||||
import { terser } from 'rollup-plugin-terser';
|
||||
import css from 'rollup-plugin-css-only';
|
||||
|
||||
const production = !process.env.ROLLUP_WATCH;
|
||||
|
||||
function serve() {
|
||||
let server;
|
||||
|
||||
function toExit() {
|
||||
if (server) server.kill(0);
|
||||
}
|
||||
|
||||
return {
|
||||
writeBundle() {
|
||||
if (server) return;
|
||||
server = require('child_process').spawn('npm', ['run', 'start', '--', '--dev'], {
|
||||
stdio: ['ignore', 'inherit', 'inherit'],
|
||||
shell: true
|
||||
});
|
||||
|
||||
process.on('SIGTERM', toExit);
|
||||
process.on('exit', toExit);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export default {
|
||||
input: 'src/main.js',
|
||||
output: {
|
||||
sourcemap: true,
|
||||
format: 'iife',
|
||||
name: 'app',
|
||||
file: 'public/bundle.js'
|
||||
},
|
||||
plugins: [
|
||||
svelte({
|
||||
compilerOptions: {
|
||||
// enable run-time checks when not in production
|
||||
dev: !production
|
||||
}
|
||||
}),
|
||||
// we'll extract any component CSS out into
|
||||
// a separate file - better for performance
|
||||
css({ output: 'bundle.css' }),
|
||||
|
||||
// If you have external dependencies installed from
|
||||
// npm, you'll most likely need these plugins. In
|
||||
// some cases you'll need additional configuration -
|
||||
// consult the documentation for details:
|
||||
// https://github.com/rollup/plugins/tree/master/packages/commonjs
|
||||
resolve({
|
||||
browser: true,
|
||||
dedupe: ['svelte']
|
||||
}),
|
||||
commonjs(),
|
||||
|
||||
// In dev mode, call `npm run start` once
|
||||
// the bundle has been generated
|
||||
!production && serve(),
|
||||
|
||||
// Watch the `public` directory and refresh the
|
||||
// browser on changes when not in production
|
||||
!production && livereload('public'),
|
||||
|
||||
// If we're building for production (npm run build
|
||||
// instead of npm run dev), minify
|
||||
production && terser()
|
||||
],
|
||||
watch: {
|
||||
clearScreen: false
|
||||
}
|
||||
};
|
121
svelte/scripts/setupTypeScript.js
Normal file
@@ -0,0 +1,121 @@
|
||||
// @ts-check
|
||||
|
||||
/** This script modifies the project to support TS code in .svelte files like:
|
||||
|
||||
<script lang="ts">
|
||||
export let name: string;
|
||||
</script>
|
||||
|
||||
As well as validating the code for CI.
|
||||
*/
|
||||
|
||||
/** To work on this script:
|
||||
rm -rf test-template template && git clone sveltejs/template test-template && node scripts/setupTypeScript.js test-template
|
||||
*/
|
||||
|
||||
const fs = require("fs")
|
||||
const path = require("path")
|
||||
const { argv } = require("process")
|
||||
|
||||
const projectRoot = argv[2] || path.join(__dirname, "..")
|
||||
|
||||
// Add deps to pkg.json
|
||||
const packageJSON = JSON.parse(fs.readFileSync(path.join(projectRoot, "package.json"), "utf8"))
|
||||
packageJSON.devDependencies = Object.assign(packageJSON.devDependencies, {
|
||||
"svelte-check": "^2.0.0",
|
||||
"svelte-preprocess": "^4.0.0",
|
||||
"@rollup/plugin-typescript": "^8.0.0",
|
||||
"typescript": "^4.0.0",
|
||||
"tslib": "^2.0.0",
|
||||
"@tsconfig/svelte": "^2.0.0"
|
||||
})
|
||||
|
||||
// Add script for checking
|
||||
packageJSON.scripts = Object.assign(packageJSON.scripts, {
|
||||
"check": "svelte-check --tsconfig ./tsconfig.json"
|
||||
})
|
||||
|
||||
// Write the package JSON
|
||||
fs.writeFileSync(path.join(projectRoot, "package.json"), JSON.stringify(packageJSON, null, " "))
|
||||
|
||||
// mv src/main.js to main.ts - note, we need to edit rollup.config.js for this too
|
||||
const beforeMainJSPath = path.join(projectRoot, "src", "main.js")
|
||||
const afterMainTSPath = path.join(projectRoot, "src", "main.ts")
|
||||
fs.renameSync(beforeMainJSPath, afterMainTSPath)
|
||||
|
||||
// Switch the app.svelte file to use TS
|
||||
const appSveltePath = path.join(projectRoot, "src", "App.svelte")
|
||||
let appFile = fs.readFileSync(appSveltePath, "utf8")
|
||||
appFile = appFile.replace("<script>", '<script lang="ts">')
|
||||
appFile = appFile.replace("export let name;", 'export let name: string;')
|
||||
fs.writeFileSync(appSveltePath, appFile)
|
||||
|
||||
// Edit rollup config
|
||||
const rollupConfigPath = path.join(projectRoot, "rollup.config.js")
|
||||
let rollupConfig = fs.readFileSync(rollupConfigPath, "utf8")
|
||||
|
||||
// Edit imports
|
||||
rollupConfig = rollupConfig.replace(`'rollup-plugin-terser';`, `'rollup-plugin-terser';
|
||||
import sveltePreprocess from 'svelte-preprocess';
|
||||
import typescript from '@rollup/plugin-typescript';`)
|
||||
|
||||
// Replace name of entry point
|
||||
rollupConfig = rollupConfig.replace(`'src/main.js'`, `'src/main.ts'`)
|
||||
|
||||
// Add preprocessor
|
||||
rollupConfig = rollupConfig.replace(
|
||||
'compilerOptions:',
|
||||
'preprocess: sveltePreprocess({ sourceMap: !production }),\n\t\t\tcompilerOptions:'
|
||||
);
|
||||
|
||||
// Add TypeScript
|
||||
rollupConfig = rollupConfig.replace(
|
||||
'commonjs(),',
|
||||
'commonjs(),\n\t\ttypescript({\n\t\t\tsourceMap: !production,\n\t\t\tinlineSources: !production\n\t\t}),'
|
||||
);
|
||||
fs.writeFileSync(rollupConfigPath, rollupConfig)
|
||||
|
||||
// Add TSConfig
|
||||
const tsconfig = `{
|
||||
"extends": "@tsconfig/svelte/tsconfig.json",
|
||||
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules/*", "__sapper__/*", "public/*"]
|
||||
}`
|
||||
const tsconfigPath = path.join(projectRoot, "tsconfig.json")
|
||||
fs.writeFileSync(tsconfigPath, tsconfig)
|
||||
|
||||
// Add global.d.ts
|
||||
const dtsPath = path.join(projectRoot, "src", "global.d.ts")
|
||||
fs.writeFileSync(dtsPath, `/// <reference types="svelte" />`)
|
||||
|
||||
// Delete this script, but not during testing
|
||||
if (!argv[2]) {
|
||||
// Remove the script
|
||||
fs.unlinkSync(path.join(__filename))
|
||||
|
||||
// Check for Mac's DS_store file, and if it's the only one left remove it
|
||||
const remainingFiles = fs.readdirSync(path.join(__dirname))
|
||||
if (remainingFiles.length === 1 && remainingFiles[0] === '.DS_store') {
|
||||
fs.unlinkSync(path.join(__dirname, '.DS_store'))
|
||||
}
|
||||
|
||||
// Check if the scripts folder is empty
|
||||
if (fs.readdirSync(path.join(__dirname)).length === 0) {
|
||||
// Remove the scripts folder
|
||||
fs.rmdirSync(path.join(__dirname))
|
||||
}
|
||||
}
|
||||
|
||||
// Adds the extension recommendation
|
||||
fs.mkdirSync(path.join(projectRoot, ".vscode"), { recursive: true })
|
||||
fs.writeFileSync(path.join(projectRoot, ".vscode", "extensions.json"), `{
|
||||
"recommendations": ["svelte.svelte-vscode"]
|
||||
}
|
||||
`)
|
||||
|
||||
console.log("Converted to TypeScript.")
|
||||
|
||||
if (fs.existsSync(path.join(projectRoot, "node_modules"))) {
|
||||
console.log("\nYou will need to re-run your dependency manager to get started.")
|
||||
}
|
44
svelte/src/App.svelte
Normal file
@@ -0,0 +1,44 @@
|
||||
<script>
|
||||
import Plateau from "./Plateau.svelte";
|
||||
import Joueur from "./Joueur.svelte";
|
||||
import Prompt from "./Prompt.svelte";
|
||||
import Piles from "./Piles.svelte";
|
||||
|
||||
import { ws } from "./stores.js";
|
||||
let data;
|
||||
|
||||
$ws.onmessage = function (event) {
|
||||
data = JSON.parse(event.data);
|
||||
console.log(data);
|
||||
};
|
||||
</script>
|
||||
|
||||
{#if data}
|
||||
<main>
|
||||
<div id="main">
|
||||
<Plateau props={{villes: data.villes, routes: data.routes}} />
|
||||
<div>
|
||||
<Prompt props={data.prompt} />
|
||||
<Piles props={data.piles} logLines={data.log} />
|
||||
</div>
|
||||
</div>
|
||||
<div class="joueurs">
|
||||
{#each data.joueurs as props}
|
||||
<Joueur {props} />
|
||||
{/each}
|
||||
</div>
|
||||
</main>
|
||||
{:else}
|
||||
<p>La connexion avec le serveur n'a pas pu être établie.</p>
|
||||
<p>Démarrez le serveur et rechargez la page.</p>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
main {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
.joueurs {
|
||||
float: right;
|
||||
}
|
||||
</style>
|
148
svelte/src/Joueur.svelte
Normal file
@@ -0,0 +1,148 @@
|
||||
<script>
|
||||
import { ws } from "./stores.js";
|
||||
export let props;
|
||||
|
||||
function send(message) {
|
||||
console.log(`Message: "${message}"`);
|
||||
$ws.send(message);
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="joueur {props.couleur} {props.estJoueurCourant ? 'actif' : ''}">
|
||||
<div class="header row">
|
||||
<img
|
||||
class="avatar"
|
||||
alt="avatar {props.couleur}"
|
||||
src="images/avatar-{props.couleur}.png"
|
||||
/>
|
||||
<div class="info column">
|
||||
<span class="nom">{props.nom}</span>
|
||||
<div class="score">Score: {props.score}</div>
|
||||
<div class="gares">Gares: {props.nbGares}</div>
|
||||
<div class="wagons">Wagons: {props.nbWagons}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="secret">
|
||||
<div class="destinations column">
|
||||
{#each props.destinations as destination}
|
||||
<div
|
||||
class="destination"
|
||||
on:click={() => send(destination.nom)}
|
||||
>
|
||||
{destination.ville1} - {destination.ville2} ({destination.valeur})
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
<div class="cartes-wagon">
|
||||
{#each props.cartesWagon as wagon}
|
||||
<div
|
||||
class="carte-wagon {wagon}"
|
||||
on:click={() => send(wagon)}
|
||||
>
|
||||
<div
|
||||
class="image-wagon"
|
||||
style="background-image: url(images/carte-wagon-{wagon}.png"
|
||||
/>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
<div class="cartes-wagon">
|
||||
{#each props.cartesWagonPosees as wagon}
|
||||
<div class="carte-wagon {wagon}">
|
||||
<div
|
||||
class="image-wagon"
|
||||
style="background-image: url(images/carte-wagon-{wagon}.png"
|
||||
/>
|
||||
<div class="overlay" />
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.joueur {
|
||||
color: var(--col-dark);
|
||||
border: 1px solid var(--col-dark);
|
||||
border-radius: 8px;
|
||||
width: 280px;
|
||||
padding: 4px;
|
||||
margin-left: 4px;
|
||||
margin-bottom: 4px;
|
||||
box-shadow: 2px 2px 2px var(--col-dark);
|
||||
}
|
||||
.joueur.BLEU {
|
||||
background: var(--col-light-BLEU);
|
||||
}
|
||||
.joueur.VERT {
|
||||
background: var(--col-light-VERT);
|
||||
}
|
||||
.joueur.ROSE {
|
||||
background: var(--col-light-ROSE);
|
||||
}
|
||||
.joueur.ROUGE {
|
||||
background: var(--col-light-ROUGE);
|
||||
}
|
||||
.joueur.JAUNE {
|
||||
background: var(--col-light-JAUNE);
|
||||
}
|
||||
.header {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.info {
|
||||
width: 100%;
|
||||
}
|
||||
.nom {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 1.5em;
|
||||
font-weight: bold;
|
||||
}
|
||||
.avatar {
|
||||
height: 84px;
|
||||
width: 66px;
|
||||
}
|
||||
.secret {
|
||||
display: none;
|
||||
}
|
||||
.joueur:hover .secret,
|
||||
.joueur.actif .secret {
|
||||
display: block;
|
||||
}
|
||||
.destinations {
|
||||
align-content: right;
|
||||
}
|
||||
.cartes-wagon {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row;
|
||||
width: 250px;
|
||||
}
|
||||
.carte-wagon {
|
||||
border: 1px solid var(--col-dark);
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
width: calc(248px * 0.3);
|
||||
height: calc(160px * 0.3);
|
||||
padding: 0;
|
||||
margin-right: -42px;
|
||||
}
|
||||
.carte-wagon .overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: var(--col-dark);
|
||||
opacity: 0.5;
|
||||
}
|
||||
.image-wagon {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-size: cover;
|
||||
}
|
||||
</style>
|
42
svelte/src/Log.svelte
Normal file
@@ -0,0 +1,42 @@
|
||||
<script>
|
||||
import { afterUpdate } from "svelte";
|
||||
export let lines;
|
||||
|
||||
function scrollToBottom() {
|
||||
const logElement = document.getElementById("inner-log");
|
||||
logElement.scrollTop = logElement.scrollHeight;
|
||||
}
|
||||
|
||||
afterUpdate(scrollToBottom);
|
||||
</script>
|
||||
|
||||
<div id="log">
|
||||
<div id="inner-log">
|
||||
{#each lines as line}
|
||||
<pre>{@html line}</pre>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
#log {
|
||||
margin: 5px 0;
|
||||
padding: 10px 30px 12px 26px;
|
||||
width: 408px;
|
||||
height: 263px;
|
||||
font-family: monospace;
|
||||
background: url(images/dialogue-box_Big.png);
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
#inner-log {
|
||||
padding: 0px;
|
||||
/* border: solid 1px black; */
|
||||
height: 100%;
|
||||
overflow: overlay;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
background-color: transparent;
|
||||
}
|
||||
</style>
|
109
svelte/src/Piles.svelte
Normal file
@@ -0,0 +1,109 @@
|
||||
<script>
|
||||
import { ws } from "./stores.js";
|
||||
import Log from "./Log.svelte";
|
||||
export let props;
|
||||
export let logLines;
|
||||
|
||||
function send(message) {
|
||||
console.log(`Message: "${message}"`);
|
||||
$ws.send(message);
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="piles" class="row">
|
||||
<div class="column">
|
||||
<div id="cartes-visibles" class="row">
|
||||
{#each props.cartesWagonVisibles as couleur}
|
||||
<div class="carte visible column">
|
||||
<img
|
||||
class="shadow"
|
||||
alt={couleur}
|
||||
src="images/carte-wagon-{couleur}.png"
|
||||
on:click={() => send(couleur)}
|
||||
/>
|
||||
<span>{couleur[0] + couleur.slice(1).toLowerCase()}</span>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
<Log lines={logLines} />
|
||||
</div>
|
||||
<div id="pile-cartes-wagon" class="carte column">
|
||||
<img
|
||||
class="shadow"
|
||||
alt="wagon"
|
||||
src="images/carte-wagon.png"
|
||||
on:click={() => send("GRIS")}
|
||||
/>
|
||||
<span>Cartes wagon ({props.pileCartesWagon})</span>
|
||||
</div>
|
||||
<div class="carte column">
|
||||
{#if props.defausseCartesWagon.length === 0}
|
||||
<div class="carte-stub" />
|
||||
{:else}
|
||||
<div id="defausse-cartes-wagon" class="carte column">
|
||||
{#each props.defausseCartesWagon.slice(-15) as couleur}
|
||||
<img
|
||||
class="shadow"
|
||||
alt={couleur}
|
||||
src="images/carte-wagon-{couleur}.png"
|
||||
/>
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
<span>Défausse ({props.defausseCartesWagon.length})</span>
|
||||
</div>
|
||||
<div id="pile-destinations" class="carte column">
|
||||
<img
|
||||
class="shadow"
|
||||
alt="destinations"
|
||||
src="images/eu_TicketBack.png"
|
||||
on:click={() => send("destinations")}
|
||||
/>
|
||||
<span>Destinations ({props.pileDestinations})</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
#piles {
|
||||
justify-content: space-around;
|
||||
}
|
||||
.carte {
|
||||
width: 100px;
|
||||
font-size: 0.8em;
|
||||
text-align: center;
|
||||
}
|
||||
.carte-stub {
|
||||
width: 100px;
|
||||
height: 67px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.carte img {
|
||||
margin-bottom: 5px;
|
||||
border-radius: 4px;
|
||||
border: 1px var(--col-dark) solid;
|
||||
box-shadow: 2px 2px 2px var(--col-dark);
|
||||
}
|
||||
#cartes-visibles {
|
||||
width: 500px;
|
||||
height: 89px;
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
#defausse-cartes-wagon {
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
#defausse-cartes-wagon img {
|
||||
margin-top: -55px;
|
||||
display: none;
|
||||
}
|
||||
#defausse-cartes-wagon:hover img {
|
||||
display: block;
|
||||
}
|
||||
#defausse-cartes-wagon img:last-child {
|
||||
margin-top: 0;
|
||||
display: block;
|
||||
}
|
||||
#pile-destinations,
|
||||
#pile-cartes-wagon {
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
213
svelte/src/Plateau.svelte
Normal file
@@ -0,0 +1,213 @@
|
||||
<script>
|
||||
import { beforeUpdate } from "svelte";
|
||||
|
||||
import { villesData, routesData } from "./plateau_data.js";
|
||||
import { ws } from "./stores.js";
|
||||
export let props;
|
||||
|
||||
const LONGUEUR_SEGMENT = 60;
|
||||
const LARGEUR_SEGMENT = 20;
|
||||
const TAILLE_WAGON = 70;
|
||||
const TAILLE_GARE = 50;
|
||||
const RAYON_VILLE = 12;
|
||||
|
||||
function toggleTracks() {
|
||||
const cache = document.getElementById("cache");
|
||||
if (cache.style.visibility === "hidden") {
|
||||
cache.style.visibility = "";
|
||||
} else {
|
||||
cache.style.visibility = "hidden";
|
||||
}
|
||||
}
|
||||
|
||||
function send(message) {
|
||||
console.log(`Message: "${message}"`);
|
||||
$ws.send(message);
|
||||
}
|
||||
|
||||
class Ville {
|
||||
constructor(nom, x, y) {
|
||||
this.nom = nom;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.proprietaire = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
class Route {
|
||||
constructor(ville1, ville2, longueur, couleur, isTunnel, ferry, segments) {
|
||||
this.ville1 = ville1;
|
||||
this.ville2 = ville2;
|
||||
this.longueur = longueur;
|
||||
this.couleur = couleur;
|
||||
this.isTunnel = isTunnel;
|
||||
this.ferry = ferry;
|
||||
this.label = `${ville1} - ${ville2}`;
|
||||
this.segments = segments;
|
||||
this.proprietaire = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
const villes = Object.values(villesData).map(
|
||||
(data) => new Ville(data.nom, data.x, data.y)
|
||||
);
|
||||
|
||||
const routes = routesData.map(
|
||||
(data) =>
|
||||
new Route(
|
||||
data.ville1,
|
||||
data.ville2,
|
||||
data.longueur,
|
||||
data.couleur,
|
||||
data.isTunnel,
|
||||
data.ferry,
|
||||
data.segments
|
||||
)
|
||||
);
|
||||
|
||||
// Corriger les labels des routes multiples
|
||||
for (let i = 0; i < routes.length - 1; i++) {
|
||||
if (routes[i].label === routes[i + 1].label) {
|
||||
routes[i].label += "(1)";
|
||||
routes[i + 1].label += "(2)";
|
||||
}
|
||||
}
|
||||
|
||||
beforeUpdate(() => {
|
||||
for (const routeData of props.routes) {
|
||||
if (routeData.proprietaire) {
|
||||
routes.filter((r) => r.label === routeData.nom)[0].proprietaire =
|
||||
routeData.proprietaire;
|
||||
}
|
||||
}
|
||||
for (const villeData of props.villes) {
|
||||
if (villeData.proprietaire) {
|
||||
villes.filter((v) => v.nom === villeData.nom)[0].proprietaire =
|
||||
villeData.proprietaire;
|
||||
}
|
||||
}
|
||||
routes=routes;
|
||||
villes=villes;
|
||||
});
|
||||
</script>
|
||||
|
||||
<svg
|
||||
id="board"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
viewBox="0 0 1701 1097"
|
||||
>
|
||||
<!-- Dessin des routes -->
|
||||
{#each routes as route}
|
||||
<g
|
||||
class="route"
|
||||
on:click={() => send(route.label)}
|
||||
>
|
||||
{#each route.segments as segment, i}
|
||||
<g
|
||||
class="segment"
|
||||
transform="translate({segment.x}, {segment.y})
|
||||
rotate({(Math.atan2(segment.dy, segment.dx) * 180) / Math.PI})"
|
||||
>
|
||||
<rect
|
||||
x={-LONGUEUR_SEGMENT / 2}
|
||||
y={-LARGEUR_SEGMENT / 2}
|
||||
width={LONGUEUR_SEGMENT}
|
||||
height={LARGEUR_SEGMENT}
|
||||
/>
|
||||
</g>
|
||||
{/each}
|
||||
</g>
|
||||
{/each}
|
||||
|
||||
<!-- Cercles cliquables des villes -->
|
||||
{#each villes as ville}
|
||||
<g
|
||||
class="ville"
|
||||
transform="translate({ville.x}, {ville.y})"
|
||||
on:click={() => send(ville.nom)}
|
||||
>
|
||||
<circle cx="0" cy="0" r={RAYON_VILLE} />
|
||||
</g>
|
||||
{/each}
|
||||
|
||||
<!-- Rectangle pour faire ressortir les pièces des joueurs -->
|
||||
<rect
|
||||
id="cache"
|
||||
class="no-pointer"
|
||||
x="0"
|
||||
y="0"
|
||||
width="1701"
|
||||
height="1097"
|
||||
fill="#fffc"
|
||||
style="visibility: hidden"
|
||||
/>
|
||||
|
||||
<!-- Routes capturées par les joueurs -->
|
||||
{#each routes as route}
|
||||
<g class="no-pointer">
|
||||
{#each route.segments as segment, i}
|
||||
{#if route.proprietaire !== undefined}
|
||||
<g
|
||||
transform="translate({segment.x}, {segment.y})
|
||||
rotate({(Math.atan2(segment.dy, segment.dx) * 180) / Math.PI})"
|
||||
>
|
||||
<image
|
||||
xlink:href="images/image-wagon-{route.proprietaire}.png"
|
||||
width={TAILLE_WAGON}
|
||||
height={TAILLE_WAGON}
|
||||
transform="translate({-TAILLE_WAGON * 0.55}, {-TAILLE_WAGON / 2})"
|
||||
/>
|
||||
</g>
|
||||
{/if}
|
||||
{/each}
|
||||
</g>
|
||||
{/each}
|
||||
|
||||
<!-- Gares construites par les joueurs -->
|
||||
{#each villes as ville}
|
||||
{#if ville.proprietaire !== undefined}
|
||||
<g class="no-pointer" transform="translate({ville.x}, {ville.y})">
|
||||
<image
|
||||
xlink:href="images/gare-shadow.png"
|
||||
width={TAILLE_GARE * 1.05}
|
||||
height={TAILLE_GARE * 1.05}
|
||||
transform="translate({-TAILLE_GARE * 0.55}, {-TAILLE_GARE * 0.75})"
|
||||
/>
|
||||
<image
|
||||
xlink:href="images/gare-{ville.proprietaire}.png"
|
||||
width={TAILLE_GARE}
|
||||
height={TAILLE_GARE}
|
||||
transform="translate({-TAILLE_GARE * 0.6}, {-TAILLE_GARE * 0.7})"
|
||||
/>
|
||||
</g>
|
||||
{/if}
|
||||
{/each}
|
||||
|
||||
<!-- Bouton pour alterner l'affichage -->
|
||||
<image xlink:href="images/toggle-button.png" x=0 y = 0 width="80" height="80" on:click={toggleTracks}/>
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
#board {
|
||||
background: url(images/euMap.jpg);
|
||||
background-size: contain;
|
||||
width: 850px;
|
||||
height: 548px;
|
||||
border: 1px var(--col-dark) solid;
|
||||
border-radius: 8px;
|
||||
box-shadow: 2px 2px 2px var(--col-dark);
|
||||
}
|
||||
.ville {
|
||||
stroke: none;
|
||||
fill: #0000;
|
||||
}
|
||||
.route {
|
||||
stroke: none;
|
||||
fill: #0000;
|
||||
}
|
||||
.no-pointer {
|
||||
pointer-events: none;
|
||||
}
|
||||
</style>
|
||||
|
36
svelte/src/Prompt.svelte
Normal file
@@ -0,0 +1,36 @@
|
||||
<script>
|
||||
export let props;
|
||||
import { ws } from "./stores.js";
|
||||
|
||||
function send(message) {
|
||||
console.log(`Message: "${message}"`);
|
||||
$ws.send(message);
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="prompt">
|
||||
<div class="instruction">
|
||||
<span class="nom-joueur">{props.nomJoueurCourant}:</span>
|
||||
{props.instruction}
|
||||
</div>
|
||||
<div class="boutons">
|
||||
{#each props.boutons as bouton}
|
||||
<button
|
||||
class="btn btn-primary"
|
||||
on:click={() => send(bouton)}
|
||||
>{bouton}</button
|
||||
>
|
||||
{/each}
|
||||
{#if props.peutPasser}
|
||||
<button on:click={() => send("")}>Passer</button>
|
||||
{:else}
|
||||
<button disabled>Passer</button>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.nom-joueur {
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
7
svelte/src/main.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import App from './App.svelte';
|
||||
|
||||
const app = new App({
|
||||
target: document.body,
|
||||
});
|
||||
|
||||
export default app;
|
153
svelte/src/plateau_data.js
Normal file
@@ -0,0 +1,153 @@
|
||||
export const villesData = {
|
||||
"Cadiz": { "x": 144, "y": 1072, "nom": "Cadiz" },
|
||||
"Madrid": { "x": 147, "y": 946, "nom": "Madrid" },
|
||||
"Barcelona": { "x": 336, "y": 961, "nom": "Barcelona" },
|
||||
"Lisboa": { "x": 32, "y": 981, "nom": "Lisboa" },
|
||||
"Pamplona": { "x": 318, "y": 805, "nom": "Pamplona" },
|
||||
"Paris": { "x": 425, "y": 544, "nom": "Paris" },
|
||||
"Dieppe": { "x": 341, "y": 467, "nom": "Dieppe" },
|
||||
"Brest": { "x": 188, "y": 516, "nom": "Brest" },
|
||||
"London": { "x": 358, "y": 313, "nom": "London" },
|
||||
"Amsterdam": { "x": 524, "y": 319, "nom": "Amsterdam" },
|
||||
"Bruxelles": { "x": 485, "y": 399, "nom": "Bruxelles" },
|
||||
"Edinburgh": { "x": 245, "y": 56, "nom": "Edinburgh" },
|
||||
"Zurich": { "x": 622, "y": 638, "nom": "Zurich" },
|
||||
"Marseille": { "x": 575, "y": 797, "nom": "Marseille" },
|
||||
"Frankfurt": { "x": 638, "y": 454, "nom": "Frankfurt" },
|
||||
"Munchen": { "x": 737, "y": 530, "nom": "Munchen" },
|
||||
"Wien": { "x": 930, "y": 559, "nom": "Wien" },
|
||||
"Venezia": { "x": 763, "y": 694, "nom": "Venezia" },
|
||||
"Roma": { "x": 779, "y": 849, "nom": "Roma" },
|
||||
"Brindisi": { "x": 925, "y": 892, "nom": "Brindisi" },
|
||||
"Palermo": { "x": 841, "y": 1072, "nom": "Palermo" },
|
||||
"Athina": { "x": 1136, "y": 1024, "nom": "Athina" },
|
||||
"Sofia": { "x": 1167, "y": 830, "nom": "Sofia" },
|
||||
"Sarajevo": { "x": 1053, "y": 815, "nom": "Sarajevo" },
|
||||
"Zagrab": { "x": 908, "y": 714, "nom": "Zagrab" },
|
||||
"Budapest": { "x": 1014, "y": 602, "nom": "Budapest" },
|
||||
"Kyiv": { "x": 1370, "y": 438, "nom": "Kyiv" },
|
||||
"Warszawa": { "x": 1113, "y": 345, "nom": "Warszawa" },
|
||||
"Wilno": { "x": 1302, "y": 303, "nom": "Wilno" },
|
||||
"Smolensk": { "x": 1479, "y": 310, "nom": "Smolensk" },
|
||||
"Moskva": { "x": 1625, "y": 269, "nom": "Moskva" },
|
||||
"Kharkov": { "x": 1600, "y": 528, "nom": "Kharkov" },
|
||||
"Rostov": { "x": 1671, "y": 618, "nom": "Rostov" },
|
||||
"Sochi": { "x": 1660, "y": 770, "nom": "Sochi" },
|
||||
"Erzurum": { "x": 1628, "y": 986, "nom": "Erzurum" },
|
||||
"Constantinople": { "x": 1358, "y": 932, "nom": "Constantinople" },
|
||||
"Angora": { "x": 1492, "y": 1026, "nom": "Angora" },
|
||||
"Smyrna": { "x": 1282, "y": 1068, "nom": "Smyrna" },
|
||||
"Essen": { "x": 663, "y": 335, "nom": "Essen" },
|
||||
"Berlin": { "x": 834, "y": 359, "nom": "Berlin" },
|
||||
"Kobenhavn": { "x": 784, "y": 155, "nom": "Kobenhavn" },
|
||||
"Stockholm": { "x": 963, "y": 22, "nom": "Stockholm" },
|
||||
"Riga": { "x": 1169, "y": 71, "nom": "Riga" },
|
||||
"Petrograd": { "x": 1458, "y": 64, "nom": "Petrograd" },
|
||||
"Danzig": { "x": 1028, "y": 226, "nom": "Danzig" },
|
||||
"Bucuresti": { "x": 1271, "y": 721, "nom": "Bucuresti" },
|
||||
"Sevastopol": { "x": 1508, "y": 746, "nom": "Sevastopol" }
|
||||
};
|
||||
|
||||
export const routesData = {
|
||||
{ "ville1": "Amsterdam", "ville2": "Bruxelles", "longueur": 1, "couleur": "NOIR", "isTunnel": false, "ferry": 0, "segments": [{ "x": 504.5, "y": 361.5, "dx": -0.42661867571297646, "dy": 0.9044315925115101 }] },
|
||||
{ "ville1": "Amsterdam", "ville2": "Essen", "longueur": 3, "couleur": "JAUNE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 528.5, "y": 276, "dx": 0.21871145691738075, "dy": -0.9757895770160064 }, { "x": 574, "y": 265, "dx": 0.9778024140774094, "dy": 0.20952908873087345 }, { "x": 629, "y": 300, "dx": 0.6368814469962913, "dy": 0.7709617516270895 }] },
|
||||
{ "ville1": "Amsterdam", "ville2": "Frankfurt", "longueur": 2, "couleur": "BLANC", "isTunnel": false, "ferry": 0, "segments": [{ "x": 562, "y": 358.5, "dx": 0.6983238520753277, "dy": 0.7157819483772108 }, { "x": 606, "y": 403, "dx": 0.7249994335944138, "dy": 0.688749461914693 }] },
|
||||
{ "ville1": "Amsterdam", "ville2": "London", "longueur": 2, "couleur": "GRIS", "isTunnel": false, "ferry": 2, "segments": [{ "x": 405, "y": 312, "dx": 1, "dy": 0 }, { "x": 469, "y": 314.5, "dx": 0.9998514005489976, "dy": 0.017238817250844786 }] },
|
||||
{ "ville1": "Angora", "ville2": "Constantinople", "longueur": 2, "couleur": "GRIS", "isTunnel": true, "ferry": 0, "segments": [{ "x": 1399, "y": 959, "dx": 0.8209052017854871, "dy": 0.5710644881985998 }, { "x": 1452, "y": 998, "dx": 0.8041761414663255, "dy": 0.5943910610838058 }] },
|
||||
{ "ville1": "Angora", "ville2": "Erzurum", "longueur": 3, "couleur": "NOIR", "isTunnel": false, "ferry": 0, "segments": [{ "x": 1533.5, "y": 1046, "dx": 0.8765785507795943, "dy": 0.48125881219271843 }, { "x": 1597, "y": 1059.5, "dx": 0.9812488205210874, "dy": -0.19274530403092788 }, { "x": 1635.5, "y": 1031.5, "dx": -0.16148856811054085, "dy": -0.9868745828977495 }] },
|
||||
{ "ville1": "Angora", "ville2": "Smyrna", "longueur": 3, "couleur": "ORANGE", "isTunnel": true, "ferry": 0, "segments": [{ "x": 1329.5, "y": 1072.5, "dx": 0.9998347517133227, "dy": 0.01817881366751496 }, { "x": 1392.5, "y": 1072, "dx": 0.9895864392845114, "dy": -0.14393984571411075 }, { "x": 1455.5, "y": 1054, "dx": 0.8765785507795943, "dy": -0.48125881219271843 }] },
|
||||
{ "ville1": "Athina", "ville2": "Brindisi", "longueur": 4, "couleur": "GRIS", "isTunnel": false, "ferry": 1, "segments": [{ "x": 957, "y": 928, "dx": 0.389639990836698, "dy": 0.9209672510685588 }, { "x": 982, "y": 986.5, "dx": 0.38337767164151665, "dy": 0.9235916635000174 }, { "x": 1027.5, "y": 1030.5, "dx": 0.9554026409829016, "dy": 0.2953062708492605 }, { "x": 1093.5, "y": 1036, "dx": 0.9838699100999074, "dy": -0.17888543819998318 }] },
|
||||
{ "ville1": "Athina", "ville2": "Sarajevo", "longueur": 4, "couleur": "VERT", "isTunnel": false, "ferry": 0, "segments": [{ "x": 1052.5, "y": 859, "dx": -0.053494721371611896, "dy": 0.9985681322700888 }, { "x": 1049, "y": 922.5, "dx": -0.035066140133044446, "dy": 0.9993849937917667 }, { "x": 1045.5, "y": 986.5, "dx": -0.08444307668618062, "dy": 0.9964283048969312 }, { "x": 1087.5, "y": 1007, "dx": 0.9994259471398348, "dy": 0.033878845665757114 }] },
|
||||
{ "ville1": "Athina", "ville2": "Smyrna", "longueur": 2, "couleur": "GRIS", "isTunnel": false, "ferry": 1, "segments": [{ "x": 1180.5, "y": 1022, "dx": 0.9994259471398348, "dy": -0.033878845665757114 }, { "x": 1244.5, "y": 1036.5, "dx": 0.9044315925115101, "dy": 0.42661867571297646 }] },
|
||||
{ "ville1": "Athina", "ville2": "Sofia", "longueur": 3, "couleur": "ROSE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 1136, "y": 861, "dx": -0.6709133239691262, "dy": 0.7415357791237711 }, { "x": 1109.5, "y": 921, "dx": -0.11982016019085814, "dy": 0.9927956130099675 }, { "x": 1123, "y": 983, "dx": 0.52999894000318, "dy": 0.847998304005088 }] },
|
||||
{ "ville1": "Barcelona", "ville2": "Madrid", "longueur": 2, "couleur": "JAUNE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 221.5, "y": 954.5, "dx": 0.9998563940539735, "dy": 0.016946718543287685 }, { "x": 285.5, "y": 956.5, "dx": 0.9986178293325098, "dy": 0.052558833122763673 }] },
|
||||
{ "ville1": "Barcelona", "ville2": "Marseille", "longueur": 4, "couleur": "GRIS", "isTunnel": false, "ferry": 0, "segments": [{ "x": 370.5, "y": 926, "dx": 0.6610305430689966, "dy": -0.7503589948350772 }, { "x": 415.5, "y": 881.5, "dx": 0.7407190347407712, "dy": -0.6718149384858157 }, { "x": 467.5, "y": 843.5, "dx": 0.8692901189279536, "dy": -0.4943022244884442 }, { "x": 525, "y": 818, "dx": 0.9377487607237036, "dy": -0.34731435582359393 }] },
|
||||
{ "ville1": "Barcelona", "ville2": "Pamplona", "longueur": 2, "couleur": "GRIS", "isTunnel": true, "ferry": 0, "segments": [{ "x": 322.5, "y": 852.5, "dx": 0.09053574604251853, "dy": 0.9958932064677039 }, { "x": 329.5, "y": 917.5, "dx": 0.11781773987828967, "dy": 0.9930352361170129 }] },
|
||||
{ "ville1": "Berlin", "ville2": "Danzig", "longueur": 4, "couleur": "GRIS", "isTunnel": false, "ferry": 0, "segments": [{ "x": 842.5, "y": 306.5, "dx": 0.1559625734730109, "dy": -0.987762965329069 }, { "x": 867.5, "y": 246.5, "dx": 0.5746304214759497, "dy": -0.8184130245263527 }, { "x": 922.5, "y": 210, "dx": 0.978549784986749, "dy": -0.2060104810498419 }, { "x": 987, "y": 210, "dx": 0.9778024140774094, "dy": 0.20952908873087345 }] },
|
||||
{ "ville1": "Berlin", "ville2": "Essen", "longueur": 2, "couleur": "BLEU", "isTunnel": false, "ferry": 0, "segments": [{ "x": 726.5, "y": 331.5, "dx": 0.9925434552766405, "dy": 0.12189130152520146 }, { "x": 789.5, "y": 339, "dx": 0.9945054529214061, "dy": 0.10468478451804275 }] },
|
||||
{ "ville1": "Berlin", "ville2": "Frankfurt", "longueur": 3, "couleur": "ROUGE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 686.5, "y": 452.5, "dx": 0.9173450110960782, "dy": -0.3980931180228264 }, { "x": 743, "y": 424.5, "dx": 0.9012524245251862, "dy": -0.43329443486787794 }, { "x": 800, "y": 397.5, "dx": 0.9012524245251862, "dy": -0.43329443486787794 }] },
|
||||
{ "ville1": "Berlin", "ville2": "Frankfurt", "longueur": 3, "couleur": "NOIR", "isTunnel": false, "ferry": 0, "segments": [{ "x": 676, "y": 432.5, "dx": 0.9012524245251862, "dy": -0.43329443486787794 }, { "x": 734, "y": 405.5, "dx": 0.9084904526785746, "dy": -0.41790560823214434 }, { "x": 790.5, "y": 378, "dx": 0.8909061469019802, "dy": -0.4541874474402252 }] },
|
||||
{ "ville1": "Berlin", "ville2": "Warszawa", "longueur": 4, "couleur": "JAUNE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 877, "y": 365.5, "dx": 0.9469787003150827, "dy": -0.3212963447497602 }, { "x": 940, "y": 350.5, "dx": 0.988173903359179, "dy": -0.15333732983159673 }, { "x": 1003, "y": 347, "dx": 0.9993628543475496, "dy": -0.03569153051241249 }, { "x": 1065.5, "y": 350.5, "dx": 0.987762965329069, "dy": 0.1559625734730109 }] },
|
||||
{ "ville1": "Berlin", "ville2": "Warszawa", "longueur": 4, "couleur": "ROSE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 875.5, "y": 341.5, "dx": 0.9486832980505138, "dy": -0.31622776601683794 }, { "x": 939.5, "y": 326.5, "dx": 0.9925434552766405, "dy": -0.12189130152520146 }, { "x": 1002, "y": 322, "dx": 0.9994059993535875, "dy": -0.03446227583977888 }, { "x": 1067, "y": 327, "dx": 0.9906211292434748, "dy": 0.13663739713703102 }] },
|
||||
{ "ville1": "Berlin", "ville2": "Wien", "longueur": 3, "couleur": "VERT", "isTunnel": false, "ferry": 0, "segments": [{ "x": 847, "y": 408.5, "dx": 0.2890045919356118, "dy": 0.9573277107867141 }, { "x": 870.5, "y": 467, "dx": 0.47514891473488396, "dy": 0.8799053976571926 }, { "x": 906, "y": 520.5, "dx": 0.6246950475544243, "dy": 0.7808688094430304 }] },
|
||||
{ "ville1": "Brest", "ville2": "Dieppe", "longueur": 2, "couleur": "ORANGE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 225, "y": 482.5, "dx": 0.8650311892618034, "dy": -0.501718089771846 }, { "x": 287.5, "y": 464, "dx": 0.9977097021176764, "dy": -0.06764133573679162 }] },
|
||||
{ "ville1": "Brest", "ville2": "Pamplona", "longueur": 4, "couleur": "ROSE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 229.5, "y": 549.5, "dx": 0.9342183861793726, "dy": 0.3567015656321241 }, { "x": 280, "y": 591, "dx": 0.5547001962252291, "dy": 0.8320502943378437 }, { "x": 302, "y": 652, "dx": 0.1414213562373095, "dy": 0.9899494936611665 }, { "x": 306, "y": 716, "dx": 0, "dy": 1 }] },
|
||||
{ "ville1": "Brest", "ville2": "Paris", "longueur": 3, "couleur": "NOIR", "isTunnel": false, "ferry": 0, "segments": [{ "x": 235, "y": 521, "dx": 0.9946917938265513, "dy": 0.1028991510855053 }, { "x": 298.5, "y": 529, "dx": 0.9945054529214061, "dy": 0.10468478451804275 }, { "x": 360.5, "y": 536.5, "dx": 0.9964283048969312, "dy": 0.08444307668618062 }] },
|
||||
{ "ville1": "Brindisi", "ville2": "Palermo", "longueur": 3, "couleur": "GRIS", "isTunnel": false, "ferry": 1, "segments": [{ "x": 880.5, "y": 1047.5, "dx": 0.6139406135149205, "dy": -0.7893522173763263 }, { "x": 923, "y": 998.5, "dx": 0.7327934916262993, "dy": -0.6804510993672779 }, { "x": 936.5, "y": 937, "dx": -0.40450601477770304, "dy": -0.9145353377582851 }] },
|
||||
{ "ville1": "Brindisi", "ville2": "Roma", "longueur": 2, "couleur": "BLANC", "isTunnel": false, "ferry": 0, "segments": [{ "x": 832.5, "y": 833, "dx": 0.9902939771518443, "dy": -0.13898862837218867 }, { "x": 892.5, "y": 856, "dx": 0.6610305430689966, "dy": 0.7503589948350772 }] },
|
||||
{ "ville1": "Bruxelles", "ville2": "Dieppe", "longueur": 2, "couleur": "VERT", "isTunnel": false, "ferry": 0, "segments": [{ "x": 387, "y": 447.5, "dx": 0.8346094065617252, "dy": -0.5508422083307386 }, { "x": 440, "y": 411, "dx": 0.8041761414663255, "dy": -0.5943910610838058 }] },
|
||||
{ "ville1": "Bruxelles", "ville2": "Frankfurt", "longueur": 2, "couleur": "BLEU", "isTunnel": false, "ferry": 0, "segments": [{ "x": 528.5, "y": 403, "dx": 0.9690971739229421, "dy": -0.24667928063493072 }, { "x": 590.5, "y": 420, "dx": 0.7321867381630838, "dy": 0.6811039424772872 }] },
|
||||
{ "ville1": "Bruxelles", "ville2": "Paris", "longueur": 2, "couleur": "JAUNE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 432.5, "y": 495, "dx": 0.47312663795681303, "dy": -0.8809944292988933 }, { "x": 462.5, "y": 439, "dx": 0.43329443486787794, "dy": -0.9012524245251862 }] },
|
||||
{ "ville1": "Bruxelles", "ville2": "Paris", "longueur": 2, "couleur": "ROUGE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 452.5, "y": 505.5, "dx": 0.4678877204190327, "dy": -0.8837879163470618 }, { "x": 482.5, "y": 449.5, "dx": 0.4678877204190327, "dy": -0.8837879163470618 }] },
|
||||
{ "ville1": "Bucuresti", "ville2": "Budapest", "longueur": 4, "couleur": "GRIS", "isTunnel": true, "ferry": 0, "segments": [{ "x": 1058, "y": 613.5, "dx": 0.8944271909999159, "dy": 0.4472135954999579 }, { "x": 1114.5, "y": 644, "dx": 0.8833490206949295, "dy": 0.46871580689935033 }, { "x": 1170, "y": 674, "dx": 0.8872168012345951, "dy": 0.46135273664198945 }, { "x": 1227, "y": 703.5, "dx": 0.8944271909999159, "dy": 0.4472135954999579 }] },
|
||||
{ "ville1": "Bucuresti", "ville2": "Constantinople", "longueur": 3, "couleur": "JAUNE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 1289.5, "y": 766, "dx": 0.40450601477770304, "dy": 0.9145353377582851 }, { "x": 1314.5, "y": 824, "dx": 0.39186206512519167, "dy": 0.9200239789895804 }, { "x": 1339, "y": 882, "dx": 0.4061384660534476, "dy": 0.9138115486202572 }] },
|
||||
{ "ville1": "Bucuresti", "ville2": "Kyiv", "longueur": 4, "couleur": "GRIS", "isTunnel": false, "ferry": 0, "segments": [{ "x": 1337, "y": 492, "dx": -0.284088329691374, "dy": 0.9587981127083872 }, { "x": 1317.5, "y": 552, "dx": -0.343192952923539, "dy": 0.9392649237907383 }, { "x": 1298, "y": 612.5, "dx": -0.3215824263578902, "dy": 0.9468815887204546 }, { "x": 1278, "y": 672, "dx": -0.3271105638831663, "dy": 0.9449860734402582 }] },
|
||||
{ "ville1": "Bucuresti", "ville2": "Sevastopol", "longueur": 4, "couleur": "BLANC", "isTunnel": false, "ferry": 0, "segments": [{ "x": 1307.5, "y": 690.5, "dx": 0.7071067811865476, "dy": -0.7071067811865476 }, { "x": 1365, "y": 657.5, "dx": 0.965948051503245, "dy": -0.2587360852240835 }, { "x": 1430.5, "y": 665, "dx": 0.9040722665053037, "dy": 0.4273796168934163 }, { "x": 1480.5, "y": 705, "dx": 0.6055218324832624, "dy": 0.7958286941208591 }] },
|
||||
{ "ville1": "Bucuresti", "ville2": "Sofia", "longueur": 2, "couleur": "GRIS", "isTunnel": true, "ferry": 0, "segments": [{ "x": 1209.5, "y": 809.5, "dx": 0.9582877607731983, "dy": -0.28580512163411176 }, { "x": 1250, "y": 762.5, "dx": 0.13436367297357807, "dy": -0.9909320881801382 }] },
|
||||
{ "ville1": "Budapest", "ville2": "Kyiv", "longueur": 6, "couleur": "GRIS", "isTunnel": true, "ferry": 0, "segments": [{ "x": 1037.5, "y": 561, "dx": 0.6633075143158518, "dy": -0.7483469392281404 }, { "x": 1084, "y": 518, "dx": 0.8209052017854871, "dy": -0.5710644881985998 }, { "x": 1139, "y": 483.5, "dx": 0.8799053976571926, "dy": -0.47514891473488396 }, { "x": 1197.5, "y": 459, "dx": 0.9468815887204546, "dy": -0.3215824263578902 }, { "x": 1260, "y": 446, "dx": 0.9974586998307351, "dy": -0.07124704998790965 }, { "x": 1324, "y": 446.5, "dx": 0.9998405993454448, "dy": 0.017854296416882943 }] },
|
||||
{ "ville1": "Budapest", "ville2": "Sarajevo", "longueur": 3, "couleur": "ROSE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 1026, "y": 646.5, "dx": 0.14393984571411075, "dy": 0.9895864392845114 }, { "x": 1035, "y": 709, "dx": 0.1757906384836575, "dy": 0.984427575508482 }, { "x": 1044.5, "y": 772, "dx": 0.12403473458920845, "dy": 0.9922778767136676 }] },
|
||||
{ "ville1": "Budapest", "ville2": "Wien", "longueur": 1, "couleur": "ROUGE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 973.5, "y": 578, "dx": 0.8528513040762654, "dy": 0.5221538596385299 }] },
|
||||
{ "ville1": "Budapest", "ville2": "Wien", "longueur": 1, "couleur": "BLANC", "isTunnel": false, "ferry": 0, "segments": [{ "x": 962, "y": 596, "dx": 0.8574929257125442, "dy": 0.5144957554275266 }] },
|
||||
{ "ville1": "Budapest", "ville2": "Zagrab", "longueur": 2, "couleur": "ORANGE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 987.5, "y": 639, "dx": -0.501718089771846, "dy": 0.8650311892618034 }, { "x": 946.5, "y": 689.5, "dx": -0.7724254859909581, "dy": 0.6351053995925655 }] },
|
||||
{ "ville1": "Cadiz", "ville2": "Lisboa", "longueur": 2, "couleur": "BLEU", "isTunnel": false, "ferry": 0, "segments": [{ "x": 50, "y": 1025.5, "dx": 0.4125075533080444, "dy": 0.9109541802219313 }, { "x": 100, "y": 1063.5, "dx": 0.9812488205210874, "dy": 0.19274530403092788 }] },
|
||||
{ "ville1": "Cadiz", "ville2": "Madrid", "longueur": 3, "couleur": "ORANGE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 189, "y": 1062, "dx": 0.9377487607237036, "dy": -0.34731435582359393 }, { "x": 222.5, "y": 1027.5, "dx": -0.3265202527980472, "dy": -0.9451902054680315 }, { "x": 184.5, "y": 976, "dx": -0.7493290854811462, "dy": -0.6621977964717106 }] },
|
||||
{ "ville1": "Constantinople", "ville2": "Sevastopol", "longueur": 4, "couleur": "GRIS", "isTunnel": false, "ferry": 2, "segments": [{ "x": 1490.5, "y": 791.5, "dx": -0.017541160386140585, "dy": 0.9998461420100133 }, { "x": 1471, "y": 852.5, "dx": -0.5795237863600037, "dy": 0.8149553245687551 }, { "x": 1428.5, "y": 874, "dx": -0.7938781460016401, "dy": -0.6080768777884903 }, { "x": 1386.5, "y": 896.5, "dx": -0.6139406135149205, "dy": 0.7893522173763263 }] },
|
||||
{ "ville1": "Constantinople", "ville2": "Smyrna", "longueur": 2, "couleur": "GRIS", "isTunnel": true, "ferry": 0, "segments": [{ "x": 1301.5, "y": 1026.5, "dx": 0.42661867571297646, "dy": -0.9044315925115101 }, { "x": 1330.5, "y": 968.5, "dx": 0.41110775310681835, "dy": -0.911586756889032 }] },
|
||||
{ "ville1": "Constantinople", "ville2": "Sofia", "longueur": 3, "couleur": "BLEU", "isTunnel": false, "ferry": 0, "segments": [{ "x": 1206, "y": 853, "dx": 0.8725060159497201, "dy": 0.48860336893184325 }, { "x": 1262, "y": 883, "dx": 0.879291966536774, "dy": 0.4762831485407526 }, { "x": 1317, "y": 913.5, "dx": 0.8650311892618034, "dy": 0.501718089771846 }] },
|
||||
{ "ville1": "Danzig", "ville2": "Riga", "longueur": 3, "couleur": "NOIR", "isTunnel": false, "ferry": 0, "segments": [{ "x": 1041.5, "y": 182.5, "dx": 0.27232246579934893, "dy": -0.9622060458243663 }, { "x": 1071, "y": 125.5, "dx": 0.6028330891856919, "dy": -0.7978673239222394 }, { "x": 1123.5, "y": 89, "dx": 0.9503971290446889, "dy": -0.3110390604146254 }] },
|
||||
{ "ville1": "Danzig", "ville2": "Warszawa", "longueur": 2, "couleur": "GRIS", "isTunnel": false, "ferry": 0, "segments": [{ "x": 1068, "y": 247, "dx": 0.847998304005088, "dy": 0.52999894000318 }, { "x": 1103.5, "y": 299, "dx": 0.22612970719934952, "dy": 0.9740972002433518 }] },
|
||||
{ "ville1": "Dieppe", "ville2": "London", "longueur": 2, "couleur": "GRIS", "isTunnel": false, "ferry": 1, "segments": [{ "x": 330.5, "y": 419.5, "dx": -0.08738374771484403, "dy": 0.9961747239492219 }, { "x": 336.5, "y": 358, "dx": -0.08588834215301201, "dy": 0.9963047689749394 }] },
|
||||
{ "ville1": "Dieppe", "ville2": "London", "longueur": 2, "couleur": "GRIS", "isTunnel": false, "ferry": 1, "segments": [{ "x": 354.5, "y": 422.5, "dx": 0.08444307668618062, "dy": -0.9964283048969312 }, { "x": 360, "y": 359.5, "dx": 0.10468478451804275, "dy": -0.9945054529214061 }] },
|
||||
{ "ville1": "Dieppe", "ville2": "Paris", "longueur": 1, "couleur": "ROSE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 379.5, "y": 500.5, "dx": 0.7071067811865475, "dy": 0.7071067811865475 }] },
|
||||
{ "ville1": "Edinburgh", "ville2": "London", "longueur": 4, "couleur": "ORANGE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 276.5, "y": 96, "dx": 0.42012356811103757, "dy": 0.9074669071198412 }, { "x": 301, "y": 154.5, "dx": 0.38337767164151665, "dy": 0.9235916635000174 }, { "x": 325, "y": 212, "dx": 0.389639990836698, "dy": 0.9209672510685588 }, { "x": 349.5, "y": 269.5, "dx": 0.3980931180228264, "dy": 0.9173450110960782 }] },
|
||||
{ "ville1": "Edinburgh", "ville2": "London", "longueur": 4, "couleur": "NOIR", "isTunnel": false, "ferry": 0, "segments": [{ "x": 255.5, "y": 105.5, "dx": 0.41110775310681835, "dy": 0.911586756889032 }, { "x": 280.5, "y": 163.5, "dx": 0.3980931180228264, "dy": 0.9173450110960782 }, { "x": 305, "y": 220, "dx": 0.40273861426601687, "dy": 0.9153150324227656 }, { "x": 329, "y": 277.5, "dx": 0.3960911114346502, "dy": 0.9182112128712345 }] },
|
||||
{ "ville1": "Erzurum", "ville2": "Sevastopol", "longueur": 4, "couleur": "GRIS", "isTunnel": false, "ferry": 2, "segments": [{ "x": 1514, "y": 792, "dx": 0, "dy": 1 }, { "x": 1518.5, "y": 854, "dx": 0.15867809538375516, "dy": 0.9873303712766988 }, { "x": 1542, "y": 914, "dx": 0.5710644881985998, "dy": 0.8209052017854871 }, { "x": 1588.5, "y": 960, "dx": 0.8372705045624257, "dy": 0.546788900938727 }] },
|
||||
{ "ville1": "Erzurum", "ville2": "Sochi", "longueur": 3, "couleur": "ROUGE", "isTunnel": true, "ferry": 0, "segments": [{ "x": 1653.5, "y": 817, "dx": -0.12403473458920845, "dy": 0.9922778767136676 }, { "x": 1644.5, "y": 880, "dx": -0.15867809538375516, "dy": 0.9873303712766988 }, { "x": 1635.5, "y": 942.5, "dx": -0.12625427967391514, "dy": 0.9919979117236188 }] },
|
||||
{ "ville1": "Essen", "ville2": "Frankfurt", "longueur": 2, "couleur": "VERT", "isTunnel": false, "ferry": 0, "segments": [{ "x": 666, "y": 412, "dx": 0.8944271909999159, "dy": -0.4472135954999579 }, { "x": 698, "y": 374.5, "dx": -0.4541874474402252, "dy": -0.8909061469019802 }] },
|
||||
{ "ville1": "Essen", "ville2": "Kobenhavn", "longueur": 3, "couleur": "GRIS", "isTunnel": false, "ferry": 1, "segments": [{ "x": 677, "y": 288, "dx": 0.5390536964233673, "dy": -0.8422714006615114 }, { "x": 713, "y": 235, "dx": 0.5547001962252291, "dy": -0.8320502943378437 }, { "x": 748, "y": 182, "dx": 0.5547001962252291, "dy": -0.8320502943378437 }] },
|
||||
{ "ville1": "Essen", "ville2": "Kobenhavn", "longueur": 3, "couleur": "GRIS", "isTunnel": false, "ferry": 1, "segments": [{ "x": 695.5, "y": 300, "dx": 0.5665288228870652, "dy": -0.8240419241993676 }, { "x": 731, "y": 246, "dx": 0.5462677805469223, "dy": -0.8376105968386142 }, { "x": 765.5, "y": 196, "dx": 0.5665288228870652, "dy": -0.8240419241993676 }] },
|
||||
{ "ville1": "Frankfurt", "ville2": "Munchen", "longueur": 2, "couleur": "ROSE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 654, "y": 500, "dx": 0.31622776601683794, "dy": 0.9486832980505138 }, { "x": 684.5, "y": 534.5, "dx": 0.9582877607731983, "dy": -0.28580512163411176 }] },
|
||||
{ "ville1": "Frankfurt", "ville2": "Paris", "longueur": 3, "couleur": "ORANGE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 494, "y": 553.5, "dx": 0.9568805766427723, "dy": -0.29048160362369874 }, { "x": 552, "y": 527, "dx": 0.8422714006615114, "dy": -0.5390536964233673 }, { "x": 605.5, "y": 491.5, "dx": 0.8137334712067349, "dy": -0.5812381937190964 }] },
|
||||
{ "ville1": "Frankfurt", "ville2": "Paris", "longueur": 3, "couleur": "BLANC", "isTunnel": false, "ferry": 0, "segments": [{ "x": 482.5, "y": 533, "dx": 0.939793423488437, "dy": -0.3417430630867044 }, { "x": 541, "y": 506.5, "dx": 0.8400393777687709, "dy": -0.5425254314756646 }, { "x": 594, "y": 471.5, "dx": 0.8240419241993676, "dy": -0.5665288228870652 }] },
|
||||
{ "ville1": "Kharkov", "ville2": "Kyiv", "longueur": 4, "couleur": "GRIS", "isTunnel": false, "ferry": 0, "segments": [{ "x": 1386, "y": 482, "dx": 0.34731435582359393, "dy": 0.9377487607237036 }, { "x": 1428, "y": 531, "dx": 0.8804710999221753, "dy": 0.47409982303501746 }, { "x": 1490.5, "y": 547.5, "dx": 0.9986178293325098, "dy": 0.052558833122763673 }, { "x": 1554, "y": 540, "dx": 0.9486832980505138, "dy": -0.31622776601683794 }] },
|
||||
{ "ville1": "Kharkov", "ville2": "Moskva", "longueur": 4, "couleur": "GRIS", "isTunnel": false, "ferry": 0, "segments": [{ "x": 1628.5, "y": 491, "dx": 0.6985367247883851, "dy": -0.7155742058807848 }, { "x": 1661.5, "y": 437, "dx": 0.2676438637860946, "dy": -0.9635179096299405 }, { "x": 1666, "y": 372, "dx": -0.1414213562373095, "dy": -0.9899494936611665 }, { "x": 1647, "y": 309.5, "dx": -0.4541874474402252, "dy": -0.8909061469019802 }] },
|
||||
{ "ville1": "Kharkov", "ville2": "Rostov", "longueur": 2, "couleur": "VERT", "isTunnel": false, "ferry": 0, "segments": [{ "x": 1651, "y": 528, "dx": 1, "dy": 0 }, { "x": 1670.5, "y": 573.5, "dx": 0.017541160386140585, "dy": 0.9998461420100133 }] },
|
||||
{ "ville1": "Kobenhavn", "ville2": "Stockholm", "longueur": 3, "couleur": "JAUNE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 808.5, "y": 114, "dx": 0.6804510993672779, "dy": -0.7327934916262993 }, { "x": 855, "y": 70.5, "dx": 0.7483469392281404, "dy": -0.6633075143158518 }, { "x": 908, "y": 34, "dx": 0.8804710999221753, "dy": -0.47409982303501746 }] },
|
||||
{ "ville1": "Kobenhavn", "ville2": "Stockholm", "longueur": 3, "couleur": "BLANC", "isTunnel": false, "ferry": 0, "segments": [{ "x": 825, "y": 132, "dx": 0.6896551724137931, "dy": -0.7241379310344828 }, { "x": 870, "y": 87.5, "dx": 0.7503589948350772, "dy": -0.6610305430689966 }, { "x": 923.5, "y": 50.5, "dx": 0.8837879163470618, "dy": -0.4678877204190327 }] },
|
||||
{ "ville1": "Kyiv", "ville2": "Smolensk", "longueur": 3, "couleur": "ROUGE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 1418.5, "y": 440.5, "dx": 0.9986178293325098, "dy": 0.052558833122763673 }, { "x": 1477.5, "y": 417, "dx": 0.7157819483772108, "dy": -0.6983238520753277 }, { "x": 1492, "y": 355.5, "dx": -0.2890045919356118, "dy": -0.9573277107867141 }] },
|
||||
{ "ville1": "Kyiv", "ville2": "Warszawa", "longueur": 4, "couleur": "GRIS", "isTunnel": false, "ferry": 0, "segments": [{ "x": 1143.5, "y": 376.5, "dx": 0.689213765997513, "dy": 0.7245580616896932 }, { "x": 1196, "y": 413, "dx": 0.9377487607237036, "dy": 0.34731435582359393 }, { "x": 1258.5, "y": 422.5, "dx": 0.9986178293325098, "dy": -0.052558833122763673 }, { "x": 1322.5, "y": 423.5, "dx": 0.9986178293325098, "dy": 0.052558833122763673 }] },
|
||||
{ "ville1": "Kyiv", "ville2": "Wilno", "longueur": 2, "couleur": "GRIS", "isTunnel": false, "ferry": 0, "segments": [{ "x": 1344, "y": 330.5, "dx": 0.8400393777687709, "dy": 0.5425254314756646 }, { "x": 1372, "y": 389.5, "dx": 0, "dy": 1 }] },
|
||||
{ "ville1": "Lisboa", "ville2": "Madrid", "longueur": 3, "couleur": "ROSE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 30, "y": 940, "dx": 0, "dy": -1 }, { "x": 49.5, "y": 896, "dx": 0.9994259471398348, "dy": 0.033878845665757114 }, { "x": 111, "y": 917.5, "dx": 0.8080075302163774, "dy": 0.5891721574494418 }] },
|
||||
{ "ville1": "Madrid", "ville2": "Pamplona", "longueur": 3, "couleur": "BLANC", "isTunnel": true, "ferry": 0, "segments": [{ "x": 186, "y": 920.5, "dx": 0.6419366564593427, "dy": -0.7667576729931038 }, { "x": 229, "y": 874, "dx": 0.7071067811865475, "dy": -0.7071067811865475 }, { "x": 278.5, "y": 833, "dx": 0.8372705045624257, "dy": -0.546788900938727 }] },
|
||||
{ "ville1": "Madrid", "ville2": "Pamplona", "longueur": 3, "couleur": "NOIR", "isTunnel": true, "ferry": 0, "segments": [{ "x": 171, "y": 905, "dx": 0.6536198703460924, "dy": -0.7568230077691596 }, { "x": 212.5, "y": 857, "dx": 0.6804510993672779, "dy": -0.7327934916262993 }, { "x": 261, "y": 817, "dx": 0.8422714006615114, "dy": -0.5390536964233673 }] },
|
||||
{ "ville1": "Marseille", "ville2": "Pamplona", "longueur": 4, "couleur": "ROUGE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 367.5, "y": 823, "dx": 0.9503971290446889, "dy": 0.3110390604146254 }, { "x": 401, "y": 790.5, "dx": 0.35305725243424235, "dy": -0.9356017189507422 }, { "x": 452.5, "y": 753.5, "dx": 0.9998461420100133, "dy": -0.017541160386140585 }, { "x": 516.5, "y": 770.5, "dx": 0.8979207227269799, "dy": 0.44015721702302935 }] },
|
||||
{ "ville1": "Marseille", "ville2": "Paris", "longueur": 4, "couleur": "GRIS", "isTunnel": false, "ferry": 0, "segments": [{ "x": 553, "y": 756, "dx": -0.5547001962252291, "dy": -0.8320502943378437 }, { "x": 505.5, "y": 713.5, "dx": -0.8837879163470618, "dy": -0.4678877204190327 }, { "x": 457, "y": 670.5, "dx": -0.5700815482062942, "dy": -0.821588113591424 }, { "x": 436.5, "y": 608.5, "dx": -0.054464493159869794, "dy": -0.9985157079309461 }] },
|
||||
{ "ville1": "Marseille", "ville2": "Roma", "longueur": 4, "couleur": "GRIS", "isTunnel": true, "ferry": 0, "segments": [{ "x": 620, "y": 778, "dx": 0.8041761414663255, "dy": -0.5943910610838058 }, { "x": 671, "y": 741.5, "dx": 0.8, "dy": -0.6 }, { "x": 712, "y": 762.5, "dx": 0.6028330891856919, "dy": 0.7978673239222394 }, { "x": 750, "y": 813.5, "dx": 0.6028330891856919, "dy": 0.7978673239222394 }] },
|
||||
{ "ville1": "Marseille", "ville2": "Zurich", "longueur": 2, "couleur": "ROSE", "isTunnel": true, "ferry": 0, "segments": [{ "x": 615, "y": 683.5, "dx": -0.2553911228370322, "dy": 0.9668378221687647 }, { "x": 599, "y": 746.5, "dx": -0.2890045919356118, "dy": 0.9573277107867141 }] },
|
||||
{ "ville1": "Moskva", "ville2": "Petrograd", "longueur": 4, "couleur": "BLANC", "isTunnel": false, "ferry": 0, "segments": [{ "x": 1504, "y": 79.5, "dx": 0.9538492507391959, "dy": 0.30028587523270983 }, { "x": 1561, "y": 110, "dx": 0.8041761414663255, "dy": 0.5943910610838058 }, { "x": 1600, "y": 161, "dx": 0.4472135954999579, "dy": 0.8944271909999159 }, { "x": 1617, "y": 222, "dx": 0.07124704998790965, "dy": 0.9974586998307351 }] },
|
||||
{ "ville1": "Moskva", "ville2": "Smolensk", "longueur": 2, "couleur": "ORANGE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 1526, "y": 314, "dx": 0.994309153919809, "dy": 0.10653312363426524 }, { "x": 1587, "y": 295.5, "dx": 0.8080075302163774, "dy": -0.5891721574494418 }] },
|
||||
{ "ville1": "Munchen", "ville2": "Venezia", "longueur": 2, "couleur": "BLEU", "isTunnel": true, "ferry": 0, "segments": [{ "x": 742, "y": 587, "dx": 0.18208926018230742, "dy": 0.9832820049844601 }, { "x": 754, "y": 651, "dx": 0.20952908873087345, "dy": 0.9778024140774094 }] },
|
||||
{ "ville1": "Munchen", "ville2": "Wien", "longueur": 3, "couleur": "ORANGE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 768.5, "y": 566, "dx": 0.6055218324832624, "dy": 0.7958286941208591 }, { "x": 826, "y": 594.5, "dx": 0.9986649849421085, "dy": 0.0516550854280401 }, { "x": 887, "y": 574.5, "dx": 0.7792134503124135, "dy": -0.6267586448165066 }] },
|
||||
{ "ville1": "Munchen", "ville2": "Zurich", "longueur": 2, "couleur": "JAUNE", "isTunnel": true, "ferry": 0, "segments": [{ "x": 656.5, "y": 609.5, "dx": 0.7407190347407712, "dy": -0.6718149384858157 }, { "x": 702.5, "y": 564, "dx": 0.7321867381630838, "dy": -0.6811039424772872 }] },
|
||||
{ "ville1": "Palermo", "ville2": "Roma", "longueur": 4, "couleur": "GRIS", "isTunnel": false, "ferry": 1, "segments": [{ "x": 864, "y": 1032, "dx": -0.5943910610838058, "dy": 0.8041761414663255 }, { "x": 884.5, "y": 972, "dx": -0.017238817250844786, "dy": 0.9998514005489976 }, { "x": 866, "y": 911, "dx": 0.6163082616581107, "dy": 0.7875050010075858 }, { "x": 818, "y": 867.5, "dx": 0.8799053976571926, "dy": 0.47514891473488396 }] },
|
||||
{ "ville1": "Palermo", "ville2": "Smyrna", "longueur": 6, "couleur": "GRIS", "isTunnel": false, "ferry": 2, "segments": [{ "x": 1236.5, "y": 1069, "dx": 1, "dy": 0 }, { "x": 1172.5, "y": 1069, "dx": 1, "dy": 0 },{ "x": 1110.5, "y": 1069, "dx": 1, "dy": 0 }, { "x": 1048.5, "y": 1069, "dx": 1, "dy": 0 }, { "x": 984, "y": 1069, "dx": 1, "dy": 0 }, { "x": 920, "y": 1069, "dx": 1, "dy": 0 }] },
|
||||
{ "ville1": "Pamplona", "ville2": "Paris", "longueur": 4, "couleur": "BLEU", "isTunnel": false, "ferry": 0, "segments": [{ "x": 321.5, "y": 763, "dx": 0.5891721574494418, "dy": -0.8080075302163774 }, { "x": 353.5, "y": 706.5, "dx": 0.34570535882735637, "dy": -0.9383431168171101 }, { "x": 374, "y": 647, "dx": 0.24253562503633297, "dy": -0.9701425001453319 }, { "x": 387.5, "y": 584, "dx": 0.15333732983159673, "dy": -0.988173903359179 }] },
|
||||
{ "ville1": "Pamplona", "ville2": "Paris", "longueur": 4, "couleur": "VERT", "isTunnel": false, "ferry": 0, "segments": [{ "x": 343.5, "y": 770.5, "dx": 0.597266145998167, "dy": -0.8020431103403957 }, { "x": 376, "y": 713, "dx": 0.37729688731351946, "dy": -0.9260923597695477 }, { "x": 397, "y": 654, "dx": 0.27472112789737807, "dy": -0.9615239476408232 }, { "x": 410.5, "y": 592, "dx": 0.11982016019085814, "dy": -0.9927956130099675 }] },
|
||||
{ "ville1": "Paris", "ville2": "Zurich", "longueur": 3, "couleur": "GRIS", "isTunnel": true, "ferry": 0, "segments": [{ "x": 468.5, "y": 594, "dx": 0.5171156399255817, "dy": 0.8559155419457903 }, { "x": 515.5, "y": 636.5, "dx": 0.9052369440730288, "dy": 0.4249071370138707 }, { "x": 578.5, "y": 650, "dx": 1, "dy": 0 }] },
|
||||
{ "ville1": "Petrograd", "ville2": "Riga", "longueur": 4, "couleur": "GRIS", "isTunnel": false, "ferry": 0, "segments": [{ "x": 1216.5, "y": 73, "dx": 1, "dy": 0 }, { "x": 1281, "y": 74, "dx": 0.9993628543475496, "dy": -0.03569153051241249 }, { "x": 1344, "y": 72, "dx": 0.9993148337667671, "dy": -0.037011660509880265 }, { "x": 1407, "y": 71.5, "dx": 0.9985681322700888, "dy": -0.053494721371611896 }] },
|
||||
{ "ville1": "Petrograd", "ville2": "Stockholm", "longueur": 8, "couleur": "GRIS", "isTunnel": true, "ferry": 0, "segments": [{ "x": 994, "y": 57, "dx": 0.6332377902572627, "dy": 0.773957299203321 }, { "x": 1040, "y": 48, "dx": 0.8041761414663255, "dy": -0.5943910610838058 }, { "x": 1099.5, "y": 26.5, "dx": 0.9998347517133227, "dy": 0.01817881366751496 }, { "x": 1163, "y": 26.5, "dx": 0.9998405993454448, "dy": 0.017854296416882943 }, { "x": 1226.5, "y": 25.5, "dx": 0.9998461420100133, "dy": -0.017541160386140585 }, { "x": 1289.5, "y": 26, "dx": 1, "dy": 0 }, { "x": 1352.5, "y": 26.5, "dx": 0.9998347517133227, "dy": -0.01817881366751496 }, { "x": 1416.5, "y": 39, "dx": 0.9165393783696333, "dy": 0.39994445601584 }] },
|
||||
{ "ville1": "Petrograd", "ville2": "Wilno", "longueur": 4, "couleur": "BLEU", "isTunnel": false, "ferry": 0, "segments": [{ "x": 1326, "y": 261, "dx": 0.5943910610838058, "dy": -0.8041761414663255 }, { "x": 1364, "y": 209.5, "dx": 0.5627909770820216, "dy": -0.8265992475892192 }, { "x": 1400.5, "y": 158, "dx": 0.5829078754517308, "dy": -0.8125382506296854 }, { "x": 1437, "y": 107.5, "dx": 0.5861197865287227, "dy": -0.8102244107897049 }] },
|
||||
{ "ville1": "Riga", "ville2": "Wilno", "longueur": 4, "couleur": "VERT", "isTunnel": false, "ferry": 0, "segments": [{ "x": 1167, "y": 119, "dx": -0.16990691650764622, "dy": 0.985460115744348 }, { "x": 1175, "y": 182, "dx": 0.4190581774617469, "dy": 0.9079593845004517 }, { "x": 1216, "y": 230.5, "dx": 0.8559155419457903, "dy": 0.5171156399255817 }, { "x": 1270, "y": 264.5, "dx": 0.8400393777687709, "dy": 0.5425254314756646 }] },
|
||||
{ "ville1": "Roma", "ville2": "Venezia", "longueur": 2, "couleur": "NOIR", "isTunnel": false, "ferry": 0, "segments": [{ "x": 772.5, "y": 740, "dx": 0.19274530403092788, "dy": 0.9812488205210874 }, { "x": 784, "y": 803.5, "dx": 0.17888543819998318, "dy": 0.9838699100999074 }] },
|
||||
{ "ville1": "Rostov", "ville2": "Sevastopol", "longueur": 4, "couleur": "GRIS", "isTunnel": false, "ferry": 0, "segments": [{ "x": 1526, "y": 703, "dx": 0.13663739713703102, "dy": -0.9906211292434748 }, { "x": 1534.5, "y": 640, "dx": 0.15867809538375516, "dy": -0.9873303712766988 }, { "x": 1561, "y": 598, "dx": 0.9906211292434748, "dy": 0.13663739713703102 }, { "x": 1623.5, "y": 609, "dx": 0.9849570246463139, "dy": 0.17279947800812523 }] },
|
||||
{ "ville1": "Rostov", "ville2": "Sochi", "longueur": 2, "couleur": "GRIS", "isTunnel": false, "ferry": 0, "segments": [{ "x": 1667.5, "y": 663, "dx": -0.053494721371611896, "dy": 0.9985681322700888 }, { "x": 1664, "y": 726.5, "dx": -0.07000328148073091, "dy": 0.9975467611004155 }] },
|
||||
{ "ville1": "Sarajevo", "ville2": "Sofia", "longueur": 2, "couleur": "GRIS", "isTunnel": true, "ferry": 0, "segments": [{ "x": 1096, "y": 793, "dx": 0.9079593845004517, "dy": -0.4190581774617469 }, { "x": 1143.5, "y": 792, "dx": 0.47514891473488396, "dy": 0.8799053976571926 }] },
|
||||
{ "ville1": "Sarajevo", "ville2": "Zagrab", "longueur": 3, "couleur": "ROUGE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 913.5, "y": 761.5, "dx": 0.12189130152520146, "dy": 0.9925434552766405 }, { "x": 946, "y": 815.5, "dx": 0.8125382506296854, "dy": 0.5829078754517308 }, { "x": 1010, "y": 825.5, "dx": 0.9433123908373908, "dy": -0.3319062115909338 }] },
|
||||
{ "ville1": "Sevastopol", "ville2": "Sochi", "longueur": 2, "couleur": "GRIS", "isTunnel": false, "ferry": 1, "segments": [{ "x": 1554, "y": 753, "dx": 0.9899494936611665, "dy": 0.1414213562373095 }, { "x": 1616, "y": 763, "dx": 0.9899494936611665, "dy": 0.1414213562373095 }] },
|
||||
{ "ville1": "Smolensk", "ville2": "Wilno", "longueur": 3, "couleur": "JAUNE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 1344.5, "y": 274.5, "dx": 0.5812381937190964, "dy": -0.8137334712067349 }, { "x": 1386, "y": 251, "dx": 0.8160244811016552, "dy": 0.5780173407803391 }, { "x": 1438, "y": 289, "dx": 0.8160244811016552, "dy": 0.5780173407803391 }] },
|
||||
{ "ville1": "Venezia", "ville2": "Zagrab", "longueur": 2, "couleur": "GRIS", "isTunnel": false, "ferry": 0, "segments": [{ "x": 808, "y": 680.5, "dx": 0.965948051503245, "dy": -0.2587360852240835 }, { "x": 870.5, "y": 691.5, "dx": 0.8450788360522153, "dy": 0.5346417126044628 }] },
|
||||
{ "ville1": "Venezia", "ville2": "Zurich", "longueur": 2, "couleur": "VERT", "isTunnel": true, "ferry": 0, "segments": [{ "x": 664.5, "y": 659.5, "dx": 0.8837879163470618, "dy": 0.4678877204190327 }, { "x": 721.5, "y": 689, "dx": 0.8765785507795943, "dy": 0.48125881219271843 }] },
|
||||
{ "ville1": "Warszawa", "ville2": "Wien", "longueur": 4, "couleur": "BLEU", "isTunnel": false, "ferry": 0, "segments": [{ "x": 966.5, "y": 531.5, "dx": 0.860576682823999, "dy": -0.5093208939162444 }, { "x": 1016.5, "y": 493.5, "dx": 0.7423931175486519, "dy": -0.6699645207146371 }, { "x": 1059.5, "y": 446, "dx": 0.5891721574494418, "dy": -0.8080075302163774 }, { "x": 1094, "y": 392.5, "dx": 0.5221538596385299, "dy": -0.8528513040762654 }] },
|
||||
{ "ville1": "Warszawa", "ville2": "Wilno", "longueur": 3, "couleur": "ROUGE", "isTunnel": false, "ferry": 0, "segments": [{ "x": 1142.5, "y": 310.5, "dx": 0.4678877204190327, "dy": -0.8837879163470618 }, { "x": 1194, "y": 272, "dx": 0.9761870601839528, "dy": -0.21693045781865616 }, { "x": 1257, "y": 285, "dx": 0.847998304005088, "dy": 0.52999894000318 }] },
|
||||
{ "ville1": "Wien", "ville2": "Zagrab", "longueur": 2, "couleur": "GRIS", "isTunnel": false, "ferry": 0, "segments": [{ "x": 912.5, "y": 667, "dx": 0.08588834215301201, "dy": -0.9963047689749394 }, { "x": 916.5, "y": 604.5, "dx": 0.054464493159869794, "dy": -0.9985157079309461 }] }
|
||||
};
|
7
svelte/src/stores.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import { writable } from 'svelte/store';
|
||||
let hostname = window.location.hostname;
|
||||
if (hostname === "") {
|
||||
hostname = "localhost";
|
||||
}
|
||||
|
||||
export const ws = writable(new WebSocket(`ws://${hostname}:3232`));
|