diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..a3e906649 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +node_modules +.eslintrc.js \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 000000000..95949b2e8 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,23 @@ +module.exports = { + "env": { + "browser": true, + "es2021": true + }, + "extends": ["plugin:prettier/recommended"], + "parserOptions": { + "ecmaVersion": 12, + "sourceType": "module" + }, + "rules": { + 'no-new': 'off', + 'no-console': 'off', + 'no-alert': 'off', + 'no-plusplus': 'error', + 'no-param-reassign': 'error', + 'no-underscore-dangle': 'off', + 'no-return-assign': 'error', + 'max-depth': ['error', 2], + 'max-lines-per-function': ['error', 15], + 'import/extensions': ['off'], + } +}; diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..3c3629e64 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 000000000..46dc3e81f --- /dev/null +++ b/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "useTabs": false, + "tabWidth": 2, + "printWidth": 80, + "singleQuote": true, + "arrowParens": "always", + "trailingComma": "all" + } \ No newline at end of file diff --git a/README.md b/README.md index e97a1d649..eb5e04d83 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,80 @@ # ๐Ÿš‡ ์ง€ํ•˜์ฒ  ๋…ธ์„ ๋„ ๋ฏธ์…˜ +### to know +- [์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ MVC ํŒจํ„ด](http://blog.naver.com/love_junim/220655980712) +> 1. ์‚ฌ์šฉ์ž๋Š” ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜๊ณผ ์ƒํ˜ธ์ž‘์šฉํ•ฉ๋‹ˆ๋‹ค. +> 2. ์ปจํŠธ๋กค๋Ÿฌ์˜ ์ด๋ฒคํŠธ ํ—จ๋“ค๋Ÿฌ๊ฐ€ ์ž‘๋™๋ฉ๋‹ˆ๋‹ค. +> 3. ์ปจํŠธ๋กค๋Ÿฌ๋Š” ๋ชจ๋ธ๋กœ๋ถ€ํ„ฐ ๋ฐ์ดํ„ฐ๋ฅผ ์š”๊ตฌํ•˜๊ณ , ๊ทธ ๊ฒฐ๊ณผ๋ฅผ ๋ทฐ๋กœ ์ „๋‹ฌํ•ฉ๋‹ˆ๋‹ค. +> 4. ๋ทฐ๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ์‚ฌ์šฉ์ž์—๊ฒŒ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค. +- [์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ MVC ๊ตฌํ˜„](https://antaehyeon.github.io/devlog/2018/07/14/%EC%BD%94%EB%93%9C%EC%8A%A4%EC%BF%BC%EB%93%9C-MV%EC%97%AD%ED%95%A0%EB%82%98%EB%88%84%EA%B8%B0/) +- [๋กœ์ปฌ์Šคํ† ๋ฆฌ์ง€](https://www.daleseo.com/js-web-storage/) +> ์„ธ์…˜ ์Šคํ† ๋ฆฌ์ง€๋Š” ์›นํŽ˜์ด์ง€์˜ ์„ธ์…˜์ด ๋๋‚  ๋•Œ ์ €์žฅ๋œ ๋ฐ์ดํ„ฐ๊ฐ€ ์ง€์›Œ์ง€๋Š” ๋ฐ˜๋ฉด์—, ๋กœ์ปฌ ์Šคํ† ๋ฆฌ์ง€๋Š” ์›นํŽ˜์ด์ง€์˜ ์„ธ์…˜์ด ๋๋‚˜๋”๋ผ๋„ ๋ฐ์ดํ„ฐ๊ฐ€ ์ง€์›Œ์ง€์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ๋‹ค์‹œ ๋งํ•ด, ๋ธŒ๋ผ์šฐ์ €์—์„œ ๊ฐ™์€ ์›น์‚ฌ์ดํŠธ๋ฅผ ์—ฌ๋Ÿฌ ํƒญ์ด๋‚˜ ์ฐฝ์— ๋„์šฐ๋ฉด, ์—ฌ๋Ÿฌ ๊ฐœ์˜ ์„ธ์…˜ ์Šคํ† ๋ฆฌ์ง€์— ๋ฐ์ดํ„ฐ๊ฐ€ ์„œ๋กœ ๊ฒฉ๋ฆฌ๋˜์–ด ์ €์žฅ๋˜๋ฉฐ, ๊ฐ ํƒญ์ด๋‚˜ ์ฐฝ์ด ๋‹ซํž ๋•Œ ์ €์žฅํ•ด ๋‘” ๋ฐ์ดํ„ฐ๋„ ํ•จ๊ป˜ ์†Œ๋ฉธํ•ฉ๋‹ˆ๋‹ค. ๋ฐ˜๋ฉด์—, ๋กœ์ปฌ ์Šคํ† ๋ฆฌ์ง€์˜ ๊ฒฝ์šฐ ์—ฌ๋Ÿฌ ํƒญ์ด๋‚˜ ์ฐฝ ๊ฐ„์— ๋ฐ์ดํ„ฐ๊ฐ€ ์„œ๋กœ ๊ณต์œ ๋˜๋ฉฐ ํƒญ์ด๋‚˜ ์ฐฝ์„ ๋‹ซ์•„๋„ ๋ฐ์ดํ„ฐ๋Š” ๋ธŒ๋ผ์šฐ์ €์— ๊ทธ๋Œ€๋กœ ๋‚จ์•„ ์žˆ์Šต๋‹ˆ๋‹ค. +> ํ•˜์ง€๋งŒ ์ด๋Ÿฌํ•œ ๋กœ์ปฌ ์Šคํ† ๋ฆฌ์ง€์˜ ๋ฐ์ดํ„ฐ ์˜์†์„ฑ(persistence) ์–ด๋””๊นŒ์ง€๋‚˜ ๊ณ„์†ํ•ด์„œ ๋™์ผํ•œ ์ปดํ“จํ„ฐ์—์„œ ๋™์ผํ•œ ๋ธŒ๋ผ์šฐ์ €๋ฅผ ์‚ฌ์šฉํ•  ๋•Œ๋งŒ ํ•ด๋‹นํ•ฉ๋‹ˆ๋‹ค. ์ฆ‰, ๊ฐ™์€ ์ปดํ“จํ„ฐ์—์„œ ๋‹ค๋ฅธ ๋ธŒ๋ผ์šฐ์ €๋ฅผ ์‚ฌ์šฉํ•˜๊ฑฐ๋‚˜ (e.g. ํฌ๋กฌ์„ ์“ฐ๋‹ค๊ฐ€ ์‚ฌํŒŒ๋ฆฌ๋ฅผ ์“ฐ๋ฉด), ๋˜๋Š” ๋‹ค๋ฅธ ์ปดํ“จํ„ฐ์—์„œ ๊ฐ™์€ ๋ธŒ๋ผ์šฐ์ €๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ์—๋Š” (e.g. ์ง‘์—์„œ ํฌ๋กฌ์„ ์“ฐ๋‹ค๊ฐ€ ํšŒ์‚ฌ์—์„œ ํฌ๋กฌ์„ ์“ฐ๋ฉด), ์—„์—ฐํžˆ ๋‹ค๋ฅธ ๋ธŒ๋ผ์šฐ์ €์ด๋ฏ€๋กœ ์„œ๋กœ ๋‹ค๋ฅธ ๋‘ ๊ฐœ์˜ ๋กœ์ปฌ ์Šคํ† ๋ฆฌ์ง€์— ๋ฐ์ดํ„ฐ๊ฐ€ ์ €์žฅ๋  ๊ฒƒ์ž…๋‹ˆ๋‹ค. +> ์›น ์Šคํ† ๋ฆฌ์ง€๋ฅผ ์‚ฌ์šฉํ•  ๋•Œ ์ฃผ์˜ํ•ด์•ผ ํ•  ๋ถ€๋ถ„์ด ํ•˜๋‚˜ ์žˆ๋Š”๋ฐ์š”. ์˜ค์ง ๋ฌธ์žํ˜•(string) ๋ฐ์ดํ„ฐ ํƒ€์ž…๋งŒ ์ง€์›ํ•œ๋‹ค๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์›น ์Šคํ† ๋ฆฌ์ง€๋ฅผ ์‚ฌ์šฉํ•  ๋•Œ ์œ„์™€ ๊ฐ™์€(๋‹ค๋ฅธ ํƒ€์ž…์˜ ๋ฐ์ดํ„ฐ ์ €์žฅํ•  ๋•Œ) ๋ฌธ์ œ๋ฅผ ํ”ผํ•˜๊ธฐ ์œ„ํ•ด์„œ ๋งŽ์ด ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์ด JSON ํ˜•ํƒœ๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ์ฝ๊ณ  ์“ฐ๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. +> ๋กœ์ปฌ ์Šคํ† ๋ฆฌ์ง€์— ์ €์žฅ๋œ ๋ฐ์ดํ„ฐ๋Š” ์›นํŽ˜์ด์ง€๋ฅผ ๋‹ซ๋Š”๋‹ค๊ณ  ํ•ด์„œ ์‚ฌ๋ผ์ง€์ง€ ์•Š์œผ๋ฏ€๋กœ ๋ถˆํ•„์š”ํ•œ ๋ฐ์ดํ„ฐ๊ฐ€ ๋‚จ์ง€ ์•Š๋„๋ก ์ง์ ‘ ์ฒญ์†Œํ•ด์ฃผ๋Š” ๊ฒƒ์ด ์ข‹๊ฒ ์Šต๋‹ˆ๋‹ค. +- [๋กœ์ปฌ์Šคํ† ๋ฆฌ์ง€์— ๋ฐ์ดํ„ฐ๋ฅผ json์œผ๋กœ ์ €์žฅํ•˜๊ณ  ๋ถˆ๋Ÿฌ์˜ค๊ธฐ](https://studyingych.tistory.com/28) +> JSON์€ ํ˜•ํƒœ๋งŒ ๊ฐ์ฒด, ์‹ค์ฒด๋Š” ๋ฌธ์ž์—ด์ด๋‹ค! +- [์ด๋ฒคํŠธ ์œ„์ž„](https://ko.javascript.info/event-delegation) +> ์ด๋ฒคํŠธ ํ•ธ๋“ค๋Ÿฌ ํ•œ๋ฒˆ ์—ฐ๊ฒฐํ•  ๋•Œ ๋งˆ๋‹ค ๊ธฐ๋ณธ์ ์œผ๋กœ ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ๊ฝค๋‚˜ ์žก์•„ ๋จน๋Š”๋‹ค. +> listen์ด๋ผ๋Š” ์ž‘์—… ํŠน์„ฑ์ƒ ํ•ญ์ƒ ๋Œ€๊ธฐํ•ด์•ผ ํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์–ด๋–ป๊ฒŒ ๋ณด๋ฉด ๋‹น์—ฐํ•˜๋‹ค. +> ๋”ฐ๋ผ์„œ ์›ํ•˜๋Š” ์š”์†Œ๋ฅผ ๋งŒ๋“ค๋•Œ ๋งˆ๋‹ค ์ด๋ฒคํŠธ ํ•ธ๋“ค๋Ÿฌ๋ฅผ ์ถ”๊ฐ€ํ•ด ๋ฒ„๋ฆฌ๋ฉด ์‚ฌ์šฉ์ž์—๊ฒŒ ๋งค์šฐ ๋ถ€๋‹ด๋˜๋Š” ํŽ˜์ด์ง€๊ฐ€ ๋  ์ˆ˜ ์žˆ๋‹ค. +> ๋ถ€๊ฐ€์ ์ธ ๋ฌธ์ œ์ง€๋งŒ ์ด๋ฒคํŠธ ํ•ธ๋“ค๋Ÿฌ๋Š” ํƒœ๊ทธ๊ฐ€ ์‚ญ์ œ๋˜์–ด๋„ ์ž๋™์œผ๋กœ ์‚ญ์ œ๋˜์ง€ ์•Š์•„(js GC๋Š” ๋ญํ•˜๋Š”์ง€?) ๋”ฐ๋กœ ํ˜ธ์ถœํ•ด์•ผ ํ•˜๋Š”๋ฐ(๋ฉ”๋ชจ๋ฆฌ ๋ˆ„์ˆ˜๊ฐ€ ์—ฌ๊ธฐ๋„ ๋ฐœ์ƒํ•˜๋„ค) ์ด ์—ญ์‹œ ์ด๋ฒคํŠธ ์œ„์ž„์„ ํ†ตํ•ด ์ž๋™์ ์œผ๋กœ ํ•ด๊ฒฐ๋œ๋‹ค. +- [์ด๋ฒคํŠธ ์œ„์ž„๊ณผ ๋ฐ์ดํ„ฐ ์†์„ฑ ์—ฐ๋™ํ•˜๊ธฐ](https://ko.javascript.info/event-delegation#ref-353) +> ๊ฐ€์žฅ ๋จผ์ € ๋ฒ„ํŠผ ๊ฐ๊ฐ์— ๋…๋ฆฝ๋œ ํ•ธ๋“ค๋Ÿฌ๋ฅผ ํ• ๋‹นํ•˜๋Š” ๋ฐฉ๋ฒ•์ด ๋– ์˜ค๋ฅผ ๊ฒ๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ์ด ๋ฐฉ๋ฒ•๋ณด๋‹ค ๋” ์šฐ์•„ํ•œ ํ•ด๊ฒฐ์ฑ…์ด ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฉ”๋‰ด ์ „์ฒด์— ํ•ธ๋“ค๋Ÿฌ๋ฅผ ํ•˜๋‚˜ ์ถ”๊ฐ€ํ•ด์ฃผ๊ณ , ๊ฐ ๋ฒ„ํŠผ์˜ data-action ์†์„ฑ์— ํ˜ธ์ถœํ•  ๋ฉ”์„œ๋“œ๋ฅผ ํ• ๋‹นํ•ด ์ฃผ๋Š” ๋ฐฉ๋ฒ• ๋ง์ด์ฃ . + + +### to do +- [x] View: ํ™”๋ฉด์— ๋ณด์—ฌ์คŒ + - [x] constructor : 4๊ฐœ์˜ ๋ฒ„ํŠผ ๋งŒ๋“ค๊ธฐ + - [x] showStation: ์—ญ๊ด€๋ฆฌ ํ™”๋ฉด ๋งŒ๋“ค๊ธฐ + - [x] showLine: ๋…ธ์„  ๊ด€๋ฆฌ ํ™”๋ฉด ๋งŒ๋“ค๊ธฐ + - [x] showSection: ๊ตฌ๊ฐ„ ๊ด€๋ฆฌ ํ™”๋ฉด ๋งŒ๋“ค๊ธฐ + - [x] showMap: ์ง€ํ•˜์ฒ  ๋…ธ์„ ๋„ ํ™”๋ฉด ๋งŒ๋“ค๊ธฐ +- [x] Controller: ์ด๋ฒคํŠธ ๊ด€๋ จ + - [x] constructor: 4๊ฐœ์˜ ๋ฒ„ํŠผ์— ๋Œ€ํ•œ ์ด๋ฒคํŠธ๋ฅผ ํ™•์ธ + - [x] ์—ญ์ถ”๊ฐ€ ์ด๋ฒคํŠธ๋ฅผ ํ™•์ธ + - [x] ์—ญ์‚ญ์ œ ์ด๋ฒคํŠธ๋ฅผ ํ™•์ธ + - [x] ๋…ธ์„  ์ถ”๊ฐ€ ์ด๋ฒคํŠธ๋ฅผ ํ™•์ธ + - [x] ๋…ธ์„  ์‚ญ์ œ ์ด๋ฒคํŠธ๋ฅผ ํ™•์ธ + - [x] ๊ตฌ๊ฐ„ ์ถ”๊ฐ€ ์ด๋ฒคํŠธ๋ฅผ ํ™•์ธ + - [x] ๊ตฌ๊ฐ„ ์‚ญ์ œ ์ด๋ฒคํŠธ๋ฅผ ํ™•์ธ +- [x] Model: Local Storage์™€ ์†Œํ†ต + - [x] addStation: ์œ ํšจ์„ฑ(2๊ธ€์ž ์ด์ƒ, ์ค‘๋ณต ์—ฌ๋ถ€)์„ ๊ฒ€์ฆ, ์—ญ์ถ”๊ฐ€ + - [x] deleteStation: ์œ ํšจ์„ฑ(๋…ธ์„  ๋“ฑ๋ก ์—ฌ๋ถ€) ๊ฒ€์ฆ, ์—ญ์‚ญ์ œ + - [x] getStations: ์ „์ฒด ์—ญ ๋ฐ˜ํ™˜ + - [x] addLine: ์œ ํšจ์„ฑ(์ค‘๋ณต ์—ฌ๋ถ€, ์ข…์ ์—ญ ์˜ฌ๋ฐ”๋ฅธ ์ž…๋ ฅ ์—ฌ๋ถ€) ๊ฒ€์ฆ, ๋…ธ์„  ์ถ”๊ฐ€ + - [x] deleteLine: ๋…ธ์„  ์‚ญ์ œ + - [x] getLines: ์ „์ฒด ๋…ธ์„  ๋ฐ˜ํ™˜ + - [x] addSection: ์œ ํšจ์„ฑ(์—ญ ์ค‘๋ณต ์—ฌ๋ถ€) ๊ฒ€์ฆ, ๊ตฌ๊ฐ„ ์ถ”๊ฐ€ + - [x] deleteSection: ์œ ํšจ์„ฑ(๋…ธ์„  ํฌํ•จ ์—ญ ๋‘๊ฐœ ์ดˆ๊ณผ ์—ฌ๋ถ€) ๊ฒ€์ฆ, ๊ตฌ๊ฐ„ ์‚ญ์ œ + - [ ] ~~getSections: ๋…ธ์„  ๋ณ„ ๊ตฌ๊ฐ„ ๋ฐ˜ํ™˜~~ + ## ๐Ÿš€ ๊ธฐ๋Šฅ ์š”๊ตฌ์‚ฌํ•ญ +### ๊ธฐ์กด ์š”๊ตฌ์‚ฌํ•ญ + +- ์‚ฌ์šฉ์ž๊ฐ€ ์ž˜๋ชป๋œ ์ž…๋ ฅ ๊ฐ’์„ ์ž‘์„ฑํ•œ ๊ฒฝ์šฐ `alert`์„ ์ด์šฉํ•ด ๋ฉ”์‹œ์ง€๋ฅผ ๋ณด์—ฌ์ฃผ๊ณ , ์žฌ์ž…๋ ฅํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•œ๋‹ค. +- ์™ธ๋ถ€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ(jQuery, Lodash ๋“ฑ)๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ์•Š๊ณ , ์ˆœ์ˆ˜ Vanilla JS๋กœ๋งŒ ๊ตฌํ˜„ํ•œ๋‹ค. +- **์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ์ฝ”๋“œ ์ปจ๋ฒค์…˜์„ ์ง€ํ‚ค๋ฉด์„œ ํ”„๋กœ๊ทธ๋ž˜๋ฐ** ํ•œ๋‹ค + - [https://google.github.io/styleguide/jsguide.html](https://google.github.io/styleguide/jsguide.html) + - [https://ui.toast.com/fe-guide/ko_CODING-CONVENSION/](https://ui.toast.com/fe-guide/ko_CODING-CONVENTION) +- **indent(์ธ๋ดํŠธ, ๋“ค์—ฌ์“ฐ๊ธฐ) depth๋ฅผ 3์ด ๋„˜์ง€ ์•Š๋„๋ก ๊ตฌํ˜„ํ•œ๋‹ค. 2๊นŒ์ง€๋งŒ ํ—ˆ์šฉ**ํ•œ๋‹ค. + - ์˜ˆ๋ฅผ ๋“ค์–ด while๋ฌธ ์•ˆ์— if๋ฌธ์ด ์žˆ์œผ๋ฉด ๋“ค์—ฌ์“ฐ๊ธฐ๋Š” 2์ด๋‹ค. + - ํžŒํŠธ: indent(์ธ๋ดํŠธ, ๋“ค์—ฌ์“ฐ๊ธฐ) depth๋ฅผ ์ค„์ด๋Š” ์ข‹์€ ๋ฐฉ๋ฒ•์€ ํ•จ์ˆ˜(๋˜๋Š” ๋ฉ”์†Œ๋“œ)๋ฅผ ๋ถ„๋ฆฌํ•˜๋ฉด ๋œ๋‹ค. +- **ํ•จ์ˆ˜(๋˜๋Š” ๋ฉ”์†Œ๋“œ)์˜ ๊ธธ์ด๊ฐ€ 15๋ผ์ธ์„ ๋„˜์–ด๊ฐ€์ง€ ์•Š๋„๋ก ๊ตฌํ˜„ํ•œ๋‹ค.** + - ํ•จ์ˆ˜(๋˜๋Š” ๋ฉ”์†Œ๋“œ)๊ฐ€ ํ•œ ๊ฐ€์ง€ ์ผ๋งŒ ์ž˜ ํ•˜๋„๋ก ๊ตฌํ˜„ํ•œ๋‹ค. +- ๋ณ€์ˆ˜ ์„ ์–ธ์‹œ `var` ๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š”๋‹ค. `const` ์™€ `let` ์„ ์‚ฌ์šฉํ•œ๋‹ค. + - [const](https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Statements/const) + - [let](https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Statements/let) +- `import` ๋ฌธ์„ ์ด์šฉํ•ด ์Šคํฌ๋ฆฝํŠธ๋ฅผ ๋ชจ๋“ˆํ™”ํ•˜๊ณ  ๋ถˆ๋Ÿฌ์˜ฌ ์ˆ˜ ์žˆ๊ฒŒ ๋งŒ๋“ ๋‹ค. + - [https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Statements/import](https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Statements/import) +- `template literal`์„ ์ด์šฉํ•ด ๋ฐ์ดํ„ฐ์™€ html string์„ ๊ฐ€๋…์„ฑ ์ข‹๊ฒŒ ํ‘œํ˜„ํ•œ๋‹ค. + - [https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Template_literals](https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Template_literals) + +### ์ถ”๊ฐ€๋œ ์š”๊ตฌ์‚ฌํ•ญ +- [data](https://developer.mozilla.org/ko/docs/Learn/HTML/Howto/%EB%8D%B0%EC%9D%B4%ED%84%B0_%EC%86%8D%EC%84%B1_%EC%82%AC%EC%9A%A9%ED%95%98%EA%B8%B0)์†์„ฑ์„ ํ™œ์šฉํ•˜์—ฌ html ํƒœ๊ทธ์— ์—ญ, ๋…ธ์„ , ๊ตฌ๊ฐ„์˜ ์œ ์ผํ•œ ๋ฐ์ดํ„ฐ ๊ฐ’๋“ค์„ ๊ด€๋ฆฌํ•œ๋‹ค. +- [localStorage](https://developer.mozilla.org/ko/docs/Web/API/Window/localStorage)๋ฅผ ์ด์šฉํ•˜์—ฌ, ์ƒˆ๋กœ๊ณ ์นจํ•˜๋”๋ผ๋„ ๊ฐ€์žฅ ์ตœ๊ทผ์— ์ž‘์—…ํ•œ ์ •๋ณด๋“ค์„ ๋ถˆ๋Ÿฌ์˜ฌ ์ˆ˜ ์žˆ๋„๋ก ํ•œ๋‹ค. + +
### ์ง€ํ•˜์ฒ  ์—ญ ๊ด€๋ จ ๊ธฐ๋Šฅ - ์ง€ํ•˜์ฒ  ์—ญ์„ ๋“ฑ๋กํ•˜๊ณ  ์‚ญ์ œํ•  ์ˆ˜ ์žˆ๋‹ค. (๋‹จ, ๋…ธ์„ ์— ๋“ฑ๋ก๋œ ์—ญ์€ ์‚ญ์ œํ•  ์ˆ˜ ์—†๋‹ค) @@ -21,34 +95,16 @@ - ์—ญ๊ณผ ์—ญ ์‚ฌ์ด์— ์ƒˆ๋กœ์šด ์—ญ์ด ์ถ”๊ฐ€ ๋  ์ˆ˜ ์žˆ๋‹ค. - ๋…ธ์„ ์—์„œ ๊ฐˆ๋ž˜๊ธธ์€ ์ƒ๊ธธ ์ˆ˜ ์—†๋‹ค. - - ### ์ง€ํ•˜์ฒ  ๊ตฌ๊ฐ„ ์‚ญ์ œ ๊ธฐ๋Šฅ - ๋…ธ์„ ์— ๋“ฑ๋ก๋œ ์—ญ์„ ์ œ๊ฑฐํ•  ์ˆ˜ ์žˆ๋‹ค. - ์ข…์ ์„ ์ œ๊ฑฐํ•  ๊ฒฝ์šฐ ๋‹ค์Œ ์—ญ์ด ์ข…์ ์ด ๋œ๋‹ค. - ๋…ธ์„ ์— ํฌํ•จ๋œ ์—ญ์ด ๋‘๊ฐœ ์ดํ•˜์ผ ๋•Œ๋Š” ์—ญ์„ ์ œ๊ฑฐํ•  ์ˆ˜ ์—†๋‹ค. - - ### ์ง€ํ•˜์ฒ  ๋…ธ์„ ์— ๋“ฑ๋ก๋œ ์—ญ ์กฐํšŒ ๊ธฐ๋Šฅ - ๋…ธ์„ ์˜ ์ƒํ–‰ ์ข…์ ๋ถ€ํ„ฐ ํ•˜ํ–‰ ์ข…์ ๊นŒ์ง€ ์—ฐ๊ฒฐ๋œ ์ˆœ์„œ๋Œ€๋กœ ์—ญ ๋ชฉ๋ก์„ ์กฐํšŒํ•  ์ˆ˜ ์žˆ๋‹ค.
-## ๐Ÿ’ป ํ”„๋กœ๊ทธ๋žจ ์‹คํ–‰ ๊ฒฐ๊ณผ - -### ์—ญ๊ด€๋ฆฌ - - -### ๋…ธ์„ ๊ด€๋ฆฌ - - -### ๊ตฌ๊ฐ„๊ด€๋ฆฌ - - -### ๋…ธ์„ ๋„ ์ถœ๋ ฅ - - ## โœ… ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์š”๊ตฌ์‚ฌํ•ญ @@ -78,37 +134,4 @@ - ์ง€ํ•˜์ฒ  ๊ตฌ๊ฐ„์„ ์ œ๊ฑฐํ•˜๋Š” button ํƒœ๊ทธ๋Š” `.section-delete-button` class๊ฐ’์„ ๊ฐ€์ง„๋‹ค. ### ์ง€ํ•˜์ฒ  ๋…ธ์„ ๋„ ์ถœ๋ ฅ ๊ธฐ๋Šฅ -- ์ง€ํ•˜์ฒ  ๋…ธ์„ ๋„ ์ถœ๋ ฅ ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๋ฉด `
` ํƒœ๊ทธ๋ฅผ ๋งŒ๋“ค๊ณ  ํ•ด๋‹น ํƒœ๊ทธ ๋‚ด๋ถ€์— ๋…ธ์„ ๋„๋ฅผ ์ถœ๋ ฅํ•œ๋‹ค. - -### ๊ธฐ์กด ์š”๊ตฌ์‚ฌํ•ญ - -- ์‚ฌ์šฉ์ž๊ฐ€ ์ž˜๋ชป๋œ ์ž…๋ ฅ ๊ฐ’์„ ์ž‘์„ฑํ•œ ๊ฒฝ์šฐ `alert`์„ ์ด์šฉํ•ด ๋ฉ”์‹œ์ง€๋ฅผ ๋ณด์—ฌ์ฃผ๊ณ , ์žฌ์ž…๋ ฅํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•œ๋‹ค. -- ์™ธ๋ถ€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ(jQuery, Lodash ๋“ฑ)๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ์•Š๊ณ , ์ˆœ์ˆ˜ Vanilla JS๋กœ๋งŒ ๊ตฌํ˜„ํ•œ๋‹ค. -- **์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ์ฝ”๋“œ ์ปจ๋ฒค์…˜์„ ์ง€ํ‚ค๋ฉด์„œ ํ”„๋กœ๊ทธ๋ž˜๋ฐ** ํ•œ๋‹ค - - [https://google.github.io/styleguide/jsguide.html](https://google.github.io/styleguide/jsguide.html) - - [https://ui.toast.com/fe-guide/ko_CODING-CONVENSION/](https://ui.toast.com/fe-guide/ko_CODING-CONVENTION) -- **indent(์ธ๋ดํŠธ, ๋“ค์—ฌ์“ฐ๊ธฐ) depth๋ฅผ 3์ด ๋„˜์ง€ ์•Š๋„๋ก ๊ตฌํ˜„ํ•œ๋‹ค. 2๊นŒ์ง€๋งŒ ํ—ˆ์šฉ**ํ•œ๋‹ค. - - ์˜ˆ๋ฅผ ๋“ค์–ด while๋ฌธ ์•ˆ์— if๋ฌธ์ด ์žˆ์œผ๋ฉด ๋“ค์—ฌ์“ฐ๊ธฐ๋Š” 2์ด๋‹ค. - - ํžŒํŠธ: indent(์ธ๋ดํŠธ, ๋“ค์—ฌ์“ฐ๊ธฐ) depth๋ฅผ ์ค„์ด๋Š” ์ข‹์€ ๋ฐฉ๋ฒ•์€ ํ•จ์ˆ˜(๋˜๋Š” ๋ฉ”์†Œ๋“œ)๋ฅผ ๋ถ„๋ฆฌํ•˜๋ฉด ๋œ๋‹ค. -- **ํ•จ์ˆ˜(๋˜๋Š” ๋ฉ”์†Œ๋“œ)์˜ ๊ธธ์ด๊ฐ€ 15๋ผ์ธ์„ ๋„˜์–ด๊ฐ€์ง€ ์•Š๋„๋ก ๊ตฌํ˜„ํ•œ๋‹ค.** - - ํ•จ์ˆ˜(๋˜๋Š” ๋ฉ”์†Œ๋“œ)๊ฐ€ ํ•œ ๊ฐ€์ง€ ์ผ๋งŒ ์ž˜ ํ•˜๋„๋ก ๊ตฌํ˜„ํ•œ๋‹ค. -- ๋ณ€์ˆ˜ ์„ ์–ธ์‹œ `var` ๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š”๋‹ค. `const` ์™€ `let` ์„ ์‚ฌ์šฉํ•œ๋‹ค. - - [const](https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Statements/const) - - [let](https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Statements/let) -- `import` ๋ฌธ์„ ์ด์šฉํ•ด ์Šคํฌ๋ฆฝํŠธ๋ฅผ ๋ชจ๋“ˆํ™”ํ•˜๊ณ  ๋ถˆ๋Ÿฌ์˜ฌ ์ˆ˜ ์žˆ๊ฒŒ ๋งŒ๋“ ๋‹ค. - - [https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Statements/import](https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Statements/import) -- `template literal`์„ ์ด์šฉํ•ด ๋ฐ์ดํ„ฐ์™€ html string์„ ๊ฐ€๋…์„ฑ ์ข‹๊ฒŒ ํ‘œํ˜„ํ•œ๋‹ค. - - [https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Template_literals](https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Template_literals) - -### ์ถ”๊ฐ€๋œ ์š”๊ตฌ์‚ฌํ•ญ -- [data](https://developer.mozilla.org/ko/docs/Learn/HTML/Howto/%EB%8D%B0%EC%9D%B4%ED%84%B0_%EC%86%8D%EC%84%B1_%EC%82%AC%EC%9A%A9%ED%95%98%EA%B8%B0)์†์„ฑ์„ ํ™œ์šฉํ•˜์—ฌ html ํƒœ๊ทธ์— ์—ญ, ๋…ธ์„ , ๊ตฌ๊ฐ„์˜ ์œ ์ผํ•œ ๋ฐ์ดํ„ฐ ๊ฐ’๋“ค์„ ๊ด€๋ฆฌํ•œ๋‹ค. -- [localStorage](https://developer.mozilla.org/ko/docs/Web/API/Window/localStorage)๋ฅผ ์ด์šฉํ•˜์—ฌ, ์ƒˆ๋กœ๊ณ ์นจํ•˜๋”๋ผ๋„ ๊ฐ€์žฅ ์ตœ๊ทผ์— ์ž‘์—…ํ•œ ์ •๋ณด๋“ค์„ ๋ถˆ๋Ÿฌ์˜ฌ ์ˆ˜ ์žˆ๋„๋ก ํ•œ๋‹ค. - -
- -## ๐Ÿ“ ๋ฏธ์…˜ ์ €์žฅ์†Œ ๋ฐ ์ง„ํ–‰ ์š”๊ตฌ์‚ฌํ•ญ - -- ๋ฏธ์…˜์€ [https://github.com/woowacourse/javascript-subway-map-precours](https://github.com/woowacourse/javascript-subway-map-precourse) ์ €์žฅ์†Œ๋ฅผ fork/cloneํ•ด ์‹œ์ž‘ํ•œ๋‹ค. -- **๊ธฐ๋Šฅ์„ ๊ตฌํ˜„ํ•˜๊ธฐ ์ „์— javascript-subway-precourse/docs/README.md ํŒŒ์ผ์— ๊ตฌํ˜„ํ•  ๊ธฐ๋Šฅ ๋ชฉ๋ก**์„ ์ •๋ฆฌํ•ด ์ถ”๊ฐ€ํ•œ๋‹ค. -- **git์˜ commit ๋‹จ์œ„๋Š” ์•ž ๋‹จ๊ณ„์—์„œ README.md ํŒŒ์ผ์— ์ •๋ฆฌํ•œ ๊ธฐ๋Šฅ ๋ชฉ๋ก ๋‹จ์œ„๋กœ ์ถ”๊ฐ€**ํ•œ๋‹ค. -- [ํ”„๋ฆฌ์ฝ”์Šค ๊ณผ์ œ ์ œ์ถœ](https://github.com/woowacourse/woowacourse-docs/tree/master/precourse) ๋ฌธ์„œ ์ ˆ์ฐจ๋ฅผ ๋”ฐ๋ผ ๋ฏธ์…˜์„ ์ œ์ถœํ•œ๋‹ค. +- ์ง€ํ•˜์ฒ  ๋…ธ์„ ๋„ ์ถœ๋ ฅ ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๋ฉด `
` ํƒœ๊ทธ๋ฅผ ๋งŒ๋“ค๊ณ  ํ•ด๋‹น ํƒœ๊ทธ ๋‚ด๋ถ€์— ๋…ธ์„ ๋„๋ฅผ ์ถœ๋ ฅํ•œ๋‹ค. \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 000000000..33c9579ed --- /dev/null +++ b/package.json @@ -0,0 +1,17 @@ +{ + "name": "javascript-subway-map-precourse", + "version": "1.0.0", + "main": "index.js", + "repository": "https://github.com/transcendence42/javascript-subway-map-precourse.git", + "author": "Yeji Choi ", + "license": "MIT", + "devDependencies": { + "eslint": "^7.27.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-prettier": "^3.4.0", + "prettier": "^2.3.0" + }, + "scripts": { + "lint": "eslint ." + } +} diff --git a/src/constant.js b/src/constant.js new file mode 100644 index 000000000..9325df4fb --- /dev/null +++ b/src/constant.js @@ -0,0 +1,45 @@ +export const Message = {}; + +export const MainButtons = { + STATION: '#station-manager-button', + LINE: '#line-manager-button', + SECTION: '#section-manager-button', + MAP: '#map-print-manager-button', +}; + +export const Station = { + DIV: '#stationPart', + INPUT: '#station-name-input', + ADDBTN: '#station-add-button', + DELETEBTN: '.station-delete-button', + TABLE: '#station-table', + TH: `์—ญ ์ด๋ฆ„ + ์„ค์ •`, +}; + +export const Line = { + DIV: '#linePart', + INPUT: '#line-name-input', + START: '#line-start-station-selector', + END: '#line-end-station-selector', + ADDBTN: '#line-add-button', + TABLE: '#line-table', + TH: `๋…ธ์„  ์ด๋ฆ„ + ์ƒํ–‰ ์ข…์ ์—ญ + ํ•˜ํ–‰ ์ข…์ ์—ญ + ์„ค์ •`, +}; + +export const Section = { + DIV: '#sectionPart', + BTNS: '#line-buttons', + MANAGER: '#section-manager', + SELECT: '#station-select-button', + INPUT: '#station-order', + REGISTER: '#section-register', + TABLE: '#section-table', + DELETEBTN: 'section-delete-button', + TH: `์ˆœ์„œ + ์ด๋ฆ„ + ์„ค์ •`, +}; diff --git a/src/controller/cline.js b/src/controller/cline.js new file mode 100644 index 000000000..877dc8517 --- /dev/null +++ b/src/controller/cline.js @@ -0,0 +1,39 @@ +import { Line } from '../constant.js'; +import { addLine, deleteLine } from '../model/line.js'; +import { removeLineTable, addLineTable } from '../view/vline.js'; + +function clickAddLine() { + const newLine = document.getElementById(Line.INPUT).value; + const start = document.getElementById(Line.START).value; + const end = document.getElementById(Line.END).value; + + if (start === end) { + alert('์ƒํ–‰ ์ข…์ ์—ญ๊ณผ ํ•˜ํ–‰ ์ข…์ ์—ญ์ด ๊ฐ™์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.'); + } else if (addLine(newLine, start, end) == false) { + alert('์ค‘๋ณต๋œ ์ง€ํ•˜์ฒ  ๋…ธ์„  ์ด๋ฆ„์€ ๋“ฑ๋กํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.'); + } else { + addLineTable(newLine, start, end); + document.getElementById(Line.INPUT).value = ''; + } +} + +function activateTableListener() { + document.getElementById(Line.TABLE).addEventListener('click', (e) => { + const target = e.target; + const action = target.dataset.action; + + if (action === 'deleteLine') { + removeLineTable(target.closest('tbody')); + deleteLine(target.dataset.id); + } + }); +} + +export function constructLine() { + const stations = JSON.parse(localStorage.getItem('stations')); + const lineAddButton = document.getElementById(Line.ADDBTN); + lineAddButton.addEventListener('click', () => clickAddLine()); + if (stations) { + activateTableListener(); + } +} diff --git a/src/controller/controller.js b/src/controller/controller.js new file mode 100644 index 000000000..f8db5386a --- /dev/null +++ b/src/controller/controller.js @@ -0,0 +1,89 @@ +import { MainButtons, Station } from '../constant.js'; +import { renderStationTable } from '../view/vstation.js'; +import { renderLineTable } from '../view/vline.js'; +import { renderLineButtons } from '../view/vsection.js'; +import { renderMap } from '../view/vmap.js'; +import { constructStation } from './cstation.js'; +import { constructLine } from './cline.js'; +import { constructSection } from './csection.js'; + + +function getParts() { + return { + stationPart: document.getElementById('#stationPart'), + linePart: document.getElementById('#linePart'), + sectionPart: document.getElementById('#sectionPart'), + mapPart: document.getElementById('#mapPart'), + }; +} + +function showElem(elem) { + elem.style.display = 'block'; +} + +function hideElem(elem) { + elem.style.display = 'none'; +} + +// show ํ•จ์ˆ˜๋“ค์ด ๋‹ค ๋‚ด๋ถ€์ ์œผ๋กœ ๋น„์Šทํ•œ๋ฐ ํšจ์œจ์ ์œผ๋กœ ๋งŒ๋“ค ๋ฐฉ๋ฒ•์€ ์—†์—ˆ์„๊นŒ? +// getParts๋ฅผ ๋งค๋ฒˆ ํ•ด์˜ค์ง€ ์•Š์„ ๋ฐฉ๋ฒ•์€? object ๋‹ค๋ฅธ ํŒŒ์ผ์—์„œ import ํ•ด์„œ ์“ฐ๋Š” ๊ฑด ์ž˜ ์ž‘๋™ํ•˜์ง€ ์•Š์•˜๋‹ค. +// ์ดˆ๊ธฐ์— id๊ฐ€ ์„ค์ •์ด ์•ˆ๋ผ์žˆ์—ˆ๊ธฐ ๋•Œ๋ฌธ์ผ๊นŒ? + +function showStationPart() { + const Parts = getParts(); + showElem(Parts.stationPart); + hideElem(Parts.linePart); + hideElem(Parts.sectionPart); + hideElem(Parts.mapPart); + renderStationTable(); +} + +function showLinePart() { + const Parts = getParts(); + hideElem(Parts.stationPart); + showElem(Parts.linePart); + hideElem(Parts.sectionPart); + hideElem(Parts.mapPart); + renderLineTable(); +} + +function showSectionPart() { + const Parts = getParts(); + hideElem(Parts.stationPart); + hideElem(Parts.linePart); + showElem(Parts.sectionPart); + hideElem(Parts.mapPart); + renderLineButtons(); +} + +function showMapPart() { + const Parts = getParts(); + hideElem(Parts.stationPart); + hideElem(Parts.linePart); + hideElem(Parts.sectionPart); + showElem(Parts.mapPart); + renderMap(); +} + +function constructor() { + document + .getElementById('#menu-buttons') + .addEventListener('click', (e) => { + if (e.target.id === MainButtons.STATION) { + showStationPart(); + } else if (e.target.id === MainButtons.LINE) { + showLinePart(); + } else if (e.target.id === MainButtons.SECTION) { + showSectionPart(); + } else if (e.target.id === MainButtons.MAP) { + showMapPart(); + } + }); +} + +export default function controller() { + constructor(); + constructStation(); + constructLine(); + constructSection(); +} diff --git a/src/controller/csection.js b/src/controller/csection.js new file mode 100644 index 000000000..a2358546e --- /dev/null +++ b/src/controller/csection.js @@ -0,0 +1,54 @@ +import { Section } from '../constant.js'; +import { renderSectionManager, renderSectionTable } from '../view/vsection.js'; +import { addSection, deleteSection } from '../model/section.js'; + +function clickRegisterBtn() { + const input = document.getElementById(Section.INPUT); + const len = document.getElementById(Section.TABLE).childNodes.length; + const s = document.getElementById(Section.SELECT); + const choice = s.options[s.selectedIndex].value; + if (input.value < 0 || input.value >= len) { + alert('์œ ํšจํ•˜์ง€ ์•Š์€ ์ˆœ์„œ์ž…๋‹ˆ๋‹ค.'); + input.value = ''; + } else { + if (addSection(input.value, choice) == false) { + alert('์ค‘๋ณต๋œ ์ง€ํ•˜์ฒ  ์—ญ์€ ๋“ฑ๋กํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.'); + } else { + renderSectionTable(document.getElementById(Section.MANAGER).dataset.line); + } + } +} + +function clickDeleteBtn(e) { + const target = e.target; + const line = e.target.dataset.line; + const station = e.target.dataset.value; + + if (target.className === Section.DELETEBTN) { + if (deleteSection(line, station) === false) { + alert('๋…ธ์„  ๋‚ด ์—ญ์€ ๋‘๊ฐœ ์ด์ƒ์ด์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.'); + } else { + renderSectionTable(document.getElementById(Section.MANAGER).dataset.line); + } + } +} + +export function constructSection() { + const lines = localStorage.getItem('lines'); + if (lines === null) { + return; + } + document.getElementById(Section.DIV).addEventListener('click', (e) => { + const target = e.target; + const action = target.dataset.action; + if (action === 'showSectionManager') { + renderSectionManager(target.dataset.id); + document + .getElementById(Section.REGISTER) + .addEventListener('click', () => clickRegisterBtn()); + document + .getElementById(Section.TABLE) + .addEventListener('click', (e) => clickDeleteBtn(e)); + } + }); +} diff --git a/src/controller/cstation.js b/src/controller/cstation.js new file mode 100644 index 000000000..e28bc64c9 --- /dev/null +++ b/src/controller/cstation.js @@ -0,0 +1,35 @@ +import { Station as S } from '../constant.js'; +import { addStation, deleteStation } from '../model/station.js'; +import { addStationTable, removeStationTable } from '../view/vstation.js'; + +export function clickAddStation() { + const newStation = document.getElementById(S.INPUT).value; + if (newStation.length < 2) { + document.getElementById(S.INPUT).value = ''; + alert('์ง€ํ•˜์ฒ  ์—ญ์€ 2๊ธ€์ž ์ด์ƒ์ด์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.'); + } else { + document.getElementById(S.INPUT).value = ''; + if (addStation(newStation) == false) { + alert('์ค‘๋ณต๋œ ์ง€ํ•˜์ฒ  ์—ญ ์ด๋ฆ„์€ ๋“ฑ๋กํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.'); + } else { + addStationTable(newStation); + } + } +} + +export function constructStation() { + const stationAddButton = document.getElementById(S.ADDBTN); + stationAddButton.addEventListener('click', () => clickAddStation()); + document.getElementById(S.TABLE).addEventListener('click', (e) => { + const target = e.target; + const action = target.dataset.action; + if (action === 'deleteStation') { + if (deleteStation(target.dataset.id) === false) { + alert('๋…ธ์„ ์— ํฌํ•จ๋œ ์—ญ์€ ์‚ญ์ œํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.'); + document.getElementById(S.INPUT).value = ''; + } else { + removeStationTable(target.closest('tbody')); + } + } + }); +} diff --git a/src/controller/map.js b/src/controller/map.js new file mode 100644 index 000000000..e69de29bb diff --git a/src/index.js b/src/index.js index e69de29bb..c70745553 100644 --- a/src/index.js +++ b/src/index.js @@ -0,0 +1,9 @@ +import view from './view/view.js'; +import controller from './controller/controller.js'; + +export default function stationMap() { + view(); + controller(); +} + +stationMap(); diff --git a/src/model/line.js b/src/model/line.js new file mode 100644 index 000000000..3f88d7777 --- /dev/null +++ b/src/model/line.js @@ -0,0 +1,31 @@ +export function getLines() { + return JSON.parse(localStorage.getItem('lines')); +} + +export function addLine(newLineName, start, end) { + let oldLines = localStorage.getItem('lines'); + const newLine = { + name: newLineName, + stations: [start, end], + }; + if (oldLines === null) { + localStorage.setItem('lines', JSON.stringify([newLine])); + return true; + } else { + let lines = JSON.parse(oldLines); + if ( + lines.filter((line) => line.name != newLineName).length === lines.length + ) { + lines.push(newLine); + localStorage.setItem('lines', JSON.stringify(lines)); + return true; + } + return false; + } +} + +export function deleteLine(line) { + let oldLines = JSON.parse(localStorage.getItem('lines')); + const lines = oldLines.filter((element) => element.name != line); + localStorage.setItem('lines', JSON.stringify(lines)); +} diff --git a/src/model/section.js b/src/model/section.js new file mode 100644 index 000000000..0cb52e5cd --- /dev/null +++ b/src/model/section.js @@ -0,0 +1,29 @@ +import { Section } from '../constant.js'; +export function addSection(input, choice) { + const line = document.getElementById(Section.MANAGER).dataset.line; + let linesObj = JSON.parse(localStorage.getItem('lines')); + const obj = linesObj.filter((item) => item.name === line)[0].stations; + + if (obj.includes(choice) == true) { + return false; + } + obj.splice(input, 0, choice); + linesObj = linesObj.filter((item) => item.name !== line); + linesObj.push({ name: line, stations: obj }); + localStorage.setItem('lines', JSON.stringify(linesObj)); + return true; +} + +export function deleteSection(line, station) { + let linesObj = JSON.parse(localStorage.getItem('lines')); + let obj = linesObj.filter((item) => item.name === line)[0].stations; + + if (obj.length <= 2) { + return false; + } + obj = obj.filter((item) => item != station); + linesObj = linesObj.filter((item) => item.name !== line); + linesObj.push({ name: line, stations: obj }); + localStorage.setItem('lines', JSON.stringify(linesObj)); + return true; +} diff --git a/src/model/station.js b/src/model/station.js new file mode 100644 index 000000000..f220a7e18 --- /dev/null +++ b/src/model/station.js @@ -0,0 +1,46 @@ +export function getStations() { + return JSON.parse(localStorage.getItem('stations')); +} + +export function addStation(newStation) { + let oldStations = localStorage.getItem('stations'); + if (oldStations === null) { + localStorage.setItem('stations', JSON.stringify([newStation])); + return true; + } else { + let stations = JSON.parse(oldStations); + if (stations.includes(newStation) === false) { + stations.push(newStation); + localStorage.setItem('stations', JSON.stringify(stations)); + return true; + } + return false; + } +} + +function checkLineIncludedStation(lines, station) { + let ret = lines.every((line) => { + if ( + line.stations.filter((item) => item !== station).length != + line.stations.length + ) { + return false; + } else { + return true; + } + }); + return ret; +} + +export function deleteStation(station) { + let oldStations = JSON.parse(localStorage.getItem('stations')); + let lines = JSON.parse(localStorage.getItem('lines')); + + if (checkLineIncludedStation(lines, station) === false) { + return false; + } else { + const stations = oldStations.filter((element) => element != station); + localStorage.setItem('stations', JSON.stringify(stations)); + return true; + } +} diff --git a/src/utils.js b/src/utils.js new file mode 100644 index 000000000..b15b1a934 --- /dev/null +++ b/src/utils.js @@ -0,0 +1,8 @@ +export function removeAllChildren(elem) { + if (elem.hasChildNodes() === false) { + return; + } + while (elem.hasChildNodes()) { + elem.removeChild(elem.firstChild); + } +} diff --git a/src/view/view.js b/src/view/view.js new file mode 100644 index 000000000..b9b183b3f --- /dev/null +++ b/src/view/view.js @@ -0,0 +1,81 @@ +import { MainButtons, Station, Line } from '../constant.js'; +import { renderStationTable } from '../view/vstation.js'; +import { renderLineTable } from '../view/vline.js'; +import { renderLineButtons } from '../view/vsection.js'; +import { renderMap } from '../view/vmap.js'; + +function getBtns() { + return `
+ + + + +
`; +} + +function getStationPart() { + return ``; +} + +function getLinePart() { + return ` + `; +} + +function getSectionPart() { + return ` + `; +} + +function getMapPart() { + return ``; +} + +function constructor() { + const body = document.getElementById('app'); + body.insertAdjacentHTML('beforeend', getBtns()); + body.insertAdjacentHTML('beforeend', getStationPart()); + body.insertAdjacentHTML('beforeend', getLinePart()); + body.insertAdjacentHTML('beforeend', getSectionPart()); + body.insertAdjacentHTML('beforeend', getMapPart()); +} + +export default function view() { + constructor(); + renderStationTable(); + renderLineTable(); + renderLineButtons(); + renderMap(); +} diff --git a/src/view/vline.js b/src/view/vline.js new file mode 100644 index 000000000..a5eaceb06 --- /dev/null +++ b/src/view/vline.js @@ -0,0 +1,72 @@ +import { Line } from '../constant.js'; +import { removeAllChildren } from '../utils.js'; + +export function addLineTable(newLine, start, end) { + const table = document.getElementById(Line.TABLE); + table.insertAdjacentHTML( + 'beforeend', + ` + ${newLine} + ${start} + ${end} + + + + `, + ); +} + +export function removeLineTable(tbody) { + const parent = tbody.parentNode; + console.log(parent); + console.log(tbody); + parent.removeChild(tbody); +} + +function renderStationOptions() { + const stations = JSON.parse(localStorage.getItem('stations')); + const start = document.getElementById(Line.START); + const end = document.getElementById(Line.END); + + if (stations) { + stations.forEach((station) => { + start.insertAdjacentHTML( + 'beforeend', + ``, + ); + end.insertAdjacentHTML( + 'beforeend', + ``, + ); + }); + } +} + +export function renderLineTable() { + const lines = JSON.parse(localStorage.getItem('lines')); + const table = document.getElementById(Line.TABLE); + if (lines) { + removeAllChildren(table); + removeAllChildren(document.getElementById(Line.START)); + removeAllChildren(document.getElementById(Line.END)); + renderStationOptions(); + table.insertAdjacentHTML('afterbegin', Line.TH); + lines.forEach((line) => { + table.insertAdjacentHTML( + 'beforeend', + ` + ${line.name} + ${line.stations[0]} + ${ + line.stations[line.stations.length - 1] + } + + + + `, + ); + }); + } else { + renderStationOptions(); + } +} diff --git a/src/view/vmap.js b/src/view/vmap.js new file mode 100644 index 000000000..ed0bfe247 --- /dev/null +++ b/src/view/vmap.js @@ -0,0 +1,26 @@ +import { getLines } from '../model/line.js'; +import { removeAllChildren } from '../utils.js'; + +export function getStationListsHtml(stations) { + let ret = ''; + return ret; +} + +export function renderMap() { + let lines = getLines(); + const mapPart = document.getElementById('#mapPart'); + + if (!lines) { + return ; + } + removeAllChildren(mapPart); + lines.map(function (line) { + let content = `

