: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
function UnforwardedRadioGroup({
const radioStore = useRadioStore({
defaultValue: defaultChecked,
onChange?.(newValue !== null && newValue !== void 0 ? newValue : undefined);
const contextValue = (0,external_wp_element_namespaceObject.useMemo)(() => ({
}), [radioStore, disabled]);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(RadioGroupContext.Provider, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(RadioGroup, {
render: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(button_group, {
* @deprecated Use `RadioControl` or `ToggleGroupControl` instead.
const radio_group_RadioGroup = (0,external_wp_element_namespaceObject.forwardRef)(UnforwardedRadioGroup);
/* harmony default export */ const radio_group = (radio_group_RadioGroup);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/radio-control/index.js
* Render a user interface to select the user type using radio inputs.
* import { RadioControl } from '@wordpress/components';
* import { useState } from '@wordpress/element';
* const MyRadioControl = () => {
* const [ option, setOption ] = useState( 'a' );
* help="The type of the current user"
* { label: 'Author', value: 'a' },
* { label: 'Editor', value: 'e' },
* onChange={ ( value ) => setOption( value ) }
function RadioControl(props) {
const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(RadioControl);
const id = `inspector-radio-control-${instanceId}`;
const onChangeValue = event => onChange(event.target.value);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(base_control, {
__nextHasNoMarginBottom: true,
hideLabelFromVision: hideLabelFromVision,
className: dist_clsx(className, 'components-radio-control'),
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(v_stack_component, {
children: options.map((option, index) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: "components-radio-control__option",
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("input", {
className: "components-radio-control__input",
checked: option.value === selected,
"aria-describedby": !!help ? `${id}__help` : undefined,
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("label", {
className: "components-radio-control__label",
htmlFor: `${id}-${index}`,
/* harmony default export */ const radio_control = (RadioControl);
;// CONCATENATED MODULE: ./node_modules/re-resizable/lib/resizer.js
var resizer_extends = (undefined && undefined.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
var resizer_assign = (undefined && undefined.__assign) || function () {
resizer_assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
return resizer_assign.apply(this, arguments);
top: resizer_assign(resizer_assign({}, rowSizeBase), { top: '-5px' }),
right: resizer_assign(resizer_assign({}, colSizeBase), { left: undefined, right: '-5px' }),
bottom: resizer_assign(resizer_assign({}, rowSizeBase), { top: undefined, bottom: '-5px' }),
left: resizer_assign(resizer_assign({}, colSizeBase), { left: '-5px' }),
topRight: resizer_assign(resizer_assign({}, edgeBase), { right: '-10px', top: '-10px', cursor: 'ne-resize' }),
bottomRight: resizer_assign(resizer_assign({}, edgeBase), { right: '-10px', bottom: '-10px', cursor: 'se-resize' }),
bottomLeft: resizer_assign(resizer_assign({}, edgeBase), { left: '-10px', bottom: '-10px', cursor: 'sw-resize' }),
topLeft: resizer_assign(resizer_assign({}, edgeBase), { left: '-10px', top: '-10px', cursor: 'nw-resize' }),
var Resizer = /** @class */ (function (_super) {
resizer_extends(Resizer, _super);
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.onMouseDown = function (e) {
_this.props.onResizeStart(e, _this.props.direction);
_this.onTouchStart = function (e) {
_this.props.onResizeStart(e, _this.props.direction);
Resizer.prototype.render = function () {
return (external_React_.createElement("div", { className: this.props.className || '', style: resizer_assign(resizer_assign({ position: 'absolute', userSelect: 'none' }, resizer_styles[this.props.direction]), (this.props.replaceStyles || {})), onMouseDown: this.onMouseDown, onTouchStart: this.onTouchStart }, this.props.children));
}(external_React_.PureComponent));
;// CONCATENATED MODULE: ./node_modules/re-resizable/lib/index.js
var lib_extends = (undefined && undefined.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
var lib_assign = (undefined && undefined.__assign) || function () {
lib_assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
return lib_assign.apply(this, arguments);
var lib_clamp = function (n, min, max) { return Math.max(Math.min(n, max), min); };
var snap = function (n, size) { return Math.round(n / size) * size; };
var hasDirection = function (dir, target) {
return new RegExp(dir, 'i').test(target);
// INFO: In case of window is a Proxy and does not porxy Events correctly, use isTouchEvent & isMouseEvent to distinguish event type instead of `instanceof`.
var isTouchEvent = function (event) {
return Boolean(event.touches && event.touches.length);
var isMouseEvent = function (event) {
return Boolean((event.clientX || event.clientX === 0) &&
(event.clientY || event.clientY === 0));
var findClosestSnap = function (n, snapArray, snapGap) {
if (snapGap === void 0) { snapGap = 0; }
var closestGapIndex = snapArray.reduce(function (prev, curr, index) { return (Math.abs(curr - n) < Math.abs(snapArray[prev] - n) ? index : prev); }, 0);
var gap = Math.abs(snapArray[closestGapIndex] - n);
return snapGap === 0 || gap < snapGap ? snapArray[closestGapIndex] : n;
var getStringSize = function (n) {
if (n.endsWith('vmax')) {
if (n.endsWith('vmin')) {
var getPixelSize = function (size, parentSize, innerWidth, innerHeight) {
if (size && typeof size === 'string') {
if (size.endsWith('px')) {
return Number(size.replace('px', ''));
if (size.endsWith('%')) {
var ratio = Number(size.replace('%', '')) / 100;
return parentSize * ratio;
if (size.endsWith('vw')) {
var ratio = Number(size.replace('vw', '')) / 100;
return innerWidth * ratio;
if (size.endsWith('vh')) {
var ratio = Number(size.replace('vh', '')) / 100;
return innerHeight * ratio;
var calculateNewMax = function (parentSize, innerWidth, innerHeight, maxWidth, maxHeight, minWidth, minHeight) {
maxWidth = getPixelSize(maxWidth, parentSize.width, innerWidth, innerHeight);
maxHeight = getPixelSize(maxHeight, parentSize.height, innerWidth, innerHeight);
minWidth = getPixelSize(minWidth, parentSize.width, innerWidth, innerHeight);
minHeight = getPixelSize(minHeight, parentSize.height, innerWidth, innerHeight);
maxWidth: typeof maxWidth === 'undefined' ? undefined : Number(maxWidth),
maxHeight: typeof maxHeight === 'undefined' ? undefined : Number(maxHeight),
minWidth: typeof minWidth === 'undefined' ? undefined : Number(minWidth),
minHeight: typeof minHeight === 'undefined' ? undefined : Number(minHeight),
'lockAspectRatioExtraWidth',
'lockAspectRatioExtraHeight',
// HACK: This class is used to calculate % size.
var baseClassName = '__resizable_base__';
var Resizable = /** @class */ (function (_super) {
lib_extends(Resizable, _super);
function Resizable(props) {
var _this = _super.call(this, props) || this;
_this.resizableRight = 0;
_this.resizableBottom = 0;
_this.appendBase = function () {
if (!_this.resizable || !_this.window) {
var parent = _this.parentNode;
var element = _this.window.document.createElement('div');
element.style.width = '100%';
element.style.height = '100%';
element.style.position = 'absolute';
element.style.transform = 'scale(0, 0)';
element.style.left = '0';
element.style.flex = '0 0 100%';
element.classList.add(baseClassName);
element.className += baseClassName;
parent.appendChild(element);
_this.removeBase = function (base) {
var parent = _this.parentNode;
parent.removeChild(base);
_this.ref = function (c) {
width: typeof (_this.propsSize && _this.propsSize.width) === 'undefined'
: _this.propsSize && _this.propsSize.width,
height: typeof (_this.propsSize && _this.propsSize.height) === 'undefined'
: _this.propsSize && _this.propsSize.height,
backgroundColor: 'rgba(0,0,0,0)',
_this.onResizeStart = _this.onResizeStart.bind(_this);
_this.onMouseMove = _this.onMouseMove.bind(_this);
_this.onMouseUp = _this.onMouseUp.bind(_this);
Object.defineProperty(Resizable.prototype, "parentNode", {
return this.resizable.parentNode;
Object.defineProperty(Resizable.prototype, "window", {
if (!this.resizable.ownerDocument) {
return this.resizable.ownerDocument.defaultView;
Object.defineProperty(Resizable.prototype, "propsSize", {
return this.props.size || this.props.defaultSize || DEFAULT_SIZE;
Object.defineProperty(Resizable.prototype, "size", {
if (this.resizable && this.window) {
var orgWidth = this.resizable.offsetWidth;
var orgHeight = this.resizable.offsetHeight;
// HACK: Set position `relative` to get parent size.
// This is because when re-resizable set `absolute`, I can not get base width correctly.
var orgPosition = this.resizable.style.position;
if (orgPosition !== 'relative') {
this.resizable.style.position = 'relative';
// INFO: Use original width or height if set auto.
width = this.resizable.style.width !== 'auto' ? this.resizable.offsetWidth : orgWidth;
height = this.resizable.style.height !== 'auto' ? this.resizable.offsetHeight : orgHeight;
// Restore original position
this.resizable.style.position = orgPosition;
return { width: width, height: height };
Object.defineProperty(Resizable.prototype, "sizeStyle", {
var size = this.props.size;
var getSize = function (key) {
if (typeof _this.state[key] === 'undefined' || _this.state[key] === 'auto') {