19
|
1 |
/******/ (function() { // webpackBootstrap |
|
2 |
/******/ "use strict"; |
|
3 |
/******/ // The require scope |
|
4 |
/******/ var __webpack_require__ = {}; |
|
5 |
/******/ |
|
6 |
/************************************************************************/ |
|
7 |
/******/ /* webpack/runtime/define property getters */ |
|
8 |
/******/ !function() { |
|
9 |
/******/ // define getter functions for harmony exports |
|
10 |
/******/ __webpack_require__.d = function(exports, definition) { |
|
11 |
/******/ for(var key in definition) { |
|
12 |
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { |
|
13 |
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); |
|
14 |
/******/ } |
|
15 |
/******/ } |
16
|
16 |
/******/ }; |
19
|
17 |
/******/ }(); |
|
18 |
/******/ |
|
19 |
/******/ /* webpack/runtime/hasOwnProperty shorthand */ |
|
20 |
/******/ !function() { |
|
21 |
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } |
|
22 |
/******/ }(); |
|
23 |
/******/ |
16
|
24 |
/************************************************************************/ |
19
|
25 |
var __webpack_exports__ = {}; |
16
|
26 |
|
19
|
27 |
// EXPORTS |
|
28 |
__webpack_require__.d(__webpack_exports__, { |
|
29 |
"default": function() { return /* binding */ warning; } |
|
30 |
}); |
16
|
31 |
|
19
|
32 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/warning/build-module/utils.js |
|
33 |
/** |
|
34 |
* Object map tracking messages which have been logged, for use in ensuring a |
|
35 |
* message is only logged once. |
|
36 |
* |
|
37 |
* @type {Set<string>} |
|
38 |
*/ |
|
39 |
const logged = new Set(); |
|
40 |
|
|
41 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/warning/build-module/index.js |
|
42 |
/** |
|
43 |
* Internal dependencies |
|
44 |
*/ |
16
|
45 |
|
|
46 |
|
|
47 |
function isDev() { |
|
48 |
return typeof process !== 'undefined' && process.env && "production" !== 'production'; |
|
49 |
} |
|
50 |
/** |
|
51 |
* Shows a warning with `message` if environment is not `production`. |
|
52 |
* |
|
53 |
* @param {string} message Message to show in the warning. |
|
54 |
* |
|
55 |
* @example |
|
56 |
* ```js |
|
57 |
* import warning from '@wordpress/warning'; |
|
58 |
* |
|
59 |
* function MyComponent( props ) { |
|
60 |
* if ( ! props.title ) { |
|
61 |
* warning( '`props.title` was not passed' ); |
|
62 |
* } |
|
63 |
* ... |
|
64 |
* } |
|
65 |
* ``` |
|
66 |
*/ |
|
67 |
|
|
68 |
|
|
69 |
function warning(message) { |
|
70 |
if (!isDev()) { |
|
71 |
return; |
19
|
72 |
} // Skip if already logged. |
|
73 |
|
|
74 |
|
|
75 |
if (logged.has(message)) { |
|
76 |
return; |
16
|
77 |
} // eslint-disable-next-line no-console |
|
78 |
|
|
79 |
|
|
80 |
console.warn(message); // Throwing an error and catching it immediately to improve debugging |
|
81 |
// A consumer can use 'pause on caught exceptions' |
|
82 |
// https://github.com/facebook/react/issues/4216 |
|
83 |
|
|
84 |
try { |
|
85 |
throw Error(message); |
19
|
86 |
} catch (x) {// Do nothing. |
16
|
87 |
} |
19
|
88 |
|
|
89 |
logged.add(message); |
16
|
90 |
} |
|
91 |
|
19
|
92 |
(window.wp = window.wp || {}).warning = __webpack_exports__["default"]; |
|
93 |
/******/ })() |
|
94 |
; |