${line.name}

`; + content += getStationListsHtml(line.stations); + mapPart.insertAdjacentHTML('beforeend', content); + }); +} diff --git a/src/view/vsection.js b/src/view/vsection.js new file mode 100644 index 000000000..cea12961a --- /dev/null +++ b/src/view/vsection.js @@ -0,0 +1,75 @@ +import { Section } from '../constant.js'; +import { removeAllChildren } from '../utils.js'; + +export function renderLineButtons() { + const lines = JSON.parse(localStorage.getItem('lines')); + const div = document.getElementById(Section.DIV); + if (lines) { + removeAllChildren(div); + lines.forEach((line) => + div.insertAdjacentHTML( + 'beforeend', + ` `, + ), + ); + div.insertAdjacentHTML( + 'afterbegin', + '

๊ตฌ๊ฐ„์„ ์ˆ˜์ •ํ•  ๋…ธ์„ ์„ ์„ ํƒํ•ด์ฃผ์„ธ์š”.

', + ); + } + div.insertAdjacentHTML('beforeend', '
'); +} + +function renderStationOptions() { + const sectionSelector = document.getElementById(Section.SELECT); + const stations = JSON.parse(localStorage.getItem('stations')); + + if (stations === null) { + return; + } + stations.forEach((station) => { + sectionSelector.insertAdjacentHTML( + 'beforeend', + ``, + ); + }); +} + +export function renderSectionTable(line) { + const lines = JSON.parse(localStorage.getItem('lines')); + const stations = lines.filter((item) => item.name === line)[0].stations; + const table = document.getElementById(Section.TABLE); + if (stations) { + removeAllChildren(table); + stations.forEach((station, index) => + table.insertAdjacentHTML( + 'beforeend', + ` + ${index} + ${station} + + + `, + ), + ); + } + table.insertAdjacentHTML('afterbegin', Section.TH); +} + +export function renderSectionManager(line) { + const sectionManager = document.getElementById(Section.MANAGER); + sectionManager.setAttribute('data-line', line); + removeAllChildren(sectionManager); + sectionManager.insertAdjacentHTML( + 'beforeend', + `

