-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.bundle.js
237 lines (217 loc) · 36.2 KB
/
index.bundle.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
/*
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
/** *** */ (() => { // webpackBootstrap
/** *** */
/** *** */ const __webpack_modules__ = ({
/***/ './node_modules/css-loader/dist/cjs.js!./src/style.css':
/*! *************************************************************!*\
!*** ./node_modules/css-loader/dist/cjs.js!./src/style.css ***!
\************************************************************ */
/***/ ((module, __webpack_exports__, __webpack_require__) => {
eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/noSourceMaps.js */ "./node_modules/css-loader/dist/runtime/noSourceMaps.js");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, "* {\\r\\n margin: 0;\\r\\n padding: 0;\\r\\n -webkit-box-sizing: border-box;\\r\\n -moz-box-sizing: border-box;\\r\\n box-sizing: border-box;\\r\\n}\\r\\n\\r\\nhtml {\\r\\n font-size: 10px;\\r\\n}\\r\\n\\r\\nbody {\\r\\n background-color: rgb(150, 203, 203);\\r\\n}\\r\\n\\r\\nheader {\\r\\n margin: 0 0 1rem 0;\\r\\n padding: 1rem 1rem;\\r\\n font-size: 1.8rem;\\r\\n width: fit-content;\\r\\n background-color: rgb(234, 230, 230);\\r\\n color: #000;\\r\\n margin-inline-start: 2rem;\\r\\n}\\r\\n\\r\\n#content {\\r\\n display: flex;\\r\\n font-size: 1.9rem;\\r\\n padding: 0 2rem;\\r\\n}\\r\\n\\r\\n.score-board {\\r\\n margin-inline-end: 1.6rem;\\r\\n flex-grow: 1;\\r\\n}\\r\\n\\r\\n.score-board div:first-child {\\r\\n display: flex;\\r\\n justify-content: space-between;\\r\\n align-items: center;\\r\\n}\\r\\n\\r\\n.score-wrap {\\r\\n margin: 1.6rem 0;\\r\\n border: 2.5px solid rgb(27, 27, 27);\\r\\n}\\r\\n\\r\\n.scores {\\r\\n min-height: 35rem;\\r\\n list-style: none;\\r\\n font-weight: 500;\\r\\n}\\r\\n\\r\\n.scores li {\\r\\n position: relative;\\r\\n padding: 0.8rem 1.3rem;\\r\\n}\\r\\n\\r\\n.scores > li:nth-child(2n) {\\r\\n background-color: rgb(71, 71, 132);\\r\\n color: white;\\r\\n}\\r\\n\\r\\n.add-score-section {\\r\\n flex-grow: 1;\\r\\n padding: 0.9rem 1.5rem;\\r\\n margin-inline-start: 1.8rem;\\r\\n}\\r\\n\\r\\n.add-score-form {\\r\\n display: flex;\\r\\n flex-direction: column;\\r\\n}\\r\\n\\r\\n.add-score-form h3 {\\r\\n font-size: 3rem;\\r\\n margin-bottom: 1rem;\\r\\n color: rgb(60, 60, 170);\\r\\n\\r\\n}\\r\\n\\r\\n.score-board h3 {\\r\\n font-size: 3rem;\\r\\n margin-bottom: 1rem;\\r\\n color: rgb(60, 60, 170);\\r\\n}\\r\\n\\r\\n.form-input {\\r\\n color: rgb(60, 60, 170);\\r\\n padding: 0.56rem;\\r\\n border: 2px solid #000;\\r\\n margin-block-end: 3rem;\\r\\n}\\r\\n\\r\\n.btn {\\r\\n position: relative;\\r\\n padding: 0.8rem;\\r\\n border: 0.15rem solid #000;\\r\\n}\\r\\n\\r\\n.btn::after {\\r\\n width: 100%;\\r\\n content: \\"\\";\\r\\n position: absolute;\\r\\n background-color: rgb(60, 60, 170);\\r\\n height: 100%;\\r\\n padding: 0.2rem;\\r\\n z-index: -1;\\r\\n top: 0.2rem;\\r\\n left: 0.2rem;\\r\\n}\\r\\n\\r\\n.submit-score-btn {\\r\\n width: 25%;\\r\\n padding: 1rem;\\r\\n align-self: flex-end;\\r\\n font-weight: 600;\\r\\n}\\r\\n\\r\\n.refresh-btn {\\r\\n font-weight: bold;\\r\\n text-align: center;\\r\\n}\\r\\n\\r\\n.error-message,\\r\\n.success-message {\\r\\n color: rgb(0, 0, 0);\\r\\n padding: 0.31rem 1rem;\\r\\n position: absolute;\\r\\n top: -2px;\\r\\n left: 140px;\\r\\n}\\r\\n\\r\\n.error-message {\\r\\n background-color: rgb(238, 27, 27);\\r\\n text-align: center;\\r\\n height: 2.3rem;\\r\\n color: aliceblue;\\r\\n}\\r\\n\\r\\n.success-message {\\r\\n background-color: rgb(11, 172, 48);\\r\\n text-align: center;\\r\\n height: 2.3rem;\\r\\n}\\r\\n", ""]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://leaderboard/./src/style.css?./node_modules/css-loader/dist/cjs.js');
/***/ }),
/***/ './node_modules/css-loader/dist/runtime/api.js':
/*! *****************************************************!*\
!*** ./node_modules/css-loader/dist/runtime/api.js ***!
\**************************************************** */
/***/ ((module) => {
eval('\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = "";\n var needLayer = typeof item[5] !== "undefined";\n\n if (item[4]) {\n content += "@supports (".concat(item[4], ") {");\n }\n\n if (item[2]) {\n content += "@media ".concat(item[2], " {");\n }\n\n if (needLayer) {\n content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");\n }\n\n content += cssWithMappingToString(item);\n\n if (needLayer) {\n content += "}";\n }\n\n if (item[2]) {\n content += "}";\n }\n\n if (item[4]) {\n content += "}";\n }\n\n return content;\n }).join("");\n }; // import a list of modules into the list\n\n\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === "string") {\n modules = [[null, modules, undefined]];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n\n if (typeof layer !== "undefined") {\n if (typeof item[5] === "undefined") {\n item[5] = layer;\n } else {\n item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");\n item[5] = layer;\n }\n }\n\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");\n item[2] = media;\n }\n }\n\n if (supports) {\n if (!item[4]) {\n item[4] = "".concat(supports);\n } else {\n item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");\n item[4] = supports;\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};\n\n//# sourceURL=webpack://leaderboard/./node_modules/css-loader/dist/runtime/api.js?');
/***/ }),
/***/ './node_modules/css-loader/dist/runtime/noSourceMaps.js':
/*! **************************************************************!*\
!*** ./node_modules/css-loader/dist/runtime/noSourceMaps.js ***!
\************************************************************* */
/***/ ((module) => {
eval('\n\nmodule.exports = function (i) {\n return i[1];\n};\n\n//# sourceURL=webpack://leaderboard/./node_modules/css-loader/dist/runtime/noSourceMaps.js?');
/***/ }),
/***/ './src/style.css':
/*! ***********************!*\
!*** ./src/style.css ***!
\********************** */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../node_modules/css-loader/dist/cjs.js!./style.css */ "./node_modules/css-loader/dist/cjs.js!./src/style.css");\n\n \n \n \n \n \n \n \n \n \n\nvar options = {};\n\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\n\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");\n \noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\n\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);\n\n\n\n\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);\n\n\n//# sourceURL=webpack://leaderboard/./src/style.css?');
/***/ }),
/***/ './node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js':
/*! ****************************************************************************!*\
!*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***!
\*************************************************************************** */
/***/ ((module) => {
eval('\n\nvar stylesInDOM = [];\n\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n\n return result;\n}\n\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = "".concat(id, " ").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n\n identifiers.push(identifier);\n }\n\n return identifiers;\n}\n\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n\n return updater;\n}\n\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n\n var newLastIdentifiers = modulesToDom(newList, options);\n\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n\n var _index = getIndexByIdentifier(_identifier);\n\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n\n stylesInDOM.splice(_index, 1);\n }\n }\n\n lastIdentifiers = newLastIdentifiers;\n };\n};\n\n//# sourceURL=webpack://leaderboard/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js?');
/***/ }),
/***/ './node_modules/style-loader/dist/runtime/insertBySelector.js':
/*! ********************************************************************!*\
!*** ./node_modules/style-loader/dist/runtime/insertBySelector.js ***!
\******************************************************************* */
/***/ ((module) => {
eval("\n\nvar memo = {};\n/* istanbul ignore next */\n\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\n\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n\n memo[target] = styleTarget;\n }\n\n return memo[target];\n}\n/* istanbul ignore next */\n\n\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n\n target.appendChild(style);\n}\n\nmodule.exports = insertBySelector;\n\n//# sourceURL=webpack://leaderboard/./node_modules/style-loader/dist/runtime/insertBySelector.js?");
/***/ }),
/***/ './node_modules/style-loader/dist/runtime/insertStyleElement.js':
/*! **********************************************************************!*\
!*** ./node_modules/style-loader/dist/runtime/insertStyleElement.js ***!
\********************************************************************* */
/***/ ((module) => {
eval('\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement("style");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\n\nmodule.exports = insertStyleElement;\n\n//# sourceURL=webpack://leaderboard/./node_modules/style-loader/dist/runtime/insertStyleElement.js?');
/***/ }),
/***/ './node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js':
/*! **********************************************************************************!*\
!*** ./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js ***!
\********************************************************************************* */
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval('\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = true ? __webpack_require__.nc : 0;\n\n if (nonce) {\n styleElement.setAttribute("nonce", nonce);\n }\n}\n\nmodule.exports = setAttributesWithoutAttributes;\n\n//# sourceURL=webpack://leaderboard/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js?');
/***/ }),
/***/ './node_modules/style-loader/dist/runtime/styleDomAPI.js':
/*! ***************************************************************!*\
!*** ./node_modules/style-loader/dist/runtime/styleDomAPI.js ***!
\************************************************************** */
/***/ ((module) => {
eval('\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = "";\n\n if (obj.supports) {\n css += "@supports (".concat(obj.supports, ") {");\n }\n\n if (obj.media) {\n css += "@media ".concat(obj.media, " {");\n }\n\n var needLayer = typeof obj.layer !== "undefined";\n\n if (needLayer) {\n css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {");\n }\n\n css += obj.css;\n\n if (needLayer) {\n css += "}";\n }\n\n if (obj.media) {\n css += "}";\n }\n\n if (obj.supports) {\n css += "}";\n }\n\n var sourceMap = obj.sourceMap;\n\n if (sourceMap && typeof btoa !== "undefined") {\n css += "\\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");\n } // For old IE\n\n /* istanbul ignore if */\n\n\n options.styleTagTransform(css, styleElement, options.options);\n}\n\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n\n styleElement.parentNode.removeChild(styleElement);\n}\n/* istanbul ignore next */\n\n\nfunction domAPI(options) {\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\n\nmodule.exports = domAPI;\n\n//# sourceURL=webpack://leaderboard/./node_modules/style-loader/dist/runtime/styleDomAPI.js?');
/***/ }),
/***/ './node_modules/style-loader/dist/runtime/styleTagTransform.js':
/*! *********************************************************************!*\
!*** ./node_modules/style-loader/dist/runtime/styleTagTransform.js ***!
\******************************************************************** */
/***/ ((module) => {
eval('\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n\n styleElement.appendChild(document.createTextNode(css));\n }\n}\n\nmodule.exports = styleTagTransform;\n\n//# sourceURL=webpack://leaderboard/./node_modules/style-loader/dist/runtime/styleTagTransform.js?');
/***/ }),
/***/ './src/index.js':
/*! **********************!*\
!*** ./src/index.js ***!
\********************* */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _modules_recentScores_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./modules/recentScores.js */ \"./src/modules/recentScores.js\");\n/* harmony import */ var _modules_addNewScores_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modules/addNewScores.js */ \"./src/modules/addNewScores.js\");\n/* harmony import */ var _style_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./style.css */ \"./src/style.css\");\n/* harmony import */ var _modules_postScores_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modules/postScores.js */ \"./src/modules/postScores.js\");\n/* harmony import */ var _modules_getScores_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./modules/getScores.js */ \"./src/modules/getScores.js\");\n/* harmony import */ var _modules_scoreBoard_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./modules/scoreBoard.js */ \"./src/modules/scoreBoard.js\");\n/* harmony import */ var _modules_displayMessage_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./modules/displayMessage.js */ \"./src/modules/displayMessage.js\");\n/* harmony import */ var _modules_clearScoreBoard_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./modules/clearScoreBoard.js */ \"./src/modules/clearScoreBoard.js\");\n\n\n\n\n\n\n\n\n\n(0,_modules_recentScores_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])();\n(0,_modules_addNewScores_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])();\n\nconst url = 'https://us-central1-js-capstone-backend.cloudfunctions.net/api/games/01GGHFHZCJGZ9QK9XS33QYPB9E/scores';\n\nconst addNewScores = document.querySelector('.add-score-form');\nconst refreshBoardBtn = document.querySelector('.refresh-btn');\n\naddNewScores.addEventListener('submit', (e) => {\n e.preventDefault();\n const score = document.querySelector('#score-input');\n const name = document.querySelector('#name-input');\n\n if (name.value === '' || score.value === '') {\n const message = 'Fill up empty field(s)';\n (0,_modules_displayMessage_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(addNewScores, message, 'error-message');\n } else {\n const newUserScore = {\n user: name.value,\n score: score.value,\n };\n (0,_modules_postScores_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(newUserScore, url)\n .then((response) => {\n (0,_modules_displayMessage_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(addNewScores, response.result, 'success-message');\n });\n name.value = '';\n score.value = '';\n }\n});\n\nrefreshBoardBtn.addEventListener('click', () => {\n (0,_modules_getScores_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(url).then((response) => {\n (0,_modules_clearScoreBoard_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"])();\n (0,_modules_scoreBoard_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(response.result);\n });\n});\n\n//# sourceURL=webpack://leaderboard/./src/index.js?");
/***/ }),
/***/ './src/modules/addNewScores.js':
/*! *************************************!*\
!*** ./src/modules/addNewScores.js ***!
\************************************ */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nconst app = document.getElementById('content');\n\nconst addScore = `\n<section class=\"add-score-section\">\n <form action=\"\" class=\"add-score-form\">\n <h3>Add your score</h3>\n <input type=\"text\" placeholder=\"Your name:\" id=\"name-input\" class=\"form-input\"> \n <input type=\"number\" placeholder=\"Your score:\" id=\"score-input\" class=\"form-input\"> \n <button type=\"submit\" class=\"btn submit-score-btn\">Submit</button>\n </form>\n </section>`;\n\nconst appendAddYourScore = () => {\n app.insertAdjacentHTML('beforeend', addScore);\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (appendAddYourScore);\n\n//# sourceURL=webpack://leaderboard/./src/modules/addNewScores.js?");
/***/ }),
/***/ './src/modules/clearScoreBoard.js':
/*! ****************************************!*\
!*** ./src/modules/clearScoreBoard.js ***!
\*************************************** */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nconst clearScoreBoard = () => {\n const scoresBoard = document.querySelector('#scores-board');\n while (scoresBoard.firstChild) {\n scoresBoard.removeChild(scoresBoard.firstChild);\n }\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (clearScoreBoard);\n\n//# sourceURL=webpack://leaderboard/./src/modules/clearScoreBoard.js?");
/***/ }),
/***/ './src/modules/displayMessage.js':
/*! ***************************************!*\
!*** ./src/modules/displayMessage.js ***!
\************************************** */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nconst displayAddMessage = (addForm, message, popUp) => {\n const span = document.createElement('span');\n span.textContent = message;\n span.className = popUp;\n addForm.appendChild(span);\n setTimeout(() => span.remove(), 2000);\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (displayAddMessage);\n\n//# sourceURL=webpack://leaderboard/./src/modules/displayMessage.js?");
/***/ }),
/***/ './src/modules/getScores.js':
/*! **********************************!*\
!*** ./src/modules/getScores.js ***!
\********************************* */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nconst getScore = async () => {\n const response = await fetch('https://us-central1-js-capstone-backend.cloudfunctions.net/api/games/01GGHFHZCJGZ9QK9XS33QYPB9E/scores', {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n },\n });\n return response.json();\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getScore);\n\n//# sourceURL=webpack://leaderboard/./src/modules/getScores.js?");
/***/ }),
/***/ './src/modules/postScores.js':
/*! ***********************************!*\
!*** ./src/modules/postScores.js ***!
\********************************** */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nconst postScore = async (data) => {\n const response = await fetch('https://us-central1-js-capstone-backend.cloudfunctions.net/api/games/01GGHFHZCJGZ9QK9XS33QYPB9E/scores', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(data),\n });\n return response.json();\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (postScore);\n\n//# sourceURL=webpack://leaderboard/./src/modules/postScores.js?");
/***/ }),
/***/ './src/modules/recentScores.js':
/*! *************************************!*\
!*** ./src/modules/recentScores.js ***!
\************************************ */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nconst LeaderBoard = document.getElementById('content');\n\nconst recentScore = `\n<section class=\"score-board\">\n <div>\n <h3>Recent scores</h3>\n <button type=\"button\" class=\"btn refresh-btn\">Refresh</button>\n </div>\n <div class=\"score-wrap\">\n <ul class=\"scores\" id=\"scores-board\">\n </ul>\n </div>\n </section>`;\n\nconst appendRecentScores = () => {\n LeaderBoard.insertAdjacentHTML('afterbegin', recentScore);\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (appendRecentScores);\n\n//# sourceURL=webpack://leaderboard/./src/modules/recentScores.js?");
/***/ }),
/***/ './src/modules/scoreBoard.js':
/*! ***********************************!*\
!*** ./src/modules/scoreBoard.js ***!
\********************************** */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nconst scoreBoard = (array) => {\n const scoresBoard = document.querySelector('#scores-board');\n array.forEach((element) => {\n const boardItem = document.createElement('li');\n boardItem.innerHTML = `${element.user}: ${element.score}`;\n scoresBoard.appendChild(boardItem);\n });\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (scoreBoard);\n\n//# sourceURL=webpack://leaderboard/./src/modules/scoreBoard.js?");
/***/ }),
/** *** */ });
/** ********************************************************************* */
/** *** */ // The module cache
/** *** */ const __webpack_module_cache__ = {};
/** *** */
/** *** */ // The require function
/** *** */ function __webpack_require__(moduleId) {
/** *** */ // Check if module is in cache
/** *** */ const cachedModule = __webpack_module_cache__[moduleId];
/** *** */ if (cachedModule !== undefined) {
/** *** */ return cachedModule.exports;
/** *** */ }
/** *** */ // Create a new module (and put it into the cache)
/** *** */ const module = __webpack_module_cache__[moduleId] = {
/** *** */ id: moduleId,
/** *** */ // no module.loaded needed
/** *** */ exports: {},
/** *** */ };
/** *** */
/** *** */ // Execute the module function
/** *** */ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/** *** */
/** *** */ // Return the exports of the module
/** *** */ return module.exports;
/** *** */ }
/** *** */
/** ********************************************************************* */
/** *** */ /* webpack/runtime/compat get default export */
/** *** */ (() => {
/** *** */ // getDefaultExport function for compatibility with non-harmony modules
/** *** */ __webpack_require__.n = (module) => {
/** *** */ const getter = module && module.__esModule
/** *** */ ? () => (module.default)
/** *** */ : () => (module);
/** *** */ __webpack_require__.d(getter, { a: getter });
/** *** */ return getter;
/** *** */ };
/** *** */ })();
/** *** */
/** *** */ /* webpack/runtime/define property getters */
/** *** */ (() => {
/** *** */ // define getter functions for harmony exports
/** *** */ __webpack_require__.d = (exports, definition) => {
/** *** */ for (const key in definition) {
/** *** */ if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/** *** */ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/** *** */ }
/** *** */ }
/** *** */ };
/** *** */ })();
/** *** */
/** *** */ /* webpack/runtime/hasOwnProperty shorthand */
/** *** */ (() => {
/** *** */ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop));
/** *** */ })();
/** *** */
/** *** */ /* webpack/runtime/make namespace object */
/** *** */ (() => {
/** *** */ // define __esModule on exports
/** *** */ __webpack_require__.r = (exports) => {
/** *** */ if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/** *** */ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/** *** */ }
/** *** */ Object.defineProperty(exports, '__esModule', { value: true });
/** *** */ };
/** *** */ })();
/** *** */
/** *** */ /* webpack/runtime/nonce */
/** *** */ (() => {
/** *** */ __webpack_require__.nc = undefined;
/** *** */ })();
/** *** */
/** ********************************************************************* */
/** *** */
/** *** */ // startup
/** *** */ // Load entry module and return exports
/** *** */ // This entry module can't be inlined because the eval devtool is used.
/** *** */ const __webpack_exports__ = __webpack_require__('./src/index.js');
/** *** */
/** *** */ })();