index.js 26 KB

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