diff --git a/wp-includes/assets/script-loader-packages.min.php b/wp-includes/assets/script-loader-packages.min.php index 14ca580ae7f..e4c53516d48 100644 --- a/wp-includes/assets/script-loader-packages.min.php +++ b/wp-includes/assets/script-loader-packages.min.php @@ -1 +1 @@ - array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => '7032343a947cfccf5608'), 'annotations.min.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'c4843f8e435a9d7a87bb'), 'api-fetch.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '0fa4dabf8bf2c7adf21a'), 'autop.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'dacd785d109317df2707'), 'blob.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '10a1c5c0acdef3d15657'), 'block-directory.min.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '5b7cd5ab23c9d68e0b1e'), 'block-editor.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-shortcode', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '0b143b200d936d0c198c'), 'block-library.min.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => '64f331c99c492d70c17b'), 'block-serialization-default-parser.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '30ffd7e7e199f10b2a6d'), 'blocks.min.js' => array('dependencies' => array('wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-private-apis', 'wp-shortcode'), 'version' => '7204d43123223474471a'), 'commands.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-polyfill', 'wp-primitives', 'wp-private-apis'), 'version' => '07ff2b66990783ecd068'), 'components.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-warning'), 'version' => 'f6e63a4760dcece8b909'), 'compose.min.js' => array('dependencies' => array('react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => '3189b344ff39fef940b7'), 'core-commands.min.js' => array('dependencies' => array('wp-commands', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => 'ade490de79d35734e06d'), 'core-data.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => '99b262137df116eb6013'), 'customize-widgets.min.js' => array('dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-widgets'), 'version' => 'bb454c7f10757887ce5a'), 'data.min.js' => array('dependencies' => array('wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => 'ac94d42fa1999bcf3722'), 'data-controls.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => 'fe4ccc8a1782ea8e2cb1'), 'date.min.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => '936c461ad5dce9c2c8ea'), 'deprecated.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '73ad3591e7bc95f4777a'), 'dom.min.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => '49ff2869626fbeaacc23'), 'dom-ready.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '392bdd43726760d1f3ca'), 'edit-post.min.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-widgets'), 'version' => '6720d8a86f225f3ce492'), 'edit-site.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-router', 'wp-url', 'wp-viewport', 'wp-widgets', 'wp-wordcount'), 'version' => '3d8a50adc6d174b01247'), 'edit-widgets.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '64e3e5b8558ec09ac4ba'), 'editor.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => '3f5791ae786456067a27'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => 'ed1c7604880e8b574b40'), 'escape-html.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '03e27a7b6ae14f7afaa6'), 'format-library.min.js' => array('dependencies' => array('wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => '57955a6a6df65c1fb8b6'), 'hooks.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c6aec9a8d4e5a5d543a1'), 'html-entities.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '36a4a255da7dd2e1bf8e'), 'i18n.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '7701b0c3857f914212ef'), 'is-shallow-equal.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '20c2b06ecf04afb14fee'), 'keyboard-shortcuts.min.js' => array('dependencies' => array('wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => '525da859946d4df24898'), 'keycodes.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => '3460bd0fac9859d6886c'), 'list-reusable-blocks.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '4d77f2834116824e70c8'), 'media-utils.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'bcd60e7a2fb568f38015'), 'notices.min.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '38e88f4b627cf873edd0'), 'nux.min.js' => array('dependencies' => array('wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '59718fab5e39f9dd21b0'), 'patterns.min.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => 'e1f251d36e08fc03cc75'), 'plugins.min.js' => array('dependencies' => array('wp-compose', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => 'c485ff6186cdddabcf91'), 'preferences.min.js' => array('dependencies' => array('wp-a11y', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'ca088ba0a612bff77aa3'), 'preferences-persistence.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => '6c6b220422eb35541489'), 'primitives.min.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => '6984e6eb5d6157c4fe44'), 'priority-queue.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '422e19e9d48b269c5219'), 'private-apis.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '11cb2ebaa70a9f1f0ab5'), 'redux-routine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '0be1b2a6a79703e28531'), 'reusable-blocks.min.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => '5ac513f0f58c78e7f084'), 'rich-text.min.js' => array('dependencies' => array('wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => '6222504ebedf0627981b'), 'router.min.js' => array('dependencies' => array('wp-element', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => 'd1ae6718bab1f7073adb'), 'server-side-render.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '81299db67c0fa2c65479'), 'shortcode.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c128a3008a96e820aa86'), 'style-engine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '17cbc030cba88a42ccb5'), 'token-list.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '199103fc7cec3b9eef5a'), 'undo-manager.min.js' => array('dependencies' => array('wp-is-shallow-equal', 'wp-polyfill'), 'version' => '312610424b40059d9f44'), 'url.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b4979979018b684be209'), 'viewport.min.js' => array('dependencies' => array('wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => '1fbef8175bb335c5603b'), 'warning.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '122829a085511691f14d'), 'widgets.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => '938735ae45e739ac8b70'), 'wordcount.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5a74890fd7c610679e34')); + array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => '7032343a947cfccf5608'), 'annotations.min.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'c4843f8e435a9d7a87bb'), 'api-fetch.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '0fa4dabf8bf2c7adf21a'), 'autop.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'dacd785d109317df2707'), 'blob.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '10a1c5c0acdef3d15657'), 'block-directory.min.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '5b7cd5ab23c9d68e0b1e'), 'block-editor.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-shortcode', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'f0bb1e364b792257eb17'), 'block-library.min.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => '85751c2fc8b706caed42'), 'block-serialization-default-parser.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '30ffd7e7e199f10b2a6d'), 'blocks.min.js' => array('dependencies' => array('wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-private-apis', 'wp-shortcode'), 'version' => '7204d43123223474471a'), 'commands.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-polyfill', 'wp-primitives', 'wp-private-apis'), 'version' => '07ff2b66990783ecd068'), 'components.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-warning'), 'version' => 'f6e63a4760dcece8b909'), 'compose.min.js' => array('dependencies' => array('react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => '3189b344ff39fef940b7'), 'core-commands.min.js' => array('dependencies' => array('wp-commands', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => 'ade490de79d35734e06d'), 'core-data.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => '99b262137df116eb6013'), 'customize-widgets.min.js' => array('dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-widgets'), 'version' => 'bb454c7f10757887ce5a'), 'data.min.js' => array('dependencies' => array('wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => 'ac94d42fa1999bcf3722'), 'data-controls.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => 'fe4ccc8a1782ea8e2cb1'), 'date.min.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => '936c461ad5dce9c2c8ea'), 'deprecated.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '73ad3591e7bc95f4777a'), 'dom.min.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => '49ff2869626fbeaacc23'), 'dom-ready.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '392bdd43726760d1f3ca'), 'edit-post.min.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-widgets'), 'version' => '6720d8a86f225f3ce492'), 'edit-site.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-router', 'wp-url', 'wp-viewport', 'wp-widgets', 'wp-wordcount'), 'version' => '3d8a50adc6d174b01247'), 'edit-widgets.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '64e3e5b8558ec09ac4ba'), 'editor.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => '3f5791ae786456067a27'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => 'ed1c7604880e8b574b40'), 'escape-html.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '03e27a7b6ae14f7afaa6'), 'format-library.min.js' => array('dependencies' => array('wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => '57955a6a6df65c1fb8b6'), 'hooks.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c6aec9a8d4e5a5d543a1'), 'html-entities.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '36a4a255da7dd2e1bf8e'), 'i18n.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '7701b0c3857f914212ef'), 'is-shallow-equal.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '20c2b06ecf04afb14fee'), 'keyboard-shortcuts.min.js' => array('dependencies' => array('wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => '525da859946d4df24898'), 'keycodes.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => '3460bd0fac9859d6886c'), 'list-reusable-blocks.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '4d77f2834116824e70c8'), 'media-utils.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'bcd60e7a2fb568f38015'), 'notices.min.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '38e88f4b627cf873edd0'), 'nux.min.js' => array('dependencies' => array('wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '59718fab5e39f9dd21b0'), 'patterns.min.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => 'e1f251d36e08fc03cc75'), 'plugins.min.js' => array('dependencies' => array('wp-compose', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => 'c485ff6186cdddabcf91'), 'preferences.min.js' => array('dependencies' => array('wp-a11y', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'ca088ba0a612bff77aa3'), 'preferences-persistence.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => '6c6b220422eb35541489'), 'primitives.min.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => '6984e6eb5d6157c4fe44'), 'priority-queue.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '422e19e9d48b269c5219'), 'private-apis.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '11cb2ebaa70a9f1f0ab5'), 'redux-routine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '0be1b2a6a79703e28531'), 'reusable-blocks.min.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => '5ac513f0f58c78e7f084'), 'rich-text.min.js' => array('dependencies' => array('wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => '6222504ebedf0627981b'), 'router.min.js' => array('dependencies' => array('wp-element', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => 'd1ae6718bab1f7073adb'), 'server-side-render.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '81299db67c0fa2c65479'), 'shortcode.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c128a3008a96e820aa86'), 'style-engine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '17cbc030cba88a42ccb5'), 'token-list.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '199103fc7cec3b9eef5a'), 'undo-manager.min.js' => array('dependencies' => array('wp-is-shallow-equal', 'wp-polyfill'), 'version' => '312610424b40059d9f44'), 'url.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b4979979018b684be209'), 'viewport.min.js' => array('dependencies' => array('wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => '1fbef8175bb335c5603b'), 'warning.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '122829a085511691f14d'), 'widgets.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => '938735ae45e739ac8b70'), 'wordcount.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5a74890fd7c610679e34')); diff --git a/wp-includes/assets/script-loader-packages.php b/wp-includes/assets/script-loader-packages.php index 200b4da4cc3..5acede72602 100644 --- a/wp-includes/assets/script-loader-packages.php +++ b/wp-includes/assets/script-loader-packages.php @@ -1 +1 @@ - array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => 'b5ff61edc2245a1950cb'), 'annotations.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'e07c55999fe14e263e21'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '064121ed1abb9ed32a10'), 'autop.js' => array('dependencies' => array('wp-polyfill'), 'version' => '23677b2f336e3c95f3c7'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4279f5e220950400e9e6'), 'block-directory.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '838bfc469bfd175f2d30'), 'block-editor.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-shortcode', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '4bda35ed82cfb8cfb1a7'), 'block-library.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => '91206a4ea737bd15e858'), 'block-serialization-default-parser.js' => array('dependencies' => array('wp-polyfill'), 'version' => '85adf50f9c5f80d14aa1'), 'blocks.js' => array('dependencies' => array('wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-private-apis', 'wp-shortcode'), 'version' => '1e16b1d8cd192ec1a469'), 'commands.js' => array('dependencies' => array('react', 'react-dom', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-polyfill', 'wp-primitives', 'wp-private-apis'), 'version' => '08e1f24b2983f3c8e82b'), 'components.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-warning'), 'version' => '130f16b14b15a9666b83'), 'compose.js' => array('dependencies' => array('react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => '228e7d7fccaae67c220c'), 'core-commands.js' => array('dependencies' => array('wp-commands', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => '375c9e258375693411b6'), 'core-data.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => '77370c9a15a7db2ae084'), 'customize-widgets.js' => array('dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-widgets'), 'version' => '3d725bc7884f48074190'), 'data.js' => array('dependencies' => array('wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => '8cc3798cd1d51807c29d'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => 'd584f6eaf9075247c7ea'), 'date.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => 'a450f07129409f3ea08e'), 'deprecated.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '191d7f3a805131fb5530'), 'dom.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => '94b90b103ee0a85674c5'), 'dom-ready.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'ae5bd6ca23f589f2dac7'), 'edit-post.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-widgets'), 'version' => '57aa460a64bb0e4ae963'), 'edit-site.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-router', 'wp-url', 'wp-viewport', 'wp-widgets', 'wp-wordcount'), 'version' => '2d84293fe492e4b616f3'), 'edit-widgets.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => 'bbec9f93fddd0072dc37'), 'editor.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => 'd4a7ac425a2df2d760ab'), 'element.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => '10b6413a3a6da33b2264'), 'escape-html.js' => array('dependencies' => array('wp-polyfill'), 'version' => '53958a11eeadd4731b85'), 'format-library.js' => array('dependencies' => array('wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => '8328cf5af7fe963d518b'), 'hooks.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c2825736a5a04b1ba4df'), 'html-entities.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5faec882ff4c2ba82326'), 'i18n.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => 'bbbb3a5d0e355b0e5159'), 'is-shallow-equal.js' => array('dependencies' => array('wp-polyfill'), 'version' => '33c5f8741df506b8861c'), 'keyboard-shortcuts.js' => array('dependencies' => array('wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => 'df4eb8a6235f8c883c94'), 'keycodes.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => '063e98669c67a1b84b0a'), 'list-reusable-blocks.js' => array('dependencies' => array('wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '783a65b80a207f8512e0'), 'media-utils.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '9fe3fd6adc6b260619c4'), 'notices.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '6a0c7a42a2154f8fc833'), 'nux.js' => array('dependencies' => array('wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '06d5fb6265946f599a57'), 'patterns.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => '090e4f4ded236c59cbbc'), 'plugins.js' => array('dependencies' => array('wp-compose', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => 'cf9ce5dae9570fdf9714'), 'preferences.js' => array('dependencies' => array('wp-a11y', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '216a088227c020408807'), 'preferences-persistence.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => '3fecc3acbb4b8cafcd8b'), 'primitives.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => '54acc2bc0957cc0c5eec'), 'priority-queue.js' => array('dependencies' => array('wp-polyfill'), 'version' => '3b99a501866912a283bc'), 'private-apis.js' => array('dependencies' => array('wp-polyfill'), 'version' => '58cbfa9c985f4fae85c8'), 'redux-routine.js' => array('dependencies' => array('wp-polyfill'), 'version' => '154d0b98be93c015ec5a'), 'reusable-blocks.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => 'e4bfc13791453a1b3441'), 'rich-text.js' => array('dependencies' => array('wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => 'c71e82c747a462300b9a'), 'router.js' => array('dependencies' => array('wp-element', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => '3b1ce9f5a7a3f2533c5a'), 'server-side-render.js' => array('dependencies' => array('wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '1bbc22fea6fa0f589211'), 'shortcode.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b7f08c06584bded4dc0f'), 'style-engine.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6361bf08f629aa878b50'), 'token-list.js' => array('dependencies' => array('wp-polyfill'), 'version' => '1a112ad50d9adf03b517'), 'undo-manager.js' => array('dependencies' => array('wp-is-shallow-equal', 'wp-polyfill'), 'version' => '93d371a3404ab038187e'), 'url.js' => array('dependencies' => array('wp-polyfill'), 'version' => '2eb43eef60790a73edaf'), 'viewport.js' => array('dependencies' => array('wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => '17785f0820e4397c6dd0'), 'warning.js' => array('dependencies' => array('wp-polyfill'), 'version' => '076655dc9e35a2390851'), 'widgets.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => '356c571dfec340b4b96f'), 'wordcount.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'dcb7244d0a90f704c80d')); + array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => 'b5ff61edc2245a1950cb'), 'annotations.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'e07c55999fe14e263e21'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '064121ed1abb9ed32a10'), 'autop.js' => array('dependencies' => array('wp-polyfill'), 'version' => '23677b2f336e3c95f3c7'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4279f5e220950400e9e6'), 'block-directory.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '838bfc469bfd175f2d30'), 'block-editor.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-shortcode', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '0000f8196d02ac71dbf1'), 'block-library.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => '5693c0562ba37e98efbd'), 'block-serialization-default-parser.js' => array('dependencies' => array('wp-polyfill'), 'version' => '85adf50f9c5f80d14aa1'), 'blocks.js' => array('dependencies' => array('wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-private-apis', 'wp-shortcode'), 'version' => '1e16b1d8cd192ec1a469'), 'commands.js' => array('dependencies' => array('react', 'react-dom', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-polyfill', 'wp-primitives', 'wp-private-apis'), 'version' => '08e1f24b2983f3c8e82b'), 'components.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-warning'), 'version' => '130f16b14b15a9666b83'), 'compose.js' => array('dependencies' => array('react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => '228e7d7fccaae67c220c'), 'core-commands.js' => array('dependencies' => array('wp-commands', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => '375c9e258375693411b6'), 'core-data.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => '77370c9a15a7db2ae084'), 'customize-widgets.js' => array('dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-widgets'), 'version' => '3d725bc7884f48074190'), 'data.js' => array('dependencies' => array('wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => '8cc3798cd1d51807c29d'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => 'd584f6eaf9075247c7ea'), 'date.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => 'a450f07129409f3ea08e'), 'deprecated.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '191d7f3a805131fb5530'), 'dom.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => '94b90b103ee0a85674c5'), 'dom-ready.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'ae5bd6ca23f589f2dac7'), 'edit-post.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-widgets'), 'version' => '57aa460a64bb0e4ae963'), 'edit-site.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-router', 'wp-url', 'wp-viewport', 'wp-widgets', 'wp-wordcount'), 'version' => '2d84293fe492e4b616f3'), 'edit-widgets.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => 'bbec9f93fddd0072dc37'), 'editor.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => 'd4a7ac425a2df2d760ab'), 'element.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => '10b6413a3a6da33b2264'), 'escape-html.js' => array('dependencies' => array('wp-polyfill'), 'version' => '53958a11eeadd4731b85'), 'format-library.js' => array('dependencies' => array('wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => '8328cf5af7fe963d518b'), 'hooks.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c2825736a5a04b1ba4df'), 'html-entities.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5faec882ff4c2ba82326'), 'i18n.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => 'bbbb3a5d0e355b0e5159'), 'is-shallow-equal.js' => array('dependencies' => array('wp-polyfill'), 'version' => '33c5f8741df506b8861c'), 'keyboard-shortcuts.js' => array('dependencies' => array('wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => 'df4eb8a6235f8c883c94'), 'keycodes.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => '063e98669c67a1b84b0a'), 'list-reusable-blocks.js' => array('dependencies' => array('wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '783a65b80a207f8512e0'), 'media-utils.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '9fe3fd6adc6b260619c4'), 'notices.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '6a0c7a42a2154f8fc833'), 'nux.js' => array('dependencies' => array('wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '06d5fb6265946f599a57'), 'patterns.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => '090e4f4ded236c59cbbc'), 'plugins.js' => array('dependencies' => array('wp-compose', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => 'cf9ce5dae9570fdf9714'), 'preferences.js' => array('dependencies' => array('wp-a11y', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '216a088227c020408807'), 'preferences-persistence.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => '3fecc3acbb4b8cafcd8b'), 'primitives.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => '54acc2bc0957cc0c5eec'), 'priority-queue.js' => array('dependencies' => array('wp-polyfill'), 'version' => '3b99a501866912a283bc'), 'private-apis.js' => array('dependencies' => array('wp-polyfill'), 'version' => '58cbfa9c985f4fae85c8'), 'redux-routine.js' => array('dependencies' => array('wp-polyfill'), 'version' => '154d0b98be93c015ec5a'), 'reusable-blocks.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => 'e4bfc13791453a1b3441'), 'rich-text.js' => array('dependencies' => array('wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => 'c71e82c747a462300b9a'), 'router.js' => array('dependencies' => array('wp-element', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => '3b1ce9f5a7a3f2533c5a'), 'server-side-render.js' => array('dependencies' => array('wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '1bbc22fea6fa0f589211'), 'shortcode.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b7f08c06584bded4dc0f'), 'style-engine.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6361bf08f629aa878b50'), 'token-list.js' => array('dependencies' => array('wp-polyfill'), 'version' => '1a112ad50d9adf03b517'), 'undo-manager.js' => array('dependencies' => array('wp-is-shallow-equal', 'wp-polyfill'), 'version' => '93d371a3404ab038187e'), 'url.js' => array('dependencies' => array('wp-polyfill'), 'version' => '2eb43eef60790a73edaf'), 'viewport.js' => array('dependencies' => array('wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => '17785f0820e4397c6dd0'), 'warning.js' => array('dependencies' => array('wp-polyfill'), 'version' => '076655dc9e35a2390851'), 'widgets.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => '356c571dfec340b4b96f'), 'wordcount.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'dcb7244d0a90f704c80d')); diff --git a/wp-includes/blocks/query-pagination-next.php b/wp-includes/blocks/query-pagination-next.php index fe22410c246..768fde56ff0 100644 --- a/wp-includes/blocks/query-pagination-next.php +++ b/wp-includes/blocks/query-pagination-next.php @@ -63,7 +63,7 @@ function render_block_core_query_pagination_next( $attributes, $content, $block wp_reset_postdata(); // Restore original Post Data. } - if ( $enhanced_pagination ) { + if ( $enhanced_pagination && isset( $content ) ) { $p = new WP_HTML_Tag_Processor( $content ); if ( $p->next_tag( array( diff --git a/wp-includes/blocks/query-pagination-previous.php b/wp-includes/blocks/query-pagination-previous.php index dc61f5d38b2..fc1fee08e82 100644 --- a/wp-includes/blocks/query-pagination-previous.php +++ b/wp-includes/blocks/query-pagination-previous.php @@ -51,7 +51,7 @@ function render_block_core_query_pagination_previous( $attributes, $content, $bl ); } - if ( $enhanced_pagination ) { + if ( $enhanced_pagination && isset( $content ) ) { $p = new WP_HTML_Tag_Processor( $content ); if ( $p->next_tag( array( diff --git a/wp-includes/blocks/query.php b/wp-includes/blocks/query.php index 1b05e9c92c9..bfe4833c4c8 100644 --- a/wp-includes/blocks/query.php +++ b/wp-includes/blocks/query.php @@ -10,14 +10,14 @@ * * @since 6.4.0 * - * @param array $attributes Block attributes. - * @param string $content Block default content. - * @param string $block Block instance. + * @param array $attributes Block attributes. + * @param string $content Block default content. + * @param WP_Block $block The block instance. * * @return string Returns the modified output of the query block. */ function render_block_core_query( $attributes, $content, $block ) { - if ( $attributes['enhancedPagination'] ) { + if ( $attributes['enhancedPagination'] && isset( $attributes['queryId'] ) ) { $p = new WP_HTML_Tag_Processor( $content ); if ( $p->next_tag() ) { // Add the necessary directives. @@ -48,7 +48,7 @@ function render_block_core_query( $attributes, $content, $block ) { $content = substr_replace( $content, '
@@ -67,11 +67,14 @@ class="wp-block-query__enhanced-pagination-animation" if ( ! wp_script_is( $view_asset ) ) { $script_handles = $block->block_type->view_script_handles; // If the script is not needed, and it is still in the `view_script_handles`, remove it. - if ( ! $attributes['enhancedPagination'] && in_array( $view_asset, $script_handles, true ) ) { + if ( + ( ! $attributes['enhancedPagination'] || ! isset( $attributes['queryId'] ) ) + && in_array( $view_asset, $script_handles, true ) + ) { $block->block_type->view_script_handles = array_diff( $script_handles, array( $view_asset ) ); } // If the script is needed, but it was previously removed, add it again. - if ( $attributes['enhancedPagination'] && ! in_array( $view_asset, $script_handles, true ) ) { + if ( $attributes['enhancedPagination'] && isset( $attributes['queryId'] ) && ! in_array( $view_asset, $script_handles, true ) ) { $block->block_type->view_script_handles = array_merge( $script_handles, array( $view_asset ) ); } } @@ -80,11 +83,14 @@ class="wp-block-query__enhanced-pagination-animation" if ( ! wp_style_is( $style_asset ) ) { $style_handles = $block->block_type->style_handles; // If the styles are not needed, and they are still in the `style_handles`, remove them. - if ( ! $attributes['enhancedPagination'] && in_array( $style_asset, $style_handles, true ) ) { + if ( + ( ! $attributes['enhancedPagination'] || ! isset( $attributes['queryId'] ) ) + && in_array( $style_asset, $style_handles, true ) + ) { $block->block_type->style_handles = array_diff( $style_handles, array( $style_asset ) ); } // If the styles are needed, but they were previously removed, add them again. - if ( $attributes['enhancedPagination'] && ! in_array( $style_asset, $style_handles, true ) ) { + if ( $attributes['enhancedPagination'] && isset( $attributes['queryId'] ) && ! in_array( $style_asset, $style_handles, true ) ) { $block->block_type->style_handles = array_merge( $style_handles, array( $style_asset ) ); } } @@ -123,3 +129,86 @@ function register_block_core_query() { ); } add_action( 'init', 'register_block_core_query' ); + +/** + * Traverse the tree of blocks looking for any plugin block (i.e., a block from + * an installed plugin) inside a Query block with the enhanced pagination + * enabled. If at least one is found, the enhanced pagination is effectively + * disabled to prevent any potential incompatibilities. + * + * @since 6.4.0 + * + * @param array $parsed_block The block being rendered. + * @return string Returns the parsed block, unmodified. + */ +function block_core_query_disable_enhanced_pagination( $parsed_block ) { + static $enhanced_query_stack = array(); + static $dirty_enhanced_queries = array(); + static $render_query_callback = null; + + $block_name = $parsed_block['blockName']; + + if ( + 'core/query' === $block_name && + isset( $parsed_block['attrs']['enhancedPagination'] ) && + true === $parsed_block['attrs']['enhancedPagination'] && + isset( $parsed_block['attrs']['queryId'] ) + ) { + $enhanced_query_stack[] = $parsed_block['attrs']['queryId']; + + if ( ! isset( $render_query_callback ) ) { + /** + * Filter that disables the enhanced pagination feature during block + * rendering when a plugin block has been found inside. It does so + * by adding an attribute called `data-wp-navigation-disabled` which + * is later handled by the front-end logic. + * + * @param string $content The block content. + * @param array $block The full block, including name and attributes. + * @return string Returns the modified output of the query block. + */ + $render_query_callback = static function ( $content, $block ) use ( &$enhanced_query_stack, &$dirty_enhanced_queries, &$render_query_callback ) { + $has_enhanced_pagination = + isset( $block['attrs']['enhancedPagination'] ) && + true === $block['attrs']['enhancedPagination'] && + isset( $block['attrs']['queryId'] ); + + if ( ! $has_enhanced_pagination ) { + return $content; + } + + if ( isset( $dirty_enhanced_queries[ $block['attrs']['queryId'] ] ) ) { + $p = new WP_HTML_Tag_Processor( $content ); + if ( $p->next_tag() ) { + $p->set_attribute( 'data-wp-navigation-disabled', 'true' ); + } + $content = $p->get_updated_html(); + $dirty_enhanced_queries[ $block['attrs']['queryId'] ] = null; + } + + array_pop( $enhanced_query_stack ); + + if ( empty( $enhanced_query_stack ) ) { + remove_filter( 'render_block_core/query', $render_query_callback ); + $render_query_callback = null; + } + + return $content; + }; + + add_filter( 'render_block_core/query', $render_query_callback, 10, 2 ); + } + } elseif ( + ! empty( $enhanced_query_stack ) && + isset( $block_name ) && + ( ! str_starts_with( $block_name, 'core/' ) || 'core/post-content' === $block_name ) + ) { + foreach ( $enhanced_query_stack as $query_id ) { + $dirty_enhanced_queries[ $query_id ] = true; + } + } + + return $parsed_block; +} + +add_filter( 'render_block_data', 'block_core_query_disable_enhanced_pagination', 10, 1 ); diff --git a/wp-includes/blocks/query/style-rtl.css b/wp-includes/blocks/query/style-rtl.css index b88bd6eb04b..cfd727e18cf 100644 --- a/wp-includes/blocks/query/style-rtl.css +++ b/wp-includes/blocks/query/style-rtl.css @@ -39,14 +39,4 @@ to{ opacity:0; } -} -.wp-block-query__enhanced-pagination-navigation-announce{ - clip:rect(0, 0, 0, 0); - border:0; - height:1px; - margin:-1px; - overflow:hidden; - padding:0; - position:absolute; - width:1px; } \ No newline at end of file diff --git a/wp-includes/blocks/query/style-rtl.min.css b/wp-includes/blocks/query/style-rtl.min.css index 7b6f810e9de..6849acfd12e 100644 --- a/wp-includes/blocks/query/style-rtl.min.css +++ b/wp-includes/blocks/query/style-rtl.min.css @@ -1 +1 @@ -.wp-block-query__enhanced-pagination-animation{background-color:var(--wp--preset--color--primary,#000);height:4px;margin:0;max-width:100vw!important;opacity:0;padding:0;position:fixed;right:0;top:0;width:100vw}.wp-block-query__enhanced-pagination-animation.start-animation{animation:wp-block-query__enhanced-pagination-start-animation 30s cubic-bezier(.03,.5,0,1) forwards}.wp-block-query__enhanced-pagination-animation.finish-animation{animation:wp-block-query__enhanced-pagination-finish-animation .3s ease-in}@keyframes wp-block-query__enhanced-pagination-start-animation{0%{opacity:1;transform:scaleX(0);transform-origin:100% 0}to{opacity:1;transform:scaleX(1);transform-origin:100% 0}}@keyframes wp-block-query__enhanced-pagination-finish-animation{0%{opacity:1}50%{opacity:1}to{opacity:0}}.wp-block-query__enhanced-pagination-navigation-announce{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px} \ No newline at end of file +.wp-block-query__enhanced-pagination-animation{background-color:var(--wp--preset--color--primary,#000);height:4px;margin:0;max-width:100vw!important;opacity:0;padding:0;position:fixed;right:0;top:0;width:100vw}.wp-block-query__enhanced-pagination-animation.start-animation{animation:wp-block-query__enhanced-pagination-start-animation 30s cubic-bezier(.03,.5,0,1) forwards}.wp-block-query__enhanced-pagination-animation.finish-animation{animation:wp-block-query__enhanced-pagination-finish-animation .3s ease-in}@keyframes wp-block-query__enhanced-pagination-start-animation{0%{opacity:1;transform:scaleX(0);transform-origin:100% 0}to{opacity:1;transform:scaleX(1);transform-origin:100% 0}}@keyframes wp-block-query__enhanced-pagination-finish-animation{0%{opacity:1}50%{opacity:1}to{opacity:0}} \ No newline at end of file diff --git a/wp-includes/blocks/query/style.css b/wp-includes/blocks/query/style.css index 03cbe0d825c..241cdc8b9f0 100644 --- a/wp-includes/blocks/query/style.css +++ b/wp-includes/blocks/query/style.css @@ -39,14 +39,4 @@ to{ opacity:0; } -} -.wp-block-query__enhanced-pagination-navigation-announce{ - clip:rect(0, 0, 0, 0); - border:0; - height:1px; - margin:-1px; - overflow:hidden; - padding:0; - position:absolute; - width:1px; } \ No newline at end of file diff --git a/wp-includes/blocks/query/style.min.css b/wp-includes/blocks/query/style.min.css index 6aa684cf425..7627634637e 100644 --- a/wp-includes/blocks/query/style.min.css +++ b/wp-includes/blocks/query/style.min.css @@ -1 +1 @@ -.wp-block-query__enhanced-pagination-animation{background-color:var(--wp--preset--color--primary,#000);height:4px;left:0;margin:0;max-width:100vw!important;opacity:0;padding:0;position:fixed;top:0;width:100vw}.wp-block-query__enhanced-pagination-animation.start-animation{animation:wp-block-query__enhanced-pagination-start-animation 30s cubic-bezier(.03,.5,0,1) forwards}.wp-block-query__enhanced-pagination-animation.finish-animation{animation:wp-block-query__enhanced-pagination-finish-animation .3s ease-in}@keyframes wp-block-query__enhanced-pagination-start-animation{0%{opacity:1;transform:scaleX(0);transform-origin:0 0}to{opacity:1;transform:scaleX(1);transform-origin:0 0}}@keyframes wp-block-query__enhanced-pagination-finish-animation{0%{opacity:1}50%{opacity:1}to{opacity:0}}.wp-block-query__enhanced-pagination-navigation-announce{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px} \ No newline at end of file +.wp-block-query__enhanced-pagination-animation{background-color:var(--wp--preset--color--primary,#000);height:4px;left:0;margin:0;max-width:100vw!important;opacity:0;padding:0;position:fixed;top:0;width:100vw}.wp-block-query__enhanced-pagination-animation.start-animation{animation:wp-block-query__enhanced-pagination-start-animation 30s cubic-bezier(.03,.5,0,1) forwards}.wp-block-query__enhanced-pagination-animation.finish-animation{animation:wp-block-query__enhanced-pagination-finish-animation .3s ease-in}@keyframes wp-block-query__enhanced-pagination-start-animation{0%{opacity:1;transform:scaleX(0);transform-origin:0 0}to{opacity:1;transform:scaleX(1);transform-origin:0 0}}@keyframes wp-block-query__enhanced-pagination-finish-animation{0%{opacity:1}50%{opacity:1}to{opacity:0}} \ No newline at end of file diff --git a/wp-includes/blocks/query/view.asset.php b/wp-includes/blocks/query/view.asset.php index a4a7cfd13fd..09db564cf3d 100644 --- a/wp-includes/blocks/query/view.asset.php +++ b/wp-includes/blocks/query/view.asset.php @@ -1 +1 @@ - array(), 'version' => '19b95fd73ecd65d97c60'); + array(), 'version' => 'f932eea8999458215fe1'); diff --git a/wp-includes/blocks/query/view.js b/wp-includes/blocks/query/view.js index eb1c3e0e511..55083bf1ac3 100644 --- a/wp-includes/blocks/query/view.js +++ b/wp-includes/blocks/query/view.js @@ -40,7 +40,8 @@ const isValidEvent = event => event.button === 0 && ref, context }) => { - if (isValidLink(ref) && isValidEvent(event)) { + const isDisabled = ref.closest('[data-wp-navigation-id]')?.dataset.wpNavigationDisabled; + if (isValidLink(ref) && isValidEvent(event) && !isDisabled) { event.preventDefault(); const id = ref.closest('[data-wp-navigation-id]').dataset.wpNavigationId; @@ -69,7 +70,8 @@ const isValidEvent = event => event.button === 0 && prefetch: async ({ ref }) => { - if (isValidLink(ref)) { + const isDisabled = ref.closest('[data-wp-navigation-id]')?.dataset.wpNavigationDisabled; + if (isValidLink(ref) && !isDisabled) { await (0,_wordpress_interactivity__WEBPACK_IMPORTED_MODULE_0__/* .prefetch */ .tL)(ref.href); } } diff --git a/wp-includes/blocks/query/view.min.asset.php b/wp-includes/blocks/query/view.min.asset.php index 488f30ebbfb..c028c0e199c 100644 --- a/wp-includes/blocks/query/view.min.asset.php +++ b/wp-includes/blocks/query/view.min.asset.php @@ -1 +1 @@ - array(), 'version' => '3dd5dbc0a377c7b7336f'); + array(), 'version' => 'ecab5647d5d9321e0101'); diff --git a/wp-includes/blocks/query/view.min.js b/wp-includes/blocks/query/view.min.js index 58826fa3edc..be86dbf60e7 100644 --- a/wp-includes/blocks/query/view.min.js +++ b/wp-includes/blocks/query/view.min.js @@ -1 +1 @@ -"use strict";(self.__WordPressPrivateInteractivityAPI__=self.__WordPressPrivateInteractivityAPI__||[]).push([[155],{890:function(e,t,r){var a=r(754);const o=e=>e&&e instanceof window.HTMLAnchorElement&&e.href&&(!e.target||"_self"===e.target)&&e.origin===window.location.origin;(0,a.h)({selectors:{core:{query:{startAnimation:({context:e})=>"start"===e.core.query.animation,finishAnimation:({context:e})=>"finish"===e.core.query.animation}}},actions:{core:{query:{navigate:async({event:e,ref:t,context:r})=>{if(o(t)&&(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.altKey||e.shiftKey||e.defaultPrevented))(e)){e.preventDefault();const o=t.closest("[data-wp-navigation-id]").dataset.wpNavigationId,i=setTimeout((()=>{r.core.query.message=r.core.query.loadingText,r.core.query.animation="start"}),400);await(0,a.c4)(t.href),clearTimeout(i),r.core.query.message=r.core.query.loadedText+(r.core.query.message===r.core.query.loadedText?" ":""),r.core.query.animation="finish",r.core.query.url=t.href;const n=`[data-wp-navigation-id=${o}] .wp-block-post-template a[href]`;document.querySelector(n)?.focus()}},prefetch:async({ref:e})=>{o(e)&&await(0,a.tL)(e.href)}}}},effects:{core:{query:{prefetch:async({ref:e,context:t})=>{t.core.query.url&&o(e)&&await(0,a.tL)(e.href)}}}}})}},function(e){var t;t=890,e(e.s=t)}]); \ No newline at end of file +"use strict";(self.__WordPressPrivateInteractivityAPI__=self.__WordPressPrivateInteractivityAPI__||[]).push([[155],{890:function(e,t,a){var r=a(754);const i=e=>e&&e instanceof window.HTMLAnchorElement&&e.href&&(!e.target||"_self"===e.target)&&e.origin===window.location.origin;(0,r.h)({selectors:{core:{query:{startAnimation:({context:e})=>"start"===e.core.query.animation,finishAnimation:({context:e})=>"finish"===e.core.query.animation}}},actions:{core:{query:{navigate:async({event:e,ref:t,context:a})=>{const o=t.closest("[data-wp-navigation-id]")?.dataset.wpNavigationDisabled;if(i(t)&&(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.altKey||e.shiftKey||e.defaultPrevented))(e)&&!o){e.preventDefault();const i=t.closest("[data-wp-navigation-id]").dataset.wpNavigationId,o=setTimeout((()=>{a.core.query.message=a.core.query.loadingText,a.core.query.animation="start"}),400);await(0,r.c4)(t.href),clearTimeout(o),a.core.query.message=a.core.query.loadedText+(a.core.query.message===a.core.query.loadedText?" ":""),a.core.query.animation="finish",a.core.query.url=t.href;const n=`[data-wp-navigation-id=${i}] .wp-block-post-template a[href]`;document.querySelector(n)?.focus()}},prefetch:async({ref:e})=>{const t=e.closest("[data-wp-navigation-id]")?.dataset.wpNavigationDisabled;i(e)&&!t&&await(0,r.tL)(e.href)}}}},effects:{core:{query:{prefetch:async({ref:e,context:t})=>{t.core.query.url&&i(e)&&await(0,r.tL)(e.href)}}}}})}},function(e){var t;t=890,e(e.s=t)}]); \ No newline at end of file diff --git a/wp-includes/js/dist/block-editor.js b/wp-includes/js/dist/block-editor.js index 949391360cb..3eb279a9e1a 100644 --- a/wp-includes/js/dist/block-editor.js +++ b/wp-includes/js/dist/block-editor.js @@ -58425,12 +58425,12 @@ function ImageSettingsPanel({ // Global Styles. , { hasValue: () => !!value?.lightbox, - label: (0,external_wp_i18n_namespaceObject.__)('Expand on Click'), + label: (0,external_wp_i18n_namespaceObject.__)('Expand on click'), onDeselect: resetLightbox, isShownByDefault: true, panelId: panelId }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { - label: (0,external_wp_i18n_namespaceObject.__)('Expand on Click'), + label: (0,external_wp_i18n_namespaceObject.__)('Expand on click'), checked: lightboxChecked, onChange: onChangeLightbox })))); diff --git a/wp-includes/js/dist/block-editor.min.js b/wp-includes/js/dist/block-editor.min.js index 537a4a85326..f9a1d529301 100644 --- a/wp-includes/js/dist/block-editor.min.js +++ b/wp-includes/js/dist/block-editor.min.js @@ -38,4 +38,4 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ -var MC=function(e,t){return MC=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},MC(e,t)};var PC=function(){return PC=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0})).join(" ").trim()}var $C=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=Xa().createRef(),n.videoRef=Xa().createRef(),n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc="undefined"!=typeof document?document:null,n.currentWindow="undefined"!=typeof window?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.initResizeObserver=function(){if(void 0!==window.ResizeObserver&&n.containerRef){var e=!0;n.resizeObserver=new window.ResizeObserver((function(t){e?e=!1:n.computeSizes()})),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var e=n.computeSizes();e&&(n.emitCropData(),n.setInitialCrop(e)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(e){if(n.props.initialCroppedAreaPercentages){var t=function(e,t,n,o,r,l){var i=HC(t.width,t.height,n),a=GC(o.width/i.width*(100/e.width),r,l);return{crop:{x:a*i.width/2-o.width/2-i.width*a*(e.x/100),y:a*i.height/2-o.height/2-i.height*a*(e.y/100)},zoom:a}}(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),o=t.crop,r=t.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(r)}else if(n.props.initialCroppedAreaPixels){var l=function(e,t,n,o,r,l){void 0===n&&(n=0);var i=HC(t.naturalWidth,t.naturalHeight,n),a=GC(function(e,t,n){var o=function(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}(t);return n.height>n.width?n.height/(e.height*o):n.width/(e.width*o)}(e,t,o),r,l),s=o.height>o.width?o.height/e.height:o.width/e.width;return{crop:{x:((i.width-e.width)/2-e.x)*s,y:((i.height-e.height)/2-e.y)*s},zoom:a}}(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);o=l.crop,r=l.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(r)}},n.computeSizes=function(){var e,t,o,r,l,i,a=n.imageRef.current||n.videoRef.current;if(a&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect();var s=n.containerRect.width/n.containerRect.height,c=(null===(e=n.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef.current)||void 0===t?void 0:t.videoWidth)||0,u=(null===(o=n.imageRef.current)||void 0===o?void 0:o.naturalHeight)||(null===(r=n.videoRef.current)||void 0===r?void 0:r.videoHeight)||0,d=c/u,p=void 0;if(a.offsetWidthd?{width:n.containerRect.height*d,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/d};break;case"horizontal-cover":p={width:n.containerRect.width,height:n.containerRect.width/d};break;case"vertical-cover":p={width:n.containerRect.height*d,height:n.containerRect.height};break;case"auto-cover":p=c>u?{width:n.containerRect.width,height:n.containerRect.width/d}:{width:n.containerRect.height*d,height:n.containerRect.height}}else p={width:a.offsetWidth,height:a.offsetHeight};n.mediaSize=PC(PC({},p),{naturalWidth:c,naturalHeight:u}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var m=n.props.cropSize?n.props.cropSize:function(e,t,n,o,r,l){void 0===l&&(l=0);var i=HC(e,t,l),a=i.width,s=i.height,c=Math.min(a,n),u=Math.min(s,o);return c>u*r?{width:u*r,height:u}:{width:c,height:c/r}}(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(null===(l=n.state.cropSize)||void 0===l?void 0:l.height)===m.height&&(null===(i=n.state.cropSize)||void 0===i?void 0:i.width)===m.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(m),n.setState({cropSize:m},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(m),m}},n.onMouseDown=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.onDragStart(t.getMousePoint(e)))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onTouchStart=function(e){n.currentDoc&&(n.isTouching=!0,n.props.onTouchRequest&&!n.props.onTouchRequest(e)||(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0]))))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onGestureStart=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(e){if(e.preventDefault(),!n.isTouching){var o=t.getMousePoint(e),r=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(r,o,{shouldUpdatePosition:!0}),n.props.onRotationChange){var l=n.gestureRotationStart+e.rotation;n.props.onRotationChange(l)}}},n.onGestureEnd=function(e){n.cleanEvents()},n.onDragStart=function(e){var t,o,r=e.x,l=e.y;n.dragStartPosition={x:r,y:l},n.dragStartCrop=PC({},n.props.crop),null===(o=(t=n.props).onInteractionStart)||void 0===o||o.call(t)},n.onDrag=function(e){var t=e.x,o=e.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==o){var e=t-n.dragStartPosition.x,r=o-n.dragStartPosition.y,l={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+r},i=n.props.restrictPosition?RC(l,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):l;n.props.onCropChange(i)}})))},n.onDragStopped=function(){var e,t;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){if(n.currentWindow&&(!n.props.onWheelRequest||n.props.onWheelRequest(e))){e.preventDefault();var o=t.getMousePoint(e),r=LC()(e).pixelY,l=n.props.zoom-r*n.props.zoomSpeed/200;n.setNewZoom(l,o,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)}},n.getPointOnContainer=function(e){var t=e.x,o=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(t-n.containerRect.left),y:n.containerRect.height/2-(o-n.containerRect.top)}},n.getPointOnMedia=function(e){var t=e.x,o=e.y,r=n.props,l=r.crop,i=r.zoom;return{x:(t+l.x)/i,y:(o+l.y)/i}},n.setNewZoom=function(e,t,o){var r=(void 0===o?{}:o).shouldUpdatePosition,l=void 0===r||r;if(n.state.cropSize&&n.props.onZoomChange){var i=GC(e,n.props.minZoom,n.props.maxZoom);if(l){var a=n.getPointOnContainer(t),s=n.getPointOnMedia(a),c={x:s.x*i-a.x,y:s.y*i-a.y},u=n.props.restrictPosition?RC(c,n.mediaSize,n.state.cropSize,i,n.props.rotation):c;n.props.onCropChange(u)}n.props.onZoomChange(i)}},n.getCropData=function(){return n.state.cropSize?function(e,t,n,o,r,l,i){void 0===l&&(l=0),void 0===i&&(i=!0);var a=i?zC:VC,s=HC(t.width,t.height,l),c=HC(t.naturalWidth,t.naturalHeight,l),u={x:a(100,((s.width-n.width/r)/2-e.x/r)/s.width*100),y:a(100,((s.height-n.height/r)/2-e.y/r)/s.height*100),width:a(100,n.width/s.width*100/r),height:a(100,n.height/s.height*100/r)},d=Math.round(a(c.width,u.width*c.width/100)),p=Math.round(a(c.height,u.height*c.height/100)),m=c.width>=c.height*o?{width:Math.round(p*o),height:p}:{width:d,height:Math.round(d/o)};return{croppedAreaPercentages:u,croppedAreaPixels:PC(PC({},m),{x:Math.round(a(c.width-m.width,u.x*c.width/100)),y:Math.round(a(c.height-m.height,u.y*c.height/100))})}}(n.props.restrictPosition?RC(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,o=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,o),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,o)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,o=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,o)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?RC(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n}return function(e,t){function n(){this.constructor=e}MC(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){this.currentDoc&&this.currentWindow&&(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),void 0===window.ResizeObserver&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},t.prototype.componentWillUnmount=function(){var e,t;this.currentDoc&&this.currentWindow&&(void 0===window.ResizeObserver&&this.currentWindow.removeEventListener("resize",this.computeSizes),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null===(t=this.styleRef.parentNode)||void 0===t||t.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(e){var t,n,o,r,l,i,a,s,c;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(o=e.cropSize)||void 0===o?void 0:o.width)!==(null===(r=this.props.cropSize)||void 0===r?void 0:r.width)?this.computeSizes():(null===(l=e.crop)||void 0===l?void 0:l.x)===(null===(i=this.props.crop)||void 0===i?void 0:i.x)&&(null===(a=e.crop)||void 0===a?void 0:a.y)===(null===(s=this.props.crop)||void 0===s?void 0:s.y)||this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(c=this.videoRef.current)||void 0===c||c.load())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=DC(n,o),this.lastPinchRotation=OC(n,o),this.onDragStart(FC(n,o))},t.prototype.onPinchMove=function(e){var n=this;if(this.currentDoc&&this.currentWindow){var o=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]),l=FC(o,r);this.onDrag(l),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=DC(o,r),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,l,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var i=OC(o,r),a=n.props.rotation+(i-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(a),n.lastPinchRotation=i}))}},t.prototype.render=function(){var e=this,t=this.props,n=t.image,o=t.video,r=t.mediaProps,l=t.transform,i=t.crop,a=i.x,s=i.y,c=t.rotation,u=t.zoom,d=t.cropShape,p=t.showGrid,m=t.style,f=m.containerStyle,g=m.cropAreaStyle,h=m.mediaStyle,b=t.classes,v=b.containerClassName,_=b.cropAreaClassName,k=b.mediaClassName,y=t.objectFit;return Xa().createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:f,className:UC("reactEasyCrop_Container",v)},n?Xa().createElement("img",PC({alt:"",className:UC("reactEasyCrop_Image","contain"===y&&"reactEasyCrop_Contain","horizontal-cover"===y&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===y&&"reactEasyCrop_Cover_Vertical","auto-cover"===y&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),k)},r,{src:n,ref:this.imageRef,style:PC(PC({},h),{transform:l||"translate(".concat(a,"px, ").concat(s,"px) rotate(").concat(c,"deg) scale(").concat(u,")")}),onLoad:this.onMediaLoad})):o&&Xa().createElement("video",PC({autoPlay:!0,loop:!0,muted:!0,className:UC("reactEasyCrop_Video","contain"===y&&"reactEasyCrop_Contain","horizontal-cover"===y&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===y&&"reactEasyCrop_Cover_Vertical","auto-cover"===y&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),k)},r,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:PC(PC({},h),{transform:l||"translate(".concat(a,"px, ").concat(s,"px) rotate(").concat(c,"deg) scale(").concat(u,")")}),controls:!1}),(Array.isArray(o)?o:[{src:o}]).map((function(e){return Xa().createElement("source",PC({key:e.src},e))}))),this.state.cropSize&&Xa().createElement("div",{style:PC(PC({},g),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:UC("reactEasyCrop_CropArea","round"===d&&"reactEasyCrop_CropAreaRound",p&&"reactEasyCrop_CropAreaGrid",_)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(Xa().Component);const jC=100,WC=300,KC={placement:"bottom-start"};function qC({url:e,width:t,height:n,clientWidth:o,naturalHeight:r,naturalWidth:l,borderProps:i}){const{isInProgress:a,editedUrl:s,position:u,zoom:p,aspect:f,setPosition:g,setCrop:h,setZoom:b,rotation:v}=IC();let _=n||o*r/l;return v%180==90&&(_=o*l/r),(0,c.createElement)("div",{className:d()("wp-block-image__crop-area",i?.className,{"is-applying":a}),style:{...i?.style,width:t||o,height:_}},(0,c.createElement)($C,{image:s||e,disabled:a,minZoom:jC/100,maxZoom:WC/100,crop:u,zoom:p/100,aspect:f,onCropChange:e=>{g(e)},onCropComplete:e=>{h(e)},onZoomChange:e=>{b(100*e)}}),a&&(0,c.createElement)(m.Spinner,null))}var ZC=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"}));function YC(){const{isInProgress:e,zoom:t,setZoom:n}=IC();return(0,c.createElement)(m.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:KC,renderToggle:({isOpen:t,onToggle:n})=>(0,c.createElement)(m.ToolbarButton,{icon:ZC,label:(0,v.__)("Zoom"),onClick:n,"aria-expanded":t,disabled:e}),renderContent:()=>(0,c.createElement)(m.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,v.__)("Zoom"),min:jC,max:WC,value:Math.round(t),onChange:n})})}var XC=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"}));function QC({aspectRatios:e,isDisabled:t,label:n,onClick:o,value:r}){return(0,c.createElement)(m.MenuGroup,{label:n},e.map((({title:e,aspect:n})=>(0,c.createElement)(m.MenuItem,{key:n,disabled:t,onClick:()=>{o(n)},role:"menuitemradio",isSelected:n===r,icon:n===r?gk:void 0},e))))}function JC({toggleProps:e}){const{isInProgress:t,aspect:n,setAspect:o,defaultAspect:r}=IC();return(0,c.createElement)(m.DropdownMenu,{icon:XC,label:(0,v.__)("Aspect Ratio"),popoverProps:KC,toggleProps:e,className:"wp-block-image__aspect-ratio"},(({onClose:e})=>(0,c.createElement)(c.Fragment,null,(0,c.createElement)(QC,{isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:[{title:(0,v.__)("Original"),aspect:r},{title:(0,v.__)("Square"),aspect:1}]}),(0,c.createElement)(QC,{label:(0,v.__)("Landscape"),isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:[{title:(0,v.__)("16:10"),aspect:1.6},{title:(0,v.__)("16:9"),aspect:16/9},{title:(0,v.__)("4:3"),aspect:4/3},{title:(0,v.__)("3:2"),aspect:1.5}]}),(0,c.createElement)(QC,{label:(0,v.__)("Portrait"),isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:[{title:(0,v.__)("10:16"),aspect:.625},{title:(0,v.__)("9:16"),aspect:9/16},{title:(0,v.__)("3:4"),aspect:3/4},{title:(0,v.__)("2:3"),aspect:2/3}]}))))}var ex=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"}));function tx(){const{isInProgress:e,rotateClockwise:t}=IC();return(0,c.createElement)(m.ToolbarButton,{icon:ex,label:(0,v.__)("Rotate"),onClick:t,disabled:e})}function nx(){const{isInProgress:e,apply:t,cancel:n}=IC();return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(m.ToolbarButton,{onClick:t,disabled:e},(0,v.__)("Apply")),(0,c.createElement)(m.ToolbarButton,{onClick:n},(0,v.__)("Cancel")))}function ox({id:e,url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i,onSaveImage:a,onFinishEditing:s,borderProps:u}){return(0,c.createElement)(TC,{id:e,url:t,naturalWidth:i,naturalHeight:l,onSaveImage:a,onFinishEditing:s},(0,c.createElement)(qC,{borderProps:u,url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i}),(0,c.createElement)(dr,null,(0,c.createElement)(m.ToolbarGroup,null,(0,c.createElement)(YC,null),(0,c.createElement)(m.ToolbarItem,null,(e=>(0,c.createElement)(JC,{toggleProps:e}))),(0,c.createElement)(tx,null)),(0,c.createElement)(m.ToolbarGroup,null,(0,c.createElement)(nx,null))))}const rx=[25,50,75,100],lx=()=>{};function ix({imageSizeHelp:e,imageWidth:t,imageHeight:n,imageSizeOptions:o=[],isResizable:r=!0,slug:l,width:i,height:a,onChange:s,onChangeImage:u=lx}){$()("wp.blockEditor.__experimentalImageSizeControl",{since:"6.3",alternative:"wp.blockEditor.privateApis.DimensionsTool and wp.blockEditor.privateApis.ResolutionTool"});const{currentHeight:d,currentWidth:p,updateDimension:f,updateDimensions:g}=function(e,t,n,o,r){var l,i;const[a,s]=(0,c.useState)(null!==(l=null!=t?t:o)&&void 0!==l?l:""),[u,d]=(0,c.useState)(null!==(i=null!=e?e:n)&&void 0!==i?i:"");return(0,c.useEffect)((()=>{void 0===t&&void 0!==o&&s(o),void 0===e&&void 0!==n&&d(n)}),[o,n]),(0,c.useEffect)((()=>{void 0!==t&&Number.parseInt(t)!==Number.parseInt(a)&&s(t),void 0!==e&&Number.parseInt(e)!==Number.parseInt(u)&&d(e)}),[t,e]),{currentHeight:u,currentWidth:a,updateDimension:(e,t)=>{const n=""===t?void 0:parseInt(t,10);"width"===e?s(n):d(n),r({[e]:n})},updateDimensions:(e,t)=>{d(null!=e?e:n),s(null!=t?t:o),r({height:e,width:t})}}}(a,i,n,t,s);return(0,c.createElement)(c.Fragment,null,o&&o.length>0&&(0,c.createElement)(m.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,v.__)("Resolution"),value:l,options:o,onChange:u,help:e,size:"__unstable-large"}),r&&(0,c.createElement)("div",{className:"block-editor-image-size-control"},(0,c.createElement)(m.__experimentalHStack,{align:"baseline",spacing:"3"},(0,c.createElement)(m.__experimentalNumberControl,{className:"block-editor-image-size-control__width",label:(0,v.__)("Width"),value:p,min:1,onChange:e=>f("width",e),size:"__unstable-large"}),(0,c.createElement)(m.__experimentalNumberControl,{className:"block-editor-image-size-control__height",label:(0,v.__)("Height"),value:d,min:1,onChange:e=>f("height",e),size:"__unstable-large"})),(0,c.createElement)(m.__experimentalHStack,null,(0,c.createElement)(m.ButtonGroup,{"aria-label":(0,v.__)("Image size presets")},rx.map((e=>{const o=Math.round(t*(e/100)),r=Math.round(n*(e/100)),l=p===o&&d===r;return(0,c.createElement)(m.Button,{key:e,isSmall:!0,variant:l?"primary":void 0,isPressed:l,onClick:()=>g(r,o)},e,"%")}))),(0,c.createElement)(m.Button,{isSmall:!0,onClick:()=>g()},(0,v.__)("Reset")))))}function ax({url:e,urlLabel:t,className:n}){const o=d()(n,"block-editor-url-popover__link-viewer-url");return e?(0,c.createElement)(m.ExternalLink,{className:o,href:e},t||(0,yh.filterURLForDisplay)((0,yh.safeDecodeURI)(e))):(0,c.createElement)("span",{className:o})}const{__experimentalPopoverLegacyPositionToPlacement:sx}=Xo(m.privateApis);function cx({additionalControls:e,children:t,renderSettings:n,placement:o,focusOnMount:r="firstElement",position:l,...i}){let a;void 0!==l&&$()("`position` prop in wp.blockEditor.URLPopover",{since:"6.2",alternative:"`placement` prop"}),void 0!==o?a=o:void 0!==l&&(a=sx(l)),a=a||"bottom";const[s,u]=(0,c.useState)(!1),d=!!n&&s;return(0,c.createElement)(m.Popover,{className:"block-editor-url-popover",focusOnMount:r,placement:a,shift:!0,...i},(0,c.createElement)("div",{className:"block-editor-url-popover__input-container"},(0,c.createElement)("div",{className:"block-editor-url-popover__row"},t,!!n&&(0,c.createElement)(m.Button,{className:"block-editor-url-popover__settings-toggle",icon:PS,label:(0,v.__)("Link settings"),onClick:()=>{u(!s)},"aria-expanded":s})),d&&(0,c.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},n())),e&&!d&&(0,c.createElement)("div",{className:"block-editor-url-popover__additional-controls"},e))}cx.LinkEditor=function({autocompleteRef:e,className:t,onChangeInputValue:n,value:o,...r}){return(0,c.createElement)("form",{className:d()("block-editor-url-popover__link-editor",t),...r},(0,c.createElement)(Rh,{__nextHasNoMarginBottom:!0,value:o,onChange:n,autocompleteRef:e}),(0,c.createElement)(m.Button,{icon:xh,label:(0,v.__)("Apply"),type:"submit"}))},cx.LinkViewer=function({className:e,linkClassName:t,onEditLinkClick:n,url:o,urlLabel:r,...l}){return(0,c.createElement)("div",{className:d()("block-editor-url-popover__link-viewer",e),...l},(0,c.createElement)(ax,{url:o,urlLabel:r,className:t}),n&&(0,c.createElement)(m.Button,{icon:ub,label:(0,v.__)("Edit"),onClick:n}))};var ux=cx;const dx=()=>{},px=({src:e,onChange:t,onSubmit:n,onClose:o,popoverAnchor:r})=>(0,c.createElement)(ux,{anchor:r,onClose:o},(0,c.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:n},(0,c.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"text","aria-label":(0,v.__)("URL"),placeholder:(0,v.__)("Paste or type URL"),onChange:t,value:e}),(0,c.createElement)(m.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:xh,label:(0,v.__)("Apply"),type:"submit"}))),mx=({isURLInputVisible:e,src:t,onChangeSrc:n,onSubmitSrc:o,openURLInput:r,closeURLInput:l})=>{const[i,a]=(0,c.useState)(null);return(0,c.createElement)("div",{className:"block-editor-media-placeholder__url-input-container",ref:a},(0,c.createElement)(m.Button,{className:"block-editor-media-placeholder__button",onClick:r,isPressed:e,variant:"tertiary"},(0,v.__)("Insert from URL")),e&&(0,c.createElement)(px,{src:t,onChange:n,onSubmit:o,onClose:l,popoverAnchor:i}))};var fx=(0,m.withFilters)("editor.MediaPlaceholder")((function({value:e={},allowedTypes:t,className:n,icon:o,labels:r={},mediaPreview:l,notices:i,isAppender:s,accept:u,addToGallery:p,multiple:g=!1,handleUpload:h=!0,disableDropZone:b,disableMediaButtons:_,onError:k,onSelect:y,onCancel:E,onSelectURL:S,onToggleFeaturedImage:w,onDoubleClick:C,onFilesPreUpload:x=dx,onHTMLDrop:B,children:I,mediaLibraryButton:T,placeholder:M,style:P}){B&&$()("wp.blockEditor.MediaPlaceholder onHTMLDrop prop",{since:"6.2",version:"6.4"});const N=(0,f.useSelect)((e=>{const{getSettings:t}=e(Jo);return t().mediaUpload}),[]),[L,R]=(0,c.useState)(""),[A,D]=(0,c.useState)(!1);(0,c.useEffect)((()=>{var t;R(null!==(t=e?.src)&&void 0!==t?t:"")}),[e?.src]);const O=e=>{R(e.target.value)},z=()=>{D(!0)},V=()=>{D(!1)},F=e=>{e.preventDefault(),L&&S&&(S(L),V())},H=n=>{if(!h)return y(n);let o;if(x(n),g)if(p){let t=[];o=n=>{const o=(null!=e?e:[]).filter((e=>e.id?!t.some((({id:t})=>Number(t)===Number(e.id))):!t.some((({urlSlug:t})=>e.url.includes(t)))));y(o.concat(n)),t=n.map((e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else o=y;else o=([e])=>y(e);N({allowedTypes:t,filesList:n,onFileChange:o,onError:k})};async function G(e){const n=(0,a.pasteHandler)({HTML:e});return await async function(e){if(!e||!Array.isArray(e))return;const n=function e(t){return t.flatMap((t=>"core/image"!==t.name&&"core/audio"!==t.name&&"core/video"!==t.name||!t.attributes.url?e(t.innerBlocks):[t]))}(e);if(!n.length)return;const o=await Promise.all(n.map((e=>e.attributes.id?e.attributes:new Promise(((n,o)=>{window.fetch(e.attributes.url).then((e=>e.blob())).then((r=>N({filesList:[r],additionalData:{title:e.attributes.title,alt_text:e.attributes.alt,caption:e.attributes.caption},onFileChange:([e])=>{e.id&&n(e)},allowedTypes:t,onError:o}))).catch((()=>n(e.attributes.url)))}))))).catch((e=>k(e)));y(g?o:o[0])}(n)}const U=e=>{H(e.target.files)},j=null!=M?M:e=>{let{instructions:a,title:u}=r;if(N||S||(a=(0,v.__)("To edit this block, you need permission to upload media.")),void 0===a||void 0===u){const e=null!=t?t:[],[n]=e,o=1===e.length,r=o&&"audio"===n,l=o&&"image"===n,i=o&&"video"===n;void 0===a&&N&&(a=(0,v.__)("Upload a media file or pick one from your media library."),r?a=(0,v.__)("Upload an audio file, pick one from your media library, or add one with a URL."):l?a=(0,v.__)("Upload an image file, pick one from your media library, or add one with a URL."):i&&(a=(0,v.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===u&&(u=(0,v.__)("Media"),r?u=(0,v.__)("Audio"):l?u=(0,v.__)("Image"):i&&(u=(0,v.__)("Video")))}const p=d()("block-editor-media-placeholder",n,{"is-appender":s});return(0,c.createElement)(m.Placeholder,{icon:o,label:u,instructions:a,className:p,notices:i,onDoubleClick:C,preview:l,style:P},e,I)},W=()=>b?null:(0,c.createElement)(m.DropZone,{onFilesDrop:H,onHTMLDrop:G}),K=()=>E&&(0,c.createElement)(m.Button,{className:"block-editor-media-placeholder__cancel-button",title:(0,v.__)("Cancel"),variant:"link",onClick:E},(0,v.__)("Cancel")),q=()=>S&&(0,c.createElement)(mx,{isURLInputVisible:A,src:L,onChangeSrc:O,onSubmitSrc:F,openURLInput:z,closeURLInput:V}),Z=()=>w&&(0,c.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,c.createElement)(m.Button,{className:"block-editor-media-placeholder__button",onClick:w,variant:"tertiary"},(0,v.__)("Use featured image")));return _?(0,c.createElement)(cg,null,W()):(0,c.createElement)(cg,{fallback:j(q())},(()=>{const n=null!=T?T:({open:e})=>(0,c.createElement)(m.Button,{variant:"tertiary",onClick:()=>{e()}},(0,v.__)("Media Library")),o=(0,c.createElement)(ug,{addToGallery:p,gallery:g&&!(!t||0===t.length)&&t.every((e=>"image"===e||e.startsWith("image/"))),multiple:g,onSelect:y,allowedTypes:t,mode:"browse",value:Array.isArray(e)?e.map((({id:e})=>e)):e.id,render:n});if(N&&s)return(0,c.createElement)(c.Fragment,null,W(),(0,c.createElement)(m.FormFileUpload,{onChange:U,accept:u,multiple:!!g,render:({openFileDialog:e})=>{const t=(0,c.createElement)(c.Fragment,null,(0,c.createElement)(m.Button,{variant:"primary",className:d()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:e},(0,v.__)("Upload")),o,q(),Z(),K());return j(t)}}));if(N){const e=(0,c.createElement)(c.Fragment,null,W(),(0,c.createElement)(m.FormFileUpload,{variant:"primary",className:d()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:U,accept:u,multiple:!!g},(0,v.__)("Upload")),o,q(),Z(),K());return j(e)}return j(o)})())}));var gx=({colorSettings:e,...t})=>{const n=e.map((e=>{if(!e)return e;const{value:t,onChange:n,...o}=e;return{...o,colorValue:t,onColorChange:n}}));return(0,c.createElement)(xC,{settings:n,gradients:[],disableCustomGradients:!0,...t})};const hx={placement:"bottom-start"};var bx=()=>(0,c.createElement)(c.Fragment,null,["bold","italic","link","unknown"].map((e=>(0,c.createElement)(m.Slot,{name:`RichText.ToolbarControls.${e}`,key:e}))),(0,c.createElement)(m.Slot,{name:"RichText.ToolbarControls"},(e=>{if(!e.length)return null;const t=e.map((([{props:e}])=>e)).some((({isActive:e})=>e));return(0,c.createElement)(m.ToolbarItem,null,(n=>(0,c.createElement)(m.DropdownMenu,{icon:PS,label:(0,v.__)("More"),toggleProps:{...n,className:d()(n.className,{"is-pressed":t}),describedBy:(0,v.__)("Displays more block tools")},controls:K(e.map((([{props:e}])=>e)),"title"),popoverProps:hx})))})));function vx(e){return Array.from(e.querySelectorAll("[data-toolbar-item]"))}function _x(e,t,n,o,r,l){const[i]=(0,c.useState)(t),[a]=(0,c.useState)(o),s=(0,c.useCallback)((()=>{!function(e){const[t]=da.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}(e.current)}),[]);(0,lp.useShortcut)("core/block-editor/focus-toolbar",(()=>{l&&s()})),(0,c.useEffect)((()=>{i&&s()}),[n,i,s]),(0,c.useEffect)((()=>{const t=e.current;let n=0;return i||(n=window.requestAnimationFrame((()=>{const e=vx(t),n=a||0;var o;e[n]&&(o=t).contains(o.ownerDocument.activeElement)&&e[n].focus({preventScroll:!0})}))),()=>{if(window.cancelAnimationFrame(n),!r||!t)return;const e=vx(t).findIndex((e=>0===e.tabIndex));r(e)}}),[a,i])}var kx=function({children:e,focusOnMount:t,shouldUseKeyboardFocusShortcut:n=!0,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,...l}){const i=(0,c.useRef)(),a=function(e){const[t,n]=(0,c.useState)(!0),o=(0,c.useCallback)((()=>{const t=!da.focus.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||$()("Using custom components as toolbar controls",{since:"5.6",alternative:"ToolbarItem, ToolbarButton or ToolbarDropdownMenu components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),n(t)}),[]);return(0,c.useLayoutEffect)((()=>{const t=new window.MutationObserver(o);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[t]),t}(i);return _x(i,t,a,o,r,n),a?(0,c.createElement)(m.Toolbar,{label:l["aria-label"],ref:i,...l},e):(0,c.createElement)(m.NavigableMenu,{orientation:"horizontal",role:"toolbar",ref:i,...l},e)};function yx({editableContentElement:e,activeFormats:t}){const n=t[t.length-1],o=n?.type,r=(0,f.useSelect)((e=>e(G.store).getFormatType(o)),[o]),l=(0,G.useAnchor)({editableContentElement:e,settings:r});return(0,c.createElement)(Ex,{popoverAnchor:l})}function Ex({popoverAnchor:e}){return(0,c.createElement)(m.Popover,{placement:"top",focusOnMount:!1,anchor:e,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},(0,c.createElement)(kx,{className:"block-editor-rich-text__inline-format-toolbar-group","aria-label":(0,v.__)("Format tools")},(0,c.createElement)(m.ToolbarGroup,null,(0,c.createElement)(bx,null))))}var Sx=({inline:e,editableContentElement:t,value:n})=>{const o=(0,f.useSelect)((e=>e(Jo).getSettings().hasInlineToolbar),[]);if(e)return(0,c.createElement)(Ex,{popoverAnchor:t});if(o){const e=(0,G.getActiveFormats)(n);return(0,G.isCollapsed)(n)&&!e.length?null:(0,c.createElement)(yx,{editableContentElement:t,activeFormats:e})}return(0,c.createElement)(dr,{group:"inline"},(0,c.createElement)(bx,null))};function wx(){const{didAutomaticChange:e,getSettings:t}=(0,f.useSelect)(Jo);return(0,p.useRefEffect)((n=>{function o(n){const{keyCode:o}=n;if(n.defaultPrevented)return;if(o!==Pd.DELETE&&o!==Pd.BACKSPACE&&o!==Pd.ESCAPE)return;const{__experimentalUndo:r}=t();r&&e()&&(n.preventDefault(),r())}return n.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",o)}}),[])}var Cx=window.wp.shortcode;function xx(e,t){if(t?.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}function Bx(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function Ix({allowedFormats:e,disableFormats:t}){return t?Ix.EMPTY_ARRAY:e}Ix.EMPTY_ARRAY=[];const Tx=e=>(0,Cx.regexp)(".*").test(e);function Mx({value:e,pastedBlocks:t=[],onReplace:n,onSplit:o}){if(!n||!o)return;const{start:r=0,end:l=0}=e,i={...e,start:r,end:l},a=[],[s,c]=(0,G.split)(i),u=t.length>0;let d=-1;const p=(0,G.isEmpty)(s)&&!(0,G.isEmpty)(c);u&&(0,G.isEmpty)(s)||(a.push(o((0,G.toHTMLString)({value:s}),!p)),d+=1),u&&(a.push(...t),d+=t.length),u&&(0,G.isEmpty)(c)||a.push(o((0,G.toHTMLString)({value:c}),p));n(a,u?d:1,u?-1:0)}function Px(e){const t=(0,c.useRef)(e);return t.current=e,(0,p.useRefEffect)((e=>{function n(e){const{isSelected:n,disableFormats:o,onChange:r,value:l,formatTypes:i,tagName:s,onReplace:c,onSplit:u,__unstableEmbedURLOnPaste:d,preserveWhiteSpace:p,pastePlainText:m}=t.current;if(!n)return;const{clipboardData:f}=e;let g="",h="";try{g=f.getData("text/plain"),h=f.getData("text/html")}catch(e){try{h=f.getData("Text")}catch(e){return}}if(h=function(e){const t="\x3c!--StartFragment--\x3e",n=e.indexOf(t);if(!(n>-1))return e;e=e.substring(n+t.length);const o="\x3c!--EndFragment--\x3e",r=e.indexOf(o);r>-1&&(e=e.substring(0,r));return e}(h),h=function(e){const t="";if(e.startsWith(t))return e.slice(t.length);return e}(h),e.preventDefault(),window.console.log("Received HTML:\n\n",h),window.console.log("Received plain text:\n\n",g),o)return void r((0,G.insert)(l,g));const b=i.reduce(((e,{__unstablePasteRule:t})=>(t&&e===l&&(e=t(l,{html:h,plainText:g})),e)),l);if(b!==l)return void r(b);const v=[...(0,da.getFilesFromDataTransfer)(f)];if("true"===f.getData("rich-text")){const e=(0,G.create)({html:h,preserveWhiteSpace:p});return xx(e,l.activeFormats),void r((0,G.insert)(l,e))}if(m)return void r((0,G.insert)(l,(0,G.create)({text:g})));if(v?.length&&window.console.log("Received items:\n\n",v),v?.length&&!pS(v,h)){const e=(0,a.getBlockTransforms)("from"),t=v.reduce(((t,n)=>{const o=(0,a.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return o&&t.push(o.transform([n])),t}),[]).flat();if(!t.length)return;return void(c&&(0,G.isEmpty)(l)?c(t):Mx({value:l,pastedBlocks:t,onReplace:c,onSplit:u}))}let _=c&&u?"AUTO":"INLINE";"AUTO"===_&&(0,G.isEmpty)(l)&&Tx(g)&&(_="BLOCKS"),d&&(0,G.isEmpty)(l)&&(0,yh.isURL)(g.trim())&&(_="BLOCKS");const k=(0,a.pasteHandler)({HTML:h,plainText:g,mode:_,tagName:s,preserveWhiteSpace:p});if("string"==typeof k){const e=(0,G.create)({html:k});xx(e,l.activeFormats),r((0,G.insert)(l,e))}else k.length>0&&(c&&(0,G.isEmpty)(l)?c(k,k.length-1,-1):Mx({value:l,pastedBlocks:k,onReplace:c,onSplit:u}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}}),[])}const Nx=["`",'"',"'","“”","‘’"];function Lx(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,f.useDispatch)(Jo),o=(0,c.useRef)(e);return o.current=e,(0,p.useRefEffect)((e=>{function r(r){const{inputType:l,data:i}=r,{value:a,onChange:c}=o.current;if("insertText"!==l)return;if((0,G.isCollapsed)(a))return;const u=(0,s.applyFilters)("blockEditor.wrapSelectionSettings",Nx).find((([e,t])=>e===i||t===i));if(!u)return;const[d,p=d]=u,m=a.start,f=a.end+d.length;let g=(0,G.insert)(a,d,m,m);g=(0,G.insert)(g,p,f,f),t(),c(g),n();const h={};for(const e in r)h[e]=r[e];h.data=p;const{ownerDocument:b}=e,{defaultView:v}=b,_=new v.InputEvent("input",h);window.queueMicrotask((()=>{r.target.dispatchEvent(_)})),r.preventDefault()}return e.addEventListener("beforeinput",r),()=>{e.removeEventListener("beforeinput",r)}}),[])}function Rx(e){let t=e.length;for(;t--;){const n=An(e[t].attributes);if(n)return e[t].attributes[n]=e[t].attributes[n].replace(Rn,""),[e[t].clientId,n,0,0];const o=Rx(e[t].innerBlocks);if(o)return o}return[]}function Ax(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,f.useDispatch)(Jo),o=(0,c.useRef)(e);return o.current=e,(0,p.useRefEffect)((e=>{function r(){const{getValue:e,onReplace:t,selectionChange:r}=o.current;if(!t)return;const l=e(),{start:i,text:s}=l;if(" "!==s.slice(i-1,i))return;const c=s.slice(0,i).trim(),u=(0,a.getBlockTransforms)("from").filter((({type:e})=>"prefix"===e)),d=(0,a.findTransform)(u,(({prefix:e})=>c===e));if(!d)return;const p=(0,G.toHTMLString)({value:(0,G.insert)(l,Rn,0,i)}),m=d.transform(p);return r(...Rx([m])),t([m]),n(),!0}function l(e){const{inputType:l,type:i}=e,{getValue:a,onChange:s,__unstableAllowPrefixTransformations:c,formatTypes:u}=o.current;if("insertText"!==l&&"compositionend"!==i)return;if(c&&r&&r())return;const d=a(),p=u.reduce(((e,{__unstableInputRule:t})=>(t&&(e=t(e)),e)),function(e){const t="tales of gutenberg",{start:n,text:o}=e;return n<18||o.slice(n-18,n).toLowerCase()!==t?e:(0,G.insert)(e," 🐡🐢🦀🐤🦋🐘🐧🐹🦁🦄🦍🐼🐿🎃🐴🐝🐆🦕🦔🌱🍇π🍌🐉💧🥨🌌🍂🍠🥦🥚🥝🎟🥥🥒🛵🥖🍒🍯🎾🎲🐺🐚🐮⌛️")}(d));p!==d&&(t(),s({...p,activeFormats:d.activeFormats}),n())}return e.addEventListener("input",l),e.addEventListener("compositionend",l),()=>{e.removeEventListener("input",l),e.removeEventListener("compositionend",l)}}),[])}function Dx(e){const t=(0,c.useRef)(e);return t.current=e,(0,p.useRefEffect)((e=>{function n(e){const{keyCode:n}=e;if(e.defaultPrevented)return;const{value:o,onMerge:r,onRemove:l}=t.current;if(n===Pd.DELETE||n===Pd.BACKSPACE){const{start:t,end:i,text:a}=o,s=n===Pd.BACKSPACE,c=o.activeFormats&&!!o.activeFormats.length;if(!(0,G.isCollapsed)(o)||c||s&&0!==t||!s&&i!==a.length)return;r&&r(!s),l&&(0,G.isEmpty)(o)&&s&&l(!s),e.preventDefault()}}return e.addEventListener("keydown",n),()=>{e.removeEventListener("keydown",n)}}),[])}function Ox(e){const t=(0,f.useRegistry)(),{__unstableMarkAutomaticChange:n}=(0,f.useDispatch)(Jo),o=(0,c.useRef)(e);return o.current=e,(0,p.useRefEffect)((e=>{function r(e){if(e.defaultPrevented)return;if(e.keyCode!==Pd.ENTER)return;const{removeEditorOnlyFormats:r,value:l,onReplace:i,onSplit:s,onChange:c,disableLineBreaks:u,onSplitAtEnd:d,onSplitAtDoubleLineEnd:p}=o.current;e.preventDefault();const m={...l};m.formats=r(l);const f=i&&s;if(i){const e=(0,a.getBlockTransforms)("from").filter((({type:e})=>"enter"===e)),t=(0,a.findTransform)(e,(e=>e.regExp.test(m.text)));t&&(i([t.transform({content:m.text})]),n())}const{text:g,start:h,end:b}=m;e.shiftKey?u||c((0,G.insert)(m,"\n")):f?Mx({value:m,onReplace:i,onSplit:s}):d&&h===b&&b===g.length?d():p&&h===b&&b===g.length&&"\n\n"===g.slice(-2)?t.batch((()=>{m.start=m.end-2,c((0,G.remove)(m)),p()})):u||c((0,G.insert)(m,"\n"))}return e.addEventListener("keydown",r),()=>{e.removeEventListener("keydown",r)}}),[])}function zx(e){return e(G.store).getFormatTypes()}const Vx=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function Fx(e,t){return"object"!=typeof e?{[t]:e}:Object.fromEntries(Object.entries(e).map((([e,n])=>[`${t}.${e}`,n])))}function Hx(e,t){return e[t]?e[t]:Object.keys(e).filter((e=>e.startsWith(t+"."))).reduce(((n,o)=>(n[o.slice(t.length+1)]=e[o],n)),{})}function Gx(e){return(0,p.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}}),[])}function Ux(e){return(0,p.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("input",n),()=>{t.removeEventListener("input",n)}}),[])}function $x(){const{__unstableMarkLastChangeAsPersistent:e}=(0,f.useDispatch)(Jo);return(0,p.useRefEffect)((t=>{function n(t){"insertReplacementText"===t.inputType&&e()}return t.addEventListener("beforeinput",n),()=>{t.removeEventListener("beforeinput",n)}}),[])}function jx(){const{isMultiSelecting:e}=(0,f.useSelect)(Jo);return(0,p.useRefEffect)((t=>{function n(){if(!e())return;const n=t.parentElement.closest('[contenteditable="true"]');n&&n.focus()}return t.addEventListener("focus",n),()=>{t.removeEventListener("focus",n)}}),[])}const Wx={},Kx=Symbol("usesContext");function qx({onChange:e,onFocus:t,value:n,forwardedRef:o,settings:r}){const{name:l,edit:i,[Kx]:a}=r,s=(0,c.useContext)(fa),u=(0,c.useMemo)((()=>a?Object.fromEntries(Object.entries(s).filter((([e])=>a.includes(e)))):Wx),[a,s]);if(!i)return null;const d=(0,G.getActiveFormat)(n,l),p=void 0!==d,m=(0,G.getActiveObject)(n),f=void 0!==m&&m.type===l;return(0,c.createElement)(i,{key:l,isActive:p,activeAttributes:p&&d.attributes||{},isObjectActive:f,activeObjectAttributes:f&&m.attributes||{},value:n,onChange:e,onFocus:t,contentRef:o,context:u})}function Zx({formatTypes:e,...t}){return e.map((e=>(0,c.createElement)(qx,{settings:e,...t,key:e.name})))}const Yx=({value:e,tagName:t,multiline:n,...o})=>{Array.isArray(e)&&($()("wp.blockEditor.RichText value prop as children type",{since:"6.1",version:"6.3",alternative:"value prop as string",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),e=a.children.toHTML(e));const r=Bx(n);!e&&r&&(e=`<${r}>`);const l=(0,c.createElement)(c.RawHTML,null,e);if(t){const{format:e,...n}=o;return(0,c.createElement)(t,{...n},l)}return l};var Xx=(0,c.forwardRef)((function({children:e,identifier:t,tagName:n="div",value:o="",onChange:r,multiline:l,...i},a){$()("wp.blockEditor.RichText multiline prop",{since:"6.1",version:"6.3",alternative:"nested blocks (InnerBlocks)",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/"});const{clientId:s}=rr(),{selectionChange:u}=(0,f.useDispatch)(Jo),d=Bx(l),p=`${o=o||`<${d}>`}<${d}>`.split(`<${d}>`);function m(e){r(`<${d}>${e.join(`<${d}>`)}`)}return p.shift(),p.pop(),(0,c.createElement)(n,{ref:a},p.map(((e,n)=>(0,c.createElement)(eB,{key:n,identifier:`${t}-${n}`,tagName:d,value:e,onChange:e=>{const t=p.slice();t[n]=e,m(t)},isSelected:void 0,onSplit:e=>e,onReplace:e=>{const o=p.slice();o.splice(n,1,...e),m(o),u(s,`${t}-${n+1}`,0,0)},onMerge:e=>{const o=p.slice();let r=0;if(e){if(!o[n+1])return;o.splice(n,2,o[n]+o[n+1]),r=o[n].length-1}else{if(!o[n-1])return;o.splice(n-1,2,o[n-1]+o[n]),r=o[n-1].length-1}m(o),u(s,`${t}-${n-(e?0:1)}`,r,r)},...i}))))}));const Qx=(0,c.createContext)(),Jx=(0,c.createContext)();function eB({children:e,tagName:t="div",value:n="",onChange:o,isSelected:r,multiline:l,inlineToolbar:i,wrapperClassName:a,autocompleters:s,onReplace:u,placeholder:g,allowedFormats:h,withoutInteractiveFormatting:b,onRemove:v,onMerge:_,onSplit:k,__unstableOnSplitAtEnd:y,__unstableOnSplitAtDoubleLineEnd:E,identifier:S,preserveWhiteSpace:w,__unstablePastePlainText:C,__unstableEmbedURLOnPaste:x,__unstableDisableFormats:B,disableLineBreaks:I,__unstableAllowPrefixTransformations:T,...M},P){M=function(e){const{__unstableMobileNoFocusOnMount:t,deleteEnter:n,placeholderTextColor:o,textAlign:r,selectionColor:l,tagsToEliminate:i,disableEditingMenu:a,fontSize:s,fontFamily:c,fontWeight:u,fontStyle:d,minWidth:p,maxWidth:m,setRef:f,disableSuggestions:g,disableAutocorrection:h,...b}=e;return b}(M);const N=(0,c.useRef)(),{clientId:L}=rr(),{selectionStart:R,selectionEnd:A,isSelected:D}=(0,f.useSelect)((e=>{const{getSelectionStart:t,getSelectionEnd:n}=e(Jo),o=t(),l=n();let i;return void 0===r?i=o.clientId===L&&l.clientId===L&&o.attributeKey===S:r&&(i=o.clientId===L),{selectionStart:i?o.offset:void 0,selectionEnd:i?l.offset:void 0,isSelected:i}})),{getSelectionStart:O,getSelectionEnd:z,getBlockRootClientId:V}=(0,f.useSelect)(Jo),{selectionChange:F}=(0,f.useDispatch)(Jo),H=Ix({allowedFormats:h,disableFormats:B}),U=!H||H.length>0,$=(0,c.useCallback)(((e,t)=>{const n={},o=void 0===e&&void 0===t;if("number"==typeof e||o){if(void 0===t&&V(L)!==V(z().clientId))return;n.start={clientId:L,attributeKey:S,offset:e}}if("number"==typeof t||o){if(void 0===e&&V(L)!==V(O().clientId))return;n.end={clientId:L,attributeKey:S,offset:t}}F(n)}),[L,S]),{formatTypes:j,prepareHandlers:W,valueHandlers:K,changeHandlers:q,dependencies:Z}=function({clientId:e,identifier:t,withoutInteractiveFormatting:n,allowedFormats:o}){const r=(0,f.useSelect)(zx,[]),l=(0,c.useMemo)((()=>r.filter((({name:e,interactive:t,tagName:r})=>!(o&&!o.includes(e)||n&&(t||Vx.has(r)))))),[r,o,n]),i=(0,f.useSelect)((n=>l.reduce(((o,r)=>r.__experimentalGetPropsForEditableTreePreparation?{...o,...Fx(r.__experimentalGetPropsForEditableTreePreparation(n,{richTextIdentifier:t,blockClientId:e}),r.name)}:o),{})),[l,e,t]),a=(0,f.useDispatch)(),s=[],u=[],d=[],p=[];for(const e in i)p.push(i[e]);return l.forEach((n=>{if(n.__experimentalCreatePrepareEditableTree){const o=n.__experimentalCreatePrepareEditableTree(Hx(i,n.name),{richTextIdentifier:t,blockClientId:e});n.__experimentalCreateOnChangeEditableValue?u.push(o):s.push(o)}if(n.__experimentalCreateOnChangeEditableValue){let o={};n.__experimentalGetPropsForEditableTreeChangeHandler&&(o=n.__experimentalGetPropsForEditableTreeChangeHandler(a,{richTextIdentifier:t,blockClientId:e}));const r=Hx(i,n.name);d.push(n.__experimentalCreateOnChangeEditableValue({..."object"==typeof r?r:{},...o},{richTextIdentifier:t,blockClientId:e}))}})),{formatTypes:l,prepareHandlers:s,valueHandlers:u,changeHandlers:d,dependencies:p}}({clientId:L,identifier:S,withoutInteractiveFormatting:b,allowedFormats:H});function Y(e){return j.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=(0,G.removeFormat)(e,t.name,0,e.text.length))})),e.formats}const{value:X,getValue:Q,onChange:J,ref:ee}=(0,G.__unstableUseRichText)({value:n,onChange(e,{__unstableFormats:t,__unstableText:n}){o(e),Object.values(q).forEach((e=>{e(t,n)}))},selectionStart:R,selectionEnd:A,onSelectionChange:$,placeholder:g,__unstableIsSelected:D,__unstableDisableFormats:B,preserveWhiteSpace:w,__unstableDependencies:[...Z,t],__unstableAfterParse:function(e){return K.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:Y,__unstableAddInvisibleFormats:function(e){return W.reduce(((t,n)=>n(t,e.text)),e.formats)}}),te=function(e){return(0,m.__unstableUseAutocompleteProps)({...e,completers:oS(e)})}({onReplace:u,completers:s,record:X,onChange:J});!function({html:e,value:t}){const n=(0,c.useRef)(),o=t.activeFormats&&!!t.activeFormats.length,{__unstableMarkLastChangeAsPersistent:r}=(0,f.useDispatch)(Jo);(0,c.useLayoutEffect)((()=>{if(n.current){if(n.current!==t.text){const e=window.setTimeout((()=>{r()}),1e3);return n.current=t.text,()=>{window.clearTimeout(e)}}r()}else n.current=t.text}),[e,o])}({html:n,value:X});const ne=(0,c.useRef)(new Set),oe=(0,c.useRef)(new Set);function re(){N.current?.focus()}const le=t;return(0,c.createElement)(c.Fragment,null,D&&(0,c.createElement)(Qx.Provider,{value:ne},(0,c.createElement)(Jx.Provider,{value:oe},(0,c.createElement)(m.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after"},e&&e({value:X,onChange:J,onFocus:re}),(0,c.createElement)(Zx,{value:X,onChange:J,onFocus:re,formatTypes:j,forwardedRef:N})))),D&&U&&(0,c.createElement)(Sx,{inline:i,editableContentElement:N.current,value:X}),(0,c.createElement)(le,{role:"textbox","aria-multiline":!I,"aria-label":g,...M,...te,ref:(0,p.useMergeRefs)([P,te.ref,M.ref,ee,Lx({value:X,onChange:J}),Ax({getValue:Q,onChange:J,__unstableAllowPrefixTransformations:T,formatTypes:j,onReplace:u,selectionChange:F}),$x(),(0,p.useRefEffect)((e=>{function t(e){(Pd.isKeyboardEvent.primary(e,"z")||Pd.isKeyboardEvent.primary(e,"y")||Pd.isKeyboardEvent.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}),[]),Gx(ne),Ux(oe),wx(),Px({isSelected:D,disableFormats:B,onChange:J,value:X,formatTypes:j,tagName:t,onReplace:u,onSplit:k,__unstableEmbedURLOnPaste:x,preserveWhiteSpace:w,pastePlainText:C}),Dx({value:X,onMerge:_,onRemove:v}),Ox({removeEditorOnlyFormats:Y,value:X,onReplace:u,onSplit:k,onChange:J,disableLineBreaks:I,onSplitAtEnd:y,onSplitAtDoubleLineEnd:E}),jx(),N]),contentEditable:!0,suppressContentEditableWarning:!0,className:d()("block-editor-rich-text__editable",M.className,"rich-text"),tabIndex:0===M.tabIndex?null:M.tabIndex}))}const tB=(0,c.forwardRef)(eB);const nB=(0,c.forwardRef)((function e(t,n){let o=t.value,r=t.onChange;Array.isArray(o)&&($()("wp.blockEditor.RichText value prop as children type",{since:"6.1",version:"6.3",alternative:"value prop as string",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),o=a.children.toHTML(t.value),r=e=>t.onChange(a.children.fromDOM((0,G.__unstableCreateElement)(document,e).childNodes)));const l=t.multiline?Xx:tB,i=(0,p.useInstanceId)(e);return(0,c.createElement)(l,{...t,identifier:t.identifier||i,value:o,onChange:r,ref:n})}));nB.Content=Yx,nB.isEmpty=e=>!e||0===e.length;var oB=nB;const rB=(0,c.forwardRef)(((e,t)=>(0,c.createElement)(oB,{ref:t,...e,__unstableDisableFormats:!0,preserveWhiteSpace:!0})));rB.Content=({value:e="",tagName:t="div",...n})=>(0,c.createElement)(t,{...n},e);var lB=rB;var iB=(0,c.forwardRef)((({__experimentalVersion:e,...t},n)=>{if(2===e)return(0,c.createElement)(lB,{ref:n,...t});const{className:o,onChange:r,...l}=t;return(0,c.createElement)(Ma.Z,{ref:n,className:d()("block-editor-plain-text",o),onChange:e=>r(e.target.value),...l})}));function aB({property:e,viewport:t,desc:n}){const o=(0,p.useInstanceId)(aB),r=n||(0,v.sprintf)((0,v._x)("Controls the %1$s property for %2$s viewports.","Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."),e,t.label);return(0,c.createElement)(c.Fragment,null,(0,c.createElement)("span",{"aria-describedby":`rbc-desc-${o}`},t.label),(0,c.createElement)(m.VisuallyHidden,{as:"span",id:`rbc-desc-${o}`},r))}var sB=function(e){const{title:t,property:n,toggleLabel:o,onIsResponsiveChange:r,renderDefaultControl:l,renderResponsiveControls:i,isResponsive:a=!1,defaultLabel:s={id:"all",label:(0,v.__)("All")},viewports:u=[{id:"small",label:(0,v.__)("Small screens")},{id:"medium",label:(0,v.__)("Medium screens")},{id:"large",label:(0,v.__)("Large screens")}]}=e;if(!t||!n||!l)return null;const p=o||(0,v.sprintf)((0,v.__)("Use the same %s on all screensizes."),n),f=(0,v.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),g=l((0,c.createElement)(aB,{property:n,viewport:s}),s);return(0,c.createElement)("fieldset",{className:"block-editor-responsive-block-control"},(0,c.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),(0,c.createElement)("div",{className:"block-editor-responsive-block-control__inner"},(0,c.createElement)(m.ToggleControl,{__nextHasNoMarginBottom:!0,className:"block-editor-responsive-block-control__toggle",label:p,checked:!a,onChange:r,help:f}),(0,c.createElement)("div",{className:d()("block-editor-responsive-block-control__group",{"is-responsive":a})},!a&&g,a&&(i?i(u):u.map((e=>(0,c.createElement)(c.Fragment,{key:e.id},l((0,c.createElement)(aB,{property:n,viewport:e}),e))))))))};function cB({character:e,type:t,onUse:n}){const o=(0,c.useContext)(Qx),r=(0,c.useRef)();return r.current=n,(0,c.useEffect)((()=>{function n(n){Pd.isKeyboardEvent[t](n,e)&&(r.current(),n.preventDefault())}return o.current.add(n),()=>{o.current.delete(n)}}),[e,t]),null}function uB({name:e,shortcutType:t,shortcutCharacter:n,...o}){let r,l="RichText.ToolbarControls";return e&&(l+=`.${e}`),t&&n&&(r=Pd.displayShortcut[t](n)),(0,c.createElement)(m.Fill,{name:l},(0,c.createElement)(m.ToolbarButton,{...o,shortcut:r}))}function dB({inputType:e,onInput:t}){const n=(0,c.useContext)(Jx),o=(0,c.useRef)();return o.current=t,(0,c.useEffect)((()=>{function t(t){t.inputType===e&&(o.current(),t.preventDefault())}return n.current.add(t),()=>{n.current.delete(t)}}),[e]),null}const pB=(0,c.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,c.createElement)(m.Path,{d:"M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z"}));var mB=(0,c.forwardRef)((function(e,t){const n=(0,f.useSelect)((e=>e(Jo).__unstableGetEditorMode()),[]),{__unstableSetEditorMode:o}=(0,f.useDispatch)(Jo);return(0,c.createElement)(m.Dropdown,{renderToggle:({isOpen:o,onToggle:r})=>(0,c.createElement)(m.Button,{...e,ref:t,icon:"navigation"===n?pB:ub,"aria-expanded":o,"aria-haspopup":"true",onClick:r,label:(0,v.__)("Tools")}),popoverProps:{placement:"bottom-start",variant:void 0},renderContent:()=>(0,c.createElement)(c.Fragment,null,(0,c.createElement)(m.NavigableMenu,{role:"menu","aria-label":(0,v.__)("Tools")},(0,c.createElement)(m.MenuItemsChoice,{value:"navigation"===n?"navigation":"edit",onSelect:o,choices:[{value:"edit",label:(0,c.createElement)(c.Fragment,null,(0,c.createElement)(ai,{icon:ub}),(0,v.__)("Edit"))},{value:"navigation",label:(0,c.createElement)(c.Fragment,null,pB,(0,v.__)("Select"))}]})),(0,c.createElement)("div",{className:"block-editor-tool-selector__help"},(0,v.__)("Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.")))})}));function fB({units:e,...t}){const n=(0,m.__experimentalUseCustomUnits)({availableUnits:bl("spacing.units")||["%","px","em","rem","vw"],units:e});return(0,c.createElement)(m.__experimentalUnitControl,{units:n,...t})}var gB=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"}));class hB extends c.Component{constructor(){super(...arguments),this.toggle=this.toggle.bind(this),this.submitLink=this.submitLink.bind(this),this.state={expanded:!1}}toggle(){this.setState({expanded:!this.state.expanded})}submitLink(e){e.preventDefault(),this.toggle()}render(){const{url:e,onChange:t}=this.props,{expanded:n}=this.state,o=e?(0,v.__)("Edit link"):(0,v.__)("Insert link");return(0,c.createElement)("div",{className:"block-editor-url-input__button"},(0,c.createElement)(m.Button,{icon:Wb,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!e}),n&&(0,c.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},(0,c.createElement)("div",{className:"block-editor-url-input__button-modal-line"},(0,c.createElement)(m.Button,{className:"block-editor-url-input__back",icon:gB,label:(0,v.__)("Close"),onClick:this.toggle}),(0,c.createElement)(Rh,{__nextHasNoMarginBottom:!0,value:e||"",onChange:t}),(0,c.createElement)(m.Button,{icon:xh,label:(0,v.__)("Submit"),type:"submit"}))))}}var bB=hB;var vB=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));const _B="none",kB="custom",yB="media",EB="attachment",SB=["noreferrer","noopener"],wB=(0,c.createElement)(m.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,c.createElement)(m.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),(0,c.createElement)(m.Path,{d:"m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z"}),(0,c.createElement)(m.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),CB=({linkDestination:e,onChangeUrl:t,url:n,mediaType:o="image",mediaUrl:r,mediaLink:l,linkTarget:i,linkClass:a,rel:s})=>{const[u,d]=(0,c.useState)(!1),[p,f]=(0,c.useState)(null),[g,h]=(0,c.useState)(!1),[b,_]=(0,c.useState)(null),k=(0,c.useRef)(null),y=()=>{h(!1)},E=()=>{const e=[{linkDestination:yB,title:(0,v.__)("Media File"),url:"image"===o?r:void 0,icon:wB}];return"image"===o&&l&&e.push({linkDestination:EB,title:(0,v.__)("Attachment Page"),url:"image"===o?l:void 0,icon:(0,c.createElement)(m.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,c.createElement)(m.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,c.createElement)(m.Path,{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))}),e},S=(0,c.createElement)(m.__experimentalVStack,{spacing:"3"},(0,c.createElement)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,v.__)("Open in new tab"),onChange:e=>{const n=(e=>{const t=e?"_blank":void 0;let n;if(t){const e=(null!=s?s:"").split(" ");SB.forEach((t=>{e.includes(t)||e.push(t)})),n=e.join(" ")}else{const e=(null!=s?s:"").split(" ").filter((e=>!1===SB.includes(e)));n=e.length?e.join(" "):void 0}return{linkTarget:t,rel:n}})(e);t(n)},checked:"_blank"===i}),(0,c.createElement)(m.TextControl,{__nextHasNoMarginBottom:!0,label:(0,v.__)("Link rel"),value:null!=s?s:"",onChange:e=>{t({rel:e})}}),(0,c.createElement)(m.TextControl,{__nextHasNoMarginBottom:!0,label:(0,v.__)("Link CSS Class"),value:a||"",onChange:e=>{t({linkClass:e})}})),w=null!==b?b:n,C=(E().find((t=>t.linkDestination===e))||{}).title;return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(m.ToolbarButton,{icon:Wb,className:"components-toolbar__control",label:n?(0,v.__)("Edit link"):(0,v.__)("Insert link"),"aria-expanded":u,onClick:()=>{d(!0)},ref:f}),u&&(0,c.createElement)(ux,{anchor:p,onFocusOutside:e=>{const t=k.current;t&&t.contains(e.target)||(d(!1),_(null),y())},onClose:()=>{_(null),y(),d(!1)},renderSettings:()=>S,additionalControls:!w&&(0,c.createElement)(m.NavigableMenu,null,E().map((e=>(0,c.createElement)(m.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:()=>{_(null),(e=>{const n=E();let o;o=e?(n.find((t=>t.url===e))||{linkDestination:kB}).linkDestination:_B,t({linkDestination:o,href:e})})(e.url),y()}},e.title))))},(!n||g)&&(0,c.createElement)(ux.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:w,onChangeInputValue:_,onSubmit:e=>{if(b){const e=E().find((e=>e.url===b))?.linkDestination||kB;t({href:b,linkDestination:e})}y(),_(null),e.preventDefault()},autocompleteRef:k}),n&&!g&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(ux.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:n,onEditLinkClick:()=>{e!==yB&&e!==EB||_(""),h(!0)},urlLabel:C}),(0,c.createElement)(m.Button,{icon:vB,label:(0,v.__)("Remove link"),onClick:()=>{t({linkDestination:_B,href:""})}}))))},{Fill:xB,Slot:BB}=(0,m.createSlotFill)("__unstableBlockToolbarLastItem");xB.Slot=BB;var IB=xB;var TB=(0,c.createContext)("");var MB=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"}));var PB=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M17 4H7c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12zm-7.5-.5h4V16h-4v1.5z"}));var NB=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"}));function LB({children:e,viewLabel:t,className:n,isEnabled:o=!0,deviceType:r,setDeviceType:l,label:i}){if((0,p.useViewportMatch)("small","<"))return null;const a={className:d()(n,"block-editor-post-preview__dropdown-content"),placement:"bottom-end"},s={className:"block-editor-post-preview__button-toggle",disabled:!o,__experimentalIsFocusable:!o,children:t},u={"aria-label":(0,v.__)("View options")},f={mobile:MB,tablet:PB,desktop:NB};return(0,c.createElement)(m.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:a,toggleProps:s,menuProps:u,icon:f[r.toLowerCase()],label:i||(0,v.__)("Preview"),disableOpenOnArrowDown:!o},(t=>(0,c.createElement)(c.Fragment,null,(0,c.createElement)(m.MenuGroup,null,(0,c.createElement)(m.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Desktop"),icon:"Desktop"===r&&gk},(0,v.__)("Desktop")),(0,c.createElement)(m.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Tablet"),icon:"Tablet"===r&&gk},(0,v.__)("Tablet")),(0,c.createElement)(m.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Mobile"),icon:"Mobile"===r&&gk},(0,v.__)("Mobile"))),e?.(t))))}function RB(e){const[t,n]=(0,c.useState)(window.innerWidth);(0,c.useEffect)((()=>{if("Desktop"===e)return;const t=()=>n(window.innerWidth);return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}),[e]);const o=e=>{let n;switch(e){case"Tablet":n=780;break;case"Mobile":n=360;break;default:return null}return n{const t="Mobile"===e?"768px":"1024px",n=(window.innerHeight<800?36:72)+"px",r="auto";switch(e){case"Tablet":case"Mobile":return{width:o(e),marginTop:n,marginBottom:n,marginLeft:r,marginRight:r,height:t,borderRadius:"2px 2px 2px 2px",border:"1px solid #ddd",overflowY:"auto"};default:return null}})(e)}var AB=(0,f.withSelect)((e=>({selectedBlockClientId:e(Jo).getBlockSelectionStart()})))((({selectedBlockClientId:e})=>{const t=Od(e);return e?(0,c.createElement)(m.Button,{variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{t.current.focus()}},(0,v.__)("Skip to the selected block")):null})),DB=window.wp.wordcount;var OB=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z"}));var zB=(0,f.withSelect)((e=>{const{getMultiSelectedBlocks:t}=e(Jo);return{blocks:t()}}))((function({blocks:e}){const t=(0,DB.count)((0,a.serialize)(e),"words");return(0,c.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},(0,c.createElement)(ep,{icon:OB,showColors:!0}),(0,c.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},(0,c.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},(0,v.sprintf)((0,v._n)("%d Block","%d Blocks",e.length),e.length)),(0,c.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},(0,v.sprintf)((0,v._n)("%d word selected.","%d words selected.",t),t))))}));function VB({blockName:e}){const{preferredStyle:t,onUpdatePreferredStyleVariations:n,styles:o}=(0,f.useSelect)((t=>{var n;const o=t(Jo).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:o?.value?.[e],onUpdatePreferredStyleVariations:null!==(n=o?.onChange)&&void 0!==n?n:null,styles:t(a.store).getBlockStyles(e)}}),[e]),r=(0,c.useMemo)((()=>[{label:(0,v.__)("Not set"),value:""},...o.map((({label:e,name:t})=>({label:e,value:t})))]),[o]),l=(0,c.useMemo)((()=>Vw(o)?.name),[o]),i=(0,c.useCallback)((t=>{n(e,t)}),[e,n]);return t&&t!==l?n&&(0,c.createElement)("div",{className:"default-style-picker__default-switcher"},(0,c.createElement)(m.SelectControl,{__nextHasNoMarginBottom:!0,options:r,value:t||"",label:(0,v.__)("Default Style"),onChange:i})):null}var FB=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"}));var HB=(0,c.createElement)(F.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,c.createElement)(F.Path,{d:"M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z"}));const GB={name:"settings",title:(0,v.__)("Settings"),value:"settings",icon:FB,className:"block-editor-block-inspector__tab-item"},UB={name:"styles",title:(0,v.__)("Styles"),value:"styles",icon:HB,className:"block-editor-block-inspector__tab-item"},$B={name:"list",title:(0,v.__)("List View"),value:"list-view",icon:ES,className:"block-editor-block-inspector__tab-item"};var jB=()=>{const e=(0,m.__experimentalUseSlotFills)(ra.slotName);return Boolean(e&&e.length)?(0,c.createElement)(m.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,v.__)("Advanced"),initialOpen:!1},(0,c.createElement)(la.Slot,{group:"advanced"})):null};const WB=()=>{const[e,t]=(0,c.useState)(),{multiSelectedBlocks:n}=(0,f.useSelect)((e=>{const{getBlocksByClientId:t,getSelectedBlockClientIds:n}=e(Jo);return{multiSelectedBlocks:t(n())}}),[]);return(0,c.useLayoutEffect)((()=>{void 0===e&&t(n.some((({attributes:e})=>!!e?.style?.position?.type)))}),[e,n,t]),(0,c.createElement)(m.PanelBody,{className:"block-editor-block-inspector__position",title:(0,v.__)("Position"),initialOpen:null!=e&&e},(0,c.createElement)(la.Slot,{group:"position"}))};var KB=()=>{const e=(0,m.__experimentalUseSlotFills)(Yi.position.Slot.__unstableName);return Boolean(e&&e.length)?(0,c.createElement)(WB,null):null};const qB="isInspectorControlsTabsHintVisible";function ZB(){const e=(0,f.useSelect)((e=>{var t;return null===(t=e(Ch.store).get("core",qB))||void 0===t||t}),[]),t=(0,c.useRef)(),{set:n}=(0,f.useDispatch)(Ch.store);return e?(0,c.createElement)("div",{ref:t,className:"block-editor-inspector-controls-tabs__hint"},(0,c.createElement)("div",{className:"block-editor-inspector-controls-tabs__hint-content"},(0,v.__)("Looking for other block settings? They've moved to the styles tab.")),(0,c.createElement)(m.Button,{className:"block-editor-inspector-controls-tabs__hint-dismiss",icon:vB,iconSize:"16",label:(0,v.__)("Dismiss hint"),onClick:()=>{const e=da.focus.tabbable.findPrevious(t.current);e?.focus(),n("core",qB,!1)},showTooltip:!1})):null}var YB=({showAdvancedControls:e=!1})=>(0,c.createElement)(c.Fragment,null,(0,c.createElement)(la.Slot,null),(0,c.createElement)(KB,null),e&&(0,c.createElement)("div",null,(0,c.createElement)(jB,null)),(0,c.createElement)(ZB,null));var XB=({blockName:e,clientId:t,hasBlockStyles:n})=>(0,c.createElement)(c.Fragment,null,n&&(0,c.createElement)("div",null,(0,c.createElement)(m.PanelBody,{title:(0,v.__)("Styles")},(0,c.createElement)($w,{clientId:t}),(0,a.hasBlockSupport)(e,"defaultStylePicker",!0)&&(0,c.createElement)(VB,{blockName:e}))),(0,c.createElement)(la.Slot,{group:"color",label:(0,v.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,c.createElement)(la.Slot,{group:"background",label:(0,v.__)("Background")}),(0,c.createElement)(la.Slot,{group:"filter"}),(0,c.createElement)(la.Slot,{group:"typography",label:(0,v.__)("Typography")}),(0,c.createElement)(la.Slot,{group:"dimensions",label:(0,v.__)("Dimensions")}),(0,c.createElement)(la.Slot,{group:"border",label:(0,v.__)("Border")}),(0,c.createElement)(la.Slot,{group:"styles"}));const QB=["core/navigation"];var JB=e=>!QB.includes(e);function eI({blockName:e,clientId:t,hasBlockStyles:n,tabs:o}){const r=JB(e)?void 0:$B.name;return(0,c.createElement)(m.TabPanel,{className:"block-editor-block-inspector__tabs",tabs:o,initialTabName:r,key:t},(o=>o.name===GB.name?(0,c.createElement)(YB,{showAdvancedControls:!!e}):o.name===UB.name?(0,c.createElement)(XB,{blockName:e,clientId:t,hasBlockStyles:n}):o.name===$B.name?(0,c.createElement)(la.Slot,{group:"list"}):void 0))}const tI=[];function nI(e){const t=[],{border:n,color:o,default:r,dimensions:l,list:i,position:a,styles:s,typography:c}=Yi,u=JB(e),d=(0,m.__experimentalUseSlotFills)(i.Slot.__unstableName),p=!u&&!!d&&d.length,g=[...(0,m.__experimentalUseSlotFills)(n.Slot.__unstableName)||[],...(0,m.__experimentalUseSlotFills)(o.Slot.__unstableName)||[],...(0,m.__experimentalUseSlotFills)(l.Slot.__unstableName)||[],...(0,m.__experimentalUseSlotFills)(s.Slot.__unstableName)||[],...(0,m.__experimentalUseSlotFills)(c.Slot.__unstableName)||[]].length,h=(0,m.__experimentalUseSlotFills)(ra.slotName)||[],b=[...(0,m.__experimentalUseSlotFills)(r.Slot.__unstableName)||[],...(0,m.__experimentalUseSlotFills)(a.Slot.__unstableName)||[],...p&&g>1?h:[]];p&&t.push($B),b.length&&t.push(GB),g&&t.push(UB);const v=function(e,t={}){return void 0!==t[e]?t[e]:void 0===t.default||t.default}(e,(0,f.useSelect)((e=>e(Jo).getSettings().blockInspectorTabs),[]));return v?t:tI}const{createPrivateSlotFill:oI}=Xo(m.privateApis),{Fill:rI,Slot:lI}=oI("BlockInformation"),iI=e=>lr()?(0,c.createElement)(rI,{...e}):null;iI.Slot=e=>(0,c.createElement)(lI,{...e});var aI=iI;function sI({clientIds:e}){return e.length?(0,c.createElement)(m.__experimentalVStack,{spacing:1},e.map((e=>(0,c.createElement)(cI,{key:e,clientId:e})))):null}function cI({clientId:e}){const{name:t,icon:n,isSelected:o}=(0,f.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:o,isBlockSelected:r,hasSelectedInnerBlock:l}=t(Jo),{getBlockType:i}=t(a.store),s=i(n(e)),c=o(e);return{name:s&&(0,a.__experimentalGetBlockLabel)(s,c,"list-view"),icon:s?.icon,isSelected:r(e)||l(e,!0)}}),[e]),{selectBlock:r}=(0,f.useDispatch)(Jo);return(0,c.createElement)(m.Button,{isPressed:o,onClick:()=>r(e)},(0,c.createElement)(m.__experimentalHStack,{justify:"flex-start"},(0,c.createElement)(ep,{icon:n}),(0,c.createElement)(m.FlexItem,null,t)))}function uI({topLevelLockedBlock:e}){const t=(0,f.useSelect)((t=>{const{getClientIdsOfDescendants:n,getBlockName:o,getBlockEditingMode:r}=t(Jo);return n(e).filter((e=>"core/list-item"!==o(e)&&"contentOnly"===r(e)))}),[e]),n=Iy(e);return(0,c.createElement)("div",{className:"block-editor-block-inspector"},(0,c.createElement)(tp,{...n,className:n.isSynced&&"is-synced"}),(0,c.createElement)(dC,{blockClientId:e}),(0,c.createElement)(aI.Slot,null),(0,c.createElement)(m.PanelBody,{title:(0,v.__)("Content")},(0,c.createElement)(sI,{clientIds:t})))}const dI=({animate:e,wrapper:t,children:n})=>e?t(n):n,pI=({blockInspectorAnimationSettings:e,selectedBlockClientId:t,children:n})=>{const o=e&&"leftToRight"===e.enterDirection?-50:50;return(0,c.createElement)(m.__unstableMotion.div,{animate:{x:0,opacity:1,transition:{ease:"easeInOut",duration:.14}},initial:{x:o,opacity:0},key:t},n)},mI=({clientId:e,blockName:t})=>{const n=nI(t),o=n?.length>1,r=(0,f.useSelect)((e=>{const{getBlockStyles:n}=e(a.store),o=n(t);return o&&o.length>0}),[t]),l=Iy(e);return(0,c.createElement)("div",{className:"block-editor-block-inspector"},(0,c.createElement)(tp,{...l,className:l.isSynced&&"is-synced"}),(0,c.createElement)(dC,{blockClientId:e}),(0,c.createElement)(aI.Slot,null),o&&(0,c.createElement)(eI,{hasBlockStyles:r,clientId:e,blockName:t,tabs:n}),!o&&(0,c.createElement)(c.Fragment,null,r&&(0,c.createElement)("div",null,(0,c.createElement)(m.PanelBody,{title:(0,v.__)("Styles")},(0,c.createElement)($w,{clientId:e}),(0,a.hasBlockSupport)(t,"defaultStylePicker",!0)&&(0,c.createElement)(VB,{blockName:t}))),(0,c.createElement)(la.Slot,null),(0,c.createElement)(la.Slot,{group:"list"}),(0,c.createElement)(la.Slot,{group:"color",label:(0,v.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,c.createElement)(la.Slot,{group:"typography",label:(0,v.__)("Typography")}),(0,c.createElement)(la.Slot,{group:"dimensions",label:(0,v.__)("Dimensions")}),(0,c.createElement)(la.Slot,{group:"border",label:(0,v.__)("Border")}),(0,c.createElement)(la.Slot,{group:"styles"}),(0,c.createElement)(la.Slot,{group:"background",label:(0,v.__)("Background")}),(0,c.createElement)(KB,null),(0,c.createElement)("div",null,(0,c.createElement)(jB,null))),(0,c.createElement)(AB,{key:"back"}))};var fI=({showNoBlockSelectedMessage:e=!0})=>{const{count:t,selectedBlockName:n,selectedBlockClientId:o,blockType:r,topLevelLockedBlock:l}=(0,f.useSelect)((e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:o,__unstableGetContentLockingParent:r,getTemplateLock:l}=e(Jo),i=t(),s=i&&o(i),c=s&&(0,a.getBlockType)(s);return{count:n(),selectedBlockClientId:i,selectedBlockName:s,blockType:c,topLevelLockedBlock:r(i)||("contentOnly"===l(i)?i:void 0)}}),[]),i=nI(r?.name),s=i?.length>1,u=function(e,t){return(0,f.useSelect)((t=>{if(e){const n=t(Jo).getSettings().blockInspectorAnimation,o=n?.animationParent,{getSelectedBlockClientId:r,getBlockParentsByBlockName:l}=t(Jo);return l(r(),o,!0)[0]||e.name===o?n?.[e.name]:null}return null}),[t,e])}(r,o);if(t>1)return(0,c.createElement)("div",{className:"block-editor-block-inspector"},(0,c.createElement)(zB,null),s?(0,c.createElement)(eI,{tabs:i}):(0,c.createElement)(c.Fragment,null,(0,c.createElement)(la.Slot,null),(0,c.createElement)(la.Slot,{group:"color",label:(0,v.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,c.createElement)(la.Slot,{group:"typography",label:(0,v.__)("Typography")}),(0,c.createElement)(la.Slot,{group:"dimensions",label:(0,v.__)("Dimensions")}),(0,c.createElement)(la.Slot,{group:"border",label:(0,v.__)("Border")}),(0,c.createElement)(la.Slot,{group:"styles"})));const d=n===(0,a.getUnregisteredTypeHandlerName)();return r&&o&&!d?l?(0,c.createElement)(uI,{topLevelLockedBlock:l}):(0,c.createElement)(dI,{animate:u,wrapper:e=>(0,c.createElement)(pI,{blockInspectorAnimationSettings:u,selectedBlockClientId:o},e)},(0,c.createElement)(mI,{clientId:o,blockName:r.name})):e?(0,c.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},(0,v.__)("No block selected.")):null};var gI=function({clientIds:e,hideDragHandle:t}){const{canMove:n,rootClientId:o,isFirst:r,isLast:l,orientation:i}=(0,f.useSelect)((t=>{const{getBlockIndex:n,getBlockListSettings:o,canMoveBlocks:r,getBlockOrder:l,getBlockRootClientId:i}=t(Jo),a=Array.isArray(e)?e:[e],s=a[0],c=i(s),u=n(s),d=n(a[a.length-1]),p=l(c);return{canMove:r(e,c),rootClientId:c,isFirst:0===u,isLast:d===p.length-1,orientation:o(c)?.orientation}}),[e]);if(!n||r&&l&&!o)return null;const a=(0,v.__)("Drag");return(0,c.createElement)(m.ToolbarGroup,{className:d()("block-editor-block-mover",{"is-horizontal":"horizontal"===i})},!t&&(0,c.createElement)(WS,{clientIds:e},(e=>(0,c.createElement)(m.Button,{icon:Fm,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:a,tabIndex:"-1",...e}))),(0,c.createElement)("div",{className:"block-editor-block-mover__move-button-container"},(0,c.createElement)(m.ToolbarItem,null,(t=>(0,c.createElement)(OS,{clientIds:e,...t}))),(0,c.createElement)(m.ToolbarItem,null,(t=>(0,c.createElement)(zS,{clientIds:e,...t})))))};var hI=function({clientIds:e,...t}){return(0,c.createElement)(m.ToolbarGroup,null,(0,c.createElement)(m.ToolbarItem,null,(n=>(0,c.createElement)(Nw,{clientIds:e,toggleProps:n,...t}))))};function bI(){const{selectBlock:e}=(0,f.useDispatch)(Jo),{firstParentClientId:t,isVisible:n}=(0,f.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:o,getBlockEditingMode:r}=e(Jo),{hasBlockSupport:l}=e(a.store),i=n(o()),s=i[i.length-1],c=t(s),u=(0,a.getBlockType)(c);return{firstParentClientId:s,isVisible:s&&"default"===r(s)&&l(u,"__experimentalParentSelector",!0)}}),[]),o=Iy(t),r=(0,c.useRef)(),l=Iw({ref:r,highlightParent:!0});return n?(0,c.createElement)("div",{className:"block-editor-block-parent-selector",key:t,ref:r,...l},(0,c.createElement)(m.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(t),label:(0,v.sprintf)((0,v.__)("Select %s"),o?.title),showTooltip:!0,icon:(0,c.createElement)(ep,{icon:o?.icon})})):null}function vI({blocks:e}){return(0,c.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,c.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,c.createElement)(m.Popover,{className:"block-editor-block-switcher__preview__popover",placement:"bottom-start",focusOnMount:!1},(0,c.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,c.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,v.__)("Preview")),(0,c.createElement)(Am,{viewportWidth:500,blocks:e})))))}const _I={};function kI({item:e,onSelect:t,setHoveredTransformItemName:n}){const{name:o,icon:r,title:l}=e;return(0,c.createElement)(m.MenuItem,{className:(0,a.getBlockMenuDefaultClassName)(o),onClick:e=>{e.preventDefault(),t(o)},onMouseLeave:()=>n(null),onMouseEnter:()=>n(o)},(0,c.createElement)(ep,{icon:r,showColors:!0}),l)}var yI=({transformations:e,onSelect:t,blocks:n})=>{const[o,r]=(0,c.useState)();return(0,c.createElement)(c.Fragment,null,o&&(0,c.createElement)(vI,{blocks:(0,a.cloneBlock)(n[0],e.find((({name:e})=>e===o)).attributes)}),e?.map((e=>(0,c.createElement)(kI,{key:e.name,item:e,onSelect:t,setHoveredTransformItemName:r}))))};function EI({restTransformations:e,onSelect:t,setHoveredTransformItemName:n}){return e.map((e=>(0,c.createElement)(SI,{key:e.name,item:e,onSelect:t,setHoveredTransformItemName:n})))}function SI({item:e,onSelect:t,setHoveredTransformItemName:n}){const{name:o,icon:r,title:l,isDisabled:i}=e;return(0,c.createElement)(m.MenuItem,{className:(0,a.getBlockMenuDefaultClassName)(o),onClick:e=>{e.preventDefault(),t(o)},disabled:i,onMouseLeave:()=>n(null),onMouseEnter:()=>n(o)},(0,c.createElement)(ep,{icon:r,showColors:!0}),l)}var wI=({className:e,possibleBlockTransformations:t,possibleBlockVariationTransformations:n,onSelect:o,onSelectVariation:r,blocks:l})=>{const[i,s]=(0,c.useState)(),{priorityTextTransformations:u,restTransformations:d}=function(e){const t={"core/paragraph":1,"core/heading":2,"core/list":3,"core/quote":4},n=(0,c.useMemo)((()=>{const n=Object.keys(t);return e.reduce(((e,t)=>{const{name:o}=t;return n.includes(o)?e.priorityTextTransformations.push(t):e.restTransformations.push(t),e}),{priorityTextTransformations:[],restTransformations:[]})}),[e]);return n.priorityTextTransformations.sort((({name:e},{name:n})=>t[e](0,c.createElement)(SI,{key:e.name,item:e,onSelect:o,setHoveredTransformItemName:s}))),!p&&f),!!p&&(0,c.createElement)(m.MenuGroup,{className:e},f))};const CI=()=>{};function xI({clientId:e,onSwitch:t=CI}){const{onSelect:n,stylesToRender:o,activeStyle:r}=Hw({clientId:e,onSwitch:t});return o&&0!==o.length?(0,c.createElement)(c.Fragment,null,o.map((e=>{const t=e.label||e.name;return(0,c.createElement)(m.MenuItem,{key:e.name,icon:r.name===e.name?gk:null,onClick:()=>n(e)},(0,c.createElement)(m.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0},t))}))):null}function BI({hoveredBlock:e,onSwitch:t}){const{clientId:n}=e;return(0,c.createElement)(m.MenuGroup,{label:(0,v.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},(0,c.createElement)(xI,{clientId:n,onSwitch:t}))}const II=(e,t,n=new Set)=>{const{clientId:o,name:r,innerBlocks:l=[]}=e;if(!n.has(o)){if(r===t)return e;for(const e of l){const o=II(e,t,n);if(o)return o}}},TI=(e,t)=>{const n=((e,t)=>{const n=(0,a.__experimentalGetBlockAttributesNamesByRole)(e,"content");return n?.length?n.reduce(((e,n)=>(t[n]&&(e[n]=t[n]),e)),{}):t})(t.name,t.attributes);e.attributes={...e.attributes,...n}};var MI=(e,t)=>(0,c.useMemo)((()=>e.reduce(((e,n)=>{const o=((e,t)=>{const n=t.map((e=>(0,a.cloneBlock)(e))),o=new Set;for(const t of e){let e=!1;for(const r of n){const n=II(r,t.name,o);if(n){e=!0,o.add(n.clientId),TI(n,t);break}}if(!e)return}return n})(t,n.blocks);return o&&e.push({...n,transformedBlocks:o}),e}),[])),[e,t]);function PI({patterns:e,onSelect:t}){return(0,c.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,c.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,c.createElement)(m.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right"},(0,c.createElement)("div",{className:"block-editor-block-switcher__preview is-pattern-list-preview"},(0,c.createElement)(NI,{patterns:e,onSelect:t})))))}function NI({patterns:e,onSelect:t}){const n=(0,m.__unstableUseCompositeState)();return(0,c.createElement)(m.__unstableComposite,{...n,role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,v.__)("Patterns list")},e.map((e=>(0,c.createElement)(LI,{key:e.name,pattern:e,onSelect:t,composite:n}))))}function LI({pattern:e,onSelect:t,composite:n}){const o="block-editor-block-switcher__preview-patterns-container",r=(0,p.useInstanceId)(LI,`${o}-list__item-description`);return(0,c.createElement)("div",{className:`${o}-list__list-item`},(0,c.createElement)(m.__unstableCompositeItem,{role:"option",as:"div",...n,"aria-label":e.title,"aria-describedby":e.description?r:void 0,className:`${o}-list__item`,onClick:()=>t(e.transformedBlocks)},(0,c.createElement)(Am,{blocks:e.transformedBlocks,viewportWidth:e.viewportWidth||500}),(0,c.createElement)("div",{className:`${o}-list__item-title`},e.title)),!!e.description&&(0,c.createElement)(m.VisuallyHidden,{id:r},e.description))}var RI=function({blocks:e,patterns:t,onSelect:n}){const[o,r]=(0,c.useState)(!1),l=MI(t,e);return l.length?(0,c.createElement)(m.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},o&&(0,c.createElement)(PI,{patterns:l,onSelect:n}),(0,c.createElement)(m.MenuItem,{onClick:e=>{e.preventDefault(),r(!o)},icon:Xd},(0,v.__)("Patterns"))):null};const AI=({clientIds:e,blocks:t})=>{const{replaceBlocks:n,multiSelect:o,updateBlockAttributes:r}=(0,f.useDispatch)(Jo),l=Iy(t[0].clientId),{possibleBlockTransformations:i,canRemove:s,hasBlockStyles:u,icon:d,patterns:p}=(0,f.useSelect)((n=>{const{getBlockRootClientId:o,getBlockTransformItems:r,__experimentalGetPatternTransformItems:i,canRemoveBlocks:s}=n(Jo),{getBlockStyles:c,getBlockType:u}=n(a.store),d=o(Array.isArray(e)?e[0]:e),[{name:p}]=t,m=1===t.length,f=m&&c(p);let g;if(m)g=l?.icon;else{g=1===new Set(t.map((({name:e})=>e))).size?u(p)?.icon:OB}return{possibleBlockTransformations:r(t,d),canRemove:s(e,d),hasBlockStyles:!!f?.length,icon:g,patterns:i(t,d)}}),[e,t,l?.icon]),g=function({clientIds:e,blocks:t}){const{activeBlockVariation:n,blockVariationTransformations:o}=(0,f.useSelect)((n=>{const{getBlockRootClientId:o,getBlockAttributes:r,canRemoveBlocks:l}=n(Jo),{getActiveBlockVariation:i,getBlockVariations:s}=n(a.store),c=o(Array.isArray(e)?e[0]:e),u=l(e,c);if(1!==t.length||!u)return _I;const[d]=t;return{blockVariationTransformations:s(d.name,"transform"),activeBlockVariation:i(d.name,r(d.clientId))}}),[e,t]);return(0,c.useMemo)((()=>o?.filter((({name:e})=>e!==n?.name))),[o,n])}({clientIds:e,blocks:t}),h=cS({clientId:Array.isArray(e)?e[0]:e,maximumLength:35}),b=1===t.length&&(0,a.isReusableBlock)(t[0]),_=1===t.length&&(0,a.isTemplatePart)(t[0]);function k(e){e.length>1&&o(e[0].clientId,e[e.length-1].clientId)}const y=!!i.length&&s&&!_,E=!!g?.length,S=!!p?.length&&s;if(!u&&!y&&!E)return(0,c.createElement)(m.ToolbarGroup,null,(0,c.createElement)(m.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:h,icon:(0,c.createElement)(c.Fragment,null,(0,c.createElement)(ep,{icon:d,showColors:!0}),(b||_)&&(0,c.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},h))}));const w=h,C=1===t.length?(0,v.sprintf)((0,v.__)("%s: Change block type or style"),h):(0,v.sprintf)((0,v._n)("Change type of %d block","Change type of %d blocks",t.length),t.length),x=y||E,B=u||x||S;return(0,c.createElement)(m.ToolbarGroup,null,(0,c.createElement)(m.ToolbarItem,null,(o=>(0,c.createElement)(m.DropdownMenu,{className:"block-editor-block-switcher",label:w,popoverProps:{placement:"bottom-start",className:"block-editor-block-switcher__popover"},icon:(0,c.createElement)(c.Fragment,null,(0,c.createElement)(ep,{icon:d,className:"block-editor-block-switcher__toggle",showColors:!0}),(b||_)&&(0,c.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},h)),toggleProps:{describedBy:C,...o},menuProps:{orientation:"both"}},(({onClose:o})=>B&&(0,c.createElement)("div",{className:"block-editor-block-switcher__container"},S&&(0,c.createElement)(RI,{blocks:t,patterns:p,onSelect:t=>{!function(t){n(e,t),k(t)}(t),o()}}),x&&(0,c.createElement)(wI,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:i,possibleBlockVariationTransformations:g,blocks:t,onSelect:r=>{!function(o){const r=(0,a.switchToBlockType)(t,o);n(e,r),k(r)}(r),o()},onSelectVariation:e=>{!function(e){r(t[0].clientId,{...g.find((({name:t})=>t===e)).attributes})}(e),o()}}),u&&(0,c.createElement)(BI,{hoveredBlock:t[0],onSwitch:o})))))))};var DI=({clientIds:e})=>{const t=(0,f.useSelect)((t=>t(Jo).getBlocksByClientId(e)),[e]);return!t.length||t.some((e=>!e))?null:(0,c.createElement)(AI,{clientIds:e,blocks:t})};function OI({clientId:e,wrapperRef:t}){const{canEdit:n,canMove:o,canRemove:r,canLock:l}=Qy(e),[i,a]=(0,c.useReducer)((e=>!e),!1),s=(0,c.useRef)(null),u=(0,c.useRef)(!0),d=!l||n&&o&&r;return(0,c.useEffect)((()=>{u.current?u.current=!1:!i&&d&&da.focus.focusable.find(t.current,{sequential:!1}).find((e=>"BUTTON"===e.tagName&&e!==s.current))?.focus()}),[i,d,t]),d?null:(0,c.createElement)(c.Fragment,null,(0,c.createElement)(m.ToolbarGroup,{className:"block-editor-block-lock-toolbar"},(0,c.createElement)(m.ToolbarButton,{ref:s,icon:tE,label:(0,v.__)("Unlock"),onClick:a,"aria-expanded":i,"aria-haspopup":"dialog"})),i&&(0,c.createElement)(rE,{clientId:e,onClose:a}))}var zI=(0,c.createElement)(F.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,c.createElement)(F.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"}));var VI=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M4 6.5h5a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H4V16h5a.5.5 0 0 0 .5-.5v-7A.5.5 0 0 0 9 8H4V6.5Zm16 0h-5a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h5V16h-5a.5.5 0 0 1-.5-.5v-7A.5.5 0 0 1 15 8h5V6.5Z"}));var FI=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M17.5 4v5a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V4H8v5a.5.5 0 0 0 .5.5h7A.5.5 0 0 0 16 9V4h1.5Zm0 16v-5a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v5H8v-5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v5h1.5Z"}));const HI={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"}};var GI=function(){const{blocksSelection:e,clientIds:t,groupingBlockName:n,isGroupable:o}=Yy(),{replaceBlocks:r}=(0,f.useDispatch)(Jo),{canRemove:l,variations:i}=(0,f.useSelect)((e=>{const{canRemoveBlocks:o}=e(Jo),{getBlockVariations:r}=e(a.store);return{canRemove:o(t),variations:r(n,"transform")}}),[t,n]),s=o=>{const l=(0,a.switchToBlockType)(e,n);"string"!=typeof o&&(o="group"),l&&l.length>0&&(l[0].attributes.layout=HI[o],r(t,l))};if(!o||!l)return null;const u=!!i.find((({name:e})=>"group-row"===e)),d=!!i.find((({name:e})=>"group-stack"===e));return(0,c.createElement)(m.ToolbarGroup,null,(0,c.createElement)(m.ToolbarButton,{icon:zI,label:(0,v._x)("Group","verb"),onClick:s}),u&&(0,c.createElement)(m.ToolbarButton,{icon:VI,label:(0,v._x)("Row","single horizontal line"),onClick:()=>s("row")}),d&&(0,c.createElement)(m.ToolbarButton,{icon:FI,label:(0,v._x)("Stack","verb"),onClick:()=>s("stack")}))};function UI({clientIds:e}){const t=1===e.length?e[0]:void 0,n=(0,f.useSelect)((e=>!!t&&"html"===e(Jo).getBlockMode(t)),[t]),{toggleBlockMode:o}=(0,f.useDispatch)(Jo);return n?(0,c.createElement)(m.ToolbarGroup,null,(0,c.createElement)(m.ToolbarButton,{onClick:()=>{o(t)}},(0,v.__)("Edit visually"))):null}var $I=({hideDragHandle:e})=>{const{blockClientIds:t,blockType:n,isValid:o,isVisual:r,blockEditingMode:l}=(0,f.useSelect)((e=>{const{getBlockName:t,getBlockMode:n,getSelectedBlockClientIds:o,isBlockValid:r,getBlockRootClientId:l,getBlockEditingMode:i}=e(Jo),s=o(),c=s[0],u=l(c);return{blockClientIds:s,blockType:c&&(0,a.getBlockType)(t(c)),rootClientId:u,isValid:s.every((e=>r(e))),isVisual:s.every((e=>"visual"===n(e))),blockEditingMode:i(c)}}),[]),i=(0,c.useRef)(null),s=(0,c.useRef)(),u=Iw({ref:s}),g=!(0,p.useViewportMatch)("medium","<");if(n&&!(0,a.hasBlockSupport)(n,"__experimentalToolbar",!0))return null;if(0===t.length)return null;const h=o&&r,b=t.length>1,v=(0,a.isReusableBlock)(n)||(0,a.isTemplatePart)(n),_=d()("block-editor-block-toolbar",{"is-synced":v});return(0,c.createElement)("div",{className:_,ref:i},!b&&g&&"default"===l&&(0,c.createElement)(bI,null),(h||b)&&"default"===l&&(0,c.createElement)("div",{ref:s,...u},(0,c.createElement)(m.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},(0,c.createElement)(DI,{clientIds:t}),!b&&(0,c.createElement)(OI,{clientId:t[0],wrapperRef:i}),(0,c.createElement)(gI,{clientIds:t,hideDragHandle:e}))),h&&b&&(0,c.createElement)(GI,null),h&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(dr.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,c.createElement)(dr.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,c.createElement)(dr.Slot,{className:"block-editor-block-toolbar__slot"}),(0,c.createElement)(dr.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,c.createElement)(dr.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,c.createElement)(TB.Provider,{value:n?.name},(0,c.createElement)(IB.Slot,null))),(0,c.createElement)(UI,{clientIds:t}),"default"===l&&(0,c.createElement)(hI,{clientIds:t}))};var jI=function({clientId:e,rootClientId:t}){const n=Iy(e),o=(0,f.useSelect)((n=>{const{getBlock:o,getBlockIndex:r,hasBlockMovingClientId:l,getBlockListSettings:i,__unstableGetEditorMode:a}=n(Jo),s=r(e),{name:c,attributes:u}=o(e);return{index:s,name:c,attributes:u,blockMovingMode:l(),orientation:i(t)?.orientation,editorMode:a()}}),[e,t]),{index:r,name:l,attributes:i,blockMovingMode:s,orientation:u,editorMode:p}=o,{setNavigationMode:g,removeBlock:h}=(0,f.useDispatch)(Jo),b=(0,c.useRef)(),_=(0,a.getBlockType)(l),k=(0,a.__experimentalGetAccessibleBlockLabel)(_,i,r+1,u);(0,c.useEffect)((()=>{b.current.focus(),(0,Ln.speak)(k)}),[k]);const y=zd(e),{hasBlockMovingClientId:E,getBlockIndex:S,getBlockRootClientId:w,getClientIdsOfDescendants:C,getSelectedBlockClientId:x,getMultiSelectedBlocksEndClientId:B,getPreviousBlockClientId:I,getNextBlockClientId:T}=(0,f.useSelect)(Jo),{selectBlock:M,clearSelectedBlock:P,setBlockMovingClientId:N,moveBlockToPosition:L}=(0,f.useDispatch)(Jo),R=d()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!s}),A=(0,v.__)("Drag");return(0,c.createElement)("div",{className:R},(0,c.createElement)(m.Flex,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},(0,c.createElement)(m.FlexItem,null,(0,c.createElement)(ep,{icon:n?.icon,showColors:!0})),(0,c.createElement)(m.FlexItem,null,"zoom-out"===p&&(0,c.createElement)(gI,{clientIds:[e],hideDragHandle:!0}),"navigation"===p&&(0,c.createElement)(WS,{clientIds:[e]},(e=>(0,c.createElement)(m.Button,{icon:Fm,className:"block-selection-button_drag-handle","aria-hidden":"true",label:A,tabIndex:"-1",...e})))),(0,c.createElement)(m.FlexItem,null,(0,c.createElement)(m.Button,{ref:b,onClick:"navigation"===p?()=>g(!1):void 0,onKeyDown:function(t){const{keyCode:n}=t,o=n===Pd.UP,r=n===Pd.DOWN,l=n===Pd.LEFT,i=n===Pd.RIGHT,a=n===Pd.TAB,s=n===Pd.ESCAPE,c=n===Pd.ENTER,u=n===Pd.SPACE,d=t.shiftKey;if(n===Pd.BACKSPACE||n===Pd.DELETE)return h(e),void t.preventDefault();const p=x(),m=B(),f=I(m||p),g=T(m||p),b=a&&d||o,v=a&&!d||r,_=l,k=i;let R;if(b)R=f;else if(v)R=g;else if(_){var A;R=null!==(A=w(p))&&void 0!==A?A:p}else if(k){var D;R=null!==(D=C(p)[0])&&void 0!==D?D:p}const O=E();if(s&&O&&!t.defaultPrevented&&(N(null),t.preventDefault()),(c||u)&&O){const e=w(O),t=w(p),n=S(O);let o=S(p);n{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientIds:o,getBlockEditingMode:r}=e(Jo),{getBlockType:l}=e(a.store),i=o(),s=i[0],c=n(s),u=c[c.length-1],d=l(t(u));return{selectedBlockClientId:s,blockType:s&&l(t(s)),blockEditingMode:r(s),hasParents:c.length,showParentSelector:d&&"default"===r(u)&&(0,a.hasBlockSupport)(d,"__experimentalParentSelector",!0)&&i.length<=1&&"default"===r(s)}}),[]);(0,c.useEffect)((()=>{r(!1)}),[_]);const k=(0,p.useViewportMatch)("large",">="),y=document.body.classList.contains("is-fullscreen-mode");(0,c.useLayoutEffect)((()=>{if(!t)return;const e=document.querySelector(".block-editor-block-contextual-toolbar");if(!e)return;if(!s)return void(e.style.width="initial");if(!k)return void(e.style={});if(o)return void(e.style.width="auto");const n=document.querySelector(".edit-post-header__settings, .edit-widgets-header__actions"),r=document.querySelector(".edit-site-header-edit-mode__end"),l=window.getComputedStyle(e),i=!!n&&window.getComputedStyle(n),a=!!r&&window.getComputedStyle(r),c=parseFloat(l.marginLeft),u=i?parseFloat(i.width):0,d=a?parseFloat(a.width):0;e.style.width=`calc(100% - ${d+u+c+(n||r?2:0)+(y?0:160)}px)`}),[t,k,o,y,s]);const E=!s||(0,a.hasBlockSupport)(s,"__experimentalToolbar",!0),S=function(){let e=!1;for(const t in g)qI(t)&&(e=!0);return e}();if(!E||"default"!==u&&!S)return null;const w=d()("block-editor-block-contextual-toolbar",{"has-parent":h&&b,"is-fixed":t,"is-collapsed":o});return(0,c.createElement)(kx,{focusOnMount:e,className:w,"aria-label":(0,v.__)("Block tools"),...n},!o&&(0,c.createElement)($I,{hideDragHandle:t}),t&&i&&s&&(0,c.createElement)(m.ToolbarGroup,{className:o?"block-editor-block-toolbar__group-expand-fixed-toolbar":"block-editor-block-toolbar__group-collapse-fixed-toolbar"},(0,c.createElement)(m.ToolbarItem,{as:m.ToolbarButton,ref:l,icon:o?WI:KI,onClick:()=>{r((e=>!e)),l.current.focus()},label:o?(0,v.__)("Show block tools"):(0,v.__)("Hide block tools")})))};const YI={placement:"top-start"},XI={...YI,flip:!1,shift:!0},QI={...YI,flip:!0,shift:!1};function JI(e,t,n,o,r){if(!e||!t)return XI;const l=n?.scrollTop||0,i=t.getBoundingClientRect(),a=l+e.getBoundingClientRect().top,s=e.ownerDocument.documentElement.clientHeight,c=a+o,u=i.top>c,d=i.height>s-o;return r||!u&&!d?QI:XI}function eT(){const e=(0,p.useViewportMatch)("medium"),{shouldShowContextualToolbar:t,canFocusHiddenToolbar:n,fixedToolbarCanBeFocused:o}=(0,f.useSelect)((t=>{const{__unstableGetEditorMode:n,isMultiSelecting:o,isTyping:r,isBlockInterfaceHidden:l,getBlock:i,getSettings:s,isNavigationMode:c,getSelectedBlockClientId:u,getFirstMultiSelectedBlockClientId:d}=Xo(t(Jo)),p="edit"===n(),m=s().hasFixedToolbar,f=s().isDistractionFree,g=d()||u(),h=!!g,b=(0,a.isUnmodifiedDefaultBlock)(i(g)||{}),v=p&&!m&&(!f||c())&&e&&!o()&&!r()&&h&&!b&&!l();return{shouldShowContextualToolbar:v,canFocusHiddenToolbar:p&&h&&!v&&!m&&!f&&!b,fixedToolbarCanBeFocused:(m||!e)&&g}}),[e]);return{shouldShowContextualToolbar:t,canFocusHiddenToolbar:n,fixedToolbarCanBeFocused:o}}function tT(e){const{__unstableGetEditorMode:t,hasMultiSelection:n,isTyping:o,getLastMultiSelectedBlockClientId:r}=e(Jo);return{editorMode:t(),hasMultiSelection:n(),isTyping:o(),lastClientId:n()?r():null}}function nT({clientId:e,rootClientId:t,isEmptyDefaultBlock:n,capturingClientId:o,__unstablePopoverSlot:r,__unstableContentRef:l}){const{editorMode:i,hasMultiSelection:a,isTyping:s,lastClientId:u}=(0,f.useSelect)(tT,[]),m=(0,f.useSelect)((t=>{const{isBlockInsertionPointVisible:n,getBlockInsertionPoint:o,getBlockOrder:r}=t(Jo);if(!n())return!1;const l=o();return r(l.rootClientId)[l.index]===e}),[e]),g=(0,c.useRef)(!1),{shouldShowContextualToolbar:h,canFocusHiddenToolbar:b}=eT(),{stopTyping:v}=(0,f.useDispatch)(Jo),_=!s&&"edit"===i&&n,k=!a&&("navigation"===i||"zoom-out"===i);(0,lp.useShortcut)("core/block-editor/focus-toolbar",(()=>{g.current=!0,v(!0)}),{isDisabled:!b}),(0,c.useEffect)((()=>{g.current=!1}));const y=(0,c.useRef)();(0,c.useEffect)((()=>{y.current=void 0}),[e]);const E=function({contentElement:e,clientId:t}){const n=zd(t),[o,r]=(0,c.useState)(0),{blockIndex:l,isSticky:i}=(0,f.useSelect)((e=>{const{getBlockIndex:n,getBlockAttributes:o}=e(Jo);return{blockIndex:n(t),isSticky:Oy(o(t))}}),[t]),a=(0,c.useMemo)((()=>{if(e)return(0,da.getScrollContainer)(e)}),[e]),[s,u]=(0,c.useState)((()=>JI(e,n,a,o,i))),d=(0,p.useRefEffect)((e=>{r(e.offsetHeight)}),[]),m=(0,c.useCallback)((()=>u(JI(e,n,a,o,i))),[e,n,a,o]);return(0,c.useLayoutEffect)(m,[l,m]),(0,c.useLayoutEffect)((()=>{if(!e||!n)return;const t=e?.ownerDocument?.defaultView;let o;t?.addEventHandler?.("resize",m);const r=n?.ownerDocument?.defaultView;return r.ResizeObserver&&(o=new r.ResizeObserver(m),o.observe(n)),()=>{t?.removeEventHandler?.("resize",m),o&&o.disconnect()}}),[m,e,n]),{...s,ref:d}}({contentElement:l?.current,clientId:e});return _?(0,c.createElement)(Vg,{clientId:o||e,__unstableCoverTarget:!0,bottomClientId:u,className:d()("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":m}),__unstablePopoverSlot:r,__unstableContentRef:l,resize:!1,shift:!1,...E},(0,c.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},(0,c.createElement)(Ig,{position:"bottom right",rootClientId:t,clientId:e,__experimentalIsQuick:!0}))):k||h?(0,c.createElement)(Vg,{clientId:o||e,bottomClientId:u,className:d()("block-editor-block-list__block-popover",{"is-insertion-point-visible":m}),__unstablePopoverSlot:r,__unstableContentRef:l,resize:!1,...E},h&&(0,c.createElement)(ZI,{focusOnMount:g.current,__experimentalInitialIndex:y.current,__experimentalOnIndexChange:e=>{y.current=e},key:e}),k&&(0,c.createElement)(jI,{clientId:e,rootClientId:t})):null}function oT(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlockRootClientId:o,getBlock:r,getBlockParents:l,__experimentalGetBlockListSettingsForBlocks:i}=e(Jo),s=t()||n();if(!s)return;const{name:c,attributes:u={}}=r(s)||{},d=l(s),p=i(d),m=d.find((e=>p[e]?.__experimentalCaptureToolbars));return{clientId:s,rootClientId:o(s),name:c,isEmptyDefaultBlock:c&&(0,a.isUnmodifiedDefaultBlock)({name:c,attributes:u}),capturingClientId:m}}function rT({__unstablePopoverSlot:e,__unstableContentRef:t}){const n=(0,f.useSelect)(oT,[]);if(!n)return null;const{clientId:o,rootClientId:r,name:l,isEmptyDefaultBlock:i,capturingClientId:a}=n;return l?(0,c.createElement)(nT,{clientId:o,rootClientId:r,isEmptyDefaultBlock:i,capturingClientId:a,__unstablePopoverSlot:e,__unstableContentRef:t}):null}var lT=function({__unstableContentRef:e}){const[t,n]=(0,c.useState)(!1),o=(0,f.useSelect)((e=>e(Jo).getBlockOrder()),[]);return(0,c.useEffect)((()=>{const e=setTimeout((()=>{n(!0)}),500);return()=>{clearTimeout(e)}}),[]),t?o.map(((t,n)=>n===o.length-1?null:(0,c.createElement)(Og,{key:t,previousClientId:t,nextClientId:o[n+1],__unstableContentRef:e},(0,c.createElement)("div",{className:"block-editor-block-list__insertion-point-inserter is-with-inserter"},(0,c.createElement)(Ig,{position:"bottom center",clientId:o[n+1],__experimentalIsQuick:!0}))))):null};function iT(e){const{__unstableGetEditorMode:t,getSettings:n,isTyping:o}=e(Jo);return{isZoomOutMode:"zoom-out"===t(),hasFixedToolbar:n().hasFixedToolbar,isTyping:o()}}function aT({children:e,__unstableContentRef:t,...n}){const o=(0,p.useViewportMatch)("medium"),{hasFixedToolbar:r,isZoomOutMode:l,isTyping:i}=(0,f.useSelect)(iT,[]),a=(0,lp.__unstableUseShortcutEventMatch)(),{getSelectedBlockClientIds:s,getBlockRootClientId:u}=(0,f.useSelect)(Jo),{duplicateBlocks:d,removeBlocks:g,insertAfterBlock:h,insertBeforeBlock:b,clearSelectedBlock:v,selectBlock:_,moveBlocksUp:k,moveBlocksDown:y}=(0,f.useDispatch)(Jo);const E=Ag(t),S=Ag(t);return(0,c.createElement)("div",{...n,onKeyDown:function(e){if(!e.defaultPrevented)if(a("core/block-editor/move-up",e)){const t=s();if(t.length){e.preventDefault();const n=u(t[0]);k(t,n)}}else if(a("core/block-editor/move-down",e)){const t=s();if(t.length){e.preventDefault();const n=u(t[0]);y(t,n)}}else if(a("core/block-editor/duplicate",e)){const t=s();t.length&&(e.preventDefault(),d(t))}else if(a("core/block-editor/remove",e)){const t=s();t.length&&(e.preventDefault(),g(t))}else if(a("core/block-editor/insert-after",e)){const t=s();t.length&&(e.preventDefault(),h(t[t.length-1]))}else if(a("core/block-editor/insert-before",e)){const t=s();t.length&&(e.preventDefault(),b(t[0]))}else if(a("core/block-editor/unselect",e)){const n=s();n.length&&(e.preventDefault(),n.length>1?_(n[0]):v(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges(),t?.current.focus())}}},(0,c.createElement)(Gg.Provider,{value:(0,c.useRef)(!1)},!i&&(0,c.createElement)($g,{__unstableContentRef:t}),!l&&(r||!o)&&(0,c.createElement)(ZI,{isFixed:!0}),(0,c.createElement)(rT,{__unstableContentRef:t}),(0,c.createElement)(m.Popover.Slot,{name:"block-toolbar",ref:E}),e,(0,c.createElement)(m.Popover.Slot,{name:"__unstable-block-tools-after",ref:S}),l&&(0,c.createElement)(lT,{__unstableContentRef:t})))}const sT=()=>{};var cT=(0,c.forwardRef)((function({rootClientId:e,clientId:t,isAppender:n,showInserterHelpPanel:o,showMostUsedBlocks:r=!1,__experimentalInsertionIndex:l,__experimentalFilterValue:i,onSelect:a=sT,shouldFocusBlock:s=!1},u){const{destinationRootClientId:d,prioritizePatterns:p}=(0,f.useSelect)((n=>{const{getBlockRootClientId:o,getSettings:r}=n(Jo),l=e||o(t)||void 0;return{destinationRootClientId:l,prioritizePatterns:r().__experimentalPreferPatternsOnRoot&&!l}}),[t,e]);return(0,c.createElement)(Sg,{onSelect:a,rootClientId:d,clientId:t,isAppender:n,showInserterHelpPanel:o,showMostUsedBlocks:r,__experimentalInsertionIndex:l,__experimentalFilterValue:i,shouldFocusBlock:s,prioritizePatterns:p,ref:u})}));function uT(){return $()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}const dT=-1!==window.navigator.userAgent.indexOf("Trident"),pT=new Set([Pd.UP,Pd.DOWN,Pd.LEFT,Pd.RIGHT]),mT=.75;function fT(){const e=(0,f.useSelect)((e=>e(Jo).hasSelectedBlock()),[]);return(0,p.useRefEffect)((t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:o}=n;let r,l,i;function a(){r||(r=o.requestAnimationFrame((()=>{p(),r=null})))}function s(e){l&&o.cancelAnimationFrame(l),l=o.requestAnimationFrame((()=>{c(e),l=null}))}function c({keyCode:e}){if(!m())return;const r=(0,da.computeCaretRect)(o);if(!r)return;if(!i)return void(i=r);if(pT.has(e))return void(i=r);const l=r.top-i.top;if(0===l)return;const a=(0,da.getScrollContainer)(t);if(!a)return;const s=a===n.body||a===n.documentElement,c=s?o.scrollY:a.scrollTop,u=s?0:a.getBoundingClientRect().top,d=s?i.top/o.innerHeight:(i.top-u)/(o.innerHeight-u);if(0===c&&du+p||i.top{o.removeEventListener("scroll",a,!0),o.removeEventListener("resize",a,!0),t.removeEventListener("keydown",s),t.removeEventListener("keyup",c),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),n.removeEventListener("selectionchange",d),o.cancelAnimationFrame(r),o.cancelAnimationFrame(l)}}),[e])}var gT=dT?e=>e.children:function({children:e}){return(0,c.createElement)("div",{ref:fT(),className:"block-editor__typewriter"},e)};const hT=(0,c.createContext)({});function bT({children:e,uniqueId:t,blockName:n=""}){const o=(0,c.useContext)(hT),{name:r}=rr();n=n||r;const l=(0,c.useMemo)((()=>function(e,t,n){const o={...e,[t]:e[t]?new Set(e[t]):new Set};return o[t].add(n),o}(o,n,t)),[o,n,t]);return(0,c.createElement)(hT.Provider,{value:l},e)}function vT(e,t=""){const n=(0,c.useContext)(hT),{name:o}=rr();return t=t||o,Boolean(n[t]?.has(e))}var _T=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));function kT({title:e,help:t,actions:n=[],onClose:o}){return(0,c.createElement)(m.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4},(0,c.createElement)(m.__experimentalHStack,{alignment:"center"},(0,c.createElement)(m.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13},e),(0,c.createElement)(m.__experimentalSpacer,null),n.map((({label:e,icon:t,onClick:n})=>(0,c.createElement)(m.Button,{key:e,className:"block-editor-inspector-popover-header__action",label:e,icon:t,variant:!t&&"tertiary",onClick:n},!t&&e))),o&&(0,c.createElement)(m.Button,{className:"block-editor-inspector-popover-header__action",label:(0,v.__)("Close"),icon:_T,onClick:o})),t&&(0,c.createElement)(m.__experimentalText,null,t))}var yT=(0,c.forwardRef)((function({onClose:e,onChange:t,...n},o){return(0,c.createElement)("div",{ref:o,className:"block-editor-publish-date-time-picker"},(0,c.createElement)(kT,{title:(0,v.__)("Publish"),actions:[{label:(0,v.__)("Now"),onClick:()=>t?.(null)}],onClose:e}),(0,c.createElement)(m.DateTimePicker,{startOfWeek:(0,gC.getSettings)().l10n.startOfWeek,onChange:t,...n}))})),ET=window.wp.commands;var ST=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M20 5h-5.7c0-1.3-1-2.3-2.3-2.3S9.7 3.7 9.7 5H4v2h1.5v.3l1.7 11.1c.1 1 1 1.7 2 1.7h5.7c1 0 1.8-.7 2-1.7l1.7-11.1V7H20V5zm-3.2 2l-1.7 11.1c0 .1-.1.2-.3.2H9.1c-.1 0-.3-.1-.3-.2L7.2 7h9.6z"}));var wT=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M19.75 9c0-1.257-.565-2.197-1.39-2.858-.797-.64-1.827-1.017-2.815-1.247-1.802-.42-3.703-.403-4.383-.396L11 4.5V6l.177-.001c.696-.006 2.416-.02 4.028.356.887.207 1.67.518 2.216.957.52.416.829.945.829 1.688 0 .592-.167.966-.407 1.23-.255.281-.656.508-1.236.674-1.19.34-2.82.346-4.607.346h-.077c-1.692 0-3.527 0-4.942.404-.732.209-1.424.545-1.935 1.108-.526.579-.796 1.33-.796 2.238 0 1.257.565 2.197 1.39 2.858.797.64 1.827 1.017 2.815 1.247 1.802.42 3.703.403 4.383.396L13 19.5h.714V22L18 18.5 13.714 15v3H13l-.177.001c-.696.006-2.416.02-4.028-.356-.887-.207-1.67-.518-2.216-.957-.52-.416-.829-.945-.829-1.688 0-.592.167-.966.407-1.23.255-.281.656-.508 1.237-.674 1.189-.34 2.819-.346 4.606-.346h.077c1.692 0 3.527 0 4.941-.404.732-.209 1.425-.545 1.936-1.108.526-.579.796-1.33.796-2.238z"}));var CT=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7zm-5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h1V9H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-1h-1.5v1z"}));const xT=()=>{const{clientIds:e}=(0,f.useSelect)((e=>{const{getSelectedBlockClientIds:t}=e(Jo);return{clientIds:t()}}),[]),t=(0,f.useSelect)((t=>t(Jo).getBlocksByClientId(e)),[e]),{replaceBlocks:n,multiSelect:o}=(0,f.useDispatch)(Jo),{possibleBlockTransformations:r,canRemove:l}=(0,f.useSelect)((n=>{const{getBlockRootClientId:o,getBlockTransformItems:r,canRemoveBlocks:l}=n(Jo),i=o(Array.isArray(e)?e[0]:e);return{possibleBlockTransformations:r(t,i),canRemove:l(e,i)}}),[e,t]),i=1===t.length&&(0,a.isTemplatePart)(t[0]);function s(r){const l=(0,a.switchToBlockType)(t,r);var i;n(e,l),(i=l).length>1&&o(i[0].clientId,i[i.length-1].clientId)}const u=!!r.length&&l&&!i;if(!e||e.length<1||!u)return{isLoading:!1,commands:[]};const d=r.map((e=>{const{name:t,title:n,icon:o}=e;return{name:"core/block-editor/transform-to-"+t.replace("/","-"),label:(0,v.sprintf)((0,v.__)("Transform to %s"),n),icon:(0,c.createElement)(ep,{icon:o}),callback:({close:e})=>{s(t),e()}}}));return{isLoading:!1,commands:d}},BT=()=>{const{clientIds:e,isUngroupable:t,isGroupable:n}=(0,f.useSelect)((e=>{const{getSelectedBlockClientIds:t,isUngroupable:n,isGroupable:o}=e(Jo);return{clientIds:t(),isUngroupable:n(),isGroupable:o()}}),[]),{canInsertBlockType:o,getBlockRootClientId:r,getBlocksByClientId:l,canMoveBlocks:i,canRemoveBlocks:s,getBlockCount:c}=(0,f.useSelect)(Jo),{getDefaultBlockName:u,getGroupingBlockName:d}=(0,f.useSelect)(a.store),p=l(e),{removeBlocks:m,replaceBlocks:g,duplicateBlocks:h,insertAfterBlock:b,insertBeforeBlock:_,setBlockMovingClientId:k,setNavigationMode:y,selectBlock:E}=(0,f.useDispatch)(Jo),S=()=>{if(!p.length)return;const t=d(),n=(0,a.switchToBlockType)(p,t);n&&g(e,n)},w=()=>{if(!p.length)return;const t=p[0].innerBlocks;t.length&&g(e,t)};if(!e||e.length<1)return{isLoading:!1,commands:[]};const C=r(e[0]),x=o(u(),C),B=p.every((e=>!!e&&(0,a.hasBlockSupport)(e.name,"multiple",!0)&&o(e.name,C))),I=s(e,C),T=i(e,C)&&1!==c(C),M=[];return x&&M.push({name:"add-after",label:(0,v.__)("Add after"),callback:()=>{const t=Array.isArray(e)?e[e.length-1]:t;b(t)},icon:qd},{name:"add-before",label:(0,v.__)("Add before"),callback:()=>{const t=Array.isArray(e)?e[0]:t;_(t)},icon:qd}),I&&M.push({name:"remove",label:(0,v.__)("Delete"),callback:()=>m(e,!0),icon:ST}),B&&M.push({name:"duplicate",label:(0,v.__)("Duplicate"),callback:()=>h(e,!0),icon:OB}),T&&M.push({name:"move-to",label:(0,v.__)("Move to"),callback:()=>{y(!0),E(e[0]),k(e[0])},icon:wT}),t&&M.push({name:"ungroup",label:(0,v.__)("Ungroup"),callback:w,icon:CT}),n&&M.push({name:"Group",label:(0,v.__)("Group"),callback:S,icon:zI}),{isLoading:!1,commands:M.map((e=>({...e,name:"core/block-editor/action-"+e.name,callback:({close:t})=>{e.callback(),t()}})))}},IT=()=>{(0,ET.useCommandLoader)({name:"core/block-editor/blockTransforms",hook:xT}),(0,ET.useCommandLoader)({name:"core/block-editor/blockActions",hook:BT})},TT="isResuableBlocksrRenameHintVisible";function MT(){const e=(0,f.useSelect)((e=>{var t;return null===(t=e(Ch.store).get("core",TT))||void 0===t||t}),[]),t=(0,c.useRef)(),{set:n}=(0,f.useDispatch)(Ch.store);return e?(0,c.createElement)("div",{ref:t,className:"reusable-blocks-menu-items__rename-hint"},(0,c.createElement)("div",{className:"reusable-blocks-menu-items__rename-hint-content"},(0,v.__)("Reusable blocks are now synced patterns. A synced pattern will behave in exactly the same way as a reusable block.")),(0,c.createElement)(m.Button,{className:"reusable-blocks-menu-items__rename-hint-dismiss",icon:vB,iconSize:"16",label:(0,v.__)("Dismiss hint"),onClick:()=>{const e=da.focus.tabbable.findPrevious(t.current);e?.focus(),n("core",TT,!1)},showTooltip:!1})):null}const PT={button:"wp-element-button",caption:"wp-element-caption"},NT=e=>PT[e]?PT[e]:"";function LT(e,t){return Object.entries(t).every((([t,n])=>"object"==typeof n&&"object"==typeof e[t]?LT(e[t],n):e[t]===n))}const RT=(e,t)=>{if(!t||!e)return;const n=t.filter((({attributes:t})=>!(!t||!Object.keys(t).length)&<(e,t)));return 1===n.length?n[0]:void 0};function AT(e){const t=e?.trim().match(/^(0?[-.]?\d*\.?\d+)(r?e[m|x]|v[h|w|min|max]+|p[x|t|c]|[c|m]m|%|in|ch|Q|lh)$/);return isNaN(e)||isNaN(parseFloat(e))?t?{value:parseFloat(t[1])||t[1],unit:t[2]}:{value:e,unit:void 0}:{value:parseFloat(e),unit:"px"}}function DT(e){try{return Function(`'use strict'; return (${e})`)()}catch(e){return null}}function OT(e,t){const n=e.split(/[(),]/g).filter(Boolean),o=n.slice(1).map((e=>AT(FT(e,t)).value)).filter(Boolean);switch(n[0]){case"min":return Math.min(...o)+"px";case"max":return Math.max(...o)+"px";case"clamp":return 3!==o.length?null:o[1]o[2]?o[2]+"px":o[1]+"px";case"calc":return o[0]+"px"}}function zT(e){for(;;){const t=e,n=/(max|min|calc|clamp)\(([^()]*)\)/g.exec(e)||[];if(n[0]){const t=OT(n[0]);e=e.replace(n[0],t)}if(e===t||parseFloat(e))break}return AT(e)}function VT(e){for(let t=0;tr.height?r.width:r.height)*o,"%":("font"===r.type?r.fontSize:r.width)*o,ch:8,ex:7.15625,lh:r.lineHeight},i={in:n,cm:37.79527559055118,mm:3.7795275590551185,pt:1.3333333333333333,pc:16,px:1,Q:.9448818897637794};return l[e.unit]?(l[e.unit]*e.value).toFixed(0)+"px":i[e.unit]?(i[e.unit]*e.value).toFixed(0)+"px":null}(n,t)}const HT={};var GT=function(e,t={}){const n=e+function(e){let t="";e.hasOwnProperty("fontSize")&&(t=":"+e.width);e.hasOwnProperty("lineHeight")&&(t=":"+e.lineHeight);e.hasOwnProperty("width")&&(t=":"+e.width);e.hasOwnProperty("height")&&(t=":"+e.height);e.hasOwnProperty("type")&&(t=":"+e.type);return t}(t);return HT[n]||(HT[n]=FT(e,t)),HT[n]};const UT={__experimentalBorder:"border",color:"color",spacing:"spacing",typography:"typography"};function $T(e){const t="var:";if(e?.startsWith?.(t)){return`var(--wp--${e.slice(4).split("|").join("--")})`}return e}function jT(e={},t,n){let o=[];return Object.keys(e).forEach((r=>{const l=t+cl(r.replace("/","-")),i=e[r];if(i instanceof Object){const e=l+n;o=[...o,...jT(i,e,n)]}else o.push(`${l}: ${i}`)})),o}const WT=(e,t)=>{const n={};return Object.entries(e).forEach((([e,o])=>{if("root"===e||!t?.[e])return;const r="string"==typeof o;if(r||Object.entries(o).forEach((([o,r])=>{if("root"===o||!t?.[e][o])return;const l=KT({[e]:{[o]:t[e][o]}});n[r]=[...n[r]||[],...l],delete t[e][o]})),r||o.root){const l=r?o:o.root,i=KT({[e]:t[e]});n[l]=[...n[l]||[],...i],delete t[e]}})),n};function KT(e={},t="",n,o={},r=!0){const l=Ml===t,i=Object.entries(a.__EXPERIMENTAL_STYLE_PROPERTY).reduce(((t,[o,{value:r,properties:i,useEngine:a,rootOnly:s}])=>{if(s&&!l)return t;const c=r;if("elements"===c[0]||a)return t;const u=pl(e,c);if("--wp--style--root--padding"===o&&("string"==typeof u||!n))return t;if(i&&"string"!=typeof u)Object.entries(i).forEach((e=>{const[n,o]=e;if(!pl(u,[o],!1))return;const r=n.startsWith("--")?n:cl(n);t.push(`${r}: ${$T(pl(u,[o]))}`)}));else if(pl(e,c,!1)){const n=o.startsWith("--")?o:cl(o);t.push(`${n}: ${$T(pl(e,c))}`)}return t}),[]);return(0,ui.getCSSRules)(e).forEach((e=>{if(l&&(n||!r)&&e.key.startsWith("padding"))return;const t=e.key.startsWith("--")?e.key:cl(e.key);let a=e.value;if("string"!=typeof a&&a?.ref){const e=a.ref.split(".");if(a=pl(o,e),!a||a?.ref)return}"font-size"===t&&(a=Bl({size:a},Tl(o?.settings))),i.push(`${t}: ${a}`)})),i}function qT({layoutDefinitions:e=_r,style:t,selector:n,hasBlockGapSupport:o,hasFallbackGapSupport:r,fallbackGapValue:l}){let i="",a=o?Hr(t?.spacing?.blockGap):"";if(r&&(n===Ml?a=a||"0.5em":!o&&l&&(a=l)),a&&e&&(Object.values(e).forEach((({className:e,name:t,spacingStyles:r})=>{(o||"flex"===t||"grid"===t)&&r?.length&&r.forEach((t=>{const r=[];if(t.rules&&Object.entries(t.rules).forEach((([e,t])=>{r.push(`${e}: ${t||a}`)})),r.length){let l="";l=o?n===Ml?`:where(${n} .${e})${t?.selector||""}`:`${n}-${e}${t?.selector||""}`:n===Ml?`:where(.${e}${t?.selector||""})`:`:where(${n}.${e}${t?.selector||""})`,i+=`${l} { ${r.join("; ")}; }`}}))})),n===Ml&&o&&(i+=`${n} { --wp--style--block-gap: ${a}; }`)),n===Ml&&e){const t=["block","flex","grid"];Object.values(e).forEach((({className:e,displayMode:o,baseStyles:r})=>{o&&t.includes(o)&&(i+=`${n} .${e} { display:${o}; }`),r?.length&&r.forEach((t=>{const o=[];if(t.rules&&Object.entries(t.rules).forEach((([e,t])=>{o.push(`${e}: ${t}`)})),o.length){i+=`${`${n} .${e}${t?.selector||""}`} { ${o.join("; ")}; }`}}))}))}return i}const ZT=["border","color","dimensions","spacing","typography","filter","outline","shadow"];function YT(e){if(!e)return{};const t=Object.entries(e).filter((([e])=>ZT.includes(e))).map((([e,t])=>[e,JSON.parse(JSON.stringify(t))]));return Object.fromEntries(t)}const XT=(e,t)=>{var n;const o=[];if(!e?.settings)return o;const r=e=>{let t={};return Pl.forEach((({path:n})=>{const o=pl(e,n,!1);!1!==o&&(t=dl(t,n,o))})),t},l=r(e.settings),i=e.settings?.custom;return(Object.keys(l).length>0||i)&&o.push({presets:l,custom:i,selector:Ml}),Object.entries(null!==(n=e.settings?.blocks)&&void 0!==n?n:{}).forEach((([e,n])=>{const l=r(n),i=n.custom;(Object.keys(l).length>0||i)&&o.push({presets:l,custom:i,selector:t[e]?.selector})})),o},QT=(e,t)=>{const n=XT(e,t);let o="";return n.forEach((({presets:t,custom:n,selector:r})=>{const l=function(e={},t){return Pl.reduce(((n,{path:o,valueKey:r,valueFunc:l,cssVarInfix:i})=>{const a=pl(e,o,[]);return["default","theme","custom"].forEach((e=>{a[e]&&a[e].forEach((e=>{r&&!l?n.push(`--wp--preset--${i}--${cl(e.slug)}: ${e[r]}`):l&&"function"==typeof l&&n.push(`--wp--preset--${i}--${cl(e.slug)}: ${l(e,t)}`)}))})),n}),[])}(t,e?.settings),i=jT(n,"--wp--custom--","--");i.length>0&&l.push(...i),l.length>0&&(o+=`${r}{${l.join(";")};}`)})),o},JT=(e,t,n,o,r=!1,l=!0)=>{const i=((e,t)=>{var n;const o=[];if(!e?.styles)return o;const r=YT(e.styles);return r&&o.push({styles:r,selector:Ml}),Object.entries(a.__EXPERIMENTAL_ELEMENTS).forEach((([t,n])=>{e.styles?.elements?.[t]&&o.push({styles:e.styles?.elements?.[t],selector:n})})),Object.entries(null!==(n=e.styles?.blocks)&&void 0!==n?n:{}).forEach((([e,n])=>{var r;const l=YT(n);if(n?.variations){const e={};Object.keys(n.variations).forEach((t=>{e[t]=YT(n.variations[t])})),l.variations=e}l&&t?.[e]?.selector&&o.push({duotoneSelector:t[e].duotoneSelector,fallbackGapValue:t[e].fallbackGapValue,hasLayoutSupport:t[e].hasLayoutSupport,selector:t[e].selector,styles:l,featureSelectors:t[e].featureSelectors,styleVariationSelectors:t[e].styleVariationSelectors}),Object.entries(null!==(r=n?.elements)&&void 0!==r?r:{}).forEach((([n,r])=>{r&&t?.[e]&&a.__EXPERIMENTAL_ELEMENTS[n]&&o.push({styles:r,selector:t[e]?.selector.split(",").map((e=>a.__EXPERIMENTAL_ELEMENTS[n].split(",").map((t=>e+" "+t)))).join(",")})}))})),o})(e,t),s=XT(e,t),c=e?.settings?.useRootPaddingAwareAlignments,{contentSize:u,wideSize:d}=e?.settings?.layout||{};let p="body {margin: 0;";if(u&&(p+=` --wp--style--global--content-size: ${u};`),d&&(p+=` --wp--style--global--wide-size: ${d};`),c&&l&&(p+="padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }\n\t\t\t.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t.has-global-padding :where(.has-global-padding:not(.wp-block-block)) { padding-right: 0; padding-left: 0; }\n\t\t\t.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }\n\t\t\t.has-global-padding :where(.has-global-padding:not(.wp-block-block)) > .alignfull { margin-right: 0; margin-left: 0; }\n\t\t\t.has-global-padding > .alignfull:where(:not(.has-global-padding):not(.is-layout-flex):not(.is-layout-grid)) > :where(.wp-block:not(.alignfull),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t.has-global-padding :where(.has-global-padding) > .alignfull:where(:not(.has-global-padding)) > :where(.wp-block:not(.alignfull),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: 0; padding-left: 0;"),p+="}",i.forEach((({selector:t,duotoneSelector:i,styles:a,fallbackGapValue:s,hasLayoutSupport:u,featureSelectors:d,styleVariationSelectors:m})=>{if(d){const e=WT(d,a);Object.entries(e).forEach((([e,t])=>{if(t.length){const n=t.join(";");p+=`${e}{${n};}`}}))}if(m&&Object.entries(m).forEach((([t,n])=>{const o=a?.variations?.[t];if(o){if(d){const e=WT(d,o);Object.entries(e).forEach((([e,t])=>{if(t.length){const o=function(e,t){const n=e.split(","),o=[];return n.forEach((e=>{o.push(`${t.trim()}${e.trim()}`)})),o.join(", ")}(e,n),r=t.join(";");p+=`${o}{${r};}`}}))}const t=KT(o,n,c,e);t.length&&(p+=`${n}{${t.join(";")};}`)}})),i){const e={};a?.filter&&(e.filter=a.filter,delete a.filter);const t=KT(e);t.length&&(p+=`${i}{${t.join(";")};}`)}r||Ml!==t&&!u||(p+=qT({style:a,selector:t,hasBlockGapSupport:n,hasFallbackGapSupport:o,fallbackGapValue:s}));const f=KT(a,t,c,e,l);f?.length&&(p+=`${t}{${f.join(";")};}`);const g=Object.entries(a).filter((([e])=>e.startsWith(":")));g?.length&&g.forEach((([e,n])=>{const o=KT(n);if(!o?.length)return;const r=`${t.split(",").map((t=>t+e)).join(",")}{${o.join(";")};}`;p+=r}))})),p+=".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",p+=".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",p+=".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }",n){const t=Hr(e?.styles?.spacing?.blockGap)||"0.5em";p+=`:where(.wp-site-blocks) > * { margin-block-start: ${t}; margin-block-end: 0; }`,p+=":where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }",p+=":where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }"}return s.forEach((({selector:e,presets:t})=>{Ml===e&&(e="");const n=function(e="*",t={}){return Pl.reduce(((n,{path:o,cssVarInfix:r,classes:l})=>{if(!l)return n;const i=pl(t,o,[]);return["default","theme","custom"].forEach((t=>{i[t]&&i[t].forEach((({slug:t})=>{l.forEach((({classSuffix:o,propertyName:l})=>{const i=`.has-${cl(t)}-${o}`,a=e.split(",").map((e=>`${e}${i}`)).join(","),s=`var(--wp--preset--${r}--${cl(t)})`;n+=`${a}{${l}: ${s} !important;}`}))}))})),n}),"")}(e,t);n.length>0&&(p+=n)})),p};function eM(e,t){return XT(e,t).flatMap((({presets:e})=>function(e={}){return Pl.filter((e=>"duotone"===e.path.at(-1))).flatMap((t=>{const n=pl(e,t.path,{});return["default","theme"].filter((e=>n[e])).flatMap((e=>n[e].map((e=>cy(`wp-duotone-${e.slug}`,e.colors))))).join("")}))}(e)))}const tM=(e,t)=>{const n={};return e.forEach((e=>{const o=e.name,r=uy(e);let l=uy(e,"filter.duotone");if(!l){const t=uy(e),n=(0,a.getBlockSupport)(e,"color.__experimentalDuotone",!1);l=n&&Al(t,n)}const i=!!e?.supports?.layout||!!e?.supports?.__experimentalLayout,s=e?.supports?.spacing?.blockGap?.__experimentalDefault,c=t(o),u={};c?.length&&c.forEach((e=>{const t=`.is-style-${e.name}${r}`;u[e.name]=t}));const d=((e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;const n={root:t};return Object.entries(UT).forEach((([t,o])=>{const r=uy(e,t);r&&(n[o]=r)})),n})(e,r);n[o]={duotoneSelector:l,fallbackGapValue:s,featureSelectors:Object.keys(d).length?d:void 0,hasLayoutSupport:i,name:o,selector:r,styleVariationSelectors:Object.keys(u).length?u:void 0}})),n};function nM(e,t){let n="";return e.split("&").forEach((e=>{if(!e.includes("{"))n+=`${t}{${e.trim()}}`;else{const o=e.replace("}","").split("{");if(2!==o.length)return;const[r,l]=o,i=r.startsWith(" ")?Al(t,r):function(e,t){return e.includes(",")?e.split(",").map((e=>e+t)).join(","):e+t}(t,r);n+=`${i}{${l.trim()}}`}})),n}function oM(e={}){const[t]=Hl("spacing.blockGap"),n=null!==t,o=!n,r=(0,f.useSelect)((e=>{const{getSettings:t}=e(Jo);return!!t().disableLayoutStyles})),l=(0,c.useContext)(fa),i=void 0!==l?.templateSlug,s=(0,f.useSelect)((e=>e(a.store).getBlockStyles),[]);return(0,c.useMemo)((()=>{var t,l;if(!e?.styles||!e?.settings)return[];l=e,e=l.styles?.blocks?.["core/separator"]&&l.styles?.blocks?.["core/separator"].color?.background&&!l.styles?.blocks?.["core/separator"].color?.text&&!l.styles?.blocks?.["core/separator"].border?.color?{...l,styles:{...l.styles,blocks:{...l.styles.blocks,"core/separator":{...l.styles.blocks["core/separator"],color:{...l.styles.blocks["core/separator"].color,text:l.styles?.blocks["core/separator"].color.background}}}}}:l;const c=tM((0,a.getBlockTypes)(),s),u=QT(e,c),d=JT(e,c,n,o,r,i),p=eM(e,c),m=[{css:u,isGlobalStyles:!0},{css:d,isGlobalStyles:!0},{css:null!==(t=e.styles.css)&&void 0!==t?t:"",isGlobalStyles:!0},{assets:p,__unstableType:"svg",isGlobalStyles:!0}];return(0,a.getBlockTypes)().forEach((t=>{if(e.styles.blocks[t.name]?.css){const n=c[t.name].selector;m.push({css:nM(e.styles.blocks[t.name]?.css,n),isGlobalStyles:!0})}})),[m,e.settings]}),[n,o,e,r])}function rM(){const{merged:e}=(0,c.useContext)(Ol);return oM(e)}var lM=(0,c.createElement)(F.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,c.createElement)(F.Path,{d:"M12 8c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 6.5c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5zM12.8 3h-1.5v3h1.5V3zm-1.6 18h1.5v-3h-1.5v3zm6.8-9.8v1.5h3v-1.5h-3zm-12 0H3v1.5h3v-1.5zm9.7 5.6 2.1 2.1 1.1-1.1-2.1-2.1-1.1 1.1zM8.3 7.2 6.2 5.1 5.1 6.2l2.1 2.1 1.1-1.1zM5.1 17.8l1.1 1.1 2.1-2.1-1.1-1.1-2.1 2.1zM18.9 6.2l-1.1-1.1-2.1 2.1 1.1 1.1 2.1-2.1z"}));function iM(e){return aM(e)}function aM(e){return!!e?.shadow}function sM({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){return(0,c.createElement)(m.__experimentalToolsPanel,{label:(0,v.__)("Effects"),resetAll:()=>{const o=e(n);t(o)},panelId:o},r)}const cM={shadow:!0};function uM({as:e=sM,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:l,defaultControls:i=cM}){const a=aM(r),s=(u=o?.shadow,Rl({settings:r},"",u));var u;const d=e=>{n(dl(t,["shadow"],e))},p=(0,c.useCallback)((e=>({...e,shadow:void 0})),[]);return(0,c.createElement)(e,{resetAllFilter:p,value:t,onChange:n,panelId:l},a&&(0,c.createElement)(m.__experimentalToolsPanelItem,{label:(0,v.__)("Shadow"),hasValue:()=>!!t?.shadow,onDeselect:()=>d(void 0),isShownByDefault:i.shadow,panelId:l},(0,c.createElement)(m.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},(0,c.createElement)(dM,{shadow:s,onShadowChange:d,settings:r}))))}const dM=({shadow:e,onShadowChange:t,settings:n})=>(0,c.createElement)(m.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"block-editor-global-styles-effects-panel__shadow-dropdown",renderToggle:({onToggle:e,isOpen:t})=>{const n={onClick:e,className:d()({"is-open":t}),"aria-expanded":t};return(0,c.createElement)(m.Button,{...n},(0,c.createElement)(m.__experimentalHStack,{justify:"flex-start"},(0,c.createElement)(ai,{className:"block-editor-global-styles-effects-panel__toggle-icon",icon:lM,size:24}),(0,c.createElement)(m.FlexItem,null,(0,v.__)("Shadow"))))},renderContent:()=>(0,c.createElement)(m.__experimentalDropdownContentWrapper,{paddingSize:"medium"},(0,c.createElement)(pM,{shadow:e,onShadowChange:t,settings:n}))});function pM({shadow:e,onShadowChange:t,settings:n}){const o=n?.shadow?.presets?.default,r=n?.shadow?.presets?.theme,l=n?.shadow?.defaultPresets,i=[...l?o:[],...r||[]];return(0,c.createElement)("div",{className:"block-editor-global-styles-effects-panel__shadow-popover-container"},(0,c.createElement)(m.__experimentalVStack,{spacing:4},(0,c.createElement)(m.__experimentalHeading,{level:5},(0,v.__)("Shadow")),(0,c.createElement)(mM,{presets:i,activeShadow:e,onSelect:t})))}function mM({presets:e,activeShadow:t,onSelect:n}){return e?(0,c.createElement)(m.__experimentalGrid,{columns:6,gap:0,align:"center",justify:"center"},e.map((({name:e,slug:o,shadow:r})=>(0,c.createElement)(fM,{key:o,label:e,isActive:r===t,onSelect:()=>n(r===t?void 0:r),shadow:r})))):null}function fM({label:e,isActive:t,onSelect:n,shadow:o}){return(0,c.createElement)("div",{className:"block-editor-global-styles-effects-panel__shadow-indicator-wrapper"},(0,c.createElement)(m.Button,{className:"block-editor-global-styles-effects-panel__shadow-indicator",onClick:n,label:e,style:{boxShadow:o},showTooltip:!0},t&&(0,c.createElement)(ai,{icon:gk})))}function gM(e,t,n){return"core/image"===e&&n?.lightbox?.allowEditing||!!t?.lightbox}function hM({onChange:e,value:t,inheritedValue:n,panelId:o}){const r=()=>{e(void 0)};let l=!1;return n?.lightbox?.enabled&&(l=n.lightbox.enabled),(0,c.createElement)(c.Fragment,null,(0,c.createElement)(m.__experimentalToolsPanel,{label:(0,v._x)("Settings","Image settings"),resetAll:r,panelId:o},(0,c.createElement)(m.__experimentalToolsPanelItem,{hasValue:()=>!!t?.lightbox,label:(0,v.__)("Expand on Click"),onDeselect:r,isShownByDefault:!0,panelId:o},(0,c.createElement)(m.ToggleControl,{label:(0,v.__)("Expand on Click"),checked:l,onChange:t=>{e({enabled:t})}}))))}function bM({value:e,onChange:t,inheritedValue:n=e}){const[o,r]=(0,c.useState)(null),l=n?.css;return(0,c.createElement)(m.__experimentalVStack,{spacing:3},(0,c.createElement)(m.TextareaControl,{label:(0,v.__)("Additional CSS"),__nextHasNoMarginBottom:!0,value:l,onChange:n=>function(n){if(t({...e,css:n}),o){const[t]=Im([{css:e}],".editor-styles-wrapper");t&&r(null)}}(n),onBlur:function(e){if(!e?.target?.value)return void r(null);const[t]=Im([{css:e.target.value}],".editor-styles-wrapper");r(null===t?(0,v.__)("There is an error with your CSS structure."):null)},className:"block-editor-global-styles-advanced-panel__custom-css-input",spellCheck:!1}),o&&(0,c.createElement)(m.Tooltip,{text:o},(0,c.createElement)("div",{className:"block-editor-global-styles-advanced-panel__custom-css-validation-wrapper"},(0,c.createElement)(ai,{icon:cb,className:"block-editor-global-styles-advanced-panel__custom-css-validation-icon"}))))}function vM(e,t,n){if(null==e||!1===e)return;if(Array.isArray(e))return _M(e,t,n);switch(typeof e){case"string":case"number":return}const{type:o,props:r}=e;switch(o){case c.StrictMode:case c.Fragment:return _M(r.children,t,n);case c.RawHTML:return;case ch.Content:return kM(t,n);case Yx:return void t.push(r.value)}switch(typeof o){case"string":return void 0!==r.children?_M(r.children,t,n):void 0;case"function":return vM(o.prototype&&"function"==typeof o.prototype.render?new o(r).render():o(r),t,n)}}function _M(e,...t){e=Array.isArray(e)?e:[e];for(let n=0;n{}),options:o=yM,defaultValue:r=yM[0].value,isShownByDefault:l=!0}){const i=null!=t?t:"auto";return(0,c.createElement)(m.__experimentalToolsPanelItem,{hasValue:()=>i!==r,label:(0,v.__)("Aspect ratio"),onDeselect:()=>n(void 0),isShownByDefault:l,panelId:e},(0,c.createElement)(m.SelectControl,{label:(0,v.__)("Aspect ratio"),value:i,options:o,onChange:n,size:"__unstable-large",__nextHasNoMarginBottom:!0}))}const SM=[{value:"fill",label:(0,v._x)("Fill","Scale option for dimensions control"),help:(0,v.__)("Fill the space by stretching the content.")},{value:"contain",label:(0,v._x)("Contain","Scale option for dimensions control"),help:(0,v.__)("Fit the content to the space without clipping.")},{value:"cover",label:(0,v._x)("Cover","Scale option for dimensions control"),help:(0,v.__)("Fill the space by clipping what doesn't fit.")},{value:"none",label:(0,v._x)("None","Scale option for dimensions control"),help:(0,v.__)("Do not adjust the sizing of the content. Content that is too large will be clipped, and content that is too small will have additional padding.")},{value:"scale-down",label:(0,v._x)("Scale down","Scale option for dimensions control"),help:(0,v.__)("Scale down the content to fit the space if it is too big. Content that is too small will have additional padding.")}];function wM({panelId:e,value:t,onChange:n,options:o=SM,defaultValue:r=SM[0].value,isShownByDefault:l=!0}){const i=null!=t?t:"fill",a=(0,c.useMemo)((()=>o.reduce(((e,t)=>(e[t.value]=t.help,e)),{})),[o]);return(0,c.createElement)(m.__experimentalToolsPanelItem,{label:(0,v.__)("Scale"),isShownByDefault:l,hasValue:()=>i!==r,onDeselect:()=>n(r),panelId:e},(0,c.createElement)(m.__experimentalToggleGroupControl,{label:(0,v.__)("Scale"),isBlock:!0,help:a[i],value:i,onChange:n,__nextHasNoMarginBottom:!0},o.map((e=>(0,c.createElement)(m.__experimentalToggleGroupControlOption,{key:e.value,...e})))))}function CM(){return CM=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?DM(WM,--$M):0,GM--,10===jM&&(GM=1,HM--),jM}function YM(){return jM=$M2||eP(jM)>3?"":" "}function lP(e,t){for(;--t&&YM()&&!(jM<48||jM>102||jM>57&&jM<65||jM>70&&jM<97););return JM(e,QM()+(t<6&&32==XM()&&32==YM()))}function iP(e){for(;YM();)switch(jM){case e:return $M;case 34:case 39:34!==e&&39!==e&&iP(jM);break;case 40:41===e&&iP(e);break;case 92:YM()}return $M}function aP(e,t){for(;YM()&&e+jM!==57&&(e+jM!==84||47!==XM()););return"/*"+JM(t,$M-1)+"*"+PM(47===e?e:YM())}function sP(e){for(;!eP(XM());)YM();return JM(e,$M)}var cP="-ms-",uP="-moz-",dP="-webkit-",pP="comm",mP="rule",fP="decl",gP="@keyframes";function hP(e,t){for(var n="",o=VM(e),r=0;r0&&zM(S)-d&&FM(m>32?EP(S+";",o,n,d-1):EP(RM(S," ","")+";",o,n,d-2),s);break;case 59:S+=";";default:if(FM(E=kP(S,t,n,c,u,r,a,_,k=[],y=[],d),l),123===v)if(0===u)_P(S,t,E,E,k,l,d,a,y);else switch(99===p&&110===DM(S,3)?100:p){case 100:case 109:case 115:_P(e,E,E,o&&FM(kP(e,E,E,0,0,r,a,_,r,k=[],d),y),r,y,d,a,o?k:y);break;default:_P(S,E,E,E,[""],y,0,a,y)}}c=u=m=0,g=b=1,_=S="",d=i;break;case 58:d=1+zM(S),m=f;default:if(g<1)if(123==v)--g;else if(125==v&&0==g++&&125==ZM())continue;switch(S+=PM(v),v*g){case 38:b=u>0?1:(S+="\f",-1);break;case 44:a[c++]=(zM(S)-1)*b,b=1;break;case 64:45===XM()&&(S+=oP(YM())),p=XM(),u=d=zM(_=S+=sP(QM())),v++;break;case 45:45===f&&2==zM(S)&&(g=0)}}return l}function kP(e,t,n,o,r,l,i,a,s,c,u){for(var d=r-1,p=0===r?l:[""],m=VM(p),f=0,g=0,h=0;f0?p[b]+" "+v:RM(v,/&\f/g,p[b])))&&(s[h++]=_);return KM(e,t,n,0===r?mP:a,s,c,u)}function yP(e,t,n){return KM(e,t,n,pP,PM(jM),OM(e,2,-2),0)}function EP(e,t,n,o){return KM(e,t,n,fP,OM(e,0,o),OM(e,o+1,-1),o)}var SP=function(e,t,n){for(var o=0,r=0;o=r,r=XM(),38===o&&12===r&&(t[n]=1),!eP(r);)YM();return JM(e,$M)},wP=function(e,t){return nP(function(e,t){var n=-1,o=44;do{switch(eP(o)){case 0:38===o&&12===XM()&&(t[n]=1),e[n]+=SP($M-1,t,n);break;case 2:e[n]+=oP(o);break;case 4:if(44===o){e[++n]=58===XM()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=PM(o)}}while(o=YM());return e}(tP(e),t))},CP=new WeakMap,xP=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,o=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||CP.get(n))&&!o){CP.set(e,!0);for(var r=[],l=wP(t,r),i=n.props,a=0,s=0;a6)switch(DM(e,t+1)){case 109:if(45!==DM(e,t+4))break;case 102:return RM(e,/(.+:)(.+)-([^]+)/,"$1"+dP+"$2-$3$1"+uP+(108==DM(e,t+3)?"$3":"$2-$3"))+e;case 115:return~AM(e,"stretch")?IP(RM(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==DM(e,t+1))break;case 6444:switch(DM(e,zM(e)-3-(~AM(e,"!important")&&10))){case 107:return RM(e,":",":"+dP)+e;case 101:return RM(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+dP+(45===DM(e,14)?"inline-":"")+"box$3$1"+dP+"$2$3$1"+cP+"$2box$3")+e}break;case 5936:switch(DM(e,t+11)){case 114:return dP+e+cP+RM(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return dP+e+cP+RM(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return dP+e+cP+RM(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return dP+e+cP+e+e}return e}var TP=[function(e,t,n,o){if(e.length>-1&&!e.return)switch(e.type){case fP:e.return=IP(e.value,e.length);break;case gP:return hP([qM(e,{value:RM(e.value,"@","@"+dP)})],o);case mP:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return hP([qM(e,{props:[RM(t,/:(read-\w+)/,":-moz-$1")]})],o);case"::placeholder":return hP([qM(e,{props:[RM(t,/:(plac\w+)/,":"+dP+"input-$1")]}),qM(e,{props:[RM(t,/:(plac\w+)/,":-moz-$1")]}),qM(e,{props:[RM(t,/:(plac\w+)/,cP+"input-$1")]})],o)}return""}))}}],MP=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o=e.stylisPlugins||TP;var r,l,i={},a=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++o,r-=4)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(r){case 3:n^=(255&e.charCodeAt(o+2))<<16;case 2:n^=(255&e.charCodeAt(o+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(o)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},NP={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function LP(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var RP=/[A-Z]|^ms/g,AP=/_EMO_([^_]+?)_([^]*?)_EMO_/g,DP=function(e){return 45===e.charCodeAt(1)},OP=function(e){return null!=e&&"boolean"!=typeof e},zP=LP((function(e){return DP(e)?e:e.replace(RP,"-$&").toLowerCase()})),VP=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(AP,(function(e,t,n){return HP={name:t,styles:n,next:HP},t}))}return 1===NP[e]||DP(e)||"number"!=typeof t||0===t?t:t+"px"};function FP(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return HP={name:n.name,styles:n.styles,next:HP},n.name;if(void 0!==n.styles){var o=n.next;if(void 0!==o)for(;void 0!==o;)HP={name:o.name,styles:o.styles,next:HP},o=o.next;return n.styles+";"}return function(e,t,n){var o="";if(Array.isArray(n))for(var r=0;r96?ZP:YP},QP=function(e,t,n){var o;if(t){var r=t.shouldForwardProp;o=e.__emotion_forwardProp&&r?function(t){return e.__emotion_forwardProp(t)&&r(t)}:r}return"function"!=typeof o&&n&&(o=e.__emotion_forwardProp),o},JP=function(e){var t=e.cache,n=e.serialized,o=e.isStringTag;qP(t,n,o);$P((function(){return function(e,t,n){qP(e,t,n);var o=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var r=t;do{e.insert(t===r?"."+o:"",r,e.sheet,!0),r=r.next}while(void 0!==r)}}(t,n,o)}));return null},eN=function e(t,n){var o,r,l=t.__emotion_real===t,i=l&&t.__emotion_base||t;void 0!==n&&(o=n.label,r=n.target);var a=QP(t,n,l),s=a||XP(i),c=!s("as");return function(){var u=arguments,d=l&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==o&&d.push("label:"+o+";"),null==u[0]||void 0===u[0].raw)d.push.apply(d,u);else{0,d.push(u[0][0]);for(var p=u.length,m=1;m{}),units:o,isShownByDefault:r=!0}){var l,i;const a="auto"===t.width?"":null!==(l=t.width)&&void 0!==l?l:"",s="auto"===t.height?"":null!==(i=t.height)&&void 0!==i?i:"",u=e=>o=>{const r={...t};o?r[e]=o:delete r[e],n(r)};return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(tN,{label:(0,v.__)("Width"),isShownByDefault:r,hasValue:()=>""!==a,onDeselect:u("width"),panelId:e},(0,c.createElement)(m.__experimentalUnitControl,{label:(0,v.__)("Width"),placeholder:(0,v.__)("Auto"),labelPosition:"top",units:o,min:0,value:a,onChange:u("width"),size:"__unstable-large"})),(0,c.createElement)(tN,{label:(0,v.__)("Height"),isShownByDefault:r,hasValue:()=>""!==s,onDeselect:u("height"),panelId:e},(0,c.createElement)(m.__experimentalUnitControl,{label:(0,v.__)("Height"),placeholder:(0,v.__)("Auto"),labelPosition:"top",units:o,min:0,value:s,onChange:u("height"),size:"__unstable-large"})))}var oN=function({panelId:e,value:t={},onChange:n=(()=>{}),aspectRatioOptions:o,defaultAspectRatio:r="auto",scaleOptions:l,defaultScale:i="fill",unitsOptions:a}){const s=void 0===t.width||"auto"===t.width?null:t.width,u=void 0===t.height||"auto"===t.height?null:t.height,d=void 0===t.aspectRatio||"auto"===t.aspectRatio?null:t.aspectRatio,p=void 0===t.scale||"fill"===t.scale?null:t.scale,[m,f]=(0,c.useState)(p),[g,h]=(0,c.useState)(d),b=s&&u?"custom":g,v=d||s&&u;return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(EM,{panelId:e,options:o,defaultValue:r,value:b,onChange:e=>{const o={...t};h(e="auto"===e?null:e),e?o.aspectRatio=e:delete o.aspectRatio,e?m?o.scale=m:(o.scale=i,f(i)):delete o.scale,"custom"!==e&&s&&u&&delete o.height,n(o)}}),v&&(0,c.createElement)(wM,{panelId:e,options:l,defaultValue:i,value:m,onChange:e=>{const o={...t};f(e="fill"===e?null:e),e?o.scale=e:delete o.scale,n(o)}}),(0,c.createElement)(nN,{panelId:e,units:a,value:{width:s,height:u},onChange:({width:e,height:o})=>{const r={...t};o="auto"===o?null:o,(e="auto"===e?null:e)?r.width=e:delete r.width,o?r.height=o:delete r.height,e&&o?delete r.aspectRatio:g&&(r.aspectRatio=g),g||!!e==!!o?m?r.scale=m:(r.scale=i,f(i)):delete r.scale,n(r)}}))};const rN=[{label:(0,v._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,v._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,v._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,v._x)("Full Size","Image size option for resolution control"),value:"full"}];const lN={};Yo(lN,{...i,ExperimentalBlockCanvas:hS,ExperimentalBlockEditorProvider:sp,getRichTextValues:function(e=[]){a.__unstableGetBlockProps.skipFilters=!0;const t=[];return kM(t,e),a.__unstableGetBlockProps.skipFilters=!1,t},kebabCase:cl,PrivateInserter:Bg,PrivateListView:Rw,ResizableBoxPopover:function({clientId:e,resizableBoxProps:t,...n}){return(0,c.createElement)(Vg,{clientId:e,__unstableCoverTarget:!0,__unstablePopoverSlot:"block-toolbar",shift:!1,...n},(0,c.createElement)(m.ResizableBox,{...t}))},BlockInfo:aI,useShouldContextualToolbarShow:eT,cleanEmptyObject:Wl,BlockQuickNavigation:sI,LayoutStyle:function({layout:e={},css:t,...n}){const o=bi(e.type),r=null!==bl("spacing.blockGap");if(o){if(t)return(0,c.createElement)("style",null,t);const l=o.getLayoutStyle?.({hasBlockGapSupport:r,layout:e,...n});if(l)return(0,c.createElement)("style",null,l)}return null},BlockRemovalWarningModal:function({rules:e}){const{clientIds:t,selectPrevious:n,blockNamesForPrompt:o}=(0,f.useSelect)((e=>Xo(e(Jo)).getRemovalPromptData())),{clearBlockRemovalPrompt:r,setBlockRemovalRules:l,privateRemoveBlocks:i}=Xo((0,f.useDispatch)(Jo));if((0,c.useEffect)((()=>(l(e),()=>{l()})),[e,l]),!o)return;return(0,c.createElement)(m.Modal,{title:(0,v.__)("Are you sure?"),onRequestClose:r},1===o.length?(0,c.createElement)("p",null,e[o[0]]):(0,c.createElement)("ul",{style:{listStyleType:"disc",paddingLeft:"1rem"}},o.map((t=>(0,c.createElement)("li",{key:t},e[t])))),(0,c.createElement)("p",null,o.length>1?(0,v.__)("Removing these blocks is not advised."):(0,v.__)("Removing this block is not advised.")),(0,c.createElement)(m.__experimentalHStack,{justify:"right"},(0,c.createElement)(m.Button,{variant:"tertiary",onClick:r},(0,v.__)("Cancel")),(0,c.createElement)(m.Button,{variant:"primary",onClick:()=>{i(t,n,!0),r()}},(0,v.__)("Delete"))))},useLayoutClasses:$y,useLayoutStyles:function(e={},t,n){const{layout:o={},style:r={}}=e,l=o?.inherit||o?.contentSize||o?.wideSize?{...o,type:"constrained"}:o||{},i=bi(l?.type||"default"),a=null!==bl("spacing.blockGap"),s=i?.getLayoutStyle?.({blockName:t,selector:n,layout:o,style:r,hasBlockGapSupport:a});return s},DimensionsTool:oN,ResolutionTool:function({panelId:e,value:t,onChange:n,options:o=rN,defaultValue:r=rN[0].value,isShownByDefault:l=!0}){const i=null!=t?t:r;return(0,c.createElement)(m.__experimentalToolsPanelItem,{hasValue:()=>i!==r,label:(0,v.__)("Resolution"),onDeselect:()=>n(r),isShownByDefault:l,panelId:e},(0,c.createElement)(m.SelectControl,{label:(0,v.__)("Resolution"),value:i,options:o,onChange:n,help:(0,v.__)("Select the size of the source image."),size:"__unstable-large"}))},ReusableBlocksRenameHint:MT,useReusableBlocksRenameHint:function(){return(0,f.useSelect)((e=>{var t;return null===(t=e(Ch.store).get("core",TT))||void 0===t||t}),[])},usesContextKey:Kx})}(),(window.wp=window.wp||{}).blockEditor=o}(); \ No newline at end of file +var MC=function(e,t){return MC=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},MC(e,t)};var PC=function(){return PC=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0})).join(" ").trim()}var $C=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=Xa().createRef(),n.videoRef=Xa().createRef(),n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc="undefined"!=typeof document?document:null,n.currentWindow="undefined"!=typeof window?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.initResizeObserver=function(){if(void 0!==window.ResizeObserver&&n.containerRef){var e=!0;n.resizeObserver=new window.ResizeObserver((function(t){e?e=!1:n.computeSizes()})),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var e=n.computeSizes();e&&(n.emitCropData(),n.setInitialCrop(e)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(e){if(n.props.initialCroppedAreaPercentages){var t=function(e,t,n,o,r,l){var i=HC(t.width,t.height,n),a=GC(o.width/i.width*(100/e.width),r,l);return{crop:{x:a*i.width/2-o.width/2-i.width*a*(e.x/100),y:a*i.height/2-o.height/2-i.height*a*(e.y/100)},zoom:a}}(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),o=t.crop,r=t.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(r)}else if(n.props.initialCroppedAreaPixels){var l=function(e,t,n,o,r,l){void 0===n&&(n=0);var i=HC(t.naturalWidth,t.naturalHeight,n),a=GC(function(e,t,n){var o=function(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}(t);return n.height>n.width?n.height/(e.height*o):n.width/(e.width*o)}(e,t,o),r,l),s=o.height>o.width?o.height/e.height:o.width/e.width;return{crop:{x:((i.width-e.width)/2-e.x)*s,y:((i.height-e.height)/2-e.y)*s},zoom:a}}(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);o=l.crop,r=l.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(r)}},n.computeSizes=function(){var e,t,o,r,l,i,a=n.imageRef.current||n.videoRef.current;if(a&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect();var s=n.containerRect.width/n.containerRect.height,c=(null===(e=n.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef.current)||void 0===t?void 0:t.videoWidth)||0,u=(null===(o=n.imageRef.current)||void 0===o?void 0:o.naturalHeight)||(null===(r=n.videoRef.current)||void 0===r?void 0:r.videoHeight)||0,d=c/u,p=void 0;if(a.offsetWidthd?{width:n.containerRect.height*d,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/d};break;case"horizontal-cover":p={width:n.containerRect.width,height:n.containerRect.width/d};break;case"vertical-cover":p={width:n.containerRect.height*d,height:n.containerRect.height};break;case"auto-cover":p=c>u?{width:n.containerRect.width,height:n.containerRect.width/d}:{width:n.containerRect.height*d,height:n.containerRect.height}}else p={width:a.offsetWidth,height:a.offsetHeight};n.mediaSize=PC(PC({},p),{naturalWidth:c,naturalHeight:u}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var m=n.props.cropSize?n.props.cropSize:function(e,t,n,o,r,l){void 0===l&&(l=0);var i=HC(e,t,l),a=i.width,s=i.height,c=Math.min(a,n),u=Math.min(s,o);return c>u*r?{width:u*r,height:u}:{width:c,height:c/r}}(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(null===(l=n.state.cropSize)||void 0===l?void 0:l.height)===m.height&&(null===(i=n.state.cropSize)||void 0===i?void 0:i.width)===m.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(m),n.setState({cropSize:m},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(m),m}},n.onMouseDown=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.onDragStart(t.getMousePoint(e)))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onTouchStart=function(e){n.currentDoc&&(n.isTouching=!0,n.props.onTouchRequest&&!n.props.onTouchRequest(e)||(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0]))))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onGestureStart=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(e){if(e.preventDefault(),!n.isTouching){var o=t.getMousePoint(e),r=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(r,o,{shouldUpdatePosition:!0}),n.props.onRotationChange){var l=n.gestureRotationStart+e.rotation;n.props.onRotationChange(l)}}},n.onGestureEnd=function(e){n.cleanEvents()},n.onDragStart=function(e){var t,o,r=e.x,l=e.y;n.dragStartPosition={x:r,y:l},n.dragStartCrop=PC({},n.props.crop),null===(o=(t=n.props).onInteractionStart)||void 0===o||o.call(t)},n.onDrag=function(e){var t=e.x,o=e.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==o){var e=t-n.dragStartPosition.x,r=o-n.dragStartPosition.y,l={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+r},i=n.props.restrictPosition?RC(l,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):l;n.props.onCropChange(i)}})))},n.onDragStopped=function(){var e,t;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){if(n.currentWindow&&(!n.props.onWheelRequest||n.props.onWheelRequest(e))){e.preventDefault();var o=t.getMousePoint(e),r=LC()(e).pixelY,l=n.props.zoom-r*n.props.zoomSpeed/200;n.setNewZoom(l,o,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)}},n.getPointOnContainer=function(e){var t=e.x,o=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(t-n.containerRect.left),y:n.containerRect.height/2-(o-n.containerRect.top)}},n.getPointOnMedia=function(e){var t=e.x,o=e.y,r=n.props,l=r.crop,i=r.zoom;return{x:(t+l.x)/i,y:(o+l.y)/i}},n.setNewZoom=function(e,t,o){var r=(void 0===o?{}:o).shouldUpdatePosition,l=void 0===r||r;if(n.state.cropSize&&n.props.onZoomChange){var i=GC(e,n.props.minZoom,n.props.maxZoom);if(l){var a=n.getPointOnContainer(t),s=n.getPointOnMedia(a),c={x:s.x*i-a.x,y:s.y*i-a.y},u=n.props.restrictPosition?RC(c,n.mediaSize,n.state.cropSize,i,n.props.rotation):c;n.props.onCropChange(u)}n.props.onZoomChange(i)}},n.getCropData=function(){return n.state.cropSize?function(e,t,n,o,r,l,i){void 0===l&&(l=0),void 0===i&&(i=!0);var a=i?zC:VC,s=HC(t.width,t.height,l),c=HC(t.naturalWidth,t.naturalHeight,l),u={x:a(100,((s.width-n.width/r)/2-e.x/r)/s.width*100),y:a(100,((s.height-n.height/r)/2-e.y/r)/s.height*100),width:a(100,n.width/s.width*100/r),height:a(100,n.height/s.height*100/r)},d=Math.round(a(c.width,u.width*c.width/100)),p=Math.round(a(c.height,u.height*c.height/100)),m=c.width>=c.height*o?{width:Math.round(p*o),height:p}:{width:d,height:Math.round(d/o)};return{croppedAreaPercentages:u,croppedAreaPixels:PC(PC({},m),{x:Math.round(a(c.width-m.width,u.x*c.width/100)),y:Math.round(a(c.height-m.height,u.y*c.height/100))})}}(n.props.restrictPosition?RC(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,o=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,o),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,o)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,o=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,o)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?RC(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n}return function(e,t){function n(){this.constructor=e}MC(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){this.currentDoc&&this.currentWindow&&(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),void 0===window.ResizeObserver&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},t.prototype.componentWillUnmount=function(){var e,t;this.currentDoc&&this.currentWindow&&(void 0===window.ResizeObserver&&this.currentWindow.removeEventListener("resize",this.computeSizes),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null===(t=this.styleRef.parentNode)||void 0===t||t.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(e){var t,n,o,r,l,i,a,s,c;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(o=e.cropSize)||void 0===o?void 0:o.width)!==(null===(r=this.props.cropSize)||void 0===r?void 0:r.width)?this.computeSizes():(null===(l=e.crop)||void 0===l?void 0:l.x)===(null===(i=this.props.crop)||void 0===i?void 0:i.x)&&(null===(a=e.crop)||void 0===a?void 0:a.y)===(null===(s=this.props.crop)||void 0===s?void 0:s.y)||this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(c=this.videoRef.current)||void 0===c||c.load())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=DC(n,o),this.lastPinchRotation=OC(n,o),this.onDragStart(FC(n,o))},t.prototype.onPinchMove=function(e){var n=this;if(this.currentDoc&&this.currentWindow){var o=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]),l=FC(o,r);this.onDrag(l),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=DC(o,r),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,l,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var i=OC(o,r),a=n.props.rotation+(i-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(a),n.lastPinchRotation=i}))}},t.prototype.render=function(){var e=this,t=this.props,n=t.image,o=t.video,r=t.mediaProps,l=t.transform,i=t.crop,a=i.x,s=i.y,c=t.rotation,u=t.zoom,d=t.cropShape,p=t.showGrid,m=t.style,f=m.containerStyle,g=m.cropAreaStyle,h=m.mediaStyle,b=t.classes,v=b.containerClassName,_=b.cropAreaClassName,k=b.mediaClassName,y=t.objectFit;return Xa().createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:f,className:UC("reactEasyCrop_Container",v)},n?Xa().createElement("img",PC({alt:"",className:UC("reactEasyCrop_Image","contain"===y&&"reactEasyCrop_Contain","horizontal-cover"===y&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===y&&"reactEasyCrop_Cover_Vertical","auto-cover"===y&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),k)},r,{src:n,ref:this.imageRef,style:PC(PC({},h),{transform:l||"translate(".concat(a,"px, ").concat(s,"px) rotate(").concat(c,"deg) scale(").concat(u,")")}),onLoad:this.onMediaLoad})):o&&Xa().createElement("video",PC({autoPlay:!0,loop:!0,muted:!0,className:UC("reactEasyCrop_Video","contain"===y&&"reactEasyCrop_Contain","horizontal-cover"===y&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===y&&"reactEasyCrop_Cover_Vertical","auto-cover"===y&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),k)},r,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:PC(PC({},h),{transform:l||"translate(".concat(a,"px, ").concat(s,"px) rotate(").concat(c,"deg) scale(").concat(u,")")}),controls:!1}),(Array.isArray(o)?o:[{src:o}]).map((function(e){return Xa().createElement("source",PC({key:e.src},e))}))),this.state.cropSize&&Xa().createElement("div",{style:PC(PC({},g),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:UC("reactEasyCrop_CropArea","round"===d&&"reactEasyCrop_CropAreaRound",p&&"reactEasyCrop_CropAreaGrid",_)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(Xa().Component);const jC=100,WC=300,KC={placement:"bottom-start"};function qC({url:e,width:t,height:n,clientWidth:o,naturalHeight:r,naturalWidth:l,borderProps:i}){const{isInProgress:a,editedUrl:s,position:u,zoom:p,aspect:f,setPosition:g,setCrop:h,setZoom:b,rotation:v}=IC();let _=n||o*r/l;return v%180==90&&(_=o*l/r),(0,c.createElement)("div",{className:d()("wp-block-image__crop-area",i?.className,{"is-applying":a}),style:{...i?.style,width:t||o,height:_}},(0,c.createElement)($C,{image:s||e,disabled:a,minZoom:jC/100,maxZoom:WC/100,crop:u,zoom:p/100,aspect:f,onCropChange:e=>{g(e)},onCropComplete:e=>{h(e)},onZoomChange:e=>{b(100*e)}}),a&&(0,c.createElement)(m.Spinner,null))}var ZC=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"}));function YC(){const{isInProgress:e,zoom:t,setZoom:n}=IC();return(0,c.createElement)(m.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:KC,renderToggle:({isOpen:t,onToggle:n})=>(0,c.createElement)(m.ToolbarButton,{icon:ZC,label:(0,v.__)("Zoom"),onClick:n,"aria-expanded":t,disabled:e}),renderContent:()=>(0,c.createElement)(m.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,v.__)("Zoom"),min:jC,max:WC,value:Math.round(t),onChange:n})})}var XC=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"}));function QC({aspectRatios:e,isDisabled:t,label:n,onClick:o,value:r}){return(0,c.createElement)(m.MenuGroup,{label:n},e.map((({title:e,aspect:n})=>(0,c.createElement)(m.MenuItem,{key:n,disabled:t,onClick:()=>{o(n)},role:"menuitemradio",isSelected:n===r,icon:n===r?gk:void 0},e))))}function JC({toggleProps:e}){const{isInProgress:t,aspect:n,setAspect:o,defaultAspect:r}=IC();return(0,c.createElement)(m.DropdownMenu,{icon:XC,label:(0,v.__)("Aspect Ratio"),popoverProps:KC,toggleProps:e,className:"wp-block-image__aspect-ratio"},(({onClose:e})=>(0,c.createElement)(c.Fragment,null,(0,c.createElement)(QC,{isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:[{title:(0,v.__)("Original"),aspect:r},{title:(0,v.__)("Square"),aspect:1}]}),(0,c.createElement)(QC,{label:(0,v.__)("Landscape"),isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:[{title:(0,v.__)("16:10"),aspect:1.6},{title:(0,v.__)("16:9"),aspect:16/9},{title:(0,v.__)("4:3"),aspect:4/3},{title:(0,v.__)("3:2"),aspect:1.5}]}),(0,c.createElement)(QC,{label:(0,v.__)("Portrait"),isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:[{title:(0,v.__)("10:16"),aspect:.625},{title:(0,v.__)("9:16"),aspect:9/16},{title:(0,v.__)("3:4"),aspect:3/4},{title:(0,v.__)("2:3"),aspect:2/3}]}))))}var ex=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"}));function tx(){const{isInProgress:e,rotateClockwise:t}=IC();return(0,c.createElement)(m.ToolbarButton,{icon:ex,label:(0,v.__)("Rotate"),onClick:t,disabled:e})}function nx(){const{isInProgress:e,apply:t,cancel:n}=IC();return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(m.ToolbarButton,{onClick:t,disabled:e},(0,v.__)("Apply")),(0,c.createElement)(m.ToolbarButton,{onClick:n},(0,v.__)("Cancel")))}function ox({id:e,url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i,onSaveImage:a,onFinishEditing:s,borderProps:u}){return(0,c.createElement)(TC,{id:e,url:t,naturalWidth:i,naturalHeight:l,onSaveImage:a,onFinishEditing:s},(0,c.createElement)(qC,{borderProps:u,url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i}),(0,c.createElement)(dr,null,(0,c.createElement)(m.ToolbarGroup,null,(0,c.createElement)(YC,null),(0,c.createElement)(m.ToolbarItem,null,(e=>(0,c.createElement)(JC,{toggleProps:e}))),(0,c.createElement)(tx,null)),(0,c.createElement)(m.ToolbarGroup,null,(0,c.createElement)(nx,null))))}const rx=[25,50,75,100],lx=()=>{};function ix({imageSizeHelp:e,imageWidth:t,imageHeight:n,imageSizeOptions:o=[],isResizable:r=!0,slug:l,width:i,height:a,onChange:s,onChangeImage:u=lx}){$()("wp.blockEditor.__experimentalImageSizeControl",{since:"6.3",alternative:"wp.blockEditor.privateApis.DimensionsTool and wp.blockEditor.privateApis.ResolutionTool"});const{currentHeight:d,currentWidth:p,updateDimension:f,updateDimensions:g}=function(e,t,n,o,r){var l,i;const[a,s]=(0,c.useState)(null!==(l=null!=t?t:o)&&void 0!==l?l:""),[u,d]=(0,c.useState)(null!==(i=null!=e?e:n)&&void 0!==i?i:"");return(0,c.useEffect)((()=>{void 0===t&&void 0!==o&&s(o),void 0===e&&void 0!==n&&d(n)}),[o,n]),(0,c.useEffect)((()=>{void 0!==t&&Number.parseInt(t)!==Number.parseInt(a)&&s(t),void 0!==e&&Number.parseInt(e)!==Number.parseInt(u)&&d(e)}),[t,e]),{currentHeight:u,currentWidth:a,updateDimension:(e,t)=>{const n=""===t?void 0:parseInt(t,10);"width"===e?s(n):d(n),r({[e]:n})},updateDimensions:(e,t)=>{d(null!=e?e:n),s(null!=t?t:o),r({height:e,width:t})}}}(a,i,n,t,s);return(0,c.createElement)(c.Fragment,null,o&&o.length>0&&(0,c.createElement)(m.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,v.__)("Resolution"),value:l,options:o,onChange:u,help:e,size:"__unstable-large"}),r&&(0,c.createElement)("div",{className:"block-editor-image-size-control"},(0,c.createElement)(m.__experimentalHStack,{align:"baseline",spacing:"3"},(0,c.createElement)(m.__experimentalNumberControl,{className:"block-editor-image-size-control__width",label:(0,v.__)("Width"),value:p,min:1,onChange:e=>f("width",e),size:"__unstable-large"}),(0,c.createElement)(m.__experimentalNumberControl,{className:"block-editor-image-size-control__height",label:(0,v.__)("Height"),value:d,min:1,onChange:e=>f("height",e),size:"__unstable-large"})),(0,c.createElement)(m.__experimentalHStack,null,(0,c.createElement)(m.ButtonGroup,{"aria-label":(0,v.__)("Image size presets")},rx.map((e=>{const o=Math.round(t*(e/100)),r=Math.round(n*(e/100)),l=p===o&&d===r;return(0,c.createElement)(m.Button,{key:e,isSmall:!0,variant:l?"primary":void 0,isPressed:l,onClick:()=>g(r,o)},e,"%")}))),(0,c.createElement)(m.Button,{isSmall:!0,onClick:()=>g()},(0,v.__)("Reset")))))}function ax({url:e,urlLabel:t,className:n}){const o=d()(n,"block-editor-url-popover__link-viewer-url");return e?(0,c.createElement)(m.ExternalLink,{className:o,href:e},t||(0,yh.filterURLForDisplay)((0,yh.safeDecodeURI)(e))):(0,c.createElement)("span",{className:o})}const{__experimentalPopoverLegacyPositionToPlacement:sx}=Xo(m.privateApis);function cx({additionalControls:e,children:t,renderSettings:n,placement:o,focusOnMount:r="firstElement",position:l,...i}){let a;void 0!==l&&$()("`position` prop in wp.blockEditor.URLPopover",{since:"6.2",alternative:"`placement` prop"}),void 0!==o?a=o:void 0!==l&&(a=sx(l)),a=a||"bottom";const[s,u]=(0,c.useState)(!1),d=!!n&&s;return(0,c.createElement)(m.Popover,{className:"block-editor-url-popover",focusOnMount:r,placement:a,shift:!0,...i},(0,c.createElement)("div",{className:"block-editor-url-popover__input-container"},(0,c.createElement)("div",{className:"block-editor-url-popover__row"},t,!!n&&(0,c.createElement)(m.Button,{className:"block-editor-url-popover__settings-toggle",icon:PS,label:(0,v.__)("Link settings"),onClick:()=>{u(!s)},"aria-expanded":s})),d&&(0,c.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},n())),e&&!d&&(0,c.createElement)("div",{className:"block-editor-url-popover__additional-controls"},e))}cx.LinkEditor=function({autocompleteRef:e,className:t,onChangeInputValue:n,value:o,...r}){return(0,c.createElement)("form",{className:d()("block-editor-url-popover__link-editor",t),...r},(0,c.createElement)(Rh,{__nextHasNoMarginBottom:!0,value:o,onChange:n,autocompleteRef:e}),(0,c.createElement)(m.Button,{icon:xh,label:(0,v.__)("Apply"),type:"submit"}))},cx.LinkViewer=function({className:e,linkClassName:t,onEditLinkClick:n,url:o,urlLabel:r,...l}){return(0,c.createElement)("div",{className:d()("block-editor-url-popover__link-viewer",e),...l},(0,c.createElement)(ax,{url:o,urlLabel:r,className:t}),n&&(0,c.createElement)(m.Button,{icon:ub,label:(0,v.__)("Edit"),onClick:n}))};var ux=cx;const dx=()=>{},px=({src:e,onChange:t,onSubmit:n,onClose:o,popoverAnchor:r})=>(0,c.createElement)(ux,{anchor:r,onClose:o},(0,c.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:n},(0,c.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"text","aria-label":(0,v.__)("URL"),placeholder:(0,v.__)("Paste or type URL"),onChange:t,value:e}),(0,c.createElement)(m.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:xh,label:(0,v.__)("Apply"),type:"submit"}))),mx=({isURLInputVisible:e,src:t,onChangeSrc:n,onSubmitSrc:o,openURLInput:r,closeURLInput:l})=>{const[i,a]=(0,c.useState)(null);return(0,c.createElement)("div",{className:"block-editor-media-placeholder__url-input-container",ref:a},(0,c.createElement)(m.Button,{className:"block-editor-media-placeholder__button",onClick:r,isPressed:e,variant:"tertiary"},(0,v.__)("Insert from URL")),e&&(0,c.createElement)(px,{src:t,onChange:n,onSubmit:o,onClose:l,popoverAnchor:i}))};var fx=(0,m.withFilters)("editor.MediaPlaceholder")((function({value:e={},allowedTypes:t,className:n,icon:o,labels:r={},mediaPreview:l,notices:i,isAppender:s,accept:u,addToGallery:p,multiple:g=!1,handleUpload:h=!0,disableDropZone:b,disableMediaButtons:_,onError:k,onSelect:y,onCancel:E,onSelectURL:S,onToggleFeaturedImage:w,onDoubleClick:C,onFilesPreUpload:x=dx,onHTMLDrop:B,children:I,mediaLibraryButton:T,placeholder:M,style:P}){B&&$()("wp.blockEditor.MediaPlaceholder onHTMLDrop prop",{since:"6.2",version:"6.4"});const N=(0,f.useSelect)((e=>{const{getSettings:t}=e(Jo);return t().mediaUpload}),[]),[L,R]=(0,c.useState)(""),[A,D]=(0,c.useState)(!1);(0,c.useEffect)((()=>{var t;R(null!==(t=e?.src)&&void 0!==t?t:"")}),[e?.src]);const O=e=>{R(e.target.value)},z=()=>{D(!0)},V=()=>{D(!1)},F=e=>{e.preventDefault(),L&&S&&(S(L),V())},H=n=>{if(!h)return y(n);let o;if(x(n),g)if(p){let t=[];o=n=>{const o=(null!=e?e:[]).filter((e=>e.id?!t.some((({id:t})=>Number(t)===Number(e.id))):!t.some((({urlSlug:t})=>e.url.includes(t)))));y(o.concat(n)),t=n.map((e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else o=y;else o=([e])=>y(e);N({allowedTypes:t,filesList:n,onFileChange:o,onError:k})};async function G(e){const n=(0,a.pasteHandler)({HTML:e});return await async function(e){if(!e||!Array.isArray(e))return;const n=function e(t){return t.flatMap((t=>"core/image"!==t.name&&"core/audio"!==t.name&&"core/video"!==t.name||!t.attributes.url?e(t.innerBlocks):[t]))}(e);if(!n.length)return;const o=await Promise.all(n.map((e=>e.attributes.id?e.attributes:new Promise(((n,o)=>{window.fetch(e.attributes.url).then((e=>e.blob())).then((r=>N({filesList:[r],additionalData:{title:e.attributes.title,alt_text:e.attributes.alt,caption:e.attributes.caption},onFileChange:([e])=>{e.id&&n(e)},allowedTypes:t,onError:o}))).catch((()=>n(e.attributes.url)))}))))).catch((e=>k(e)));y(g?o:o[0])}(n)}const U=e=>{H(e.target.files)},j=null!=M?M:e=>{let{instructions:a,title:u}=r;if(N||S||(a=(0,v.__)("To edit this block, you need permission to upload media.")),void 0===a||void 0===u){const e=null!=t?t:[],[n]=e,o=1===e.length,r=o&&"audio"===n,l=o&&"image"===n,i=o&&"video"===n;void 0===a&&N&&(a=(0,v.__)("Upload a media file or pick one from your media library."),r?a=(0,v.__)("Upload an audio file, pick one from your media library, or add one with a URL."):l?a=(0,v.__)("Upload an image file, pick one from your media library, or add one with a URL."):i&&(a=(0,v.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===u&&(u=(0,v.__)("Media"),r?u=(0,v.__)("Audio"):l?u=(0,v.__)("Image"):i&&(u=(0,v.__)("Video")))}const p=d()("block-editor-media-placeholder",n,{"is-appender":s});return(0,c.createElement)(m.Placeholder,{icon:o,label:u,instructions:a,className:p,notices:i,onDoubleClick:C,preview:l,style:P},e,I)},W=()=>b?null:(0,c.createElement)(m.DropZone,{onFilesDrop:H,onHTMLDrop:G}),K=()=>E&&(0,c.createElement)(m.Button,{className:"block-editor-media-placeholder__cancel-button",title:(0,v.__)("Cancel"),variant:"link",onClick:E},(0,v.__)("Cancel")),q=()=>S&&(0,c.createElement)(mx,{isURLInputVisible:A,src:L,onChangeSrc:O,onSubmitSrc:F,openURLInput:z,closeURLInput:V}),Z=()=>w&&(0,c.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,c.createElement)(m.Button,{className:"block-editor-media-placeholder__button",onClick:w,variant:"tertiary"},(0,v.__)("Use featured image")));return _?(0,c.createElement)(cg,null,W()):(0,c.createElement)(cg,{fallback:j(q())},(()=>{const n=null!=T?T:({open:e})=>(0,c.createElement)(m.Button,{variant:"tertiary",onClick:()=>{e()}},(0,v.__)("Media Library")),o=(0,c.createElement)(ug,{addToGallery:p,gallery:g&&!(!t||0===t.length)&&t.every((e=>"image"===e||e.startsWith("image/"))),multiple:g,onSelect:y,allowedTypes:t,mode:"browse",value:Array.isArray(e)?e.map((({id:e})=>e)):e.id,render:n});if(N&&s)return(0,c.createElement)(c.Fragment,null,W(),(0,c.createElement)(m.FormFileUpload,{onChange:U,accept:u,multiple:!!g,render:({openFileDialog:e})=>{const t=(0,c.createElement)(c.Fragment,null,(0,c.createElement)(m.Button,{variant:"primary",className:d()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:e},(0,v.__)("Upload")),o,q(),Z(),K());return j(t)}}));if(N){const e=(0,c.createElement)(c.Fragment,null,W(),(0,c.createElement)(m.FormFileUpload,{variant:"primary",className:d()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:U,accept:u,multiple:!!g},(0,v.__)("Upload")),o,q(),Z(),K());return j(e)}return j(o)})())}));var gx=({colorSettings:e,...t})=>{const n=e.map((e=>{if(!e)return e;const{value:t,onChange:n,...o}=e;return{...o,colorValue:t,onColorChange:n}}));return(0,c.createElement)(xC,{settings:n,gradients:[],disableCustomGradients:!0,...t})};const hx={placement:"bottom-start"};var bx=()=>(0,c.createElement)(c.Fragment,null,["bold","italic","link","unknown"].map((e=>(0,c.createElement)(m.Slot,{name:`RichText.ToolbarControls.${e}`,key:e}))),(0,c.createElement)(m.Slot,{name:"RichText.ToolbarControls"},(e=>{if(!e.length)return null;const t=e.map((([{props:e}])=>e)).some((({isActive:e})=>e));return(0,c.createElement)(m.ToolbarItem,null,(n=>(0,c.createElement)(m.DropdownMenu,{icon:PS,label:(0,v.__)("More"),toggleProps:{...n,className:d()(n.className,{"is-pressed":t}),describedBy:(0,v.__)("Displays more block tools")},controls:K(e.map((([{props:e}])=>e)),"title"),popoverProps:hx})))})));function vx(e){return Array.from(e.querySelectorAll("[data-toolbar-item]"))}function _x(e,t,n,o,r,l){const[i]=(0,c.useState)(t),[a]=(0,c.useState)(o),s=(0,c.useCallback)((()=>{!function(e){const[t]=da.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}(e.current)}),[]);(0,lp.useShortcut)("core/block-editor/focus-toolbar",(()=>{l&&s()})),(0,c.useEffect)((()=>{i&&s()}),[n,i,s]),(0,c.useEffect)((()=>{const t=e.current;let n=0;return i||(n=window.requestAnimationFrame((()=>{const e=vx(t),n=a||0;var o;e[n]&&(o=t).contains(o.ownerDocument.activeElement)&&e[n].focus({preventScroll:!0})}))),()=>{if(window.cancelAnimationFrame(n),!r||!t)return;const e=vx(t).findIndex((e=>0===e.tabIndex));r(e)}}),[a,i])}var kx=function({children:e,focusOnMount:t,shouldUseKeyboardFocusShortcut:n=!0,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,...l}){const i=(0,c.useRef)(),a=function(e){const[t,n]=(0,c.useState)(!0),o=(0,c.useCallback)((()=>{const t=!da.focus.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||$()("Using custom components as toolbar controls",{since:"5.6",alternative:"ToolbarItem, ToolbarButton or ToolbarDropdownMenu components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),n(t)}),[]);return(0,c.useLayoutEffect)((()=>{const t=new window.MutationObserver(o);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[t]),t}(i);return _x(i,t,a,o,r,n),a?(0,c.createElement)(m.Toolbar,{label:l["aria-label"],ref:i,...l},e):(0,c.createElement)(m.NavigableMenu,{orientation:"horizontal",role:"toolbar",ref:i,...l},e)};function yx({editableContentElement:e,activeFormats:t}){const n=t[t.length-1],o=n?.type,r=(0,f.useSelect)((e=>e(G.store).getFormatType(o)),[o]),l=(0,G.useAnchor)({editableContentElement:e,settings:r});return(0,c.createElement)(Ex,{popoverAnchor:l})}function Ex({popoverAnchor:e}){return(0,c.createElement)(m.Popover,{placement:"top",focusOnMount:!1,anchor:e,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},(0,c.createElement)(kx,{className:"block-editor-rich-text__inline-format-toolbar-group","aria-label":(0,v.__)("Format tools")},(0,c.createElement)(m.ToolbarGroup,null,(0,c.createElement)(bx,null))))}var Sx=({inline:e,editableContentElement:t,value:n})=>{const o=(0,f.useSelect)((e=>e(Jo).getSettings().hasInlineToolbar),[]);if(e)return(0,c.createElement)(Ex,{popoverAnchor:t});if(o){const e=(0,G.getActiveFormats)(n);return(0,G.isCollapsed)(n)&&!e.length?null:(0,c.createElement)(yx,{editableContentElement:t,activeFormats:e})}return(0,c.createElement)(dr,{group:"inline"},(0,c.createElement)(bx,null))};function wx(){const{didAutomaticChange:e,getSettings:t}=(0,f.useSelect)(Jo);return(0,p.useRefEffect)((n=>{function o(n){const{keyCode:o}=n;if(n.defaultPrevented)return;if(o!==Pd.DELETE&&o!==Pd.BACKSPACE&&o!==Pd.ESCAPE)return;const{__experimentalUndo:r}=t();r&&e()&&(n.preventDefault(),r())}return n.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",o)}}),[])}var Cx=window.wp.shortcode;function xx(e,t){if(t?.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}function Bx(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function Ix({allowedFormats:e,disableFormats:t}){return t?Ix.EMPTY_ARRAY:e}Ix.EMPTY_ARRAY=[];const Tx=e=>(0,Cx.regexp)(".*").test(e);function Mx({value:e,pastedBlocks:t=[],onReplace:n,onSplit:o}){if(!n||!o)return;const{start:r=0,end:l=0}=e,i={...e,start:r,end:l},a=[],[s,c]=(0,G.split)(i),u=t.length>0;let d=-1;const p=(0,G.isEmpty)(s)&&!(0,G.isEmpty)(c);u&&(0,G.isEmpty)(s)||(a.push(o((0,G.toHTMLString)({value:s}),!p)),d+=1),u&&(a.push(...t),d+=t.length),u&&(0,G.isEmpty)(c)||a.push(o((0,G.toHTMLString)({value:c}),p));n(a,u?d:1,u?-1:0)}function Px(e){const t=(0,c.useRef)(e);return t.current=e,(0,p.useRefEffect)((e=>{function n(e){const{isSelected:n,disableFormats:o,onChange:r,value:l,formatTypes:i,tagName:s,onReplace:c,onSplit:u,__unstableEmbedURLOnPaste:d,preserveWhiteSpace:p,pastePlainText:m}=t.current;if(!n)return;const{clipboardData:f}=e;let g="",h="";try{g=f.getData("text/plain"),h=f.getData("text/html")}catch(e){try{h=f.getData("Text")}catch(e){return}}if(h=function(e){const t="\x3c!--StartFragment--\x3e",n=e.indexOf(t);if(!(n>-1))return e;e=e.substring(n+t.length);const o="\x3c!--EndFragment--\x3e",r=e.indexOf(o);r>-1&&(e=e.substring(0,r));return e}(h),h=function(e){const t="";if(e.startsWith(t))return e.slice(t.length);return e}(h),e.preventDefault(),window.console.log("Received HTML:\n\n",h),window.console.log("Received plain text:\n\n",g),o)return void r((0,G.insert)(l,g));const b=i.reduce(((e,{__unstablePasteRule:t})=>(t&&e===l&&(e=t(l,{html:h,plainText:g})),e)),l);if(b!==l)return void r(b);const v=[...(0,da.getFilesFromDataTransfer)(f)];if("true"===f.getData("rich-text")){const e=(0,G.create)({html:h,preserveWhiteSpace:p});return xx(e,l.activeFormats),void r((0,G.insert)(l,e))}if(m)return void r((0,G.insert)(l,(0,G.create)({text:g})));if(v?.length&&window.console.log("Received items:\n\n",v),v?.length&&!pS(v,h)){const e=(0,a.getBlockTransforms)("from"),t=v.reduce(((t,n)=>{const o=(0,a.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return o&&t.push(o.transform([n])),t}),[]).flat();if(!t.length)return;return void(c&&(0,G.isEmpty)(l)?c(t):Mx({value:l,pastedBlocks:t,onReplace:c,onSplit:u}))}let _=c&&u?"AUTO":"INLINE";"AUTO"===_&&(0,G.isEmpty)(l)&&Tx(g)&&(_="BLOCKS"),d&&(0,G.isEmpty)(l)&&(0,yh.isURL)(g.trim())&&(_="BLOCKS");const k=(0,a.pasteHandler)({HTML:h,plainText:g,mode:_,tagName:s,preserveWhiteSpace:p});if("string"==typeof k){const e=(0,G.create)({html:k});xx(e,l.activeFormats),r((0,G.insert)(l,e))}else k.length>0&&(c&&(0,G.isEmpty)(l)?c(k,k.length-1,-1):Mx({value:l,pastedBlocks:k,onReplace:c,onSplit:u}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}}),[])}const Nx=["`",'"',"'","“”","‘’"];function Lx(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,f.useDispatch)(Jo),o=(0,c.useRef)(e);return o.current=e,(0,p.useRefEffect)((e=>{function r(r){const{inputType:l,data:i}=r,{value:a,onChange:c}=o.current;if("insertText"!==l)return;if((0,G.isCollapsed)(a))return;const u=(0,s.applyFilters)("blockEditor.wrapSelectionSettings",Nx).find((([e,t])=>e===i||t===i));if(!u)return;const[d,p=d]=u,m=a.start,f=a.end+d.length;let g=(0,G.insert)(a,d,m,m);g=(0,G.insert)(g,p,f,f),t(),c(g),n();const h={};for(const e in r)h[e]=r[e];h.data=p;const{ownerDocument:b}=e,{defaultView:v}=b,_=new v.InputEvent("input",h);window.queueMicrotask((()=>{r.target.dispatchEvent(_)})),r.preventDefault()}return e.addEventListener("beforeinput",r),()=>{e.removeEventListener("beforeinput",r)}}),[])}function Rx(e){let t=e.length;for(;t--;){const n=An(e[t].attributes);if(n)return e[t].attributes[n]=e[t].attributes[n].replace(Rn,""),[e[t].clientId,n,0,0];const o=Rx(e[t].innerBlocks);if(o)return o}return[]}function Ax(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,f.useDispatch)(Jo),o=(0,c.useRef)(e);return o.current=e,(0,p.useRefEffect)((e=>{function r(){const{getValue:e,onReplace:t,selectionChange:r}=o.current;if(!t)return;const l=e(),{start:i,text:s}=l;if(" "!==s.slice(i-1,i))return;const c=s.slice(0,i).trim(),u=(0,a.getBlockTransforms)("from").filter((({type:e})=>"prefix"===e)),d=(0,a.findTransform)(u,(({prefix:e})=>c===e));if(!d)return;const p=(0,G.toHTMLString)({value:(0,G.insert)(l,Rn,0,i)}),m=d.transform(p);return r(...Rx([m])),t([m]),n(),!0}function l(e){const{inputType:l,type:i}=e,{getValue:a,onChange:s,__unstableAllowPrefixTransformations:c,formatTypes:u}=o.current;if("insertText"!==l&&"compositionend"!==i)return;if(c&&r&&r())return;const d=a(),p=u.reduce(((e,{__unstableInputRule:t})=>(t&&(e=t(e)),e)),function(e){const t="tales of gutenberg",{start:n,text:o}=e;return n<18||o.slice(n-18,n).toLowerCase()!==t?e:(0,G.insert)(e," 🐡🐢🦀🐤🦋🐘🐧🐹🦁🦄🦍🐼🐿🎃🐴🐝🐆🦕🦔🌱🍇π🍌🐉💧🥨🌌🍂🍠🥦🥚🥝🎟🥥🥒🛵🥖🍒🍯🎾🎲🐺🐚🐮⌛️")}(d));p!==d&&(t(),s({...p,activeFormats:d.activeFormats}),n())}return e.addEventListener("input",l),e.addEventListener("compositionend",l),()=>{e.removeEventListener("input",l),e.removeEventListener("compositionend",l)}}),[])}function Dx(e){const t=(0,c.useRef)(e);return t.current=e,(0,p.useRefEffect)((e=>{function n(e){const{keyCode:n}=e;if(e.defaultPrevented)return;const{value:o,onMerge:r,onRemove:l}=t.current;if(n===Pd.DELETE||n===Pd.BACKSPACE){const{start:t,end:i,text:a}=o,s=n===Pd.BACKSPACE,c=o.activeFormats&&!!o.activeFormats.length;if(!(0,G.isCollapsed)(o)||c||s&&0!==t||!s&&i!==a.length)return;r&&r(!s),l&&(0,G.isEmpty)(o)&&s&&l(!s),e.preventDefault()}}return e.addEventListener("keydown",n),()=>{e.removeEventListener("keydown",n)}}),[])}function Ox(e){const t=(0,f.useRegistry)(),{__unstableMarkAutomaticChange:n}=(0,f.useDispatch)(Jo),o=(0,c.useRef)(e);return o.current=e,(0,p.useRefEffect)((e=>{function r(e){if(e.defaultPrevented)return;if(e.keyCode!==Pd.ENTER)return;const{removeEditorOnlyFormats:r,value:l,onReplace:i,onSplit:s,onChange:c,disableLineBreaks:u,onSplitAtEnd:d,onSplitAtDoubleLineEnd:p}=o.current;e.preventDefault();const m={...l};m.formats=r(l);const f=i&&s;if(i){const e=(0,a.getBlockTransforms)("from").filter((({type:e})=>"enter"===e)),t=(0,a.findTransform)(e,(e=>e.regExp.test(m.text)));t&&(i([t.transform({content:m.text})]),n())}const{text:g,start:h,end:b}=m;e.shiftKey?u||c((0,G.insert)(m,"\n")):f?Mx({value:m,onReplace:i,onSplit:s}):d&&h===b&&b===g.length?d():p&&h===b&&b===g.length&&"\n\n"===g.slice(-2)?t.batch((()=>{m.start=m.end-2,c((0,G.remove)(m)),p()})):u||c((0,G.insert)(m,"\n"))}return e.addEventListener("keydown",r),()=>{e.removeEventListener("keydown",r)}}),[])}function zx(e){return e(G.store).getFormatTypes()}const Vx=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function Fx(e,t){return"object"!=typeof e?{[t]:e}:Object.fromEntries(Object.entries(e).map((([e,n])=>[`${t}.${e}`,n])))}function Hx(e,t){return e[t]?e[t]:Object.keys(e).filter((e=>e.startsWith(t+"."))).reduce(((n,o)=>(n[o.slice(t.length+1)]=e[o],n)),{})}function Gx(e){return(0,p.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}}),[])}function Ux(e){return(0,p.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("input",n),()=>{t.removeEventListener("input",n)}}),[])}function $x(){const{__unstableMarkLastChangeAsPersistent:e}=(0,f.useDispatch)(Jo);return(0,p.useRefEffect)((t=>{function n(t){"insertReplacementText"===t.inputType&&e()}return t.addEventListener("beforeinput",n),()=>{t.removeEventListener("beforeinput",n)}}),[])}function jx(){const{isMultiSelecting:e}=(0,f.useSelect)(Jo);return(0,p.useRefEffect)((t=>{function n(){if(!e())return;const n=t.parentElement.closest('[contenteditable="true"]');n&&n.focus()}return t.addEventListener("focus",n),()=>{t.removeEventListener("focus",n)}}),[])}const Wx={},Kx=Symbol("usesContext");function qx({onChange:e,onFocus:t,value:n,forwardedRef:o,settings:r}){const{name:l,edit:i,[Kx]:a}=r,s=(0,c.useContext)(fa),u=(0,c.useMemo)((()=>a?Object.fromEntries(Object.entries(s).filter((([e])=>a.includes(e)))):Wx),[a,s]);if(!i)return null;const d=(0,G.getActiveFormat)(n,l),p=void 0!==d,m=(0,G.getActiveObject)(n),f=void 0!==m&&m.type===l;return(0,c.createElement)(i,{key:l,isActive:p,activeAttributes:p&&d.attributes||{},isObjectActive:f,activeObjectAttributes:f&&m.attributes||{},value:n,onChange:e,onFocus:t,contentRef:o,context:u})}function Zx({formatTypes:e,...t}){return e.map((e=>(0,c.createElement)(qx,{settings:e,...t,key:e.name})))}const Yx=({value:e,tagName:t,multiline:n,...o})=>{Array.isArray(e)&&($()("wp.blockEditor.RichText value prop as children type",{since:"6.1",version:"6.3",alternative:"value prop as string",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),e=a.children.toHTML(e));const r=Bx(n);!e&&r&&(e=`<${r}>`);const l=(0,c.createElement)(c.RawHTML,null,e);if(t){const{format:e,...n}=o;return(0,c.createElement)(t,{...n},l)}return l};var Xx=(0,c.forwardRef)((function({children:e,identifier:t,tagName:n="div",value:o="",onChange:r,multiline:l,...i},a){$()("wp.blockEditor.RichText multiline prop",{since:"6.1",version:"6.3",alternative:"nested blocks (InnerBlocks)",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/"});const{clientId:s}=rr(),{selectionChange:u}=(0,f.useDispatch)(Jo),d=Bx(l),p=`${o=o||`<${d}>`}<${d}>`.split(`<${d}>`);function m(e){r(`<${d}>${e.join(`<${d}>`)}`)}return p.shift(),p.pop(),(0,c.createElement)(n,{ref:a},p.map(((e,n)=>(0,c.createElement)(eB,{key:n,identifier:`${t}-${n}`,tagName:d,value:e,onChange:e=>{const t=p.slice();t[n]=e,m(t)},isSelected:void 0,onSplit:e=>e,onReplace:e=>{const o=p.slice();o.splice(n,1,...e),m(o),u(s,`${t}-${n+1}`,0,0)},onMerge:e=>{const o=p.slice();let r=0;if(e){if(!o[n+1])return;o.splice(n,2,o[n]+o[n+1]),r=o[n].length-1}else{if(!o[n-1])return;o.splice(n-1,2,o[n-1]+o[n]),r=o[n-1].length-1}m(o),u(s,`${t}-${n-(e?0:1)}`,r,r)},...i}))))}));const Qx=(0,c.createContext)(),Jx=(0,c.createContext)();function eB({children:e,tagName:t="div",value:n="",onChange:o,isSelected:r,multiline:l,inlineToolbar:i,wrapperClassName:a,autocompleters:s,onReplace:u,placeholder:g,allowedFormats:h,withoutInteractiveFormatting:b,onRemove:v,onMerge:_,onSplit:k,__unstableOnSplitAtEnd:y,__unstableOnSplitAtDoubleLineEnd:E,identifier:S,preserveWhiteSpace:w,__unstablePastePlainText:C,__unstableEmbedURLOnPaste:x,__unstableDisableFormats:B,disableLineBreaks:I,__unstableAllowPrefixTransformations:T,...M},P){M=function(e){const{__unstableMobileNoFocusOnMount:t,deleteEnter:n,placeholderTextColor:o,textAlign:r,selectionColor:l,tagsToEliminate:i,disableEditingMenu:a,fontSize:s,fontFamily:c,fontWeight:u,fontStyle:d,minWidth:p,maxWidth:m,setRef:f,disableSuggestions:g,disableAutocorrection:h,...b}=e;return b}(M);const N=(0,c.useRef)(),{clientId:L}=rr(),{selectionStart:R,selectionEnd:A,isSelected:D}=(0,f.useSelect)((e=>{const{getSelectionStart:t,getSelectionEnd:n}=e(Jo),o=t(),l=n();let i;return void 0===r?i=o.clientId===L&&l.clientId===L&&o.attributeKey===S:r&&(i=o.clientId===L),{selectionStart:i?o.offset:void 0,selectionEnd:i?l.offset:void 0,isSelected:i}})),{getSelectionStart:O,getSelectionEnd:z,getBlockRootClientId:V}=(0,f.useSelect)(Jo),{selectionChange:F}=(0,f.useDispatch)(Jo),H=Ix({allowedFormats:h,disableFormats:B}),U=!H||H.length>0,$=(0,c.useCallback)(((e,t)=>{const n={},o=void 0===e&&void 0===t;if("number"==typeof e||o){if(void 0===t&&V(L)!==V(z().clientId))return;n.start={clientId:L,attributeKey:S,offset:e}}if("number"==typeof t||o){if(void 0===e&&V(L)!==V(O().clientId))return;n.end={clientId:L,attributeKey:S,offset:t}}F(n)}),[L,S]),{formatTypes:j,prepareHandlers:W,valueHandlers:K,changeHandlers:q,dependencies:Z}=function({clientId:e,identifier:t,withoutInteractiveFormatting:n,allowedFormats:o}){const r=(0,f.useSelect)(zx,[]),l=(0,c.useMemo)((()=>r.filter((({name:e,interactive:t,tagName:r})=>!(o&&!o.includes(e)||n&&(t||Vx.has(r)))))),[r,o,n]),i=(0,f.useSelect)((n=>l.reduce(((o,r)=>r.__experimentalGetPropsForEditableTreePreparation?{...o,...Fx(r.__experimentalGetPropsForEditableTreePreparation(n,{richTextIdentifier:t,blockClientId:e}),r.name)}:o),{})),[l,e,t]),a=(0,f.useDispatch)(),s=[],u=[],d=[],p=[];for(const e in i)p.push(i[e]);return l.forEach((n=>{if(n.__experimentalCreatePrepareEditableTree){const o=n.__experimentalCreatePrepareEditableTree(Hx(i,n.name),{richTextIdentifier:t,blockClientId:e});n.__experimentalCreateOnChangeEditableValue?u.push(o):s.push(o)}if(n.__experimentalCreateOnChangeEditableValue){let o={};n.__experimentalGetPropsForEditableTreeChangeHandler&&(o=n.__experimentalGetPropsForEditableTreeChangeHandler(a,{richTextIdentifier:t,blockClientId:e}));const r=Hx(i,n.name);d.push(n.__experimentalCreateOnChangeEditableValue({..."object"==typeof r?r:{},...o},{richTextIdentifier:t,blockClientId:e}))}})),{formatTypes:l,prepareHandlers:s,valueHandlers:u,changeHandlers:d,dependencies:p}}({clientId:L,identifier:S,withoutInteractiveFormatting:b,allowedFormats:H});function Y(e){return j.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=(0,G.removeFormat)(e,t.name,0,e.text.length))})),e.formats}const{value:X,getValue:Q,onChange:J,ref:ee}=(0,G.__unstableUseRichText)({value:n,onChange(e,{__unstableFormats:t,__unstableText:n}){o(e),Object.values(q).forEach((e=>{e(t,n)}))},selectionStart:R,selectionEnd:A,onSelectionChange:$,placeholder:g,__unstableIsSelected:D,__unstableDisableFormats:B,preserveWhiteSpace:w,__unstableDependencies:[...Z,t],__unstableAfterParse:function(e){return K.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:Y,__unstableAddInvisibleFormats:function(e){return W.reduce(((t,n)=>n(t,e.text)),e.formats)}}),te=function(e){return(0,m.__unstableUseAutocompleteProps)({...e,completers:oS(e)})}({onReplace:u,completers:s,record:X,onChange:J});!function({html:e,value:t}){const n=(0,c.useRef)(),o=t.activeFormats&&!!t.activeFormats.length,{__unstableMarkLastChangeAsPersistent:r}=(0,f.useDispatch)(Jo);(0,c.useLayoutEffect)((()=>{if(n.current){if(n.current!==t.text){const e=window.setTimeout((()=>{r()}),1e3);return n.current=t.text,()=>{window.clearTimeout(e)}}r()}else n.current=t.text}),[e,o])}({html:n,value:X});const ne=(0,c.useRef)(new Set),oe=(0,c.useRef)(new Set);function re(){N.current?.focus()}const le=t;return(0,c.createElement)(c.Fragment,null,D&&(0,c.createElement)(Qx.Provider,{value:ne},(0,c.createElement)(Jx.Provider,{value:oe},(0,c.createElement)(m.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after"},e&&e({value:X,onChange:J,onFocus:re}),(0,c.createElement)(Zx,{value:X,onChange:J,onFocus:re,formatTypes:j,forwardedRef:N})))),D&&U&&(0,c.createElement)(Sx,{inline:i,editableContentElement:N.current,value:X}),(0,c.createElement)(le,{role:"textbox","aria-multiline":!I,"aria-label":g,...M,...te,ref:(0,p.useMergeRefs)([P,te.ref,M.ref,ee,Lx({value:X,onChange:J}),Ax({getValue:Q,onChange:J,__unstableAllowPrefixTransformations:T,formatTypes:j,onReplace:u,selectionChange:F}),$x(),(0,p.useRefEffect)((e=>{function t(e){(Pd.isKeyboardEvent.primary(e,"z")||Pd.isKeyboardEvent.primary(e,"y")||Pd.isKeyboardEvent.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}),[]),Gx(ne),Ux(oe),wx(),Px({isSelected:D,disableFormats:B,onChange:J,value:X,formatTypes:j,tagName:t,onReplace:u,onSplit:k,__unstableEmbedURLOnPaste:x,preserveWhiteSpace:w,pastePlainText:C}),Dx({value:X,onMerge:_,onRemove:v}),Ox({removeEditorOnlyFormats:Y,value:X,onReplace:u,onSplit:k,onChange:J,disableLineBreaks:I,onSplitAtEnd:y,onSplitAtDoubleLineEnd:E}),jx(),N]),contentEditable:!0,suppressContentEditableWarning:!0,className:d()("block-editor-rich-text__editable",M.className,"rich-text"),tabIndex:0===M.tabIndex?null:M.tabIndex}))}const tB=(0,c.forwardRef)(eB);const nB=(0,c.forwardRef)((function e(t,n){let o=t.value,r=t.onChange;Array.isArray(o)&&($()("wp.blockEditor.RichText value prop as children type",{since:"6.1",version:"6.3",alternative:"value prop as string",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),o=a.children.toHTML(t.value),r=e=>t.onChange(a.children.fromDOM((0,G.__unstableCreateElement)(document,e).childNodes)));const l=t.multiline?Xx:tB,i=(0,p.useInstanceId)(e);return(0,c.createElement)(l,{...t,identifier:t.identifier||i,value:o,onChange:r,ref:n})}));nB.Content=Yx,nB.isEmpty=e=>!e||0===e.length;var oB=nB;const rB=(0,c.forwardRef)(((e,t)=>(0,c.createElement)(oB,{ref:t,...e,__unstableDisableFormats:!0,preserveWhiteSpace:!0})));rB.Content=({value:e="",tagName:t="div",...n})=>(0,c.createElement)(t,{...n},e);var lB=rB;var iB=(0,c.forwardRef)((({__experimentalVersion:e,...t},n)=>{if(2===e)return(0,c.createElement)(lB,{ref:n,...t});const{className:o,onChange:r,...l}=t;return(0,c.createElement)(Ma.Z,{ref:n,className:d()("block-editor-plain-text",o),onChange:e=>r(e.target.value),...l})}));function aB({property:e,viewport:t,desc:n}){const o=(0,p.useInstanceId)(aB),r=n||(0,v.sprintf)((0,v._x)("Controls the %1$s property for %2$s viewports.","Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."),e,t.label);return(0,c.createElement)(c.Fragment,null,(0,c.createElement)("span",{"aria-describedby":`rbc-desc-${o}`},t.label),(0,c.createElement)(m.VisuallyHidden,{as:"span",id:`rbc-desc-${o}`},r))}var sB=function(e){const{title:t,property:n,toggleLabel:o,onIsResponsiveChange:r,renderDefaultControl:l,renderResponsiveControls:i,isResponsive:a=!1,defaultLabel:s={id:"all",label:(0,v.__)("All")},viewports:u=[{id:"small",label:(0,v.__)("Small screens")},{id:"medium",label:(0,v.__)("Medium screens")},{id:"large",label:(0,v.__)("Large screens")}]}=e;if(!t||!n||!l)return null;const p=o||(0,v.sprintf)((0,v.__)("Use the same %s on all screensizes."),n),f=(0,v.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),g=l((0,c.createElement)(aB,{property:n,viewport:s}),s);return(0,c.createElement)("fieldset",{className:"block-editor-responsive-block-control"},(0,c.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),(0,c.createElement)("div",{className:"block-editor-responsive-block-control__inner"},(0,c.createElement)(m.ToggleControl,{__nextHasNoMarginBottom:!0,className:"block-editor-responsive-block-control__toggle",label:p,checked:!a,onChange:r,help:f}),(0,c.createElement)("div",{className:d()("block-editor-responsive-block-control__group",{"is-responsive":a})},!a&&g,a&&(i?i(u):u.map((e=>(0,c.createElement)(c.Fragment,{key:e.id},l((0,c.createElement)(aB,{property:n,viewport:e}),e))))))))};function cB({character:e,type:t,onUse:n}){const o=(0,c.useContext)(Qx),r=(0,c.useRef)();return r.current=n,(0,c.useEffect)((()=>{function n(n){Pd.isKeyboardEvent[t](n,e)&&(r.current(),n.preventDefault())}return o.current.add(n),()=>{o.current.delete(n)}}),[e,t]),null}function uB({name:e,shortcutType:t,shortcutCharacter:n,...o}){let r,l="RichText.ToolbarControls";return e&&(l+=`.${e}`),t&&n&&(r=Pd.displayShortcut[t](n)),(0,c.createElement)(m.Fill,{name:l},(0,c.createElement)(m.ToolbarButton,{...o,shortcut:r}))}function dB({inputType:e,onInput:t}){const n=(0,c.useContext)(Jx),o=(0,c.useRef)();return o.current=t,(0,c.useEffect)((()=>{function t(t){t.inputType===e&&(o.current(),t.preventDefault())}return n.current.add(t),()=>{n.current.delete(t)}}),[e]),null}const pB=(0,c.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,c.createElement)(m.Path,{d:"M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z"}));var mB=(0,c.forwardRef)((function(e,t){const n=(0,f.useSelect)((e=>e(Jo).__unstableGetEditorMode()),[]),{__unstableSetEditorMode:o}=(0,f.useDispatch)(Jo);return(0,c.createElement)(m.Dropdown,{renderToggle:({isOpen:o,onToggle:r})=>(0,c.createElement)(m.Button,{...e,ref:t,icon:"navigation"===n?pB:ub,"aria-expanded":o,"aria-haspopup":"true",onClick:r,label:(0,v.__)("Tools")}),popoverProps:{placement:"bottom-start",variant:void 0},renderContent:()=>(0,c.createElement)(c.Fragment,null,(0,c.createElement)(m.NavigableMenu,{role:"menu","aria-label":(0,v.__)("Tools")},(0,c.createElement)(m.MenuItemsChoice,{value:"navigation"===n?"navigation":"edit",onSelect:o,choices:[{value:"edit",label:(0,c.createElement)(c.Fragment,null,(0,c.createElement)(ai,{icon:ub}),(0,v.__)("Edit"))},{value:"navigation",label:(0,c.createElement)(c.Fragment,null,pB,(0,v.__)("Select"))}]})),(0,c.createElement)("div",{className:"block-editor-tool-selector__help"},(0,v.__)("Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.")))})}));function fB({units:e,...t}){const n=(0,m.__experimentalUseCustomUnits)({availableUnits:bl("spacing.units")||["%","px","em","rem","vw"],units:e});return(0,c.createElement)(m.__experimentalUnitControl,{units:n,...t})}var gB=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"}));class hB extends c.Component{constructor(){super(...arguments),this.toggle=this.toggle.bind(this),this.submitLink=this.submitLink.bind(this),this.state={expanded:!1}}toggle(){this.setState({expanded:!this.state.expanded})}submitLink(e){e.preventDefault(),this.toggle()}render(){const{url:e,onChange:t}=this.props,{expanded:n}=this.state,o=e?(0,v.__)("Edit link"):(0,v.__)("Insert link");return(0,c.createElement)("div",{className:"block-editor-url-input__button"},(0,c.createElement)(m.Button,{icon:Wb,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!e}),n&&(0,c.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},(0,c.createElement)("div",{className:"block-editor-url-input__button-modal-line"},(0,c.createElement)(m.Button,{className:"block-editor-url-input__back",icon:gB,label:(0,v.__)("Close"),onClick:this.toggle}),(0,c.createElement)(Rh,{__nextHasNoMarginBottom:!0,value:e||"",onChange:t}),(0,c.createElement)(m.Button,{icon:xh,label:(0,v.__)("Submit"),type:"submit"}))))}}var bB=hB;var vB=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));const _B="none",kB="custom",yB="media",EB="attachment",SB=["noreferrer","noopener"],wB=(0,c.createElement)(m.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,c.createElement)(m.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),(0,c.createElement)(m.Path,{d:"m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z"}),(0,c.createElement)(m.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),CB=({linkDestination:e,onChangeUrl:t,url:n,mediaType:o="image",mediaUrl:r,mediaLink:l,linkTarget:i,linkClass:a,rel:s})=>{const[u,d]=(0,c.useState)(!1),[p,f]=(0,c.useState)(null),[g,h]=(0,c.useState)(!1),[b,_]=(0,c.useState)(null),k=(0,c.useRef)(null),y=()=>{h(!1)},E=()=>{const e=[{linkDestination:yB,title:(0,v.__)("Media File"),url:"image"===o?r:void 0,icon:wB}];return"image"===o&&l&&e.push({linkDestination:EB,title:(0,v.__)("Attachment Page"),url:"image"===o?l:void 0,icon:(0,c.createElement)(m.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,c.createElement)(m.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,c.createElement)(m.Path,{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))}),e},S=(0,c.createElement)(m.__experimentalVStack,{spacing:"3"},(0,c.createElement)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,v.__)("Open in new tab"),onChange:e=>{const n=(e=>{const t=e?"_blank":void 0;let n;if(t){const e=(null!=s?s:"").split(" ");SB.forEach((t=>{e.includes(t)||e.push(t)})),n=e.join(" ")}else{const e=(null!=s?s:"").split(" ").filter((e=>!1===SB.includes(e)));n=e.length?e.join(" "):void 0}return{linkTarget:t,rel:n}})(e);t(n)},checked:"_blank"===i}),(0,c.createElement)(m.TextControl,{__nextHasNoMarginBottom:!0,label:(0,v.__)("Link rel"),value:null!=s?s:"",onChange:e=>{t({rel:e})}}),(0,c.createElement)(m.TextControl,{__nextHasNoMarginBottom:!0,label:(0,v.__)("Link CSS Class"),value:a||"",onChange:e=>{t({linkClass:e})}})),w=null!==b?b:n,C=(E().find((t=>t.linkDestination===e))||{}).title;return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(m.ToolbarButton,{icon:Wb,className:"components-toolbar__control",label:n?(0,v.__)("Edit link"):(0,v.__)("Insert link"),"aria-expanded":u,onClick:()=>{d(!0)},ref:f}),u&&(0,c.createElement)(ux,{anchor:p,onFocusOutside:e=>{const t=k.current;t&&t.contains(e.target)||(d(!1),_(null),y())},onClose:()=>{_(null),y(),d(!1)},renderSettings:()=>S,additionalControls:!w&&(0,c.createElement)(m.NavigableMenu,null,E().map((e=>(0,c.createElement)(m.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:()=>{_(null),(e=>{const n=E();let o;o=e?(n.find((t=>t.url===e))||{linkDestination:kB}).linkDestination:_B,t({linkDestination:o,href:e})})(e.url),y()}},e.title))))},(!n||g)&&(0,c.createElement)(ux.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:w,onChangeInputValue:_,onSubmit:e=>{if(b){const e=E().find((e=>e.url===b))?.linkDestination||kB;t({href:b,linkDestination:e})}y(),_(null),e.preventDefault()},autocompleteRef:k}),n&&!g&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(ux.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:n,onEditLinkClick:()=>{e!==yB&&e!==EB||_(""),h(!0)},urlLabel:C}),(0,c.createElement)(m.Button,{icon:vB,label:(0,v.__)("Remove link"),onClick:()=>{t({linkDestination:_B,href:""})}}))))},{Fill:xB,Slot:BB}=(0,m.createSlotFill)("__unstableBlockToolbarLastItem");xB.Slot=BB;var IB=xB;var TB=(0,c.createContext)("");var MB=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"}));var PB=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M17 4H7c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12zm-7.5-.5h4V16h-4v1.5z"}));var NB=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"}));function LB({children:e,viewLabel:t,className:n,isEnabled:o=!0,deviceType:r,setDeviceType:l,label:i}){if((0,p.useViewportMatch)("small","<"))return null;const a={className:d()(n,"block-editor-post-preview__dropdown-content"),placement:"bottom-end"},s={className:"block-editor-post-preview__button-toggle",disabled:!o,__experimentalIsFocusable:!o,children:t},u={"aria-label":(0,v.__)("View options")},f={mobile:MB,tablet:PB,desktop:NB};return(0,c.createElement)(m.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:a,toggleProps:s,menuProps:u,icon:f[r.toLowerCase()],label:i||(0,v.__)("Preview"),disableOpenOnArrowDown:!o},(t=>(0,c.createElement)(c.Fragment,null,(0,c.createElement)(m.MenuGroup,null,(0,c.createElement)(m.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Desktop"),icon:"Desktop"===r&&gk},(0,v.__)("Desktop")),(0,c.createElement)(m.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Tablet"),icon:"Tablet"===r&&gk},(0,v.__)("Tablet")),(0,c.createElement)(m.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Mobile"),icon:"Mobile"===r&&gk},(0,v.__)("Mobile"))),e?.(t))))}function RB(e){const[t,n]=(0,c.useState)(window.innerWidth);(0,c.useEffect)((()=>{if("Desktop"===e)return;const t=()=>n(window.innerWidth);return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}),[e]);const o=e=>{let n;switch(e){case"Tablet":n=780;break;case"Mobile":n=360;break;default:return null}return n{const t="Mobile"===e?"768px":"1024px",n=(window.innerHeight<800?36:72)+"px",r="auto";switch(e){case"Tablet":case"Mobile":return{width:o(e),marginTop:n,marginBottom:n,marginLeft:r,marginRight:r,height:t,borderRadius:"2px 2px 2px 2px",border:"1px solid #ddd",overflowY:"auto"};default:return null}})(e)}var AB=(0,f.withSelect)((e=>({selectedBlockClientId:e(Jo).getBlockSelectionStart()})))((({selectedBlockClientId:e})=>{const t=Od(e);return e?(0,c.createElement)(m.Button,{variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{t.current.focus()}},(0,v.__)("Skip to the selected block")):null})),DB=window.wp.wordcount;var OB=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z"}));var zB=(0,f.withSelect)((e=>{const{getMultiSelectedBlocks:t}=e(Jo);return{blocks:t()}}))((function({blocks:e}){const t=(0,DB.count)((0,a.serialize)(e),"words");return(0,c.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},(0,c.createElement)(ep,{icon:OB,showColors:!0}),(0,c.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},(0,c.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},(0,v.sprintf)((0,v._n)("%d Block","%d Blocks",e.length),e.length)),(0,c.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},(0,v.sprintf)((0,v._n)("%d word selected.","%d words selected.",t),t))))}));function VB({blockName:e}){const{preferredStyle:t,onUpdatePreferredStyleVariations:n,styles:o}=(0,f.useSelect)((t=>{var n;const o=t(Jo).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:o?.value?.[e],onUpdatePreferredStyleVariations:null!==(n=o?.onChange)&&void 0!==n?n:null,styles:t(a.store).getBlockStyles(e)}}),[e]),r=(0,c.useMemo)((()=>[{label:(0,v.__)("Not set"),value:""},...o.map((({label:e,name:t})=>({label:e,value:t})))]),[o]),l=(0,c.useMemo)((()=>Vw(o)?.name),[o]),i=(0,c.useCallback)((t=>{n(e,t)}),[e,n]);return t&&t!==l?n&&(0,c.createElement)("div",{className:"default-style-picker__default-switcher"},(0,c.createElement)(m.SelectControl,{__nextHasNoMarginBottom:!0,options:r,value:t||"",label:(0,v.__)("Default Style"),onChange:i})):null}var FB=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"}));var HB=(0,c.createElement)(F.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,c.createElement)(F.Path,{d:"M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z"}));const GB={name:"settings",title:(0,v.__)("Settings"),value:"settings",icon:FB,className:"block-editor-block-inspector__tab-item"},UB={name:"styles",title:(0,v.__)("Styles"),value:"styles",icon:HB,className:"block-editor-block-inspector__tab-item"},$B={name:"list",title:(0,v.__)("List View"),value:"list-view",icon:ES,className:"block-editor-block-inspector__tab-item"};var jB=()=>{const e=(0,m.__experimentalUseSlotFills)(ra.slotName);return Boolean(e&&e.length)?(0,c.createElement)(m.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,v.__)("Advanced"),initialOpen:!1},(0,c.createElement)(la.Slot,{group:"advanced"})):null};const WB=()=>{const[e,t]=(0,c.useState)(),{multiSelectedBlocks:n}=(0,f.useSelect)((e=>{const{getBlocksByClientId:t,getSelectedBlockClientIds:n}=e(Jo);return{multiSelectedBlocks:t(n())}}),[]);return(0,c.useLayoutEffect)((()=>{void 0===e&&t(n.some((({attributes:e})=>!!e?.style?.position?.type)))}),[e,n,t]),(0,c.createElement)(m.PanelBody,{className:"block-editor-block-inspector__position",title:(0,v.__)("Position"),initialOpen:null!=e&&e},(0,c.createElement)(la.Slot,{group:"position"}))};var KB=()=>{const e=(0,m.__experimentalUseSlotFills)(Yi.position.Slot.__unstableName);return Boolean(e&&e.length)?(0,c.createElement)(WB,null):null};const qB="isInspectorControlsTabsHintVisible";function ZB(){const e=(0,f.useSelect)((e=>{var t;return null===(t=e(Ch.store).get("core",qB))||void 0===t||t}),[]),t=(0,c.useRef)(),{set:n}=(0,f.useDispatch)(Ch.store);return e?(0,c.createElement)("div",{ref:t,className:"block-editor-inspector-controls-tabs__hint"},(0,c.createElement)("div",{className:"block-editor-inspector-controls-tabs__hint-content"},(0,v.__)("Looking for other block settings? They've moved to the styles tab.")),(0,c.createElement)(m.Button,{className:"block-editor-inspector-controls-tabs__hint-dismiss",icon:vB,iconSize:"16",label:(0,v.__)("Dismiss hint"),onClick:()=>{const e=da.focus.tabbable.findPrevious(t.current);e?.focus(),n("core",qB,!1)},showTooltip:!1})):null}var YB=({showAdvancedControls:e=!1})=>(0,c.createElement)(c.Fragment,null,(0,c.createElement)(la.Slot,null),(0,c.createElement)(KB,null),e&&(0,c.createElement)("div",null,(0,c.createElement)(jB,null)),(0,c.createElement)(ZB,null));var XB=({blockName:e,clientId:t,hasBlockStyles:n})=>(0,c.createElement)(c.Fragment,null,n&&(0,c.createElement)("div",null,(0,c.createElement)(m.PanelBody,{title:(0,v.__)("Styles")},(0,c.createElement)($w,{clientId:t}),(0,a.hasBlockSupport)(e,"defaultStylePicker",!0)&&(0,c.createElement)(VB,{blockName:e}))),(0,c.createElement)(la.Slot,{group:"color",label:(0,v.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,c.createElement)(la.Slot,{group:"background",label:(0,v.__)("Background")}),(0,c.createElement)(la.Slot,{group:"filter"}),(0,c.createElement)(la.Slot,{group:"typography",label:(0,v.__)("Typography")}),(0,c.createElement)(la.Slot,{group:"dimensions",label:(0,v.__)("Dimensions")}),(0,c.createElement)(la.Slot,{group:"border",label:(0,v.__)("Border")}),(0,c.createElement)(la.Slot,{group:"styles"}));const QB=["core/navigation"];var JB=e=>!QB.includes(e);function eI({blockName:e,clientId:t,hasBlockStyles:n,tabs:o}){const r=JB(e)?void 0:$B.name;return(0,c.createElement)(m.TabPanel,{className:"block-editor-block-inspector__tabs",tabs:o,initialTabName:r,key:t},(o=>o.name===GB.name?(0,c.createElement)(YB,{showAdvancedControls:!!e}):o.name===UB.name?(0,c.createElement)(XB,{blockName:e,clientId:t,hasBlockStyles:n}):o.name===$B.name?(0,c.createElement)(la.Slot,{group:"list"}):void 0))}const tI=[];function nI(e){const t=[],{border:n,color:o,default:r,dimensions:l,list:i,position:a,styles:s,typography:c}=Yi,u=JB(e),d=(0,m.__experimentalUseSlotFills)(i.Slot.__unstableName),p=!u&&!!d&&d.length,g=[...(0,m.__experimentalUseSlotFills)(n.Slot.__unstableName)||[],...(0,m.__experimentalUseSlotFills)(o.Slot.__unstableName)||[],...(0,m.__experimentalUseSlotFills)(l.Slot.__unstableName)||[],...(0,m.__experimentalUseSlotFills)(s.Slot.__unstableName)||[],...(0,m.__experimentalUseSlotFills)(c.Slot.__unstableName)||[]].length,h=(0,m.__experimentalUseSlotFills)(ra.slotName)||[],b=[...(0,m.__experimentalUseSlotFills)(r.Slot.__unstableName)||[],...(0,m.__experimentalUseSlotFills)(a.Slot.__unstableName)||[],...p&&g>1?h:[]];p&&t.push($B),b.length&&t.push(GB),g&&t.push(UB);const v=function(e,t={}){return void 0!==t[e]?t[e]:void 0===t.default||t.default}(e,(0,f.useSelect)((e=>e(Jo).getSettings().blockInspectorTabs),[]));return v?t:tI}const{createPrivateSlotFill:oI}=Xo(m.privateApis),{Fill:rI,Slot:lI}=oI("BlockInformation"),iI=e=>lr()?(0,c.createElement)(rI,{...e}):null;iI.Slot=e=>(0,c.createElement)(lI,{...e});var aI=iI;function sI({clientIds:e}){return e.length?(0,c.createElement)(m.__experimentalVStack,{spacing:1},e.map((e=>(0,c.createElement)(cI,{key:e,clientId:e})))):null}function cI({clientId:e}){const{name:t,icon:n,isSelected:o}=(0,f.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:o,isBlockSelected:r,hasSelectedInnerBlock:l}=t(Jo),{getBlockType:i}=t(a.store),s=i(n(e)),c=o(e);return{name:s&&(0,a.__experimentalGetBlockLabel)(s,c,"list-view"),icon:s?.icon,isSelected:r(e)||l(e,!0)}}),[e]),{selectBlock:r}=(0,f.useDispatch)(Jo);return(0,c.createElement)(m.Button,{isPressed:o,onClick:()=>r(e)},(0,c.createElement)(m.__experimentalHStack,{justify:"flex-start"},(0,c.createElement)(ep,{icon:n}),(0,c.createElement)(m.FlexItem,null,t)))}function uI({topLevelLockedBlock:e}){const t=(0,f.useSelect)((t=>{const{getClientIdsOfDescendants:n,getBlockName:o,getBlockEditingMode:r}=t(Jo);return n(e).filter((e=>"core/list-item"!==o(e)&&"contentOnly"===r(e)))}),[e]),n=Iy(e);return(0,c.createElement)("div",{className:"block-editor-block-inspector"},(0,c.createElement)(tp,{...n,className:n.isSynced&&"is-synced"}),(0,c.createElement)(dC,{blockClientId:e}),(0,c.createElement)(aI.Slot,null),(0,c.createElement)(m.PanelBody,{title:(0,v.__)("Content")},(0,c.createElement)(sI,{clientIds:t})))}const dI=({animate:e,wrapper:t,children:n})=>e?t(n):n,pI=({blockInspectorAnimationSettings:e,selectedBlockClientId:t,children:n})=>{const o=e&&"leftToRight"===e.enterDirection?-50:50;return(0,c.createElement)(m.__unstableMotion.div,{animate:{x:0,opacity:1,transition:{ease:"easeInOut",duration:.14}},initial:{x:o,opacity:0},key:t},n)},mI=({clientId:e,blockName:t})=>{const n=nI(t),o=n?.length>1,r=(0,f.useSelect)((e=>{const{getBlockStyles:n}=e(a.store),o=n(t);return o&&o.length>0}),[t]),l=Iy(e);return(0,c.createElement)("div",{className:"block-editor-block-inspector"},(0,c.createElement)(tp,{...l,className:l.isSynced&&"is-synced"}),(0,c.createElement)(dC,{blockClientId:e}),(0,c.createElement)(aI.Slot,null),o&&(0,c.createElement)(eI,{hasBlockStyles:r,clientId:e,blockName:t,tabs:n}),!o&&(0,c.createElement)(c.Fragment,null,r&&(0,c.createElement)("div",null,(0,c.createElement)(m.PanelBody,{title:(0,v.__)("Styles")},(0,c.createElement)($w,{clientId:e}),(0,a.hasBlockSupport)(t,"defaultStylePicker",!0)&&(0,c.createElement)(VB,{blockName:t}))),(0,c.createElement)(la.Slot,null),(0,c.createElement)(la.Slot,{group:"list"}),(0,c.createElement)(la.Slot,{group:"color",label:(0,v.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,c.createElement)(la.Slot,{group:"typography",label:(0,v.__)("Typography")}),(0,c.createElement)(la.Slot,{group:"dimensions",label:(0,v.__)("Dimensions")}),(0,c.createElement)(la.Slot,{group:"border",label:(0,v.__)("Border")}),(0,c.createElement)(la.Slot,{group:"styles"}),(0,c.createElement)(la.Slot,{group:"background",label:(0,v.__)("Background")}),(0,c.createElement)(KB,null),(0,c.createElement)("div",null,(0,c.createElement)(jB,null))),(0,c.createElement)(AB,{key:"back"}))};var fI=({showNoBlockSelectedMessage:e=!0})=>{const{count:t,selectedBlockName:n,selectedBlockClientId:o,blockType:r,topLevelLockedBlock:l}=(0,f.useSelect)((e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:o,__unstableGetContentLockingParent:r,getTemplateLock:l}=e(Jo),i=t(),s=i&&o(i),c=s&&(0,a.getBlockType)(s);return{count:n(),selectedBlockClientId:i,selectedBlockName:s,blockType:c,topLevelLockedBlock:r(i)||("contentOnly"===l(i)?i:void 0)}}),[]),i=nI(r?.name),s=i?.length>1,u=function(e,t){return(0,f.useSelect)((t=>{if(e){const n=t(Jo).getSettings().blockInspectorAnimation,o=n?.animationParent,{getSelectedBlockClientId:r,getBlockParentsByBlockName:l}=t(Jo);return l(r(),o,!0)[0]||e.name===o?n?.[e.name]:null}return null}),[t,e])}(r,o);if(t>1)return(0,c.createElement)("div",{className:"block-editor-block-inspector"},(0,c.createElement)(zB,null),s?(0,c.createElement)(eI,{tabs:i}):(0,c.createElement)(c.Fragment,null,(0,c.createElement)(la.Slot,null),(0,c.createElement)(la.Slot,{group:"color",label:(0,v.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,c.createElement)(la.Slot,{group:"typography",label:(0,v.__)("Typography")}),(0,c.createElement)(la.Slot,{group:"dimensions",label:(0,v.__)("Dimensions")}),(0,c.createElement)(la.Slot,{group:"border",label:(0,v.__)("Border")}),(0,c.createElement)(la.Slot,{group:"styles"})));const d=n===(0,a.getUnregisteredTypeHandlerName)();return r&&o&&!d?l?(0,c.createElement)(uI,{topLevelLockedBlock:l}):(0,c.createElement)(dI,{animate:u,wrapper:e=>(0,c.createElement)(pI,{blockInspectorAnimationSettings:u,selectedBlockClientId:o},e)},(0,c.createElement)(mI,{clientId:o,blockName:r.name})):e?(0,c.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},(0,v.__)("No block selected.")):null};var gI=function({clientIds:e,hideDragHandle:t}){const{canMove:n,rootClientId:o,isFirst:r,isLast:l,orientation:i}=(0,f.useSelect)((t=>{const{getBlockIndex:n,getBlockListSettings:o,canMoveBlocks:r,getBlockOrder:l,getBlockRootClientId:i}=t(Jo),a=Array.isArray(e)?e:[e],s=a[0],c=i(s),u=n(s),d=n(a[a.length-1]),p=l(c);return{canMove:r(e,c),rootClientId:c,isFirst:0===u,isLast:d===p.length-1,orientation:o(c)?.orientation}}),[e]);if(!n||r&&l&&!o)return null;const a=(0,v.__)("Drag");return(0,c.createElement)(m.ToolbarGroup,{className:d()("block-editor-block-mover",{"is-horizontal":"horizontal"===i})},!t&&(0,c.createElement)(WS,{clientIds:e},(e=>(0,c.createElement)(m.Button,{icon:Fm,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:a,tabIndex:"-1",...e}))),(0,c.createElement)("div",{className:"block-editor-block-mover__move-button-container"},(0,c.createElement)(m.ToolbarItem,null,(t=>(0,c.createElement)(OS,{clientIds:e,...t}))),(0,c.createElement)(m.ToolbarItem,null,(t=>(0,c.createElement)(zS,{clientIds:e,...t})))))};var hI=function({clientIds:e,...t}){return(0,c.createElement)(m.ToolbarGroup,null,(0,c.createElement)(m.ToolbarItem,null,(n=>(0,c.createElement)(Nw,{clientIds:e,toggleProps:n,...t}))))};function bI(){const{selectBlock:e}=(0,f.useDispatch)(Jo),{firstParentClientId:t,isVisible:n}=(0,f.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:o,getBlockEditingMode:r}=e(Jo),{hasBlockSupport:l}=e(a.store),i=n(o()),s=i[i.length-1],c=t(s),u=(0,a.getBlockType)(c);return{firstParentClientId:s,isVisible:s&&"default"===r(s)&&l(u,"__experimentalParentSelector",!0)}}),[]),o=Iy(t),r=(0,c.useRef)(),l=Iw({ref:r,highlightParent:!0});return n?(0,c.createElement)("div",{className:"block-editor-block-parent-selector",key:t,ref:r,...l},(0,c.createElement)(m.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(t),label:(0,v.sprintf)((0,v.__)("Select %s"),o?.title),showTooltip:!0,icon:(0,c.createElement)(ep,{icon:o?.icon})})):null}function vI({blocks:e}){return(0,c.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,c.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,c.createElement)(m.Popover,{className:"block-editor-block-switcher__preview__popover",placement:"bottom-start",focusOnMount:!1},(0,c.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,c.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,v.__)("Preview")),(0,c.createElement)(Am,{viewportWidth:500,blocks:e})))))}const _I={};function kI({item:e,onSelect:t,setHoveredTransformItemName:n}){const{name:o,icon:r,title:l}=e;return(0,c.createElement)(m.MenuItem,{className:(0,a.getBlockMenuDefaultClassName)(o),onClick:e=>{e.preventDefault(),t(o)},onMouseLeave:()=>n(null),onMouseEnter:()=>n(o)},(0,c.createElement)(ep,{icon:r,showColors:!0}),l)}var yI=({transformations:e,onSelect:t,blocks:n})=>{const[o,r]=(0,c.useState)();return(0,c.createElement)(c.Fragment,null,o&&(0,c.createElement)(vI,{blocks:(0,a.cloneBlock)(n[0],e.find((({name:e})=>e===o)).attributes)}),e?.map((e=>(0,c.createElement)(kI,{key:e.name,item:e,onSelect:t,setHoveredTransformItemName:r}))))};function EI({restTransformations:e,onSelect:t,setHoveredTransformItemName:n}){return e.map((e=>(0,c.createElement)(SI,{key:e.name,item:e,onSelect:t,setHoveredTransformItemName:n})))}function SI({item:e,onSelect:t,setHoveredTransformItemName:n}){const{name:o,icon:r,title:l,isDisabled:i}=e;return(0,c.createElement)(m.MenuItem,{className:(0,a.getBlockMenuDefaultClassName)(o),onClick:e=>{e.preventDefault(),t(o)},disabled:i,onMouseLeave:()=>n(null),onMouseEnter:()=>n(o)},(0,c.createElement)(ep,{icon:r,showColors:!0}),l)}var wI=({className:e,possibleBlockTransformations:t,possibleBlockVariationTransformations:n,onSelect:o,onSelectVariation:r,blocks:l})=>{const[i,s]=(0,c.useState)(),{priorityTextTransformations:u,restTransformations:d}=function(e){const t={"core/paragraph":1,"core/heading":2,"core/list":3,"core/quote":4},n=(0,c.useMemo)((()=>{const n=Object.keys(t);return e.reduce(((e,t)=>{const{name:o}=t;return n.includes(o)?e.priorityTextTransformations.push(t):e.restTransformations.push(t),e}),{priorityTextTransformations:[],restTransformations:[]})}),[e]);return n.priorityTextTransformations.sort((({name:e},{name:n})=>t[e](0,c.createElement)(SI,{key:e.name,item:e,onSelect:o,setHoveredTransformItemName:s}))),!p&&f),!!p&&(0,c.createElement)(m.MenuGroup,{className:e},f))};const CI=()=>{};function xI({clientId:e,onSwitch:t=CI}){const{onSelect:n,stylesToRender:o,activeStyle:r}=Hw({clientId:e,onSwitch:t});return o&&0!==o.length?(0,c.createElement)(c.Fragment,null,o.map((e=>{const t=e.label||e.name;return(0,c.createElement)(m.MenuItem,{key:e.name,icon:r.name===e.name?gk:null,onClick:()=>n(e)},(0,c.createElement)(m.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0},t))}))):null}function BI({hoveredBlock:e,onSwitch:t}){const{clientId:n}=e;return(0,c.createElement)(m.MenuGroup,{label:(0,v.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},(0,c.createElement)(xI,{clientId:n,onSwitch:t}))}const II=(e,t,n=new Set)=>{const{clientId:o,name:r,innerBlocks:l=[]}=e;if(!n.has(o)){if(r===t)return e;for(const e of l){const o=II(e,t,n);if(o)return o}}},TI=(e,t)=>{const n=((e,t)=>{const n=(0,a.__experimentalGetBlockAttributesNamesByRole)(e,"content");return n?.length?n.reduce(((e,n)=>(t[n]&&(e[n]=t[n]),e)),{}):t})(t.name,t.attributes);e.attributes={...e.attributes,...n}};var MI=(e,t)=>(0,c.useMemo)((()=>e.reduce(((e,n)=>{const o=((e,t)=>{const n=t.map((e=>(0,a.cloneBlock)(e))),o=new Set;for(const t of e){let e=!1;for(const r of n){const n=II(r,t.name,o);if(n){e=!0,o.add(n.clientId),TI(n,t);break}}if(!e)return}return n})(t,n.blocks);return o&&e.push({...n,transformedBlocks:o}),e}),[])),[e,t]);function PI({patterns:e,onSelect:t}){return(0,c.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,c.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,c.createElement)(m.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right"},(0,c.createElement)("div",{className:"block-editor-block-switcher__preview is-pattern-list-preview"},(0,c.createElement)(NI,{patterns:e,onSelect:t})))))}function NI({patterns:e,onSelect:t}){const n=(0,m.__unstableUseCompositeState)();return(0,c.createElement)(m.__unstableComposite,{...n,role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,v.__)("Patterns list")},e.map((e=>(0,c.createElement)(LI,{key:e.name,pattern:e,onSelect:t,composite:n}))))}function LI({pattern:e,onSelect:t,composite:n}){const o="block-editor-block-switcher__preview-patterns-container",r=(0,p.useInstanceId)(LI,`${o}-list__item-description`);return(0,c.createElement)("div",{className:`${o}-list__list-item`},(0,c.createElement)(m.__unstableCompositeItem,{role:"option",as:"div",...n,"aria-label":e.title,"aria-describedby":e.description?r:void 0,className:`${o}-list__item`,onClick:()=>t(e.transformedBlocks)},(0,c.createElement)(Am,{blocks:e.transformedBlocks,viewportWidth:e.viewportWidth||500}),(0,c.createElement)("div",{className:`${o}-list__item-title`},e.title)),!!e.description&&(0,c.createElement)(m.VisuallyHidden,{id:r},e.description))}var RI=function({blocks:e,patterns:t,onSelect:n}){const[o,r]=(0,c.useState)(!1),l=MI(t,e);return l.length?(0,c.createElement)(m.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},o&&(0,c.createElement)(PI,{patterns:l,onSelect:n}),(0,c.createElement)(m.MenuItem,{onClick:e=>{e.preventDefault(),r(!o)},icon:Xd},(0,v.__)("Patterns"))):null};const AI=({clientIds:e,blocks:t})=>{const{replaceBlocks:n,multiSelect:o,updateBlockAttributes:r}=(0,f.useDispatch)(Jo),l=Iy(t[0].clientId),{possibleBlockTransformations:i,canRemove:s,hasBlockStyles:u,icon:d,patterns:p}=(0,f.useSelect)((n=>{const{getBlockRootClientId:o,getBlockTransformItems:r,__experimentalGetPatternTransformItems:i,canRemoveBlocks:s}=n(Jo),{getBlockStyles:c,getBlockType:u}=n(a.store),d=o(Array.isArray(e)?e[0]:e),[{name:p}]=t,m=1===t.length,f=m&&c(p);let g;if(m)g=l?.icon;else{g=1===new Set(t.map((({name:e})=>e))).size?u(p)?.icon:OB}return{possibleBlockTransformations:r(t,d),canRemove:s(e,d),hasBlockStyles:!!f?.length,icon:g,patterns:i(t,d)}}),[e,t,l?.icon]),g=function({clientIds:e,blocks:t}){const{activeBlockVariation:n,blockVariationTransformations:o}=(0,f.useSelect)((n=>{const{getBlockRootClientId:o,getBlockAttributes:r,canRemoveBlocks:l}=n(Jo),{getActiveBlockVariation:i,getBlockVariations:s}=n(a.store),c=o(Array.isArray(e)?e[0]:e),u=l(e,c);if(1!==t.length||!u)return _I;const[d]=t;return{blockVariationTransformations:s(d.name,"transform"),activeBlockVariation:i(d.name,r(d.clientId))}}),[e,t]);return(0,c.useMemo)((()=>o?.filter((({name:e})=>e!==n?.name))),[o,n])}({clientIds:e,blocks:t}),h=cS({clientId:Array.isArray(e)?e[0]:e,maximumLength:35}),b=1===t.length&&(0,a.isReusableBlock)(t[0]),_=1===t.length&&(0,a.isTemplatePart)(t[0]);function k(e){e.length>1&&o(e[0].clientId,e[e.length-1].clientId)}const y=!!i.length&&s&&!_,E=!!g?.length,S=!!p?.length&&s;if(!u&&!y&&!E)return(0,c.createElement)(m.ToolbarGroup,null,(0,c.createElement)(m.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:h,icon:(0,c.createElement)(c.Fragment,null,(0,c.createElement)(ep,{icon:d,showColors:!0}),(b||_)&&(0,c.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},h))}));const w=h,C=1===t.length?(0,v.sprintf)((0,v.__)("%s: Change block type or style"),h):(0,v.sprintf)((0,v._n)("Change type of %d block","Change type of %d blocks",t.length),t.length),x=y||E,B=u||x||S;return(0,c.createElement)(m.ToolbarGroup,null,(0,c.createElement)(m.ToolbarItem,null,(o=>(0,c.createElement)(m.DropdownMenu,{className:"block-editor-block-switcher",label:w,popoverProps:{placement:"bottom-start",className:"block-editor-block-switcher__popover"},icon:(0,c.createElement)(c.Fragment,null,(0,c.createElement)(ep,{icon:d,className:"block-editor-block-switcher__toggle",showColors:!0}),(b||_)&&(0,c.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},h)),toggleProps:{describedBy:C,...o},menuProps:{orientation:"both"}},(({onClose:o})=>B&&(0,c.createElement)("div",{className:"block-editor-block-switcher__container"},S&&(0,c.createElement)(RI,{blocks:t,patterns:p,onSelect:t=>{!function(t){n(e,t),k(t)}(t),o()}}),x&&(0,c.createElement)(wI,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:i,possibleBlockVariationTransformations:g,blocks:t,onSelect:r=>{!function(o){const r=(0,a.switchToBlockType)(t,o);n(e,r),k(r)}(r),o()},onSelectVariation:e=>{!function(e){r(t[0].clientId,{...g.find((({name:t})=>t===e)).attributes})}(e),o()}}),u&&(0,c.createElement)(BI,{hoveredBlock:t[0],onSwitch:o})))))))};var DI=({clientIds:e})=>{const t=(0,f.useSelect)((t=>t(Jo).getBlocksByClientId(e)),[e]);return!t.length||t.some((e=>!e))?null:(0,c.createElement)(AI,{clientIds:e,blocks:t})};function OI({clientId:e,wrapperRef:t}){const{canEdit:n,canMove:o,canRemove:r,canLock:l}=Qy(e),[i,a]=(0,c.useReducer)((e=>!e),!1),s=(0,c.useRef)(null),u=(0,c.useRef)(!0),d=!l||n&&o&&r;return(0,c.useEffect)((()=>{u.current?u.current=!1:!i&&d&&da.focus.focusable.find(t.current,{sequential:!1}).find((e=>"BUTTON"===e.tagName&&e!==s.current))?.focus()}),[i,d,t]),d?null:(0,c.createElement)(c.Fragment,null,(0,c.createElement)(m.ToolbarGroup,{className:"block-editor-block-lock-toolbar"},(0,c.createElement)(m.ToolbarButton,{ref:s,icon:tE,label:(0,v.__)("Unlock"),onClick:a,"aria-expanded":i,"aria-haspopup":"dialog"})),i&&(0,c.createElement)(rE,{clientId:e,onClose:a}))}var zI=(0,c.createElement)(F.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,c.createElement)(F.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"}));var VI=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M4 6.5h5a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H4V16h5a.5.5 0 0 0 .5-.5v-7A.5.5 0 0 0 9 8H4V6.5Zm16 0h-5a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h5V16h-5a.5.5 0 0 1-.5-.5v-7A.5.5 0 0 1 15 8h5V6.5Z"}));var FI=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M17.5 4v5a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V4H8v5a.5.5 0 0 0 .5.5h7A.5.5 0 0 0 16 9V4h1.5Zm0 16v-5a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v5H8v-5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v5h1.5Z"}));const HI={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"}};var GI=function(){const{blocksSelection:e,clientIds:t,groupingBlockName:n,isGroupable:o}=Yy(),{replaceBlocks:r}=(0,f.useDispatch)(Jo),{canRemove:l,variations:i}=(0,f.useSelect)((e=>{const{canRemoveBlocks:o}=e(Jo),{getBlockVariations:r}=e(a.store);return{canRemove:o(t),variations:r(n,"transform")}}),[t,n]),s=o=>{const l=(0,a.switchToBlockType)(e,n);"string"!=typeof o&&(o="group"),l&&l.length>0&&(l[0].attributes.layout=HI[o],r(t,l))};if(!o||!l)return null;const u=!!i.find((({name:e})=>"group-row"===e)),d=!!i.find((({name:e})=>"group-stack"===e));return(0,c.createElement)(m.ToolbarGroup,null,(0,c.createElement)(m.ToolbarButton,{icon:zI,label:(0,v._x)("Group","verb"),onClick:s}),u&&(0,c.createElement)(m.ToolbarButton,{icon:VI,label:(0,v._x)("Row","single horizontal line"),onClick:()=>s("row")}),d&&(0,c.createElement)(m.ToolbarButton,{icon:FI,label:(0,v._x)("Stack","verb"),onClick:()=>s("stack")}))};function UI({clientIds:e}){const t=1===e.length?e[0]:void 0,n=(0,f.useSelect)((e=>!!t&&"html"===e(Jo).getBlockMode(t)),[t]),{toggleBlockMode:o}=(0,f.useDispatch)(Jo);return n?(0,c.createElement)(m.ToolbarGroup,null,(0,c.createElement)(m.ToolbarButton,{onClick:()=>{o(t)}},(0,v.__)("Edit visually"))):null}var $I=({hideDragHandle:e})=>{const{blockClientIds:t,blockType:n,isValid:o,isVisual:r,blockEditingMode:l}=(0,f.useSelect)((e=>{const{getBlockName:t,getBlockMode:n,getSelectedBlockClientIds:o,isBlockValid:r,getBlockRootClientId:l,getBlockEditingMode:i}=e(Jo),s=o(),c=s[0],u=l(c);return{blockClientIds:s,blockType:c&&(0,a.getBlockType)(t(c)),rootClientId:u,isValid:s.every((e=>r(e))),isVisual:s.every((e=>"visual"===n(e))),blockEditingMode:i(c)}}),[]),i=(0,c.useRef)(null),s=(0,c.useRef)(),u=Iw({ref:s}),g=!(0,p.useViewportMatch)("medium","<");if(n&&!(0,a.hasBlockSupport)(n,"__experimentalToolbar",!0))return null;if(0===t.length)return null;const h=o&&r,b=t.length>1,v=(0,a.isReusableBlock)(n)||(0,a.isTemplatePart)(n),_=d()("block-editor-block-toolbar",{"is-synced":v});return(0,c.createElement)("div",{className:_,ref:i},!b&&g&&"default"===l&&(0,c.createElement)(bI,null),(h||b)&&"default"===l&&(0,c.createElement)("div",{ref:s,...u},(0,c.createElement)(m.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},(0,c.createElement)(DI,{clientIds:t}),!b&&(0,c.createElement)(OI,{clientId:t[0],wrapperRef:i}),(0,c.createElement)(gI,{clientIds:t,hideDragHandle:e}))),h&&b&&(0,c.createElement)(GI,null),h&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(dr.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,c.createElement)(dr.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,c.createElement)(dr.Slot,{className:"block-editor-block-toolbar__slot"}),(0,c.createElement)(dr.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,c.createElement)(dr.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,c.createElement)(TB.Provider,{value:n?.name},(0,c.createElement)(IB.Slot,null))),(0,c.createElement)(UI,{clientIds:t}),"default"===l&&(0,c.createElement)(hI,{clientIds:t}))};var jI=function({clientId:e,rootClientId:t}){const n=Iy(e),o=(0,f.useSelect)((n=>{const{getBlock:o,getBlockIndex:r,hasBlockMovingClientId:l,getBlockListSettings:i,__unstableGetEditorMode:a}=n(Jo),s=r(e),{name:c,attributes:u}=o(e);return{index:s,name:c,attributes:u,blockMovingMode:l(),orientation:i(t)?.orientation,editorMode:a()}}),[e,t]),{index:r,name:l,attributes:i,blockMovingMode:s,orientation:u,editorMode:p}=o,{setNavigationMode:g,removeBlock:h}=(0,f.useDispatch)(Jo),b=(0,c.useRef)(),_=(0,a.getBlockType)(l),k=(0,a.__experimentalGetAccessibleBlockLabel)(_,i,r+1,u);(0,c.useEffect)((()=>{b.current.focus(),(0,Ln.speak)(k)}),[k]);const y=zd(e),{hasBlockMovingClientId:E,getBlockIndex:S,getBlockRootClientId:w,getClientIdsOfDescendants:C,getSelectedBlockClientId:x,getMultiSelectedBlocksEndClientId:B,getPreviousBlockClientId:I,getNextBlockClientId:T}=(0,f.useSelect)(Jo),{selectBlock:M,clearSelectedBlock:P,setBlockMovingClientId:N,moveBlockToPosition:L}=(0,f.useDispatch)(Jo),R=d()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!s}),A=(0,v.__)("Drag");return(0,c.createElement)("div",{className:R},(0,c.createElement)(m.Flex,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},(0,c.createElement)(m.FlexItem,null,(0,c.createElement)(ep,{icon:n?.icon,showColors:!0})),(0,c.createElement)(m.FlexItem,null,"zoom-out"===p&&(0,c.createElement)(gI,{clientIds:[e],hideDragHandle:!0}),"navigation"===p&&(0,c.createElement)(WS,{clientIds:[e]},(e=>(0,c.createElement)(m.Button,{icon:Fm,className:"block-selection-button_drag-handle","aria-hidden":"true",label:A,tabIndex:"-1",...e})))),(0,c.createElement)(m.FlexItem,null,(0,c.createElement)(m.Button,{ref:b,onClick:"navigation"===p?()=>g(!1):void 0,onKeyDown:function(t){const{keyCode:n}=t,o=n===Pd.UP,r=n===Pd.DOWN,l=n===Pd.LEFT,i=n===Pd.RIGHT,a=n===Pd.TAB,s=n===Pd.ESCAPE,c=n===Pd.ENTER,u=n===Pd.SPACE,d=t.shiftKey;if(n===Pd.BACKSPACE||n===Pd.DELETE)return h(e),void t.preventDefault();const p=x(),m=B(),f=I(m||p),g=T(m||p),b=a&&d||o,v=a&&!d||r,_=l,k=i;let R;if(b)R=f;else if(v)R=g;else if(_){var A;R=null!==(A=w(p))&&void 0!==A?A:p}else if(k){var D;R=null!==(D=C(p)[0])&&void 0!==D?D:p}const O=E();if(s&&O&&!t.defaultPrevented&&(N(null),t.preventDefault()),(c||u)&&O){const e=w(O),t=w(p),n=S(O);let o=S(p);n{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientIds:o,getBlockEditingMode:r}=e(Jo),{getBlockType:l}=e(a.store),i=o(),s=i[0],c=n(s),u=c[c.length-1],d=l(t(u));return{selectedBlockClientId:s,blockType:s&&l(t(s)),blockEditingMode:r(s),hasParents:c.length,showParentSelector:d&&"default"===r(u)&&(0,a.hasBlockSupport)(d,"__experimentalParentSelector",!0)&&i.length<=1&&"default"===r(s)}}),[]);(0,c.useEffect)((()=>{r(!1)}),[_]);const k=(0,p.useViewportMatch)("large",">="),y=document.body.classList.contains("is-fullscreen-mode");(0,c.useLayoutEffect)((()=>{if(!t)return;const e=document.querySelector(".block-editor-block-contextual-toolbar");if(!e)return;if(!s)return void(e.style.width="initial");if(!k)return void(e.style={});if(o)return void(e.style.width="auto");const n=document.querySelector(".edit-post-header__settings, .edit-widgets-header__actions"),r=document.querySelector(".edit-site-header-edit-mode__end"),l=window.getComputedStyle(e),i=!!n&&window.getComputedStyle(n),a=!!r&&window.getComputedStyle(r),c=parseFloat(l.marginLeft),u=i?parseFloat(i.width):0,d=a?parseFloat(a.width):0;e.style.width=`calc(100% - ${d+u+c+(n||r?2:0)+(y?0:160)}px)`}),[t,k,o,y,s]);const E=!s||(0,a.hasBlockSupport)(s,"__experimentalToolbar",!0),S=function(){let e=!1;for(const t in g)qI(t)&&(e=!0);return e}();if(!E||"default"!==u&&!S)return null;const w=d()("block-editor-block-contextual-toolbar",{"has-parent":h&&b,"is-fixed":t,"is-collapsed":o});return(0,c.createElement)(kx,{focusOnMount:e,className:w,"aria-label":(0,v.__)("Block tools"),...n},!o&&(0,c.createElement)($I,{hideDragHandle:t}),t&&i&&s&&(0,c.createElement)(m.ToolbarGroup,{className:o?"block-editor-block-toolbar__group-expand-fixed-toolbar":"block-editor-block-toolbar__group-collapse-fixed-toolbar"},(0,c.createElement)(m.ToolbarItem,{as:m.ToolbarButton,ref:l,icon:o?WI:KI,onClick:()=>{r((e=>!e)),l.current.focus()},label:o?(0,v.__)("Show block tools"):(0,v.__)("Hide block tools")})))};const YI={placement:"top-start"},XI={...YI,flip:!1,shift:!0},QI={...YI,flip:!0,shift:!1};function JI(e,t,n,o,r){if(!e||!t)return XI;const l=n?.scrollTop||0,i=t.getBoundingClientRect(),a=l+e.getBoundingClientRect().top,s=e.ownerDocument.documentElement.clientHeight,c=a+o,u=i.top>c,d=i.height>s-o;return r||!u&&!d?QI:XI}function eT(){const e=(0,p.useViewportMatch)("medium"),{shouldShowContextualToolbar:t,canFocusHiddenToolbar:n,fixedToolbarCanBeFocused:o}=(0,f.useSelect)((t=>{const{__unstableGetEditorMode:n,isMultiSelecting:o,isTyping:r,isBlockInterfaceHidden:l,getBlock:i,getSettings:s,isNavigationMode:c,getSelectedBlockClientId:u,getFirstMultiSelectedBlockClientId:d}=Xo(t(Jo)),p="edit"===n(),m=s().hasFixedToolbar,f=s().isDistractionFree,g=d()||u(),h=!!g,b=(0,a.isUnmodifiedDefaultBlock)(i(g)||{}),v=p&&!m&&(!f||c())&&e&&!o()&&!r()&&h&&!b&&!l();return{shouldShowContextualToolbar:v,canFocusHiddenToolbar:p&&h&&!v&&!m&&!f&&!b,fixedToolbarCanBeFocused:(m||!e)&&g}}),[e]);return{shouldShowContextualToolbar:t,canFocusHiddenToolbar:n,fixedToolbarCanBeFocused:o}}function tT(e){const{__unstableGetEditorMode:t,hasMultiSelection:n,isTyping:o,getLastMultiSelectedBlockClientId:r}=e(Jo);return{editorMode:t(),hasMultiSelection:n(),isTyping:o(),lastClientId:n()?r():null}}function nT({clientId:e,rootClientId:t,isEmptyDefaultBlock:n,capturingClientId:o,__unstablePopoverSlot:r,__unstableContentRef:l}){const{editorMode:i,hasMultiSelection:a,isTyping:s,lastClientId:u}=(0,f.useSelect)(tT,[]),m=(0,f.useSelect)((t=>{const{isBlockInsertionPointVisible:n,getBlockInsertionPoint:o,getBlockOrder:r}=t(Jo);if(!n())return!1;const l=o();return r(l.rootClientId)[l.index]===e}),[e]),g=(0,c.useRef)(!1),{shouldShowContextualToolbar:h,canFocusHiddenToolbar:b}=eT(),{stopTyping:v}=(0,f.useDispatch)(Jo),_=!s&&"edit"===i&&n,k=!a&&("navigation"===i||"zoom-out"===i);(0,lp.useShortcut)("core/block-editor/focus-toolbar",(()=>{g.current=!0,v(!0)}),{isDisabled:!b}),(0,c.useEffect)((()=>{g.current=!1}));const y=(0,c.useRef)();(0,c.useEffect)((()=>{y.current=void 0}),[e]);const E=function({contentElement:e,clientId:t}){const n=zd(t),[o,r]=(0,c.useState)(0),{blockIndex:l,isSticky:i}=(0,f.useSelect)((e=>{const{getBlockIndex:n,getBlockAttributes:o}=e(Jo);return{blockIndex:n(t),isSticky:Oy(o(t))}}),[t]),a=(0,c.useMemo)((()=>{if(e)return(0,da.getScrollContainer)(e)}),[e]),[s,u]=(0,c.useState)((()=>JI(e,n,a,o,i))),d=(0,p.useRefEffect)((e=>{r(e.offsetHeight)}),[]),m=(0,c.useCallback)((()=>u(JI(e,n,a,o,i))),[e,n,a,o]);return(0,c.useLayoutEffect)(m,[l,m]),(0,c.useLayoutEffect)((()=>{if(!e||!n)return;const t=e?.ownerDocument?.defaultView;let o;t?.addEventHandler?.("resize",m);const r=n?.ownerDocument?.defaultView;return r.ResizeObserver&&(o=new r.ResizeObserver(m),o.observe(n)),()=>{t?.removeEventHandler?.("resize",m),o&&o.disconnect()}}),[m,e,n]),{...s,ref:d}}({contentElement:l?.current,clientId:e});return _?(0,c.createElement)(Vg,{clientId:o||e,__unstableCoverTarget:!0,bottomClientId:u,className:d()("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":m}),__unstablePopoverSlot:r,__unstableContentRef:l,resize:!1,shift:!1,...E},(0,c.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},(0,c.createElement)(Ig,{position:"bottom right",rootClientId:t,clientId:e,__experimentalIsQuick:!0}))):k||h?(0,c.createElement)(Vg,{clientId:o||e,bottomClientId:u,className:d()("block-editor-block-list__block-popover",{"is-insertion-point-visible":m}),__unstablePopoverSlot:r,__unstableContentRef:l,resize:!1,...E},h&&(0,c.createElement)(ZI,{focusOnMount:g.current,__experimentalInitialIndex:y.current,__experimentalOnIndexChange:e=>{y.current=e},key:e}),k&&(0,c.createElement)(jI,{clientId:e,rootClientId:t})):null}function oT(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlockRootClientId:o,getBlock:r,getBlockParents:l,__experimentalGetBlockListSettingsForBlocks:i}=e(Jo),s=t()||n();if(!s)return;const{name:c,attributes:u={}}=r(s)||{},d=l(s),p=i(d),m=d.find((e=>p[e]?.__experimentalCaptureToolbars));return{clientId:s,rootClientId:o(s),name:c,isEmptyDefaultBlock:c&&(0,a.isUnmodifiedDefaultBlock)({name:c,attributes:u}),capturingClientId:m}}function rT({__unstablePopoverSlot:e,__unstableContentRef:t}){const n=(0,f.useSelect)(oT,[]);if(!n)return null;const{clientId:o,rootClientId:r,name:l,isEmptyDefaultBlock:i,capturingClientId:a}=n;return l?(0,c.createElement)(nT,{clientId:o,rootClientId:r,isEmptyDefaultBlock:i,capturingClientId:a,__unstablePopoverSlot:e,__unstableContentRef:t}):null}var lT=function({__unstableContentRef:e}){const[t,n]=(0,c.useState)(!1),o=(0,f.useSelect)((e=>e(Jo).getBlockOrder()),[]);return(0,c.useEffect)((()=>{const e=setTimeout((()=>{n(!0)}),500);return()=>{clearTimeout(e)}}),[]),t?o.map(((t,n)=>n===o.length-1?null:(0,c.createElement)(Og,{key:t,previousClientId:t,nextClientId:o[n+1],__unstableContentRef:e},(0,c.createElement)("div",{className:"block-editor-block-list__insertion-point-inserter is-with-inserter"},(0,c.createElement)(Ig,{position:"bottom center",clientId:o[n+1],__experimentalIsQuick:!0}))))):null};function iT(e){const{__unstableGetEditorMode:t,getSettings:n,isTyping:o}=e(Jo);return{isZoomOutMode:"zoom-out"===t(),hasFixedToolbar:n().hasFixedToolbar,isTyping:o()}}function aT({children:e,__unstableContentRef:t,...n}){const o=(0,p.useViewportMatch)("medium"),{hasFixedToolbar:r,isZoomOutMode:l,isTyping:i}=(0,f.useSelect)(iT,[]),a=(0,lp.__unstableUseShortcutEventMatch)(),{getSelectedBlockClientIds:s,getBlockRootClientId:u}=(0,f.useSelect)(Jo),{duplicateBlocks:d,removeBlocks:g,insertAfterBlock:h,insertBeforeBlock:b,clearSelectedBlock:v,selectBlock:_,moveBlocksUp:k,moveBlocksDown:y}=(0,f.useDispatch)(Jo);const E=Ag(t),S=Ag(t);return(0,c.createElement)("div",{...n,onKeyDown:function(e){if(!e.defaultPrevented)if(a("core/block-editor/move-up",e)){const t=s();if(t.length){e.preventDefault();const n=u(t[0]);k(t,n)}}else if(a("core/block-editor/move-down",e)){const t=s();if(t.length){e.preventDefault();const n=u(t[0]);y(t,n)}}else if(a("core/block-editor/duplicate",e)){const t=s();t.length&&(e.preventDefault(),d(t))}else if(a("core/block-editor/remove",e)){const t=s();t.length&&(e.preventDefault(),g(t))}else if(a("core/block-editor/insert-after",e)){const t=s();t.length&&(e.preventDefault(),h(t[t.length-1]))}else if(a("core/block-editor/insert-before",e)){const t=s();t.length&&(e.preventDefault(),b(t[0]))}else if(a("core/block-editor/unselect",e)){const n=s();n.length&&(e.preventDefault(),n.length>1?_(n[0]):v(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges(),t?.current.focus())}}},(0,c.createElement)(Gg.Provider,{value:(0,c.useRef)(!1)},!i&&(0,c.createElement)($g,{__unstableContentRef:t}),!l&&(r||!o)&&(0,c.createElement)(ZI,{isFixed:!0}),(0,c.createElement)(rT,{__unstableContentRef:t}),(0,c.createElement)(m.Popover.Slot,{name:"block-toolbar",ref:E}),e,(0,c.createElement)(m.Popover.Slot,{name:"__unstable-block-tools-after",ref:S}),l&&(0,c.createElement)(lT,{__unstableContentRef:t})))}const sT=()=>{};var cT=(0,c.forwardRef)((function({rootClientId:e,clientId:t,isAppender:n,showInserterHelpPanel:o,showMostUsedBlocks:r=!1,__experimentalInsertionIndex:l,__experimentalFilterValue:i,onSelect:a=sT,shouldFocusBlock:s=!1},u){const{destinationRootClientId:d,prioritizePatterns:p}=(0,f.useSelect)((n=>{const{getBlockRootClientId:o,getSettings:r}=n(Jo),l=e||o(t)||void 0;return{destinationRootClientId:l,prioritizePatterns:r().__experimentalPreferPatternsOnRoot&&!l}}),[t,e]);return(0,c.createElement)(Sg,{onSelect:a,rootClientId:d,clientId:t,isAppender:n,showInserterHelpPanel:o,showMostUsedBlocks:r,__experimentalInsertionIndex:l,__experimentalFilterValue:i,shouldFocusBlock:s,prioritizePatterns:p,ref:u})}));function uT(){return $()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}const dT=-1!==window.navigator.userAgent.indexOf("Trident"),pT=new Set([Pd.UP,Pd.DOWN,Pd.LEFT,Pd.RIGHT]),mT=.75;function fT(){const e=(0,f.useSelect)((e=>e(Jo).hasSelectedBlock()),[]);return(0,p.useRefEffect)((t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:o}=n;let r,l,i;function a(){r||(r=o.requestAnimationFrame((()=>{p(),r=null})))}function s(e){l&&o.cancelAnimationFrame(l),l=o.requestAnimationFrame((()=>{c(e),l=null}))}function c({keyCode:e}){if(!m())return;const r=(0,da.computeCaretRect)(o);if(!r)return;if(!i)return void(i=r);if(pT.has(e))return void(i=r);const l=r.top-i.top;if(0===l)return;const a=(0,da.getScrollContainer)(t);if(!a)return;const s=a===n.body||a===n.documentElement,c=s?o.scrollY:a.scrollTop,u=s?0:a.getBoundingClientRect().top,d=s?i.top/o.innerHeight:(i.top-u)/(o.innerHeight-u);if(0===c&&du+p||i.top{o.removeEventListener("scroll",a,!0),o.removeEventListener("resize",a,!0),t.removeEventListener("keydown",s),t.removeEventListener("keyup",c),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),n.removeEventListener("selectionchange",d),o.cancelAnimationFrame(r),o.cancelAnimationFrame(l)}}),[e])}var gT=dT?e=>e.children:function({children:e}){return(0,c.createElement)("div",{ref:fT(),className:"block-editor__typewriter"},e)};const hT=(0,c.createContext)({});function bT({children:e,uniqueId:t,blockName:n=""}){const o=(0,c.useContext)(hT),{name:r}=rr();n=n||r;const l=(0,c.useMemo)((()=>function(e,t,n){const o={...e,[t]:e[t]?new Set(e[t]):new Set};return o[t].add(n),o}(o,n,t)),[o,n,t]);return(0,c.createElement)(hT.Provider,{value:l},e)}function vT(e,t=""){const n=(0,c.useContext)(hT),{name:o}=rr();return t=t||o,Boolean(n[t]?.has(e))}var _T=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));function kT({title:e,help:t,actions:n=[],onClose:o}){return(0,c.createElement)(m.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4},(0,c.createElement)(m.__experimentalHStack,{alignment:"center"},(0,c.createElement)(m.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13},e),(0,c.createElement)(m.__experimentalSpacer,null),n.map((({label:e,icon:t,onClick:n})=>(0,c.createElement)(m.Button,{key:e,className:"block-editor-inspector-popover-header__action",label:e,icon:t,variant:!t&&"tertiary",onClick:n},!t&&e))),o&&(0,c.createElement)(m.Button,{className:"block-editor-inspector-popover-header__action",label:(0,v.__)("Close"),icon:_T,onClick:o})),t&&(0,c.createElement)(m.__experimentalText,null,t))}var yT=(0,c.forwardRef)((function({onClose:e,onChange:t,...n},o){return(0,c.createElement)("div",{ref:o,className:"block-editor-publish-date-time-picker"},(0,c.createElement)(kT,{title:(0,v.__)("Publish"),actions:[{label:(0,v.__)("Now"),onClick:()=>t?.(null)}],onClose:e}),(0,c.createElement)(m.DateTimePicker,{startOfWeek:(0,gC.getSettings)().l10n.startOfWeek,onChange:t,...n}))})),ET=window.wp.commands;var ST=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M20 5h-5.7c0-1.3-1-2.3-2.3-2.3S9.7 3.7 9.7 5H4v2h1.5v.3l1.7 11.1c.1 1 1 1.7 2 1.7h5.7c1 0 1.8-.7 2-1.7l1.7-11.1V7H20V5zm-3.2 2l-1.7 11.1c0 .1-.1.2-.3.2H9.1c-.1 0-.3-.1-.3-.2L7.2 7h9.6z"}));var wT=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M19.75 9c0-1.257-.565-2.197-1.39-2.858-.797-.64-1.827-1.017-2.815-1.247-1.802-.42-3.703-.403-4.383-.396L11 4.5V6l.177-.001c.696-.006 2.416-.02 4.028.356.887.207 1.67.518 2.216.957.52.416.829.945.829 1.688 0 .592-.167.966-.407 1.23-.255.281-.656.508-1.236.674-1.19.34-2.82.346-4.607.346h-.077c-1.692 0-3.527 0-4.942.404-.732.209-1.424.545-1.935 1.108-.526.579-.796 1.33-.796 2.238 0 1.257.565 2.197 1.39 2.858.797.64 1.827 1.017 2.815 1.247 1.802.42 3.703.403 4.383.396L13 19.5h.714V22L18 18.5 13.714 15v3H13l-.177.001c-.696.006-2.416.02-4.028-.356-.887-.207-1.67-.518-2.216-.957-.52-.416-.829-.945-.829-1.688 0-.592.167-.966.407-1.23.255-.281.656-.508 1.237-.674 1.189-.34 2.819-.346 4.606-.346h.077c1.692 0 3.527 0 4.941-.404.732-.209 1.425-.545 1.936-1.108.526-.579.796-1.33.796-2.238z"}));var CT=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7zm-5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h1V9H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-1h-1.5v1z"}));const xT=()=>{const{clientIds:e}=(0,f.useSelect)((e=>{const{getSelectedBlockClientIds:t}=e(Jo);return{clientIds:t()}}),[]),t=(0,f.useSelect)((t=>t(Jo).getBlocksByClientId(e)),[e]),{replaceBlocks:n,multiSelect:o}=(0,f.useDispatch)(Jo),{possibleBlockTransformations:r,canRemove:l}=(0,f.useSelect)((n=>{const{getBlockRootClientId:o,getBlockTransformItems:r,canRemoveBlocks:l}=n(Jo),i=o(Array.isArray(e)?e[0]:e);return{possibleBlockTransformations:r(t,i),canRemove:l(e,i)}}),[e,t]),i=1===t.length&&(0,a.isTemplatePart)(t[0]);function s(r){const l=(0,a.switchToBlockType)(t,r);var i;n(e,l),(i=l).length>1&&o(i[0].clientId,i[i.length-1].clientId)}const u=!!r.length&&l&&!i;if(!e||e.length<1||!u)return{isLoading:!1,commands:[]};const d=r.map((e=>{const{name:t,title:n,icon:o}=e;return{name:"core/block-editor/transform-to-"+t.replace("/","-"),label:(0,v.sprintf)((0,v.__)("Transform to %s"),n),icon:(0,c.createElement)(ep,{icon:o}),callback:({close:e})=>{s(t),e()}}}));return{isLoading:!1,commands:d}},BT=()=>{const{clientIds:e,isUngroupable:t,isGroupable:n}=(0,f.useSelect)((e=>{const{getSelectedBlockClientIds:t,isUngroupable:n,isGroupable:o}=e(Jo);return{clientIds:t(),isUngroupable:n(),isGroupable:o()}}),[]),{canInsertBlockType:o,getBlockRootClientId:r,getBlocksByClientId:l,canMoveBlocks:i,canRemoveBlocks:s,getBlockCount:c}=(0,f.useSelect)(Jo),{getDefaultBlockName:u,getGroupingBlockName:d}=(0,f.useSelect)(a.store),p=l(e),{removeBlocks:m,replaceBlocks:g,duplicateBlocks:h,insertAfterBlock:b,insertBeforeBlock:_,setBlockMovingClientId:k,setNavigationMode:y,selectBlock:E}=(0,f.useDispatch)(Jo),S=()=>{if(!p.length)return;const t=d(),n=(0,a.switchToBlockType)(p,t);n&&g(e,n)},w=()=>{if(!p.length)return;const t=p[0].innerBlocks;t.length&&g(e,t)};if(!e||e.length<1)return{isLoading:!1,commands:[]};const C=r(e[0]),x=o(u(),C),B=p.every((e=>!!e&&(0,a.hasBlockSupport)(e.name,"multiple",!0)&&o(e.name,C))),I=s(e,C),T=i(e,C)&&1!==c(C),M=[];return x&&M.push({name:"add-after",label:(0,v.__)("Add after"),callback:()=>{const t=Array.isArray(e)?e[e.length-1]:t;b(t)},icon:qd},{name:"add-before",label:(0,v.__)("Add before"),callback:()=>{const t=Array.isArray(e)?e[0]:t;_(t)},icon:qd}),I&&M.push({name:"remove",label:(0,v.__)("Delete"),callback:()=>m(e,!0),icon:ST}),B&&M.push({name:"duplicate",label:(0,v.__)("Duplicate"),callback:()=>h(e,!0),icon:OB}),T&&M.push({name:"move-to",label:(0,v.__)("Move to"),callback:()=>{y(!0),E(e[0]),k(e[0])},icon:wT}),t&&M.push({name:"ungroup",label:(0,v.__)("Ungroup"),callback:w,icon:CT}),n&&M.push({name:"Group",label:(0,v.__)("Group"),callback:S,icon:zI}),{isLoading:!1,commands:M.map((e=>({...e,name:"core/block-editor/action-"+e.name,callback:({close:t})=>{e.callback(),t()}})))}},IT=()=>{(0,ET.useCommandLoader)({name:"core/block-editor/blockTransforms",hook:xT}),(0,ET.useCommandLoader)({name:"core/block-editor/blockActions",hook:BT})},TT="isResuableBlocksrRenameHintVisible";function MT(){const e=(0,f.useSelect)((e=>{var t;return null===(t=e(Ch.store).get("core",TT))||void 0===t||t}),[]),t=(0,c.useRef)(),{set:n}=(0,f.useDispatch)(Ch.store);return e?(0,c.createElement)("div",{ref:t,className:"reusable-blocks-menu-items__rename-hint"},(0,c.createElement)("div",{className:"reusable-blocks-menu-items__rename-hint-content"},(0,v.__)("Reusable blocks are now synced patterns. A synced pattern will behave in exactly the same way as a reusable block.")),(0,c.createElement)(m.Button,{className:"reusable-blocks-menu-items__rename-hint-dismiss",icon:vB,iconSize:"16",label:(0,v.__)("Dismiss hint"),onClick:()=>{const e=da.focus.tabbable.findPrevious(t.current);e?.focus(),n("core",TT,!1)},showTooltip:!1})):null}const PT={button:"wp-element-button",caption:"wp-element-caption"},NT=e=>PT[e]?PT[e]:"";function LT(e,t){return Object.entries(t).every((([t,n])=>"object"==typeof n&&"object"==typeof e[t]?LT(e[t],n):e[t]===n))}const RT=(e,t)=>{if(!t||!e)return;const n=t.filter((({attributes:t})=>!(!t||!Object.keys(t).length)&<(e,t)));return 1===n.length?n[0]:void 0};function AT(e){const t=e?.trim().match(/^(0?[-.]?\d*\.?\d+)(r?e[m|x]|v[h|w|min|max]+|p[x|t|c]|[c|m]m|%|in|ch|Q|lh)$/);return isNaN(e)||isNaN(parseFloat(e))?t?{value:parseFloat(t[1])||t[1],unit:t[2]}:{value:e,unit:void 0}:{value:parseFloat(e),unit:"px"}}function DT(e){try{return Function(`'use strict'; return (${e})`)()}catch(e){return null}}function OT(e,t){const n=e.split(/[(),]/g).filter(Boolean),o=n.slice(1).map((e=>AT(FT(e,t)).value)).filter(Boolean);switch(n[0]){case"min":return Math.min(...o)+"px";case"max":return Math.max(...o)+"px";case"clamp":return 3!==o.length?null:o[1]o[2]?o[2]+"px":o[1]+"px";case"calc":return o[0]+"px"}}function zT(e){for(;;){const t=e,n=/(max|min|calc|clamp)\(([^()]*)\)/g.exec(e)||[];if(n[0]){const t=OT(n[0]);e=e.replace(n[0],t)}if(e===t||parseFloat(e))break}return AT(e)}function VT(e){for(let t=0;tr.height?r.width:r.height)*o,"%":("font"===r.type?r.fontSize:r.width)*o,ch:8,ex:7.15625,lh:r.lineHeight},i={in:n,cm:37.79527559055118,mm:3.7795275590551185,pt:1.3333333333333333,pc:16,px:1,Q:.9448818897637794};return l[e.unit]?(l[e.unit]*e.value).toFixed(0)+"px":i[e.unit]?(i[e.unit]*e.value).toFixed(0)+"px":null}(n,t)}const HT={};var GT=function(e,t={}){const n=e+function(e){let t="";e.hasOwnProperty("fontSize")&&(t=":"+e.width);e.hasOwnProperty("lineHeight")&&(t=":"+e.lineHeight);e.hasOwnProperty("width")&&(t=":"+e.width);e.hasOwnProperty("height")&&(t=":"+e.height);e.hasOwnProperty("type")&&(t=":"+e.type);return t}(t);return HT[n]||(HT[n]=FT(e,t)),HT[n]};const UT={__experimentalBorder:"border",color:"color",spacing:"spacing",typography:"typography"};function $T(e){const t="var:";if(e?.startsWith?.(t)){return`var(--wp--${e.slice(4).split("|").join("--")})`}return e}function jT(e={},t,n){let o=[];return Object.keys(e).forEach((r=>{const l=t+cl(r.replace("/","-")),i=e[r];if(i instanceof Object){const e=l+n;o=[...o,...jT(i,e,n)]}else o.push(`${l}: ${i}`)})),o}const WT=(e,t)=>{const n={};return Object.entries(e).forEach((([e,o])=>{if("root"===e||!t?.[e])return;const r="string"==typeof o;if(r||Object.entries(o).forEach((([o,r])=>{if("root"===o||!t?.[e][o])return;const l=KT({[e]:{[o]:t[e][o]}});n[r]=[...n[r]||[],...l],delete t[e][o]})),r||o.root){const l=r?o:o.root,i=KT({[e]:t[e]});n[l]=[...n[l]||[],...i],delete t[e]}})),n};function KT(e={},t="",n,o={},r=!0){const l=Ml===t,i=Object.entries(a.__EXPERIMENTAL_STYLE_PROPERTY).reduce(((t,[o,{value:r,properties:i,useEngine:a,rootOnly:s}])=>{if(s&&!l)return t;const c=r;if("elements"===c[0]||a)return t;const u=pl(e,c);if("--wp--style--root--padding"===o&&("string"==typeof u||!n))return t;if(i&&"string"!=typeof u)Object.entries(i).forEach((e=>{const[n,o]=e;if(!pl(u,[o],!1))return;const r=n.startsWith("--")?n:cl(n);t.push(`${r}: ${$T(pl(u,[o]))}`)}));else if(pl(e,c,!1)){const n=o.startsWith("--")?o:cl(o);t.push(`${n}: ${$T(pl(e,c))}`)}return t}),[]);return(0,ui.getCSSRules)(e).forEach((e=>{if(l&&(n||!r)&&e.key.startsWith("padding"))return;const t=e.key.startsWith("--")?e.key:cl(e.key);let a=e.value;if("string"!=typeof a&&a?.ref){const e=a.ref.split(".");if(a=pl(o,e),!a||a?.ref)return}"font-size"===t&&(a=Bl({size:a},Tl(o?.settings))),i.push(`${t}: ${a}`)})),i}function qT({layoutDefinitions:e=_r,style:t,selector:n,hasBlockGapSupport:o,hasFallbackGapSupport:r,fallbackGapValue:l}){let i="",a=o?Hr(t?.spacing?.blockGap):"";if(r&&(n===Ml?a=a||"0.5em":!o&&l&&(a=l)),a&&e&&(Object.values(e).forEach((({className:e,name:t,spacingStyles:r})=>{(o||"flex"===t||"grid"===t)&&r?.length&&r.forEach((t=>{const r=[];if(t.rules&&Object.entries(t.rules).forEach((([e,t])=>{r.push(`${e}: ${t||a}`)})),r.length){let l="";l=o?n===Ml?`:where(${n} .${e})${t?.selector||""}`:`${n}-${e}${t?.selector||""}`:n===Ml?`:where(.${e}${t?.selector||""})`:`:where(${n}.${e}${t?.selector||""})`,i+=`${l} { ${r.join("; ")}; }`}}))})),n===Ml&&o&&(i+=`${n} { --wp--style--block-gap: ${a}; }`)),n===Ml&&e){const t=["block","flex","grid"];Object.values(e).forEach((({className:e,displayMode:o,baseStyles:r})=>{o&&t.includes(o)&&(i+=`${n} .${e} { display:${o}; }`),r?.length&&r.forEach((t=>{const o=[];if(t.rules&&Object.entries(t.rules).forEach((([e,t])=>{o.push(`${e}: ${t}`)})),o.length){i+=`${`${n} .${e}${t?.selector||""}`} { ${o.join("; ")}; }`}}))}))}return i}const ZT=["border","color","dimensions","spacing","typography","filter","outline","shadow"];function YT(e){if(!e)return{};const t=Object.entries(e).filter((([e])=>ZT.includes(e))).map((([e,t])=>[e,JSON.parse(JSON.stringify(t))]));return Object.fromEntries(t)}const XT=(e,t)=>{var n;const o=[];if(!e?.settings)return o;const r=e=>{let t={};return Pl.forEach((({path:n})=>{const o=pl(e,n,!1);!1!==o&&(t=dl(t,n,o))})),t},l=r(e.settings),i=e.settings?.custom;return(Object.keys(l).length>0||i)&&o.push({presets:l,custom:i,selector:Ml}),Object.entries(null!==(n=e.settings?.blocks)&&void 0!==n?n:{}).forEach((([e,n])=>{const l=r(n),i=n.custom;(Object.keys(l).length>0||i)&&o.push({presets:l,custom:i,selector:t[e]?.selector})})),o},QT=(e,t)=>{const n=XT(e,t);let o="";return n.forEach((({presets:t,custom:n,selector:r})=>{const l=function(e={},t){return Pl.reduce(((n,{path:o,valueKey:r,valueFunc:l,cssVarInfix:i})=>{const a=pl(e,o,[]);return["default","theme","custom"].forEach((e=>{a[e]&&a[e].forEach((e=>{r&&!l?n.push(`--wp--preset--${i}--${cl(e.slug)}: ${e[r]}`):l&&"function"==typeof l&&n.push(`--wp--preset--${i}--${cl(e.slug)}: ${l(e,t)}`)}))})),n}),[])}(t,e?.settings),i=jT(n,"--wp--custom--","--");i.length>0&&l.push(...i),l.length>0&&(o+=`${r}{${l.join(";")};}`)})),o},JT=(e,t,n,o,r=!1,l=!0)=>{const i=((e,t)=>{var n;const o=[];if(!e?.styles)return o;const r=YT(e.styles);return r&&o.push({styles:r,selector:Ml}),Object.entries(a.__EXPERIMENTAL_ELEMENTS).forEach((([t,n])=>{e.styles?.elements?.[t]&&o.push({styles:e.styles?.elements?.[t],selector:n})})),Object.entries(null!==(n=e.styles?.blocks)&&void 0!==n?n:{}).forEach((([e,n])=>{var r;const l=YT(n);if(n?.variations){const e={};Object.keys(n.variations).forEach((t=>{e[t]=YT(n.variations[t])})),l.variations=e}l&&t?.[e]?.selector&&o.push({duotoneSelector:t[e].duotoneSelector,fallbackGapValue:t[e].fallbackGapValue,hasLayoutSupport:t[e].hasLayoutSupport,selector:t[e].selector,styles:l,featureSelectors:t[e].featureSelectors,styleVariationSelectors:t[e].styleVariationSelectors}),Object.entries(null!==(r=n?.elements)&&void 0!==r?r:{}).forEach((([n,r])=>{r&&t?.[e]&&a.__EXPERIMENTAL_ELEMENTS[n]&&o.push({styles:r,selector:t[e]?.selector.split(",").map((e=>a.__EXPERIMENTAL_ELEMENTS[n].split(",").map((t=>e+" "+t)))).join(",")})}))})),o})(e,t),s=XT(e,t),c=e?.settings?.useRootPaddingAwareAlignments,{contentSize:u,wideSize:d}=e?.settings?.layout||{};let p="body {margin: 0;";if(u&&(p+=` --wp--style--global--content-size: ${u};`),d&&(p+=` --wp--style--global--wide-size: ${d};`),c&&l&&(p+="padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }\n\t\t\t.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t.has-global-padding :where(.has-global-padding:not(.wp-block-block)) { padding-right: 0; padding-left: 0; }\n\t\t\t.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }\n\t\t\t.has-global-padding :where(.has-global-padding:not(.wp-block-block)) > .alignfull { margin-right: 0; margin-left: 0; }\n\t\t\t.has-global-padding > .alignfull:where(:not(.has-global-padding):not(.is-layout-flex):not(.is-layout-grid)) > :where(.wp-block:not(.alignfull),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t.has-global-padding :where(.has-global-padding) > .alignfull:where(:not(.has-global-padding)) > :where(.wp-block:not(.alignfull),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: 0; padding-left: 0;"),p+="}",i.forEach((({selector:t,duotoneSelector:i,styles:a,fallbackGapValue:s,hasLayoutSupport:u,featureSelectors:d,styleVariationSelectors:m})=>{if(d){const e=WT(d,a);Object.entries(e).forEach((([e,t])=>{if(t.length){const n=t.join(";");p+=`${e}{${n};}`}}))}if(m&&Object.entries(m).forEach((([t,n])=>{const o=a?.variations?.[t];if(o){if(d){const e=WT(d,o);Object.entries(e).forEach((([e,t])=>{if(t.length){const o=function(e,t){const n=e.split(","),o=[];return n.forEach((e=>{o.push(`${t.trim()}${e.trim()}`)})),o.join(", ")}(e,n),r=t.join(";");p+=`${o}{${r};}`}}))}const t=KT(o,n,c,e);t.length&&(p+=`${n}{${t.join(";")};}`)}})),i){const e={};a?.filter&&(e.filter=a.filter,delete a.filter);const t=KT(e);t.length&&(p+=`${i}{${t.join(";")};}`)}r||Ml!==t&&!u||(p+=qT({style:a,selector:t,hasBlockGapSupport:n,hasFallbackGapSupport:o,fallbackGapValue:s}));const f=KT(a,t,c,e,l);f?.length&&(p+=`${t}{${f.join(";")};}`);const g=Object.entries(a).filter((([e])=>e.startsWith(":")));g?.length&&g.forEach((([e,n])=>{const o=KT(n);if(!o?.length)return;const r=`${t.split(",").map((t=>t+e)).join(",")}{${o.join(";")};}`;p+=r}))})),p+=".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",p+=".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",p+=".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }",n){const t=Hr(e?.styles?.spacing?.blockGap)||"0.5em";p+=`:where(.wp-site-blocks) > * { margin-block-start: ${t}; margin-block-end: 0; }`,p+=":where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }",p+=":where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }"}return s.forEach((({selector:e,presets:t})=>{Ml===e&&(e="");const n=function(e="*",t={}){return Pl.reduce(((n,{path:o,cssVarInfix:r,classes:l})=>{if(!l)return n;const i=pl(t,o,[]);return["default","theme","custom"].forEach((t=>{i[t]&&i[t].forEach((({slug:t})=>{l.forEach((({classSuffix:o,propertyName:l})=>{const i=`.has-${cl(t)}-${o}`,a=e.split(",").map((e=>`${e}${i}`)).join(","),s=`var(--wp--preset--${r}--${cl(t)})`;n+=`${a}{${l}: ${s} !important;}`}))}))})),n}),"")}(e,t);n.length>0&&(p+=n)})),p};function eM(e,t){return XT(e,t).flatMap((({presets:e})=>function(e={}){return Pl.filter((e=>"duotone"===e.path.at(-1))).flatMap((t=>{const n=pl(e,t.path,{});return["default","theme"].filter((e=>n[e])).flatMap((e=>n[e].map((e=>cy(`wp-duotone-${e.slug}`,e.colors))))).join("")}))}(e)))}const tM=(e,t)=>{const n={};return e.forEach((e=>{const o=e.name,r=uy(e);let l=uy(e,"filter.duotone");if(!l){const t=uy(e),n=(0,a.getBlockSupport)(e,"color.__experimentalDuotone",!1);l=n&&Al(t,n)}const i=!!e?.supports?.layout||!!e?.supports?.__experimentalLayout,s=e?.supports?.spacing?.blockGap?.__experimentalDefault,c=t(o),u={};c?.length&&c.forEach((e=>{const t=`.is-style-${e.name}${r}`;u[e.name]=t}));const d=((e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;const n={root:t};return Object.entries(UT).forEach((([t,o])=>{const r=uy(e,t);r&&(n[o]=r)})),n})(e,r);n[o]={duotoneSelector:l,fallbackGapValue:s,featureSelectors:Object.keys(d).length?d:void 0,hasLayoutSupport:i,name:o,selector:r,styleVariationSelectors:Object.keys(u).length?u:void 0}})),n};function nM(e,t){let n="";return e.split("&").forEach((e=>{if(!e.includes("{"))n+=`${t}{${e.trim()}}`;else{const o=e.replace("}","").split("{");if(2!==o.length)return;const[r,l]=o,i=r.startsWith(" ")?Al(t,r):function(e,t){return e.includes(",")?e.split(",").map((e=>e+t)).join(","):e+t}(t,r);n+=`${i}{${l.trim()}}`}})),n}function oM(e={}){const[t]=Hl("spacing.blockGap"),n=null!==t,o=!n,r=(0,f.useSelect)((e=>{const{getSettings:t}=e(Jo);return!!t().disableLayoutStyles})),l=(0,c.useContext)(fa),i=void 0!==l?.templateSlug,s=(0,f.useSelect)((e=>e(a.store).getBlockStyles),[]);return(0,c.useMemo)((()=>{var t,l;if(!e?.styles||!e?.settings)return[];l=e,e=l.styles?.blocks?.["core/separator"]&&l.styles?.blocks?.["core/separator"].color?.background&&!l.styles?.blocks?.["core/separator"].color?.text&&!l.styles?.blocks?.["core/separator"].border?.color?{...l,styles:{...l.styles,blocks:{...l.styles.blocks,"core/separator":{...l.styles.blocks["core/separator"],color:{...l.styles.blocks["core/separator"].color,text:l.styles?.blocks["core/separator"].color.background}}}}}:l;const c=tM((0,a.getBlockTypes)(),s),u=QT(e,c),d=JT(e,c,n,o,r,i),p=eM(e,c),m=[{css:u,isGlobalStyles:!0},{css:d,isGlobalStyles:!0},{css:null!==(t=e.styles.css)&&void 0!==t?t:"",isGlobalStyles:!0},{assets:p,__unstableType:"svg",isGlobalStyles:!0}];return(0,a.getBlockTypes)().forEach((t=>{if(e.styles.blocks[t.name]?.css){const n=c[t.name].selector;m.push({css:nM(e.styles.blocks[t.name]?.css,n),isGlobalStyles:!0})}})),[m,e.settings]}),[n,o,e,r])}function rM(){const{merged:e}=(0,c.useContext)(Ol);return oM(e)}var lM=(0,c.createElement)(F.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,c.createElement)(F.Path,{d:"M12 8c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 6.5c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5zM12.8 3h-1.5v3h1.5V3zm-1.6 18h1.5v-3h-1.5v3zm6.8-9.8v1.5h3v-1.5h-3zm-12 0H3v1.5h3v-1.5zm9.7 5.6 2.1 2.1 1.1-1.1-2.1-2.1-1.1 1.1zM8.3 7.2 6.2 5.1 5.1 6.2l2.1 2.1 1.1-1.1zM5.1 17.8l1.1 1.1 2.1-2.1-1.1-1.1-2.1 2.1zM18.9 6.2l-1.1-1.1-2.1 2.1 1.1 1.1 2.1-2.1z"}));function iM(e){return aM(e)}function aM(e){return!!e?.shadow}function sM({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){return(0,c.createElement)(m.__experimentalToolsPanel,{label:(0,v.__)("Effects"),resetAll:()=>{const o=e(n);t(o)},panelId:o},r)}const cM={shadow:!0};function uM({as:e=sM,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:l,defaultControls:i=cM}){const a=aM(r),s=(u=o?.shadow,Rl({settings:r},"",u));var u;const d=e=>{n(dl(t,["shadow"],e))},p=(0,c.useCallback)((e=>({...e,shadow:void 0})),[]);return(0,c.createElement)(e,{resetAllFilter:p,value:t,onChange:n,panelId:l},a&&(0,c.createElement)(m.__experimentalToolsPanelItem,{label:(0,v.__)("Shadow"),hasValue:()=>!!t?.shadow,onDeselect:()=>d(void 0),isShownByDefault:i.shadow,panelId:l},(0,c.createElement)(m.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},(0,c.createElement)(dM,{shadow:s,onShadowChange:d,settings:r}))))}const dM=({shadow:e,onShadowChange:t,settings:n})=>(0,c.createElement)(m.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"block-editor-global-styles-effects-panel__shadow-dropdown",renderToggle:({onToggle:e,isOpen:t})=>{const n={onClick:e,className:d()({"is-open":t}),"aria-expanded":t};return(0,c.createElement)(m.Button,{...n},(0,c.createElement)(m.__experimentalHStack,{justify:"flex-start"},(0,c.createElement)(ai,{className:"block-editor-global-styles-effects-panel__toggle-icon",icon:lM,size:24}),(0,c.createElement)(m.FlexItem,null,(0,v.__)("Shadow"))))},renderContent:()=>(0,c.createElement)(m.__experimentalDropdownContentWrapper,{paddingSize:"medium"},(0,c.createElement)(pM,{shadow:e,onShadowChange:t,settings:n}))});function pM({shadow:e,onShadowChange:t,settings:n}){const o=n?.shadow?.presets?.default,r=n?.shadow?.presets?.theme,l=n?.shadow?.defaultPresets,i=[...l?o:[],...r||[]];return(0,c.createElement)("div",{className:"block-editor-global-styles-effects-panel__shadow-popover-container"},(0,c.createElement)(m.__experimentalVStack,{spacing:4},(0,c.createElement)(m.__experimentalHeading,{level:5},(0,v.__)("Shadow")),(0,c.createElement)(mM,{presets:i,activeShadow:e,onSelect:t})))}function mM({presets:e,activeShadow:t,onSelect:n}){return e?(0,c.createElement)(m.__experimentalGrid,{columns:6,gap:0,align:"center",justify:"center"},e.map((({name:e,slug:o,shadow:r})=>(0,c.createElement)(fM,{key:o,label:e,isActive:r===t,onSelect:()=>n(r===t?void 0:r),shadow:r})))):null}function fM({label:e,isActive:t,onSelect:n,shadow:o}){return(0,c.createElement)("div",{className:"block-editor-global-styles-effects-panel__shadow-indicator-wrapper"},(0,c.createElement)(m.Button,{className:"block-editor-global-styles-effects-panel__shadow-indicator",onClick:n,label:e,style:{boxShadow:o},showTooltip:!0},t&&(0,c.createElement)(ai,{icon:gk})))}function gM(e,t,n){return"core/image"===e&&n?.lightbox?.allowEditing||!!t?.lightbox}function hM({onChange:e,value:t,inheritedValue:n,panelId:o}){const r=()=>{e(void 0)};let l=!1;return n?.lightbox?.enabled&&(l=n.lightbox.enabled),(0,c.createElement)(c.Fragment,null,(0,c.createElement)(m.__experimentalToolsPanel,{label:(0,v._x)("Settings","Image settings"),resetAll:r,panelId:o},(0,c.createElement)(m.__experimentalToolsPanelItem,{hasValue:()=>!!t?.lightbox,label:(0,v.__)("Expand on click"),onDeselect:r,isShownByDefault:!0,panelId:o},(0,c.createElement)(m.ToggleControl,{label:(0,v.__)("Expand on click"),checked:l,onChange:t=>{e({enabled:t})}}))))}function bM({value:e,onChange:t,inheritedValue:n=e}){const[o,r]=(0,c.useState)(null),l=n?.css;return(0,c.createElement)(m.__experimentalVStack,{spacing:3},(0,c.createElement)(m.TextareaControl,{label:(0,v.__)("Additional CSS"),__nextHasNoMarginBottom:!0,value:l,onChange:n=>function(n){if(t({...e,css:n}),o){const[t]=Im([{css:e}],".editor-styles-wrapper");t&&r(null)}}(n),onBlur:function(e){if(!e?.target?.value)return void r(null);const[t]=Im([{css:e.target.value}],".editor-styles-wrapper");r(null===t?(0,v.__)("There is an error with your CSS structure."):null)},className:"block-editor-global-styles-advanced-panel__custom-css-input",spellCheck:!1}),o&&(0,c.createElement)(m.Tooltip,{text:o},(0,c.createElement)("div",{className:"block-editor-global-styles-advanced-panel__custom-css-validation-wrapper"},(0,c.createElement)(ai,{icon:cb,className:"block-editor-global-styles-advanced-panel__custom-css-validation-icon"}))))}function vM(e,t,n){if(null==e||!1===e)return;if(Array.isArray(e))return _M(e,t,n);switch(typeof e){case"string":case"number":return}const{type:o,props:r}=e;switch(o){case c.StrictMode:case c.Fragment:return _M(r.children,t,n);case c.RawHTML:return;case ch.Content:return kM(t,n);case Yx:return void t.push(r.value)}switch(typeof o){case"string":return void 0!==r.children?_M(r.children,t,n):void 0;case"function":return vM(o.prototype&&"function"==typeof o.prototype.render?new o(r).render():o(r),t,n)}}function _M(e,...t){e=Array.isArray(e)?e:[e];for(let n=0;n{}),options:o=yM,defaultValue:r=yM[0].value,isShownByDefault:l=!0}){const i=null!=t?t:"auto";return(0,c.createElement)(m.__experimentalToolsPanelItem,{hasValue:()=>i!==r,label:(0,v.__)("Aspect ratio"),onDeselect:()=>n(void 0),isShownByDefault:l,panelId:e},(0,c.createElement)(m.SelectControl,{label:(0,v.__)("Aspect ratio"),value:i,options:o,onChange:n,size:"__unstable-large",__nextHasNoMarginBottom:!0}))}const SM=[{value:"fill",label:(0,v._x)("Fill","Scale option for dimensions control"),help:(0,v.__)("Fill the space by stretching the content.")},{value:"contain",label:(0,v._x)("Contain","Scale option for dimensions control"),help:(0,v.__)("Fit the content to the space without clipping.")},{value:"cover",label:(0,v._x)("Cover","Scale option for dimensions control"),help:(0,v.__)("Fill the space by clipping what doesn't fit.")},{value:"none",label:(0,v._x)("None","Scale option for dimensions control"),help:(0,v.__)("Do not adjust the sizing of the content. Content that is too large will be clipped, and content that is too small will have additional padding.")},{value:"scale-down",label:(0,v._x)("Scale down","Scale option for dimensions control"),help:(0,v.__)("Scale down the content to fit the space if it is too big. Content that is too small will have additional padding.")}];function wM({panelId:e,value:t,onChange:n,options:o=SM,defaultValue:r=SM[0].value,isShownByDefault:l=!0}){const i=null!=t?t:"fill",a=(0,c.useMemo)((()=>o.reduce(((e,t)=>(e[t.value]=t.help,e)),{})),[o]);return(0,c.createElement)(m.__experimentalToolsPanelItem,{label:(0,v.__)("Scale"),isShownByDefault:l,hasValue:()=>i!==r,onDeselect:()=>n(r),panelId:e},(0,c.createElement)(m.__experimentalToggleGroupControl,{label:(0,v.__)("Scale"),isBlock:!0,help:a[i],value:i,onChange:n,__nextHasNoMarginBottom:!0},o.map((e=>(0,c.createElement)(m.__experimentalToggleGroupControlOption,{key:e.value,...e})))))}function CM(){return CM=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?DM(WM,--$M):0,GM--,10===jM&&(GM=1,HM--),jM}function YM(){return jM=$M2||eP(jM)>3?"":" "}function lP(e,t){for(;--t&&YM()&&!(jM<48||jM>102||jM>57&&jM<65||jM>70&&jM<97););return JM(e,QM()+(t<6&&32==XM()&&32==YM()))}function iP(e){for(;YM();)switch(jM){case e:return $M;case 34:case 39:34!==e&&39!==e&&iP(jM);break;case 40:41===e&&iP(e);break;case 92:YM()}return $M}function aP(e,t){for(;YM()&&e+jM!==57&&(e+jM!==84||47!==XM()););return"/*"+JM(t,$M-1)+"*"+PM(47===e?e:YM())}function sP(e){for(;!eP(XM());)YM();return JM(e,$M)}var cP="-ms-",uP="-moz-",dP="-webkit-",pP="comm",mP="rule",fP="decl",gP="@keyframes";function hP(e,t){for(var n="",o=VM(e),r=0;r0&&zM(S)-d&&FM(m>32?EP(S+";",o,n,d-1):EP(RM(S," ","")+";",o,n,d-2),s);break;case 59:S+=";";default:if(FM(E=kP(S,t,n,c,u,r,a,_,k=[],y=[],d),l),123===v)if(0===u)_P(S,t,E,E,k,l,d,a,y);else switch(99===p&&110===DM(S,3)?100:p){case 100:case 109:case 115:_P(e,E,E,o&&FM(kP(e,E,E,0,0,r,a,_,r,k=[],d),y),r,y,d,a,o?k:y);break;default:_P(S,E,E,E,[""],y,0,a,y)}}c=u=m=0,g=b=1,_=S="",d=i;break;case 58:d=1+zM(S),m=f;default:if(g<1)if(123==v)--g;else if(125==v&&0==g++&&125==ZM())continue;switch(S+=PM(v),v*g){case 38:b=u>0?1:(S+="\f",-1);break;case 44:a[c++]=(zM(S)-1)*b,b=1;break;case 64:45===XM()&&(S+=oP(YM())),p=XM(),u=d=zM(_=S+=sP(QM())),v++;break;case 45:45===f&&2==zM(S)&&(g=0)}}return l}function kP(e,t,n,o,r,l,i,a,s,c,u){for(var d=r-1,p=0===r?l:[""],m=VM(p),f=0,g=0,h=0;f0?p[b]+" "+v:RM(v,/&\f/g,p[b])))&&(s[h++]=_);return KM(e,t,n,0===r?mP:a,s,c,u)}function yP(e,t,n){return KM(e,t,n,pP,PM(jM),OM(e,2,-2),0)}function EP(e,t,n,o){return KM(e,t,n,fP,OM(e,0,o),OM(e,o+1,-1),o)}var SP=function(e,t,n){for(var o=0,r=0;o=r,r=XM(),38===o&&12===r&&(t[n]=1),!eP(r);)YM();return JM(e,$M)},wP=function(e,t){return nP(function(e,t){var n=-1,o=44;do{switch(eP(o)){case 0:38===o&&12===XM()&&(t[n]=1),e[n]+=SP($M-1,t,n);break;case 2:e[n]+=oP(o);break;case 4:if(44===o){e[++n]=58===XM()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=PM(o)}}while(o=YM());return e}(tP(e),t))},CP=new WeakMap,xP=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,o=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||CP.get(n))&&!o){CP.set(e,!0);for(var r=[],l=wP(t,r),i=n.props,a=0,s=0;a6)switch(DM(e,t+1)){case 109:if(45!==DM(e,t+4))break;case 102:return RM(e,/(.+:)(.+)-([^]+)/,"$1"+dP+"$2-$3$1"+uP+(108==DM(e,t+3)?"$3":"$2-$3"))+e;case 115:return~AM(e,"stretch")?IP(RM(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==DM(e,t+1))break;case 6444:switch(DM(e,zM(e)-3-(~AM(e,"!important")&&10))){case 107:return RM(e,":",":"+dP)+e;case 101:return RM(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+dP+(45===DM(e,14)?"inline-":"")+"box$3$1"+dP+"$2$3$1"+cP+"$2box$3")+e}break;case 5936:switch(DM(e,t+11)){case 114:return dP+e+cP+RM(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return dP+e+cP+RM(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return dP+e+cP+RM(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return dP+e+cP+e+e}return e}var TP=[function(e,t,n,o){if(e.length>-1&&!e.return)switch(e.type){case fP:e.return=IP(e.value,e.length);break;case gP:return hP([qM(e,{value:RM(e.value,"@","@"+dP)})],o);case mP:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return hP([qM(e,{props:[RM(t,/:(read-\w+)/,":-moz-$1")]})],o);case"::placeholder":return hP([qM(e,{props:[RM(t,/:(plac\w+)/,":"+dP+"input-$1")]}),qM(e,{props:[RM(t,/:(plac\w+)/,":-moz-$1")]}),qM(e,{props:[RM(t,/:(plac\w+)/,cP+"input-$1")]})],o)}return""}))}}],MP=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o=e.stylisPlugins||TP;var r,l,i={},a=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++o,r-=4)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(r){case 3:n^=(255&e.charCodeAt(o+2))<<16;case 2:n^=(255&e.charCodeAt(o+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(o)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},NP={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function LP(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var RP=/[A-Z]|^ms/g,AP=/_EMO_([^_]+?)_([^]*?)_EMO_/g,DP=function(e){return 45===e.charCodeAt(1)},OP=function(e){return null!=e&&"boolean"!=typeof e},zP=LP((function(e){return DP(e)?e:e.replace(RP,"-$&").toLowerCase()})),VP=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(AP,(function(e,t,n){return HP={name:t,styles:n,next:HP},t}))}return 1===NP[e]||DP(e)||"number"!=typeof t||0===t?t:t+"px"};function FP(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return HP={name:n.name,styles:n.styles,next:HP},n.name;if(void 0!==n.styles){var o=n.next;if(void 0!==o)for(;void 0!==o;)HP={name:o.name,styles:o.styles,next:HP},o=o.next;return n.styles+";"}return function(e,t,n){var o="";if(Array.isArray(n))for(var r=0;r96?ZP:YP},QP=function(e,t,n){var o;if(t){var r=t.shouldForwardProp;o=e.__emotion_forwardProp&&r?function(t){return e.__emotion_forwardProp(t)&&r(t)}:r}return"function"!=typeof o&&n&&(o=e.__emotion_forwardProp),o},JP=function(e){var t=e.cache,n=e.serialized,o=e.isStringTag;qP(t,n,o);$P((function(){return function(e,t,n){qP(e,t,n);var o=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var r=t;do{e.insert(t===r?"."+o:"",r,e.sheet,!0),r=r.next}while(void 0!==r)}}(t,n,o)}));return null},eN=function e(t,n){var o,r,l=t.__emotion_real===t,i=l&&t.__emotion_base||t;void 0!==n&&(o=n.label,r=n.target);var a=QP(t,n,l),s=a||XP(i),c=!s("as");return function(){var u=arguments,d=l&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==o&&d.push("label:"+o+";"),null==u[0]||void 0===u[0].raw)d.push.apply(d,u);else{0,d.push(u[0][0]);for(var p=u.length,m=1;m{}),units:o,isShownByDefault:r=!0}){var l,i;const a="auto"===t.width?"":null!==(l=t.width)&&void 0!==l?l:"",s="auto"===t.height?"":null!==(i=t.height)&&void 0!==i?i:"",u=e=>o=>{const r={...t};o?r[e]=o:delete r[e],n(r)};return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(tN,{label:(0,v.__)("Width"),isShownByDefault:r,hasValue:()=>""!==a,onDeselect:u("width"),panelId:e},(0,c.createElement)(m.__experimentalUnitControl,{label:(0,v.__)("Width"),placeholder:(0,v.__)("Auto"),labelPosition:"top",units:o,min:0,value:a,onChange:u("width"),size:"__unstable-large"})),(0,c.createElement)(tN,{label:(0,v.__)("Height"),isShownByDefault:r,hasValue:()=>""!==s,onDeselect:u("height"),panelId:e},(0,c.createElement)(m.__experimentalUnitControl,{label:(0,v.__)("Height"),placeholder:(0,v.__)("Auto"),labelPosition:"top",units:o,min:0,value:s,onChange:u("height"),size:"__unstable-large"})))}var oN=function({panelId:e,value:t={},onChange:n=(()=>{}),aspectRatioOptions:o,defaultAspectRatio:r="auto",scaleOptions:l,defaultScale:i="fill",unitsOptions:a}){const s=void 0===t.width||"auto"===t.width?null:t.width,u=void 0===t.height||"auto"===t.height?null:t.height,d=void 0===t.aspectRatio||"auto"===t.aspectRatio?null:t.aspectRatio,p=void 0===t.scale||"fill"===t.scale?null:t.scale,[m,f]=(0,c.useState)(p),[g,h]=(0,c.useState)(d),b=s&&u?"custom":g,v=d||s&&u;return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(EM,{panelId:e,options:o,defaultValue:r,value:b,onChange:e=>{const o={...t};h(e="auto"===e?null:e),e?o.aspectRatio=e:delete o.aspectRatio,e?m?o.scale=m:(o.scale=i,f(i)):delete o.scale,"custom"!==e&&s&&u&&delete o.height,n(o)}}),v&&(0,c.createElement)(wM,{panelId:e,options:l,defaultValue:i,value:m,onChange:e=>{const o={...t};f(e="fill"===e?null:e),e?o.scale=e:delete o.scale,n(o)}}),(0,c.createElement)(nN,{panelId:e,units:a,value:{width:s,height:u},onChange:({width:e,height:o})=>{const r={...t};o="auto"===o?null:o,(e="auto"===e?null:e)?r.width=e:delete r.width,o?r.height=o:delete r.height,e&&o?delete r.aspectRatio:g&&(r.aspectRatio=g),g||!!e==!!o?m?r.scale=m:(r.scale=i,f(i)):delete r.scale,n(r)}}))};const rN=[{label:(0,v._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,v._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,v._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,v._x)("Full Size","Image size option for resolution control"),value:"full"}];const lN={};Yo(lN,{...i,ExperimentalBlockCanvas:hS,ExperimentalBlockEditorProvider:sp,getRichTextValues:function(e=[]){a.__unstableGetBlockProps.skipFilters=!0;const t=[];return kM(t,e),a.__unstableGetBlockProps.skipFilters=!1,t},kebabCase:cl,PrivateInserter:Bg,PrivateListView:Rw,ResizableBoxPopover:function({clientId:e,resizableBoxProps:t,...n}){return(0,c.createElement)(Vg,{clientId:e,__unstableCoverTarget:!0,__unstablePopoverSlot:"block-toolbar",shift:!1,...n},(0,c.createElement)(m.ResizableBox,{...t}))},BlockInfo:aI,useShouldContextualToolbarShow:eT,cleanEmptyObject:Wl,BlockQuickNavigation:sI,LayoutStyle:function({layout:e={},css:t,...n}){const o=bi(e.type),r=null!==bl("spacing.blockGap");if(o){if(t)return(0,c.createElement)("style",null,t);const l=o.getLayoutStyle?.({hasBlockGapSupport:r,layout:e,...n});if(l)return(0,c.createElement)("style",null,l)}return null},BlockRemovalWarningModal:function({rules:e}){const{clientIds:t,selectPrevious:n,blockNamesForPrompt:o}=(0,f.useSelect)((e=>Xo(e(Jo)).getRemovalPromptData())),{clearBlockRemovalPrompt:r,setBlockRemovalRules:l,privateRemoveBlocks:i}=Xo((0,f.useDispatch)(Jo));if((0,c.useEffect)((()=>(l(e),()=>{l()})),[e,l]),!o)return;return(0,c.createElement)(m.Modal,{title:(0,v.__)("Are you sure?"),onRequestClose:r},1===o.length?(0,c.createElement)("p",null,e[o[0]]):(0,c.createElement)("ul",{style:{listStyleType:"disc",paddingLeft:"1rem"}},o.map((t=>(0,c.createElement)("li",{key:t},e[t])))),(0,c.createElement)("p",null,o.length>1?(0,v.__)("Removing these blocks is not advised."):(0,v.__)("Removing this block is not advised.")),(0,c.createElement)(m.__experimentalHStack,{justify:"right"},(0,c.createElement)(m.Button,{variant:"tertiary",onClick:r},(0,v.__)("Cancel")),(0,c.createElement)(m.Button,{variant:"primary",onClick:()=>{i(t,n,!0),r()}},(0,v.__)("Delete"))))},useLayoutClasses:$y,useLayoutStyles:function(e={},t,n){const{layout:o={},style:r={}}=e,l=o?.inherit||o?.contentSize||o?.wideSize?{...o,type:"constrained"}:o||{},i=bi(l?.type||"default"),a=null!==bl("spacing.blockGap"),s=i?.getLayoutStyle?.({blockName:t,selector:n,layout:o,style:r,hasBlockGapSupport:a});return s},DimensionsTool:oN,ResolutionTool:function({panelId:e,value:t,onChange:n,options:o=rN,defaultValue:r=rN[0].value,isShownByDefault:l=!0}){const i=null!=t?t:r;return(0,c.createElement)(m.__experimentalToolsPanelItem,{hasValue:()=>i!==r,label:(0,v.__)("Resolution"),onDeselect:()=>n(r),isShownByDefault:l,panelId:e},(0,c.createElement)(m.SelectControl,{label:(0,v.__)("Resolution"),value:i,options:o,onChange:n,help:(0,v.__)("Select the size of the source image."),size:"__unstable-large"}))},ReusableBlocksRenameHint:MT,useReusableBlocksRenameHint:function(){return(0,f.useSelect)((e=>{var t;return null===(t=e(Ch.store).get("core",TT))||void 0===t||t}),[])},usesContextKey:Kx})}(),(window.wp=window.wp||{}).blockEditor=o}(); \ No newline at end of file diff --git a/wp-includes/js/dist/block-library.js b/wp-includes/js/dist/block-library.js index 3178844bed3..deb1812217c 100644 --- a/wp-includes/js/dist/block-library.js +++ b/wp-includes/js/dist/block-library.js @@ -24244,7 +24244,7 @@ function image_Image({ options: imageSizeOptions }), showLightboxToggle && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => !!lightbox, - label: (0,external_wp_i18n_namespaceObject.__)('Expand on Click'), + label: (0,external_wp_i18n_namespaceObject.__)('Expand on click'), onDeselect: () => { setAttributes({ lightbox: undefined @@ -24252,7 +24252,7 @@ function image_Image({ }, isShownByDefault: true }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { - label: (0,external_wp_i18n_namespaceObject.__)('Expand on Click'), + label: (0,external_wp_i18n_namespaceObject.__)('Expand on click'), checked: lightboxChecked, onChange: newValue => { setAttributes({ @@ -42521,22 +42521,41 @@ const usePatterns = (clientId, name) => { }; /** - * Hook that returns a list of unsupported blocks inside the Query Loop with the - * given `clientId`. + * The object returned by useUnsupportedBlocks with info about the type of + * unsupported blocks present inside the Query block. + * + * @typedef {Object} UnsupportedBlocksInfo + * @property {boolean} hasBlocksFromPlugins True if blocks from plugins are present. + * @property {boolean} hasPostContentBlock True if a 'core/post-content' block is present. + * @property {boolean} hasUnsupportedBlocks True if there are any unsupported blocks. + */ + +/** + * Hook that returns an object with information about the unsupported blocks + * present inside a Query Loop with the given `clientId`. The returned object + * contains props that are true when a certain type of unsupported block is + * present. * * @param {string} clientId The block's client ID. - * @return {string[]} List of block titles. + * @return {UnsupportedBlocksInfo} The object containing the information. */ -const useUnsupportedBlockList = clientId => { +const useUnsupportedBlocks = clientId => { return (0,external_wp_data_namespaceObject.useSelect)(select => { const { getClientIdsOfDescendants, getBlockName } = select(external_wp_blockEditor_namespaceObject.store); - return getClientIdsOfDescendants(clientId).filter(descendantClientId => { + const blocks = {}; + getClientIdsOfDescendants(clientId).forEach(descendantClientId => { const blockName = getBlockName(descendantClientId); - return !blockName.startsWith('core/') || blockName === 'core/post-content' || blockName === 'core/template-part' || blockName === 'core/block'; + if (!blockName.startsWith('core/')) { + blocks.hasBlocksFromPlugins = true; + } else if (blockName === 'core/post-content') { + blocks.hasPostContentBlock = true; + } }); + blocks.hasUnsupportedBlocks = blocks.hasBlocksFromPlugins || blocks.hasPostContentBlock; + return blocks; }, [clientId]); }; @@ -43099,7 +43118,6 @@ function StickyControl({ - /** * Internal dependencies */ @@ -43109,26 +43127,26 @@ function EnhancedPaginationControl({ setAttributes, clientId }) { - const unsupported = useUnsupportedBlockList(clientId); + const { + hasUnsupportedBlocks + } = useUnsupportedBlocks(clientId); + let help = (0,external_wp_i18n_namespaceObject.__)('Browsing between pages requires a full page reload.'); + if (enhancedPagination) { + help = (0,external_wp_i18n_namespaceObject.__)("Browsing between pages won't require a full page reload, unless non-compatible blocks are detected."); + } else if (hasUnsupportedBlocks) { + help = (0,external_wp_i18n_namespaceObject.__)("Force page reload can't be disabled because there are non-compatible blocks inside the Query block."); + } return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, { - label: (0,external_wp_i18n_namespaceObject.__)('Enhanced pagination'), - help: (0,external_wp_i18n_namespaceObject.__)('Browsing between pages won’t require a full page reload.'), - checked: !!enhancedPagination, - disabled: unsupported.length, + label: (0,external_wp_i18n_namespaceObject.__)('Force page reload'), + help: help, + checked: !enhancedPagination, + disabled: hasUnsupportedBlocks, onChange: value => { setAttributes({ - enhancedPagination: !!value + enhancedPagination: !value }); } - }), !!unsupported.length && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Notice, { - status: "warning", - isDismissible: false, - className: "wp-block-query__enhanced-pagination-notice" - }, (0,external_wp_i18n_namespaceObject.__)("Enhanced pagination doesn't support the following blocks:"), (0,external_wp_element_namespaceObject.createElement)("ul", null, unsupported.map(id => (0,external_wp_element_namespaceObject.createElement)("li", { - key: id - }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockTitle, { - clientId: id - })))), (0,external_wp_i18n_namespaceObject.__)('If you want to enable it, you have to remove all unsupported blocks first.'))); + })); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/create-new-post-link.js @@ -43375,7 +43393,6 @@ function QueryInspectorControls(props) { * Internal dependencies */ -const disableEnhancedPaginationDescription = (0,external_wp_i18n_namespaceObject.__)('You have added unsupported blocks. For the enhanced pagination to work, remove them, then re-enable "Enhanced pagination" in the Query Block settings.'); const modalDescriptionId = 'wp-block-query-enhanced-pagination-modal__description'; function EnhancedPaginationModal({ clientId, @@ -43385,31 +43402,44 @@ function EnhancedPaginationModal({ setAttributes }) { const [isOpen, setOpen] = (0,external_wp_element_namespaceObject.useState)(false); - const unsupported = useUnsupportedBlockList(clientId); + const { + hasBlocksFromPlugins, + hasPostContentBlock, + hasUnsupportedBlocks + } = useUnsupportedBlocks(clientId); (0,external_wp_element_namespaceObject.useEffect)(() => { - setOpen(!!unsupported.length && enhancedPagination); - }, [unsupported.length, enhancedPagination, setOpen]); + if (enhancedPagination && hasUnsupportedBlocks) { + setAttributes({ + enhancedPagination: false + }); + setOpen(true); + } + }, [enhancedPagination, hasUnsupportedBlocks, setAttributes]); + const closeModal = () => { + setOpen(false); + }; + let notice = (0,external_wp_i18n_namespaceObject.__)('If you still want to prevent full page reloads, remove that block, then disable "Force page reload" again in the Query Block settings.'); + if (hasBlocksFromPlugins) { + notice = (0,external_wp_i18n_namespaceObject.__)('Currently, avoiding full page reloads is not possible when blocks from plugins are present inside the Query block.') + ' ' + notice; + } else if (hasPostContentBlock) { + notice = (0,external_wp_i18n_namespaceObject.__)('Currently, avoiding full page reloads is not possible when a Content block is present inside the Query block.') + ' ' + notice; + } return isOpen && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, { - title: (0,external_wp_i18n_namespaceObject.__)('Enhanced pagination will be disabled'), + title: (0,external_wp_i18n_namespaceObject.__)('Query block: Force page reload enabled'), className: "wp-block-query__enhanced-pagination-modal", aria: { describedby: modalDescriptionId }, isDismissible: false, - shouldCloseOnEsc: false, - shouldCloseOnClickOutside: false + onRequestClose: closeModal }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, { alignment: "right", spacing: 5 }, (0,external_wp_element_namespaceObject.createElement)("span", { id: modalDescriptionId - }, disableEnhancedPaginationDescription), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { + }, notice), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { variant: "primary", - onClick: () => { - setAttributes({ - enhancedPagination: false - }); - } + onClick: closeModal }, (0,external_wp_i18n_namespaceObject.__)('OK')))); } diff --git a/wp-includes/js/dist/block-library.min.js b/wp-includes/js/dist/block-library.min.js index ecba22032ee..a52742e26b7 100644 --- a/wp-includes/js/dist/block-library.min.js +++ b/wp-includes/js/dist/block-library.min.js @@ -9,6 +9,6 @@ Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/!function(){"use strict";var a={}.hasOwnProperty;function o(){for(var e=[],t=0;tt({displayAsDropdown:!o})}),o&&(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Show label"),checked:n,onChange:()=>t({showLabel:!n})}),(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Show post counts"),checked:a,onChange:()=>t({showPostCounts:!a})}),(0,je.createElement)(Ke.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Group by:"),options:[{label:(0,Ye.__)("Year"),value:"yearly"},{label:(0,Ye.__)("Month"),value:"monthly"},{label:(0,Ye.__)("Week"),value:"weekly"},{label:(0,Ye.__)("Day"),value:"daily"}],value:r,onChange:e=>t({type:e})}))),(0,je.createElement)("div",{...(0,Je.useBlockProps)()},(0,je.createElement)(Ke.Disabled,null,(0,je.createElement)(et(),{block:"core/archives",skipBlockSupportAttributes:!0,attributes:e}))))}},ot=()=>Qe({name:nt,metadata:tt,settings:at});var rt=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{fillRule:"evenodd",d:"M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z",clipRule:"evenodd"})),lt=n(4403),it=n.n(lt),st=window.wp.url,ct=window.wp.coreData,ut=window.wp.data;function mt(e){const t=e?e[0]:24,n=e?e[e.length-1]:96;return{minSize:t,maxSize:Math.floor(2.5*n)}}function pt(){const{avatarURL:e}=(0,ut.useSelect)((e=>{const{getSettings:t}=e(Je.store),{__experimentalDiscussionSettings:n}=t();return n}));return e}const dt={who:"authors",per_page:-1,_fields:"id,name",context:"view"};var gt=function({value:e,onChange:t}){const[n,a]=(0,je.useState)(),o=(0,ut.useSelect)((e=>{const{getUsers:t}=e(ct.store);return t(dt)}),[]);if(!o)return null;const r=o.map((e=>({label:e.name,value:e.id})));return(0,je.createElement)(Ke.ComboboxControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("User"),help:(0,Ye.__)("Select the avatar user to display, if it is blank it will use the post/page author."),value:e,onChange:t,options:n||r,onFilterValueChange:e=>a(r.filter((t=>t.label.toLowerCase().startsWith(e.toLowerCase()))))})};const ht=({setAttributes:e,avatar:t,attributes:n,selectUser:a})=>(0,je.createElement)(Je.InspectorControls,null,(0,je.createElement)(Ke.PanelBody,{title:(0,Ye.__)("Settings")},(0,je.createElement)(Ke.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,Ye.__)("Image size"),onChange:t=>e({size:t}),min:t.minSize,max:t.maxSize,initialPosition:n?.size,value:n?.size}),(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Link to user profile"),onChange:()=>e({isLink:!n.isLink}),checked:n.isLink}),n.isLink&&(0,je.createElement)(Ke.ToggleControl,{label:(0,Ye.__)("Open in new tab"),onChange:t=>e({linkTarget:t?"_blank":"_self"}),checked:"_blank"===n.linkTarget}),a&&(0,je.createElement)(gt,{value:n?.userId,onChange:t=>{e({userId:t})}}))),_t=({setAttributes:e,attributes:t,avatar:n,blockProps:a,isSelected:o})=>{const r=(0,Je.__experimentalUseBorderProps)(t),l=(0,st.addQueryArgs)((0,st.removeQueryArgs)(n?.src,["s"]),{s:2*t?.size});return(0,je.createElement)("div",{...a},(0,je.createElement)(Ke.ResizableBox,{size:{width:t.size,height:t.size},showHandle:o,onResizeStop:(n,a,o,r)=>{e({size:parseInt(t.size+(r.height||r.width),10)})},lockAspectRatio:!0,enable:{top:!1,right:!(0,Ye.isRTL)(),bottom:!0,left:(0,Ye.isRTL)()},minWidth:n.minSize,maxWidth:n.maxSize},(0,je.createElement)("img",{src:l,alt:n.alt,className:it()("avatar","avatar-"+t.size,"photo","wp-block-avatar__image",r.className),style:r.style})))},bt=({attributes:e,context:t,setAttributes:n,isSelected:a})=>{const{commentId:o}=t,r=(0,Je.useBlockProps)(),l=function({commentId:e}){const[t]=(0,ct.useEntityProp)("root","comment","author_avatar_urls",e),[n]=(0,ct.useEntityProp)("root","comment","author_name",e),a=t?Object.values(t):null,o=t?Object.keys(t):null,{minSize:r,maxSize:l}=mt(o),i=pt();return{src:a?a[a.length-1]:i,minSize:r,maxSize:l,alt:n?(0,Ye.sprintf)((0,Ye.__)("%s Avatar"),n):(0,Ye.__)("Default Avatar")}}({commentId:o});return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(ht,{avatar:l,setAttributes:n,attributes:e,selectUser:!1}),e.isLink?(0,je.createElement)("a",{href:"#avatar-pseudo-link",className:"wp-block-avatar__link",onClick:e=>e.preventDefault()},(0,je.createElement)(_t,{attributes:e,avatar:l,blockProps:r,isSelected:a,setAttributes:n})):(0,je.createElement)(_t,{attributes:e,avatar:l,blockProps:r,isSelected:a,setAttributes:n}))},ft=({attributes:e,context:t,setAttributes:n,isSelected:a})=>{const{postId:o,postType:r}=t,l=function({userId:e,postId:t,postType:n}){const{authorDetails:a}=(0,ut.useSelect)((a=>{const{getEditedEntityRecord:o,getUser:r}=a(ct.store);if(e)return{authorDetails:r(e)};const l=o("postType",n,t)?.author;return{authorDetails:l?r(l):null}}),[n,t,e]),o=a?.avatar_urls?Object.values(a.avatar_urls):null,r=a?.avatar_urls?Object.keys(a.avatar_urls):null,{minSize:l,maxSize:i}=mt(r),s=pt();return{src:o?o[o.length-1]:s,minSize:l,maxSize:i,alt:a?(0,Ye.sprintf)((0,Ye.__)("%s Avatar"),a?.name):(0,Ye.__)("Default Avatar")}}({userId:e?.userId,postId:o,postType:r}),i=(0,Je.useBlockProps)();return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(ht,{selectUser:!0,attributes:e,avatar:l,setAttributes:n}),(0,je.createElement)("div",null,e.isLink?(0,je.createElement)("a",{href:"#avatar-pseudo-link",className:"wp-block-avatar__link",onClick:e=>e.preventDefault()},(0,je.createElement)(_t,{attributes:e,avatar:l,blockProps:i,isSelected:a,setAttributes:n})):(0,je.createElement)(_t,{attributes:e,avatar:l,blockProps:i,isSelected:a,setAttributes:n})))};const vt={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/avatar",title:"Avatar",category:"theme",description:"Add a user’s avatar.",textdomain:"default",attributes:{userId:{type:"number"},size:{type:"number",default:96},isLink:{type:"boolean",default:!1},linkTarget:{type:"string",default:"_self"}},usesContext:["postType","postId","commentId"],supports:{html:!1,align:!0,alignWide:!1,spacing:{margin:!0,padding:!0},__experimentalBorder:{__experimentalSkipSerialization:!0,radius:!0,width:!0,color:!0,style:!0,__experimentalDefaultControls:{radius:!0}},color:{text:!1,background:!1,__experimentalDuotone:"img"}},selectors:{border:".wp-block-avatar img"},editorStyle:"wp-block-avatar-editor",style:"wp-block-avatar"},{name:yt}=vt,kt={icon:rt,edit:function(e){return e?.context?.commentId||null===e?.context?.commentId?(0,je.createElement)(bt,{...e}):(0,je.createElement)(ft,{...e})}},xt=()=>Qe({name:yt,metadata:vt,settings:kt});var wt=(0,je.createElement)(We.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,je.createElement)(We.Path,{d:"M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z"})),Et=[{attributes:{src:{type:"string",source:"attribute",selector:"audio",attribute:"src"},caption:{type:"string",source:"html",selector:"figcaption"},id:{type:"number"},autoplay:{type:"boolean",source:"attribute",selector:"audio",attribute:"autoplay"},loop:{type:"boolean",source:"attribute",selector:"audio",attribute:"loop"},preload:{type:"string",source:"attribute",selector:"audio",attribute:"preload"}},supports:{align:!0},save({attributes:e}){const{autoplay:t,caption:n,loop:a,preload:o,src:r}=e;return(0,je.createElement)("figure",null,(0,je.createElement)("audio",{controls:"controls",src:r,autoPlay:t,loop:a,preload:o}),!Je.RichText.isEmpty(n)&&(0,je.createElement)(Je.RichText.Content,{tagName:"figcaption",value:n}))}}],Ct=window.wp.blob;var St=(0,je.createElement)(We.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,je.createElement)(We.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6 5.5h12a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5ZM4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6Zm4 10h2v-1.5H8V16Zm5 0h-2v-1.5h2V16Zm1 0h2v-1.5h-2V16Z"})),Bt=window.wp.notices,Tt=window.wp.compose,Nt=n(3827),Pt=n.n(Nt);function It(e,t){var n,a,o=0;function r(){var r,l,i=n,s=arguments.length;e:for(;i;){if(i.args.length===arguments.length){for(l=0;le&&e.includes('class="wp-embedded-content"'),Ft=(e,t={})=>{const{preview:n,attributes:a={}}=e,{url:o,providerNameSlug:r,type:l,...i}=a;if(!o||!(0,qe.getBlockType)(Lt))return;const s=(e=>(0,qe.getBlockVariations)(Lt)?.find((({patterns:t})=>((e,t=[])=>t.some((t=>e.match(t))))(e,t))))(o),c="wordpress"===r||l===zt;if(!c&&s&&(s.attributes.providerNameSlug!==r||!r))return(0,qe.createBlock)(Lt,{url:o,...i,...s.attributes});const u=(0,qe.getBlockVariations)(Lt)?.find((({name:e})=>"wordpress"===e));return u&&n&&Vt(n.html)&&!c?(0,qe.createBlock)(Lt,{url:o,...u.attributes,...t}):void 0},$t=e=>{if(!e)return e;const t=Mt.reduce(((e,{className:t})=>(e[t]=!1,e)),{"wp-has-aspect-ratio":!1});return Pt()(e,t)};function Gt(e,t,n=!0){if(!n)return $t(t);const a=document.implementation.createHTMLDocument("");a.body.innerHTML=e;const o=a.body.querySelector("iframe");if(o&&o.height&&o.width){const e=(o.width/o.height).toFixed(2);for(let n=0;n=a.ratio){return e-a.ratio>.1?$t(t):Pt()($t(t),a.className,"wp-has-aspect-ratio")}}}return t}const Ot=It(((e,t,n,a,o=!0)=>{if(!e)return{};const r={};let{type:l="rich"}=e;const{html:i,provider_name:s}=e,c=Dt((s||t).toLowerCase());return Vt(i)&&(l=zt),(i||"photo"===l)&&(r.type=l,r.providerNameSlug=c),(u=n)&&Mt.some((({className:e})=>u.includes(e)))||(r.className=Gt(i,n,a&&o)),r;var u})),Ut=["audio"];var qt=function({attributes:e,className:t,setAttributes:n,onReplace:a,isSelected:o,insertBlocksAfter:r}){const{id:l,autoplay:i,caption:s,loop:c,preload:u,src:m}=e,p=(0,Tt.usePrevious)(s),[d,g]=(0,je.useState)(!!s),h=!l&&(0,Ct.isBlobURL)(m),_=(0,ut.useSelect)((e=>{const{getSettings:t}=e(Je.store);return t().mediaUpload}),[]);(0,je.useEffect)((()=>{if(!l&&(0,Ct.isBlobURL)(m)){const e=(0,Ct.getBlobByURL)(m);e&&_({filesList:[e],onFileChange:([e])=>x(e),onError:e=>k(e),allowedTypes:Ut})}}),[]),(0,je.useEffect)((()=>{s&&!p&&g(!0)}),[s,p]);const b=(0,je.useCallback)((e=>{e&&!s&&e.focus()}),[s]);function f(e){return t=>{n({[e]:t})}}function v(e){if(e!==m){const t=Ft({attributes:{url:e}});if(void 0!==t&&a)return void a(t);n({src:e,id:void 0})}}(0,je.useEffect)((()=>{o||s||g(!1)}),[o,s]);const{createErrorNotice:y}=(0,ut.useDispatch)(Bt.store);function k(e){y(e,{type:"snackbar"})}function x(e){e&&e.url?n({src:e.url,id:e.id,caption:e.caption}):n({src:void 0,id:void 0,caption:void 0})}const w=it()(t,{"is-transient":h}),E=(0,Je.useBlockProps)({className:w});return m?(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.BlockControls,{group:"block"},(0,je.createElement)(Ke.ToolbarButton,{onClick:()=>{g(!d),d&&s&&n({caption:void 0})},icon:St,isPressed:d,label:d?(0,Ye.__)("Remove caption"):(0,Ye.__)("Add caption")})),(0,je.createElement)(Je.BlockControls,{group:"other"},(0,je.createElement)(Je.MediaReplaceFlow,{mediaId:l,mediaURL:m,allowedTypes:Ut,accept:"audio/*",onSelect:x,onSelectURL:v,onError:k})),(0,je.createElement)(Je.InspectorControls,null,(0,je.createElement)(Ke.PanelBody,{title:(0,Ye.__)("Settings")},(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Autoplay"),onChange:f("autoplay"),checked:i,help:function(e){return e?(0,Ye.__)("Autoplay may cause usability issues for some users."):null}}),(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Loop"),onChange:f("loop"),checked:c}),(0,je.createElement)(Ke.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Ye._x)("Preload","noun; Audio block parameter"),value:u||"",onChange:e=>n({preload:e||void 0}),options:[{value:"",label:(0,Ye.__)("Browser default")},{value:"auto",label:(0,Ye.__)("Auto")},{value:"metadata",label:(0,Ye.__)("Metadata")},{value:"none",label:(0,Ye._x)("None","Preload value")}]}))),(0,je.createElement)("figure",{...E},(0,je.createElement)(Ke.Disabled,{isDisabled:!o},(0,je.createElement)("audio",{controls:"controls",src:m})),h&&(0,je.createElement)(Ke.Spinner,null),d&&(!Je.RichText.isEmpty(s)||o)&&(0,je.createElement)(Je.RichText,{identifier:"caption",tagName:"figcaption",className:(0,Je.__experimentalGetElementClassName)("caption"),ref:b,"aria-label":(0,Ye.__)("Audio caption text"),placeholder:(0,Ye.__)("Add caption"),value:s,onChange:e=>n({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>r((0,qe.createBlock)((0,qe.getDefaultBlockName)()))}))):(0,je.createElement)("div",{...E},(0,je.createElement)(Je.MediaPlaceholder,{icon:(0,je.createElement)(Je.BlockIcon,{icon:wt}),onSelect:x,onSelectURL:v,accept:"audio/*",allowedTypes:Ut,value:e,onError:k}))};const jt={from:[{type:"files",isMatch(e){return 1===e.length&&0===e[0].type.indexOf("audio/")},transform(e){const t=e[0];return(0,qe.createBlock)("core/audio",{src:(0,Ct.createBlobURL)(t)})}},{type:"shortcode",tag:"audio",attributes:{src:{type:"string",shortcode:({named:{src:e,mp3:t,m4a:n,ogg:a,wav:o,wma:r}})=>e||t||n||a||o||r},loop:{type:"string",shortcode:({named:{loop:e}})=>e},autoplay:{type:"string",shortcode:({named:{autoplay:e}})=>e},preload:{type:"string",shortcode:({named:{preload:e}})=>e}}}]};var Wt=jt;const Zt={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/audio",title:"Audio",category:"media",description:"Embed a simple audio player.",keywords:["music","sound","podcast","recording"],textdomain:"default",attributes:{src:{type:"string",source:"attribute",selector:"audio",attribute:"src",__experimentalRole:"content"},caption:{type:"string",source:"html",selector:"figcaption",__experimentalRole:"content"},id:{type:"number",__experimentalRole:"content"},autoplay:{type:"boolean",source:"attribute",selector:"audio",attribute:"autoplay"},loop:{type:"boolean",source:"attribute",selector:"audio",attribute:"loop"},preload:{type:"string",source:"attribute",selector:"audio",attribute:"preload"}},supports:{anchor:!0,align:!0,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}}},editorStyle:"wp-block-audio-editor",style:"wp-block-audio"},{name:Qt}=Zt,Kt={icon:wt,example:{attributes:{src:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg"},viewportWidth:350},transforms:Wt,deprecated:Et,edit:qt,save:function({attributes:e}){const{autoplay:t,caption:n,loop:a,preload:o,src:r}=e;return r&&(0,je.createElement)("figure",{...Je.useBlockProps.save()},(0,je.createElement)("audio",{controls:"controls",src:r,autoPlay:t,loop:a,preload:o}),!Je.RichText.isEmpty(n)&&(0,je.createElement)(Je.RichText.Content,{tagName:"figcaption",value:n,className:(0,Je.__experimentalGetElementClassName)("caption")}))}},Yt=()=>Qe({name:Qt,metadata:Zt,settings:Kt});var Jt=(0,je.createElement)(We.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,je.createElement)(We.Path,{d:"M8 12.5h8V11H8v1.5Z M19 6.5H5a2 2 0 0 0-2 2V15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a2 2 0 0 0-2-2ZM5 8h14a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V8.5A.5.5 0 0 1 5 8Z"}));const{cleanEmptyObject:Xt}=At(Je.privateApis);function en(e){if(!e?.style?.typography?.fontFamily)return e;const{fontFamily:t,...n}=e.style.typography;return{...e,style:Xt({...e.style,typography:n}),fontFamily:t.split("|").pop()}}const tn=e=>{const{borderRadius:t,...n}=e,a=[t,n.style?.border?.radius].find((e=>"number"==typeof e&&0!==e));return a?{...n,style:{...n.style,border:{...n.style?.border,radius:`${a}px`}}}:n};const nn=e=>{if(!e.customTextColor&&!e.customBackgroundColor&&!e.customGradient)return e;const t={color:{}};e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),e.customGradient&&(t.color.gradient=e.customGradient);const{customTextColor:n,customBackgroundColor:a,customGradient:o,...r}=e;return{...r,style:t}},an=e=>{const{color:t,textColor:n,...a}={...e,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.color&&"#"===e.color[0]?e.color:void 0};return nn(a)},on={url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"}},rn={attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,__experimentalFontFamily:!0,__experimentalDefaultControls:{fontSize:!0}},reusable:!1,spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}},__experimentalSelector:".wp-block-button__link"},save({attributes:e,className:t}){const{fontSize:n,linkTarget:a,rel:o,style:r,text:l,title:i,url:s,width:c}=e;if(!l)return null;const u=(0,Je.__experimentalGetBorderClassesAndStyles)(e),m=(0,Je.__experimentalGetColorClassesAndStyles)(e),p=(0,Je.__experimentalGetSpacingClassesAndStyles)(e),d=it()("wp-block-button__link",m.className,u.className,{"no-border-radius":0===r?.border?.radius}),g={...u.style,...m.style,...p.style},h=it()(t,{[`has-custom-width wp-block-button__width-${c}`]:c,"has-custom-font-size":n||r?.typography?.fontSize});return(0,je.createElement)("div",{...Je.useBlockProps.save({className:h})},(0,je.createElement)(Je.RichText.Content,{tagName:"a",className:d,href:s,title:i,style:g,value:l,target:a,rel:o}))}},ln={attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},reusable:!1,spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0},__experimentalSelector:".wp-block-button__link"},save({attributes:e,className:t}){const{fontSize:n,linkTarget:a,rel:o,style:r,text:l,title:i,url:s,width:c}=e;if(!l)return null;const u=(0,Je.__experimentalGetBorderClassesAndStyles)(e),m=(0,Je.__experimentalGetColorClassesAndStyles)(e),p=(0,Je.__experimentalGetSpacingClassesAndStyles)(e),d=it()("wp-block-button__link",m.className,u.className,{"no-border-radius":0===r?.border?.radius}),g={...u.style,...m.style,...p.style},h=it()(t,{[`has-custom-width wp-block-button__width-${c}`]:c,"has-custom-font-size":n||r?.typography?.fontSize});return(0,je.createElement)("div",{...Je.useBlockProps.save({className:h})},(0,je.createElement)(Je.RichText.Content,{tagName:"a",className:d,href:s,title:i,style:g,value:l,target:a,rel:o}))},migrate:en,isEligible({style:e}){return e?.typography?.fontFamily}},sn=[rn,ln,{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...on,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},isEligible({style:e}){return"number"==typeof e?.border?.radius},save({attributes:e,className:t}){const{fontSize:n,linkTarget:a,rel:o,style:r,text:l,title:i,url:s,width:c}=e;if(!l)return null;const u=r?.border?.radius,m=(0,Je.__experimentalGetColorClassesAndStyles)(e),p=it()("wp-block-button__link",m.className,{"no-border-radius":0===r?.border?.radius}),d={borderRadius:u||void 0,...m.style},g=it()(t,{[`has-custom-width wp-block-button__width-${c}`]:c,"has-custom-font-size":n||r?.typography?.fontSize});return(0,je.createElement)("div",{...Je.useBlockProps.save({className:g})},(0,je.createElement)(Je.RichText.Content,{tagName:"a",className:p,href:s,title:i,style:d,value:l,target:a,rel:o}))},migrate:(0,Tt.compose)(en,tn)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...on,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"},width:{type:"number"}},save({attributes:e,className:t}){const{borderRadius:n,linkTarget:a,rel:o,text:r,title:l,url:i,width:s}=e,c=(0,Je.__experimentalGetColorClassesAndStyles)(e),u=it()("wp-block-button__link",c.className,{"no-border-radius":0===n}),m={borderRadius:n?n+"px":void 0,...c.style},p=it()(t,{[`has-custom-width wp-block-button__width-${s}`]:s});return(0,je.createElement)("div",{...Je.useBlockProps.save({className:p})},(0,je.createElement)(Je.RichText.Content,{tagName:"a",className:u,href:i,title:l,style:m,value:r,target:a,rel:o}))},migrate:(0,Tt.compose)(en,tn)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...on,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"},width:{type:"number"}},save({attributes:e,className:t}){const{borderRadius:n,linkTarget:a,rel:o,text:r,title:l,url:i,width:s}=e,c=(0,Je.__experimentalGetColorClassesAndStyles)(e),u=it()("wp-block-button__link",c.className,{"no-border-radius":0===n}),m={borderRadius:n?n+"px":void 0,...c.style},p=it()(t,{[`has-custom-width wp-block-button__width-${s}`]:s});return(0,je.createElement)("div",{...Je.useBlockProps.save({className:p})},(0,je.createElement)(Je.RichText.Content,{tagName:"a",className:u,href:i,title:l,style:m,value:r,target:a,rel:o}))},migrate:(0,Tt.compose)(en,tn)},{supports:{align:!0,alignWide:!1,color:{gradients:!0}},attributes:{...on,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"}},save({attributes:e}){const{borderRadius:t,linkTarget:n,rel:a,text:o,title:r,url:l}=e,i=it()("wp-block-button__link",{"no-border-radius":0===t}),s={borderRadius:t?t+"px":void 0};return(0,je.createElement)(Je.RichText.Content,{tagName:"a",className:i,href:l,title:r,style:s,value:o,target:n,rel:a})},migrate:tn},{supports:{align:!0,alignWide:!1},attributes:{...on,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},customGradient:{type:"string"},gradient:{type:"string"}},isEligible:e=>!!(e.customTextColor||e.customBackgroundColor||e.customGradient||e.align),migrate:(0,Tt.compose)(tn,nn,(function(e){if(!e.align)return e;const{align:t,...n}=e;return{...n,className:it()(n.className,`align${e.align}`)}})),save({attributes:e}){const{backgroundColor:t,borderRadius:n,customBackgroundColor:a,customTextColor:o,customGradient:r,linkTarget:l,gradient:i,rel:s,text:c,textColor:u,title:m,url:p}=e,d=(0,Je.getColorClassName)("color",u),g=!r&&(0,Je.getColorClassName)("background-color",t),h=(0,Je.__experimentalGetGradientClass)(i),_=it()("wp-block-button__link",{"has-text-color":u||o,[d]:d,"has-background":t||a||r||i,[g]:g,"no-border-radius":0===n,[h]:h}),b={background:r||void 0,backgroundColor:g||r||i?void 0:a,color:d?void 0:o,borderRadius:n?n+"px":void 0};return(0,je.createElement)("div",null,(0,je.createElement)(Je.RichText.Content,{tagName:"a",className:_,href:p,title:m,style:b,value:c,target:l,rel:s}))}},{attributes:{...on,align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"}},isEligible(e){return e.className&&e.className.includes("is-style-squared")},migrate(e){let t=e.className;return t&&(t=t.replace(/is-style-squared[\s]?/,"").trim()),tn(nn({...e,className:t||void 0,borderRadius:0}))},save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,customTextColor:a,linkTarget:o,rel:r,text:l,textColor:i,title:s,url:c}=e,u=(0,Je.getColorClassName)("color",i),m=(0,Je.getColorClassName)("background-color",t),p=it()("wp-block-button__link",{"has-text-color":i||a,[u]:u,"has-background":t||n,[m]:m}),d={backgroundColor:m?void 0:n,color:u?void 0:a};return(0,je.createElement)("div",null,(0,je.createElement)(Je.RichText.Content,{tagName:"a",className:p,href:c,title:s,style:d,value:l,target:o,rel:r}))}},{attributes:{...on,align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"}},migrate:an,save({attributes:e}){const{url:t,text:n,title:a,backgroundColor:o,textColor:r,customBackgroundColor:l,customTextColor:i}=e,s=(0,Je.getColorClassName)("color",r),c=(0,Je.getColorClassName)("background-color",o),u=it()("wp-block-button__link",{"has-text-color":r||i,[s]:s,"has-background":o||l,[c]:c}),m={backgroundColor:c?void 0:l,color:s?void 0:i};return(0,je.createElement)("div",null,(0,je.createElement)(Je.RichText.Content,{tagName:"a",className:u,href:t,title:a,style:m,value:n}))}},{attributes:{...on,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save({attributes:e}){const{url:t,text:n,title:a,align:o,color:r,textColor:l}=e,i={backgroundColor:r,color:l};return(0,je.createElement)("div",{className:`align${o}`},(0,je.createElement)(Je.RichText.Content,{tagName:"a",className:"wp-block-button__link",href:t,title:a,style:i,value:n}))},migrate:an},{attributes:{...on,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save({attributes:e}){const{url:t,text:n,title:a,align:o,color:r,textColor:l}=e;return(0,je.createElement)("div",{className:`align${o}`,style:{backgroundColor:r}},(0,je.createElement)(Je.RichText.Content,{tagName:"a",href:t,title:a,style:{color:l},value:n}))},migrate:an}];var cn=sn,un=window.wp.keycodes;var mn=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"}));var pn=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"}));const dn="noreferrer noopener";function gn({selectedWidth:e,setAttributes:t}){return(0,je.createElement)(Ke.PanelBody,{title:(0,Ye.__)("Width settings")},(0,je.createElement)(Ke.ButtonGroup,{"aria-label":(0,Ye.__)("Button width")},[25,50,75,100].map((n=>(0,je.createElement)(Ke.Button,{key:n,size:"small",variant:n===e?"primary":void 0,onClick:()=>{var a;t({width:e===(a=n)?void 0:a})}},n,"%")))))}var hn=function(e){const{attributes:t,setAttributes:n,className:a,isSelected:o,onReplace:r,mergeBlocks:l}=e,{tagName:i,textAlign:s,linkTarget:c,placeholder:u,rel:m,style:p,text:d,url:g,width:h}=t,_=i||"a",[b,f]=(0,je.useState)(null),v=(0,Je.__experimentalUseBorderProps)(t),y=(0,Je.__experimentalUseColorProps)(t),k=(0,Je.__experimentalGetSpacingClassesAndStyles)(t),x=(0,je.useRef)(),w=(0,je.useRef)(),E=(0,Je.useBlockProps)({ref:(0,Tt.useMergeRefs)([f,x]),onKeyDown:function(e){un.isKeyboardEvent.primary(e,"k")?P(e):un.isKeyboardEvent.primaryShift(e,"k")&&(I(),w.current?.focus())}}),[C,S]=(0,je.useState)(!1),B=!!g,T="_blank"===c,N="a"===_;function P(e){e.preventDefault(),S(!0)}function I(){n({url:void 0,linkTarget:void 0,rel:void 0}),S(!1)}(0,je.useEffect)((()=>{o||S(!1)}),[o]);const M=(0,je.useMemo)((()=>({url:g,opensInNewTab:T})),[g,T]);return(0,je.createElement)(je.Fragment,null,(0,je.createElement)("div",{...E,className:it()(E.className,{[`has-custom-width wp-block-button__width-${h}`]:h,"has-custom-font-size":E.style.fontSize})},(0,je.createElement)(Je.RichText,{ref:w,"aria-label":(0,Ye.__)("Button text"),placeholder:u||(0,Ye.__)("Add text…"),value:d,onChange:e=>{n({text:e.replace(/<\/?a[^>]*>/g,"")})},withoutInteractiveFormatting:!0,className:it()(a,"wp-block-button__link",y.className,v.className,{[`has-text-align-${s}`]:s,"no-border-radius":0===p?.border?.radius},(0,Je.__experimentalGetElementClassName)("button")),style:{...v.style,...y.style,...k.style},onSplit:e=>(0,qe.createBlock)("core/button",{...t,text:e}),onReplace:r,onMerge:l,identifier:"text"})),(0,je.createElement)(Je.BlockControls,{group:"block"},(0,je.createElement)(Je.AlignmentControl,{value:s,onChange:e=>{n({textAlign:e})}}),!B&&N&&(0,je.createElement)(Ke.ToolbarButton,{name:"link",icon:mn,title:(0,Ye.__)("Link"),shortcut:un.displayShortcut.primary("k"),onClick:P}),B&&N&&(0,je.createElement)(Ke.ToolbarButton,{name:"link",icon:pn,title:(0,Ye.__)("Unlink"),shortcut:un.displayShortcut.primaryShift("k"),onClick:I,isActive:!0})),N&&o&&(C||B)&&(0,je.createElement)(Ke.Popover,{placement:"bottom",onClose:()=>{S(!1),w.current?.focus()},anchor:b,focusOnMount:!!C&&"firstElement",__unstableSlotName:"__unstable-block-tools-after",shift:!0},(0,je.createElement)(Je.__experimentalLinkControl,{value:M,onChange:({url:e="",opensInNewTab:t})=>{n({url:(0,st.prependHTTP)(e)}),T!==t&&function(e){const t=e?"_blank":void 0;let a=m;t&&!m?a=dn:t||m!==dn||(a=void 0),n({linkTarget:t,rel:a})}(t)},onRemove:()=>{I(),w.current?.focus()},forceIsEditingLink:C})),(0,je.createElement)(Je.InspectorControls,null,(0,je.createElement)(gn,{selectedWidth:h,setAttributes:n})),(0,je.createElement)(Je.InspectorControls,{group:"advanced"},N&&(0,je.createElement)(Ke.TextControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Link rel"),value:m||"",onChange:e=>n({rel:e})})))};const _n={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/button",title:"Button",category:"design",parent:["core/buttons"],description:"Prompt visitors to take action with a button-style link.",keywords:["link"],textdomain:"default",attributes:{tagName:{type:"string",enum:["a","button"],default:"a"},type:{type:"string",default:"button"},textAlign:{type:"string"},url:{type:"string",source:"attribute",selector:"a",attribute:"href",__experimentalRole:"content"},title:{type:"string",source:"attribute",selector:"a,button",attribute:"title",__experimentalRole:"content"},text:{type:"string",source:"html",selector:"a,button",__experimentalRole:"content"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target",__experimentalRole:"content"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel",__experimentalRole:"content"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,align:!1,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},reusable:!1,shadow:!0,spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},__experimentalSelector:".wp-block-button .wp-block-button__link"},styles:[{name:"fill",label:"Fill",isDefault:!0},{name:"outline",label:"Outline"}],editorStyle:"wp-block-button-editor",style:"wp-block-button"},{name:bn}=_n,fn={icon:Jt,example:{attributes:{className:"is-style-fill",text:(0,Ye.__)("Call to Action")}},edit:hn,save:function({attributes:e,className:t}){const{tagName:n,type:a,textAlign:o,fontSize:r,linkTarget:l,rel:i,style:s,text:c,title:u,url:m,width:p}=e;if(!c)return null;const d=n||"a",g="button"===d,h=a||"button",_=(0,Je.__experimentalGetBorderClassesAndStyles)(e),b=(0,Je.__experimentalGetColorClassesAndStyles)(e),f=(0,Je.__experimentalGetSpacingClassesAndStyles)(e),v=it()("wp-block-button__link",b.className,_.className,{[`has-text-align-${o}`]:o,"no-border-radius":0===s?.border?.radius},(0,Je.__experimentalGetElementClassName)("button")),y={..._.style,...b.style,...f.style},k=it()(t,{[`has-custom-width wp-block-button__width-${p}`]:p,"has-custom-font-size":r||s?.typography?.fontSize});return(0,je.createElement)("div",{...Je.useBlockProps.save({className:k})},(0,je.createElement)(Je.RichText.Content,{tagName:d,type:g?h:null,className:v,href:g?null:m,title:u,style:y,value:c,target:g?null:l,rel:g?null:i}))},deprecated:cn,merge:(e,{text:t=""})=>({...e,text:(e.text||"")+t})},vn=()=>Qe({name:bn,metadata:_n,settings:fn});var yn=(0,je.createElement)(We.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,je.createElement)(We.Path,{d:"M14.5 17.5H9.5V16H14.5V17.5Z M14.5 8H9.5V6.5H14.5V8Z M7 3.5H17C18.1046 3.5 19 4.39543 19 5.5V9C19 10.1046 18.1046 11 17 11H7C5.89543 11 5 10.1046 5 9V5.5C5 4.39543 5.89543 3.5 7 3.5ZM17 5H7C6.72386 5 6.5 5.22386 6.5 5.5V9C6.5 9.27614 6.72386 9.5 7 9.5H17C17.2761 9.5 17.5 9.27614 17.5 9V5.5C17.5 5.22386 17.2761 5 17 5Z M7 13H17C18.1046 13 19 13.8954 19 15V18.5C19 19.6046 18.1046 20.5 17 20.5H7C5.89543 20.5 5 19.6046 5 18.5V15C5 13.8954 5.89543 13 7 13ZM17 14.5H7C6.72386 14.5 6.5 14.7239 6.5 15V18.5C6.5 18.7761 6.72386 19 7 19H17C17.2761 19 17.5 18.7761 17.5 18.5V15C17.5 14.7239 17.2761 14.5 17 14.5Z"}));const kn=e=>{if(e.layout)return e;const{contentJustification:t,orientation:n,...a}=e;return(t||n)&&Object.assign(a,{layout:{type:"flex",...t&&{justifyContent:t},...n&&{orientation:n}}}),a},xn=[{attributes:{contentJustification:{type:"string"},orientation:{type:"string",default:"horizontal"}},supports:{anchor:!0,align:["wide","full"],__experimentalExposeControlsToChildren:!0,spacing:{blockGap:!0,margin:["top","bottom"],__experimentalDefaultControls:{blockGap:!0}}},isEligible:({contentJustification:e,orientation:t})=>!!e||!!t,migrate:kn,save({attributes:{contentJustification:e,orientation:t}}){return(0,je.createElement)("div",{...Je.useBlockProps.save({className:it()({[`is-content-justification-${e}`]:e,"is-vertical":"vertical"===t})})},(0,je.createElement)(Je.InnerBlocks.Content,null))}},{supports:{align:["center","left","right"],anchor:!0},save(){return(0,je.createElement)("div",null,(0,je.createElement)(Je.InnerBlocks.Content,null))},isEligible({align:e}){return e&&["center","left","right"].includes(e)},migrate(e){return kn({...e,align:void 0,contentJustification:e.align})}}];var wn=xn,En=window.wp.richText;const Cn={from:[{type:"block",isMultiBlock:!0,blocks:["core/button"],transform:e=>(0,qe.createBlock)("core/buttons",{},e.map((e=>(0,qe.createBlock)("core/button",e))))},{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>(0,qe.createBlock)("core/buttons",{},e.map((e=>{const t=(0,En.__unstableCreateElement)(document,e.content),n=t.innerText||"",a=t.querySelector("a"),o=a?.getAttribute("href");return(0,qe.createBlock)("core/button",{text:n,url:o})}))),isMatch:e=>e.every((e=>{const t=(0,En.__unstableCreateElement)(document,e.content),n=t.innerText||"",a=t.querySelectorAll("a");return n.length<=30&&a.length<=1}))}]};var Sn=Cn;const Bn=[bn],Tn={name:bn,attributesToCopy:["backgroundColor","border","className","fontFamily","fontSize","gradient","style","textColor","width"]};var Nn=function({attributes:e,className:t}){var n;const{fontSize:a,layout:o,style:r}=e,l=(0,Je.useBlockProps)({className:it()(t,{"has-custom-font-size":a||r?.typography?.fontSize})}),{preferredStyle:i,hasButtonVariations:s}=(0,ut.useSelect)((e=>{const t=e(Je.store).getSettings().__experimentalPreferredStyleVariations,n=e(qe.store).getBlockVariations(bn,"inserter");return{preferredStyle:t?.value?.[bn],hasButtonVariations:n.length>0}}),[]),c=(0,Je.useInnerBlocksProps)(l,{allowedBlocks:Bn,defaultBlock:Tn,directInsert:!s,template:[[bn,{className:i&&`is-style-${i}`}]],templateInsertUpdatesSelection:!0,orientation:null!==(n=o?.orientation)&&void 0!==n?n:"horizontal"});return(0,je.createElement)("div",{...c})};const Pn={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/buttons",title:"Buttons",category:"design",description:"Prompt visitors to take action with a group of button-style links.",keywords:["link"],textdomain:"default",supports:{anchor:!0,align:["wide","full"],html:!1,__experimentalExposeControlsToChildren:!0,spacing:{blockGap:!0,margin:["top","bottom"],__experimentalDefaultControls:{blockGap:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},layout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}}},editorStyle:"wp-block-buttons-editor",style:"wp-block-buttons"},{name:In}=Pn,Mn={icon:yn,example:{innerBlocks:[{name:"core/button",attributes:{text:(0,Ye.__)("Find out more")}},{name:"core/button",attributes:{text:(0,Ye.__)("Contact us")}}]},deprecated:wn,transforms:Sn,edit:Nn,save:function({attributes:e,className:t}){const{fontSize:n,style:a}=e,o=Je.useBlockProps.save({className:it()(t,{"has-custom-font-size":n||a?.typography?.fontSize})}),r=Je.useInnerBlocksProps.save(o);return(0,je.createElement)("div",{...r})}},zn=()=>Qe({name:In,metadata:Pn,settings:Mn});var Rn=(0,je.createElement)(We.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,je.createElement)(We.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z"}));const Hn=It((e=>{if(!e)return{};const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()+1}}));var An={from:[{type:"block",blocks:["core/archives"],transform:()=>(0,qe.createBlock)("core/calendar")}],to:[{type:"block",blocks:["core/archives"],transform:()=>(0,qe.createBlock)("core/archives")}]};const Ln={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/calendar",title:"Calendar",category:"widgets",description:"A calendar of your site’s posts.",keywords:["posts","archive"],textdomain:"default",attributes:{month:{type:"integer"},year:{type:"integer"}},supports:{align:!0,color:{link:!0,__experimentalSkipSerialization:["text","background"],__experimentalDefaultControls:{background:!0,text:!0},__experimentalSelector:"table, th"},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},style:"wp-block-calendar"},{name:Dn}=Ln,Vn={icon:Rn,example:{},edit:function({attributes:e}){const t=(0,Je.useBlockProps)(),{date:n,hasPosts:a,hasPostsResolved:o}=(0,ut.useSelect)((e=>{const{getEntityRecords:t,hasFinishedResolution:n}=e(ct.store),a={status:"publish",per_page:1},o=t("postType","post",a),r=n("getEntityRecords",["postType","post",a]);let l;const i=e("core/editor");if(i){"post"===i.getEditedPostAttribute("type")&&(l=i.getEditedPostAttribute("date"))}return{date:l,hasPostsResolved:r,hasPosts:r&&1===o?.length}}),[]);return a?(0,je.createElement)("div",{...t},(0,je.createElement)(Ke.Disabled,null,(0,je.createElement)(et(),{block:"core/calendar",attributes:{...e,...Hn(n)}}))):(0,je.createElement)("div",{...t},(0,je.createElement)(Ke.Placeholder,{icon:Rn,label:(0,Ye.__)("Calendar")},o?(0,Ye.__)("No published posts found."):(0,je.createElement)(Ke.Spinner,null)))},transforms:An},Fn=()=>Qe({name:Dn,metadata:Ln,settings:Vn});var $n=(0,je.createElement)(We.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,je.createElement)(We.Path,{d:"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",fillRule:"evenodd",clipRule:"evenodd"})),Gn=window.wp.htmlEntities;var On=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"m21.5 9.1-6.6-6.6-4.2 5.6c-1.2-.1-2.4.1-3.6.7-.1 0-.1.1-.2.1-.5.3-.9.6-1.2.9l3.7 3.7-5.7 5.7v1.1h1.1l5.7-5.7 3.7 3.7c.4-.4.7-.8.9-1.2.1-.1.1-.2.2-.3.6-1.1.8-2.4.6-3.6l5.6-4.1zm-7.3 3.5.1.9c.1.9 0 1.8-.4 2.6l-6-6c.8-.4 1.7-.5 2.6-.4l.9.1L15 4.9 19.1 9l-4.9 3.6z"}));const Un={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/categories",title:"Categories List",category:"widgets",description:"Display a list of all categories.",textdomain:"default",attributes:{displayAsDropdown:{type:"boolean",default:!1},showHierarchy:{type:"boolean",default:!1},showPostCounts:{type:"boolean",default:!1},showOnlyTopLevel:{type:"boolean",default:!1},showEmpty:{type:"boolean",default:!1}},supports:{align:!0,html:!1,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-categories-editor",style:"wp-block-categories"},{name:qn}=Un,jn={icon:$n,example:{},edit:function e({attributes:{displayAsDropdown:t,showHierarchy:n,showPostCounts:a,showOnlyTopLevel:o,showEmpty:r},setAttributes:l,className:i}){const s=(0,Tt.useInstanceId)(e,"blocks-category-select"),c={per_page:-1,hide_empty:!r,context:"view"};o&&(c.parent=0);const{records:u,isResolving:m}=(0,ct.useEntityRecords)("taxonomy","category",c),p=e=>u?.length?null===e?u:u.filter((({parent:t})=>t===e)):[],d=e=>t=>l({[e]:t}),g=e=>e?(0,Gn.decodeEntities)(e).trim():(0,Ye.__)("(Untitled)"),h=e=>{const t=p(e.id),{id:o,link:r,count:l,name:i}=e;return(0,je.createElement)("li",{key:o,className:`cat-item cat-item-${o}`},(0,je.createElement)("a",{href:r,target:"_blank",rel:"noreferrer noopener"},g(i)),a&&` (${l})`,n&&!!t.length&&(0,je.createElement)("ul",{className:"children"},t.map((e=>h(e)))))},_=(e,t)=>{const{id:o,count:r,name:l}=e,i=p(o);return[(0,je.createElement)("option",{key:o,className:`level-${t}`},Array.from({length:3*t}).map((()=>" ")),g(l),a&&` (${r})`),n&&!!i.length&&i.map((e=>_(e,t+1)))]},b=!u?.length||t||m?"div":"ul",f=it()(i,{"wp-block-categories-list":!!u?.length&&!t&&!m,"wp-block-categories-dropdown":!!u?.length&&t&&!m}),v=(0,Je.useBlockProps)({className:f});return(0,je.createElement)(b,{...v},(0,je.createElement)(Je.InspectorControls,null,(0,je.createElement)(Ke.PanelBody,{title:(0,Ye.__)("Settings")},(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Display as dropdown"),checked:t,onChange:d("displayAsDropdown")}),(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Show post counts"),checked:a,onChange:d("showPostCounts")}),(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Show only top level categories"),checked:o,onChange:d("showOnlyTopLevel")}),(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Show empty categories"),checked:r,onChange:d("showEmpty")}),!o&&(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Show hierarchy"),checked:n,onChange:d("showHierarchy")}))),m&&(0,je.createElement)(Ke.Placeholder,{icon:On,label:(0,Ye.__)("Categories")},(0,je.createElement)(Ke.Spinner,null)),!m&&0===u?.length&&(0,je.createElement)("p",null,(0,Ye.__)("Your site does not have any posts, so there is nothing to display here at the moment.")),!m&&u?.length>0&&(t?(()=>{const e=p(n?0:null);return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Ke.VisuallyHidden,{as:"label",htmlFor:s},(0,Ye.__)("Categories")),(0,je.createElement)("select",{id:s},(0,je.createElement)("option",null,(0,Ye.__)("Select Category")),e.map((e=>_(e,0)))))})():p(n?0:null).map((e=>h(e)))))}},Wn=()=>Qe({name:qn,metadata:Un,settings:jn});var Zn=(0,je.createElement)(We.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,je.createElement)(We.Path,{d:"M20 6H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H4c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h16c.3 0 .5.2.5.5v9zM10 10H8v2h2v-2zm-5 2h2v-2H5v2zm8-2h-2v2h2v-2zm-5 6h8v-2H8v2zm6-4h2v-2h-2v2zm3 0h2v-2h-2v2zm0 4h2v-2h-2v2zM5 16h2v-2H5v2z"}));var Qn=({clientId:e})=>{const{replaceBlocks:t}=(0,ut.useDispatch)(Je.store),n=(0,ut.useSelect)((t=>t(Je.store).getBlock(e)),[e]);return(0,je.createElement)(Ke.ToolbarButton,{onClick:()=>t(n.clientId,(0,qe.rawHandler)({HTML:(0,qe.serialize)(n)}))},(0,Ye.__)("Convert to blocks"))};var Kn=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z"}));function Yn({onClick:e,isModalFullScreen:t}){return(0,Tt.useViewportMatch)("small","<")?null:(0,je.createElement)(Ke.Button,{onClick:e,icon:Kn,isPressed:t,label:t?(0,Ye.__)("Exit fullscreen"):(0,Ye.__)("Enter fullscreen")})}function Jn(e){const t=(0,ut.useSelect)((e=>e(Je.store).getSettings().styles));return(0,je.useEffect)((()=>{const{baseURL:n,suffix:a,settings:o}=window.wpEditorL10n.tinymce;return window.tinymce.EditorManager.overrideDefaults({base_url:n,suffix:a}),window.wp.oldEditor.initialize(e.id,{tinymce:{...o,setup(e){e.on("init",(()=>{const n=e.getDoc();t.forEach((({css:e})=>{const t=n.createElement("style");t.innerHTML=e,n.head.appendChild(t)}))}))}}}),()=>{window.wp.oldEditor.remove(e.id)}}),[]),(0,je.createElement)("textarea",{...e})}function Xn(e){const{clientId:t,attributes:{content:n},setAttributes:a,onReplace:o}=e,[r,l]=(0,je.useState)(!1),[i,s]=(0,je.useState)(!1),c=`editor-${t}`,u=()=>n?l(!1):o([]);return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.BlockControls,null,(0,je.createElement)(Ke.ToolbarGroup,null,(0,je.createElement)(Ke.ToolbarButton,{onClick:()=>l(!0)},(0,Ye.__)("Edit")))),n&&(0,je.createElement)(je.RawHTML,null,n),(r||!n)&&(0,je.createElement)(Ke.Modal,{title:(0,Ye.__)("Classic Editor"),onRequestClose:u,shouldCloseOnClickOutside:!1,overlayClassName:"block-editor-freeform-modal",isFullScreen:i,className:"block-editor-freeform-modal__content",headerActions:(0,je.createElement)(Yn,{onClick:()=>s(!i),isModalFullScreen:i})},(0,je.createElement)(Jn,{id:c,defaultValue:n}),(0,je.createElement)(Ke.Flex,{className:"block-editor-freeform-modal__actions",justify:"flex-end",expanded:!1},(0,je.createElement)(Ke.FlexItem,null,(0,je.createElement)(Ke.Button,{variant:"tertiary",onClick:u},(0,Ye.__)("Cancel"))),(0,je.createElement)(Ke.FlexItem,null,(0,je.createElement)(Ke.Button,{variant:"primary",onClick:()=>{a({content:window.wp.oldEditor.getContent(c)}),l(!1)}},(0,Ye.__)("Save"))))))}const{wp:ea}=window;function ta({clientId:e,attributes:{content:t},setAttributes:n,onReplace:a}){const{getMultiSelectedBlockClientIds:o}=(0,ut.useSelect)(Je.store),r=(0,je.useRef)(!1);return(0,je.useEffect)((()=>{if(!r.current)return;const n=window.tinymce.get(`editor-${e}`),a=n?.getContent();a!==t&&n.setContent(t||"")}),[t]),(0,je.useEffect)((()=>{const{baseURL:l,suffix:i}=window.wpEditorL10n.tinymce;function s(e){let r;t&&e.on("loadContent",(()=>e.setContent(t))),e.on("blur",(()=>{r=e.selection.getBookmark(2,!0);const t=document.querySelector(".interface-interface-skeleton__content"),a=t.scrollTop;return o()?.length||n({content:e.getContent()}),e.once("focus",(()=>{r&&(e.selection.moveToBookmark(r),t.scrollTop!==a&&(t.scrollTop=a))})),!1})),e.on("mousedown touchstart",(()=>{r=null}));const l=(0,Tt.debounce)((()=>{const t=e.getContent();t!==e._lastChange&&(e._lastChange=t,n({content:t}))}),250);e.on("Paste Change input Undo Redo",l),e.on("remove",l.cancel),e.on("keydown",(t=>{un.isKeyboardEvent.primary(t,"z")&&t.stopPropagation(),t.keyCode!==un.BACKSPACE&&t.keyCode!==un.DELETE||!function(e){const t=e.getBody();return!(t.childNodes.length>1)&&(0===t.childNodes.length||!(t.childNodes[0].childNodes.length>1)&&/^\n?$/.test(t.innerText||t.textContent))}(e)||(a([]),t.preventDefault(),t.stopImmediatePropagation());const{altKey:n}=t;n&&t.keyCode===un.F10&&t.stopPropagation()})),e.on("init",(()=>{const t=e.getBody();t.ownerDocument.activeElement===t&&(t.blur(),e.focus())}))}function c(){const{settings:t}=window.wpEditorL10n.tinymce;ea.oldEditor.initialize(`editor-${e}`,{tinymce:{...t,inline:!0,content_css:!1,fixed_toolbar_container:`#toolbar-${e}`,setup:s}})}function u(){"complete"===document.readyState&&c()}return r.current=!0,window.tinymce.EditorManager.overrideDefaults({base_url:l,suffix:i}),"complete"===document.readyState?c():document.addEventListener("readystatechange",u),()=>{document.removeEventListener("readystatechange",u),ea.oldEditor.remove(`editor-${e}`)}}),[]),(0,je.createElement)(je.Fragment,null,(0,je.createElement)("div",{key:"toolbar",id:`toolbar-${e}`,className:"block-library-classic__toolbar",onClick:function(){const t=window.tinymce.get(`editor-${e}`);t&&t.focus()},"data-placeholder":(0,Ye.__)("Classic"),onKeyDown:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}}),(0,je.createElement)("div",{key:"editor",id:`editor-${e}`,className:"wp-block-freeform block-library-rich-text__tinymce"}))}const na={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/freeform",title:"Classic",category:"text",description:"Use the classic WordPress editor.",textdomain:"default",attributes:{content:{type:"string",source:"raw"}},supports:{className:!1,customClassName:!1,reusable:!1},editorStyle:"wp-block-freeform-editor"},{name:aa}=na,oa={icon:Zn,edit:function(e){const{clientId:t}=e,n=(0,ut.useSelect)((e=>e(Je.store).canRemoveBlock(t)),[t]),[a,o]=(0,je.useState)(!1),r=(0,Tt.useRefEffect)((e=>{o(e.ownerDocument!==document)}),[]);return(0,je.createElement)(je.Fragment,null,n&&(0,je.createElement)(Je.BlockControls,null,(0,je.createElement)(Ke.ToolbarGroup,null,(0,je.createElement)(Qn,{clientId:t}))),(0,je.createElement)("div",{...(0,Je.useBlockProps)({ref:r})},a?(0,je.createElement)(Xn,{...e}):(0,je.createElement)(ta,{...e})))},save:function({attributes:e}){const{content:t}=e;return(0,je.createElement)(je.RawHTML,null,t)}},ra=()=>Qe({name:aa,metadata:na,settings:oa});var la=(0,je.createElement)(We.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,je.createElement)(We.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"}));function ia(e){return e.replace(/\[/g,"[")}function sa(e){return e.replace(/^(\s*https?:)\/\/([^\s<>"]+\s*)$/m,"$1//$2")}var ca={from:[{type:"enter",regExp:/^```$/,transform:()=>(0,qe.createBlock)("core/code")},{type:"block",blocks:["core/html","core/paragraph"],transform:({content:e})=>(0,qe.createBlock)("core/code",{content:e})},{type:"raw",isMatch:e=>"PRE"===e.nodeName&&1===e.children.length&&"CODE"===e.firstChild.nodeName,schema:{pre:{children:{code:{children:{"#text":{}}}}}}}],to:[{type:"block",blocks:["core/paragraph"],transform:({content:e})=>(0,qe.createBlock)("core/paragraph",{content:e.replace(/\n/g,"
")})}]};const ua={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/code",title:"Code",category:"text",description:"Display code snippets that respect your spacing and tabs.",textdomain:"default",attributes:{content:{type:"string",source:"html",selector:"code",__unstablePreserveWhiteSpace:!0}},supports:{align:["wide"],anchor:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{margin:["top","bottom"],padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{width:!0,color:!0}},color:{text:!0,background:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}}},style:"wp-block-code"},{name:ma}=ua,pa={icon:la,example:{attributes:{content:(0,Ye.__)("// A “block” is the abstract term used\n// to describe units of markup that\n// when composed together, form the\n// content or layout of a page.\nregisterBlockType( name, settings );")}},merge(e,t){return{content:e.content+"\n\n"+t.content}},transforms:ca,edit:function({attributes:e,setAttributes:t,onRemove:n,insertBlocksAfter:a,mergeBlocks:o}){const r=(0,Je.useBlockProps)();return(0,je.createElement)("pre",{...r},(0,je.createElement)(Je.RichText,{tagName:"code",identifier:"content",value:e.content,onChange:e=>t({content:e}),onRemove:n,onMerge:o,placeholder:(0,Ye.__)("Write code…"),"aria-label":(0,Ye.__)("Code"),preserveWhiteSpace:!0,__unstablePastePlainText:!0,__unstableOnSplitAtDoubleLineEnd:()=>a((0,qe.createBlock)((0,qe.getDefaultBlockName)()))}))},save:function({attributes:e}){return(0,je.createElement)("pre",{...Je.useBlockProps.save()},(0,je.createElement)(Je.RichText.Content,{tagName:"code",value:(t=e.content,(0,Tt.pipe)(ia,sa)(t||""))}));var t}},da=()=>Qe({name:ma,metadata:ua,settings:pa});var ga=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zM6 17.5c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h3v10H6zm13.5-.5c0 .3-.2.5-.5.5h-3v-10h3c.3 0 .5.2.5.5v9z"}));const ha=[{attributes:{verticalAlignment:{type:"string"},width:{type:"number",min:0,max:100}},isEligible({width:e}){return isFinite(e)},migrate(e){return{...e,width:`${e.width}%`}},save({attributes:e}){const{verticalAlignment:t,width:n}=e,a=it()({[`is-vertically-aligned-${t}`]:t}),o={flexBasis:n+"%"};return(0,je.createElement)("div",{className:a,style:o},(0,je.createElement)(Je.InnerBlocks.Content,null))}}];var _a=ha;var ba=function({attributes:{verticalAlignment:e,width:t,templateLock:n,allowedBlocks:a},setAttributes:o,clientId:r}){const l=it()("block-core-columns",{[`is-vertically-aligned-${e}`]:e}),i=(0,Ke.__experimentalUseCustomUnits)({availableUnits:(0,Je.useSetting)("spacing.units")||["%","px","em","rem","vw"]}),{columnsIds:s,hasChildBlocks:c,rootClientId:u}=(0,ut.useSelect)((e=>{const{getBlockOrder:t,getBlockRootClientId:n}=e(Je.store),a=n(r);return{hasChildBlocks:t(r).length>0,rootClientId:a,columnsIds:t(a)}}),[r]),{updateBlockAttributes:m}=(0,ut.useDispatch)(Je.store),p=Number.isFinite(t)?t+"%":t,d=(0,Je.useBlockProps)({className:l,style:p?{flexBasis:p}:void 0}),g=s.length,h=s.indexOf(r)+1,_=(0,Ye.sprintf)((0,Ye.__)("%1$s (%2$d of %3$d)"),d["aria-label"],h,g),b=(0,Je.useInnerBlocksProps)({...d,"aria-label":_},{templateLock:n,allowedBlocks:a,renderAppender:c?void 0:Je.InnerBlocks.ButtonBlockAppender});return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.BlockControls,null,(0,je.createElement)(Je.BlockVerticalAlignmentToolbar,{onChange:e=>{o({verticalAlignment:e}),m(u,{verticalAlignment:null})},value:e,controls:["top","center","bottom","stretch"]})),(0,je.createElement)(Je.InspectorControls,null,(0,je.createElement)(Ke.PanelBody,{title:(0,Ye.__)("Column settings")},(0,je.createElement)(Ke.__experimentalUnitControl,{label:(0,Ye.__)("Width"),labelPosition:"edge",__unstableInputWidth:"80px",value:t||"",onChange:e=>{e=0>parseFloat(e)?"0":e,o({width:e})},units:i}))),(0,je.createElement)("div",{...b}))};const fa={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/column",title:"Column",category:"design",parent:["core/columns"],description:"A single column within a columns block.",textdomain:"default",attributes:{verticalAlignment:{type:"string"},width:{type:"string"},allowedBlocks:{type:"array"},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]}},supports:{__experimentalOnEnter:!0,anchor:!0,reusable:!1,html:!1,color:{gradients:!0,heading:!0,button:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{blockGap:!0,padding:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalBorder:{color:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},layout:!0}},{name:va}=fa,ya={icon:ga,edit:ba,save:function({attributes:e}){const{verticalAlignment:t,width:n}=e,a=it()({[`is-vertically-aligned-${t}`]:t});let o;if(n&&/\d/.test(n)){let e=Number.isFinite(n)?n+"%":n;if(!Number.isFinite(n)&&n?.endsWith("%")){const t=1e12;e=Math.round(Number.parseFloat(n)*t)/t+"%"}o={flexBasis:e}}const r=Je.useBlockProps.save({className:a,style:o}),l=Je.useInnerBlocksProps.save(r);return(0,je.createElement)("div",{...l})},deprecated:_a},ka=()=>Qe({name:va,metadata:fa,settings:ya});var xa=(0,je.createElement)(We.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,je.createElement)(We.Path,{d:"M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-4.1 1.5v10H10v-10h4.9zM5.5 17V8c0-.3.2-.5.5-.5h2.5v10H6c-.3 0-.5-.2-.5-.5zm14 0c0 .3-.2.5-.5.5h-2.6v-10H19c.3 0 .5.2.5.5v9z"}));function wa(e){let t,{doc:n}=wa;n||(n=document.implementation.createHTMLDocument(""),wa.doc=n),n.body.innerHTML=e;for(const e of n.body.firstChild.classList)if(t=e.match(/^layout-column-(\d+)$/))return Number(t[1])-1}var Ea=[{attributes:{verticalAlignment:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>{if(!e.customTextColor&&!e.customBackgroundColor)return e;const t={color:{}};e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor);const{customTextColor:n,customBackgroundColor:a,...o}=e;return{...o,style:t,isStackedOnMobile:!0}},save({attributes:e}){const{verticalAlignment:t,backgroundColor:n,customBackgroundColor:a,textColor:o,customTextColor:r}=e,l=(0,Je.getColorClassName)("background-color",n),i=(0,Je.getColorClassName)("color",o),s=it()({"has-background":n||a,"has-text-color":o||r,[l]:l,[i]:i,[`are-vertically-aligned-${t}`]:t}),c={backgroundColor:l?void 0:a,color:i?void 0:r};return(0,je.createElement)("div",{className:s||void 0,style:c},(0,je.createElement)(Je.InnerBlocks.Content,null))}},{attributes:{columns:{type:"number",default:2}},isEligible(e,t){return!!t.some((e=>/layout-column-\d+/.test(e.originalContent)))&&t.some((e=>void 0!==wa(e.originalContent)))},migrate(e,t){const n=t.reduce(((e,t)=>{const{originalContent:n}=t;let a=wa(n);return void 0===a&&(a=0),e[a]||(e[a]=[]),e[a].push(t),e}),[]).map((e=>(0,qe.createBlock)("core/column",{},e))),{columns:a,...o}=e;return[{...o,isStackedOnMobile:!0},n]},save({attributes:e}){const{columns:t}=e;return(0,je.createElement)("div",{className:`has-${t}-columns`},(0,je.createElement)(Je.InnerBlocks.Content,null))}},{attributes:{columns:{type:"number",default:2}},migrate(e,t){const{columns:n,...a}=e;return[e={...a,isStackedOnMobile:!0},t]},save({attributes:e}){const{verticalAlignment:t,columns:n}=e,a=it()(`has-${n}-columns`,{[`are-vertically-aligned-${t}`]:t});return(0,je.createElement)("div",{className:a},(0,je.createElement)(Je.InnerBlocks.Content,null))}}];const Ca=e=>{const t=parseFloat(e);return Number.isFinite(t)?parseFloat(t.toFixed(2)):void 0};function Sa(e,t){const{width:n=100/t}=e.attributes;return Ca(n)}function Ba(e,t,n=e.length){const a=function(e,t=e.length){return e.reduce(((e,n)=>e+Sa(n,t)),0)}(e,n);return Object.fromEntries(Object.entries(function(e,t=e.length){return e.reduce(((e,n)=>{const a=Sa(n,t);return Object.assign(e,{[n.clientId]:a})}),{})}(e,n)).map((([e,n])=>[e,Ca(t*n/a)])))}function Ta(e,t){return e.map((e=>({...e,attributes:{...e.attributes,width:`${t[e.clientId]}%`}})))}const Na=["core/column"];const Pa=(0,ut.withDispatch)(((e,t,n)=>({updateAlignment(a){const{clientId:o,setAttributes:r}=t,{updateBlockAttributes:l}=e(Je.store),{getBlockOrder:i}=n.select(Je.store);r({verticalAlignment:a});i(o).forEach((e=>{l(e,{verticalAlignment:a})}))},updateColumns(a,o){const{clientId:r}=t,{replaceInnerBlocks:l}=e(Je.store),{getBlocks:i}=n.select(Je.store);let s=i(r);const c=s.every((e=>{const t=e.attributes.width;return Number.isFinite(t?.endsWith?.("%")?parseFloat(t):t)}));const u=o>a;if(u&&c){const e=Ca(100/o);s=[...Ta(s,Ba(s,100-e)),...Array.from({length:o-a}).map((()=>(0,qe.createBlock)("core/column",{width:`${e}%`})))]}else if(u)s=[...s,...Array.from({length:o-a}).map((()=>(0,qe.createBlock)("core/column")))];else if(o{const{canInsertBlockType:t,canRemoveBlock:n,getBlocks:a,getBlockCount:r}=e(Je.store),l=a(o).reduce(((e,t,a)=>(n(t.clientId)||e.push(a),e)),[]);return{count:r(o),canInsertColumnBlock:t("core/column",o),minCount:Math.max(...l)+1}}),[o]),m=it()({[`are-vertically-aligned-${l}`]:l,"is-not-stacked-on-mobile":!r}),p=(0,Je.useBlockProps)({className:m}),d=(0,Je.useInnerBlocksProps)(p,{allowedBlocks:Na,orientation:"horizontal",renderAppender:!1,templateLock:i});return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.BlockControls,null,(0,je.createElement)(Je.BlockVerticalAlignmentToolbar,{onChange:n,value:l})),(0,je.createElement)(Je.InspectorControls,null,(0,je.createElement)(Ke.PanelBody,null,c&&(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Ke.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,Ye.__)("Columns"),value:s,onChange:e=>a(s,Math.max(u,e)),min:Math.max(1,u),max:Math.max(6,s)}),s>6&&(0,je.createElement)(Ke.Notice,{status:"warning",isDismissible:!1},(0,Ye.__)("This column count exceeds the recommended amount and may cause visual breakage."))),(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Stack on mobile"),checked:r,onChange:()=>t({isStackedOnMobile:!r})}))),(0,je.createElement)("div",{...d}))}));function Ia({clientId:e,name:t,setAttributes:n}){const{blockType:a,defaultVariation:o,variations:r}=(0,ut.useSelect)((e=>{const{getBlockVariations:n,getBlockType:a,getDefaultBlockVariation:o}=e(qe.store);return{blockType:a(t),defaultVariation:o(t,"block"),variations:n(t,"block")}}),[t]),{replaceInnerBlocks:l}=(0,ut.useDispatch)(Je.store),i=(0,Je.useBlockProps)();return(0,je.createElement)("div",{...i},(0,je.createElement)(Je.__experimentalBlockVariationPicker,{icon:a?.icon?.src,label:a?.title,variations:r,onSelect:(t=o)=>{t.attributes&&n(t.attributes),t.innerBlocks&&l(e,(0,qe.createBlocksFromInnerBlocksTemplate)(t.innerBlocks),!0)},allowSkip:!0}))}var Ma=e=>{const{clientId:t}=e,n=(0,ut.useSelect)((e=>e(Je.store).getBlocks(t).length>0),[t])?Pa:Ia;return(0,je.createElement)(n,{...e})};var za=[{name:"one-column-full",title:(0,Ye.__)("100"),description:(0,Ye.__)("One column"),icon:(0,je.createElement)(Ke.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,je.createElement)(Ke.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m39.0625 14h-30.0625v20.0938h30.0625zm-30.0625-2c-1.10457 0-2 .8954-2 2v20.0938c0 1.1045.89543 2 2 2h30.0625c1.1046 0 2-.8955 2-2v-20.0938c0-1.1046-.8954-2-2-2z"})),innerBlocks:[["core/column"]],scope:["block"]},{name:"two-columns-equal",title:(0,Ye.__)("50 / 50"),description:(0,Ye.__)("Two columns; equal split"),icon:(0,je.createElement)(Ke.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,je.createElement)(Ke.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H25V34H39ZM23 34H9V14H23V34Z"})),isDefault:!0,innerBlocks:[["core/column"],["core/column"]],scope:["block"]},{name:"two-columns-one-third-two-thirds",title:(0,Ye.__)("33 / 66"),description:(0,Ye.__)("Two columns; one-third, two-thirds split"),icon:(0,je.createElement)(Ke.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,je.createElement)(Ke.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H20V34H39ZM18 34H9V14H18V34Z"})),innerBlocks:[["core/column",{width:"33.33%"}],["core/column",{width:"66.66%"}]],scope:["block"]},{name:"two-columns-two-thirds-one-third",title:(0,Ye.__)("66 / 33"),description:(0,Ye.__)("Two columns; two-thirds, one-third split"),icon:(0,je.createElement)(Ke.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,je.createElement)(Ke.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H30V34H39ZM28 34H9V14H28V34Z"})),innerBlocks:[["core/column",{width:"66.66%"}],["core/column",{width:"33.33%"}]],scope:["block"]},{name:"three-columns-equal",title:(0,Ye.__)("33 / 33 / 33"),description:(0,Ye.__)("Three columns; equal split"),icon:(0,je.createElement)(Ke.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,je.createElement)(Ke.Path,{fillRule:"evenodd",d:"M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM28.5 34h-9V14h9v20zm2 0V14H39v20h-8.5zm-13 0H9V14h8.5v20z"})),innerBlocks:[["core/column"],["core/column"],["core/column"]],scope:["block"]},{name:"three-columns-wider-center",title:(0,Ye.__)("25 / 50 / 25"),description:(0,Ye.__)("Three columns; wide center column"),icon:(0,je.createElement)(Ke.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,je.createElement)(Ke.Path,{fillRule:"evenodd",d:"M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM31 34H17V14h14v20zm2 0V14h6v20h-6zm-18 0H9V14h6v20z"})),innerBlocks:[["core/column",{width:"25%"}],["core/column",{width:"50%"}],["core/column",{width:"25%"}]],scope:["block"]}];const Ra={from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert:e=>{const t=+(100/e.length).toFixed(2),n=e.map((({name:e,attributes:n,innerBlocks:a})=>["core/column",{width:`${t}%`},[[e,{...n},a]]]));return(0,qe.createBlock)("core/columns",{},(0,qe.createBlocksFromInnerBlocksTemplate)(n))},isMatch:({length:e},t)=>(1!==t.length||"core/columns"!==t[0].name)&&(e&&e<=6)},{type:"block",blocks:["core/media-text"],priority:1,transform:(e,t)=>{const{align:n,backgroundColor:a,textColor:o,style:r,mediaAlt:l,mediaId:i,mediaPosition:s,mediaSizeSlug:c,mediaType:u,mediaUrl:m,mediaWidth:p,verticalAlignment:d}=e;let g;if("image"!==u&&u)g=["core/video",{id:i,src:m}];else{g=["core/image",{...{id:i,alt:l,url:m,sizeSlug:c},...{href:e.href,linkClass:e.linkClass,linkDestination:e.linkDestination,linkTarget:e.linkTarget,rel:e.rel}}]}const h=[["core/column",{width:`${p}%`},[g]],["core/column",{width:100-p+"%"},t]];return"right"===s&&h.reverse(),(0,qe.createBlock)("core/columns",{align:n,backgroundColor:a,textColor:o,style:r,verticalAlignment:d},(0,qe.createBlocksFromInnerBlocksTemplate)(h))}}],ungroup:(e,t)=>t.flatMap((e=>e.innerBlocks))};var Ha=Ra;const Aa={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/columns",title:"Columns",category:"design",description:"Display content in multiple columns, with blocks added to each column.",textdomain:"default",attributes:{verticalAlignment:{type:"string"},isStackedOnMobile:{type:"boolean",default:!0},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]}},supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0,heading:!0,button:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{blockGap:{__experimentalDefault:"2em",sides:["horizontal","vertical"]},margin:["top","bottom"],padding:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},layout:{allowSwitching:!1,allowInheriting:!1,allowEditing:!1,default:{type:"flex",flexWrap:"nowrap"}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-columns-editor",style:"wp-block-columns"},{name:La}=Aa,Da={icon:xa,variations:za,example:{viewportWidth:600,innerBlocks:[{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:(0,Ye.__)("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.")}},{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"}},{name:"core/paragraph",attributes:{content:(0,Ye.__)("Suspendisse commodo neque lacus, a dictum orci interdum et.")}}]},{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:(0,Ye.__)("Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.")}},{name:"core/paragraph",attributes:{content:(0,Ye.__)("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},deprecated:Ea,edit:Ma,save:function({attributes:e}){const{isStackedOnMobile:t,verticalAlignment:n}=e,a=it()({[`are-vertically-aligned-${n}`]:n,"is-not-stacked-on-mobile":!t}),o=Je.useBlockProps.save({className:a}),r=Je.useInnerBlocksProps.save(o);return(0,je.createElement)("div",{...r})},transforms:Ha},Va=()=>Qe({name:La,metadata:Aa,settings:Da});var Fa=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M14 10.1V4c0-.6-.4-1-1-1H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1zm-1.5-.5H6.7l-1.2 1.2V4.5h7v5.1zM19 12h-8c-.6 0-1 .4-1 1v6.1c0 .6.4 1 1 1h5.7l1.8 1.8c.1.2.4.3.6.3.1 0 .2 0 .3-.1.4-.1.6-.5.6-.8V13c0-.6-.4-1-1-1zm-.5 7.8l-1.2-1.2h-5.8v-5.1h7v6.3z"}));var $a=[{attributes:{tagName:{type:"string",default:"div"}},apiVersion:3,supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}}},save({attributes:{tagName:e}}){const t=Je.useBlockProps.save(),{className:n}=t,a=n?.split(" ")||[],o=a?.filter((e=>"wp-block-comments"!==e)),r={...t,className:o.join(" ")};return(0,je.createElement)(e,{...r},(0,je.createElement)(Je.InnerBlocks.Content,null))}}];function Ga({attributes:{tagName:e},setAttributes:t}){const n={section:(0,Ye.__)("The
element should represent a standalone portion of the document that can't be better represented by another element."),aside:(0,Ye.__)("The