: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
styles: "margin:11px 0;padding:1px"
const MenuTitleActionsUI = /*#__PURE__*/emotion_styled_base_browser_esm("span", true ? {
} : 0)("height:", space(6), ";.components-button.is-small{color:inherit;opacity:0.7;margin-right:", space(1), ";padding:0;&:active:not( :disabled ){background:none;opacity:1;color:inherit;}&:hover:not( :disabled ){box-shadow:none;opacity:1;color:inherit;}}" + ( true ? "" : 0));
const GroupTitleUI = /*#__PURE__*/emotion_styled_base_browser_esm(heading_component, true ? {
} : 0)("min-height:", space(12), ";align-items:center;color:inherit;display:flex;justify-content:space-between;margin-bottom:", space(2), ";padding:", () => (0,external_wp_i18n_namespaceObject.isRTL)() ? `${space(1)} ${space(4)} ${space(1)} ${space(2)}` : `${space(1)} ${space(2)} ${space(1)} ${space(4)}`, ";" + ( true ? "" : 0));
const ItemBaseUI = /*#__PURE__*/emotion_styled_base_browser_esm("li", true ? {
} : 0)("border-radius:2px;color:inherit;margin-bottom:0;>button,>a.components-button,>a{width:100%;color:inherit;opacity:0.7;padding:", space(2), " ", space(4), ";", rtl({
}), " &:hover,&:focus:not( [aria-disabled='true'] ):active,&:active:not( [aria-disabled='true'] ):active{color:inherit;opacity:1;}}&.is-active{background-color:", COLORS.theme.accent, ";color:", COLORS.white, ";>button,>a{color:", COLORS.white, ";opacity:1;}}>svg path{color:", COLORS.gray[600], ";}" + ( true ? "" : 0));
const ItemUI = /*#__PURE__*/emotion_styled_base_browser_esm("div", true ? {
} : 0)("display:flex;align-items:center;height:auto;min-height:40px;margin:0;padding:", space(1.5), " ", space(4), ";font-weight:400;line-height:20px;width:100%;color:inherit;opacity:0.7;" + ( true ? "" : 0));
const ItemIconUI = /*#__PURE__*/emotion_styled_base_browser_esm("span", true ? {
} : 0)("display:flex;margin-right:", space(2), ";" + ( true ? "" : 0));
const ItemBadgeUI = /*#__PURE__*/emotion_styled_base_browser_esm("span", true ? {
} : 0)("margin-left:", () => (0,external_wp_i18n_namespaceObject.isRTL)() ? '0' : space(2), ";margin-right:", () => (0,external_wp_i18n_namespaceObject.isRTL)() ? space(2) : '0', ";display:inline-flex;padding:", space(1), " ", space(3), ";border-radius:2px;@keyframes fade-in{from{opacity:0;}to{opacity:1;}}@media not ( prefers-reduced-motion ){animation:fade-in 250ms ease-out;}" + ( true ? "" : 0));
const ItemTitleUI = /*#__PURE__*/emotion_styled_base_browser_esm(text_component, true ? {
} : 0)(() => (0,external_wp_i18n_namespaceObject.isRTL)() ? 'margin-left: auto;' : 'margin-right: auto;', " font-size:14px;line-height:20px;color:inherit;" + ( true ? "" : 0));
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigation/use-navigation-tree-nodes.js
function useNavigationTreeNodes() {
const [nodes, setNodes] = (0,external_wp_element_namespaceObject.useState)({});
const getNode = key => nodes[key];
const addNode = (key, value) => {
return setNodes(original => ({
const removeNode = key => {
return setNodes(original => {
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigation/use-create-navigation-tree.js
const useCreateNavigationTree = () => {
} = useNavigationTreeNodes();
} = useNavigationTreeNodes();
* Stores direct nested menus of menus
* This makes it easy to traverse menu tree
* Key is the menu prop of the menu
* Value is an array of menu keys
const [childMenu, setChildMenu] = (0,external_wp_element_namespaceObject.useState)({});
const getChildMenu = menu => childMenu[menu] || [];
const traverseMenu = (startMenu, callback) => {
while (queue.length > 0) {
// Type cast to string is safe because of the `length > 0` check above.
current = getMenu(queue.shift());
if (!current || visited.includes(current.menu)) {
visited.push(current.menu);
queue = [...queue, ...getChildMenu(current.menu)];
if (callback(current) === false) {
const isMenuEmpty = menuToCheck => {
traverseMenu(menuToCheck, current => {
addMenu: (key, value) => {
if (!newState[value.parentMenu]) {
newState[value.parentMenu] = [];
newState[value.parentMenu].push(key);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigation/index.js
const navigation_noop = () => {};
* Render a navigation list with optional groupings and hierarchy.
* @deprecated Use `Navigator` instead.
* __experimentalNavigation as Navigation,
* __experimentalNavigationGroup as NavigationGroup,
* __experimentalNavigationItem as NavigationItem,
* __experimentalNavigationMenu as NavigationMenu,
* } from '@wordpress/components';
* const MyNavigation = () => (
* <NavigationMenu title="Home">
* <NavigationGroup title="Group 1">
* <NavigationItem item="item-1" title="Item 1" />
* <NavigationItem item="item-2" title="Item 2" />
* <NavigationGroup title="Group 2">
* navigateToMenu="category"
* <NavigationItem badge="1" item="child-1" title="Child 1" />
* <NavigationItem item="child-2" title="Child 2" />
onActivateMenu = navigation_noop
const [menu, setMenu] = (0,external_wp_element_namespaceObject.useState)(activeMenu);
const [slideOrigin, setSlideOrigin] = (0,external_wp_element_namespaceObject.useState)();
const navigationTree = useCreateNavigationTree();
const defaultSlideOrigin = (0,external_wp_i18n_namespaceObject.isRTL)() ? 'right' : 'left';
const setActiveMenu = (menuId, slideInOrigin = defaultSlideOrigin) => {
if (!navigationTree.getMenu(menuId)) {
setSlideOrigin(slideInOrigin);
// Used to prevent the sliding animation on mount
const isMounted = (0,external_wp_element_namespaceObject.useRef)(false);
(0,external_wp_element_namespaceObject.useEffect)(() => {
if (!isMounted.current) {
isMounted.current = true;
(0,external_wp_element_namespaceObject.useEffect)(() => {
if (activeMenu !== menu) {
setActiveMenu(activeMenu);
// Ignore exhaustive-deps here, as it would require either a larger refactor or some questionable workarounds.
// See https://github.com/WordPress/gutenberg/pull/41612 for context.
// eslint-disable-next-line react-hooks/exhaustive-deps
const classes = dist_clsx('components-navigation', className);
const animateClassName = getAnimateClassName({
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationUI, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
className: animateClassName ? dist_clsx({
[animateClassName]: isMounted.current && slideOrigin
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationContext.Provider, {
/* harmony default export */ const navigation = (Navigation);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-right.js
const chevronRight = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"
/* harmony default export */ const chevron_right = (chevronRight);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-left.js
const chevronLeft = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"
/* harmony default export */ const chevron_left = (chevronLeft);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigation/back-button/index.js
function UnforwardedNavigationBackButton({
} = useNavigationContext();
const classes = dist_clsx('components-navigation__back-button', className);
const parentMenuTitle = parentMenu !== undefined ? navigationTree.getMenu(parentMenu)?.title : undefined;
const handleOnClick = event => {
if (typeof onClick === 'function') {
const animationDirection = (0,external_wp_i18n_namespaceObject.isRTL)() ? 'left' : 'right';
if (parentMenu && !event.defaultPrevented) {
setActiveMenu(parentMenu, animationDirection);
const icon = (0,external_wp_i18n_namespaceObject.isRTL)() ? chevron_right : chevron_left;
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(MenuBackButtonUI, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(icons_build_module_icon, {
}), backButtonLabel || parentMenuTitle || (0,external_wp_i18n_namespaceObject.__)('Back')]
* @deprecated Use `Navigator` instead.
const NavigationBackButton = (0,external_wp_element_namespaceObject.forwardRef)(UnforwardedNavigationBackButton);
/* harmony default export */ const back_button = (NavigationBackButton);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigation/group/context.js
const NavigationGroupContext = (0,external_wp_element_namespaceObject.createContext)({
const useNavigationGroupContext = () => (0,external_wp_element_namespaceObject.useContext)(NavigationGroupContext);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigation/group/index.js
* @deprecated Use `Navigator` instead.
function NavigationGroup({
const [groupId] = (0,external_wp_element_namespaceObject.useState)(`group-${++uniqueId}`);
} = useNavigationContext();
// Keep the children rendered to make sure invisible items are included in the navigation tree.
if (!Object.values(items).some(item => item.group === groupId && item._isVisible)) {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationGroupContext.Provider, {
const groupTitleId = `components-navigation__group-title-${groupId}`;
const classes = dist_clsx('components-navigation__group', className);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationGroupContext.Provider, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", {
children: [title && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GroupTitleUI, {
className: "components-navigation__group-title",
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
"aria-labelledby": groupTitleId,
/* harmony default export */ const group = (NavigationGroup);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigation/item/base-content.js
function NavigationItemBaseContent(props) {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [title && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ItemTitleUI, {
className: "components-navigation__item-title",
}), badge && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ItemBadgeUI, {
className: "components-navigation__item-badge",
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigation/menu/context.js
const NavigationMenuContext = (0,external_wp_element_namespaceObject.createContext)({
const useNavigationMenuContext = () => (0,external_wp_element_namespaceObject.useContext)(NavigationMenuContext);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigation/utils.js