[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/js/dist/ -> redux-routine.js (source)

   1  this["wp"] = this["wp"] || {}; this["wp"]["reduxRoutine"] =
   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 = 465);
  86  /******/ })
  87  /************************************************************************/
  88  /******/ ({
  89  
  90  /***/ 157:
  91  /***/ (function(module, exports, __webpack_require__) {
  92  
  93  "use strict";
  94  
  95  
  96  Object.defineProperty(exports, "__esModule", {
  97    value: true
  98  });
  99  
 100  var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
 101  
 102  var _keys = __webpack_require__(256);
 103  
 104  var _keys2 = _interopRequireDefault(_keys);
 105  
 106  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 107  
 108  var is = {
 109    obj: function obj(value) {
 110      return (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && !!value;
 111    },
 112    all: function all(value) {
 113      return is.obj(value) && value.type === _keys2.default.all;
 114    },
 115    error: function error(value) {
 116      return is.obj(value) && value.type === _keys2.default.error;
 117    },
 118    array: Array.isArray,
 119    func: function func(value) {
 120      return typeof value === 'function';
 121    },
 122    promise: function promise(value) {
 123      return value && is.func(value.then);
 124    },
 125    iterator: function iterator(value) {
 126      return value && is.func(value.next) && is.func(value.throw);
 127    },
 128    fork: function fork(value) {
 129      return is.obj(value) && value.type === _keys2.default.fork;
 130    },
 131    join: function join(value) {
 132      return is.obj(value) && value.type === _keys2.default.join;
 133    },
 134    race: function race(value) {
 135      return is.obj(value) && value.type === _keys2.default.race;
 136    },
 137    call: function call(value) {
 138      return is.obj(value) && value.type === _keys2.default.call;
 139    },
 140    cps: function cps(value) {
 141      return is.obj(value) && value.type === _keys2.default.cps;
 142    },
 143    subscribe: function subscribe(value) {
 144      return is.obj(value) && value.type === _keys2.default.subscribe;
 145    },
 146    channel: function channel(value) {
 147      return is.obj(value) && is.func(value.subscribe);
 148    }
 149  };
 150  
 151  exports.default = is;
 152  
 153  /***/ }),
 154  
 155  /***/ 2:
 156  /***/ (function(module, exports) {
 157  
 158  (function() { module.exports = this["lodash"]; }());
 159  
 160  /***/ }),
 161  
 162  /***/ 255:
 163  /***/ (function(module, exports, __webpack_require__) {
 164  
 165  "use strict";
 166  
 167  
 168  Object.defineProperty(exports, "__esModule", {
 169    value: true
 170  });
 171  exports.createChannel = exports.subscribe = exports.cps = exports.apply = exports.call = exports.invoke = exports.delay = exports.race = exports.join = exports.fork = exports.error = exports.all = undefined;
 172  
 173  var _keys = __webpack_require__(256);
 174  
 175  var _keys2 = _interopRequireDefault(_keys);
 176  
 177  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 178  
 179  var all = exports.all = function all(value) {
 180    return {
 181      type: _keys2.default.all,
 182      value: value
 183    };
 184  };
 185  
 186  var error = exports.error = function error(err) {
 187    return {
 188      type: _keys2.default.error,
 189      error: err
 190    };
 191  };
 192  
 193  var fork = exports.fork = function fork(iterator) {
 194    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
 195      args[_key - 1] = arguments[_key];
 196    }
 197  
 198    return {
 199      type: _keys2.default.fork,
 200      iterator: iterator,
 201      args: args
 202    };
 203  };
 204  
 205  var join = exports.join = function join(task) {
 206    return {
 207      type: _keys2.default.join,
 208      task: task
 209    };
 210  };
 211  
 212  var race = exports.race = function race(competitors) {
 213    return {
 214      type: _keys2.default.race,
 215      competitors: competitors
 216    };
 217  };
 218  
 219  var delay = exports.delay = function delay(timeout) {
 220    return new Promise(function (resolve) {
 221      setTimeout(function () {
 222        return resolve(true);
 223      }, timeout);
 224    });
 225  };
 226  
 227  var invoke = exports.invoke = function invoke(func) {
 228    for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
 229      args[_key2 - 1] = arguments[_key2];
 230    }
 231  
 232    return {
 233      type: _keys2.default.call,
 234      func: func,
 235      context: null,
 236      args: args
 237    };
 238  };
 239  
 240  var call = exports.call = function call(func, context) {
 241    for (var _len3 = arguments.length, args = Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
 242      args[_key3 - 2] = arguments[_key3];
 243    }
 244  
 245    return {
 246      type: _keys2.default.call,
 247      func: func,
 248      context: context,
 249      args: args
 250    };
 251  };
 252  
 253  var apply = exports.apply = function apply(func, context, args) {
 254    return {
 255      type: _keys2.default.call,
 256      func: func,
 257      context: context,
 258      args: args
 259    };
 260  };
 261  
 262  var cps = exports.cps = function cps(func) {
 263    for (var _len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
 264      args[_key4 - 1] = arguments[_key4];
 265    }
 266  
 267    return {
 268      type: _keys2.default.cps,
 269      func: func,
 270      args: args
 271    };
 272  };
 273  
 274  var subscribe = exports.subscribe = function subscribe(channel) {
 275    return {
 276      type: _keys2.default.subscribe,
 277      channel: channel
 278    };
 279  };
 280  
 281  var createChannel = exports.createChannel = function createChannel(callback) {
 282    var listeners = [];
 283    var subscribe = function subscribe(l) {
 284      listeners.push(l);
 285      return function () {
 286        return listeners.splice(listeners.indexOf(l), 1);
 287      };
 288    };
 289    var next = function next(val) {
 290      return listeners.forEach(function (l) {
 291        return l(val);
 292      });
 293    };
 294    callback(next);
 295  
 296    return {
 297      subscribe: subscribe
 298    };
 299  };
 300  
 301  /***/ }),
 302  
 303  /***/ 256:
 304  /***/ (function(module, exports, __webpack_require__) {
 305  
 306  "use strict";
 307  
 308  
 309  Object.defineProperty(exports, "__esModule", {
 310    value: true
 311  });
 312  var keys = {
 313    all: Symbol('all'),
 314    error: Symbol('error'),
 315    fork: Symbol('fork'),
 316    join: Symbol('join'),
 317    race: Symbol('race'),
 318    call: Symbol('call'),
 319    cps: Symbol('cps'),
 320    subscribe: Symbol('subscribe')
 321  };
 322  
 323  exports.default = keys;
 324  
 325  /***/ }),
 326  
 327  /***/ 277:
 328  /***/ (function(module, exports, __webpack_require__) {
 329  
 330  "use strict";
 331  
 332  
 333  Object.defineProperty(exports, "__esModule", {
 334    value: true
 335  });
 336  exports.wrapControls = exports.asyncControls = exports.create = undefined;
 337  
 338  var _helpers = __webpack_require__(255);
 339  
 340  Object.keys(_helpers).forEach(function (key) {
 341    if (key === "default") return;
 342    Object.defineProperty(exports, key, {
 343      enumerable: true,
 344      get: function get() {
 345        return _helpers[key];
 346      }
 347    });
 348  });
 349  
 350  var _create = __webpack_require__(427);
 351  
 352  var _create2 = _interopRequireDefault(_create);
 353  
 354  var _async = __webpack_require__(429);
 355  
 356  var _async2 = _interopRequireDefault(_async);
 357  
 358  var _wrap = __webpack_require__(431);
 359  
 360  var _wrap2 = _interopRequireDefault(_wrap);
 361  
 362  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 363  
 364  exports.create = _create2.default;
 365  exports.asyncControls = _async2.default;
 366  exports.wrapControls = _wrap2.default;
 367  
 368  /***/ }),
 369  
 370  /***/ 278:
 371  /***/ (function(module, exports) {
 372  
 373  module.exports = isPromise;
 374  module.exports.default = isPromise;
 375  
 376  function isPromise(obj) {
 377    return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
 378  }
 379  
 380  
 381  /***/ }),
 382  
 383  /***/ 427:
 384  /***/ (function(module, exports, __webpack_require__) {
 385  
 386  "use strict";
 387  
 388  
 389  Object.defineProperty(exports, "__esModule", {
 390    value: true
 391  });
 392  
 393  var _builtin = __webpack_require__(428);
 394  
 395  var _builtin2 = _interopRequireDefault(_builtin);
 396  
 397  var _is = __webpack_require__(157);
 398  
 399  var _is2 = _interopRequireDefault(_is);
 400  
 401  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 402  
 403  function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
 404  
 405  var create = function create() {
 406    var userControls = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0];
 407  
 408    var controls = [].concat(_toConsumableArray(userControls), _toConsumableArray(_builtin2.default));
 409  
 410    var runtime = function runtime(input) {
 411      var success = arguments.length <= 1 || arguments[1] === undefined ? function () {} : arguments[1];
 412      var error = arguments.length <= 2 || arguments[2] === undefined ? function () {} : arguments[2];
 413  
 414      var iterate = function iterate(gen) {
 415        var yieldValue = function yieldValue(isError) {
 416          return function (ret) {
 417            try {
 418              var _ref = isError ? gen.throw(ret) : gen.next(ret);
 419  
 420              var value = _ref.value;
 421              var done = _ref.done;
 422  
 423              if (done) return success(value);
 424              next(value);
 425            } catch (e) {
 426              return error(e);
 427            }
 428          };
 429        };
 430  
 431        var next = function next(ret) {
 432          controls.some(function (control) {
 433            return control(ret, next, runtime, yieldValue(false), yieldValue(true));
 434          });
 435        };
 436  
 437        yieldValue(false)();
 438      };
 439  
 440      var iterator = _is2.default.iterator(input) ? input : regeneratorRuntime.mark(function _callee() {
 441        return regeneratorRuntime.wrap(function _callee$(_context) {
 442          while (1) {
 443            switch (_context.prev = _context.next) {
 444              case 0:
 445                _context.next = 2;
 446                return input;
 447  
 448              case 2:
 449                return _context.abrupt('return', _context.sent);
 450  
 451              case 3:
 452              case 'end':
 453                return _context.stop();
 454            }
 455          }
 456        }, _callee, this);
 457      })();
 458  
 459      iterate(iterator, success, error);
 460    };
 461  
 462    return runtime;
 463  };
 464  
 465  exports.default = create;
 466  
 467  /***/ }),
 468  
 469  /***/ 428:
 470  /***/ (function(module, exports, __webpack_require__) {
 471  
 472  "use strict";
 473  
 474  
 475  Object.defineProperty(exports, "__esModule", {
 476    value: true
 477  });
 478  exports.iterator = exports.array = exports.object = exports.error = exports.any = undefined;
 479  
 480  var _is = __webpack_require__(157);
 481  
 482  var _is2 = _interopRequireDefault(_is);
 483  
 484  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 485  
 486  var any = exports.any = function any(value, next, rungen, yieldNext) {
 487    yieldNext(value);
 488    return true;
 489  };
 490  
 491  var error = exports.error = function error(value, next, rungen, yieldNext, raiseNext) {
 492    if (!_is2.default.error(value)) return false;
 493    raiseNext(value.error);
 494    return true;
 495  };
 496  
 497  var object = exports.object = function object(value, next, rungen, yieldNext, raiseNext) {
 498    if (!_is2.default.all(value) || !_is2.default.obj(value.value)) return false;
 499    var result = {};
 500    var keys = Object.keys(value.value);
 501    var count = 0;
 502    var hasError = false;
 503    var gotResultSuccess = function gotResultSuccess(key, ret) {
 504      if (hasError) return;
 505      result[key] = ret;
 506      count++;
 507      if (count === keys.length) {
 508        yieldNext(result);
 509      }
 510    };
 511  
 512    var gotResultError = function gotResultError(key, error) {
 513      if (hasError) return;
 514      hasError = true;
 515      raiseNext(error);
 516    };
 517  
 518    keys.map(function (key) {
 519      rungen(value.value[key], function (ret) {
 520        return gotResultSuccess(key, ret);
 521      }, function (err) {
 522        return gotResultError(key, err);
 523      });
 524    });
 525  
 526    return true;
 527  };
 528  
 529  var array = exports.array = function array(value, next, rungen, yieldNext, raiseNext) {
 530    if (!_is2.default.all(value) || !_is2.default.array(value.value)) return false;
 531    var result = [];
 532    var count = 0;
 533    var hasError = false;
 534    var gotResultSuccess = function gotResultSuccess(key, ret) {
 535      if (hasError) return;
 536      result[key] = ret;
 537      count++;
 538      if (count === value.value.length) {
 539        yieldNext(result);
 540      }
 541    };
 542  
 543    var gotResultError = function gotResultError(key, error) {
 544      if (hasError) return;
 545      hasError = true;
 546      raiseNext(error);
 547    };
 548  
 549    value.value.map(function (v, key) {
 550      rungen(v, function (ret) {
 551        return gotResultSuccess(key, ret);
 552      }, function (err) {
 553        return gotResultError(key, err);
 554      });
 555    });
 556  
 557    return true;
 558  };
 559  
 560  var iterator = exports.iterator = function iterator(value, next, rungen, yieldNext, raiseNext) {
 561    if (!_is2.default.iterator(value)) return false;
 562    rungen(value, next, raiseNext);
 563    return true;
 564  };
 565  
 566  exports.default = [error, iterator, array, object, any];
 567  
 568  /***/ }),
 569  
 570  /***/ 429:
 571  /***/ (function(module, exports, __webpack_require__) {
 572  
 573  "use strict";
 574  
 575  
 576  Object.defineProperty(exports, "__esModule", {
 577    value: true
 578  });
 579  exports.race = exports.join = exports.fork = exports.promise = undefined;
 580  
 581  var _is = __webpack_require__(157);
 582  
 583  var _is2 = _interopRequireDefault(_is);
 584  
 585  var _helpers = __webpack_require__(255);
 586  
 587  var _dispatcher = __webpack_require__(430);
 588  
 589  var _dispatcher2 = _interopRequireDefault(_dispatcher);
 590  
 591  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 592  
 593  var promise = exports.promise = function promise(value, next, rungen, yieldNext, raiseNext) {
 594    if (!_is2.default.promise(value)) return false;
 595    value.then(next, raiseNext);
 596    return true;
 597  };
 598  
 599  var forkedTasks = new Map();
 600  var fork = exports.fork = function fork(value, next, rungen) {
 601    if (!_is2.default.fork(value)) return false;
 602    var task = Symbol('fork');
 603    var dispatcher = (0, _dispatcher2.default)();
 604    forkedTasks.set(task, dispatcher);
 605    rungen(value.iterator.apply(null, value.args), function (result) {
 606      return dispatcher.dispatch(result);
 607    }, function (err) {
 608      return dispatcher.dispatch((0, _helpers.error)(err));
 609    });
 610    var unsubscribe = dispatcher.subscribe(function () {
 611      unsubscribe();
 612      forkedTasks.delete(task);
 613    });
 614    next(task);
 615    return true;
 616  };
 617  
 618  var join = exports.join = function join(value, next, rungen, yieldNext, raiseNext) {
 619    if (!_is2.default.join(value)) return false;
 620    var dispatcher = forkedTasks.get(value.task);
 621    if (!dispatcher) {
 622      raiseNext('join error : task not found');
 623    } else {
 624      (function () {
 625        var unsubscribe = dispatcher.subscribe(function (result) {
 626          unsubscribe();
 627          next(result);
 628        });
 629      })();
 630    }
 631    return true;
 632  };
 633  
 634  var race = exports.race = function race(value, next, rungen, yieldNext, raiseNext) {
 635    if (!_is2.default.race(value)) return false;
 636    var finished = false;
 637    var success = function success(result, k, v) {
 638      if (finished) return;
 639      finished = true;
 640      result[k] = v;
 641      next(result);
 642    };
 643  
 644    var fail = function fail(err) {
 645      if (finished) return;
 646      raiseNext(err);
 647    };
 648    if (_is2.default.array(value.competitors)) {
 649      (function () {
 650        var result = value.competitors.map(function () {
 651          return false;
 652        });
 653        value.competitors.forEach(function (competitor, index) {
 654          rungen(competitor, function (output) {
 655            return success(result, index, output);
 656          }, fail);
 657        });
 658      })();
 659    } else {
 660      (function () {
 661        var result = Object.keys(value.competitors).reduce(function (p, c) {
 662          p[c] = false;
 663          return p;
 664        }, {});
 665        Object.keys(value.competitors).forEach(function (index) {
 666          rungen(value.competitors[index], function (output) {
 667            return success(result, index, output);
 668          }, fail);
 669        });
 670      })();
 671    }
 672    return true;
 673  };
 674  
 675  var subscribe = function subscribe(value, next) {
 676    if (!_is2.default.subscribe(value)) return false;
 677    if (!_is2.default.channel(value.channel)) {
 678      throw new Error('the first argument of "subscribe" must be a valid channel');
 679    }
 680    var unsubscribe = value.channel.subscribe(function (ret) {
 681      unsubscribe && unsubscribe();
 682      next(ret);
 683    });
 684  
 685    return true;
 686  };
 687  
 688  exports.default = [promise, fork, join, race, subscribe];
 689  
 690  /***/ }),
 691  
 692  /***/ 430:
 693  /***/ (function(module, exports, __webpack_require__) {
 694  
 695  "use strict";
 696  
 697  
 698  Object.defineProperty(exports, "__esModule", {
 699    value: true
 700  });
 701  var createDispatcher = function createDispatcher() {
 702    var listeners = [];
 703  
 704    return {
 705      subscribe: function subscribe(listener) {
 706        listeners.push(listener);
 707        return function () {
 708          listeners = listeners.filter(function (l) {
 709            return l !== listener;
 710          });
 711        };
 712      },
 713      dispatch: function dispatch(action) {
 714        listeners.slice().forEach(function (listener) {
 715          return listener(action);
 716        });
 717      }
 718    };
 719  };
 720  
 721  exports.default = createDispatcher;
 722  
 723  /***/ }),
 724  
 725  /***/ 431:
 726  /***/ (function(module, exports, __webpack_require__) {
 727  
 728  "use strict";
 729  
 730  
 731  Object.defineProperty(exports, "__esModule", {
 732    value: true
 733  });
 734  exports.cps = exports.call = undefined;
 735  
 736  var _is = __webpack_require__(157);
 737  
 738  var _is2 = _interopRequireDefault(_is);
 739  
 740  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 741  
 742  function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
 743  
 744  var call = exports.call = function call(value, next, rungen, yieldNext, raiseNext) {
 745    if (!_is2.default.call(value)) return false;
 746    try {
 747      next(value.func.apply(value.context, value.args));
 748    } catch (err) {
 749      raiseNext(err);
 750    }
 751    return true;
 752  };
 753  
 754  var cps = exports.cps = function cps(value, next, rungen, yieldNext, raiseNext) {
 755    var _value$func;
 756  
 757    if (!_is2.default.cps(value)) return false;
 758    (_value$func = value.func).call.apply(_value$func, [null].concat(_toConsumableArray(value.args), [function (err, result) {
 759      if (err) raiseNext(err);else next(result);
 760    }]));
 761    return true;
 762  };
 763  
 764  exports.default = [call, cps];
 765  
 766  /***/ }),
 767  
 768  /***/ 465:
 769  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 770  
 771  "use strict";
 772  // ESM COMPAT FLAG
 773  __webpack_require__.r(__webpack_exports__);
 774  
 775  // EXPORTS
 776  __webpack_require__.d(__webpack_exports__, "default", function() { return /* binding */ createMiddleware; });
 777  
 778  // CONCATENATED MODULE: ./node_modules/@wordpress/redux-routine/build-module/is-generator.js
 779  /**
 780   * Returns true if the given object is a generator, or false otherwise.
 781   *
 782   * @see https://www.ecma-international.org/ecma-262/6.0/#sec-generator-objects
 783   *
 784   * @param {*} object Object to test.
 785   *
 786   * @return {boolean} Whether object is a generator.
 787   */
 788  function isGenerator(object) {
 789    // Check that iterator (next) and iterable (Symbol.iterator) interfaces are satisfied.
 790    // These checks seem to be compatible with several generator helpers as well as the native implementation.
 791    return !!object && typeof object[Symbol.iterator] === 'function' && typeof object.next === 'function';
 792  }
 793  
 794  // EXTERNAL MODULE: ./node_modules/rungen/dist/index.js
 795  var dist = __webpack_require__(277);
 796  
 797  // EXTERNAL MODULE: external {"this":"lodash"}
 798  var external_this_lodash_ = __webpack_require__(2);
 799  
 800  // EXTERNAL MODULE: ./node_modules/@wordpress/redux-routine/node_modules/is-promise/index.js
 801  var is_promise = __webpack_require__(278);
 802  var is_promise_default = /*#__PURE__*/__webpack_require__.n(is_promise);
 803  
 804  // CONCATENATED MODULE: ./node_modules/@wordpress/redux-routine/build-module/is-action.js
 805  /**
 806   * External dependencies
 807   */
 808  
 809  /**
 810   * Returns true if the given object quacks like an action.
 811   *
 812   * @param {*} object Object to test
 813   *
 814   * @return {boolean}  Whether object is an action.
 815   */
 816  
 817  function isAction(object) {
 818    return Object(external_this_lodash_["isPlainObject"])(object) && Object(external_this_lodash_["isString"])(object.type);
 819  }
 820  /**
 821   * Returns true if the given object quacks like an action and has a specific
 822   * action type
 823   *
 824   * @param {*}      object       Object to test
 825   * @param {string} expectedType The expected type for the action.
 826   *
 827   * @return {boolean} Whether object is an action and is of specific type.
 828   */
 829  
 830  function isActionOfType(object, expectedType) {
 831    return isAction(object) && object.type === expectedType;
 832  }
 833  
 834  // CONCATENATED MODULE: ./node_modules/@wordpress/redux-routine/build-module/runtime.js
 835  /**
 836   * External dependencies
 837   */
 838  
 839  
 840  
 841  /**
 842   * Internal dependencies
 843   */
 844  
 845  
 846  /**
 847   * Create a co-routine runtime.
 848   *
 849   * @param {Object}    controls Object of control handlers.
 850   * @param {Function}  dispatch Unhandled action dispatch.
 851   *
 852   * @return {Function} co-routine runtime
 853   */
 854  
 855  function createRuntime() {
 856    var controls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 857    var dispatch = arguments.length > 1 ? arguments[1] : undefined;
 858    var rungenControls = Object(external_this_lodash_["map"])(controls, function (control, actionType) {
 859      return function (value, next, iterate, yieldNext, yieldError) {
 860        if (!isActionOfType(value, actionType)) {
 861          return false;
 862        }
 863  
 864        var routine = control(value);
 865  
 866        if (is_promise_default()(routine)) {
 867          // Async control routine awaits resolution.
 868          routine.then(yieldNext, yieldError);
 869        } else {
 870          yieldNext(routine);
 871        }
 872  
 873        return true;
 874      };
 875    });
 876  
 877    var unhandledActionControl = function unhandledActionControl(value, next) {
 878      if (!isAction(value)) {
 879        return false;
 880      }
 881  
 882      dispatch(value);
 883      next();
 884      return true;
 885    };
 886  
 887    rungenControls.push(unhandledActionControl);
 888    var rungenRuntime = Object(dist["create"])(rungenControls);
 889    return function (action) {
 890      return new Promise(function (resolve, reject) {
 891        return rungenRuntime(action, function (result) {
 892          if (isAction(result)) {
 893            dispatch(result);
 894          }
 895  
 896          resolve(result);
 897        }, reject);
 898      });
 899    };
 900  }
 901  
 902  // CONCATENATED MODULE: ./node_modules/@wordpress/redux-routine/build-module/index.js
 903  /**
 904   * Internal dependencies
 905   */
 906  
 907  
 908  /**
 909   * Creates a Redux middleware, given an object of controls where each key is an
 910   * action type for which to act upon, the value a function which returns either
 911   * a promise which is to resolve when evaluation of the action should continue,
 912   * or a value. The value or resolved promise value is assigned on the return
 913   * value of the yield assignment. If the control handler returns undefined, the
 914   * execution is not continued.
 915   *
 916   * @param {Object} controls Object of control handlers.
 917   *
 918   * @return {Function} Co-routine runtime
 919   */
 920  
 921  function createMiddleware() {
 922    var controls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 923    return function (store) {
 924      var runtime = createRuntime(controls, store.dispatch);
 925      return function (next) {
 926        return function (action) {
 927          if (!isGenerator(action)) {
 928            return next(action);
 929          }
 930  
 931          return runtime(action);
 932        };
 933      };
 934    };
 935  }
 936  
 937  
 938  /***/ })
 939  
 940  /******/ })["default"];


Generated: Mon Sep 28 01:00:02 2020 Cross-referenced by PHPXref 0.7.1