|
1 this["wp"] = this["wp"] || {}; this["wp"]["compose"] = |
|
2 /******/ (function(modules) { // webpackBootstrap |
|
3 /******/ // The module cache |
|
4 /******/ var installedModules = {}; |
|
5 /******/ |
|
6 /******/ // The require function |
|
7 /******/ function __webpack_require__(moduleId) { |
|
8 /******/ |
|
9 /******/ // Check if module is in cache |
|
10 /******/ if(installedModules[moduleId]) { |
|
11 /******/ return installedModules[moduleId].exports; |
|
12 /******/ } |
|
13 /******/ // Create a new module (and put it into the cache) |
|
14 /******/ var module = installedModules[moduleId] = { |
|
15 /******/ i: moduleId, |
|
16 /******/ l: false, |
|
17 /******/ exports: {} |
|
18 /******/ }; |
|
19 /******/ |
|
20 /******/ // Execute the module function |
|
21 /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); |
|
22 /******/ |
|
23 /******/ // Flag the module as loaded |
|
24 /******/ module.l = true; |
|
25 /******/ |
|
26 /******/ // Return the exports of the module |
|
27 /******/ return module.exports; |
|
28 /******/ } |
|
29 /******/ |
|
30 /******/ |
|
31 /******/ // expose the modules object (__webpack_modules__) |
|
32 /******/ __webpack_require__.m = modules; |
|
33 /******/ |
|
34 /******/ // expose the module cache |
|
35 /******/ __webpack_require__.c = installedModules; |
|
36 /******/ |
|
37 /******/ // define getter function for harmony exports |
|
38 /******/ __webpack_require__.d = function(exports, name, getter) { |
|
39 /******/ if(!__webpack_require__.o(exports, name)) { |
|
40 /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); |
|
41 /******/ } |
|
42 /******/ }; |
|
43 /******/ |
|
44 /******/ // define __esModule on exports |
|
45 /******/ __webpack_require__.r = function(exports) { |
|
46 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { |
|
47 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
|
48 /******/ } |
|
49 /******/ Object.defineProperty(exports, '__esModule', { value: true }); |
|
50 /******/ }; |
|
51 /******/ |
|
52 /******/ // create a fake namespace object |
|
53 /******/ // mode & 1: value is a module id, require it |
|
54 /******/ // mode & 2: merge all properties of value into the ns |
|
55 /******/ // mode & 4: return value when already ns object |
|
56 /******/ // mode & 8|1: behave like require |
|
57 /******/ __webpack_require__.t = function(value, mode) { |
|
58 /******/ if(mode & 1) value = __webpack_require__(value); |
|
59 /******/ if(mode & 8) return value; |
|
60 /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; |
|
61 /******/ var ns = Object.create(null); |
|
62 /******/ __webpack_require__.r(ns); |
|
63 /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); |
|
64 /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); |
|
65 /******/ return ns; |
|
66 /******/ }; |
|
67 /******/ |
|
68 /******/ // getDefaultExport function for compatibility with non-harmony modules |
|
69 /******/ __webpack_require__.n = function(module) { |
|
70 /******/ var getter = module && module.__esModule ? |
|
71 /******/ function getDefault() { return module['default']; } : |
|
72 /******/ function getModuleExports() { return module; }; |
|
73 /******/ __webpack_require__.d(getter, 'a', getter); |
|
74 /******/ return getter; |
|
75 /******/ }; |
|
76 /******/ |
|
77 /******/ // Object.prototype.hasOwnProperty.call |
|
78 /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; |
|
79 /******/ |
|
80 /******/ // __webpack_public_path__ |
|
81 /******/ __webpack_require__.p = ""; |
|
82 /******/ |
|
83 /******/ |
|
84 /******/ // Load entry module and return exports |
|
85 /******/ return __webpack_require__(__webpack_require__.s = 368); |
|
86 /******/ }) |
|
87 /************************************************************************/ |
|
88 /******/ ({ |
|
89 |
|
90 /***/ 0: |
|
91 /***/ (function(module, exports) { |
|
92 |
|
93 (function() { module.exports = this["wp"]["element"]; }()); |
|
94 |
|
95 /***/ }), |
|
96 |
|
97 /***/ 10: |
|
98 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
99 |
|
100 "use strict"; |
|
101 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; }); |
|
102 function _classCallCheck(instance, Constructor) { |
|
103 if (!(instance instanceof Constructor)) { |
|
104 throw new TypeError("Cannot call a class as a function"); |
|
105 } |
|
106 } |
|
107 |
|
108 /***/ }), |
|
109 |
|
110 /***/ 11: |
|
111 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
112 |
|
113 "use strict"; |
|
114 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; }); |
|
115 /* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(32); |
|
116 /* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3); |
|
117 |
|
118 |
|
119 function _possibleConstructorReturn(self, call) { |
|
120 if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) { |
|
121 return call; |
|
122 } |
|
123 |
|
124 return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self); |
|
125 } |
|
126 |
|
127 /***/ }), |
|
128 |
|
129 /***/ 12: |
|
130 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
131 |
|
132 "use strict"; |
|
133 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; }); |
|
134 function _getPrototypeOf(o) { |
|
135 _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { |
|
136 return o.__proto__ || Object.getPrototypeOf(o); |
|
137 }; |
|
138 return _getPrototypeOf(o); |
|
139 } |
|
140 |
|
141 /***/ }), |
|
142 |
|
143 /***/ 13: |
|
144 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
145 |
|
146 "use strict"; |
|
147 |
|
148 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js |
|
149 function _setPrototypeOf(o, p) { |
|
150 _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { |
|
151 o.__proto__ = p; |
|
152 return o; |
|
153 }; |
|
154 |
|
155 return _setPrototypeOf(o, p); |
|
156 } |
|
157 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js |
|
158 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _inherits; }); |
|
159 |
|
160 function _inherits(subClass, superClass) { |
|
161 if (typeof superClass !== "function" && superClass !== null) { |
|
162 throw new TypeError("Super expression must either be null or a function"); |
|
163 } |
|
164 |
|
165 subClass.prototype = Object.create(superClass && superClass.prototype, { |
|
166 constructor: { |
|
167 value: subClass, |
|
168 writable: true, |
|
169 configurable: true |
|
170 } |
|
171 }); |
|
172 if (superClass) _setPrototypeOf(subClass, superClass); |
|
173 } |
|
174 |
|
175 /***/ }), |
|
176 |
|
177 /***/ 19: |
|
178 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
179 |
|
180 "use strict"; |
|
181 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; }); |
|
182 function _extends() { |
|
183 _extends = Object.assign || function (target) { |
|
184 for (var i = 1; i < arguments.length; i++) { |
|
185 var source = arguments[i]; |
|
186 |
|
187 for (var key in source) { |
|
188 if (Object.prototype.hasOwnProperty.call(source, key)) { |
|
189 target[key] = source[key]; |
|
190 } |
|
191 } |
|
192 } |
|
193 |
|
194 return target; |
|
195 }; |
|
196 |
|
197 return _extends.apply(this, arguments); |
|
198 } |
|
199 |
|
200 /***/ }), |
|
201 |
|
202 /***/ 2: |
|
203 /***/ (function(module, exports) { |
|
204 |
|
205 (function() { module.exports = this["lodash"]; }()); |
|
206 |
|
207 /***/ }), |
|
208 |
|
209 /***/ 3: |
|
210 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
211 |
|
212 "use strict"; |
|
213 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; }); |
|
214 function _assertThisInitialized(self) { |
|
215 if (self === void 0) { |
|
216 throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
|
217 } |
|
218 |
|
219 return self; |
|
220 } |
|
221 |
|
222 /***/ }), |
|
223 |
|
224 /***/ 32: |
|
225 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
226 |
|
227 "use strict"; |
|
228 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; }); |
|
229 function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } |
|
230 |
|
231 function _typeof(obj) { |
|
232 if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") { |
|
233 _typeof = function _typeof(obj) { |
|
234 return _typeof2(obj); |
|
235 }; |
|
236 } else { |
|
237 _typeof = function _typeof(obj) { |
|
238 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); |
|
239 }; |
|
240 } |
|
241 |
|
242 return _typeof(obj); |
|
243 } |
|
244 |
|
245 /***/ }), |
|
246 |
|
247 /***/ 368: |
|
248 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
249 |
|
250 "use strict"; |
|
251 __webpack_require__.r(__webpack_exports__); |
|
252 |
|
253 // EXTERNAL MODULE: external "lodash" |
|
254 var external_lodash_ = __webpack_require__(2); |
|
255 |
|
256 // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/create-higher-order-component/index.js |
|
257 /** |
|
258 * External dependencies |
|
259 */ |
|
260 |
|
261 /** |
|
262 * Given a function mapping a component to an enhanced component and modifier |
|
263 * name, returns the enhanced component augmented with a generated displayName. |
|
264 * |
|
265 * @param {Function} mapComponentToEnhancedComponent Function mapping component |
|
266 * to enhanced component. |
|
267 * @param {string} modifierName Seed name from which to |
|
268 * generated display name. |
|
269 * |
|
270 * @return {WPComponent} Component class with generated display name assigned. |
|
271 */ |
|
272 |
|
273 function createHigherOrderComponent(mapComponentToEnhancedComponent, modifierName) { |
|
274 return function (OriginalComponent) { |
|
275 var EnhancedComponent = mapComponentToEnhancedComponent(OriginalComponent); |
|
276 var _OriginalComponent$di = OriginalComponent.displayName, |
|
277 displayName = _OriginalComponent$di === void 0 ? OriginalComponent.name || 'Component' : _OriginalComponent$di; |
|
278 EnhancedComponent.displayName = "".concat(Object(external_lodash_["upperFirst"])(Object(external_lodash_["camelCase"])(modifierName)), "(").concat(displayName, ")"); |
|
279 return EnhancedComponent; |
|
280 }; |
|
281 } |
|
282 |
|
283 /* harmony default export */ var create_higher_order_component = (createHigherOrderComponent); |
|
284 |
|
285 // EXTERNAL MODULE: external {"this":["wp","element"]} |
|
286 var external_this_wp_element_ = __webpack_require__(0); |
|
287 |
|
288 // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/if-condition/index.js |
|
289 |
|
290 |
|
291 /** |
|
292 * Internal dependencies |
|
293 */ |
|
294 |
|
295 /** |
|
296 * Higher-order component creator, creating a new component which renders if |
|
297 * the given condition is satisfied or with the given optional prop name. |
|
298 * |
|
299 * @param {Function} predicate Function to test condition. |
|
300 * |
|
301 * @return {Function} Higher-order component. |
|
302 */ |
|
303 |
|
304 var if_condition_ifCondition = function ifCondition(predicate) { |
|
305 return create_higher_order_component(function (WrappedComponent) { |
|
306 return function (props) { |
|
307 if (!predicate(props)) { |
|
308 return null; |
|
309 } |
|
310 |
|
311 return Object(external_this_wp_element_["createElement"])(WrappedComponent, props); |
|
312 }; |
|
313 }, 'ifCondition'); |
|
314 }; |
|
315 |
|
316 /* harmony default export */ var if_condition = (if_condition_ifCondition); |
|
317 |
|
318 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js |
|
319 var classCallCheck = __webpack_require__(10); |
|
320 |
|
321 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js |
|
322 var createClass = __webpack_require__(9); |
|
323 |
|
324 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js |
|
325 var possibleConstructorReturn = __webpack_require__(11); |
|
326 |
|
327 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js |
|
328 var getPrototypeOf = __webpack_require__(12); |
|
329 |
|
330 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules |
|
331 var inherits = __webpack_require__(13); |
|
332 |
|
333 // EXTERNAL MODULE: external {"this":["wp","isShallowEqual"]} |
|
334 var external_this_wp_isShallowEqual_ = __webpack_require__(42); |
|
335 var external_this_wp_isShallowEqual_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_isShallowEqual_); |
|
336 |
|
337 // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/pure/index.js |
|
338 |
|
339 |
|
340 |
|
341 |
|
342 |
|
343 |
|
344 |
|
345 /** |
|
346 * WordPress dependencies |
|
347 */ |
|
348 |
|
349 |
|
350 /** |
|
351 * Internal dependencies |
|
352 */ |
|
353 |
|
354 |
|
355 /** |
|
356 * Given a component returns the enhanced component augmented with a component |
|
357 * only rerendering when its props/state change |
|
358 * |
|
359 * @param {Function} mapComponentToEnhancedComponent Function mapping component |
|
360 * to enhanced component. |
|
361 * @param {string} modifierName Seed name from which to |
|
362 * generated display name. |
|
363 * |
|
364 * @return {WPComponent} Component class with generated display name assigned. |
|
365 */ |
|
366 |
|
367 var pure = create_higher_order_component(function (Wrapped) { |
|
368 if (Wrapped.prototype instanceof external_this_wp_element_["Component"]) { |
|
369 return ( |
|
370 /*#__PURE__*/ |
|
371 function (_Wrapped) { |
|
372 Object(inherits["a" /* default */])(_class, _Wrapped); |
|
373 |
|
374 function _class() { |
|
375 Object(classCallCheck["a" /* default */])(this, _class); |
|
376 |
|
377 return Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(_class).apply(this, arguments)); |
|
378 } |
|
379 |
|
380 Object(createClass["a" /* default */])(_class, [{ |
|
381 key: "shouldComponentUpdate", |
|
382 value: function shouldComponentUpdate(nextProps, nextState) { |
|
383 return !external_this_wp_isShallowEqual_default()(nextProps, this.props) || !external_this_wp_isShallowEqual_default()(nextState, this.state); |
|
384 } |
|
385 }]); |
|
386 |
|
387 return _class; |
|
388 }(Wrapped) |
|
389 ); |
|
390 } |
|
391 |
|
392 return ( |
|
393 /*#__PURE__*/ |
|
394 function (_Component) { |
|
395 Object(inherits["a" /* default */])(_class2, _Component); |
|
396 |
|
397 function _class2() { |
|
398 Object(classCallCheck["a" /* default */])(this, _class2); |
|
399 |
|
400 return Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(_class2).apply(this, arguments)); |
|
401 } |
|
402 |
|
403 Object(createClass["a" /* default */])(_class2, [{ |
|
404 key: "shouldComponentUpdate", |
|
405 value: function shouldComponentUpdate(nextProps) { |
|
406 return !external_this_wp_isShallowEqual_default()(nextProps, this.props); |
|
407 } |
|
408 }, { |
|
409 key: "render", |
|
410 value: function render() { |
|
411 return Object(external_this_wp_element_["createElement"])(Wrapped, this.props); |
|
412 } |
|
413 }]); |
|
414 |
|
415 return _class2; |
|
416 }(external_this_wp_element_["Component"]) |
|
417 ); |
|
418 }, 'pure'); |
|
419 /* harmony default export */ var build_module_pure = (pure); |
|
420 |
|
421 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js |
|
422 var esm_extends = __webpack_require__(19); |
|
423 |
|
424 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js |
|
425 var assertThisInitialized = __webpack_require__(3); |
|
426 |
|
427 // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/with-global-events/listener.js |
|
428 |
|
429 |
|
430 |
|
431 /** |
|
432 * External dependencies |
|
433 */ |
|
434 |
|
435 /** |
|
436 * Class responsible for orchestrating event handling on the global window, |
|
437 * binding a single event to be shared across all handling instances, and |
|
438 * removing the handler when no instances are listening for the event. |
|
439 */ |
|
440 |
|
441 var listener_Listener = |
|
442 /*#__PURE__*/ |
|
443 function () { |
|
444 function Listener() { |
|
445 Object(classCallCheck["a" /* default */])(this, Listener); |
|
446 |
|
447 this.listeners = {}; |
|
448 this.handleEvent = this.handleEvent.bind(this); |
|
449 } |
|
450 |
|
451 Object(createClass["a" /* default */])(Listener, [{ |
|
452 key: "add", |
|
453 value: function add(eventType, instance) { |
|
454 if (!this.listeners[eventType]) { |
|
455 // Adding first listener for this type, so bind event. |
|
456 window.addEventListener(eventType, this.handleEvent); |
|
457 this.listeners[eventType] = []; |
|
458 } |
|
459 |
|
460 this.listeners[eventType].push(instance); |
|
461 } |
|
462 }, { |
|
463 key: "remove", |
|
464 value: function remove(eventType, instance) { |
|
465 this.listeners[eventType] = Object(external_lodash_["without"])(this.listeners[eventType], instance); |
|
466 |
|
467 if (!this.listeners[eventType].length) { |
|
468 // Removing last listener for this type, so unbind event. |
|
469 window.removeEventListener(eventType, this.handleEvent); |
|
470 delete this.listeners[eventType]; |
|
471 } |
|
472 } |
|
473 }, { |
|
474 key: "handleEvent", |
|
475 value: function handleEvent(event) { |
|
476 Object(external_lodash_["forEach"])(this.listeners[event.type], function (instance) { |
|
477 instance.handleEvent(event); |
|
478 }); |
|
479 } |
|
480 }]); |
|
481 |
|
482 return Listener; |
|
483 }(); |
|
484 |
|
485 /* harmony default export */ var listener = (listener_Listener); |
|
486 |
|
487 // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/with-global-events/index.js |
|
488 |
|
489 |
|
490 |
|
491 |
|
492 |
|
493 |
|
494 |
|
495 |
|
496 |
|
497 /** |
|
498 * External dependencies |
|
499 */ |
|
500 |
|
501 /** |
|
502 * WordPress dependencies |
|
503 */ |
|
504 |
|
505 |
|
506 /** |
|
507 * Internal dependencies |
|
508 */ |
|
509 |
|
510 |
|
511 |
|
512 /** |
|
513 * Listener instance responsible for managing document event handling. |
|
514 * |
|
515 * @type {Listener} |
|
516 */ |
|
517 |
|
518 var with_global_events_listener = new listener(); |
|
519 |
|
520 function withGlobalEvents(eventTypesToHandlers) { |
|
521 return create_higher_order_component(function (WrappedComponent) { |
|
522 var Wrapper = |
|
523 /*#__PURE__*/ |
|
524 function (_Component) { |
|
525 Object(inherits["a" /* default */])(Wrapper, _Component); |
|
526 |
|
527 function Wrapper() { |
|
528 var _this; |
|
529 |
|
530 Object(classCallCheck["a" /* default */])(this, Wrapper); |
|
531 |
|
532 _this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(Wrapper).apply(this, arguments)); |
|
533 _this.handleEvent = _this.handleEvent.bind(Object(assertThisInitialized["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this))); |
|
534 _this.handleRef = _this.handleRef.bind(Object(assertThisInitialized["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this))); |
|
535 return _this; |
|
536 } |
|
537 |
|
538 Object(createClass["a" /* default */])(Wrapper, [{ |
|
539 key: "componentDidMount", |
|
540 value: function componentDidMount() { |
|
541 var _this2 = this; |
|
542 |
|
543 Object(external_lodash_["forEach"])(eventTypesToHandlers, function (handler, eventType) { |
|
544 with_global_events_listener.add(eventType, _this2); |
|
545 }); |
|
546 } |
|
547 }, { |
|
548 key: "componentWillUnmount", |
|
549 value: function componentWillUnmount() { |
|
550 var _this3 = this; |
|
551 |
|
552 Object(external_lodash_["forEach"])(eventTypesToHandlers, function (handler, eventType) { |
|
553 with_global_events_listener.remove(eventType, _this3); |
|
554 }); |
|
555 } |
|
556 }, { |
|
557 key: "handleEvent", |
|
558 value: function handleEvent(event) { |
|
559 var handler = eventTypesToHandlers[event.type]; |
|
560 |
|
561 if (typeof this.wrappedRef[handler] === 'function') { |
|
562 this.wrappedRef[handler](event); |
|
563 } |
|
564 } |
|
565 }, { |
|
566 key: "handleRef", |
|
567 value: function handleRef(el) { |
|
568 this.wrappedRef = el; // Any component using `withGlobalEvents` that is not setting a `ref` |
|
569 // will cause `this.props.forwardedRef` to be `null`, so we need this |
|
570 // check. |
|
571 |
|
572 if (this.props.forwardedRef) { |
|
573 this.props.forwardedRef(el); |
|
574 } |
|
575 } |
|
576 }, { |
|
577 key: "render", |
|
578 value: function render() { |
|
579 return Object(external_this_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({}, this.props.ownProps, { |
|
580 ref: this.handleRef |
|
581 })); |
|
582 } |
|
583 }]); |
|
584 |
|
585 return Wrapper; |
|
586 }(external_this_wp_element_["Component"]); |
|
587 |
|
588 return Object(external_this_wp_element_["forwardRef"])(function (props, ref) { |
|
589 return Object(external_this_wp_element_["createElement"])(Wrapper, { |
|
590 ownProps: props, |
|
591 forwardedRef: ref |
|
592 }); |
|
593 }); |
|
594 }, 'withGlobalEvents'); |
|
595 } |
|
596 |
|
597 /* harmony default export */ var with_global_events = (withGlobalEvents); |
|
598 |
|
599 // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/with-instance-id/index.js |
|
600 |
|
601 |
|
602 |
|
603 |
|
604 |
|
605 |
|
606 |
|
607 |
|
608 /** |
|
609 * WordPress dependencies |
|
610 */ |
|
611 |
|
612 /** |
|
613 * Internal dependencies |
|
614 */ |
|
615 |
|
616 |
|
617 /** |
|
618 * A Higher Order Component used to be provide a unique instance ID by |
|
619 * component. |
|
620 * |
|
621 * @param {WPElement} WrappedComponent The wrapped component. |
|
622 * |
|
623 * @return {Component} Component with an instanceId prop. |
|
624 */ |
|
625 |
|
626 /* harmony default export */ var with_instance_id = (create_higher_order_component(function (WrappedComponent) { |
|
627 var instances = 0; |
|
628 return ( |
|
629 /*#__PURE__*/ |
|
630 function (_Component) { |
|
631 Object(inherits["a" /* default */])(_class, _Component); |
|
632 |
|
633 function _class() { |
|
634 var _this; |
|
635 |
|
636 Object(classCallCheck["a" /* default */])(this, _class); |
|
637 |
|
638 _this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(_class).apply(this, arguments)); |
|
639 _this.instanceId = instances++; |
|
640 return _this; |
|
641 } |
|
642 |
|
643 Object(createClass["a" /* default */])(_class, [{ |
|
644 key: "render", |
|
645 value: function render() { |
|
646 return Object(external_this_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({}, this.props, { |
|
647 instanceId: this.instanceId |
|
648 })); |
|
649 } |
|
650 }]); |
|
651 |
|
652 return _class; |
|
653 }(external_this_wp_element_["Component"]) |
|
654 ); |
|
655 }, 'withInstanceId')); |
|
656 |
|
657 // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/with-safe-timeout/index.js |
|
658 |
|
659 |
|
660 |
|
661 |
|
662 |
|
663 |
|
664 |
|
665 |
|
666 |
|
667 /** |
|
668 * External dependencies |
|
669 */ |
|
670 |
|
671 /** |
|
672 * WordPress dependencies |
|
673 */ |
|
674 |
|
675 |
|
676 /** |
|
677 * Internal dependencies |
|
678 */ |
|
679 |
|
680 |
|
681 /** |
|
682 * A higher-order component used to provide and manage delayed function calls |
|
683 * that ought to be bound to a component's lifecycle. |
|
684 * |
|
685 * @param {Component} OriginalComponent Component requiring setTimeout |
|
686 * |
|
687 * @return {Component} Wrapped component. |
|
688 */ |
|
689 |
|
690 var withSafeTimeout = create_higher_order_component(function (OriginalComponent) { |
|
691 return ( |
|
692 /*#__PURE__*/ |
|
693 function (_Component) { |
|
694 Object(inherits["a" /* default */])(WrappedComponent, _Component); |
|
695 |
|
696 function WrappedComponent() { |
|
697 var _this; |
|
698 |
|
699 Object(classCallCheck["a" /* default */])(this, WrappedComponent); |
|
700 |
|
701 _this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(WrappedComponent).apply(this, arguments)); |
|
702 _this.timeouts = []; |
|
703 _this.setTimeout = _this.setTimeout.bind(Object(assertThisInitialized["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this))); |
|
704 _this.clearTimeout = _this.clearTimeout.bind(Object(assertThisInitialized["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this))); |
|
705 return _this; |
|
706 } |
|
707 |
|
708 Object(createClass["a" /* default */])(WrappedComponent, [{ |
|
709 key: "componentWillUnmount", |
|
710 value: function componentWillUnmount() { |
|
711 this.timeouts.forEach(clearTimeout); |
|
712 } |
|
713 }, { |
|
714 key: "setTimeout", |
|
715 value: function (_setTimeout) { |
|
716 function setTimeout(_x, _x2) { |
|
717 return _setTimeout.apply(this, arguments); |
|
718 } |
|
719 |
|
720 setTimeout.toString = function () { |
|
721 return _setTimeout.toString(); |
|
722 }; |
|
723 |
|
724 return setTimeout; |
|
725 }(function (fn, delay) { |
|
726 var _this2 = this; |
|
727 |
|
728 var id = setTimeout(function () { |
|
729 fn(); |
|
730 |
|
731 _this2.clearTimeout(id); |
|
732 }, delay); |
|
733 this.timeouts.push(id); |
|
734 return id; |
|
735 }) |
|
736 }, { |
|
737 key: "clearTimeout", |
|
738 value: function (_clearTimeout) { |
|
739 function clearTimeout(_x3) { |
|
740 return _clearTimeout.apply(this, arguments); |
|
741 } |
|
742 |
|
743 clearTimeout.toString = function () { |
|
744 return _clearTimeout.toString(); |
|
745 }; |
|
746 |
|
747 return clearTimeout; |
|
748 }(function (id) { |
|
749 clearTimeout(id); |
|
750 this.timeouts = Object(external_lodash_["without"])(this.timeouts, id); |
|
751 }) |
|
752 }, { |
|
753 key: "render", |
|
754 value: function render() { |
|
755 return Object(external_this_wp_element_["createElement"])(OriginalComponent, Object(esm_extends["a" /* default */])({}, this.props, { |
|
756 setTimeout: this.setTimeout, |
|
757 clearTimeout: this.clearTimeout |
|
758 })); |
|
759 } |
|
760 }]); |
|
761 |
|
762 return WrappedComponent; |
|
763 }(external_this_wp_element_["Component"]) |
|
764 ); |
|
765 }, 'withSafeTimeout'); |
|
766 /* harmony default export */ var with_safe_timeout = (withSafeTimeout); |
|
767 |
|
768 // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/with-state/index.js |
|
769 |
|
770 |
|
771 |
|
772 |
|
773 |
|
774 |
|
775 |
|
776 |
|
777 |
|
778 /** |
|
779 * WordPress dependencies |
|
780 */ |
|
781 |
|
782 /** |
|
783 * Internal dependencies |
|
784 */ |
|
785 |
|
786 |
|
787 /** |
|
788 * A Higher Order Component used to provide and manage internal component state |
|
789 * via props. |
|
790 * |
|
791 * @param {?Object} initialState Optional initial state of the component. |
|
792 * |
|
793 * @return {Component} Wrapped component. |
|
794 */ |
|
795 |
|
796 function withState() { |
|
797 var initialState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
|
798 return create_higher_order_component(function (OriginalComponent) { |
|
799 return ( |
|
800 /*#__PURE__*/ |
|
801 function (_Component) { |
|
802 Object(inherits["a" /* default */])(WrappedComponent, _Component); |
|
803 |
|
804 function WrappedComponent() { |
|
805 var _this; |
|
806 |
|
807 Object(classCallCheck["a" /* default */])(this, WrappedComponent); |
|
808 |
|
809 _this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(WrappedComponent).apply(this, arguments)); |
|
810 _this.setState = _this.setState.bind(Object(assertThisInitialized["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this))); |
|
811 _this.state = initialState; |
|
812 return _this; |
|
813 } |
|
814 |
|
815 Object(createClass["a" /* default */])(WrappedComponent, [{ |
|
816 key: "render", |
|
817 value: function render() { |
|
818 return Object(external_this_wp_element_["createElement"])(OriginalComponent, Object(esm_extends["a" /* default */])({}, this.props, this.state, { |
|
819 setState: this.setState |
|
820 })); |
|
821 } |
|
822 }]); |
|
823 |
|
824 return WrappedComponent; |
|
825 }(external_this_wp_element_["Component"]) |
|
826 ); |
|
827 }, 'withState'); |
|
828 } |
|
829 |
|
830 // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/index.js |
|
831 /* concated harmony reexport createHigherOrderComponent */__webpack_require__.d(__webpack_exports__, "createHigherOrderComponent", function() { return create_higher_order_component; }); |
|
832 /* concated harmony reexport ifCondition */__webpack_require__.d(__webpack_exports__, "ifCondition", function() { return if_condition; }); |
|
833 /* concated harmony reexport pure */__webpack_require__.d(__webpack_exports__, "pure", function() { return build_module_pure; }); |
|
834 /* concated harmony reexport withGlobalEvents */__webpack_require__.d(__webpack_exports__, "withGlobalEvents", function() { return with_global_events; }); |
|
835 /* concated harmony reexport withInstanceId */__webpack_require__.d(__webpack_exports__, "withInstanceId", function() { return with_instance_id; }); |
|
836 /* concated harmony reexport withSafeTimeout */__webpack_require__.d(__webpack_exports__, "withSafeTimeout", function() { return with_safe_timeout; }); |
|
837 /* concated harmony reexport withState */__webpack_require__.d(__webpack_exports__, "withState", function() { return withState; }); |
|
838 /* concated harmony reexport compose */__webpack_require__.d(__webpack_exports__, "compose", function() { return external_lodash_["flowRight"]; }); |
|
839 /** |
|
840 * External dependencies |
|
841 */ |
|
842 |
|
843 |
|
844 |
|
845 |
|
846 |
|
847 |
|
848 |
|
849 |
|
850 /** |
|
851 * Composes multiple higher-order components into a single higher-order component. Performs right-to-left function |
|
852 * composition, where each successive invocation is supplied the return value of the previous. |
|
853 * |
|
854 * @param {...Function} hocs The HOC functions to invoke. |
|
855 * |
|
856 * @return {Function} Returns the new composite function. |
|
857 */ |
|
858 |
|
859 |
|
860 |
|
861 |
|
862 /***/ }), |
|
863 |
|
864 /***/ 42: |
|
865 /***/ (function(module, exports) { |
|
866 |
|
867 (function() { module.exports = this["wp"]["isShallowEqual"]; }()); |
|
868 |
|
869 /***/ }), |
|
870 |
|
871 /***/ 9: |
|
872 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
873 |
|
874 "use strict"; |
|
875 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; }); |
|
876 function _defineProperties(target, props) { |
|
877 for (var i = 0; i < props.length; i++) { |
|
878 var descriptor = props[i]; |
|
879 descriptor.enumerable = descriptor.enumerable || false; |
|
880 descriptor.configurable = true; |
|
881 if ("value" in descriptor) descriptor.writable = true; |
|
882 Object.defineProperty(target, descriptor.key, descriptor); |
|
883 } |
|
884 } |
|
885 |
|
886 function _createClass(Constructor, protoProps, staticProps) { |
|
887 if (protoProps) _defineProperties(Constructor.prototype, protoProps); |
|
888 if (staticProps) _defineProperties(Constructor, staticProps); |
|
889 return Constructor; |
|
890 } |
|
891 |
|
892 /***/ }) |
|
893 |
|
894 /******/ }); |