Grouped Backports to the 6.1 branch.

- Editor: Fix Path Traversal issue on Windows in Template-Part Block.
- Editor: Sanitize Template Part HTML tag on save.
- HTML API: Run URL attributes through `esc_url()`.

Merges [58470], [58471], [58472] and [58473] to the 6.1 branch.
Props xknown, peterwilsoncc, jorbin, bernhard-reiter, azaozz, dmsnell, gziolo.



Built from https://develop.svn.wordpress.org/branches/6.1@58480


git-svn-id: http://core.svn.wordpress.org/branches/6.1@57929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
audrasjb 2024-06-24 15:20:47 +00:00
parent fe8496f53f
commit c494c57ea5
36 changed files with 304 additions and 262 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -835,7 +835,7 @@ function _filter_block_content_callback( $matches ) {
* @return array The filtered and sanitized block object result. * @return array The filtered and sanitized block object result.
*/ */
function filter_block_kses( $block, $allowed_html, $allowed_protocols = array() ) { function filter_block_kses( $block, $allowed_html, $allowed_protocols = array() ) {
$block['attrs'] = filter_block_kses_value( $block['attrs'], $allowed_html, $allowed_protocols ); $block['attrs'] = filter_block_kses_value( $block['attrs'], $allowed_html, $allowed_protocols, $block );
if ( is_array( $block['innerBlocks'] ) ) { if ( is_array( $block['innerBlocks'] ) ) {
foreach ( $block['innerBlocks'] as $i => $inner_block ) { foreach ( $block['innerBlocks'] as $i => $inner_block ) {
@ -851,6 +851,7 @@ function filter_block_kses( $block, $allowed_html, $allowed_protocols = array()
* non-allowable HTML. * non-allowable HTML.
* *
* @since 5.3.1 * @since 5.3.1
* @since 6.5.5 Added the `$block_context` parameter.
* *
* @param string[]|string $value The attribute value to filter. * @param string[]|string $value The attribute value to filter.
* @param array[]|string $allowed_html An array of allowed HTML elements and attributes, * @param array[]|string $allowed_html An array of allowed HTML elements and attributes,
@ -858,13 +859,18 @@ function filter_block_kses( $block, $allowed_html, $allowed_protocols = array()
* for the list of accepted context names. * for the list of accepted context names.
* @param string[] $allowed_protocols Optional. Array of allowed URL protocols. * @param string[] $allowed_protocols Optional. Array of allowed URL protocols.
* Defaults to the result of wp_allowed_protocols(). * Defaults to the result of wp_allowed_protocols().
* @param array $block_context Optional. The block the attribute belongs to, in parsed block array format.
* @return string[]|string The filtered and sanitized result. * @return string[]|string The filtered and sanitized result.
*/ */
function filter_block_kses_value( $value, $allowed_html, $allowed_protocols = array() ) { function filter_block_kses_value( $value, $allowed_html, $allowed_protocols = array(), $block_context = null ) {
if ( is_array( $value ) ) { if ( is_array( $value ) ) {
foreach ( $value as $key => $inner_value ) { foreach ( $value as $key => $inner_value ) {
$filtered_key = filter_block_kses_value( $key, $allowed_html, $allowed_protocols ); $filtered_key = filter_block_kses_value( $key, $allowed_html, $allowed_protocols, $block_context );
$filtered_value = filter_block_kses_value( $inner_value, $allowed_html, $allowed_protocols ); $filtered_value = filter_block_kses_value( $inner_value, $allowed_html, $allowed_protocols, $block_context );
if ( isset( $block_context['blockName'] ) && 'core/template-part' === $block_context['blockName'] ) {
$filtered_value = filter_block_core_template_part_attributes( $filtered_value, $filtered_key, $allowed_html );
}
if ( $filtered_key !== $key ) { if ( $filtered_key !== $key ) {
unset( $value[ $key ] ); unset( $value[ $key ] );
@ -879,6 +885,28 @@ function filter_block_kses_value( $value, $allowed_html, $allowed_protocols = ar
return $value; return $value;
} }
/**
* Sanitizes the value of the Template Part block's `tagName` attribute.
*
* @since 6.5.5
*
* @param string $attribute_value The attribute value to filter.
* @param string $attribute_name The attribute name.
* @param array[]|string $allowed_html An array of allowed HTML elements and attributes,
* or a context name such as 'post'. See wp_kses_allowed_html()
* for the list of accepted context names.
* @return string The sanitized attribute value.
*/
function filter_block_core_template_part_attributes( $attribute_value, $attribute_name, $allowed_html ) {
if ( empty( $attribute_value ) || 'tagName' !== $attribute_name ) {
return $attribute_value;
}
if ( ! is_array( $allowed_html ) ) {
$allowed_html = wp_kses_allowed_html( $allowed_html );
}
return isset( $allowed_html[ $attribute_value ] ) ? $attribute_value : '';
}
/** /**
* Parses blocks out of a content string, and renders those appropriate for the excerpt. * Parses blocks out of a content string, and renders those appropriate for the excerpt.
* *

View File

@ -141,7 +141,7 @@ function render_block_core_template_part( $attributes ) {
global $wp_embed; global $wp_embed;
$content = $wp_embed->autoembed( $content ); $content = $wp_embed->autoembed( $content );
if ( empty( $attributes['tagName'] ) ) { if ( empty( $attributes['tagName'] ) || tag_escape( $attributes['tagName'] ) !== $attributes['tagName'] ) {
$defined_areas = get_allowed_block_template_part_areas(); $defined_areas = get_allowed_block_template_part_areas();
$area_tag = 'div'; $area_tag = 'div';
foreach ( $defined_areas as $defined_area ) { foreach ( $defined_areas as $defined_area ) {

View File

@ -4707,12 +4707,13 @@ EOF;
* Escapes an HTML tag name. * Escapes an HTML tag name.
* *
* @since 2.5.0 * @since 2.5.0
* @since 6.5.5 Allow hyphens in tag names (i.e. custom elements).
* *
* @param string $tag_name * @param string $tag_name
* @return string * @return string
*/ */
function tag_escape( $tag_name ) { function tag_escape( $tag_name ) {
$safe_tag = strtolower( preg_replace( '/[^a-zA-Z0-9_:]/', '', $tag_name ) ); $safe_tag = strtolower( preg_replace( '/[^a-zA-Z0-9-_:]/', '', $tag_name ) );
/** /**
* Filters a string cleaned and escaped for output as an HTML tag. * Filters a string cleaned and escaped for output as an HTML tag.
* *

View File

@ -5971,6 +5971,9 @@ function validate_file( $file, $allowed_files = array() ) {
return 0; return 0;
} }
// Normalize path for Windows servers
$file = wp_normalize_path( $file );
// `../` on its own is not allowed: // `../` on its own is not allowed:
if ( '../' === $file ) { if ( '../' === $file ) {
return 1; return 1;

View File

@ -1224,19 +1224,15 @@ var external_wp_compose_namespaceObject = window["wp"]["compose"];
var external_wp_coreData_namespaceObject = window["wp"]["coreData"]; var external_wp_coreData_namespaceObject = window["wp"]["coreData"];
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
function _extends() { function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) { return _extends = Object.assign ? Object.assign.bind() : function (n) {
for (var i = 1; i < arguments.length; i++) { for (var e = 1; e < arguments.length; e++) {
var source = arguments[i]; var t = arguments[e];
for (var key in source) { for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
} }
return target; return n;
}; }, _extends.apply(null, arguments);
return _extends.apply(this, arguments);
} }
;// CONCATENATED MODULE: external ["wp","htmlEntities"] ;// CONCATENATED MODULE: external ["wp","htmlEntities"]
var external_wp_htmlEntities_namespaceObject = window["wp"]["htmlEntities"]; var external_wp_htmlEntities_namespaceObject = window["wp"]["htmlEntities"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js

File diff suppressed because one or more lines are too long

View File

@ -13058,7 +13058,10 @@ module.exports = function inspect_(obj, options, depth, seen) {
if (typeof window !== 'undefined' && obj === window) { if (typeof window !== 'undefined' && obj === window) {
return '{ [object Window] }'; return '{ [object Window] }';
} }
if (obj === __webpack_require__.g) { if (
(typeof globalThis !== 'undefined' && obj === globalThis)
|| (typeof __webpack_require__.g !== 'undefined' && obj === __webpack_require__.g)
) {
return '{ [object globalThis] }'; return '{ [object globalThis] }';
} }
if (!isDate(obj) && !isRegExp(obj)) { if (!isDate(obj) && !isRegExp(obj)) {
@ -17656,19 +17659,15 @@ function migrateLightBlockWrapper(settings) {
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
function _extends() { function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) { return _extends = Object.assign ? Object.assign.bind() : function (n) {
for (var i = 1; i < arguments.length; i++) { for (var e = 1; e < arguments.length; e++) {
var source = arguments[i]; var t = arguments[e];
for (var key in source) { for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
} }
return target; return n;
}; }, _extends.apply(null, arguments);
return _extends.apply(this, arguments);
} }
;// CONCATENATED MODULE: external ["wp","element"] ;// CONCATENATED MODULE: external ["wp","element"]
var external_wp_element_namespaceObject = window["wp"]["element"]; var external_wp_element_namespaceObject = window["wp"]["element"];
// EXTERNAL MODULE: ./node_modules/classnames/index.js // EXTERNAL MODULE: ./node_modules/classnames/index.js

File diff suppressed because one or more lines are too long

View File

@ -2515,19 +2515,15 @@ const commentAuthorAvatar = (0,external_wp_element_namespaceObject.createElement
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
function _extends() { function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) { return _extends = Object.assign ? Object.assign.bind() : function (n) {
for (var i = 1; i < arguments.length; i++) { for (var e = 1; e < arguments.length; e++) {
var source = arguments[i]; var t = arguments[e];
for (var key in source) { for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
} }
return target; return n;
}; }, _extends.apply(null, arguments);
return _extends.apply(this, arguments);
} }
// EXTERNAL MODULE: ./node_modules/classnames/index.js // EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__(7153); var classnames = __webpack_require__(7153);
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);

File diff suppressed because one or more lines are too long

View File

@ -2482,19 +2482,15 @@ __webpack_require__.d(toggle_group_control_option_base_styles_namespaceObject, {
var external_wp_primitives_namespaceObject = window["wp"]["primitives"]; var external_wp_primitives_namespaceObject = window["wp"]["primitives"];
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
function extends_extends() { function extends_extends() {
extends_extends = Object.assign ? Object.assign.bind() : function (target) { return extends_extends = Object.assign ? Object.assign.bind() : function (n) {
for (var i = 1; i < arguments.length; i++) { for (var e = 1; e < arguments.length; e++) {
var source = arguments[i]; var t = arguments[e];
for (var key in source) { for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
} }
return target; return n;
}; }, extends_extends.apply(null, arguments);
return extends_extends.apply(this, arguments);
} }
;// CONCATENATED MODULE: external ["wp","element"] ;// CONCATENATED MODULE: external ["wp","element"]
var external_wp_element_namespaceObject = window["wp"]["element"]; var external_wp_element_namespaceObject = window["wp"]["element"];
// EXTERNAL MODULE: ./node_modules/classnames/index.js // EXTERNAL MODULE: ./node_modules/classnames/index.js
@ -5099,12 +5095,21 @@ function floating_ui_utils_getPaddingObject(padding) {
}; };
} }
function floating_ui_utils_rectToClientRect(rect) { function floating_ui_utils_rectToClientRect(rect) {
const {
x,
y,
width,
height
} = rect;
return { return {
...rect, width,
top: rect.y, height,
left: rect.x, top: y,
right: rect.x + rect.width, left: x,
bottom: rect.y + rect.height right: x + width,
bottom: y + height,
x,
y
}; };
} }
@ -5299,9 +5304,10 @@ async function detectOverflow(state, options) {
strategy strategy
})); }));
const rect = elementContext === 'floating' ? { const rect = elementContext === 'floating' ? {
...rects.floating,
x, x,
y y,
width: rects.floating.width,
height: rects.floating.height
} : rects.reference; } : rects.reference;
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating)); const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || { const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
@ -5841,6 +5847,8 @@ async function convertValueToCoords(state, options) {
const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1; const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
const crossAxisMulti = rtl && isVertical ? -1 : 1; const crossAxisMulti = rtl && isVertical ? -1 : 1;
const rawValue = floating_ui_utils_evaluate(options, state); const rawValue = floating_ui_utils_evaluate(options, state);
// eslint-disable-next-line prefer-const
let { let {
mainAxis, mainAxis,
crossAxis, crossAxis,
@ -6091,16 +6099,16 @@ const size = function (options) {
widthSide = side; widthSide = side;
heightSide = alignment === 'end' ? 'top' : 'bottom'; heightSide = alignment === 'end' ? 'top' : 'bottom';
} }
const overflowAvailableHeight = height - overflow[heightSide]; const maximumClippingHeight = height - overflow.top - overflow.bottom;
const overflowAvailableWidth = width - overflow[widthSide]; const maximumClippingWidth = width - overflow.left - overflow.right;
const overflowAvailableHeight = floating_ui_utils_min(height - overflow[heightSide], maximumClippingHeight);
const overflowAvailableWidth = floating_ui_utils_min(width - overflow[widthSide], maximumClippingWidth);
const noShift = !state.middlewareData.shift; const noShift = !state.middlewareData.shift;
let availableHeight = overflowAvailableHeight; let availableHeight = overflowAvailableHeight;
let availableWidth = overflowAvailableWidth; let availableWidth = overflowAvailableWidth;
if (isYAxis) { if (isYAxis) {
const maximumClippingWidth = width - overflow.left - overflow.right;
availableWidth = alignment || noShift ? floating_ui_utils_min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth; availableWidth = alignment || noShift ? floating_ui_utils_min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
} else { } else {
const maximumClippingHeight = height - overflow.top - overflow.bottom;
availableHeight = alignment || noShift ? floating_ui_utils_min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight; availableHeight = alignment || noShift ? floating_ui_utils_min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
} }
if (noShift && !alignment) { if (noShift && !alignment) {
@ -6192,9 +6200,8 @@ function getContainingBlock(element) {
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) { while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
if (isContainingBlock(currentNode)) { if (isContainingBlock(currentNode)) {
return currentNode; return currentNode;
} else {
currentNode = getParentNode(currentNode);
} }
currentNode = getParentNode(currentNode);
} }
return null; return null;
} }
@ -6270,7 +6277,6 @@ function getOverflowAncestors(node, list, traverseIframes) {
function getCssDimensions(element) { function getCssDimensions(element) {
const css = floating_ui_utils_dom_getComputedStyle(element); const css = floating_ui_utils_dom_getComputedStyle(element);
// In testing environments, the `width` and `height` properties are empty // In testing environments, the `width` and `height` properties are empty
@ -6399,10 +6405,10 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
} }
const topLayerSelectors = [':popover-open', ':modal']; const topLayerSelectors = [':popover-open', ':modal'];
function isTopLayer(floating) { function isTopLayer(element) {
return topLayerSelectors.some(selector => { return topLayerSelectors.some(selector => {
try { try {
return floating.matches(selector); return element.matches(selector);
} catch (e) { } catch (e) {
return false; return false;
} }
@ -6590,7 +6596,7 @@ function getClippingRect(_ref) {
rootBoundary, rootBoundary,
strategy strategy
} = _ref; } = _ref;
const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary); const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
const clippingAncestors = [...elementClippingAncestors, rootBoundary]; const clippingAncestors = [...elementClippingAncestors, rootBoundary];
const firstClippingAncestor = clippingAncestors[0]; const firstClippingAncestor = clippingAncestors[0];
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => { const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
@ -6652,6 +6658,10 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
}; };
} }
function isStaticPositioned(element) {
return floating_ui_utils_dom_getComputedStyle(element).position === 'static';
}
function getTrueOffsetParent(element, polyfill) { function getTrueOffsetParent(element, polyfill) {
if (!isHTMLElement(element) || floating_ui_utils_dom_getComputedStyle(element).position === 'fixed') { if (!isHTMLElement(element) || floating_ui_utils_dom_getComputedStyle(element).position === 'fixed') {
return null; return null;
@ -6665,29 +6675,41 @@ function getTrueOffsetParent(element, polyfill) {
// Gets the closest ancestor positioned element. Handles some edge cases, // Gets the closest ancestor positioned element. Handles some edge cases,
// such as table ancestors and cross browser bugs. // such as table ancestors and cross browser bugs.
function getOffsetParent(element, polyfill) { function getOffsetParent(element, polyfill) {
const window = floating_ui_utils_dom_getWindow(element); const win = floating_ui_utils_dom_getWindow(element);
if (!isHTMLElement(element) || isTopLayer(element)) { if (isTopLayer(element)) {
return window; return win;
}
if (!isHTMLElement(element)) {
let svgOffsetParent = getParentNode(element);
while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
return svgOffsetParent;
}
svgOffsetParent = getParentNode(svgOffsetParent);
}
return win;
} }
let offsetParent = getTrueOffsetParent(element, polyfill); let offsetParent = getTrueOffsetParent(element, polyfill);
while (offsetParent && isTableElement(offsetParent) && floating_ui_utils_dom_getComputedStyle(offsetParent).position === 'static') { while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
offsetParent = getTrueOffsetParent(offsetParent, polyfill); offsetParent = getTrueOffsetParent(offsetParent, polyfill);
} }
if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && floating_ui_utils_dom_getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) { if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
return window; return win;
} }
return offsetParent || getContainingBlock(element) || window; return offsetParent || getContainingBlock(element) || win;
} }
const getElementRects = async function (data) { const getElementRects = async function (data) {
const getOffsetParentFn = this.getOffsetParent || getOffsetParent; const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
const getDimensionsFn = this.getDimensions; const getDimensionsFn = this.getDimensions;
const floatingDimensions = await getDimensionsFn(data.floating);
return { return {
reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy), reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
floating: { floating: {
x: 0, x: 0,
y: 0, y: 0,
...(await getDimensionsFn(data.floating)) width: floatingDimensions.width,
height: floatingDimensions.height
} }
}; };
}; };
@ -6757,9 +6779,11 @@ function observeMove(element, onMove) {
return refresh(); return refresh();
} }
if (!ratio) { if (!ratio) {
// If the reference is clipped, the ratio is 0. Throttle the refresh
// to prevent an infinite loop of updates.
timeoutId = setTimeout(() => { timeoutId = setTimeout(() => {
refresh(false, 1e-7); refresh(false, 1e-7);
}, 100); }, 1000);
} else { } else {
refresh(false, ratio); refresh(false, ratio);
} }
@ -6863,6 +6887,25 @@ function autoUpdate(reference, floating, update, options) {
}; };
} }
/**
* Resolves with an object of overflow side offsets that determine how much the
* element is overflowing a given clipping boundary on each side.
* - positive = overflowing the boundary by that number of pixels
* - negative = how many pixels left before it will overflow
* - 0 = lies flush with the boundary
* @see https://floating-ui.com/docs/detectOverflow
*/
const floating_ui_dom_detectOverflow = (/* unused pure expression or super */ null && (detectOverflow$1));
/**
* Modifies the placement by translating the floating element along the
* specified axes.
* A number (shorthand for `mainAxis` or distance), or an axes configuration
* object may be passed.
* @see https://floating-ui.com/docs/offset
*/
const floating_ui_dom_offset = offset;
/** /**
* Optimizes the visibility of the floating element by choosing the placement * Optimizes the visibility of the floating element by choosing the placement
* that has the most space available automatically, without needing to specify a * that has the most space available automatically, without needing to specify a
@ -21592,7 +21635,7 @@ const UnforwardedPopover = (props, forwardedRef) => {
}; };
} }
}, offset(offsetProp), computedFlipProp ? floating_ui_dom_flip() : undefined, computedResizeProp ? floating_ui_dom_size({ }, floating_ui_dom_offset(offsetProp), computedFlipProp ? floating_ui_dom_flip() : undefined, computedResizeProp ? floating_ui_dom_size({
apply(sizeProps) { apply(sizeProps) {
var _refs$floating$curren; var _refs$floating$curren;
@ -49993,6 +50036,7 @@ function _typeof(o) {
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
}, _typeof(o); }, _typeof(o);
} }
;// CONCATENATED MODULE: ./node_modules/date-fns/esm/_lib/requiredArgs/index.js ;// CONCATENATED MODULE: ./node_modules/date-fns/esm/_lib/requiredArgs/index.js
function requiredArgs(required, args) { function requiredArgs(required, args) {
if (args.length < required) { if (args.length < required) {
@ -61423,8 +61467,16 @@ var calculateNewMax = function (parentSize, innerWidth, innerHeight, maxWidth, m
minHeight: typeof minHeight === 'undefined' ? undefined : Number(minHeight), minHeight: typeof minHeight === 'undefined' ? undefined : Number(minHeight),
}; };
}; };
/**
* transform T | [T, T] to [T, T]
* @param val
* @returns
*/
// tslint:disable-next-line
var normalizeToPair = function (val) { return (Array.isArray(val) ? val : [val, val]); };
var definedProps = [ var definedProps = [
'as', 'as',
'ref',
'style', 'style',
'className', 'className',
'grid', 'grid',
@ -61459,6 +61511,7 @@ var baseClassName = '__resizable_base__';
var Resizable = /** @class */ (function (_super) { var Resizable = /** @class */ (function (_super) {
lib_extends(Resizable, _super); lib_extends(Resizable, _super);
function Resizable(props) { function Resizable(props) {
var _a, _b, _c, _d;
var _this = _super.call(this, props) || this; var _this = _super.call(this, props) || this;
_this.ratio = 1; _this.ratio = 1;
_this.resizable = null; _this.resizable = null;
@ -61504,19 +61557,10 @@ var Resizable = /** @class */ (function (_super) {
} }
parent.removeChild(base); parent.removeChild(base);
}; };
_this.ref = function (c) {
if (c) {
_this.resizable = c;
}
};
_this.state = { _this.state = {
isResizing: false, isResizing: false,
width: typeof (_this.propsSize && _this.propsSize.width) === 'undefined' width: (_b = (_a = _this.propsSize) === null || _a === void 0 ? void 0 : _a.width) !== null && _b !== void 0 ? _b : 'auto',
? 'auto' height: (_d = (_c = _this.propsSize) === null || _c === void 0 ? void 0 : _c.height) !== null && _d !== void 0 ? _d : 'auto',
: _this.propsSize && _this.propsSize.width,
height: typeof (_this.propsSize && _this.propsSize.height) === 'undefined'
? 'auto'
: _this.propsSize && _this.propsSize.height,
direction: 'right', direction: 'right',
original: { original: {
x: 0, x: 0,
@ -61603,10 +61647,11 @@ var Resizable = /** @class */ (function (_super) {
var _this = this; var _this = this;
var size = this.props.size; var size = this.props.size;
var getSize = function (key) { var getSize = function (key) {
var _a;
if (typeof _this.state[key] === 'undefined' || _this.state[key] === 'auto') { if (typeof _this.state[key] === 'undefined' || _this.state[key] === 'auto') {
return 'auto'; return 'auto';
} }
if (_this.propsSize && _this.propsSize[key] && _this.propsSize[key].toString().endsWith('%')) { if (_this.propsSize && _this.propsSize[key] && ((_a = _this.propsSize[key]) === null || _a === void 0 ? void 0 : _a.toString().endsWith('%'))) {
if (_this.state[key].toString().endsWith('%')) { if (_this.state[key].toString().endsWith('%')) {
return _this.state[key].toString(); return _this.state[key].toString();
} }
@ -61747,33 +61792,33 @@ var Resizable = /** @class */ (function (_super) {
}; };
Resizable.prototype.calculateNewSizeFromDirection = function (clientX, clientY) { Resizable.prototype.calculateNewSizeFromDirection = function (clientX, clientY) {
var scale = this.props.scale || 1; var scale = this.props.scale || 1;
var resizeRatio = this.props.resizeRatio || 1; var _a = normalizeToPair(this.props.resizeRatio || 1), resizeRatioX = _a[0], resizeRatioY = _a[1];
var _a = this.state, direction = _a.direction, original = _a.original; var _b = this.state, direction = _b.direction, original = _b.original;
var _b = this.props, lockAspectRatio = _b.lockAspectRatio, lockAspectRatioExtraHeight = _b.lockAspectRatioExtraHeight, lockAspectRatioExtraWidth = _b.lockAspectRatioExtraWidth; var _c = this.props, lockAspectRatio = _c.lockAspectRatio, lockAspectRatioExtraHeight = _c.lockAspectRatioExtraHeight, lockAspectRatioExtraWidth = _c.lockAspectRatioExtraWidth;
var newWidth = original.width; var newWidth = original.width;
var newHeight = original.height; var newHeight = original.height;
var extraHeight = lockAspectRatioExtraHeight || 0; var extraHeight = lockAspectRatioExtraHeight || 0;
var extraWidth = lockAspectRatioExtraWidth || 0; var extraWidth = lockAspectRatioExtraWidth || 0;
if (hasDirection('right', direction)) { if (hasDirection('right', direction)) {
newWidth = original.width + ((clientX - original.x) * resizeRatio) / scale; newWidth = original.width + ((clientX - original.x) * resizeRatioX) / scale;
if (lockAspectRatio) { if (lockAspectRatio) {
newHeight = (newWidth - extraWidth) / this.ratio + extraHeight; newHeight = (newWidth - extraWidth) / this.ratio + extraHeight;
} }
} }
if (hasDirection('left', direction)) { if (hasDirection('left', direction)) {
newWidth = original.width - ((clientX - original.x) * resizeRatio) / scale; newWidth = original.width - ((clientX - original.x) * resizeRatioX) / scale;
if (lockAspectRatio) { if (lockAspectRatio) {
newHeight = (newWidth - extraWidth) / this.ratio + extraHeight; newHeight = (newWidth - extraWidth) / this.ratio + extraHeight;
} }
} }
if (hasDirection('bottom', direction)) { if (hasDirection('bottom', direction)) {
newHeight = original.height + ((clientY - original.y) * resizeRatio) / scale; newHeight = original.height + ((clientY - original.y) * resizeRatioY) / scale;
if (lockAspectRatio) { if (lockAspectRatio) {
newWidth = (newHeight - extraHeight) * this.ratio + extraWidth; newWidth = (newHeight - extraHeight) * this.ratio + extraWidth;
} }
} }
if (hasDirection('top', direction)) { if (hasDirection('top', direction)) {
newHeight = original.height - ((clientY - original.y) * resizeRatio) / scale; newHeight = original.height - ((clientY - original.y) * resizeRatioY) / scale;
if (lockAspectRatio) { if (lockAspectRatio) {
newWidth = (newHeight - extraHeight) * this.ratio + extraWidth; newWidth = (newHeight - extraHeight) * this.ratio + extraWidth;
} }
@ -61934,8 +61979,10 @@ var Resizable = /** @class */ (function (_super) {
var newGridWidth = snap(newWidth, this.props.grid[0]); var newGridWidth = snap(newWidth, this.props.grid[0]);
var newGridHeight = snap(newHeight, this.props.grid[1]); var newGridHeight = snap(newHeight, this.props.grid[1]);
var gap = this.props.snapGap || 0; var gap = this.props.snapGap || 0;
newWidth = gap === 0 || Math.abs(newGridWidth - newWidth) <= gap ? newGridWidth : newWidth; var w = gap === 0 || Math.abs(newGridWidth - newWidth) <= gap ? newGridWidth : newWidth;
newHeight = gap === 0 || Math.abs(newGridHeight - newHeight) <= gap ? newGridHeight : newHeight; var h = gap === 0 || Math.abs(newGridHeight - newHeight) <= gap ? newGridHeight : newHeight;
newWidth = w;
newHeight = h;
} }
var delta = { var delta = {
width: newWidth - original.width, width: newWidth - original.width,
@ -61979,16 +62026,25 @@ var Resizable = /** @class */ (function (_super) {
else if (this.flexDir === 'column') { else if (this.flexDir === 'column') {
newState.flexBasis = newState.height; newState.flexBasis = newState.height;
} }
// For v18, update state sync var widthChanged = this.state.width !== newState.width;
(0,external_ReactDOM_namespaceObject.flushSync)(function () { var heightChanged = this.state.height !== newState.height;
_this.setState(newState); var flexBaseChanged = this.state.flexBasis !== newState.flexBasis;
}); var changed = widthChanged || heightChanged || flexBaseChanged;
if (changed) {
// For v18, update state sync
(0,external_ReactDOM_namespaceObject.flushSync)(function () {
_this.setState(newState);
});
}
if (this.props.onResize) { if (this.props.onResize) {
this.props.onResize(event, direction, this.resizable, delta); if (changed) {
this.props.onResize(event, direction, this.resizable, delta);
}
} }
}; };
Resizable.prototype.onMouseUp = function (event) { Resizable.prototype.onMouseUp = function (event) {
var _a = this.state, isResizing = _a.isResizing, direction = _a.direction, original = _a.original; var _a, _b;
var _c = this.state, isResizing = _c.isResizing, direction = _c.direction, original = _c.original;
if (!isResizing || !this.resizable) { if (!isResizing || !this.resizable) {
return; return;
} }
@ -62000,7 +62056,7 @@ var Resizable = /** @class */ (function (_super) {
this.props.onResizeStop(event, direction, this.resizable, delta); this.props.onResizeStop(event, direction, this.resizable, delta);
} }
if (this.props.size) { if (this.props.size) {
this.setState(this.props.size); this.setState({ width: (_a = this.props.size.width) !== null && _a !== void 0 ? _a : 'auto', height: (_b = this.props.size.height) !== null && _b !== void 0 ? _b : 'auto' });
} }
this.unbindEvents(); this.unbindEvents();
this.setState({ this.setState({
@ -62009,7 +62065,8 @@ var Resizable = /** @class */ (function (_super) {
}); });
}; };
Resizable.prototype.updateSize = function (size) { Resizable.prototype.updateSize = function (size) {
this.setState({ width: size.width, height: size.height }); var _a, _b;
this.setState({ width: (_a = size.width) !== null && _a !== void 0 ? _a : 'auto', height: (_b = size.height) !== null && _b !== void 0 ? _b : 'auto' });
}; };
Resizable.prototype.renderResizer = function () { Resizable.prototype.renderResizer = function () {
var _this = this; var _this = this;
@ -62040,7 +62097,14 @@ var Resizable = /** @class */ (function (_super) {
style.flexBasis = this.state.flexBasis; style.flexBasis = this.state.flexBasis;
} }
var Wrapper = this.props.as || 'div'; var Wrapper = this.props.as || 'div';
return (external_React_namespaceObject.createElement(Wrapper, lib_assign({ ref: this.ref, style: style, className: this.props.className }, extendsProps), return (external_React_namespaceObject.createElement(Wrapper, lib_assign({ style: style, className: this.props.className }, extendsProps, {
// `ref` is after `extendsProps` to ensure this one wins over a version
// passed in
ref: function (c) {
if (c) {
_this.resizable = c;
}
} }),
this.state.isResizing && external_React_namespaceObject.createElement("div", { style: this.state.backgroundStyle }), this.state.isResizing && external_React_namespaceObject.createElement("div", { style: this.state.backgroundStyle }),
this.props.children, this.props.children,
this.renderResizer())); this.renderResizer()));

File diff suppressed because one or more lines are too long

View File

@ -2616,19 +2616,15 @@ const pure = createHigherOrderComponent(function (WrappedComponent) {
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
function _extends() { function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) { return _extends = Object.assign ? Object.assign.bind() : function (n) {
for (var i = 1; i < arguments.length; i++) { for (var e = 1; e < arguments.length; e++) {
var source = arguments[i]; var t = arguments[e];
for (var key in source) { for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
} }
return target; return n;
}; }, _extends.apply(null, arguments);
return _extends.apply(this, arguments);
} }
;// CONCATENATED MODULE: external ["wp","deprecated"] ;// CONCATENATED MODULE: external ["wp","deprecated"]
var external_wp_deprecated_namespaceObject = window["wp"]["deprecated"]; var external_wp_deprecated_namespaceObject = window["wp"]["deprecated"];
var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject); var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject);

File diff suppressed because one or more lines are too long

View File

@ -292,19 +292,15 @@ var external_wp_coreData_namespaceObject = window["wp"]["coreData"];
var external_wp_mediaUtils_namespaceObject = window["wp"]["mediaUtils"]; var external_wp_mediaUtils_namespaceObject = window["wp"]["mediaUtils"];
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
function _extends() { function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) { return _extends = Object.assign ? Object.assign.bind() : function (n) {
for (var i = 1; i < arguments.length; i++) { for (var e = 1; e < arguments.length; e++) {
var source = arguments[i]; var t = arguments[e];
for (var key in source) { for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
} }
return target; return n;
}; }, _extends.apply(null, arguments);
return _extends.apply(this, arguments);
} }
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/block-inspector-button/index.js ;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/block-inspector-button/index.js

File diff suppressed because one or more lines are too long

View File

@ -534,6 +534,7 @@ function _typeof(o) {
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
}, _typeof(o); }, _typeof(o);
} }
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js
function toPrimitive(t, r) { function toPrimitive(t, r) {
@ -546,6 +547,7 @@ function toPrimitive(t, r) {
} }
return ("string" === r ? String : Number)(t); return ("string" === r ? String : Number)(t);
} }
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
@ -553,22 +555,18 @@ function toPropertyKey(t) {
var i = toPrimitive(t, "string"); var i = toPrimitive(t, "string");
return "symbol" == _typeof(i) ? i : i + ""; return "symbol" == _typeof(i) ? i : i + "";
} }
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
function _defineProperty(obj, key, value) { function _defineProperty(e, r, t) {
key = toPropertyKey(key); return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
if (key in obj) { value: t,
Object.defineProperty(obj, key, { enumerable: !0,
value: value, configurable: !0,
enumerable: true, writable: !0
configurable: true, }) : e[r] = t, e;
writable: true
});
} else {
obj[key] = value;
}
return obj;
} }
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
function ownKeys(e, r) { function ownKeys(e, r) {
@ -592,6 +590,7 @@ function _objectSpread2(e) {
} }
return e; return e;
} }
;// CONCATENATED MODULE: ./node_modules/redux/es/redux.js ;// CONCATENATED MODULE: ./node_modules/redux/es/redux.js
@ -3430,19 +3429,15 @@ persistencePlugin.__unstableMigrate = () => {};
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
function _extends() { function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) { return _extends = Object.assign ? Object.assign.bind() : function (n) {
for (var i = 1; i < arguments.length; i++) { for (var e = 1; e < arguments.length; e++) {
var source = arguments[i]; var t = arguments[e];
for (var key in source) { for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
} }
return target; return n;
}; }, _extends.apply(null, arguments);
return _extends.apply(this, arguments);
} }
;// CONCATENATED MODULE: external ["wp","element"] ;// CONCATENATED MODULE: external ["wp","element"]
var external_wp_element_namespaceObject = window["wp"]["element"]; var external_wp_element_namespaceObject = window["wp"]["element"];
;// CONCATENATED MODULE: external ["wp","compose"] ;// CONCATENATED MODULE: external ["wp","compose"]

File diff suppressed because one or more lines are too long

View File

@ -293,19 +293,15 @@ const replaceMediaUpload = () => external_wp_mediaUtils_namespaceObject.MediaUpl
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
function _extends() { function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) { return _extends = Object.assign ? Object.assign.bind() : function (n) {
for (var i = 1; i < arguments.length; i++) { for (var e = 1; e < arguments.length; e++) {
var source = arguments[i]; var t = arguments[e];
for (var key in source) { for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
} }
return target; return n;
}; }, _extends.apply(null, arguments);
return _extends.apply(this, arguments);
} }
;// CONCATENATED MODULE: external "lodash" ;// CONCATENATED MODULE: external "lodash"
var external_lodash_namespaceObject = window["lodash"]; var external_lodash_namespaceObject = window["lodash"];
;// CONCATENATED MODULE: external ["wp","components"] ;// CONCATENATED MODULE: external ["wp","components"]

File diff suppressed because one or more lines are too long

View File

@ -1118,19 +1118,15 @@ var external_wp_coreData_namespaceObject = window["wp"]["coreData"];
var external_wp_editor_namespaceObject = window["wp"]["editor"]; var external_wp_editor_namespaceObject = window["wp"]["editor"];
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
function extends_extends() { function extends_extends() {
extends_extends = Object.assign ? Object.assign.bind() : function (target) { return extends_extends = Object.assign ? Object.assign.bind() : function (n) {
for (var i = 1; i < arguments.length; i++) { for (var e = 1; e < arguments.length; e++) {
var source = arguments[i]; var t = arguments[e];
for (var key in source) { for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
} }
return target; return n;
}; }, extends_extends.apply(null, arguments);
return extends_extends.apply(this, arguments);
} }
// EXTERNAL MODULE: ./node_modules/classnames/index.js // EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__(7153); var classnames = __webpack_require__(7153);
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);

File diff suppressed because one or more lines are too long

View File

@ -362,19 +362,15 @@ var external_wp_i18n_namespaceObject = window["wp"]["i18n"];
var external_wp_notices_namespaceObject = window["wp"]["notices"]; var external_wp_notices_namespaceObject = window["wp"]["notices"];
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
function _extends() { function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) { return _extends = Object.assign ? Object.assign.bind() : function (n) {
for (var i = 1; i < arguments.length; i++) { for (var e = 1; e < arguments.length; e++) {
var source = arguments[i]; var t = arguments[e];
for (var key in source) { for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
} }
return target; return n;
}; }, _extends.apply(null, arguments);
return _extends.apply(this, arguments);
} }
// EXTERNAL MODULE: ./node_modules/classnames/index.js // EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__(7153); var classnames = __webpack_require__(7153);
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);

File diff suppressed because one or more lines are too long

View File

@ -1598,19 +1598,15 @@ __webpack_require__.d(actions_namespaceObject, {
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
function _extends() { function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) { return _extends = Object.assign ? Object.assign.bind() : function (n) {
for (var i = 1; i < arguments.length; i++) { for (var e = 1; e < arguments.length; e++) {
var source = arguments[i]; var t = arguments[e];
for (var key in source) { for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
} }
return target; return n;
}; }, _extends.apply(null, arguments);
return _extends.apply(this, arguments);
} }
;// CONCATENATED MODULE: external ["wp","element"] ;// CONCATENATED MODULE: external ["wp","element"]
var external_wp_element_namespaceObject = window["wp"]["element"]; var external_wp_element_namespaceObject = window["wp"]["element"];
;// CONCATENATED MODULE: external "lodash" ;// CONCATENATED MODULE: external "lodash"

File diff suppressed because one or more lines are too long

View File

@ -737,19 +737,15 @@ function useShortcut(name, callback) {
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
function _extends() { function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) { return _extends = Object.assign ? Object.assign.bind() : function (n) {
for (var i = 1; i < arguments.length; i++) { for (var e = 1; e < arguments.length; e++) {
var source = arguments[i]; var t = arguments[e];
for (var key in source) { for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
} }
return target; return n;
}; }, _extends.apply(null, arguments);
return _extends.apply(this, arguments);
} }
;// CONCATENATED MODULE: ./node_modules/@wordpress/keyboard-shortcuts/build-module/components/shortcut-provider.js ;// CONCATENATED MODULE: ./node_modules/@wordpress/keyboard-shortcuts/build-module/components/shortcut-provider.js

View File

@ -1,2 +1,2 @@
/*! This file is auto-generated */ /*! This file is auto-generated */
!function(){"use strict";var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{ShortcutProvider:function(){return j},__unstableUseShortcutEventMatch:function(){return T},store:function(){return C},useShortcut:function(){return k}});var n={};e.r(n),e.d(n,{registerShortcut:function(){return i},unregisterShortcut:function(){return u}});var r={};e.r(r),e.d(r,{getAllShortcutKeyCombinations:function(){return w},getAllShortcutRawKeyCombinations:function(){return m},getCategoryShortcuts:function(){return R},getShortcutAliases:function(){return b},getShortcutDescription:function(){return S},getShortcutKeyCombination:function(){return g},getShortcutRepresentation:function(){return v}});var o=window.wp.data;var a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REGISTER_SHORTCUT":return{...e,[t.name]:{category:t.category,keyCombination:t.keyCombination,aliases:t.aliases,description:t.description}};case"UNREGISTER_SHORTCUT":const{[t.name]:n,...r}=e;return r}return e};function i(e){let{name:t,category:n,description:r,keyCombination:o,aliases:a}=e;return{type:"REGISTER_SHORTCUT",name:t,category:n,keyCombination:o,aliases:a,description:r}}function u(e){return{type:"UNREGISTER_SHORTCUT",name:e}}var c={};function s(e){return[e]}function l(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function f(e,t){var n,r=t||s;function o(e){var t,r,o,a,i,u=n,s=!0;for(t=0;t<e.length;t++){if(r=e[t],!(i=r)||"object"!=typeof i){s=!1;break}u.has(r)?u=u.get(r):(o=new WeakMap,u.set(r,o),u=o)}return u.has(c)||((a=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=s,u.set(c,a)),u.get(c)}function a(){n=new WeakMap}function i(){var t,n,a,i,u,c=arguments.length;for(i=new Array(c),a=0;a<c;a++)i[a]=arguments[a];for((t=o(u=r.apply(null,i))).isUniqueByDependants||(t.lastDependants&&!l(u,t.lastDependants,0)&&t.clear(),t.lastDependants=u),n=t.head;n;){if(l(n.args,i,1))return n!==t.head&&(n.prev.next=n.next,n.next&&(n.next.prev=n.prev),n.next=t.head,n.prev=null,t.head.prev=n,t.head=n),n.val;n=n.next}return n={val:e.apply(null,i)},i[0]=null,n.args=i,t.head&&(t.head.prev=n,n.next=t.head),t.head=n,n.val}return i.getDependants=r,i.clear=a,a(),i}var d=window.wp.keycodes;const p=[],h={display:d.displayShortcut,raw:d.rawShortcut,ariaLabel:d.shortcutAriaLabel};function y(e,t){return e?e.modifier?h[t][e.modifier](e.character):e.character:null}function g(e,t){return e[t]?e[t].keyCombination:null}function v(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"display";const r=g(e,t);return y(r,n)}function S(e,t){return e[t]?e[t].description:null}function b(e,t){return e[t]&&e[t].aliases?e[t].aliases:p}const w=f(((e,t)=>[g(e,t),...b(e,t)].filter(Boolean)),((e,t)=>[e[t]])),m=f(((e,t)=>w(e,t).map((e=>y(e,"raw")))),((e,t)=>[e[t]])),R=f(((e,t)=>Object.entries(e).filter((e=>{let[,n]=e;return n.category===t})).map((e=>{let[t]=e;return t}))),(e=>[e])),C=(0,o.createReduxStore)("core/keyboard-shortcuts",{reducer:a,actions:n,selectors:r});(0,o.register)(C);var O=window.wp.element;function T(){const{getAllShortcutKeyCombinations:e}=(0,o.useSelect)(C);return function(t,n){return e(t).some((e=>{let{modifier:t,character:r}=e;return d.isKeyboardEvent[t](n,r)}))}}const E=(0,O.createContext)();function k(e,t){let{isDisabled:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=(0,O.useContext)(E),o=T(),a=(0,O.useRef)();a.current=t,(0,O.useEffect)((()=>{if(!n)return r.current.add(t),()=>{r.current.delete(t)};function t(t){o(e,t)&&a.current(t)}}),[e,n])}function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},D.apply(this,arguments)}const{Provider:x}=E;function j(e){const t=(0,O.useRef)(new Set);return(0,O.createElement)(x,{value:t},(0,O.createElement)("div",D({},e,{onKeyDown:function(n){e.onKeyDown&&e.onKeyDown(n);for(const e of t.current)e(n)}})))}(window.wp=window.wp||{}).keyboardShortcuts=t}(); !function(){"use strict";var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{ShortcutProvider:function(){return U},__unstableUseShortcutEventMatch:function(){return E},store:function(){return C},useShortcut:function(){return k}});var n={};e.r(n),e.d(n,{registerShortcut:function(){return u},unregisterShortcut:function(){return i}});var r={};e.r(r),e.d(r,{getAllShortcutKeyCombinations:function(){return w},getAllShortcutRawKeyCombinations:function(){return m},getCategoryShortcuts:function(){return R},getShortcutAliases:function(){return b},getShortcutDescription:function(){return S},getShortcutKeyCombination:function(){return g},getShortcutRepresentation:function(){return v}});var o=window.wp.data;var a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REGISTER_SHORTCUT":return{...e,[t.name]:{category:t.category,keyCombination:t.keyCombination,aliases:t.aliases,description:t.description}};case"UNREGISTER_SHORTCUT":const{[t.name]:n,...r}=e;return r}return e};function u(e){let{name:t,category:n,description:r,keyCombination:o,aliases:a}=e;return{type:"REGISTER_SHORTCUT",name:t,category:n,keyCombination:o,aliases:a,description:r}}function i(e){return{type:"UNREGISTER_SHORTCUT",name:e}}var c={};function s(e){return[e]}function l(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function f(e,t){var n,r=t||s;function o(e){var t,r,o,a,u,i=n,s=!0;for(t=0;t<e.length;t++){if(r=e[t],!(u=r)||"object"!=typeof u){s=!1;break}i.has(r)?i=i.get(r):(o=new WeakMap,i.set(r,o),i=o)}return i.has(c)||((a=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=s,i.set(c,a)),i.get(c)}function a(){n=new WeakMap}function u(){var t,n,a,u,i,c=arguments.length;for(u=new Array(c),a=0;a<c;a++)u[a]=arguments[a];for((t=o(i=r.apply(null,u))).isUniqueByDependants||(t.lastDependants&&!l(i,t.lastDependants,0)&&t.clear(),t.lastDependants=i),n=t.head;n;){if(l(n.args,u,1))return n!==t.head&&(n.prev.next=n.next,n.next&&(n.next.prev=n.prev),n.next=t.head,n.prev=null,t.head.prev=n,t.head=n),n.val;n=n.next}return n={val:e.apply(null,u)},u[0]=null,n.args=u,t.head&&(t.head.prev=n,n.next=t.head),t.head=n,n.val}return u.getDependants=r,u.clear=a,a(),u}var d=window.wp.keycodes;const p=[],h={display:d.displayShortcut,raw:d.rawShortcut,ariaLabel:d.shortcutAriaLabel};function y(e,t){return e?e.modifier?h[t][e.modifier](e.character):e.character:null}function g(e,t){return e[t]?e[t].keyCombination:null}function v(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"display";const r=g(e,t);return y(r,n)}function S(e,t){return e[t]?e[t].description:null}function b(e,t){return e[t]&&e[t].aliases?e[t].aliases:p}const w=f(((e,t)=>[g(e,t),...b(e,t)].filter(Boolean)),((e,t)=>[e[t]])),m=f(((e,t)=>w(e,t).map((e=>y(e,"raw")))),((e,t)=>[e[t]])),R=f(((e,t)=>Object.entries(e).filter((e=>{let[,n]=e;return n.category===t})).map((e=>{let[t]=e;return t}))),(e=>[e])),C=(0,o.createReduxStore)("core/keyboard-shortcuts",{reducer:a,actions:n,selectors:r});(0,o.register)(C);var T=window.wp.element;function E(){const{getAllShortcutKeyCombinations:e}=(0,o.useSelect)(C);return function(t,n){return e(t).some((e=>{let{modifier:t,character:r}=e;return d.isKeyboardEvent[t](n,r)}))}}const O=(0,T.createContext)();function k(e,t){let{isDisabled:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=(0,T.useContext)(O),o=E(),a=(0,T.useRef)();a.current=t,(0,T.useEffect)((()=>{if(!n)return r.current.add(t),()=>{r.current.delete(t)};function t(t){o(e,t)&&a.current(t)}}),[e,n])}function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},D.apply(null,arguments)}const{Provider:x}=O;function U(e){const t=(0,T.useRef)(new Set);return(0,T.createElement)(x,{value:t},(0,T.createElement)("div",D({},e,{onKeyDown:function(n){e.onKeyDown&&e.onKeyDown(n);for(const e of t.current)e(n)}})))}(window.wp=window.wp||{}).keyboardShortcuts=t}();

View File

@ -263,19 +263,15 @@ var memize_default = /*#__PURE__*/__webpack_require__.n(memize);
var external_wp_hooks_namespaceObject = window["wp"]["hooks"]; var external_wp_hooks_namespaceObject = window["wp"]["hooks"];
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
function _extends() { function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) { return _extends = Object.assign ? Object.assign.bind() : function (n) {
for (var i = 1; i < arguments.length; i++) { for (var e = 1; e < arguments.length; e++) {
var source = arguments[i]; var t = arguments[e];
for (var key in source) { for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
} }
return target; return n;
}; }, _extends.apply(null, arguments);
return _extends.apply(this, arguments);
} }
;// CONCATENATED MODULE: external ["wp","compose"] ;// CONCATENATED MODULE: external ["wp","compose"]
var external_wp_compose_namespaceObject = window["wp"]["compose"]; var external_wp_compose_namespaceObject = window["wp"]["compose"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/plugins/build-module/components/plugin-context/index.js ;// CONCATENATED MODULE: ./node_modules/@wordpress/plugins/build-module/components/plugin-context/index.js

View File

@ -1,2 +1,2 @@
/*! This file is auto-generated */ /*! This file is auto-generated */
!function(){var e={9756:function(e){e.exports=function(e,n){var t,r,i=0;function o(){var o,u,s=t,l=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(u=0;u<l;u++)if(s.args[u]!==arguments[u]){s=s.next;continue e}return s!==t&&(s===r&&(r=s.prev),s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=t,s.prev=null,t.prev=s,t=s),s.val}s=s.next}for(o=new Array(l),u=0;u<l;u++)o[u]=arguments[u];return s={args:o,val:e.apply(null,o)},t?(t.prev=s,s.next=t):r=s,i===n.maxSize?(r=r.prev).next=null:i++,t=s,s.val}return n=n||{},o.clear=function(){t=null,r=null,i=0},o}}},n={};function t(r){var i=n[r];if(void 0!==i)return i.exports;var o=n[r]={exports:{}};return e[r](o,o.exports,t),o.exports}t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,{a:n}),n},t.d=function(e,n){for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};!function(){"use strict";t.r(r),t.d(r,{PluginArea:function(){return x},getPlugin:function(){return h},getPlugins:function(){return w},registerPlugin:function(){return f},unregisterPlugin:function(){return v},withPluginContext:function(){return c}});var e=window.wp.element,n=t(9756),i=t.n(n),o=window.wp.hooks;function u(){return u=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},u.apply(this,arguments)}var s=window.wp.compose;const{Consumer:l,Provider:a}=(0,e.createContext)({name:null,icon:null}),c=n=>(0,s.createHigherOrderComponent)((t=>r=>(0,e.createElement)(l,null,(i=>(0,e.createElement)(t,u({},r,n(i,r)))))),"withPluginContext");class p extends e.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){const{name:n,onError:t}=this.props;t&&t(n,e)}render(){return this.state.hasError?null:this.props.children}}var g=window.wp.primitives;var d=(0,e.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(g.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"}));const m={};function f(e,n){if("object"!=typeof n)return console.error("No settings object provided!"),null;if("string"!=typeof e)return console.error("Plugin name must be string."),null;if(!/^[a-z][a-z0-9-]*$/.test(e))return console.error('Plugin name must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: "my-plugin".'),null;m[e]&&console.error(`Plugin "${e}" is already registered.`),n=(0,o.applyFilters)("plugins.registerPlugin",n,e);const{render:t,scope:r}=n;if("function"!=typeof t)return console.error('The "render" property must be specified and must be a valid function.'),null;if(r){if("string"!=typeof r)return console.error("Plugin scope must be string."),null;if(!/^[a-z][a-z0-9-]*$/.test(r))return console.error('Plugin scope must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: "my-page".'),null}return m[e]={name:e,icon:d,...n},(0,o.doAction)("plugins.pluginRegistered",n,e),n}function v(e){if(!m[e])return void console.error('Plugin "'+e+'" is not registered.');const n=m[e];return delete m[e],(0,o.doAction)("plugins.pluginUnregistered",n,e),n}function h(e){return m[e]}function w(e){return Object.values(m).filter((n=>n.scope===e))}class P extends e.Component{constructor(){super(...arguments),this.setPlugins=this.setPlugins.bind(this),this.memoizedContext=i()(((e,n)=>({name:e,icon:n}))),this.state=this.getCurrentPluginsState()}getCurrentPluginsState(){return{plugins:w(this.props.scope).map((e=>{let{icon:n,name:t,render:r}=e;return{Plugin:r,context:this.memoizedContext(t,n)}}))}}componentDidMount(){(0,o.addAction)("plugins.pluginRegistered","core/plugins/plugin-area/plugins-registered",this.setPlugins),(0,o.addAction)("plugins.pluginUnregistered","core/plugins/plugin-area/plugins-unregistered",this.setPlugins)}componentWillUnmount(){(0,o.removeAction)("plugins.pluginRegistered","core/plugins/plugin-area/plugins-registered"),(0,o.removeAction)("plugins.pluginUnregistered","core/plugins/plugin-area/plugins-unregistered")}setPlugins(){this.setState(this.getCurrentPluginsState)}render(){return(0,e.createElement)("div",{style:{display:"none"}},this.state.plugins.map((n=>{let{context:t,Plugin:r}=n;return(0,e.createElement)(a,{key:t.name,value:t},(0,e.createElement)(p,{name:t.name,onError:this.props.onError},(0,e.createElement)(r,null)))})))}}var x=P}(),(window.wp=window.wp||{}).plugins=r}(); !function(){var e={9756:function(e){e.exports=function(e,n){var r,t,i=0;function o(){var o,u,l=r,s=arguments.length;e:for(;l;){if(l.args.length===arguments.length){for(u=0;u<s;u++)if(l.args[u]!==arguments[u]){l=l.next;continue e}return l!==r&&(l===t&&(t=l.prev),l.prev.next=l.next,l.next&&(l.next.prev=l.prev),l.next=r,l.prev=null,r.prev=l,r=l),l.val}l=l.next}for(o=new Array(s),u=0;u<s;u++)o[u]=arguments[u];return l={args:o,val:e.apply(null,o)},r?(r.prev=l,l.next=r):t=l,i===n.maxSize?(t=t.prev).next=null:i++,r=l,l.val}return n=n||{},o.clear=function(){r=null,t=null,i=0},o}}},n={};function r(t){var i=n[t];if(void 0!==i)return i.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,r),o.exports}r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,{a:n}),n},r.d=function(e,n){for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var t={};!function(){"use strict";r.r(t),r.d(t,{PluginArea:function(){return x},getPlugin:function(){return h},getPlugins:function(){return w},registerPlugin:function(){return f},unregisterPlugin:function(){return v},withPluginContext:function(){return c}});var e=window.wp.element,n=r(9756),i=r.n(n),o=window.wp.hooks;function u(){return u=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)({}).hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},u.apply(null,arguments)}var l=window.wp.compose;const{Consumer:s,Provider:a}=(0,e.createContext)({name:null,icon:null}),c=n=>(0,l.createHigherOrderComponent)((r=>t=>(0,e.createElement)(s,null,(i=>(0,e.createElement)(r,u({},t,n(i,t)))))),"withPluginContext");class p extends e.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){const{name:n,onError:r}=this.props;r&&r(n,e)}render(){return this.state.hasError?null:this.props.children}}var g=window.wp.primitives;var d=(0,e.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(g.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"}));const m={};function f(e,n){if("object"!=typeof n)return console.error("No settings object provided!"),null;if("string"!=typeof e)return console.error("Plugin name must be string."),null;if(!/^[a-z][a-z0-9-]*$/.test(e))return console.error('Plugin name must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: "my-plugin".'),null;m[e]&&console.error(`Plugin "${e}" is already registered.`),n=(0,o.applyFilters)("plugins.registerPlugin",n,e);const{render:r,scope:t}=n;if("function"!=typeof r)return console.error('The "render" property must be specified and must be a valid function.'),null;if(t){if("string"!=typeof t)return console.error("Plugin scope must be string."),null;if(!/^[a-z][a-z0-9-]*$/.test(t))return console.error('Plugin scope must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: "my-page".'),null}return m[e]={name:e,icon:d,...n},(0,o.doAction)("plugins.pluginRegistered",n,e),n}function v(e){if(!m[e])return void console.error('Plugin "'+e+'" is not registered.');const n=m[e];return delete m[e],(0,o.doAction)("plugins.pluginUnregistered",n,e),n}function h(e){return m[e]}function w(e){return Object.values(m).filter((n=>n.scope===e))}class P extends e.Component{constructor(){super(...arguments),this.setPlugins=this.setPlugins.bind(this),this.memoizedContext=i()(((e,n)=>({name:e,icon:n}))),this.state=this.getCurrentPluginsState()}getCurrentPluginsState(){return{plugins:w(this.props.scope).map((e=>{let{icon:n,name:r,render:t}=e;return{Plugin:t,context:this.memoizedContext(r,n)}}))}}componentDidMount(){(0,o.addAction)("plugins.pluginRegistered","core/plugins/plugin-area/plugins-registered",this.setPlugins),(0,o.addAction)("plugins.pluginUnregistered","core/plugins/plugin-area/plugins-unregistered",this.setPlugins)}componentWillUnmount(){(0,o.removeAction)("plugins.pluginRegistered","core/plugins/plugin-area/plugins-registered"),(0,o.removeAction)("plugins.pluginUnregistered","core/plugins/plugin-area/plugins-unregistered")}setPlugins(){this.setState(this.getCurrentPluginsState)}render(){return(0,e.createElement)("div",{style:{display:"none"}},this.state.plugins.map((n=>{let{context:r,Plugin:t}=n;return(0,e.createElement)(a,{key:r.name,value:r},(0,e.createElement)(p,{name:r.name,onError:this.props.onError},(0,e.createElement)(t,null)))})))}}var x=P}(),(window.wp=window.wp||{}).plugins=t}();

View File

@ -43,19 +43,15 @@ __webpack_require__.d(__webpack_exports__, {
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
function _extends() { function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) { return _extends = Object.assign ? Object.assign.bind() : function (n) {
for (var i = 1; i < arguments.length; i++) { for (var e = 1; e < arguments.length; e++) {
var source = arguments[i]; var t = arguments[e];
for (var key in source) { for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
} }
return target; return n;
}; }, _extends.apply(null, arguments);
return _extends.apply(this, arguments);
} }
;// CONCATENATED MODULE: external ["wp","element"] ;// CONCATENATED MODULE: external ["wp","element"]
var external_wp_element_namespaceObject = window["wp"]["element"]; var external_wp_element_namespaceObject = window["wp"]["element"];
;// CONCATENATED MODULE: external ["wp","data"] ;// CONCATENATED MODULE: external ["wp","data"]

View File

@ -1,2 +1,2 @@
/*! This file is auto-generated */ /*! This file is auto-generated */
!function(){"use strict";var e={n:function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,{a:r}),r},d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r.apply(this,arguments)}e.d(t,{default:function(){return y}});var n=window.wp.element,o=window.wp.data,l=window.wp.deprecated,s=e.n(l),c=window.lodash,u=window.wp.compose,a=window.wp.i18n,i=window.wp.apiFetch,d=e.n(i),w=window.wp.url,p=window.wp.components,f=window.wp.blocks;function m(e){let{className:t}=e;return(0,n.createElement)(p.Placeholder,{className:t},(0,a.__)("Block rendered as empty."))}function v(e){let{response:t,className:r}=e;const o=(0,a.sprintf)((0,a.__)("Error loading block: %s"),t.errorMsg);return(0,n.createElement)(p.Placeholder,{className:r},o)}function h(e){let{children:t,showLoader:r}=e;return(0,n.createElement)("div",{style:{position:"relative"}},r&&(0,n.createElement)("div",{style:{position:"absolute",top:"50%",left:"50%",marginTop:"-9px",marginLeft:"-9px"}},(0,n.createElement)(p.Spinner,null)),(0,n.createElement)("div",{style:{opacity:r?"0.3":1}},t))}function E(e){const{attributes:t,block:o,className:l,httpMethod:s="GET",urlQueryArgs:a,EmptyResponsePlaceholder:i=m,ErrorResponsePlaceholder:p=v,LoadingResponsePlaceholder:E=h}=e,b=(0,n.useRef)(!0),[g,y]=(0,n.useState)(!1),P=(0,n.useRef)(),[S,R]=(0,n.useState)(null),O=(0,u.usePrevious)(e),[T,_]=(0,n.useState)(!1);function M(){if(!b.current)return;_(!0);const e=t&&(0,f.__experimentalSanitizeBlockAttributes)(o,t),r="POST"===s,n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,w.addQueryArgs)(`/wp/v2/block-renderer/${e}`,{context:"edit",...null!==t?{attributes:t}:{},...r})}(o,r?null:null!=e?e:null,a),l=r?{attributes:null!=e?e:null}:null,c=P.current=d()({path:n,data:l,method:r?"POST":"GET"}).then((e=>{b.current&&c===P.current&&e&&R(e.rendered)})).catch((e=>{b.current&&c===P.current&&R({error:!0,errorMsg:e.message})})).finally((()=>{b.current&&c===P.current&&_(!1)}));return c}const N=(0,u.useDebounce)(M,500);(0,n.useEffect)((()=>()=>{b.current=!1}),[]),(0,n.useEffect)((()=>{void 0===O?M():(0,c.isEqual)(O,e)||N()})),(0,n.useEffect)((()=>{if(!T)return;const e=setTimeout((()=>{y(!0)}),1e3);return()=>clearTimeout(e)}),[T]);const k=!!S,L=""===S,j=null==S?void 0:S.error;return T?(0,n.createElement)(E,r({},e,{showLoader:g}),k&&(0,n.createElement)(n.RawHTML,{className:l},S)):L||!k?(0,n.createElement)(i,e):j?(0,n.createElement)(p,r({response:S},e)):(0,n.createElement)(n.RawHTML,{className:l},S)}const b={},g=(0,o.withSelect)((e=>{const t=e("core/editor");if(t){const e=t.getCurrentPostId();if(e&&"number"==typeof e)return{currentPostId:e}}return b}))((e=>{let{urlQueryArgs:t=b,currentPostId:o,...l}=e;const s=(0,n.useMemo)((()=>o?{post_id:o,...t}:t),[o,t]);return(0,n.createElement)(E,r({urlQueryArgs:s},l))}));window&&window.wp&&window.wp.components&&(window.wp.components.ServerSideRender=(0,n.forwardRef)(((e,t)=>(s()("wp.components.ServerSideRender",{version:"6.2",since:"5.3",alternative:"wp.serverSideRender"}),(0,n.createElement)(g,r({},e,{ref:t}))))));var y=g;(window.wp=window.wp||{}).serverSideRender=t.default}(); !function(){"use strict";var e={n:function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return e.d(t,{a:t}),t},d:function(r,t){for(var n in t)e.o(t,n)&&!e.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:t[n]})},o:function(e,r){return Object.prototype.hasOwnProperty.call(e,r)}},r={};function t(){return t=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},t.apply(null,arguments)}e.d(r,{default:function(){return y}});var n=window.wp.element,o=window.wp.data,l=window.wp.deprecated,s=e.n(l),c=window.lodash,u=window.wp.compose,a=window.wp.i18n,i=window.wp.apiFetch,d=e.n(i),w=window.wp.url,p=window.wp.components,f=window.wp.blocks;function m(e){let{className:r}=e;return(0,n.createElement)(p.Placeholder,{className:r},(0,a.__)("Block rendered as empty."))}function v(e){let{response:r,className:t}=e;const o=(0,a.sprintf)((0,a.__)("Error loading block: %s"),r.errorMsg);return(0,n.createElement)(p.Placeholder,{className:t},o)}function h(e){let{children:r,showLoader:t}=e;return(0,n.createElement)("div",{style:{position:"relative"}},t&&(0,n.createElement)("div",{style:{position:"absolute",top:"50%",left:"50%",marginTop:"-9px",marginLeft:"-9px"}},(0,n.createElement)(p.Spinner,null)),(0,n.createElement)("div",{style:{opacity:t?"0.3":1}},r))}function E(e){const{attributes:r,block:o,className:l,httpMethod:s="GET",urlQueryArgs:a,EmptyResponsePlaceholder:i=m,ErrorResponsePlaceholder:p=v,LoadingResponsePlaceholder:E=h}=e,g=(0,n.useRef)(!0),[b,y]=(0,n.useState)(!1),P=(0,n.useRef)(),[S,R]=(0,n.useState)(null),T=(0,u.usePrevious)(e),[_,O]=(0,n.useState)(!1);function M(){if(!g.current)return;O(!0);const e=r&&(0,f.__experimentalSanitizeBlockAttributes)(o,r),t="POST"===s,n=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,w.addQueryArgs)(`/wp/v2/block-renderer/${e}`,{context:"edit",...null!==r?{attributes:r}:{},...t})}(o,t?null:null!=e?e:null,a),l=t?{attributes:null!=e?e:null}:null,c=P.current=d()({path:n,data:l,method:t?"POST":"GET"}).then((e=>{g.current&&c===P.current&&e&&R(e.rendered)})).catch((e=>{g.current&&c===P.current&&R({error:!0,errorMsg:e.message})})).finally((()=>{g.current&&c===P.current&&O(!1)}));return c}const N=(0,u.useDebounce)(M,500);(0,n.useEffect)((()=>()=>{g.current=!1}),[]),(0,n.useEffect)((()=>{void 0===T?M():(0,c.isEqual)(T,e)||N()})),(0,n.useEffect)((()=>{if(!_)return;const e=setTimeout((()=>{y(!0)}),1e3);return()=>clearTimeout(e)}),[_]);const k=!!S,L=""===S,A=null==S?void 0:S.error;return _?(0,n.createElement)(E,t({},e,{showLoader:b}),k&&(0,n.createElement)(n.RawHTML,{className:l},S)):L||!k?(0,n.createElement)(i,e):A?(0,n.createElement)(p,t({response:S},e)):(0,n.createElement)(n.RawHTML,{className:l},S)}const g={},b=(0,o.withSelect)((e=>{const r=e("core/editor");if(r){const e=r.getCurrentPostId();if(e&&"number"==typeof e)return{currentPostId:e}}return g}))((e=>{let{urlQueryArgs:r=g,currentPostId:o,...l}=e;const s=(0,n.useMemo)((()=>o?{post_id:o,...r}:r),[o,r]);return(0,n.createElement)(E,t({urlQueryArgs:s},l))}));window&&window.wp&&window.wp.components&&(window.wp.components.ServerSideRender=(0,n.forwardRef)(((e,r)=>(s()("wp.components.ServerSideRender",{version:"6.2",since:"5.3",alternative:"wp.serverSideRender"}),(0,n.createElement)(b,t({},e,{ref:r}))))));var y=b;(window.wp=window.wp||{}).serverSideRender=r.default}();

View File

@ -232,19 +232,15 @@ const addDimensionsEventListener = (breakpoints, operators) => {
var external_wp_compose_namespaceObject = window["wp"]["compose"]; var external_wp_compose_namespaceObject = window["wp"]["compose"];
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
function _extends() { function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) { return _extends = Object.assign ? Object.assign.bind() : function (n) {
for (var i = 1; i < arguments.length; i++) { for (var e = 1; e < arguments.length; e++) {
var source = arguments[i]; var t = arguments[e];
for (var key in source) { for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
} }
return target; return n;
}; }, _extends.apply(null, arguments);
return _extends.apply(this, arguments);
} }
;// CONCATENATED MODULE: external ["wp","element"] ;// CONCATENATED MODULE: external ["wp","element"]
var external_wp_element_namespaceObject = window["wp"]["element"]; var external_wp_element_namespaceObject = window["wp"]["element"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/viewport/build-module/with-viewport-match.js ;// CONCATENATED MODULE: ./node_modules/@wordpress/viewport/build-module/with-viewport-match.js

View File

@ -1,2 +1,2 @@
/*! This file is auto-generated */ /*! This file is auto-generated */
!function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{ifViewportMatches:function(){return f},store:function(){return s},withViewportMatch:function(){return h}});var r={};e.r(r),e.d(r,{setIsMatching:function(){return c}});var n={};e.r(n),e.d(n,{isViewportMatch:function(){return u}});var o=window.lodash,i=window.wp.data;var a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_IS_MATCHING"===t.type?t.values:e};function c(e){return{type:"SET_IS_MATCHING",values:e}}function u(e,t){return-1===t.indexOf(" ")&&(t=">= "+t),!!e[t]}const s=(0,i.createReduxStore)("core/viewport",{reducer:a,actions:r,selectors:n});(0,i.register)(s);var d=(e,t)=>{const r=(0,o.debounce)((()=>{const e=(0,o.mapValues)(n,(e=>e.matches));(0,i.dispatch)(s).setIsMatching(e)}),{leading:!0}),n=(0,o.reduce)(e,((e,n,o)=>(Object.entries(t).forEach((t=>{let[i,a]=t;const c=window.matchMedia(`(${a}: ${n}px)`);c.addListener(r);const u=[i,o].join(" ");e[u]=c})),e)),{});window.addEventListener("orientationchange",r),r(),r.flush()},p=window.wp.compose;function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},w.apply(this,arguments)}var l=window.wp.element;var h=e=>(0,p.createHigherOrderComponent)((t=>(0,p.pure)((r=>{const n=(0,o.mapValues)(e,(e=>{let[t,r]=e.split(" ");return void 0===r&&(r=t,t=">="),(0,p.useViewportMatch)(r,t)}));return(0,l.createElement)(t,w({},r,n))}))),"withViewportMatch");var f=e=>(0,p.createHigherOrderComponent)((0,p.compose)([h({isViewportMatch:e}),(0,p.ifCondition)((e=>e.isViewportMatch))]),"ifViewportMatches");d({huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480},{"<":"max-width",">=":"min-width"}),(window.wp=window.wp||{}).viewport=t}(); !function(){"use strict";var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{ifViewportMatches:function(){return f},store:function(){return s},withViewportMatch:function(){return h}});var n={};e.r(n),e.d(n,{setIsMatching:function(){return c}});var r={};e.r(r),e.d(r,{isViewportMatch:function(){return u}});var o=window.lodash,i=window.wp.data;var a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_IS_MATCHING"===t.type?t.values:e};function c(e){return{type:"SET_IS_MATCHING",values:e}}function u(e,t){return-1===t.indexOf(" ")&&(t=">= "+t),!!e[t]}const s=(0,i.createReduxStore)("core/viewport",{reducer:a,actions:n,selectors:r});(0,i.register)(s);var d=(e,t)=>{const n=(0,o.debounce)((()=>{const e=(0,o.mapValues)(r,(e=>e.matches));(0,i.dispatch)(s).setIsMatching(e)}),{leading:!0}),r=(0,o.reduce)(e,((e,r,o)=>(Object.entries(t).forEach((t=>{let[i,a]=t;const c=window.matchMedia(`(${a}: ${r}px)`);c.addListener(n);const u=[i,o].join(" ");e[u]=c})),e)),{});window.addEventListener("orientationchange",n),n(),n.flush()},w=window.wp.compose;function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(null,arguments)}var l=window.wp.element;var h=e=>(0,w.createHigherOrderComponent)((t=>(0,w.pure)((n=>{const r=(0,o.mapValues)(e,(e=>{let[t,n]=e.split(" ");return void 0===n&&(n=t,t=">="),(0,w.useViewportMatch)(n,t)}));return(0,l.createElement)(t,p({},n,r))}))),"withViewportMatch");var f=e=>(0,w.createHigherOrderComponent)((0,w.compose)([h({isViewportMatch:e}),(0,w.ifCondition)((e=>e.isViewportMatch))]),"ifViewportMatches");d({huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480},{"<":"max-width",">=":"min-width"}),(window.wp=window.wp||{}).viewport=t}();