: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
let highlightClassNames = '';
const textContent = chunks.map((chunk, index) => {
const text = textToHighlight.substr(chunk.start, chunk.end - chunk.start);
if (typeof highlightClassName === 'object') {
highlightClassName = memoizedLowercaseProps(highlightClassName);
highlightClass = highlightClassName[text.toLowerCase()];
highlightClass = highlightClassName[text];
highlightClass = highlightClassName;
const isActive = highlightIndex === +activeIndex;
highlightClassNames = `${highlightClass} ${isActive ? activeClassName : ''}`;
highlightStyles = isActive === true && activeStyle !== null ? Object.assign({}, highlightStyle, activeStyle) : highlightStyle;
className: highlightClassNames,
// Don't attach arbitrary props to DOM elements; this triggers React DEV warnings (https://fb.me/react-unknown-prop)
// Only pass through the highlightIndex attribute for custom components.
if (typeof HighlightTag !== 'string') {
props.highlightIndex = highlightIndex;
return (0,external_wp_element_namespaceObject.createElement)(HighlightTag, props);
return (0,external_wp_element_namespaceObject.createElement)('span', {
className: unhighlightClassName,
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/utils/font-size.js
const BASE_FONT_SIZE = 13;
const PRESET_FONT_SIZES = {
const HEADING_FONT_SIZES = [1, 2, 3, 4, 5, 6].flatMap(n => [n, n.toString()]);
function getFontSize(size = BASE_FONT_SIZE) {
if (size in PRESET_FONT_SIZES) {
return getFontSize(PRESET_FONT_SIZES[size]);
if (typeof size !== 'number') {
const parsed = parseFloat(size);
if (Number.isNaN(parsed)) {
const ratio = `(${size} / ${BASE_FONT_SIZE})`;
return `calc(${ratio} * ${config_values.fontSize})`;
function getHeadingFontSize(size = 3) {
if (!HEADING_FONT_SIZES.includes(size)) {
return getFontSize(size);
const headingSize = `fontSizeH${size}`;
return config_values[headingSize];
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/text/get-line-height.js
function getLineHeight(adjustLineHeightForInnerControls, lineHeight) {
if (!adjustLineHeightForInnerControls) {
let value = `calc(${config_values.controlHeight} + ${space(2)})`;
switch (adjustLineHeightForInnerControls) {
value = `calc(${config_values.controlHeightLarge} + ${space(2)})`;
value = `calc(${config_values.controlHeightSmall} + ${space(2)})`;
value = `calc(${config_values.controlHeightXSmall} + ${space(2)})`;
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/text/hook.js
function hook_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
styles: "text-transform:uppercase"
* @param {import('../context').WordPressComponentProps<import('./types').Props, 'span'>} props
function useText(props) {
adjustLineHeightForInnerControls,
highlightCaseSensitive = false,
lineHeight: lineHeightProp,
weight = config_values.fontWeight,
} = useContextSystem(props, 'Text');
const isHighlighter = Array.isArray(highlightWords);
const isCaption = size === 'caption';
if (typeof children !== 'string') {
throw new TypeError('`children` of `Text` must only be `string` types when `highlightWords` is defined');
content = createHighlighterText({
autoEscape: highlightEscape,
caseSensitive: highlightCaseSensitive,
searchWords: highlightWords,
sanitize: highlightSanitize
const classes = (0,external_wp_element_namespaceObject.useMemo)(() => {
const lineHeight = getLineHeight(adjustLineHeightForInnerControls, lineHeightProp);
sx.Base = /*#__PURE__*/emotion_react_browser_esm_css({
fontSize: getFontSize(size),
}, true ? "" : 0, true ? "" : 0);
sx.optimalTextColor = null;
if (optimizeReadabilityFor) {
const isOptimalTextColorDark = getOptimalTextShade(optimizeReadabilityFor) === 'dark';
sx.optimalTextColor = isOptimalTextColorDark ? /*#__PURE__*/emotion_react_browser_esm_css({
}, true ? "" : 0, true ? "" : 0) : /*#__PURE__*/emotion_react_browser_esm_css({
}, true ? "" : 0, true ? "" : 0);
return cx(Text, sx.Base, sx.optimalTextColor, isDestructive && destructive, !!isHighlighter && highlighterText, isBlock && styles_block, isCaption && muted, variant && text_styles_namespaceObject[variant], upperCase && sx.upperCase, className);
}, [adjustLineHeightForInnerControls, align, className, color, cx, display, isBlock, isCaption, isDestructive, isHighlighter, letterSpacing, lineHeightProp, optimizeReadabilityFor, size, upperCase, variant, weight]);
finalEllipsizeMode = 'auto';
if (truncate === false) {
finalEllipsizeMode = 'none';
const finalComponentProps = {
ellipsizeMode: ellipsizeMode || finalEllipsizeMode
const truncateProps = useTruncate(finalComponentProps);
* Enhance child `<Link />` components to inherit font size.
if (!truncate && Array.isArray(children)) {
content = external_wp_element_namespaceObject.Children.map(children, child => {
if (typeof child !== 'object' || child === null || !('props' in child)) {
const isLink = hasConnectNamespace(child, ['Link']);
return (0,external_wp_element_namespaceObject.cloneElement)(child, {
size: child.props.size || 'inherit'
children: truncate ? truncateProps.children : content
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/text/component.js
function UnconnectedText(props, forwardedRef) {
const textProps = useText(props);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(component, {
* `Text` is a core component that renders text in the library, using the
* library's typography system.
* `Text` can be used to render any text-content, like an HTML `p` or `span`.
* import { __experimentalText as Text } from `@wordpress/components`;
* return <Text>Code is Poetry</Text>;
const component_Text = contextConnect(UnconnectedText, 'Text');
/* harmony default export */ const text_component = (component_Text);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/utils/base-label.js
function base_label_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
// This is a very low-level mixin which you shouldn't have to use directly.
// Try to use BaseControl's StyledLabel or BaseControl.VisualLabel if you can.
const baseLabelTypography = true ? {
styles: "font-size:11px;font-weight:500;line-height:1.4;text-transform:uppercase"
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/input-control/styles/input-control-styles.js
function input_control_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
const Prefix = /*#__PURE__*/emotion_styled_base_browser_esm("span", true ? {
styles: "box-sizing:border-box;display:block"
const Suffix = /*#__PURE__*/emotion_styled_base_browser_esm("span", true ? {
styles: "align-items:center;align-self:stretch;box-sizing:border-box;display:flex"
const backdropBorderColor = ({
return COLORS.ui.borderDisabled;
const BackdropUI = /*#__PURE__*/emotion_styled_base_browser_esm("div", true ? {
} : 0)("&&&{box-sizing:border-box;border-color:", backdropBorderColor, ";border-radius:inherit;border-style:solid;border-width:1px;bottom:0;left:0;margin:0;padding:0;pointer-events:none;position:absolute;right:0;top:0;", rtl({
}), ";}" + ( true ? "" : 0));
const input_control_styles_Root = /*#__PURE__*/emotion_styled_base_browser_esm(flex_component, true ? {
} : 0)("box-sizing:border-box;position:relative;border-radius:2px;padding-top:0;&:focus-within:not( :has( :is( ", Prefix, ", ", Suffix, " ):focus-within ) ){", BackdropUI, "{border-color:", COLORS.ui.borderFocus, ";box-shadow:", config_values.controlBoxShadowFocus, ";outline:2px solid transparent;outline-offset:-2px;}}" + ( true ? "" : 0));
const containerDisabledStyles = ({
const backgroundColor = disabled ? COLORS.ui.backgroundDisabled : COLORS.ui.background;
return /*#__PURE__*/emotion_react_browser_esm_css({
}, true ? "" : 0, true ? "" : 0);
var input_control_styles_ref = true ? {
const containerWidthStyles = ({
if (!__unstableInputWidth) {
return input_control_styles_ref;
if (labelPosition === 'side') {
if (labelPosition === 'edge') {
return /*#__PURE__*/emotion_react_browser_esm_css({
flex: `0 0 ${__unstableInputWidth}`
}, true ? "" : 0, true ? "" : 0);
return /*#__PURE__*/emotion_react_browser_esm_css({
width: __unstableInputWidth
}, true ? "" : 0, true ? "" : 0);
const Container = /*#__PURE__*/emotion_styled_base_browser_esm("div", true ? {
} : 0)("align-items:center;box-sizing:border-box;border-radius:inherit;display:flex;flex:1;position:relative;", containerDisabledStyles, " ", containerWidthStyles, ";" + ( true ? "" : 0));
const disabledStyles = ({
return /*#__PURE__*/emotion_react_browser_esm_css({
color: COLORS.ui.textDisabled
}, true ? "" : 0, true ? "" : 0);
const fontSizeStyles = ({
'__unstable-large': '13px'
const fontSize = sizes[size] || sizes.default;
const fontSizeMobile = '16px';
return /*#__PURE__*/emotion_react_browser_esm_css("font-size:", fontSizeMobile, ";@media ( min-width: 600px ){font-size:", fontSize, ";}" + ( true ? "" : 0), true ? "" : 0);
// Paddings may be overridden by the custom paddings props.
if (!__next40pxDefaultSize) {
sizes.default = sizes.compact;
return sizes[size] || sizes.default;
const sizeStyles = props => {
return /*#__PURE__*/emotion_react_browser_esm_css(getSizeConfig(props), true ? "" : 0, true ? "" : 0);
const customPaddings = ({
return /*#__PURE__*/emotion_react_browser_esm_css({
}, true ? "" : 0, true ? "" : 0);
let activeDragCursorStyles;
defaultArrowStyles = /*#__PURE__*/emotion_react_browser_esm_css("cursor:", dragCursor, ";user-select:none;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}" + ( true ? "" : 0), true ? "" : 0);
if (isDragging && dragCursor) {
activeDragCursorStyles = /*#__PURE__*/emotion_react_browser_esm_css("&:active{cursor:", dragCursor, ";}" + ( true ? "" : 0), true ? "" : 0);
return /*#__PURE__*/emotion_react_browser_esm_css(defaultArrowStyles, " ", activeDragCursorStyles, ";" + ( true ? "" : 0), true ? "" : 0);
// TODO: Resolve need to use &&& to increase specificity
// https://github.com/WordPress/gutenberg/issues/18483
const Input = /*#__PURE__*/emotion_styled_base_browser_esm("input", true ? {
} : 0)("&&&{background-color:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:", COLORS.theme.foreground, ";display:block;font-family:inherit;margin:0;outline:none;width:100%;", dragStyles, " ", disabledStyles, " ", fontSizeStyles, " ", sizeStyles, " ", customPaddings, " &::-webkit-input-placeholder{line-height:normal;}}" + ( true ? "" : 0));
const BaseLabel = /*#__PURE__*/emotion_styled_base_browser_esm(text_component, true ? {
} : 0)("&&&{", baseLabelTypography, ";box-sizing:border-box;display:block;padding-top:0;padding-bottom:0;max-width:100%;z-index:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}" + ( true ? "" : 0));
const Label = props => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BaseLabel, {