index.js 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716
  1. /******/ (function() { // webpackBootstrap
  2. /******/ "use strict";
  3. /******/ var __webpack_modules__ = ({
  4. /***/ "./client-src/modules/logger/tapable.js":
  5. /*!**********************************************!*\
  6. !*** ./client-src/modules/logger/tapable.js ***!
  7. \**********************************************/
  8. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  9. __webpack_require__.r(__webpack_exports__);
  10. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  11. /* harmony export */ SyncBailHook: function() { return /* binding */ SyncBailHook; }
  12. /* harmony export */ });
  13. function SyncBailHook() {
  14. return {
  15. call: function call() {}
  16. };
  17. }
  18. /**
  19. * Client stub for tapable SyncBailHook
  20. */
  21. // eslint-disable-next-line import/prefer-default-export
  22. /***/ }),
  23. /***/ "./node_modules/webpack/lib/logging/Logger.js":
  24. /*!****************************************************!*\
  25. !*** ./node_modules/webpack/lib/logging/Logger.js ***!
  26. \****************************************************/
  27. /***/ (function(__unused_webpack_module, exports) {
  28. /*
  29. MIT License http://www.opensource.org/licenses/mit-license.php
  30. Author Tobias Koppers @sokra
  31. */
  32. function _toConsumableArray(arr) {
  33. return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
  34. }
  35. function _nonIterableSpread() {
  36. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  37. }
  38. function _unsupportedIterableToArray(o, minLen) {
  39. if (!o) return;
  40. if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  41. var n = Object.prototype.toString.call(o).slice(8, -1);
  42. if (n === "Object" && o.constructor) n = o.constructor.name;
  43. if (n === "Map" || n === "Set") return Array.from(o);
  44. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  45. }
  46. function _iterableToArray(iter) {
  47. 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);
  48. }
  49. function _arrayWithoutHoles(arr) {
  50. if (Array.isArray(arr)) return _arrayLikeToArray(arr);
  51. }
  52. function _arrayLikeToArray(arr, len) {
  53. if (len == null || len > arr.length) len = arr.length;
  54. for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
  55. return arr2;
  56. }
  57. function _classCallCheck(instance, Constructor) {
  58. if (!(instance instanceof Constructor)) {
  59. throw new TypeError("Cannot call a class as a function");
  60. }
  61. }
  62. function _defineProperties(target, props) {
  63. for (var i = 0; i < props.length; i++) {
  64. var descriptor = props[i];
  65. descriptor.enumerable = descriptor.enumerable || false;
  66. descriptor.configurable = true;
  67. if ("value" in descriptor) descriptor.writable = true;
  68. Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
  69. }
  70. }
  71. function _createClass(Constructor, protoProps, staticProps) {
  72. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  73. if (staticProps) _defineProperties(Constructor, staticProps);
  74. Object.defineProperty(Constructor, "prototype", {
  75. writable: false
  76. });
  77. return Constructor;
  78. }
  79. function _toPropertyKey(t) {
  80. var i = _toPrimitive(t, "string");
  81. return "symbol" == typeof i ? i : i + "";
  82. }
  83. function _toPrimitive(t, r) {
  84. if ("object" != typeof t || !t) return t;
  85. var e = t[(typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).toPrimitive];
  86. if (void 0 !== e) {
  87. var i = e.call(t, r || "default");
  88. if ("object" != typeof i) return i;
  89. throw new TypeError("@@toPrimitive must return a primitive value.");
  90. }
  91. return ("string" === r ? String : Number)(t);
  92. }
  93. var LogType = Object.freeze({
  94. error: ( /** @type {"error"} */"error"),
  95. // message, c style arguments
  96. warn: ( /** @type {"warn"} */"warn"),
  97. // message, c style arguments
  98. info: ( /** @type {"info"} */"info"),
  99. // message, c style arguments
  100. log: ( /** @type {"log"} */"log"),
  101. // message, c style arguments
  102. debug: ( /** @type {"debug"} */"debug"),
  103. // message, c style arguments
  104. trace: ( /** @type {"trace"} */"trace"),
  105. // no arguments
  106. group: ( /** @type {"group"} */"group"),
  107. // [label]
  108. groupCollapsed: ( /** @type {"groupCollapsed"} */"groupCollapsed"),
  109. // [label]
  110. groupEnd: ( /** @type {"groupEnd"} */"groupEnd"),
  111. // [label]
  112. profile: ( /** @type {"profile"} */"profile"),
  113. // [profileName]
  114. profileEnd: ( /** @type {"profileEnd"} */"profileEnd"),
  115. // [profileName]
  116. time: ( /** @type {"time"} */"time"),
  117. // name, time as [seconds, nanoseconds]
  118. clear: ( /** @type {"clear"} */"clear"),
  119. // no arguments
  120. status: ( /** @type {"status"} */"status") // message, arguments
  121. });
  122. exports.LogType = LogType;
  123. /** @typedef {typeof LogType[keyof typeof LogType]} LogTypeEnum */
  124. var LOG_SYMBOL = (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; })("webpack logger raw log method");
  125. var TIMERS_SYMBOL = (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; })("webpack logger times");
  126. var TIMERS_AGGREGATES_SYMBOL = (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; })("webpack logger aggregated times");
  127. var WebpackLogger = /*#__PURE__*/function () {
  128. /**
  129. * @param {function(LogTypeEnum, any[]=): void} log log function
  130. * @param {function(string | function(): string): WebpackLogger} getChildLogger function to create child logger
  131. */
  132. function WebpackLogger(log, getChildLogger) {
  133. _classCallCheck(this, WebpackLogger);
  134. this[LOG_SYMBOL] = log;
  135. this.getChildLogger = getChildLogger;
  136. }
  137. return _createClass(WebpackLogger, [{
  138. key: "error",
  139. value: function error() {
  140. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  141. args[_key] = arguments[_key];
  142. }
  143. this[LOG_SYMBOL](LogType.error, args);
  144. }
  145. }, {
  146. key: "warn",
  147. value: function warn() {
  148. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  149. args[_key2] = arguments[_key2];
  150. }
  151. this[LOG_SYMBOL](LogType.warn, args);
  152. }
  153. }, {
  154. key: "info",
  155. value: function info() {
  156. for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  157. args[_key3] = arguments[_key3];
  158. }
  159. this[LOG_SYMBOL](LogType.info, args);
  160. }
  161. }, {
  162. key: "log",
  163. value: function log() {
  164. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  165. args[_key4] = arguments[_key4];
  166. }
  167. this[LOG_SYMBOL](LogType.log, args);
  168. }
  169. }, {
  170. key: "debug",
  171. value: function debug() {
  172. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  173. args[_key5] = arguments[_key5];
  174. }
  175. this[LOG_SYMBOL](LogType.debug, args);
  176. }
  177. }, {
  178. key: "assert",
  179. value: function assert(assertion) {
  180. if (!assertion) {
  181. for (var _len6 = arguments.length, args = new Array(_len6 > 1 ? _len6 - 1 : 0), _key6 = 1; _key6 < _len6; _key6++) {
  182. args[_key6 - 1] = arguments[_key6];
  183. }
  184. this[LOG_SYMBOL](LogType.error, args);
  185. }
  186. }
  187. }, {
  188. key: "trace",
  189. value: function trace() {
  190. this[LOG_SYMBOL](LogType.trace, ["Trace"]);
  191. }
  192. }, {
  193. key: "clear",
  194. value: function clear() {
  195. this[LOG_SYMBOL](LogType.clear);
  196. }
  197. }, {
  198. key: "status",
  199. value: function status() {
  200. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  201. args[_key7] = arguments[_key7];
  202. }
  203. this[LOG_SYMBOL](LogType.status, args);
  204. }
  205. }, {
  206. key: "group",
  207. value: function group() {
  208. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  209. args[_key8] = arguments[_key8];
  210. }
  211. this[LOG_SYMBOL](LogType.group, args);
  212. }
  213. }, {
  214. key: "groupCollapsed",
  215. value: function groupCollapsed() {
  216. for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
  217. args[_key9] = arguments[_key9];
  218. }
  219. this[LOG_SYMBOL](LogType.groupCollapsed, args);
  220. }
  221. }, {
  222. key: "groupEnd",
  223. value: function groupEnd() {
  224. for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
  225. args[_key10] = arguments[_key10];
  226. }
  227. this[LOG_SYMBOL](LogType.groupEnd, args);
  228. }
  229. }, {
  230. key: "profile",
  231. value: function profile(label) {
  232. this[LOG_SYMBOL](LogType.profile, [label]);
  233. }
  234. }, {
  235. key: "profileEnd",
  236. value: function profileEnd(label) {
  237. this[LOG_SYMBOL](LogType.profileEnd, [label]);
  238. }
  239. }, {
  240. key: "time",
  241. value: function time(label) {
  242. this[TIMERS_SYMBOL] = this[TIMERS_SYMBOL] || new Map();
  243. this[TIMERS_SYMBOL].set(label, process.hrtime());
  244. }
  245. }, {
  246. key: "timeLog",
  247. value: function timeLog(label) {
  248. var prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label);
  249. if (!prev) {
  250. throw new Error("No such label '".concat(label, "' for WebpackLogger.timeLog()"));
  251. }
  252. var time = process.hrtime(prev);
  253. this[LOG_SYMBOL](LogType.time, [label].concat(_toConsumableArray(time)));
  254. }
  255. }, {
  256. key: "timeEnd",
  257. value: function timeEnd(label) {
  258. var prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label);
  259. if (!prev) {
  260. throw new Error("No such label '".concat(label, "' for WebpackLogger.timeEnd()"));
  261. }
  262. var time = process.hrtime(prev);
  263. this[TIMERS_SYMBOL].delete(label);
  264. this[LOG_SYMBOL](LogType.time, [label].concat(_toConsumableArray(time)));
  265. }
  266. }, {
  267. key: "timeAggregate",
  268. value: function timeAggregate(label) {
  269. var prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label);
  270. if (!prev) {
  271. throw new Error("No such label '".concat(label, "' for WebpackLogger.timeAggregate()"));
  272. }
  273. var time = process.hrtime(prev);
  274. this[TIMERS_SYMBOL].delete(label);
  275. this[TIMERS_AGGREGATES_SYMBOL] = this[TIMERS_AGGREGATES_SYMBOL] || new Map();
  276. var current = this[TIMERS_AGGREGATES_SYMBOL].get(label);
  277. if (current !== undefined) {
  278. if (time[1] + current[1] > 1e9) {
  279. time[0] += current[0] + 1;
  280. time[1] = time[1] - 1e9 + current[1];
  281. } else {
  282. time[0] += current[0];
  283. time[1] += current[1];
  284. }
  285. }
  286. this[TIMERS_AGGREGATES_SYMBOL].set(label, time);
  287. }
  288. }, {
  289. key: "timeAggregateEnd",
  290. value: function timeAggregateEnd(label) {
  291. if (this[TIMERS_AGGREGATES_SYMBOL] === undefined) return;
  292. var time = this[TIMERS_AGGREGATES_SYMBOL].get(label);
  293. if (time === undefined) return;
  294. this[TIMERS_AGGREGATES_SYMBOL].delete(label);
  295. this[LOG_SYMBOL](LogType.time, [label].concat(_toConsumableArray(time)));
  296. }
  297. }]);
  298. }();
  299. exports.Logger = WebpackLogger;
  300. /***/ }),
  301. /***/ "./node_modules/webpack/lib/logging/createConsoleLogger.js":
  302. /*!*****************************************************************!*\
  303. !*** ./node_modules/webpack/lib/logging/createConsoleLogger.js ***!
  304. \*****************************************************************/
  305. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  306. /*
  307. MIT License http://www.opensource.org/licenses/mit-license.php
  308. Author Tobias Koppers @sokra
  309. */
  310. function _toConsumableArray(arr) {
  311. return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
  312. }
  313. function _nonIterableSpread() {
  314. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  315. }
  316. function _unsupportedIterableToArray(o, minLen) {
  317. if (!o) return;
  318. if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  319. var n = Object.prototype.toString.call(o).slice(8, -1);
  320. if (n === "Object" && o.constructor) n = o.constructor.name;
  321. if (n === "Map" || n === "Set") return Array.from(o);
  322. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  323. }
  324. function _iterableToArray(iter) {
  325. 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);
  326. }
  327. function _arrayWithoutHoles(arr) {
  328. if (Array.isArray(arr)) return _arrayLikeToArray(arr);
  329. }
  330. function _arrayLikeToArray(arr, len) {
  331. if (len == null || len > arr.length) len = arr.length;
  332. for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
  333. return arr2;
  334. }
  335. var _require = __webpack_require__(/*! ./Logger */ "./node_modules/webpack/lib/logging/Logger.js"),
  336. LogType = _require.LogType;
  337. /** @typedef {import("../../declarations/WebpackOptions").FilterItemTypes} FilterItemTypes */
  338. /** @typedef {import("../../declarations/WebpackOptions").FilterTypes} FilterTypes */
  339. /** @typedef {import("./Logger").LogTypeEnum} LogTypeEnum */
  340. /** @typedef {function(string): boolean} FilterFunction */
  341. /**
  342. * @typedef {Object} LoggerConsole
  343. * @property {function(): void} clear
  344. * @property {function(): void} trace
  345. * @property {(...args: any[]) => void} info
  346. * @property {(...args: any[]) => void} log
  347. * @property {(...args: any[]) => void} warn
  348. * @property {(...args: any[]) => void} error
  349. * @property {(...args: any[]) => void=} debug
  350. * @property {(...args: any[]) => void=} group
  351. * @property {(...args: any[]) => void=} groupCollapsed
  352. * @property {(...args: any[]) => void=} groupEnd
  353. * @property {(...args: any[]) => void=} status
  354. * @property {(...args: any[]) => void=} profile
  355. * @property {(...args: any[]) => void=} profileEnd
  356. * @property {(...args: any[]) => void=} logTime
  357. */
  358. /**
  359. * @typedef {Object} LoggerOptions
  360. * @property {false|true|"none"|"error"|"warn"|"info"|"log"|"verbose"} level loglevel
  361. * @property {FilterTypes|boolean} debug filter for debug logging
  362. * @property {LoggerConsole} console the console to log to
  363. */
  364. /**
  365. * @param {FilterItemTypes} item an input item
  366. * @returns {FilterFunction} filter function
  367. */
  368. var filterToFunction = function filterToFunction(item) {
  369. if (typeof item === "string") {
  370. var regExp = new RegExp("[\\\\/]".concat(item.replace(/[-[\]{}()*+?.\\^$|]/g, "\\$&"), "([\\\\/]|$|!|\\?)"));
  371. return function (ident) {
  372. return regExp.test(ident);
  373. };
  374. }
  375. if (item && typeof item === "object" && typeof item.test === "function") {
  376. return function (ident) {
  377. return item.test(ident);
  378. };
  379. }
  380. if (typeof item === "function") {
  381. return item;
  382. }
  383. if (typeof item === "boolean") {
  384. return function () {
  385. return item;
  386. };
  387. }
  388. };
  389. /**
  390. * @enum {number}
  391. */
  392. var LogLevel = {
  393. none: 6,
  394. false: 6,
  395. error: 5,
  396. warn: 4,
  397. info: 3,
  398. log: 2,
  399. true: 2,
  400. verbose: 1
  401. };
  402. /**
  403. * @param {LoggerOptions} options options object
  404. * @returns {function(string, LogTypeEnum, any[]): void} logging function
  405. */
  406. module.exports = function (_ref) {
  407. var _ref$level = _ref.level,
  408. level = _ref$level === void 0 ? "info" : _ref$level,
  409. _ref$debug = _ref.debug,
  410. debug = _ref$debug === void 0 ? false : _ref$debug,
  411. console = _ref.console;
  412. var debugFilters = typeof debug === "boolean" ? [function () {
  413. return debug;
  414. }] : /** @type {FilterItemTypes[]} */[].concat(debug).map(filterToFunction);
  415. /** @type {number} */
  416. var loglevel = LogLevel["".concat(level)] || 0;
  417. /**
  418. * @param {string} name name of the logger
  419. * @param {LogTypeEnum} type type of the log entry
  420. * @param {any[]} args arguments of the log entry
  421. * @returns {void}
  422. */
  423. var logger = function logger(name, type, args) {
  424. var labeledArgs = function labeledArgs() {
  425. if (Array.isArray(args)) {
  426. if (args.length > 0 && typeof args[0] === "string") {
  427. return ["[".concat(name, "] ").concat(args[0])].concat(_toConsumableArray(args.slice(1)));
  428. } else {
  429. return ["[".concat(name, "]")].concat(_toConsumableArray(args));
  430. }
  431. } else {
  432. return [];
  433. }
  434. };
  435. var debug = debugFilters.some(function (f) {
  436. return f(name);
  437. });
  438. switch (type) {
  439. case LogType.debug:
  440. if (!debug) return;
  441. if (typeof console.debug === "function") {
  442. console.debug.apply(console, _toConsumableArray(labeledArgs()));
  443. } else {
  444. console.log.apply(console, _toConsumableArray(labeledArgs()));
  445. }
  446. break;
  447. case LogType.log:
  448. if (!debug && loglevel > LogLevel.log) return;
  449. console.log.apply(console, _toConsumableArray(labeledArgs()));
  450. break;
  451. case LogType.info:
  452. if (!debug && loglevel > LogLevel.info) return;
  453. console.info.apply(console, _toConsumableArray(labeledArgs()));
  454. break;
  455. case LogType.warn:
  456. if (!debug && loglevel > LogLevel.warn) return;
  457. console.warn.apply(console, _toConsumableArray(labeledArgs()));
  458. break;
  459. case LogType.error:
  460. if (!debug && loglevel > LogLevel.error) return;
  461. console.error.apply(console, _toConsumableArray(labeledArgs()));
  462. break;
  463. case LogType.trace:
  464. if (!debug) return;
  465. console.trace();
  466. break;
  467. case LogType.groupCollapsed:
  468. if (!debug && loglevel > LogLevel.log) return;
  469. if (!debug && loglevel > LogLevel.verbose) {
  470. if (typeof console.groupCollapsed === "function") {
  471. console.groupCollapsed.apply(console, _toConsumableArray(labeledArgs()));
  472. } else {
  473. console.log.apply(console, _toConsumableArray(labeledArgs()));
  474. }
  475. break;
  476. }
  477. // falls through
  478. case LogType.group:
  479. if (!debug && loglevel > LogLevel.log) return;
  480. if (typeof console.group === "function") {
  481. console.group.apply(console, _toConsumableArray(labeledArgs()));
  482. } else {
  483. console.log.apply(console, _toConsumableArray(labeledArgs()));
  484. }
  485. break;
  486. case LogType.groupEnd:
  487. if (!debug && loglevel > LogLevel.log) return;
  488. if (typeof console.groupEnd === "function") {
  489. console.groupEnd();
  490. }
  491. break;
  492. case LogType.time:
  493. {
  494. if (!debug && loglevel > LogLevel.log) return;
  495. var ms = args[1] * 1000 + args[2] / 1000000;
  496. var msg = "[".concat(name, "] ").concat(args[0], ": ").concat(ms, " ms");
  497. if (typeof console.logTime === "function") {
  498. console.logTime(msg);
  499. } else {
  500. console.log(msg);
  501. }
  502. break;
  503. }
  504. case LogType.profile:
  505. if (typeof console.profile === "function") {
  506. console.profile.apply(console, _toConsumableArray(labeledArgs()));
  507. }
  508. break;
  509. case LogType.profileEnd:
  510. if (typeof console.profileEnd === "function") {
  511. console.profileEnd.apply(console, _toConsumableArray(labeledArgs()));
  512. }
  513. break;
  514. case LogType.clear:
  515. if (!debug && loglevel > LogLevel.log) return;
  516. if (typeof console.clear === "function") {
  517. console.clear();
  518. }
  519. break;
  520. case LogType.status:
  521. if (!debug && loglevel > LogLevel.info) return;
  522. if (typeof console.status === "function") {
  523. if (args.length === 0) {
  524. console.status();
  525. } else {
  526. console.status.apply(console, _toConsumableArray(labeledArgs()));
  527. }
  528. } else {
  529. if (args.length !== 0) {
  530. console.info.apply(console, _toConsumableArray(labeledArgs()));
  531. }
  532. }
  533. break;
  534. default:
  535. throw new Error("Unexpected LogType ".concat(type));
  536. }
  537. };
  538. return logger;
  539. };
  540. /***/ }),
  541. /***/ "./node_modules/webpack/lib/logging/runtime.js":
  542. /*!*****************************************************!*\
  543. !*** ./node_modules/webpack/lib/logging/runtime.js ***!
  544. \*****************************************************/
  545. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  546. /*
  547. MIT License http://www.opensource.org/licenses/mit-license.php
  548. Author Tobias Koppers @sokra
  549. */
  550. function _extends() {
  551. _extends = Object.assign ? Object.assign.bind() : function (target) {
  552. for (var i = 1; i < arguments.length; i++) {
  553. var source = arguments[i];
  554. for (var key in source) {
  555. if (Object.prototype.hasOwnProperty.call(source, key)) {
  556. target[key] = source[key];
  557. }
  558. }
  559. }
  560. return target;
  561. };
  562. return _extends.apply(this, arguments);
  563. }
  564. var _require = __webpack_require__(/*! tapable */ "./client-src/modules/logger/tapable.js"),
  565. SyncBailHook = _require.SyncBailHook;
  566. var _require2 = __webpack_require__(/*! ./Logger */ "./node_modules/webpack/lib/logging/Logger.js"),
  567. Logger = _require2.Logger;
  568. var createConsoleLogger = __webpack_require__(/*! ./createConsoleLogger */ "./node_modules/webpack/lib/logging/createConsoleLogger.js");
  569. /** @type {createConsoleLogger.LoggerOptions} */
  570. var currentDefaultLoggerOptions = {
  571. level: "info",
  572. debug: false,
  573. console: console
  574. };
  575. var currentDefaultLogger = createConsoleLogger(currentDefaultLoggerOptions);
  576. /**
  577. * @param {string} name name of the logger
  578. * @returns {Logger} a logger
  579. */
  580. exports.getLogger = function (name) {
  581. return new Logger(function (type, args) {
  582. if (exports.hooks.log.call(name, type, args) === undefined) {
  583. currentDefaultLogger(name, type, args);
  584. }
  585. }, function (childName) {
  586. return exports.getLogger("".concat(name, "/").concat(childName));
  587. });
  588. };
  589. /**
  590. * @param {createConsoleLogger.LoggerOptions} options new options, merge with old options
  591. * @returns {void}
  592. */
  593. exports.configureDefaultLogger = function (options) {
  594. _extends(currentDefaultLoggerOptions, options);
  595. currentDefaultLogger = createConsoleLogger(currentDefaultLoggerOptions);
  596. };
  597. exports.hooks = {
  598. log: new SyncBailHook(["origin", "type", "args"])
  599. };
  600. /***/ })
  601. /******/ });
  602. /************************************************************************/
  603. /******/ // The module cache
  604. /******/ var __webpack_module_cache__ = {};
  605. /******/
  606. /******/ // The require function
  607. /******/ function __webpack_require__(moduleId) {
  608. /******/ // Check if module is in cache
  609. /******/ var cachedModule = __webpack_module_cache__[moduleId];
  610. /******/ if (cachedModule !== undefined) {
  611. /******/ return cachedModule.exports;
  612. /******/ }
  613. /******/ // Create a new module (and put it into the cache)
  614. /******/ var module = __webpack_module_cache__[moduleId] = {
  615. /******/ // no module.id needed
  616. /******/ // no module.loaded needed
  617. /******/ exports: {}
  618. /******/ };
  619. /******/
  620. /******/ // Execute the module function
  621. /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
  622. /******/
  623. /******/ // Return the exports of the module
  624. /******/ return module.exports;
  625. /******/ }
  626. /******/
  627. /************************************************************************/
  628. /******/ /* webpack/runtime/define property getters */
  629. /******/ !function() {
  630. /******/ // define getter functions for harmony exports
  631. /******/ __webpack_require__.d = function(exports, definition) {
  632. /******/ for(var key in definition) {
  633. /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
  634. /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
  635. /******/ }
  636. /******/ }
  637. /******/ };
  638. /******/ }();
  639. /******/
  640. /******/ /* webpack/runtime/hasOwnProperty shorthand */
  641. /******/ !function() {
  642. /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
  643. /******/ }();
  644. /******/
  645. /******/ /* webpack/runtime/make namespace object */
  646. /******/ !function() {
  647. /******/ // define __esModule on exports
  648. /******/ __webpack_require__.r = function(exports) {
  649. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  650. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  651. /******/ }
  652. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  653. /******/ };
  654. /******/ }();
  655. /******/
  656. /************************************************************************/
  657. var __webpack_exports__ = {};
  658. // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
  659. !function() {
  660. /*!********************************************!*\
  661. !*** ./client-src/modules/logger/index.js ***!
  662. \********************************************/
  663. __webpack_require__.r(__webpack_exports__);
  664. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  665. /* harmony export */ "default": function() { return /* reexport default export from named module */ webpack_lib_logging_runtime_js__WEBPACK_IMPORTED_MODULE_0__; }
  666. /* harmony export */ });
  667. /* harmony import */ var webpack_lib_logging_runtime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! webpack/lib/logging/runtime.js */ "./node_modules/webpack/lib/logging/runtime.js");
  668. }();
  669. var __webpack_export_target__ = exports;
  670. for(var i in __webpack_exports__) __webpack_export_target__[i] = __webpack_exports__[i];
  671. if(__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, "__esModule", { value: true });
  672. /******/ })()
  673. ;