${line} ๊ด€๋ฆฌ

+

๊ตฌ๊ฐ„ ๋“ฑ๋ก

+ + + +

+
`, + ); + renderStationOptions(); + renderSectionTable(line); +} diff --git a/src/view/vstation.js b/src/view/vstation.js new file mode 100644 index 000000000..d2b97fd11 --- /dev/null +++ b/src/view/vstation.js @@ -0,0 +1,37 @@ +import { Station } from '../constant.js'; +import { removeAllChildren } from '../utils.js'; +import { getStations } from '../model/station.js'; + +export function addStationTable(station) { + const table = document.getElementById(Station.TABLE); + table.insertAdjacentHTML( + 'beforeend', + ` + ${station} + + + + `, + ); +} + +export function removeStationTable(tbody) { + const parent = tbody.parentNode; + parent.removeChild(tbody); +} + +export function renderStationTable() { + const stations = getStations(); + const table = document.getElementById(Station.TABLE); + if (stations) { + removeAllChildren(table); + table.insertAdjacentHTML('afterbegin', Station.TH); + stations.forEach((station) => { + table.insertAdjacentHTML( + 'beforeend', + `${station} + `, + ); + }); + } +} diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 000000000..dd3074167 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,786 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/code-frame@7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" + integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== + dependencies: + "@babel/highlight" "^7.10.4" + +"@babel/helper-validator-identifier@^7.14.0": + version "7.14.0" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz#d26cad8a47c65286b15df1547319a5d0bcf27288" + integrity sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A== + +"@babel/highlight@^7.10.4": + version "7.14.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.0.tgz#3197e375711ef6bf834e67d0daec88e4f46113cf" + integrity sha512-YSCOwxvTYEIMSGaBQb5kDDsCopDdiUGsqpatp3fOlI4+2HQSkTmEVWnVuySdAC5EWCqSWWTv0ib63RjR7dTBdg== + dependencies: + "@babel/helper-validator-identifier" "^7.14.0" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@eslint/eslintrc@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.1.tgz#442763b88cecbe3ee0ec7ca6d6dd6168550cbf14" + integrity sha512-5v7TDE9plVhvxQeWLXDTvFvJBdH6pEsdnl2g/dAptmuFEPedQ4Erq5rsDsX+mvAM610IhNaO2W5V1dOOnDKxkQ== + dependencies: + ajv "^6.12.4" + debug "^4.1.1" + espree "^7.3.0" + globals "^12.1.0" + ignore "^4.0.6" + import-fresh "^3.2.1" + js-yaml "^3.13.1" + minimatch "^3.0.4" + strip-json-comments "^3.1.1" + +acorn-jsx@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b" + integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng== + +acorn@^7.4.0: + version "7.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" + integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== + +ajv@^6.10.0, ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ajv@^8.0.1: + version "8.5.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.5.0.tgz#695528274bcb5afc865446aa275484049a18ae4b" + integrity sha512-Y2l399Tt1AguU3BPRP9Fn4eN+Or+StUGWCUpbnFyXSo8NZ9S4uj+AG2pjs5apK+ZMOwYOz1+a+VKvKH7CudXgQ== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + +ansi-colors@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + +ansi-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" + integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +chalk@^2.0.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad" + integrity sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +cross-spawn@^7.0.2: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +debug@^4.0.1, debug@^4.1.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" + integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== + dependencies: + ms "2.1.2" + +deep-is@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +enquirer@^2.3.5: + version "2.3.6" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" + integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== + dependencies: + ansi-colors "^4.1.1" + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +eslint-config-prettier@^8.3.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz#f7471b20b6fe8a9a9254cc684454202886a2dd7a" + integrity sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew== + +eslint-plugin-prettier@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.0.tgz#cdbad3bf1dbd2b177e9825737fe63b476a08f0c7" + integrity sha512-UDK6rJT6INSfcOo545jiaOwB701uAIt2/dR7WnFQoGCVl1/EMqdANBmwUaqqQ45aXprsTGzSa39LI1PyuRBxxw== + dependencies: + prettier-linter-helpers "^1.0.0" + +eslint-scope@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + +eslint-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" + integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== + dependencies: + eslint-visitor-keys "^1.1.0" + +eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" + integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== + +eslint-visitor-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" + integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== + +eslint@^7.27.0: + version "7.27.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.27.0.tgz#665a1506d8f95655c9274d84bd78f7166b07e9c7" + integrity sha512-JZuR6La2ZF0UD384lcbnd0Cgg6QJjiCwhMD6eU4h/VGPcVGwawNNzKU41tgokGXnfjOOyI6QIffthhJTPzzuRA== + dependencies: + "@babel/code-frame" "7.12.11" + "@eslint/eslintrc" "^0.4.1" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.0.1" + doctrine "^3.0.0" + enquirer "^2.3.5" + escape-string-regexp "^4.0.0" + eslint-scope "^5.1.1" + eslint-utils "^2.1.0" + eslint-visitor-keys "^2.0.0" + espree "^7.3.1" + esquery "^1.4.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^5.0.0" + globals "^13.6.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + js-yaml "^3.13.1" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.0.4" + natural-compare "^1.4.0" + optionator "^0.9.1" + progress "^2.0.0" + regexpp "^3.1.0" + semver "^7.2.1" + strip-ansi "^6.0.0" + strip-json-comments "^3.1.0" + table "^6.0.9" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + +espree@^7.3.0, espree@^7.3.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" + integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== + dependencies: + acorn "^7.4.0" + acorn-jsx "^5.3.1" + eslint-visitor-keys "^1.3.0" + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +esquery@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" + integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.1.0, estraverse@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" + integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-diff@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" + integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== + dependencies: + flat-cache "^3.0.4" + +flat-cache@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" + integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + dependencies: + flatted "^3.1.0" + rimraf "^3.0.2" + +flatted@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.1.tgz#c4b489e80096d9df1dfc97c79871aea7c617c469" + integrity sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA== + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= + +glob-parent@^5.0.0: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob@^7.1.3: + version "7.1.7" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" + integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== + dependencies: + 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" + +globals@^12.1.0: + version "12.4.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8" + integrity sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg== + dependencies: + type-fest "^0.8.1" + +globals@^13.6.0: + version "13.9.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.9.0.tgz#4bf2bf635b334a173fb1daf7c5e6b218ecdc06cb" + integrity sha512-74/FduwI/JaIrr1H8e71UbDE+5x7pIPs1C2rrwC52SszOo043CsWOZEMW7o2Y58xwm9b+0RBKDxY5n2sUpEFxA== + dependencies: + type-fest "^0.20.2" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + +import-fresh@^3.0.0, import-fresh@^3.2.1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^4.0.0, is-glob@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^3.13.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= + +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + +lodash.clonedeep@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= + +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +lodash.truncate@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" + integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM= + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +optionator@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" + integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.3" + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + +prettier-linter-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" + integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + dependencies: + fast-diff "^1.1.2" + +prettier@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.0.tgz#b6a5bf1284026ae640f17f7ff5658a7567fc0d18" + integrity sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w== + +progress@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + +punycode@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +regexpp@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" + integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== + +require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +semver@^7.2.1: + version "7.3.5" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" + integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== + dependencies: + lru-cache "^6.0.0" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + +string-width@^4.2.0: + version "4.2.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5" + integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" + +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + dependencies: + ansi-regex "^5.0.0" + +strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +table@^6.0.9: + version "6.7.1" + resolved "https://registry.yarnpkg.com/table/-/table-6.7.1.tgz#ee05592b7143831a8c94f3cee6aae4c1ccef33e2" + integrity sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg== + dependencies: + ajv "^8.0.1" + lodash.clonedeep "^4.5.0" + lodash.truncate "^4.4.2" + slice-ansi "^4.0.0" + string-width "^4.2.0" + strip-ansi "^6.0.0" + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + +type-fest@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" + integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +v8-compile-cache@^2.0.3: + version "2.3.0" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" + integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +word-wrap@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==