function LinkedButton(_ref) {
var isLinked = _ref.isLinked,
props = Object(objectWithoutProperties["a" /* default */])(_ref, ["isLinked"]);
var label = isLinked ? Object(external_wp_i18n_["__"])('Unlink Sides') : Object(external_wp_i18n_["__"])('Link Sides');
return Object(external_wp_element_["createElement"])(build_module_tooltip["a" /* default */], {
}, Object(external_wp_element_["createElement"])("span", null, Object(external_wp_element_["createElement"])(build_module_button["a" /* default */], Object(esm_extends["a" /* default */])({}, props, {
className: "component-box-control__linked-button",
icon: isLinked ? library_link["a" /* default */] : link_off["a" /* default */],
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/box-control/styles/box-control-visualizer-styles.js
function box_control_visualizer_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 box_control_visualizer_styles_ref = true ? {
styles: "bottom:0;left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:1;"
var containerPositionStyles = function containerPositionStyles(_ref2) {
var isPositionAbsolute = _ref2.isPositionAbsolute;
if (!isPositionAbsolute) return '';
return box_control_visualizer_styles_ref;
var box_control_visualizer_styles_Container = styled_base_browser_esm("div", {
})("box-sizing:border-box;position:relative;", containerPositionStyles, ";" + ( true ? "" : undefined));
var Side = styled_base_browser_esm("div", {
})("box-sizing:border-box;background:", colors_color('blue.wordpress.700'), ";background:", colors_color('ui.theme'), ";filter:brightness( 1 );opacity:0;position:absolute;pointer-events:none;transition:opacity 120ms linear;z-index:1;", function (_ref3) {
var isActive = _ref3.isActive;
return isActive && "\n\t\topacity: 0.3;\n\t";
}, true ? "" : undefined);
var TopView = /*#__PURE__*/styled_base_browser_esm(Side, {
styles: "top:0;left:0;right:0;"
var RightView = /*#__PURE__*/styled_base_browser_esm(Side, {
})("top:0;bottom:0;", rtl_rtl({
}), ";" + ( true ? "" : undefined));
var BottomView = /*#__PURE__*/styled_base_browser_esm(Side, {
styles: "bottom:0;left:0;right:0;"
var LeftView = /*#__PURE__*/styled_base_browser_esm(Side, {
})("top:0;bottom:0;", rtl_rtl({
}), ";" + ( true ? "" : undefined));
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/box-control/visualizer.js
function BoxControlVisualizer(_ref) {
var children = _ref.children,
_ref$showValues = _ref.showValues,
showValues = _ref$showValues === void 0 ? DEFAULT_VISUALIZER_VALUES : _ref$showValues,
_ref$values = _ref.values,
valuesProp = _ref$values === void 0 ? DEFAULT_VALUES : _ref$values,
props = Object(objectWithoutProperties["a" /* default */])(_ref, ["children", "showValues", "values"]);
var isPositionAbsolute = !children;
return Object(external_wp_element_["createElement"])(box_control_visualizer_styles_Container, Object(esm_extends["a" /* default */])({}, props, {
isPositionAbsolute: isPositionAbsolute,
}), Object(external_wp_element_["createElement"])(Sides, {
var _ref2$showValues = _ref2.showValues,
showValues = _ref2$showValues === void 0 ? DEFAULT_VISUALIZER_VALUES : _ref2$showValues,
return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(Top, {
isVisible: showValues.top,
}), Object(external_wp_element_["createElement"])(Right, {
isVisible: showValues.right,
}), Object(external_wp_element_["createElement"])(Bottom, {
isVisible: showValues.bottom,
}), Object(external_wp_element_["createElement"])(Left, {
isVisible: showValues.left,
var _ref3$isVisible = _ref3.isVisible,
isVisible = _ref3$isVisible === void 0 ? false : _ref3$isVisible,
var animationProps = useSideAnimation(height);
var isActive = animationProps.isActive || isVisible;
return Object(external_wp_element_["createElement"])(TopView, {
var _ref4$isVisible = _ref4.isVisible,
isVisible = _ref4$isVisible === void 0 ? false : _ref4$isVisible,
var animationProps = useSideAnimation(width);
var isActive = animationProps.isActive || isVisible;
return Object(external_wp_element_["createElement"])(RightView, {
var _ref5$isVisible = _ref5.isVisible,
isVisible = _ref5$isVisible === void 0 ? false : _ref5$isVisible,
var animationProps = useSideAnimation(height);
var isActive = animationProps.isActive || isVisible;
return Object(external_wp_element_["createElement"])(BottomView, {
var _ref6$isVisible = _ref6.isVisible,
isVisible = _ref6$isVisible === void 0 ? false : _ref6$isVisible,
var animationProps = useSideAnimation(width);
var isActive = animationProps.isActive || isVisible;
return Object(external_wp_element_["createElement"])(LeftView, {
* Custom hook that renders the "flash" animation whenever the value changes.
* @param {string} value Value of (box) side.
function useSideAnimation(value) {
var _useState = Object(external_wp_element_["useState"])(false),
_useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
isActive = _useState2[0],
setIsActive = _useState2[1];
var valueRef = Object(external_wp_element_["useRef"])(value);
var timeoutRef = Object(external_wp_element_["useRef"])();
var clearTimer = function clearTimer() {
if (timeoutRef.current) {
window.clearTimeout(timeoutRef.current);
Object(external_wp_element_["useEffect"])(function () {
if (value !== valueRef.current) {
valueRef.current = value;
timeoutRef.current = setTimeout(function () {
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/box-control/index.js
function box_control_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 box_control_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { box_control_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 { box_control_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
var defaultInputProps = {
function box_control_useUniqueId(idProp) {
var instanceId = Object(external_wp_compose_["useInstanceId"])(BoxControl, 'inspector-box-control');
return idProp || instanceId;
function BoxControl(_ref) {
_ref$inputProps = _ref.inputProps,
inputProps = _ref$inputProps === void 0 ? defaultInputProps : _ref$inputProps,
_ref$onChange = _ref.onChange,
onChange = _ref$onChange === void 0 ? external_lodash_["noop"] : _ref$onChange,
_ref$onChangeShowVisu = _ref.onChangeShowVisualizer,
onChangeShowVisualizer = _ref$onChangeShowVisu === void 0 ? external_lodash_["noop"] : _ref$onChangeShowVisu,
label = _ref$label === void 0 ? Object(external_wp_i18n_["__"])('Box Control') : _ref$label,
valuesProp = _ref.values,
var _useControlledState = use_controlled_state(valuesProp, {
_useControlledState2 = Object(slicedToArray["a" /* default */])(_useControlledState, 2),
values = _useControlledState2[0],
setValues = _useControlledState2[1];
var inputValues = values || DEFAULT_VALUES;
var hasInitialValue = isValuesDefined(valuesProp);
var _useState = Object(external_wp_element_["useState"])(hasInitialValue),
_useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
setIsDirty = _useState2[1];
var _useState3 = Object(external_wp_element_["useState"])(!hasInitialValue || !isValuesMixed(inputValues)),
_useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2),
isLinked = _useState4[0],
setIsLinked = _useState4[1];
var _useState5 = Object(external_wp_element_["useState"])(isLinked ? 'all' : 'top'),
_useState6 = Object(slicedToArray["a" /* default */])(_useState5, 2),
var id = box_control_useUniqueId(idProp);
var headingId = "".concat(id, "-heading");
var toggleLinked = function toggleLinked() {
setSide(!isLinked ? 'all' : 'top');
var handleOnFocus = function handleOnFocus(event, _ref2) {
var nextSide = _ref2.side;
var handleOnChange = function handleOnChange(nextValues) {
var handleOnHoverOn = function handleOnHoverOn() {
var next = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
onChangeShowVisualizer(box_control_objectSpread(box_control_objectSpread({}, DEFAULT_VISUALIZER_VALUES), next));
var handleOnHoverOff = function handleOnHoverOff() {
var next = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
onChangeShowVisualizer(box_control_objectSpread(box_control_objectSpread({}, DEFAULT_VISUALIZER_VALUES), next));
var handleOnReset = function handleOnReset() {
var initialValues = DEFAULT_VALUES;
setValues(initialValues);
var inputControlProps = box_control_objectSpread(box_control_objectSpread({}, inputProps), {}, {
onChange: handleOnChange,
onHoverOn: handleOnHoverOn,
onHoverOff: handleOnHoverOff,
return Object(external_wp_element_["createElement"])(box_control_styles_Root, {
"aria-labelledby": headingId
}, Object(external_wp_element_["createElement"])(Header, {
className: "component-box-control__header"
}, Object(external_wp_element_["createElement"])(flex_item, null, Object(external_wp_element_["createElement"])(build_module_text, {
className: "component-box-control__label"
}, label)), Object(external_wp_element_["createElement"])(flex_item, null, Object(external_wp_element_["createElement"])(build_module_button["a" /* default */], {
className: "component-box-control__reset-button",
}, Object(external_wp_i18n_["__"])('Reset')))), Object(external_wp_element_["createElement"])(HeaderControlWrapper, {
className: "component-box-control__header-control-wrapper"
}, Object(external_wp_element_["createElement"])(flex_item, null, Object(external_wp_element_["createElement"])(BoxControlIcon, {
})), isLinked && Object(external_wp_element_["createElement"])(block, null, Object(external_wp_element_["createElement"])(AllInputControl, Object(esm_extends["a" /* default */])({
}, inputControlProps))), Object(external_wp_element_["createElement"])(flex_item, null, Object(external_wp_element_["createElement"])(LinkedButton, {
}))), !isLinked && Object(external_wp_element_["createElement"])(BoxInputControls, inputControlProps));
BoxControl.__Visualizer = BoxControlVisualizer;
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/button-group/index.js
function ButtonGroup(_ref, ref) {
var className = _ref.className,
props = Object(objectWithoutProperties["a" /* default */])(_ref, ["className"]);
var classes = classnames_default()('components-button-group', className);
return Object(external_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({
/* harmony default export */ var button_group = (Object(external_wp_element_["forwardRef"])(ButtonGroup));
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/card/context.js
var CardContext = Object(external_wp_element_["createContext"])({});
var context_useCardContext = function useCardContext() {
return Object(external_wp_element_["useContext"])(CardContext);
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/card/styles/card-styles.js
borderColor: colors_color('lightGray.500'),
backgroundShady: colors_color('lightGray.200')
var card_styles_borderColor = styleProps.borderColor,
borderRadius = styleProps.borderRadius,
backgroundShady = styleProps.backgroundShady;
var CardUI = styled_base_browser_esm("div", {
})("background:", colors_color('white'), ";box-sizing:border-box;border-radius:", borderRadius, ";border:1px solid ", card_styles_borderColor, ";", handleBorderless, ";&.is-elevated{box-shadow:0px 1px 3px 0px rgba( 0,0,0,0.2 ),0px 1px 1px 0px rgba( 0,0,0,0.14 ),0px 2px 1px -1px rgba( 0,0,0,0.12 );}" + ( true ? "" : undefined));
var HeaderUI = /*#__PURE__*/styled_base_browser_esm(flex, {
})("border-bottom:1px solid ", card_styles_borderColor, ";border-top-left-radius:", borderRadius, ";border-top-right-radius:", borderRadius, ";box-sizing:border-box;&:last-child{border-bottom:none;}", headerFooterSizes, ";", handleBorderless, ";", handleShady, ";" + ( true ? "" : undefined));
var MediaUI = styled_base_browser_esm("div", {
})("box-sizing:border-box;overflow:hidden;& > img,& > iframe{display:block;height:auto;max-width:100%;width:100%;}&:first-of-type{border-top-left-radius:", borderRadius, ";border-top-right-radius:", borderRadius, ";}&:last-of-type{border-bottom-left-radius:", borderRadius, ";border-bottom-right-radius:", borderRadius, ";}" + ( true ? "" : undefined));
var BodyUI = styled_base_browser_esm("div", {
})("box-sizing:border-box;", bodySize, ";", handleShady, ";" + ( true ? "" : undefined));
var FooterUI = /*#__PURE__*/styled_base_browser_esm(flex, {
})("border-top:1px solid ", card_styles_borderColor, ";border-bottom-left-radius:", borderRadius, ";border-bottom-right-radius:", borderRadius, ";box-sizing:border-box;&:first-of-type{border-top:none;}", headerFooterSizes, ";", handleBorderless, ";", handleShady, ";" + ( true ? "" : undefined));
var DividerUI = /*#__PURE__*/styled_base_browser_esm(external_wp_primitives_["HorizontalRule"], {
})("all:unset;border-top:1px solid ", card_styles_borderColor, ";box-sizing:border-box;display:block;height:0;width:100%;" + ( true ? "" : undefined));
return "\n\t\t&.is-size {\n\t\t\t&-large {\n\t\t\t\tpadding: ".concat(space(3), " ").concat(space(4), ";\n\t\t\t}\n\t\t\t&-medium {\n\t\t\t\tpadding: ").concat(space(2), " ").concat(space(3), ";\n\t\t\t}\n\t\t\t&-small {\n\t\t\t\tpadding: ").concat(space(2), ";\n\t\t\t}\n\t\t\t&-extraSmall {\n\t\t\t\tpadding: ").concat(space(1), ";\n\t\t\t}\n\t\t}\n\t");
function headerFooterSizes() {
return "\n\t\t&.is-size {\n\t\t\t&-large {\n\t\t\t\tpadding: ".concat(space(3), " ").concat(space(4), ";\n\t\t\t}\n\t\t\t&-medium {\n\t\t\t\tpadding: ").concat(space(2), " ").concat(space(3), ";\n\t\t\t}\n\t\t\t&-small {\n\t\t\t\tpadding: ").concat(space(2), ";\n\t\t\t}\n\t\t\t&-extraSmall {\n\t\t\t\tpadding: ").concat(space(1), ";\n\t\t\t}\n\t\t}\n\t");
function handleBorderless() {
return "\n\t\t&.is-borderless {\n\t\t\tborder: none;\n\t\t}\n\t";