@telsho/react-google-flight-datepicker 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/back-CP7UAS2G.svg +1 -0
  2. package/dist/calendar-P2OTLJJM.svg +1 -0
  3. package/dist/index.css +2 -0
  4. package/dist/index.css.map +1 -0
  5. package/dist/index.d.mts +47 -0
  6. package/dist/index.d.ts +47 -7
  7. package/dist/index.js +1 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/index.mjs +1 -0
  10. package/dist/index.mjs.map +1 -0
  11. package/dist/next-EJ77CHMG.svg +1 -0
  12. package/dist/prev-XR4S5NRO.svg +1 -0
  13. package/package.json +12 -27
  14. package/dist/index.d.ts.gz +0 -0
  15. package/dist/main.2e27bdd8ff7277467b40.hot-update.js +0 -136
  16. package/dist/main.2e27bdd8ff7277467b40.hot-update.js.gz +0 -0
  17. package/dist/main.2e27bdd8ff7277467b40.hot-update.js.map +0 -1
  18. package/dist/main.2e27bdd8ff7277467b40.hot-update.js.map.gz +0 -0
  19. package/dist/main.2e27bdd8ff7277467b40.hot-update.json +0 -1
  20. package/dist/main.7ecf6367a33877ea7ba6.hot-update.js +0 -185
  21. package/dist/main.7ecf6367a33877ea7ba6.hot-update.js.gz +0 -0
  22. package/dist/main.7ecf6367a33877ea7ba6.hot-update.js.map +0 -1
  23. package/dist/main.7ecf6367a33877ea7ba6.hot-update.js.map.gz +0 -0
  24. package/dist/main.7ecf6367a33877ea7ba6.hot-update.json +0 -1
  25. package/dist/main.js +0 -4256
  26. package/dist/main.js.gz +0 -0
  27. package/dist/main.js.map +0 -1
  28. package/dist/main.js.map.gz +0 -0
  29. package/dist/vendors-node_modules_a.js +0 -1063
  30. package/dist/vendors-node_modules_a.js.gz +0 -0
  31. package/dist/vendors-node_modules_a.js.map +0 -1
  32. package/dist/vendors-node_modules_a.js.map.gz +0 -0
  33. package/dist/vendors-node_modules_h.js +0 -112
  34. package/dist/vendors-node_modules_h.js.gz +0 -0
  35. package/dist/vendors-node_modules_h.js.map +0 -1
  36. package/dist/vendors-node_modules_h.js.map.gz +0 -0
  37. package/dist/vendors-node_modules_r.js +0 -4788
  38. package/dist/vendors-node_modules_r.js.gz +0 -0
  39. package/dist/vendors-node_modules_r.js.map +0 -1
  40. package/dist/vendors-node_modules_r.js.map.gz +0 -0
  41. package/dist/vendors-node_modules_react-d.js +0 -2593
  42. package/dist/vendors-node_modules_react-d.js.gz +0 -0
  43. package/dist/vendors-node_modules_react-d.js.map +0 -1
  44. package/dist/vendors-node_modules_react-d.js.map.gz +0 -0
  45. package/dist/vendors-node_modules_react-dom_cjs_react-dom_development_js-61bb2bf2.js +0 -29933
  46. package/dist/vendors-node_modules_react-dom_cjs_react-dom_development_js-61bb2bf2.js.gz +0 -0
  47. package/dist/vendors-node_modules_react-dom_cjs_react-dom_development_js-61bb2bf2.js.map +0 -1
  48. package/dist/vendors-node_modules_react-dom_cjs_react-dom_development_js-61bb2bf2.js.map.gz +0 -0
  49. package/dist/vendors-node_modules_s.js +0 -2807
  50. package/dist/vendors-node_modules_s.js.gz +0 -0
  51. package/dist/vendors-node_modules_s.js.map +0 -1
  52. package/dist/vendors-node_modules_s.js.map.gz +0 -0
