[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/js/dist/ -> data.js (source)

   1  this["wp"] = this["wp"] || {}; this["wp"]["data"] =
   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 = 426);
  86  /******/ })
  87  /************************************************************************/
  88  /******/ ({
  89  
  90  /***/ 0:
  91  /***/ (function(module, exports) {
  92  
  93  (function() { module.exports = this["wp"]["element"]; }());
  94  
  95  /***/ }),
  96  
  97  /***/ 12:
  98  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  99  
 100  "use strict";
 101  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
 102  function _extends() {
 103    _extends = Object.assign || function (target) {
 104      for (var i = 1; i < arguments.length; i++) {
 105        var source = arguments[i];
 106  
 107        for (var key in source) {
 108          if (Object.prototype.hasOwnProperty.call(source, key)) {
 109            target[key] = source[key];
 110          }
 111        }
 112      }
 113  
 114      return target;
 115    };
 116  
 117    return _extends.apply(this, arguments);
 118  }
 119  
 120  /***/ }),
 121  
 122  /***/ 129:
 123  /***/ (function(module, exports) {
 124  
 125  module.exports = isPromise;
 126  
 127  function isPromise(obj) {
 128    return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
 129  }
 130  
 131  
 132  /***/ }),
 133  
 134  /***/ 143:
 135  /***/ (function(module, exports) {
 136  
 137  function combineReducers( reducers ) {
 138      var keys = Object.keys( reducers ),
 139          getNextState;
 140  
 141      getNextState = ( function() {
 142          var fn, i, key;
 143  
 144          fn = 'return {';
 145          for ( i = 0; i < keys.length; i++ ) {
 146              // Rely on Quoted escaping of JSON.stringify with guarantee that
 147              // each member of Object.keys is a string.
 148              //
 149              // "If Type(value) is String, then return the result of calling the
 150              // abstract operation Quote with argument value. [...] The abstract
 151              // operation Quote(value) wraps a String value in double quotes and
 152              // escapes characters within it."
 153              //
 154              // https://www.ecma-international.org/ecma-262/5.1/#sec-15.12.3
 155              key = JSON.stringify( keys[ i ] );
 156  
 157              fn += key + ':r[' + key + '](s[' + key + '],a),';
 158          }
 159          fn += '}';
 160  
 161          return new Function( 'r,s,a', fn );
 162      } )();
 163  
 164      return function combinedReducer( state, action ) {
 165          var nextState, i, key;
 166  
 167          // Assumed changed if initial state.
 168          if ( state === undefined ) {
 169              return getNextState( reducers, {}, action );
 170          }
 171  
 172          nextState = getNextState( reducers, state, action );
 173  
 174          // Determine whether state has changed.
 175          i = keys.length;
 176          while ( i-- ) {
 177              key = keys[ i ];
 178              if ( state[ key ] !== nextState[ key ] ) {
 179                  // Return immediately if a changed value is encountered.
 180                  return nextState;
 181              }
 182          }
 183  
 184          return state;
 185      };
 186  }
 187  
 188  module.exports = combineReducers;
 189  
 190  
 191  /***/ }),
 192  
 193  /***/ 18:
 194  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 195  
 196  "use strict";
 197  
 198  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
 199  var arrayLikeToArray = __webpack_require__(25);
 200  
 201  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
 202  
 203  function _arrayWithoutHoles(arr) {
 204    if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr);
 205  }
 206  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
 207  var iterableToArray = __webpack_require__(35);
 208  
 209  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
 210  var unsupportedIterableToArray = __webpack_require__(27);
 211  
 212  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
 213  function _nonIterableSpread() {
 214    throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
 215  }
 216  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
 217  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _toConsumableArray; });
 218  
 219  
 220  
 221  
 222  function _toConsumableArray(arr) {
 223    return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread();
 224  }
 225  
 226  /***/ }),
 227  
 228  /***/ 187:
 229  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 230  
 231  "use strict";
 232  /* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var _ponyfill_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(273);
 233  /* global window */
 234  
 235  
 236  var root;
 237  
 238  if (typeof self !== 'undefined') {
 239    root = self;
 240  } else if (typeof window !== 'undefined') {
 241    root = window;
 242  } else if (typeof global !== 'undefined') {
 243    root = global;
 244  } else if (true) {
 245    root = module;
 246  } else {}
 247  
 248  var result = Object(_ponyfill_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(root);
 249  /* harmony default export */ __webpack_exports__["a"] = (result);
 250  
 251  /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(73), __webpack_require__(397)(module)))
 252  
 253  /***/ }),
 254  
 255  /***/ 2:
 256  /***/ (function(module, exports) {
 257  
 258  (function() { module.exports = this["lodash"]; }());
 259  
 260  /***/ }),
 261  
 262  /***/ 20:
 263  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 264  
 265  "use strict";
 266  
 267  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
 268  var arrayWithHoles = __webpack_require__(38);
 269  
 270  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
 271  function _iterableToArrayLimit(arr, i) {
 272    if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
 273    var _arr = [];
 274    var _n = true;
 275    var _d = false;
 276    var _e = undefined;
 277  
 278    try {
 279      for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
 280        _arr.push(_s.value);
 281  
 282        if (i && _arr.length === i) break;
 283      }
 284    } catch (err) {
 285      _d = true;
 286      _e = err;
 287    } finally {
 288      try {
 289        if (!_n && _i["return"] != null) _i["return"]();
 290      } finally {
 291        if (_d) throw _e;
 292      }
 293    }
 294  
 295    return _arr;
 296  }
 297  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
 298  var unsupportedIterableToArray = __webpack_require__(27);
 299  
 300  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
 301  var nonIterableRest = __webpack_require__(39);
 302  
 303  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
 304  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _slicedToArray; });
 305  
 306  
 307  
 308  
 309  function _slicedToArray(arr, i) {
 310    return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || Object(nonIterableRest["a" /* default */])();
 311  }
 312  
 313  /***/ }),
 314  
 315  /***/ 21:
 316  /***/ (function(module, exports) {
 317  
 318  (function() { module.exports = this["React"]; }());
 319  
 320  /***/ }),
 321  
 322  /***/ 23:
 323  /***/ (function(module, exports) {
 324  
 325  (function() { module.exports = this["regeneratorRuntime"]; }());
 326  
 327  /***/ }),
 328  
 329  /***/ 25:
 330  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 331  
 332  "use strict";
 333  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; });
 334  function _arrayLikeToArray(arr, len) {
 335    if (len == null || len > arr.length) len = arr.length;
 336  
 337    for (var i = 0, arr2 = new Array(len); i < len; i++) {
 338      arr2[i] = arr[i];
 339    }
 340  
 341    return arr2;
 342  }
 343  
 344  /***/ }),
 345  
 346  /***/ 27:
 347  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 348  
 349  "use strict";
 350  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; });
 351  /* harmony import */ var _arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25);
 352  
 353  function _unsupportedIterableToArray(o, minLen) {
 354    if (!o) return;
 355    if (typeof o === "string") return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
 356    var n = Object.prototype.toString.call(o).slice(8, -1);
 357    if (n === "Object" && o.constructor) n = o.constructor.name;
 358    if (n === "Map" || n === "Set") return Array.from(n);
 359    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
 360  }
 361  
 362  /***/ }),
 363  
 364  /***/ 272:
 365  /***/ (function(module, exports) {
 366  
 367  (function() { module.exports = this["wp"]["reduxRoutine"]; }());
 368  
 369  /***/ }),
 370  
 371  /***/ 273:
 372  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 373  
 374  "use strict";
 375  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return symbolObservablePonyfill; });
 376  function symbolObservablePonyfill(root) {
 377      var result;
 378      var Symbol = root.Symbol;
 379  
 380      if (typeof Symbol === 'function') {
 381          if (Symbol.observable) {
 382              result = Symbol.observable;
 383          } else {
 384              result = Symbol('observable');
 385              Symbol.observable = result;
 386          }
 387      } else {
 388          result = '@@observable';
 389      }
 390  
 391      return result;
 392  };
 393  
 394  
 395  /***/ }),
 396  
 397  /***/ 274:
 398  /***/ (function(module, exports) {
 399  
 400  (function() { module.exports = this["wp"]["priorityQueue"]; }());
 401  
 402  /***/ }),
 403  
 404  /***/ 35:
 405  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 406  
 407  "use strict";
 408  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
 409  function _iterableToArray(iter) {
 410    if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
 411  }
 412  
 413  /***/ }),
 414  
 415  /***/ 37:
 416  /***/ (function(module, exports) {
 417  
 418  (function() { module.exports = this["wp"]["deprecated"]; }());
 419  
 420  /***/ }),
 421  
 422  /***/ 38:
 423  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 424  
 425  "use strict";
 426  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; });
 427  function _arrayWithHoles(arr) {
 428    if (Array.isArray(arr)) return arr;
 429  }
 430  
 431  /***/ }),
 432  
 433  /***/ 39:
 434  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 435  
 436  "use strict";
 437  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _nonIterableRest; });
 438  function _nonIterableRest() {
 439    throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
 440  }
 441  
 442  /***/ }),
 443  
 444  /***/ 397:
 445  /***/ (function(module, exports) {
 446  
 447  module.exports = function(originalModule) {
 448      if (!originalModule.webpackPolyfill) {
 449          var module = Object.create(originalModule);
 450          // module.parent = undefined by default
 451          if (!module.children) module.children = [];
 452          Object.defineProperty(module, "loaded", {
 453              enumerable: true,
 454              get: function() {
 455                  return module.l;
 456              }
 457          });
 458          Object.defineProperty(module, "id", {
 459              enumerable: true,
 460              get: function() {
 461                  return module.i;
 462              }
 463          });
 464          Object.defineProperty(module, "exports", {
 465              enumerable: true
 466          });
 467          module.webpackPolyfill = 1;
 468      }
 469      return module;
 470  };
 471  
 472  
 473  /***/ }),
 474  
 475  /***/ 426:
 476  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 477  
 478  "use strict";
 479  __webpack_require__.r(__webpack_exports__);
 480  var selectors_namespaceObject = {};
 481  __webpack_require__.r(selectors_namespaceObject);
 482  __webpack_require__.d(selectors_namespaceObject, "getIsResolving", function() { return getIsResolving; });
 483  __webpack_require__.d(selectors_namespaceObject, "hasStartedResolution", function() { return hasStartedResolution; });
 484  __webpack_require__.d(selectors_namespaceObject, "hasFinishedResolution", function() { return hasFinishedResolution; });
 485  __webpack_require__.d(selectors_namespaceObject, "isResolving", function() { return isResolving; });
 486  __webpack_require__.d(selectors_namespaceObject, "getCachedResolvers", function() { return getCachedResolvers; });
 487  var actions_namespaceObject = {};
 488  __webpack_require__.r(actions_namespaceObject);
 489  __webpack_require__.d(actions_namespaceObject, "startResolution", function() { return startResolution; });
 490  __webpack_require__.d(actions_namespaceObject, "finishResolution", function() { return finishResolution; });
 491  __webpack_require__.d(actions_namespaceObject, "invalidateResolution", function() { return invalidateResolution; });
 492  __webpack_require__.d(actions_namespaceObject, "invalidateResolutionForStore", function() { return invalidateResolutionForStore; });
 493  __webpack_require__.d(actions_namespaceObject, "invalidateResolutionForStoreSelector", function() { return invalidateResolutionForStoreSelector; });
 494  var plugins_namespaceObject = {};
 495  __webpack_require__.r(plugins_namespaceObject);
 496  __webpack_require__.d(plugins_namespaceObject, "controls", function() { return controls; });
 497  __webpack_require__.d(plugins_namespaceObject, "persistence", function() { return plugins_persistence; });
 498  
 499  // EXTERNAL MODULE: ./node_modules/turbo-combine-reducers/index.js
 500  var turbo_combine_reducers = __webpack_require__(143);
 501  var turbo_combine_reducers_default = /*#__PURE__*/__webpack_require__.n(turbo_combine_reducers);
 502  
 503  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
 504  var slicedToArray = __webpack_require__(20);
 505  
 506  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
 507  var defineProperty = __webpack_require__(5);
 508  
 509  // EXTERNAL MODULE: external {"this":"lodash"}
 510  var external_this_lodash_ = __webpack_require__(2);
 511  
 512  // EXTERNAL MODULE: ./node_modules/memize/index.js
 513  var memize = __webpack_require__(46);
 514  var memize_default = /*#__PURE__*/__webpack_require__.n(memize);
 515  
 516  // EXTERNAL MODULE: external {"this":"regeneratorRuntime"}
 517  var external_this_regeneratorRuntime_ = __webpack_require__(23);
 518  var external_this_regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(external_this_regeneratorRuntime_);
 519  
 520  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
 521  var asyncToGenerator = __webpack_require__(49);
 522  
 523  // EXTERNAL MODULE: ./node_modules/symbol-observable/es/index.js
 524  var es = __webpack_require__(187);
 525  
 526  // CONCATENATED MODULE: ./node_modules/redux/es/redux.js
 527  
 528  
 529  /**
 530   * These are private action types reserved by Redux.
 531   * For any unknown actions, you must return the current state.
 532   * If the current state is undefined, you must return the initial state.
 533   * Do not reference these action types directly in your code.
 534   */
 535  var randomString = function randomString() {
 536    return Math.random().toString(36).substring(7).split('').join('.');
 537  };
 538  
 539  var ActionTypes = {
 540    INIT: "@@redux/INIT" + randomString(),
 541    REPLACE: "@@redux/REPLACE" + randomString(),
 542    PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
 543      return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
 544    }
 545  };
 546  
 547  /**
 548   * @param {any} obj The object to inspect.
 549   * @returns {boolean} True if the argument appears to be a plain object.
 550   */
 551  function isPlainObject(obj) {
 552    if (typeof obj !== 'object' || obj === null) return false;
 553    var proto = obj;
 554  
 555    while (Object.getPrototypeOf(proto) !== null) {
 556      proto = Object.getPrototypeOf(proto);
 557    }
 558  
 559    return Object.getPrototypeOf(obj) === proto;
 560  }
 561  
 562  /**
 563   * Creates a Redux store that holds the state tree.
 564   * The only way to change the data in the store is to call `dispatch()` on it.
 565   *
 566   * There should only be a single store in your app. To specify how different
 567   * parts of the state tree respond to actions, you may combine several reducers
 568   * into a single reducer function by using `combineReducers`.
 569   *
 570   * @param {Function} reducer A function that returns the next state tree, given
 571   * the current state tree and the action to handle.
 572   *
 573   * @param {any} [preloadedState] The initial state. You may optionally specify it
 574   * to hydrate the state from the server in universal apps, or to restore a
 575   * previously serialized user session.
 576   * If you use `combineReducers` to produce the root reducer function, this must be
 577   * an object with the same shape as `combineReducers` keys.
 578   *
 579   * @param {Function} [enhancer] The store enhancer. You may optionally specify it
 580   * to enhance the store with third-party capabilities such as middleware,
 581   * time travel, persistence, etc. The only store enhancer that ships with Redux
 582   * is `applyMiddleware()`.
 583   *
 584   * @returns {Store} A Redux store that lets you read the state, dispatch actions
 585   * and subscribe to changes.
 586   */
 587  
 588  function createStore(reducer, preloadedState, enhancer) {
 589    var _ref2;
 590  
 591    if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {
 592      throw new Error('It looks like you are passing several store enhancers to ' + 'createStore(). This is not supported. Instead, compose them ' + 'together to a single function.');
 593    }
 594  
 595    if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
 596      enhancer = preloadedState;
 597      preloadedState = undefined;
 598    }
 599  
 600    if (typeof enhancer !== 'undefined') {
 601      if (typeof enhancer !== 'function') {
 602        throw new Error('Expected the enhancer to be a function.');
 603      }
 604  
 605      return enhancer(createStore)(reducer, preloadedState);
 606    }
 607  
 608    if (typeof reducer !== 'function') {
 609      throw new Error('Expected the reducer to be a function.');
 610    }
 611  
 612    var currentReducer = reducer;
 613    var currentState = preloadedState;
 614    var currentListeners = [];
 615    var nextListeners = currentListeners;
 616    var isDispatching = false;
 617    /**
 618     * This makes a shallow copy of currentListeners so we can use
 619     * nextListeners as a temporary list while dispatching.
 620     *
 621     * This prevents any bugs around consumers calling
 622     * subscribe/unsubscribe in the middle of a dispatch.
 623     */
 624  
 625    function ensureCanMutateNextListeners() {
 626      if (nextListeners === currentListeners) {
 627        nextListeners = currentListeners.slice();
 628      }
 629    }
 630    /**
 631     * Reads the state tree managed by the store.
 632     *
 633     * @returns {any} The current state tree of your application.
 634     */
 635  
 636  
 637    function getState() {
 638      if (isDispatching) {
 639        throw new Error('You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');
 640      }
 641  
 642      return currentState;
 643    }
 644    /**
 645     * Adds a change listener. It will be called any time an action is dispatched,
 646     * and some part of the state tree may potentially have changed. You may then
 647     * call `getState()` to read the current state tree inside the callback.
 648     *
 649     * You may call `dispatch()` from a change listener, with the following
 650     * caveats:
 651     *
 652     * 1. The subscriptions are snapshotted just before every `dispatch()` call.
 653     * If you subscribe or unsubscribe while the listeners are being invoked, this
 654     * will not have any effect on the `dispatch()` that is currently in progress.
 655     * However, the next `dispatch()` call, whether nested or not, will use a more
 656     * recent snapshot of the subscription list.
 657     *
 658     * 2. The listener should not expect to see all state changes, as the state
 659     * might have been updated multiple times during a nested `dispatch()` before
 660     * the listener is called. It is, however, guaranteed that all subscribers
 661     * registered before the `dispatch()` started will be called with the latest
 662     * state by the time it exits.
 663     *
 664     * @param {Function} listener A callback to be invoked on every dispatch.
 665     * @returns {Function} A function to remove this change listener.
 666     */
 667  
 668  
 669    function subscribe(listener) {
 670      if (typeof listener !== 'function') {
 671        throw new Error('Expected the listener to be a function.');
 672      }
 673  
 674      if (isDispatching) {
 675        throw new Error('You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api-reference/store#subscribelistener for more details.');
 676      }
 677  
 678      var isSubscribed = true;
 679      ensureCanMutateNextListeners();
 680      nextListeners.push(listener);
 681      return function unsubscribe() {
 682        if (!isSubscribed) {
 683          return;
 684        }
 685  
 686        if (isDispatching) {
 687          throw new Error('You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribelistener for more details.');
 688        }
 689  
 690        isSubscribed = false;
 691        ensureCanMutateNextListeners();
 692        var index = nextListeners.indexOf(listener);
 693        nextListeners.splice(index, 1);
 694        currentListeners = null;
 695      };
 696    }
 697    /**
 698     * Dispatches an action. It is the only way to trigger a state change.
 699     *
 700     * The `reducer` function, used to create the store, will be called with the
 701     * current state tree and the given `action`. Its return value will
 702     * be considered the **next** state of the tree, and the change listeners
 703     * will be notified.
 704     *
 705     * The base implementation only supports plain object actions. If you want to
 706     * dispatch a Promise, an Observable, a thunk, or something else, you need to
 707     * wrap your store creating function into the corresponding middleware. For
 708     * example, see the documentation for the `redux-thunk` package. Even the
 709     * middleware will eventually dispatch plain object actions using this method.
 710     *
 711     * @param {Object} action A plain object representing “what changed”. It is
 712     * a good idea to keep actions serializable so you can record and replay user
 713     * sessions, or use the time travelling `redux-devtools`. An action must have
 714     * a `type` property which may not be `undefined`. It is a good idea to use
 715     * string constants for action types.
 716     *
 717     * @returns {Object} For convenience, the same action object you dispatched.
 718     *
 719     * Note that, if you use a custom middleware, it may wrap `dispatch()` to
 720     * return something else (for example, a Promise you can await).
 721     */
 722  
 723  
 724    function dispatch(action) {
 725      if (!isPlainObject(action)) {
 726        throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');
 727      }
 728  
 729      if (typeof action.type === 'undefined') {
 730        throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?');
 731      }
 732  
 733      if (isDispatching) {
 734        throw new Error('Reducers may not dispatch actions.');
 735      }
 736  
 737      try {
 738        isDispatching = true;
 739        currentState = currentReducer(currentState, action);
 740      } finally {
 741        isDispatching = false;
 742      }
 743  
 744      var listeners = currentListeners = nextListeners;
 745  
 746      for (var i = 0; i < listeners.length; i++) {
 747        var listener = listeners[i];
 748        listener();
 749      }
 750  
 751      return action;
 752    }
 753    /**
 754     * Replaces the reducer currently used by the store to calculate the state.
 755     *
 756     * You might need this if your app implements code splitting and you want to
 757     * load some of the reducers dynamically. You might also need this if you
 758     * implement a hot reloading mechanism for Redux.
 759     *
 760     * @param {Function} nextReducer The reducer for the store to use instead.
 761     * @returns {void}
 762     */
 763  
 764  
 765    function replaceReducer(nextReducer) {
 766      if (typeof nextReducer !== 'function') {
 767        throw new Error('Expected the nextReducer to be a function.');
 768      }
 769  
 770      currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT.
 771      // Any reducers that existed in both the new and old rootReducer
 772      // will receive the previous state. This effectively populates
 773      // the new state tree with any relevant data from the old one.
 774  
 775      dispatch({
 776        type: ActionTypes.REPLACE
 777      });
 778    }
 779    /**
 780     * Interoperability point for observable/reactive libraries.
 781     * @returns {observable} A minimal observable of state changes.
 782     * For more information, see the observable proposal:
 783     * https://github.com/tc39/proposal-observable
 784     */
 785  
 786  
 787    function observable() {
 788      var _ref;
 789  
 790      var outerSubscribe = subscribe;
 791      return _ref = {
 792        /**
 793         * The minimal observable subscription method.
 794         * @param {Object} observer Any object that can be used as an observer.
 795         * The observer object should have a `next` method.
 796         * @returns {subscription} An object with an `unsubscribe` method that can
 797         * be used to unsubscribe the observable from the store, and prevent further
 798         * emission of values from the observable.
 799         */
 800        subscribe: function subscribe(observer) {
 801          if (typeof observer !== 'object' || observer === null) {
 802            throw new TypeError('Expected the observer to be an object.');
 803          }
 804  
 805          function observeState() {
 806            if (observer.next) {
 807              observer.next(getState());
 808            }
 809          }
 810  
 811          observeState();
 812          var unsubscribe = outerSubscribe(observeState);
 813          return {
 814            unsubscribe: unsubscribe
 815          };
 816        }
 817      }, _ref[es["a" /* default */]] = function () {
 818        return this;
 819      }, _ref;
 820    } // When a store is created, an "INIT" action is dispatched so that every
 821    // reducer returns their initial state. This effectively populates
 822    // the initial state tree.
 823  
 824  
 825    dispatch({
 826      type: ActionTypes.INIT
 827    });
 828    return _ref2 = {
 829      dispatch: dispatch,
 830      subscribe: subscribe,
 831      getState: getState,
 832      replaceReducer: replaceReducer
 833    }, _ref2[es["a" /* default */]] = observable, _ref2;
 834  }
 835  
 836  /**
 837   * Prints a warning in the console if it exists.
 838   *
 839   * @param {String} message The warning message.
 840   * @returns {void}
 841   */
 842  function warning(message) {
 843    /* eslint-disable no-console */
 844    if (typeof console !== 'undefined' && typeof console.error === 'function') {
 845      console.error(message);
 846    }
 847    /* eslint-enable no-console */
 848  
 849  
 850    try {
 851      // This error was thrown as a convenience so that if you enable
 852      // "break on all exceptions" in your console,
 853      // it would pause the execution at this line.
 854      throw new Error(message);
 855    } catch (e) {} // eslint-disable-line no-empty
 856  
 857  }
 858  
 859  function getUndefinedStateErrorMessage(key, action) {
 860    var actionType = action && action.type;
 861    var actionDescription = actionType && "action \"" + String(actionType) + "\"" || 'an action';
 862    return "Given " + actionDescription + ", reducer \"" + key + "\" returned undefined. " + "To ignore an action, you must explicitly return the previous state. " + "If you want this reducer to hold no value, you can return null instead of undefined.";
 863  }
 864  
 865  function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
 866    var reducerKeys = Object.keys(reducers);
 867    var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
 868  
 869    if (reducerKeys.length === 0) {
 870      return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
 871    }
 872  
 873    if (!isPlainObject(inputState)) {
 874      return "The " + argumentName + " has unexpected type of \"" + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\"");
 875    }
 876  
 877    var unexpectedKeys = Object.keys(inputState).filter(function (key) {
 878      return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];
 879    });
 880    unexpectedKeys.forEach(function (key) {
 881      unexpectedKeyCache[key] = true;
 882    });
 883    if (action && action.type === ActionTypes.REPLACE) return;
 884  
 885    if (unexpectedKeys.length > 0) {
 886      return "Unexpected " + (unexpectedKeys.length > 1 ? 'keys' : 'key') + " " + ("\"" + unexpectedKeys.join('", "') + "\" found in " + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ("\"" + reducerKeys.join('", "') + "\". Unexpected keys will be ignored.");
 887    }
 888  }
 889  
 890  function assertReducerShape(reducers) {
 891    Object.keys(reducers).forEach(function (key) {
 892      var reducer = reducers[key];
 893      var initialState = reducer(undefined, {
 894        type: ActionTypes.INIT
 895      });
 896  
 897      if (typeof initialState === 'undefined') {
 898        throw new Error("Reducer \"" + key + "\" returned undefined during initialization. " + "If the state passed to the reducer is undefined, you must " + "explicitly return the initial state. The initial state may " + "not be undefined. If you don't want to set a value for this reducer, " + "you can use null instead of undefined.");
 899      }
 900  
 901      if (typeof reducer(undefined, {
 902        type: ActionTypes.PROBE_UNKNOWN_ACTION()
 903      }) === 'undefined') {
 904        throw new Error("Reducer \"" + key + "\" returned undefined when probed with a random type. " + ("Don't try to handle " + ActionTypes.INIT + " or other actions in \"redux/*\" ") + "namespace. They are considered private. Instead, you must return the " + "current state for any unknown actions, unless it is undefined, " + "in which case you must return the initial state, regardless of the " + "action type. The initial state may not be undefined, but can be null.");
 905      }
 906    });
 907  }
 908  /**
 909   * Turns an object whose values are different reducer functions, into a single
 910   * reducer function. It will call every child reducer, and gather their results
 911   * into a single state object, whose keys correspond to the keys of the passed
 912   * reducer functions.
 913   *
 914   * @param {Object} reducers An object whose values correspond to different
 915   * reducer functions that need to be combined into one. One handy way to obtain
 916   * it is to use ES6 `import * as reducers` syntax. The reducers may never return
 917   * undefined for any action. Instead, they should return their initial state
 918   * if the state passed to them was undefined, and the current state for any
 919   * unrecognized action.
 920   *
 921   * @returns {Function} A reducer function that invokes every reducer inside the
 922   * passed object, and builds a state object with the same shape.
 923   */
 924  
 925  
 926  function combineReducers(reducers) {
 927    var reducerKeys = Object.keys(reducers);
 928    var finalReducers = {};
 929  
 930    for (var i = 0; i < reducerKeys.length; i++) {
 931      var key = reducerKeys[i];
 932  
 933      if (false) {}
 934  
 935      if (typeof reducers[key] === 'function') {
 936        finalReducers[key] = reducers[key];
 937      }
 938    }
 939  
 940    var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same
 941    // keys multiple times.
 942  
 943    var unexpectedKeyCache;
 944  
 945    if (false) {}
 946  
 947    var shapeAssertionError;
 948  
 949    try {
 950      assertReducerShape(finalReducers);
 951    } catch (e) {
 952      shapeAssertionError = e;
 953    }
 954  
 955    return function combination(state, action) {
 956      if (state === void 0) {
 957        state = {};
 958      }
 959  
 960      if (shapeAssertionError) {
 961        throw shapeAssertionError;
 962      }
 963  
 964      if (false) { var warningMessage; }
 965  
 966      var hasChanged = false;
 967      var nextState = {};
 968  
 969      for (var _i = 0; _i < finalReducerKeys.length; _i++) {
 970        var _key = finalReducerKeys[_i];
 971        var reducer = finalReducers[_key];
 972        var previousStateForKey = state[_key];
 973        var nextStateForKey = reducer(previousStateForKey, action);
 974  
 975        if (typeof nextStateForKey === 'undefined') {
 976          var errorMessage = getUndefinedStateErrorMessage(_key, action);
 977          throw new Error(errorMessage);
 978        }
 979  
 980        nextState[_key] = nextStateForKey;
 981        hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
 982      }
 983  
 984      hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;
 985      return hasChanged ? nextState : state;
 986    };
 987  }
 988  
 989  function bindActionCreator(actionCreator, dispatch) {
 990    return function () {
 991      return dispatch(actionCreator.apply(this, arguments));
 992    };
 993  }
 994  /**
 995   * Turns an object whose values are action creators, into an object with the
 996   * same keys, but with every function wrapped into a `dispatch` call so they
 997   * may be invoked directly. This is just a convenience method, as you can call
 998   * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
 999   *
1000   * For convenience, you can also pass an action creator as the first argument,
1001   * and get a dispatch wrapped function in return.
1002   *
1003   * @param {Function|Object} actionCreators An object whose values are action
1004   * creator functions. One handy way to obtain it is to use ES6 `import * as`
1005   * syntax. You may also pass a single function.
1006   *
1007   * @param {Function} dispatch The `dispatch` function available on your Redux
1008   * store.
1009   *
1010   * @returns {Function|Object} The object mimicking the original object, but with
1011   * every action creator wrapped into the `dispatch` call. If you passed a
1012   * function as `actionCreators`, the return value will also be a single
1013   * function.
1014   */
1015  
1016  
1017  function bindActionCreators(actionCreators, dispatch) {
1018    if (typeof actionCreators === 'function') {
1019      return bindActionCreator(actionCreators, dispatch);
1020    }
1021  
1022    if (typeof actionCreators !== 'object' || actionCreators === null) {
1023      throw new Error("bindActionCreators expected an object or a function, instead received " + (actionCreators === null ? 'null' : typeof actionCreators) + ". " + "Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?");
1024    }
1025  
1026    var boundActionCreators = {};
1027  
1028    for (var key in actionCreators) {
1029      var actionCreator = actionCreators[key];
1030  
1031      if (typeof actionCreator === 'function') {
1032        boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
1033      }
1034    }
1035  
1036    return boundActionCreators;
1037  }
1038  
1039  function _defineProperty(obj, key, value) {
1040    if (key in obj) {
1041      Object.defineProperty(obj, key, {
1042        value: value,
1043        enumerable: true,
1044        configurable: true,
1045        writable: true
1046      });
1047    } else {
1048      obj[key] = value;
1049    }
1050  
1051    return obj;
1052  }
1053  
1054  function ownKeys(object, enumerableOnly) {
1055    var keys = Object.keys(object);
1056  
1057    if (Object.getOwnPropertySymbols) {
1058      keys.push.apply(keys, Object.getOwnPropertySymbols(object));
1059    }
1060  
1061    if (enumerableOnly) keys = keys.filter(function (sym) {
1062      return Object.getOwnPropertyDescriptor(object, sym).enumerable;
1063    });
1064    return keys;
1065  }
1066  
1067  function _objectSpread2(target) {
1068    for (var i = 1; i < arguments.length; i++) {
1069      var source = arguments[i] != null ? arguments[i] : {};
1070  
1071      if (i % 2) {
1072        ownKeys(source, true).forEach(function (key) {
1073          _defineProperty(target, key, source[key]);
1074        });
1075      } else if (Object.getOwnPropertyDescriptors) {
1076        Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1077      } else {
1078        ownKeys(source).forEach(function (key) {
1079          Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1080        });
1081      }
1082    }
1083  
1084    return target;
1085  }
1086  
1087  /**
1088   * Composes single-argument functions from right to left. The rightmost
1089   * function can take multiple arguments as it provides the signature for
1090   * the resulting composite function.
1091   *
1092   * @param {...Function} funcs The functions to compose.
1093   * @returns {Function} A function obtained by composing the argument functions
1094   * from right to left. For example, compose(f, g, h) is identical to doing
1095   * (...args) => f(g(h(...args))).
1096   */
1097  function compose() {
1098    for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
1099      funcs[_key] = arguments[_key];
1100    }
1101  
1102    if (funcs.length === 0) {
1103      return function (arg) {
1104        return arg;
1105      };
1106    }
1107  
1108    if (funcs.length === 1) {
1109      return funcs[0];
1110    }
1111  
1112    return funcs.reduce(function (a, b) {
1113      return function () {
1114        return a(b.apply(void 0, arguments));
1115      };
1116    });
1117  }
1118  
1119  /**
1120   * Creates a store enhancer that applies middleware to the dispatch method
1121   * of the Redux store. This is handy for a variety of tasks, such as expressing
1122   * asynchronous actions in a concise manner, or logging every action payload.
1123   *
1124   * See `redux-thunk` package as an example of the Redux middleware.
1125   *
1126   * Because middleware is potentially asynchronous, this should be the first
1127   * store enhancer in the composition chain.
1128   *
1129   * Note that each middleware will be given the `dispatch` and `getState` functions
1130   * as named arguments.
1131   *
1132   * @param {...Function} middlewares The middleware chain to be applied.
1133   * @returns {Function} A store enhancer applying the middleware.
1134   */
1135  
1136  function applyMiddleware() {
1137    for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {
1138      middlewares[_key] = arguments[_key];
1139    }
1140  
1141    return function (createStore) {
1142      return function () {
1143        var store = createStore.apply(void 0, arguments);
1144  
1145        var _dispatch = function dispatch() {
1146          throw new Error('Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');
1147        };
1148  
1149        var middlewareAPI = {
1150          getState: store.getState,
1151          dispatch: function dispatch() {
1152            return _dispatch.apply(void 0, arguments);
1153          }
1154        };
1155        var chain = middlewares.map(function (middleware) {
1156          return middleware(middlewareAPI);
1157        });
1158        _dispatch = compose.apply(void 0, chain)(store.dispatch);
1159        return _objectSpread2({}, store, {
1160          dispatch: _dispatch
1161        });
1162      };
1163    };
1164  }
1165  
1166  /*
1167   * This is a dummy function to check if the function name has been altered by minification.
1168   * If the function has been minified and NODE_ENV !== 'production', warn the user.
1169   */
1170  
1171  function isCrushed() {}
1172  
1173  if (false) {}
1174  
1175  
1176  
1177  // EXTERNAL MODULE: external {"this":["wp","reduxRoutine"]}
1178  var external_this_wp_reduxRoutine_ = __webpack_require__(272);
1179  var external_this_wp_reduxRoutine_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_reduxRoutine_);
1180  
1181  // EXTERNAL MODULE: ./node_modules/is-promise/index.js
1182  var is_promise = __webpack_require__(129);
1183  var is_promise_default = /*#__PURE__*/__webpack_require__.n(is_promise);
1184  
1185  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/promise-middleware.js
1186  /**
1187   * External dependencies
1188   */
1189  
1190  /**
1191   * Simplest possible promise redux middleware.
1192   *
1193   * @return {Function} middleware.
1194   */
1195  
1196  var promise_middleware_promiseMiddleware = function promiseMiddleware() {
1197    return function (next) {
1198      return function (action) {
1199        if (is_promise_default()(action)) {
1200          return action.then(function (resolvedAction) {
1201            if (resolvedAction) {
1202              return next(resolvedAction);
1203            }
1204          });
1205        }
1206  
1207        return next(action);
1208      };
1209    };
1210  };
1211  
1212  /* harmony default export */ var promise_middleware = (promise_middleware_promiseMiddleware);
1213  
1214  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
1215  var toConsumableArray = __webpack_require__(18);
1216  
1217  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/resolvers-cache-middleware.js
1218  
1219  
1220  
1221  /**
1222   * External dependencies
1223   */
1224  
1225  /** @typedef {import('./registry').WPDataRegistry} WPDataRegistry */
1226  
1227  /**
1228   * Creates a middleware handling resolvers cache invalidation.
1229   *
1230   * @param {WPDataRegistry} registry   The registry reference for which to create
1231   *                                    the middleware.
1232   * @param {string}         reducerKey The namespace for which to create the
1233   *                                    middleware.
1234   *
1235   * @return {Function} Middleware function.
1236   */
1237  
1238  var resolvers_cache_middleware_createResolversCacheMiddleware = function createResolversCacheMiddleware(registry, reducerKey) {
1239    return function () {
1240      return function (next) {
1241        return function (action) {
1242          var resolvers = registry.select('core/data').getCachedResolvers(reducerKey);
1243          Object.entries(resolvers).forEach(function (_ref) {
1244            var _ref2 = Object(slicedToArray["a" /* default */])(_ref, 2),
1245                selectorName = _ref2[0],
1246                resolversByArgs = _ref2[1];
1247  
1248            var resolver = Object(external_this_lodash_["get"])(registry.stores, [reducerKey, 'resolvers', selectorName]);
1249  
1250            if (!resolver || !resolver.shouldInvalidate) {
1251              return;
1252            }
1253  
1254            resolversByArgs.forEach(function (value, args) {
1255              // resolversByArgs is the map Map([ args ] => boolean) storing the cache resolution status for a given selector.
1256              // If the value is false it means this resolver has finished its resolution which means we need to invalidate it,
1257              // if it's true it means it's inflight and the invalidation is not necessary.
1258              if (value !== false || !resolver.shouldInvalidate.apply(resolver, [action].concat(Object(toConsumableArray["a" /* default */])(args)))) {
1259                return;
1260              } // Trigger cache invalidation
1261  
1262  
1263              registry.dispatch('core/data').invalidateResolution(reducerKey, selectorName, args);
1264            });
1265          });
1266          return next(action);
1267        };
1268      };
1269    };
1270  };
1271  
1272  /* harmony default export */ var resolvers_cache_middleware = (resolvers_cache_middleware_createResolversCacheMiddleware);
1273  
1274  // EXTERNAL MODULE: ./node_modules/equivalent-key-map/equivalent-key-map.js
1275  var equivalent_key_map = __webpack_require__(64);
1276  var equivalent_key_map_default = /*#__PURE__*/__webpack_require__.n(equivalent_key_map);
1277  
1278  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/namespace-store/metadata/utils.js
1279  
1280  
1281  function utils_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
1282  
1283  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { utils_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { utils_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
1284  
1285  /**
1286   * Higher-order reducer creator which creates a combined reducer object, keyed
1287   * by a property on the action object.
1288   *
1289   * @param {string} actionProperty Action property by which to key object.
1290   *
1291   * @return {Function} Higher-order reducer.
1292   */
1293  var utils_onSubKey = function onSubKey(actionProperty) {
1294    return function (reducer) {
1295      return function () {
1296        var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1297        var action = arguments.length > 1 ? arguments[1] : undefined;
1298        // Retrieve subkey from action. Do not track if undefined; useful for cases
1299        // where reducer is scoped by action shape.
1300        var key = action[actionProperty];
1301  
1302        if (key === undefined) {
1303          return state;
1304        } // Avoid updating state if unchanged. Note that this also accounts for a
1305        // reducer which returns undefined on a key which is not yet tracked.
1306  
1307  
1308        var nextKeyState = reducer(state[key], action);
1309  
1310        if (nextKeyState === state[key]) {
1311          return state;
1312        }
1313  
1314        return _objectSpread({}, state, Object(defineProperty["a" /* default */])({}, key, nextKeyState));
1315      };
1316    };
1317  };
1318  
1319  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/namespace-store/metadata/reducer.js
1320  /**
1321   * External dependencies
1322   */
1323  
1324  
1325  /**
1326   * Internal dependencies
1327   */
1328  
1329  
1330  /**
1331   * Reducer function returning next state for selector resolution of
1332   * subkeys, object form:
1333   *
1334   *  selectorName -> EquivalentKeyMap<Array,boolean>
1335   *
1336   * @param {Object} state  Current state.
1337   * @param {Object} action Dispatched action.
1338   *
1339   * @return {Object} Next state.
1340   */
1341  
1342  var subKeysIsResolved = Object(external_this_lodash_["flowRight"])([utils_onSubKey('selectorName')])(function () {
1343    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new equivalent_key_map_default.a();
1344    var action = arguments.length > 1 ? arguments[1] : undefined;
1345  
1346    switch (action.type) {
1347      case 'START_RESOLUTION':
1348      case 'FINISH_RESOLUTION':
1349        {
1350          var isStarting = action.type === 'START_RESOLUTION';
1351          var nextState = new equivalent_key_map_default.a(state);
1352          nextState.set(action.args, isStarting);
1353          return nextState;
1354        }
1355  
1356      case 'INVALIDATE_RESOLUTION':
1357        {
1358          var _nextState = new equivalent_key_map_default.a(state);
1359  
1360          _nextState.delete(action.args);
1361  
1362          return _nextState;
1363        }
1364    }
1365  
1366    return state;
1367  });
1368  /**
1369   * Reducer function returning next state for selector resolution, object form:
1370   *
1371   *   selectorName -> EquivalentKeyMap<Array, boolean>
1372   *
1373   * @param {Object} state   Current state.
1374   * @param {Object} action  Dispatched action.
1375   *
1376   * @return {Object} Next state.
1377   */
1378  
1379  var reducer_isResolved = function isResolved() {
1380    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1381    var action = arguments.length > 1 ? arguments[1] : undefined;
1382  
1383    switch (action.type) {
1384      case 'INVALIDATE_RESOLUTION_FOR_STORE':
1385        return {};
1386  
1387      case 'INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR':
1388        return Object(external_this_lodash_["has"])(state, [action.selectorName]) ? Object(external_this_lodash_["omit"])(state, [action.selectorName]) : state;
1389  
1390      case 'START_RESOLUTION':
1391      case 'FINISH_RESOLUTION':
1392      case 'INVALIDATE_RESOLUTION':
1393        return subKeysIsResolved(state, action);
1394    }
1395  
1396    return state;
1397  };
1398  
1399  /* harmony default export */ var metadata_reducer = (reducer_isResolved);
1400  
1401  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/namespace-store/metadata/selectors.js
1402  /**
1403   * External dependencies
1404   */
1405  
1406  /**
1407   * Returns the raw `isResolving` value for a given selector name,
1408   * and arguments set. May be undefined if the selector has never been resolved
1409   * or not resolved for the given set of arguments, otherwise true or false for
1410   * resolution started and completed respectively.
1411   *
1412   * @param {Object} state        Data state.
1413   * @param {string} selectorName Selector name.
1414   * @param {Array}  args         Arguments passed to selector.
1415   *
1416   * @return {?boolean} isResolving value.
1417   */
1418  
1419  function getIsResolving(state, selectorName, args) {
1420    var map = Object(external_this_lodash_["get"])(state, [selectorName]);
1421  
1422    if (!map) {
1423      return;
1424    }
1425  
1426    return map.get(args);
1427  }
1428  /**
1429   * Returns true if resolution has already been triggered for a given
1430   * selector name, and arguments set.
1431   *
1432   * @param {Object} state        Data state.
1433   * @param {string} selectorName Selector name.
1434   * @param {?Array} args         Arguments passed to selector (default `[]`).
1435   *
1436   * @return {boolean} Whether resolution has been triggered.
1437   */
1438  
1439  function hasStartedResolution(state, selectorName) {
1440    var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
1441    return getIsResolving(state, selectorName, args) !== undefined;
1442  }
1443  /**
1444   * Returns true if resolution has completed for a given selector
1445   * name, and arguments set.
1446   *
1447   * @param {Object} state        Data state.
1448   * @param {string} selectorName Selector name.
1449   * @param {?Array} args         Arguments passed to selector.
1450   *
1451   * @return {boolean} Whether resolution has completed.
1452   */
1453  
1454  function hasFinishedResolution(state, selectorName) {
1455    var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
1456    return getIsResolving(state, selectorName, args) === false;
1457  }
1458  /**
1459   * Returns true if resolution has been triggered but has not yet completed for
1460   * a given selector name, and arguments set.
1461   *
1462   * @param {Object} state        Data state.
1463   * @param {string} selectorName Selector name.
1464   * @param {?Array} args         Arguments passed to selector.
1465   *
1466   * @return {boolean} Whether resolution is in progress.
1467   */
1468  
1469  function isResolving(state, selectorName) {
1470    var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
1471    return getIsResolving(state, selectorName, args) === true;
1472  }
1473  /**
1474   * Returns the list of the cached resolvers.
1475   *
1476   * @param {Object} state      Data state.
1477   *
1478   * @return {Object} Resolvers mapped by args and selectorName.
1479   */
1480  
1481  function getCachedResolvers(state) {
1482    return state;
1483  }
1484  
1485  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/namespace-store/metadata/actions.js
1486  /**
1487   * Returns an action object used in signalling that selector resolution has
1488   * started.
1489   *
1490   * @param {string} selectorName Name of selector for which resolver triggered.
1491   * @param {...*}   args         Arguments to associate for uniqueness.
1492   *
1493   * @return {Object} Action object.
1494   */
1495  function startResolution(selectorName, args) {
1496    return {
1497      type: 'START_RESOLUTION',
1498      selectorName: selectorName,
1499      args: args
1500    };
1501  }
1502  /**
1503   * Returns an action object used in signalling that selector resolution has
1504   * completed.
1505   *
1506   * @param {string} selectorName Name of selector for which resolver triggered.
1507   * @param {...*}   args         Arguments to associate for uniqueness.
1508   *
1509   * @return {Object} Action object.
1510   */
1511  
1512  function finishResolution(selectorName, args) {
1513    return {
1514      type: 'FINISH_RESOLUTION',
1515      selectorName: selectorName,
1516      args: args
1517    };
1518  }
1519  /**
1520   * Returns an action object used in signalling that we should invalidate the resolution cache.
1521   *
1522   * @param {string} selectorName Name of selector for which resolver should be invalidated.
1523   * @param {Array}  args         Arguments to associate for uniqueness.
1524   *
1525   * @return {Object} Action object.
1526   */
1527  
1528  function invalidateResolution(selectorName, args) {
1529    return {
1530      type: 'INVALIDATE_RESOLUTION',
1531      selectorName: selectorName,
1532      args: args
1533    };
1534  }
1535  /**
1536   * Returns an action object used in signalling that the resolution
1537   * should be invalidated.
1538   *
1539   * @return {Object} Action object.
1540   */
1541  
1542  function invalidateResolutionForStore() {
1543    return {
1544      type: 'INVALIDATE_RESOLUTION_FOR_STORE'
1545    };
1546  }
1547  /**
1548   * Returns an action object used in signalling that the resolution cache for a
1549   * given selectorName should be invalidated.
1550   *
1551   * @param {string} selectorName Name of selector for which all resolvers should
1552   *                              be invalidated.
1553   *
1554   * @return  {Object} Action object.
1555   */
1556  
1557  function invalidateResolutionForStoreSelector(selectorName) {
1558    return {
1559      type: 'INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR',
1560      selectorName: selectorName
1561    };
1562  }
1563  
1564  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/namespace-store/index.js
1565  
1566  
1567  
1568  
1569  function namespace_store_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
1570  
1571  function namespace_store_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { namespace_store_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { namespace_store_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
1572  
1573  /**
1574   * External dependencies
1575   */
1576  
1577  
1578  
1579  /**
1580   * WordPress dependencies
1581   */
1582  
1583  
1584  /**
1585   * Internal dependencies
1586   */
1587  
1588  
1589  
1590  
1591  
1592  
1593  /**
1594   * @typedef {WPDataRegistry} WPDataRegistry
1595   */
1596  
1597  /**
1598   * Creates a namespace object with a store derived from the reducer given.
1599   *
1600   * @param {string}         key      Unique namespace identifier.
1601   * @param {Object}         options  Registered store options, with properties
1602   *                                  describing reducer, actions, selectors, and
1603   *                                  resolvers.
1604   * @param {WPDataRegistry} registry Registry reference.
1605   *
1606   * @return {Object} Store Object.
1607   */
1608  
1609  function createNamespace(key, options, registry) {
1610    var reducer = options.reducer;
1611    var store = createReduxStore(key, options, registry);
1612    var resolvers;
1613    var actions = mapActions(namespace_store_objectSpread({}, actions_namespaceObject, {}, options.actions), store);
1614    var selectors = mapSelectors(namespace_store_objectSpread({}, Object(external_this_lodash_["mapValues"])(selectors_namespaceObject, function (selector) {
1615      return function (state) {
1616        for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1617          args[_key - 1] = arguments[_key];
1618        }
1619  
1620        return selector.apply(void 0, [state.metadata].concat(args));
1621      };
1622    }), {}, Object(external_this_lodash_["mapValues"])(options.selectors, function (selector) {
1623      if (selector.isRegistrySelector) {
1624        selector.registry = registry;
1625      }
1626  
1627      return function (state) {
1628        for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
1629          args[_key2 - 1] = arguments[_key2];
1630        }
1631  
1632        return selector.apply(void 0, [state.root].concat(args));
1633      };
1634    })), store);
1635  
1636    if (options.resolvers) {
1637      var result = mapResolvers(options.resolvers, selectors, store);
1638      resolvers = result.resolvers;
1639      selectors = result.selectors;
1640    }
1641  
1642    var getSelectors = function getSelectors() {
1643      return selectors;
1644    };
1645  
1646    var getActions = function getActions() {
1647      return actions;
1648    }; // We have some modules monkey-patching the store object
1649    // It's wrong to do so but until we refactor all of our effects to controls
1650    // We need to keep the same "store" instance here.
1651  
1652  
1653    store.__unstableOriginalGetState = store.getState;
1654  
1655    store.getState = function () {
1656      return store.__unstableOriginalGetState().root;
1657    }; // Customize subscribe behavior to call listeners only on effective change,
1658    // not on every dispatch.
1659  
1660  
1661    var subscribe = store && function (listener) {
1662      var lastState = store.__unstableOriginalGetState();
1663  
1664      store.subscribe(function () {
1665        var state = store.__unstableOriginalGetState();
1666  
1667        var hasChanged = state !== lastState;
1668        lastState = state;
1669  
1670        if (hasChanged) {
1671          listener();
1672        }
1673      });
1674    }; // This can be simplified to just { subscribe, getSelectors, getActions }
1675    // Once we remove the use function.
1676  
1677  
1678    return {
1679      reducer: reducer,
1680      store: store,
1681      actions: actions,
1682      selectors: selectors,
1683      resolvers: resolvers,
1684      getSelectors: getSelectors,
1685      getActions: getActions,
1686      subscribe: subscribe
1687    };
1688  }
1689  /**
1690   * Creates a redux store for a namespace.
1691   *
1692   * @param {string}         key      Unique namespace identifier.
1693   * @param {Object}         options  Registered store options, with properties
1694   *                                  describing reducer, actions, selectors, and
1695   *                                  resolvers.
1696   * @param {WPDataRegistry} registry Registry reference.
1697   *
1698   * @return {Object} Newly created redux store.
1699   */
1700  
1701  function createReduxStore(key, options, registry) {
1702    var middlewares = [resolvers_cache_middleware(registry, key), promise_middleware];
1703  
1704    if (options.controls) {
1705      var normalizedControls = Object(external_this_lodash_["mapValues"])(options.controls, function (control) {
1706        return control.isRegistryControl ? control(registry) : control;
1707      });
1708      middlewares.push(external_this_wp_reduxRoutine_default()(normalizedControls));
1709    }
1710  
1711    var enhancers = [applyMiddleware.apply(void 0, middlewares)];
1712  
1713    if (typeof window !== 'undefined' && window.__REDUX_DEVTOOLS_EXTENSION__) {
1714      enhancers.push(window.__REDUX_DEVTOOLS_EXTENSION__({
1715        name: key,
1716        instanceId: key
1717      }));
1718    }
1719  
1720    var reducer = options.reducer,
1721        initialState = options.initialState;
1722    var enhancedReducer = turbo_combine_reducers_default()({
1723      metadata: metadata_reducer,
1724      root: reducer
1725    });
1726    return createStore(enhancedReducer, {
1727      root: initialState
1728    }, Object(external_this_lodash_["flowRight"])(enhancers));
1729  }
1730  /**
1731   * Maps selectors to a store.
1732   *
1733   * @param {Object} selectors Selectors to register. Keys will be used as the
1734   *                           public facing API. Selectors will get passed the
1735   *                           state as first argument.
1736   * @param {Object} store     The store to which the selectors should be mapped.
1737   *
1738   * @return {Object} Selectors mapped to the provided store.
1739   */
1740  
1741  
1742  function mapSelectors(selectors, store) {
1743    var createStateSelector = function createStateSelector(registrySelector) {
1744      var selector = function runSelector() {
1745        // This function is an optimized implementation of:
1746        //
1747        //   selector( store.getState(), ...arguments )
1748        //
1749        // Where the above would incur an `Array#concat` in its application,
1750        // the logic here instead efficiently constructs an arguments array via
1751        // direct assignment.
1752        var argsLength = arguments.length;
1753        var args = new Array(argsLength + 1);
1754        args[0] = store.__unstableOriginalGetState();
1755  
1756        for (var i = 0; i < argsLength; i++) {
1757          args[i + 1] = arguments[i];
1758        }
1759  
1760        return registrySelector.apply(void 0, args);
1761      };
1762  
1763      selector.hasResolver = false;
1764      return selector;
1765    };
1766  
1767    return Object(external_this_lodash_["mapValues"])(selectors, createStateSelector);
1768  }
1769  /**
1770   * Maps actions to dispatch from a given store.
1771   *
1772   * @param {Object} actions    Actions to register.
1773   * @param {Object} store      The redux store to which the actions should be mapped.
1774   * @return {Object}           Actions mapped to the redux store provided.
1775   */
1776  
1777  
1778  function mapActions(actions, store) {
1779    var createBoundAction = function createBoundAction(action) {
1780      return function () {
1781        return Promise.resolve(store.dispatch(action.apply(void 0, arguments)));
1782      };
1783    };
1784  
1785    return Object(external_this_lodash_["mapValues"])(actions, createBoundAction);
1786  }
1787  /**
1788   * Returns resolvers with matched selectors for a given namespace.
1789   * Resolvers are side effects invoked once per argument set of a given selector call,
1790   * used in ensuring that the data needs for the selector are satisfied.
1791   *
1792   * @param {Object} resolvers   Resolvers to register.
1793   * @param {Object} selectors   The current selectors to be modified.
1794   * @param {Object} store       The redux store to which the resolvers should be mapped.
1795   * @return {Object}            An object containing updated selectors and resolvers.
1796   */
1797  
1798  
1799  function mapResolvers(resolvers, selectors, store) {
1800    var mappedResolvers = Object(external_this_lodash_["mapValues"])(resolvers, function (resolver) {
1801      var _resolver$fulfill = resolver.fulfill,
1802          resolverFulfill = _resolver$fulfill === void 0 ? resolver : _resolver$fulfill;
1803      return namespace_store_objectSpread({}, resolver, {
1804        fulfill: resolverFulfill
1805      });
1806    });
1807  
1808    var mapSelector = function mapSelector(selector, selectorName) {
1809      var resolver = resolvers[selectorName];
1810  
1811      if (!resolver) {
1812        selector.hasResolver = false;
1813        return selector;
1814      }
1815  
1816      var selectorResolver = function selectorResolver() {
1817        for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
1818          args[_key3] = arguments[_key3];
1819        }
1820  
1821        function fulfillSelector() {
1822          return _fulfillSelector.apply(this, arguments);
1823        }
1824  
1825        function _fulfillSelector() {
1826          _fulfillSelector = Object(asyncToGenerator["a" /* default */])(
1827          /*#__PURE__*/
1828          external_this_regeneratorRuntime_default.a.mark(function _callee() {
1829            var state, _store$__unstableOrig, metadata;
1830  
1831            return external_this_regeneratorRuntime_default.a.wrap(function _callee$(_context) {
1832              while (1) {
1833                switch (_context.prev = _context.next) {
1834                  case 0:
1835                    state = store.getState();
1836  
1837                    if (!(typeof resolver.isFulfilled === 'function' && resolver.isFulfilled.apply(resolver, [state].concat(args)))) {
1838                      _context.next = 3;
1839                      break;
1840                    }
1841  
1842                    return _context.abrupt("return");
1843  
1844                  case 3:
1845                    _store$__unstableOrig = store.__unstableOriginalGetState(), metadata = _store$__unstableOrig.metadata;
1846  
1847                    if (!hasStartedResolution(metadata, selectorName, args)) {
1848                      _context.next = 6;
1849                      break;
1850                    }
1851  
1852                    return _context.abrupt("return");
1853  
1854                  case 6:
1855                    store.dispatch(startResolution(selectorName, args));
1856                    _context.next = 9;
1857                    return fulfillResolver.apply(void 0, [store, mappedResolvers, selectorName].concat(args));
1858  
1859                  case 9:
1860                    store.dispatch(finishResolution(selectorName, args));
1861  
1862                  case 10:
1863                  case "end":
1864                    return _context.stop();
1865                }
1866              }
1867            }, _callee);
1868          }));
1869          return _fulfillSelector.apply(this, arguments);
1870        }
1871  
1872        fulfillSelector.apply(void 0, args);
1873        return selector.apply(void 0, args);
1874      };
1875  
1876      selectorResolver.hasResolver = true;
1877      return selectorResolver;
1878    };
1879  
1880    return {
1881      resolvers: mappedResolvers,
1882      selectors: Object(external_this_lodash_["mapValues"])(selectors, mapSelector)
1883    };
1884  }
1885  /**
1886   * Calls a resolver given arguments
1887   *
1888   * @param {Object} store        Store reference, for fulfilling via resolvers
1889   * @param {Object} resolvers    Store Resolvers
1890   * @param {string} selectorName Selector name to fulfill.
1891   * @param {Array} args          Selector Arguments.
1892   */
1893  
1894  
1895  function fulfillResolver(_x, _x2, _x3) {
1896    return _fulfillResolver.apply(this, arguments);
1897  }
1898  
1899  function _fulfillResolver() {
1900    _fulfillResolver = Object(asyncToGenerator["a" /* default */])(
1901    /*#__PURE__*/
1902    external_this_regeneratorRuntime_default.a.mark(function _callee2(store, resolvers, selectorName) {
1903      var resolver,
1904          _len4,
1905          args,
1906          _key4,
1907          action,
1908          _args2 = arguments;
1909  
1910      return external_this_regeneratorRuntime_default.a.wrap(function _callee2$(_context2) {
1911        while (1) {
1912          switch (_context2.prev = _context2.next) {
1913            case 0:
1914              resolver = Object(external_this_lodash_["get"])(resolvers, [selectorName]);
1915  
1916              if (resolver) {
1917                _context2.next = 3;
1918                break;
1919              }
1920  
1921              return _context2.abrupt("return");
1922  
1923            case 3:
1924              for (_len4 = _args2.length, args = new Array(_len4 > 3 ? _len4 - 3 : 0), _key4 = 3; _key4 < _len4; _key4++) {
1925                args[_key4 - 3] = _args2[_key4];
1926              }
1927  
1928              action = resolver.fulfill.apply(resolver, args);
1929  
1930              if (!action) {
1931                _context2.next = 8;
1932                break;
1933              }
1934  
1935              _context2.next = 8;
1936              return store.dispatch(action);
1937  
1938            case 8:
1939            case "end":
1940              return _context2.stop();
1941          }
1942        }
1943      }, _callee2);
1944    }));
1945    return _fulfillResolver.apply(this, arguments);
1946  }
1947  
1948  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/store/index.js
1949  
1950  
1951  function store_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
1952  
1953  function store_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { store_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { store_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
1954  
1955  function createCoreDataStore(registry) {
1956    var getCoreDataSelector = function getCoreDataSelector(selectorName) {
1957      return function (reducerKey) {
1958        var _registry$select;
1959  
1960        for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1961          args[_key - 1] = arguments[_key];
1962        }
1963  
1964        return (_registry$select = registry.select(reducerKey))[selectorName].apply(_registry$select, args);
1965      };
1966    };
1967  
1968    var getCoreDataAction = function getCoreDataAction(actionName) {
1969      return function (reducerKey) {
1970        var _registry$dispatch;
1971  
1972        for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
1973          args[_key2 - 1] = arguments[_key2];
1974        }
1975  
1976        return (_registry$dispatch = registry.dispatch(reducerKey))[actionName].apply(_registry$dispatch, args);
1977      };
1978    };
1979  
1980    return {
1981      getSelectors: function getSelectors() {
1982        return ['getIsResolving', 'hasStartedResolution', 'hasFinishedResolution', 'isResolving', 'getCachedResolvers'].reduce(function (memo, selectorName) {
1983          return store_objectSpread({}, memo, Object(defineProperty["a" /* default */])({}, selectorName, getCoreDataSelector(selectorName)));
1984        }, {});
1985      },
1986      getActions: function getActions() {
1987        return ['startResolution', 'finishResolution', 'invalidateResolution', 'invalidateResolutionForStore', 'invalidateResolutionForStoreSelector'].reduce(function (memo, actionName) {
1988          return store_objectSpread({}, memo, Object(defineProperty["a" /* default */])({}, actionName, getCoreDataAction(actionName)));
1989        }, {});
1990      },
1991      subscribe: function subscribe() {
1992        // There's no reasons to trigger any listener when we subscribe to this store
1993        // because there's no state stored in this store that need to retrigger selectors
1994        // if a change happens, the corresponding store where the tracking stated live
1995        // would have already triggered a "subscribe" call.
1996        return function () {};
1997      }
1998    };
1999  }
2000  
2001  /* harmony default export */ var build_module_store = (createCoreDataStore);
2002  
2003  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/registry.js
2004  
2005  
2006  
2007  function registry_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
2008  
2009  function registry_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { registry_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { registry_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
2010  
2011  /**
2012   * External dependencies
2013   */
2014  
2015  
2016  /**
2017   * Internal dependencies
2018   */
2019  
2020  
2021  
2022  /**
2023   * @typedef {Object} WPDataRegistry An isolated orchestrator of store registrations.
2024   *
2025   * @property {Function} registerGenericStore Given a namespace key and settings
2026   *                                           object, registers a new generic
2027   *                                           store.
2028   * @property {Function} registerStore        Given a namespace key and settings
2029   *                                           object, registers a new namespace
2030   *                                           store.
2031   * @property {Function} subscribe            Given a function callback, invokes
2032   *                                           the callback on any change to state
2033   *                                           within any registered store.
2034   * @property {Function} select               Given a namespace key, returns an
2035   *                                           object of the  store's registered
2036   *                                           selectors.
2037   * @property {Function} dispatch             Given a namespace key, returns an
2038   *                                           object of the store's registered
2039   *                                           action dispatchers.
2040   */
2041  
2042  /**
2043   * @typedef {Object} WPDataPlugin An object of registry function overrides.
2044   */
2045  
2046  /**
2047   * Creates a new store registry, given an optional object of initial store
2048   * configurations.
2049   *
2050   * @param {Object}  storeConfigs Initial store configurations.
2051   * @param {Object?} parent       Parent registry.
2052   *
2053   * @return {WPDataRegistry} Data registry.
2054   */
2055  
2056  function createRegistry() {
2057    var storeConfigs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2058    var parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
2059    var stores = {};
2060    var listeners = [];
2061    /**
2062     * Global listener called for each store's update.
2063     */
2064  
2065    function globalListener() {
2066      listeners.forEach(function (listener) {
2067        return listener();
2068      });
2069    }
2070    /**
2071     * Subscribe to changes to any data.
2072     *
2073     * @param {Function}   listener Listener function.
2074     *
2075     * @return {Function}           Unsubscribe function.
2076     */
2077  
2078  
2079    var subscribe = function subscribe(listener) {
2080      listeners.push(listener);
2081      return function () {
2082        listeners = Object(external_this_lodash_["without"])(listeners, listener);
2083      };
2084    };
2085    /**
2086     * Calls a selector given the current state and extra arguments.
2087     *
2088     * @param {string} reducerKey Part of the state shape to register the
2089     *                            selectors for.
2090     *
2091     * @return {*} The selector's returned value.
2092     */
2093  
2094  
2095    function select(reducerKey) {
2096      var store = stores[reducerKey];
2097  
2098      if (store) {
2099        return store.getSelectors();
2100      }
2101  
2102      return parent && parent.select(reducerKey);
2103    }
2104  
2105    var getResolveSelectors = memize_default()(function (selectors) {
2106      return Object(external_this_lodash_["mapValues"])(Object(external_this_lodash_["omit"])(selectors, ['getIsResolving', 'hasStartedResolution', 'hasFinishedResolution', 'isResolving', 'getCachedResolvers']), function (selector, selectorName) {
2107        return function () {
2108          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2109            args[_key] = arguments[_key];
2110          }
2111  
2112          return new Promise(function (resolve) {
2113            var hasFinished = function hasFinished() {
2114              return selectors.hasFinishedResolution(selectorName, args);
2115            };
2116  
2117            var getResult = function getResult() {
2118              return selector.apply(null, args);
2119            }; // trigger the selector (to trigger the resolver)
2120  
2121  
2122            var result = getResult();
2123  
2124            if (hasFinished()) {
2125              return resolve(result);
2126            }
2127  
2128            var unsubscribe = subscribe(function () {
2129              if (hasFinished()) {
2130                unsubscribe();
2131                resolve(getResult());
2132              }
2133            });
2134          });
2135        };
2136      });
2137    }, {
2138      maxSize: 1
2139    });
2140    /**
2141     * Given the name of a registered store, returns an object containing the store's
2142     * selectors pre-bound to state so that you only need to supply additional arguments,
2143     * and modified so that they return promises that resolve to their eventual values,
2144     * after any resolvers have ran.
2145     *
2146     * @param {string} reducerKey Part of the state shape to register the
2147     *                            selectors for.
2148     *
2149     * @return {Object} Each key of the object matches the name of a selector.
2150     */
2151  
2152    function __experimentalResolveSelect(reducerKey) {
2153      return getResolveSelectors(select(reducerKey));
2154    }
2155    /**
2156     * Returns the available actions for a part of the state.
2157     *
2158     * @param {string} reducerKey Part of the state shape to dispatch the
2159     *                            action for.
2160     *
2161     * @return {*} The action's returned value.
2162     */
2163  
2164  
2165    function dispatch(reducerKey) {
2166      var store = stores[reducerKey];
2167  
2168      if (store) {
2169        return store.getActions();
2170      }
2171  
2172      return parent && parent.dispatch(reducerKey);
2173    } //
2174    // Deprecated
2175    // TODO: Remove this after `use()` is removed.
2176    //
2177  
2178  
2179    function withPlugins(attributes) {
2180      return Object(external_this_lodash_["mapValues"])(attributes, function (attribute, key) {
2181        if (typeof attribute !== 'function') {
2182          return attribute;
2183        }
2184  
2185        return function () {
2186          return registry[key].apply(null, arguments);
2187        };
2188      });
2189    }
2190    /**
2191     * Registers a generic store.
2192     *
2193     * @param {string} key    Store registry key.
2194     * @param {Object} config Configuration (getSelectors, getActions, subscribe).
2195     */
2196  
2197  
2198    function registerGenericStore(key, config) {
2199      if (typeof config.getSelectors !== 'function') {
2200        throw new TypeError('config.getSelectors must be a function');
2201      }
2202  
2203      if (typeof config.getActions !== 'function') {
2204        throw new TypeError('config.getActions must be a function');
2205      }
2206  
2207      if (typeof config.subscribe !== 'function') {
2208        throw new TypeError('config.subscribe must be a function');
2209      }
2210  
2211      stores[key] = config;
2212      config.subscribe(globalListener);
2213    }
2214  
2215    var registry = {
2216      registerGenericStore: registerGenericStore,
2217      stores: stores,
2218      namespaces: stores,
2219      // TODO: Deprecate/remove this.
2220      subscribe: subscribe,
2221      select: select,
2222      __experimentalResolveSelect: __experimentalResolveSelect,
2223      dispatch: dispatch,
2224      use: use
2225    };
2226    /**
2227     * Registers a standard `@wordpress/data` store.
2228     *
2229     * @param {string} reducerKey Reducer key.
2230     * @param {Object} options    Store description (reducer, actions, selectors, resolvers).
2231     *
2232     * @return {Object} Registered store object.
2233     */
2234  
2235    registry.registerStore = function (reducerKey, options) {
2236      if (!options.reducer) {
2237        throw new TypeError('Must specify store reducer');
2238      }
2239  
2240      var namespace = createNamespace(reducerKey, options, registry);
2241      registerGenericStore(reducerKey, namespace);
2242      return namespace.store;
2243    }; //
2244    // TODO:
2245    // This function will be deprecated as soon as it is no longer internally referenced.
2246    //
2247  
2248  
2249    function use(plugin, options) {
2250      registry = registry_objectSpread({}, registry, {}, plugin(registry, options));
2251      return registry;
2252    }
2253  
2254    registerGenericStore('core/data', build_module_store(registry));
2255    Object.entries(storeConfigs).forEach(function (_ref) {
2256      var _ref2 = Object(slicedToArray["a" /* default */])(_ref, 2),
2257          name = _ref2[0],
2258          config = _ref2[1];
2259  
2260      return registry.registerStore(name, config);
2261    });
2262  
2263    if (parent) {
2264      parent.subscribe(globalListener);
2265    }
2266  
2267    return withPlugins(registry);
2268  }
2269  
2270  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/default-registry.js
2271  /**
2272   * Internal dependencies
2273   */
2274  
2275  /* harmony default export */ var default_registry = (createRegistry());
2276  
2277  // EXTERNAL MODULE: external {"this":["wp","deprecated"]}
2278  var external_this_wp_deprecated_ = __webpack_require__(37);
2279  var external_this_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_deprecated_);
2280  
2281  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/plugins/controls/index.js
2282  /**
2283   * WordPress dependencies
2284   */
2285  
2286  /* harmony default export */ var controls = (function (registry) {
2287    external_this_wp_deprecated_default()('wp.data.plugins.controls', {
2288      hint: 'The controls plugins is now baked-in.'
2289    });
2290    return registry;
2291  });
2292  
2293  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/plugins/persistence/storage/object.js
2294  var objectStorage;
2295  var object_storage = {
2296    getItem: function getItem(key) {
2297      if (!objectStorage || !objectStorage[key]) {
2298        return null;
2299      }
2300  
2301      return objectStorage[key];
2302    },
2303    setItem: function setItem(key, value) {
2304      if (!objectStorage) {
2305        object_storage.clear();
2306      }
2307  
2308      objectStorage[key] = String(value);
2309    },
2310    clear: function clear() {
2311      objectStorage = Object.create(null);
2312    }
2313  };
2314  /* harmony default export */ var object = (object_storage);
2315  
2316  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/plugins/persistence/storage/default.js
2317  /**
2318   * Internal dependencies
2319   */
2320  
2321  var default_storage;
2322  
2323  try {
2324    // Private Browsing in Safari 10 and earlier will throw an error when
2325    // attempting to set into localStorage. The test here is intentional in
2326    // causing a thrown error as condition for using fallback object storage.
2327    default_storage = window.localStorage;
2328    default_storage.setItem('__wpDataTestLocalStorage', '');
2329    default_storage.removeItem('__wpDataTestLocalStorage');
2330  } catch (error) {
2331    default_storage = object;
2332  }
2333  
2334  /* harmony default export */ var storage_default = (default_storage);
2335  
2336  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/plugins/persistence/index.js
2337  
2338  
2339  function persistence_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
2340  
2341  function persistence_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { persistence_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { persistence_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
2342  
2343  /**
2344   * External dependencies
2345   */
2346  
2347  /**
2348   * Internal dependencies
2349   */
2350  
2351  
2352  
2353  /** @typedef {import('../../registry').WPDataRegistry} WPDataRegistry */
2354  
2355  /** @typedef {import('../../registry').WPDataPlugin} WPDataPlugin */
2356  
2357  /**
2358   * @typedef {Object} WPDataPersistencePluginOptions Persistence plugin options.
2359   *
2360   * @property {Storage} storage    Persistent storage implementation. This must
2361   *                                at least implement `getItem` and `setItem` of
2362   *                                the Web Storage API.
2363   * @property {string}  storageKey Key on which to set in persistent storage.
2364   *
2365   */
2366  
2367  /**
2368   * Default plugin storage.
2369   *
2370   * @type {Storage}
2371   */
2372  
2373  var DEFAULT_STORAGE = storage_default;
2374  /**
2375   * Default plugin storage key.
2376   *
2377   * @type {string}
2378   */
2379  
2380  var DEFAULT_STORAGE_KEY = 'WP_DATA';
2381  /**
2382   * Higher-order reducer which invokes the original reducer only if state is
2383   * inequal from that of the action's `nextState` property, otherwise returning
2384   * the original state reference.
2385   *
2386   * @param {Function} reducer Original reducer.
2387   *
2388   * @return {Function} Enhanced reducer.
2389   */
2390  
2391  var withLazySameState = function withLazySameState(reducer) {
2392    return function (state, action) {
2393      if (action.nextState === state) {
2394        return state;
2395      }
2396  
2397      return reducer(state, action);
2398    };
2399  };
2400  /**
2401   * Creates a persistence interface, exposing getter and setter methods (`get`
2402   * and `set` respectively).
2403   *
2404   * @param {WPDataPersistencePluginOptions} options Plugin options.
2405   *
2406   * @return {Object} Persistence interface.
2407   */
2408  
2409  function createPersistenceInterface(options) {
2410    var _options$storage = options.storage,
2411        storage = _options$storage === void 0 ? DEFAULT_STORAGE : _options$storage,
2412        _options$storageKey = options.storageKey,
2413        storageKey = _options$storageKey === void 0 ? DEFAULT_STORAGE_KEY : _options$storageKey;
2414    var data;
2415    /**
2416     * Returns the persisted data as an object, defaulting to an empty object.
2417     *
2418     * @return {Object} Persisted data.
2419     */
2420  
2421    function getData() {
2422      if (data === undefined) {
2423        // If unset, getItem is expected to return null. Fall back to
2424        // empty object.
2425        var persisted = storage.getItem(storageKey);
2426  
2427        if (persisted === null) {
2428          data = {};
2429        } else {
2430          try {
2431            data = JSON.parse(persisted);
2432          } catch (error) {
2433            // Similarly, should any error be thrown during parse of
2434            // the string (malformed JSON), fall back to empty object.
2435            data = {};
2436          }
2437        }
2438      }
2439  
2440      return data;
2441    }
2442    /**
2443     * Merges an updated reducer state into the persisted data.
2444     *
2445     * @param {string} key   Key to update.
2446     * @param {*}      value Updated value.
2447     */
2448  
2449  
2450    function setData(key, value) {
2451      data = persistence_objectSpread({}, data, Object(defineProperty["a" /* default */])({}, key, value));
2452      storage.setItem(storageKey, JSON.stringify(data));
2453    }
2454  
2455    return {
2456      get: getData,
2457      set: setData
2458    };
2459  }
2460  /**
2461   * Data plugin to persist store state into a single storage key.
2462   *
2463   * @param {WPDataRegistry}                  registry      Data registry.
2464   * @param {?WPDataPersistencePluginOptions} pluginOptions Plugin options.
2465   *
2466   * @return {WPDataPlugin} Data plugin.
2467   */
2468  
2469  var persistence_persistencePlugin = function persistencePlugin(registry, pluginOptions) {
2470    var persistence = createPersistenceInterface(pluginOptions);
2471    /**
2472     * Creates an enhanced store dispatch function, triggering the state of the
2473     * given reducer key to be persisted when changed.
2474     *
2475     * @param {Function}       getState   Function which returns current state.
2476     * @param {string}         reducerKey Reducer key.
2477     * @param {?Array<string>} keys       Optional subset of keys to save.
2478     *
2479     * @return {Function} Enhanced dispatch function.
2480     */
2481  
2482    function createPersistOnChange(getState, reducerKey, keys) {
2483      var getPersistedState;
2484  
2485      if (Array.isArray(keys)) {
2486        // Given keys, the persisted state should by produced as an object
2487        // of the subset of keys. This implementation uses combineReducers
2488        // to leverage its behavior of returning the same object when none
2489        // of the property values changes. This allows a strict reference
2490        // equality to bypass a persistence set on an unchanging state.
2491        var reducers = keys.reduce(function (accumulator, key) {
2492          return Object.assign(accumulator, Object(defineProperty["a" /* default */])({}, key, function (state, action) {
2493            return action.nextState[key];
2494          }));
2495        }, {});
2496        getPersistedState = withLazySameState(turbo_combine_reducers_default()(reducers));
2497      } else {
2498        getPersistedState = function getPersistedState(state, action) {
2499          return action.nextState;
2500        };
2501      }
2502  
2503      var lastState = getPersistedState(undefined, {
2504        nextState: getState()
2505      });
2506      return function () {
2507        var state = getPersistedState(lastState, {
2508          nextState: getState()
2509        });
2510  
2511        if (state !== lastState) {
2512          persistence.set(reducerKey, state);
2513          lastState = state;
2514        }
2515      };
2516    }
2517  
2518    return {
2519      registerStore: function registerStore(reducerKey, options) {
2520        if (!options.persist) {
2521          return registry.registerStore(reducerKey, options);
2522        } // Load from persistence to use as initial state.
2523  
2524  
2525        var persistedState = persistence.get()[reducerKey];
2526  
2527        if (persistedState !== undefined) {
2528          var initialState = options.reducer(undefined, {
2529            type: '@@WP/PERSISTENCE_RESTORE'
2530          });
2531  
2532          if (Object(external_this_lodash_["isPlainObject"])(initialState) && Object(external_this_lodash_["isPlainObject"])(persistedState)) {
2533            // If state is an object, ensure that:
2534            // - Other keys are left intact when persisting only a
2535            //   subset of keys.
2536            // - New keys in what would otherwise be used as initial
2537            //   state are deeply merged as base for persisted value.
2538            initialState = Object(external_this_lodash_["merge"])({}, initialState, persistedState);
2539          } else {
2540            // If there is a mismatch in object-likeness of default
2541            // initial or persisted state, defer to persisted value.
2542            initialState = persistedState;
2543          }
2544  
2545          options = persistence_objectSpread({}, options, {
2546            initialState: initialState
2547          });
2548        }
2549  
2550        var store = registry.registerStore(reducerKey, options);
2551        store.subscribe(createPersistOnChange(store.getState, reducerKey, options.persist));
2552        return store;
2553      }
2554    };
2555  };
2556  /**
2557   * Deprecated: Remove this function and the code in WordPress Core that calls
2558   * it once WordPress 5.4 is released.
2559   */
2560  
2561  
2562  persistence_persistencePlugin.__unstableMigrate = function (pluginOptions) {
2563    var persistence = createPersistenceInterface(pluginOptions);
2564    var state = persistence.get(); // Migrate 'insertUsage' from 'core/editor' to 'core/block-editor'
2565  
2566    var insertUsage = Object(external_this_lodash_["get"])(state, ['core/editor', 'preferences', 'insertUsage']);
2567  
2568    if (insertUsage) {
2569      persistence.set('core/block-editor', {
2570        preferences: {
2571          insertUsage: insertUsage
2572        }
2573      });
2574    }
2575  
2576    var editPostState = state['core/edit-post']; // Default `fullscreenMode` to `false` if any persisted state had existed
2577    // and the user hadn't made an explicit choice about fullscreen mode. This
2578    // is needed since `fullscreenMode` previously did not have a default value
2579    // and was implicitly false by its absence. It is now `true` by default, but
2580    // this change is not intended to affect upgrades from earlier versions.
2581  
2582    var hadPersistedState = Object.keys(state).length > 0;
2583    var hadFullscreenModePreference = Object(external_this_lodash_["has"])(state, ['core/edit-post', 'preferences', 'features', 'fullscreenMode']);
2584  
2585    if (hadPersistedState && !hadFullscreenModePreference) {
2586      editPostState = Object(external_this_lodash_["merge"])({}, editPostState, {
2587        preferences: {
2588          features: {
2589            fullscreenMode: false
2590          }
2591        }
2592      });
2593    } // Migrate 'areTipsEnabled' from 'core/nux' to 'showWelcomeGuide' in 'core/edit-post'
2594  
2595  
2596    var areTipsEnabled = Object(external_this_lodash_["get"])(state, ['core/nux', 'preferences', 'areTipsEnabled']);
2597    var hasWelcomeGuide = Object(external_this_lodash_["has"])(state, ['core/edit-post', 'preferences', 'features', 'welcomeGuide']);
2598  
2599    if (areTipsEnabled !== undefined && !hasWelcomeGuide) {
2600      editPostState = Object(external_this_lodash_["merge"])({}, editPostState, {
2601        preferences: {
2602          features: {
2603            welcomeGuide: areTipsEnabled
2604          }
2605        }
2606      });
2607    }
2608  
2609    if (editPostState !== state['core/edit-post']) {
2610      persistence.set('core/edit-post', editPostState);
2611    }
2612  };
2613  
2614  /* harmony default export */ var plugins_persistence = (persistence_persistencePlugin);
2615  
2616  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/plugins/index.js
2617  
2618  
2619  
2620  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
2621  var esm_extends = __webpack_require__(12);
2622  
2623  // EXTERNAL MODULE: external {"this":["wp","element"]}
2624  var external_this_wp_element_ = __webpack_require__(0);
2625  
2626  // EXTERNAL MODULE: external {"this":["wp","compose"]}
2627  var external_this_wp_compose_ = __webpack_require__(8);
2628  
2629  // EXTERNAL MODULE: external {"this":"React"}
2630  var external_this_React_ = __webpack_require__(21);
2631  
2632  // CONCATENATED MODULE: ./node_modules/use-memo-one/dist/use-memo-one.esm.js
2633  
2634  
2635  function areInputsEqual(newInputs, lastInputs) {
2636    if (newInputs.length !== lastInputs.length) {
2637      return false;
2638    }
2639  
2640    for (var i = 0; i < newInputs.length; i++) {
2641      if (newInputs[i] !== lastInputs[i]) {
2642        return false;
2643      }
2644    }
2645  
2646    return true;
2647  }
2648  
2649  function useMemoOne(getResult, inputs) {
2650    var initial = Object(external_this_React_["useState"])(function () {
2651      return {
2652        inputs: inputs,
2653        result: getResult()
2654      };
2655    })[0];
2656    var committed = Object(external_this_React_["useRef"])(initial);
2657    var isInputMatch = Boolean(inputs && committed.current.inputs && areInputsEqual(inputs, committed.current.inputs));
2658    var cache = isInputMatch ? committed.current : {
2659      inputs: inputs,
2660      result: getResult()
2661    };
2662    Object(external_this_React_["useEffect"])(function () {
2663      committed.current = cache;
2664    }, [cache]);
2665    return cache.result;
2666  }
2667  function useCallbackOne(callback, inputs) {
2668    return useMemoOne(function () {
2669      return callback;
2670    }, inputs);
2671  }
2672  var useMemo = useMemoOne;
2673  var useCallback = useCallbackOne;
2674  
2675  
2676  
2677  // EXTERNAL MODULE: external {"this":["wp","priorityQueue"]}
2678  var external_this_wp_priorityQueue_ = __webpack_require__(274);
2679  
2680  // EXTERNAL MODULE: external {"this":["wp","isShallowEqual"]}
2681  var external_this_wp_isShallowEqual_ = __webpack_require__(51);
2682  var external_this_wp_isShallowEqual_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_isShallowEqual_);
2683  
2684  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/registry-provider/context.js
2685  /**
2686   * WordPress dependencies
2687   */
2688  
2689  /**
2690   * Internal dependencies
2691   */
2692  
2693  
2694  var Context = Object(external_this_wp_element_["createContext"])(default_registry);
2695  var Consumer = Context.Consumer,
2696      Provider = Context.Provider;
2697  /**
2698   * A custom react Context consumer exposing the provided `registry` to
2699   * children components. Used along with the RegistryProvider.
2700   *
2701   * You can read more about the react context api here:
2702   * https://reactjs.org/docs/context.html#contextprovider
2703   *
2704   * @example
2705   * ```js
2706   * const {
2707   *   RegistryProvider,
2708   *   RegistryConsumer,
2709   *   createRegistry
2710   * } = wp.data;
2711   *
2712   * const registry = createRegistry( {} );
2713   *
2714   * const App = ( { props } ) => {
2715   *   return <RegistryProvider value={ registry }>
2716   *     <div>Hello There</div>
2717   *     <RegistryConsumer>
2718   *       { ( registry ) => (
2719   *         <ComponentUsingRegistry
2720   *                 { ...props }
2721   *               registry={ registry }
2722   *       ) }
2723   *     </RegistryConsumer>
2724   *   </RegistryProvider>
2725   * }
2726   * ```
2727   */
2728  
2729  var RegistryConsumer = Consumer;
2730  /**
2731   * A custom Context provider for exposing the provided `registry` to children
2732   * components via a consumer.
2733   *
2734   * See <a name="#RegistryConsumer">RegistryConsumer</a> documentation for
2735   * example.
2736   */
2737  
2738  /* harmony default export */ var context = (Provider);
2739  
2740  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/registry-provider/use-registry.js
2741  /**
2742   * WordPress dependencies
2743   */
2744  
2745  /**
2746   * Internal dependencies
2747   */
2748  
2749  
2750  /**
2751   * A custom react hook exposing the registry context for use.
2752   *
2753   * This exposes the `registry` value provided via the
2754   * <a href="#RegistryProvider">Registry Provider</a> to a component implementing
2755   * this hook.
2756   *
2757   * It acts similarly to the `useContext` react hook.
2758   *
2759   * Note: Generally speaking, `useRegistry` is a low level hook that in most cases
2760   * won't be needed for implementation. Most interactions with the wp.data api
2761   * can be performed via the `useSelect` hook,  or the `withSelect` and
2762   * `withDispatch` higher order components.
2763   *
2764   * @example
2765   * ```js
2766   * const {
2767   *   RegistryProvider,
2768   *   createRegistry,
2769   *   useRegistry,
2770   * } = wp.data
2771   *
2772   * const registry = createRegistry( {} );
2773   *
2774   * const SomeChildUsingRegistry = ( props ) => {
2775   *   const registry = useRegistry( registry );
2776   *   // ...logic implementing the registry in other react hooks.
2777   * };
2778   *
2779   *
2780   * const ParentProvidingRegistry = ( props ) => {
2781   *   return <RegistryProvider value={ registry }>
2782   *     <SomeChildUsingRegistry { ...props } />
2783   *   </RegistryProvider>
2784   * };
2785   * ```
2786   *
2787   * @return {Function}  A custom react hook exposing the registry context value.
2788   */
2789  
2790  function useRegistry() {
2791    return Object(external_this_wp_element_["useContext"])(Context);
2792  }
2793  
2794  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/async-mode-provider/context.js
2795  /**
2796   * WordPress dependencies
2797   */
2798  
2799  var context_Context = Object(external_this_wp_element_["createContext"])(false);
2800  var context_Consumer = context_Context.Consumer,
2801      context_Provider = context_Context.Provider;
2802  var AsyncModeConsumer = context_Consumer;
2803  /**
2804   * Context Provider Component used to switch the data module component rerendering
2805   * between Sync and Async modes.
2806   *
2807   * @example
2808   *
2809   * ```js
2810   * import { useSelect, AsyncModeProvider } from '@wordpress/data';
2811   *
2812   * function BlockCount() {
2813   *   const count = useSelect( ( select ) => {
2814   *     return select( 'core/block-editor' ).getBlockCount()
2815   *   }, [] );
2816   *
2817   *   return count;
2818   * }
2819   *
2820   * function App() {
2821   *   return (
2822   *     <AsyncModeProvider value={ true }>
2823   *       <BlockCount />
2824   *     </AsyncModeProvider>
2825   *   );
2826   * }
2827   * ```
2828   *
2829   * In this example, the BlockCount component is rerendered asynchronously.
2830   * It means if a more critical task is being performed (like typing in an input),
2831   * the rerendering is delayed until the browser becomes IDLE.
2832   * It is possible to nest multiple levels of AsyncModeProvider to fine-tune the rendering behavior.
2833   *
2834   * @param {boolean}   props.value  Enable Async Mode.
2835   * @return {WPComponent} The component to be rendered.
2836   */
2837  
2838  /* harmony default export */ var async_mode_provider_context = (context_Provider);
2839  
2840  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/async-mode-provider/use-async-mode.js
2841  /**
2842   * WordPress dependencies
2843   */
2844  
2845  /**
2846   * Internal dependencies
2847   */
2848  
2849  
2850  function useAsyncMode() {
2851    return Object(external_this_wp_element_["useContext"])(context_Context);
2852  }
2853  
2854  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/use-select/index.js
2855  
2856  
2857  /**
2858   * External dependencies
2859   */
2860  
2861  /**
2862   * WordPress dependencies
2863   */
2864  
2865  
2866  
2867  
2868  /**
2869   * Internal dependencies
2870   */
2871  
2872  
2873  
2874  /**
2875   * Favor useLayoutEffect to ensure the store subscription callback always has
2876   * the selector from the latest render. If a store update happens between render
2877   * and the effect, this could cause missed/stale updates or inconsistent state.
2878   *
2879   * Fallback to useEffect for server rendered components because currently React
2880   * throws a warning when using useLayoutEffect in that environment.
2881   */
2882  
2883  var useIsomorphicLayoutEffect = typeof window !== 'undefined' ? external_this_wp_element_["useLayoutEffect"] : external_this_wp_element_["useEffect"];
2884  var renderQueue = Object(external_this_wp_priorityQueue_["createQueue"])();
2885  /**
2886   * Custom react hook for retrieving props from registered selectors.
2887   *
2888   * In general, this custom React hook follows the
2889   * [rules of hooks](https://reactjs.org/docs/hooks-rules.html).
2890   *
2891   * @param {Function} _mapSelect  Function called on every state change. The
2892   *                               returned value is exposed to the component
2893   *                               implementing this hook. The function receives
2894   *                               the `registry.select` method on the first
2895   *                               argument and the `registry` on the second
2896   *                               argument.
2897   * @param {Array}    deps        If provided, this memoizes the mapSelect so the
2898   *                               same `mapSelect` is invoked on every state
2899   *                               change unless the dependencies change.
2900   *
2901   * @example
2902   * ```js
2903   * const { useSelect } = wp.data;
2904   *
2905   * function HammerPriceDisplay( { currency } ) {
2906   *   const price = useSelect( ( select ) => {
2907   *     return select( 'my-shop' ).getPrice( 'hammer', currency )
2908   *   }, [ currency ] );
2909   *   return new Intl.NumberFormat( 'en-US', {
2910   *     style: 'currency',
2911   *     currency,
2912   *   } ).format( price );
2913   * }
2914   *
2915   * // Rendered in the application:
2916   * // <HammerPriceDisplay currency="USD" />
2917   * ```
2918   *
2919   * In the above example, when `HammerPriceDisplay` is rendered into an
2920   * application, the price will be retrieved from the store state using the
2921   * `mapSelect` callback on `useSelect`. If the currency prop changes then
2922   * any price in the state for that currency is retrieved. If the currency prop
2923   * doesn't change and other props are passed in that do change, the price will
2924   * not change because the dependency is just the currency.
2925   *
2926   * @return {Function}  A custom react hook.
2927   */
2928  
2929  function useSelect(_mapSelect, deps) {
2930    var mapSelect = Object(external_this_wp_element_["useCallback"])(_mapSelect, deps);
2931    var registry = useRegistry();
2932    var isAsync = useAsyncMode(); // React can sometimes clear the `useMemo` cache.
2933    // We use the cache-stable `useMemoOne` to avoid
2934    // losing queues.
2935  
2936    var queueContext = useMemoOne(function () {
2937      return {
2938        queue: true
2939      };
2940    }, [registry]);
2941  
2942    var _useReducer = Object(external_this_wp_element_["useReducer"])(function (s) {
2943      return s + 1;
2944    }, 0),
2945        _useReducer2 = Object(slicedToArray["a" /* default */])(_useReducer, 2),
2946        forceRender = _useReducer2[1];
2947  
2948    var latestMapSelect = Object(external_this_wp_element_["useRef"])();
2949    var latestIsAsync = Object(external_this_wp_element_["useRef"])(isAsync);
2950    var latestMapOutput = Object(external_this_wp_element_["useRef"])();
2951    var latestMapOutputError = Object(external_this_wp_element_["useRef"])();
2952    var isMountedAndNotUnsubscribing = Object(external_this_wp_element_["useRef"])();
2953    var mapOutput;
2954  
2955    try {
2956      if (latestMapSelect.current !== mapSelect || latestMapOutputError.current) {
2957        mapOutput = mapSelect(registry.select, registry);
2958      } else {
2959        mapOutput = latestMapOutput.current;
2960      }
2961    } catch (error) {
2962      var errorMessage = "An error occurred while running 'mapSelect': ".concat(error.message);
2963  
2964      if (latestMapOutputError.current) {
2965        errorMessage += "\nThe error may be correlated with this previous error:\n";
2966        errorMessage += "".concat(latestMapOutputError.current.stack, "\n\n");
2967        errorMessage += 'Original stack trace:';
2968        throw new Error(errorMessage);
2969      } else {
2970        // eslint-disable-next-line no-console
2971        console.error(errorMessage);
2972      }
2973    }
2974  
2975    useIsomorphicLayoutEffect(function () {
2976      latestMapSelect.current = mapSelect;
2977      latestMapOutput.current = mapOutput;
2978      latestMapOutputError.current = undefined;
2979      isMountedAndNotUnsubscribing.current = true; // This has to run after the other ref updates
2980      // to avoid using stale values in the flushed
2981      // callbacks or potentially overwriting a
2982      // changed `latestMapOutput.current`.
2983  
2984      if (latestIsAsync.current !== isAsync) {
2985        latestIsAsync.current = isAsync;
2986        renderQueue.flush(queueContext);
2987      }
2988    });
2989    useIsomorphicLayoutEffect(function () {
2990      var onStoreChange = function onStoreChange() {
2991        if (isMountedAndNotUnsubscribing.current) {
2992          try {
2993            var newMapOutput = latestMapSelect.current(registry.select, registry);
2994  
2995            if (external_this_wp_isShallowEqual_default()(latestMapOutput.current, newMapOutput)) {
2996              return;
2997            }
2998  
2999            latestMapOutput.current = newMapOutput;
3000          } catch (error) {
3001            latestMapOutputError.current = error;
3002          }
3003  
3004          forceRender();
3005        }
3006      }; // catch any possible state changes during mount before the subscription
3007      // could be set.
3008  
3009  
3010      if (latestIsAsync.current) {
3011        renderQueue.add(queueContext, onStoreChange);
3012      } else {
3013        onStoreChange();
3014      }
3015  
3016      var unsubscribe = registry.subscribe(function () {
3017        if (latestIsAsync.current) {
3018          renderQueue.add(queueContext, onStoreChange);
3019        } else {
3020          onStoreChange();
3021        }
3022      });
3023      return function () {
3024        isMountedAndNotUnsubscribing.current = false;
3025        unsubscribe();
3026        renderQueue.flush(queueContext);
3027      };
3028    }, [registry]);
3029    return mapOutput;
3030  }
3031  
3032  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/with-select/index.js
3033  
3034  
3035  
3036  /**
3037   * WordPress dependencies
3038   */
3039  
3040  /**
3041   * Internal dependencies
3042   */
3043  
3044  
3045  /**
3046   * Higher-order component used to inject state-derived props using registered
3047   * selectors.
3048   *
3049   * @param {Function} mapSelectToProps Function called on every state change,
3050   *                                   expected to return object of props to
3051   *                                   merge with the component's own props.
3052   *
3053   * @example
3054   * ```js
3055   * function PriceDisplay( { price, currency } ) {
3056   *     return new Intl.NumberFormat( 'en-US', {
3057   *         style: 'currency',
3058   *         currency,
3059   *     } ).format( price );
3060   * }
3061   *
3062   * const { withSelect } = wp.data;
3063   *
3064   * const HammerPriceDisplay = withSelect( ( select, ownProps ) => {
3065   *     const { getPrice } = select( 'my-shop' );
3066   *     const { currency } = ownProps;
3067   *
3068   *     return {
3069   *         price: getPrice( 'hammer', currency ),
3070   *     };
3071   * } )( PriceDisplay );
3072   *
3073   * // Rendered in the application:
3074   * //
3075   * //  <HammerPriceDisplay currency="USD" />
3076   * ```
3077   * In the above example, when `HammerPriceDisplay` is rendered into an
3078   * application, it will pass the price into the underlying `PriceDisplay`
3079   * component and update automatically if the price of a hammer ever changes in
3080   * the store.
3081   *
3082   * @return {WPComponent} Enhanced component with merged state data props.
3083   */
3084  
3085  var with_select_withSelect = function withSelect(mapSelectToProps) {
3086    return Object(external_this_wp_compose_["createHigherOrderComponent"])(function (WrappedComponent) {
3087      return Object(external_this_wp_compose_["pure"])(function (ownProps) {
3088        var mapSelect = function mapSelect(select, registry) {
3089          return mapSelectToProps(select, ownProps, registry);
3090        };
3091  
3092        var mergeProps = useSelect(mapSelect);
3093        return Object(external_this_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({}, ownProps, mergeProps));
3094      });
3095    }, 'withSelect');
3096  };
3097  
3098  /* harmony default export */ var with_select = (with_select_withSelect);
3099  
3100  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/use-dispatch/use-dispatch.js
3101  /**
3102   * Internal dependencies
3103   */
3104  
3105  /**
3106   * A custom react hook returning the current registry dispatch actions creators.
3107   *
3108   * Note: The component using this hook must be within the context of a
3109   * RegistryProvider.
3110   *
3111   * @param {string} [storeName]  Optionally provide the name of the store from
3112   *                             which to retrieve action creators. If not
3113   *                             provided, the registry.dispatch function is
3114   *                             returned instead.
3115   *
3116   * @example
3117   * This illustrates a pattern where you may need to retrieve dynamic data from
3118   * the server via the `useSelect` hook to use in combination with the dispatch
3119   * action.
3120   *
3121   * ```jsx
3122   * const { useDispatch, useSelect } = wp.data;
3123   * const { useCallback } = wp.element;
3124   *
3125   * function Button( { onClick, children } ) {
3126   *   return <button type="button" onClick={ onClick }>{ children }</button>
3127   * }
3128   *
3129   * const SaleButton = ( { children } ) => {
3130   *   const { stockNumber } = useSelect(
3131   *     ( select ) => select( 'my-shop' ).getStockNumber(),
3132   *     []
3133   *   );
3134   *   const { startSale } = useDispatch( 'my-shop' );
3135   *   const onClick = useCallback( () => {
3136   *     const discountPercent = stockNumber > 50 ? 10: 20;
3137   *     startSale( discountPercent );
3138   *   }, [ stockNumber ] );
3139   *   return <Button onClick={ onClick }>{ children }</Button>
3140   * }
3141   *
3142   * // Rendered somewhere in the application:
3143   * //
3144   * // <SaleButton>Start Sale!</SaleButton>
3145   * ```
3146   * @return {Function}  A custom react hook.
3147   */
3148  
3149  var use_dispatch_useDispatch = function useDispatch(storeName) {
3150    var _useRegistry = useRegistry(),
3151        dispatch = _useRegistry.dispatch;
3152  
3153    return storeName === void 0 ? dispatch : dispatch(storeName);
3154  };
3155  
3156  /* harmony default export */ var use_dispatch = (use_dispatch_useDispatch);
3157  
3158  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/use-dispatch/use-dispatch-with-map.js
3159  
3160  
3161  /**
3162   * External dependencies
3163   */
3164  
3165  /**
3166   * WordPress dependencies
3167   */
3168  
3169  
3170  /**
3171   * Internal dependencies
3172   */
3173  
3174  
3175  /**
3176   * Favor useLayoutEffect to ensure the store subscription callback always has
3177   * the dispatchMap from the latest render. If a store update happens between
3178   * render and the effect, this could cause missed/stale updates or
3179   * inconsistent state.
3180   *
3181   * Fallback to useEffect for server rendered components because currently React
3182   * throws a warning when using useLayoutEffect in that environment.
3183   */
3184  
3185  var use_dispatch_with_map_useIsomorphicLayoutEffect = typeof window !== 'undefined' ? external_this_wp_element_["useLayoutEffect"] : external_this_wp_element_["useEffect"];
3186  /**
3187   * Custom react hook for returning aggregate dispatch actions using the provided
3188   * dispatchMap.
3189   *
3190   * Currently this is an internal api only and is implemented by `withDispatch`
3191   *
3192   * @param {Function} dispatchMap  Receives the `registry.dispatch` function as
3193   *                                the first argument and the `registry` object
3194   *                                as the second argument.  Should return an
3195   *                                object mapping props to functions.
3196   * @param {Array}    deps         An array of dependencies for the hook.
3197   * @return {Object}  An object mapping props to functions created by the passed
3198   *                   in dispatchMap.
3199   */
3200  
3201  var use_dispatch_with_map_useDispatchWithMap = function useDispatchWithMap(dispatchMap, deps) {
3202    var registry = useRegistry();
3203    var currentDispatchMap = Object(external_this_wp_element_["useRef"])(dispatchMap);
3204    use_dispatch_with_map_useIsomorphicLayoutEffect(function () {
3205      currentDispatchMap.current = dispatchMap;
3206    });
3207    return Object(external_this_wp_element_["useMemo"])(function () {
3208      var currentDispatchProps = currentDispatchMap.current(registry.dispatch, registry);
3209      return Object(external_this_lodash_["mapValues"])(currentDispatchProps, function (dispatcher, propName) {
3210        if (typeof dispatcher !== 'function') {
3211          // eslint-disable-next-line no-console
3212          console.warn("Property ".concat(propName, " returned from dispatchMap in useDispatchWithMap must be a function."));
3213        }
3214  
3215        return function () {
3216          var _currentDispatchMap$c;
3217  
3218          return (_currentDispatchMap$c = currentDispatchMap.current(registry.dispatch, registry))[propName].apply(_currentDispatchMap$c, arguments);
3219        };
3220      });
3221    }, [registry].concat(Object(toConsumableArray["a" /* default */])(deps)));
3222  };
3223  
3224  /* harmony default export */ var use_dispatch_with_map = (use_dispatch_with_map_useDispatchWithMap);
3225  
3226  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/use-dispatch/index.js
3227  
3228  
3229  
3230  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/with-dispatch/index.js
3231  
3232  
3233  
3234  /**
3235   * WordPress dependencies
3236   */
3237  
3238  /**
3239   * Internal dependencies
3240   */
3241  
3242  
3243  /**
3244   * Higher-order component used to add dispatch props using registered action
3245   * creators.
3246   *
3247   * @param {Function} mapDispatchToProps A function of returning an object of
3248   *                                      prop names where value is a
3249   *                                      dispatch-bound action creator, or a
3250   *                                      function to be called with the
3251   *                                      component's props and returning an
3252   *                                      action creator.
3253   *
3254   * @example
3255   * ```jsx
3256   * function Button( { onClick, children } ) {
3257   *     return <button type="button" onClick={ onClick }>{ children }</button>;
3258   * }
3259   *
3260   * const { withDispatch } = wp.data;
3261   *
3262   * const SaleButton = withDispatch( ( dispatch, ownProps ) => {
3263   *     const { startSale } = dispatch( 'my-shop' );
3264   *     const { discountPercent } = ownProps;
3265   *
3266   *     return {
3267   *         onClick() {
3268   *             startSale( discountPercent );
3269   *         },
3270   *     };
3271   * } )( Button );
3272   *
3273   * // Rendered in the application:
3274   * //
3275   * // <SaleButton discountPercent="20">Start Sale!</SaleButton>
3276   * ```
3277   *
3278   * @example
3279   * In the majority of cases, it will be sufficient to use only two first params
3280   * passed to `mapDispatchToProps` as illustrated in the previous example.
3281   * However, there might be some very advanced use cases where using the
3282   * `registry` object might be used as a tool to optimize the performance of
3283   * your component. Using `select` function from the registry might be useful
3284   * when you need to fetch some dynamic data from the store at the time when the
3285   * event is fired, but at the same time, you never use it to render your
3286   * component. In such scenario, you can avoid using the `withSelect` higher
3287   * order component to compute such prop, which might lead to unnecessary
3288   * re-renders of your component caused by its frequent value change.
3289   * Keep in mind, that `mapDispatchToProps` must return an object with functions
3290   * only.
3291   *
3292   * ```jsx
3293   * function Button( { onClick, children } ) {
3294   *     return <button type="button" onClick={ onClick }>{ children }</button>;
3295   * }
3296   *
3297   * const { withDispatch } = wp.data;
3298   *
3299   * const SaleButton = withDispatch( ( dispatch, ownProps, { select } ) => {
3300   *    // Stock number changes frequently.
3301   *    const { getStockNumber } = select( 'my-shop' );
3302   *    const { startSale } = dispatch( 'my-shop' );
3303   *    return {
3304   *        onClick() {
3305   *            const discountPercent = getStockNumber() > 50 ? 10 : 20;
3306   *            startSale( discountPercent );
3307   *        },
3308   *    };
3309   * } )( Button );
3310   *
3311   * // Rendered in the application:
3312   * //
3313   * //  <SaleButton>Start Sale!</SaleButton>
3314   * ```
3315   *
3316   * _Note:_ It is important that the `mapDispatchToProps` function always
3317   * returns an object with the same keys. For example, it should not contain
3318   * conditions under which a different value would be returned.
3319   *
3320   * @return {WPComponent} Enhanced component with merged dispatcher props.
3321   */
3322  
3323  var with_dispatch_withDispatch = function withDispatch(mapDispatchToProps) {
3324    return Object(external_this_wp_compose_["createHigherOrderComponent"])(function (WrappedComponent) {
3325      return function (ownProps) {
3326        var mapDispatch = function mapDispatch(dispatch, registry) {
3327          return mapDispatchToProps(dispatch, ownProps, registry);
3328        };
3329  
3330        var dispatchProps = use_dispatch_with_map(mapDispatch, []);
3331        return Object(external_this_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({}, ownProps, dispatchProps));
3332      };
3333    }, 'withDispatch');
3334  };
3335  
3336  /* harmony default export */ var with_dispatch = (with_dispatch_withDispatch);
3337  
3338  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/registry-provider/index.js
3339  
3340  
3341  
3342  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/with-registry/index.js
3343  
3344  
3345  
3346  /**
3347   * WordPress dependencies
3348   */
3349  
3350  /**
3351   * Internal dependencies
3352   */
3353  
3354  
3355  /**
3356   * Higher-order component which renders the original component with the current
3357   * registry context passed as its `registry` prop.
3358   *
3359   * @param {WPComponent} OriginalComponent Original component.
3360   *
3361   * @return {WPComponent} Enhanced component.
3362   */
3363  
3364  var withRegistry = Object(external_this_wp_compose_["createHigherOrderComponent"])(function (OriginalComponent) {
3365    return function (props) {
3366      return Object(external_this_wp_element_["createElement"])(RegistryConsumer, null, function (registry) {
3367        return Object(external_this_wp_element_["createElement"])(OriginalComponent, Object(esm_extends["a" /* default */])({}, props, {
3368          registry: registry
3369        }));
3370      });
3371    };
3372  }, 'withRegistry');
3373  /* harmony default export */ var with_registry = (withRegistry);
3374  
3375  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/async-mode-provider/index.js
3376  
3377  
3378  
3379  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/factory.js
3380  /**
3381   * Internal dependencies
3382   */
3383  
3384  /** @typedef {import('./registry').WPDataRegistry} WPDataRegistry */
3385  
3386  /**
3387   * Mark a selector as a registry selector.
3388   *
3389   * @param {Function} registrySelector Function receiving a registry object and returning a state selector.
3390   *
3391   * @return {Function} marked registry selector.
3392   */
3393  
3394  function createRegistrySelector(registrySelector) {
3395    var selector = function selector() {
3396      return registrySelector(selector.registry.select).apply(void 0, arguments);
3397    };
3398    /**
3399     * Flag indicating to selector registration mapping that the selector should
3400     * be mapped as a registry selector.
3401     *
3402     * @type {boolean}
3403     */
3404  
3405  
3406    selector.isRegistrySelector = true;
3407    /**
3408     * Registry on which to call `select`, stubbed for non-standard usage to
3409     * use the default registry.
3410     *
3411     * @type {WPDataRegistry}
3412     */
3413  
3414    selector.registry = default_registry;
3415    return selector;
3416  }
3417  /**
3418   * Mark a control as a registry control.
3419   *
3420   * @param {Function} registryControl Function receiving a registry object and returning a control.
3421   *
3422   * @return {Function} marked registry control.
3423   */
3424  
3425  function createRegistryControl(registryControl) {
3426    registryControl.isRegistryControl = true;
3427    return registryControl;
3428  }
3429  
3430  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/index.js
3431  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "select", function() { return build_module_select; });
3432  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__experimentalResolveSelect", function() { return build_module_experimentalResolveSelect; });
3433  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return build_module_dispatch; });
3434  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribe", function() { return build_module_subscribe; });
3435  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerGenericStore", function() { return build_module_registerGenericStore; });
3436  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerStore", function() { return build_module_registerStore; });
3437  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "use", function() { return build_module_use; });
3438  /* concated harmony reexport withSelect */__webpack_require__.d(__webpack_exports__, "withSelect", function() { return with_select; });
3439  /* concated harmony reexport withDispatch */__webpack_require__.d(__webpack_exports__, "withDispatch", function() { return with_dispatch; });
3440  /* concated harmony reexport withRegistry */__webpack_require__.d(__webpack_exports__, "withRegistry", function() { return with_registry; });
3441  /* concated harmony reexport RegistryProvider */__webpack_require__.d(__webpack_exports__, "RegistryProvider", function() { return context; });
3442  /* concated harmony reexport RegistryConsumer */__webpack_require__.d(__webpack_exports__, "RegistryConsumer", function() { return RegistryConsumer; });
3443  /* concated harmony reexport useRegistry */__webpack_require__.d(__webpack_exports__, "useRegistry", function() { return useRegistry; });
3444  /* concated harmony reexport useSelect */__webpack_require__.d(__webpack_exports__, "useSelect", function() { return useSelect; });
3445  /* concated harmony reexport useDispatch */__webpack_require__.d(__webpack_exports__, "useDispatch", function() { return use_dispatch; });
3446  /* concated harmony reexport __unstableUseDispatchWithMap */__webpack_require__.d(__webpack_exports__, "__unstableUseDispatchWithMap", function() { return use_dispatch_with_map; });
3447  /* concated harmony reexport AsyncModeProvider */__webpack_require__.d(__webpack_exports__, "AsyncModeProvider", function() { return async_mode_provider_context; });
3448  /* concated harmony reexport createRegistry */__webpack_require__.d(__webpack_exports__, "createRegistry", function() { return createRegistry; });
3449  /* concated harmony reexport createRegistrySelector */__webpack_require__.d(__webpack_exports__, "createRegistrySelector", function() { return createRegistrySelector; });
3450  /* concated harmony reexport createRegistryControl */__webpack_require__.d(__webpack_exports__, "createRegistryControl", function() { return createRegistryControl; });
3451  /* concated harmony reexport plugins */__webpack_require__.d(__webpack_exports__, "plugins", function() { return plugins_namespaceObject; });
3452  /* concated harmony reexport combineReducers */__webpack_require__.d(__webpack_exports__, "combineReducers", function() { return turbo_combine_reducers_default.a; });
3453  /**
3454   * External dependencies
3455   */
3456  
3457  /**
3458   * Internal dependencies
3459   */
3460  
3461  
3462  
3463  
3464  
3465  
3466  
3467  
3468  
3469  
3470  
3471  
3472  /**
3473   * Object of available plugins to use with a registry.
3474   *
3475   * @see [use](#use)
3476   *
3477   * @type {Object}
3478   */
3479  
3480  
3481  /**
3482   * The combineReducers helper function turns an object whose values are different
3483   * reducing functions into a single reducing function you can pass to registerReducer.
3484   *
3485   * @param {Object} reducers An object whose values correspond to different reducing
3486   *                          functions that need to be combined into one.
3487   *
3488   * @example
3489   * ```js
3490   * const { combineReducers, registerStore } = wp.data;
3491   *
3492   * const prices = ( state = {}, action ) => {
3493   *     return action.type === 'SET_PRICE' ?
3494   *         {
3495   *             ...state,
3496   *             [ action.item ]: action.price,
3497   *         } :
3498   *         state;
3499   * };
3500   *
3501   * const discountPercent = ( state = 0, action ) => {
3502   *     return action.type === 'START_SALE' ?
3503   *         action.discountPercent :
3504   *         state;
3505   * };
3506   *
3507   * registerStore( 'my-shop', {
3508   *     reducer: combineReducers( {
3509   *         prices,
3510   *         discountPercent,
3511   *     } ),
3512   * } );
3513   * ```
3514   *
3515   * @return {Function}       A reducer that invokes every reducer inside the reducers
3516   *                          object, and constructs a state object with the same shape.
3517   */
3518  
3519  
3520  /**
3521   * Given the name of a registered store, returns an object of the store's selectors.
3522   * The selector functions are been pre-bound to pass the current state automatically.
3523   * As a consumer, you need only pass arguments of the selector, if applicable.
3524   *
3525   * @param {string} name Store name.
3526   *
3527   * @example
3528   * ```js
3529   * const { select } = wp.data;
3530   *
3531   * select( 'my-shop' ).getPrice( 'hammer' );
3532   * ```
3533   *
3534   * @return {Object} Object containing the store's selectors.
3535   */
3536  
3537  var build_module_select = default_registry.select;
3538  /**
3539   * Given the name of a registered store, returns an object containing the store's
3540   * selectors pre-bound to state so that you only need to supply additional arguments,
3541   * and modified so that they return promises that resolve to their eventual values,
3542   * after any resolvers have ran.
3543   *
3544   * @param {string} name Store name.
3545   *
3546   * @example
3547   * ```js
3548   * const { __experimentalResolveSelect } = wp.data;
3549   *
3550   * __experimentalResolveSelect( 'my-shop' ).getPrice( 'hammer' ).then(console.log)
3551   * ```
3552   *
3553   * @return {Object} Object containing the store's promise-wrapped selectors.
3554   */
3555  
3556  var build_module_experimentalResolveSelect = default_registry.__experimentalResolveSelect;
3557  /**
3558   * Given the name of a registered store, returns an object of the store's action creators.
3559   * Calling an action creator will cause it to be dispatched, updating the state value accordingly.
3560   *
3561   * Note: Action creators returned by the dispatch will return a promise when
3562   * they are called.
3563   *
3564   * @param {string} name Store name.
3565   *
3566   * @example
3567   * ```js
3568   * const { dispatch } = wp.data;
3569   *
3570   * dispatch( 'my-shop' ).setPrice( 'hammer', 9.75 );
3571   * ```
3572   * @return {Object} Object containing the action creators.
3573   */
3574  
3575  var build_module_dispatch = default_registry.dispatch;
3576  /**
3577   * Given a listener function, the function will be called any time the state value
3578   * of one of the registered stores has changed. This function returns a `unsubscribe`
3579   * function used to stop the subscription.
3580   *
3581   * @param {Function} listener Callback function.
3582   *
3583   * @example
3584   * ```js
3585   * const { subscribe } = wp.data;
3586   *
3587   * const unsubscribe = subscribe( () => {
3588   *     // You could use this opportunity to test whether the derived result of a
3589   *     // selector has subsequently changed as the result of a state update.
3590   * } );
3591   *
3592   * // Later, if necessary...
3593   * unsubscribe();
3594   * ```
3595   */
3596  
3597  var build_module_subscribe = default_registry.subscribe;
3598  /**
3599   * Registers a generic store.
3600   *
3601   * @param {string} key    Store registry key.
3602   * @param {Object} config Configuration (getSelectors, getActions, subscribe).
3603   */
3604  
3605  var build_module_registerGenericStore = default_registry.registerGenericStore;
3606  /**
3607   * Registers a standard `@wordpress/data` store.
3608   *
3609   * @param {string} reducerKey Reducer key.
3610   * @param {Object} options    Store description (reducer, actions, selectors, resolvers).
3611   *
3612   * @return {Object} Registered store object.
3613   */
3614  
3615  var build_module_registerStore = default_registry.registerStore;
3616  /**
3617   * Extends a registry to inherit functionality provided by a given plugin. A
3618   * plugin is an object with properties aligning to that of a registry, merged
3619   * to extend the default registry behavior.
3620   *
3621   * @param {Object} plugin Plugin object.
3622   */
3623  
3624  var build_module_use = default_registry.use;
3625  
3626  
3627  /***/ }),
3628  
3629  /***/ 46:
3630  /***/ (function(module, exports, __webpack_require__) {
3631  
3632  /**
3633   * Memize options object.
3634   *
3635   * @typedef MemizeOptions
3636   *
3637   * @property {number} [maxSize] Maximum size of the cache.
3638   */
3639  
3640  /**
3641   * Internal cache entry.
3642   *
3643   * @typedef MemizeCacheNode
3644   *
3645   * @property {?MemizeCacheNode|undefined} [prev] Previous node.
3646   * @property {?MemizeCacheNode|undefined} [next] Next node.
3647   * @property {Array<*>}                   args   Function arguments for cache
3648   *                                               entry.
3649   * @property {*}                          val    Function result.
3650   */
3651  
3652  /**
3653   * Properties of the enhanced function for controlling cache.
3654   *
3655   * @typedef MemizeMemoizedFunction
3656   *
3657   * @property {()=>void} clear Clear the cache.
3658   */
3659  
3660  /**
3661   * Accepts a function to be memoized, and returns a new memoized function, with
3662   * optional options.
3663   *
3664   * @template {Function} F
3665   *
3666   * @param {F}             fn        Function to memoize.
3667   * @param {MemizeOptions} [options] Options object.
3668   *
3669   * @return {F & MemizeMemoizedFunction} Memoized function.
3670   */
3671  function memize( fn, options ) {
3672      var size = 0;
3673  
3674      /** @type {?MemizeCacheNode|undefined} */
3675      var head;
3676  
3677      /** @type {?MemizeCacheNode|undefined} */
3678      var tail;
3679  
3680      options = options || {};
3681  
3682  	function memoized( /* ...args */ ) {
3683          var node = head,
3684              len = arguments.length,
3685              args, i;
3686  
3687          searchCache: while ( node ) {
3688              // Perform a shallow equality test to confirm that whether the node
3689              // under test is a candidate for the arguments passed. Two arrays
3690              // are shallowly equal if their length matches and each entry is
3691              // strictly equal between the two sets. Avoid abstracting to a
3692              // function which could incur an arguments leaking deoptimization.
3693  
3694              // Check whether node arguments match arguments length
3695              if ( node.args.length !== arguments.length ) {
3696                  node = node.next;
3697                  continue;
3698              }
3699  
3700              // Check whether node arguments match arguments values
3701              for ( i = 0; i < len; i++ ) {
3702                  if ( node.args[ i ] !== arguments[ i ] ) {
3703                      node = node.next;
3704                      continue searchCache;
3705                  }
3706              }
3707  
3708              // At this point we can assume we've found a match
3709  
3710              // Surface matched node to head if not already
3711              if ( node !== head ) {
3712                  // As tail, shift to previous. Must only shift if not also
3713                  // head, since if both head and tail, there is no previous.
3714                  if ( node === tail ) {
3715                      tail = node.prev;
3716                  }
3717  
3718                  // Adjust siblings to point to each other. If node was tail,
3719                  // this also handles new tail's empty `next` assignment.
3720                  /** @type {MemizeCacheNode} */ ( node.prev ).next = node.next;
3721                  if ( node.next ) {
3722                      node.next.prev = node.prev;
3723                  }
3724  
3725                  node.next = head;
3726                  node.prev = null;
3727                  /** @type {MemizeCacheNode} */ ( head ).prev = node;
3728                  head = node;
3729              }
3730  
3731              // Return immediately
3732              return node.val;
3733          }
3734  
3735          // No cached value found. Continue to insertion phase:
3736  
3737          // Create a copy of arguments (avoid leaking deoptimization)
3738          args = new Array( len );
3739          for ( i = 0; i < len; i++ ) {
3740              args[ i ] = arguments[ i ];
3741          }
3742  
3743          node = {
3744              args: args,
3745  
3746              // Generate the result from original function
3747              val: fn.apply( null, args ),
3748          };
3749  
3750          // Don't need to check whether node is already head, since it would
3751          // have been returned above already if it was
3752  
3753          // Shift existing head down list
3754          if ( head ) {
3755              head.prev = node;
3756              node.next = head;
3757          } else {
3758              // If no head, follows that there's no tail (at initial or reset)
3759              tail = node;
3760          }
3761  
3762          // Trim tail if we're reached max size and are pending cache insertion
3763          if ( size === /** @type {MemizeOptions} */ ( options ).maxSize ) {
3764              tail = /** @type {MemizeCacheNode} */ ( tail ).prev;
3765              /** @type {MemizeCacheNode} */ ( tail ).next = null;
3766          } else {
3767              size++;
3768          }
3769  
3770          head = node;
3771  
3772          return node.val;
3773      }
3774  
3775      memoized.clear = function() {
3776          head = null;
3777          tail = null;
3778          size = 0;
3779      };
3780  
3781      if ( false ) {}
3782  
3783      // Ignore reason: There's not a clear solution to create an intersection of
3784      // the function with additional properties, where the goal is to retain the
3785      // function signature of the incoming argument and add control properties
3786      // on the return value.
3787  
3788      // @ts-ignore
3789      return memoized;
3790  }
3791  
3792  module.exports = memize;
3793  
3794  
3795  /***/ }),
3796  
3797  /***/ 49:
3798  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3799  
3800  "use strict";
3801  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _asyncToGenerator; });
3802  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
3803    try {
3804      var info = gen[key](arg);
3805      var value = info.value;
3806    } catch (error) {
3807      reject(error);
3808      return;
3809    }
3810  
3811    if (info.done) {
3812      resolve(value);
3813    } else {
3814      Promise.resolve(value).then(_next, _throw);
3815    }
3816  }
3817  
3818  function _asyncToGenerator(fn) {
3819    return function () {
3820      var self = this,
3821          args = arguments;
3822      return new Promise(function (resolve, reject) {
3823        var gen = fn.apply(self, args);
3824  
3825        function _next(value) {
3826          asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
3827        }
3828  
3829        function _throw(err) {
3830          asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
3831        }
3832  
3833        _next(undefined);
3834      });
3835    };
3836  }
3837  
3838  /***/ }),
3839  
3840  /***/ 5:
3841  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3842  
3843  "use strict";
3844  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
3845  function _defineProperty(obj, key, value) {
3846    if (key in obj) {
3847      Object.defineProperty(obj, key, {
3848        value: value,
3849        enumerable: true,
3850        configurable: true,
3851        writable: true
3852      });
3853    } else {
3854      obj[key] = value;
3855    }
3856  
3857    return obj;
3858  }
3859  
3860  /***/ }),
3861  
3862  /***/ 51:
3863  /***/ (function(module, exports) {
3864  
3865  (function() { module.exports = this["wp"]["isShallowEqual"]; }());
3866  
3867  /***/ }),
3868  
3869  /***/ 64:
3870  /***/ (function(module, exports, __webpack_require__) {
3871  
3872  "use strict";
3873  
3874  
3875  function _typeof(obj) {
3876    if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
3877      _typeof = function (obj) {
3878        return typeof obj;
3879      };
3880    } else {
3881      _typeof = function (obj) {
3882        return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
3883      };
3884    }
3885  
3886    return _typeof(obj);
3887  }
3888  
3889  function _classCallCheck(instance, Constructor) {
3890    if (!(instance instanceof Constructor)) {
3891      throw new TypeError("Cannot call a class as a function");
3892    }
3893  }
3894  
3895  function _defineProperties(target, props) {
3896    for (var i = 0; i < props.length; i++) {
3897      var descriptor = props[i];
3898      descriptor.enumerable = descriptor.enumerable || false;
3899      descriptor.configurable = true;
3900      if ("value" in descriptor) descriptor.writable = true;
3901      Object.defineProperty(target, descriptor.key, descriptor);
3902    }
3903  }
3904  
3905  function _createClass(Constructor, protoProps, staticProps) {
3906    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
3907    if (staticProps) _defineProperties(Constructor, staticProps);
3908    return Constructor;
3909  }
3910  
3911  /**
3912   * Given an instance of EquivalentKeyMap, returns its internal value pair tuple
3913   * for a key, if one exists. The tuple members consist of the last reference
3914   * value for the key (used in efficient subsequent lookups) and the value
3915   * assigned for the key at the leaf node.
3916   *
3917   * @param {EquivalentKeyMap} instance EquivalentKeyMap instance.
3918   * @param {*} key                     The key for which to return value pair.
3919   *
3920   * @return {?Array} Value pair, if exists.
3921   */
3922  function getValuePair(instance, key) {
3923    var _map = instance._map,
3924        _arrayTreeMap = instance._arrayTreeMap,
3925        _objectTreeMap = instance._objectTreeMap; // Map keeps a reference to the last object-like key used to set the
3926    // value, which can be used to shortcut immediately to the value.
3927  
3928    if (_map.has(key)) {
3929      return _map.get(key);
3930    } // Sort keys to ensure stable retrieval from tree.
3931  
3932  
3933    var properties = Object.keys(key).sort(); // Tree by type to avoid conflicts on numeric object keys, empty value.
3934  
3935    var map = Array.isArray(key) ? _arrayTreeMap : _objectTreeMap;
3936  
3937    for (var i = 0; i < properties.length; i++) {
3938      var property = properties[i];
3939      map = map.get(property);
3940  
3941      if (map === undefined) {
3942        return;
3943      }
3944  
3945      var propertyValue = key[property];
3946      map = map.get(propertyValue);
3947  
3948      if (map === undefined) {
3949        return;
3950      }
3951    }
3952  
3953    var valuePair = map.get('_ekm_value');
3954  
3955    if (!valuePair) {
3956      return;
3957    } // If reached, it implies that an object-like key was set with another
3958    // reference, so delete the reference and replace with the current.
3959  
3960  
3961    _map.delete(valuePair[0]);
3962  
3963    valuePair[0] = key;
3964    map.set('_ekm_value', valuePair);
3965  
3966    _map.set(key, valuePair);
3967  
3968    return valuePair;
3969  }
3970  /**
3971   * Variant of a Map object which enables lookup by equivalent (deeply equal)
3972   * object and array keys.
3973   */
3974  
3975  
3976  var EquivalentKeyMap =
3977  /*#__PURE__*/
3978  function () {
3979    /**
3980     * Constructs a new instance of EquivalentKeyMap.
3981     *
3982     * @param {Iterable.<*>} iterable Initial pair of key, value for map.
3983     */
3984    function EquivalentKeyMap(iterable) {
3985      _classCallCheck(this, EquivalentKeyMap);
3986  
3987      this.clear();
3988  
3989      if (iterable instanceof EquivalentKeyMap) {
3990        // Map#forEach is only means of iterating with support for IE11.
3991        var iterablePairs = [];
3992        iterable.forEach(function (value, key) {
3993          iterablePairs.push([key, value]);
3994        });
3995        iterable = iterablePairs;
3996      }
3997  
3998      if (iterable != null) {
3999        for (var i = 0; i < iterable.length; i++) {
4000          this.set(iterable[i][0], iterable[i][1]);
4001        }
4002      }
4003    }
4004    /**
4005     * Accessor property returning the number of elements.
4006     *
4007     * @return {number} Number of elements.
4008     */
4009  
4010  
4011    _createClass(EquivalentKeyMap, [{
4012      key: "set",
4013  
4014      /**
4015       * Add or update an element with a specified key and value.
4016       *
4017       * @param {*} key   The key of the element to add.
4018       * @param {*} value The value of the element to add.
4019       *
4020       * @return {EquivalentKeyMap} Map instance.
4021       */
4022      value: function set(key, value) {
4023        // Shortcut non-object-like to set on internal Map.
4024        if (key === null || _typeof(key) !== 'object') {
4025          this._map.set(key, value);
4026  
4027          return this;
4028        } // Sort keys to ensure stable assignment into tree.
4029  
4030  
4031        var properties = Object.keys(key).sort();
4032        var valuePair = [key, value]; // Tree by type to avoid conflicts on numeric object keys, empty value.
4033  
4034        var map = Array.isArray(key) ? this._arrayTreeMap : this._objectTreeMap;
4035  
4036        for (var i = 0; i < properties.length; i++) {
4037          var property = properties[i];
4038  
4039          if (!map.has(property)) {
4040            map.set(property, new EquivalentKeyMap());
4041          }
4042  
4043          map = map.get(property);
4044          var propertyValue = key[property];
4045  
4046          if (!map.has(propertyValue)) {
4047            map.set(propertyValue, new EquivalentKeyMap());
4048          }
4049  
4050          map = map.get(propertyValue);
4051        } // If an _ekm_value exists, there was already an equivalent key. Before
4052        // overriding, ensure that the old key reference is removed from map to
4053        // avoid memory leak of accumulating equivalent keys. This is, in a
4054        // sense, a poor man's WeakMap, while still enabling iterability.
4055  
4056  
4057        var previousValuePair = map.get('_ekm_value');
4058  
4059        if (previousValuePair) {
4060          this._map.delete(previousValuePair[0]);
4061        }
4062  
4063        map.set('_ekm_value', valuePair);
4064  
4065        this._map.set(key, valuePair);
4066  
4067        return this;
4068      }
4069      /**
4070       * Returns a specified element.
4071       *
4072       * @param {*} key The key of the element to return.
4073       *
4074       * @return {?*} The element associated with the specified key or undefined
4075       *              if the key can't be found.
4076       */
4077  
4078    }, {
4079      key: "get",
4080      value: function get(key) {
4081        // Shortcut non-object-like to get from internal Map.
4082        if (key === null || _typeof(key) !== 'object') {
4083          return this._map.get(key);
4084        }
4085  
4086        var valuePair = getValuePair(this, key);
4087  
4088        if (valuePair) {
4089          return valuePair[1];
4090        }
4091      }
4092      /**
4093       * Returns a boolean indicating whether an element with the specified key
4094       * exists or not.
4095       *
4096       * @param {*} key The key of the element to test for presence.
4097       *
4098       * @return {boolean} Whether an element with the specified key exists.
4099       */
4100  
4101    }, {
4102      key: "has",
4103      value: function has(key) {
4104        if (key === null || _typeof(key) !== 'object') {
4105          return this._map.has(key);
4106        } // Test on the _presence_ of the pair, not its value, as even undefined
4107        // can be a valid member value for a key.
4108  
4109  
4110        return getValuePair(this, key) !== undefined;
4111      }
4112      /**
4113       * Removes the specified element.
4114       *
4115       * @param {*} key The key of the element to remove.
4116       *
4117       * @return {boolean} Returns true if an element existed and has been
4118       *                   removed, or false if the element does not exist.
4119       */
4120  
4121    }, {
4122      key: "delete",
4123      value: function _delete(key) {
4124        if (!this.has(key)) {
4125          return false;
4126        } // This naive implementation will leave orphaned child trees. A better
4127        // implementation should traverse and remove orphans.
4128  
4129  
4130        this.set(key, undefined);
4131        return true;
4132      }
4133      /**
4134       * Executes a provided function once per each key/value pair, in insertion
4135       * order.
4136       *
4137       * @param {Function} callback Function to execute for each element.
4138       * @param {*}        thisArg  Value to use as `this` when executing
4139       *                            `callback`.
4140       */
4141  
4142    }, {
4143      key: "forEach",
4144      value: function forEach(callback) {
4145        var _this = this;
4146  
4147        var thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this;
4148  
4149        this._map.forEach(function (value, key) {
4150          // Unwrap value from object-like value pair.
4151          if (key !== null && _typeof(key) === 'object') {
4152            value = value[1];
4153          }
4154  
4155          callback.call(thisArg, value, key, _this);
4156        });
4157      }
4158      /**
4159       * Removes all elements.
4160       */
4161  
4162    }, {
4163      key: "clear",
4164      value: function clear() {
4165        this._map = new Map();
4166        this._arrayTreeMap = new Map();
4167        this._objectTreeMap = new Map();
4168      }
4169    }, {
4170      key: "size",
4171      get: function get() {
4172        return this._map.size;
4173      }
4174    }]);
4175  
4176    return EquivalentKeyMap;
4177  }();
4178  
4179  module.exports = EquivalentKeyMap;
4180  
4181  
4182  /***/ }),
4183  
4184  /***/ 73:
4185  /***/ (function(module, exports) {
4186  
4187  var g;
4188  
4189  // This works in non-strict mode
4190  g = (function() {
4191      return this;
4192  })();
4193  
4194  try {
4195      // This works if eval is allowed (see CSP)
4196      g = g || new Function("return this")();
4197  } catch (e) {
4198      // This works if the window reference is available
4199      if (typeof window === "object") g = window;
4200  }
4201  
4202  // g can still be undefined, but nothing to do about it...
4203  // We return undefined, instead of nothing here, so it's
4204  // easier to handle this case. if(!global) { ...}
4205  
4206  module.exports = g;
4207  
4208  
4209  /***/ }),
4210  
4211  /***/ 8:
4212  /***/ (function(module, exports) {
4213  
4214  (function() { module.exports = this["wp"]["compose"]; }());
4215  
4216  /***/ })
4217  
4218  /******/ });


Generated: Fri Apr 10 01:00:03 2020 Cross-referenced by PHPXref 0.7.1