var resizers = Object.keys(enable).map(function (dir) {
if (enable[dir] !== false) {
return (external_React_["createElement"](resizer_Resizer, { key: dir, direction: dir, onResizeStart: _this.onResizeStart, replaceStyles: handleStyles && handleStyles[dir], className: handleClasses && handleClasses[dir] }, handleComponent && handleComponent[dir] ? handleComponent[dir] : null));
// #93 Wrap the resize box in span (will not break 100% width/height)
return (external_React_["createElement"]("div", { className: handleWrapperClass, style: handleWrapperStyle }, resizers));
Resizable.prototype.render = function () {
var extendsProps = Object.keys(this.props).reduce(function (acc, key) {
if (definedProps.indexOf(key) !== -1) {
acc[key] = _this.props[key];
var style = lib_assign(lib_assign(lib_assign({ position: 'relative', userSelect: this.state.isResizing ? 'none' : 'auto' }, this.props.style), this.sizeStyle), { maxWidth: this.props.maxWidth, maxHeight: this.props.maxHeight, minWidth: this.props.minWidth, minHeight: this.props.minHeight, boxSizing: 'border-box', flexShrink: 0 });
if (this.state.flexBasis) {
style.flexBasis = this.state.flexBasis;
var Wrapper = this.props.as || 'div';
return (external_React_["createElement"](Wrapper, lib_assign({ ref: this.ref, style: style, className: this.props.className }, extendsProps),
this.state.isResizing && external_React_["createElement"]("div", { style: this.state.backgroundStyle }),
Resizable.defaultProps = {
onResizeStart: function () { },
onResize: function () { },
onResizeStop: function () { },
lockAspectRatioExtraWidth: 0,
lockAspectRatioExtraHeight: 0,
}(external_React_["PureComponent"]));
// EXTERNAL MODULE: ./node_modules/react-resize-aware/dist/index.js
var dist = __webpack_require__("SSiF");
var dist_default = /*#__PURE__*/__webpack_require__.n(dist);
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/resizable-box/resize-tooltip/utils.js
var utils_window = window,
utils_clearTimeout = utils_window.clearTimeout,
utils_setTimeout = utils_window.setTimeout;
* @typedef {Object} UseResizeLabelProps
* @property {undefined|string} label The label value.
* @property {Function} resizeListener Element to be rendered for resize listening events.
* Custom hook that manages resize listener events. It also provides a label
* based on current resize width x height values.
* @param {string} props.axis Only shows the label corresponding to the axis.
* @param {number} props.fadeTimeout Duration (ms) before deactivating the resize label.
* @param {boolean} props.onResize Callback when a resize occurs. Provides { width, height } callback.
* @param {string} props.position Adjusts label value.
* @param {boolean} props.showPx Whether to add `PX` to the label.
* @return {UseResizeLabelProps} Properties for hook.
function useResizeLabel(_ref) {
_ref$fadeTimeout = _ref.fadeTimeout,
fadeTimeout = _ref$fadeTimeout === void 0 ? 180 : _ref$fadeTimeout,
_ref$onResize = _ref.onResize,
onResize = _ref$onResize === void 0 ? external_lodash_["noop"] : _ref$onResize,
_ref$position = _ref.position,
position = _ref$position === void 0 ? POSITIONS.bottom : _ref$position,
_ref$showPx = _ref.showPx,
showPx = _ref$showPx === void 0 ? false : _ref$showPx;
* The width/height values derive from this special useResizeAware hook.
* This custom hook uses injects an iFrame into the element, allowing it
* to tap into the onResize (window) callback events.
var _useResizeAware = dist_default()(),
_useResizeAware2 = Object(slicedToArray["a" /* default */])(_useResizeAware, 2),
resizeListener = _useResizeAware2[0],
sizes = _useResizeAware2[1];
* Indicates if the x/y axis is preferred.
* If set, we will avoid resetting the moveX and moveY values.
* This will allow for the preferred axis values to persist in the label.
var isAxisControlled = !!axis;
* The moveX and moveY values are used to track whether the label should
* display width, height, or width x height.
var _useState = Object(external_wp_element_["useState"])(false),
_useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
setMoveX = _useState2[1];
var _useState3 = Object(external_wp_element_["useState"])(false),
_useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2),
setMoveY = _useState4[1];
* Cached dimension values to check for width/height updates from the
* sizes property from useResizeAware()
var heightRef = Object(external_wp_element_["useRef"])(height);
var widthRef = Object(external_wp_element_["useRef"])(width);
* This timeout is used with setMoveX and setMoveY to determine of
* both width and height values have changed at (roughly) the same time.
var moveTimeoutRef = Object(external_wp_element_["useRef"])();
var unsetMoveXY = function unsetMoveXY() {
* If axis is controlled, we will avoid resetting the moveX and moveY values.
* This will allow for the preferred axis values to persist in the label.
if (isAxisControlled) return;
var debounceUnsetMoveXY = function debounceUnsetMoveXY() {
if (moveTimeoutRef.current) {
utils_clearTimeout(moveTimeoutRef.current);
moveTimeoutRef.current = utils_setTimeout(unsetMoveXY, fadeTimeout);
Object(external_wp_element_["useEffect"])(function () {
* On the initial render of useResizeAware, the height and width values are
* null. They are calculated then set using via an internal useEffect hook.
var isRendered = width !== null || height !== null;
var didWidthChange = width !== widthRef.current;
var didHeightChange = height !== heightRef.current;
if (!didWidthChange && !didHeightChange) return;
* After the initial render, the useResizeAware will set the first
* width and height values. We'll sync those values with our
* width and height refs. However, we shouldn't render our Tooltip
* label on this first cycle.
if (width && !widthRef.current && height && !heightRef.current) {
widthRef.current = width;
heightRef.current = height;
* After the first cycle, we can track width and height changes.
widthRef.current = width;
heightRef.current = height;
var label = getSizeLabel({
resizeListener: resizeListener
* Gets the resize label based on width and height values (as well as recent changes).
* @param {string} props.axis Only shows the label corresponding to the axis.
* @param {number} props.height Height value.
* @param {boolean} props.moveX Recent width (x axis) changes.
* @param {boolean} props.moveY Recent width (y axis) changes.
* @param {string} props.position Adjusts label value.
* @param {boolean} props.showPx Whether to add `PX` to the label.
* @param {number} props.width Width value.
* @return {undefined | string} The rendered label.
function getSizeLabel(_ref2) {
_ref2$moveX = _ref2.moveX,
moveX = _ref2$moveX === void 0 ? false : _ref2$moveX,
_ref2$moveY = _ref2.moveY,
moveY = _ref2$moveY === void 0 ? false : _ref2$moveY,
_ref2$position = _ref2.position,
position = _ref2$position === void 0 ? POSITIONS.bottom : _ref2$position,
_ref2$showPx = _ref2.showPx,
showPx = _ref2$showPx === void 0 ? false : _ref2$showPx,
if (!moveX && !moveY) return null;
* We want the label to appear like width x height.
if (position === POSITIONS.corner) {
return "".concat(width, " x ").concat(height);
* The label will combine both width x height values if both
* values have recently been changed.
* Otherwise, only width or height will be displayed.
* The `PX` unit will be added, if specified by the `showPx` prop.
var labelUnit = showPx ? ' px' : '';
if (axis === 'x' && moveX) {
return "".concat(width).concat(labelUnit);
if (axis === 'y' && moveY) {
return "".concat(height).concat(labelUnit);
return "".concat(width, " x ").concat(height);
return "".concat(width).concat(labelUnit);
return "".concat(height).concat(labelUnit);
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js
function resize_tooltip_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)."; }
var resize_tooltip_styles_Root = styled_base_browser_esm("div", {
styles: "bottom:0;box-sizing:border-box;left:0;pointer-events:none;position:absolute;right:0;top:0;"
var TooltipWrapper = styled_base_browser_esm("div", {
styles: "align-items:center;box-sizing:border-box;display:inline-flex;justify-content:center;opacity:0;pointer-events:none;transition:opacity 120ms linear;"
var resize_tooltip_styles_Tooltip = styled_base_browser_esm("div", {
})("background:", colors_color('ui.border'), ";border-radius:2px;box-sizing:border-box;font-size:12px;color:", colors_color('ui.textDark'), ";padding:4px 8px;position:relative;" + ( true ? "" : undefined)); // TODO: Resolve need to use &&& to increase specificity
// https://github.com/WordPress/gutenberg/issues/18483
var LabelText = /*#__PURE__*/styled_base_browser_esm(build_module_text, {
})("&&&{", text_mixins_text, ";display:block;font-size:13px;line-height:1.4;}" + ( true ? "" : undefined));
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/resizable-box/resize-tooltip/label.js
function label_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function label_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { label_ownKeys(Object(source), true).forEach(function (key) { Object(esm_defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { label_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
var CURSOR_OFFSET_TOP = CORNER_OFFSET * 2.5;
function resize_tooltip_label_Label(_ref, ref) {
_ref$position = _ref.position,
position = _ref$position === void 0 ? POSITIONS.corner : _ref$position,
_ref$zIndex = _ref.zIndex,
zIndex = _ref$zIndex === void 0 ? 1000 : _ref$zIndex,
props = Object(objectWithoutProperties["a" /* default */])(_ref, ["label", "position", "zIndex"]);
var isBottom = position === POSITIONS.bottom;
var isCorner = position === POSITIONS.corner;
if (!showLabel) return null;
opacity: showLabel ? 1 : null,
style = label_objectSpread(label_objectSpread({}, style), {}, {
bottom: CURSOR_OFFSET_TOP * -1,
transform: 'translate(-50%, 0)'
transform: "translate(0, 100%)"
style = label_objectSpread(label_objectSpread({}, style), {}, {
right: Object(external_wp_i18n_["isRTL"])() ? null : CORNER_OFFSET,
left: Object(external_wp_i18n_["isRTL"])() ? CORNER_OFFSET : null
return Object(external_wp_element_["createElement"])(TooltipWrapper, Object(esm_extends["a" /* default */])({
className: "components-resizable-tooltip__tooltip-wrapper",
}, props), Object(external_wp_element_["createElement"])(resize_tooltip_styles_Tooltip, {
className: "components-resizable-tooltip__tooltip",
}, Object(external_wp_element_["createElement"])(LabelText, {
var label_ForwardedComponent = Object(external_wp_element_["forwardRef"])(resize_tooltip_label_Label);
/* harmony default export */ var resize_tooltip_label = (label_ForwardedComponent);
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/resizable-box/resize-tooltip/index.js
function ResizeTooltip(_ref, ref) {
className = _ref.className,
_ref$fadeTimeout = _ref.fadeTimeout,
fadeTimeout = _ref$fadeTimeout === void 0 ? 180 : _ref$fadeTimeout,
_ref$isVisible = _ref.isVisible,
isVisible = _ref$isVisible === void 0 ? true : _ref$isVisible,
labelRef = _ref.labelRef,
_ref$onResize = _ref.onResize,
onResize = _ref$onResize === void 0 ? external_lodash_["noop"] : _ref$onResize,
_ref$position = _ref.position,
position = _ref$position === void 0 ? POSITIONS.bottom : _ref$position,
_ref$showPx = _ref.showPx,
showPx = _ref$showPx === void 0 ? true : _ref$showPx,
_ref$zIndex = _ref.zIndex,
zIndex = _ref$zIndex === void 0 ? 1000 : _ref$zIndex,
props = Object(objectWithoutProperties["a" /* default */])(_ref, ["axis", "className", "fadeTimeout", "isVisible", "labelRef", "onResize", "position", "showPx", "zIndex"]);
var _useResizeLabel = useResizeLabel({
fadeTimeout: fadeTimeout,
label = _useResizeLabel.label,
resizeListener = _useResizeLabel.resizeListener;
if (!isVisible) return null;
var classes = classnames_default()('components-resize-tooltip', className);
return Object(external_wp_element_["createElement"])(resize_tooltip_styles_Root, Object(esm_extends["a" /* default */])({
}, props), resizeListener, Object(external_wp_element_["createElement"])(resize_tooltip_label, {
"aria-hidden": props['aria-hidden'],
fadeTimeout: fadeTimeout,
var resize_tooltip_ForwardedComponent = Object(external_wp_element_["forwardRef"])(ResizeTooltip);
/* harmony default export */ var resize_tooltip = (resize_tooltip_ForwardedComponent);
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/resizable-box/index.js