@@ -1,2807 +0,0 @@
1
- (self["webpackChunk_telsho_react_google_flight_datepicker"] = self["webpackChunk_telsho_react_google_flight_datepicker"] || []).push([["vendors-node_modules_s"],{
2
-
3
- /***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":
4
- /*!****************************************************************************!*\
5
- !*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***!
6
- \****************************************************************************/
7
- /***/ ((module) => {
8
-
9
- "use strict";
10
-
11
-
12
- var stylesInDOM = [];
13
- function getIndexByIdentifier(identifier) {
14
- var result = -1;
15
- for (var i = 0; i < stylesInDOM.length; i++) {
16
- if (stylesInDOM[i].identifier === identifier) {
17
- result = i;
18
- break;
19
- }
20
- }
21
- return result;
22
- }
23
- function modulesToDom(list, options) {
24
- var idCountMap = {};
25
- var identifiers = [];
26
- for (var i = 0; i < list.length; i++) {
27
- var item = list[i];
28
- var id = options.base ? item[0] + options.base : item[0];
29
- var count = idCountMap[id] || 0;
30
- var identifier = "".concat(id, " ").concat(count);
31
- idCountMap[id] = count + 1;
32
- var indexByIdentifier = getIndexByIdentifier(identifier);
33
- var obj = {
34
- css: item[1],
35
- media: item[2],
36
- sourceMap: item[3],
37
- supports: item[4],
38
- layer: item[5]
39
- };
40
- if (indexByIdentifier !== -1) {
41
- stylesInDOM[indexByIdentifier].references++;
42
- stylesInDOM[indexByIdentifier].updater(obj);
43
- } else {
44
- var updater = addElementStyle(obj, options);
45
- options.byIndex = i;
46
- stylesInDOM.splice(i, 0, {
47
- identifier: identifier,
48
- updater: updater,
49
- references: 1
50
- });
51
- }
52
- identifiers.push(identifier);
53
- }
54
- return identifiers;
55
- }
56
- function addElementStyle(obj, options) {
57
- var api = options.domAPI(options);
58
- api.update(obj);
59
- var updater = function updater(newObj) {
60
- if (newObj) {
61
- if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {
62
- return;
63
- }
64
- api.update(obj = newObj);
65
- } else {
66
- api.remove();
67
- }
68
- };
69
- return updater;
70
- }
71
- module.exports = function (list, options) {
72
- options = options || {};
73
- list = list || [];
74
- var lastIdentifiers = modulesToDom(list, options);
75
- return function update(newList) {
76
- newList = newList || [];
77
- for (var i = 0; i < lastIdentifiers.length; i++) {
78
- var identifier = lastIdentifiers[i];
79
- var index = getIndexByIdentifier(identifier);
80
- stylesInDOM[index].references--;
81
- }
82
- var newLastIdentifiers = modulesToDom(newList, options);
83
- for (var _i = 0; _i < lastIdentifiers.length; _i++) {
84
- var _identifier = lastIdentifiers[_i];
85
- var _index = getIndexByIdentifier(_identifier);
86
- if (stylesInDOM[_index].references === 0) {
87
- stylesInDOM[_index].updater();
88
- stylesInDOM.splice(_index, 1);
89
- }
90
- }
91
- lastIdentifiers = newLastIdentifiers;
92
- };
93
- };
94
-
95
- /***/ }),
96
-
97
- /***/ "./node_modules/style-loader/dist/runtime/insertBySelector.js":
98
- /*!********************************************************************!*\
99
- !*** ./node_modules/style-loader/dist/runtime/insertBySelector.js ***!
100
- \********************************************************************/
101
- /***/ ((module) => {
102
-
103
- "use strict";
104
-
105
-
106
- var memo = {};
107
-
108
- /* istanbul ignore next */
109
- function getTarget(target) {
110
- if (typeof memo[target] === "undefined") {
111
- var styleTarget = document.querySelector(target);
112
-
113
- // Special case to return head of iframe instead of iframe itself
114
- if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
115
- try {
116
- // This will throw an exception if access to iframe is blocked
117
- // due to cross-origin restrictions
118
- styleTarget = styleTarget.contentDocument.head;
119
- } catch (e) {
120
- // istanbul ignore next
121
- styleTarget = null;
122
- }
123
- }
124
- memo[target] = styleTarget;
125
- }
126
- return memo[target];
127
- }
128
-
129
- /* istanbul ignore next */
130
- function insertBySelector(insert, style) {
131
- var target = getTarget(insert);
132
- if (!target) {
133
- throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
134
- }
135
- target.appendChild(style);
136
- }
137
- module.exports = insertBySelector;
138
-
139
- /***/ }),
140
-
141
- /***/ "./node_modules/style-loader/dist/runtime/insertStyleElement.js":
142
- /*!**********************************************************************!*\
143
- !*** ./node_modules/style-loader/dist/runtime/insertStyleElement.js ***!
144
- \**********************************************************************/
145
- /***/ ((module) => {
146
-
147
- "use strict";
148
-
149
-
150
- /* istanbul ignore next */
151
- function insertStyleElement(options) {
152
- var element = document.createElement("style");
153
- options.setAttributes(element, options.attributes);
154
- options.insert(element, options.options);
155
- return element;
156
- }
157
- module.exports = insertStyleElement;
158
-
159
- /***/ }),
160
-
161
- /***/ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js":
162
- /*!**********************************************************************************!*\
163
- !*** ./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js ***!
164
- \**********************************************************************************/
165
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
166
-
167
- "use strict";
168
-
169
-
170
- /* istanbul ignore next */
171
- function setAttributesWithoutAttributes(styleElement) {
172
- var nonce = true ? __webpack_require__.nc : 0;
173
- if (nonce) {
174
- styleElement.setAttribute("nonce", nonce);
175
- }
176
- }
177
- module.exports = setAttributesWithoutAttributes;
178
-
179
- /***/ }),
180
-
181
- /***/ "./node_modules/style-loader/dist/runtime/styleDomAPI.js":
182
- /*!***************************************************************!*\
183
- !*** ./node_modules/style-loader/dist/runtime/styleDomAPI.js ***!
184
- \***************************************************************/
185
- /***/ ((module) => {
186
-
187
- "use strict";
188
-
189
-
190
- /* istanbul ignore next */
191
- function apply(styleElement, options, obj) {
192
- var css = "";
193
- if (obj.supports) {
194
- css += "@supports (".concat(obj.supports, ") {");
195
- }
196
- if (obj.media) {
197
- css += "@media ".concat(obj.media, " {");
198
- }
199
- var needLayer = typeof obj.layer !== "undefined";
200
- if (needLayer) {
201
- css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {");
202
- }
203
- css += obj.css;
204
- if (needLayer) {
205
- css += "}";
206
- }
207
- if (obj.media) {
208
- css += "}";
209
- }
210
- if (obj.supports) {
211
- css += "}";
212
- }
213
- var sourceMap = obj.sourceMap;
214
- if (sourceMap && typeof btoa !== "undefined") {
215
- css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
216
- }
217
-
218
- // For old IE
219
- /* istanbul ignore if */
220
- options.styleTagTransform(css, styleElement, options.options);
221
- }
222
- function removeStyleElement(styleElement) {
223
- // istanbul ignore if
224
- if (styleElement.parentNode === null) {
225
- return false;
226
- }
227
- styleElement.parentNode.removeChild(styleElement);
228
- }
229
-
230
- /* istanbul ignore next */
231
- function domAPI(options) {
232
- if (typeof document === "undefined") {
233
- return {
234
- update: function update() {},
235
- remove: function remove() {}
236
- };
237
- }
238
- var styleElement = options.insertStyleElement(options);
239
- return {
240
- update: function update(obj) {
241
- apply(styleElement, options, obj);
242
- },
243
- remove: function remove() {
244
- removeStyleElement(styleElement);
245
- }
246
- };
247
- }
248
- module.exports = domAPI;
249
-
250
- /***/ }),
251
-
252
- /***/ "./node_modules/style-loader/dist/runtime/styleTagTransform.js":
253
- /*!*********************************************************************!*\
254
- !*** ./node_modules/style-loader/dist/runtime/styleTagTransform.js ***!
255
- \*********************************************************************/
256
- /***/ ((module) => {
257
-
258
- "use strict";
259
-
260
-
261
- /* istanbul ignore next */
262
- function styleTagTransform(css, styleElement) {
263
- if (styleElement.styleSheet) {
264
- styleElement.styleSheet.cssText = css;
265
- } else {
266
- while (styleElement.firstChild) {
267
- styleElement.removeChild(styleElement.firstChild);
268
- }
269
- styleElement.appendChild(document.createTextNode(css));
270
- }
271
- }
272
- module.exports = styleTagTransform;
273
-
274
- /***/ }),
275
-
276
- /***/ "./node_modules/webpack-dev-server/client/clients/WebSocketClient.js":
277
- /*!***************************************************************************!*\
278
- !*** ./node_modules/webpack-dev-server/client/clients/WebSocketClient.js ***!
279
- \***************************************************************************/
280
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
281
-
282
- "use strict";
283
- __webpack_require__.r(__webpack_exports__);
284
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
285
- /* harmony export */ "default": () => (/* binding */ WebSocketClient)
286
- /* harmony export */ });
287
- /* harmony import */ var _utils_log_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/log.js */ "./node_modules/webpack-dev-server/client/utils/log.js");
288
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
289
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
290
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
291
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
292
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
293
-
294
- var WebSocketClient = /*#__PURE__*/function () {
295
- /**
296
- * @param {string} url
297
- */
298
- function WebSocketClient(url) {
299
- _classCallCheck(this, WebSocketClient);
300
- this.client = new WebSocket(url);
301
- this.client.onerror = function (error) {
302
- _utils_log_js__WEBPACK_IMPORTED_MODULE_0__.log.error(error);
303
- };
304
- }
305
-
306
- /**
307
- * @param {(...args: any[]) => void} f
308
- */
309
- _createClass(WebSocketClient, [{
310
- key: "onOpen",
311
- value: function onOpen(f) {
312
- this.client.onopen = f;
313
- }
314
-
315
- /**
316
- * @param {(...args: any[]) => void} f
317
- */
318
- }, {
319
- key: "onClose",
320
- value: function onClose(f) {
321
- this.client.onclose = f;
322
- }
323
-
324
- // call f with the message string as the first argument
325
- /**
326
- * @param {(...args: any[]) => void} f
327
- */
328
- }, {
329
- key: "onMessage",
330
- value: function onMessage(f) {
331
- this.client.onmessage = function (e) {
332
- f(e.data);
333
- };
334
- }
335
- }]);
336
- return WebSocketClient;
337
- }();
338
-
339
-
340
- /***/ }),
341
-
342
- /***/ "./node_modules/webpack-dev-server/client/index.js?protocol=ws%3A&hostname=0.0.0.0&port=3000&pathname=%2Fws&logging=info&overlay=true&reconnect=10&hot=true&live-reload=true":
343
- /*!***********************************************************************************************************************************************************************************!*\
344
- !*** ./node_modules/webpack-dev-server/client/index.js?protocol=ws%3A&hostname=0.0.0.0&port=3000&pathname=%2Fws&logging=info&overlay=true&reconnect=10&hot=true&live-reload=true ***!
345
- \***********************************************************************************************************************************************************************************/
346
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
347
-
348
- "use strict";
349
- var __resourceQuery = "?protocol=ws%3A&hostname=0.0.0.0&port=3000&pathname=%2Fws&logging=info&overlay=true&reconnect=10&hot=true&live-reload=true";
350
- __webpack_require__.r(__webpack_exports__);
351
- /* harmony import */ var webpack_hot_log_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! webpack/hot/log.js */ "./node_modules/webpack/hot/log.js");
352
- /* harmony import */ var webpack_hot_log_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(webpack_hot_log_js__WEBPACK_IMPORTED_MODULE_0__);
353
- /* harmony import */ var _utils_stripAnsi_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/stripAnsi.js */ "./node_modules/webpack-dev-server/client/utils/stripAnsi.js");
354
- /* harmony import */ var _utils_parseURL_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/parseURL.js */ "./node_modules/webpack-dev-server/client/utils/parseURL.js");
355
- /* harmony import */ var _socket_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./socket.js */ "./node_modules/webpack-dev-server/client/socket.js");
356
- /* harmony import */ var _overlay_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./overlay.js */ "./node_modules/webpack-dev-server/client/overlay.js");
357
- /* harmony import */ var _utils_log_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/log.js */ "./node_modules/webpack-dev-server/client/utils/log.js");
358
- /* harmony import */ var _utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/sendMessage.js */ "./node_modules/webpack-dev-server/client/utils/sendMessage.js");
359
- /* harmony import */ var _utils_reloadApp_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/reloadApp.js */ "./node_modules/webpack-dev-server/client/utils/reloadApp.js");
360
- /* harmony import */ var _utils_createSocketURL_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/createSocketURL.js */ "./node_modules/webpack-dev-server/client/utils/createSocketURL.js");
361
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
362
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
363
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
364
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
365
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
366
- /* global __resourceQuery, __webpack_hash__ */
367
- /// <reference types="webpack/module" />
368
-
369
-
370
-
371
-
372
-
373
-
374
-
375
-
376
-
377
-
378
- /**
379
- * @typedef {Object} OverlayOptions
380
- * @property {boolean | (error: Error) => boolean} [warnings]
381
- * @property {boolean | (error: Error) => boolean} [errors]
382
- * @property {boolean | (error: Error) => boolean} [runtimeErrors]
383
- * @property {string} [trustedTypesPolicyName]
384
- */
385
-
386
- /**
387
- * @typedef {Object} Options
388
- * @property {boolean} hot
389
- * @property {boolean} liveReload
390
- * @property {boolean} progress
391
- * @property {boolean | OverlayOptions} overlay
392
- * @property {string} [logging]
393
- * @property {number} [reconnect]
394
- */
395
-
396
- /**
397
- * @typedef {Object} Status
398
- * @property {boolean} isUnloading
399
- * @property {string} currentHash
400
- * @property {string} [previousHash]
401
- */
402
-
403
- /**
404
- * @param {boolean | { warnings?: boolean | string; errors?: boolean | string; runtimeErrors?: boolean | string; }} overlayOptions
405
- */
406
- var decodeOverlayOptions = function decodeOverlayOptions(overlayOptions) {
407
- if (typeof overlayOptions === "object") {
408
- ["warnings", "errors", "runtimeErrors"].forEach(function (property) {
409
- if (typeof overlayOptions[property] === "string") {
410
- var overlayFilterFunctionString = decodeURIComponent(overlayOptions[property]);
411
-
412
- // eslint-disable-next-line no-new-func
413
- var overlayFilterFunction = new Function("message", "var callback = ".concat(overlayFilterFunctionString, "\n return callback(message)"));
414
- overlayOptions[property] = overlayFilterFunction;
415
- }
416
- });
417
- }
418
- };
419
-
420
- /**
421
- * @type {Status}
422
- */
423
- var status = {
424
- isUnloading: false,
425
- // TODO Workaround for webpack v4, `__webpack_hash__` is not replaced without HotModuleReplacement
426
- // eslint-disable-next-line camelcase
427
- currentHash: true ? __webpack_require__.h() : 0
428
- };
429
-
430
- /** @type {Options} */
431
- var options = {
432
- hot: false,
433
- liveReload: false,
434
- progress: false,
435
- overlay: false
436
- };
437
- var parsedResourceQuery = (0,_utils_parseURL_js__WEBPACK_IMPORTED_MODULE_2__["default"])(__resourceQuery);
438
- var enabledFeatures = {
439
- "Hot Module Replacement": false,
440
- "Live Reloading": false,
441
- Progress: false,
442
- Overlay: false
443
- };
444
- if (parsedResourceQuery.hot === "true") {
445
- options.hot = true;
446
- enabledFeatures["Hot Module Replacement"] = true;
447
- }
448
- if (parsedResourceQuery["live-reload"] === "true") {
449
- options.liveReload = true;
450
- enabledFeatures["Live Reloading"] = true;
451
- }
452
- if (parsedResourceQuery.progress === "true") {
453
- options.progress = true;
454
- enabledFeatures.Progress = true;
455
- }
456
- if (parsedResourceQuery.overlay) {
457
- try {
458
- options.overlay = JSON.parse(parsedResourceQuery.overlay);
459
- } catch (e) {
460
- _utils_log_js__WEBPACK_IMPORTED_MODULE_5__.log.error("Error parsing overlay options from resource query:", e);
461
- }
462
-
463
- // Fill in default "true" params for partially-specified objects.
464
- if (typeof options.overlay === "object") {
465
- options.overlay = _objectSpread({
466
- errors: true,
467
- warnings: true,
468
- runtimeErrors: true
469
- }, options.overlay);
470
- decodeOverlayOptions(options.overlay);
471
- }
472
- enabledFeatures.Overlay = true;
473
- }
474
- if (parsedResourceQuery.logging) {
475
- options.logging = parsedResourceQuery.logging;
476
- }
477
- if (typeof parsedResourceQuery.reconnect !== "undefined") {
478
- options.reconnect = Number(parsedResourceQuery.reconnect);
479
- }
480
-
481
- /**
482
- * @param {string} level
483
- */
484
- function setAllLogLevel(level) {
485
- // This is needed because the HMR logger operate separately from dev server logger
486
- webpack_hot_log_js__WEBPACK_IMPORTED_MODULE_0___default().setLogLevel(level === "verbose" || level === "log" ? "info" : level);
487
- (0,_utils_log_js__WEBPACK_IMPORTED_MODULE_5__.setLogLevel)(level);
488
- }
489
- if (options.logging) {
490
- setAllLogLevel(options.logging);
491
- }
492
- (0,_utils_log_js__WEBPACK_IMPORTED_MODULE_5__.logEnabledFeatures)(enabledFeatures);
493
- self.addEventListener("beforeunload", function () {
494
- status.isUnloading = true;
495
- });
496
- var overlay = typeof window !== "undefined" ? (0,_overlay_js__WEBPACK_IMPORTED_MODULE_4__.createOverlay)(typeof options.overlay === "object" ? {
497
- trustedTypesPolicyName: options.overlay.trustedTypesPolicyName,
498
- catchRuntimeError: options.overlay.runtimeErrors
499
- } : {
500
- trustedTypesPolicyName: false,
501
- catchRuntimeError: options.overlay
502
- }) : {
503
- send: function send() {}
504
- };
505
- var onSocketMessage = {
506
- hot: function hot() {
507
- if (parsedResourceQuery.hot === "false") {
508
- return;
509
- }
510
- options.hot = true;
511
- },
512
- liveReload: function liveReload() {
513
- if (parsedResourceQuery["live-reload"] === "false") {
514
- return;
515
- }
516
- options.liveReload = true;
517
- },
518
- invalid: function invalid() {
519
- _utils_log_js__WEBPACK_IMPORTED_MODULE_5__.log.info("App updated. Recompiling...");
520
-
521
- // Fixes #1042. overlay doesn't clear if errors are fixed but warnings remain.
522
- if (options.overlay) {
523
- overlay.send({
524
- type: "DISMISS"
525
- });
526
- }
527
- (0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_6__["default"])("Invalid");
528
- },
529
- /**
530
- * @param {string} hash
531
- */
532
- hash: function hash(_hash) {
533
- status.previousHash = status.currentHash;
534
- status.currentHash = _hash;
535
- },
536
- logging: setAllLogLevel,
537
- /**
538
- * @param {boolean} value
539
- */
540
- overlay: function overlay(value) {
541
- if (typeof document === "undefined") {
542
- return;
543
- }
544
- options.overlay = value;
545
- decodeOverlayOptions(options.overlay);
546
- },
547
- /**
548
- * @param {number} value
549
- */
550
- reconnect: function reconnect(value) {
551
- if (parsedResourceQuery.reconnect === "false") {
552
- return;
553
- }
554
- options.reconnect = value;
555
- },
556
- /**
557
- * @param {boolean} value
558
- */
559
- progress: function progress(value) {
560
- options.progress = value;
561
- },
562
- /**
563
- * @param {{ pluginName?: string, percent: number, msg: string }} data
564
- */
565
- "progress-update": function progressUpdate(data) {
566
- if (options.progress) {
567
- _utils_log_js__WEBPACK_IMPORTED_MODULE_5__.log.info("".concat(data.pluginName ? "[".concat(data.pluginName, "] ") : "").concat(data.percent, "% - ").concat(data.msg, "."));
568
- }
569
- (0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_6__["default"])("Progress", data);
570
- },
571
- "still-ok": function stillOk() {
572
- _utils_log_js__WEBPACK_IMPORTED_MODULE_5__.log.info("Nothing changed.");
573
- if (options.overlay) {
574
- overlay.send({
575
- type: "DISMISS"
576
- });
577
- }
578
- (0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_6__["default"])("StillOk");
579
- },
580
- ok: function ok() {
581
- (0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_6__["default"])("Ok");
582
- if (options.overlay) {
583
- overlay.send({
584
- type: "DISMISS"
585
- });
586
- }
587
- (0,_utils_reloadApp_js__WEBPACK_IMPORTED_MODULE_7__["default"])(options, status);
588
- },
589
- // TODO: remove in v5 in favor of 'static-changed'
590
- /**
591
- * @param {string} file
592
- */
593
- "content-changed": function contentChanged(file) {
594
- _utils_log_js__WEBPACK_IMPORTED_MODULE_5__.log.info("".concat(file ? "\"".concat(file, "\"") : "Content", " from static directory was changed. Reloading..."));
595
- self.location.reload();
596
- },
597
- /**
598
- * @param {string} file
599
- */
600
- "static-changed": function staticChanged(file) {
601
- _utils_log_js__WEBPACK_IMPORTED_MODULE_5__.log.info("".concat(file ? "\"".concat(file, "\"") : "Content", " from static directory was changed. Reloading..."));
602
- self.location.reload();
603
- },
604
- /**
605
- * @param {Error[]} warnings
606
- * @param {any} params
607
- */
608
- warnings: function warnings(_warnings, params) {
609
- _utils_log_js__WEBPACK_IMPORTED_MODULE_5__.log.warn("Warnings while compiling.");
610
- var printableWarnings = _warnings.map(function (error) {
611
- var _formatProblem = (0,_overlay_js__WEBPACK_IMPORTED_MODULE_4__.formatProblem)("warning", error),
612
- header = _formatProblem.header,
613
- body = _formatProblem.body;
614
- return "".concat(header, "\n").concat((0,_utils_stripAnsi_js__WEBPACK_IMPORTED_MODULE_1__["default"])(body));
615
- });
616
- (0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_6__["default"])("Warnings", printableWarnings);
617
- for (var i = 0; i < printableWarnings.length; i++) {
618
- _utils_log_js__WEBPACK_IMPORTED_MODULE_5__.log.warn(printableWarnings[i]);
619
- }
620
- var overlayWarningsSetting = typeof options.overlay === "boolean" ? options.overlay : options.overlay && options.overlay.warnings;
621
- if (overlayWarningsSetting) {
622
- var warningsToDisplay = typeof overlayWarningsSetting === "function" ? _warnings.filter(overlayWarningsSetting) : _warnings;
623
- if (warningsToDisplay.length) {
624
- overlay.send({
625
- type: "BUILD_ERROR",
626
- level: "warning",
627
- messages: _warnings
628
- });
629
- }
630
- }
631
- if (params && params.preventReloading) {
632
- return;
633
- }
634
- (0,_utils_reloadApp_js__WEBPACK_IMPORTED_MODULE_7__["default"])(options, status);
635
- },
636
- /**
637
- * @param {Error[]} errors
638
- */
639
- errors: function errors(_errors) {
640
- _utils_log_js__WEBPACK_IMPORTED_MODULE_5__.log.error("Errors while compiling. Reload prevented.");
641
- var printableErrors = _errors.map(function (error) {
642
- var _formatProblem2 = (0,_overlay_js__WEBPACK_IMPORTED_MODULE_4__.formatProblem)("error", error),
643
- header = _formatProblem2.header,
644
- body = _formatProblem2.body;
645
- return "".concat(header, "\n").concat((0,_utils_stripAnsi_js__WEBPACK_IMPORTED_MODULE_1__["default"])(body));
646
- });
647
- (0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_6__["default"])("Errors", printableErrors);
648
- for (var i = 0; i < printableErrors.length; i++) {
649
- _utils_log_js__WEBPACK_IMPORTED_MODULE_5__.log.error(printableErrors[i]);
650
- }
651
- var overlayErrorsSettings = typeof options.overlay === "boolean" ? options.overlay : options.overlay && options.overlay.errors;
652
- if (overlayErrorsSettings) {
653
- var errorsToDisplay = typeof overlayErrorsSettings === "function" ? _errors.filter(overlayErrorsSettings) : _errors;
654
- if (errorsToDisplay.length) {
655
- overlay.send({
656
- type: "BUILD_ERROR",
657
- level: "error",
658
- messages: _errors
659
- });
660
- }
661
- }
662
- },
663
- /**
664
- * @param {Error} error
665
- */
666
- error: function error(_error) {
667
- _utils_log_js__WEBPACK_IMPORTED_MODULE_5__.log.error(_error);
668
- },
669
- close: function close() {
670
- _utils_log_js__WEBPACK_IMPORTED_MODULE_5__.log.info("Disconnected!");
671
- if (options.overlay) {
672
- overlay.send({
673
- type: "DISMISS"
674
- });
675
- }
676
- (0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_6__["default"])("Close");
677
- }
678
- };
679
- var socketURL = (0,_utils_createSocketURL_js__WEBPACK_IMPORTED_MODULE_8__["default"])(parsedResourceQuery);
680
- (0,_socket_js__WEBPACK_IMPORTED_MODULE_3__["default"])(socketURL, onSocketMessage, options.reconnect);
681
-
682
- /***/ }),
683
-
684
- /***/ "./node_modules/webpack-dev-server/client/modules/logger/index.js":
685
- /*!************************************************************************!*\
686
- !*** ./node_modules/webpack-dev-server/client/modules/logger/index.js ***!
687
- \************************************************************************/
688
- /***/ ((__unused_webpack_module, exports) => {
689
-
690
- /******/ (function() { // webpackBootstrap
691
- /******/ "use strict";
692
- /******/ var __webpack_modules__ = ({
693
-
694
- /***/ "./client-src/modules/logger/SyncBailHookFake.js":
695
- /*!*******************************************************!*\
696
- !*** ./client-src/modules/logger/SyncBailHookFake.js ***!
697
- \*******************************************************/
698
- /***/ (function(module) {
699
-
700
-
701
-
702
- /**
703
- * Client stub for tapable SyncBailHook
704
- */
705
- module.exports = function clientTapableSyncBailHook() {
706
- return {
707
- call: function call() {}
708
- };
709
- };
710
-
711
- /***/ }),
712
-
713
- /***/ "./node_modules/webpack/lib/logging/Logger.js":
714
- /*!****************************************************!*\
715
- !*** ./node_modules/webpack/lib/logging/Logger.js ***!
716
- \****************************************************/
717
- /***/ (function(__unused_webpack_module, exports) {
718
-
719
- /*
720
- MIT License http://www.opensource.org/licenses/mit-license.php
721
- Author Tobias Koppers @sokra
722
- */
723
-
724
-
725
-
726
- function _toConsumableArray(arr) {
727
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
728
- }
729
- function _nonIterableSpread() {
730
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
731
- }
732
- function _unsupportedIterableToArray(o, minLen) {
733
- if (!o) return;
734
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
735
- var n = Object.prototype.toString.call(o).slice(8, -1);
736
- if (n === "Object" && o.constructor) n = o.constructor.name;
737
- if (n === "Map" || n === "Set") return Array.from(o);
738
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
739
- }
740
- function _iterableToArray(iter) {
741
- if (typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) !== "undefined" && iter[(typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
742
- }
743
- function _arrayWithoutHoles(arr) {
744
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
745
- }
746
- function _arrayLikeToArray(arr, len) {
747
- if (len == null || len > arr.length) len = arr.length;
748
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
749
- return arr2;
750
- }
751
- function _classCallCheck(instance, Constructor) {
752
- if (!(instance instanceof Constructor)) {
753
- throw new TypeError("Cannot call a class as a function");
754
- }
755
- }
756
- function _defineProperties(target, props) {
757
- for (var i = 0; i < props.length; i++) {
758
- var descriptor = props[i];
759
- descriptor.enumerable = descriptor.enumerable || false;
760
- descriptor.configurable = true;
761
- if ("value" in descriptor) descriptor.writable = true;
762
- Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
763
- }
764
- }
765
- function _createClass(Constructor, protoProps, staticProps) {
766
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
767
- if (staticProps) _defineProperties(Constructor, staticProps);
768
- Object.defineProperty(Constructor, "prototype", {
769
- writable: false
770
- });
771
- return Constructor;
772
- }
773
- function _toPropertyKey(arg) {
774
- var key = _toPrimitive(arg, "string");
775
- return typeof key === "symbol" ? key : String(key);
776
- }
777
- function _toPrimitive(input, hint) {
778
- if (typeof input !== "object" || input === null) return input;
779
- var prim = input[(typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).toPrimitive];
780
- if (prim !== undefined) {
781
- var res = prim.call(input, hint || "default");
782
- if (typeof res !== "object") return res;
783
- throw new TypeError("@@toPrimitive must return a primitive value.");
784
- }
785
- return (hint === "string" ? String : Number)(input);
786
- }
787
- var LogType = Object.freeze({
788
- error: /** @type {"error"} */"error",
789
- // message, c style arguments
790
- warn: /** @type {"warn"} */"warn",
791
- // message, c style arguments
792
- info: /** @type {"info"} */"info",
793
- // message, c style arguments
794
- log: /** @type {"log"} */"log",
795
- // message, c style arguments
796
- debug: /** @type {"debug"} */"debug",
797
- // message, c style arguments
798
-
799
- trace: /** @type {"trace"} */"trace",
800
- // no arguments
801
-
802
- group: /** @type {"group"} */"group",
803
- // [label]
804
- groupCollapsed: /** @type {"groupCollapsed"} */"groupCollapsed",
805
- // [label]
806
- groupEnd: /** @type {"groupEnd"} */"groupEnd",
807
- // [label]
808
-
809
- profile: /** @type {"profile"} */"profile",
810
- // [profileName]
811
- profileEnd: /** @type {"profileEnd"} */"profileEnd",
812
- // [profileName]
813
-
814
- time: /** @type {"time"} */"time",
815
- // name, time as [seconds, nanoseconds]
816
-
817
- clear: /** @type {"clear"} */"clear",
818
- // no arguments
819
- status: /** @type {"status"} */"status" // message, arguments
820
- });
821
-
822
- exports.LogType = LogType;
823
-
824
- /** @typedef {typeof LogType[keyof typeof LogType]} LogTypeEnum */
825
-
826
- var LOG_SYMBOL = (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; })("webpack logger raw log method");
827
- var TIMERS_SYMBOL = (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; })("webpack logger times");
828
- var TIMERS_AGGREGATES_SYMBOL = (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; })("webpack logger aggregated times");
829
- var WebpackLogger = /*#__PURE__*/function () {
830
- /**
831
- * @param {function(LogTypeEnum, any[]=): void} log log function
832
- * @param {function(string | function(): string): WebpackLogger} getChildLogger function to create child logger
833
- */
834
- function WebpackLogger(log, getChildLogger) {
835
- _classCallCheck(this, WebpackLogger);
836
- this[LOG_SYMBOL] = log;
837
- this.getChildLogger = getChildLogger;
838
- }
839
- _createClass(WebpackLogger, [{
840
- key: "error",
841
- value: function error() {
842
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
843
- args[_key] = arguments[_key];
844
- }
845
- this[LOG_SYMBOL](LogType.error, args);
846
- }
847
- }, {
848
- key: "warn",
849
- value: function warn() {
850
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
851
- args[_key2] = arguments[_key2];
852
- }
853
- this[LOG_SYMBOL](LogType.warn, args);
854
- }
855
- }, {
856
- key: "info",
857
- value: function info() {
858
- for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
859
- args[_key3] = arguments[_key3];
860
- }
861
- this[LOG_SYMBOL](LogType.info, args);
862
- }
863
- }, {
864
- key: "log",
865
- value: function log() {
866
- for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
867
- args[_key4] = arguments[_key4];
868
- }
869
- this[LOG_SYMBOL](LogType.log, args);
870
- }
871
- }, {
872
- key: "debug",
873
- value: function debug() {
874
- for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
875
- args[_key5] = arguments[_key5];
876
- }
877
- this[LOG_SYMBOL](LogType.debug, args);
878
- }
879
- }, {
880
- key: "assert",
881
- value: function assert(assertion) {
882
- if (!assertion) {
883
- for (var _len6 = arguments.length, args = new Array(_len6 > 1 ? _len6 - 1 : 0), _key6 = 1; _key6 < _len6; _key6++) {
884
- args[_key6 - 1] = arguments[_key6];
885
- }
886
- this[LOG_SYMBOL](LogType.error, args);
887
- }
888
- }
889
- }, {
890
- key: "trace",
891
- value: function trace() {
892
- this[LOG_SYMBOL](LogType.trace, ["Trace"]);
893
- }
894
- }, {
895
- key: "clear",
896
- value: function clear() {
897
- this[LOG_SYMBOL](LogType.clear);
898
- }
899
- }, {
900
- key: "status",
901
- value: function status() {
902
- for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
903
- args[_key7] = arguments[_key7];
904
- }
905
- this[LOG_SYMBOL](LogType.status, args);
906
- }
907
- }, {
908
- key: "group",
909
- value: function group() {
910
- for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
911
- args[_key8] = arguments[_key8];
912
- }
913
- this[LOG_SYMBOL](LogType.group, args);
914
- }
915
- }, {
916
- key: "groupCollapsed",
917
- value: function groupCollapsed() {
918
- for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
919
- args[_key9] = arguments[_key9];
920
- }
921
- this[LOG_SYMBOL](LogType.groupCollapsed, args);
922
- }
923
- }, {
924
- key: "groupEnd",
925
- value: function groupEnd() {
926
- for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
927
- args[_key10] = arguments[_key10];
928
- }
929
- this[LOG_SYMBOL](LogType.groupEnd, args);
930
- }
931
- }, {
932
- key: "profile",
933
- value: function profile(label) {
934
- this[LOG_SYMBOL](LogType.profile, [label]);
935
- }
936
- }, {
937
- key: "profileEnd",
938
- value: function profileEnd(label) {
939
- this[LOG_SYMBOL](LogType.profileEnd, [label]);
940
- }
941
- }, {
942
- key: "time",
943
- value: function time(label) {
944
- this[TIMERS_SYMBOL] = this[TIMERS_SYMBOL] || new Map();
945
- this[TIMERS_SYMBOL].set(label, process.hrtime());
946
- }
947
- }, {
948
- key: "timeLog",
949
- value: function timeLog(label) {
950
- var prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label);
951
- if (!prev) {
952
- throw new Error("No such label '".concat(label, "' for WebpackLogger.timeLog()"));
953
- }
954
- var time = process.hrtime(prev);
955
- this[LOG_SYMBOL](LogType.time, [label].concat(_toConsumableArray(time)));
956
- }
957
- }, {
958
- key: "timeEnd",
959
- value: function timeEnd(label) {
960
- var prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label);
961
- if (!prev) {
962
- throw new Error("No such label '".concat(label, "' for WebpackLogger.timeEnd()"));
963
- }
964
- var time = process.hrtime(prev);
965
- this[TIMERS_SYMBOL].delete(label);
966
- this[LOG_SYMBOL](LogType.time, [label].concat(_toConsumableArray(time)));
967
- }
968
- }, {
969
- key: "timeAggregate",
970
- value: function timeAggregate(label) {
971
- var prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label);
972
- if (!prev) {
973
- throw new Error("No such label '".concat(label, "' for WebpackLogger.timeAggregate()"));
974
- }
975
- var time = process.hrtime(prev);
976
- this[TIMERS_SYMBOL].delete(label);
977
- this[TIMERS_AGGREGATES_SYMBOL] = this[TIMERS_AGGREGATES_SYMBOL] || new Map();
978
- var current = this[TIMERS_AGGREGATES_SYMBOL].get(label);
979
- if (current !== undefined) {
980
- if (time[1] + current[1] > 1e9) {
981
- time[0] += current[0] + 1;
982
- time[1] = time[1] - 1e9 + current[1];
983
- } else {
984
- time[0] += current[0];
985
- time[1] += current[1];
986
- }
987
- }
988
- this[TIMERS_AGGREGATES_SYMBOL].set(label, time);
989
- }
990
- }, {
991
- key: "timeAggregateEnd",
992
- value: function timeAggregateEnd(label) {
993
- if (this[TIMERS_AGGREGATES_SYMBOL] === undefined) return;
994
- var time = this[TIMERS_AGGREGATES_SYMBOL].get(label);
995
- if (time === undefined) return;
996
- this[TIMERS_AGGREGATES_SYMBOL].delete(label);
997
- this[LOG_SYMBOL](LogType.time, [label].concat(_toConsumableArray(time)));
998
- }
999
- }]);
1000
- return WebpackLogger;
1001
- }();
1002
- exports.Logger = WebpackLogger;
1003
-
1004
- /***/ }),
1005
-
1006
- /***/ "./node_modules/webpack/lib/logging/createConsoleLogger.js":
1007
- /*!*****************************************************************!*\
1008
- !*** ./node_modules/webpack/lib/logging/createConsoleLogger.js ***!
1009
- \*****************************************************************/
1010
- /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_11285__) {
1011
-
1012
- /*
1013
- MIT License http://www.opensource.org/licenses/mit-license.php
1014
- Author Tobias Koppers @sokra
1015
- */
1016
-
1017
-
1018
-
1019
- function _toConsumableArray(arr) {
1020
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
1021
- }
1022
- function _nonIterableSpread() {
1023
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1024
- }
1025
- function _unsupportedIterableToArray(o, minLen) {
1026
- if (!o) return;
1027
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
1028
- var n = Object.prototype.toString.call(o).slice(8, -1);
1029
- if (n === "Object" && o.constructor) n = o.constructor.name;
1030
- if (n === "Map" || n === "Set") return Array.from(o);
1031
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
1032
- }
1033
- function _iterableToArray(iter) {
1034
- if (typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) !== "undefined" && iter[(typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1035
- }
1036
- function _arrayWithoutHoles(arr) {
1037
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
1038
- }
1039
- function _arrayLikeToArray(arr, len) {
1040
- if (len == null || len > arr.length) len = arr.length;
1041
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
1042
- return arr2;
1043
- }
1044
- var _require = __nested_webpack_require_11285__(/*! ./Logger */ "./node_modules/webpack/lib/logging/Logger.js"),
1045
- LogType = _require.LogType;
1046
-
1047
- /** @typedef {import("../../declarations/WebpackOptions").FilterItemTypes} FilterItemTypes */
1048
- /** @typedef {import("../../declarations/WebpackOptions").FilterTypes} FilterTypes */
1049
- /** @typedef {import("./Logger").LogTypeEnum} LogTypeEnum */
1050
-
1051
- /** @typedef {function(string): boolean} FilterFunction */
1052
-
1053
- /**
1054
- * @typedef {Object} LoggerConsole
1055
- * @property {function(): void} clear
1056
- * @property {function(): void} trace
1057
- * @property {(...args: any[]) => void} info
1058
- * @property {(...args: any[]) => void} log
1059
- * @property {(...args: any[]) => void} warn
1060
- * @property {(...args: any[]) => void} error
1061
- * @property {(...args: any[]) => void=} debug
1062
- * @property {(...args: any[]) => void=} group
1063
- * @property {(...args: any[]) => void=} groupCollapsed
1064
- * @property {(...args: any[]) => void=} groupEnd
1065
- * @property {(...args: any[]) => void=} status
1066
- * @property {(...args: any[]) => void=} profile
1067
- * @property {(...args: any[]) => void=} profileEnd
1068
- * @property {(...args: any[]) => void=} logTime
1069
- */
1070
-
1071
- /**
1072
- * @typedef {Object} LoggerOptions
1073
- * @property {false|true|"none"|"error"|"warn"|"info"|"log"|"verbose"} level loglevel
1074
- * @property {FilterTypes|boolean} debug filter for debug logging
1075
- * @property {LoggerConsole} console the console to log to
1076
- */
1077
-
1078
- /**
1079
- * @param {FilterItemTypes} item an input item
1080
- * @returns {FilterFunction} filter function
1081
- */
1082
- var filterToFunction = function filterToFunction(item) {
1083
- if (typeof item === "string") {
1084
- var regExp = new RegExp("[\\\\/]".concat(item.replace(
1085
- // eslint-disable-next-line no-useless-escape
1086
- /[-[\]{}()*+?.\\^$|]/g, "\\$&"), "([\\\\/]|$|!|\\?)"));
1087
- return function (ident) {
1088
- return regExp.test(ident);
1089
- };
1090
- }
1091
- if (item && typeof item === "object" && typeof item.test === "function") {
1092
- return function (ident) {
1093
- return item.test(ident);
1094
- };
1095
- }
1096
- if (typeof item === "function") {
1097
- return item;
1098
- }
1099
- if (typeof item === "boolean") {
1100
- return function () {
1101
- return item;
1102
- };
1103
- }
1104
- };
1105
-
1106
- /**
1107
- * @enum {number}
1108
- */
1109
- var LogLevel = {
1110
- none: 6,
1111
- false: 6,
1112
- error: 5,
1113
- warn: 4,
1114
- info: 3,
1115
- log: 2,
1116
- true: 2,
1117
- verbose: 1
1118
- };
1119
-
1120
- /**
1121
- * @param {LoggerOptions} options options object
1122
- * @returns {function(string, LogTypeEnum, any[]): void} logging function
1123
- */
1124
- module.exports = function (_ref) {
1125
- var _ref$level = _ref.level,
1126
- level = _ref$level === void 0 ? "info" : _ref$level,
1127
- _ref$debug = _ref.debug,
1128
- debug = _ref$debug === void 0 ? false : _ref$debug,
1129
- console = _ref.console;
1130
- var debugFilters = typeof debug === "boolean" ? [function () {
1131
- return debug;
1132
- }] : /** @type {FilterItemTypes[]} */[].concat(debug).map(filterToFunction);
1133
- /** @type {number} */
1134
- var loglevel = LogLevel["".concat(level)] || 0;
1135
-
1136
- /**
1137
- * @param {string} name name of the logger
1138
- * @param {LogTypeEnum} type type of the log entry
1139
- * @param {any[]} args arguments of the log entry
1140
- * @returns {void}
1141
- */
1142
- var logger = function logger(name, type, args) {
1143
- var labeledArgs = function labeledArgs() {
1144
- if (Array.isArray(args)) {
1145
- if (args.length > 0 && typeof args[0] === "string") {
1146
- return ["[".concat(name, "] ").concat(args[0])].concat(_toConsumableArray(args.slice(1)));
1147
- } else {
1148
- return ["[".concat(name, "]")].concat(_toConsumableArray(args));
1149
- }
1150
- } else {
1151
- return [];
1152
- }
1153
- };
1154
- var debug = debugFilters.some(function (f) {
1155
- return f(name);
1156
- });
1157
- switch (type) {
1158
- case LogType.debug:
1159
- if (!debug) return;
1160
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
1161
- if (typeof console.debug === "function") {
1162
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
1163
- console.debug.apply(console, _toConsumableArray(labeledArgs()));
1164
- } else {
1165
- console.log.apply(console, _toConsumableArray(labeledArgs()));
1166
- }
1167
- break;
1168
- case LogType.log:
1169
- if (!debug && loglevel > LogLevel.log) return;
1170
- console.log.apply(console, _toConsumableArray(labeledArgs()));
1171
- break;
1172
- case LogType.info:
1173
- if (!debug && loglevel > LogLevel.info) return;
1174
- console.info.apply(console, _toConsumableArray(labeledArgs()));
1175
- break;
1176
- case LogType.warn:
1177
- if (!debug && loglevel > LogLevel.warn) return;
1178
- console.warn.apply(console, _toConsumableArray(labeledArgs()));
1179
- break;
1180
- case LogType.error:
1181
- if (!debug && loglevel > LogLevel.error) return;
1182
- console.error.apply(console, _toConsumableArray(labeledArgs()));
1183
- break;
1184
- case LogType.trace:
1185
- if (!debug) return;
1186
- console.trace();
1187
- break;
1188
- case LogType.groupCollapsed:
1189
- if (!debug && loglevel > LogLevel.log) return;
1190
- if (!debug && loglevel > LogLevel.verbose) {
1191
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
1192
- if (typeof console.groupCollapsed === "function") {
1193
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
1194
- console.groupCollapsed.apply(console, _toConsumableArray(labeledArgs()));
1195
- } else {
1196
- console.log.apply(console, _toConsumableArray(labeledArgs()));
1197
- }
1198
- break;
1199
- }
1200
- // falls through
1201
- case LogType.group:
1202
- if (!debug && loglevel > LogLevel.log) return;
1203
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
1204
- if (typeof console.group === "function") {
1205
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
1206
- console.group.apply(console, _toConsumableArray(labeledArgs()));
1207
- } else {
1208
- console.log.apply(console, _toConsumableArray(labeledArgs()));
1209
- }
1210
- break;
1211
- case LogType.groupEnd:
1212
- if (!debug && loglevel > LogLevel.log) return;
1213
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
1214
- if (typeof console.groupEnd === "function") {
1215
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
1216
- console.groupEnd();
1217
- }
1218
- break;
1219
- case LogType.time:
1220
- {
1221
- if (!debug && loglevel > LogLevel.log) return;
1222
- var ms = args[1] * 1000 + args[2] / 1000000;
1223
- var msg = "[".concat(name, "] ").concat(args[0], ": ").concat(ms, " ms");
1224
- if (typeof console.logTime === "function") {
1225
- console.logTime(msg);
1226
- } else {
1227
- console.log(msg);
1228
- }
1229
- break;
1230
- }
1231
- case LogType.profile:
1232
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
1233
- if (typeof console.profile === "function") {
1234
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
1235
- console.profile.apply(console, _toConsumableArray(labeledArgs()));
1236
- }
1237
- break;
1238
- case LogType.profileEnd:
1239
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
1240
- if (typeof console.profileEnd === "function") {
1241
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
1242
- console.profileEnd.apply(console, _toConsumableArray(labeledArgs()));
1243
- }
1244
- break;
1245
- case LogType.clear:
1246
- if (!debug && loglevel > LogLevel.log) return;
1247
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
1248
- if (typeof console.clear === "function") {
1249
- // eslint-disable-next-line node/no-unsupported-features/node-builtins
1250
- console.clear();
1251
- }
1252
- break;
1253
- case LogType.status:
1254
- if (!debug && loglevel > LogLevel.info) return;
1255
- if (typeof console.status === "function") {
1256
- if (args.length === 0) {
1257
- console.status();
1258
- } else {
1259
- console.status.apply(console, _toConsumableArray(labeledArgs()));
1260
- }
1261
- } else {
1262
- if (args.length !== 0) {
1263
- console.info.apply(console, _toConsumableArray(labeledArgs()));
1264
- }
1265
- }
1266
- break;
1267
- default:
1268
- throw new Error("Unexpected LogType ".concat(type));
1269
- }
1270
- };
1271
- return logger;
1272
- };
1273
-
1274
- /***/ }),
1275
-
1276
- /***/ "./node_modules/webpack/lib/logging/runtime.js":
1277
- /*!*****************************************************!*\
1278
- !*** ./node_modules/webpack/lib/logging/runtime.js ***!
1279
- \*****************************************************/
1280
- /***/ (function(__unused_webpack_module, exports, __nested_webpack_require_21334__) {
1281
-
1282
- /*
1283
- MIT License http://www.opensource.org/licenses/mit-license.php
1284
- Author Tobias Koppers @sokra
1285
- */
1286
-
1287
-
1288
-
1289
- function _extends() {
1290
- _extends = Object.assign ? Object.assign.bind() : function (target) {
1291
- for (var i = 1; i < arguments.length; i++) {
1292
- var source = arguments[i];
1293
- for (var key in source) {
1294
- if (Object.prototype.hasOwnProperty.call(source, key)) {
1295
- target[key] = source[key];
1296
- }
1297
- }
1298
- }
1299
- return target;
1300
- };
1301
- return _extends.apply(this, arguments);
1302
- }
1303
- var SyncBailHook = __nested_webpack_require_21334__(/*! tapable/lib/SyncBailHook */ "./client-src/modules/logger/SyncBailHookFake.js");
1304
- var _require = __nested_webpack_require_21334__(/*! ./Logger */ "./node_modules/webpack/lib/logging/Logger.js"),
1305
- Logger = _require.Logger;
1306
- var createConsoleLogger = __nested_webpack_require_21334__(/*! ./createConsoleLogger */ "./node_modules/webpack/lib/logging/createConsoleLogger.js");
1307
-
1308
- /** @type {createConsoleLogger.LoggerOptions} */
1309
- var currentDefaultLoggerOptions = {
1310
- level: "info",
1311
- debug: false,
1312
- console: console
1313
- };
1314
- var currentDefaultLogger = createConsoleLogger(currentDefaultLoggerOptions);
1315
-
1316
- /**
1317
- * @param {string} name name of the logger
1318
- * @returns {Logger} a logger
1319
- */
1320
- exports.getLogger = function (name) {
1321
- return new Logger(function (type, args) {
1322
- if (exports.hooks.log.call(name, type, args) === undefined) {
1323
- currentDefaultLogger(name, type, args);
1324
- }
1325
- }, function (childName) {
1326
- return exports.getLogger("".concat(name, "/").concat(childName));
1327
- });
1328
- };
1329
-
1330
- /**
1331
- * @param {createConsoleLogger.LoggerOptions} options new options, merge with old options
1332
- * @returns {void}
1333
- */
1334
- exports.configureDefaultLogger = function (options) {
1335
- _extends(currentDefaultLoggerOptions, options);
1336
- currentDefaultLogger = createConsoleLogger(currentDefaultLoggerOptions);
1337
- };
1338
- exports.hooks = {
1339
- log: new SyncBailHook(["origin", "type", "args"])
1340
- };
1341
-
1342
- /***/ })
1343
-
1344
- /******/ });
1345
- /************************************************************************/
1346
- /******/ // The module cache
1347
- /******/ var __webpack_module_cache__ = {};
1348
- /******/
1349
- /******/ // The require function
1350
- /******/ function __nested_webpack_require_23461__(moduleId) {
1351
- /******/ // Check if module is in cache
1352
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
1353
- /******/ if (cachedModule !== undefined) {
1354
- /******/ return cachedModule.exports;
1355
- /******/ }
1356
- /******/ // Create a new module (and put it into the cache)
1357
- /******/ var module = __webpack_module_cache__[moduleId] = {
1358
- /******/ // no module.id needed
1359
- /******/ // no module.loaded needed
1360
- /******/ exports: {}
1361
- /******/ };
1362
- /******/
1363
- /******/ // Execute the module function
1364
- /******/ __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_23461__);
1365
- /******/
1366
- /******/ // Return the exports of the module
1367
- /******/ return module.exports;
1368
- /******/ }
1369
- /******/
1370
- /************************************************************************/
1371
- /******/ /* webpack/runtime/define property getters */
1372
- /******/ !function() {
1373
- /******/ // define getter functions for harmony exports
1374
- /******/ __nested_webpack_require_23461__.d = function(exports, definition) {
1375
- /******/ for(var key in definition) {
1376
- /******/ if(__nested_webpack_require_23461__.o(definition, key) && !__nested_webpack_require_23461__.o(exports, key)) {
1377
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
1378
- /******/ }
1379
- /******/ }
1380
- /******/ };
1381
- /******/ }();
1382
- /******/
1383
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
1384
- /******/ !function() {
1385
- /******/ __nested_webpack_require_23461__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
1386
- /******/ }();
1387
- /******/
1388
- /******/ /* webpack/runtime/make namespace object */
1389
- /******/ !function() {
1390
- /******/ // define __esModule on exports
1391
- /******/ __nested_webpack_require_23461__.r = function(exports) {
1392
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1393
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1394
- /******/ }
1395
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
1396
- /******/ };
1397
- /******/ }();
1398
- /******/
1399
- /************************************************************************/
1400
- var __nested_webpack_exports__ = {};
1401
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
1402
- !function() {
1403
- /*!********************************************!*\
1404
- !*** ./client-src/modules/logger/index.js ***!
1405
- \********************************************/
1406
- __nested_webpack_require_23461__.r(__nested_webpack_exports__);
1407
- /* harmony export */ __nested_webpack_require_23461__.d(__nested_webpack_exports__, {
1408
- /* harmony export */ "default": function() { return /* reexport default export from named module */ webpack_lib_logging_runtime_js__WEBPACK_IMPORTED_MODULE_0__; }
1409
- /* harmony export */ });
1410
- /* harmony import */ var webpack_lib_logging_runtime_js__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_23461__(/*! webpack/lib/logging/runtime.js */ "./node_modules/webpack/lib/logging/runtime.js");
1411
-
1412
- }();
1413
- var __webpack_export_target__ = exports;
1414
- for(var i in __nested_webpack_exports__) __webpack_export_target__[i] = __nested_webpack_exports__[i];
1415
- if(__nested_webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, "__esModule", { value: true });
1416
- /******/ })()
1417
- ;
1418
-
1419
- /***/ }),
1420
-
1421
- /***/ "./node_modules/webpack-dev-server/client/overlay.js":
1422
- /*!***********************************************************!*\
1423
- !*** ./node_modules/webpack-dev-server/client/overlay.js ***!
1424
- \***********************************************************/
1425
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1426
-
1427
- "use strict";
1428
- __webpack_require__.r(__webpack_exports__);
1429
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1430
- /* harmony export */ createOverlay: () => (/* binding */ createOverlay),
1431
- /* harmony export */ formatProblem: () => (/* binding */ formatProblem)
1432
- /* harmony export */ });
1433
- /* harmony import */ var ansi_html_community__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ansi-html-community */ "./node_modules/ansi-html-community/index.js");
1434
- /* harmony import */ var ansi_html_community__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(ansi_html_community__WEBPACK_IMPORTED_MODULE_0__);
1435
- /* harmony import */ var html_entities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! html-entities */ "./node_modules/html-entities/lib/index.js");
1436
- /* harmony import */ var html_entities__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(html_entities__WEBPACK_IMPORTED_MODULE_4__);
1437
- /* harmony import */ var _overlay_runtime_error_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./overlay/runtime-error.js */ "./node_modules/webpack-dev-server/client/overlay/runtime-error.js");
1438
- /* harmony import */ var _overlay_state_machine_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./overlay/state-machine.js */ "./node_modules/webpack-dev-server/client/overlay/state-machine.js");
1439
- /* harmony import */ var _overlay_styles_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./overlay/styles.js */ "./node_modules/webpack-dev-server/client/overlay/styles.js");
1440
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1441
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1442
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1443
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
1444
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1445
- // The error overlay is inspired (and mostly copied) from Create React App (https://github.com/facebookincubator/create-react-app)
1446
- // They, in turn, got inspired by webpack-hot-middleware (https://github.com/glenjamin/webpack-hot-middleware).
1447
-
1448
-
1449
-
1450
-
1451
-
1452
-
1453
- var colors = {
1454
- reset: ["transparent", "transparent"],
1455
- black: "181818",
1456
- red: "E36049",
1457
- green: "B3CB74",
1458
- yellow: "FFD080",
1459
- blue: "7CAFC2",
1460
- magenta: "7FACCA",
1461
- cyan: "C3C2EF",
1462
- lightgrey: "EBE7E3",
1463
- darkgrey: "6D7891"
1464
- };
1465
- ansi_html_community__WEBPACK_IMPORTED_MODULE_0___default().setColors(colors);
1466
-
1467
- /**
1468
- * @param {string} type
1469
- * @param {string | { file?: string, moduleName?: string, loc?: string, message?: string; stack?: string[] }} item
1470
- * @returns {{ header: string, body: string }}
1471
- */
1472
- function formatProblem(type, item) {
1473
- var header = type === "warning" ? "WARNING" : "ERROR";
1474
- var body = "";
1475
- if (typeof item === "string") {
1476
- body += item;
1477
- } else {
1478
- var file = item.file || "";
1479
- // eslint-disable-next-line no-nested-ternary
1480
- var moduleName = item.moduleName ? item.moduleName.indexOf("!") !== -1 ? "".concat(item.moduleName.replace(/^(\s|\S)*!/, ""), " (").concat(item.moduleName, ")") : "".concat(item.moduleName) : "";
1481
- var loc = item.loc;
1482
- header += "".concat(moduleName || file ? " in ".concat(moduleName ? "".concat(moduleName).concat(file ? " (".concat(file, ")") : "") : file).concat(loc ? " ".concat(loc) : "") : "");
1483
- body += item.message || "";
1484
- }
1485
- if (Array.isArray(item.stack)) {
1486
- item.stack.forEach(function (stack) {
1487
- if (typeof stack === "string") {
1488
- body += "\r\n".concat(stack);
1489
- }
1490
- });
1491
- }
1492
- return {
1493
- header: header,
1494
- body: body
1495
- };
1496
- }
1497
-
1498
- /**
1499
- * @typedef {Object} CreateOverlayOptions
1500
- * @property {string | null} trustedTypesPolicyName
1501
- * @property {boolean | (error: Error) => void} [catchRuntimeError]
1502
- */
1503
-
1504
- /**
1505
- *
1506
- * @param {CreateOverlayOptions} options
1507
- */
1508
- var createOverlay = function createOverlay(options) {
1509
- /** @type {HTMLIFrameElement | null | undefined} */
1510
- var iframeContainerElement;
1511
- /** @type {HTMLDivElement | null | undefined} */
1512
- var containerElement;
1513
- /** @type {HTMLDivElement | null | undefined} */
1514
- var headerElement;
1515
- /** @type {Array<(element: HTMLDivElement) => void>} */
1516
- var onLoadQueue = [];
1517
- /** @type {TrustedTypePolicy | undefined} */
1518
- var overlayTrustedTypesPolicy;
1519
-
1520
- /**
1521
- *
1522
- * @param {HTMLElement} element
1523
- * @param {CSSStyleDeclaration} style
1524
- */
1525
- function applyStyle(element, style) {
1526
- Object.keys(style).forEach(function (prop) {
1527
- element.style[prop] = style[prop];
1528
- });
1529
- }
1530
-
1531
- /**
1532
- * @param {string | null} trustedTypesPolicyName
1533
- */
1534
- function createContainer(trustedTypesPolicyName) {
1535
- // Enable Trusted Types if they are available in the current browser.
1536
- if (window.trustedTypes) {
1537
- overlayTrustedTypesPolicy = window.trustedTypes.createPolicy(trustedTypesPolicyName || "webpack-dev-server#overlay", {
1538
- createHTML: function createHTML(value) {
1539
- return value;
1540
- }
1541
- });
1542
- }
1543
- iframeContainerElement = document.createElement("iframe");
1544
- iframeContainerElement.id = "webpack-dev-server-client-overlay";
1545
- iframeContainerElement.src = "about:blank";
1546
- applyStyle(iframeContainerElement, _overlay_styles_js__WEBPACK_IMPORTED_MODULE_3__.iframeStyle);
1547
- iframeContainerElement.onload = function () {
1548
- var contentElement = /** @type {Document} */
1549
- /** @type {HTMLIFrameElement} */
1550
- iframeContainerElement.contentDocument.createElement("div");
1551
- containerElement = /** @type {Document} */
1552
- /** @type {HTMLIFrameElement} */
1553
- iframeContainerElement.contentDocument.createElement("div");
1554
- contentElement.id = "webpack-dev-server-client-overlay-div";
1555
- applyStyle(contentElement, _overlay_styles_js__WEBPACK_IMPORTED_MODULE_3__.containerStyle);
1556
- headerElement = document.createElement("div");
1557
- headerElement.innerText = "Compiled with problems:";
1558
- applyStyle(headerElement, _overlay_styles_js__WEBPACK_IMPORTED_MODULE_3__.headerStyle);
1559
- var closeButtonElement = document.createElement("button");
1560
- applyStyle(closeButtonElement, _overlay_styles_js__WEBPACK_IMPORTED_MODULE_3__.dismissButtonStyle);
1561
- closeButtonElement.innerText = "×";
1562
- closeButtonElement.ariaLabel = "Dismiss";
1563
- closeButtonElement.addEventListener("click", function () {
1564
- // eslint-disable-next-line no-use-before-define
1565
- overlayService.send({
1566
- type: "DISMISS"
1567
- });
1568
- });
1569
- contentElement.appendChild(headerElement);
1570
- contentElement.appendChild(closeButtonElement);
1571
- contentElement.appendChild(containerElement);
1572
-
1573
- /** @type {Document} */
1574
- /** @type {HTMLIFrameElement} */
1575
- iframeContainerElement.contentDocument.body.appendChild(contentElement);
1576
- onLoadQueue.forEach(function (onLoad) {
1577
- onLoad( /** @type {HTMLDivElement} */contentElement);
1578
- });
1579
- onLoadQueue = [];
1580
-
1581
- /** @type {HTMLIFrameElement} */
1582
- iframeContainerElement.onload = null;
1583
- };
1584
- document.body.appendChild(iframeContainerElement);
1585
- }
1586
-
1587
- /**
1588
- * @param {(element: HTMLDivElement) => void} callback
1589
- * @param {string | null} trustedTypesPolicyName
1590
- */
1591
- function ensureOverlayExists(callback, trustedTypesPolicyName) {
1592
- if (containerElement) {
1593
- containerElement.innerHTML = "";
1594
- // Everything is ready, call the callback right away.
1595
- callback(containerElement);
1596
- return;
1597
- }
1598
- onLoadQueue.push(callback);
1599
- if (iframeContainerElement) {
1600
- return;
1601
- }
1602
- createContainer(trustedTypesPolicyName);
1603
- }
1604
-
1605
- // Successful compilation.
1606
- function hide() {
1607
- if (!iframeContainerElement) {
1608
- return;
1609
- }
1610
-
1611
- // Clean up and reset internal state.
1612
- document.body.removeChild(iframeContainerElement);
1613
- iframeContainerElement = null;
1614
- containerElement = null;
1615
- }
1616
-
1617
- // Compilation with errors (e.g. syntax error or missing modules).
1618
- /**
1619
- * @param {string} type
1620
- * @param {Array<string | { moduleIdentifier?: string, moduleName?: string, loc?: string, message?: string }>} messages
1621
- * @param {string | null} trustedTypesPolicyName
1622
- * @param {'build' | 'runtime'} messageSource
1623
- */
1624
- function show(type, messages, trustedTypesPolicyName, messageSource) {
1625
- ensureOverlayExists(function () {
1626
- headerElement.innerText = messageSource === "runtime" ? "Uncaught runtime errors:" : "Compiled with problems:";
1627
- messages.forEach(function (message) {
1628
- var entryElement = document.createElement("div");
1629
- var msgStyle = type === "warning" ? _overlay_styles_js__WEBPACK_IMPORTED_MODULE_3__.msgStyles.warning : _overlay_styles_js__WEBPACK_IMPORTED_MODULE_3__.msgStyles.error;
1630
- applyStyle(entryElement, _objectSpread(_objectSpread({}, msgStyle), {}, {
1631
- padding: "1rem 1rem 1.5rem 1rem"
1632
- }));
1633
- var typeElement = document.createElement("div");
1634
- var _formatProblem = formatProblem(type, message),
1635
- header = _formatProblem.header,
1636
- body = _formatProblem.body;
1637
- typeElement.innerText = header;
1638
- applyStyle(typeElement, _overlay_styles_js__WEBPACK_IMPORTED_MODULE_3__.msgTypeStyle);
1639
- if (message.moduleIdentifier) {
1640
- applyStyle(typeElement, {
1641
- cursor: "pointer"
1642
- });
1643
- // element.dataset not supported in IE
1644
- typeElement.setAttribute("data-can-open", true);
1645
- typeElement.addEventListener("click", function () {
1646
- fetch("/webpack-dev-server/open-editor?fileName=".concat(message.moduleIdentifier));
1647
- });
1648
- }
1649
-
1650
- // Make it look similar to our terminal.
1651
- var text = ansi_html_community__WEBPACK_IMPORTED_MODULE_0___default()((0,html_entities__WEBPACK_IMPORTED_MODULE_4__.encode)(body));
1652
- var messageTextNode = document.createElement("div");
1653
- applyStyle(messageTextNode, _overlay_styles_js__WEBPACK_IMPORTED_MODULE_3__.msgTextStyle);
1654
- messageTextNode.innerHTML = overlayTrustedTypesPolicy ? overlayTrustedTypesPolicy.createHTML(text) : text;
1655
- entryElement.appendChild(typeElement);
1656
- entryElement.appendChild(messageTextNode);
1657
-
1658
- /** @type {HTMLDivElement} */
1659
- containerElement.appendChild(entryElement);
1660
- });
1661
- }, trustedTypesPolicyName);
1662
- }
1663
- var overlayService = (0,_overlay_state_machine_js__WEBPACK_IMPORTED_MODULE_2__["default"])({
1664
- showOverlay: function showOverlay(_ref) {
1665
- var _ref$level = _ref.level,
1666
- level = _ref$level === void 0 ? "error" : _ref$level,
1667
- messages = _ref.messages,
1668
- messageSource = _ref.messageSource;
1669
- return show(level, messages, options.trustedTypesPolicyName, messageSource);
1670
- },
1671
- hideOverlay: hide
1672
- });
1673
- if (options.catchRuntimeError) {
1674
- /**
1675
- * @param {Error | undefined} error
1676
- * @param {string} fallbackMessage
1677
- */
1678
- var handleError = function handleError(error, fallbackMessage) {
1679
- var errorObject = error instanceof Error ? error : new Error(error || fallbackMessage);
1680
- var shouldDisplay = typeof options.catchRuntimeError === "function" ? options.catchRuntimeError(errorObject) : true;
1681
- if (shouldDisplay) {
1682
- overlayService.send({
1683
- type: "RUNTIME_ERROR",
1684
- messages: [{
1685
- message: errorObject.message,
1686
- stack: (0,_overlay_runtime_error_js__WEBPACK_IMPORTED_MODULE_1__.parseErrorToStacks)(errorObject)
1687
- }]
1688
- });
1689
- }
1690
- };
1691
- (0,_overlay_runtime_error_js__WEBPACK_IMPORTED_MODULE_1__.listenToRuntimeError)(function (errorEvent) {
1692
- // error property may be empty in older browser like IE
1693
- var error = errorEvent.error,
1694
- message = errorEvent.message;
1695
- if (!error && !message) {
1696
- return;
1697
- }
1698
- handleError(error, message);
1699
- });
1700
- (0,_overlay_runtime_error_js__WEBPACK_IMPORTED_MODULE_1__.listenToUnhandledRejection)(function (promiseRejectionEvent) {
1701
- var reason = promiseRejectionEvent.reason;
1702
- handleError(reason, "Unknown promise rejection reason");
1703
- });
1704
- }
1705
- return overlayService;
1706
- };
1707
-
1708
-
1709
- /***/ }),
1710
-
1711
- /***/ "./node_modules/webpack-dev-server/client/overlay/fsm.js":
1712
- /*!***************************************************************!*\
1713
- !*** ./node_modules/webpack-dev-server/client/overlay/fsm.js ***!
1714
- \***************************************************************/
1715
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1716
-
1717
- "use strict";
1718
- __webpack_require__.r(__webpack_exports__);
1719
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1720
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1721
- /* harmony export */ });
1722
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1723
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1724
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1725
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
1726
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1727
- /**
1728
- * @typedef {Object} StateDefinitions
1729
- * @property {{[event: string]: { target: string; actions?: Array<string> }}} [on]
1730
- */
1731
-
1732
- /**
1733
- * @typedef {Object} Options
1734
- * @property {{[state: string]: StateDefinitions}} states
1735
- * @property {object} context;
1736
- * @property {string} initial
1737
- */
1738
-
1739
- /**
1740
- * @typedef {Object} Implementation
1741
- * @property {{[actionName: string]: (ctx: object, event: any) => object}} actions
1742
- */
1743
-
1744
- /**
1745
- * A simplified `createMachine` from `@xstate/fsm` with the following differences:
1746
- *
1747
- * - the returned machine is technically a "service". No `interpret(machine).start()` is needed.
1748
- * - the state definition only support `on` and target must be declared with { target: 'nextState', actions: [] } explicitly.
1749
- * - event passed to `send` must be an object with `type` property.
1750
- * - actions implementation will be [assign action](https://xstate.js.org/docs/guides/context.html#assign-action) if you return any value.
1751
- * Do not return anything if you just want to invoke side effect.
1752
- *
1753
- * The goal of this custom function is to avoid installing the entire `'xstate/fsm'` package, while enabling modeling using
1754
- * state machine. You can copy the first parameter into the editor at https://stately.ai/viz to visualize the state machine.
1755
- *
1756
- * @param {Options} options
1757
- * @param {Implementation} implementation
1758
- */
1759
- function createMachine(_ref, _ref2) {
1760
- var states = _ref.states,
1761
- context = _ref.context,
1762
- initial = _ref.initial;
1763
- var actions = _ref2.actions;
1764
- var currentState = initial;
1765
- var currentContext = context;
1766
- return {
1767
- send: function send(event) {
1768
- var currentStateOn = states[currentState].on;
1769
- var transitionConfig = currentStateOn && currentStateOn[event.type];
1770
- if (transitionConfig) {
1771
- currentState = transitionConfig.target;
1772
- if (transitionConfig.actions) {
1773
- transitionConfig.actions.forEach(function (actName) {
1774
- var actionImpl = actions[actName];
1775
- var nextContextValue = actionImpl && actionImpl(currentContext, event);
1776
- if (nextContextValue) {
1777
- currentContext = _objectSpread(_objectSpread({}, currentContext), nextContextValue);
1778
- }
1779
- });
1780
- }
1781
- }
1782
- }
1783
- };
1784
- }
1785
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (createMachine);
1786
-
1787
- /***/ }),
1788
-
1789
- /***/ "./node_modules/webpack-dev-server/client/overlay/runtime-error.js":
1790
- /*!*************************************************************************!*\
1791
- !*** ./node_modules/webpack-dev-server/client/overlay/runtime-error.js ***!
1792
- \*************************************************************************/
1793
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1794
-
1795
- "use strict";
1796
- __webpack_require__.r(__webpack_exports__);
1797
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1798
- /* harmony export */ listenToRuntimeError: () => (/* binding */ listenToRuntimeError),
1799
- /* harmony export */ listenToUnhandledRejection: () => (/* binding */ listenToUnhandledRejection),
1800
- /* harmony export */ parseErrorToStacks: () => (/* binding */ parseErrorToStacks)
1801
- /* harmony export */ });
1802
- /**
1803
- *
1804
- * @param {Error} error
1805
- */
1806
- function parseErrorToStacks(error) {
1807
- if (!error || !(error instanceof Error)) {
1808
- throw new Error("parseErrorToStacks expects Error object");
1809
- }
1810
- if (typeof error.stack === "string") {
1811
- return error.stack.split("\n").filter(function (stack) {
1812
- return stack !== "Error: ".concat(error.message);
1813
- });
1814
- }
1815
- }
1816
-
1817
- /**
1818
- * @callback ErrorCallback
1819
- * @param {ErrorEvent} error
1820
- * @returns {void}
1821
- */
1822
-
1823
- /**
1824
- * @param {ErrorCallback} callback
1825
- */
1826
- function listenToRuntimeError(callback) {
1827
- window.addEventListener("error", callback);
1828
- return function cleanup() {
1829
- window.removeEventListener("error", callback);
1830
- };
1831
- }
1832
-
1833
- /**
1834
- * @callback UnhandledRejectionCallback
1835
- * @param {PromiseRejectionEvent} rejectionEvent
1836
- * @returns {void}
1837
- */
1838
-
1839
- /**
1840
- * @param {UnhandledRejectionCallback} callback
1841
- */
1842
- function listenToUnhandledRejection(callback) {
1843
- window.addEventListener("unhandledrejection", callback);
1844
- return function cleanup() {
1845
- window.removeEventListener("unhandledrejection", callback);
1846
- };
1847
- }
1848
-
1849
-
1850
- /***/ }),
1851
-
1852
- /***/ "./node_modules/webpack-dev-server/client/overlay/state-machine.js":
1853
- /*!*************************************************************************!*\
1854
- !*** ./node_modules/webpack-dev-server/client/overlay/state-machine.js ***!
1855
- \*************************************************************************/
1856
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1857
-
1858
- "use strict";
1859
- __webpack_require__.r(__webpack_exports__);
1860
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1861
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1862
- /* harmony export */ });
1863
- /* harmony import */ var _fsm_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./fsm.js */ "./node_modules/webpack-dev-server/client/overlay/fsm.js");
1864
-
1865
-
1866
- /**
1867
- * @typedef {Object} ShowOverlayData
1868
- * @property {'warning' | 'error'} level
1869
- * @property {Array<string | { moduleIdentifier?: string, moduleName?: string, loc?: string, message?: string }>} messages
1870
- * @property {'build' | 'runtime'} messageSource
1871
- */
1872
-
1873
- /**
1874
- * @typedef {Object} CreateOverlayMachineOptions
1875
- * @property {(data: ShowOverlayData) => void} showOverlay
1876
- * @property {() => void} hideOverlay
1877
- */
1878
-
1879
- /**
1880
- * @param {CreateOverlayMachineOptions} options
1881
- */
1882
- var createOverlayMachine = function createOverlayMachine(options) {
1883
- var hideOverlay = options.hideOverlay,
1884
- showOverlay = options.showOverlay;
1885
- var overlayMachine = (0,_fsm_js__WEBPACK_IMPORTED_MODULE_0__["default"])({
1886
- initial: "hidden",
1887
- context: {
1888
- level: "error",
1889
- messages: [],
1890
- messageSource: "build"
1891
- },
1892
- states: {
1893
- hidden: {
1894
- on: {
1895
- BUILD_ERROR: {
1896
- target: "displayBuildError",
1897
- actions: ["setMessages", "showOverlay"]
1898
- },
1899
- RUNTIME_ERROR: {
1900
- target: "displayRuntimeError",
1901
- actions: ["setMessages", "showOverlay"]
1902
- }
1903
- }
1904
- },
1905
- displayBuildError: {
1906
- on: {
1907
- DISMISS: {
1908
- target: "hidden",
1909
- actions: ["dismissMessages", "hideOverlay"]
1910
- },
1911
- BUILD_ERROR: {
1912
- target: "displayBuildError",
1913
- actions: ["appendMessages", "showOverlay"]
1914
- }
1915
- }
1916
- },
1917
- displayRuntimeError: {
1918
- on: {
1919
- DISMISS: {
1920
- target: "hidden",
1921
- actions: ["dismissMessages", "hideOverlay"]
1922
- },
1923
- RUNTIME_ERROR: {
1924
- target: "displayRuntimeError",
1925
- actions: ["appendMessages", "showOverlay"]
1926
- },
1927
- BUILD_ERROR: {
1928
- target: "displayBuildError",
1929
- actions: ["setMessages", "showOverlay"]
1930
- }
1931
- }
1932
- }
1933
- }
1934
- }, {
1935
- actions: {
1936
- dismissMessages: function dismissMessages() {
1937
- return {
1938
- messages: [],
1939
- level: "error",
1940
- messageSource: "build"
1941
- };
1942
- },
1943
- appendMessages: function appendMessages(context, event) {
1944
- return {
1945
- messages: context.messages.concat(event.messages),
1946
- level: event.level || context.level,
1947
- messageSource: event.type === "RUNTIME_ERROR" ? "runtime" : "build"
1948
- };
1949
- },
1950
- setMessages: function setMessages(context, event) {
1951
- return {
1952
- messages: event.messages,
1953
- level: event.level || context.level,
1954
- messageSource: event.type === "RUNTIME_ERROR" ? "runtime" : "build"
1955
- };
1956
- },
1957
- hideOverlay: hideOverlay,
1958
- showOverlay: showOverlay
1959
- }
1960
- });
1961
- return overlayMachine;
1962
- };
1963
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (createOverlayMachine);
1964
-
1965
- /***/ }),
1966
-
1967
- /***/ "./node_modules/webpack-dev-server/client/overlay/styles.js":
1968
- /*!******************************************************************!*\
1969
- !*** ./node_modules/webpack-dev-server/client/overlay/styles.js ***!
1970
- \******************************************************************/
1971
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1972
-
1973
- "use strict";
1974
- __webpack_require__.r(__webpack_exports__);
1975
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1976
- /* harmony export */ containerStyle: () => (/* binding */ containerStyle),
1977
- /* harmony export */ dismissButtonStyle: () => (/* binding */ dismissButtonStyle),
1978
- /* harmony export */ headerStyle: () => (/* binding */ headerStyle),
1979
- /* harmony export */ iframeStyle: () => (/* binding */ iframeStyle),
1980
- /* harmony export */ msgStyles: () => (/* binding */ msgStyles),
1981
- /* harmony export */ msgTextStyle: () => (/* binding */ msgTextStyle),
1982
- /* harmony export */ msgTypeStyle: () => (/* binding */ msgTypeStyle)
1983
- /* harmony export */ });
1984
- // styles are inspired by `react-error-overlay`
1985
-
1986
- var msgStyles = {
1987
- error: {
1988
- backgroundColor: "rgba(206, 17, 38, 0.1)",
1989
- color: "#fccfcf"
1990
- },
1991
- warning: {
1992
- backgroundColor: "rgba(251, 245, 180, 0.1)",
1993
- color: "#fbf5b4"
1994
- }
1995
- };
1996
- var iframeStyle = {
1997
- position: "fixed",
1998
- top: 0,
1999
- left: 0,
2000
- right: 0,
2001
- bottom: 0,
2002
- width: "100vw",
2003
- height: "100vh",
2004
- border: "none",
2005
- "z-index": 9999999999
2006
- };
2007
- var containerStyle = {
2008
- position: "fixed",
2009
- boxSizing: "border-box",
2010
- left: 0,
2011
- top: 0,
2012
- right: 0,
2013
- bottom: 0,
2014
- width: "100vw",
2015
- height: "100vh",
2016
- fontSize: "large",
2017
- padding: "2rem 2rem 4rem 2rem",
2018
- lineHeight: "1.2",
2019
- whiteSpace: "pre-wrap",
2020
- overflow: "auto",
2021
- backgroundColor: "rgba(0, 0, 0, 0.9)",
2022
- color: "white"
2023
- };
2024
- var headerStyle = {
2025
- color: "#e83b46",
2026
- fontSize: "2em",
2027
- whiteSpace: "pre-wrap",
2028
- fontFamily: "sans-serif",
2029
- margin: "0 2rem 2rem 0",
2030
- flex: "0 0 auto",
2031
- maxHeight: "50%",
2032
- overflow: "auto"
2033
- };
2034
- var dismissButtonStyle = {
2035
- color: "#ffffff",
2036
- lineHeight: "1rem",
2037
- fontSize: "1.5rem",
2038
- padding: "1rem",
2039
- cursor: "pointer",
2040
- position: "absolute",
2041
- right: 0,
2042
- top: 0,
2043
- backgroundColor: "transparent",
2044
- border: "none"
2045
- };
2046
- var msgTypeStyle = {
2047
- color: "#e83b46",
2048
- fontSize: "1.2em",
2049
- marginBottom: "1rem",
2050
- fontFamily: "sans-serif"
2051
- };
2052
- var msgTextStyle = {
2053
- lineHeight: "1.5",
2054
- fontSize: "1rem",
2055
- fontFamily: "Menlo, Consolas, monospace"
2056
- };
2057
-
2058
-
2059
- /***/ }),
2060
-
2061
- /***/ "./node_modules/webpack-dev-server/client/socket.js":
2062
- /*!**********************************************************!*\
2063
- !*** ./node_modules/webpack-dev-server/client/socket.js ***!
2064
- \**********************************************************/
2065
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2066
-
2067
- "use strict";
2068
- __webpack_require__.r(__webpack_exports__);
2069
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2070
- /* harmony export */ client: () => (/* binding */ client),
2071
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2072
- /* harmony export */ });
2073
- /* harmony import */ var _clients_WebSocketClient_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./clients/WebSocketClient.js */ "./node_modules/webpack-dev-server/client/clients/WebSocketClient.js");
2074
- /* harmony import */ var _utils_log_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/log.js */ "./node_modules/webpack-dev-server/client/utils/log.js");
2075
- /* provided dependency */ var __webpack_dev_server_client__ = __webpack_require__(/*! ./node_modules/webpack-dev-server/client/clients/WebSocketClient.js */ "./node_modules/webpack-dev-server/client/clients/WebSocketClient.js");
2076
- /* global __webpack_dev_server_client__ */
2077
-
2078
-
2079
-
2080
-
2081
- // this WebsocketClient is here as a default fallback, in case the client is not injected
2082
- /* eslint-disable camelcase */
2083
- var Client =
2084
- // eslint-disable-next-line no-nested-ternary
2085
- typeof __webpack_dev_server_client__ !== "undefined" ? typeof __webpack_dev_server_client__.default !== "undefined" ? __webpack_dev_server_client__.default : __webpack_dev_server_client__ : _clients_WebSocketClient_js__WEBPACK_IMPORTED_MODULE_0__["default"];
2086
- /* eslint-enable camelcase */
2087
-
2088
- var retries = 0;
2089
- var maxRetries = 10;
2090
-
2091
- // Initialized client is exported so external consumers can utilize the same instance
2092
- // It is mutable to enforce singleton
2093
- // eslint-disable-next-line import/no-mutable-exports
2094
- var client = null;
2095
-
2096
- /**
2097
- * @param {string} url
2098
- * @param {{ [handler: string]: (data?: any, params?: any) => any }} handlers
2099
- * @param {number} [reconnect]
2100
- */
2101
- var socket = function initSocket(url, handlers, reconnect) {
2102
- client = new Client(url);
2103
- client.onOpen(function () {
2104
- retries = 0;
2105
- if (typeof reconnect !== "undefined") {
2106
- maxRetries = reconnect;
2107
- }
2108
- });
2109
- client.onClose(function () {
2110
- if (retries === 0) {
2111
- handlers.close();
2112
- }
2113
-
2114
- // Try to reconnect.
2115
- client = null;
2116
-
2117
- // After 10 retries stop trying, to prevent logspam.
2118
- if (retries < maxRetries) {
2119
- // Exponentially increase timeout to reconnect.
2120
- // Respectfully copied from the package `got`.
2121
- // eslint-disable-next-line no-restricted-properties
2122
- var retryInMs = 1000 * Math.pow(2, retries) + Math.random() * 100;
2123
- retries += 1;
2124
- _utils_log_js__WEBPACK_IMPORTED_MODULE_1__.log.info("Trying to reconnect...");
2125
- setTimeout(function () {
2126
- socket(url, handlers, reconnect);
2127
- }, retryInMs);
2128
- }
2129
- });
2130
- client.onMessage(
2131
- /**
2132
- * @param {any} data
2133
- */
2134
- function (data) {
2135
- var message = JSON.parse(data);
2136
- if (handlers[message.type]) {
2137
- handlers[message.type](message.data, message.params);
2138
- }
2139
- });
2140
- };
2141
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (socket);
2142
-
2143
- /***/ }),
2144
-
2145
- /***/ "./node_modules/webpack-dev-server/client/utils/createSocketURL.js":
2146
- /*!*************************************************************************!*\
2147
- !*** ./node_modules/webpack-dev-server/client/utils/createSocketURL.js ***!
2148
- \*************************************************************************/
2149
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2150
-
2151
- "use strict";
2152
- __webpack_require__.r(__webpack_exports__);
2153
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2154
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2155
- /* harmony export */ });
2156
- /**
2157
- * @param {{ protocol?: string, auth?: string, hostname?: string, port?: string, pathname?: string, search?: string, hash?: string, slashes?: boolean }} objURL
2158
- * @returns {string}
2159
- */
2160
- function format(objURL) {
2161
- var protocol = objURL.protocol || "";
2162
- if (protocol && protocol.substr(-1) !== ":") {
2163
- protocol += ":";
2164
- }
2165
- var auth = objURL.auth || "";
2166
- if (auth) {
2167
- auth = encodeURIComponent(auth);
2168
- auth = auth.replace(/%3A/i, ":");
2169
- auth += "@";
2170
- }
2171
- var host = "";
2172
- if (objURL.hostname) {
2173
- host = auth + (objURL.hostname.indexOf(":") === -1 ? objURL.hostname : "[".concat(objURL.hostname, "]"));
2174
- if (objURL.port) {
2175
- host += ":".concat(objURL.port);
2176
- }
2177
- }
2178
- var pathname = objURL.pathname || "";
2179
- if (objURL.slashes) {
2180
- host = "//".concat(host || "");
2181
- if (pathname && pathname.charAt(0) !== "/") {
2182
- pathname = "/".concat(pathname);
2183
- }
2184
- } else if (!host) {
2185
- host = "";
2186
- }
2187
- var search = objURL.search || "";
2188
- if (search && search.charAt(0) !== "?") {
2189
- search = "?".concat(search);
2190
- }
2191
- var hash = objURL.hash || "";
2192
- if (hash && hash.charAt(0) !== "#") {
2193
- hash = "#".concat(hash);
2194
- }
2195
- pathname = pathname.replace(/[?#]/g,
2196
- /**
2197
- * @param {string} match
2198
- * @returns {string}
2199
- */
2200
- function (match) {
2201
- return encodeURIComponent(match);
2202
- });
2203
- search = search.replace("#", "%23");
2204
- return "".concat(protocol).concat(host).concat(pathname).concat(search).concat(hash);
2205
- }
2206
-
2207
- /**
2208
- * @param {URL & { fromCurrentScript?: boolean }} parsedURL
2209
- * @returns {string}
2210
- */
2211
- function createSocketURL(parsedURL) {
2212
- var hostname = parsedURL.hostname;
2213
-
2214
- // Node.js module parses it as `::`
2215
- // `new URL(urlString, [baseURLString])` parses it as '[::]'
2216
- var isInAddrAny = hostname === "0.0.0.0" || hostname === "::" || hostname === "[::]";
2217
-
2218
- // why do we need this check?
2219
- // hostname n/a for file protocol (example, when using electron, ionic)
2220
- // see: https://github.com/webpack/webpack-dev-server/pull/384
2221
- if (isInAddrAny && self.location.hostname && self.location.protocol.indexOf("http") === 0) {
2222
- hostname = self.location.hostname;
2223
- }
2224
- var socketURLProtocol = parsedURL.protocol || self.location.protocol;
2225
-
2226
- // When https is used in the app, secure web sockets are always necessary because the browser doesn't accept non-secure web sockets.
2227
- if (socketURLProtocol === "auto:" || hostname && isInAddrAny && self.location.protocol === "https:") {
2228
- socketURLProtocol = self.location.protocol;
2229
- }
2230
- socketURLProtocol = socketURLProtocol.replace(/^(?:http|.+-extension|file)/i, "ws");
2231
- var socketURLAuth = "";
2232
-
2233
- // `new URL(urlString, [baseURLstring])` doesn't have `auth` property
2234
- // Parse authentication credentials in case we need them
2235
- if (parsedURL.username) {
2236
- socketURLAuth = parsedURL.username;
2237
-
2238
- // Since HTTP basic authentication does not allow empty username,
2239
- // we only include password if the username is not empty.
2240
- if (parsedURL.password) {
2241
- // Result: <username>:<password>
2242
- socketURLAuth = socketURLAuth.concat(":", parsedURL.password);
2243
- }
2244
- }
2245
-
2246
- // In case the host is a raw IPv6 address, it can be enclosed in
2247
- // the brackets as the brackets are needed in the final URL string.
2248
- // Need to remove those as url.format blindly adds its own set of brackets
2249
- // if the host string contains colons. That would lead to non-working
2250
- // double brackets (e.g. [[::]]) host
2251
- //
2252
- // All of these web socket url params are optionally passed in through resourceQuery,
2253
- // so we need to fall back to the default if they are not provided
2254
- var socketURLHostname = (hostname || self.location.hostname || "localhost").replace(/^\[(.*)\]$/, "$1");
2255
- var socketURLPort = parsedURL.port;
2256
- if (!socketURLPort || socketURLPort === "0") {
2257
- socketURLPort = self.location.port;
2258
- }
2259
-
2260
- // If path is provided it'll be passed in via the resourceQuery as a
2261
- // query param so it has to be parsed out of the querystring in order for the
2262
- // client to open the socket to the correct location.
2263
- var socketURLPathname = "/ws";
2264
- if (parsedURL.pathname && !parsedURL.fromCurrentScript) {
2265
- socketURLPathname = parsedURL.pathname;
2266
- }
2267
- return format({
2268
- protocol: socketURLProtocol,
2269
- auth: socketURLAuth,
2270
- hostname: socketURLHostname,
2271
- port: socketURLPort,
2272
- pathname: socketURLPathname,
2273
- slashes: true
2274
- });
2275
- }
2276
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (createSocketURL);
2277
-
2278
- /***/ }),
2279
-
2280
- /***/ "./node_modules/webpack-dev-server/client/utils/getCurrentScriptSource.js":
2281
- /*!********************************************************************************!*\
2282
- !*** ./node_modules/webpack-dev-server/client/utils/getCurrentScriptSource.js ***!
2283
- \********************************************************************************/
2284
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2285
-
2286
- "use strict";
2287
- __webpack_require__.r(__webpack_exports__);
2288
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2289
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2290
- /* harmony export */ });
2291
- /**
2292
- * @returns {string}
2293
- */
2294
- function getCurrentScriptSource() {
2295
- // `document.currentScript` is the most accurate way to find the current script,
2296
- // but is not supported in all browsers.
2297
- if (document.currentScript) {
2298
- return document.currentScript.getAttribute("src");
2299
- }
2300
-
2301
- // Fallback to getting all scripts running in the document.
2302
- var scriptElements = document.scripts || [];
2303
- var scriptElementsWithSrc = Array.prototype.filter.call(scriptElements, function (element) {
2304
- return element.getAttribute("src");
2305
- });
2306
- if (scriptElementsWithSrc.length > 0) {
2307
- var currentScript = scriptElementsWithSrc[scriptElementsWithSrc.length - 1];
2308
- return currentScript.getAttribute("src");
2309
- }
2310
-
2311
- // Fail as there was no script to use.
2312
- throw new Error("[webpack-dev-server] Failed to get current script source.");
2313
- }
2314
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getCurrentScriptSource);
2315
-
2316
- /***/ }),
2317
-
2318
- /***/ "./node_modules/webpack-dev-server/client/utils/log.js":
2319
- /*!*************************************************************!*\
2320
- !*** ./node_modules/webpack-dev-server/client/utils/log.js ***!
2321
- \*************************************************************/
2322
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2323
-
2324
- "use strict";
2325
- __webpack_require__.r(__webpack_exports__);
2326
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2327
- /* harmony export */ log: () => (/* binding */ log),
2328
- /* harmony export */ logEnabledFeatures: () => (/* binding */ logEnabledFeatures),
2329
- /* harmony export */ setLogLevel: () => (/* binding */ setLogLevel)
2330
- /* harmony export */ });
2331
- /* harmony import */ var _modules_logger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/logger/index.js */ "./node_modules/webpack-dev-server/client/modules/logger/index.js");
2332
- /* harmony import */ var _modules_logger_index_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_modules_logger_index_js__WEBPACK_IMPORTED_MODULE_0__);
2333
-
2334
- var name = "webpack-dev-server";
2335
- // default level is set on the client side, so it does not need
2336
- // to be set by the CLI or API
2337
- var defaultLevel = "info";
2338
-
2339
- // options new options, merge with old options
2340
- /**
2341
- * @param {false | true | "none" | "error" | "warn" | "info" | "log" | "verbose"} level
2342
- * @returns {void}
2343
- */
2344
- function setLogLevel(level) {
2345
- _modules_logger_index_js__WEBPACK_IMPORTED_MODULE_0___default().configureDefaultLogger({
2346
- level: level
2347
- });
2348
- }
2349
- setLogLevel(defaultLevel);
2350
- var log = _modules_logger_index_js__WEBPACK_IMPORTED_MODULE_0___default().getLogger(name);
2351
- var logEnabledFeatures = function logEnabledFeatures(features) {
2352
- var enabledFeatures = Object.keys(features);
2353
- if (!features || enabledFeatures.length === 0) {
2354
- return;
2355
- }
2356
- var logString = "Server started:";
2357
-
2358
- // Server started: Hot Module Replacement enabled, Live Reloading enabled, Overlay disabled.
2359
- for (var i = 0; i < enabledFeatures.length; i++) {
2360
- var key = enabledFeatures[i];
2361
- logString += " ".concat(key, " ").concat(features[key] ? "enabled" : "disabled", ",");
2362
- }
2363
- // replace last comma with a period
2364
- logString = logString.slice(0, -1).concat(".");
2365
- log.info(logString);
2366
- };
2367
-
2368
-
2369
- /***/ }),
2370
-
2371
- /***/ "./node_modules/webpack-dev-server/client/utils/parseURL.js":
2372
- /*!******************************************************************!*\
2373
- !*** ./node_modules/webpack-dev-server/client/utils/parseURL.js ***!
2374
- \******************************************************************/
2375
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2376
-
2377
- "use strict";
2378
- __webpack_require__.r(__webpack_exports__);
2379
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2380
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2381
- /* harmony export */ });
2382
- /* harmony import */ var _getCurrentScriptSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getCurrentScriptSource.js */ "./node_modules/webpack-dev-server/client/utils/getCurrentScriptSource.js");
2383
-
2384
-
2385
- /**
2386
- * @param {string} resourceQuery
2387
- * @returns {{ [key: string]: string | boolean }}
2388
- */
2389
- function parseURL(resourceQuery) {
2390
- /** @type {{ [key: string]: string }} */
2391
- var options = {};
2392
- if (typeof resourceQuery === "string" && resourceQuery !== "") {
2393
- var searchParams = resourceQuery.slice(1).split("&");
2394
- for (var i = 0; i < searchParams.length; i++) {
2395
- var pair = searchParams[i].split("=");
2396
- options[pair[0]] = decodeURIComponent(pair[1]);
2397
- }
2398
- } else {
2399
- // Else, get the url from the <script> this file was called with.
2400
- var scriptSource = (0,_getCurrentScriptSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])();
2401
- var scriptSourceURL;
2402
- try {
2403
- // The placeholder `baseURL` with `window.location.href`,
2404
- // is to allow parsing of path-relative or protocol-relative URLs,
2405
- // and will have no effect if `scriptSource` is a fully valid URL.
2406
- scriptSourceURL = new URL(scriptSource, self.location.href);
2407
- } catch (error) {
2408
- // URL parsing failed, do nothing.
2409
- // We will still proceed to see if we can recover using `resourceQuery`
2410
- }
2411
- if (scriptSourceURL) {
2412
- options = scriptSourceURL;
2413
- options.fromCurrentScript = true;
2414
- }
2415
- }
2416
- return options;
2417
- }
2418
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (parseURL);
2419
-
2420
- /***/ }),
2421
-
2422
- /***/ "./node_modules/webpack-dev-server/client/utils/reloadApp.js":
2423
- /*!*******************************************************************!*\
2424
- !*** ./node_modules/webpack-dev-server/client/utils/reloadApp.js ***!
2425
- \*******************************************************************/
2426
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2427
-
2428
- "use strict";
2429
- __webpack_require__.r(__webpack_exports__);
2430
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2431
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2432
- /* harmony export */ });
2433
- /* harmony import */ var webpack_hot_emitter_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! webpack/hot/emitter.js */ "./node_modules/webpack/hot/emitter.js");
2434
- /* harmony import */ var webpack_hot_emitter_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(webpack_hot_emitter_js__WEBPACK_IMPORTED_MODULE_0__);
2435
- /* harmony import */ var _log_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./log.js */ "./node_modules/webpack-dev-server/client/utils/log.js");
2436
-
2437
-
2438
-
2439
- /** @typedef {import("../index").Options} Options
2440
- /** @typedef {import("../index").Status} Status
2441
-
2442
- /**
2443
- * @param {Options} options
2444
- * @param {Status} status
2445
- */
2446
- function reloadApp(_ref, status) {
2447
- var hot = _ref.hot,
2448
- liveReload = _ref.liveReload;
2449
- if (status.isUnloading) {
2450
- return;
2451
- }
2452
- var currentHash = status.currentHash,
2453
- previousHash = status.previousHash;
2454
- var isInitial = currentHash.indexOf( /** @type {string} */previousHash) >= 0;
2455
- if (isInitial) {
2456
- return;
2457
- }
2458
-
2459
- /**
2460
- * @param {Window} rootWindow
2461
- * @param {number} intervalId
2462
- */
2463
- function applyReload(rootWindow, intervalId) {
2464
- clearInterval(intervalId);
2465
- _log_js__WEBPACK_IMPORTED_MODULE_1__.log.info("App updated. Reloading...");
2466
- rootWindow.location.reload();
2467
- }
2468
- var search = self.location.search.toLowerCase();
2469
- var allowToHot = search.indexOf("webpack-dev-server-hot=false") === -1;
2470
- var allowToLiveReload = search.indexOf("webpack-dev-server-live-reload=false") === -1;
2471
- if (hot && allowToHot) {
2472
- _log_js__WEBPACK_IMPORTED_MODULE_1__.log.info("App hot update...");
2473
- webpack_hot_emitter_js__WEBPACK_IMPORTED_MODULE_0___default().emit("webpackHotUpdate", status.currentHash);
2474
- if (typeof self !== "undefined" && self.window) {
2475
- // broadcast update to window
2476
- self.postMessage("webpackHotUpdate".concat(status.currentHash), "*");
2477
- }
2478
- }
2479
- // allow refreshing the page only if liveReload isn't disabled
2480
- else if (liveReload && allowToLiveReload) {
2481
- var rootWindow = self;
2482
-
2483
- // use parent window for reload (in case we're in an iframe with no valid src)
2484
- var intervalId = self.setInterval(function () {
2485
- if (rootWindow.location.protocol !== "about:") {
2486
- // reload immediately if protocol is valid
2487
- applyReload(rootWindow, intervalId);
2488
- } else {
2489
- rootWindow = rootWindow.parent;
2490
- if (rootWindow.parent === rootWindow) {
2491
- // if parent equals current window we've reached the root which would continue forever, so trigger a reload anyways
2492
- applyReload(rootWindow, intervalId);
2493
- }
2494
- }
2495
- });
2496
- }
2497
- }
2498
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (reloadApp);
2499
-
2500
- /***/ }),
2501
-
2502
- /***/ "./node_modules/webpack-dev-server/client/utils/sendMessage.js":
2503
- /*!*********************************************************************!*\
2504
- !*** ./node_modules/webpack-dev-server/client/utils/sendMessage.js ***!
2505
- \*********************************************************************/
2506
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2507
-
2508
- "use strict";
2509
- __webpack_require__.r(__webpack_exports__);
2510
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2511
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2512
- /* harmony export */ });
2513
- /* global __resourceQuery WorkerGlobalScope */
2514
-
2515
- // Send messages to the outside, so plugins can consume it.
2516
- /**
2517
- * @param {string} type
2518
- * @param {any} [data]
2519
- */
2520
- function sendMsg(type, data) {
2521
- if (typeof self !== "undefined" && (typeof WorkerGlobalScope === "undefined" || !(self instanceof WorkerGlobalScope))) {
2522
- self.postMessage({
2523
- type: "webpack".concat(type),
2524
- data: data
2525
- }, "*");
2526
- }
2527
- }
2528
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (sendMsg);
2529
-
2530
- /***/ }),
2531
-
2532
- /***/ "./node_modules/webpack-dev-server/client/utils/stripAnsi.js":
2533
- /*!*******************************************************************!*\
2534
- !*** ./node_modules/webpack-dev-server/client/utils/stripAnsi.js ***!
2535
- \*******************************************************************/
2536
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2537
-
2538
- "use strict";
2539
- __webpack_require__.r(__webpack_exports__);
2540
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2541
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2542
- /* harmony export */ });
2543
- var ansiRegex = new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"), "g");
2544
-
2545
- /**
2546
- *
2547
- * Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string.
2548
- * Adapted from code originally released by Sindre Sorhus
2549
- * Licensed the MIT License
2550
- *
2551
- * @param {string} string
2552
- * @return {string}
2553
- */
2554
- function stripAnsi(string) {
2555
- if (typeof string !== "string") {
2556
- throw new TypeError("Expected a `string`, got `".concat(typeof string, "`"));
2557
- }
2558
- return string.replace(ansiRegex, "");
2559
- }
2560
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stripAnsi);
2561
-
2562
- /***/ }),
2563
-
2564
- /***/ "./node_modules/webpack/hot/dev-server.js":
2565
- /*!************************************************!*\
2566
- !*** ./node_modules/webpack/hot/dev-server.js ***!
2567
- \************************************************/
2568
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2569
-
2570
- /*
2571
- MIT License http://www.opensource.org/licenses/mit-license.php
2572
- Author Tobias Koppers @sokra
2573
- */
2574
- /* globals __webpack_hash__ */
2575
- if (true) {
2576
- /** @type {undefined|string} */
2577
- var lastHash;
2578
- var upToDate = function upToDate() {
2579
- return /** @type {string} */ (lastHash).indexOf(__webpack_require__.h()) >= 0;
2580
- };
2581
- var log = __webpack_require__(/*! ./log */ "./node_modules/webpack/hot/log.js");
2582
- var check = function check() {
2583
- module.hot
2584
- .check(true)
2585
- .then(function (updatedModules) {
2586
- if (!updatedModules) {
2587
- log(
2588
- "warning",
2589
- "[HMR] Cannot find update. " +
2590
- (typeof window !== "undefined"
2591
- ? "Need to do a full reload!"
2592
- : "Please reload manually!")
2593
- );
2594
- log(
2595
- "warning",
2596
- "[HMR] (Probably because of restarting the webpack-dev-server)"
2597
- );
2598
- if (typeof window !== "undefined") {
2599
- window.location.reload();
2600
- }
2601
- return;
2602
- }
2603
-
2604
- if (!upToDate()) {
2605
- check();
2606
- }
2607
-
2608
- __webpack_require__(/*! ./log-apply-result */ "./node_modules/webpack/hot/log-apply-result.js")(updatedModules, updatedModules);
2609
-
2610
- if (upToDate()) {
2611
- log("info", "[HMR] App is up to date.");
2612
- }
2613
- })
2614
- .catch(function (err) {
2615
- var status = module.hot.status();
2616
- if (["abort", "fail"].indexOf(status) >= 0) {
2617
- log(
2618
- "warning",
2619
- "[HMR] Cannot apply update. " +
2620
- (typeof window !== "undefined"
2621
- ? "Need to do a full reload!"
2622
- : "Please reload manually!")
2623
- );
2624
- log("warning", "[HMR] " + log.formatError(err));
2625
- if (typeof window !== "undefined") {
2626
- window.location.reload();
2627
- }
2628
- } else {
2629
- log("warning", "[HMR] Update failed: " + log.formatError(err));
2630
- }
2631
- });
2632
- };
2633
- var hotEmitter = __webpack_require__(/*! ./emitter */ "./node_modules/webpack/hot/emitter.js");
2634
- hotEmitter.on("webpackHotUpdate", function (currentHash) {
2635
- lastHash = currentHash;
2636
- if (!upToDate() && module.hot.status() === "idle") {
2637
- log("info", "[HMR] Checking for updates on the server...");
2638
- check();
2639
- }
2640
- });
2641
- log("info", "[HMR] Waiting for update signal from WDS...");
2642
- } else {}
2643
-
2644
-
2645
- /***/ }),
2646
-
2647
- /***/ "./node_modules/webpack/hot/emitter.js":
2648
- /*!*********************************************!*\
2649
- !*** ./node_modules/webpack/hot/emitter.js ***!
2650
- \*********************************************/
2651
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2652
-
2653
- var EventEmitter = __webpack_require__(/*! events */ "./node_modules/events/events.js");
2654
- module.exports = new EventEmitter();
2655
-
2656
-
2657
- /***/ }),
2658
-
2659
- /***/ "./node_modules/webpack/hot/log-apply-result.js":
2660
- /*!******************************************************!*\
2661
- !*** ./node_modules/webpack/hot/log-apply-result.js ***!
2662
- \******************************************************/
2663
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2664
-
2665
- /*
2666
- MIT License http://www.opensource.org/licenses/mit-license.php
2667
- Author Tobias Koppers @sokra
2668
- */
2669
-
2670
- /**
2671
- * @param {(string | number)[]} updatedModules updated modules
2672
- * @param {(string | number)[] | null} renewedModules renewed modules
2673
- */
2674
- module.exports = function (updatedModules, renewedModules) {
2675
- var unacceptedModules = updatedModules.filter(function (moduleId) {
2676
- return renewedModules && renewedModules.indexOf(moduleId) < 0;
2677
- });
2678
- var log = __webpack_require__(/*! ./log */ "./node_modules/webpack/hot/log.js");
2679
-
2680
- if (unacceptedModules.length > 0) {
2681
- log(
2682
- "warning",
2683
- "[HMR] The following modules couldn't be hot updated: (They would need a full reload!)"
2684
- );
2685
- unacceptedModules.forEach(function (moduleId) {
2686
- log("warning", "[HMR] - " + moduleId);
2687
- });
2688
- }
2689
-
2690
- if (!renewedModules || renewedModules.length === 0) {
2691
- log("info", "[HMR] Nothing hot updated.");
2692
- } else {
2693
- log("info", "[HMR] Updated modules:");
2694
- renewedModules.forEach(function (moduleId) {
2695
- if (typeof moduleId === "string" && moduleId.indexOf("!") !== -1) {
2696
- var parts = moduleId.split("!");
2697
- log.groupCollapsed("info", "[HMR] - " + parts.pop());
2698
- log("info", "[HMR] - " + moduleId);
2699
- log.groupEnd("info");
2700
- } else {
2701
- log("info", "[HMR] - " + moduleId);
2702
- }
2703
- });
2704
- var numberIds = renewedModules.every(function (moduleId) {
2705
- return typeof moduleId === "number";
2706
- });
2707
- if (numberIds)
2708
- log(
2709
- "info",
2710
- '[HMR] Consider using the optimization.moduleIds: "named" for module names.'
2711
- );
2712
- }
2713
- };
2714
-
2715
-
2716
- /***/ }),
2717
-
2718
- /***/ "./node_modules/webpack/hot/log.js":
2719
- /*!*****************************************!*\
2720
- !*** ./node_modules/webpack/hot/log.js ***!
2721
- \*****************************************/
2722
- /***/ ((module) => {
2723
-
2724
- /** @typedef {"info" | "warning" | "error"} LogLevel */
2725
-
2726
- /** @type {LogLevel} */
2727
- var logLevel = "info";
2728
-
2729
- function dummy() {}
2730
-
2731
- /**
2732
- * @param {LogLevel} level log level
2733
- * @returns {boolean} true, if should log
2734
- */
2735
- function shouldLog(level) {
2736
- var shouldLog =
2737
- (logLevel === "info" && level === "info") ||
2738
- (["info", "warning"].indexOf(logLevel) >= 0 && level === "warning") ||
2739
- (["info", "warning", "error"].indexOf(logLevel) >= 0 && level === "error");
2740
- return shouldLog;
2741
- }
2742
-
2743
- /**
2744
- * @param {(msg?: string) => void} logFn log function
2745
- * @returns {(level: LogLevel, msg?: string) => void} function that logs when log level is sufficient
2746
- */
2747
- function logGroup(logFn) {
2748
- return function (level, msg) {
2749
- if (shouldLog(level)) {
2750
- logFn(msg);
2751
- }
2752
- };
2753
- }
2754
-
2755
- /**
2756
- * @param {LogLevel} level log level
2757
- * @param {string|Error} msg message
2758
- */
2759
- module.exports = function (level, msg) {
2760
- if (shouldLog(level)) {
2761
- if (level === "info") {
2762
- console.log(msg);
2763
- } else if (level === "warning") {
2764
- console.warn(msg);
2765
- } else if (level === "error") {
2766
- console.error(msg);
2767
- }
2768
- }
2769
- };
2770
-
2771
- var group = console.group || dummy;
2772
- var groupCollapsed = console.groupCollapsed || dummy;
2773
- var groupEnd = console.groupEnd || dummy;
2774
-
2775
- module.exports.group = logGroup(group);
2776
-
2777
- module.exports.groupCollapsed = logGroup(groupCollapsed);
2778
-
2779
- module.exports.groupEnd = logGroup(groupEnd);
2780
-
2781
- /**
2782
- * @param {LogLevel} level log level
2783
- */
2784
- module.exports.setLogLevel = function (level) {
2785
- logLevel = level;
2786
- };
2787
-
2788
- /**
2789
- * @param {Error} err error
2790
- * @returns {string} formatted error
2791
- */
2792
- module.exports.formatError = function (err) {
2793
- var message = err.message;
2794
- var stack = err.stack;
2795
- if (!stack) {
2796
- return message;
2797
- } else if (stack.indexOf(message) < 0) {
2798
- return message + "\n" + stack;
2799
- }
2800
- return stack;
2801
- };
2802
-
2803
-
2804
- /***/ })
2805
-
2806
- }]);
2807
- //# sourceMappingURL=vendors-node_modules_s.js.map