index.js 26 KB

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