: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
entitiesDataReducer = (0,external_wp_data_namespaceObject.combineReducers)(Object.entries(entitiesByKind).reduce((memo, [kind, subEntities]) => {
const kindReducer = (0,external_wp_data_namespaceObject.combineReducers)(subEntities.reduce((kindMemo, entityConfig) => ({
[entityConfig.name]: entity(entityConfig)
memo[kind] = kindReducer;
const newData = entitiesDataReducer(state.records, action);
if (newData === state.records && newConfig === state.config && entitiesDataReducer === state.reducer) {
reducer: entitiesDataReducer,
function undoManager(state = (0,build_module.createUndoManager)()) {
function editsReference(state = {}, action) {
case 'EDIT_ENTITY_RECORD':
* Reducer managing embed preview data.
* @param {Object} state Current state.
* @param {Object} action Dispatched action.
* @return {Object} Updated state.
function embedPreviews(state = {}, action) {
case 'RECEIVE_EMBED_PREVIEW':
* State which tracks whether the user can perform an action on a REST
* @param {Object} state Current state.
* @param {Object} action Dispatched action.
* @return {Object} Updated state.
function userPermissions(state = {}, action) {
case 'RECEIVE_USER_PERMISSION':
[action.key]: action.isAllowed
* Reducer returning autosaves keyed by their parent's post id.
* @param {Object} state Current state.
* @param {Object} action Dispatched action.
* @return {Object} Updated state.
function autosaves(state = {}, action) {
case 'RECEIVE_AUTOSAVES':
function blockPatterns(state = [], action) {
case 'RECEIVE_BLOCK_PATTERNS':
function blockPatternCategories(state = [], action) {
case 'RECEIVE_BLOCK_PATTERN_CATEGORIES':
return action.categories;
function userPatternCategories(state = [], action) {
case 'RECEIVE_USER_PATTERN_CATEGORIES':
return action.patternCategories;
function navigationFallbackId(state = null, action) {
case 'RECEIVE_NAVIGATION_FALLBACK_ID':
return action.fallbackId;
* Reducer managing the theme global styles revisions.
* @param {Record<string, object>} state Current state.
* @param {Object} action Dispatched action.
* @return {Record<string, object>} Updated state.
function themeGlobalStyleRevisions(state = {}, action) {
case 'RECEIVE_THEME_GLOBAL_STYLE_REVISIONS':
[action.currentId]: action.revisions
* Reducer managing the template lookup per query.
* @param {Record<string, string>} state Current state.
* @param {Object} action Dispatched action.
* @return {Record<string, string>} Updated state.
function defaultTemplates(state = {}, action) {
case 'RECEIVE_DEFAULT_TEMPLATE':
[JSON.stringify(action.query)]: action.templateId
/* harmony default export */ const build_module_reducer = ((0,external_wp_data_namespaceObject.combineReducers)({
themeGlobalStyleVariations,
themeGlobalStyleRevisions,
// EXTERNAL MODULE: ./node_modules/equivalent-key-map/equivalent-key-map.js
var equivalent_key_map = __webpack_require__(3249);
var equivalent_key_map_default = /*#__PURE__*/__webpack_require__.n(equivalent_key_map);
;// CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/queried-data/selectors.js
* Cache of state keys to EquivalentKeyMap where the inner map tracks queries
* to their resulting items set. WeakMap allows garbage collection on expired
* @type {WeakMap<Object,EquivalentKeyMap>}
const queriedItemsCacheByState = new WeakMap();
* Returns items for a given query, or null if the items are not known.
* @param {Object} state State object.
* @param {?Object} query Optional query.
* @return {?Array} Query items.
function getQueriedItemsUncached(state, query) {
} = get_query_parts(query);
if (state.queries?.[context]?.[stableKey]) {
itemIds = state.queries[context][stableKey].itemIds;
const startOffset = perPage === -1 ? 0 : (page - 1) * perPage;
const endOffset = perPage === -1 ? itemIds.length : Math.min(startOffset + perPage, itemIds.length);
for (let i = startOffset; i < endOffset; i++) {
const itemId = itemIds[i];
if (Array.isArray(include) && !include.includes(itemId)) {
if (itemId === undefined) {
// Having a target item ID doesn't guarantee that this object has been queried.
if (!state.items[context]?.hasOwnProperty(itemId)) {
const item = state.items[context][itemId];
if (Array.isArray(fields)) {
for (let f = 0; f < fields.length; f++) {
const field = fields[f].split('.');
field.forEach(fieldName => {
value = value?.[fieldName];
setNestedValue(filteredItem, field, value);
// If expecting a complete item, validate that completeness, or
if (!state.itemIsComplete[context]?.[itemId]) {
items.push(filteredItem);
* Returns items for a given query, or null if the items are not known. Caches
* result both per state (by reference) and per query (by deep equality).
* The caching approach is intended to be durable to query objects which are
* deeply but not referentially equal, since otherwise:
* `getQueriedItems( state, {} ) !== getQueriedItems( state, {} )`
* @param {Object} state State object.
* @param {?Object} query Optional query.
* @return {?Array} Query items.
const getQueriedItems = (0,external_wp_data_namespaceObject.createSelector)((state, query = {}) => {
let queriedItemsCache = queriedItemsCacheByState.get(state);
const queriedItems = queriedItemsCache.get(query);
if (queriedItems !== undefined) {
queriedItemsCache = new (equivalent_key_map_default())();
queriedItemsCacheByState.set(state, queriedItemsCache);
const items = getQueriedItemsUncached(state, query);
queriedItemsCache.set(query, items);
function getQueriedTotalItems(state, query = {}) {
var _state$queries$contex;
} = get_query_parts(query);
return (_state$queries$contex = state.queries?.[context]?.[stableKey]?.meta?.totalItems) !== null && _state$queries$contex !== void 0 ? _state$queries$contex : null;
function getQueriedTotalPages(state, query = {}) {
var _state$queries$contex2;
} = get_query_parts(query);
return (_state$queries$contex2 = state.queries?.[context]?.[stableKey]?.meta?.totalPages) !== null && _state$queries$contex2 !== void 0 ? _state$queries$contex2 : null;
;// CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/utils/is-numeric-id.js
* Checks argument to determine if it's a numeric ID.
* For example, '123' is a numeric ID, but '123abc' is not.
* @param {any} id the argument to determine if it's a numeric ID.
* @return {boolean} true if the string is a numeric ID, false otherwise.
function isNumericID(id) {
return /^\s*\d+\s*$/.test(id);
;// CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/utils/is-raw-attribute.js
* Checks whether the attribute is a "raw" attribute or not.
* @param {Object} entity Entity record.
* @param {string} attribute Attribute name.
* @return {boolean} Is the attribute raw
function isRawAttribute(entity, attribute) {
return (entity.rawAttributes || []).includes(attribute);
;// CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/selectors.js
// This is an incomplete, high-level approximation of the State type.
// It makes the selectors slightly more safe, but is intended to evolve
// into a more detailed representation over time.
// See https://github.com/WordPress/gutenberg/pull/40025#discussion_r865410589 for more context.
* HTTP Query parameters sent with the API request to fetch the entity records.
* Arguments for EntityRecord selectors.
* Shared reference to an empty object for cases where it is important to avoid
* returning a new object reference on every invocation, as in a connected or
* other pure component which performs `shouldComponentUpdate` check on props.
* This should be used as a last resort, since the normalized data should be
* maintained by the reducer result in state.
* Returns true if a request is in progress for embed preview data, or false
* @param state Data state.
* @param url URL the preview would be for.
* @return Whether a request is in progress for an embed preview.
const isRequestingEmbedPreview = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, url) => {
return select(STORE_NAME).isResolving('getEmbedPreview', [url]);
* Returns all available authors.
* @deprecated since 11.3. Callers should use `select( 'core' ).getUsers({ who: 'authors' })` instead.
* @param state Data state.
* @param query Optional object of query parameters to
* include with request. For valid query parameters see the [Users page](https://developer.wordpress.org/rest-api/reference/users/) in the REST API Handbook and see the arguments for [List Users](https://developer.wordpress.org/rest-api/reference/users/#list-users) and [Retrieve a User](https://developer.wordpress.org/rest-api/reference/users/#retrieve-a-user).
function getAuthors(state, query) {
external_wp_deprecated_default()("select( 'core' ).getAuthors()", {
alternative: "select( 'core' ).getUsers({ who: 'authors' })"
const path = (0,external_wp_url_namespaceObject.addQueryArgs)('/wp/v2/users/?who=authors&per_page=100', query);
return getUserQueryResults(state, path);
* Returns the current user.
* @param state Data state.
* @return Current user object.
function getCurrentUser(state) {
return state.currentUser;
* Returns all the users returned by a query ID.
* @param state Data state.
* @param queryID Query ID.
const getUserQueryResults = (0,external_wp_data_namespaceObject.createSelector)((state, queryID) => {
var _state$users$queries$;
const queryResults = (_state$users$queries$ = state.users.queries[queryID]) !== null && _state$users$queries$ !== void 0 ? _state$users$queries$ : [];
return queryResults.map(id => state.users.byId[id]);
}, (state, queryID) => [state.users.queries[queryID], state.users.byId]);
* Returns the loaded entities for the given kind.
* @deprecated since WordPress 6.0. Use getEntitiesConfig instead
* @param state Data state.
* @param kind Entity kind.
* @return Array of entities with config matching kind.
function getEntitiesByKind(state, kind) {
external_wp_deprecated_default()("wp.data.select( 'core' ).getEntitiesByKind()", {
alternative: "wp.data.select( 'core' ).getEntitiesConfig()"
return getEntitiesConfig(state, kind);
* Returns the loaded entities for the given kind.
* @param state Data state.
* @param kind Entity kind.
* @return Array of entities with config matching kind.
const getEntitiesConfig = (0,external_wp_data_namespaceObject.createSelector)((state, kind) => state.entities.config.filter(entity => entity.kind === kind), (state, kind) => state.entities.config);
* Returns the entity config given its kind and name.
* @deprecated since WordPress 6.0. Use getEntityConfig instead
* @param state Data state.
* @param kind Entity kind.
* @param name Entity name.
function getEntity(state, kind, name) {
external_wp_deprecated_default()("wp.data.select( 'core' ).getEntity()", {
alternative: "wp.data.select( 'core' ).getEntityConfig()"
return getEntityConfig(state, kind, name);
* Returns the entity config given its kind and name.
* @param state Data state.