2018-10-24 07:48:53 -04:00
this [ "wp" ] = this [ "wp" ] || { } ; this [ "wp" ] [ "data" ] =
/******/ ( function ( modules ) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = { } ;
/******/
/******/ // The require function
/******/ function _ _webpack _require _ _ ( moduleId ) {
/******/
/******/ // Check if module is in cache
/******/ if ( installedModules [ moduleId ] ) {
/******/ return installedModules [ moduleId ] . exports ;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules [ moduleId ] = {
/******/ i : moduleId ,
/******/ l : false ,
/******/ exports : { }
/******/ } ;
/******/
/******/ // Execute the module function
/******/ modules [ moduleId ] . call ( module . exports , module , module . exports , _ _webpack _require _ _ ) ;
/******/
/******/ // Flag the module as loaded
/******/ module . l = true ;
/******/
/******/ // Return the exports of the module
/******/ return module . exports ;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ _ _webpack _require _ _ . m = modules ;
/******/
/******/ // expose the module cache
/******/ _ _webpack _require _ _ . c = installedModules ;
/******/
/******/ // define getter function for harmony exports
/******/ _ _webpack _require _ _ . d = function ( exports , name , getter ) {
/******/ if ( ! _ _webpack _require _ _ . o ( exports , name ) ) {
/******/ Object . defineProperty ( exports , name , { enumerable : true , get : getter } ) ;
/******/ }
/******/ } ;
/******/
/******/ // define __esModule on exports
/******/ _ _webpack _require _ _ . r = function ( exports ) {
/******/ if ( typeof Symbol !== 'undefined' && Symbol . toStringTag ) {
/******/ Object . defineProperty ( exports , Symbol . toStringTag , { value : 'Module' } ) ;
/******/ }
/******/ Object . defineProperty ( exports , '__esModule' , { value : true } ) ;
/******/ } ;
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ _ _webpack _require _ _ . t = function ( value , mode ) {
/******/ if ( mode & 1 ) value = _ _webpack _require _ _ ( value ) ;
/******/ if ( mode & 8 ) return value ;
/******/ if ( ( mode & 4 ) && typeof value === 'object' && value && value . _ _esModule ) return value ;
/******/ var ns = Object . create ( null ) ;
/******/ _ _webpack _require _ _ . r ( ns ) ;
/******/ Object . defineProperty ( ns , 'default' , { enumerable : true , value : value } ) ;
/******/ if ( mode & 2 && typeof value != 'string' ) for ( var key in value ) _ _webpack _require _ _ . d ( ns , key , function ( key ) { return value [ key ] ; } . bind ( null , key ) ) ;
/******/ return ns ;
/******/ } ;
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ _ _webpack _require _ _ . n = function ( module ) {
/******/ var getter = module && module . _ _esModule ?
/******/ function getDefault ( ) { return module [ 'default' ] ; } :
/******/ function getModuleExports ( ) { return module ; } ;
/******/ _ _webpack _require _ _ . d ( getter , 'a' , getter ) ;
/******/ return getter ;
/******/ } ;
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ _ _webpack _require _ _ . o = function ( object , property ) { return Object . prototype . hasOwnProperty . call ( object , property ) ; } ;
/******/
/******/ // __webpack_public_path__
/******/ _ _webpack _require _ _ . p = "" ;
/******/
/******/
/******/ // Load entry module and return exports
2018-10-29 04:28:32 -04:00
/******/ return _ _webpack _require _ _ ( _ _webpack _require _ _ . s = "./node_modules/@wordpress/data/build-module/index.js" ) ;
2018-10-24 07:48:53 -04:00
/******/ } )
/************************************************************************/
/******/ ( {
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / esm / AsyncGenerator . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
2018-10-24 07:48:53 -04:00
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "default" , function ( ) { return AsyncGenerator ; } ) ;
2018-10-29 04:28:32 -04:00
/* harmony import */ var _AwaitValue _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! ./AwaitValue */ "./node_modules/@babel/runtime/helpers/esm/AwaitValue.js" ) ;
2018-10-24 07:48:53 -04:00
function AsyncGenerator ( gen ) {
var front , back ;
function send ( key , arg ) {
return new Promise ( function ( resolve , reject ) {
var request = {
key : key ,
arg : arg ,
resolve : resolve ,
reject : reject ,
next : null
} ;
if ( back ) {
back = back . next = request ;
} else {
front = back = request ;
resume ( key , arg ) ;
}
} ) ;
}
function resume ( key , arg ) {
try {
var result = gen [ key ] ( arg ) ;
var value = result . value ;
var wrappedAwait = value instanceof _AwaitValue _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] ;
Promise . resolve ( wrappedAwait ? value . wrapped : value ) . then ( function ( arg ) {
if ( wrappedAwait ) {
resume ( "next" , arg ) ;
return ;
}
settle ( result . done ? "return" : "normal" , arg ) ;
} , function ( err ) {
resume ( "throw" , err ) ;
} ) ;
} catch ( err ) {
settle ( "throw" , err ) ;
}
}
function settle ( type , value ) {
switch ( type ) {
case "return" :
front . resolve ( {
value : value ,
done : true
} ) ;
break ;
case "throw" :
front . reject ( value ) ;
break ;
default :
front . resolve ( {
value : value ,
done : false
} ) ;
break ;
}
front = front . next ;
if ( front ) {
resume ( front . key , front . arg ) ;
} else {
back = null ;
}
}
this . _invoke = send ;
if ( typeof gen . return !== "function" ) {
this . return = undefined ;
}
}
if ( typeof Symbol === "function" && Symbol . asyncIterator ) {
AsyncGenerator . prototype [ Symbol . asyncIterator ] = function ( ) {
return this ;
} ;
}
AsyncGenerator . prototype . next = function ( arg ) {
return this . _invoke ( "next" , arg ) ;
} ;
AsyncGenerator . prototype . throw = function ( arg ) {
return this . _invoke ( "throw" , arg ) ;
} ;
AsyncGenerator . prototype . return = function ( arg ) {
return this . _invoke ( "return" , arg ) ;
} ;
/***/ } ) ,
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@babel/runtime/helpers/esm/AwaitValue.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / esm / AwaitValue . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
2018-10-24 07:48:53 -04:00
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "default" , function ( ) { return _AwaitValue ; } ) ;
function _AwaitValue ( value ) {
this . wrapped = value ;
}
/***/ } ) ,
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / esm / arrayWithHoles . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
2018-10-24 07:48:53 -04:00
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "default" , function ( ) { return _arrayWithHoles ; } ) ;
function _arrayWithHoles ( arr ) {
if ( Array . isArray ( arr ) ) return arr ;
}
/***/ } ) ,
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / esm / assertThisInitialized . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
2018-10-24 07:48:53 -04:00
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "default" , function ( ) { return _assertThisInitialized ; } ) ;
function _assertThisInitialized ( self ) {
if ( self === void 0 ) {
throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" ) ;
}
return self ;
}
/***/ } ) ,
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@babel/runtime/helpers/esm/asyncIterator.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / esm / asyncIterator . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
2018-10-24 07:48:53 -04:00
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "default" , function ( ) { return _asyncIterator ; } ) ;
function _asyncIterator ( iterable ) {
var method ;
if ( typeof Symbol === "function" ) {
if ( Symbol . asyncIterator ) {
method = iterable [ Symbol . asyncIterator ] ;
if ( method != null ) return method . call ( iterable ) ;
}
if ( Symbol . iterator ) {
method = iterable [ Symbol . iterator ] ;
if ( method != null ) return method . call ( iterable ) ;
}
}
throw new TypeError ( "Object is not async iterable" ) ;
}
/***/ } ) ,
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / esm / asyncToGenerator . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
2018-10-24 07:48:53 -04:00
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "default" , function ( ) { return _asyncToGenerator ; } ) ;
function asyncGeneratorStep ( gen , resolve , reject , _next , _throw , key , arg ) {
try {
var info = gen [ key ] ( arg ) ;
var value = info . value ;
} catch ( error ) {
reject ( error ) ;
return ;
}
if ( info . done ) {
resolve ( value ) ;
} else {
Promise . resolve ( value ) . then ( _next , _throw ) ;
}
}
function _asyncToGenerator ( fn ) {
return function ( ) {
var self = this ,
args = arguments ;
return new Promise ( function ( resolve , reject ) {
var gen = fn . apply ( self , args ) ;
function _next ( value ) {
asyncGeneratorStep ( gen , resolve , reject , _next , _throw , "next" , value ) ;
}
function _throw ( err ) {
asyncGeneratorStep ( gen , resolve , reject , _next , _throw , "throw" , err ) ;
}
_next ( undefined ) ;
} ) ;
} ;
}
/***/ } ) ,
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / esm / awaitAsyncGenerator . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
2018-10-24 07:48:53 -04:00
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "default" , function ( ) { return _awaitAsyncGenerator ; } ) ;
2018-10-29 04:28:32 -04:00
/* harmony import */ var _AwaitValue _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! ./AwaitValue */ "./node_modules/@babel/runtime/helpers/esm/AwaitValue.js" ) ;
2018-10-24 07:48:53 -04:00
function _awaitAsyncGenerator ( value ) {
return new _AwaitValue _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] ( value ) ;
}
/***/ } ) ,
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / esm / classCallCheck . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
2018-10-24 07:48:53 -04:00
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "default" , function ( ) { return _classCallCheck ; } ) ;
function _classCallCheck ( instance , Constructor ) {
if ( ! ( instance instanceof Constructor ) ) {
throw new TypeError ( "Cannot call a class as a function" ) ;
}
}
/***/ } ) ,
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@babel/runtime/helpers/esm/createClass.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / esm / createClass . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
2018-10-24 07:48:53 -04:00
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "default" , function ( ) { return _createClass ; } ) ;
function _defineProperties ( target , props ) {
for ( var i = 0 ; i < props . length ; i ++ ) {
var descriptor = props [ i ] ;
descriptor . enumerable = descriptor . enumerable || false ;
descriptor . configurable = true ;
if ( "value" in descriptor ) descriptor . writable = true ;
Object . defineProperty ( target , descriptor . key , descriptor ) ;
}
}
function _createClass ( Constructor , protoProps , staticProps ) {
if ( protoProps ) _defineProperties ( Constructor . prototype , protoProps ) ;
if ( staticProps ) _defineProperties ( Constructor , staticProps ) ;
return Constructor ;
}
/***/ } ) ,
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / esm / defineProperty . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
2018-10-24 07:48:53 -04:00
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "default" , function ( ) { return _defineProperty ; } ) ;
function _defineProperty ( obj , key , value ) {
if ( key in obj ) {
Object . defineProperty ( obj , key , {
value : value ,
enumerable : true ,
configurable : true ,
writable : true
} ) ;
} else {
obj [ key ] = value ;
}
return obj ;
}
/***/ } ) ,
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@babel/runtime/helpers/esm/extends.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / esm / extends . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
2018-10-24 07:48:53 -04:00
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "default" , function ( ) { return _extends ; } ) ;
function _extends ( ) {
_extends = Object . assign || function ( target ) {
for ( var i = 1 ; i < arguments . length ; i ++ ) {
var source = arguments [ i ] ;
for ( var key in source ) {
if ( Object . prototype . hasOwnProperty . call ( source , key ) ) {
target [ key ] = source [ key ] ;
}
}
}
return target ;
} ;
return _extends . apply ( this , arguments ) ;
}
/***/ } ) ,
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / esm / getPrototypeOf . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
2018-10-24 07:48:53 -04:00
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "default" , function ( ) { return _getPrototypeOf ; } ) ;
function _getPrototypeOf ( o ) {
_getPrototypeOf = Object . setPrototypeOf ? Object . getPrototypeOf : function _getPrototypeOf ( o ) {
return o . _ _proto _ _ || Object . getPrototypeOf ( o ) ;
} ;
return _getPrototypeOf ( o ) ;
}
/***/ } ) ,
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@babel/runtime/helpers/esm/inherits.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / esm / inherits . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
2018-10-24 07:48:53 -04:00
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "default" , function ( ) { return _inherits ; } ) ;
2018-10-29 04:28:32 -04:00
/* harmony import */ var _setPrototypeOf _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! ./setPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js" ) ;
2018-10-24 07:48:53 -04:00
function _inherits ( subClass , superClass ) {
if ( typeof superClass !== "function" && superClass !== null ) {
throw new TypeError ( "Super expression must either be null or a function" ) ;
}
subClass . prototype = Object . create ( superClass && superClass . prototype , {
constructor : {
value : subClass ,
writable : true ,
configurable : true
}
} ) ;
if ( superClass ) Object ( _setPrototypeOf _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] ) ( subClass , superClass ) ;
}
/***/ } ) ,
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / esm / iterableToArrayLimit . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
2018-10-24 07:48:53 -04:00
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "default" , function ( ) { return _iterableToArrayLimit ; } ) ;
function _iterableToArrayLimit ( arr , i ) {
var _arr = [ ] ;
var _n = true ;
var _d = false ;
var _e = undefined ;
try {
for ( var _i = arr [ Symbol . iterator ] ( ) , _s ; ! ( _n = ( _s = _i . next ( ) ) . done ) ; _n = true ) {
_arr . push ( _s . value ) ;
if ( i && _arr . length === i ) break ;
}
} catch ( err ) {
_d = true ;
_e = err ;
} finally {
try {
if ( ! _n && _i [ "return" ] != null ) _i [ "return" ] ( ) ;
} finally {
if ( _d ) throw _e ;
}
}
return _arr ;
}
/***/ } ) ,
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / esm / nonIterableRest . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
2018-10-24 07:48:53 -04:00
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "default" , function ( ) { return _nonIterableRest ; } ) ;
function _nonIterableRest ( ) {
throw new TypeError ( "Invalid attempt to destructure non-iterable instance" ) ;
}
/***/ } ) ,
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / esm / objectSpread . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
2018-10-24 07:48:53 -04:00
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "default" , function ( ) { return _objectSpread ; } ) ;
2018-10-29 04:28:32 -04:00
/* harmony import */ var _defineProperty _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! ./defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js" ) ;
2018-10-24 07:48:53 -04:00
function _objectSpread ( target ) {
for ( var i = 1 ; i < arguments . length ; i ++ ) {
var source = arguments [ i ] != null ? arguments [ i ] : { } ;
var ownKeys = Object . keys ( source ) ;
if ( typeof Object . getOwnPropertySymbols === 'function' ) {
ownKeys = ownKeys . concat ( Object . getOwnPropertySymbols ( source ) . filter ( function ( sym ) {
return Object . getOwnPropertyDescriptor ( source , sym ) . enumerable ;
} ) ) ;
}
ownKeys . forEach ( function ( key ) {
Object ( _defineProperty _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] ) ( target , key , source [ key ] ) ;
} ) ;
}
return target ;
}
/***/ } ) ,
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / esm / possibleConstructorReturn . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
2018-10-24 07:48:53 -04:00
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "default" , function ( ) { return _possibleConstructorReturn ; } ) ;
2018-10-29 04:28:32 -04:00
/* harmony import */ var _helpers _esm _typeof _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! ../../helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js" ) ;
/* harmony import */ var _assertThisInitialized _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! ./assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js" ) ;
2018-10-24 07:48:53 -04:00
function _possibleConstructorReturn ( self , call ) {
if ( call && ( Object ( _helpers _esm _typeof _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] ) ( call ) === "object" || typeof call === "function" ) ) {
return call ;
}
return Object ( _assertThisInitialized _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] ) ( self ) ;
}
/***/ } ) ,
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / esm / setPrototypeOf . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
2018-10-24 07:48:53 -04:00
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "default" , function ( ) { return _setPrototypeOf ; } ) ;
function _setPrototypeOf ( o , p ) {
_setPrototypeOf = Object . setPrototypeOf || function _setPrototypeOf ( o , p ) {
o . _ _proto _ _ = p ;
return o ;
} ;
return _setPrototypeOf ( o , p ) ;
}
/***/ } ) ,
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / esm / slicedToArray . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
2018-10-24 07:48:53 -04:00
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "default" , function ( ) { return _slicedToArray ; } ) ;
2018-10-29 04:28:32 -04:00
/* harmony import */ var _arrayWithHoles _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! ./arrayWithHoles */ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js" ) ;
/* harmony import */ var _iterableToArrayLimit _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! ./iterableToArrayLimit */ "./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js" ) ;
/* harmony import */ var _nonIterableRest _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! ./nonIterableRest */ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js" ) ;
2018-10-24 07:48:53 -04:00
function _slicedToArray ( arr , i ) {
return Object ( _arrayWithHoles _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] ) ( arr ) || Object ( _iterableToArrayLimit _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] ) ( arr , i ) || Object ( _nonIterableRest _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "default" ] ) ( ) ;
}
/***/ } ) ,
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@babel/runtime/helpers/esm/typeof.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / esm / typeof . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
2018-10-24 07:48:53 -04:00
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "default" , function ( ) { return _typeof ; } ) ;
function _typeof2 ( obj ) { if ( typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ) { _typeof2 = function _typeof2 ( obj ) { return typeof obj ; } ; } else { _typeof2 = function _typeof2 ( obj ) { return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ; } ; } return _typeof2 ( obj ) ; }
function _typeof ( obj ) {
if ( typeof Symbol === "function" && _typeof2 ( Symbol . iterator ) === "symbol" ) {
_typeof = function _typeof ( obj ) {
return _typeof2 ( obj ) ;
} ;
} else {
_typeof = function _typeof ( obj ) {
return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : _typeof2 ( obj ) ;
} ;
}
return _typeof ( obj ) ;
}
/***/ } ) ,
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / esm / wrapAsyncGenerator . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
2018-10-24 07:48:53 -04:00
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "default" , function ( ) { return _wrapAsyncGenerator ; } ) ;
2018-10-29 04:28:32 -04:00
/* harmony import */ var _AsyncGenerator _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! ./AsyncGenerator */ "./node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js" ) ;
2018-10-24 07:48:53 -04:00
function _wrapAsyncGenerator ( fn ) {
return function ( ) {
return new _AsyncGenerator _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] ( fn . apply ( this , arguments ) ) ;
} ;
}
/***/ } ) ,
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@wordpress/data/build-module/components/registry-provider/index.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ wordpress / data / build - module / components / registry - provider / index . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: RegistryConsumer, default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-10-24 07:48:53 -04:00
"use strict" ;
2018-10-29 04:28:32 -04:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "RegistryConsumer" , function ( ) { return RegistryConsumer ; } ) ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @wordpress/element */ "@wordpress/element" ) ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
/* harmony import */ var _default _registry _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! ../../default-registry */ "./node_modules/@wordpress/data/build-module/default-registry.js" ) ;
/ * *
* WordPress dependencies
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/ * *
* Internal dependencies
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var _createContext = Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createContext" ] ) ( _default _registry _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] ) ,
Consumer = _createContext . Consumer ,
Provider = _createContext . Provider ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var RegistryConsumer = Consumer ;
/* harmony default export */ _ _webpack _exports _ _ [ "default" ] = ( Provider ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/***/ } ) ,
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@wordpress/data/build-module/components/with-dispatch/index.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ wordpress / data / build - module / components / with - dispatch / index . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony import */ var _babel _runtime _helpers _esm _extends _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js" ) ;
/* harmony import */ var _babel _runtime _helpers _esm _classCallCheck _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js" ) ;
/* harmony import */ var _babel _runtime _helpers _esm _createClass _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js" ) ;
/* harmony import */ var _babel _runtime _helpers _esm _possibleConstructorReturn _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js" ) ;
/* harmony import */ var _babel _runtime _helpers _esm _getPrototypeOf _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js" ) ;
/* harmony import */ var _babel _runtime _helpers _esm _inherits _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( /*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js" ) ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _6 _ _ = _ _webpack _require _ _ ( /*! @wordpress/element */ "@wordpress/element" ) ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _6 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _6 _ _ ) ;
/* harmony import */ var lodash _ _WEBPACK _IMPORTED _MODULE _7 _ _ = _ _webpack _require _ _ ( /*! lodash */ "lodash" ) ;
/* harmony import */ var lodash _ _WEBPACK _IMPORTED _MODULE _7 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( lodash _ _WEBPACK _IMPORTED _MODULE _7 _ _ ) ;
/* harmony import */ var _wordpress _compose _ _WEBPACK _IMPORTED _MODULE _8 _ _ = _ _webpack _require _ _ ( /*! @wordpress/compose */ "@wordpress/compose" ) ;
/* harmony import */ var _wordpress _compose _ _WEBPACK _IMPORTED _MODULE _8 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _compose _ _WEBPACK _IMPORTED _MODULE _8 _ _ ) ;
/* harmony import */ var _registry _provider _ _WEBPACK _IMPORTED _MODULE _9 _ _ = _ _webpack _require _ _ ( /*! ../registry-provider */ "./node_modules/@wordpress/data/build-module/components/registry-provider/index.js" ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/ * *
* External dependencies
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/ * *
* WordPress dependencies
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/ * *
* Internal dependencies
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/ * *
* Higher - order component used to add dispatch props using registered action
* creators .
*
* @ param { Object } mapDispatchToProps Object of prop names where value is a
* dispatch - bound action creator , or a
* function to be called with with the
* component ' s props and returning an
* action creator .
*
* @ return { Component } Enhanced component with merged dispatcher props .
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var withDispatch = function withDispatch ( mapDispatchToProps ) {
return Object ( _wordpress _compose _ _WEBPACK _IMPORTED _MODULE _8 _ _ [ "createHigherOrderComponent" ] ) ( Object ( _wordpress _compose _ _WEBPACK _IMPORTED _MODULE _8 _ _ [ "compose" ] ) ( [ _wordpress _compose _ _WEBPACK _IMPORTED _MODULE _8 _ _ [ "pure" ] , function ( WrappedComponent ) {
var ComponentWithDispatch = Object ( _wordpress _compose _ _WEBPACK _IMPORTED _MODULE _8 _ _ [ "remountOnPropChange" ] ) ( 'registry' ) (
/*#__PURE__*/
function ( _Component ) {
Object ( _babel _runtime _helpers _esm _inherits _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] ) ( _class , _Component ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function _class ( props ) {
var _this ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
Object ( _babel _runtime _helpers _esm _classCallCheck _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] ) ( this , _class ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
_this = Object ( _babel _runtime _helpers _esm _possibleConstructorReturn _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "default" ] ) ( this , Object ( _babel _runtime _helpers _esm _getPrototypeOf _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "default" ] ) ( _class ) . apply ( this , arguments ) ) ;
_this . proxyProps = { } ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
_this . setProxyProps ( props ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return _this ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
Object ( _babel _runtime _helpers _esm _createClass _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "default" ] ) ( _class , [ {
key : "componentDidUpdate" ,
value : function componentDidUpdate ( ) {
this . setProxyProps ( this . props ) ;
}
} , {
key : "proxyDispatch" ,
value : function proxyDispatch ( propName ) {
var _mapDispatchToProps ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
for ( var _len = arguments . length , args = new Array ( _len > 1 ? _len - 1 : 0 ) , _key = 1 ; _key < _len ; _key ++ ) {
args [ _key - 1 ] = arguments [ _key ] ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
// Original dispatcher is a pre-bound (dispatching) action creator.
( _mapDispatchToProps = mapDispatchToProps ( this . props . registry . dispatch , this . props . ownProps ) ) [ propName ] . apply ( _mapDispatchToProps , args ) ;
}
} , {
key : "setProxyProps" ,
value : function setProxyProps ( props ) {
var _this2 = this ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
// Assign as instance property so that in reconciling subsequent
// renders, the assigned prop values are referentially equal.
var propsToDispatchers = mapDispatchToProps ( this . props . registry . dispatch , props . ownProps ) ;
this . proxyProps = Object ( lodash _ _WEBPACK _IMPORTED _MODULE _7 _ _ [ "mapValues" ] ) ( propsToDispatchers , function ( dispatcher , propName ) {
// Prebind with prop name so we have reference to the original
// dispatcher to invoke. Track between re-renders to avoid
// creating new function references every render.
if ( _this2 . proxyProps . hasOwnProperty ( propName ) ) {
return _this2 . proxyProps [ propName ] ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return _this2 . proxyDispatch . bind ( _this2 , propName ) ;
} ) ;
}
} , {
key : "render" ,
value : function render ( ) {
return Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "createElement" ] ) ( WrappedComponent , Object ( _babel _runtime _helpers _esm _extends _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] ) ( { } , this . props . ownProps , this . proxyProps ) ) ;
}
} ] ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return _class ;
} ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "Component" ] ) ) ;
return function ( ownProps ) {
return Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "createElement" ] ) ( _registry _provider _ _WEBPACK _IMPORTED _MODULE _9 _ _ [ "RegistryConsumer" ] , null , function ( registry ) {
return Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "createElement" ] ) ( ComponentWithDispatch , {
ownProps : ownProps ,
registry : registry
} ) ;
} ) ;
} ;
} ] ) , 'withDispatch' ) ;
} ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/* harmony default export */ _ _webpack _exports _ _ [ "default" ] = ( withDispatch ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/***/ } ) ,
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@wordpress/data/build-module/components/with-select/index.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ wordpress / data / build - module / components / with - select / index . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony import */ var _babel _runtime _helpers _esm _extends _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js" ) ;
/* harmony import */ var _babel _runtime _helpers _esm _classCallCheck _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js" ) ;
/* harmony import */ var _babel _runtime _helpers _esm _createClass _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js" ) ;
/* harmony import */ var _babel _runtime _helpers _esm _possibleConstructorReturn _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js" ) ;
/* harmony import */ var _babel _runtime _helpers _esm _getPrototypeOf _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js" ) ;
/* harmony import */ var _babel _runtime _helpers _esm _inherits _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( /*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js" ) ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _6 _ _ = _ _webpack _require _ _ ( /*! @wordpress/element */ "@wordpress/element" ) ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _6 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _6 _ _ ) ;
/* harmony import */ var _wordpress _is _shallow _equal _ _WEBPACK _IMPORTED _MODULE _7 _ _ = _ _webpack _require _ _ ( /*! @wordpress/is-shallow-equal */ "@wordpress/is-shallow-equal" ) ;
/* harmony import */ var _wordpress _is _shallow _equal _ _WEBPACK _IMPORTED _MODULE _7 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _is _shallow _equal _ _WEBPACK _IMPORTED _MODULE _7 _ _ ) ;
/* harmony import */ var _wordpress _compose _ _WEBPACK _IMPORTED _MODULE _8 _ _ = _ _webpack _require _ _ ( /*! @wordpress/compose */ "@wordpress/compose" ) ;
/* harmony import */ var _wordpress _compose _ _WEBPACK _IMPORTED _MODULE _8 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _compose _ _WEBPACK _IMPORTED _MODULE _8 _ _ ) ;
/* harmony import */ var _registry _provider _ _WEBPACK _IMPORTED _MODULE _9 _ _ = _ _webpack _require _ _ ( /*! ../registry-provider */ "./node_modules/@wordpress/data/build-module/components/registry-provider/index.js" ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/ * *
* WordPress dependencies
* /
2018-10-24 07:48:53 -04:00
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
/ * *
* Internal dependencies
* /
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
/ * *
* Higher - order component used to inject state - derived props using registered
* selectors .
*
* @ param { Function } mapSelectToProps Function called on every state change ,
* expected to return object of props to
* merge with the component ' s own props .
*
* @ return { Component } Enhanced component with merged state data props .
* /
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
var withSelect = function withSelect ( mapSelectToProps ) {
return Object ( _wordpress _compose _ _WEBPACK _IMPORTED _MODULE _8 _ _ [ "createHigherOrderComponent" ] ) ( function ( WrappedComponent ) {
2018-10-24 07:48:53 -04:00
/ * *
2018-10-29 04:28:32 -04:00
* Default merge props . A constant value is used as the fallback since it
* can be more efficiently shallow compared in case component is repeatedly
* rendered without its own merge props .
*
* @ type { Object }
* /
var DEFAULT _MERGE _PROPS = { } ;
/ * *
* Given a props object , returns the next merge props by mapSelectToProps .
*
* @ param { Object } props Props to pass as argument to mapSelectToProps .
*
* @ return { Object } Props to merge into rendered wrapped element .
2018-10-24 07:48:53 -04:00
* /
2018-10-29 04:28:32 -04:00
function getNextMergeProps ( props ) {
return mapSelectToProps ( props . registry . select , props . ownProps ) || DEFAULT _MERGE _PROPS ;
2018-10-24 07:48:53 -04:00
}
2018-10-29 04:28:32 -04:00
var ComponentWithSelect = Object ( _wordpress _compose _ _WEBPACK _IMPORTED _MODULE _8 _ _ [ "remountOnPropChange" ] ) ( 'registry' ) (
/*#__PURE__*/
function ( _Component ) {
Object ( _babel _runtime _helpers _esm _inherits _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] ) ( _class , _Component ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function _class ( props ) {
var _this ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
Object ( _babel _runtime _helpers _esm _classCallCheck _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] ) ( this , _class ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
_this = Object ( _babel _runtime _helpers _esm _possibleConstructorReturn _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "default" ] ) ( this , Object ( _babel _runtime _helpers _esm _getPrototypeOf _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "default" ] ) ( _class ) . call ( this , props ) ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
_this . subscribe ( ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
_this . mergeProps = getNextMergeProps ( props ) ;
return _this ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
Object ( _babel _runtime _helpers _esm _createClass _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "default" ] ) ( _class , [ {
key : "componentDidMount" ,
value : function componentDidMount ( ) {
this . canRunSelection = true ;
}
} , {
key : "componentWillUnmount" ,
value : function componentWillUnmount ( ) {
this . canRunSelection = false ;
this . unsubscribe ( ) ;
}
} , {
key : "shouldComponentUpdate" ,
value : function shouldComponentUpdate ( nextProps , nextState ) {
var hasPropsChanged = ! _wordpress _is _shallow _equal _ _WEBPACK _IMPORTED _MODULE _7 _ _ _default ( ) ( this . props . ownProps , nextProps . ownProps ) ; // Only render if props have changed or merge props have been updated
// from the store subscriber.
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( this . state === nextState && ! hasPropsChanged ) {
return false ;
} // If merge props change as a result of the incoming props, they
// should be reflected as such in the upcoming render.
if ( hasPropsChanged ) {
var nextMergeProps = getNextMergeProps ( nextProps ) ;
if ( ! _wordpress _is _shallow _equal _ _WEBPACK _IMPORTED _MODULE _7 _ _ _default ( ) ( this . mergeProps , nextMergeProps ) ) {
// Side effects are typically discouraged in lifecycle methods, but
// this component is heavily used and this is the most performant
// code we've found thus far.
// Prior efforts to use `getDerivedStateFromProps` have demonstrated
// miserable performance.
this . mergeProps = nextMergeProps ;
}
}
return true ;
}
} , {
key : "subscribe" ,
value : function subscribe ( ) {
var _this2 = this ;
var subscribe = this . props . registry . subscribe ;
this . unsubscribe = subscribe ( function ( ) {
if ( ! _this2 . canRunSelection ) {
return ;
}
var nextMergeProps = getNextMergeProps ( _this2 . props ) ;
if ( _wordpress _is _shallow _equal _ _WEBPACK _IMPORTED _MODULE _7 _ _ _default ( ) ( _this2 . mergeProps , nextMergeProps ) ) {
return ;
}
_this2 . mergeProps = nextMergeProps ; // Schedule an update. Merge props are not assigned to state
// because derivation of merge props from incoming props occurs
// within shouldComponentUpdate, where setState is not allowed.
// setState is used here instead of forceUpdate because forceUpdate
// bypasses shouldComponentUpdate altogether, which isn't desireable
// if both state and props change within the same render.
// Unfortunately this requires that next merge props are generated
// twice.
_this2 . setState ( { } ) ;
} ) ;
}
} , {
key : "render" ,
value : function render ( ) {
return Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "createElement" ] ) ( WrappedComponent , Object ( _babel _runtime _helpers _esm _extends _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] ) ( { } , this . props . ownProps , this . mergeProps ) ) ;
}
} ] ) ;
return _class ;
} ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "Component" ] ) ) ;
return function ( ownProps ) {
return Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "createElement" ] ) ( _registry _provider _ _WEBPACK _IMPORTED _MODULE _9 _ _ [ "RegistryConsumer" ] , null , function ( registry ) {
return Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "createElement" ] ) ( ComponentWithSelect , {
ownProps : ownProps ,
registry : registry
} ) ;
} ) ;
} ;
} , 'withSelect' ) ;
} ;
/* harmony default export */ _ _webpack _exports _ _ [ "default" ] = ( withSelect ) ;
/***/ } ) ,
/***/ "./node_modules/@wordpress/data/build-module/default-registry.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ wordpress / data / build - module / default - registry . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: default */
2018-10-24 07:48:53 -04:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
2018-10-29 04:28:32 -04:00
/* harmony import */ var _registry _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! ./registry */ "./node_modules/@wordpress/data/build-module/registry.js" ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/* harmony default export */ _ _webpack _exports _ _ [ "default" ] = ( Object ( _registry _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createRegistry" ] ) ( ) ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/***/ } ) ,
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@wordpress/data/build-module/index.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ wordpress / data / build - module / index . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: withSelect, withDispatch, RegistryProvider, RegistryConsumer, createRegistry, plugins, combineReducers, select, dispatch, subscribe, registerStore, registerReducer, registerActions, registerSelectors, registerResolvers, use */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "select" , function ( ) { return select ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "dispatch" , function ( ) { return dispatch ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "subscribe" , function ( ) { return subscribe ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "registerStore" , function ( ) { return registerStore ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "registerReducer" , function ( ) { return registerReducer ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "registerActions" , function ( ) { return registerActions ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "registerSelectors" , function ( ) { return registerSelectors ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "registerResolvers" , function ( ) { return registerResolvers ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "use" , function ( ) { return use ; } ) ;
/* harmony import */ var redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! redux */ "./node_modules/redux/es/redux.js" ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "combineReducers" , function ( ) { return redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "combineReducers" ] ; } ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/* harmony import */ var _default _registry _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! ./default-registry */ "./node_modules/@wordpress/data/build-module/default-registry.js" ) ;
/* harmony import */ var _plugins _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! ./plugins */ "./node_modules/@wordpress/data/build-module/plugins/index.js" ) ;
/* harmony reexport (module object) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "plugins" , function ( ) { return _plugins _ _WEBPACK _IMPORTED _MODULE _2 _ _ ; } ) ;
/* harmony import */ var _components _with _select _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! ./components/with-select */ "./node_modules/@wordpress/data/build-module/components/with-select/index.js" ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "withSelect" , function ( ) { return _components _with _select _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "default" ] ; } ) ;
/* harmony import */ var _components _with _dispatch _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! ./components/with-dispatch */ "./node_modules/@wordpress/data/build-module/components/with-dispatch/index.js" ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "withDispatch" , function ( ) { return _components _with _dispatch _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "default" ] ; } ) ;
/* harmony import */ var _components _registry _provider _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( /*! ./components/registry-provider */ "./node_modules/@wordpress/data/build-module/components/registry-provider/index.js" ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "RegistryProvider" , function ( ) { return _components _registry _provider _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] ; } ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "RegistryConsumer" , function ( ) { return _components _registry _provider _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "RegistryConsumer" ] ; } ) ;
/* harmony import */ var _registry _ _WEBPACK _IMPORTED _MODULE _6 _ _ = _ _webpack _require _ _ ( /*! ./registry */ "./node_modules/@wordpress/data/build-module/registry.js" ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "createRegistry" , function ( ) { return _registry _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "createRegistry" ] ; } ) ;
2018-10-24 07:48:53 -04:00
2018-10-26 03:35:06 -04:00
/ * *
2018-10-29 04:28:32 -04:00
* External dependencies
2018-10-26 03:35:06 -04:00
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/ * *
* Internal dependencies
* /
2018-10-24 07:48:53 -04:00
/ * *
2018-10-29 04:28:32 -04:00
* The combineReducers helper function turns an object whose values are different
* reducing functions into a single reducing function you can pass to registerReducer .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* @ param { Object } reducers An object whose values correspond to different reducing
* functions that need to be combined into one .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* @ return { Function } A reducer that invokes every reducer inside the reducers
* object , and constructs a state object with the same shape .
2018-10-24 07:48:53 -04:00
* /
2018-10-29 04:28:32 -04:00
var select = _default _registry _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] . select ;
var dispatch = _default _registry _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] . dispatch ;
var subscribe = _default _registry _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] . subscribe ;
var registerStore = _default _registry _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] . registerStore ;
var registerReducer = _default _registry _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] . registerReducer ;
var registerActions = _default _registry _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] . registerActions ;
var registerSelectors = _default _registry _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] . registerSelectors ;
var registerResolvers = _default _registry _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] . registerResolvers ;
var use = _default _registry _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] . use ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/***/ } ) ,
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@wordpress/data/build-module/plugins/async-generator/index.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ wordpress / data / build - module / plugins / async - generator / index . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony import */ var _babel _runtime _helpers _esm _asyncToGenerator _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @babel/runtime/helpers/esm/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js" ) ;
/* harmony import */ var redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! redux */ "./node_modules/redux/es/redux.js" ) ;
/* harmony import */ var lodash _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! lodash */ "lodash" ) ;
/* harmony import */ var lodash _ _WEBPACK _IMPORTED _MODULE _2 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( lodash _ _WEBPACK _IMPORTED _MODULE _2 _ _ ) ;
/* harmony import */ var _middleware _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! ./middleware */ "./node_modules/@wordpress/data/build-module/plugins/async-generator/middleware.js" ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/ * *
* External dependencies
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/ * *
* Internal dependencies
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/* harmony default export */ _ _webpack _exports _ _ [ "default" ] = ( function ( registry ) {
return {
registerStore : function registerStore ( reducerKey , options ) {
var store = registry . registerStore ( reducerKey , options ) ;
var enhancer = Object ( redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "applyMiddleware" ] ) ( _middleware _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "default" ] ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var createStore = function createStore ( ) {
return store ;
} ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
Object . assign ( store , enhancer ( createStore ) ( options . reducer ) ) ;
return store ;
} ,
_ _experimentalFulfill : function ( ) {
var _experimentalFulfill = Object ( _babel _runtime _helpers _esm _asyncToGenerator _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] ) (
/*#__PURE__*/
regeneratorRuntime . mark ( function _callee ( reducerKey , selectorName ) {
var resolver ,
store ,
state ,
_len ,
args ,
_key ,
action ,
_args = arguments ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return regeneratorRuntime . wrap ( function _callee$ ( _context ) {
while ( 1 ) {
switch ( _context . prev = _context . next ) {
case 0 :
resolver = Object ( lodash _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "get" ] ) ( registry . namespaces , [ reducerKey , 'resolvers' , selectorName ] ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( resolver ) {
_context . next = 3 ;
break ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return _context . abrupt ( "return" ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
case 3 :
store = registry . namespaces [ reducerKey ] . store ;
state = store . getState ( ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
for ( _len = _args . length , args = new Array ( _len > 2 ? _len - 2 : 0 ) , _key = 2 ; _key < _len ; _key ++ ) {
args [ _key - 2 ] = _args [ _key ] ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
action = resolver . fulfill . apply ( resolver , [ state ] . concat ( args ) ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( ! action ) {
_context . next = 10 ;
break ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
_context . next = 10 ;
return store . dispatch ( Object ( _middleware _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "toAsyncIterable" ] ) ( action ) ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
case 10 :
case "end" :
return _context . stop ( ) ;
}
}
} , _callee , this ) ;
} ) ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return function _ _experimentalFulfill ( _x , _x2 ) {
return _experimentalFulfill . apply ( this , arguments ) ;
} ;
} ( )
} ;
} ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/***/ } ) ,
/***/ "./node_modules/@wordpress/data/build-module/plugins/async-generator/middleware.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ wordpress / data / build - module / plugins / async - generator / middleware . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: toAsyncIterable, default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "toAsyncIterable" , function ( ) { return toAsyncIterable ; } ) ;
/* harmony import */ var _babel _runtime _helpers _esm _asyncToGenerator _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @babel/runtime/helpers/esm/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js" ) ;
/* harmony import */ var _babel _runtime _helpers _esm _asyncIterator _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @babel/runtime/helpers/esm/asyncIterator */ "./node_modules/@babel/runtime/helpers/esm/asyncIterator.js" ) ;
/* harmony import */ var _babel _runtime _helpers _esm _awaitAsyncGenerator _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! @babel/runtime/helpers/esm/awaitAsyncGenerator */ "./node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js" ) ;
/* harmony import */ var _babel _runtime _helpers _esm _wrapAsyncGenerator _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! @babel/runtime/helpers/esm/wrapAsyncGenerator */ "./node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js" ) ;
/* harmony import */ var _wordpress _deprecated _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! @wordpress/deprecated */ "@wordpress/deprecated" ) ;
/* harmony import */ var _wordpress _deprecated _ _WEBPACK _IMPORTED _MODULE _4 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _deprecated _ _WEBPACK _IMPORTED _MODULE _4 _ _ ) ;
2018-10-24 07:48:53 -04:00
2018-10-26 03:35:06 -04:00
/ * *
2018-10-29 04:28:32 -04:00
* WordPress dependencies
2018-10-26 03:35:06 -04:00
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/ * *
* Returns true if the given argument appears to be a dispatchable action .
*
* @ param { * } action Object to test .
*
* @ return { boolean } Whether object is action - like .
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function isActionLike ( action ) {
return ! ! action && typeof action . type === 'string' ;
2018-10-26 03:35:06 -04:00
}
2018-10-29 04:28:32 -04:00
/ * *
* Returns true if the given object is an async iterable , or false otherwise .
*
* @ param { * } object Object to test .
*
* @ return { boolean } Whether object is an async iterable .
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function isAsyncIterable ( object ) {
return ! ! object && typeof object [ Symbol . asyncIterator ] === 'function' ;
2018-10-26 03:35:06 -04:00
}
2018-10-29 04:28:32 -04:00
/ * *
* Returns true if the given object is iterable , or false otherwise .
*
* @ param { * } object Object to test .
*
* @ return { boolean } Whether object is iterable .
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function isIterable ( object ) {
return ! ! object && typeof object [ Symbol . iterator ] === 'function' ;
2018-10-26 03:35:06 -04:00
}
2018-10-24 07:48:53 -04:00
/ * *
2018-10-29 04:28:32 -04:00
* Normalizes the given object argument to an async iterable , asynchronously
* yielding on a singular or array of generator yields or promise resolution .
2018-10-24 07:48:53 -04:00
*
2018-10-29 04:28:32 -04:00
* @ param { * } object Object to normalize .
2018-10-24 07:48:53 -04:00
*
2018-10-29 04:28:32 -04:00
* @ return { AsyncGenerator } Async iterable actions .
2018-10-24 07:48:53 -04:00
* /
2018-10-29 04:28:32 -04:00
function toAsyncIterable ( object ) {
if ( isAsyncIterable ( object ) ) {
_wordpress _deprecated _ _WEBPACK _IMPORTED _MODULE _4 _ _ _default ( ) ( 'Writing Resolvers as async generators' , {
alternative : 'resolvers as generators with controls' ,
plugin : 'Gutenberg' ,
version : 4.2
} ) ;
return object ;
2018-10-26 03:35:06 -04:00
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return Object ( _babel _runtime _helpers _esm _wrapAsyncGenerator _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "default" ] ) (
/*#__PURE__*/
regeneratorRuntime . mark ( function _callee ( ) {
var _iteratorNormalCompletion2 , _didIteratorError2 , _iteratorError2 , _iterator2 , _step2 , maybeAction ;
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
return regeneratorRuntime . wrap ( function _callee$ ( _context ) {
while ( 1 ) {
switch ( _context . prev = _context . next ) {
case 0 :
// Normalize as iterable...
if ( ! isIterable ( object ) ) {
object = [ object ] ;
}
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
_iteratorNormalCompletion2 = true ;
_didIteratorError2 = false ;
_iteratorError2 = undefined ;
_context . prev = 4 ;
_iterator2 = object [ Symbol . iterator ] ( ) ;
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
case 6 :
if ( _iteratorNormalCompletion2 = ( _step2 = _iterator2 . next ( ) ) . done ) {
_context . next = 13 ;
break ;
}
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
maybeAction = _step2 . value ;
_context . next = 10 ;
return maybeAction ;
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
case 10 :
_iteratorNormalCompletion2 = true ;
_context . next = 6 ;
break ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
case 13 :
_context . next = 19 ;
break ;
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
case 15 :
_context . prev = 15 ;
_context . t0 = _context [ "catch" ] ( 4 ) ;
_didIteratorError2 = true ;
_iteratorError2 = _context . t0 ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
case 19 :
_context . prev = 19 ;
_context . prev = 20 ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( ! _iteratorNormalCompletion2 && _iterator2 . return != null ) {
_iterator2 . return ( ) ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
case 22 :
_context . prev = 22 ;
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
if ( ! _didIteratorError2 ) {
_context . next = 25 ;
break ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
throw _iteratorError2 ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
case 25 :
return _context . finish ( 22 ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
case 26 :
return _context . finish ( 19 ) ;
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
case 27 :
case "end" :
return _context . stop ( ) ;
}
}
} , _callee , this , [ [ 4 , 15 , 19 , 27 ] , [ 20 , , 22 , 26 ] ] ) ;
} ) ) ( ) ;
}
2018-10-24 07:48:53 -04:00
/ * *
2018-10-29 04:28:32 -04:00
* Simplest possible promise redux middleware .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* @ param { Object } store Redux store .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* @ return { function } middleware .
2018-10-24 07:48:53 -04:00
* /
2018-10-29 04:28:32 -04:00
var asyncGeneratorMiddleware = function asyncGeneratorMiddleware ( store ) {
return function ( next ) {
return function ( action ) {
if ( ! isAsyncIterable ( action ) ) {
return next ( action ) ;
2018-10-26 03:35:06 -04:00
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var runtime =
/*#__PURE__*/
function ( ) {
var _ref2 = Object ( _babel _runtime _helpers _esm _asyncToGenerator _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] ) (
/*#__PURE__*/
regeneratorRuntime . mark ( function _callee2 ( fulfillment ) {
var _iteratorNormalCompletion , _didIteratorError , _iteratorError , _iterator , _step , _value , maybeAction ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return regeneratorRuntime . wrap ( function _callee2$ ( _context2 ) {
while ( 1 ) {
switch ( _context2 . prev = _context2 . next ) {
case 0 :
_iteratorNormalCompletion = true ;
_didIteratorError = false ;
_context2 . prev = 2 ;
_iterator = Object ( _babel _runtime _helpers _esm _asyncIterator _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] ) ( fulfillment ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
case 4 :
_context2 . next = 6 ;
return _iterator . next ( ) ;
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
case 6 :
_step = _context2 . sent ;
_iteratorNormalCompletion = _step . done ;
_context2 . next = 10 ;
return _step . value ;
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
case 10 :
_value = _context2 . sent ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( _iteratorNormalCompletion ) {
_context2 . next = 17 ;
break ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
maybeAction = _value ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
// Dispatch if it quacks like an action.
if ( isActionLike ( maybeAction ) ) {
store . dispatch ( maybeAction ) ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
case 14 :
_iteratorNormalCompletion = true ;
_context2 . next = 4 ;
break ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
case 17 :
_context2 . next = 23 ;
break ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
case 19 :
_context2 . prev = 19 ;
_context2 . t0 = _context2 [ "catch" ] ( 2 ) ;
_didIteratorError = true ;
_iteratorError = _context2 . t0 ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
case 23 :
_context2 . prev = 23 ;
_context2 . prev = 24 ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( ! ( ! _iteratorNormalCompletion && _iterator . return != null ) ) {
_context2 . next = 28 ;
break ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
_context2 . next = 28 ;
return _iterator . return ( ) ;
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
case 28 :
_context2 . prev = 28 ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( ! _didIteratorError ) {
_context2 . next = 31 ;
break ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
throw _iteratorError ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
case 31 :
return _context2 . finish ( 28 ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
case 32 :
return _context2 . finish ( 23 ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
case 33 :
case "end" :
return _context2 . stop ( ) ;
}
}
} , _callee2 , this , [ [ 2 , 19 , 23 , 33 ] , [ 24 , , 28 , 32 ] ] ) ;
} ) ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return function runtime ( _x ) {
return _ref2 . apply ( this , arguments ) ;
} ;
} ( ) ;
return runtime ( action ) ;
} ;
} ;
2018-10-24 07:48:53 -04:00
} ;
2018-10-29 04:28:32 -04:00
/* harmony default export */ _ _webpack _exports _ _ [ "default" ] = ( asyncGeneratorMiddleware ) ;
2018-10-24 07:48:53 -04:00
/***/ } ) ,
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@wordpress/data/build-module/plugins/controls/index.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ wordpress / data / build - module / plugins / controls / index . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: default */
2018-10-24 07:48:53 -04:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
2018-10-29 04:28:32 -04:00
/* harmony import */ var _babel _runtime _helpers _esm _asyncToGenerator _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @babel/runtime/helpers/esm/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js" ) ;
/* harmony import */ var redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! redux */ "./node_modules/redux/es/redux.js" ) ;
/* harmony import */ var lodash _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! lodash */ "lodash" ) ;
/* harmony import */ var lodash _ _WEBPACK _IMPORTED _MODULE _2 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( lodash _ _WEBPACK _IMPORTED _MODULE _2 _ _ ) ;
/* harmony import */ var _wordpress _redux _routine _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! @wordpress/redux-routine */ "@wordpress/redux-routine" ) ;
/* harmony import */ var _wordpress _redux _routine _ _WEBPACK _IMPORTED _MODULE _3 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _redux _routine _ _WEBPACK _IMPORTED _MODULE _3 _ _ ) ;
2018-10-24 07:48:53 -04:00
/ * *
2018-10-29 04:28:32 -04:00
* External dependencies
2018-10-24 07:48:53 -04:00
* /
2018-10-29 04:28:32 -04:00
2018-10-24 07:48:53 -04:00
/ * *
2018-10-29 04:28:32 -04:00
* WordPress dependencies
2018-10-24 07:48:53 -04:00
* /
2018-10-29 04:28:32 -04:00
/* harmony default export */ _ _webpack _exports _ _ [ "default" ] = ( function ( registry ) {
return {
registerStore : function registerStore ( reducerKey , options ) {
var store = registry . registerStore ( reducerKey , options ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( options . controls ) {
var middleware = _wordpress _redux _routine _ _WEBPACK _IMPORTED _MODULE _3 _ _ _default ( ) ( options . controls ) ;
var enhancer = Object ( redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "applyMiddleware" ] ) ( middleware ) ;
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
var createStore = function createStore ( ) {
return store ;
} ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
Object . assign ( store , enhancer ( createStore ) ( options . reducer ) ) ;
registry . namespaces [ reducerKey ] . supportControls = true ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return store ;
} ,
_ _experimentalFulfill : function ( ) {
var _experimentalFulfill = Object ( _babel _runtime _helpers _esm _asyncToGenerator _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] ) (
/*#__PURE__*/
regeneratorRuntime . mark ( function _callee ( reducerKey , selectorName ) {
var _len ,
args ,
_key ,
resolver ,
_args = arguments ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return regeneratorRuntime . wrap ( function _callee$ ( _context ) {
while ( 1 ) {
switch ( _context . prev = _context . next ) {
case 0 :
for ( _len = _args . length , args = new Array ( _len > 2 ? _len - 2 : 0 ) , _key = 2 ; _key < _len ; _key ++ ) {
args [ _key - 2 ] = _args [ _key ] ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( registry . namespaces [ reducerKey ] . supportControls ) {
_context . next = 5 ;
break ;
}
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
_context . next = 4 ;
return registry . _ _experimentalFulfill . apply ( registry , [ reducerKey , selectorName ] . concat ( args ) ) ;
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
case 4 :
return _context . abrupt ( "return" ) ;
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
case 5 :
resolver = Object ( lodash _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "get" ] ) ( registry . namespaces , [ reducerKey , 'resolvers' , selectorName ] ) ;
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
if ( resolver ) {
_context . next = 8 ;
break ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return _context . abrupt ( "return" ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
case 8 :
_context . next = 10 ;
return registry . namespaces [ reducerKey ] . store . dispatch ( resolver . fulfill . apply ( resolver , args ) ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
case 10 :
case "end" :
return _context . stop ( ) ;
}
}
} , _callee , this ) ;
} ) ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return function _ _experimentalFulfill ( _x , _x2 ) {
return _experimentalFulfill . apply ( this , arguments ) ;
} ;
} ( )
} ;
} ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/***/ } ) ,
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@wordpress/data/build-module/plugins/index.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ wordpress / data / build - module / plugins / index . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: controls, persistence, asyncGenerator */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony import */ var _controls _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! ./controls */ "./node_modules/@wordpress/data/build-module/plugins/controls/index.js" ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "controls" , function ( ) { return _controls _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] ; } ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/* harmony import */ var _persistence _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! ./persistence */ "./node_modules/@wordpress/data/build-module/plugins/persistence/index.js" ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "persistence" , function ( ) { return _persistence _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] ; } ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/* harmony import */ var _async _generator _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! ./async-generator */ "./node_modules/@wordpress/data/build-module/plugins/async-generator/index.js" ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "asyncGenerator" , function ( ) { return _async _generator _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "default" ] ; } ) ;
2018-10-24 07:48:53 -04:00
2018-10-26 03:35:06 -04:00
/***/ } ) ,
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@wordpress/data/build-module/plugins/persistence/index.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ wordpress / data / build - module / plugins / persistence / index . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: withInitialState, createPersistenceInterface, default */
2018-10-26 03:35:06 -04:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
2018-10-29 04:28:32 -04:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "withInitialState" , function ( ) { return withInitialState ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "createPersistenceInterface" , function ( ) { return createPersistenceInterface ; } ) ;
/* harmony import */ var _babel _runtime _helpers _esm _defineProperty _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js" ) ;
/* harmony import */ var _babel _runtime _helpers _esm _objectSpread _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @babel/runtime/helpers/esm/objectSpread */ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js" ) ;
/* harmony import */ var lodash _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! lodash */ "lodash" ) ;
/* harmony import */ var lodash _ _WEBPACK _IMPORTED _MODULE _2 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( lodash _ _WEBPACK _IMPORTED _MODULE _2 _ _ ) ;
/* harmony import */ var _storage _default _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! ./storage/default */ "./node_modules/@wordpress/data/build-module/plugins/persistence/storage/default.js" ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/ * *
* External dependencies
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/ * *
* Internal dependencies
* /
2018-10-24 07:48:53 -04:00
2018-10-26 03:35:06 -04:00
/ * *
2018-10-29 04:28:32 -04:00
* Persistence plugin options .
*
* @ property { Storage } storage Persistent storage implementation . This must
* at least implement ` getItem ` and ` setItem ` of
* the Web Storage API .
* @ property { string } storageKey Key on which to set in persistent storage .
*
* @ typedef { WPDataPersistencePluginOptions }
2018-10-26 03:35:06 -04:00
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/ * *
* Default plugin storage .
*
* @ type { Storage }
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var DEFAULT _STORAGE = _storage _default _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "default" ] ;
2018-10-26 03:35:06 -04:00
/ * *
2018-10-29 04:28:32 -04:00
* Default plugin storage key .
*
* @ type { string }
2018-10-26 03:35:06 -04:00
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var DEFAULT _STORAGE _KEY = 'WP_DATA' ;
/ * *
* Higher - order reducer to provides an initial value when state is undefined .
*
* @ param { Function } reducer Original reducer .
* @ param { * } initialState Value to use as initial state .
*
* @ return { Function } Enhanced reducer .
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function withInitialState ( reducer , initialState ) {
return function ( ) {
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : initialState ;
var action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
return reducer ( state , action ) ;
} ;
}
2018-10-26 03:35:06 -04:00
/ * *
2018-10-29 04:28:32 -04:00
* Creates a persistence interface , exposing getter and setter methods ( ` get `
* and ` set ` respectively ) .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* @ param { WPDataPersistencePluginOptions } options Plugin options .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* @ return { Object } Persistence interface .
2018-10-26 03:35:06 -04:00
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function createPersistenceInterface ( options ) {
var _options$storage = options . storage ,
storage = _options$storage === void 0 ? DEFAULT _STORAGE : _options$storage ,
_options$storageKey = options . storageKey ,
storageKey = _options$storageKey === void 0 ? DEFAULT _STORAGE _KEY : _options$storageKey ;
var data ;
/ * *
* Returns the persisted data as an object , defaulting to an empty object .
*
* @ return { Object } Persisted data .
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function get ( ) {
if ( data === undefined ) {
// If unset, getItem is expected to return null. Fall back to
// empty object.
var persisted = storage . getItem ( storageKey ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( persisted === null ) {
data = { } ;
} else {
try {
data = JSON . parse ( persisted ) ;
} catch ( error ) {
// Similarly, should any error be thrown during parse of
// the string (malformed JSON), fall back to empty object.
data = { } ;
}
}
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return data ;
}
/ * *
* Merges an updated reducer state into the persisted data .
*
* @ param { string } key Key to update .
* @ param { * } value Updated value .
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function set ( key , value ) {
data = Object ( _babel _runtime _helpers _esm _objectSpread _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] ) ( { } , data , Object ( _babel _runtime _helpers _esm _defineProperty _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] ) ( { } , key , value ) ) ;
storage . setItem ( storageKey , JSON . stringify ( data ) ) ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return {
get : get ,
set : set
} ;
}
/ * *
* Data plugin to persist store state into a single storage key .
*
* @ param { WPDataRegistry } registry Data registry .
* @ param { ? WPDataPersistencePluginOptions } pluginOptions Plugin options .
*
* @ return { WPDataPlugin } Data plugin .
* /
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
/* harmony default export */ _ _webpack _exports _ _ [ "default" ] = ( function ( registry , pluginOptions ) {
var persistence = createPersistenceInterface ( pluginOptions ) ;
/ * *
* Creates an enhanced store dispatch function , triggering the state of the
* given reducer key to be persisted when changed .
*
* @ param { Function } getState Function which returns current state .
* @ param { string } reducerKey Reducer key .
* @ param { ? Array < string > } keys Optional subset of keys to save .
*
* @ return { Function } Enhanced dispatch function .
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function createPersistOnChange ( getState , reducerKey , keys ) {
var lastState = getState ( ) ;
return function ( result ) {
var state = getState ( ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( state !== lastState ) {
if ( Array . isArray ( keys ) ) {
state = Object ( lodash _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "pick" ] ) ( state , keys ) ;
2018-10-26 03:35:06 -04:00
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
persistence . set ( reducerKey , state ) ;
lastState = state ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return result ;
} ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return {
registerStore : function registerStore ( reducerKey , options ) {
if ( ! options . persist ) {
return registry . registerStore ( reducerKey , options ) ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var initialState = persistence . get ( ) [ reducerKey ] ;
options = Object ( _babel _runtime _helpers _esm _objectSpread _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] ) ( { } , options , {
reducer : withInitialState ( options . reducer , initialState )
2018-10-26 03:35:06 -04:00
} ) ;
2018-10-29 04:28:32 -04:00
var store = registry . registerStore ( reducerKey , options ) ;
store . dispatch = Object ( lodash _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "flow" ] ) ( [ store . dispatch , createPersistOnChange ( store . getState , reducerKey , options . persist ) ] ) ;
return store ;
}
} ;
} ) ;
2018-10-24 07:48:53 -04:00
2018-10-26 03:35:06 -04:00
/***/ } ) ,
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@wordpress/data/build-module/plugins/persistence/storage/default.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ wordpress / data / build - module / plugins / persistence / storage / default . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
2018-10-26 03:35:06 -04:00
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-10-24 07:48:53 -04:00
2018-10-26 03:35:06 -04:00
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
2018-10-29 04:28:32 -04:00
/* harmony import */ var _object _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! ./object */ "./node_modules/@wordpress/data/build-module/plugins/persistence/storage/object.js" ) ;
/ * *
* Internal dependencies
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var storage ;
try {
// Private Browsing in Safari 10 and earlier will throw an error when
// attempting to set into localStorage. The test here is intentional in
// causing a thrown error as condition for using fallback object storage.
storage = window . localStorage ;
storage . setItem ( '__wpDataTestLocalStorage' , '' ) ;
storage . removeItem ( '__wpDataTestLocalStorage' ) ;
} catch ( error ) {
storage = _object _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] ;
}
/* harmony default export */ _ _webpack _exports _ _ [ "default" ] = ( storage ) ;
2018-10-24 07:48:53 -04:00
2018-10-26 03:35:06 -04:00
/***/ } ) ,
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@wordpress/data/build-module/plugins/persistence/storage/object.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ wordpress / data / build - module / plugins / persistence / storage / object . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: default */
2018-10-26 03:35:06 -04:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-10-24 07:48:53 -04:00
2018-10-26 03:35:06 -04:00
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
2018-10-29 04:28:32 -04:00
var objectStorage ;
var storage = {
getItem : function getItem ( key ) {
if ( ! objectStorage || ! objectStorage [ key ] ) {
return null ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return objectStorage [ key ] ;
} ,
setItem : function setItem ( key , value ) {
if ( ! objectStorage ) {
storage . clear ( ) ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
objectStorage [ key ] = String ( value ) ;
} ,
clear : function clear ( ) {
objectStorage = Object . create ( null ) ;
}
} ;
/* harmony default export */ _ _webpack _exports _ _ [ "default" ] = ( storage ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/***/ } ) ,
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@wordpress/data/build-module/promise-middleware.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ wordpress / data / build - module / promise - middleware . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony import */ var is _promise _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! is-promise */ "./node_modules/is-promise/index.js" ) ;
/* harmony import */ var is _promise _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( is _promise _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
2018-10-26 03:35:06 -04:00
/ * *
* External dependencies
* /
2018-10-24 07:48:53 -04:00
2018-10-26 03:35:06 -04:00
/ * *
2018-10-29 04:28:32 -04:00
* Simplest possible promise redux middleware .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* @ return { function } middleware .
2018-10-26 03:35:06 -04:00
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var promiseMiddleware = function promiseMiddleware ( ) {
return function ( next ) {
return function ( action ) {
if ( is _promise _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default ( ) ( action ) ) {
return action . then ( function ( resolvedAction ) {
if ( resolvedAction ) {
return next ( resolvedAction ) ;
}
} ) ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return next ( action ) ;
} ;
} ;
} ;
/* harmony default export */ _ _webpack _exports _ _ [ "default" ] = ( promiseMiddleware ) ;
2018-10-24 07:48:53 -04:00
/***/ } ) ,
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@wordpress/data/build-module/registry.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ wordpress / data / build - module / registry . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: createRegistry */
2018-10-24 07:48:53 -04:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
2018-10-29 04:28:32 -04:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "createRegistry" , function ( ) { return createRegistry ; } ) ;
/* harmony import */ var _babel _runtime _helpers _esm _slicedToArray _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js" ) ;
/* harmony import */ var _babel _runtime _helpers _esm _objectSpread _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @babel/runtime/helpers/esm/objectSpread */ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js" ) ;
/* harmony import */ var _babel _runtime _helpers _esm _asyncToGenerator _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! @babel/runtime/helpers/esm/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js" ) ;
/* harmony import */ var redux _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! redux */ "./node_modules/redux/es/redux.js" ) ;
/* harmony import */ var lodash _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! lodash */ "lodash" ) ;
/* harmony import */ var lodash _ _WEBPACK _IMPORTED _MODULE _4 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( lodash _ _WEBPACK _IMPORTED _MODULE _4 _ _ ) ;
/* harmony import */ var _store _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( /*! ./store */ "./node_modules/@wordpress/data/build-module/store/index.js" ) ;
/* harmony import */ var _promise _middleware _ _WEBPACK _IMPORTED _MODULE _6 _ _ = _ _webpack _require _ _ ( /*! ./promise-middleware */ "./node_modules/@wordpress/data/build-module/promise-middleware.js" ) ;
2018-10-26 03:35:06 -04:00
2018-10-24 07:48:53 -04:00
/ * *
2018-10-26 03:35:06 -04:00
* External dependencies
2018-10-24 07:48:53 -04:00
* /
2018-10-26 03:35:06 -04:00
2018-10-24 07:48:53 -04:00
/ * *
2018-10-26 03:35:06 -04:00
* Internal dependencies
2018-10-24 07:48:53 -04:00
* /
2018-10-26 03:35:06 -04:00
2018-10-24 07:48:53 -04:00
/ * *
2018-10-29 04:28:32 -04:00
* An isolated orchestrator of store registrations .
2018-10-24 07:48:53 -04:00
*
2018-10-29 04:28:32 -04:00
* @ typedef { WPDataRegistry }
2018-10-24 07:48:53 -04:00
*
2018-10-29 04:28:32 -04:00
* @ property { Function } registerReducer
* @ property { Function } registerSelectors
* @ property { Function } registerResolvers
* @ property { Function } registerActions
* @ property { Function } registerStore
* @ property { Function } subscribe
* @ property { Function } select
* @ property { Function } dispatch
* @ property { Function } use
2018-10-24 07:48:53 -04:00
* /
/ * *
2018-10-29 04:28:32 -04:00
* An object of registry function overrides .
2018-10-24 07:48:53 -04:00
*
2018-10-29 04:28:32 -04:00
* @ typedef { WPDataPlugin }
2018-10-24 07:48:53 -04:00
* /
/ * *
2018-10-29 04:28:32 -04:00
* Creates a new store registry , given an optional object of initial store
* configurations .
2018-10-24 07:48:53 -04:00
*
2018-10-29 04:28:32 -04:00
* @ param { Object } storeConfigs Initial store configurations .
2018-10-24 07:48:53 -04:00
*
2018-10-29 04:28:32 -04:00
* @ return { WPDataRegistry } Data registry .
2018-10-24 07:48:53 -04:00
* /
2018-10-29 04:28:32 -04:00
function createRegistry ( ) {
var storeConfigs = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : { } ;
var namespaces = { } ;
var listeners = [ ] ;
/ * *
* Global listener called for each store ' s update .
* /
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
function globalListener ( ) {
listeners . forEach ( function ( listener ) {
return listener ( ) ;
2018-10-26 03:35:06 -04:00
} ) ;
}
2018-10-29 04:28:32 -04:00
/ * *
* Registers a new sub - reducer to the global state and returns a Redux - like
* store object .
*
* @ param { string } reducerKey Reducer key .
* @ param { Object } reducer Reducer function .
*
* @ return { Object } Store Object .
* /
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
function registerReducer ( reducerKey , reducer ) {
var enhancers = [ Object ( redux _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "applyMiddleware" ] ) ( _promise _middleware _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "default" ] ) ] ;
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
if ( typeof window !== 'undefined' && window . _ _REDUX _DEVTOOLS _EXTENSION _ _ ) {
enhancers . push ( window . _ _REDUX _DEVTOOLS _EXTENSION _ _ ( {
name : reducerKey ,
instanceId : reducerKey
} ) ) ;
}
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
var store = Object ( redux _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "createStore" ] ) ( reducer , Object ( lodash _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "flowRight" ] ) ( enhancers ) ) ;
namespaces [ reducerKey ] = {
store : store ,
reducer : reducer
} ; // Customize subscribe behavior to call listeners only on effective change,
// not on every dispatch.
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
var lastState = store . getState ( ) ;
store . subscribe ( function ( ) {
var state = store . getState ( ) ;
var hasChanged = state !== lastState ;
lastState = state ;
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
if ( hasChanged ) {
globalListener ( ) ;
}
} ) ;
return store ;
}
/ * *
* Registers selectors for external usage .
*
* @ param { string } reducerKey Part of the state shape to register the
* selectors for .
* @ param { Object } newSelectors Selectors to register . Keys will be used as the
* public facing API . Selectors will get passed the
* state as first argument .
* /
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
function registerSelectors ( reducerKey , newSelectors ) {
var store = namespaces [ reducerKey ] . store ;
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
var createStateSelector = function createStateSelector ( selector ) {
return function ( ) {
for ( var _len = arguments . length , args = new Array ( _len ) , _key = 0 ; _key < _len ; _key ++ ) {
args [ _key ] = arguments [ _key ] ;
}
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
return selector . apply ( void 0 , [ store . getState ( ) ] . concat ( args ) ) ;
} ;
} ;
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
namespaces [ reducerKey ] . selectors = Object ( lodash _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "mapValues" ] ) ( newSelectors , createStateSelector ) ;
}
/ * *
* Registers resolvers for a given reducer key . Resolvers are side effects
* invoked once per argument set of a given selector call , used in ensuring
* that the data needs for the selector are satisfied .
*
* @ param { string } reducerKey Part of the state shape to register the
* resolvers for .
* @ param { Object } newResolvers Resolvers to register .
* /
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
function registerResolvers ( reducerKey , newResolvers ) {
namespaces [ reducerKey ] . resolvers = Object ( lodash _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "mapValues" ] ) ( newResolvers , function ( resolver ) {
if ( ! resolver . fulfill ) {
resolver = {
fulfill : resolver
} ;
}
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
return resolver ;
} ) ;
namespaces [ reducerKey ] . selectors = Object ( lodash _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "mapValues" ] ) ( namespaces [ reducerKey ] . selectors , function ( selector , selectorName ) {
var resolver = newResolvers [ selectorName ] ;
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
if ( ! resolver ) {
return selector ;
}
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
return function ( ) {
for ( var _len2 = arguments . length , args = new Array ( _len2 ) , _key2 = 0 ; _key2 < _len2 ; _key2 ++ ) {
args [ _key2 ] = arguments [ _key2 ] ;
2018-10-26 03:35:06 -04:00
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var _select = select ( 'core/data' ) ,
hasStartedResolution = _select . hasStartedResolution ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var _dispatch = dispatch ( 'core/data' ) ,
startResolution = _dispatch . startResolution ,
finishResolution = _dispatch . finishResolution ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function fulfillSelector ( ) {
return _fulfillSelector . apply ( this , arguments ) ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function _fulfillSelector ( ) {
_fulfillSelector = Object ( _babel _runtime _helpers _esm _asyncToGenerator _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "default" ] ) (
/*#__PURE__*/
regeneratorRuntime . mark ( function _callee ( ) {
var _registry ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var state ;
return regeneratorRuntime . wrap ( function _callee$ ( _context ) {
while ( 1 ) {
switch ( _context . prev = _context . next ) {
case 0 :
state = namespaces [ reducerKey ] . store . getState ( ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( ! ( typeof resolver . isFulfilled === 'function' && resolver . isFulfilled . apply ( resolver , [ state ] . concat ( args ) ) ) ) {
_context . next = 3 ;
break ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return _context . abrupt ( "return" ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
case 3 :
if ( ! hasStartedResolution ( reducerKey , selectorName , args ) ) {
_context . next = 5 ;
break ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return _context . abrupt ( "return" ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
case 5 :
startResolution ( reducerKey , selectorName , args ) ;
_context . next = 8 ;
return ( _registry = registry ) . _ _experimentalFulfill . apply ( _registry , [ reducerKey , selectorName ] . concat ( args ) ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
case 8 :
finishResolution ( reducerKey , selectorName , args ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
case 9 :
case "end" :
return _context . stop ( ) ;
}
}
} , _callee , this ) ;
} ) ) ;
return _fulfillSelector . apply ( this , arguments ) ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
fulfillSelector . apply ( void 0 , args ) ;
return selector . apply ( void 0 , args ) ;
} ;
} ) ;
}
/ * *
* Registers actions for external usage .
*
* @ param { string } reducerKey Part of the state shape to register the
* selectors for .
* @ param { Object } newActions Actions to register .
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function registerActions ( reducerKey , newActions ) {
var store = namespaces [ reducerKey ] . store ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var createBoundAction = function createBoundAction ( action ) {
return function ( ) {
return store . dispatch ( action . apply ( void 0 , arguments ) ) ;
} ;
} ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
namespaces [ reducerKey ] . actions = Object ( lodash _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "mapValues" ] ) ( newActions , createBoundAction ) ;
}
/ * *
* Convenience for registering reducer with actions and selectors .
*
* @ param { string } reducerKey Reducer key .
* @ param { Object } options Store description ( reducer , actions , selectors , resolvers ) .
*
* @ return { Object } Registered store object .
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function registerStore ( reducerKey , options ) {
if ( ! options . reducer ) {
throw new TypeError ( 'Must specify store reducer' ) ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var store = registerReducer ( reducerKey , options . reducer ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( options . actions ) {
registerActions ( reducerKey , options . actions ) ;
}
if ( options . selectors ) {
registerSelectors ( reducerKey , options . selectors ) ;
}
if ( options . resolvers ) {
registerResolvers ( reducerKey , options . resolvers ) ;
}
return store ;
}
/ * *
* Subscribe to changes to any data .
*
* @ param { Function } listener Listener function .
*
* @ return { Function } Unsubscribe function .
* /
var subscribe = function subscribe ( listener ) {
listeners . push ( listener ) ;
return function ( ) {
listeners = Object ( lodash _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "without" ] ) ( listeners , listener ) ;
} ;
} ;
/ * *
* Calls a selector given the current state and extra arguments .
*
* @ param { string } reducerKey Part of the state shape to register the
* selectors for .
*
* @ return { * } The selector ' s returned value .
* /
function select ( reducerKey ) {
return Object ( lodash _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "get" ] ) ( namespaces , [ reducerKey , 'selectors' ] ) ;
}
/ * *
* Calls a resolver given arguments
*
* @ param { string } reducerKey Part of the state shape to register the
* selectors for .
* @ param { string } selectorName Selector name to fulfill .
* @ param { Array } args Selector Arguments .
* /
function fulfill ( _x , _x2 ) {
return _fulfill . apply ( this , arguments ) ;
}
/ * *
* Returns the available actions for a part of the state .
*
* @ param { string } reducerKey Part of the state shape to dispatch the
* action for .
*
* @ return { * } The action ' s returned value .
* /
function _fulfill ( ) {
_fulfill = Object ( _babel _runtime _helpers _esm _asyncToGenerator _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "default" ] ) (
/*#__PURE__*/
regeneratorRuntime . mark ( function _callee2 ( reducerKey , selectorName ) {
var resolver ,
store ,
_len3 ,
args ,
_key3 ,
action ,
_args2 = arguments ;
return regeneratorRuntime . wrap ( function _callee2$ ( _context2 ) {
while ( 1 ) {
switch ( _context2 . prev = _context2 . next ) {
case 0 :
resolver = Object ( lodash _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "get" ] ) ( namespaces , [ reducerKey , 'resolvers' , selectorName ] ) ;
if ( resolver ) {
_context2 . next = 3 ;
break ;
2018-10-26 03:35:06 -04:00
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return _context2 . abrupt ( "return" ) ;
case 3 :
store = namespaces [ reducerKey ] . store ;
for ( _len3 = _args2 . length , args = new Array ( _len3 > 2 ? _len3 - 2 : 0 ) , _key3 = 2 ; _key3 < _len3 ; _key3 ++ ) {
args [ _key3 - 2 ] = _args2 [ _key3 ] ;
}
action = resolver . fulfill . apply ( resolver , args ) ;
if ( ! action ) {
_context2 . next = 9 ;
break ;
}
_context2 . next = 9 ;
return store . dispatch ( action ) ;
case 9 :
case "end" :
return _context2 . stop ( ) ;
}
}
} , _callee2 , this ) ;
} ) ) ;
return _fulfill . apply ( this , arguments ) ;
}
function dispatch ( reducerKey ) {
return Object ( lodash _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "get" ] ) ( namespaces , [ reducerKey , 'actions' ] ) ;
}
/ * *
* Maps an object of function values to proxy invocation through to the
* current internal representation of the registry , which may be enhanced
* by plugins .
*
* @ param { Object < string , Function > } attributes Object of function values .
*
* @ return { Object < string , Function > } Object enhanced with plugin proxying .
* /
function withPlugins ( attributes ) {
return Object ( lodash _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "mapValues" ] ) ( attributes , function ( attribute , key ) {
if ( typeof attribute !== 'function' ) {
return attribute ;
}
return function ( ) {
return registry [ key ] . apply ( null , arguments ) ;
} ;
} ) ;
}
var registry = {
namespaces : namespaces ,
registerReducer : registerReducer ,
registerSelectors : registerSelectors ,
registerResolvers : registerResolvers ,
registerActions : registerActions ,
registerStore : registerStore ,
subscribe : subscribe ,
select : select ,
dispatch : dispatch ,
use : use ,
_ _experimentalFulfill : fulfill
} ;
/ * *
* Enhances the registry with the prescribed set of overrides . Returns the
* enhanced registry to enable plugin chaining .
*
* @ param { WPDataPlugin } plugin Plugin by which to enhance .
* @ param { ? Object } options Optional options to pass to plugin .
*
* @ return { WPDataRegistry } Enhanced registry .
* /
function use ( plugin , options ) {
registry = Object ( _babel _runtime _helpers _esm _objectSpread _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] ) ( { } , registry , plugin ( registry , options ) ) ;
return registry ;
}
Object . entries ( Object ( _babel _runtime _helpers _esm _objectSpread _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] ) ( {
'core/data' : _store _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ]
} , storeConfigs ) ) . map ( function ( _ref ) {
var _ref2 = Object ( _babel _runtime _helpers _esm _slicedToArray _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] ) ( _ref , 2 ) ,
name = _ref2 [ 0 ] ,
config = _ref2 [ 1 ] ;
return registerStore ( name , config ) ;
} ) ;
return withPlugins ( registry ) ;
}
/***/ } ) ,
/***/ "./node_modules/@wordpress/data/build-module/store/actions.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ wordpress / data / build - module / store / actions . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: startResolution, finishResolution */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "startResolution" , function ( ) { return startResolution ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "finishResolution" , function ( ) { return finishResolution ; } ) ;
/ * *
* Returns an action object used in signalling that selector resolution has
* started .
*
* @ param { string } reducerKey Registered store reducer key .
* @ param { string } selectorName Name of selector for which resolver triggered .
* @ param { ... * } args Arguments to associate for uniqueness .
*
* @ return { Object } Action object .
* /
function startResolution ( reducerKey , selectorName , args ) {
return {
type : 'START_RESOLUTION' ,
reducerKey : reducerKey ,
selectorName : selectorName ,
args : args
} ;
}
/ * *
* Returns an action object used in signalling that selector resolution has
* completed .
*
* @ param { string } reducerKey Registered store reducer key .
* @ param { string } selectorName Name of selector for which resolver triggered .
* @ param { ... * } args Arguments to associate for uniqueness .
*
* @ return { Object } Action object .
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function finishResolution ( reducerKey , selectorName , args ) {
return {
type : 'FINISH_RESOLUTION' ,
reducerKey : reducerKey ,
selectorName : selectorName ,
args : args
2018-10-26 03:35:06 -04:00
} ;
2018-10-29 04:28:32 -04:00
}
2018-10-24 07:48:53 -04:00
2018-10-26 03:35:06 -04:00
/***/ } ) ,
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@wordpress/data/build-module/store/index.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ wordpress / data / build - module / store / index . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
2018-10-26 03:35:06 -04:00
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-10-24 07:48:53 -04:00
2018-10-26 03:35:06 -04:00
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
2018-10-29 04:28:32 -04:00
/* harmony import */ var _reducer _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! ./reducer */ "./node_modules/@wordpress/data/build-module/store/reducer.js" ) ;
/* harmony import */ var _selectors _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! ./selectors */ "./node_modules/@wordpress/data/build-module/store/selectors.js" ) ;
/* harmony import */ var _actions _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! ./actions */ "./node_modules/@wordpress/data/build-module/store/actions.js" ) ;
2018-10-26 03:35:06 -04:00
/ * *
2018-10-29 04:28:32 -04:00
* Internal dependencies
2018-10-26 03:35:06 -04:00
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/* harmony default export */ _ _webpack _exports _ _ [ "default" ] = ( {
reducer : _reducer _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] ,
actions : _actions _ _WEBPACK _IMPORTED _MODULE _2 _ _ ,
selectors : _selectors _ _WEBPACK _IMPORTED _MODULE _1 _ _
2018-10-26 03:35:06 -04:00
} ) ;
2018-10-24 07:48:53 -04:00
2018-10-26 03:35:06 -04:00
/***/ } ) ,
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@wordpress/data/build-module/store/reducer.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ wordpress / data / build - module / store / reducer . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: default */
2018-10-26 03:35:06 -04:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-10-24 07:48:53 -04:00
2018-10-26 03:35:06 -04:00
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
2018-10-29 04:28:32 -04:00
/* harmony import */ var lodash _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! lodash */ "lodash" ) ;
/* harmony import */ var lodash _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( lodash _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
/* harmony import */ var equivalent _key _map _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! equivalent-key-map */ "./node_modules/equivalent-key-map/equivalent-key-map.js" ) ;
/* harmony import */ var equivalent _key _map _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( equivalent _key _map _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
/* harmony import */ var _utils _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! ./utils */ "./node_modules/@wordpress/data/build-module/store/utils.js" ) ;
/ * *
* External dependencies
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/ * *
* Internal dependencies
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/ * *
* Reducer function returning next state for selector resolution , object form :
*
* reducerKey - > selectorName - > EquivalentKeyMap < Array , boolean >
*
* @ param { Object } state Current state .
* @ param { Object } action Dispatched action .
*
* @ returns { Object } Next state .
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var isResolved = Object ( lodash _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "flowRight" ] ) ( [ Object ( _utils _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "onSubKey" ] ) ( 'reducerKey' ) , Object ( _utils _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "onSubKey" ] ) ( 'selectorName' ) ] ) ( function ( ) {
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : new equivalent _key _map _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default . a ( ) ;
var action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
switch ( action . type ) {
case 'START_RESOLUTION' :
case 'FINISH_RESOLUTION' :
var isStarting = action . type === 'START_RESOLUTION' ;
var nextState = new equivalent _key _map _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default . a ( state ) ;
nextState . set ( action . args , isStarting ) ;
return nextState ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return state ;
} ) ;
/* harmony default export */ _ _webpack _exports _ _ [ "default" ] = ( isResolved ) ;
2018-10-24 07:48:53 -04:00
2018-10-26 03:35:06 -04:00
/***/ } ) ,
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/@wordpress/data/build-module/store/selectors.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ wordpress / data / build - module / store / selectors . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: getIsResolving, hasStartedResolution, hasFinishedResolution, isResolving */
2018-10-26 03:35:06 -04:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-10-24 07:48:53 -04:00
2018-10-26 03:35:06 -04:00
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
2018-10-29 04:28:32 -04:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "getIsResolving" , function ( ) { return getIsResolving ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "hasStartedResolution" , function ( ) { return hasStartedResolution ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "hasFinishedResolution" , function ( ) { return hasFinishedResolution ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "isResolving" , function ( ) { return isResolving ; } ) ;
/* harmony import */ var lodash _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! lodash */ "lodash" ) ;
/* harmony import */ var lodash _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( lodash _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
2018-10-26 03:35:06 -04:00
/ * *
* External dependencies
* /
2018-10-24 07:48:53 -04:00
2018-10-26 03:35:06 -04:00
/ * *
2018-10-29 04:28:32 -04:00
* Returns the raw ` isResolving ` value for a given reducer key , selector name ,
* and arguments set . May be undefined if the selector has never been resolved
* or not resolved for the given set of arguments , otherwise true or false for
* resolution started and completed respectively .
*
* @ param { Object } state Data state .
* @ param { string } reducerKey Registered store reducer key .
* @ param { string } selectorName Selector name .
* @ param { Array } args Arguments passed to selector .
*
* @ return { ? boolean } isResolving value .
2018-10-26 03:35:06 -04:00
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function getIsResolving ( state , reducerKey , selectorName , args ) {
var map = Object ( lodash _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "get" ] ) ( state , [ reducerKey , selectorName ] ) ;
if ( ! map ) {
return ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return map . get ( args ) ;
}
2018-10-26 03:35:06 -04:00
/ * *
2018-10-29 04:28:32 -04:00
* Returns true if resolution has already been triggered for a given reducer
* key , selector name , and arguments set .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* @ param { Object } state Data state .
* @ param { string } reducerKey Registered store reducer key .
* @ param { string } selectorName Selector name .
* @ param { ? Array } args Arguments passed to selector ( default ` [] ` ) .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* @ return { boolean } Whether resolution has been triggered .
2018-10-26 03:35:06 -04:00
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function hasStartedResolution ( state , reducerKey , selectorName ) {
var args = arguments . length > 3 && arguments [ 3 ] !== undefined ? arguments [ 3 ] : [ ] ;
return getIsResolving ( state , reducerKey , selectorName , args ) !== undefined ;
}
2018-10-26 03:35:06 -04:00
/ * *
2018-10-29 04:28:32 -04:00
* Returns true if resolution has completed for a given reducer key , selector
* name , and arguments set .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* @ param { Object } state Data state .
* @ param { string } reducerKey Registered store reducer key .
* @ param { string } selectorName Selector name .
* @ param { ? Array } args Arguments passed to selector .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* @ return { boolean } Whether resolution has completed .
2018-10-26 03:35:06 -04:00
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function hasFinishedResolution ( state , reducerKey , selectorName ) {
var args = arguments . length > 3 && arguments [ 3 ] !== undefined ? arguments [ 3 ] : [ ] ;
return getIsResolving ( state , reducerKey , selectorName , args ) === false ;
}
2018-10-26 03:35:06 -04:00
/ * *
2018-10-29 04:28:32 -04:00
* Returns true if resolution has been triggered but has not yet completed for
* a given reducer key , selector name , and arguments set .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* @ param { Object } state Data state .
* @ param { string } reducerKey Registered store reducer key .
* @ param { string } selectorName Selector name .
* @ param { ? Array } args Arguments passed to selector .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* @ return { boolean } Whether resolution is in progress .
2018-10-26 03:35:06 -04:00
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function isResolving ( state , reducerKey , selectorName ) {
var args = arguments . length > 3 && arguments [ 3 ] !== undefined ? arguments [ 3 ] : [ ] ;
return getIsResolving ( state , reducerKey , selectorName , args ) === true ;
}
/***/ } ) ,
/***/ "./node_modules/@wordpress/data/build-module/store/utils.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ wordpress / data / build - module / store / utils . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: onSubKey */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "onSubKey" , function ( ) { return onSubKey ; } ) ;
/* harmony import */ var _babel _runtime _helpers _esm _defineProperty _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js" ) ;
/* harmony import */ var _babel _runtime _helpers _esm _objectSpread _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @babel/runtime/helpers/esm/objectSpread */ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js" ) ;
2018-10-26 03:35:06 -04:00
/ * *
2018-10-29 04:28:32 -04:00
* Higher - order reducer creator which creates a combined reducer object , keyed
* by a property on the action object .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* @ param { string } actionProperty Action property by which to key object .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* @ return { Function } Higher - order reducer .
2018-10-26 03:35:06 -04:00
* /
2018-10-29 04:28:32 -04:00
var onSubKey = function onSubKey ( actionProperty ) {
return function ( reducer ) {
return function ( ) {
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : { } ;
var action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
// Retrieve subkey from action. Do not track if undefined; useful for cases
// where reducer is scoped by action shape.
var key = action [ actionProperty ] ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( key === undefined ) {
return state ;
} // Avoid updating state if unchanged. Note that this also accounts for a
// reducer which returns undefined on a key which is not yet tracked.
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var nextKeyState = reducer ( state [ key ] , action ) ;
if ( nextKeyState === state [ key ] ) {
return state ;
2018-10-26 03:35:06 -04:00
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return Object ( _babel _runtime _helpers _esm _objectSpread _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] ) ( { } , state , Object ( _babel _runtime _helpers _esm _defineProperty _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] ) ( { } , key , nextKeyState ) ) ;
} ;
} ;
} ;
/***/ } ) ,
/***/ "./node_modules/equivalent-key-map/equivalent-key-map.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / equivalent - key - map / equivalent - key - map . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
"use strict" ;
function _typeof ( obj ) {
if ( typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ) {
_typeof = function ( obj ) {
return typeof obj ;
} ;
} else {
_typeof = function ( obj ) {
return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ;
} ;
2018-10-26 03:35:06 -04:00
}
2018-10-29 04:28:32 -04:00
return _typeof ( obj ) ;
}
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
function _classCallCheck ( instance , Constructor ) {
if ( ! ( instance instanceof Constructor ) ) {
throw new TypeError ( "Cannot call a class as a function" ) ;
2018-10-26 03:35:06 -04:00
}
2018-10-29 04:28:32 -04:00
}
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
function _defineProperties ( target , props ) {
for ( var i = 0 ; i < props . length ; i ++ ) {
var descriptor = props [ i ] ;
descriptor . enumerable = descriptor . enumerable || false ;
descriptor . configurable = true ;
if ( "value" in descriptor ) descriptor . writable = true ;
Object . defineProperty ( target , descriptor . key , descriptor ) ;
}
}
function _createClass ( Constructor , protoProps , staticProps ) {
if ( protoProps ) _defineProperties ( Constructor . prototype , protoProps ) ;
if ( staticProps ) _defineProperties ( Constructor , staticProps ) ;
return Constructor ;
2018-10-26 03:35:06 -04:00
}
2018-10-29 04:28:32 -04:00
2018-10-26 03:35:06 -04:00
/ * *
2018-10-29 04:28:32 -04:00
* Given an instance of EquivalentKeyMap , returns its internal value pair tuple
* for a key , if one exists . The tuple members consist of the last reference
* value for the key ( used in efficient subsequent lookups ) and the value
* assigned for the key at the leaf node .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* @ param { EquivalentKeyMap } instance EquivalentKeyMap instance .
* @ param { * } key The key for which to return value pair .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* @ return { ? Array } Value pair , if exists .
2018-10-26 03:35:06 -04:00
* /
2018-10-29 04:28:32 -04:00
function getValuePair ( instance , key ) {
var _map = instance . _map ,
_arrayTreeMap = instance . _arrayTreeMap ,
_objectTreeMap = instance . _objectTreeMap ; // Map keeps a reference to the last object-like key used to set the
// value, which can be used to shortcut immediately to the value.
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( _map . has ( key ) ) {
return _map . get ( key ) ;
} // Sort keys to ensure stable retrieval from tree.
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var properties = Object . keys ( key ) . sort ( ) ; // Tree by type to avoid conflicts on numeric object keys, empty value.
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var map = Array . isArray ( key ) ? _arrayTreeMap : _objectTreeMap ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
for ( var i = 0 ; i < properties . length ; i ++ ) {
var property = properties [ i ] ;
map = map . get ( property ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( map === undefined ) {
return ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var propertyValue = key [ property ] ;
map = map . get ( propertyValue ) ;
if ( map === undefined ) {
return ;
2018-10-26 03:35:06 -04:00
}
2018-10-29 04:28:32 -04:00
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var valuePair = map . get ( '_ekm_value' ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( ! valuePair ) {
return ;
} // If reached, it implies that an object-like key was set with another
// reference, so delete the reference and replace with the current.
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
_map . delete ( valuePair [ 0 ] ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
valuePair [ 0 ] = key ;
map . set ( '_ekm_value' , valuePair ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
_map . set ( key , valuePair ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return valuePair ;
}
/ * *
* Variant of a Map object which enables lookup by equivalent ( deeply equal )
* object and array keys .
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var EquivalentKeyMap =
/*#__PURE__*/
function ( ) {
/ * *
* Constructs a new instance of EquivalentKeyMap .
*
* @ param { Iterable . < * > } iterable Initial pair of key , value for map .
* /
function EquivalentKeyMap ( iterable ) {
_classCallCheck ( this , EquivalentKeyMap ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
this . clear ( ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( iterable instanceof EquivalentKeyMap ) {
// Map#forEach is only means of iterating with support for IE11.
var iterablePairs = [ ] ;
iterable . forEach ( function ( value , key ) {
iterablePairs . push ( [ key , value ] ) ;
} ) ;
iterable = iterablePairs ;
2018-10-24 07:48:53 -04:00
}
2018-10-29 04:28:32 -04:00
if ( iterable != null ) {
for ( var i = 0 ; i < iterable . length ; i ++ ) {
this . set ( iterable [ i ] [ 0 ] , iterable [ i ] [ 1 ] ) ;
}
2018-10-26 03:35:06 -04:00
}
2018-10-24 07:48:53 -04:00
}
2018-10-29 04:28:32 -04:00
/ * *
* Accessor property returning the number of elements .
*
* @ return { number } Number of elements .
* /
_createClass ( EquivalentKeyMap , [ {
key : "set" ,
/ * *
* Add or update an element with a specified key and value .
*
* @ param { * } key The key of the element to add .
* @ param { * } value The value of the element to add .
*
* @ return { EquivalentKeyMap } Map instance .
* /
value : function set ( key , value ) {
// Shortcut non-object-like to set on internal Map.
if ( key === null || _typeof ( key ) !== 'object' ) {
this . _map . set ( key , value ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return this ;
} // Sort keys to ensure stable assignment into tree.
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var properties = Object . keys ( key ) . sort ( ) ;
var valuePair = [ key , value ] ; // Tree by type to avoid conflicts on numeric object keys, empty value.
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var map = Array . isArray ( key ) ? this . _arrayTreeMap : this . _objectTreeMap ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
for ( var i = 0 ; i < properties . length ; i ++ ) {
var property = properties [ i ] ;
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
if ( ! map . has ( property ) ) {
map . set ( property , new EquivalentKeyMap ( ) ) ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
map = map . get ( property ) ;
var propertyValue = key [ property ] ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( ! map . has ( propertyValue ) ) {
map . set ( propertyValue , new EquivalentKeyMap ( ) ) ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
map = map . get ( propertyValue ) ;
} // If an _ekm_value exists, there was already an equivalent key. Before
// overriding, ensure that the old key reference is removed from map to
// avoid memory leak of accumulating equivalent keys. This is, in a
// sense, a poor man's WeakMap, while still enabling iterability.
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var previousValuePair = map . get ( '_ekm_value' ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( previousValuePair ) {
this . _map . delete ( previousValuePair [ 0 ] ) ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
map . set ( '_ekm_value' , valuePair ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
this . _map . set ( key , valuePair ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return this ;
}
/ * *
* Returns a specified element .
*
* @ param { * } key The key of the element to return .
*
* @ return { ? * } The element associated with the specified key or undefined
* if the key can ' t be found .
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
} , {
key : "get" ,
value : function get ( key ) {
// Shortcut non-object-like to get from internal Map.
if ( key === null || _typeof ( key ) !== 'object' ) {
return this . _map . get ( key ) ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var valuePair = getValuePair ( this , key ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( valuePair ) {
return valuePair [ 1 ] ;
}
}
/ * *
* Returns a boolean indicating whether an element with the specified key
* exists or not .
*
* @ param { * } key The key of the element to test for presence .
*
* @ return { boolean } Whether an element with the specified key exists .
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
} , {
key : "has" ,
value : function has ( key ) {
if ( key === null || _typeof ( key ) !== 'object' ) {
return this . _map . has ( key ) ;
} // Test on the _presence_ of the pair, not its value, as even undefined
// can be a valid member value for a key.
2018-10-24 07:48:53 -04:00
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
return getValuePair ( this , key ) !== undefined ;
}
/ * *
* Removes the specified element .
*
* @ param { * } key The key of the element to remove .
*
* @ return { boolean } Returns true if an element existed and has been
* removed , or false if the element does not exist .
* /
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
} , {
key : "delete" ,
value : function _delete ( key ) {
if ( ! this . has ( key ) ) {
return false ;
} // This naive implementation will leave orphaned child trees. A better
// implementation should traverse and remove orphans.
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
this . set ( key , undefined ) ;
return true ;
}
/ * *
* Executes a provided function once per each key / value pair , in insertion
* order .
*
* @ param { Function } callback Function to execute for each element .
* @ param { * } thisArg Value to use as ` this ` when executing
* ` callback ` .
* /
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
} , {
key : "forEach" ,
value : function forEach ( callback ) {
var _this = this ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var thisArg = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : this ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
this . _map . forEach ( function ( value , key ) {
// Unwrap value from object-like value pair.
if ( key !== null && _typeof ( key ) === 'object' ) {
value = value [ 1 ] ;
}
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
callback . call ( thisArg , value , key , _this ) ;
} ) ;
2018-10-24 07:48:53 -04:00
}
2018-10-29 04:28:32 -04:00
/ * *
* Removes all elements .
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
} , {
key : "clear" ,
value : function clear ( ) {
this . _map = new Map ( ) ;
this . _arrayTreeMap = new Map ( ) ;
this . _objectTreeMap = new Map ( ) ;
}
} , {
key : "size" ,
get : function get ( ) {
return this . _map . size ;
}
} ] ) ;
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
return EquivalentKeyMap ;
} ( ) ;
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
module . exports = EquivalentKeyMap ;
/***/ } ) ,
/***/ "./node_modules/is-promise/index.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / is - promise / index . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
module . exports = isPromise ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function isPromise ( obj ) {
return ! ! obj && ( typeof obj === 'object' || typeof obj === 'function' ) && typeof obj . then === 'function' ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/***/ } ) ,
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/redux/es/redux.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / redux / es / redux . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: createStore, combineReducers, bindActionCreators, applyMiddleware, compose, __DO_NOT_USE__ActionTypes */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "createStore" , function ( ) { return createStore ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "combineReducers" , function ( ) { return combineReducers ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "bindActionCreators" , function ( ) { return bindActionCreators ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "applyMiddleware" , function ( ) { return applyMiddleware ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "compose" , function ( ) { return compose ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "__DO_NOT_USE__ActionTypes" , function ( ) { return ActionTypes ; } ) ;
/* harmony import */ var symbol _observable _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! symbol-observable */ "./node_modules/redux/node_modules/symbol-observable/es/index.js" ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/ * *
* These are private action types reserved by Redux .
* For any unknown actions , you must return the current state .
* If the current state is undefined , you must return the initial state .
* Do not reference these action types directly in your code .
* /
var randomString = function randomString ( ) {
return Math . random ( ) . toString ( 36 ) . substring ( 7 ) . split ( '' ) . join ( '.' ) ;
} ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var ActionTypes = {
INIT : "@@redux/INIT" + randomString ( ) ,
REPLACE : "@@redux/REPLACE" + randomString ( ) ,
PROBE _UNKNOWN _ACTION : function PROBE _UNKNOWN _ACTION ( ) {
return "@@redux/PROBE_UNKNOWN_ACTION" + randomString ( ) ;
}
} ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/ * *
* @ param { any } obj The object to inspect .
* @ returns { boolean } True if the argument appears to be a plain object .
* /
function isPlainObject ( obj ) {
if ( typeof obj !== 'object' || obj === null ) return false ;
var proto = obj ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
while ( Object . getPrototypeOf ( proto ) !== null ) {
proto = Object . getPrototypeOf ( proto ) ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return Object . getPrototypeOf ( obj ) === proto ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/ * *
* Creates a Redux store that holds the state tree .
* The only way to change the data in the store is to call ` dispatch() ` on it .
*
* There should only be a single store in your app . To specify how different
* parts of the state tree respond to actions , you may combine several reducers
* into a single reducer function by using ` combineReducers ` .
*
* @ param { Function } reducer A function that returns the next state tree , given
* the current state tree and the action to handle .
*
* @ param { any } [ preloadedState ] The initial state . You may optionally specify it
* to hydrate the state from the server in universal apps , or to restore a
* previously serialized user session .
* If you use ` combineReducers ` to produce the root reducer function , this must be
* an object with the same shape as ` combineReducers ` keys .
*
* @ param { Function } [ enhancer ] The store enhancer . You may optionally specify it
* to enhance the store with third - party capabilities such as middleware ,
* time travel , persistence , etc . The only store enhancer that ships with Redux
* is ` applyMiddleware() ` .
*
* @ returns { Store } A Redux store that lets you read the state , dispatch actions
* and subscribe to changes .
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function createStore ( reducer , preloadedState , enhancer ) {
var _ref2 ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments [ 3 ] === 'function' ) {
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' ) ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( typeof preloadedState === 'function' && typeof enhancer === 'undefined' ) {
enhancer = preloadedState ;
preloadedState = undefined ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( typeof enhancer !== 'undefined' ) {
if ( typeof enhancer !== 'function' ) {
throw new Error ( 'Expected the enhancer to be a function.' ) ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return enhancer ( createStore ) ( reducer , preloadedState ) ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( typeof reducer !== 'function' ) {
throw new Error ( 'Expected the reducer to be a function.' ) ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var currentReducer = reducer ;
var currentState = preloadedState ;
var currentListeners = [ ] ;
var nextListeners = currentListeners ;
var isDispatching = false ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function ensureCanMutateNextListeners ( ) {
if ( nextListeners === currentListeners ) {
nextListeners = currentListeners . slice ( ) ;
}
}
/ * *
* Reads the state tree managed by the store .
*
* @ returns { any } The current state tree of your application .
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function getState ( ) {
if ( isDispatching ) {
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.' ) ;
}
return currentState ;
2018-10-24 07:48:53 -04:00
}
2018-10-26 03:35:06 -04:00
/ * *
2018-10-29 04:28:32 -04:00
* Adds a change listener . It will be called any time an action is dispatched ,
* and some part of the state tree may potentially have changed . You may then
* call ` getState() ` to read the current state tree inside the callback .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* You may call ` dispatch() ` from a change listener , with the following
* caveats :
*
* 1. The subscriptions are snapshotted just before every ` dispatch() ` call .
* If you subscribe or unsubscribe while the listeners are being invoked , this
* will not have any effect on the ` dispatch() ` that is currently in progress .
* However , the next ` dispatch() ` call , whether nested or not , will use a more
* recent snapshot of the subscription list .
*
* 2. The listener should not expect to see all state changes , as the state
* might have been updated multiple times during a nested ` dispatch() ` before
* the listener is called . It is , however , guaranteed that all subscribers
* registered before the ` dispatch() ` started will be called with the latest
* state by the time it exits .
*
* @ param { Function } listener A callback to be invoked on every dispatch .
* @ returns { Function } A function to remove this change listener .
2018-10-26 03:35:06 -04:00
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function subscribe ( listener ) {
if ( typeof listener !== 'function' ) {
throw new Error ( 'Expected the listener to be a function.' ) ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( isDispatching ) {
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#subscribe(listener) for more details.' ) ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var isSubscribed = true ;
ensureCanMutateNextListeners ( ) ;
nextListeners . push ( listener ) ;
return function unsubscribe ( ) {
if ( ! isSubscribed ) {
return ;
}
if ( isDispatching ) {
throw new Error ( 'You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.' ) ;
}
isSubscribed = false ;
ensureCanMutateNextListeners ( ) ;
var index = nextListeners . indexOf ( listener ) ;
nextListeners . splice ( index , 1 ) ;
} ;
2018-10-24 07:48:53 -04:00
}
2018-10-26 03:35:06 -04:00
/ * *
2018-10-29 04:28:32 -04:00
* Dispatches an action . It is the only way to trigger a state change .
*
* The ` reducer ` function , used to create the store , will be called with the
* current state tree and the given ` action ` . Its return value will
* be considered the * * next * * state of the tree , and the change listeners
* will be notified .
*
* The base implementation only supports plain object actions . If you want to
* dispatch a Promise , an Observable , a thunk , or something else , you need to
* wrap your store creating function into the corresponding middleware . For
* example , see the documentation for the ` redux-thunk ` package . Even the
* middleware will eventually dispatch plain object actions using this method .
*
* @ param { Object } action A plain object representing “ what changed ” . It is
* a good idea to keep actions serializable so you can record and replay user
* sessions , or use the time travelling ` redux-devtools ` . An action must have
* a ` type ` property which may not be ` undefined ` . It is a good idea to use
* string constants for action types .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* @ returns { Object } For convenience , the same action object you dispatched .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* Note that , if you use a custom middleware , it may wrap ` dispatch() ` to
* return something else ( for example , a Promise you can await ) .
2018-10-26 03:35:06 -04:00
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function dispatch ( action ) {
if ( ! isPlainObject ( action ) ) {
throw new Error ( 'Actions must be plain objects. ' + 'Use custom middleware for async actions.' ) ;
2018-10-24 07:48:53 -04:00
}
2018-10-29 04:28:32 -04:00
if ( typeof action . type === 'undefined' ) {
throw new Error ( 'Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?' ) ;
2018-10-24 07:48:53 -04:00
}
2018-10-29 04:28:32 -04:00
if ( isDispatching ) {
throw new Error ( 'Reducers may not dispatch actions.' ) ;
2018-10-26 03:35:06 -04:00
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
try {
isDispatching = true ;
currentState = currentReducer ( currentState , action ) ;
} finally {
isDispatching = false ;
2018-10-26 03:35:06 -04:00
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var listeners = currentListeners = nextListeners ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
for ( var i = 0 ; i < listeners . length ; i ++ ) {
var listener = listeners [ i ] ;
listener ( ) ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return action ;
}
2018-10-26 03:35:06 -04:00
/ * *
2018-10-29 04:28:32 -04:00
* Replaces the reducer currently used by the store to calculate the state .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* You might need this if your app implements code splitting and you want to
* load some of the reducers dynamically . You might also need this if you
* implement a hot reloading mechanism for Redux .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* @ param { Function } nextReducer The reducer for the store to use instead .
* @ returns { void }
2018-10-26 03:35:06 -04:00
* /
2018-10-24 07:48:53 -04:00
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
function replaceReducer ( nextReducer ) {
if ( typeof nextReducer !== 'function' ) {
throw new Error ( 'Expected the nextReducer to be a function.' ) ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
currentReducer = nextReducer ;
dispatch ( {
type : ActionTypes . REPLACE
} ) ;
2018-10-24 07:48:53 -04:00
}
2018-10-26 03:35:06 -04:00
/ * *
2018-10-29 04:28:32 -04:00
* Interoperability point for observable / reactive libraries .
* @ returns { observable } A minimal observable of state changes .
* For more information , see the observable proposal :
* https : //github.com/tc39/proposal-observable
2018-10-26 03:35:06 -04:00
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function observable ( ) {
var _ref ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var outerSubscribe = subscribe ;
return _ref = {
/ * *
* The minimal observable subscription method .
* @ param { Object } observer Any object that can be used as an observer .
* The observer object should have a ` next ` method .
* @ returns { subscription } An object with an ` unsubscribe ` method that can
* be used to unsubscribe the observable from the store , and prevent further
* emission of values from the observable .
* /
subscribe : function subscribe ( observer ) {
if ( typeof observer !== 'object' || observer === null ) {
throw new TypeError ( 'Expected the observer to be an object.' ) ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function observeState ( ) {
if ( observer . next ) {
observer . next ( getState ( ) ) ;
}
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
observeState ( ) ;
var unsubscribe = outerSubscribe ( observeState ) ;
return {
unsubscribe : unsubscribe
} ;
}
} , _ref [ symbol _observable _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] ] = function ( ) {
return this ;
} , _ref ;
} // When a store is created, an "INIT" action is dispatched so that every
// reducer returns their initial state. This effectively populates
// the initial state tree.
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
dispatch ( {
type : ActionTypes . INIT
} ) ;
return _ref2 = {
dispatch : dispatch ,
subscribe : subscribe ,
getState : getState ,
replaceReducer : replaceReducer
} , _ref2 [ symbol _observable _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] ] = observable , _ref2 ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
/ * *
* Prints a warning in the console if it exists .
*
* @ param { String } message The warning message .
* @ returns { void }
* /
function warning ( message ) {
/* eslint-disable no-console */
if ( typeof console !== 'undefined' && typeof console . error === 'function' ) {
console . error ( message ) ;
2018-10-24 07:48:53 -04:00
}
2018-10-29 04:28:32 -04:00
/* eslint-enable no-console */
2018-10-24 07:48:53 -04:00
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
try {
// This error was thrown as a convenience so that if you enable
// "break on all exceptions" in your console,
// it would pause the execution at this line.
throw new Error ( message ) ;
} catch ( e ) { } // eslint-disable-line no-empty
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function getUndefinedStateErrorMessage ( key , action ) {
var actionType = action && action . type ;
var actionDescription = actionType && "action \"" + String ( actionType ) + "\"" || 'an action' ;
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." ;
}
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
function getUnexpectedStateShapeWarningMessage ( inputState , reducers , action , unexpectedKeyCache ) {
var reducerKeys = Object . keys ( reducers ) ;
var argumentName = action && action . type === ActionTypes . INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer' ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( reducerKeys . length === 0 ) {
return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.' ;
}
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
if ( ! isPlainObject ( inputState ) ) {
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 ( '", "' ) + "\"" ) ;
}
var unexpectedKeys = Object . keys ( inputState ) . filter ( function ( key ) {
return ! reducers . hasOwnProperty ( key ) && ! unexpectedKeyCache [ key ] ;
2018-10-24 07:48:53 -04:00
} ) ;
2018-10-29 04:28:32 -04:00
unexpectedKeys . forEach ( function ( key ) {
unexpectedKeyCache [ key ] = true ;
} ) ;
if ( action && action . type === ActionTypes . REPLACE ) return ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( unexpectedKeys . length > 0 ) {
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." ) ;
}
}
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
function assertReducerShape ( reducers ) {
Object . keys ( reducers ) . forEach ( function ( key ) {
var reducer = reducers [ key ] ;
var initialState = reducer ( undefined , {
type : ActionTypes . INIT
} ) ;
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
if ( typeof initialState === 'undefined' ) {
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." ) ;
}
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
if ( typeof reducer ( undefined , {
type : ActionTypes . PROBE _UNKNOWN _ACTION ( )
} ) === 'undefined' ) {
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." ) ;
}
} ) ;
2018-10-26 03:35:06 -04:00
}
/ * *
2018-10-29 04:28:32 -04:00
* Turns an object whose values are different reducer functions , into a single
* reducer function . It will call every child reducer , and gather their results
* into a single state object , whose keys correspond to the keys of the passed
* reducer functions .
2018-10-24 07:48:53 -04:00
*
2018-10-29 04:28:32 -04:00
* @ param { Object } reducers An object whose values correspond to different
* reducer functions that need to be combined into one . One handy way to obtain
* it is to use ES6 ` import * as reducers ` syntax . The reducers may never return
* undefined for any action . Instead , they should return their initial state
* if the state passed to them was undefined , and the current state for any
* unrecognized action .
2018-10-24 07:48:53 -04:00
*
2018-10-29 04:28:32 -04:00
* @ returns { Function } A reducer function that invokes every reducer inside the
* passed object , and builds a state object with the same shape .
2018-10-24 07:48:53 -04:00
* /
2018-10-29 04:28:32 -04:00
function combineReducers ( reducers ) {
var reducerKeys = Object . keys ( reducers ) ;
var finalReducers = { } ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
for ( var i = 0 ; i < reducerKeys . length ; i ++ ) {
var key = reducerKeys [ i ] ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( true ) {
if ( typeof reducers [ key ] === 'undefined' ) {
warning ( "No reducer provided for key \"" + key + "\"" ) ;
}
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( typeof reducers [ key ] === 'function' ) {
finalReducers [ key ] = reducers [ key ] ;
}
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var finalReducerKeys = Object . keys ( finalReducers ) ;
var unexpectedKeyCache ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( true ) {
unexpectedKeyCache = { } ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var shapeAssertionError ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
try {
assertReducerShape ( finalReducers ) ;
} catch ( e ) {
shapeAssertionError = e ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return function combination ( state , action ) {
if ( state === void 0 ) {
state = { } ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( shapeAssertionError ) {
throw shapeAssertionError ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( true ) {
var warningMessage = getUnexpectedStateShapeWarningMessage ( state , finalReducers , action , unexpectedKeyCache ) ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( warningMessage ) {
warning ( warningMessage ) ;
}
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var hasChanged = false ;
var nextState = { } ;
for ( var _i = 0 ; _i < finalReducerKeys . length ; _i ++ ) {
var _key = finalReducerKeys [ _i ] ;
var reducer = finalReducers [ _key ] ;
var previousStateForKey = state [ _key ] ;
var nextStateForKey = reducer ( previousStateForKey , action ) ;
if ( typeof nextStateForKey === 'undefined' ) {
var errorMessage = getUndefinedStateErrorMessage ( _key , action ) ;
throw new Error ( errorMessage ) ;
}
nextState [ _key ] = nextStateForKey ;
hasChanged = hasChanged || nextStateForKey !== previousStateForKey ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return hasChanged ? nextState : state ;
} ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function bindActionCreator ( actionCreator , dispatch ) {
return function ( ) {
return dispatch ( actionCreator . apply ( this , arguments ) ) ;
} ;
}
2018-10-26 03:35:06 -04:00
/ * *
2018-10-29 04:28:32 -04:00
* Turns an object whose values are action creators , into an object with the
* same keys , but with every function wrapped into a ` dispatch ` call so they
* may be invoked directly . This is just a convenience method , as you can call
* ` store.dispatch(MyActionCreators.doSomething()) ` yourself just fine .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* For convenience , you can also pass a single function as the first argument ,
* and get a function in return .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* @ param { Function | Object } actionCreators An object whose values are action
* creator functions . One handy way to obtain it is to use ES6 ` import * as `
* syntax . You may also pass a single function .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* @ param { Function } dispatch The ` dispatch ` function available on your Redux
* store .
*
* @ returns { Function | Object } The object mimicking the original object , but with
* every action creator wrapped into the ` dispatch ` call . If you passed a
* function as ` actionCreators ` , the return value will also be a single
* function .
2018-10-26 03:35:06 -04:00
* /
2018-10-29 04:28:32 -04:00
function bindActionCreators ( actionCreators , dispatch ) {
if ( typeof actionCreators === 'function' ) {
return bindActionCreator ( actionCreators , dispatch ) ;
2018-10-26 03:35:06 -04:00
}
2018-10-29 04:28:32 -04:00
if ( typeof actionCreators !== 'object' || actionCreators === null ) {
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\"?" ) ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
var keys = Object . keys ( actionCreators ) ;
var boundActionCreators = { } ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
for ( var i = 0 ; i < keys . length ; i ++ ) {
var key = keys [ i ] ;
var actionCreator = actionCreators [ key ] ;
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( typeof actionCreator === 'function' ) {
boundActionCreators [ key ] = bindActionCreator ( actionCreator , dispatch ) ;
}
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return boundActionCreators ;
}
function _defineProperty ( obj , key , value ) {
if ( key in obj ) {
Object . defineProperty ( obj , key , {
value : value ,
enumerable : true ,
configurable : true ,
writable : true
} ) ;
} else {
obj [ key ] = value ;
}
return obj ;
}
function _objectSpread ( target ) {
for ( var i = 1 ; i < arguments . length ; i ++ ) {
var source = arguments [ i ] != null ? arguments [ i ] : { } ;
var ownKeys = Object . keys ( source ) ;
if ( typeof Object . getOwnPropertySymbols === 'function' ) {
ownKeys = ownKeys . concat ( Object . getOwnPropertySymbols ( source ) . filter ( function ( sym ) {
return Object . getOwnPropertyDescriptor ( source , sym ) . enumerable ;
} ) ) ;
}
ownKeys . forEach ( function ( key ) {
_defineProperty ( target , key , source [ key ] ) ;
} ) ;
}
return target ;
}
2018-10-24 07:48:53 -04:00
2018-10-26 03:35:06 -04:00
/ * *
2018-10-29 04:28:32 -04:00
* Composes single - argument functions from right to left . The rightmost
* function can take multiple arguments as it provides the signature for
* the resulting composite function .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* @ param { ... Function } funcs The functions to compose .
* @ returns { Function } A function obtained by composing the argument functions
* from right to left . For example , compose ( f , g , h ) is identical to doing
* ( ... args ) => f ( g ( h ( ... args ) ) ) .
2018-10-26 03:35:06 -04:00
* /
2018-10-29 04:28:32 -04:00
function compose ( ) {
for ( var _len = arguments . length , funcs = new Array ( _len ) , _key = 0 ; _key < _len ; _key ++ ) {
funcs [ _key ] = arguments [ _key ] ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( funcs . length === 0 ) {
return function ( arg ) {
return arg ;
} ;
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
if ( funcs . length === 1 ) {
return funcs [ 0 ] ;
2018-10-26 03:35:06 -04:00
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
return funcs . reduce ( function ( a , b ) {
return function ( ) {
return a ( b . apply ( void 0 , arguments ) ) ;
} ;
} ) ;
2018-10-26 03:35:06 -04:00
}
2018-10-29 04:28:32 -04:00
2018-10-26 03:35:06 -04:00
/ * *
2018-10-29 04:28:32 -04:00
* Creates a store enhancer that applies middleware to the dispatch method
* of the Redux store . This is handy for a variety of tasks , such as expressing
* asynchronous actions in a concise manner , or logging every action payload .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* See ` redux-thunk ` package as an example of the Redux middleware .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* Because middleware is potentially asynchronous , this should be the first
* store enhancer in the composition chain .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* Note that each middleware will be given the ` dispatch ` and ` getState ` functions
* as named arguments .
2018-10-26 03:35:06 -04:00
*
2018-10-29 04:28:32 -04:00
* @ param { ... Function } middlewares The middleware chain to be applied .
* @ returns { Function } A store enhancer applying the middleware .
2018-10-26 03:35:06 -04:00
* /
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
function applyMiddleware ( ) {
for ( var _len = arguments . length , middlewares = new Array ( _len ) , _key = 0 ; _key < _len ; _key ++ ) {
middlewares [ _key ] = arguments [ _key ] ;
}
return function ( createStore ) {
return function ( ) {
var store = createStore . apply ( void 0 , arguments ) ;
var _dispatch = function dispatch ( ) {
throw new Error ( "Dispatching while constructing your middleware is not allowed. " + "Other middleware would not be applied to this dispatch." ) ;
} ;
var middlewareAPI = {
getState : store . getState ,
dispatch : function dispatch ( ) {
return _dispatch . apply ( void 0 , arguments ) ;
}
} ;
var chain = middlewares . map ( function ( middleware ) {
return middleware ( middlewareAPI ) ;
} ) ;
_dispatch = compose . apply ( void 0 , chain ) ( store . dispatch ) ;
return _objectSpread ( { } , store , {
dispatch : _dispatch
} ) ;
} ;
} ;
2018-10-26 03:35:06 -04:00
}
2018-10-29 04:28:32 -04:00
/ *
* This is a dummy function to check if the function name has been altered by minification .
* If the function has been minified and NODE _ENV !== 'production' , warn the user .
2018-10-26 03:35:06 -04:00
* /
2018-10-29 04:28:32 -04:00
function isCrushed ( ) { }
if ( "development" !== 'production' && typeof isCrushed . name === 'string' && isCrushed . name !== 'isCrushed' ) {
warning ( 'You are currently using minified code outside of NODE_ENV === "production". ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) ' + 'to ensure you have the correct code for your production build.' ) ;
2018-10-26 03:35:06 -04:00
}
2018-10-24 07:48:53 -04:00
2018-10-29 04:28:32 -04:00
2018-10-24 07:48:53 -04:00
/***/ } ) ,
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/redux/node_modules/symbol-observable/es/index.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / redux / node _modules / symbol - observable / es / index . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: default */
2018-10-26 03:35:06 -04:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-10-24 07:48:53 -04:00
2018-10-26 03:35:06 -04:00
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
2018-10-29 04:28:32 -04:00
/* WEBPACK VAR INJECTION */ ( function ( global , module ) { /* harmony import */ var _ponyfill _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! ./ponyfill.js */ "./node_modules/redux/node_modules/symbol-observable/es/ponyfill.js" ) ;
/* global window */
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
var root ;
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
if ( typeof self !== 'undefined' ) {
root = self ;
} else if ( typeof window !== 'undefined' ) {
root = window ;
} else if ( typeof global !== 'undefined' ) {
root = global ;
} else if ( true ) {
root = module ;
} else { }
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
var result = Object ( _ponyfill _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] ) ( root ) ;
/* harmony default export */ _ _webpack _exports _ _ [ "default" ] = ( result ) ;
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
/* WEBPACK VAR INJECTION */ } . call ( this , _ _webpack _require _ _ ( /*! ./../../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js" ) , _ _webpack _require _ _ ( /*! ./../../../../webpack/buildin/harmony-module.js */ "./node_modules/webpack/buildin/harmony-module.js" ) ( module ) ) )
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
/***/ } ) ,
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
/***/ "./node_modules/redux/node_modules/symbol-observable/es/ponyfill.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / redux / node _modules / symbol - observable / es / ponyfill . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: default */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "default" , function ( ) { return symbolObservablePonyfill ; } ) ;
function symbolObservablePonyfill ( root ) {
var result ;
var Symbol = root . Symbol ;
2018-10-26 03:35:06 -04:00
2018-10-29 04:28:32 -04:00
if ( typeof Symbol === 'function' ) {
if ( Symbol . observable ) {
result = Symbol . observable ;
} else {
result = Symbol ( 'observable' ) ;
Symbol . observable = result ;
}
} else {
result = '@@observable' ;
}
return result ;
} ;
/***/ } ) ,
/***/ "./node_modules/webpack/buildin/global.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * ( webpack ) / buildin / global . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
var g ;
// This works in non-strict mode
g = ( function ( ) {
return this ;
} ) ( ) ;
try {
// This works if eval is allowed (see CSP)
g = g || Function ( "return this" ) ( ) || ( 1 , eval ) ( "this" ) ;
} catch ( e ) {
// This works if the window reference is available
if ( typeof window === "object" ) g = window ;
}
// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}
module . exports = g ;
/***/ } ) ,
/***/ "./node_modules/webpack/buildin/harmony-module.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * ( webpack ) / buildin / harmony - module . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
module . exports = function ( originalModule ) {
if ( ! originalModule . webpackPolyfill ) {
var module = Object . create ( originalModule ) ;
// module.parent = undefined by default
if ( ! module . children ) module . children = [ ] ;
Object . defineProperty ( module , "loaded" , {
enumerable : true ,
get : function ( ) {
return module . l ;
}
} ) ;
Object . defineProperty ( module , "id" , {
enumerable : true ,
get : function ( ) {
return module . i ;
}
} ) ;
Object . defineProperty ( module , "exports" , {
enumerable : true
} ) ;
module . webpackPolyfill = 1 ;
}
return module ;
2018-10-24 07:48:53 -04:00
} ;
/***/ } ) ,
/***/ "@wordpress/compose" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * external { "this" : [ "wp" , "compose" ] } * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = this [ "wp" ] [ "compose" ] ; } ( ) ) ;
/***/ } ) ,
/***/ "@wordpress/deprecated" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * external { "this" : [ "wp" , "deprecated" ] } * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = this [ "wp" ] [ "deprecated" ] ; } ( ) ) ;
/***/ } ) ,
/***/ "@wordpress/element" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * external { "this" : [ "wp" , "element" ] } * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = this [ "wp" ] [ "element" ] ; } ( ) ) ;
/***/ } ) ,
/***/ "@wordpress/is-shallow-equal" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * external { "this" : [ "wp" , "isShallowEqual" ] } * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = this [ "wp" ] [ "isShallowEqual" ] ; } ( ) ) ;
/***/ } ) ,
/***/ "@wordpress/redux-routine" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * external { "this" : [ "wp" , "reduxRoutine" ] } * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = this [ "wp" ] [ "reduxRoutine" ] ; } ( ) ) ;
/***/ } ) ,
/***/ "lodash" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * external "lodash" * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = this [ "lodash" ] ; } ( ) ) ;
/***/ } )
/******/ } ) ;
//# sourceMappingURL=data.js.map