123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263 |
- this["wp"] = this["wp"] || {}; this["wp"]["compose"] =
- /******/ (function(modules) { // webpackBootstrap
- /******/ // The module cache
- /******/ var installedModules = {};
- /******/
- /******/ // The require function
- /******/ function __webpack_require__(moduleId) {
- /******/
- /******/ // Check if module is in cache
- /******/ if(installedModules[moduleId]) {
- /******/ return installedModules[moduleId].exports;
- /******/ }
- /******/ // Create a new module (and put it into the cache)
- /******/ var module = installedModules[moduleId] = {
- /******/ i: moduleId,
- /******/ l: false,
- /******/ exports: {}
- /******/ };
- /******/
- /******/ // Execute the module function
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
- /******/
- /******/ // Flag the module as loaded
- /******/ module.l = true;
- /******/
- /******/ // Return the exports of the module
- /******/ return module.exports;
- /******/ }
- /******/
- /******/
- /******/ // expose the modules object (__webpack_modules__)
- /******/ __webpack_require__.m = modules;
- /******/
- /******/ // expose the module cache
- /******/ __webpack_require__.c = installedModules;
- /******/
- /******/ // define getter function for harmony exports
- /******/ __webpack_require__.d = function(exports, name, getter) {
- /******/ if(!__webpack_require__.o(exports, name)) {
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
- /******/ }
- /******/ };
- /******/
- /******/ // define __esModule on exports
- /******/ __webpack_require__.r = function(exports) {
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
- /******/ }
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
- /******/ };
- /******/
- /******/ // create a fake namespace object
- /******/ // mode & 1: value is a module id, require it
- /******/ // mode & 2: merge all properties of value into the ns
- /******/ // mode & 4: return value when already ns object
- /******/ // mode & 8|1: behave like require
- /******/ __webpack_require__.t = function(value, mode) {
- /******/ if(mode & 1) value = __webpack_require__(value);
- /******/ if(mode & 8) return value;
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
- /******/ var ns = Object.create(null);
- /******/ __webpack_require__.r(ns);
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
- /******/ return ns;
- /******/ };
- /******/
- /******/ // getDefaultExport function for compatibility with non-harmony modules
- /******/ __webpack_require__.n = function(module) {
- /******/ var getter = module && module.__esModule ?
- /******/ function getDefault() { return module['default']; } :
- /******/ function getModuleExports() { return module; };
- /******/ __webpack_require__.d(getter, 'a', getter);
- /******/ return getter;
- /******/ };
- /******/
- /******/ // Object.prototype.hasOwnProperty.call
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
- /******/
- /******/ // __webpack_public_path__
- /******/ __webpack_require__.p = "";
- /******/
- /******/
- /******/ // Load entry module and return exports
- /******/ return __webpack_require__(__webpack_require__.s = 354);
- /******/ })
- /************************************************************************/
- /******/ ({
- /***/ 0:
- /***/ (function(module, exports) {
- (function() { module.exports = this["wp"]["element"]; }());
- /***/ }),
- /***/ 11:
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; });
- function _defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || false;
- descriptor.configurable = true;
- if ("value" in descriptor) descriptor.writable = true;
- Object.defineProperty(target, descriptor.key, descriptor);
- }
- }
- function _createClass(Constructor, protoProps, staticProps) {
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
- if (staticProps) _defineProperties(Constructor, staticProps);
- return Constructor;
- }
- /***/ }),
- /***/ 110:
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useMediaQuery; });
- /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23);
- /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
- /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
- /**
- * WordPress dependencies
- */
- /**
- * Runs a media query and returns its value when it changes.
- *
- * @param {string} query Media Query.
- * @return {boolean} return value of the media query.
- */
- function useMediaQuery(query) {
- var _useState = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["useState"])(false),
- _useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_useState, 2),
- match = _useState2[0],
- setMatch = _useState2[1];
- Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["useEffect"])(function () {
- var updateMatch = function updateMatch() {
- return setMatch(window.matchMedia(query).matches);
- };
- updateMatch();
- var list = window.matchMedia(query);
- list.addListener(updateMatch);
- return function () {
- list.removeListener(updateMatch);
- };
- }, [query]);
- return match;
- }
- /***/ }),
- /***/ 12:
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; });
- function _classCallCheck(instance, Constructor) {
- if (!(instance instanceof Constructor)) {
- throw new TypeError("Cannot call a class as a function");
- }
- }
- /***/ }),
- /***/ 13:
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; });
- /* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(31);
- /* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
- function _possibleConstructorReturn(self, call) {
- if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) {
- return call;
- }
- return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self);
- }
- /***/ }),
- /***/ 14:
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; });
- function _getPrototypeOf(o) {
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
- return o.__proto__ || Object.getPrototypeOf(o);
- };
- return _getPrototypeOf(o);
- }
- /***/ }),
- /***/ 15:
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
- function _setPrototypeOf(o, p) {
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
- o.__proto__ = p;
- return o;
- };
- return _setPrototypeOf(o, p);
- }
- // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _inherits; });
- function _inherits(subClass, superClass) {
- if (typeof superClass !== "function" && superClass !== null) {
- throw new TypeError("Super expression must either be null or a function");
- }
- subClass.prototype = Object.create(superClass && superClass.prototype, {
- constructor: {
- value: subClass,
- writable: true,
- configurable: true
- }
- });
- if (superClass) _setPrototypeOf(subClass, superClass);
- }
- /***/ }),
- /***/ 18:
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
- function _extends() {
- _extends = Object.assign || function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
- }
- return target;
- };
- return _extends.apply(this, arguments);
- }
- /***/ }),
- /***/ 2:
- /***/ (function(module, exports) {
- (function() { module.exports = this["lodash"]; }());
- /***/ }),
- /***/ 210:
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var _use_media_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(110);
- /**
- * Internal dependencies
- */
- /**
- * Whether or not the user agent is Internet Explorer.
- *
- * @type {boolean}
- */
- var IS_IE = typeof window !== 'undefined' && window.navigator.userAgent.indexOf('Trident') >= 0;
- /**
- * Hook returning whether the user has a preference for reduced motion.
- *
- * @return {boolean} Reduced motion preference value.
- */
- var useReducedMotion = process.env.FORCE_REDUCED_MOTION || IS_IE ? function () {
- return true;
- } : function () {
- return Object(_use_media_query__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])('(prefers-reduced-motion: reduce)');
- };
- /* harmony default export */ __webpack_exports__["a"] = (useReducedMotion);
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(316)))
- /***/ }),
- /***/ 23:
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
- var arrayWithHoles = __webpack_require__(38);
- // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
- function _iterableToArrayLimit(arr, i) {
- var _arr = [];
- var _n = true;
- var _d = false;
- var _e = undefined;
- try {
- for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
- _arr.push(_s.value);
- if (i && _arr.length === i) break;
- }
- } catch (err) {
- _d = true;
- _e = err;
- } finally {
- try {
- if (!_n && _i["return"] != null) _i["return"]();
- } finally {
- if (_d) throw _e;
- }
- }
- return _arr;
- }
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
- var nonIterableRest = __webpack_require__(39);
- // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _slicedToArray; });
- function _slicedToArray(arr, i) {
- return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(nonIterableRest["a" /* default */])();
- }
- /***/ }),
- /***/ 31:
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; });
- 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); }
- function _typeof(obj) {
- if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
- _typeof = function _typeof(obj) {
- return _typeof2(obj);
- };
- } else {
- _typeof = function _typeof(obj) {
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
- };
- }
- return _typeof(obj);
- }
- /***/ }),
- /***/ 316:
- /***/ (function(module, exports) {
- // shim for using process in browser
- var process = module.exports = {};
- // cached from whatever global is present so that test runners that stub it
- // don't break things. But we need to wrap it in a try catch in case it is
- // wrapped in strict mode code which doesn't define any globals. It's inside a
- // function because try/catches deoptimize in certain engines.
- var cachedSetTimeout;
- var cachedClearTimeout;
- function defaultSetTimout() {
- throw new Error('setTimeout has not been defined');
- }
- function defaultClearTimeout () {
- throw new Error('clearTimeout has not been defined');
- }
- (function () {
- try {
- if (typeof setTimeout === 'function') {
- cachedSetTimeout = setTimeout;
- } else {
- cachedSetTimeout = defaultSetTimout;
- }
- } catch (e) {
- cachedSetTimeout = defaultSetTimout;
- }
- try {
- if (typeof clearTimeout === 'function') {
- cachedClearTimeout = clearTimeout;
- } else {
- cachedClearTimeout = defaultClearTimeout;
- }
- } catch (e) {
- cachedClearTimeout = defaultClearTimeout;
- }
- } ())
- function runTimeout(fun) {
- if (cachedSetTimeout === setTimeout) {
- //normal enviroments in sane situations
- return setTimeout(fun, 0);
- }
- // if setTimeout wasn't available but was latter defined
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
- cachedSetTimeout = setTimeout;
- return setTimeout(fun, 0);
- }
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedSetTimeout(fun, 0);
- } catch(e){
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedSetTimeout.call(null, fun, 0);
- } catch(e){
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
- return cachedSetTimeout.call(this, fun, 0);
- }
- }
- }
- function runClearTimeout(marker) {
- if (cachedClearTimeout === clearTimeout) {
- //normal enviroments in sane situations
- return clearTimeout(marker);
- }
- // if clearTimeout wasn't available but was latter defined
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
- cachedClearTimeout = clearTimeout;
- return clearTimeout(marker);
- }
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedClearTimeout(marker);
- } catch (e){
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedClearTimeout.call(null, marker);
- } catch (e){
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
- return cachedClearTimeout.call(this, marker);
- }
- }
- }
- var queue = [];
- var draining = false;
- var currentQueue;
- var queueIndex = -1;
- function cleanUpNextTick() {
- if (!draining || !currentQueue) {
- return;
- }
- draining = false;
- if (currentQueue.length) {
- queue = currentQueue.concat(queue);
- } else {
- queueIndex = -1;
- }
- if (queue.length) {
- drainQueue();
- }
- }
- function drainQueue() {
- if (draining) {
- return;
- }
- var timeout = runTimeout(cleanUpNextTick);
- draining = true;
- var len = queue.length;
- while(len) {
- currentQueue = queue;
- queue = [];
- while (++queueIndex < len) {
- if (currentQueue) {
- currentQueue[queueIndex].run();
- }
- }
- queueIndex = -1;
- len = queue.length;
- }
- currentQueue = null;
- draining = false;
- runClearTimeout(timeout);
- }
- process.nextTick = function (fun) {
- var args = new Array(arguments.length - 1);
- if (arguments.length > 1) {
- for (var i = 1; i < arguments.length; i++) {
- args[i - 1] = arguments[i];
- }
- }
- queue.push(new Item(fun, args));
- if (queue.length === 1 && !draining) {
- runTimeout(drainQueue);
- }
- };
- // v8 likes predictible objects
- function Item(fun, array) {
- this.fun = fun;
- this.array = array;
- }
- Item.prototype.run = function () {
- this.fun.apply(null, this.array);
- };
- process.title = 'browser';
- process.browser = true;
- process.env = {};
- process.argv = [];
- process.version = ''; // empty string to avoid regexp issues
- process.versions = {};
- function noop() {}
- process.on = noop;
- process.addListener = noop;
- process.once = noop;
- process.off = noop;
- process.removeListener = noop;
- process.removeAllListeners = noop;
- process.emit = noop;
- process.prependListener = noop;
- process.prependOnceListener = noop;
- process.listeners = function (name) { return [] }
- process.binding = function (name) {
- throw new Error('process.binding is not supported');
- };
- process.cwd = function () { return '/' };
- process.chdir = function (dir) {
- throw new Error('process.chdir is not supported');
- };
- process.umask = function() { return 0; };
- /***/ }),
- /***/ 354:
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- // EXTERNAL MODULE: external "lodash"
- var external_lodash_ = __webpack_require__(2);
- // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/utils/create-higher-order-component/index.js
- /**
- * External dependencies
- */
- /**
- * Given a function mapping a component to an enhanced component and modifier
- * name, returns the enhanced component augmented with a generated displayName.
- *
- * @param {Function} mapComponentToEnhancedComponent Function mapping component
- * to enhanced component.
- * @param {string} modifierName Seed name from which to
- * generated display name.
- *
- * @return {WPComponent} Component class with generated display name assigned.
- */
- function createHigherOrderComponent(mapComponentToEnhancedComponent, modifierName) {
- return function (OriginalComponent) {
- var EnhancedComponent = mapComponentToEnhancedComponent(OriginalComponent);
- var _OriginalComponent$di = OriginalComponent.displayName,
- displayName = _OriginalComponent$di === void 0 ? OriginalComponent.name || 'Component' : _OriginalComponent$di;
- EnhancedComponent.displayName = "".concat(Object(external_lodash_["upperFirst"])(Object(external_lodash_["camelCase"])(modifierName)), "(").concat(displayName, ")");
- return EnhancedComponent;
- };
- }
- /* harmony default export */ var create_higher_order_component = (createHigherOrderComponent);
- // EXTERNAL MODULE: external {"this":["wp","element"]}
- var external_this_wp_element_ = __webpack_require__(0);
- // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/if-condition/index.js
- /**
- * Internal dependencies
- */
- /**
- * Higher-order component creator, creating a new component which renders if
- * the given condition is satisfied or with the given optional prop name.
- *
- * @param {Function} predicate Function to test condition.
- *
- * @return {Function} Higher-order component.
- */
- var if_condition_ifCondition = function ifCondition(predicate) {
- return create_higher_order_component(function (WrappedComponent) {
- return function (props) {
- if (!predicate(props)) {
- return null;
- }
- return Object(external_this_wp_element_["createElement"])(WrappedComponent, props);
- };
- }, 'ifCondition');
- };
- /* harmony default export */ var if_condition = (if_condition_ifCondition);
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
- var classCallCheck = __webpack_require__(12);
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
- var createClass = __webpack_require__(11);
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
- var possibleConstructorReturn = __webpack_require__(13);
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
- var getPrototypeOf = __webpack_require__(14);
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
- var inherits = __webpack_require__(15);
- // EXTERNAL MODULE: external {"this":["wp","isShallowEqual"]}
- var external_this_wp_isShallowEqual_ = __webpack_require__(41);
- var external_this_wp_isShallowEqual_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_isShallowEqual_);
- // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/pure/index.js
- /**
- * WordPress dependencies
- */
- /**
- * Internal dependencies
- */
- /**
- * Given a component returns the enhanced component augmented with a component
- * only rerendering when its props/state change
- *
- * @param {Function} mapComponentToEnhancedComponent Function mapping component
- * to enhanced component.
- * @param {string} modifierName Seed name from which to
- * generated display name.
- *
- * @return {WPComponent} Component class with generated display name assigned.
- */
- var pure = create_higher_order_component(function (Wrapped) {
- if (Wrapped.prototype instanceof external_this_wp_element_["Component"]) {
- return (
- /*#__PURE__*/
- function (_Wrapped) {
- Object(inherits["a" /* default */])(_class, _Wrapped);
- function _class() {
- Object(classCallCheck["a" /* default */])(this, _class);
- return Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(_class).apply(this, arguments));
- }
- Object(createClass["a" /* default */])(_class, [{
- key: "shouldComponentUpdate",
- value: function shouldComponentUpdate(nextProps, nextState) {
- return !external_this_wp_isShallowEqual_default()(nextProps, this.props) || !external_this_wp_isShallowEqual_default()(nextState, this.state);
- }
- }]);
- return _class;
- }(Wrapped)
- );
- }
- return (
- /*#__PURE__*/
- function (_Component) {
- Object(inherits["a" /* default */])(_class2, _Component);
- function _class2() {
- Object(classCallCheck["a" /* default */])(this, _class2);
- return Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(_class2).apply(this, arguments));
- }
- Object(createClass["a" /* default */])(_class2, [{
- key: "shouldComponentUpdate",
- value: function shouldComponentUpdate(nextProps) {
- return !external_this_wp_isShallowEqual_default()(nextProps, this.props);
- }
- }, {
- key: "render",
- value: function render() {
- return Object(external_this_wp_element_["createElement"])(Wrapped, this.props);
- }
- }]);
- return _class2;
- }(external_this_wp_element_["Component"])
- );
- }, 'pure');
- /* harmony default export */ var higher_order_pure = (pure);
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
- var esm_extends = __webpack_require__(18);
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
- var assertThisInitialized = __webpack_require__(5);
- // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/with-global-events/listener.js
- /**
- * External dependencies
- */
- /**
- * Class responsible for orchestrating event handling on the global window,
- * binding a single event to be shared across all handling instances, and
- * removing the handler when no instances are listening for the event.
- */
- var listener_Listener =
- /*#__PURE__*/
- function () {
- function Listener() {
- Object(classCallCheck["a" /* default */])(this, Listener);
- this.listeners = {};
- this.handleEvent = this.handleEvent.bind(this);
- }
- Object(createClass["a" /* default */])(Listener, [{
- key: "add",
- value: function add(eventType, instance) {
- if (!this.listeners[eventType]) {
- // Adding first listener for this type, so bind event.
- window.addEventListener(eventType, this.handleEvent);
- this.listeners[eventType] = [];
- }
- this.listeners[eventType].push(instance);
- }
- }, {
- key: "remove",
- value: function remove(eventType, instance) {
- this.listeners[eventType] = Object(external_lodash_["without"])(this.listeners[eventType], instance);
- if (!this.listeners[eventType].length) {
- // Removing last listener for this type, so unbind event.
- window.removeEventListener(eventType, this.handleEvent);
- delete this.listeners[eventType];
- }
- }
- }, {
- key: "handleEvent",
- value: function handleEvent(event) {
- Object(external_lodash_["forEach"])(this.listeners[event.type], function (instance) {
- instance.handleEvent(event);
- });
- }
- }]);
- return Listener;
- }();
- /* harmony default export */ var listener = (listener_Listener);
- // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/with-global-events/index.js
- /**
- * External dependencies
- */
- /**
- * WordPress dependencies
- */
- /**
- * Internal dependencies
- */
- /**
- * Listener instance responsible for managing document event handling.
- *
- * @type {Listener}
- */
- var with_global_events_listener = new listener();
- /**
- * Higher-order component creator which, given an object of DOM event types and
- * values corresponding to a callback function name on the component, will
- * create or update a window event handler to invoke the callback when an event
- * occurs. On behalf of the consuming developer, the higher-order component
- * manages unbinding when the component unmounts, and binding at most a single
- * event handler for the entire application.
- *
- * @param {Object<string,string>} eventTypesToHandlers Object with keys of DOM
- * event type, the value a
- * name of the function on
- * the original component's
- * instance which handles
- * the event.
- *
- * @return {Function} Higher-order component.
- */
- function withGlobalEvents(eventTypesToHandlers) {
- return create_higher_order_component(function (WrappedComponent) {
- var Wrapper =
- /*#__PURE__*/
- function (_Component) {
- Object(inherits["a" /* default */])(Wrapper, _Component);
- function Wrapper() {
- var _this;
- Object(classCallCheck["a" /* default */])(this, Wrapper);
- _this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(Wrapper).apply(this, arguments));
- _this.handleEvent = _this.handleEvent.bind(Object(assertThisInitialized["a" /* default */])(_this));
- _this.handleRef = _this.handleRef.bind(Object(assertThisInitialized["a" /* default */])(_this));
- return _this;
- }
- Object(createClass["a" /* default */])(Wrapper, [{
- key: "componentDidMount",
- value: function componentDidMount() {
- var _this2 = this;
- Object(external_lodash_["forEach"])(eventTypesToHandlers, function (handler, eventType) {
- with_global_events_listener.add(eventType, _this2);
- });
- }
- }, {
- key: "componentWillUnmount",
- value: function componentWillUnmount() {
- var _this3 = this;
- Object(external_lodash_["forEach"])(eventTypesToHandlers, function (handler, eventType) {
- with_global_events_listener.remove(eventType, _this3);
- });
- }
- }, {
- key: "handleEvent",
- value: function handleEvent(event) {
- var handler = eventTypesToHandlers[event.type];
- if (typeof this.wrappedRef[handler] === 'function') {
- this.wrappedRef[handler](event);
- }
- }
- }, {
- key: "handleRef",
- value: function handleRef(el) {
- this.wrappedRef = el; // Any component using `withGlobalEvents` that is not setting a `ref`
- // will cause `this.props.forwardedRef` to be `null`, so we need this
- // check.
- if (this.props.forwardedRef) {
- this.props.forwardedRef(el);
- }
- }
- }, {
- key: "render",
- value: function render() {
- return Object(external_this_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({}, this.props.ownProps, {
- ref: this.handleRef
- }));
- }
- }]);
- return Wrapper;
- }(external_this_wp_element_["Component"]);
- return Object(external_this_wp_element_["forwardRef"])(function (props, ref) {
- return Object(external_this_wp_element_["createElement"])(Wrapper, {
- ownProps: props,
- forwardedRef: ref
- });
- });
- }, 'withGlobalEvents');
- }
- /* harmony default export */ var with_global_events = (withGlobalEvents);
- // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/with-instance-id/index.js
- /**
- * WordPress dependencies
- */
- /**
- * Internal dependencies
- */
- /**
- * A Higher Order Component used to be provide a unique instance ID by
- * component.
- *
- * @param {WPElement} WrappedComponent The wrapped component.
- *
- * @return {Component} Component with an instanceId prop.
- */
- /* harmony default export */ var with_instance_id = (create_higher_order_component(function (WrappedComponent) {
- var instances = 0;
- return (
- /*#__PURE__*/
- function (_Component) {
- Object(inherits["a" /* default */])(_class, _Component);
- function _class() {
- var _this;
- Object(classCallCheck["a" /* default */])(this, _class);
- _this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(_class).apply(this, arguments));
- _this.instanceId = instances++;
- return _this;
- }
- Object(createClass["a" /* default */])(_class, [{
- key: "render",
- value: function render() {
- return Object(external_this_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({}, this.props, {
- instanceId: this.instanceId
- }));
- }
- }]);
- return _class;
- }(external_this_wp_element_["Component"])
- );
- }, 'withInstanceId'));
- // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/with-safe-timeout/index.js
- /**
- * External dependencies
- */
- /**
- * WordPress dependencies
- */
- /**
- * Internal dependencies
- */
- /**
- * A higher-order component used to provide and manage delayed function calls
- * that ought to be bound to a component's lifecycle.
- *
- * @param {Component} OriginalComponent Component requiring setTimeout
- *
- * @return {Component} Wrapped component.
- */
- var withSafeTimeout = create_higher_order_component(function (OriginalComponent) {
- return (
- /*#__PURE__*/
- function (_Component) {
- Object(inherits["a" /* default */])(WrappedComponent, _Component);
- function WrappedComponent() {
- var _this;
- Object(classCallCheck["a" /* default */])(this, WrappedComponent);
- _this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(WrappedComponent).apply(this, arguments));
- _this.timeouts = [];
- _this.setTimeout = _this.setTimeout.bind(Object(assertThisInitialized["a" /* default */])(_this));
- _this.clearTimeout = _this.clearTimeout.bind(Object(assertThisInitialized["a" /* default */])(_this));
- return _this;
- }
- Object(createClass["a" /* default */])(WrappedComponent, [{
- key: "componentWillUnmount",
- value: function componentWillUnmount() {
- this.timeouts.forEach(clearTimeout);
- }
- }, {
- key: "setTimeout",
- value: function (_setTimeout) {
- function setTimeout(_x, _x2) {
- return _setTimeout.apply(this, arguments);
- }
- setTimeout.toString = function () {
- return _setTimeout.toString();
- };
- return setTimeout;
- }(function (fn, delay) {
- var _this2 = this;
- var id = setTimeout(function () {
- fn();
- _this2.clearTimeout(id);
- }, delay);
- this.timeouts.push(id);
- return id;
- })
- }, {
- key: "clearTimeout",
- value: function (_clearTimeout) {
- function clearTimeout(_x3) {
- return _clearTimeout.apply(this, arguments);
- }
- clearTimeout.toString = function () {
- return _clearTimeout.toString();
- };
- return clearTimeout;
- }(function (id) {
- clearTimeout(id);
- this.timeouts = Object(external_lodash_["without"])(this.timeouts, id);
- })
- }, {
- key: "render",
- value: function render() {
- return Object(external_this_wp_element_["createElement"])(OriginalComponent, Object(esm_extends["a" /* default */])({}, this.props, {
- setTimeout: this.setTimeout,
- clearTimeout: this.clearTimeout
- }));
- }
- }]);
- return WrappedComponent;
- }(external_this_wp_element_["Component"])
- );
- }, 'withSafeTimeout');
- /* harmony default export */ var with_safe_timeout = (withSafeTimeout);
- // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/with-state/index.js
- /**
- * WordPress dependencies
- */
- /**
- * Internal dependencies
- */
- /**
- * A Higher Order Component used to provide and manage internal component state
- * via props.
- *
- * @param {?Object} initialState Optional initial state of the component.
- *
- * @return {Component} Wrapped component.
- */
- function withState() {
- var initialState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
- return create_higher_order_component(function (OriginalComponent) {
- return (
- /*#__PURE__*/
- function (_Component) {
- Object(inherits["a" /* default */])(WrappedComponent, _Component);
- function WrappedComponent() {
- var _this;
- Object(classCallCheck["a" /* default */])(this, WrappedComponent);
- _this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(WrappedComponent).apply(this, arguments));
- _this.setState = _this.setState.bind(Object(assertThisInitialized["a" /* default */])(_this));
- _this.state = initialState;
- return _this;
- }
- Object(createClass["a" /* default */])(WrappedComponent, [{
- key: "render",
- value: function render() {
- return Object(external_this_wp_element_["createElement"])(OriginalComponent, Object(esm_extends["a" /* default */])({}, this.props, this.state, {
- setState: this.setState
- }));
- }
- }]);
- return WrappedComponent;
- }(external_this_wp_element_["Component"])
- );
- }, 'withState');
- }
- // EXTERNAL MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-media-query/index.js
- var use_media_query = __webpack_require__(110);
- // EXTERNAL MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-reduced-motion/index.js
- var use_reduced_motion = __webpack_require__(210);
- // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/index.js
- /* concated harmony reexport createHigherOrderComponent */__webpack_require__.d(__webpack_exports__, "createHigherOrderComponent", function() { return create_higher_order_component; });
- /* concated harmony reexport compose */__webpack_require__.d(__webpack_exports__, "compose", function() { return external_lodash_["flowRight"]; });
- /* concated harmony reexport ifCondition */__webpack_require__.d(__webpack_exports__, "ifCondition", function() { return if_condition; });
- /* concated harmony reexport pure */__webpack_require__.d(__webpack_exports__, "pure", function() { return higher_order_pure; });
- /* concated harmony reexport withGlobalEvents */__webpack_require__.d(__webpack_exports__, "withGlobalEvents", function() { return with_global_events; });
- /* concated harmony reexport withInstanceId */__webpack_require__.d(__webpack_exports__, "withInstanceId", function() { return with_instance_id; });
- /* concated harmony reexport withSafeTimeout */__webpack_require__.d(__webpack_exports__, "withSafeTimeout", function() { return with_safe_timeout; });
- /* concated harmony reexport withState */__webpack_require__.d(__webpack_exports__, "withState", function() { return withState; });
- /* concated harmony reexport useMediaQuery */__webpack_require__.d(__webpack_exports__, "useMediaQuery", function() { return use_media_query["a" /* default */]; });
- /* concated harmony reexport useReducedMotion */__webpack_require__.d(__webpack_exports__, "useReducedMotion", function() { return use_reduced_motion["a" /* default */]; });
- /**
- * External dependencies
- */
- // Utils
- /**
- * Composes multiple higher-order components into a single higher-order component. Performs right-to-left function
- * composition, where each successive invocation is supplied the return value of the previous.
- *
- * @param {...Function} hocs The HOC functions to invoke.
- *
- * @return {Function} Returns the new composite function.
- */
- // Higher-order components
- // Hooks
- /***/ }),
- /***/ 38:
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; });
- function _arrayWithHoles(arr) {
- if (Array.isArray(arr)) return arr;
- }
- /***/ }),
- /***/ 39:
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _nonIterableRest; });
- function _nonIterableRest() {
- throw new TypeError("Invalid attempt to destructure non-iterable instance");
- }
- /***/ }),
- /***/ 41:
- /***/ (function(module, exports) {
- (function() { module.exports = this["wp"]["isShallowEqual"]; }());
- /***/ }),
- /***/ 5:
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; });
- function _assertThisInitialized(self) {
- if (self === void 0) {
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
- }
- return self;
- }
- /***/ })
- /******/ });
|