: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
const wasDirtyOnBlur = (0,external_wp_element_namespaceObject.useRef)(false);
const dragCursor = useDragCursor(isDragging, dragDirection);
const handleOnBlur = event => {
* If isPressEnterToChange is set, this commits the value to
if (isDirty || !event.target.validity.valid) {
wasDirtyOnBlur.current = true;
const handleOnChange = event => {
const nextValue = event.target.value;
change(nextValue, event);
const handleOnCommit = event => {
const nextValue = event.currentTarget.value;
commit(nextValue, event);
const handleOnKeyDown = event => {
if (isPressEnterToChange) {
if (isPressEnterToChange && isDirty) {
const dragGestureProps = useDrag(dragProps => {
// The `target` prop always references the `input` element while, by
// default, the `dragProps.event.target` property would reference the real
// event target (i.e. any DOM element that the pointer is hovering while
// dragging). Ensuring that the `target` is always the `input` element
// allows consumers of `InputControl` (or any higher-level control) to
// check the input's validity by accessing `event.target.validity.valid`.
* Quick return if no longer dragging.
* This prevents unnecessary value calculations.
axis: dragDirection === 'e' || dragDirection === 'w' ? 'x' : 'y',
threshold: dragThreshold,
const dragProps = isDragEnabled ? dragGestureProps() : {};
* Works around the odd UA (e.g. Firefox) that does not focus inputs of
* type=number when their spinner arrows are pressed.
handleOnMouseDown = event => {
props.onMouseDown?.(event);
if (event.currentTarget !== event.currentTarget.ownerDocument.activeElement) {
event.currentTarget.focus();
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Input, {
className: "components-input-control__input",
onChange: handleOnChange,
onKeyDown: withIgnoreIMEEvents(handleOnKeyDown),
onMouseDown: handleOnMouseDown,
// Fallback to `''` to avoid "uncontrolled to controlled" warning.
// See https://github.com/WordPress/gutenberg/pull/47250 for details.
value: value !== null && value !== void 0 ? value : '',
const ForwardedComponent = (0,external_wp_element_namespaceObject.forwardRef)(InputField);
/* harmony default export */ const input_field = (ForwardedComponent);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/utils/font-values.js
/* harmony default export */ const font_values = ({
'default.fontFamily': "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif",
'default.fontSize': '13px',
'helpText.fontSize': '12px',
mobileTextMinFontSize: '16px'
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/utils/font.js
* @param {keyof FONT} value Path of value from `FONT`
* @return {string} Font rule value
return (_FONT$value = font_values[value]) !== null && _FONT$value !== void 0 ? _FONT$value : '';
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/utils/box-sizing.js
function box_sizing_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 boxSizingReset = true ? {
styles: "box-sizing:border-box;*,*::before,*::after{box-sizing:inherit;}"
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/base-control/styles/base-control-styles.js
function base_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 base_control_styles_Wrapper = /*#__PURE__*/emotion_styled_base_browser_esm("div", true ? {
} : 0)("font-family:", font('default.fontFamily'), ";font-size:", font('default.fontSize'), ";", boxSizingReset, ";" + ( true ? "" : 0));
const deprecatedMarginField = ({
__nextHasNoMarginBottom = false
return !__nextHasNoMarginBottom && /*#__PURE__*/emotion_react_browser_esm_css("margin-bottom:", space(2), ";" + ( true ? "" : 0), true ? "" : 0);
const StyledField = /*#__PURE__*/emotion_styled_base_browser_esm("div", true ? {
} : 0)(deprecatedMarginField, " .components-panel__row &{margin-bottom:inherit;}" + ( true ? "" : 0));
const labelStyles = /*#__PURE__*/emotion_react_browser_esm_css(baseLabelTypography, ";display:inline-block;margin-bottom:", space(2), ";padding:0;" + ( true ? "" : 0), true ? "" : 0);
const StyledLabel = /*#__PURE__*/emotion_styled_base_browser_esm("label", true ? {
} : 0)(labelStyles, ";" + ( true ? "" : 0));
var base_control_styles_ref = true ? {
styles: "margin-bottom:revert"
const deprecatedMarginHelp = ({
__nextHasNoMarginBottom = false
return !__nextHasNoMarginBottom && base_control_styles_ref;
const StyledHelp = /*#__PURE__*/emotion_styled_base_browser_esm("p", true ? {
} : 0)("margin-top:", space(2), ";margin-bottom:0;font-size:", font('helpText.fontSize'), ";font-style:normal;color:", COLORS.gray[700], ";", deprecatedMarginHelp, ";" + ( true ? "" : 0));
const StyledVisualLabel = /*#__PURE__*/emotion_styled_base_browser_esm("span", true ? {
} : 0)(labelStyles, ";" + ( true ? "" : 0));
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/base-control/index.js
* `BaseControl` is a component used to generate labels and help text for components handling user inputs.
* import { BaseControl, useBaseControlProps } from '@wordpress/components';
* // Render a `BaseControl` for a textarea input
* const MyCustomTextareaControl = ({ children, ...baseProps }) => (
* // `useBaseControlProps` is a convenience hook to get the props for the `BaseControl`
* // and the inner control itself. Namely, it takes care of generating a unique `id`,
* // properly associating it with the `label` and `help` elements.
* const { baseControlProps, controlProps } = useBaseControlProps( baseProps );
* <BaseControl { ...baseControlProps } __nextHasNoMarginBottom={ true }>
* <textarea { ...controlProps }>
const UnconnectedBaseControl = props => {
__nextHasNoMarginBottom = false,
hideLabelFromVision = false,
} = useContextSystem(props, 'BaseControl');
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(base_control_styles_Wrapper, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(StyledField, {
className: "components-base-control__field"
// TODO: Official deprecation for this should start after all internal usages have been migrated
__nextHasNoMarginBottom: __nextHasNoMarginBottom,
children: [label && id && (hideLabelFromVision ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(visually_hidden_component, {
}) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(StyledLabel, {
className: "components-base-control__label",
})), label && !id && (hideLabelFromVision ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(visually_hidden_component, {
}) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(VisualLabel, {
}), !!help && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(StyledHelp, {
id: id ? id + '__help' : undefined,
className: "components-base-control__help",
__nextHasNoMarginBottom: __nextHasNoMarginBottom,
* `BaseControl.VisualLabel` is used to render a purely visual label inside a `BaseControl` component.
* It should only be used in cases where the children being rendered inside `BaseControl` are already accessibly labeled,
* e.g., a button, but we want an additional visual label for that section equivalent to the labels `BaseControl` would
* otherwise use if the `label` prop was passed.
* import { BaseControl } from '@wordpress/components';
* const MyBaseControl = () => (
* <BaseControl help="This button is already accessibly labeled.">
* <BaseControl.VisualLabel>Author</BaseControl.VisualLabel>
* <Button>Select an author</Button>
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(StyledVisualLabel, {
className: dist_clsx('components-base-control__label', className),
const BaseControl = Object.assign(contextConnectWithoutRef(UnconnectedBaseControl, 'BaseControl'), {
/* harmony default export */ const base_control = (BaseControl);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/input-control/index.js
const input_control_noop = () => {};
function input_control_useUniqueId(idProp) {
const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(InputControl);
const id = `inspector-input-control-${instanceId}`;
function UnforwardedInputControl(props, ref) {
__unstableStateReducer: stateReducer = state => state,
hideLabelFromVision = false,
isPressEnterToChange = false,
onChange = input_control_noop,
onValidate = input_control_noop,
onKeyDown = input_control_noop,
} = useDeprecated36pxDefaultSizeProp(props);
const id = input_control_useUniqueId(idProp);
const classes = dist_clsx('components-input-control', className);
const draftHookProps = useDraft({
onBlur: restProps.onBlur,
const helpProp = !!help ? {
'aria-describedby': `${id}__help`
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(base_control, {
__nextHasNoMarginBottom: true,
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(input_base, {
__next40pxDefaultSize: __next40pxDefaultSize,
__unstableInputWidth: __unstableInputWidth,
hideLabelFromVision: hideLabelFromVision,
labelPosition: labelPosition,
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(input_field, {
__next40pxDefaultSize: __next40pxDefaultSize,
className: "components-input-control__input",
isPressEnterToChange: isPressEnterToChange,
paddingInlineStart: prefix ? space(2) : undefined,
paddingInlineEnd: suffix ? space(2) : undefined,
stateReducer: stateReducer,
* InputControl components let users enter and edit text. This is an experimental component
* intended to (in time) merge with or replace `TextControl`.
* import { __experimentalInputControl as InputControl } from '@wordpress/components';
* import { useState } from 'react';
* const Example = () => {
* const [ value, setValue ] = useState( '' );
* onChange={ ( nextValue ) => setValue( nextValue ?? '' ) }
const InputControl = (0,external_wp_element_namespaceObject.forwardRef)(UnforwardedInputControl);
/* harmony default export */ const input_control = (InputControl);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/dashicon/index.js
* @property {import('./types').IconKey} icon Icon name
* @property {string} [className] Class name
* @property {number} [size] Size of the icon
const iconClass = ['dashicon', 'dashicons', 'dashicons-' + icon, className].filter(Boolean).join(' ');
// For retro-compatibility reasons (for example if people are overriding icon size with CSS), we add inline styles just if the size is different to the default
// using `!=` to catch both 20 and "20"
// eslint-disable-next-line eqeqeq
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {